Sun, 04 Oct 2015 14:08:51 +0300
Copyright header fix, some minor stuff
--- a/src/basics.h Sun Oct 04 13:19:45 2015 +0300 +++ b/src/basics.h Sun Oct 04 14:08:51 2015 +0300 @@ -5,7 +5,7 @@ * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of
--- a/src/editmodes/abstractEditMode.cpp Sun Oct 04 13:19:45 2015 +0300 +++ b/src/editmodes/abstractEditMode.cpp Sun Oct 04 14:08:51 2015 +0300 @@ -5,7 +5,7 @@ * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of
--- a/src/editmodes/abstractEditMode.h Sun Oct 04 13:19:45 2015 +0300 +++ b/src/editmodes/abstractEditMode.h Sun Oct 04 14:08:51 2015 +0300 @@ -5,7 +5,7 @@ * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of
--- a/src/editmodes/circleMode.cpp Sun Oct 04 13:19:45 2015 +0300 +++ b/src/editmodes/circleMode.cpp Sun Oct 04 14:08:51 2015 +0300 @@ -5,7 +5,7 @@ * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of
--- a/src/editmodes/circleMode.h Sun Oct 04 13:19:45 2015 +0300 +++ b/src/editmodes/circleMode.h Sun Oct 04 14:08:51 2015 +0300 @@ -5,7 +5,7 @@ * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of
--- a/src/editmodes/curvemode.cpp Sun Oct 04 13:19:45 2015 +0300 +++ b/src/editmodes/curvemode.cpp Sun Oct 04 14:08:51 2015 +0300 @@ -5,7 +5,7 @@ * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of
--- a/src/editmodes/curvemode.h Sun Oct 04 13:19:45 2015 +0300 +++ b/src/editmodes/curvemode.h Sun Oct 04 14:08:51 2015 +0300 @@ -5,7 +5,7 @@ * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of
--- a/src/editmodes/drawMode.cpp Sun Oct 04 13:19:45 2015 +0300 +++ b/src/editmodes/drawMode.cpp Sun Oct 04 14:08:51 2015 +0300 @@ -5,7 +5,7 @@ * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of
--- a/src/editmodes/drawMode.h Sun Oct 04 13:19:45 2015 +0300 +++ b/src/editmodes/drawMode.h Sun Oct 04 14:08:51 2015 +0300 @@ -5,7 +5,7 @@ * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of
--- a/src/editmodes/linePathMode.cpp Sun Oct 04 13:19:45 2015 +0300 +++ b/src/editmodes/linePathMode.cpp Sun Oct 04 14:08:51 2015 +0300 @@ -1,7 +1,25 @@ +/* + * LDForge: LDraw parts authoring CAD + * Copyright (C) 2013 - 2015 Teemu Piippo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <QKeyEvent> #include "linePathMode.h" #include "../glRenderer.h" #include "../mainwindow.h" -#include <QKeyEvent> LinePathMode::LinePathMode (GLRenderer *renderer) : Super (renderer) {}
--- a/src/editmodes/linePathMode.h Sun Oct 04 13:19:45 2015 +0300 +++ b/src/editmodes/linePathMode.h Sun Oct 04 14:08:51 2015 +0300 @@ -1,3 +1,21 @@ +/* + * LDForge: LDraw parts authoring CAD + * Copyright (C) 2013 - 2015 Teemu Piippo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + #pragma once #include "abstractEditMode.h"
--- a/src/editmodes/rectangleMode.cpp Sun Oct 04 13:19:45 2015 +0300 +++ b/src/editmodes/rectangleMode.cpp Sun Oct 04 14:08:51 2015 +0300 @@ -5,7 +5,7 @@ * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of
--- a/src/editmodes/rectangleMode.h Sun Oct 04 13:19:45 2015 +0300 +++ b/src/editmodes/rectangleMode.h Sun Oct 04 14:08:51 2015 +0300 @@ -5,7 +5,7 @@ * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of
--- a/src/editmodes/selectMode.cpp Sun Oct 04 13:19:45 2015 +0300 +++ b/src/editmodes/selectMode.cpp Sun Oct 04 14:08:51 2015 +0300 @@ -5,7 +5,7 @@ * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of
--- a/src/editmodes/selectMode.h Sun Oct 04 13:19:45 2015 +0300 +++ b/src/editmodes/selectMode.h Sun Oct 04 14:08:51 2015 +0300 @@ -5,7 +5,7 @@ * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of
--- a/src/glCompiler.cpp Sun Oct 04 13:19:45 2015 +0300 +++ b/src/glCompiler.cpp Sun Oct 04 14:08:51 2015 +0300 @@ -340,7 +340,7 @@ case OBJ_BezierCurve: { LDBezierCurve* curve = static_cast<LDBezierCurve*> (obj); - for (LDPolygon& poly : curve->rasterizePolygons (gridBezierCurveSegments())) + for (LDPolygon& poly : curve->rasterizePolygons()) { poly.id = obj->id(); compilePolygon (poly, obj, &info);
--- a/src/glRenderer.h Sun Oct 04 13:19:45 2015 +0300 +++ b/src/glRenderer.h Sun Oct 04 14:08:51 2015 +0300 @@ -5,7 +5,7 @@ * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of
--- a/src/hierarchyelement.cpp Sun Oct 04 13:19:45 2015 +0300 +++ b/src/hierarchyelement.cpp Sun Oct 04 14:08:51 2015 +0300 @@ -1,3 +1,21 @@ +/* + * LDForge: LDraw parts authoring CAD + * Copyright (C) 2013 - 2015 Teemu Piippo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + #include <stdio.h> #include <QMetaObject> #include "hierarchyelement.h"
--- a/src/hierarchyelement.h Sun Oct 04 13:19:45 2015 +0300 +++ b/src/hierarchyelement.h Sun Oct 04 14:08:51 2015 +0300 @@ -1,3 +1,21 @@ +/* + * LDForge: LDraw parts authoring CAD + * Copyright (C) 2013 - 2015 Teemu Piippo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + #pragma once #include <QObject> #include "main.h"
--- a/src/ldObject.cpp Sun Oct 04 13:19:45 2015 +0300 +++ b/src/ldObject.cpp Sun Oct 04 14:08:51 2015 +0300 @@ -1087,6 +1087,9 @@ LDObjectList LDBezierCurve::rasterize (int segments) { + if (segments == 0) + segments = gridBezierCurveSegments(); + QVector<LDPolygon> polygons = rasterizePolygons (segments); LDObjectList result; @@ -1102,6 +1105,9 @@ QVector<LDPolygon> LDBezierCurve::rasterizePolygons (int segments) { + if (segments == 0) + segments = gridBezierCurveSegments(); + QVector<LDPolygon> result; QVector<Vertex> parms; parms.append (pointAt (0.0));
--- a/src/ldObject.h Sun Oct 04 13:19:45 2015 +0300 +++ b/src/ldObject.h Sun Oct 04 14:08:51 2015 +0300 @@ -463,8 +463,8 @@ LDBezierCurve (const Vertex& v0, const Vertex& v1, const Vertex& v2, const Vertex& v3, LDDocument* document = nullptr); Vertex pointAt (qreal t) const; - LDObjectList rasterize (int segments); - QVector<LDPolygon> rasterizePolygons (int segments); + LDObjectList rasterize (int segments = 0); + QVector<LDPolygon> rasterizePolygons (int segments = 0); }; // Other common LDraw stuff
--- a/src/ldobjectiterator.h Sun Oct 04 13:19:45 2015 +0300 +++ b/src/ldobjectiterator.h Sun Oct 04 14:08:51 2015 +0300 @@ -1,3 +1,21 @@ +/* + * LDForge: LDraw parts authoring CAD + * Copyright (C) 2013 - 2015 Teemu Piippo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + #pragma once #include "ldObject.h" #include "ldDocument.h"
--- a/src/ldpaths.cpp Sun Oct 04 13:19:45 2015 +0300 +++ b/src/ldpaths.cpp Sun Oct 04 14:08:51 2015 +0300 @@ -1,3 +1,21 @@ +/* + * LDForge: LDraw parts authoring CAD + * Copyright (C) 2013 - 2015 Teemu Piippo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + #include <QDir> #include "ldpaths.h" #include "mainwindow.h"
--- a/src/ldpaths.h Sun Oct 04 13:19:45 2015 +0300 +++ b/src/ldpaths.h Sun Oct 04 14:08:51 2015 +0300 @@ -1,3 +1,21 @@ +/* + * LDForge: LDraw parts authoring CAD + * Copyright (C) 2013 - 2015 Teemu Piippo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + #pragma once #include "main.h"
--- a/src/toolsets/basictoolset.cpp Sun Oct 04 13:19:45 2015 +0300 +++ b/src/toolsets/basictoolset.cpp Sun Oct 04 14:08:51 2015 +0300 @@ -29,7 +29,6 @@ #include "../ldobjectiterator.h" #include "../mainwindow.h" #include "../dialogs/colorselector.h" -#include "../miscallenous.h" #include "basictoolset.h" BasicToolset::BasicToolset (MainWindow *parent) : @@ -122,7 +121,7 @@ } for (LDBezierCurve* curve : filterByType<LDBezierCurve> (selectedObjects())) - curve->replace (curve->rasterize (gridBezierCurveSegments())); + curve->replace (curve->rasterize()); } void BasicToolset::inlineShallow()