# HG changeset patch # User Teemu Piippo # Date 1443956931 -10800 # Node ID a6b462051ae03bacd4d58055ce55ee12c89d881d # Parent a88cf5a322466573de5f04ac235b12405cf02c70 Copyright header fix, some minor stuff diff -r a88cf5a32246 -r a6b462051ae0 src/basics.h --- 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 diff -r a88cf5a32246 -r a6b462051ae0 src/editmodes/abstractEditMode.cpp --- 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 diff -r a88cf5a32246 -r a6b462051ae0 src/editmodes/abstractEditMode.h --- 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 diff -r a88cf5a32246 -r a6b462051ae0 src/editmodes/circleMode.cpp --- 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 diff -r a88cf5a32246 -r a6b462051ae0 src/editmodes/circleMode.h --- 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 diff -r a88cf5a32246 -r a6b462051ae0 src/editmodes/curvemode.cpp --- 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 diff -r a88cf5a32246 -r a6b462051ae0 src/editmodes/curvemode.h --- 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 diff -r a88cf5a32246 -r a6b462051ae0 src/editmodes/drawMode.cpp --- 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 diff -r a88cf5a32246 -r a6b462051ae0 src/editmodes/drawMode.h --- 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 diff -r a88cf5a32246 -r a6b462051ae0 src/editmodes/linePathMode.cpp --- 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 . + */ + +#include #include "linePathMode.h" #include "../glRenderer.h" #include "../mainwindow.h" -#include LinePathMode::LinePathMode (GLRenderer *renderer) : Super (renderer) {} diff -r a88cf5a32246 -r a6b462051ae0 src/editmodes/linePathMode.h --- 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 . + */ + #pragma once #include "abstractEditMode.h" diff -r a88cf5a32246 -r a6b462051ae0 src/editmodes/rectangleMode.cpp --- 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 diff -r a88cf5a32246 -r a6b462051ae0 src/editmodes/rectangleMode.h --- 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 diff -r a88cf5a32246 -r a6b462051ae0 src/editmodes/selectMode.cpp --- 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 diff -r a88cf5a32246 -r a6b462051ae0 src/editmodes/selectMode.h --- 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 diff -r a88cf5a32246 -r a6b462051ae0 src/glCompiler.cpp --- 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 (obj); - for (LDPolygon& poly : curve->rasterizePolygons (gridBezierCurveSegments())) + for (LDPolygon& poly : curve->rasterizePolygons()) { poly.id = obj->id(); compilePolygon (poly, obj, &info); diff -r a88cf5a32246 -r a6b462051ae0 src/glRenderer.h --- 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 diff -r a88cf5a32246 -r a6b462051ae0 src/hierarchyelement.cpp --- 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 . + */ + #include #include #include "hierarchyelement.h" diff -r a88cf5a32246 -r a6b462051ae0 src/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 . + */ + #pragma once #include #include "main.h" diff -r a88cf5a32246 -r a6b462051ae0 src/ldObject.cpp --- 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 polygons = rasterizePolygons (segments); LDObjectList result; @@ -1102,6 +1105,9 @@ QVector LDBezierCurve::rasterizePolygons (int segments) { + if (segments == 0) + segments = gridBezierCurveSegments(); + QVector result; QVector parms; parms.append (pointAt (0.0)); diff -r a88cf5a32246 -r a6b462051ae0 src/ldObject.h --- 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 rasterizePolygons (int segments); + LDObjectList rasterize (int segments = 0); + QVector rasterizePolygons (int segments = 0); }; // Other common LDraw stuff diff -r a88cf5a32246 -r a6b462051ae0 src/ldobjectiterator.h --- 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 . + */ + #pragma once #include "ldObject.h" #include "ldDocument.h" diff -r a88cf5a32246 -r a6b462051ae0 src/ldpaths.cpp --- 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 . + */ + #include #include "ldpaths.h" #include "mainwindow.h" diff -r a88cf5a32246 -r a6b462051ae0 src/ldpaths.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 . + */ + #pragma once #include "main.h" diff -r a88cf5a32246 -r a6b462051ae0 src/toolsets/basictoolset.cpp --- 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 (selectedObjects())) - curve->replace (curve->rasterize (gridBezierCurveSegments())); + curve->replace (curve->rasterize()); } void BasicToolset::inlineShallow()