From d1ee8ea207f158bfd3a1dc4df70820f9df91a13b Mon Sep 17 00:00:00 2001 From: Joseph Coffland Date: Thu, 26 May 2016 08:43:40 -0700 Subject: [PATCH] Removed trailing space --- src/camotics/Application.h | 1 - src/camotics/CommandLineApp.h | 1 - src/camotics/ConcurrentTaskManager.h | 1 - src/camotics/Geom.h | 1 - src/camotics/Grid.h | 1 - src/camotics/Real.h | 1 - src/camotics/Task.h | 1 - src/camotics/TaskFilter.h | 1 - src/camotics/TaskObserver.h | 1 - src/camotics/contour/CompositeSurface.h | 1 - src/camotics/contour/ContourGenerator.h | 1 - src/camotics/contour/CubeSlice.h | 1 - src/camotics/contour/CubicalMarchingSquares.h | 1 - src/camotics/contour/Edge.h | 1 - src/camotics/contour/FieldFunction.h | 1 - src/camotics/contour/GridTree.h | 1 - src/camotics/contour/GridTreeBase.h | 1 - src/camotics/contour/GridTreeLeaf.h | 1 - src/camotics/contour/GridTreeNode.h | 1 - src/camotics/contour/GridTreeRef.h | 1 - src/camotics/contour/MarchingCubes.h | 1 - src/camotics/contour/QEF.cpp | 2 +- src/camotics/contour/QEF.h | 2 +- src/camotics/contour/SliceContourGenerator.h | 1 - src/camotics/contour/Triangle.h | 1 - src/camotics/contour/TriangleMesh.cpp | 2 - src/camotics/contour/TriangleMesh.h | 1 - src/camotics/contour/TriangleSurface.h | 1 - src/camotics/cutsim/AABB.h | 1 - src/camotics/cutsim/AABBTree.h | 1 - src/camotics/cutsim/CompositeSweep.h | 1 - src/camotics/cutsim/CutSim.h | 1 - src/camotics/cutsim/Hit.h | 1 - src/camotics/cutsim/MoveLookup.h | 1 - src/camotics/cutsim/MoveStream.cpp | 1 - src/camotics/cutsim/MoveStream.h | 1 - src/camotics/cutsim/NCFile.h | 1 - src/camotics/cutsim/OctTree.h | 1 - src/camotics/cutsim/Project.h | 1 - src/camotics/cutsim/ReduceTask.h | 1 - src/camotics/cutsim/Simulation.h | 1 - src/camotics/cutsim/SimulationRun.h | 1 - src/camotics/cutsim/SpheroidSweep.h | 1 - src/camotics/cutsim/SurfaceTask.h | 1 - src/camotics/cutsim/Sweep.h | 1 - src/camotics/cutsim/ToolPath.h | 1 - src/camotics/cutsim/ToolPathTask.h | 1 - src/camotics/cutsim/Workpiece.h | 1 - src/camotics/dxf/DXFArc.h | 1 - src/camotics/dxf/DXFEntity.h | 1 - src/camotics/dxf/DXFLine.h | 1 - src/camotics/dxf/DXFPoint.h | 1 - src/camotics/dxf/DXFPolyLine.h | 1 - src/camotics/dxf/DXFReader.h | 1 - src/camotics/dxf/DXFSpline.h | 1 - src/camotics/dxf/dxflib/dl_attributes.h | 6 +- src/camotics/dxf/dxflib/dl_codes.h | 3 +- src/camotics/dxf/dxflib/dl_creationadapter.h | 22 +- .../dxf/dxflib/dl_creationinterface.h | 86 +++--- src/camotics/dxf/dxflib/dl_dxf.cpp | 54 ++-- src/camotics/dxf/dxflib/dl_dxf.h | 40 +-- src/camotics/dxf/dxflib/dl_entities.h | 53 ++-- src/camotics/dxf/dxflib/dl_exception.h | 3 +- src/camotics/dxf/dxflib/dl_extrusion.h | 5 +- src/camotics/dxf/dxflib/dl_writer.h | 20 +- src/camotics/dxf/dxflib/dl_writer_ascii.cpp | 5 +- src/camotics/dxf/dxflib/dl_writer_ascii.h | 5 +- src/camotics/gcode/Codes.cpp | 2 +- src/camotics/gcode/Codes.h | 1 - src/camotics/gcode/Evaluator.cpp | 2 +- src/camotics/gcode/Evaluator.h | 1 - src/camotics/gcode/OCodeInterpreter.h | 1 - src/camotics/gcode/Parser.cpp | 6 +- src/camotics/gcode/Parser.h | 1 - src/camotics/gcode/Printer.cpp | 6 +- src/camotics/gcode/Printer.h | 1 - src/camotics/gcode/Processor.h | 1 - src/camotics/gcode/Token.h | 1 - src/camotics/gcode/Tokenizer.cpp | 6 +- src/camotics/gcode/Tokenizer.h | 1 - src/camotics/gcode/ast/Assign.h | 1 - src/camotics/gcode/ast/BinaryOp.h | 1 - src/camotics/gcode/ast/Block.h | 1 - src/camotics/gcode/ast/Comment.h | 1 - src/camotics/gcode/ast/FunctionCall.h | 1 - src/camotics/gcode/ast/NamedReference.h | 1 - src/camotics/gcode/ast/Number.h | 1 - src/camotics/gcode/ast/OCode.h | 1 - src/camotics/gcode/ast/Program.h | 1 - src/camotics/gcode/ast/QuotedExpr.h | 1 - src/camotics/gcode/ast/Reference.h | 1 - src/camotics/gcode/ast/UnaryOp.h | 1 - src/camotics/gcode/ast/Word.h | 1 - src/camotics/machine/Axes.h | 3 +- src/camotics/machine/MachineAdapter.h | 1 - src/camotics/machine/MachineEnum.h | 1 - src/camotics/machine/MachineInterface.h | 1 - src/camotics/machine/MachineLinearizer.h | 1 - src/camotics/machine/MachineMatrix.h | 1 - src/camotics/machine/MachinePipeline.h | 1 - src/camotics/machine/MachineState.h | 1 - src/camotics/machine/MachineUnitAdapter.h | 1 - src/camotics/machine/MoveSink.h | 1 - src/camotics/machine/TransMatrix.h | 1 - src/camotics/opt/AnnealState.cpp | 2 +- src/camotics/opt/AnnealState.h | 9 +- src/camotics/opt/Opt.cpp | 8 +- src/camotics/opt/Opt.h | 1 - src/camotics/opt/Path.h | 1 - src/camotics/pcb/Arc.h | 1 - src/camotics/pcb/Element.cpp | 2 +- src/camotics/pcb/Element.h | 1 - src/camotics/pcb/ElementArc.h | 1 - src/camotics/pcb/ElementLine.h | 1 - src/camotics/pcb/Layer.cpp | 2 +- src/camotics/pcb/Layer.h | 1 - src/camotics/pcb/Layout.cpp | 2 +- src/camotics/pcb/Layout.h | 1 - src/camotics/pcb/Line.h | 1 - src/camotics/pcb/NetList.cpp | 2 +- src/camotics/pcb/NetList.h | 1 - src/camotics/pcb/Object.cpp | 4 +- src/camotics/pcb/Object.h | 1 - src/camotics/pcb/Pad.h | 1 - src/camotics/pcb/Pin.h | 1 - src/camotics/pcb/Point.h | 1 - src/camotics/pcb/Polygon.h | 1 - src/camotics/pcb/String.h | 1 - src/camotics/pcb/Symbol.cpp | 2 +- src/camotics/pcb/Symbol.h | 1 - src/camotics/pcb/Text.h | 1 - src/camotics/pcb/Via.h | 1 - src/camotics/probe/Probe.cpp | 10 +- src/camotics/probe/Probe.h | 1 - src/camotics/probe/ProbeGrid.cpp | 2 +- src/camotics/probe/ProbeGrid.h | 1 - src/camotics/probe/ProbePoint.h | 3 +- src/camotics/qt/AboutDialog.h | 1 - src/camotics/qt/ClickWidget.h | 1 - src/camotics/qt/ColorComponent.h | 1 - src/camotics/qt/ConsoleWriter.h | 1 - src/camotics/qt/DonateDialog.h | 1 - src/camotics/qt/ExportDialog.h | 1 - src/camotics/qt/FileDialog.h | 1 - src/camotics/qt/FileTabManager.h | 1 - src/camotics/qt/FindDialog.h | 1 - src/camotics/qt/GCodeHighlighter.h | 1 - src/camotics/qt/GLEWInit.h | 1 - src/camotics/qt/GLView.h | 1 - src/camotics/qt/Highlighter.h | 1 - src/camotics/qt/NCEdit.h | 1 - src/camotics/qt/NewDialog.h | 1 - src/camotics/qt/ProjectModel.h | 1 - src/camotics/qt/QApplication.h | 1 - src/camotics/qt/QTextDevice.h | 1 - src/camotics/qt/Settings.h | 1 - src/camotics/qt/SettingsDialog.h | 1 - src/camotics/qt/SidebarWidget.h | 1 - src/camotics/qt/TPLHighlighter.h | 1 - src/camotics/qt/ToolDialog.h | 1 - src/camotics/qt/ToolGraphicsItem.h | 1 - src/camotics/qt/ToolScene.h | 1 - src/camotics/remote/Connection.h | 1 - src/camotics/remote/ConnectionManager.h | 1 - src/camotics/render/RenderJob.h | 1 - src/camotics/render/Renderer.h | 1 - src/camotics/sim/Addresses.h | 1 - src/camotics/sim/Controller.cpp | 2 +- src/camotics/sim/Controller.h | 1 - src/camotics/sim/CoordinateSystem.h | 1 - src/camotics/sim/Tool.h | 3 +- src/camotics/sim/ToolTable.h | 1 - src/camotics/stl/Facet.h | 1 - src/camotics/stl/STLBinaryTriangle.h | 1 - src/camotics/stl/STLReader.h | 1 - src/camotics/stl/STLSink.h | 1 - src/camotics/stl/STLSource.h | 1 - src/camotics/stl/STLWriter.h | 1 - src/camotics/value/MemberFunctorObserver.h | 1 - src/camotics/value/MemberFunctorValue.h | 1 - src/camotics/value/Observer.h | 1 - src/camotics/value/Value.h | 1 - src/camotics/value/ValueGroup.h | 1 - src/camotics/value/ValueSet.h | 1 - src/camotics/value/VarValue.h | 1 - src/camotics/view/BoundsView.cpp | 4 +- src/camotics/view/BoundsView.h | 1 - src/camotics/view/Color.h | 1 - src/camotics/view/CuboidView.h | 1 - src/camotics/view/ToolPathView.h | 1 - src/camotics/view/ToolView.h | 1 - src/camotics/view/View.h | 1 - src/camotics/view/ViewPort.cpp | 2 +- src/camotics/view/ViewPort.h | 1 - src/camotics/view/Viewer.h | 1 - src/clipper/clipper.cpp | 246 +++++++++--------- src/clipper/clipper.hpp | 12 +- src/glew/glew.c | 40 +-- src/glew/glew.h | 30 +-- src/glew/glxew.h | 98 +++---- src/glew/wglew.h | 40 +-- src/tplang/ClipperModule.h | 1 - src/tplang/DXFModule.h | 1 - src/tplang/GCodeModule.h | 1 - src/tplang/Interpreter.h | 1 - src/tplang/MatrixModule.h | 1 - src/tplang/TPLContext.h | 1 - 207 files changed, 421 insertions(+), 601 deletions(-) diff --git a/src/camotics/Application.h b/src/camotics/Application.h index 748f2cad..0ade9484 100644 --- a/src/camotics/Application.h +++ b/src/camotics/Application.h @@ -41,4 +41,3 @@ namespace CAMotics { } #endif // CAMOTICS_APPLICATION_H - diff --git a/src/camotics/CommandLineApp.h b/src/camotics/CommandLineApp.h index 310f249c..69001292 100644 --- a/src/camotics/CommandLineApp.h +++ b/src/camotics/CommandLineApp.h @@ -50,4 +50,3 @@ namespace CAMotics { } #endif // CAMOTICS_COMMAND_LINE_APP_H - diff --git a/src/camotics/ConcurrentTaskManager.h b/src/camotics/ConcurrentTaskManager.h index 461514af..e3020187 100644 --- a/src/camotics/ConcurrentTaskManager.h +++ b/src/camotics/ConcurrentTaskManager.h @@ -69,4 +69,3 @@ namespace CAMotics { } #endif // CAMOTICS_CONCURRENT_TASK_MANAGER_H - diff --git a/src/camotics/Geom.h b/src/camotics/Geom.h index cdba05c2..2fcf9a17 100644 --- a/src/camotics/Geom.h +++ b/src/camotics/Geom.h @@ -48,4 +48,3 @@ namespace CAMotics { } #endif // CAMOTICS_GEOM_H - diff --git a/src/camotics/Grid.h b/src/camotics/Grid.h index 730c820f..13924de6 100644 --- a/src/camotics/Grid.h +++ b/src/camotics/Grid.h @@ -65,4 +65,3 @@ namespace CAMotics { } #endif // CAMOTICS_GRID_H - diff --git a/src/camotics/Real.h b/src/camotics/Real.h index c0d140e3..2fdd5353 100644 --- a/src/camotics/Real.h +++ b/src/camotics/Real.h @@ -32,4 +32,3 @@ namespace CAMotics { } #endif // CAMOTICS_REAL_H - diff --git a/src/camotics/Task.h b/src/camotics/Task.h index 5ba8a992..5d2badb4 100644 --- a/src/camotics/Task.h +++ b/src/camotics/Task.h @@ -55,4 +55,3 @@ namespace CAMotics { } #endif // CAMOTICS_TASK_H - diff --git a/src/camotics/TaskFilter.h b/src/camotics/TaskFilter.h index 145f9061..8cf693a4 100644 --- a/src/camotics/TaskFilter.h +++ b/src/camotics/TaskFilter.h @@ -72,4 +72,3 @@ namespace CAMotics { } #endif // CAMOTICS_TASK_FILTER_H - diff --git a/src/camotics/TaskObserver.h b/src/camotics/TaskObserver.h index 76bd1686..5fbe020d 100644 --- a/src/camotics/TaskObserver.h +++ b/src/camotics/TaskObserver.h @@ -31,4 +31,3 @@ namespace CAMotics { } #endif // CAMOTICS_TASK_OBSERVER_H - diff --git a/src/camotics/contour/CompositeSurface.h b/src/camotics/contour/CompositeSurface.h index 71fc57b2..154e184b 100644 --- a/src/camotics/contour/CompositeSurface.h +++ b/src/camotics/contour/CompositeSurface.h @@ -52,4 +52,3 @@ namespace CAMotics { } #endif // CAMOTICS_COMPOSITE_SURFACE_H - diff --git a/src/camotics/contour/ContourGenerator.h b/src/camotics/contour/ContourGenerator.h index a7a180a2..ba290e1a 100644 --- a/src/camotics/contour/ContourGenerator.h +++ b/src/camotics/contour/ContourGenerator.h @@ -46,4 +46,3 @@ namespace CAMotics { } #endif // CAMOTICS_CONTOUR_GENERATOR_H - diff --git a/src/camotics/contour/CubeSlice.h b/src/camotics/contour/CubeSlice.h index e628aa57..d7465a2e 100644 --- a/src/camotics/contour/CubeSlice.h +++ b/src/camotics/contour/CubeSlice.h @@ -56,4 +56,3 @@ namespace CAMotics { } #endif // CAMOTICS_CUBE_SLICE_H - diff --git a/src/camotics/contour/CubicalMarchingSquares.h b/src/camotics/contour/CubicalMarchingSquares.h index ada0fea2..dc7e686c 100644 --- a/src/camotics/contour/CubicalMarchingSquares.h +++ b/src/camotics/contour/CubicalMarchingSquares.h @@ -37,4 +37,3 @@ namespace CAMotics { } #endif // CAMOTICS_CUBICAL_MARCHING_SQUARES_H - diff --git a/src/camotics/contour/Edge.h b/src/camotics/contour/Edge.h index 2ac16b25..599ec64b 100644 --- a/src/camotics/contour/Edge.h +++ b/src/camotics/contour/Edge.h @@ -36,4 +36,3 @@ namespace CAMotics { } #endif // CAMOTICS_EDGE_H - diff --git a/src/camotics/contour/FieldFunction.h b/src/camotics/contour/FieldFunction.h index 880fbcab..9f1b9e15 100644 --- a/src/camotics/contour/FieldFunction.h +++ b/src/camotics/contour/FieldFunction.h @@ -49,4 +49,3 @@ namespace CAMotics { } #endif // CAMOTICS_FIELD_FUNCTION_H - diff --git a/src/camotics/contour/GridTree.h b/src/camotics/contour/GridTree.h index 2ee189db..fe657f3e 100644 --- a/src/camotics/contour/GridTree.h +++ b/src/camotics/contour/GridTree.h @@ -42,4 +42,3 @@ namespace CAMotics { } #endif // CAMOTICS_GRID_TREE_H - diff --git a/src/camotics/contour/GridTreeBase.h b/src/camotics/contour/GridTreeBase.h index 1a6263a7..424eb409 100644 --- a/src/camotics/contour/GridTreeBase.h +++ b/src/camotics/contour/GridTreeBase.h @@ -43,4 +43,3 @@ namespace CAMotics { } #endif // CAMOTICS_GRID_TREE_BASE_H - diff --git a/src/camotics/contour/GridTreeLeaf.h b/src/camotics/contour/GridTreeLeaf.h index abb0215e..14847961 100644 --- a/src/camotics/contour/GridTreeLeaf.h +++ b/src/camotics/contour/GridTreeLeaf.h @@ -47,4 +47,3 @@ namespace CAMotics { } #endif // CAMOTICS_GRID_TREE_LEAF_H - diff --git a/src/camotics/contour/GridTreeNode.h b/src/camotics/contour/GridTreeNode.h index 82c83385..2300b34d 100644 --- a/src/camotics/contour/GridTreeNode.h +++ b/src/camotics/contour/GridTreeNode.h @@ -49,4 +49,3 @@ namespace CAMotics { } #endif // CAMOTICS_GRID_TREE_NODEH - diff --git a/src/camotics/contour/GridTreeRef.h b/src/camotics/contour/GridTreeRef.h index 204f7486..3b1bc136 100644 --- a/src/camotics/contour/GridTreeRef.h +++ b/src/camotics/contour/GridTreeRef.h @@ -43,4 +43,3 @@ namespace CAMotics { } #endif // CAMOTICS_GRID_TREE_REF_H - diff --git a/src/camotics/contour/MarchingCubes.h b/src/camotics/contour/MarchingCubes.h index cd988622..e7da31e0 100644 --- a/src/camotics/contour/MarchingCubes.h +++ b/src/camotics/contour/MarchingCubes.h @@ -36,4 +36,3 @@ namespace CAMotics { } #endif // CAMOTICS_MARCHING_CUBES_H - diff --git a/src/camotics/contour/QEF.cpp b/src/camotics/contour/QEF.cpp index b2934eae..fab3b0fa 100644 --- a/src/camotics/contour/QEF.cpp +++ b/src/camotics/contour/QEF.cpp @@ -22,7 +22,7 @@ // http://www.oocities.org/tzukkers/isosurf/isosurfaces.html // By Ronen Tzur // ThreeD Quadric Error Function -// +// // This file is in the public domain. #include "QEF.h" diff --git a/src/camotics/contour/QEF.h b/src/camotics/contour/QEF.h index 3c51d49f..f69ef021 100644 --- a/src/camotics/contour/QEF.h +++ b/src/camotics/contour/QEF.h @@ -25,7 +25,7 @@ // http://www.oocities.org/tzukkers/isosurf/isosurfaces.html // By Ronen Tzur // ThreeD Quadric Error Function -// +// // This file is in the public domain. #include diff --git a/src/camotics/contour/SliceContourGenerator.h b/src/camotics/contour/SliceContourGenerator.h index 41a85bbb..b7850d6e 100644 --- a/src/camotics/contour/SliceContourGenerator.h +++ b/src/camotics/contour/SliceContourGenerator.h @@ -40,4 +40,3 @@ namespace CAMotics { } #endif // CAMOTICS_SLICE_CONTOUR_GENERATOR_H - diff --git a/src/camotics/contour/Triangle.h b/src/camotics/contour/Triangle.h index dfe19cb2..87c931cb 100644 --- a/src/camotics/contour/Triangle.h +++ b/src/camotics/contour/Triangle.h @@ -40,4 +40,3 @@ namespace CAMotics { } #endif // CAMOTICS_TRIANGLE_H - diff --git a/src/camotics/contour/TriangleMesh.cpp b/src/camotics/contour/TriangleMesh.cpp index e56b9aef..613aaf33 100644 --- a/src/camotics/contour/TriangleMesh.cpp +++ b/src/camotics/contour/TriangleMesh.cpp @@ -393,5 +393,3 @@ bool TriangleMesh::moreThan2InCommon(VertexSet &vs1, VertexSet &vs2) { return false; } - - diff --git a/src/camotics/contour/TriangleMesh.h b/src/camotics/contour/TriangleMesh.h index 923bdebc..a1890c2a 100644 --- a/src/camotics/contour/TriangleMesh.h +++ b/src/camotics/contour/TriangleMesh.h @@ -99,4 +99,3 @@ namespace CAMotics { } #endif // CAMOTICS_TRIANGLE_MESH_H - diff --git a/src/camotics/contour/TriangleSurface.h b/src/camotics/contour/TriangleSurface.h index 3e113ac0..8eb253c0 100644 --- a/src/camotics/contour/TriangleSurface.h +++ b/src/camotics/contour/TriangleSurface.h @@ -69,4 +69,3 @@ namespace CAMotics { } #endif // CAMOTICS_TRIANGLE_SURFACE_H - diff --git a/src/camotics/cutsim/AABB.h b/src/camotics/cutsim/AABB.h index 838c3edc..5d4438cc 100644 --- a/src/camotics/cutsim/AABB.h +++ b/src/camotics/cutsim/AABB.h @@ -54,4 +54,3 @@ namespace CAMotics { } #endif // CAMOTICS_AABB_H - diff --git a/src/camotics/cutsim/AABBTree.h b/src/camotics/cutsim/AABBTree.h index 280d25d5..9d3bb106 100644 --- a/src/camotics/cutsim/AABBTree.h +++ b/src/camotics/cutsim/AABBTree.h @@ -54,4 +54,3 @@ namespace CAMotics { } #endif // CAMOTICS_AABBTREE_H - diff --git a/src/camotics/cutsim/CompositeSweep.h b/src/camotics/cutsim/CompositeSweep.h index 129f735c..5ef919ba 100644 --- a/src/camotics/cutsim/CompositeSweep.h +++ b/src/camotics/cutsim/CompositeSweep.h @@ -46,4 +46,3 @@ namespace CAMotics { } #endif // CAMOTICS_COMPOSITE_SWEEP_H - diff --git a/src/camotics/cutsim/CutSim.h b/src/camotics/cutsim/CutSim.h index 576eec2d..a2fe2768 100644 --- a/src/camotics/cutsim/CutSim.h +++ b/src/camotics/cutsim/CutSim.h @@ -49,4 +49,3 @@ namespace CAMotics { } #endif // CAMOTICS_CUT_SIM_H - diff --git a/src/camotics/cutsim/Hit.h b/src/camotics/cutsim/Hit.h index 56309396..f4aa2790 100644 --- a/src/camotics/cutsim/Hit.h +++ b/src/camotics/cutsim/Hit.h @@ -31,4 +31,3 @@ namespace CAMotics { } #endif // CAMOTICS_HIT_H - diff --git a/src/camotics/cutsim/MoveLookup.h b/src/camotics/cutsim/MoveLookup.h index 6069d13d..b58d87b7 100644 --- a/src/camotics/cutsim/MoveLookup.h +++ b/src/camotics/cutsim/MoveLookup.h @@ -40,4 +40,3 @@ namespace CAMotics { } #endif // CAMOTICS_MOVE_LOOKUP_H - diff --git a/src/camotics/cutsim/MoveStream.cpp b/src/camotics/cutsim/MoveStream.cpp index 53c37317..880a4313 100644 --- a/src/camotics/cutsim/MoveStream.cpp +++ b/src/camotics/cutsim/MoveStream.cpp @@ -21,4 +21,3 @@ #include "MoveStream.h" using namespace CAMotics; - diff --git a/src/camotics/cutsim/MoveStream.h b/src/camotics/cutsim/MoveStream.h index ffd07989..cf7c8453 100644 --- a/src/camotics/cutsim/MoveStream.h +++ b/src/camotics/cutsim/MoveStream.h @@ -34,4 +34,3 @@ namespace CAMotics { } #endif // TPLANG_MOVE_STREAM_H - diff --git a/src/camotics/cutsim/NCFile.h b/src/camotics/cutsim/NCFile.h index a72afd17..6a3c68e4 100644 --- a/src/camotics/cutsim/NCFile.h +++ b/src/camotics/cutsim/NCFile.h @@ -50,4 +50,3 @@ namespace CAMotics { } #endif // CAMOTICS_NCFILE_H - diff --git a/src/camotics/cutsim/OctTree.h b/src/camotics/cutsim/OctTree.h index 9554f696..c5659763 100644 --- a/src/camotics/cutsim/OctTree.h +++ b/src/camotics/cutsim/OctTree.h @@ -62,4 +62,3 @@ namespace CAMotics { } #endif // CAMOTICS_OCT_TREE_H - diff --git a/src/camotics/cutsim/Project.h b/src/camotics/cutsim/Project.h index 408ff45b..6f3fdf9a 100644 --- a/src/camotics/cutsim/Project.h +++ b/src/camotics/cutsim/Project.h @@ -121,4 +121,3 @@ namespace CAMotics { } #endif // CAMOTICS_PROJECT_H - diff --git a/src/camotics/cutsim/ReduceTask.h b/src/camotics/cutsim/ReduceTask.h index 00e76f08..44958afd 100644 --- a/src/camotics/cutsim/ReduceTask.h +++ b/src/camotics/cutsim/ReduceTask.h @@ -43,4 +43,3 @@ namespace CAMotics { } #endif // CAMOTICS_REDUCE_TASK_H - diff --git a/src/camotics/cutsim/Simulation.h b/src/camotics/cutsim/Simulation.h index 382ad3d8..ea9f107a 100644 --- a/src/camotics/cutsim/Simulation.h +++ b/src/camotics/cutsim/Simulation.h @@ -59,4 +59,3 @@ namespace CAMotics { } #endif // CAMOTICS_SIMULATION_H - diff --git a/src/camotics/cutsim/SimulationRun.h b/src/camotics/cutsim/SimulationRun.h index 5de3c201..34b56f2e 100644 --- a/src/camotics/cutsim/SimulationRun.h +++ b/src/camotics/cutsim/SimulationRun.h @@ -55,4 +55,3 @@ namespace CAMotics { } #endif // CAMOTICS_SIMULATION_RUN_H - diff --git a/src/camotics/cutsim/SpheroidSweep.h b/src/camotics/cutsim/SpheroidSweep.h index f7852339..7b79d999 100644 --- a/src/camotics/cutsim/SpheroidSweep.h +++ b/src/camotics/cutsim/SpheroidSweep.h @@ -43,4 +43,3 @@ namespace CAMotics { } #endif // CAMOTICS_SPHEROID_SWEEP_H - diff --git a/src/camotics/cutsim/SurfaceTask.h b/src/camotics/cutsim/SurfaceTask.h index 132f94a6..cd045180 100644 --- a/src/camotics/cutsim/SurfaceTask.h +++ b/src/camotics/cutsim/SurfaceTask.h @@ -49,4 +49,3 @@ namespace CAMotics { } #endif // CAMOTICS_SURFACE_TASK_H - diff --git a/src/camotics/cutsim/Sweep.h b/src/camotics/cutsim/Sweep.h index 0ffeab27..fc04a499 100644 --- a/src/camotics/cutsim/Sweep.h +++ b/src/camotics/cutsim/Sweep.h @@ -48,4 +48,3 @@ namespace CAMotics { } #endif // CAMOTICS_SWEEP_H - diff --git a/src/camotics/cutsim/ToolPath.h b/src/camotics/cutsim/ToolPath.h index 8d2e8613..15f67556 100644 --- a/src/camotics/cutsim/ToolPath.h +++ b/src/camotics/cutsim/ToolPath.h @@ -61,4 +61,3 @@ namespace CAMotics { } #endif // CAMOTICS_TOOL_PATH_H - diff --git a/src/camotics/cutsim/ToolPathTask.h b/src/camotics/cutsim/ToolPathTask.h index a94c6627..d43e5247 100644 --- a/src/camotics/cutsim/ToolPathTask.h +++ b/src/camotics/cutsim/ToolPathTask.h @@ -65,4 +65,3 @@ namespace CAMotics { } #endif // CAMOTICS_TOOL_PATH_TASK_H - diff --git a/src/camotics/cutsim/Workpiece.h b/src/camotics/cutsim/Workpiece.h index 8501c4fb..424a8dbf 100644 --- a/src/camotics/cutsim/Workpiece.h +++ b/src/camotics/cutsim/Workpiece.h @@ -44,4 +44,3 @@ namespace CAMotics { } #endif // CAMOTICS_WORKPIECE_H - diff --git a/src/camotics/dxf/DXFArc.h b/src/camotics/dxf/DXFArc.h index 87eedc57..eae39baf 100644 --- a/src/camotics/dxf/DXFArc.h +++ b/src/camotics/dxf/DXFArc.h @@ -50,4 +50,3 @@ namespace CAMotics { } #endif // CAMOTICS_DXFARC_H - diff --git a/src/camotics/dxf/DXFEntity.h b/src/camotics/dxf/DXFEntity.h index 3ff70c1b..2092565c 100644 --- a/src/camotics/dxf/DXFEntity.h +++ b/src/camotics/dxf/DXFEntity.h @@ -46,4 +46,3 @@ namespace CAMotics { } #endif // CAMOTICS_DXFENTITY_H - diff --git a/src/camotics/dxf/DXFLine.h b/src/camotics/dxf/DXFLine.h index b3395125..bcc0ea2f 100644 --- a/src/camotics/dxf/DXFLine.h +++ b/src/camotics/dxf/DXFLine.h @@ -42,4 +42,3 @@ namespace CAMotics { } #endif // CAMOTICS_DXFLINE_H - diff --git a/src/camotics/dxf/DXFPoint.h b/src/camotics/dxf/DXFPoint.h index 4cf46e11..4f04067b 100644 --- a/src/camotics/dxf/DXFPoint.h +++ b/src/camotics/dxf/DXFPoint.h @@ -35,4 +35,3 @@ namespace CAMotics { } #endif // CAMOTICS_DXFPOINT_H - diff --git a/src/camotics/dxf/DXFPolyLine.h b/src/camotics/dxf/DXFPolyLine.h index 231217a8..cdaf7989 100644 --- a/src/camotics/dxf/DXFPolyLine.h +++ b/src/camotics/dxf/DXFPolyLine.h @@ -42,4 +42,3 @@ namespace CAMotics { } #endif // CAMOTICS_DXFPOLY_LINE_H - diff --git a/src/camotics/dxf/DXFReader.h b/src/camotics/dxf/DXFReader.h index 7cfe05aa..2196a282 100644 --- a/src/camotics/dxf/DXFReader.h +++ b/src/camotics/dxf/DXFReader.h @@ -79,4 +79,3 @@ namespace CAMotics { } #endif // CAMOTICS_DXFREADER_H - diff --git a/src/camotics/dxf/DXFSpline.h b/src/camotics/dxf/DXFSpline.h index d38cad99..82c40aa2 100644 --- a/src/camotics/dxf/DXFSpline.h +++ b/src/camotics/dxf/DXFSpline.h @@ -46,4 +46,3 @@ namespace CAMotics { } #endif // CAMOTICS_DXFSPLINE_H - diff --git a/src/camotics/dxf/dxflib/dl_attributes.h b/src/camotics/dxf/dxflib/dl_attributes.h index 74e90c71..35ff4035 100644 --- a/src/camotics/dxf/dxflib/dl_attributes.h +++ b/src/camotics/dxf/dxflib/dl_attributes.h @@ -30,7 +30,7 @@ ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** -** Licensees holding valid dxflib Professional Edition licenses may use +** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** @@ -80,7 +80,7 @@ class DL_Attributes { * @param layer Layer name for this entity or NULL for no layer * (every entity should be on a named layer!). * @param color Color number (0..256). 0 = BYBLOCK, 256 = BYLAYER. - * @param width Line thickness. Defaults to zero. -1 = BYLAYER, + * @param width Line thickness. Defaults to zero. -1 = BYLAYER, * -2 = BYBLOCK, -3 = default width * @param lineType Line type name or "BYLAYER" or "BYBLOCK". Defaults * to "BYLAYER" @@ -157,7 +157,7 @@ class DL_Attributes { /** * Sets the line type. This can be any string and is not - * checked to be a valid line type. + * checked to be a valid line type. */ void setLineType(const string& lineType) { this->lineType = lineType; diff --git a/src/camotics/dxf/dxflib/dl_codes.h b/src/camotics/dxf/dxflib/dl_codes.h index cbbdc271..dffdee24 100644 --- a/src/camotics/dxf/dxflib/dl_codes.h +++ b/src/camotics/dxf/dxflib/dl_codes.h @@ -31,7 +31,7 @@ ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** -** Licensees holding valid dxflib Professional Edition licenses may use +** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** @@ -559,4 +559,3 @@ const double dxfColors[][3] = { #define PCS_TRANS_CODE 3 #endif - diff --git a/src/camotics/dxf/dxflib/dl_creationadapter.h b/src/camotics/dxf/dxflib/dl_creationadapter.h index c72f62d2..a79fca51 100644 --- a/src/camotics/dxf/dxflib/dl_creationadapter.h +++ b/src/camotics/dxf/dxflib/dl_creationadapter.h @@ -30,7 +30,7 @@ ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** -** Licensees holding valid dxflib Professional Edition licenses may use +** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** @@ -50,8 +50,8 @@ #include "dl_creationinterface.h" /** - * An abstract adapter class for receiving DXF events when a DXF file is being read. - * The methods in this class are empty. This class exists as convenience for creating + * An abstract adapter class for receiving DXF events when a DXF file is being read. + * The methods in this class are empty. This class exists as convenience for creating * listener objects. * * @author Andrew Mustun @@ -68,20 +68,20 @@ class DL_CreationAdapter : public DL_CreationInterface { virtual void addArc(const DL_ArcData&) {} virtual void addCircle(const DL_CircleData&) {} virtual void addEllipse(const DL_EllipseData&) {} - + virtual void addPolyline(const DL_PolylineData&) {} virtual void addVertex(const DL_VertexData&) {} - + virtual void addSpline(const DL_SplineData&) {} virtual void addControlPoint(const DL_ControlPointData&) {} virtual void addKnot(const DL_KnotData&) {} - + virtual void addInsert(const DL_InsertData&) {} - + virtual void addMText(const DL_MTextData&) {} virtual void addMTextChunk(const char*) {} virtual void addText(const DL_TextData&) {} - + virtual void addDimAlign(const DL_DimensionData&, const DL_DimAlignedData&) {} virtual void addDimLinear(const DL_DimensionData&, @@ -98,20 +98,20 @@ class DL_CreationAdapter : public DL_CreationInterface { const DL_DimOrdinateData&) {} virtual void addLeader(const DL_LeaderData&) {} virtual void addLeaderVertex(const DL_LeaderVertexData&) {} - + virtual void addHatch(const DL_HatchData&) {} virtual void addTrace(const DL_TraceData&) {} virtual void add3dFace(const DL_3dFaceData&) {} virtual void addSolid(const DL_SolidData&) {} - + virtual void addImage(const DL_ImageData&) {} virtual void linkImage(const DL_ImageDefData&) {} virtual void addHatchLoop(const DL_HatchLoopData&) {} virtual void addHatchEdge(const DL_HatchEdgeData&) {} virtual void endEntity() {} virtual void addComment(const char* comment) {} - virtual void setVariableVector(const char*, + virtual void setVariableVector(const char*, double, double, double, int) {} virtual void setVariableString(const char*, const char*, int) {} virtual void setVariableInt(const char*, int, int) {} diff --git a/src/camotics/dxf/dxflib/dl_creationinterface.h b/src/camotics/dxf/dxflib/dl_creationinterface.h index ff5f1146..65801f8b 100644 --- a/src/camotics/dxf/dxflib/dl_creationinterface.h +++ b/src/camotics/dxf/dxflib/dl_creationinterface.h @@ -30,7 +30,7 @@ ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** -** Licensees holding valid dxflib Professional Edition licenses may use +** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** @@ -56,10 +56,10 @@ /** * Abstract class (interface) for the creation of new entities. - * Inherit your class which takes care of the entities in the - * processed DXF file from this interface. + * Inherit your class which takes care of the entities in the + * processed DXF file from this interface. * - * Double arrays passed to your implementation contain 3 double + * Double arrays passed to your implementation contain 3 double * values for x, y, z coordinates unless stated differently. * * @author Andrew Mustun @@ -109,22 +109,22 @@ class DL_CreationInterface { /** Called for every polyline vertex */ virtual void addVertex(const DL_VertexData& data) = 0; - + /** Called for every spline */ virtual void addSpline(const DL_SplineData& data) = 0; - + /** Called for every spline control point */ virtual void addControlPoint(const DL_ControlPointData& data) = 0; - + /** Called for every spline knot value */ virtual void addKnot(const DL_KnotData& data) = 0; /** Called for every insert. */ virtual void addInsert(const DL_InsertData& data) = 0; - + /** Called for every trace start */ virtual void addTrace(const DL_TraceData& data) = 0; - + /** Called for every 3dface start */ virtual void add3dFace(const DL_3dFaceData& data) = 0; @@ -137,7 +137,7 @@ class DL_CreationInterface { /** * Called for additional text chunks for MTEXT entities. - * The chunks come at 250 character in size each. Note that + * The chunks come at 250 character in size each. Note that * those chunks come before the actual MTEXT entity. */ virtual void addMTextChunk(const char* text) = 0; @@ -146,63 +146,63 @@ class DL_CreationInterface { virtual void addText(const DL_TextData& data) = 0; /** - * Called for every aligned dimension entity. + * Called for every aligned dimension entity. */ virtual void addDimAlign(const DL_DimensionData& data, const DL_DimAlignedData& edata) = 0; /** - * Called for every linear or rotated dimension entity. + * Called for every linear or rotated dimension entity. */ virtual void addDimLinear(const DL_DimensionData& data, const DL_DimLinearData& edata) = 0; /** - * Called for every radial dimension entity. + * Called for every radial dimension entity. */ virtual void addDimRadial(const DL_DimensionData& data, const DL_DimRadialData& edata) = 0; /** - * Called for every diametric dimension entity. + * Called for every diametric dimension entity. */ virtual void addDimDiametric(const DL_DimensionData& data, const DL_DimDiametricData& edata) = 0; /** - * Called for every angular dimension (2 lines version) entity. + * Called for every angular dimension (2 lines version) entity. */ virtual void addDimAngular(const DL_DimensionData& data, const DL_DimAngularData& edata) = 0; /** - * Called for every angular dimension (3 points version) entity. + * Called for every angular dimension (3 points version) entity. */ virtual void addDimAngular3P(const DL_DimensionData& data, const DL_DimAngular3PData& edata) = 0; - + /** - * Called for every ordinate dimension entity. + * Called for every ordinate dimension entity. */ virtual void addDimOrdinate(const DL_DimensionData& data, const DL_DimOrdinateData& edata) = 0; - - /** - * Called for every leader start. + + /** + * Called for every leader start. */ virtual void addLeader(const DL_LeaderData& data) = 0; - - /** - * Called for every leader vertex + + /** + * Called for every leader vertex */ virtual void addLeaderVertex(const DL_LeaderVertexData& data) = 0; - - /** - * Called for every hatch entity. + + /** + * Called for every hatch entity. */ virtual void addHatch(const DL_HatchData& data) = 0; - - /** - * Called for every image entity. + + /** + * Called for every image entity. */ virtual void addImage(const DL_ImageData& data) = 0; @@ -211,21 +211,21 @@ class DL_CreationInterface { */ virtual void linkImage(const DL_ImageDefData& data) = 0; - /** - * Called for every hatch loop. + /** + * Called for every hatch loop. */ virtual void addHatchLoop(const DL_HatchLoopData& data) = 0; - /** - * Called for every hatch edge entity. + /** + * Called for every hatch edge entity. */ virtual void addHatchEdge(const DL_HatchEdgeData& data) = 0; - - /** - * Called after an entity has been completed. + + /** + * Called after an entity has been completed. */ virtual void endEntity() = 0; - + /** * Called for every comment in the DXF file (code 999). */ @@ -234,24 +234,24 @@ class DL_CreationInterface { /** * Called for every vector variable in the DXF file (e.g. "$EXTMIN"). */ - virtual void setVariableVector(const char* key, + virtual void setVariableVector(const char* key, double v1, double v2, double v3, int code) = 0; - + /** * Called for every string variable in the DXF file (e.g. "$ACADVER"). */ virtual void setVariableString(const char* key, const char* value, int code) = 0; - + /** * Called for every int variable in the DXF file (e.g. "$ACADMAINTVER"). */ virtual void setVariableInt(const char* key, int value, int code) = 0; - + /** * Called for every double variable in the DXF file (e.g. "$DIMEXO"). */ virtual void setVariableDouble(const char* key, double value, int code) = 0; - + /** * Called when a SEQEND occurs (when a POLYLINE or ATTRIB is done) */ diff --git a/src/camotics/dxf/dxflib/dl_dxf.cpp b/src/camotics/dxf/dxflib/dl_dxf.cpp index 2f34cbbc..23ad6499 100644 --- a/src/camotics/dxf/dxflib/dl_dxf.cpp +++ b/src/camotics/dxf/dxflib/dl_dxf.cpp @@ -30,7 +30,7 @@ ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** -** Licensees holding valid dxflib Professional Edition licenses may use +** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** @@ -175,7 +175,7 @@ bool DL_Dxf::in(const string& file, DL_CreationInterface* creationInterface) { */ bool DL_Dxf::in(std::istream& stream, DL_CreationInterface* creationInterface) { - + int errorCounter = 0; if (stream.good()) { @@ -204,7 +204,7 @@ bool DL_Dxf::in(std::istream& stream, * This function reads a couplet, determines the type of data, and * passes the value to the the appropriate handler function of * \p creationInterface.\n - * + * * \p fp is advanced so that the next call to \p readDXFGroups() reads * the next couplet in the file. * @@ -287,7 +287,7 @@ bool DL_Dxf::readDxfGroups(std::istream& stream, /** - * @brief Reads line from file & strips whitespace at start and newline + * @brief Reads line from file & strips whitespace at start and newline * at end. * * @param s Output\n @@ -387,7 +387,7 @@ bool DL_Dxf::stripWhiteSpace(char** s) { while ((*s)[0]==' ' || (*s)[0]=='\t') { ++(*s); } - + return ((*s) ? true : false); } @@ -423,7 +423,7 @@ bool DL_Dxf::processDXFGroup(DL_CreationInterface* creationInterface, if (!strncmp(groupValue, "dxflib", 6)) { libVersion = getLibVersion(&groupValue[7]); } - + addComment(creationInterface, groupValue); } } @@ -570,7 +570,7 @@ bool DL_Dxf::processDXFGroup(DL_CreationInterface* creationInterface, case 5: addDimAngular3P(creationInterface); break; - + case 6: addDimOrdinate(creationInterface); break; @@ -600,7 +600,7 @@ bool DL_Dxf::processDXFGroup(DL_CreationInterface* creationInterface, case DL_ENTITY_TRACE: addTrace(creationInterface); break; - + case DL_ENTITY_3DFACE: add3dFace(creationInterface); break; @@ -612,7 +612,7 @@ bool DL_Dxf::processDXFGroup(DL_CreationInterface* creationInterface, case DL_ENTITY_SEQEND: endSequence(creationInterface); break; - + default: break; } @@ -915,7 +915,7 @@ void DL_Dxf::addPolyline(DL_CreationInterface* creationInterface) { /** - * Adds a polyline vertex entity that was read from the file + * Adds a polyline vertex entity that was read from the file * via the creation interface. */ void DL_Dxf::addVertex(DL_CreationInterface* creationInterface) { @@ -936,9 +936,9 @@ void DL_Dxf::addVertex(DL_CreationInterface* creationInterface) { * Adds a spline entity that was read from the file via the creation interface. */ void DL_Dxf::addSpline(DL_CreationInterface* creationInterface) { - DL_SplineData sd(toInt(values[71], 3), - maxKnots, - maxControlPoints, + DL_SplineData sd(toInt(values[71], 3), + maxKnots, + maxControlPoints, toInt(values[70], 4)); /*DL_SplineData sd(toInt(values[71], 3), toInt(values[72], 0), toInt(values[73], 0), toInt(values[70], 4));*/ @@ -1047,7 +1047,7 @@ void DL_Dxf::addInsert(DL_CreationInterface* creationInterface) { */ void DL_Dxf::addTrace(DL_CreationInterface* creationInterface) { DL_TraceData td; - + for (int k = 0; k < 4; k++) { td.x[k] = toReal(values[10 + k]); td.y[k] = toReal(values[20 + k]); @@ -1063,7 +1063,7 @@ void DL_Dxf::addTrace(DL_CreationInterface* creationInterface) { */ void DL_Dxf::add3dFace(DL_CreationInterface* creationInterface) { DL_3dFaceData td; - + for (int k = 0; k < 4; k++) { td.x[k] = toReal(values[10 + k]); td.y[k] = toReal(values[20 + k]); @@ -1076,12 +1076,12 @@ void DL_Dxf::add3dFace(DL_CreationInterface* creationInterface) { /** * Adds a solid entity (filled trace) that was read from the file via the creation interface. - * + * * @author AHM */ void DL_Dxf::addSolid(DL_CreationInterface* creationInterface) { DL_SolidData sd; - + for (int k = 0; k < 4; k++) { sd.x[k] = toReal(values[10 + k]); sd.y[k] = toReal(values[20 + k]); @@ -2100,7 +2100,7 @@ DL_WriterA* DL_Dxf::out(const char* file, DL_Codes::version version) { /** - * @brief Writes a DXF header to the file currently opened + * @brief Writes a DXF header to the file currently opened * by the given DXF writer object. */ void DL_Dxf::writeHeader(DL_WriterA& dw) { @@ -2236,8 +2236,8 @@ void DL_Dxf::writeVertex(DL_WriterA& dw, } } - - + + /** * Writes the polyline end. Only needed for DXF R12. */ @@ -2384,8 +2384,8 @@ void DL_Dxf::writeEllipse(DL_WriterA& dw, dw.dxfReal(42, data.angle2); } } - - + + /** * Writes a solid entity to the file. @@ -3294,7 +3294,7 @@ void DL_Dxf::writeImageDef(DL_WriterA& dw, /** - * Writes a layer to the file. Layers are stored in the + * Writes a layer to the file. Layers are stored in the * tables section of a DXF file. * * @param dw DXF writer @@ -3349,7 +3349,7 @@ void DL_Dxf::writeLayer(DL_WriterA& dw, /** - * Writes a line type to the file. Line types are stored in the + * Writes a line type to the file. Line types are stored in the * tables section of a DXF file. */ void DL_Dxf::writeLineType(DL_WriterA& dw, @@ -4020,7 +4020,7 @@ void DL_Dxf::writeUcs(DL_WriterA& dw) { * Note that this method currently only writes a faked DIMSTYLE section * to make the file readable by Aut*cad. */ -void DL_Dxf::writeDimStyle(DL_WriterA& dw, +void DL_Dxf::writeDimStyle(DL_WriterA& dw, double dimasz, double dimexe, double dimexo, double dimgap, double dimtxt) { @@ -4537,7 +4537,7 @@ void DL_Dxf::writeObjectsEnd(DL_WriterA& dw) { dw.dxfString( 0, "ENDSEC"); } - + /** * Writes a comment to the DXF file. @@ -5083,5 +5083,3 @@ void DL_Dxf::test() { std::cout << "2 buf6: '" << buf6 << "'\n"; } - - diff --git a/src/camotics/dxf/dxflib/dl_dxf.h b/src/camotics/dxf/dxflib/dl_dxf.h index 2b668766..ff478a7a 100644 --- a/src/camotics/dxf/dxflib/dl_dxf.h +++ b/src/camotics/dxf/dxflib/dl_dxf.h @@ -30,7 +30,7 @@ ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** -** Licensees holding valid dxflib Professional Edition licenses may use +** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** @@ -108,13 +108,13 @@ class DL_WriterA; /** * Reading and writing of DXF files. * - * This class can read in a DXF file and calls methods from the + * This class can read in a DXF file and calls methods from the * interface DL_EntityContainer to add the entities to the * contianer provided by the user of the library. * * It can also be used to write DXF files to a certain extent. * - * When saving entities, special values for colors and linetypes + * When saving entities, special values for colors and linetypes * can be used: * * Special colors are 0 (=BYBLOCK) and 256 (=BYLAYER). @@ -134,7 +134,7 @@ class DL_Dxf { int* errorCounter = NULL); static bool getChoppedLine(char* s, unsigned int size, FILE *stream); - + bool readDxfGroups(std::istream &stream, DL_CreationInterface* creationInterface, int* errorCounter = NULL); @@ -154,19 +154,19 @@ class DL_Dxf { void addPoint(DL_CreationInterface* creationInterface); void addLine(DL_CreationInterface* creationInterface); - + void addPolyline(DL_CreationInterface* creationInterface); void addVertex(DL_CreationInterface* creationInterface); - + void addSpline(DL_CreationInterface* creationInterface); //void addKnot(DL_CreationInterface* creationInterface); //void addControlPoint(DL_CreationInterface* creationInterface); - + void addArc(DL_CreationInterface* creationInterface); void addCircle(DL_CreationInterface* creationInterface); void addEllipse(DL_CreationInterface* creationInterface); void addInsert(DL_CreationInterface* creationInterface); - + void addTrace(DL_CreationInterface* creationInterface); void add3dFace(DL_CreationInterface* creationInterface); void addSolid(DL_CreationInterface* creationInterface); @@ -177,7 +177,7 @@ class DL_Dxf { bool handleSplineData(DL_CreationInterface* creationInterface); bool handleLeaderData(DL_CreationInterface* creationInterface); bool handleHatchData(DL_CreationInterface* creationInterface); - + void addText(DL_CreationInterface* creationInterface); void addAttrib(DL_CreationInterface* creationInterface); DL_DimensionData getDimData(); @@ -192,14 +192,14 @@ class DL_Dxf { void addHatch(DL_CreationInterface* creationInterface); void addImage(DL_CreationInterface* creationInterface); void addImageDef(DL_CreationInterface* creationInterface); - + void addComment(DL_CreationInterface* creationInterface, const char* comment); void endEntity(DL_CreationInterface* creationInterface); - + void endSequence(DL_CreationInterface* creationInterface); - - int stringToInt(const char* s, bool* ok=NULL); + + int stringToInt(const char* s, bool* ok=NULL); DL_WriterA* out(const char* file, DL_Codes::version version=VER_2000); @@ -319,18 +319,18 @@ class DL_Dxf { void writeStyle(DL_WriterA& dw); void writeView(DL_WriterA& dw); void writeUcs(DL_WriterA& dw); - void writeDimStyle(DL_WriterA& dw, + void writeDimStyle(DL_WriterA& dw, double dimasz, double dimexe, double dimexo, double dimgap, double dimtxt); void writeBlockRecord(DL_WriterA& dw); void writeBlockRecord(DL_WriterA& dw, const string& name); void writeObjects(DL_WriterA& dw); void writeObjectsEnd(DL_WriterA& dw); - + void writeComment(DL_WriterA& dw, const string& comment); /** - * Converts the given string into a double or returns the given + * Converts the given string into a double or returns the given * default valud (def) if value is NULL or empty. */ static double toReal(const char* value, double def=0.0) { @@ -352,7 +352,7 @@ class DL_Dxf { } } /** - * Converts the given string into an int or returns the given + * Converts the given string into an int or returns the given * default valud (def) if value is NULL or empty. */ static int toInt(const char* value, int def=0) { @@ -363,7 +363,7 @@ class DL_Dxf { } } /** - * Converts the given string into a string or returns the given + * Converts the given string into a string or returns the given * default valud (def) if value is NULL or empty. */ static const char* toString(const char* value, const char* def="") { @@ -392,11 +392,11 @@ class DL_Dxf { double* vertices; int maxVertices; int vertexIndex; - + double* knots; int maxKnots; int knotIndex; - + double* controlPoints; int maxControlPoints; int controlPointIndex; diff --git a/src/camotics/dxf/dxflib/dl_entities.h b/src/camotics/dxf/dxflib/dl_entities.h index 56b2cb0f..03ae48cf 100644 --- a/src/camotics/dxf/dxflib/dl_entities.h +++ b/src/camotics/dxf/dxflib/dl_entities.h @@ -30,7 +30,7 @@ ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** -** Licensees holding valid dxflib Professional Edition licenses may use +** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** @@ -348,7 +348,7 @@ struct DL_TraceData { z[i] = 0.0; } } - + /** * Constructor. * Parameters: see member variables. @@ -368,11 +368,11 @@ struct DL_TraceData { x[1] = sx2; y[1] = sy2; z[1] = sz2; - + x[2] = sx3; y[2] = sy3; z[2] = sz3; - + x[3] = sx4; y[3] = sy4; z[3] = sz4; @@ -380,7 +380,7 @@ struct DL_TraceData { /*! Thickness */ double thickness; - + /*! Points */ double x[4]; double y[4]; @@ -656,7 +656,7 @@ struct DL_MTextData { */ int lineSpacingStyle; /** - * Line spacing factor. 0.25 .. 4.0 + * Line spacing factor. 0.25 .. 4.0 */ double lineSpacingFactor; /*! Text string. */ @@ -728,14 +728,14 @@ struct DL_TextData { int textGenerationFlags; /** * Horizontal justification. - * + * * 0 = Left (default), 1 = Center, 2 = Right, * 3 = Aligned, 4 = Middle, 5 = Fit * For 3, 4, 5 the vertical alignment has to be 0. */ int hJustification; /** - * Vertical justification. + * Vertical justification. * * 0 = Baseline (default), 1 = Bottom, 2 = Middle, 3= Top */ @@ -803,20 +803,20 @@ struct DL_DimensionData { /** * Dimension type. * - * 0 Rotated, horizontal, or vertical - * 1 Aligned - * 2 Angular - * 3 Diametric - * 4 Radius - * 5 Angular 3-point - * 6 Ordinate - * 64 Ordinate type. This is a bit value (bit 7) - * used only with integer value 6. If set, - * ordinate is X-type; if not set, ordinate is - * Y-type - * 128 This is a bit value (bit 8) added to the - * other group 70 values if the dimension text - * has been positioned at a user-defined + * 0 Rotated, horizontal, or vertical + * 1 Aligned + * 2 Angular + * 3 Diametric + * 4 Radius + * 5 Angular 3-point + * 6 Ordinate + * 64 Ordinate type. This is a bit value (bit 7) + * used only with integer value 6. If set, + * ordinate is X-type; if not set, ordinate is + * Y-type + * 128 This is a bit value (bit 8) added to the + * other group 70 values if the dimension text + * has been positioned at a user-defined * location rather than at the default location */ int type; @@ -835,11 +835,11 @@ struct DL_DimensionData { */ int lineSpacingStyle; /** - * Line spacing factor. 0.25 .. 4.0 + * Line spacing factor. 0.25 .. 4.0 */ double lineSpacingFactor; /** - * Text string. + * Text string. * * Text string entered explicitly by user or null * or "<>" for the actual measurement or " " (one blank space). @@ -1410,7 +1410,7 @@ struct DL_ImageData { fade = ifade; } - /*! Reference to the image file + /*! Reference to the image file (unique, used to refer to the image def object). */ string ref; /*! X Coordinate of insertion point. */ @@ -1461,7 +1461,7 @@ struct DL_ImageDefData { file = ifile; } - /*! Reference to the image file + /*! Reference to the image file (unique, used to refer to the image def object). */ string ref; @@ -1472,4 +1472,3 @@ struct DL_ImageDefData { #endif // EOF - diff --git a/src/camotics/dxf/dxflib/dl_exception.h b/src/camotics/dxf/dxflib/dl_exception.h index da798034..8e21c36e 100644 --- a/src/camotics/dxf/dxflib/dl_exception.h +++ b/src/camotics/dxf/dxflib/dl_exception.h @@ -31,7 +31,7 @@ ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** -** Licensees holding valid dxflib Professional Edition licenses may use +** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** @@ -72,4 +72,3 @@ class DL_GroupCodeExc : public DL_Exception { int groupCode; }; #endif - diff --git a/src/camotics/dxf/dxflib/dl_extrusion.h b/src/camotics/dxf/dxflib/dl_extrusion.h index b33bd209..63b049e2 100644 --- a/src/camotics/dxf/dxflib/dl_extrusion.h +++ b/src/camotics/dxf/dxflib/dl_extrusion.h @@ -30,7 +30,7 @@ ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** -** Licensees holding valid dxflib Professional Edition licenses may use +** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** @@ -95,7 +95,7 @@ class DL_Extrusion { /** - * Sets the direction vector. + * Sets the direction vector. */ void setDirection(double dx, double dy, double dz) { direction[0]=dx; @@ -161,4 +161,3 @@ class DL_Extrusion { }; #endif - diff --git a/src/camotics/dxf/dxflib/dl_writer.h b/src/camotics/dxf/dxflib/dl_writer.h index 9ca99424..a67adfdb 100644 --- a/src/camotics/dxf/dxflib/dl_writer.h +++ b/src/camotics/dxf/dxflib/dl_writer.h @@ -31,7 +31,7 @@ ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** -** Licensees holding valid dxflib Professional Edition licenses may use +** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** @@ -73,7 +73,7 @@ * Defines interface for writing low level DXF constructs to * a file. Implementation is defined in derived classes that write * to binary or ASCII files. - * + * * Implements functions that write higher level constructs in terms of * the low level ones. * @@ -346,20 +346,20 @@ class DL_Writer { * */ void entityAttributes(const DL_Attributes& attrib) const { - + // layer name: dxfString(8, attrib.getLayer()); - + // R12 doesn't accept BYLAYER values. The value has to be missing // in that case. - if (version>=VER_2000 || + if (version>=VER_2000 || attrib.getColor()!=256) { dxfInt(62, attrib.getColor()); } if (version>=VER_2000) { dxfInt(370, attrib.getWidth()); } - if (version>=VER_2000 || + if (version>=VER_2000 || strcasecmp(attrib.getLineType().c_str(), "BYLAYER")) { dxfString(6, attrib.getLineType()); } @@ -535,7 +535,7 @@ class DL_Writer { unsigned long getNextHandle() const { return m_handle; } - + /** * Increases handle, so that the handle returned remains available. */ @@ -544,7 +544,7 @@ class DL_Writer { } /** - * Sets the handle of the model space. Entities refer to + * Sets the handle of the model space. Entities refer to * this handle. */ void setModelSpaceHandle(unsigned long h) { @@ -556,7 +556,7 @@ class DL_Writer { } /** - * Sets the handle of the paper space. Some special blocks refer to + * Sets the handle of the paper space. Some special blocks refer to * this handle. */ void setPaperSpaceHandle(unsigned long h) { @@ -568,7 +568,7 @@ class DL_Writer { } /** - * Sets the handle of the paper space 0. Some special blocks refer to + * Sets the handle of the paper space 0. Some special blocks refer to * this handle. */ void setPaperSpace0Handle(unsigned long h) { diff --git a/src/camotics/dxf/dxflib/dl_writer_ascii.cpp b/src/camotics/dxf/dxflib/dl_writer_ascii.cpp index b2fa3c73..57540fd8 100644 --- a/src/camotics/dxf/dxflib/dl_writer_ascii.cpp +++ b/src/camotics/dxf/dxflib/dl_writer_ascii.cpp @@ -31,7 +31,7 @@ ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** -** Licensees holding valid dxflib Professional Edition licenses may use +** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** @@ -83,7 +83,7 @@ bool DL_WriterA::openFailed() const { void DL_WriterA::dxfReal(int gc, double value) const { char str[256]; sprintf(str, "%.16lf", value); - + // fix for german locale: strReplace(str, ',', '.'); @@ -171,4 +171,3 @@ void DL_WriterA::strReplace(char* str, char src, char dest) { } } } - diff --git a/src/camotics/dxf/dxflib/dl_writer_ascii.h b/src/camotics/dxf/dxflib/dl_writer_ascii.h index a53d35d9..9c0987ae 100644 --- a/src/camotics/dxf/dxflib/dl_writer_ascii.h +++ b/src/camotics/dxf/dxflib/dl_writer_ascii.h @@ -31,7 +31,7 @@ ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** -** Licensees holding valid dxflib Professional Edition licenses may use +** Licensees holding valid dxflib Professional Edition licenses may use ** this file in accordance with the dxflib Commercial License ** Agreement provided with the Software. ** @@ -60,7 +60,7 @@ using std::string; /** * Implements functions defined in DL_Writer for writing low * level DXF constructs to an ASCII format DXF file. - * + * * @para fname File name of the file to be created. * @para version DXF version. Defaults to VER_2002. * @@ -92,4 +92,3 @@ class DL_WriterA : public DL_Writer { }; #endif - diff --git a/src/camotics/gcode/Codes.cpp b/src/camotics/gcode/Codes.cpp index d0823ba1..7f75ba63 100644 --- a/src/camotics/gcode/Codes.cpp +++ b/src/camotics/gcode/Codes.cpp @@ -93,7 +93,7 @@ const Code Codes::gcodes[] = { {'G', 28, 19, MG::MG_ZERO, VT::VT_NONE, "Go to Predefined Position 1"}, - {'G', 28.1, 19, MG::MG_ZERO, VT::VT_NONE, + {'G', 28.1, 19, MG::MG_ZERO, VT::VT_NONE, "Set Predefined Position 1"}, {'G', 30, 19, MG::MG_ZERO, VT::VT_NONE, "Go to Predefined Position 2"}, diff --git a/src/camotics/gcode/Codes.h b/src/camotics/gcode/Codes.h index 63459a8d..581c1d01 100644 --- a/src/camotics/gcode/Codes.h +++ b/src/camotics/gcode/Codes.h @@ -51,4 +51,3 @@ namespace CAMotics { } #endif // CAMOTICS_CODES_H - diff --git a/src/camotics/gcode/Evaluator.cpp b/src/camotics/gcode/Evaluator.cpp index 5116cb8c..40a5269b 100644 --- a/src/camotics/gcode/Evaluator.cpp +++ b/src/camotics/gcode/Evaluator.cpp @@ -130,7 +130,7 @@ double Evaluator::eval(NamedReference &e) { double Evaluator::eval(Reference &e) { double num = e.getExpression()->eval(*this); - + if (num < 1 || MAX_ADDRESS < num || ((unsigned)num) != num) THROWS(e.getLocation() << " Invalid reference number " << num); diff --git a/src/camotics/gcode/Evaluator.h b/src/camotics/gcode/Evaluator.h index d1ce05f1..097a68bf 100644 --- a/src/camotics/gcode/Evaluator.h +++ b/src/camotics/gcode/Evaluator.h @@ -53,4 +53,3 @@ namespace CAMotics { } #endif // CAMOTICS_EVALUATOR_H - diff --git a/src/camotics/gcode/OCodeInterpreter.h b/src/camotics/gcode/OCodeInterpreter.h index 46e86fb3..97305918 100644 --- a/src/camotics/gcode/OCodeInterpreter.h +++ b/src/camotics/gcode/OCodeInterpreter.h @@ -105,4 +105,3 @@ namespace CAMotics { } #endif // CAMOTICS_OCODE_INTERPRETER_H - diff --git a/src/camotics/gcode/Parser.cpp b/src/camotics/gcode/Parser.cpp index e89cf36e..011c10b3 100644 --- a/src/camotics/gcode/Parser.cpp +++ b/src/camotics/gcode/Parser.cpp @@ -254,7 +254,7 @@ SmartPointer Parser::compareOp(CAMotics::Tokenizer &tokenizer) { break; } - return entity; + return entity; } @@ -276,7 +276,7 @@ SmartPointer Parser::addOp(CAMotics::Tokenizer &tokenizer) { } else break; } - return entity; + return entity; } @@ -302,7 +302,7 @@ SmartPointer Parser::mulOp(CAMotics::Tokenizer &tokenizer) { } else break; } - return entity; + return entity; } diff --git a/src/camotics/gcode/Parser.h b/src/camotics/gcode/Parser.h index 2a6b814d..d369b08a 100644 --- a/src/camotics/gcode/Parser.h +++ b/src/camotics/gcode/Parser.h @@ -88,4 +88,3 @@ namespace CAMotics { } #endif // CAMOTICS_PARSER_H - diff --git a/src/camotics/gcode/Printer.cpp b/src/camotics/gcode/Printer.cpp index b2275f30..887f464c 100644 --- a/src/camotics/gcode/Printer.cpp +++ b/src/camotics/gcode/Printer.cpp @@ -49,7 +49,7 @@ void Printer::operator()(const SmartPointer &block) { if (number) { double value = number->getValue(); const Code *code = Codes::find(type, value); - + if (code) comments += SSTR(" (" << code->description << ')'); } } @@ -58,10 +58,10 @@ void Printer::operator()(const SmartPointer &block) { if (!comments.empty()) { string line = SSTR(*block); stream << line; - + int pad = 80 - (line.length() + comments.length()); if (0 < pad) stream << string(pad, ' '); - + stream << comments << '\n'; return; diff --git a/src/camotics/gcode/Printer.h b/src/camotics/gcode/Printer.h index 180b3178..d31861ca 100644 --- a/src/camotics/gcode/Printer.h +++ b/src/camotics/gcode/Printer.h @@ -46,4 +46,3 @@ namespace CAMotics { } #endif // CAMOTICS_PRINTER_H - diff --git a/src/camotics/gcode/Processor.h b/src/camotics/gcode/Processor.h index b2f51fb7..adba7273 100644 --- a/src/camotics/gcode/Processor.h +++ b/src/camotics/gcode/Processor.h @@ -33,4 +33,3 @@ namespace CAMotics { } #endif // CAMOTICS_PROCESSOR_H - diff --git a/src/camotics/gcode/Token.h b/src/camotics/gcode/Token.h index f08abe5d..eac847ad 100644 --- a/src/camotics/gcode/Token.h +++ b/src/camotics/gcode/Token.h @@ -30,4 +30,3 @@ namespace CAMotics { } #endif // CAMOTICS_TOKEN_H - diff --git a/src/camotics/gcode/Tokenizer.cpp b/src/camotics/gcode/Tokenizer.cpp index d2e14efd..65313698 100644 --- a/src/camotics/gcode/Tokenizer.cpp +++ b/src/camotics/gcode/Tokenizer.cpp @@ -134,7 +134,7 @@ void Tokenizer::next() { case '%': break; // Ignore program delimiter case ';': comment(); needAdvance = false; break; case '(': parenComment(); needAdvance = false; break; - + case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': @@ -161,7 +161,7 @@ void Tokenizer::next() { case '=': current.set(ASSIGN_TOKEN, c); break; case '#': current.set(POUND_TOKEN, c); break; case '\n': current.set(EOL_TOKEN, c); break; - + default: if (isalpha(c) || c == '_') { id(); @@ -172,6 +172,6 @@ void Tokenizer::next() { } if (needAdvance) scanner.advance(); - + current.getLocation() = cb::LocationRange(start, scanner.getLocation()); } diff --git a/src/camotics/gcode/Tokenizer.h b/src/camotics/gcode/Tokenizer.h index be822233..b3900196 100644 --- a/src/camotics/gcode/Tokenizer.h +++ b/src/camotics/gcode/Tokenizer.h @@ -48,4 +48,3 @@ namespace CAMotics { } #endif // CAMOTICS_TOKENIZER_H - diff --git a/src/camotics/gcode/ast/Assign.h b/src/camotics/gcode/ast/Assign.h index 15340b69..63a908d5 100644 --- a/src/camotics/gcode/ast/Assign.h +++ b/src/camotics/gcode/ast/Assign.h @@ -51,4 +51,3 @@ namespace CAMotics { } #endif // CAMOTICS_REFERENCE_ASSIGN_H - diff --git a/src/camotics/gcode/ast/BinaryOp.h b/src/camotics/gcode/ast/BinaryOp.h index 9ece43f4..30dceefe 100644 --- a/src/camotics/gcode/ast/BinaryOp.h +++ b/src/camotics/gcode/ast/BinaryOp.h @@ -48,4 +48,3 @@ namespace CAMotics { } #endif // CAMOTICS_BINARY_OP_H - diff --git a/src/camotics/gcode/ast/Block.h b/src/camotics/gcode/ast/Block.h index 3bd6b11f..f9fb898b 100644 --- a/src/camotics/gcode/ast/Block.h +++ b/src/camotics/gcode/ast/Block.h @@ -56,4 +56,3 @@ namespace CAMotics { } #endif // CAMOTICS_BLOCK_H - diff --git a/src/camotics/gcode/ast/Comment.h b/src/camotics/gcode/ast/Comment.h index 3b2acea1..26f6d368 100644 --- a/src/camotics/gcode/ast/Comment.h +++ b/src/camotics/gcode/ast/Comment.h @@ -40,4 +40,3 @@ namespace CAMotics { } #endif // CAMOTICS_COMMENT_H - diff --git a/src/camotics/gcode/ast/FunctionCall.h b/src/camotics/gcode/ast/FunctionCall.h index 9998d494..f9735f0f 100644 --- a/src/camotics/gcode/ast/FunctionCall.h +++ b/src/camotics/gcode/ast/FunctionCall.h @@ -50,4 +50,3 @@ namespace CAMotics { } #endif // CAMOTICS_FUNCTION_CALL_H - diff --git a/src/camotics/gcode/ast/NamedReference.h b/src/camotics/gcode/ast/NamedReference.h index 6a5b8200..29344b09 100644 --- a/src/camotics/gcode/ast/NamedReference.h +++ b/src/camotics/gcode/ast/NamedReference.h @@ -39,4 +39,3 @@ namespace CAMotics { } #endif // CAMOTICS_NAMED_REFERENCE_H - diff --git a/src/camotics/gcode/ast/Number.h b/src/camotics/gcode/ast/Number.h index e3a800e8..4e5e7b6f 100644 --- a/src/camotics/gcode/ast/Number.h +++ b/src/camotics/gcode/ast/Number.h @@ -40,4 +40,3 @@ namespace CAMotics { } #endif // CAMOTICS_NUMBER_H - diff --git a/src/camotics/gcode/ast/OCode.h b/src/camotics/gcode/ast/OCode.h index 2eabefee..9e8f21a8 100644 --- a/src/camotics/gcode/ast/OCode.h +++ b/src/camotics/gcode/ast/OCode.h @@ -63,4 +63,3 @@ namespace CAMotics { } #endif // CAMOTICS_OCODE_H - diff --git a/src/camotics/gcode/ast/Program.h b/src/camotics/gcode/ast/Program.h index ddfdff8e..669b66cc 100644 --- a/src/camotics/gcode/ast/Program.h +++ b/src/camotics/gcode/ast/Program.h @@ -46,4 +46,3 @@ namespace CAMotics { } #endif // CAMOTICS_PROGRAM_H - diff --git a/src/camotics/gcode/ast/QuotedExpr.h b/src/camotics/gcode/ast/QuotedExpr.h index 57dab379..42b4cdb3 100644 --- a/src/camotics/gcode/ast/QuotedExpr.h +++ b/src/camotics/gcode/ast/QuotedExpr.h @@ -42,4 +42,3 @@ namespace CAMotics { } #endif // CAMOTICS_QUOTED_EXPR_H - diff --git a/src/camotics/gcode/ast/Reference.h b/src/camotics/gcode/ast/Reference.h index 3f146034..fa259ecf 100644 --- a/src/camotics/gcode/ast/Reference.h +++ b/src/camotics/gcode/ast/Reference.h @@ -45,4 +45,3 @@ namespace CAMotics { } #endif // CAMOTICS_REFERENCE_H - diff --git a/src/camotics/gcode/ast/UnaryOp.h b/src/camotics/gcode/ast/UnaryOp.h index 8c2b0de1..2122a24f 100644 --- a/src/camotics/gcode/ast/UnaryOp.h +++ b/src/camotics/gcode/ast/UnaryOp.h @@ -45,4 +45,3 @@ namespace CAMotics { } #endif // CAMOTICS_UNARY_OP_H - diff --git a/src/camotics/gcode/ast/Word.h b/src/camotics/gcode/ast/Word.h index dd06553b..8c9c2a57 100644 --- a/src/camotics/gcode/ast/Word.h +++ b/src/camotics/gcode/ast/Word.h @@ -58,4 +58,3 @@ namespace CAMotics { } #endif // CAMOTICS_WORD_H - diff --git a/src/camotics/machine/Axes.h b/src/camotics/machine/Axes.h index 8d406b28..b7840c4e 100644 --- a/src/camotics/machine/Axes.h +++ b/src/camotics/machine/Axes.h @@ -105,7 +105,7 @@ namespace CAMotics { default: THROWS("Invalid axis " << axis); } } - + inline static char toAxis(unsigned i) { switch (i) { case 0: return 'X'; @@ -124,4 +124,3 @@ namespace CAMotics { } #endif // TPLANG_AXES_H - diff --git a/src/camotics/machine/MachineAdapter.h b/src/camotics/machine/MachineAdapter.h index 08c50fc0..192ecc59 100644 --- a/src/camotics/machine/MachineAdapter.h +++ b/src/camotics/machine/MachineAdapter.h @@ -102,4 +102,3 @@ namespace CAMotics { } #endif // TPLANG_MACHINE_ADAPTER_H - diff --git a/src/camotics/machine/MachineEnum.h b/src/camotics/machine/MachineEnum.h index 86e80816..ec52c806 100644 --- a/src/camotics/machine/MachineEnum.h +++ b/src/camotics/machine/MachineEnum.h @@ -37,4 +37,3 @@ namespace CAMotics { } #endif // TPLANG_MACHINE_ENUM_H - diff --git a/src/camotics/machine/MachineInterface.h b/src/camotics/machine/MachineInterface.h index 89cb5f81..adcb3e5f 100644 --- a/src/camotics/machine/MachineInterface.h +++ b/src/camotics/machine/MachineInterface.h @@ -253,4 +253,3 @@ namespace CAMotics { } #endif // TPLANG_MACHINE_INTERFACE_H - diff --git a/src/camotics/machine/MachineLinearizer.h b/src/camotics/machine/MachineLinearizer.h index 88f616d8..326716b4 100644 --- a/src/camotics/machine/MachineLinearizer.h +++ b/src/camotics/machine/MachineLinearizer.h @@ -37,4 +37,3 @@ namespace CAMotics { } #endif // MACHINE_LINEARIZER_H - diff --git a/src/camotics/machine/MachineMatrix.h b/src/camotics/machine/MachineMatrix.h index 0951b850..57e856ae 100644 --- a/src/camotics/machine/MachineMatrix.h +++ b/src/camotics/machine/MachineMatrix.h @@ -63,4 +63,3 @@ namespace CAMotics { } #endif // TPLANG_MACHINE_MATRIX_H - diff --git a/src/camotics/machine/MachinePipeline.h b/src/camotics/machine/MachinePipeline.h index 4339d915..164deefa 100644 --- a/src/camotics/machine/MachinePipeline.h +++ b/src/camotics/machine/MachinePipeline.h @@ -40,4 +40,3 @@ namespace CAMotics { } #endif // TPLANG_MACHINE_PIPELINE_H - diff --git a/src/camotics/machine/MachineState.h b/src/camotics/machine/MachineState.h index 32b52c0d..0c1d5dbc 100644 --- a/src/camotics/machine/MachineState.h +++ b/src/camotics/machine/MachineState.h @@ -93,4 +93,3 @@ namespace CAMotics { } #endif // TPLANG_MACHINE_STATE_H - diff --git a/src/camotics/machine/MachineUnitAdapter.h b/src/camotics/machine/MachineUnitAdapter.h index ae2bd211..b0b6cf86 100644 --- a/src/camotics/machine/MachineUnitAdapter.h +++ b/src/camotics/machine/MachineUnitAdapter.h @@ -72,4 +72,3 @@ namespace CAMotics { } #endif // TPLANG_MACHINE_UNIT_ADAPTER_H - diff --git a/src/camotics/machine/MoveSink.h b/src/camotics/machine/MoveSink.h index 84d931f1..604d3df8 100644 --- a/src/camotics/machine/MoveSink.h +++ b/src/camotics/machine/MoveSink.h @@ -49,4 +49,3 @@ namespace CAMotics { } #endif // TPLANG_MOVE_SINK_H - diff --git a/src/camotics/machine/TransMatrix.h b/src/camotics/machine/TransMatrix.h index 9ffeebba..c57b55c2 100644 --- a/src/camotics/machine/TransMatrix.h +++ b/src/camotics/machine/TransMatrix.h @@ -50,4 +50,3 @@ namespace CAMotics { } #endif // TPLANG_TRANS_MATRIX_H - diff --git a/src/camotics/opt/AnnealState.cpp b/src/camotics/opt/AnnealState.cpp index edfd014d..a99585a0 100644 --- a/src/camotics/opt/AnnealState.cpp +++ b/src/camotics/opt/AnnealState.cpp @@ -102,7 +102,7 @@ double AnnealState::swapDelta(unsigned first, unsigned second) { delta -= computeCost(second - 1, second); delta += computeCost(second - 1, first); } - + } else { delta -= computeCost(first, second); delta += computeCost(second, first); diff --git a/src/camotics/opt/AnnealState.h b/src/camotics/opt/AnnealState.h index aafcd313..56ceac74 100644 --- a/src/camotics/opt/AnnealState.h +++ b/src/camotics/opt/AnnealState.h @@ -35,13 +35,13 @@ namespace CAMotics { std::vector index; std::vector flip; double cost; - + AnnealState(const paths_t &paths); - + AnnealState &operator=(const AnnealState &o); - + void flipIndex(unsigned i); - + double computeCost(unsigned first, unsigned second) const; double computeCost() const; @@ -55,4 +55,3 @@ namespace CAMotics { } #endif // CAMOTICS_ANNEAL_STATE_H - diff --git a/src/camotics/opt/Opt.cpp b/src/camotics/opt/Opt.cpp index 12c888cd..b4708ba8 100644 --- a/src/camotics/opt/Opt.cpp +++ b/src/camotics/opt/Opt.cpp @@ -101,16 +101,16 @@ double Opt::optimize() { // Greedy run round(0, iterations, current, best); - + double T = 1; double average; double target = best.cost * heatTarget; - // Increase temperature up to target + // Increase temperature up to target LOG_INFO(1, "Heating up"); do { T *= heatRate; - average = round(T, iterations, current, best); + average = round(T, iterations, current, best); } while (average < target && !shouldQuit()); // Run until cold @@ -148,7 +148,7 @@ double Opt::optimize() { paths.push_back(tmp[best.index[i]]); } } - + return best.cost; } diff --git a/src/camotics/opt/Opt.h b/src/camotics/opt/Opt.h index 1259eae9..3040ce61 100644 --- a/src/camotics/opt/Opt.h +++ b/src/camotics/opt/Opt.h @@ -78,4 +78,3 @@ namespace CAMotics { } #endif // CAMOTICS_OPT_H - diff --git a/src/camotics/opt/Path.h b/src/camotics/opt/Path.h index 36f40361..c73aedbc 100644 --- a/src/camotics/opt/Path.h +++ b/src/camotics/opt/Path.h @@ -39,4 +39,3 @@ namespace CAMotics { } #endif // CAMOTICS_PATH_H - diff --git a/src/camotics/pcb/Arc.h b/src/camotics/pcb/Arc.h index d99401e9..64b111a8 100644 --- a/src/camotics/pcb/Arc.h +++ b/src/camotics/pcb/Arc.h @@ -53,4 +53,3 @@ namespace CAMotics { } #endif // CAMOTICS_PCB_ARC_H - diff --git a/src/camotics/pcb/Element.cpp b/src/camotics/pcb/Element.cpp index ea79ce18..245d5e9b 100644 --- a/src/camotics/pcb/Element.cpp +++ b/src/camotics/pcb/Element.cpp @@ -76,7 +76,7 @@ void Element::read(istream &stream) { value = readString(stream); stream >> m >> t >> tdir >> tscale; tflags = readString(stream); - + readWS(stream); int c = stream.get(); if (c != ']') THROW("missing ']' on Element"); diff --git a/src/camotics/pcb/Element.h b/src/camotics/pcb/Element.h index fe55dab4..6a6c6c2d 100644 --- a/src/camotics/pcb/Element.h +++ b/src/camotics/pcb/Element.h @@ -60,4 +60,3 @@ namespace CAMotics { } #endif // CAMOTICS_PCB_ELEMENT_H - diff --git a/src/camotics/pcb/ElementArc.h b/src/camotics/pcb/ElementArc.h index ee96fdd4..64313407 100644 --- a/src/camotics/pcb/ElementArc.h +++ b/src/camotics/pcb/ElementArc.h @@ -52,4 +52,3 @@ namespace CAMotics { } #endif // CAMOTICS_PCB_ELEMENT_ARC_H - diff --git a/src/camotics/pcb/ElementLine.h b/src/camotics/pcb/ElementLine.h index a85b79ac..3372a4a4 100644 --- a/src/camotics/pcb/ElementLine.h +++ b/src/camotics/pcb/ElementLine.h @@ -57,4 +57,3 @@ namespace CAMotics { } #endif // CAMOTICS_PCB_ELEMENT_LINE_H - diff --git a/src/camotics/pcb/Layer.cpp b/src/camotics/pcb/Layer.cpp index 475c8dc9..c680bf39 100644 --- a/src/camotics/pcb/Layer.cpp +++ b/src/camotics/pcb/Layer.cpp @@ -36,7 +36,7 @@ void Layer::write(ostream &stream) const { void Layer::read(istream &stream) { stream >> number; name = readString(stream); - + readWS(stream); int c = stream.get(); if (c != ')') THROW("missing ')' on Layer"); diff --git a/src/camotics/pcb/Layer.h b/src/camotics/pcb/Layer.h index c4c5307e..aa2e6650 100644 --- a/src/camotics/pcb/Layer.h +++ b/src/camotics/pcb/Layer.h @@ -42,4 +42,3 @@ namespace CAMotics { } #endif // CAMOTICS_PCB_LAYER_H - diff --git a/src/camotics/pcb/Layout.cpp b/src/camotics/pcb/Layout.cpp index 0669bdb5..e1d0e1c4 100644 --- a/src/camotics/pcb/Layout.cpp +++ b/src/camotics/pcb/Layout.cpp @@ -113,7 +113,7 @@ void Layout::multiply(double m) { void Layout::round(int x) { for (const_iterator it = objects.begin(); it != objects.end(); it++) - (*it)->round(x); + (*it)->round(x); } diff --git a/src/camotics/pcb/Layout.h b/src/camotics/pcb/Layout.h index da0b1528..5d9201e0 100644 --- a/src/camotics/pcb/Layout.h +++ b/src/camotics/pcb/Layout.h @@ -82,4 +82,3 @@ namespace CAMotics { } #endif // CAMOTICS_PCB_LAYOUT_H - diff --git a/src/camotics/pcb/Line.h b/src/camotics/pcb/Line.h index a8ccd293..36bb80d0 100644 --- a/src/camotics/pcb/Line.h +++ b/src/camotics/pcb/Line.h @@ -50,4 +50,3 @@ namespace CAMotics { } #endif // CAMOTICS_PCB_LINE_H - diff --git a/src/camotics/pcb/NetList.cpp b/src/camotics/pcb/NetList.cpp index 2f21113c..62c8b14c 100644 --- a/src/camotics/pcb/NetList.cpp +++ b/src/camotics/pcb/NetList.cpp @@ -57,7 +57,7 @@ void NetList::merge(const NetList &netList) { for (; it != netList.objects.end(); it++) objects.push_back(*it); - + suffix = netList.suffix; } } diff --git a/src/camotics/pcb/NetList.h b/src/camotics/pcb/NetList.h index 50a22f72..ab3d8755 100644 --- a/src/camotics/pcb/NetList.h +++ b/src/camotics/pcb/NetList.h @@ -39,4 +39,3 @@ namespace CAMotics { } #endif // CAMOTICS_PCB_NETLIST_H - diff --git a/src/camotics/pcb/Object.cpp b/src/camotics/pcb/Object.cpp index b1a60f04..67d5849f 100644 --- a/src/camotics/pcb/Object.cpp +++ b/src/camotics/pcb/Object.cpp @@ -54,7 +54,7 @@ string Object::readString(istream &stream) { int c = stream.get(); if (c != '"') THROW("Expected '\"'"); - + string s; do { c = stream.get(); @@ -74,7 +74,7 @@ int Object::readInt(istream &stream) { if (c == '-') sign = -1; else if (!isdigit(c)) THROW("Expected number"); - + int x = 0; do { x = 10 * x + c - '0'; diff --git a/src/camotics/pcb/Object.h b/src/camotics/pcb/Object.h index 8c200b69..b66a8ea1 100644 --- a/src/camotics/pcb/Object.h +++ b/src/camotics/pcb/Object.h @@ -74,4 +74,3 @@ namespace CAMotics { } #endif // CAMOTICS_PCB_OBJECT_H - diff --git a/src/camotics/pcb/Pad.h b/src/camotics/pcb/Pad.h index 5950b15a..6e5c7af9 100644 --- a/src/camotics/pcb/Pad.h +++ b/src/camotics/pcb/Pad.h @@ -56,4 +56,3 @@ namespace CAMotics { } #endif // CAMOTICS_PCB_PAD_H - diff --git a/src/camotics/pcb/Pin.h b/src/camotics/pcb/Pin.h index 05d9a89d..f648947b 100644 --- a/src/camotics/pcb/Pin.h +++ b/src/camotics/pcb/Pin.h @@ -56,4 +56,3 @@ namespace CAMotics { } #endif // CAMOTICS_PCB_PIN_H - diff --git a/src/camotics/pcb/Point.h b/src/camotics/pcb/Point.h index 513c55d9..0156eb46 100644 --- a/src/camotics/pcb/Point.h +++ b/src/camotics/pcb/Point.h @@ -78,4 +78,3 @@ namespace CAMotics { } #endif // CAMOTICS_PCB_POINT_H - diff --git a/src/camotics/pcb/Polygon.h b/src/camotics/pcb/Polygon.h index 7cb592a0..ba377b5c 100644 --- a/src/camotics/pcb/Polygon.h +++ b/src/camotics/pcb/Polygon.h @@ -51,4 +51,3 @@ namespace CAMotics { } #endif // CAMOTICS_PCB_POLYGON_H - diff --git a/src/camotics/pcb/String.h b/src/camotics/pcb/String.h index 80f88699..bd0a0369 100644 --- a/src/camotics/pcb/String.h +++ b/src/camotics/pcb/String.h @@ -49,4 +49,3 @@ namespace CAMotics { } #endif // CAMOTICS_PCB_STRING_H - diff --git a/src/camotics/pcb/Symbol.cpp b/src/camotics/pcb/Symbol.cpp index e4cef405..19d7880b 100644 --- a/src/camotics/pcb/Symbol.cpp +++ b/src/camotics/pcb/Symbol.cpp @@ -43,7 +43,7 @@ void Symbol::read(istream &stream) { if (x != '\'') THROW("missing ')' on Symbol"); stream >> delta; - + readWS(stream); int c = stream.get(); if (c != ')') THROW("missing ')' on Symbol"); diff --git a/src/camotics/pcb/Symbol.h b/src/camotics/pcb/Symbol.h index 7dfb6d88..f6fad906 100644 --- a/src/camotics/pcb/Symbol.h +++ b/src/camotics/pcb/Symbol.h @@ -40,4 +40,3 @@ namespace CAMotics { } #endif // CAMOTICS_PCB_SYMBOL_H - diff --git a/src/camotics/pcb/Text.h b/src/camotics/pcb/Text.h index d4a4aa6b..c323bc9a 100644 --- a/src/camotics/pcb/Text.h +++ b/src/camotics/pcb/Text.h @@ -54,4 +54,3 @@ namespace CAMotics { } #endif // CAMOTICS_PCB_TEXT_H - diff --git a/src/camotics/pcb/Via.h b/src/camotics/pcb/Via.h index 5f7db837..ce963204 100644 --- a/src/camotics/pcb/Via.h +++ b/src/camotics/pcb/Via.h @@ -55,4 +55,3 @@ namespace CAMotics { } #endif // CAMOTICS_PCB_VIA_H - diff --git a/src/camotics/probe/Probe.cpp b/src/camotics/probe/Probe.cpp index 72b05fa9..9879bc26 100644 --- a/src/camotics/probe/Probe.cpp +++ b/src/camotics/probe/Probe.cpp @@ -99,17 +99,17 @@ void Probe::read(const InputSource &source) { void Probe::outputProbe(ProbePoint &pt, unsigned address, unsigned count) { if (maxMem <= address) THROW("Too many probes, ran out of address space in controller"); - + pt.address = address; - + stream << "G0 X" << pt.x() << " Y" << pt.y() << " Z" << clearHeight << '\n' << "G38.2 Z" << probeDepth << " F" << probeFeed << '\n'; - + if (liftOff) stream << "G38.4 Z" << clearHeight << " F" << liftOffFeed << '\n'; - + stream << '#' << address << "=#5063\n"; stream << "G0 Z" << clearHeight << '\n'; } @@ -178,7 +178,7 @@ void Probe::operator()(const SmartPointer &block) { outputProbe(); didOutputProbe = true; } - + if (didOutputProbe && block->findWord('G', 1) && getAxisPosition('Z') < clearHeight) { double x = getAxisPosition('X'); diff --git a/src/camotics/probe/Probe.h b/src/camotics/probe/Probe.h index 724c7912..3923a790 100644 --- a/src/camotics/probe/Probe.h +++ b/src/camotics/probe/Probe.h @@ -81,4 +81,3 @@ namespace CAMotics { } #endif // CAMOTICS_PROBE_H - diff --git a/src/camotics/probe/ProbeGrid.cpp b/src/camotics/probe/ProbeGrid.cpp index 8526be15..b3db0da4 100644 --- a/src/camotics/probe/ProbeGrid.cpp +++ b/src/camotics/probe/ProbeGrid.cpp @@ -35,7 +35,7 @@ ProbeGrid::ProbeGrid(const Rectangle2D &bbox, const Vector2D &divisions) : // Resize vectors resize(divisions.y() + 1, Column_t(divisions.x() + 1)); - // Fill in coords + // Fill in coords double y = bbox.getMin().y(); for (ProbeGrid::row_iterator row = begin(); row != end(); row++) { double x = bbox.getMin().x(); diff --git a/src/camotics/probe/ProbeGrid.h b/src/camotics/probe/ProbeGrid.h index 9e14406a..d6263913 100644 --- a/src/camotics/probe/ProbeGrid.h +++ b/src/camotics/probe/ProbeGrid.h @@ -49,4 +49,3 @@ namespace CAMotics { } #endif // CAMOTICS_PROBE_GRID_H - diff --git a/src/camotics/probe/ProbePoint.h b/src/camotics/probe/ProbePoint.h index 3c5a2d19..3d697d27 100644 --- a/src/camotics/probe/ProbePoint.h +++ b/src/camotics/probe/ProbePoint.h @@ -28,10 +28,9 @@ namespace CAMotics { public: bool probe; unsigned address; - + ProbePoint() : probe(false), address(0) {} }; } #endif // CAMOTICS_PROBE_POINT_H - diff --git a/src/camotics/qt/AboutDialog.h b/src/camotics/qt/AboutDialog.h index 9647dd88..0e6f81be 100644 --- a/src/camotics/qt/AboutDialog.h +++ b/src/camotics/qt/AboutDialog.h @@ -45,4 +45,3 @@ namespace CAMotics { } #endif // CAMOTICS_ABOUT_DIALOG_H - diff --git a/src/camotics/qt/ClickWidget.h b/src/camotics/qt/ClickWidget.h index dd1b7b9c..10892ee4 100644 --- a/src/camotics/qt/ClickWidget.h +++ b/src/camotics/qt/ClickWidget.h @@ -35,4 +35,3 @@ namespace CAMotics { } #endif // CAMOTICS_CLICK_WIDGET_H - diff --git a/src/camotics/qt/ColorComponent.h b/src/camotics/qt/ColorComponent.h index aeec7841..6cc4aaf9 100644 --- a/src/camotics/qt/ColorComponent.h +++ b/src/camotics/qt/ColorComponent.h @@ -86,4 +86,3 @@ namespace CAMotics { } #endif // CAMOTICS_COLOR_COMPONENT_H - diff --git a/src/camotics/qt/ConsoleWriter.h b/src/camotics/qt/ConsoleWriter.h index 607e2373..b6731c1a 100644 --- a/src/camotics/qt/ConsoleWriter.h +++ b/src/camotics/qt/ConsoleWriter.h @@ -59,4 +59,3 @@ namespace CAMotics { } #endif // CAMOTICS_CONSOLE_WRITER_H - diff --git a/src/camotics/qt/DonateDialog.h b/src/camotics/qt/DonateDialog.h index 90282e21..d6b6385c 100644 --- a/src/camotics/qt/DonateDialog.h +++ b/src/camotics/qt/DonateDialog.h @@ -43,4 +43,3 @@ namespace CAMotics { } #endif // CAMOTICS_DONATE_DIALOG_H - diff --git a/src/camotics/qt/ExportDialog.h b/src/camotics/qt/ExportDialog.h index 8e151a70..8edf662d 100644 --- a/src/camotics/qt/ExportDialog.h +++ b/src/camotics/qt/ExportDialog.h @@ -60,4 +60,3 @@ namespace CAMotics { } #endif // CAMOTICS_EXPORT_DIALOG_H - diff --git a/src/camotics/qt/FileDialog.h b/src/camotics/qt/FileDialog.h index 1a4de1d3..da6df045 100644 --- a/src/camotics/qt/FileDialog.h +++ b/src/camotics/qt/FileDialog.h @@ -41,4 +41,3 @@ namespace CAMotics { } #endif // CAMOTICS_FILE_DIALOG_H - diff --git a/src/camotics/qt/FileTabManager.h b/src/camotics/qt/FileTabManager.h index c687b102..c8aefbaf 100644 --- a/src/camotics/qt/FileTabManager.h +++ b/src/camotics/qt/FileTabManager.h @@ -87,4 +87,3 @@ namespace CAMotics { } #endif // CAMOTICS_FILE_TAB_MANAGER_H - diff --git a/src/camotics/qt/FindDialog.h b/src/camotics/qt/FindDialog.h index abe2065f..54f0c1ca 100644 --- a/src/camotics/qt/FindDialog.h +++ b/src/camotics/qt/FindDialog.h @@ -57,4 +57,3 @@ namespace CAMotics { } #endif // CAMOTICS_FIND_DIALOG_H - diff --git a/src/camotics/qt/GCodeHighlighter.h b/src/camotics/qt/GCodeHighlighter.h index f031ca8f..21f9b742 100644 --- a/src/camotics/qt/GCodeHighlighter.h +++ b/src/camotics/qt/GCodeHighlighter.h @@ -95,4 +95,3 @@ namespace CAMotics { } #endif // CAMOTICS_GCODEHIGHLIGHTER_H - diff --git a/src/camotics/qt/GLEWInit.h b/src/camotics/qt/GLEWInit.h index 4f1cfdfa..52c6a4ed 100644 --- a/src/camotics/qt/GLEWInit.h +++ b/src/camotics/qt/GLEWInit.h @@ -27,4 +27,3 @@ namespace CAMotics { } #endif // CAMOTICS_GLEWINIT_H - diff --git a/src/camotics/qt/GLView.h b/src/camotics/qt/GLView.h index 83804972..b2e51892 100644 --- a/src/camotics/qt/GLView.h +++ b/src/camotics/qt/GLView.h @@ -53,4 +53,3 @@ namespace CAMotics { } #endif // CAMOTICS_GLVIEW_H - diff --git a/src/camotics/qt/Highlighter.h b/src/camotics/qt/Highlighter.h index 8e29f38a..27f728f3 100644 --- a/src/camotics/qt/Highlighter.h +++ b/src/camotics/qt/Highlighter.h @@ -62,4 +62,3 @@ namespace CAMotics { } #endif // CAMOTICS_HIGHLIGHTER_H - diff --git a/src/camotics/qt/NCEdit.h b/src/camotics/qt/NCEdit.h index 8c5f1af2..cb582f0e 100644 --- a/src/camotics/qt/NCEdit.h +++ b/src/camotics/qt/NCEdit.h @@ -160,4 +160,3 @@ namespace CAMotics { } #endif // CAMOTICS_NCEDIT_H - diff --git a/src/camotics/qt/NewDialog.h b/src/camotics/qt/NewDialog.h index 44c1ebd1..470472e9 100644 --- a/src/camotics/qt/NewDialog.h +++ b/src/camotics/qt/NewDialog.h @@ -42,4 +42,3 @@ namespace CAMotics { } #endif // CAMOTICS_NEW_DIALOG_H - diff --git a/src/camotics/qt/ProjectModel.h b/src/camotics/qt/ProjectModel.h index f4e9701e..08d762a1 100644 --- a/src/camotics/qt/ProjectModel.h +++ b/src/camotics/qt/ProjectModel.h @@ -79,4 +79,3 @@ namespace CAMotics { } #endif // CAMOTICS_PROJECT_MODEL_H - diff --git a/src/camotics/qt/QApplication.h b/src/camotics/qt/QApplication.h index dd245f74..34c8f5a9 100644 --- a/src/camotics/qt/QApplication.h +++ b/src/camotics/qt/QApplication.h @@ -34,4 +34,3 @@ namespace CAMotics { } #endif // CAMOTICS_QAPPLICATION_H - diff --git a/src/camotics/qt/QTextDevice.h b/src/camotics/qt/QTextDevice.h index 3da5cb7d..a3f4ee2f 100644 --- a/src/camotics/qt/QTextDevice.h +++ b/src/camotics/qt/QTextDevice.h @@ -49,4 +49,3 @@ namespace CAMotics { } #endif // CAMOTICS_QTEXT_DEVICE_H - diff --git a/src/camotics/qt/Settings.h b/src/camotics/qt/Settings.h index 37f5c7f3..997e0134 100644 --- a/src/camotics/qt/Settings.h +++ b/src/camotics/qt/Settings.h @@ -37,4 +37,3 @@ namespace CAMotics { } #endif // CAMOTICS_SETTINGS_H - diff --git a/src/camotics/qt/SettingsDialog.h b/src/camotics/qt/SettingsDialog.h index 59c7fe0b..2bbb5ffd 100644 --- a/src/camotics/qt/SettingsDialog.h +++ b/src/camotics/qt/SettingsDialog.h @@ -54,4 +54,3 @@ namespace CAMotics { } #endif // CAMOTICS_SETTINGS_DIALOG_H - diff --git a/src/camotics/qt/SidebarWidget.h b/src/camotics/qt/SidebarWidget.h index 3958d198..1c0e7dcd 100644 --- a/src/camotics/qt/SidebarWidget.h +++ b/src/camotics/qt/SidebarWidget.h @@ -89,4 +89,3 @@ namespace CAMotics { } #endif // CAMOTICS_SIDEBAR_WIDGET_H - diff --git a/src/camotics/qt/TPLHighlighter.h b/src/camotics/qt/TPLHighlighter.h index 40f77c8c..8da54350 100644 --- a/src/camotics/qt/TPLHighlighter.h +++ b/src/camotics/qt/TPLHighlighter.h @@ -66,4 +66,3 @@ namespace CAMotics { } #endif // CAMOTICS_TPLHIGHLIGHTER_H - diff --git a/src/camotics/qt/ToolDialog.h b/src/camotics/qt/ToolDialog.h index 9cc23d94..0edd65d9 100644 --- a/src/camotics/qt/ToolDialog.h +++ b/src/camotics/qt/ToolDialog.h @@ -69,4 +69,3 @@ namespace CAMotics { } #endif // CAMOTICS_TOOL_DIALOG_H - diff --git a/src/camotics/qt/ToolGraphicsItem.h b/src/camotics/qt/ToolGraphicsItem.h index f0e940be..2c82ccb6 100644 --- a/src/camotics/qt/ToolGraphicsItem.h +++ b/src/camotics/qt/ToolGraphicsItem.h @@ -48,4 +48,3 @@ namespace CAMotics { } #endif // CAMOTICS_TOOL_GRAPHICS_ITEM_H - diff --git a/src/camotics/qt/ToolScene.h b/src/camotics/qt/ToolScene.h index 09b9091d..57e81d78 100644 --- a/src/camotics/qt/ToolScene.h +++ b/src/camotics/qt/ToolScene.h @@ -36,4 +36,3 @@ namespace CAMotics { } #endif // CAMOTICS_TOOL_SCENE_H - diff --git a/src/camotics/remote/Connection.h b/src/camotics/remote/Connection.h index 81178bcf..7a7da9e7 100644 --- a/src/camotics/remote/Connection.h +++ b/src/camotics/remote/Connection.h @@ -64,4 +64,3 @@ namespace CAMotics { } #endif // CAMOTICS_CONNECTION_H - diff --git a/src/camotics/remote/ConnectionManager.h b/src/camotics/remote/ConnectionManager.h index 08b8d849..f5c31577 100644 --- a/src/camotics/remote/ConnectionManager.h +++ b/src/camotics/remote/ConnectionManager.h @@ -69,4 +69,3 @@ namespace CAMotics { } #endif // CAMOTICS_CONNECTION_MANAGER_H - diff --git a/src/camotics/render/RenderJob.h b/src/camotics/render/RenderJob.h index c2873578..cdeb3307 100644 --- a/src/camotics/render/RenderJob.h +++ b/src/camotics/render/RenderJob.h @@ -51,4 +51,3 @@ namespace CAMotics { } #endif // CAMOTICS_RENDER_JOB_H - diff --git a/src/camotics/render/Renderer.h b/src/camotics/render/Renderer.h index f3303b3c..283db0d7 100644 --- a/src/camotics/render/Renderer.h +++ b/src/camotics/render/Renderer.h @@ -47,4 +47,3 @@ namespace CAMotics { } #endif // CAMOTICS_RENDERER_H - diff --git a/src/camotics/sim/Addresses.h b/src/camotics/sim/Addresses.h index fcaa0948..698a4e14 100644 --- a/src/camotics/sim/Addresses.h +++ b/src/camotics/sim/Addresses.h @@ -184,4 +184,3 @@ namespace CAMotics { } #endif // CAMOTICS_ADDRESSES_H - diff --git a/src/camotics/sim/Controller.cpp b/src/camotics/sim/Controller.cpp index b711cb83..61125b39 100644 --- a/src/camotics/sim/Controller.cpp +++ b/src/camotics/sim/Controller.cpp @@ -658,7 +658,7 @@ void Controller::drill(int vars, bool dwell, bool feedOut, bool spindleStop) { unsigned zVar = getPlaneZVarType(); double r = getVar('R'); unsigned L = (vars & VT_L) ? (unsigned)getVar('L') : 1; - + double zClear = 0; switch (returnMode) { case RETURN_TO_R: zClear = r; break; diff --git a/src/camotics/sim/Controller.h b/src/camotics/sim/Controller.h index 9140894f..87883ce7 100644 --- a/src/camotics/sim/Controller.h +++ b/src/camotics/sim/Controller.h @@ -223,4 +223,3 @@ namespace CAMotics { } #endif // CAMOTICS_CONTROLLER_H - diff --git a/src/camotics/sim/CoordinateSystem.h b/src/camotics/sim/CoordinateSystem.h index ba022d27..fc5d91ba 100644 --- a/src/camotics/sim/CoordinateSystem.h +++ b/src/camotics/sim/CoordinateSystem.h @@ -33,4 +33,3 @@ namespace CAMotics { } #endif // CAMOTICS_COORDINATE_SYSTEM_H - diff --git a/src/camotics/sim/Tool.h b/src/camotics/sim/Tool.h index b0453180..00cabca0 100644 --- a/src/camotics/sim/Tool.h +++ b/src/camotics/sim/Tool.h @@ -118,7 +118,7 @@ namespace CAMotics { } } - + inline static char toVar(unsigned i) { switch (i) { case 9: return 'R'; @@ -137,4 +137,3 @@ namespace CAMotics { } #endif // CAMOTICS_TOOL_H - diff --git a/src/camotics/sim/ToolTable.h b/src/camotics/sim/ToolTable.h index c0fff5e2..52c1b382 100644 --- a/src/camotics/sim/ToolTable.h +++ b/src/camotics/sim/ToolTable.h @@ -71,4 +71,3 @@ namespace CAMotics { } #endif // CAMOTICS_TOOL_TABLE_H - diff --git a/src/camotics/stl/Facet.h b/src/camotics/stl/Facet.h index 3959905a..f87638ee 100644 --- a/src/camotics/stl/Facet.h +++ b/src/camotics/stl/Facet.h @@ -42,4 +42,3 @@ namespace CAMotics { } #endif // CAMOTICS_FACET_H - diff --git a/src/camotics/stl/STLBinaryTriangle.h b/src/camotics/stl/STLBinaryTriangle.h index b2580522..d9cd26cc 100644 --- a/src/camotics/stl/STLBinaryTriangle.h +++ b/src/camotics/stl/STLBinaryTriangle.h @@ -35,4 +35,3 @@ namespace CAMotics { } #endif // CAMOTICS_STLBINARY_TRIANGLE_H - diff --git a/src/camotics/stl/STLReader.h b/src/camotics/stl/STLReader.h index c9f07dee..3cbd67e1 100644 --- a/src/camotics/stl/STLReader.h +++ b/src/camotics/stl/STLReader.h @@ -48,4 +48,3 @@ namespace CAMotics { } #endif // CAMOTICS_STL_READER_H - diff --git a/src/camotics/stl/STLSink.h b/src/camotics/stl/STLSink.h index 7201c990..0c199895 100644 --- a/src/camotics/stl/STLSink.h +++ b/src/camotics/stl/STLSink.h @@ -47,4 +47,3 @@ namespace CAMotics { } #endif // CAMOTICS_STLSINK_H - diff --git a/src/camotics/stl/STLSource.h b/src/camotics/stl/STLSource.h index 303fd3a9..982b1320 100644 --- a/src/camotics/stl/STLSource.h +++ b/src/camotics/stl/STLSource.h @@ -47,4 +47,3 @@ namespace CAMotics { } #endif // CAMOTICS_STLSOURCE_H - diff --git a/src/camotics/stl/STLWriter.h b/src/camotics/stl/STLWriter.h index 8116187f..c0e4ee81 100644 --- a/src/camotics/stl/STLWriter.h +++ b/src/camotics/stl/STLWriter.h @@ -46,4 +46,3 @@ namespace CAMotics { } #endif // CAMOTICS_STL_WRITER_H - diff --git a/src/camotics/value/MemberFunctorObserver.h b/src/camotics/value/MemberFunctorObserver.h index badcc53a..b4e86254 100644 --- a/src/camotics/value/MemberFunctorObserver.h +++ b/src/camotics/value/MemberFunctorObserver.h @@ -44,4 +44,3 @@ namespace CAMotics { } #endif // CAMOTICS_MEMBER_FUNCTOR_OBSERVER_H - diff --git a/src/camotics/value/MemberFunctorValue.h b/src/camotics/value/MemberFunctorValue.h index 4c4c66d4..0dfcd6a7 100644 --- a/src/camotics/value/MemberFunctorValue.h +++ b/src/camotics/value/MemberFunctorValue.h @@ -41,4 +41,3 @@ namespace CAMotics { } #endif // CAMOTICS_MEMBER_FUNCTOR_VALUE_H - diff --git a/src/camotics/value/Observer.h b/src/camotics/value/Observer.h index e2d53d22..cdcee88f 100644 --- a/src/camotics/value/Observer.h +++ b/src/camotics/value/Observer.h @@ -58,4 +58,3 @@ namespace CAMotics { } #endif // CAMOTICS_OBSERVER_H - diff --git a/src/camotics/value/Value.h b/src/camotics/value/Value.h index f0233bd3..8806617a 100644 --- a/src/camotics/value/Value.h +++ b/src/camotics/value/Value.h @@ -58,4 +58,3 @@ namespace CAMotics { } #endif // CAMOTICS_VALUE_H - diff --git a/src/camotics/value/ValueGroup.h b/src/camotics/value/ValueGroup.h index b1453d9b..8da2d4f8 100644 --- a/src/camotics/value/ValueGroup.h +++ b/src/camotics/value/ValueGroup.h @@ -57,4 +57,3 @@ namespace CAMotics { } #endif // CAMOTICS_VALUE_GROUP_H - diff --git a/src/camotics/value/ValueSet.h b/src/camotics/value/ValueSet.h index 1843aab2..91c83d21 100644 --- a/src/camotics/value/ValueSet.h +++ b/src/camotics/value/ValueSet.h @@ -69,4 +69,3 @@ namespace CAMotics { } #endif // CAMOTICS_VALUE_SET_H - diff --git a/src/camotics/value/VarValue.h b/src/camotics/value/VarValue.h index 5a6fbd6e..17a1442e 100644 --- a/src/camotics/value/VarValue.h +++ b/src/camotics/value/VarValue.h @@ -39,4 +39,3 @@ namespace CAMotics { } #endif // CAMOTICS_VAR_VALUE_H - diff --git a/src/camotics/view/BoundsView.cpp b/src/camotics/view/BoundsView.cpp index 8d741598..d1097507 100644 --- a/src/camotics/view/BoundsView.cpp +++ b/src/camotics/view/BoundsView.cpp @@ -48,7 +48,7 @@ void BoundsView::draw() { glVertex3f(rmin.x(), rmax.y(), rmax.z()); glVertex3f(rmin.x(), rmax.y(), rmax.z()); glVertex3f(rmin.x(), rmax.y(), rmin.z()); - + // Sides glVertex3f(rmin.x(), rmin.y(), rmin.z()); glVertex3f(rmin.x(), rmax.y(), rmin.z()); @@ -58,6 +58,6 @@ void BoundsView::draw() { glVertex3f(rmax.x(), rmax.y(), rmax.z()); glVertex3f(rmin.x(), rmin.y(), rmax.z()); glVertex3f(rmin.x(), rmax.y(), rmax.z()); - + glEnd(); } diff --git a/src/camotics/view/BoundsView.h b/src/camotics/view/BoundsView.h index 0ad5c06c..11c76ea7 100644 --- a/src/camotics/view/BoundsView.h +++ b/src/camotics/view/BoundsView.h @@ -34,4 +34,3 @@ namespace CAMotics { } #endif // CAMOTICS_BOUNDS_VIEW_H - diff --git a/src/camotics/view/Color.h b/src/camotics/view/Color.h index 5f13a504..565135bb 100644 --- a/src/camotics/view/Color.h +++ b/src/camotics/view/Color.h @@ -39,4 +39,3 @@ namespace CAMotics { } #endif // CAMOTICS_COLOR_H - diff --git a/src/camotics/view/CuboidView.h b/src/camotics/view/CuboidView.h index 5d1fd926..a1886ae4 100644 --- a/src/camotics/view/CuboidView.h +++ b/src/camotics/view/CuboidView.h @@ -44,4 +44,3 @@ namespace CAMotics { } #endif // CAMOTICS_CUBOID_VIEW_H - diff --git a/src/camotics/view/ToolPathView.h b/src/camotics/view/ToolPathView.h index 293c89c6..f9d3a0cb 100644 --- a/src/camotics/view/ToolPathView.h +++ b/src/camotics/view/ToolPathView.h @@ -110,4 +110,3 @@ namespace CAMotics { } #endif // CAMOTICS_TOOL_PATH_VIEW_H - diff --git a/src/camotics/view/ToolView.h b/src/camotics/view/ToolView.h index b3dc3d49..7ddc942f 100644 --- a/src/camotics/view/ToolView.h +++ b/src/camotics/view/ToolView.h @@ -62,4 +62,3 @@ namespace CAMotics { } #endif // CAMOTICS_TOOL_VIEW_H - diff --git a/src/camotics/view/View.h b/src/camotics/view/View.h index ab840b6a..c132afd6 100644 --- a/src/camotics/view/View.h +++ b/src/camotics/view/View.h @@ -97,4 +97,3 @@ namespace CAMotics { } #endif // CAMOTICS_VIEW_H - diff --git a/src/camotics/view/ViewPort.cpp b/src/camotics/view/ViewPort.cpp index c88d62ef..4121619b 100644 --- a/src/camotics/view/ViewPort.cpp +++ b/src/camotics/view/ViewPort.cpp @@ -75,7 +75,7 @@ Vector3D ViewPort::findBallVector(int px, int py) const { double z2 = 1.0 - x * x - y * y; double z = 0 < z2 ? sqrt(z2) : 0; // Clamp to 0 - + return Vector3D(x, y, z).normalize(); } diff --git a/src/camotics/view/ViewPort.h b/src/camotics/view/ViewPort.h index 363d33c1..e1f1f703 100644 --- a/src/camotics/view/ViewPort.h +++ b/src/camotics/view/ViewPort.h @@ -80,4 +80,3 @@ namespace CAMotics { } #endif // CAMOTICS_VIEW_PORT_H - diff --git a/src/camotics/view/Viewer.h b/src/camotics/view/Viewer.h index a17d9682..96186f90 100644 --- a/src/camotics/view/Viewer.h +++ b/src/camotics/view/Viewer.h @@ -36,4 +36,3 @@ namespace CAMotics { } #endif // CAMOTICS_VIEWER_H - diff --git a/src/clipper/clipper.cpp b/src/clipper/clipper.cpp index 5fe290e4..97ae52d3 100644 --- a/src/clipper/clipper.cpp +++ b/src/clipper/clipper.cpp @@ -74,7 +74,7 @@ void PolyTree::Clear() { for (PolyNodes::size_type i = 0; i < AllNodes.size(); ++i) delete AllNodes[i]; - AllNodes.resize(0); + AllNodes.resize(0); Childs.resize(0); } //------------------------------------------------------------------------------ @@ -118,27 +118,27 @@ void PolyNode::AddChild(PolyNode& child) //------------------------------------------------------------------------------ PolyNode* PolyNode::GetNext() const -{ - if (!Childs.empty()) - return Childs[0]; +{ + if (!Childs.empty()) + return Childs[0]; else - return GetNextSiblingUp(); -} + return GetNextSiblingUp(); +} //------------------------------------------------------------------------------ PolyNode* PolyNode::GetNextSiblingUp() const -{ +{ if (!Parent) //protects against PolyTree.GetNextSiblingUp() return 0; else if (Index == Parent->Childs.size() - 1) return Parent->GetNextSiblingUp(); else return Parent->Childs[Index + 1]; -} +} //------------------------------------------------------------------------------ bool PolyNode::IsHole() const -{ +{ bool result = true; PolyNode* node = Parent; while (node) @@ -147,7 +147,7 @@ bool PolyNode::IsHole() const node = node->Parent; } return result; -} +} //------------------------------------------------------------------------------ // Int128 class (enables safe math on signed 64bit integers) @@ -166,15 +166,15 @@ class Int128 Int128(long64 _lo = 0) { - lo = (ulong64)_lo; - if (_lo < 0) hi = -1; else hi = 0; + lo = (ulong64)_lo; + if (_lo < 0) hi = -1; else hi = 0; } Int128(const Int128 &val): lo(val.lo), hi(val.hi){} Int128(const long64& _hi, const ulong64& _lo): lo(_lo), hi(_hi){} - + long64 operator = (const long64 &val) { lo = (ulong64)val; @@ -242,7 +242,7 @@ class Int128 { if (lo == 0) return Int128(-hi,0); - else + else return Int128(~hi,~lo +1); } @@ -273,12 +273,12 @@ class Int128 } divisor.lo >>= 1; if ((divisor.hi & 1) == 1) - divisor.lo |= 0x8000000000000000LL; + divisor.lo |= 0x8000000000000000LL; divisor.hi = (ulong64)divisor.hi >> 1; cntr.lo >>= 1; if ((cntr.hi & 1) == 1) - cntr.lo |= 0x8000000000000000LL; + cntr.lo |= 0x8000000000000000LL; cntr.hi >>= 1; while (cntr.hi != 0 || cntr.lo != 0) @@ -291,12 +291,12 @@ class Int128 } divisor.lo >>= 1; if ((divisor.hi & 1) == 1) - divisor.lo |= 0x8000000000000000LL; + divisor.lo |= 0x8000000000000000LL; divisor.hi >>= 1; cntr.lo >>= 1; if ((cntr.hi & 1) == 1) - cntr.lo |= 0x8000000000000000LL; + cntr.lo |= 0x8000000000000000LL; cntr.hi >>= 1; } if (negate) result = -result; @@ -363,7 +363,7 @@ bool FullRangeNeeded(const Polygon &pts) return result; } //------------------------------------------------------------------------------ - + bool Orientation(const Polygon &poly) { return Area(poly) >= 0; @@ -436,7 +436,7 @@ bool PointIsVertex(const IntPoint &pt, OutPt *pp) } //------------------------------------------------------------------------------ -bool PointOnLineSegment(const IntPoint pt, +bool PointOnLineSegment(const IntPoint pt, const IntPoint linePt1, const IntPoint linePt2, bool UseFullInt64Range) { if (UseFullInt64Range) @@ -465,7 +465,7 @@ bool PointOnPolygon(const IntPoint pt, OutPt *pp, bool UseFullInt64Range) return true; pp2 = pp2->next; if (pp2 == pp) break; - } + } return false; } //------------------------------------------------------------------------------ @@ -479,8 +479,8 @@ bool PointInPolygon(const IntPoint &pt, OutPt *pp, bool UseFullInt64Range) { if ((((pp2->pt.Y <= pt.Y) && (pt.Y < pp2->prev->pt.Y)) || ((pp2->prev->pt.Y <= pt.Y) && (pt.Y < pp2->pt.Y))) && - Int128(pt.X - pp2->pt.X) < - Int128Mul(pp2->prev->pt.X - pp2->pt.X, pt.Y - pp2->pt.Y) / + Int128(pt.X - pp2->pt.X) < + Int128Mul(pp2->prev->pt.X - pp2->pt.X, pt.Y - pp2->pt.Y) / Int128(pp2->prev->pt.Y - pp2->pt.Y)) result = !result; pp2 = pp2->next; @@ -606,8 +606,8 @@ bool IntersectPoint(TEdge &edge1, TEdge &edge2, b1 = edge1.ybot - (edge1.xbot / edge1.dx); ip.Y = Round(ip.X / edge1.dx + b1); } - } - else + } + else { b1 = edge1.xbot - edge1.ybot * edge1.dx; b2 = edge2.xbot - edge2.ybot * edge2.dx; @@ -615,26 +615,26 @@ bool IntersectPoint(TEdge &edge1, TEdge &edge2, ip.Y = Round(q); if (std::fabs(edge1.dx) < std::fabs(edge2.dx)) ip.X = Round(edge1.dx * q + b1); - else + else ip.X = Round(edge2.dx * q + b2); } - if (ip.Y < edge1.ytop || ip.Y < edge2.ytop) + if (ip.Y < edge1.ytop || ip.Y < edge2.ytop) { if (edge1.ytop > edge2.ytop) { ip.X = edge1.xtop; ip.Y = edge1.ytop; return TopX(edge2, edge1.ytop) < edge1.xtop; - } + } else { ip.X = edge2.xtop; ip.Y = edge2.ytop; return TopX(edge1, edge2.ytop) > edge2.xtop; } - } - else + } + else return true; } //------------------------------------------------------------------------------ @@ -793,7 +793,7 @@ OutPt* GetBottomPt(OutPt *pp) } //------------------------------------------------------------------------------ -bool FindSegment(OutPt* &pp, bool UseFullInt64Range, +bool FindSegment(OutPt* &pp, bool UseFullInt64Range, IntPoint &pt1, IntPoint &pt2) { //outPt1 & outPt2 => the overlap segment (if the function returns true) @@ -865,7 +865,7 @@ void RangeTest(const IntPoint& pt, long64& maxrange) { if (Abs(pt.X) > maxrange) { - if (Abs(pt.X) > hiRange) + if (Abs(pt.X) > hiRange) throw coords_range_error; else maxrange = hiRange; } @@ -1245,7 +1245,7 @@ void Clipper::FixHoleLinkage(OutRec &outrec) { //skip OutRecs that (a) contain outermost polygons or //(b) already have the correct owner/child linkage ... - if (!outrec.FirstLeft || + if (!outrec.FirstLeft || (outrec.isHole != outrec.FirstLeft->isHole && outrec.FirstLeft->pts)) return; @@ -1446,11 +1446,11 @@ bool Clipper::IsContributing(const TEdge& edge) const switch(pft) { - case pftEvenOdd: + case pftEvenOdd: case pftNonZero: if (Abs(edge.windCnt) != 1) return false; break; - case pftPositive: + case pftPositive: if (edge.windCnt != 1) return false; break; default: //pftNegative @@ -1462,24 +1462,24 @@ bool Clipper::IsContributing(const TEdge& edge) const case ctIntersection: switch(pft2) { - case pftEvenOdd: - case pftNonZero: + case pftEvenOdd: + case pftNonZero: return (edge.windCnt2 != 0); - case pftPositive: + case pftPositive: return (edge.windCnt2 > 0); - default: + default: return (edge.windCnt2 < 0); } break; case ctUnion: switch(pft2) { - case pftEvenOdd: - case pftNonZero: + case pftEvenOdd: + case pftNonZero: return (edge.windCnt2 == 0); - case pftPositive: + case pftPositive: return (edge.windCnt2 <= 0); - default: + default: return (edge.windCnt2 >= 0); } break; @@ -1487,23 +1487,23 @@ bool Clipper::IsContributing(const TEdge& edge) const if (edge.polyType == ptSubject) switch(pft2) { - case pftEvenOdd: - case pftNonZero: + case pftEvenOdd: + case pftNonZero: return (edge.windCnt2 == 0); - case pftPositive: + case pftPositive: return (edge.windCnt2 <= 0); - default: + default: return (edge.windCnt2 >= 0); } else switch(pft2) { - case pftEvenOdd: - case pftNonZero: + case pftEvenOdd: + case pftNonZero: return (edge.windCnt2 != 0); - case pftPositive: + case pftPositive: return (edge.windCnt2 > 0); - default: + default: return (edge.windCnt2 < 0); } break; @@ -1524,7 +1524,7 @@ void Clipper::AddLocalMinPoly(TEdge *e1, TEdge *e2, const IntPoint &pt) e2->side = esRight; e = e1; if (e->prevInAEL == e2) - prevE = e2->prevInAEL; + prevE = e2->prevInAEL; else prevE = e->prevInAEL; } else @@ -1554,9 +1554,9 @@ void Clipper::AddLocalMaxPoly(TEdge *e1, TEdge *e2, const IntPoint &pt) e1->outIdx = -1; e2->outIdx = -1; } - else if (e1->outIdx < e2->outIdx) - AppendPolygon(e1, e2); - else + else if (e1->outIdx < e2->outIdx) + AppendPolygon(e1, e2); + else AppendPolygon(e2, e1); } //------------------------------------------------------------------------------ @@ -1808,10 +1808,10 @@ void Clipper::IntersectEdges(TEdge *e1, TEdge *e2, if ( e1Contributing && e2contributing ) { - if ( e1stops || e2stops || + if ( e1stops || e2stops || (e1Wc != 0 && e1Wc != 1) || (e2Wc != 0 && e2Wc != 1) || (e1->polyType != e2->polyType && m_ClipType != ctXor) ) - AddLocalMaxPoly(e1, e2, pt); + AddLocalMaxPoly(e1, e2, pt); else { AddOutPt(e1, pt); @@ -1822,7 +1822,7 @@ void Clipper::IntersectEdges(TEdge *e1, TEdge *e2, } else if ( e1Contributing ) { - if (e2Wc == 0 || e2Wc == 1) + if (e2Wc == 0 || e2Wc == 1) { AddOutPt(e1, pt); SwapSides(*e1, *e2); @@ -1831,14 +1831,14 @@ void Clipper::IntersectEdges(TEdge *e1, TEdge *e2, } else if ( e2contributing ) { - if (e1Wc == 0 || e1Wc == 1) + if (e1Wc == 0 || e1Wc == 1) { AddOutPt(e2, pt); SwapSides(*e1, *e2); SwapPolyIndexes(*e1, *e2); } - } - else if ( (e1Wc == 0 || e1Wc == 1) && + } + else if ( (e1Wc == 0 || e1Wc == 1) && (e2Wc == 0 || e2Wc == 1) && !e1stops && !e2stops ) { //neither edge is currently contributing ... @@ -1915,9 +1915,9 @@ void Clipper::SetHoleState(TEdge *e, OutRec *outrec) OutRec* GetLowermostRec(OutRec *outRec1, OutRec *outRec2) { //work out which polygon fragment has the correct hole state ... - if (!outRec1->bottomPt) + if (!outRec1->bottomPt) outRec1->bottomPt = GetBottomPt(outRec1->pts); - if (!outRec2->bottomPt) + if (!outRec2->bottomPt) outRec2->bottomPt = GetBottomPt(outRec2->pts); OutPt *outPt1 = outRec1->bottomPt; OutPt *outPt2 = outRec2->bottomPt; @@ -1959,11 +1959,11 @@ void Clipper::AppendPolygon(TEdge *e1, TEdge *e2) OutRec *outRec2 = m_PolyOuts[e2->outIdx]; OutRec *holeStateRec; - if (Param1RightOfParam2(outRec1, outRec2)) + if (Param1RightOfParam2(outRec1, outRec2)) holeStateRec = outRec2; - else if (Param1RightOfParam2(outRec2, outRec1)) + else if (Param1RightOfParam2(outRec2, outRec1)) holeStateRec = outRec1; - else + else holeStateRec = GetLowermostRec(outRec1, outRec2); OutPt* p1_lft = outRec1->pts; @@ -2557,10 +2557,10 @@ void Clipper::ProcessEdgesAtTopOfScanbeam(const long64 topY) e->ycurr = topY; if (m_ForceSimple && e->prevInAEL && - e->prevInAEL->xcurr == e->xcurr && + e->prevInAEL->xcurr == e->xcurr && e->outIdx >= 0 && e->prevInAEL->outIdx >= 0) { - if (intermediateVert) + if (intermediateVert) AddOutPt(e->prevInAEL, IntPoint(e->xcurr, topY)); else AddOutPt(e, IntPoint(e->xcurr, topY)); @@ -2659,7 +2659,7 @@ void Clipper::BuildResult(Polygons &polys) pg.push_back(p->pt); p = p->prev; } while (p != m_PolyOuts[i]->pts); - if (pg.size() > 2) + if (pg.size() > 2) polys.push_back(pg); } } @@ -2713,7 +2713,7 @@ void Clipper::BuildResult2(PolyTree& polytree) { OutRec* outRec = m_PolyOuts[i]; if (!outRec->polyNode) continue; - if (outRec->FirstLeft) + if (outRec->FirstLeft) outRec->FirstLeft->polyNode->AddChild(*outRec->polyNode); else polytree.AddChild(*outRec->polyNode); @@ -2746,16 +2746,16 @@ bool Clipper::FixupIntersectionOrder() //pre-condition: intersections are sorted bottom-most (then left-most) first. //Now it's crucial that intersections are made only between adjacent edges, //so to ensure this the order of intersections may need adjusting ... - IntersectNode *inode = m_IntersectNodes; + IntersectNode *inode = m_IntersectNodes; CopyAELToSEL(); - while (inode) + while (inode) { if (!EdgesAdjacent(*inode)) { IntersectNode *nextNode = inode->next; while (nextNode && !EdgesAdjacent(*nextNode)) nextNode = nextNode->next; - if (!nextNode) + if (!nextNode) return false; SwapIntersectNodes(*inode, *nextNode); } @@ -2768,12 +2768,12 @@ bool Clipper::FixupIntersectionOrder() inline bool E2InsertsBeforeE1(TEdge &e1, TEdge &e2) { - if (e2.xcurr == e1.xcurr) + if (e2.xcurr == e1.xcurr) { if (e2.ytop > e1.ytop) - return e2.xtop < TopX(e1, e2.ytop); + return e2.xtop < TopX(e1, e2.ytop); else return e1.xtop > TopX(e2, e1.ytop); - } + } else return e2.xcurr < e1.xcurr; } //------------------------------------------------------------------------------ @@ -2808,7 +2808,7 @@ bool Clipper::JoinPoints(const JoinRec *j, OutPt *&p1, OutPt *&p2) { OutRec *outRec1 = m_PolyOuts[j->poly1Idx]; OutRec *outRec2 = m_PolyOuts[j->poly2Idx]; - if (!outRec1 || !outRec2) return false; + if (!outRec1 || !outRec2) return false; OutPt *pp1a = outRec1->pts; OutPt *pp2a = outRec2->pts; IntPoint pt1 = j->pt2a, pt2 = j->pt2b; @@ -2819,7 +2819,7 @@ bool Clipper::JoinPoints(const JoinRec *j, OutPt *&p1, OutPt *&p2) //we're searching the same polygon for overlapping segments so //segment 2 mustn't be the same as segment 1 ... pp2a = pp1a->next; - if (!FindSegment(pp2a, m_UseFullRange, pt3, pt4) || (pp2a == pp1a)) + if (!FindSegment(pp2a, m_UseFullRange, pt3, pt4) || (pp2a == pp1a)) return false; } else if (!FindSegment(pp2a, m_UseFullRange, pt3, pt4)) return false; @@ -2906,12 +2906,12 @@ bool Poly2ContainsPoly1(OutPt* outPt1, OutPt* outPt2, bool UseFullInt64Range) //---------------------------------------------------------------------- void Clipper::FixupFirstLefts1(OutRec* OldOutRec, OutRec* NewOutRec) -{ - +{ + for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); ++i) { OutRec* outRec = m_PolyOuts[i]; - if (outRec->pts && outRec->FirstLeft == OldOutRec) + if (outRec->pts && outRec->FirstLeft == OldOutRec) { if (Poly2ContainsPoly1(outRec->pts, NewOutRec->pts, m_UseFullRange)) outRec->FirstLeft = NewOutRec; @@ -2921,7 +2921,7 @@ void Clipper::FixupFirstLefts1(OutRec* OldOutRec, OutRec* NewOutRec) //---------------------------------------------------------------------- void Clipper::FixupFirstLefts2(OutRec* OldOutRec, OutRec* NewOutRec) -{ +{ for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); ++i) { OutRec* outRec = m_PolyOuts[i]; @@ -2978,7 +2978,7 @@ void Clipper::JoinCommonEdges() if ((outRec2->isHole ^ m_ReverseOutput) == (Area(*outRec2, m_UseFullRange) > 0)) ReversePolyPtLinks(outRec2->pts); - + } else if (Poly2ContainsPoly1(outRec1->pts, outRec2->pts, m_UseFullRange)) { //outRec1 is contained by outRec2 ... @@ -2997,7 +2997,7 @@ void Clipper::JoinCommonEdges() if ((outRec1->isHole ^ m_ReverseOutput) == (Area(*outRec1, m_UseFullRange) > 0)) ReversePolyPtLinks(outRec1->pts); - } + } else { //the 2 polygons are completely separate ... @@ -3012,7 +3012,7 @@ void Clipper::JoinCommonEdges() FixupOutPolygon(*outRec1); //nb: do this BEFORE testing orientation FixupOutPolygon(*outRec2); // but AFTER calling FixupJoinRecs() } - + } else { //joined 2 polygons together ... @@ -3025,7 +3025,7 @@ void Clipper::JoinCommonEdges() outRec2->idx = outRec1->idx; outRec1->isHole = holeStateRec->isHole; - if (holeStateRec == outRec2) + if (holeStateRec == outRec2) outRec1->FirstLeft = outRec2->FirstLeft; outRec2->FirstLeft = outRec1; @@ -3037,7 +3037,7 @@ void Clipper::JoinCommonEdges() //------------------------------------------------------------------------------ inline void UpdateOutPtIdxs(OutRec& outrec) -{ +{ OutPt* op = outrec.pts; do { @@ -3051,7 +3051,7 @@ inline void UpdateOutPtIdxs(OutRec& outrec) void Clipper::DoSimplePolygons() { PolyOutList::size_type i = 0; - while (i < m_PolyOuts.size()) + while (i < m_PolyOuts.size()) { OutRec* outrec = m_PolyOuts[i++]; OutPt* op = outrec->pts; @@ -3059,9 +3059,9 @@ void Clipper::DoSimplePolygons() do //for each Pt in Polygon until duplicate found do ... { OutPt* op2 = op->next; - while (op2 != outrec->pts) + while (op2 != outrec->pts) { - if (PointsEqual(op->pt, op2->pt) && op2->next != op && op2->prev != op) + if (PointsEqual(op->pt, op2->pt) && op2->next != op && op2->prev != op) { //split the polygon into two ... OutPt* op3 = op->prev; @@ -3139,7 +3139,7 @@ Polygon BuildArc(const IntPoint &pt, if (steps < 2) steps = 2; else if (steps > (int)(222.0 * arcFrac)) steps = (int)(222.0 * arcFrac); - double x = std::cos(a1); + double x = std::cos(a1); double y = std::sin(a1); double c = std::cos((a2 - a1) / steps); double s = std::sin((a2 - a1) / steps); @@ -3158,7 +3158,7 @@ Polygon BuildArc(const IntPoint &pt, DoublePoint GetUnitNormal(const IntPoint &pt1, const IntPoint &pt2) { - if(pt2.X == pt1.X && pt2.Y == pt1.Y) + if(pt2.X == pt1.X && pt2.Y == pt1.Y) return DoublePoint(0, 0); double dx = (double)(pt2.X - pt1.X); @@ -3181,7 +3181,7 @@ class OffsetBuilder double m_delta, m_rmin, m_r; size_t m_i, m_j, m_k; static const int buffLength = 128; - + public: OffsetBuilder(const Polygons& in_polys, Polygons& out_polys, @@ -3202,7 +3202,7 @@ OffsetBuilder(const Polygons& in_polys, Polygons& out_polys, if (limit <= 0) limit = 0.25; else if (limit > std::fabs(delta)) limit = std::fabs(delta); } - + out_polys.clear(); out_polys.resize(m_p.size()); for (m_i = 0; m_i < m_p.size(); m_i++) @@ -3225,15 +3225,15 @@ OffsetBuilder(const Polygons& in_polys, Polygons& out_polys, normals.resize(len); for (m_j = 0; m_j < len -1; ++m_j) normals[m_j] = GetUnitNormal(m_p[m_i][m_j], m_p[m_i][m_j +1]); - if (isPolygon || forceClose) + if (isPolygon || forceClose) normals[len-1] = GetUnitNormal(m_p[m_i][len-1], m_p[m_i][0]); else //is open polyline normals[len-1] = normals[len-2]; - + m_curr_poly = &out_polys[m_i]; m_curr_poly->reserve(len); - if (isPolygon || forceClose) + if (isPolygon || forceClose) { m_k = len -1; for (m_j = 0; m_j < len; ++m_j) @@ -3266,13 +3266,13 @@ OffsetBuilder(const Polygons& in_polys, Polygons& out_polys, if (endtype == etButt) { m_j = len - 1; - pt1 = IntPoint(Round(m_p[m_i][m_j].X + normals[m_j].X * m_delta), + pt1 = IntPoint(Round(m_p[m_i][m_j].X + normals[m_j].X * m_delta), Round(m_p[m_i][m_j].Y + normals[m_j].Y * m_delta)); AddPoint(pt1); - pt1 = IntPoint(Round(m_p[m_i][m_j].X - normals[m_j].X * m_delta), + pt1 = IntPoint(Round(m_p[m_i][m_j].X - normals[m_j].X * m_delta), Round(m_p[m_i][m_j].Y - normals[m_j].Y * m_delta)); AddPoint(pt1); - } + } else { m_j = len - 1; @@ -3298,18 +3298,18 @@ OffsetBuilder(const Polygons& in_polys, Polygons& out_polys, OffsetPoint(jointype, limit); //finally handle the start (butt, round or square) ... - if (endtype == etButt) + if (endtype == etButt) { - pt1 = IntPoint(Round(m_p[m_i][0].X - normals[0].X * m_delta), + pt1 = IntPoint(Round(m_p[m_i][0].X - normals[0].X * m_delta), Round(m_p[m_i][0].Y - normals[0].Y * m_delta)); AddPoint(pt1); - pt1 = IntPoint(Round(m_p[m_i][0].X + normals[0].X * m_delta), + pt1 = IntPoint(Round(m_p[m_i][0].X + normals[0].X * m_delta), Round(m_p[m_i][0].Y + normals[0].Y * m_delta)); AddPoint(pt1); } else { m_k = 1; - if (endtype == etSquare) DoSquare(); + if (endtype == etSquare) DoSquare(); else DoRound(limit); } } @@ -3350,7 +3350,7 @@ void OffsetPoint(JoinType jointype, double limit) { case jtMiter: { - m_r = 1 + (normals[m_j].X*normals[m_k].X + + m_r = 1 + (normals[m_j].X*normals[m_k].X + normals[m_j].Y*normals[m_k].Y); if (m_r >= m_rmin) DoMiter(); else DoSquare(); break; @@ -3407,9 +3407,9 @@ void DoMiter() } else { - IntPoint pt1 = IntPoint(Round(m_p[m_i][m_j].X + normals[m_k].X * m_delta), + IntPoint pt1 = IntPoint(Round(m_p[m_i][m_j].X + normals[m_k].X * m_delta), Round(m_p[m_i][m_j].Y + normals[m_k].Y * m_delta)); - IntPoint pt2 = IntPoint(Round(m_p[m_i][m_j].X + normals[m_j].X * m_delta), + IntPoint pt2 = IntPoint(Round(m_p[m_i][m_j].X + normals[m_j].X * m_delta), Round(m_p[m_i][m_j].Y + normals[m_j].Y * m_delta)); AddPoint(pt1); AddPoint(m_p[m_i][m_j]); @@ -3473,20 +3473,20 @@ void OffsetPolygons(const Polygons &in_polys, Polygons &out_polys, Polygons inPolys = Polygons(in_polys); out_polys.clear(); - //ChecksInput - fixes polygon orientation if necessary and removes + //ChecksInput - fixes polygon orientation if necessary and removes //duplicate vertices. Can be set false when you're sure that polygon //orientation is correct and that there are no duplicate vertices. - if (autoFix) + if (autoFix) { size_t polyCount = inPolys.size(), botPoly = 0; while (botPoly < polyCount && inPolys[botPoly].empty()) botPoly++; if (botPoly == polyCount) return; - + //botPt: used to find the lowermost (in inverted Y-axis) & leftmost point - //This point (on m_p[botPoly]) must be on an outer polygon ring and if - //its orientation is false (counterclockwise) then assume all polygons + //This point (on m_p[botPoly]) must be on an outer polygon ring and if + //its orientation is false (counterclockwise) then assume all polygons //need reversing ... - IntPoint botPt = inPolys[botPoly][0]; + IntPoint botPt = inPolys[botPoly][0]; for (size_t i = botPoly; i < polyCount; ++i) { if (inPolys[i].size() < 3) { inPolys[i].clear(); continue; } @@ -3496,7 +3496,7 @@ void OffsetPolygons(const Polygons &in_polys, Polygons &out_polys, { if (PointsEqual(*it, *(it -1))) it = inPolys[i].erase(it); - else + else { if (UpdateBotPt(*it, botPt)) botPoly = i; ++it; @@ -3511,7 +3511,7 @@ void OffsetPolygons(const Polygons &in_polys, Polygons &out_polys, //------------------------------------------------------------------------------ void OffsetPolyLines(const Polygons &in_lines, Polygons &out_lines, - double delta, JoinType jointype, EndType endtype, + double delta, JoinType jointype, EndType endtype, double limit, bool autoFix) { if (!autoFix && endtype != etClosed && &in_lines != &out_lines) @@ -3521,7 +3521,7 @@ void OffsetPolyLines(const Polygons &in_lines, Polygons &out_lines, } Polygons inLines = Polygons(in_lines); - if (autoFix) + if (autoFix) for (size_t i = 0; i < inLines.size(); ++i) { if (inLines[i].size() < 2) { inLines[i].clear(); continue; } @@ -3545,7 +3545,7 @@ void OffsetPolyLines(const Polygons &in_lines, Polygons &out_lines, ReversePolygon(inLines[sz+i]); } OffsetBuilder(inLines, out_lines, true, delta, jointype, endtype, limit); - } + } else OffsetBuilder(inLines, out_lines, false, delta, jointype, endtype, limit); } @@ -3587,7 +3587,7 @@ DoublePoint ClosestPointOnLine(const IntPoint& pt, const IntPoint& linePt1, cons { double dx = ((double)linePt2.X - linePt1.X); double dy = ((double)linePt2.Y - linePt1.Y); - if (dx == 0 && dy == 0) + if (dx == 0 && dy == 0) return DoublePoint((double)linePt1.X, (double)linePt1.Y); double q = ((pt.X-linePt1.X)*dx + (pt.Y-linePt1.Y)*dy) / (dx*dx + dy*dy); return DoublePoint( @@ -3596,7 +3596,7 @@ DoublePoint ClosestPointOnLine(const IntPoint& pt, const IntPoint& linePt1, cons } //------------------------------------------------------------------------------ -bool SlopesNearColinear(const IntPoint& pt1, +bool SlopesNearColinear(const IntPoint& pt1, const IntPoint& pt2, const IntPoint& pt3, double distSqrd) { if (DistanceSqrd(pt1, pt2) > DistanceSqrd(pt1, pt3)) return false; @@ -3623,8 +3623,8 @@ void CleanPolygon(const Polygon& in_poly, Polygon& out_poly, double distance) double distSqrd = distance * distance; while (highI > 0 && PointsAreClose(in_poly[highI], in_poly[0], distSqrd)) highI--; if (highI < 2) { out_poly.clear(); return; } - - if (&in_poly != &out_poly) + + if (&in_poly != &out_poly) out_poly.resize(highI + 1); IntPoint pt = in_poly[highI]; @@ -3641,7 +3641,7 @@ void CleanPolygon(const Polygon& in_poly, Polygon& out_poly, double distance) out_poly[k++] = pt; } if (i <= highI) out_poly[k++] = in_poly[i]; - if (k > 2 && SlopesNearColinear(out_poly[k -2], out_poly[k -1], out_poly[0], distSqrd)) k--; + if (k > 2 && SlopesNearColinear(out_poly[k -2], out_poly[k -1], out_poly[0], distSqrd)) k--; if (k < 3) out_poly.clear(); else if (k <= highI) out_poly.resize(k); } @@ -3665,7 +3665,7 @@ void AddPolyNodeToPolygons(const PolyNode& polynode, Polygons& polygons) void PolyTreeToPolygons(const PolyTree& polytree, Polygons& polygons) { - polygons.resize(0); + polygons.resize(0); polygons.reserve(polytree.Total()); AddPolyNodeToPolygons(polytree, polygons); } diff --git a/src/clipper/clipper.hpp b/src/clipper/clipper.hpp index 18510082..bd564e34 100644 --- a/src/clipper/clipper.hpp +++ b/src/clipper/clipper.hpp @@ -71,8 +71,8 @@ std::ostream& operator <<(std::ostream &s, Polygons &p); class PolyNode; typedef std::vector< PolyNode* > PolyNodes; -class PolyNode -{ +class PolyNode +{ public: PolyNode(); Polygon Contour; @@ -89,7 +89,7 @@ class PolyNode }; class PolyTree: public PolyNode -{ +{ public: ~PolyTree(){Clear();}; PolyNode* GetFirst() const; @@ -99,7 +99,7 @@ class PolyTree: public PolyNode PolyNodes AllNodes; friend class Clipper; //to access AllNodes }; - + enum JoinType { jtSquare, jtRound, jtMiter }; enum EndType { etClosed, etButt, etSquare, etRound}; @@ -271,7 +271,7 @@ class Clipper : public virtual ClipperBase PolyFillType m_ClipFillType; PolyFillType m_SubjFillType; bool m_ReverseOutput; - bool m_UsingPolyTree; + bool m_UsingPolyTree; bool m_ForceSimple; void DisposeScanbeamList(); void SetWindingCount(TEdge& edge); @@ -345,5 +345,3 @@ class clipperException : public std::exception } //ClipperLib namespace #endif //clipper_hpp - - diff --git a/src/glew/glew.c b/src/glew/glew.c index 8d65ded3..5270e9f5 100644 --- a/src/glew/glew.c +++ b/src/glew/glew.c @@ -5,24 +5,24 @@ ** Copyright (C) 2002-2008, Marcelo E. Magallon ** Copyright (C) 2002, Lev Povalahev ** All rights reserved. -** -** Redistribution and use in source and binary forms, with or without +** +** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are met: -** -** * Redistributions of source code must retain the above copyright notice, +** +** * Redistributions of source code must retain the above copyright notice, ** this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright notice, -** this list of conditions and the following disclaimer in the documentation +** * Redistributions in binary form must reproduce the above copyright notice, +** this list of conditions and the following disclaimer in the documentation ** and/or other materials provided with the distribution. -** * The name of the author may be used to endorse or promote products +** * The name of the author may be used to endorse or promote products ** derived from this software without specific prior written permission. ** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) @@ -119,7 +119,7 @@ void* NSGLGetProcAddress (const GLubyte *name) { static void* image = NULL; void* addr; - if (NULL == image) + if (NULL == image) { image = dlopen("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL", RTLD_LAZY); } @@ -9603,7 +9603,7 @@ static GLboolean _glewInit_GL_WIN_swap_hint (GLEW_CONTEXT_ARG_DEF_INIT) /* ------------------------------------------------------------------------- */ GLboolean GLEWAPIENTRY glewGetExtension (const char* name) -{ +{ const GLubyte* start; const GLubyte* end; start = (const GLubyte*)glGetString(GL_EXTENSIONS); @@ -9630,7 +9630,7 @@ GLenum GLEWAPIENTRY glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST) dot = _glewStrCLen(s, '.'); if (dot == 0) return GLEW_ERROR_NO_GL_VERSION; - + major = s[dot-1]-'0'; minor = s[dot+1]-'0'; @@ -9638,7 +9638,7 @@ GLenum GLEWAPIENTRY glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST) minor = 0; if (major<0 || major>9) return GLEW_ERROR_NO_GL_VERSION; - + if (major == 1 && minor == 0) { @@ -9655,12 +9655,12 @@ GLenum GLEWAPIENTRY glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST) CONST_CAST(GLEW_VERSION_3_2) = GLEW_VERSION_3_3 == GL_TRUE || ( major == 3 && minor >= 2 ) ? GL_TRUE : GL_FALSE; CONST_CAST(GLEW_VERSION_3_1) = GLEW_VERSION_3_2 == GL_TRUE || ( major == 3 && minor >= 1 ) ? GL_TRUE : GL_FALSE; CONST_CAST(GLEW_VERSION_3_0) = GLEW_VERSION_3_1 == GL_TRUE || ( major == 3 ) ? GL_TRUE : GL_FALSE; - CONST_CAST(GLEW_VERSION_2_1) = GLEW_VERSION_3_0 == GL_TRUE || ( major == 2 && minor >= 1 ) ? GL_TRUE : GL_FALSE; + CONST_CAST(GLEW_VERSION_2_1) = GLEW_VERSION_3_0 == GL_TRUE || ( major == 2 && minor >= 1 ) ? GL_TRUE : GL_FALSE; CONST_CAST(GLEW_VERSION_2_0) = GLEW_VERSION_2_1 == GL_TRUE || ( major == 2 ) ? GL_TRUE : GL_FALSE; CONST_CAST(GLEW_VERSION_1_5) = GLEW_VERSION_2_0 == GL_TRUE || ( major == 1 && minor >= 5 ) ? GL_TRUE : GL_FALSE; CONST_CAST(GLEW_VERSION_1_4) = GLEW_VERSION_1_5 == GL_TRUE || ( major == 1 && minor >= 4 ) ? GL_TRUE : GL_FALSE; CONST_CAST(GLEW_VERSION_1_3) = GLEW_VERSION_1_4 == GL_TRUE || ( major == 1 && minor >= 3 ) ? GL_TRUE : GL_FALSE; - CONST_CAST(GLEW_VERSION_1_2_1) = GLEW_VERSION_1_3 == GL_TRUE ? GL_TRUE : GL_FALSE; + CONST_CAST(GLEW_VERSION_1_2_1) = GLEW_VERSION_1_3 == GL_TRUE ? GL_TRUE : GL_FALSE; CONST_CAST(GLEW_VERSION_1_2) = GLEW_VERSION_1_2_1 == GL_TRUE || ( major == 1 && minor >= 2 ) ? GL_TRUE : GL_FALSE; CONST_CAST(GLEW_VERSION_1_1) = GLEW_VERSION_1_2 == GL_TRUE || ( major == 1 && minor >= 1 ) ? GL_TRUE : GL_FALSE; } @@ -12280,7 +12280,7 @@ static PFNWGLGETEXTENSIONSSTRINGARBPROC _wglewGetExtensionsStringARB = NULL; static PFNWGLGETEXTENSIONSSTRINGEXTPROC _wglewGetExtensionsStringEXT = NULL; GLboolean GLEWAPIENTRY wglewGetExtension (const char* name) -{ +{ const GLubyte* start; const GLubyte* end; if (_wglewGetExtensionsStringARB == NULL) @@ -13387,7 +13387,7 @@ static GLboolean _glewInit_GLX_SUN_video_resize (GLXEW_CONTEXT_ARG_DEF_INIT) /* ------------------------------------------------------------------------ */ GLboolean glxewGetExtension (const char* name) -{ +{ const GLubyte* start; const GLubyte* end; diff --git a/src/glew/glew.h b/src/glew/glew.h index 627a689b..9d4a2d60 100644 --- a/src/glew/glew.h +++ b/src/glew/glew.h @@ -5,24 +5,24 @@ ** Copyright (C) 2002-2008, Marcelo E. Magallon ** Copyright (C) 2002, Lev Povalahev ** All rights reserved. -** -** Redistribution and use in source and binary forms, with or without +** +** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are met: -** -** * Redistributions of source code must retain the above copyright notice, +** +** * Redistributions of source code must retain the above copyright notice, ** this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright notice, -** this list of conditions and the following disclaimer in the documentation +** * Redistributions in binary form must reproduce the above copyright notice, +** this list of conditions and the following disclaimer in the documentation ** and/or other materials provided with the distribution. -** * The name of the author may be used to endorse or promote products +** * The name of the author may be used to endorse or promote products ** derived from this software without specific prior written permission. ** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) @@ -56,7 +56,7 @@ /* ** Copyright (c) 2007 The Khronos Group Inc. -** +** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and/or associated documentation files (the ** "Materials"), to deal in the Materials without restriction, including @@ -64,10 +64,10 @@ ** distribute, sublicense, and/or sell copies of the Materials, and to ** permit persons to whom the Materials are furnished to do so, subject to ** the following conditions: -** +** ** The above copyright notice and this permission notice shall be included ** in all copies or substantial portions of the Materials. -** +** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. diff --git a/src/glew/glxew.h b/src/glew/glxew.h index 03228cad..3d179022 100644 --- a/src/glew/glxew.h +++ b/src/glew/glxew.h @@ -5,24 +5,24 @@ ** Copyright (C) 2002-2008, Marcelo E. Magallon ** Copyright (C) 2002, Lev Povalahev ** All rights reserved. -** -** Redistribution and use in source and binary forms, with or without +** +** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are met: -** -** * Redistributions of source code must retain the above copyright notice, +** +** * Redistributions of source code must retain the above copyright notice, ** this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright notice, -** this list of conditions and the following disclaimer in the documentation +** * Redistributions in binary form must reproduce the above copyright notice, +** this list of conditions and the following disclaimer in the documentation ** and/or other materials provided with the distribution. -** * The name of the author may be used to endorse or promote products +** * The name of the author may be used to endorse or promote products ** derived from this software without specific prior written permission. ** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) @@ -56,7 +56,7 @@ /* ** Copyright (c) 2007 The Khronos Group Inc. -** +** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and/or associated documentation files (the ** "Materials"), to deal in the Materials without restriction, including @@ -64,10 +64,10 @@ ** distribute, sublicense, and/or sell copies of the Materials, and to ** permit persons to whom the Materials are furnished to do so, subject to ** the following conditions: -** +** ** The above copyright notice and this permission notice shall be included ** in all copies or substantial portions of the Materials. -** +** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -142,7 +142,7 @@ typedef struct __glXContextRec *GLXContext; typedef struct __GLXcontextRec *GLXContext; #endif -typedef unsigned int GLXVideoDeviceNV; +typedef unsigned int GLXVideoDeviceNV; extern Bool glXQueryExtension (Display *dpy, int *errorBase, int *eventBase); extern Bool glXQueryVersion (Display *dpy, int *major, int *minor); @@ -264,21 +264,21 @@ typedef XID GLXWindow; typedef struct __GLXFBConfigRec *GLXFBConfig; typedef struct { - int event_type; - int draw_type; - unsigned long serial; - Bool send_event; - Display *display; - GLXDrawable drawable; - unsigned int buffer_mask; - unsigned int aux_buffer; - int x, y; - int width, height; - int count; + int event_type; + int draw_type; + unsigned long serial; + Bool send_event; + Display *display; + GLXDrawable drawable; + unsigned int buffer_mask; + unsigned int aux_buffer; + int x, y; + int width, height; + int count; } GLXPbufferClobberEvent; typedef union __GLXEvent { - GLXPbufferClobberEvent glxpbufferclobber; - long pad[24]; + GLXPbufferClobberEvent glxpbufferclobber; + long pad[24]; } GLXEvent; typedef GLXFBConfig* ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements); @@ -1207,32 +1207,32 @@ typedef XVisualInfo* ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLX #define GLX_HYPERPIPE_ID_SGIX 0x8030 typedef struct { - char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; - int networkId; + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int networkId; } GLXHyperpipeNetworkSGIX; typedef struct { - char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; - int XOrigin; - int YOrigin; - int maxHeight; - int maxWidth; + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int XOrigin; + int YOrigin; + int maxHeight; + int maxWidth; } GLXPipeRectLimits; typedef struct { - char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; - int channel; - unsigned int participationType; - int timeSlice; + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int channel; + unsigned int participationType; + int timeSlice; } GLXHyperpipeConfigSGIX; typedef struct { - char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; - int srcXOrigin; - int srcYOrigin; - int srcWidth; - int srcHeight; - int destXOrigin; - int destYOrigin; - int destWidth; - int destHeight; + char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int srcXOrigin; + int srcYOrigin; + int srcWidth; + int srcHeight; + int destXOrigin; + int destYOrigin; + int destWidth; + int destHeight; } GLXPipeRect; typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId); diff --git a/src/glew/wglew.h b/src/glew/wglew.h index 29f1aa76..55d54019 100644 --- a/src/glew/wglew.h +++ b/src/glew/wglew.h @@ -5,24 +5,24 @@ ** Copyright (C) 2002-2008, Marcelo E. Magallon ** Copyright (C) 2002, Lev Povalahev ** All rights reserved. -** -** Redistribution and use in source and binary forms, with or without +** +** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are met: -** -** * Redistributions of source code must retain the above copyright notice, +** +** * Redistributions of source code must retain the above copyright notice, ** this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright notice, -** this list of conditions and the following disclaimer in the documentation +** * Redistributions in binary form must reproduce the above copyright notice, +** this list of conditions and the following disclaimer in the documentation ** and/or other materials provided with the distribution. -** * The name of the author may be used to endorse or promote products +** * The name of the author may be used to endorse or promote products ** derived from this software without specific prior written permission. ** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) @@ -32,7 +32,7 @@ /* ** Copyright (c) 2007 The Khronos Group Inc. -** +** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and/or associated documentation files (the ** "Materials"), to deal in the Materials without restriction, including @@ -40,10 +40,10 @@ ** distribute, sublicense, and/or sell copies of the Materials, and to ** permit persons to whom the Materials are furnished to do so, subject to ** the following conditions: -** +** ** The above copyright notice and this permission notice shall be included ** in all copies or substantial portions of the Materials. -** +** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -971,11 +971,11 @@ typedef BOOL (WINAPI * PFNWGLDELAYBEFORESWAPNVPROC) (HDC hDC, GLfloat seconds); DECLARE_HANDLE(HGPUNV); typedef struct _GPU_DEVICE { - DWORD cb; - CHAR DeviceName[32]; - CHAR DeviceString[128]; - DWORD Flags; - RECT rcVirtualScreen; + DWORD cb; + CHAR DeviceName[32]; + CHAR DeviceString[128]; + DWORD Flags; + RECT rcVirtualScreen; } GPU_DEVICE, *PGPU_DEVICE; typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList); diff --git a/src/tplang/ClipperModule.h b/src/tplang/ClipperModule.h index e29a75e6..97a13e0d 100644 --- a/src/tplang/ClipperModule.h +++ b/src/tplang/ClipperModule.h @@ -39,4 +39,3 @@ namespace tplang { } #endif // TPLANG_CLIPPER_MODULE_H - diff --git a/src/tplang/DXFModule.h b/src/tplang/DXFModule.h index 85fc99b4..9ee223f3 100644 --- a/src/tplang/DXFModule.h +++ b/src/tplang/DXFModule.h @@ -44,4 +44,3 @@ namespace tplang { } #endif // TPLANG_DXFMODULE_H - diff --git a/src/tplang/GCodeModule.h b/src/tplang/GCodeModule.h index 161f4a1d..a76fa1e8 100644 --- a/src/tplang/GCodeModule.h +++ b/src/tplang/GCodeModule.h @@ -63,4 +63,3 @@ namespace tplang { } #endif // TPLANG_GCODE_MODULE_H - diff --git a/src/tplang/Interpreter.h b/src/tplang/Interpreter.h index f25b9d10..9a3b580f 100644 --- a/src/tplang/Interpreter.h +++ b/src/tplang/Interpreter.h @@ -42,4 +42,3 @@ namespace tplang { } #endif // TPLANG_INTERPRETER_H - diff --git a/src/tplang/MatrixModule.h b/src/tplang/MatrixModule.h index 6a5f911d..ef9661a0 100644 --- a/src/tplang/MatrixModule.h +++ b/src/tplang/MatrixModule.h @@ -60,4 +60,3 @@ namespace tplang { } #endif // TPLANG_MATRIX_MODULE_H - diff --git a/src/tplang/TPLContext.h b/src/tplang/TPLContext.h index aa8e7fff..5cdb3deb 100644 --- a/src/tplang/TPLContext.h +++ b/src/tplang/TPLContext.h @@ -56,4 +56,3 @@ namespace tplang { } #endif // TPLANG_TPLCONTEXT_H -