From b75cd3dd522c7c2589016160f5bb342ea6a7ed94 Mon Sep 17 00:00:00 2001 From: luz paz Date: Tue, 3 Nov 2020 13:09:58 -0500 Subject: [PATCH] Path: Fix header uniformity and remove trailing whitespace This PR fixes header uniformity across all Path files. It also removes all trailing whitespace. --- src/Mod/Path/App/AppPath.cpp | 2 +- src/Mod/Path/App/AppPathPy.cpp | 38 ++--- src/Mod/Path/App/Area.cpp | 6 +- src/Mod/Path/App/Area.h | 2 +- src/Mod/Path/App/AreaParams.h | 2 +- src/Mod/Path/App/AreaPyImp.cpp | 2 +- src/Mod/Path/App/Command.cpp | 2 +- src/Mod/Path/App/Command.h | 2 +- src/Mod/Path/App/CommandPyImp.cpp | 2 +- src/Mod/Path/App/FeatureArea.cpp | 2 +- src/Mod/Path/App/FeatureArea.h | 2 +- src/Mod/Path/App/FeatureAreaPyImp.cpp | 2 +- src/Mod/Path/App/FeaturePath.cpp | 2 +- src/Mod/Path/App/FeaturePath.h | 2 +- src/Mod/Path/App/FeaturePathCompound.cpp | 2 +- src/Mod/Path/App/FeaturePathCompound.h | 2 +- src/Mod/Path/App/FeaturePathShape.cpp | 2 +- src/Mod/Path/App/FeaturePathShape.h | 2 +- src/Mod/Path/App/ParamsHelper.h | 2 +- src/Mod/Path/App/Path.cpp | 2 +- src/Mod/Path/App/Path.h | 2 +- src/Mod/Path/App/PathPyImp.cpp | 10 +- src/Mod/Path/App/PathSegmentWalker.cpp | 11 +- src/Mod/Path/App/PathSegmentWalker.h | 7 +- src/Mod/Path/App/PreCompiled.cpp | 4 +- src/Mod/Path/App/PreCompiled.h | 2 +- src/Mod/Path/App/PropertyPath.cpp | 6 +- src/Mod/Path/App/PropertyPath.h | 2 +- src/Mod/Path/App/PropertyTool.cpp | 6 +- src/Mod/Path/App/PropertyTool.h | 2 +- src/Mod/Path/App/PropertyTooltable.cpp | 6 +- src/Mod/Path/App/PropertyTooltable.h | 2 +- src/Mod/Path/App/Tool.cpp | 2 +- src/Mod/Path/App/Tool.h | 2 +- src/Mod/Path/App/ToolPyImp.cpp | 2 +- src/Mod/Path/App/Tooltable.cpp | 2 +- src/Mod/Path/App/Tooltable.h | 2 +- src/Mod/Path/App/TooltablePyImp.cpp | 4 +- src/Mod/Path/App/Voronoi.cpp | 4 +- src/Mod/Path/App/Voronoi.h | 2 +- src/Mod/Path/App/VoronoiCell.cpp | 2 +- src/Mod/Path/App/VoronoiCell.h | 2 +- src/Mod/Path/App/VoronoiCellPyImp.cpp | 2 +- src/Mod/Path/App/VoronoiEdge.cpp | 2 +- src/Mod/Path/App/VoronoiEdge.h | 2 +- src/Mod/Path/App/VoronoiEdgePyImp.cpp | 2 +- src/Mod/Path/App/VoronoiPyImp.cpp | 2 +- src/Mod/Path/App/VoronoiVertex.cpp | 2 +- src/Mod/Path/App/VoronoiVertex.h | 2 +- src/Mod/Path/App/VoronoiVertexPyImp.cpp | 2 +- src/Mod/Path/Gui/AppPathGui.cpp | 4 +- src/Mod/Path/Gui/AppPathGuiPy.cpp | 2 +- src/Mod/Path/Gui/Command.cpp | 2 +- src/Mod/Path/Gui/DlgProcessorChooser.cpp | 2 +- src/Mod/Path/Gui/DlgProcessorChooser.h | 2 +- src/Mod/Path/Gui/DlgSettingsPathColor.cpp | 2 +- src/Mod/Path/Gui/DlgSettingsPathColor.h | 4 +- src/Mod/Path/Gui/PreCompiled.cpp | 4 +- src/Mod/Path/Gui/PreCompiled.h | 2 +- src/Mod/Path/Gui/TaskDlgPathCompound.cpp | 2 +- src/Mod/Path/Gui/TaskDlgPathCompound.h | 10 +- src/Mod/Path/Gui/ViewProviderArea.cpp | 2 +- src/Mod/Path/Gui/ViewProviderArea.h | 5 +- src/Mod/Path/Gui/ViewProviderPath.cpp | 18 +-- src/Mod/Path/Gui/ViewProviderPath.h | 10 +- src/Mod/Path/Gui/ViewProviderPathCompound.cpp | 2 +- src/Mod/Path/Gui/ViewProviderPathCompound.h | 4 +- src/Mod/Path/Gui/ViewProviderPathShape.cpp | 2 +- src/Mod/Path/Gui/ViewProviderPathShape.h | 6 +- src/Mod/Path/Init.py | 10 +- src/Mod/Path/InitGui.py | 4 +- src/Mod/Path/PathCommands.py | 5 +- src/Mod/Path/PathScripts/PathAdaptive.py | 14 +- src/Mod/Path/PathScripts/PathAdaptiveGui.py | 8 +- src/Mod/Path/PathScripts/PathAreaOp.py | 4 +- src/Mod/Path/PathScripts/PathArray.py | 2 - .../Path/PathScripts/PathCircularHoleBase.py | 2 - .../PathScripts/PathCircularHoleBaseGui.py | 4 +- src/Mod/Path/PathScripts/PathCollision.py | 4 +- src/Mod/Path/PathScripts/PathComment.py | 5 +- src/Mod/Path/PathScripts/PathCopy.py | 2 - src/Mod/Path/PathScripts/PathCustom.py | 1 - src/Mod/Path/PathScripts/PathCustomGui.py | 2 - src/Mod/Path/PathScripts/PathDeburr.py | 2 - src/Mod/Path/PathScripts/PathDeburrGui.py | 4 +- src/Mod/Path/PathScripts/PathDressup.py | 2 - .../Path/PathScripts/PathDressupAxisMap.py | 3 +- .../Path/PathScripts/PathDressupDogbone.py | 5 +- .../Path/PathScripts/PathDressupDragknife.py | 2 - .../PathScripts/PathDressupHoldingTags.py | 3 +- .../Path/PathScripts/PathDressupLeadInOut.py | 102 ++++++------ .../PathScripts/PathDressupPathBoundary.py | 12 +- .../PathScripts/PathDressupPathBoundaryGui.py | 3 +- .../Path/PathScripts/PathDressupRampEntry.py | 3 +- src/Mod/Path/PathScripts/PathDressupTag.py | 3 +- src/Mod/Path/PathScripts/PathDressupTagGui.py | 3 +- .../PathScripts/PathDressupTagPreferences.py | 2 - .../Path/PathScripts/PathDressupZCorrect.py | 4 +- src/Mod/Path/PathScripts/PathDrilling.py | 8 +- src/Mod/Path/PathScripts/PathDrillingGui.py | 18 +-- src/Mod/Path/PathScripts/PathEngrave.py | 4 +- src/Mod/Path/PathScripts/PathEngraveBase.py | 2 - src/Mod/Path/PathScripts/PathEngraveGui.py | 4 +- src/Mod/Path/PathScripts/PathFixture.py | 2 +- src/Mod/Path/PathScripts/PathGeom.py | 4 +- src/Mod/Path/PathScripts/PathGetPoint.py | 4 +- src/Mod/Path/PathScripts/PathGui.py | 4 +- src/Mod/Path/PathScripts/PathGuiInit.py | 2 - src/Mod/Path/PathScripts/PathHelix.py | 4 +- src/Mod/Path/PathScripts/PathHelixGui.py | 2 - src/Mod/Path/PathScripts/PathHop.py | 2 - .../Path/PathScripts/PathIconViewProvider.py | 4 +- src/Mod/Path/PathScripts/PathInspect.py | 13 +- src/Mod/Path/PathScripts/PathJob.py | 2 - src/Mod/Path/PathScripts/PathJobCmd.py | 5 +- src/Mod/Path/PathScripts/PathJobDlg.py | 2 - src/Mod/Path/PathScripts/PathJobGui.py | 2 - src/Mod/Path/PathScripts/PathLog.py | 2 - src/Mod/Path/PathScripts/PathMillFace.py | 4 +- src/Mod/Path/PathScripts/PathMillFaceGui.py | 4 +- src/Mod/Path/PathScripts/PathOp.py | 4 +- src/Mod/Path/PathScripts/PathOpGui.py | 8 +- src/Mod/Path/PathScripts/PathOpTools.py | 6 +- src/Mod/Path/PathScripts/PathPlane.py | 3 +- src/Mod/Path/PathScripts/PathPocket.py | 4 +- src/Mod/Path/PathScripts/PathPocketBase.py | 4 +- src/Mod/Path/PathScripts/PathPocketBaseGui.py | 4 +- src/Mod/Path/PathScripts/PathPocketGui.py | 4 +- src/Mod/Path/PathScripts/PathPocketShape.py | 8 +- .../Path/PathScripts/PathPocketShapeGui.py | 4 +- src/Mod/Path/PathScripts/PathPost.py | 3 +- src/Mod/Path/PathScripts/PathPostProcessor.py | 2 - src/Mod/Path/PathScripts/PathPreferences.py | 12 +- .../PathScripts/PathPreferencesPathDressup.py | 2 - .../PathScripts/PathPreferencesPathJob.py | 4 +- src/Mod/Path/PathScripts/PathProbe.py | 2 - src/Mod/Path/PathScripts/PathProbeGui.py | 2 - src/Mod/Path/PathScripts/PathProfile.py | 4 +- .../Path/PathScripts/PathProfileContour.py | 4 +- .../Path/PathScripts/PathProfileContourGui.py | 6 +- src/Mod/Path/PathScripts/PathProfileEdges.py | 4 +- .../Path/PathScripts/PathProfileEdgesGui.py | 6 +- src/Mod/Path/PathScripts/PathProfileFaces.py | 4 +- .../Path/PathScripts/PathProfileFacesGui.py | 6 +- src/Mod/Path/PathScripts/PathProfileGui.py | 2 - src/Mod/Path/PathScripts/PathSanity.py | 2 +- src/Mod/Path/PathScripts/PathSelection.py | 3 +- src/Mod/Path/PathScripts/PathSetupSheet.py | 12 +- src/Mod/Path/PathScripts/PathSetupSheetGui.py | 4 +- .../PathScripts/PathSetupSheetOpPrototype.py | 4 +- .../PathSetupSheetOpPrototypeGui.py | 4 +- src/Mod/Path/PathScripts/PathSimpleCopy.py | 1 - src/Mod/Path/PathScripts/PathSimulatorGui.py | 22 +++ src/Mod/Path/PathScripts/PathSlot.py | 2 - src/Mod/Path/PathScripts/PathSlotGui.py | 2 - src/Mod/Path/PathScripts/PathStock.py | 6 +- src/Mod/Path/PathScripts/PathStop.py | 4 +- src/Mod/Path/PathScripts/PathSurface.py | 4 +- src/Mod/Path/PathScripts/PathSurfaceGui.py | 4 +- .../Path/PathScripts/PathSurfaceSupport.py | 2 - src/Mod/Path/PathScripts/PathToolBit.py | 4 +- src/Mod/Path/PathScripts/PathToolBitCmd.py | 2 - src/Mod/Path/PathScripts/PathToolBitEdit.py | 2 - src/Mod/Path/PathScripts/PathToolBitGui.py | 4 +- .../Path/PathScripts/PathToolBitLibraryCmd.py | 2 - .../Path/PathScripts/PathToolBitLibraryGui.py | 2 - .../Path/PathScripts/PathToolController.py | 5 +- .../Path/PathScripts/PathToolControllerGui.py | 2 - src/Mod/Path/PathScripts/PathToolEdit.py | 2 - .../Path/PathScripts/PathToolLibraryEditor.py | 38 +++-- .../PathScripts/PathToolLibraryManager.py | 30 ++-- src/Mod/Path/PathScripts/PathUtil.py | 2 - src/Mod/Path/PathScripts/PathUtils.py | 2 - src/Mod/Path/PathScripts/PathUtilsGui.py | 2 - src/Mod/Path/PathScripts/PathVcarve.py | 1 - src/Mod/Path/PathScripts/PathVcarveGui.py | 1 - src/Mod/Path/PathScripts/PathWaterline.py | 1 - src/Mod/Path/PathScripts/PathWaterlineGui.py | 1 - src/Mod/Path/PathScripts/PostUtils.py | 15 +- .../Path/PathScripts/post/centroid_post.py | 6 +- .../Path/PathScripts/post/comparams_post.py | 5 +- src/Mod/Path/PathScripts/post/dumper_post.py | 5 +- .../Path/PathScripts/post/dynapath_post.py | 2 +- src/Mod/Path/PathScripts/post/example_post.py | 5 +- src/Mod/Path/PathScripts/post/example_pre.py | 4 +- src/Mod/Path/PathScripts/post/fablin_post.py | 8 +- src/Mod/Path/PathScripts/post/gcode_pre.py | 2 +- src/Mod/Path/PathScripts/post/grbl_post.py | 39 +++-- .../Path/PathScripts/post/heidenhain_post.py | 146 +++++++++--------- src/Mod/Path/PathScripts/post/jtech_post.py | 5 +- .../Path/PathScripts/post/linuxcnc_post.py | 5 +- .../Path/PathScripts/post/mach3_mach4_post.py | 18 +-- src/Mod/Path/PathScripts/post/opensbp_post.py | 12 +- src/Mod/Path/PathScripts/post/opensbp_pre.py | 5 +- src/Mod/Path/PathScripts/post/philips_post.py | 4 +- src/Mod/Path/PathScripts/post/rml_post.py | 4 +- src/Mod/Path/PathScripts/post/slic3r_pre.py | 4 +- .../Path/PathScripts/post/smoothie_post.py | 5 +- .../PathSimulator/App/AppPathSimulator.cpp | 2 +- src/Mod/Path/PathSimulator/App/PathSim.cpp | 5 +- src/Mod/Path/PathSimulator/App/PathSim.h | 8 +- .../Path/PathSimulator/App/PathSimPyImp.cpp | 8 +- .../Path/PathSimulator/App/PreCompiled.cpp | 4 +- src/Mod/Path/PathSimulator/App/PreCompiled.h | 2 +- src/Mod/Path/PathSimulator/App/VolSim.cpp | 20 +-- src/Mod/Path/PathSimulator/App/VolSim.h | 10 +- src/Mod/Path/PathTests/PathTestUtils.py | 2 - src/Mod/Path/PathTests/TestPathCore.py | 2 - src/Mod/Path/PathTests/TestPathDeburr.py | 2 - src/Mod/Path/PathTests/TestPathDepthParams.py | 2 - .../Path/PathTests/TestPathDressupDogbone.py | 2 - .../PathTests/TestPathDressupHoldingTags.py | 2 - src/Mod/Path/PathTests/TestPathGeom.py | 2 - src/Mod/Path/PathTests/TestPathHelix.py | 2 - src/Mod/Path/PathTests/TestPathLog.py | 2 - src/Mod/Path/PathTests/TestPathOpTools.py | 4 +- src/Mod/Path/PathTests/TestPathPost.py | 2 - src/Mod/Path/PathTests/TestPathPreferences.py | 2 - src/Mod/Path/PathTests/TestPathSetupSheet.py | 4 +- src/Mod/Path/PathTests/TestPathStock.py | 2 - src/Mod/Path/PathTests/TestPathTool.py | 2 - src/Mod/Path/PathTests/TestPathToolBit.py | 2 - .../Path/PathTests/TestPathToolController.py | 2 - src/Mod/Path/PathTests/TestPathTooltable.py | 2 - src/Mod/Path/PathTests/TestPathUtil.py | 2 - src/Mod/Path/PathTests/TestPathVoronoi.py | 2 - src/Mod/Path/TestPathApp.py | 2 - src/Mod/Path/libarea/Adaptive.cpp | 3 +- src/Mod/Path/libarea/Adaptive.hpp | 3 +- src/Mod/Path/path.dox | 2 +- src/Mod/Path/utils/path-lint.sh | 2 - 231 files changed, 545 insertions(+), 743 deletions(-) diff --git a/src/Mod/Path/App/AppPath.cpp b/src/Mod/Path/App/AppPath.cpp index 2e984c576983..a02fa9d55254 100644 --- a/src/Mod/Path/App/AppPath.cpp +++ b/src/Mod/Path/App/AppPath.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/AppPathPy.cpp b/src/Mod/Path/App/AppPathPy.cpp index 72a496df8d83..a003f09be6fe 100644 --- a/src/Mod/Path/App/AppPathPy.cpp +++ b/src/Mod/Path/App/AppPathPy.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * @@ -93,12 +93,12 @@ catch(const char *e) \ { \ PyErr_SetString(Base::BaseExceptionFreeCADError,e); \ - } throw Py::Exception(); + } throw Py::Exception(); namespace Path { class Module : public Py::ExtensionModule { - + public: Module() : Py::ExtensionModule("Path") @@ -124,7 +124,7 @@ class Module : public Py::ExtensionModule PARAM_PY_DOC(ARG, AREA_PARAMS_PATH) ); add_keyword_method("sortWires",&Module::sortWires, - "sortWires(shapes, start=Vector(), " + "sortWires(shapes, start=Vector(), " PARAM_PY_ARGS_DOC(ARG,AREA_PARAMS_ARC_PLANE) PARAM_PY_ARGS_DOC(ARG,AREA_PARAMS_SORT) ")\n" "\nReturns (wires,end), where 'wires' is sorted across Z value and with optimized travel distance,\n" @@ -151,12 +151,12 @@ class Module : public Py::ExtensionModule std::string EncodedName = std::string(Name); PyMem_Free(Name); Base::FileInfo file(EncodedName.c_str()); - + if (PyObject_TypeCheck(pObj, &(App::DocumentObjectPy::Type))) { App::DocumentObject* obj = static_cast(pObj)->getDocumentObjectPtr(); if (obj->getTypeId().isDerivedFrom(Base::Type::fromName("Path::Feature"))) { const Toolpath& path = static_cast(obj)->Path.getValue(); - std::string gcode = path.toGCode(); + std::string gcode = path.toGCode(); std::ofstream ofile(EncodedName.c_str()); ofile << gcode; ofile.close(); @@ -188,7 +188,7 @@ class Module : public Py::ExtensionModule pcDoc = App::GetApplication().getDocument(DocName); else pcDoc = App::GetApplication().getActiveDocument(); - if (!pcDoc) + if (!pcDoc) pcDoc = App::GetApplication().newDocument(DocName); try { @@ -257,7 +257,7 @@ class Module : public Py::ExtensionModule Path::Toolpath result; bool first = true; Base::Placement last; - + TopExp_Explorer ExpEdges (shape,TopAbs_EDGE); while (ExpEdges.More()) { const TopoDS_Edge& edge = TopoDS::Edge(ExpEdges.Current()); @@ -283,7 +283,7 @@ class Module : public Py::ExtensionModule else { Path::Command cmd; cmd.setFromPlacement(tpl); - + // write arc data if needed BRepAdaptor_Curve adapt(edge); if (adapt.GetType() == GeomAbs_Circle) { @@ -327,8 +327,8 @@ class Module : public Py::ExtensionModule PyObject *return_end=Py_False; static char* kwd_list[] = {"shapes", "start", "return_end", PARAM_FIELD_STRINGS(ARG,AREA_PARAMS_PATH), NULL}; - if (!PyArg_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), - "O|O!O" PARAM_PY_KWDS(AREA_PARAMS_PATH), + if (!PyArg_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), + "O|O!O" PARAM_PY_KWDS(AREA_PARAMS_PATH), kwd_list, &pShapes, &(Base::VectorPy::Type), &start, &return_end, PARAM_REF(PARAM_FARG,AREA_PARAMS_PATH))) throw Py::Exception(); @@ -337,7 +337,7 @@ class Module : public Py::ExtensionModule if (PyObject_TypeCheck(pShapes, &(Part::TopoShapePy::Type))) shapes.push_back(static_cast(pShapes)->getTopoShapePtr()->getShape()); else if (PyObject_TypeCheck(pShapes, &(PyList_Type)) || - PyObject_TypeCheck(pShapes, &(PyTuple_Type))) + PyObject_TypeCheck(pShapes, &(PyTuple_Type))) { Py::Sequence shapeSeq(pShapes); for (Py::Sequence::iterator it = shapeSeq.begin(); it != shapeSeq.end(); ++it) { @@ -376,14 +376,14 @@ class Module : public Py::ExtensionModule PARAM_PY_DECLARE_INIT(PARAM_FARG,AREA_PARAMS_SORT) PyObject *pShapes=NULL; PyObject *start=NULL; - static char* kwd_list[] = {"shapes", "start", - PARAM_FIELD_STRINGS(ARG,AREA_PARAMS_ARC_PLANE), + static char* kwd_list[] = {"shapes", "start", + PARAM_FIELD_STRINGS(ARG,AREA_PARAMS_ARC_PLANE), PARAM_FIELD_STRINGS(ARG,AREA_PARAMS_SORT), NULL}; - if (!PyArg_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), - "O|O!" - PARAM_PY_KWDS(AREA_PARAMS_ARC_PLANE) + if (!PyArg_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), + "O|O!" + PARAM_PY_KWDS(AREA_PARAMS_ARC_PLANE) PARAM_PY_KWDS(AREA_PARAMS_SORT), - kwd_list, &pShapes, &(Base::VectorPy::Type), &start, + kwd_list, &pShapes, &(Base::VectorPy::Type), &start, PARAM_REF(PARAM_FARG,AREA_PARAMS_ARC_PLANE), PARAM_REF(PARAM_FARG,AREA_PARAMS_SORT))) throw Py::Exception(); @@ -409,7 +409,7 @@ class Module : public Py::ExtensionModule Base::Vector3d vec = static_cast(start)->value(); pstart.SetCoord(vec.x, vec.y, vec.z); } - + try { bool need_arc_plane = arc_plane==Area::ArcPlaneAuto; std::list wires = Area::sortWires(shapes,start!=0,&pstart, diff --git a/src/Mod/Path/App/Area.cpp b/src/Mod/Path/App/Area.cpp index 4f3e8f0567f5..0f80a7094d08 100644 --- a/src/Mod/Path/App/Area.cpp +++ b/src/Mod/Path/App/Area.cpp @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2017 Zheng, Lei (realthunder) * + * Copyright (c) 2017 Zheng Lei (realthunder) * * * * This file is part of the FreeCAD CAx development system. * * * @@ -19,6 +19,8 @@ * Suite 330, Boston, MA 02111-1307, USA * * * ****************************************************************************/ + + #include "PreCompiled.h" // From Boost 1.75 on the geometry component requires C++14 @@ -3209,7 +3211,7 @@ void Area::toPath(Toolpath &path, const std::list &shapes, wires = sortWires(shapes,_pstart!=0,&pstart,pend,&stepdown_hint, PARAM_REF(PARAM_FARG,AREA_PARAMS_ARC_PLANE), PARAM_FIELDS(PARAM_FARG,AREA_PARAMS_SORT)); - + if (wires.size() == 0) return; diff --git a/src/Mod/Path/App/Area.h b/src/Mod/Path/App/Area.h index 4a472bcba8c8..4a44c27afe31 100644 --- a/src/Mod/Path/App/Area.h +++ b/src/Mod/Path/App/Area.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2017 Zheng, Lei (realthunder) * + * Copyright (c) 2017 Zheng Lei (realthunder) * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/AreaParams.h b/src/Mod/Path/App/AreaParams.h index dcb0e69a296a..43eaec676c5c 100644 --- a/src/Mod/Path/App/AreaParams.h +++ b/src/Mod/Path/App/AreaParams.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2017 Zheng, Lei (realthunder) * + * Copyright (c) 2017 Zheng Lei (realthunder) * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/AreaPyImp.cpp b/src/Mod/Path/App/AreaPyImp.cpp index 5f73d4564854..db6e0b5e5438 100644 --- a/src/Mod/Path/App/AreaPyImp.cpp +++ b/src/Mod/Path/App/AreaPyImp.cpp @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2017 Zheng, Lei (realthunder) * + * Copyright (c) 2017 Zheng Lei (realthunder) * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/Command.cpp b/src/Mod/Path/App/Command.cpp index 421bd6b3d02b..a81d3f010cfd 100644 --- a/src/Mod/Path/App/Command.cpp +++ b/src/Mod/Path/App/Command.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/Command.h b/src/Mod/Path/App/Command.h index 2e530355bcc1..323e41923bb8 100644 --- a/src/Mod/Path/App/Command.h +++ b/src/Mod/Path/App/Command.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/CommandPyImp.cpp b/src/Mod/Path/App/CommandPyImp.cpp index 9d6fa5068795..98dc904264a4 100644 --- a/src/Mod/Path/App/CommandPyImp.cpp +++ b/src/Mod/Path/App/CommandPyImp.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/FeatureArea.cpp b/src/Mod/Path/App/FeatureArea.cpp index 79b30b0c612b..02782d0b0880 100644 --- a/src/Mod/Path/App/FeatureArea.cpp +++ b/src/Mod/Path/App/FeatureArea.cpp @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2017 Zheng, Lei (realthunder) * + * Copyright (c) 2017 Zheng Lei (realthunder) * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/FeatureArea.h b/src/Mod/Path/App/FeatureArea.h index 60c54438c0f6..8ff370217df5 100644 --- a/src/Mod/Path/App/FeatureArea.h +++ b/src/Mod/Path/App/FeatureArea.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2017 Zheng, Lei (realthunder) * + * Copyright (c) 2017 Zheng Lei (realthunder) * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/FeatureAreaPyImp.cpp b/src/Mod/Path/App/FeatureAreaPyImp.cpp index 4e7765b9b54d..89f7b80b0d30 100644 --- a/src/Mod/Path/App/FeatureAreaPyImp.cpp +++ b/src/Mod/Path/App/FeatureAreaPyImp.cpp @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2017 Zheng, Lei (realthunder) * + * Copyright (c) 2017 Zheng Lei (realthunder) * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/FeaturePath.cpp b/src/Mod/Path/App/FeaturePath.cpp index 171c0984ddbf..55cdc02c962a 100644 --- a/src/Mod/Path/App/FeaturePath.cpp +++ b/src/Mod/Path/App/FeaturePath.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/FeaturePath.h b/src/Mod/Path/App/FeaturePath.h index e8b8e89eaa20..b3356c1381da 100644 --- a/src/Mod/Path/App/FeaturePath.h +++ b/src/Mod/Path/App/FeaturePath.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/FeaturePathCompound.cpp b/src/Mod/Path/App/FeaturePathCompound.cpp index 957742da3d79..1ef41a24c84b 100644 --- a/src/Mod/Path/App/FeaturePathCompound.cpp +++ b/src/Mod/Path/App/FeaturePathCompound.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/FeaturePathCompound.h b/src/Mod/Path/App/FeaturePathCompound.h index 3e93daf7d2dd..87d41466c17c 100644 --- a/src/Mod/Path/App/FeaturePathCompound.h +++ b/src/Mod/Path/App/FeaturePathCompound.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/FeaturePathShape.cpp b/src/Mod/Path/App/FeaturePathShape.cpp index 906b237c05c5..260158741ec8 100644 --- a/src/Mod/Path/App/FeaturePathShape.cpp +++ b/src/Mod/Path/App/FeaturePathShape.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/FeaturePathShape.h b/src/Mod/Path/App/FeaturePathShape.h index edb4169d8cce..4ee41d607bd6 100644 --- a/src/Mod/Path/App/FeaturePathShape.h +++ b/src/Mod/Path/App/FeaturePathShape.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/ParamsHelper.h b/src/Mod/Path/App/ParamsHelper.h index 37ac4dbf1f1f..88c5d9947cf1 100644 --- a/src/Mod/Path/App/ParamsHelper.h +++ b/src/Mod/Path/App/ParamsHelper.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2017 Zheng, Lei (realthunder) * + * Copyright (c) 2017 Zheng Lei (realthunder) * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/Path.cpp b/src/Mod/Path/App/Path.cpp index 6287ec76a28f..12b0119e56d4 100644 --- a/src/Mod/Path/App/Path.cpp +++ b/src/Mod/Path/App/Path.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/Path.h b/src/Mod/Path/App/Path.h index 837d2305660d..b93760204841 100644 --- a/src/Mod/Path/App/Path.h +++ b/src/Mod/Path/App/Path.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/PathPyImp.cpp b/src/Mod/Path/App/PathPyImp.cpp index f0597b5d5041..263fccbb2307 100644 --- a/src/Mod/Path/App/PathPyImp.cpp +++ b/src/Mod/Path/App/PathPyImp.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * @@ -50,7 +50,7 @@ std::string PathPy::representation(void) const PyObject *PathPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of PathPy and the Twin object + // create a new instance of PathPy and the Twin object return new PathPy(new Toolpath); } @@ -68,7 +68,7 @@ int PathPy::PyInit(PyObject* args, PyObject* /*kwd*/) getToolpathPtr()->addCommand(cmd); } else { PyErr_SetString(PyExc_TypeError, "The list must contain only Path Commands"); - return -1; + return -1; } } } @@ -80,7 +80,7 @@ int PathPy::PyInit(PyObject* args, PyObject* /*kwd*/) return 0; } PyErr_SetString(PyExc_TypeError, "Argument must be a list of commands or a gcode string"); - return -1; + return -1; } @@ -234,7 +234,7 @@ PyObject *PathPy::getCustomAttributes(const char* /*attr*/) const int PathPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Path/App/PathSegmentWalker.cpp b/src/Mod/Path/App/PathSegmentWalker.cpp index 284cc1c49ab9..545ca246e7ad 100644 --- a/src/Mod/Path/App/PathSegmentWalker.cpp +++ b/src/Mod/Path/App/PathSegmentWalker.cpp @@ -1,6 +1,4 @@ -/* - *************************************************************************** - * * +/*************************************************************************** * Copyright (c) 2019 sliptonic * * * * This program is free software; you can redistribute it and/or modify * @@ -19,8 +17,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * * USA * * * - *************************************************************************** - */ + ***************************************************************************/ + + #include "PreCompiled.h" #include "PathSegmentWalker.h" @@ -53,7 +52,7 @@ Base::Vector3d compensateRotation(const Base::Vector3d &pt, const Base::Rotation Base::Rotation yawPitchRoll(double a, double b, double c) { - Base::Rotation rot; + Base::Rotation rot; rot.setYawPitchRoll(-c, -b, -a); return rot; } diff --git a/src/Mod/Path/App/PathSegmentWalker.h b/src/Mod/Path/App/PathSegmentWalker.h index 2272d31945e7..4bc4c4e4f499 100644 --- a/src/Mod/Path/App/PathSegmentWalker.h +++ b/src/Mod/Path/App/PathSegmentWalker.h @@ -1,6 +1,4 @@ -/* - *************************************************************************** - * * +/*************************************************************************** * Copyright (c) 2019 sliptonic * * * * This program is free software; you can redistribute it and/or modify * @@ -19,8 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * * USA * * * - *************************************************************************** - */ + ***************************************************************************/ #ifndef PATHSEGMENTWALKER_H #define PATHSEGMENTWALKER_H diff --git a/src/Mod/Path/App/PreCompiled.cpp b/src/Mod/Path/App/PreCompiled.cpp index aaf58a308618..d2fde1ef7a13 100644 --- a/src/Mod/Path/App/PreCompiled.cpp +++ b/src/Mod/Path/App/PreCompiled.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * @@ -21,4 +21,4 @@ ***************************************************************************/ -#include "PreCompiled.h" +#include "PreCompiled.h" diff --git a/src/Mod/Path/App/PreCompiled.h b/src/Mod/Path/App/PreCompiled.h index 0de9902d9eb3..d5a77f42f257 100644 --- a/src/Mod/Path/App/PreCompiled.h +++ b/src/Mod/Path/App/PreCompiled.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/PropertyPath.cpp b/src/Mod/Path/App/PropertyPath.cpp index 1f99071844fb..1569cb2f0739 100644 --- a/src/Mod/Path/App/PropertyPath.cpp +++ b/src/Mod/Path/App/PropertyPath.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * @@ -60,7 +60,7 @@ void PropertyPath::setValue(const Toolpath& pa) } -const Toolpath &PropertyPath::getValue(void)const +const Toolpath &PropertyPath::getValue(void)const { return _Path; } @@ -87,7 +87,7 @@ App::Property *PropertyPath::Copy(void) const { PropertyPath *prop = new PropertyPath(); prop->_Path = this->_Path; - + return prop; } diff --git a/src/Mod/Path/App/PropertyPath.h b/src/Mod/Path/App/PropertyPath.h index 4318446b45eb..fea20332a256 100644 --- a/src/Mod/Path/App/PropertyPath.h +++ b/src/Mod/Path/App/PropertyPath.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/PropertyTool.cpp b/src/Mod/Path/App/PropertyTool.cpp index 5c42e7cbc74f..1083866f14d2 100644 --- a/src/Mod/Path/App/PropertyTool.cpp +++ b/src/Mod/Path/App/PropertyTool.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * @@ -58,7 +58,7 @@ void PropertyTool::setValue(const Tool& tt) } -const Tool &PropertyTool::getValue(void)const +const Tool &PropertyTool::getValue(void)const { return _Tool; } @@ -85,7 +85,7 @@ App::Property *PropertyTool::Copy(void) const { PropertyTool *prop = new PropertyTool(); prop->_Tool = this->_Tool; - + return prop; } diff --git a/src/Mod/Path/App/PropertyTool.h b/src/Mod/Path/App/PropertyTool.h index a209086e9a30..d4fc146d65d3 100644 --- a/src/Mod/Path/App/PropertyTool.h +++ b/src/Mod/Path/App/PropertyTool.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/PropertyTooltable.cpp b/src/Mod/Path/App/PropertyTooltable.cpp index c33d932848c5..26d19d001666 100644 --- a/src/Mod/Path/App/PropertyTooltable.cpp +++ b/src/Mod/Path/App/PropertyTooltable.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * @@ -58,7 +58,7 @@ void PropertyTooltable::setValue(const Tooltable& tt) } -const Tooltable &PropertyTooltable::getValue(void)const +const Tooltable &PropertyTooltable::getValue(void)const { return _Tooltable; } @@ -85,7 +85,7 @@ App::Property *PropertyTooltable::Copy(void) const { PropertyTooltable *prop = new PropertyTooltable(); prop->_Tooltable = this->_Tooltable; - + return prop; } diff --git a/src/Mod/Path/App/PropertyTooltable.h b/src/Mod/Path/App/PropertyTooltable.h index 3953ca573d99..78267ce46f7f 100644 --- a/src/Mod/Path/App/PropertyTooltable.h +++ b/src/Mod/Path/App/PropertyTooltable.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/Tool.cpp b/src/Mod/Path/App/Tool.cpp index 9badd5924b11..7705c3780ba4 100644 --- a/src/Mod/Path/App/Tool.cpp +++ b/src/Mod/Path/App/Tool.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/Tool.h b/src/Mod/Path/App/Tool.h index 7cceac3e2ee1..01b3b73712a8 100644 --- a/src/Mod/Path/App/Tool.h +++ b/src/Mod/Path/App/Tool.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/ToolPyImp.cpp b/src/Mod/Path/App/ToolPyImp.cpp index 7e12bee4855c..771449a8ebc4 100644 --- a/src/Mod/Path/App/ToolPyImp.cpp +++ b/src/Mod/Path/App/ToolPyImp.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/Tooltable.cpp b/src/Mod/Path/App/Tooltable.cpp index 2ae50f2fef2e..bc2c7e592b23 100644 --- a/src/Mod/Path/App/Tooltable.cpp +++ b/src/Mod/Path/App/Tooltable.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/Tooltable.h b/src/Mod/Path/App/Tooltable.h index 28b69ece710a..104aafde0a5c 100644 --- a/src/Mod/Path/App/Tooltable.h +++ b/src/Mod/Path/App/Tooltable.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/TooltablePyImp.cpp b/src/Mod/Path/App/TooltablePyImp.cpp index 4b2118d2dba2..1e517f50a2a4 100644 --- a/src/Mod/Path/App/TooltablePyImp.cpp +++ b/src/Mod/Path/App/TooltablePyImp.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * @@ -237,7 +237,7 @@ int TooltablePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) return 0; } -Py::Int TooltablePy::getVersion(void) const +Py::Int TooltablePy::getVersion(void) const { return Py::Int(getTooltablePtr()->Version); } diff --git a/src/Mod/Path/App/Voronoi.cpp b/src/Mod/Path/App/Voronoi.cpp index ce8c36a5cf64..7d34e99f894d 100644 --- a/src/Mod/Path/App/Voronoi.cpp +++ b/src/Mod/Path/App/Voronoi.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) sliptonic (shopinthewoods@gmail.com) 2020 * + * Copyright (c) 2020 sliptonic * * * * This file is part of the FreeCAD CAx development system. * * * @@ -264,7 +264,7 @@ bool Voronoi::diagram_type::segmentsAreConnected(int i, int j) const { } void Voronoi::colorColinear(Voronoi::color_type color, double degree) { - double rad = degree * M_PI / 180; + double rad = degree * M_PI / 180; Voronoi::diagram_type::angle_map_t angle; int psize = vd->points.size(); diff --git a/src/Mod/Path/App/Voronoi.h b/src/Mod/Path/App/Voronoi.h index d30651fbb188..8de08167d82c 100644 --- a/src/Mod/Path/App/Voronoi.h +++ b/src/Mod/Path/App/Voronoi.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) sliptonic (shopinthewoods@gmail.com) 2020 * + * Copyright (c) 2020 sliptonic * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/VoronoiCell.cpp b/src/Mod/Path/App/VoronoiCell.cpp index 9fef6eca9b39..4788aac90701 100644 --- a/src/Mod/Path/App/VoronoiCell.cpp +++ b/src/Mod/Path/App/VoronoiCell.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) sliptonic (shopinthewoods@gmail.com) 2020 * + * Copyright (c) 2020 sliptonic * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/VoronoiCell.h b/src/Mod/Path/App/VoronoiCell.h index 743538c71c8e..0a8db1206912 100644 --- a/src/Mod/Path/App/VoronoiCell.h +++ b/src/Mod/Path/App/VoronoiCell.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) sliptonic (shopinthewoods@gmail.com) 2020 * + * Copyright (c) 2020 sliptonic * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/VoronoiCellPyImp.cpp b/src/Mod/Path/App/VoronoiCellPyImp.cpp index f64b722a2402..4f1f86f4998f 100644 --- a/src/Mod/Path/App/VoronoiCellPyImp.cpp +++ b/src/Mod/Path/App/VoronoiCellPyImp.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) sliptonic (shopinthewoods@gmail.com) 2020 * + * Copyright (c) 2020 sliptonic * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/VoronoiEdge.cpp b/src/Mod/Path/App/VoronoiEdge.cpp index a0649d7af387..050260cbb747 100644 --- a/src/Mod/Path/App/VoronoiEdge.cpp +++ b/src/Mod/Path/App/VoronoiEdge.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) sliptonic (shopinthewoods@gmail.com) 2020 * + * Copyright (c) 2020 sliptonic * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/VoronoiEdge.h b/src/Mod/Path/App/VoronoiEdge.h index 756d7c65423a..7be172d85db3 100644 --- a/src/Mod/Path/App/VoronoiEdge.h +++ b/src/Mod/Path/App/VoronoiEdge.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) sliptonic (shopinthewoods@gmail.com) 2020 * + * Copyright (c) 2020 sliptonic * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/VoronoiEdgePyImp.cpp b/src/Mod/Path/App/VoronoiEdgePyImp.cpp index 112634e895be..158616b8a2b7 100644 --- a/src/Mod/Path/App/VoronoiEdgePyImp.cpp +++ b/src/Mod/Path/App/VoronoiEdgePyImp.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) sliptonic (shopinthewoods@gmail.com) 2020 * + * Copyright (c) 2020 sliptonic * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/VoronoiPyImp.cpp b/src/Mod/Path/App/VoronoiPyImp.cpp index ed898be26510..b3853bea09b8 100644 --- a/src/Mod/Path/App/VoronoiPyImp.cpp +++ b/src/Mod/Path/App/VoronoiPyImp.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) sliptonic (shopinthewoods@gmail.com) 2020 * + * Copyright (c) 2020 sliptonic * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/VoronoiVertex.cpp b/src/Mod/Path/App/VoronoiVertex.cpp index c91935b5caee..543e6d66725d 100644 --- a/src/Mod/Path/App/VoronoiVertex.cpp +++ b/src/Mod/Path/App/VoronoiVertex.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) sliptonic (shopinthewoods@gmail.com) 2020 * + * Copyright (c) 2020 sliptonic * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/VoronoiVertex.h b/src/Mod/Path/App/VoronoiVertex.h index 9393f331cc79..eac6bd486c54 100644 --- a/src/Mod/Path/App/VoronoiVertex.h +++ b/src/Mod/Path/App/VoronoiVertex.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) sliptonic (shopinthewoods@gmail.com) 2020 * + * Copyright (c) 2020 sliptonic * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/App/VoronoiVertexPyImp.cpp b/src/Mod/Path/App/VoronoiVertexPyImp.cpp index 15d18f22badc..bc8da19d1319 100644 --- a/src/Mod/Path/App/VoronoiVertexPyImp.cpp +++ b/src/Mod/Path/App/VoronoiVertexPyImp.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) sliptonic (shopinthewoods@gmail.com) 2020 * + * Copyright (c) 2020 sliptonic * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/Gui/AppPathGui.cpp b/src/Mod/Path/Gui/AppPathGui.cpp index 97d8bef3a624..994d11df6cd7 100644 --- a/src/Mod/Path/Gui/AppPathGui.cpp +++ b/src/Mod/Path/Gui/AppPathGui.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * @@ -85,7 +85,7 @@ PyMOD_INIT_FUNC(PathGui) // add resources and reloads the translators loadPathResource(); - + // register preferences pages new Gui::PrefPageProducer ("Path"); diff --git a/src/Mod/Path/Gui/AppPathGuiPy.cpp b/src/Mod/Path/Gui/AppPathGuiPy.cpp index 95644d4f2f21..a442244b41ee 100644 --- a/src/Mod/Path/Gui/AppPathGuiPy.cpp +++ b/src/Mod/Path/Gui/AppPathGuiPy.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/Gui/Command.cpp b/src/Mod/Path/Gui/Command.cpp index 792e3837a1c7..4946305e2505 100644 --- a/src/Mod/Path/Gui/Command.cpp +++ b/src/Mod/Path/Gui/Command.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/Gui/DlgProcessorChooser.cpp b/src/Mod/Path/Gui/DlgProcessorChooser.cpp index 94465348c7b9..71a3080a4dd0 100644 --- a/src/Mod/Path/Gui/DlgProcessorChooser.cpp +++ b/src/Mod/Path/Gui/DlgProcessorChooser.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/Gui/DlgProcessorChooser.h b/src/Mod/Path/Gui/DlgProcessorChooser.h index 37213de7103b..7ba234350c03 100644 --- a/src/Mod/Path/Gui/DlgProcessorChooser.h +++ b/src/Mod/Path/Gui/DlgProcessorChooser.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/Gui/DlgSettingsPathColor.cpp b/src/Mod/Path/Gui/DlgSettingsPathColor.cpp index 6d5b1a8c9c35..d2db05acb2b4 100644 --- a/src/Mod/Path/Gui/DlgSettingsPathColor.cpp +++ b/src/Mod/Path/Gui/DlgSettingsPathColor.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/Gui/DlgSettingsPathColor.h b/src/Mod/Path/Gui/DlgSettingsPathColor.h index 616a3bbf7684..9bd1860531c1 100644 --- a/src/Mod/Path/Gui/DlgSettingsPathColor.h +++ b/src/Mod/Path/Gui/DlgSettingsPathColor.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * @@ -31,7 +31,7 @@ namespace PathGui { class Ui_DlgSettingsPathColor; class DlgSettingsPathColor : public Gui::Dialog::PreferencePage -{ +{ Q_OBJECT public: diff --git a/src/Mod/Path/Gui/PreCompiled.cpp b/src/Mod/Path/Gui/PreCompiled.cpp index 49f497ed276b..83f92c7f1272 100644 --- a/src/Mod/Path/Gui/PreCompiled.cpp +++ b/src/Mod/Path/Gui/PreCompiled.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * @@ -20,4 +20,4 @@ * * ***************************************************************************/ -#include "PreCompiled.h" +#include "PreCompiled.h" diff --git a/src/Mod/Path/Gui/PreCompiled.h b/src/Mod/Path/Gui/PreCompiled.h index 9aee385a3250..a273f291918d 100644 --- a/src/Mod/Path/Gui/PreCompiled.h +++ b/src/Mod/Path/Gui/PreCompiled.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/Gui/TaskDlgPathCompound.cpp b/src/Mod/Path/Gui/TaskDlgPathCompound.cpp index f097a1fd8c98..66d9d35bb36a 100644 --- a/src/Mod/Path/Gui/TaskDlgPathCompound.cpp +++ b/src/Mod/Path/Gui/TaskDlgPathCompound.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/Gui/TaskDlgPathCompound.h b/src/Mod/Path/Gui/TaskDlgPathCompound.h index 116aa6385d7a..703cf6339bb3 100644 --- a/src/Mod/Path/Gui/TaskDlgPathCompound.h +++ b/src/Mod/Path/Gui/TaskDlgPathCompound.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * @@ -43,12 +43,12 @@ class TaskWidgetPathCompound : public Gui::TaskView::TaskBox public: TaskWidgetPathCompound(ViewProviderPathCompound *CompoundView, QWidget *parent=0); ~TaskWidgetPathCompound(); - + std::vector getList(void) const; protected: void changeEvent(QEvent *e); - + private: QWidget* proxy; Ui_TaskDlgPathCompound* ui; @@ -72,10 +72,10 @@ class PathGuiExport TaskDlgPathCompound : public Gui::TaskView::TaskDialog virtual bool accept(); /// is called by the framework if the dialog is rejected (Cancel) virtual bool reject(); - /// is called by the framework if the user press the help button + /// is called by the framework if the user press the help button virtual void helpRequested(); - /// returns for Close and Help button + /// returns for Close and Help button virtual QDialogButtonBox::StandardButtons getStandardButtons(void) const { return QDialogButtonBox::Ok|QDialogButtonBox::Cancel; } diff --git a/src/Mod/Path/Gui/ViewProviderArea.cpp b/src/Mod/Path/Gui/ViewProviderArea.cpp index 7c382f6b5c4a..9044b745f2a5 100644 --- a/src/Mod/Path/Gui/ViewProviderArea.cpp +++ b/src/Mod/Path/Gui/ViewProviderArea.cpp @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2017 Zheng, Lei (realthunder) * + * Copyright (c) 2017 Zheng Lei (realthunder) * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/Gui/ViewProviderArea.h b/src/Mod/Path/Gui/ViewProviderArea.h index e4bf63762b30..7d0e295f9944 100644 --- a/src/Mod/Path/Gui/ViewProviderArea.h +++ b/src/Mod/Path/Gui/ViewProviderArea.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2017 Zheng, Lei (realthunder) * + * Copyright (c) 2017 Zheng Lei (realthunder) * * * * This file is part of the FreeCAD CAx development system. * * * @@ -20,7 +20,6 @@ * * ****************************************************************************/ - #ifndef PATH_ViewProviderArea_H #define PATH_ViewProviderArea_H @@ -38,7 +37,7 @@ class PathGuiExport ViewProviderArea : public PartGui::ViewProviderPlaneParametr ViewProviderArea(); virtual ~ViewProviderArea(); - /// grouping handling + /// grouping handling virtual std::vector claimChildren(void) const; virtual void updateData(const App::Property*); virtual bool onDelete(const std::vector &); diff --git a/src/Mod/Path/Gui/ViewProviderPath.cpp b/src/Mod/Path/Gui/ViewProviderPath.cpp index 2a828e8243c8..d3c12a8a45e5 100644 --- a/src/Mod/Path/Gui/ViewProviderPath.cpp +++ b/src/Mod/Path/Gui/ViewProviderPath.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * @@ -97,7 +97,7 @@ class PathSelectionObserver: public Gui::SelectionObserver { setArrow(); return; } - if(msg.Type!=Gui::SelectionChanges::SetPreselect + if(msg.Type!=Gui::SelectionChanges::SetPreselect && msg.Type!=Gui::SelectionChanges::MovePreselect) return; auto obj = msg.Object.getObject(); @@ -115,8 +115,8 @@ class PathSelectionObserver: public Gui::SelectionObserver { setArrow(); return; } - - if(vp->pt0Index >= 0) { + + if(vp->pt0Index >= 0) { mat *= linkMat; mat.inverse(); Base::Vector3d pt = mat*Base::Vector3d(msg.x,msg.y,msg.z); @@ -230,7 +230,7 @@ ViewProviderPath::ViewProviderPath() MarkerColor.touch(); DisplayMode.setStatus(App::Property::Status::Hidden, true); - + static const char *SelectionStyleEnum[] = {"Shape","BoundBox","None",0}; SelectionStyle.setEnums(SelectionStyleEnum); unsigned long sstyle = hGrp->GetInt("DefaultSelectionStyle",0); @@ -358,7 +358,7 @@ void ViewProviderPath::onChanged(const App::Property* prop) pcMatBind->value = SoMaterialBinding::PER_PART; // resizing and writing the color vector: - + int count = coordEnd-coordStart; if(count > (int)colorindex.size()-coordStart) count = colorindex.size()-coordStart; pcLineColor->diffuseColor.setNum(count); @@ -402,7 +402,7 @@ void ViewProviderPath::onChanged(const App::Property* prop) void ViewProviderPath::showBoundingBox(bool show) { if(show) { - if(!pcLineCoords->point.getNum()) + if(!pcLineCoords->point.getNum()) return; } inherited::showBoundingBox(show); @@ -602,7 +602,7 @@ class VisualPathSegmentVisitor void ViewProviderPath::updateVisual(bool rebuild) { hideSelection(); - + updateShowConstraints(); pcLines->coordIndex.deleteValues(0); @@ -632,7 +632,7 @@ void ViewProviderPath::updateVisual(bool rebuild) { pcLineCoords->point.setNum(points.size()); SbVec3f* verts = pcLineCoords->point.startEditing(); int i=0; - for(const auto &pt : points) + for(const auto &pt : points) verts[i++].setValue(pt.x,pt.y,pt.z); pcLineCoords->point.finishEditing(); diff --git a/src/Mod/Path/Gui/ViewProviderPath.h b/src/Mod/Path/Gui/ViewProviderPath.h index dcc8920e5d51..162ddfd1a035 100644 --- a/src/Mod/Path/Gui/ViewProviderPath.h +++ b/src/Mod/Path/Gui/ViewProviderPath.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * @@ -32,7 +32,7 @@ #include class SoCoordinate3; -class SoDrawStyle; +class SoDrawStyle; class SoMaterial; class SoBaseColor; class SoMaterialBinding; @@ -55,7 +55,7 @@ class PathGuiExport ViewProviderPath : public Gui::ViewProviderGeometryObject /// destructor. ~ViewProviderPath(); - + // Display properties App::PropertyInteger LineWidth; App::PropertyColor NormalColor; @@ -91,7 +91,7 @@ class PathGuiExport ViewProviderPath : public Gui::ViewProviderGeometryObject virtual void onChanged(const App::Property* prop); virtual unsigned long getBoundColor() const; - + SoCoordinate3 * pcLineCoords; SoCoordinate3 * pcMarkerCoords; SoDrawStyle * pcDrawStyle; @@ -116,7 +116,7 @@ class PathGuiExport ViewProviderPath : public Gui::ViewProviderGeometryObject int coordEnd; }; - + typedef Gui::ViewProviderPythonFeatureT ViewProviderPathPython; } //namespace PathGui diff --git a/src/Mod/Path/Gui/ViewProviderPathCompound.cpp b/src/Mod/Path/Gui/ViewProviderPathCompound.cpp index 3f4758a37194..9782e6fe5a09 100644 --- a/src/Mod/Path/Gui/ViewProviderPathCompound.cpp +++ b/src/Mod/Path/Gui/ViewProviderPathCompound.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/Gui/ViewProviderPathCompound.h b/src/Mod/Path/Gui/ViewProviderPathCompound.h index fdc090eb9fd6..044222092c3c 100644 --- a/src/Mod/Path/Gui/ViewProviderPathCompound.h +++ b/src/Mod/Path/Gui/ViewProviderPathCompound.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * @@ -34,7 +34,7 @@ class PathGuiExport ViewProviderPathCompound: public ViewProviderPath PROPERTY_HEADER(PathGui::ViewProviderPathCompound); public: - + std::vector claimChildren(void)const; virtual bool canDragObjects() const; virtual void dragObject(App::DocumentObject*); diff --git a/src/Mod/Path/Gui/ViewProviderPathShape.cpp b/src/Mod/Path/Gui/ViewProviderPathShape.cpp index 092752ab88e3..3b3b83d954fd 100644 --- a/src/Mod/Path/Gui/ViewProviderPathShape.cpp +++ b/src/Mod/Path/Gui/ViewProviderPathShape.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/Gui/ViewProviderPathShape.h b/src/Mod/Path/Gui/ViewProviderPathShape.h index 4cff6d6608ac..8e60a3b7d8f9 100644 --- a/src/Mod/Path/Gui/ViewProviderPathShape.h +++ b/src/Mod/Path/Gui/ViewProviderPathShape.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Yorik van Havre (yorik@uncreated.net) 2014 * + * Copyright (c) 2014 Yorik van Havre * * * * This file is part of the FreeCAD CAx development system. * * * @@ -35,7 +35,7 @@ class PathGuiExport ViewProviderPathShape: public ViewProviderPath public: - /// grouping handling + /// grouping handling virtual std::vector claimChildren(void) const; virtual void updateData(const App::Property*); virtual bool onDelete(const std::vector &); @@ -47,7 +47,7 @@ class PathGuiExport ViewProviderPathShape: public ViewProviderPath virtual bool canDropObjects() const; virtual bool canDropObject(App::DocumentObject*) const; virtual void dropObject(App::DocumentObject*); - + QIcon getIcon(void) const; }; diff --git a/src/Mod/Path/Init.py b/src/Mod/Path/Init.py index 0770370e209e..076cb16a4b99 100644 --- a/src/Mod/Path/Init.py +++ b/src/Mod/Path/Init.py @@ -1,5 +1,5 @@ #*************************************************************************** -#* (c) Yorik van Havre (yorik@uncreated.net) 2014 * +#* Copyright (c) 2014 Yorik van Havre * #* * #* This file is part of the FreeCAD CAx development system. * #* * @@ -10,17 +10,17 @@ #* for detail see the LICENCE text file. * #* * #* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * +#* but WITHOUT ANY WARRANTY; without even the implied warranty of * #* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * #* GNU Lesser General Public License for more details. * #* * #* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * +#* License along with FreeCAD; if not, write to the Free Software * #* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * #* USA * #* * -#***************************************************************************/ - +#*************************************************************************** + # Get the Parameter Group of this module ParGrp = App.ParamGet("System parameter:Modules").GetGroup("Path") diff --git a/src/Mod/Path/InitGui.py b/src/Mod/Path/InitGui.py index 86678e97fdd9..f40ff06ee6ff 100644 --- a/src/Mod/Path/InitGui.py +++ b/src/Mod/Path/InitGui.py @@ -1,5 +1,5 @@ # *************************************************************************** -# * (c) Yorik van Havre (yorik@uncreated.net) 2014 * +# * Copyright (c) 2014 Yorik van Havre * # * * # * This file is part of the FreeCAD CAx development system. * # * * @@ -19,7 +19,7 @@ # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * # * USA * # * * -# ***************************************************************************/ +# *************************************************************************** class PathCommandGroup: diff --git a/src/Mod/Path/PathCommands.py b/src/Mod/Path/PathCommands.py index bc20a3c333be..a8248984cd0a 100644 --- a/src/Mod/Path/PathCommands.py +++ b/src/Mod/Path/PathCommands.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # *************************************************************************** -# * * # * Copyright (c) 2016 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -42,7 +41,7 @@ def translate(ctxt, txt): __title__ = "FreeCAD Path Commands" __author__ = "sliptonic" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" class _CommandSelectLoop: @@ -110,7 +109,7 @@ def Activated(self): QtCore.QT_TRANSLATE_NOOP('Path_SelectLoop', 'Closed loop detection failed.')) def formsPartOfALoop(self, obj, sub, names): - try: + try: if names[0][0:4] != 'Edge': if names[0][0:4] == 'Face' and horizontalFaceLoop(obj, sub, names): return True diff --git a/src/Mod/Path/PathScripts/PathAdaptive.py b/src/Mod/Path/PathScripts/PathAdaptive.py index d7d3c575c1b8..c1b432f9080d 100644 --- a/src/Mod/Path/PathScripts/PathAdaptive.py +++ b/src/Mod/Path/PathScripts/PathAdaptive.py @@ -1,5 +1,7 @@ -# /************************************************************************** -# * Copyright (c) Kresimir Tusek (kresimir.tusek@gmail.com) 2018 * +# -*- coding: utf-8 -*- +# *************************************************************************** +# * Copyright (c) 2018 Kresimir Tusek * +# * * # * This file is part of the FreeCAD CAx development system. * # * * # * This library is free software; you can redistribute it and/or * @@ -22,7 +24,7 @@ # * Additional modifications and contributions beginning 2019 * # * by Schildkroet. (https://github.com/Schildkroet) * # * * -# **************************************************************************/ +# *************************************************************************** import PathScripts.PathOp as PathOp @@ -136,7 +138,7 @@ def GenerateGCode(op,obj,adaptiveResults, helixDiameter): # ml: this is dangerous because it'll hide all unused variables hence forward - # however, I don't know wht lx and ly signify so I leave them for now + # however, I don't know what lx and ly signify so I'll leave them for now # pylint: disable=unused-variable lx = adaptiveResults[0]["HelixCenterPoint"][0] ly = adaptiveResults[0]["HelixCenterPoint"][1] @@ -248,7 +250,7 @@ def GenerateGCode(op,obj,adaptiveResults, helixDiameter): for pth in region["AdaptivePaths"]: motionType = pth[0] #[0] contains motion type - for pt in pth[1]: #[1] contains list of points + for pt in pth[1]: #[1] contains list of points x = pt[0] y = pt[1] @@ -468,7 +470,7 @@ def opFeatures(self, obj): '''opFeatures(obj) ... returns the OR'ed list of features used and supported by the operation. The default implementation returns "FeatureTool | FeatureDepths | FeatureHeights | FeatureStartPoint" Should be overwritten by subclasses.''' - return PathOp.FeatureTool | PathOp.FeatureBaseEdges | PathOp.FeatureDepths | PathOp.FeatureFinishDepth | PathOp.FeatureStepDown | PathOp.FeatureHeights | PathOp.FeatureBaseGeometry | PathOp.FeatureCoolant + return PathOp.FeatureTool | PathOp.FeatureBaseEdges | PathOp.FeatureDepths | PathOp.FeatureFinishDepth | PathOp.FeatureStepDown | PathOp.FeatureHeights | PathOp.FeatureBaseGeometry | PathOp.FeatureCoolant def initOperation(self, obj): '''initOperation(obj) ... implement to create additional properties. diff --git a/src/Mod/Path/PathScripts/PathAdaptiveGui.py b/src/Mod/Path/PathScripts/PathAdaptiveGui.py index 6f218a094911..837da2e90206 100644 --- a/src/Mod/Path/PathScripts/PathAdaptiveGui.py +++ b/src/Mod/Path/PathScripts/PathAdaptiveGui.py @@ -1,5 +1,7 @@ -# /************************************************************************** -# * Copyright (c) Kresimir Tusek (kresimir.tusek@gmail.com) 2018 * +# -*- coding: utf-8 -*- +# *************************************************************************** +# * Copyright (c) 2018 Kresimir Tusek * +# * * # * This file is part of the FreeCAD CAx development system. * # * * # * This library is free software; you can redistribute it and/or * @@ -17,7 +19,7 @@ # * write to the Free Software Foundation, Inc., 59 Temple Place, * # * Suite 330, Boston, MA 02111-1307, USA * # * * -# ***************************************************************************/ +# *************************************************************************** import PathScripts.PathOpGui as PathOpGui from PySide import QtCore, QtGui diff --git a/src/Mod/Path/PathScripts/PathAreaOp.py b/src/Mod/Path/PathScripts/PathAreaOp.py index ac13517ee698..c8a468680980 100644 --- a/src/Mod/Path/PathScripts/PathAreaOp.py +++ b/src/Mod/Path/PathScripts/PathAreaOp.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -41,7 +39,7 @@ __title__ = "Base class for PathArea based operations." __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Base class and properties for Path.Area based operations." LOGLEVEL = PathLog.Level.INFO diff --git a/src/Mod/Path/PathScripts/PathArray.py b/src/Mod/Path/PathScripts/PathArray.py index 75ca9644b36a..c617e27d2b11 100644 --- a/src/Mod/Path/PathScripts/PathArray.py +++ b/src/Mod/Path/PathScripts/PathArray.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2015 Yorik van Havre * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathCircularHoleBase.py b/src/Mod/Path/PathScripts/PathCircularHoleBase.py index 09e57a770d6f..4f002a7e12e2 100644 --- a/src/Mod/Path/PathScripts/PathCircularHoleBase.py +++ b/src/Mod/Path/PathScripts/PathCircularHoleBase.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathCircularHoleBaseGui.py b/src/Mod/Path/PathScripts/PathCircularHoleBaseGui.py index 6aa404a12bfc..85dbb81e0a48 100644 --- a/src/Mod/Path/PathScripts/PathCircularHoleBaseGui.py +++ b/src/Mod/Path/PathScripts/PathCircularHoleBaseGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -31,7 +29,7 @@ __title__ = "Base for Circular Hole based operations' UI" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Implementation of circular hole specific base geometry page controller." LOGLEVEL = False diff --git a/src/Mod/Path/PathScripts/PathCollision.py b/src/Mod/Path/PathScripts/PathCollision.py index dae423c20d2f..d5f6b25d160f 100644 --- a/src/Mod/Path/PathScripts/PathCollision.py +++ b/src/Mod/Path/PathScripts/PathCollision.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -39,7 +37,7 @@ def translate(context, text, disambig=None): __title__ = "Path Collision Utility" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" """Path Collision object and FreeCAD command""" diff --git a/src/Mod/Path/PathScripts/PathComment.py b/src/Mod/Path/PathScripts/PathComment.py index a3c2a58eb677..2340050a4b47 100644 --- a/src/Mod/Path/PathScripts/PathComment.py +++ b/src/Mod/Path/PathScripts/PathComment.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2015 Dan Falck * # * * # * This program is free software; you can redistribute it and/or modify * @@ -21,7 +19,8 @@ # * USA * # * * # *************************************************************************** -''' Used for CNC machine comments for Path module. Create a comment and place it in the Document tree.''' + +'''Used for CNC machine comments for Path module. Create a comment and place it in the Document tree.''' import FreeCAD import FreeCADGui diff --git a/src/Mod/Path/PathScripts/PathCopy.py b/src/Mod/Path/PathScripts/PathCopy.py index dd59a3a67314..7ec152a1ad78 100644 --- a/src/Mod/Path/PathScripts/PathCopy.py +++ b/src/Mod/Path/PathScripts/PathCopy.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2014 Yorik van Havre * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathCustom.py b/src/Mod/Path/PathScripts/PathCustom.py index 217ec244f017..acfca878d27f 100644 --- a/src/Mod/Path/PathScripts/PathCustom.py +++ b/src/Mod/Path/PathScripts/PathCustom.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # *************************************************************************** -# * * # * Copyright (c) 2014 Yorik van Havre * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathCustomGui.py b/src/Mod/Path/PathScripts/PathCustomGui.py index 3ec21091f744..a859a8e06727 100644 --- a/src/Mod/Path/PathScripts/PathCustomGui.py +++ b/src/Mod/Path/PathScripts/PathCustomGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathDeburr.py b/src/Mod/Path/PathScripts/PathDeburr.py index 5608f7069370..4f23603d052a 100644 --- a/src/Mod/Path/PathScripts/PathDeburr.py +++ b/src/Mod/Path/PathScripts/PathDeburr.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2018 sliptonic * # * Copyright (c) 2020 Schildkroet * # * * diff --git a/src/Mod/Path/PathScripts/PathDeburrGui.py b/src/Mod/Path/PathScripts/PathDeburrGui.py index 1d84135d07aa..dceac1867691 100644 --- a/src/Mod/Path/PathScripts/PathDeburrGui.py +++ b/src/Mod/Path/PathScripts/PathDeburrGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2018 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -33,7 +31,7 @@ __title__ = "Path Deburr Operation UI" __author__ = "sliptonic (Brad Collette), Schildkroet" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Deburr operation page controller and command implementation." LOGLEVEL = False diff --git a/src/Mod/Path/PathScripts/PathDressup.py b/src/Mod/Path/PathScripts/PathDressup.py index b124918f84d7..6efdf60174ac 100644 --- a/src/Mod/Path/PathScripts/PathDressup.py +++ b/src/Mod/Path/PathScripts/PathDressup.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2018 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathDressupAxisMap.py b/src/Mod/Path/PathScripts/PathDressupAxisMap.py index d057e4527b74..8d1aa8978172 100644 --- a/src/Mod/Path/PathScripts/PathDressupAxisMap.py +++ b/src/Mod/Path/PathScripts/PathDressupAxisMap.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2018 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -21,6 +19,7 @@ # * USA * # * * # *************************************************************************** + import FreeCAD import Path import math diff --git a/src/Mod/Path/PathScripts/PathDressupDogbone.py b/src/Mod/Path/PathScripts/PathDressupDogbone.py index b16853245555..629bde66fef6 100644 --- a/src/Mod/Path/PathScripts/PathDressupDogbone.py +++ b/src/Mod/Path/PathScripts/PathDressupDogbone.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2014 Yorik van Havre * # * * # * This program is free software; you can redistribute it and/or modify * @@ -21,6 +19,7 @@ # * USA * # * * # *************************************************************************** + from __future__ import print_function import FreeCAD import math @@ -422,7 +421,7 @@ def __init__(self, obj, base): def onDocumentRestored(self, obj): obj.setEditorMode('BoneBlacklist', 2) # hide this one - + def __getstate__(self): return None diff --git a/src/Mod/Path/PathScripts/PathDressupDragknife.py b/src/Mod/Path/PathScripts/PathDressupDragknife.py index cdea6c3265e8..248b597527bb 100644 --- a/src/Mod/Path/PathScripts/PathDressupDragknife.py +++ b/src/Mod/Path/PathScripts/PathDressupDragknife.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2014 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathDressupHoldingTags.py b/src/Mod/Path/PathScripts/PathDressupHoldingTags.py index d619f0fd13c9..c9521df52bc0 100644 --- a/src/Mod/Path/PathScripts/PathDressupHoldingTags.py +++ b/src/Mod/Path/PathScripts/PathDressupHoldingTags.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -21,6 +19,7 @@ # * USA * # * * # *************************************************************************** + import FreeCAD import Path import PathScripts.PathDressup as PathDressup diff --git a/src/Mod/Path/PathScripts/PathDressupLeadInOut.py b/src/Mod/Path/PathScripts/PathDressupLeadInOut.py index db5fdc2d21a9..bd91cb2f8fab 100644 --- a/src/Mod/Path/PathScripts/PathDressupLeadInOut.py +++ b/src/Mod/Path/PathScripts/PathDressupLeadInOut.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 LTS under LGPL * # * Copyright (c) 2020 Schildkroet * # * * @@ -74,7 +72,7 @@ def __init__(self, obj): obj.addProperty("App::PropertyDistance", "ExtendLeadOut", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property", "Extends LeadOut distance")) obj.addProperty("App::PropertyBool", "RapidPlunge", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property", "Perform plunges with G0")) obj.addProperty("App::PropertyBool", "IncludeLayers", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property", "Apply LeadInOut to layers within an operation")) - + self.wire = None self.rapids = None @@ -123,12 +121,12 @@ def getDirectionOfPath(self, obj): if hasattr(op, 'Direction') and op.Direction == 'CW': return 'right' return 'left' - + def getSideOfPath(self, obj): op = PathDressup.baseOp(obj.Base) if hasattr(op, 'Side'): return op.Side - + return '' def normalize(self, Vector): @@ -139,19 +137,19 @@ def normalize(self, Vector): vx = round(x / length, 3) vy = round(y / length, 3) return FreeCAD.Vector(vx, vy, 0) - + def invert(self, Vector): x = Vector.x * -1 y = Vector.y * -1 z = Vector.z * -1 return FreeCAD.Vector(x, y, z) - + def multiply(self, Vector, len): x = Vector.x * len y = Vector.y * len z = Vector.z * len return FreeCAD.Vector(x, y, z) - + def rotate(self, Vector, angle): s = math.sin(math.radians(angle)) c = math.cos(math.radians(angle)) @@ -186,7 +184,7 @@ def getLeadStart(self, obj, queue, action): p1 = queue[1].Placement.Base v = self.normalize(p1.sub(p0)) # PathLog.debug(" CURRENT_IN ARC : P0 X:{} Y:{} P1 X:{} Y:{} ".format(p0.x,p0.y,p1.x,p1.y)) - + # Calculate offset vector (will be overwritten for arcs) if self.getDirectionOfPath(obj) == 'right': off_v = FreeCAD.Vector(v.y*R, -v.x*R, 0.0) @@ -207,36 +205,36 @@ def getLeadStart(self, obj, queue, action): pij = copy.deepcopy(p0) pij.x += queue[1].Parameters['I'] pij.y += queue[1].Parameters['J'] - + # Check if lead in and operation go in same direction (usually for inner circles) if arcdir == queue[1].Name: arcs_identical = True - + # Calculate vector circle start -> circle middle vec_circ = pij.sub(p0) - + # Rotate vector to get direction for lead in if arcdir == "G2": vec_rot = self.rotate(vec_circ, 90) else: vec_rot = self.rotate(vec_circ, -90) - + # Normalize and invert vector vec_n = self.normalize(vec_rot) - + v = self.invert(vec_n) - + # Calculate offset of lead in if arcdir == "G3": off_v = FreeCAD.Vector(-v.y*R, v.x*R, 0.0) else: off_v = FreeCAD.Vector(v.y*R, -v.x*R, 0.0) - + # Multiply offset by LeadIn length vec_off = self.multiply(vec_n, obj.ExtendLeadIn) - + offsetvector = FreeCAD.Vector(v.x*R-vec_off.x, v.y*R-vec_off.y, 0) # IJ - + if obj.RadiusCenter == 'Radius': leadstart = (p0.add(off_v)).sub(offsetvector) # Rmode if arcs_identical: @@ -254,27 +252,27 @@ def getLeadStart(self, obj, queue, action): results.append(extendcommand) extendcommand = Path.Command('G0', {"Z": op.SafeHeight.Value}) results.append(extendcommand) - + if action == 'layer': if not obj.KeepToolDown: extendcommand = Path.Command('G0', {"Z": op.SafeHeight.Value}) results.append(extendcommand) - + extendcommand = Path.Command('G0', {"X": leadstart.x, "Y": leadstart.y}) results.append(extendcommand) - + if not obj.RapidPlunge: extendcommand = Path.Command('G1', {"X": leadstart.x, "Y": leadstart.y, "Z": p1.z, "F": vertFeed}) else: extendcommand = Path.Command('G0', {"X": leadstart.x, "Y": leadstart.y, "Z": p1.z,}) results.append(extendcommand) - + if obj.UseMachineCRC: if self.getDirectionOfPath(obj) == 'right': results.append(Path.Command('G42', {'D': toolnummer})) else: results.append(Path.Command('G41', {'D': toolnummer})) - + if obj.StyleOn == 'Arc': arcmove = Path.Command(arcdir, {"X": p0.x+vec_off.x, "Y": p0.y+vec_off.y, "I": offsetvector.x+vec_off.x, "J": offsetvector.y+vec_off.y, "F": horizFeed}) # add G2/G3 move results.append(arcmove) @@ -286,10 +284,10 @@ def getLeadStart(self, obj, queue, action): results.append(extendcommand) else: PathLog.debug(" CURRENT_IN Perp") - + currLocation.update(results[-1].Parameters) currLocation['Z'] = p1.z - + return results def getLeadEnd(self, obj, queue, action): @@ -299,13 +297,13 @@ def getLeadEnd(self, obj, queue, action): horizFeed = PathDressup.toolController(obj.Base).HorizFeed.Value R = obj.Length.Value # Radius of roll or length arcs_identical = False - + # Set the correct twist command if self.getDirectionOfPath(obj) == 'right': arcdir = "G2" else: arcdir = "G3" - + if queue[1].Name == "G1": # line p0 = queue[0].Placement.Base p1 = queue[1].Placement.Base @@ -314,12 +312,12 @@ def getLeadEnd(self, obj, queue, action): p0 = queue[0].Placement.Base p1 = queue[1].Placement.Base v = self.normalize(p1.sub(p0)) - + if self.getDirectionOfPath(obj) == 'right': off_v = FreeCAD.Vector(v.y*R, -v.x*R, 0.0) else: off_v = FreeCAD.Vector(-v.y*R, v.x*R, 0.0) - + # Check if we leave at line or arc command if queue[1].Name in movecommands and queue[1].Name not in arccommands: # We have a line move @@ -334,27 +332,27 @@ def getLeadEnd(self, obj, queue, action): pij.x += queue[1].Parameters['I'] pij.y += queue[1].Parameters['J'] ve = pij.sub(p1) - + if arcdir == queue[1].Name: arcs_identical = True - + if arcdir == "G2": vec_rot = self.rotate(ve, -90) else: vec_rot = self.rotate(ve, 90) - + vec_n = self.normalize(vec_rot) v = vec_n - + if arcdir == "G3": off_v = FreeCAD.Vector(-v.y*R, v.x*R, 0.0) else: off_v = FreeCAD.Vector(v.y*R, -v.x*R, 0.0) - + vec_inv = self.invert(vec_rot) - + vec_off = self.multiply(vec_inv, obj.ExtendLeadOut) - + offsetvector = FreeCAD.Vector(v.x*R-vec_off.x, v.y*R-vec_off.y, 0.0) if obj.RadiusCenter == 'Radius': leadend = (p1.add(off_v)).add(offsetvector) # Rmode @@ -365,7 +363,7 @@ def getLeadEnd(self, obj, queue, action): off_v = self.multiply(off_v, -1) else: leadend = p1.add(off_v) # Dmode - + IJ = off_v # .negative() #results.append(queue[1]) if obj.StyleOff == 'Arc': @@ -379,10 +377,10 @@ def getLeadEnd(self, obj, queue, action): results.append(extendcommand) else: PathLog.debug(" CURRENT_IN Perp") - + if obj.UseMachineCRC: # crc off results.append(Path.Command('G40', {})) - + return results def generateLeadInOutCurve(self, obj): @@ -395,7 +393,7 @@ def generateLeadInOutCurve(self, obj): action = 'start' prevCmd = '' layers = [] - + # Read in all commands for curCommand in obj.Base.Path.Commands: #PathLog.debug("CurCMD: {}".format(curCommand)) @@ -403,13 +401,13 @@ def generateLeadInOutCurve(self, obj): # Don't worry about non-move commands, just add to output newpath.append(curCommand) continue - + if curCommand.Name in rapidcommands: # We don't care about rapid moves prevCmd = curCommand currLocation.update(curCommand.Parameters) continue - + if curCommand.Name in movecommands: if prevCmd.Name in rapidcommands and curCommand.Name in movecommands and len(queue) > 0: # Layer changed: Save current layer cmds and prepare next layer @@ -420,48 +418,48 @@ def generateLeadInOutCurve(self, obj): #PathLog.debug("Layer change in move: {}->{}".format(currLocation['Z'], curCommand.z)) layers.append(queue) queue = [] - + # Save all move commands queue.append(curCommand) - + currLocation.update(curCommand.Parameters) prevCmd = curCommand - + # Add last layer if len(queue) > 0: layers.append(queue) queue = [] - + # Go through each layer and add leadIn/Out idx = 0 for layer in layers: #PathLog.debug("Layer {}".format(idx)) - + if obj.LeadIn: temp = self.getLeadStart(obj, layer, action) newpath.extend(temp) - + for cmd in layer: #PathLog.debug("CurLoc: {}, NewCmd: {}".format(currLocation, cmd)) #if currLocation['X'] == cmd.x and currLocation['Y'] == cmd.y and currLocation['Z'] == cmd.z and cmd.Name in ['G1', 'G01']: #continue newpath.append(cmd) - + if obj.LeadOut: tmp = [] tmp.append(layer[-2]) tmp.append(layer[-1]) temp = self.getLeadEnd(obj, tmp, action) newpath.extend(temp) - + if not obj.KeepToolDown or idx == len(layers)-1: extendcommand = Path.Command('G0', {"Z": op.ClearanceHeight.Value}) newpath.append(extendcommand) else: action = 'layer' - + idx += 1 - + commands = newpath return Path.Path(commands) diff --git a/src/Mod/Path/PathScripts/PathDressupPathBoundary.py b/src/Mod/Path/PathScripts/PathDressupPathBoundary.py index 29242d4be6b0..dc6d57f2f639 100644 --- a/src/Mod/Path/PathScripts/PathDressupPathBoundary.py +++ b/src/Mod/Path/PathScripts/PathDressupPathBoundary.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2019 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -89,7 +87,7 @@ def boundaryCommands(self, obj, begin, end, verticalFeed): if begin.z < self.clearanceHeight: cmds.append(self.strG0ZclearanceHeight) if end: - cmds.append(Path.Command('G0', {'X': end.x, 'Y': end.y})) + cmds.append(Path.Command('G0', {'X': end.x, 'Y': end.y})) if end.z < self.clearanceHeight: cmds.append(Path.Command('G0', {'Z': max(self.safeHeight, end.z)})) if end.z < self.safeHeight: @@ -109,8 +107,8 @@ def execute(self, obj): self.strG0ZclearanceHeight = Path.Command('G0', {'Z': self.clearanceHeight}) boundary = obj.Stock.Shape - cmd = obj.Base.Path.Commands[0] - pos = cmd.Placement.Base # bogus m/c position to create first edge + cmd = obj.Base.Path.Commands[0] + pos = cmd.Placement.Base # bogus m/c position to create first edge bogusX = True bogusY = True commands = [cmd] @@ -136,7 +134,7 @@ def execute(self, obj): # cmd fully included by boundary if lastExit: if not ( bogusX or bogusY ) : # don't insert false paths based on bogus m/c position - commands.extend(self.boundaryCommands(obj, lastExit, pos, tc.VertFeed.Value)) + commands.extend(self.boundaryCommands(obj, lastExit, pos, tc.VertFeed.Value)) lastExit = None commands.append(cmd) pos = PathGeom.commandEndPoint(cmd, pos) @@ -164,7 +162,7 @@ def execute(self, obj): lastExit = None PathLog.track(e, flip) if not ( bogusX or bogusY ) : # don't insert false paths based on bogus m/c position - commands.extend(PathGeom.cmdsForEdge(e, flip, False, 50, tc.HorizFeed.Value, tc.VertFeed.Value)) + commands.extend(PathGeom.cmdsForEdge(e, flip, False, 50, tc.HorizFeed.Value, tc.VertFeed.Value)) inside.remove(e) pos = newPos lastExit = newPos diff --git a/src/Mod/Path/PathScripts/PathDressupPathBoundaryGui.py b/src/Mod/Path/PathScripts/PathDressupPathBoundaryGui.py index 4ee524f05ae5..806bb21dc789 100644 --- a/src/Mod/Path/PathScripts/PathDressupPathBoundaryGui.py +++ b/src/Mod/Path/PathScripts/PathDressupPathBoundaryGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2019 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -21,6 +19,7 @@ # * USA * # * * # *************************************************************************** + import FreeCAD import FreeCADGui import PathScripts.PathDressupPathBoundary as PathDressupPathBoundary diff --git a/src/Mod/Path/PathScripts/PathDressupRampEntry.py b/src/Mod/Path/PathScripts/PathDressupRampEntry.py index 1255472d2343..76fae738f84a 100644 --- a/src/Mod/Path/PathScripts/PathDressupRampEntry.py +++ b/src/Mod/Path/PathScripts/PathDressupRampEntry.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 Pekka Roivainen * # * * # * This program is free software; you can redistribute it and/or modify * @@ -21,6 +19,7 @@ # * USA * # * * # *************************************************************************** + import FreeCAD import Path import PathScripts.PathDressup as PathDressup diff --git a/src/Mod/Path/PathScripts/PathDressupTag.py b/src/Mod/Path/PathScripts/PathDressupTag.py index a610e7939a81..bbfc34935807 100644 --- a/src/Mod/Path/PathScripts/PathDressupTag.py +++ b/src/Mod/Path/PathScripts/PathDressupTag.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -21,6 +19,7 @@ # * USA * # * * # *************************************************************************** + import FreeCAD import PathScripts.PathDressup as PathDressup import PathScripts.PathGeom as PathGeom diff --git a/src/Mod/Path/PathScripts/PathDressupTagGui.py b/src/Mod/Path/PathScripts/PathDressupTagGui.py index 9f24f1b9c7cb..daca299e4181 100644 --- a/src/Mod/Path/PathScripts/PathDressupTagGui.py +++ b/src/Mod/Path/PathScripts/PathDressupTagGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -21,6 +19,7 @@ # * USA * # * * # *************************************************************************** + import FreeCAD import FreeCADGui import PathScripts.PathGeom as PathGeom diff --git a/src/Mod/Path/PathScripts/PathDressupTagPreferences.py b/src/Mod/Path/PathScripts/PathDressupTagPreferences.py index e97ecc171193..99bb0888d413 100644 --- a/src/Mod/Path/PathScripts/PathDressupTagPreferences.py +++ b/src/Mod/Path/PathScripts/PathDressupTagPreferences.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathDressupZCorrect.py b/src/Mod/Path/PathScripts/PathDressupZCorrect.py index 142d00312c2d..9f585a58fe92 100644 --- a/src/Mod/Path/PathScripts/PathDressupZCorrect.py +++ b/src/Mod/Path/PathScripts/PathDressupZCorrect.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- - +# -*- coding: utf-8 -* # *************************************************************************** -# * * # * Copyright (c) 2018 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathDrilling.py b/src/Mod/Path/PathScripts/PathDrilling.py index 96d6a4b6375c..dcd95705f739 100644 --- a/src/Mod/Path/PathScripts/PathDrilling.py +++ b/src/Mod/Path/PathScripts/PathDrilling.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2014 Yorik van Havre * # * Copyright (c) 2020 russ4262 (Russell Johnson) * # * Copyright (c) 2020 Schildkroet * @@ -43,7 +41,7 @@ __title__ = "Path Drilling Operation" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Path Drilling operation." PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule()) @@ -227,9 +225,9 @@ def Create(name, obj=None): '''Create(name) ... Creates and returns a Drilling operation.''' if obj is None: obj = FreeCAD.ActiveDocument.addObject("Path::FeaturePython", name) - + obj.Proxy = ObjectDrilling(obj, name) if obj.Proxy: obj.Proxy.findAllHoles(obj) - + return obj diff --git a/src/Mod/Path/PathScripts/PathDrillingGui.py b/src/Mod/Path/PathScripts/PathDrillingGui.py index ca7e1924efe0..3a5663a0233c 100644 --- a/src/Mod/Path/PathScripts/PathDrillingGui.py +++ b/src/Mod/Path/PathScripts/PathDrillingGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -34,7 +32,7 @@ __title__ = "Path Drilling Operation UI." __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "UI and Command for Path Drilling Operation." __contributors__ = "IMBack!" @@ -49,24 +47,24 @@ class TaskPanelOpPage(PathCircularHoleBaseGui.TaskPanelOpPage): '''Controller for the drilling operation's page''' - + def initPage(self, obj): # pylint: disable=attribute-defined-outside-init self.peckDepthSpinBox = PathGui.QuantitySpinBox(self.form.peckDepth, obj, 'PeckDepth') self.peckRetractSpinBox = PathGui.QuantitySpinBox(self.form.peckRetractHeight, obj, 'RetractHeight') self.dwellTimeSpinBox = PathGui.QuantitySpinBox(self.form.dwellTime, obj, 'DwellTime') - + def registerSignalHandlers(self, obj): self.form.peckEnabled.toggled.connect(self.form.peckDepth.setEnabled) self.form.peckEnabled.toggled.connect(self.form.dwellEnabled.setDisabled) - + self.form.dwellEnabled.toggled.connect(self.form.dwellTime.setEnabled) self.form.dwellEnabled.toggled.connect(self.form.dwellTimelabel.setEnabled) self.form.dwellEnabled.toggled.connect(self.form.peckEnabled.setDisabled) - + self.form.peckRetractHeight.setEnabled(True) self.form.retractLabel.setEnabled(True) - + if self.form.peckEnabled.isChecked(): self.form.dwellEnabled.setEnabled(False) self.form.peckDepth.setEnabled(True) @@ -79,7 +77,7 @@ def registerSignalHandlers(self, obj): def getForm(self): '''getForm() ... return UI''' return FreeCADGui.PySideUic.loadUi(":/panels/PageOpDrillingEdit.ui") - + def updateQuantitySpinBoxes(self, index = None): # pylint: disable=unused-argument self.peckDepthSpinBox.updateSpinBox() @@ -142,7 +140,7 @@ def getSignalsForUpdate(self, obj): signals.append(self.form.enableRotation.currentIndexChanged) return signals - + def updateData(self, obj, prop): if prop in ['PeckDepth', 'RetractHeight'] and not prop in ['Base', 'Disabled']: self.updateQuantitySpinBoxes() diff --git a/src/Mod/Path/PathScripts/PathEngrave.py b/src/Mod/Path/PathScripts/PathEngrave.py index f1e2d4cdae69..0edba1b07abd 100644 --- a/src/Mod/Path/PathScripts/PathEngrave.py +++ b/src/Mod/Path/PathScripts/PathEngrave.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2014 Yorik van Havre * # * * # * This program is free software; you can redistribute it and/or modify * @@ -56,7 +54,7 @@ def __init__(self, obj, name): def opFeatures(self, obj): '''opFeatures(obj) ... return all standard features and edges based geomtries''' - return PathOp.FeatureTool | PathOp.FeatureDepths | PathOp.FeatureHeights | PathOp.FeatureStepDown | PathOp.FeatureBaseEdges | PathOp.FeatureCoolant + return PathOp.FeatureTool | PathOp.FeatureDepths | PathOp.FeatureHeights | PathOp.FeatureStepDown | PathOp.FeatureBaseEdges | PathOp.FeatureCoolant def setupAdditionalProperties(self, obj): if not hasattr(obj, 'BaseShapes'): diff --git a/src/Mod/Path/PathScripts/PathEngraveBase.py b/src/Mod/Path/PathScripts/PathEngraveBase.py index dc8689aa91ec..4fdbc18a6b2b 100644 --- a/src/Mod/Path/PathScripts/PathEngraveBase.py +++ b/src/Mod/Path/PathScripts/PathEngraveBase.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2018 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathEngraveGui.py b/src/Mod/Path/PathScripts/PathEngraveGui.py index 4147bc0ea74c..0527ac92973c 100644 --- a/src/Mod/Path/PathScripts/PathEngraveGui.py +++ b/src/Mod/Path/PathScripts/PathEngraveGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -33,7 +31,7 @@ __title__ = "Path Engrave Operation UI" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Engrave operation page controller and command implementation." PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule()) diff --git a/src/Mod/Path/PathScripts/PathFixture.py b/src/Mod/Path/PathScripts/PathFixture.py index 7c13f3c5ef36..f85c5d5d32a5 100644 --- a/src/Mod/Path/PathScripts/PathFixture.py +++ b/src/Mod/Path/PathScripts/PathFixture.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # *************************************************************************** -# * * # * Copyright (c) 2015 Dan Falck * # * * # * This program is free software; you can redistribute it and/or modify * @@ -20,6 +19,7 @@ # * USA * # * * # *************************************************************************** + ''' Used to create CNC machine fixture offsets such as G54,G55, etc...''' import FreeCAD diff --git a/src/Mod/Path/PathScripts/PathGeom.py b/src/Mod/Path/PathScripts/PathGeom.py index 5782fa747f81..1b6c67848d14 100644 --- a/src/Mod/Path/PathScripts/PathGeom.py +++ b/src/Mod/Path/PathScripts/PathGeom.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2016 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -36,7 +34,7 @@ __title__ = "PathGeom - geometry utilities for Path" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Functions to extract and convert between Path.Command and Part.Edge and utility functions to reason about them." Tolerance = 0.000001 diff --git a/src/Mod/Path/PathScripts/PathGetPoint.py b/src/Mod/Path/PathScripts/PathGetPoint.py index 93ac673fc2a5..402a62f21e1b 100644 --- a/src/Mod/Path/PathScripts/PathGetPoint.py +++ b/src/Mod/Path/PathScripts/PathGetPoint.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -35,7 +33,7 @@ __title__ = "Path GetPoint UI" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Helper class to use FreeCADGUi.Snapper to let the user enter arbitrary points while the task panel is active." PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule()) diff --git a/src/Mod/Path/PathScripts/PathGui.py b/src/Mod/Path/PathScripts/PathGui.py index b3ea83ccd8ca..d7fdd6be32e5 100644 --- a/src/Mod/Path/PathScripts/PathGui.py +++ b/src/Mod/Path/PathScripts/PathGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -31,7 +29,7 @@ __title__ = "Path UI helper and utility functions" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "A collection of helper and utility functions for the Path GUI." def translate(context, text, disambig=None): diff --git a/src/Mod/Path/PathScripts/PathGuiInit.py b/src/Mod/Path/PathScripts/PathGuiInit.py index 060d1b3fe593..6123ddce3654 100644 --- a/src/Mod/Path/PathScripts/PathGuiInit.py +++ b/src/Mod/Path/PathScripts/PathGuiInit.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2018 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathHelix.py b/src/Mod/Path/PathScripts/PathHelix.py index f01e2791f75c..683997ce2d43 100644 --- a/src/Mod/Path/PathScripts/PathHelix.py +++ b/src/Mod/Path/PathScripts/PathHelix.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2016 Lorenz Hüdepohl * # * * # * This program is free software; you can redistribute it and/or modify * @@ -36,7 +34,7 @@ __title__ = "Path Helix Drill Operation" __author__ = "Lorenz Hüdepohl" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Class and implementation of Helix Drill operation" __contributors__ = "russ4262 (Russell Johnson)" __created__ = "2016" diff --git a/src/Mod/Path/PathScripts/PathHelixGui.py b/src/Mod/Path/PathScripts/PathHelixGui.py index 02ac143d64e8..659bf8a2115d 100644 --- a/src/Mod/Path/PathScripts/PathHelixGui.py +++ b/src/Mod/Path/PathScripts/PathHelixGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathHop.py b/src/Mod/Path/PathScripts/PathHop.py index 1b613c02f2e2..bd95b84b93c2 100644 --- a/src/Mod/Path/PathScripts/PathHop.py +++ b/src/Mod/Path/PathScripts/PathHop.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2014 Yorik van Havre * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathIconViewProvider.py b/src/Mod/Path/PathScripts/PathIconViewProvider.py index cb5819f8d0af..c4a017bcdd00 100644 --- a/src/Mod/Path/PathScripts/PathIconViewProvider.py +++ b/src/Mod/Path/PathScripts/PathIconViewProvider.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -28,7 +26,7 @@ __title__ = "Path Icon ViewProvider" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "ViewProvider who's main and only task is to assign an icon." PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule()) diff --git a/src/Mod/Path/PathScripts/PathInspect.py b/src/Mod/Path/PathScripts/PathInspect.py index 19cc291a789e..7b46e9587faf 100644 --- a/src/Mod/Path/PathScripts/PathInspect.py +++ b/src/Mod/Path/PathScripts/PathInspect.py @@ -1,5 +1,6 @@ +# -*- coding: utf-8 -*- # *************************************************************************** -# * (c) Yorik van Havre (yorik@uncreated.net) 2015 * +# * Copyright (c) 2015 Yorik van Havre * # * * # * This file is part of the FreeCAD CAx development system. * # * * @@ -19,7 +20,7 @@ # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * # * USA * # * * -# ***************************************************************************/ +# *************************************************************************** from PySide import QtCore, QtGui @@ -191,19 +192,19 @@ def highlightpath(self): def show(obj): "show(obj): shows the G-code data of the given Path object in a dialog" - + prefs = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Path") # default Max Highlighter Size = 512 Ko - defaultMHS = 512 * 1024 + defaultMHS = 512 * 1024 mhs = prefs.GetUnsigned('inspecteditorMaxHighlighterSize', defaultMHS) - + if hasattr(obj, "Path"): if obj.Path: dia = GCodeEditorDialog(obj.Path) dia.editor.setText(obj.Path.toGCode()) gcodeSize = len(dia.editor.toPlainText()) if (gcodeSize <= mhs): - # because of poor performance, syntax highlighting is + # because of poor performance, syntax highlighting is # limited to mhs octets (default 512 KB). # It seems than the response time curve has an inflexion near 500 KB # beyond 500 KB, the response time increases exponentially. diff --git a/src/Mod/Path/PathScripts/PathJob.py b/src/Mod/Path/PathScripts/PathJob.py index adc0adfee694..d17cf3e717f4 100644 --- a/src/Mod/Path/PathScripts/PathJob.py +++ b/src/Mod/Path/PathScripts/PathJob.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2014 Yorik van Havre * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathJobCmd.py b/src/Mod/Path/PathScripts/PathJobCmd.py index 61fdd692c5b2..4c5a2e54bf38 100644 --- a/src/Mod/Path/PathScripts/PathJobCmd.py +++ b/src/Mod/Path/PathScripts/PathJobCmd.py @@ -1,7 +1,4 @@ -# -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -129,7 +126,7 @@ def SaveDialog(cls, job, dialog): "Path - Job Template", PathPreferences.filePath(), "job_*.json")[0] - if foo: + if foo: if not os.path.basename(foo).startswith('job_'): foo = os.path.join(os.path.dirname(foo), 'job_' + os.path.basename(foo)) if not foo.endswith('.json'): diff --git a/src/Mod/Path/PathScripts/PathJobDlg.py b/src/Mod/Path/PathScripts/PathJobDlg.py index fd6ea16f3ea9..6a303caa8352 100644 --- a/src/Mod/Path/PathScripts/PathJobDlg.py +++ b/src/Mod/Path/PathScripts/PathJobDlg.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2018 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathJobGui.py b/src/Mod/Path/PathScripts/PathJobGui.py index bf33a43fb99e..5c3d1daf9dfa 100644 --- a/src/Mod/Path/PathScripts/PathJobGui.py +++ b/src/Mod/Path/PathScripts/PathJobGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathLog.py b/src/Mod/Path/PathScripts/PathLog.py index cee432cff342..80128d3c511b 100644 --- a/src/Mod/Path/PathScripts/PathLog.py +++ b/src/Mod/Path/PathScripts/PathLog.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2016 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathMillFace.py b/src/Mod/Path/PathScripts/PathMillFace.py index 1204ebbe062f..172891a46659 100644 --- a/src/Mod/Path/PathScripts/PathMillFace.py +++ b/src/Mod/Path/PathScripts/PathMillFace.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2016 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -38,7 +36,7 @@ __title__ = "Path Mill Face Operation" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Class and implementation of Mill Facing operation." __contributors__ = "russ4262 (Russell Johnson)" diff --git a/src/Mod/Path/PathScripts/PathMillFaceGui.py b/src/Mod/Path/PathScripts/PathMillFaceGui.py index d5f8a9fba87d..e926172a8c82 100644 --- a/src/Mod/Path/PathScripts/PathMillFaceGui.py +++ b/src/Mod/Path/PathScripts/PathMillFaceGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -31,7 +29,7 @@ __title__ = "Path Face Mill Operation UI" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Face Mill operation page controller and command implementation." class TaskPanelOpPage(PathPocketBaseGui.TaskPanelOpPage): diff --git a/src/Mod/Path/PathScripts/PathOp.py b/src/Mod/Path/PathScripts/PathOp.py index f103f3aa74d7..24497f1a58fe 100644 --- a/src/Mod/Path/PathScripts/PathOp.py +++ b/src/Mod/Path/PathScripts/PathOp.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -39,7 +37,7 @@ __title__ = "Base class for all operations." __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Base class and properties implementation for all Path operations." PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule()) diff --git a/src/Mod/Path/PathScripts/PathOpGui.py b/src/Mod/Path/PathScripts/PathOpGui.py index cff53be0516d..b84be0856884 100644 --- a/src/Mod/Path/PathScripts/PathOpGui.py +++ b/src/Mod/Path/PathScripts/PathOpGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -40,7 +38,7 @@ __title__ = "Path Operation UI base classes" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Base classes and framework for Path operation's UI" LOGLEVEL = False @@ -1019,13 +1017,13 @@ def __init__(self, obj, deleteOnReject, opPage, selectionFactory): self.featurePages.append(opPage.taskPanelHeightsPage(obj, features)) else: self.featurePages.append(TaskPanelHeightsPage(obj, features)) - + if PathOp.FeatureDiameters & features: if hasattr(opPage, 'taskPanelDiametersPage'): self.featurePages.append(opPage.taskPanelDiametersPage(obj, features)) else: self.featurePages.append(TaskPanelDiametersPage(obj, features)) - + self.featurePages.append(opPage) for page in self.featurePages: diff --git a/src/Mod/Path/PathScripts/PathOpTools.py b/src/Mod/Path/PathScripts/PathOpTools.py index c7c4baf540e4..5bdb3a9ba4e5 100644 --- a/src/Mod/Path/PathScripts/PathOpTools.py +++ b/src/Mod/Path/PathScripts/PathOpTools.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2018 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -35,7 +33,7 @@ __title__ = "PathOpTools - Tools for Path operations." __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Collection of functions used by various Path operations. The functions are specific to Path and the algorithms employed by Path's operations." PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule()) @@ -157,7 +155,7 @@ def offsetWire(wire, base, offset, forward):#, Side = None): curve = edge.Curve if Part.Circle == type(curve) and wire.isClosed(): # it's a full circle and there are some problems with that, see - # http://www.freecadweb.org/wiki/Part%20Offset2D + # https://www.freecadweb.org/wiki/Part%20Offset2D # it's easy to construct them manually though z = -1 if forward else 1 edge = Part.makeCircle(curve.Radius + offset, curve.Center, FreeCAD.Vector(0, 0, z)) diff --git a/src/Mod/Path/PathScripts/PathPlane.py b/src/Mod/Path/PathScripts/PathPlane.py index 26b77d0daf5a..42c5822da255 100644 --- a/src/Mod/Path/PathScripts/PathPlane.py +++ b/src/Mod/Path/PathScripts/PathPlane.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2015 Dan Falck * # * * # * This program is free software; you can redistribute it and/or modify * @@ -21,6 +19,7 @@ # * USA * # * * # *************************************************************************** + ''' Used for CNC machine plane selection G17,G18,G19 ''' import FreeCAD diff --git a/src/Mod/Path/PathScripts/PathPocket.py b/src/Mod/Path/PathScripts/PathPocket.py index 27fd1a944196..f863dfce1e39 100644 --- a/src/Mod/Path/PathScripts/PathPocket.py +++ b/src/Mod/Path/PathScripts/PathPocket.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2014 Yorik van Havre * # * * # * This program is free software; you can redistribute it and/or modify * @@ -36,7 +34,7 @@ __title__ = "Path 3D Pocket Operation" __author__ = "Yorik van Havre " -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Class and implementation of the 3D Pocket operation." __contributors__ = "russ4262 (Russell Johnson)" __created__ = "2014" diff --git a/src/Mod/Path/PathScripts/PathPocketBase.py b/src/Mod/Path/PathScripts/PathPocketBase.py index 62a9c70bf1fb..453ff667b416 100644 --- a/src/Mod/Path/PathScripts/PathPocketBase.py +++ b/src/Mod/Path/PathScripts/PathPocketBase.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * Copyright (c) 2020 russ4262 (Russell Johnson) * # * * @@ -31,7 +29,7 @@ __title__ = "Base Path Pocket Operation" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Base class and implementation for Path pocket operations." PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule()) diff --git a/src/Mod/Path/PathScripts/PathPocketBaseGui.py b/src/Mod/Path/PathScripts/PathPocketBaseGui.py index 43d4bbce1d04..915b6ea71a25 100644 --- a/src/Mod/Path/PathScripts/PathPocketBaseGui.py +++ b/src/Mod/Path/PathScripts/PathPocketBaseGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -31,7 +29,7 @@ __title__ = "Path Pocket Base Operation UI" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Base page controller and command implementation for path pocket operations." def translate(context, text, disambig=None): diff --git a/src/Mod/Path/PathScripts/PathPocketGui.py b/src/Mod/Path/PathScripts/PathPocketGui.py index e3575556a4d8..78f183b20d1f 100644 --- a/src/Mod/Path/PathScripts/PathPocketGui.py +++ b/src/Mod/Path/PathScripts/PathPocketGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -31,7 +29,7 @@ __title__ = "Path Pocket Operation UI" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Pocket operation page controller and command implementation." class TaskPanelOpPage(PathPocketBaseGui.TaskPanelOpPage): diff --git a/src/Mod/Path/PathScripts/PathPocketShape.py b/src/Mod/Path/PathScripts/PathPocketShape.py index a6352a63a2f7..139b06d6846c 100644 --- a/src/Mod/Path/PathScripts/PathPocketShape.py +++ b/src/Mod/Path/PathScripts/PathPocketShape.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * Copyright (c) 2020 Schildkroet * # * * @@ -41,7 +39,7 @@ __title__ = "Path Pocket Shape Operation" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Class and implementation of shape based Pocket operation." PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule()) @@ -674,7 +672,7 @@ def clasifySub(self, bs, sub): else: face.translate(FreeCAD.Vector(0.0, 0.0, -1 * clrnc)) PathLog.debug('self.horizontal post-shpZMin: {}'.format(shpZMin)) - + if obj.LimitDepthToFace is True and obj.EnableRotation != 'Off': if shpZMinVal > obj.FinalDepth.Value: PathLog.debug('shpZMin > obj.FinalDepth.Value') @@ -693,7 +691,7 @@ def clasifySub(self, bs, sub): round(start_dep - zDestination, 6)): shpZMin = -1 * shpZMin face.translate(FreeCAD.Vector(0, 0, translation)) - + extent = FreeCAD.Vector(0, 0, abs(start_dep - shpZMin) + clrnc) # adj_final_dep + clrnc) extShp = face.removeSplitter().extrude(extent) self.removalshapes.append((extShp, False, 'pathPocketShape', useAngle, axis, start_dep, adj_final_dep)) diff --git a/src/Mod/Path/PathScripts/PathPocketShapeGui.py b/src/Mod/Path/PathScripts/PathPocketShapeGui.py index 6c88ac189cd3..282267736a11 100644 --- a/src/Mod/Path/PathScripts/PathPocketShapeGui.py +++ b/src/Mod/Path/PathScripts/PathPocketShapeGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -40,7 +38,7 @@ __title__ = "Path Pocket Shape Operation UI" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Pocket Shape operation page controller and command implementation." def translate(context, text, disambig=None): diff --git a/src/Mod/Path/PathScripts/PathPost.py b/src/Mod/Path/PathScripts/PathPost.py index bfc0f35ea45e..c984fafa1da9 100644 --- a/src/Mod/Path/PathScripts/PathPost.py +++ b/src/Mod/Path/PathScripts/PathPost.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2015 Dan Falck * # * * # * This program is free software; you can redistribute it and/or modify * @@ -21,6 +19,7 @@ # * USA * # * * # *************************************************************************** + ''' Post Process command that will make use of the Output File and Post Processor entries in PathJob ''' from __future__ import print_function diff --git a/src/Mod/Path/PathScripts/PathPostProcessor.py b/src/Mod/Path/PathScripts/PathPostProcessor.py index 605786f84513..05dcd3e83b83 100644 --- a/src/Mod/Path/PathScripts/PathPostProcessor.py +++ b/src/Mod/Path/PathScripts/PathPostProcessor.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2014 Yorik van Havre * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathPreferences.py b/src/Mod/Path/PathScripts/PathPreferences.py index 65eeefad5938..ad6d2d558525 100644 --- a/src/Mod/Path/PathScripts/PathPreferences.py +++ b/src/Mod/Path/PathScripts/PathPreferences.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2014 Yorik van Havre * # * * # * This program is free software; you can redistribute it and/or modify * @@ -210,7 +208,7 @@ def defaultOutputPolicy(): def defaultStockTemplate(): return preferences().GetString(DefaultStockTemplate, "") - + def setDefaultStockTemplate(template): preferences().SetString(DefaultStockTemplate, template) @@ -225,24 +223,24 @@ def experimentalFeaturesEnabled(): def lastPathToolBit(): return preferences().GetString(LastPathToolBit, pathDefaultToolsPath('Bit')) - + def setLastPathToolBit(path): return preferences().SetString(LastPathToolBit, path) def lastPathToolLibrary(): return preferences().GetString(LastPathToolLibrary, pathDefaultToolsPath('Library')) - + def setLastPathToolLibrary(path): return preferences().SetString(LastPathToolLibrary, path) def lastPathToolShape(): return preferences().GetString(LastPathToolShape, pathDefaultToolsPath('Shape')) - + def setLastPathToolShape(path): return preferences().SetString(LastPathToolShape, path) def lastPathToolTable(): return preferences().GetString(LastPathToolTable, "") - + def setLastPathToolTable(table): return preferences().SetString(LastPathToolTable, table) diff --git a/src/Mod/Path/PathScripts/PathPreferencesPathDressup.py b/src/Mod/Path/PathScripts/PathPreferencesPathDressup.py index a8b52a777bad..1285546204f4 100644 --- a/src/Mod/Path/PathScripts/PathPreferencesPathDressup.py +++ b/src/Mod/Path/PathScripts/PathPreferencesPathDressup.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2016 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathPreferencesPathJob.py b/src/Mod/Path/PathScripts/PathPreferencesPathJob.py index a6d1a392e1d8..e6844152889d 100644 --- a/src/Mod/Path/PathScripts/PathPreferencesPathJob.py +++ b/src/Mod/Path/PathScripts/PathPreferencesPathJob.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2014 Yorik van Havre * # * * # * This program is free software; you can redistribute it and/or modify * @@ -218,7 +216,7 @@ def loadStockSettings(self): rotZ = attrs.get('rotZ') rotW = attrs.get('rotW') if posX is not None and posY is not None and posZ is not None and rotX is not None and rotY is not None and rotZ is not None and rotW is not None: - pos = FreeCAD.Vector(float(posX), float(posY), float(posZ)) + pos = FreeCAD.Vector(float(posX), float(posY), float(posZ)) rot = FreeCAD.Rotation(float(rotX), float(rotY), float(rotZ), float(rotW)) placement = FreeCAD.Placement(pos, rot) self.form.stockPlacementGroup.setChecked(True) diff --git a/src/Mod/Path/PathScripts/PathProbe.py b/src/Mod/Path/PathScripts/PathProbe.py index c540ac7b722d..f555b00075d5 100644 --- a/src/Mod/Path/PathScripts/PathProbe.py +++ b/src/Mod/Path/PathScripts/PathProbe.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2018 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathProbeGui.py b/src/Mod/Path/PathScripts/PathProbeGui.py index 3a3657acc4ab..55809a92b7f7 100644 --- a/src/Mod/Path/PathScripts/PathProbeGui.py +++ b/src/Mod/Path/PathScripts/PathProbeGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathProfile.py b/src/Mod/Path/PathScripts/PathProfile.py index 6e14371688af..7fb10fe97947 100644 --- a/src/Mod/Path/PathScripts/PathProfile.py +++ b/src/Mod/Path/PathScripts/PathProfile.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2014 Yorik van Havre * # * Copyright (c) 2016 sliptonic * # * Copyright (c) 2020 Schildkroet * @@ -570,7 +568,7 @@ def _analyzeFace(self, obj, base, sub, shape, subCount): angle -= 180.0 if rtn is True: - PathLog.debug(translate("Path", "Face appears misaligned after initial rotation.")) + PathLog.debug(translate("Path", "Face appears misaligned after initial rotation.")) if obj.AttemptInverseAngle is True: PathLog.debug(translate("Path", "Applying inverse angle automatically.")) (clnBase, clnStock, angle) = self.applyInverseAngle(obj, clnBase, clnStock, axis, angle) diff --git a/src/Mod/Path/PathScripts/PathProfileContour.py b/src/Mod/Path/PathScripts/PathProfileContour.py index dfaf43dcb28b..e743cdc8eb30 100644 --- a/src/Mod/Path/PathScripts/PathProfileContour.py +++ b/src/Mod/Path/PathScripts/PathProfileContour.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2016 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -29,7 +27,7 @@ __title__ = "Path Contour Operation (depreciated)" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Implementation of the Contour operation (depreciated)." diff --git a/src/Mod/Path/PathScripts/PathProfileContourGui.py b/src/Mod/Path/PathScripts/PathProfileContourGui.py index 74277be7d268..02640d721c09 100644 --- a/src/Mod/Path/PathScripts/PathProfileContourGui.py +++ b/src/Mod/Path/PathScripts/PathProfileContourGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -32,12 +30,12 @@ __title__ = "Path Contour Operation UI (depreciated)" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Contour operation page controller and command implementation (depreciated)." class TaskPanelOpPage(PathProfileGui.TaskPanelOpPage): - '''Psuedo page controller class for Profile operation, + '''Psuedo page controller class for Profile operation, allowing for backward compatibility with pre-existing "Contour" operations.''' pass # Eclass diff --git a/src/Mod/Path/PathScripts/PathProfileEdges.py b/src/Mod/Path/PathScripts/PathProfileEdges.py index e23668c4baf2..26a28e701ab7 100644 --- a/src/Mod/Path/PathScripts/PathProfileEdges.py +++ b/src/Mod/Path/PathScripts/PathProfileEdges.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2016 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -29,7 +27,7 @@ __title__ = "Path Profile Edges Operation (depreciated)" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Path Profile operation based on edges (depreciated)." __contributors__ = "russ4262 (Russell Johnson)" diff --git a/src/Mod/Path/PathScripts/PathProfileEdgesGui.py b/src/Mod/Path/PathScripts/PathProfileEdgesGui.py index 9f156d5d7177..26bc7b0c488e 100644 --- a/src/Mod/Path/PathScripts/PathProfileEdgesGui.py +++ b/src/Mod/Path/PathScripts/PathProfileEdgesGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -32,12 +30,12 @@ __title__ = "Path Profile Edges Operation UI (depreciated)" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Profile Edges operation page controller and command implementation (depreciated)." class TaskPanelOpPage(PathProfileGui.TaskPanelOpPage): - '''Psuedo page controller class for Profile operation, + '''Psuedo page controller class for Profile operation, allowing for backward compatibility with pre-existing "Profile Edges" operations.''' pass # Eclass diff --git a/src/Mod/Path/PathScripts/PathProfileFaces.py b/src/Mod/Path/PathScripts/PathProfileFaces.py index 51845ca3294c..2896ab439023 100644 --- a/src/Mod/Path/PathScripts/PathProfileFaces.py +++ b/src/Mod/Path/PathScripts/PathProfileFaces.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2014 Yorik van Havre * # * Copyright (c) 2020 Schildkroet * # * * @@ -30,7 +28,7 @@ __title__ = "Path Profile Faces Operation (depreciated)" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Path Profile operation based on faces (depreciated)." __contributors__ = "Schildkroet" diff --git a/src/Mod/Path/PathScripts/PathProfileFacesGui.py b/src/Mod/Path/PathScripts/PathProfileFacesGui.py index b080a22eb175..40f66eb5ad05 100644 --- a/src/Mod/Path/PathScripts/PathProfileFacesGui.py +++ b/src/Mod/Path/PathScripts/PathProfileFacesGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -32,12 +30,12 @@ __title__ = "Path Profile Faces Operation UI (depreciated)" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Profile Faces operation page controller and command implementation (depreciated)." class TaskPanelOpPage(PathProfileGui.TaskPanelOpPage): - '''Psuedo page controller class for Profile operation, + '''Psuedo page controller class for Profile operation, allowing for backward compatibility with pre-existing "Profile Faces" operations.''' pass # Eclass diff --git a/src/Mod/Path/PathScripts/PathProfileGui.py b/src/Mod/Path/PathScripts/PathProfileGui.py index 0013bca58666..3d398fec6f67 100644 --- a/src/Mod/Path/PathScripts/PathProfileGui.py +++ b/src/Mod/Path/PathScripts/PathProfileGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathSanity.py b/src/Mod/Path/PathScripts/PathSanity.py index e7fc9d74d882..f602579a49a5 100644 --- a/src/Mod/Path/PathScripts/PathSanity.py +++ b/src/Mod/Path/PathScripts/PathSanity.py @@ -1,5 +1,5 @@ # *************************************************************************** -# * (c) Sliptonic (shopinthewoods@gmail.com) 2016 * +# * Copyright (c) 2016 sliptonic * # * * # * This file is part of the FreeCAD CAx development system. * # * * diff --git a/src/Mod/Path/PathScripts/PathSelection.py b/src/Mod/Path/PathScripts/PathSelection.py index 02406ae5ea54..d9e0d6b48214 100644 --- a/src/Mod/Path/PathScripts/PathSelection.py +++ b/src/Mod/Path/PathScripts/PathSelection.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2015 Dan Falck * # * * # * This program is free software; you can redistribute it and/or modify * @@ -21,6 +19,7 @@ # * USA * # * * # *************************************************************************** + '''Selection gates and observers to control selectability while building Path operations ''' import FreeCAD diff --git a/src/Mod/Path/PathScripts/PathSetupSheet.py b/src/Mod/Path/PathScripts/PathSetupSheet.py index e2a4bcd7819d..59f70967ac37 100644 --- a/src/Mod/Path/PathScripts/PathSetupSheet.py +++ b/src/Mod/Path/PathScripts/PathSetupSheet.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -31,7 +29,7 @@ __title__ = "Setup Sheet for a Job." __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "A container for all default values and job specific configuration values." _RegisteredOps = {} @@ -82,7 +80,7 @@ class SetupSheet: TemplateReference = '${SetupSheet}' DefaultSafeHeightOffset = '3 mm' - DefaultClearanceHeightOffset = '5 mm' + DefaultClearanceHeightOffset = '5 mm' DefaultSafeHeightExpression = "OpStockZMax+${SetupSheet}.SafeHeightOffset" DefaultClearanceHeightExpression = "OpStockZMax+${SetupSheet}.ClearanceHeightOffset" @@ -90,8 +88,8 @@ class SetupSheet: DefaultFinalDepthExpression = 'OpFinalDepth' DefaultStepDownExpression = 'OpToolDiameter' - DefaultCoolantModes = ['None', 'Flood', 'Mist'] - + DefaultCoolantModes = ['None', 'Flood', 'Mist'] + def __init__(self, obj): self.obj = obj obj.addProperty('App::PropertySpeed', 'VertRapid', 'ToolController', translate('PathSetupSheet', 'Default speed for horizontal rapid moves.')) @@ -273,7 +271,7 @@ def onDocumentRestored(self, obj): if not hasattr(obj, 'CoolantModes'): obj.addProperty('App::PropertyStringList', 'CoolantModes', 'CoolantMode', translate('PathSetupSheet', 'Coolant Modes')) obj.CoolantModes = self.DefaultCoolantModes - + if not hasattr(obj, 'CoolantMode'): obj.addProperty('App::PropertyEnumeration', 'CoolantMode', 'CoolantMode', translate('PathSetupSheet', 'Default coolant mode.')) diff --git a/src/Mod/Path/PathScripts/PathSetupSheetGui.py b/src/Mod/Path/PathScripts/PathSetupSheetGui.py index 5b5a75b2d65f..2d2257e80851 100644 --- a/src/Mod/Path/PathScripts/PathSetupSheetGui.py +++ b/src/Mod/Path/PathScripts/PathSetupSheetGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2018 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -36,7 +34,7 @@ __title__ = "Setup Sheet Editor" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Task panel editor for a SetupSheet" # Qt translation handling diff --git a/src/Mod/Path/PathScripts/PathSetupSheetOpPrototype.py b/src/Mod/Path/PathScripts/PathSetupSheetOpPrototype.py index a162bb4e04b3..05c5c9bd7311 100644 --- a/src/Mod/Path/PathScripts/PathSetupSheetOpPrototype.py +++ b/src/Mod/Path/PathScripts/PathSetupSheetOpPrototype.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2018 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -26,7 +24,7 @@ __title__ = "Setup Sheet for a Job." __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Prototype objects to allow extraction of setup sheet values and editing." diff --git a/src/Mod/Path/PathScripts/PathSetupSheetOpPrototypeGui.py b/src/Mod/Path/PathScripts/PathSetupSheetOpPrototypeGui.py index d648ca6a6292..fa37d2944d51 100644 --- a/src/Mod/Path/PathScripts/PathSetupSheetOpPrototypeGui.py +++ b/src/Mod/Path/PathScripts/PathSetupSheetOpPrototypeGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2018 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -30,7 +28,7 @@ __title__ = "Setup Sheet Editor" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Task panel editor for a SetupSheet" # Qt translation handling diff --git a/src/Mod/Path/PathScripts/PathSimpleCopy.py b/src/Mod/Path/PathScripts/PathSimpleCopy.py index 8dbe179bcea6..276648d0de15 100644 --- a/src/Mod/Path/PathScripts/PathSimpleCopy.py +++ b/src/Mod/Path/PathScripts/PathSimpleCopy.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # *************************************************************************** -# * * # * Copyright (c) 2015 Yorik van Havre * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathSimulatorGui.py b/src/Mod/Path/PathScripts/PathSimulatorGui.py index de877bd207b4..b1dd8aeedc1f 100644 --- a/src/Mod/Path/PathScripts/PathSimulatorGui.py +++ b/src/Mod/Path/PathScripts/PathSimulatorGui.py @@ -1,3 +1,25 @@ +# -*- coding: utf-8 -*- +# *************************************************************************** +# * Copyright (c) 2017 Shai Seger * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * This program is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with this program; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# *************************************************************************** + import FreeCAD import Path import PathScripts.PathDressup as PathDressup diff --git a/src/Mod/Path/PathScripts/PathSlot.py b/src/Mod/Path/PathScripts/PathSlot.py index 6193ce5cd816..2fdfcd5079e1 100644 --- a/src/Mod/Path/PathScripts/PathSlot.py +++ b/src/Mod/Path/PathScripts/PathSlot.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2020 Russell Johnson (russ4262) * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathSlotGui.py b/src/Mod/Path/PathScripts/PathSlotGui.py index 7180c8dc43f1..9db6c704b7ce 100644 --- a/src/Mod/Path/PathScripts/PathSlotGui.py +++ b/src/Mod/Path/PathScripts/PathSlotGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2020 Russell Johnson (russ4262) * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathStock.py b/src/Mod/Path/PathScripts/PathStock.py index aa59109eb24c..93bc5e8a2833 100644 --- a/src/Mod/Path/PathScripts/PathStock.py +++ b/src/Mod/Path/PathScripts/PathStock.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # *************************************************************************** -# * * # * Copyright (c) 2015 Dan Falck * # * * # * This program is free software; you can redistribute it and/or modify * @@ -20,7 +19,8 @@ # * USA * # * * # *************************************************************************** -'''used to create material stock around a machined part- for visualization ''' + +'''Used to create material stock around a machined part - for visualization''' import FreeCAD import PathScripts.PathIconViewProvider as PathIconViewProvider @@ -367,7 +367,7 @@ def CreateFromTemplate(job, template): rotZ = template.get('rotZ') rotW = template.get('rotW') if posX is not None and posY is not None and posZ is not None and rotX is not None and rotY is not None and rotZ is not None and rotW is not None: - pos = FreeCAD.Vector(float(posX), float(posY), float(posZ)) + pos = FreeCAD.Vector(float(posX), float(posY), float(posZ)) rot = FreeCAD.Rotation(float(rotX), float(rotY), float(rotZ), float(rotW)) placement = FreeCAD.Placement(pos, rot) elif posX is not None or posY is not None or posZ is not None or rotX is not None or rotY is not None or rotZ is not None or rotW is not None: diff --git a/src/Mod/Path/PathScripts/PathStop.py b/src/Mod/Path/PathScripts/PathStop.py index 9015fb101f4c..e669bd757753 100644 --- a/src/Mod/Path/PathScripts/PathStop.py +++ b/src/Mod/Path/PathScripts/PathStop.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # *************************************************************************** -# * * # * Copyright (c) 2015 Dan Falck * # * * # * This program is free software; you can redistribute it and/or modify * @@ -20,7 +19,8 @@ # * USA * # * * # *************************************************************************** -''' Used for CNC machine Stops for Path module. Create an Optional or Mandatory Stop.''' + +'''Used for CNC machine Stops for Path module. Create an Optional or Mandatory Stop.''' import FreeCAD import FreeCADGui diff --git a/src/Mod/Path/PathScripts/PathSurface.py b/src/Mod/Path/PathScripts/PathSurface.py index 0d72fac607c0..fdc76a717aae 100644 --- a/src/Mod/Path/PathScripts/PathSurface.py +++ b/src/Mod/Path/PathScripts/PathSurface.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2016 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -27,7 +25,7 @@ __title__ = "Path Surface Operation" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Class and implementation of 3D Surface operation." __contributors__ = "russ4262 (Russell Johnson)" diff --git a/src/Mod/Path/PathScripts/PathSurfaceGui.py b/src/Mod/Path/PathScripts/PathSurfaceGui.py index bd428b90c78a..07f83703cc46 100644 --- a/src/Mod/Path/PathScripts/PathSurfaceGui.py +++ b/src/Mod/Path/PathScripts/PathSurfaceGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -32,7 +30,7 @@ __title__ = "Path Surface Operation UI" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Surface operation page controller and command implementation." diff --git a/src/Mod/Path/PathScripts/PathSurfaceSupport.py b/src/Mod/Path/PathScripts/PathSurfaceSupport.py index fc813bcf5b71..7f73747280e4 100644 --- a/src/Mod/Path/PathScripts/PathSurfaceSupport.py +++ b/src/Mod/Path/PathScripts/PathSurfaceSupport.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2020 russ4262 * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathToolBit.py b/src/Mod/Path/PathScripts/PathToolBit.py index 78a564658bf7..d04473923d56 100644 --- a/src/Mod/Path/PathScripts/PathToolBit.py +++ b/src/Mod/Path/PathScripts/PathToolBit.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2019 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -41,7 +39,7 @@ __title__ = "Tool bits." __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Class to deal with and represent a tool bit." # PathLog.setLevel(PathLog.Level.DEBUG, PathLog.thisModule()) diff --git a/src/Mod/Path/PathScripts/PathToolBitCmd.py b/src/Mod/Path/PathScripts/PathToolBitCmd.py index b172a0aa4327..f968cc748a46 100644 --- a/src/Mod/Path/PathScripts/PathToolBitCmd.py +++ b/src/Mod/Path/PathScripts/PathToolBitCmd.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2019 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathToolBitEdit.py b/src/Mod/Path/PathScripts/PathToolBitEdit.py index cd762a54ebe3..a8e76cf20e8e 100644 --- a/src/Mod/Path/PathScripts/PathToolBitEdit.py +++ b/src/Mod/Path/PathScripts/PathToolBitEdit.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2019 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathToolBitGui.py b/src/Mod/Path/PathScripts/PathToolBitGui.py index ae21e0517246..9702dfe4693a 100644 --- a/src/Mod/Path/PathScripts/PathToolBitGui.py +++ b/src/Mod/Path/PathScripts/PathToolBitGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2019 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -35,7 +33,7 @@ __title__ = "Tool Bit UI" __author__ = "sliptonic (Brad Collette)" -__url__ = "http://www.freecadweb.org" +__url__ = "https://www.freecadweb.org" __doc__ = "Task panel editor for a ToolBit" # Qt translation handling diff --git a/src/Mod/Path/PathScripts/PathToolBitLibraryCmd.py b/src/Mod/Path/PathScripts/PathToolBitLibraryCmd.py index e418192b60c2..10ad5781963d 100644 --- a/src/Mod/Path/PathScripts/PathToolBitLibraryCmd.py +++ b/src/Mod/Path/PathScripts/PathToolBitLibraryCmd.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2019 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathToolBitLibraryGui.py b/src/Mod/Path/PathScripts/PathToolBitLibraryGui.py index 7694175f1f68..2dbb4c0ce9ab 100644 --- a/src/Mod/Path/PathScripts/PathToolBitLibraryGui.py +++ b/src/Mod/Path/PathScripts/PathToolBitLibraryGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2019 sliptonic * # * Copyright (c) 2020 Schildkroet * # * * diff --git a/src/Mod/Path/PathScripts/PathToolController.py b/src/Mod/Path/PathScripts/PathToolController.py index 83695ce9a649..a3c315288e1a 100644 --- a/src/Mod/Path/PathScripts/PathToolController.py +++ b/src/Mod/Path/PathScripts/PathToolController.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2015 Dan Falck * # * * # * This program is free software; you can redistribute it and/or modify * @@ -21,7 +19,8 @@ # * USA * # * * # *************************************************************************** -''' Tool Controller defines tool, spindle speed and feed rates for Path Operations ''' + +'''Tool Controller defines tool, spindle speed and feed rates for Path Operations''' import FreeCAD import Path diff --git a/src/Mod/Path/PathScripts/PathToolControllerGui.py b/src/Mod/Path/PathScripts/PathToolControllerGui.py index f71658172ae7..c290abb29924 100644 --- a/src/Mod/Path/PathScripts/PathToolControllerGui.py +++ b/src/Mod/Path/PathScripts/PathToolControllerGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2019 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathToolEdit.py b/src/Mod/Path/PathScripts/PathToolEdit.py index 3c5cbb266be1..4268bfa03303 100644 --- a/src/Mod/Path/PathScripts/PathToolEdit.py +++ b/src/Mod/Path/PathScripts/PathToolEdit.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2018 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathToolLibraryEditor.py b/src/Mod/Path/PathScripts/PathToolLibraryEditor.py index 4312cd36bc2e..83c8dbfcfe8d 100644 --- a/src/Mod/Path/PathScripts/PathToolLibraryEditor.py +++ b/src/Mod/Path/PathScripts/PathToolLibraryEditor.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2014 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -49,7 +47,7 @@ def __init__(self, job, cb): self.form = FreeCADGui.PySideUic.loadUi(":/panels/ToolLibraryEditor.ui") self.TLM = ToolLibraryManager.ToolLibraryManager() listname = self.TLM.getCurrentTableName() - + if listname: self.loadToolTables() @@ -159,7 +157,7 @@ def moveDown(self): if item: number = int(item) listname = self.TLM.getCurrentTableName() - success, newNum = self.TLM.movedown(number, listname) + success, newNum = self.TLM.movedown(number, listname) if success: self.loadTable(listname) self.updateSelection(newNum) @@ -204,7 +202,7 @@ def toolSelectionChanged(self, index=None): ''' updates the ui when tools are selected''' if index: self.form.ToolsList.selectRow(index.row()) - + self.form.btnCopyTools.setEnabled(False) self.form.ButtonDelete.setEnabled(False) self.form.ButtonUp.setEnabled(False) @@ -224,8 +222,8 @@ def toolSelectionChanged(self, index=None): # only allow moving or deleting a single tool at a time. if checkCount == 1: - #make sure the row is highlighted when the check box gets ticked - self.form.ToolsList.selectRow(checkList[0]) + #make sure the row is highlighted when the check box gets ticked + self.form.ToolsList.selectRow(checkList[0]) self.form.ButtonDelete.setEnabled(True) self.form.ButtonUp.setEnabled(True) self.form.ButtonDown.setEnabled(True) @@ -296,7 +294,7 @@ def loadTable(self, name): if tooldata: self.form.ToolsList.setModel(tooldata) self.form.ToolsList.resizeColumnsToContents() - self.form.ToolsList.horizontalHeader().setResizeMode(self.form.ToolsList.model().columnCount() - 1, QtGui.QHeaderView.Stretch) + self.form.ToolsList.horizontalHeader().setResizeMode(self.form.ToolsList.model().columnCount() - 1, QtGui.QHeaderView.Stretch) self.setCurrentToolTableByName(name) def addNewToolTable(self): @@ -304,7 +302,7 @@ def addNewToolTable(self): name = self.TLM.addNewToolTable() self.loadToolTables() self.loadTable(name) - + def loadToolTables(self): ''' Load list of available tool tables ''' self.form.TableList.clear() @@ -328,7 +326,7 @@ def reloadReset(self): ''' reloads the current tooltable''' name = self.TLM.getCurrentTableName() self.loadTable(name) - + def setCurrentToolTableByName(self, name): ''' get the current tool table ''' item = self.getToolTableByName(name) @@ -347,7 +345,7 @@ def removeToolTable(self): ''' delete the selected tool table ''' self.TLM.deleteToolTable() self.loadToolTables() - + def renameTable(self): ''' provides dialog for new tablename and renames the selected tool table''' name = self.TLM.getCurrentTableName() @@ -373,10 +371,10 @@ def setupUi(self): self.form.ButtonEdit.clicked.connect(self.editTool) self.form.ButtonDuplicate.clicked.connect(self.duplicate) self.form.btnCopyTools.clicked.connect(self.copyTools) - + self.form.ToolsList.doubleClicked.connect(self.editTool) self.form.ToolsList.clicked.connect(self.toolSelectionChanged) - + self.form.TableList.clicked.connect(self.tableSelected) self.form.TableList.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) self.form.TableList.itemChanged.connect(self.renameTable) @@ -391,13 +389,13 @@ def setupUi(self): self.setFields() class ToolTableListWidgetItem(QtGui.QWidget): - + toolMoved = QtCore.Signal() - + def __init__(self, TLM): super(ToolTableListWidgetItem, self).__init__() - - self.tlm = TLM + + self.tlm = TLM self.setAcceptDrops(True) self.mainLayout = QtGui.QHBoxLayout() @@ -420,17 +418,17 @@ def setIcon (self, icon): def dragEnterEvent(self, e): currentToolTable = self.tlm.getCurrentTableName() thisToolTable = self.getTableName() - + if not currentToolTable == thisToolTable: e.accept() else: - e.ignore() + e.ignore() def dropEvent(self, e): selectedTools = e.source().selectedIndexes() if selectedTools: toolData = selectedTools[1].data() - + if toolData: self.tlm.moveToTable(int(toolData), self.getTableName()) self.toolMoved.emit() diff --git a/src/Mod/Path/PathScripts/PathToolLibraryManager.py b/src/Mod/Path/PathScripts/PathToolLibraryManager.py index 2ad794413cf7..a352840597c9 100644 --- a/src/Mod/Path/PathScripts/PathToolLibraryManager.py +++ b/src/Mod/Path/PathScripts/PathToolLibraryManager.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2014 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -168,7 +166,7 @@ def getCurrentTableName(self): def getCurrentTable(self): ''' returns an object of the current tool table ''' return self.getTableFromName(self.currentTableName) - + def getTableFromName(self, name): ''' get the tool table object from the name ''' for table in self.toolTables: @@ -178,15 +176,15 @@ def getTableFromName(self, name): def getNextToolTableName(self, tableName='Tool Table'): ''' get a unique name for a new tool table ''' iter = 1 - tempName = tableName[-2:] + tempName = tableName[-2:] if tempName[0] == '-' and tempName[-1].isdigit(): tableName = tableName[:-2] while any(table.Name == tableName + '-' + str(iter) for table in self.toolTables): - iter += 1 - - return tableName + '-' + str(iter) + iter += 1 + + return tableName + '-' + str(iter) def addNewToolTable(self): ''' creates a new tool table ''' @@ -201,7 +199,7 @@ def addNewToolTable(self): def deleteToolTable(self): ''' deletes the selected tool table ''' if len(self.toolTables): - index = next((index for (index, d) in enumerate(self.toolTables) if d.Name == self.currentTableName), None) + index = next((index for (index, d) in enumerate(self.toolTables) if d.Name == self.currentTableName), None) self.toolTables.pop(index) self.saveMainLibrary() @@ -219,7 +217,7 @@ def renameToolTable(self, newName, index): tt.Name = newName self.saveMainLibrary() return True - + def templateAttrs(self): ''' gets the tool table arributes ''' @@ -235,12 +233,12 @@ def templateAttrs(self): tableData['Tools'] = toolData toolTables.append(tableData) - + return toolTables def tooltableFromAttrs(self, stringattrs): if stringattrs.get('Version') and 1 == int(stringattrs['Version']): - + tt = Path.Tooltable() tt.Version = 1 tt.Name = self.getNextToolTableName() @@ -252,9 +250,9 @@ def tooltableFromAttrs(self, stringattrs): tt.Name = stringattrs.get('TableName') if any(table.Name == tt.Name for table in self.toolTables): tt.Name = self.getNextToolTableName(tt.Name) - + for key, attrs in PathUtil.keyValueIter(stringattrs['Tools']): - tool = Path.Tool() + tool = Path.Tool() tool.Name = str(attrs["name"]) tool.ToolType = str(attrs["tooltype"]) tool.Material = str(attrs["material"]) @@ -316,7 +314,7 @@ def getJobList(self): if hasattr(o, "Proxy"): if isinstance(o.Proxy, PathScripts.PathJob.ObjectJob): tablelist.append(o.Label) - + return tablelist def getTool(self, listname, toolnum): @@ -394,14 +392,14 @@ def read(self, filename, listname): if isinstance(tableData, list): for table in tableData: - ht = self.tooltableFromAttrs(table) + ht = self.tooltableFromAttrs(table) if ht: importedTables.append(ht) if importedTables: for tt in importedTables: self.toolTables.append(tt) - + self.saveMainLibrary() return True else: diff --git a/src/Mod/Path/PathScripts/PathUtil.py b/src/Mod/Path/PathScripts/PathUtil.py index d65b4a21772c..40e59a78af87 100644 --- a/src/Mod/Path/PathScripts/PathUtil.py +++ b/src/Mod/Path/PathScripts/PathUtil.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathUtils.py b/src/Mod/Path/PathScripts/PathUtils.py index 5662feddf8b9..e78b1cfb2d1b 100644 --- a/src/Mod/Path/PathScripts/PathUtils.py +++ b/src/Mod/Path/PathScripts/PathUtils.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2014 Dan Falck * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathUtilsGui.py b/src/Mod/Path/PathScripts/PathUtilsGui.py index d8f9d3f8f8e8..da3398701737 100644 --- a/src/Mod/Path/PathScripts/PathUtilsGui.py +++ b/src/Mod/Path/PathScripts/PathUtilsGui.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2019 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathScripts/PathVcarve.py b/src/Mod/Path/PathScripts/PathVcarve.py index ea8f5660b8fd..51609933a0cd 100644 --- a/src/Mod/Path/PathScripts/PathVcarve.py +++ b/src/Mod/Path/PathScripts/PathVcarve.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- - # *************************************************************************** # * * # * Copyright (c) 2020 sliptonic * diff --git a/src/Mod/Path/PathScripts/PathVcarveGui.py b/src/Mod/Path/PathScripts/PathVcarveGui.py index ca7ee596a4b8..d2823939d76c 100644 --- a/src/Mod/Path/PathScripts/PathVcarveGui.py +++ b/src/Mod/Path/PathScripts/PathVcarveGui.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- - # *************************************************************************** # * * # * Copyright (c) 2017 sliptonic * diff --git a/src/Mod/Path/PathScripts/PathWaterline.py b/src/Mod/Path/PathScripts/PathWaterline.py index ec71fbe9254d..a314f7089396 100644 --- a/src/Mod/Path/PathScripts/PathWaterline.py +++ b/src/Mod/Path/PathScripts/PathWaterline.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- - # *************************************************************************** # * * # * Copyright (c) 2019 Russell Johnson (russ4262) * diff --git a/src/Mod/Path/PathScripts/PathWaterlineGui.py b/src/Mod/Path/PathScripts/PathWaterlineGui.py index a360ac6a779a..2fe16a6ff139 100644 --- a/src/Mod/Path/PathScripts/PathWaterlineGui.py +++ b/src/Mod/Path/PathScripts/PathWaterlineGui.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- - # *************************************************************************** # * * # * Copyright (c) 2020 sliptonic * diff --git a/src/Mod/Path/PathScripts/PostUtils.py b/src/Mod/Path/PathScripts/PostUtils.py index 5acadafc790b..920894603b6d 100644 --- a/src/Mod/Path/PathScripts/PostUtils.py +++ b/src/Mod/Path/PathScripts/PostUtils.py @@ -1,5 +1,5 @@ #*************************************************************************** -#* (c) Yorik van Havre (yorik@uncreated.net) 2014 * +#* Copyright (c) 2014 Yorik van Havre * #* * #* This file is part of the FreeCAD CAx development system. * #* * @@ -19,8 +19,7 @@ #* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * #* USA * #* * -#***************************************************************************/ - +#*************************************************************************** ''' These are a common functions and classes for creating custom post processors. @@ -121,7 +120,7 @@ def stringsplit(commandline): for word in wordlist[1:]: returndict[word[0]] = word[1:] - return returndict + return returndict def fmt(num,dec,units): ''' used to format axis moves, feedrate, etc for decimal places and units''' @@ -133,17 +132,17 @@ def fmt(num,dec,units): def editor(gcode): '''pops up a handy little editor to look at the code output ''' - + prefs = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Path") # default Max Highlighter Size = 512 Ko - defaultMHS = 512 * 1024 + defaultMHS = 512 * 1024 mhs = prefs.GetUnsigned('inspecteditorMaxHighlighterSize', defaultMHS) - + dia = GCodeEditorDialog() dia.editor.setText(gcode) gcodeSize = len(dia.editor.toPlainText()) if (gcodeSize <= mhs): - # because of poor performance, syntax highlighting is + # because of poor performance, syntax highlighting is # limited to mhs octets (default 512 KB). # It seems than the response time curve has an inflexion near 500 KB # beyond 500 KB, the response time increases exponentially. diff --git a/src/Mod/Path/PathScripts/post/centroid_post.py b/src/Mod/Path/PathScripts/post/centroid_post.py index d19f6831d815..002a325ab1c8 100644 --- a/src/Mod/Path/PathScripts/post/centroid_post.py +++ b/src/Mod/Path/PathScripts/post/centroid_post.py @@ -1,5 +1,6 @@ +# -*- coding: utf-8 -*- # *************************************************************************** -# * Copyright (c) 2015 Dan Falck * +# * Copyright (c) 2015 Dan Falck * # * * # * This file is part of the FreeCAD CAx development system. * # * * @@ -19,7 +20,8 @@ # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * # * USA * # * * -# ***************************************************************************/ +# *************************************************************************** + from __future__ import print_function import FreeCAD from FreeCAD import Units diff --git a/src/Mod/Path/PathScripts/post/comparams_post.py b/src/Mod/Path/PathScripts/post/comparams_post.py index 672120a22d17..684537105368 100644 --- a/src/Mod/Path/PathScripts/post/comparams_post.py +++ b/src/Mod/Path/PathScripts/post/comparams_post.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2015 Dan Falck * # * * # * This program is free software; you can redistribute it and/or modify * @@ -21,11 +19,12 @@ # * USA * # * * # *************************************************************************** + import FreeCAD import Path import PathScripts.PostUtils as PostUtils -TOOLTIP = ''' Example Post, using Path.Commands instead of Path.toGCode strings for Path gcode output. ''' +TOOLTIP = '''Example Post, using Path.Commands instead of Path.toGCode strings for Path gcode output.''' SHOW_EDITOR = True diff --git a/src/Mod/Path/PathScripts/post/dumper_post.py b/src/Mod/Path/PathScripts/post/dumper_post.py index 5683e2c47da6..197d2f8ced94 100644 --- a/src/Mod/Path/PathScripts/post/dumper_post.py +++ b/src/Mod/Path/PathScripts/post/dumper_post.py @@ -1,5 +1,5 @@ # *************************************************************************** -# * (c) sliptonic (shopinthewoods@gmail.com) 2014 * +# * Copyright (c) 2014 sliptonic * # * * # * This file is part of the FreeCAD CAx development system. * # * * @@ -19,7 +19,8 @@ # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * # * USA * # * * -# ***************************************************************************/ +# *************************************************************************** + from __future__ import print_function TOOLTIP=''' diff --git a/src/Mod/Path/PathScripts/post/dynapath_post.py b/src/Mod/Path/PathScripts/post/dynapath_post.py index 78eec1c95e9b..f59ee7c40e40 100644 --- a/src/Mod/Path/PathScripts/post/dynapath_post.py +++ b/src/Mod/Path/PathScripts/post/dynapath_post.py @@ -1,5 +1,5 @@ # *************************************************************************** -# * (c) sliptonic (shopinthewoods@gmail.com) 2014 * +# * Copyright (c) 2014 sliptonic * # * * # * This file is part of the FreeCAD CAx development system. * # * * diff --git a/src/Mod/Path/PathScripts/post/example_post.py b/src/Mod/Path/PathScripts/post/example_post.py index cc02939fa2bd..4509b4d21677 100644 --- a/src/Mod/Path/PathScripts/post/example_post.py +++ b/src/Mod/Path/PathScripts/post/example_post.py @@ -1,5 +1,5 @@ # *************************************************************************** -# * (c) Yorik van Havre (yorik@uncreated.net) 2014 * +# * Copyright (c) 2014 Yorik van Havre * # * * # * This file is part of the FreeCAD CAx development system. * # * * @@ -19,7 +19,8 @@ # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * # * USA * # * * -# ***************************************************************************/ +# *************************************************************************** + from __future__ import print_function TOOLTIP=''' diff --git a/src/Mod/Path/PathScripts/post/example_pre.py b/src/Mod/Path/PathScripts/post/example_pre.py index 18e2abe79bc3..802764cfd1eb 100644 --- a/src/Mod/Path/PathScripts/post/example_pre.py +++ b/src/Mod/Path/PathScripts/post/example_pre.py @@ -1,5 +1,5 @@ # *************************************************************************** -# * (c) Yorik van Havre (yorik@uncreated.net) 2014 * +# * Copyright (c) 2014 Yorik van Havre * # * * # * This file is part of the FreeCAD CAx development system. * # * * @@ -19,7 +19,7 @@ # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * # * USA * # * * -# ***************************************************************************/ +# *************************************************************************** ''' diff --git a/src/Mod/Path/PathScripts/post/fablin_post.py b/src/Mod/Path/PathScripts/post/fablin_post.py index ddd6c8b55735..3b6aca293a51 100644 --- a/src/Mod/Path/PathScripts/post/fablin_post.py +++ b/src/Mod/Path/PathScripts/post/fablin_post.py @@ -1,8 +1,8 @@ # *************************************************************************** -# * (c) imarin 2017 * +# * Copyright (c) 2017 imarin * # * * -# * heavily based on gbrl post-procesor by: * -# * (c) sliptonic (shopinthewoods@gmail.com) 2014 * +# * Heavily based on gbrl post-procesor by: * +# * Copyright (c) 2014 sliptonic * # * * # * This file is part of the FreeCAD CAx development system. * # * * @@ -22,7 +22,7 @@ # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * # * USA * # * * -# ***************************************************************************/ +# *************************************************************************** import datetime from PathScripts import PostUtils diff --git a/src/Mod/Path/PathScripts/post/gcode_pre.py b/src/Mod/Path/PathScripts/post/gcode_pre.py index 795192257b9a..648f57f7e803 100644 --- a/src/Mod/Path/PathScripts/post/gcode_pre.py +++ b/src/Mod/Path/PathScripts/post/gcode_pre.py @@ -1,5 +1,5 @@ # *************************************************************************** -# * (c) Yorik van Havre (yorik@uncreated.net) 2014 * +# * Copyright (c) 2014 Yorik van Havre * # * * # * This file is part of the FreeCAD CAx development system. * # * * diff --git a/src/Mod/Path/PathScripts/post/grbl_post.py b/src/Mod/Path/PathScripts/post/grbl_post.py index 33d319b4e4c4..47e3c92c87df 100755 --- a/src/Mod/Path/PathScripts/post/grbl_post.py +++ b/src/Mod/Path/PathScripts/post/grbl_post.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- # *************************************************************************** -# * * -# * (c) sliptonic (shopinthewoods@gmail.com) 2014 * -# * (c) Gauthier Briere - 2018, 2019 * -# * (c) Schildkroet - 2019-2020 * +# * Copyright (c) 2014 sliptonic * +# * Copyright (c) 2018, 2019 Gauthier Briere * +# * Copyright (c) 2019, 2020 Schildkroet * # * * # * This file is part of the FreeCAD CAx development system. * # * * @@ -23,7 +22,7 @@ # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * # * USA * # * * -# ***************************************************************************/ +# *************************************************************************** import FreeCAD from FreeCAD import Units @@ -220,7 +219,7 @@ def export(objectslist, filename, argstring): gcode += linenumber() + "(Exported by FreeCAD)\n" gcode += linenumber() + "(Post Processor: " + __name__ + ")\n" gcode += linenumber() + "(Output Time:" + str(datetime.datetime.now()) + ")\n" - + # Check canned cycles for drilling if TRANSLATE_DRILL_CYCLES: if len(SUPPRESS_COMMANDS) == 0: @@ -259,7 +258,7 @@ def export(objectslist, filename, argstring): if not hasattr(obj, "Path"): print("The object " + obj.Name + " is not a path. Please select only path and Compounds.") return - + # Skip inactive operations if PathUtil.opProperty(obj, 'Active') is False: continue @@ -273,7 +272,7 @@ def export(objectslist, filename, argstring): gcode += linenumber() + "(Begin operation: " + obj.Label + ")\n" for line in PRE_OPERATION.splitlines(True): gcode += linenumber() + line - + # get coolant mode coolantMode = 'None' if hasattr(obj, "CoolantMode") or hasattr(obj, 'Base') and hasattr(obj.Base, "CoolantMode"): @@ -431,7 +430,7 @@ def parse(pathobj): if command in ('G90', 'G91'): MOTION_MODE = command - + if TRANSLATE_DRILL_CYCLES: if command in ('G81', 'G82', 'G83'): @@ -503,12 +502,12 @@ def drill_translate(outstring, cmd, params): if RETRACT_Z < drill_Z : trBuff += linenumber() + "(drill cycle error: R less than Z )\n" return trBuff - + if MOTION_MODE == 'G91': # G91 relative movements - drill_X += CURRENT_X - drill_Y += CURRENT_Y - drill_Z += CURRENT_Z - RETRACT_Z += CURRENT_Z + drill_X += CURRENT_X + drill_Y += CURRENT_Y + drill_Z += CURRENT_Z + RETRACT_Z += CURRENT_Z if DRILL_RETRACT_MODE == 'G98' and CURRENT_Z >= RETRACT_Z: RETRACT_Z = CURRENT_Z @@ -530,16 +529,16 @@ def drill_translate(outstring, cmd, params): strF_Feedrate = ' F' + format(float(drill_feedrate.getValueAs(UNIT_SPEED_FORMAT)), '.2f') + "\n" print (strF_Feedrate) - # preliminary mouvement(s) + # preliminary mouvement(s) if CURRENT_Z < RETRACT_Z: trBuff += linenumber() + strG0_RETRACT_Z trBuff += linenumber() + 'G0 X' + format(float(drill_X.getValueAs(UNIT_FORMAT)), strFormat) + ' Y' + format(float(drill_Y.getValueAs(UNIT_FORMAT)), strFormat) + "\n" if CURRENT_Z > RETRACT_Z: # NIST GCODE 3.5.16.1 Preliminary and In-Between Motion says G0 to RETRACT_Z. Here use G1 since retract height may be below surface ! - trBuff += linenumber() + 'G1 Z' + format(float(RETRACT_Z.getValueAs(UNIT_FORMAT)), strFormat) + strF_Feedrate + trBuff += linenumber() + 'G1 Z' + format(float(RETRACT_Z.getValueAs(UNIT_FORMAT)), strFormat) + strF_Feedrate last_Stop_Z = RETRACT_Z - # drill moves + # drill moves if cmd in ('G81', 'G82'): trBuff += linenumber() + 'G1 Z' + format(float(drill_Z.getValueAs(UNIT_FORMAT)), strFormat) + strF_Feedrate # pause where applicable @@ -551,7 +550,7 @@ def drill_translate(outstring, cmd, params): while 1: if last_Stop_Z != RETRACT_Z : clearance_depth = last_Stop_Z + a_bit # rapid move to just short of last drilling depth - trBuff += linenumber() + 'G0 Z' + format(float(clearance_depth.getValueAs(UNIT_FORMAT)) , strFormat) + "\n" + trBuff += linenumber() + 'G0 Z' + format(float(clearance_depth.getValueAs(UNIT_FORMAT)) , strFormat) + "\n" next_Stop_Z = last_Stop_Z - drill_Step if next_Stop_Z > drill_Z: trBuff += linenumber() + 'G1 Z' + format(float(next_Stop_Z.getValueAs(UNIT_FORMAT)), strFormat) + strF_Feedrate @@ -561,10 +560,10 @@ def drill_translate(outstring, cmd, params): trBuff += linenumber() + 'G1 Z' + format(float(drill_Z.getValueAs(UNIT_FORMAT)), strFormat) + strF_Feedrate trBuff += linenumber() + strG0_RETRACT_Z break - + except Exception as e: pass - + if MOTION_MODE == 'G91': trBuff += linenumber() + 'G91' # Restore if changed diff --git a/src/Mod/Path/PathScripts/post/heidenhain_post.py b/src/Mod/Path/PathScripts/post/heidenhain_post.py index 90bccf37b78a..a0365eb12595 100644 --- a/src/Mod/Path/PathScripts/post/heidenhain_post.py +++ b/src/Mod/Path/PathScripts/post/heidenhain_post.py @@ -1,9 +1,5 @@ # -*- coding: UTF-8 -*- - #*************************************************************************** -#* * -#* heidenhain_post.py HEDENHAIN Post-Processor for FreeCAD * -#* * #* Copyright (C) 2020 Stefano Chiaro * #* * #* This library is free software; you can redistribute it and/or * @@ -22,6 +18,8 @@ #* 02110-1301 USA * #*************************************************************************** +# HEDENHAIN Post-Processor for FreeCAD + import FreeCAD from FreeCAD import Units import argparse @@ -219,7 +217,7 @@ def processArguments(argstring): global FIRST_LBL global SHOW_EDITOR global SKIP_WARNS - + try: args = parser.parse_args(shlex.split(argstring)) if args.skip_params: @@ -248,7 +246,7 @@ def processArguments(argstring): return False return True - + def export(objectslist, filename, argstring): if not processArguments(argstring): return None @@ -261,7 +259,7 @@ def export(objectslist, filename, argstring): global STORED_COMPENSATED_OBJ global COMPENSATION_DIFF_STATUS global LBLIZE_STAUS - + Object_Kind = None Feed_Rapid = False Feed = 0 @@ -275,7 +273,7 @@ def export(objectslist, filename, argstring): 'I', 'J', 'K', 'F', 'H', 'S', 'T', 'Q', 'R', 'L' ] - + for obj in objectslist: if not hasattr(obj, "Path"): print( @@ -289,7 +287,7 @@ def export(objectslist, filename, argstring): for obj in objectslist: Cmd_Count = 0 # command line number LBLIZE_STAUS = False - + # useful to get idea of object kind if isinstance (obj.Proxy, PathScripts.PathToolController.ToolController): Object_Kind = "TOOL" @@ -305,7 +303,7 @@ def export(objectslist, filename, argstring): if LBLIZE_ACTIVE: LBLIZE_STAUS = True elif isinstance (obj.Proxy, PathScripts.PathHelix.ObjectHelix): Object_Kind = "HELIX" - + # If used compensated path, store, recompute and diff when asked if hasattr(obj, 'UseComp') and SOLVE_COMPENSATION_ACTIVE: if obj.UseComp: @@ -313,7 +311,7 @@ def export(objectslist, filename, argstring): # Take a copy of compensated path STORED_COMPENSATED_OBJ = obj.Path.Commands # Find mill compensation - if hasattr(obj, 'Side') and hasattr(obj, 'Direction'): + if hasattr(obj, 'Side') and hasattr(obj, 'Direction'): if obj.Side == "Outside" and obj.Direction == "CW": Compensation = "L" elif obj.Side == "Outside" and obj.Direction == "CCW": @@ -358,8 +356,8 @@ def export(objectslist, filename, argstring): ) # we can try to solve compensation POSTGCODE.append("; COMPENSATION ACTIVE") - COMPENSATION_DIFF_STATUS[0] = True - + COMPENSATION_DIFF_STATUS[0] = True + for c in obj.Path.Commands: Cmd_Count += 1 outstring = [] @@ -378,23 +376,23 @@ def export(objectslist, filename, argstring): Spindle_RPM = c.Parameters['S'] # Could be deleted if tool it's OK elif param == 'T': ToolId = c.Parameters['T'] # Could be deleted if tool it's OK - + if command == 'G90': G_FUNCTION_STORE['G90'] = True G_FUNCTION_STORE['G91'] = False - + if command == 'G91': G_FUNCTION_STORE['G91'] = True G_FUNCTION_STORE['G90'] = False - + if command == 'G98': G_FUNCTION_STORE['G98'] = True G_FUNCTION_STORE['G99'] = False - + if command == 'G99': G_FUNCTION_STORE['G99'] = True G_FUNCTION_STORE['G98'] = False - + # Rapid movement if command == 'G0': Spindle_Status = "" @@ -411,7 +409,7 @@ def export(objectslist, filename, argstring): c.Parameters, Compensation, Feed, True, Spindle_Status, Cmd_Count ) if parsedElem != None: POSTGCODE.append(parsedElem) - + # Linear movement if command == 'G1': parsedElem = HEIDEN_Line( @@ -426,12 +424,12 @@ def export(objectslist, filename, argstring): ) if parsedElem != None: POSTGCODE.extend(parsedElem) - + if command == 'G80': #Reset Canned Cycles G_FUNCTION_STORE['G81'] = False G_FUNCTION_STORE['G82'] = False G_FUNCTION_STORE['G83'] = False - + # Drilling, Dwell Drilling, Peck Drilling if command == 'G81' or command == 'G82' or command == 'G83': parsedElem = HEIDEN_Drill( @@ -439,21 +437,21 @@ def export(objectslist, filename, argstring): ) if parsedElem != None: POSTGCODE.extend(parsedElem) - + # Tool change if command == 'M6': parsedElem = HEIDEN_ToolCall(obj) if parsedElem != None: POSTGCODE.append(parsedElem) - + if COMPENSATION_DIFF_STATUS[0]: #Restore the compensation if removed obj.UseComp = True obj.recompute() COMPENSATION_DIFF_STATUS[0] = False - + if LBLIZE_STAUS: HEIDEN_LBL_Replace() LBLIZE_STAUS = False - + if LBLIZE_ACTIVE: if not SKIP_WARNS: ( PostUtils.editor( @@ -467,9 +465,9 @@ def export(objectslist, filename, argstring): ) POSTGCODE.append(HEIDEN_End(objectslist)) #add footer Program_Out = HEIDEN_Numberize(POSTGCODE) #add line number - + if SHOW_EDITOR: PostUtils.editor(Program_Out) - + gfile = pythonopen(filename, "w") gfile.write(Program_Out) gfile.close() @@ -491,7 +489,7 @@ def HEIDEN_End(ActualJob): #use Label for program name else: program_id = "NEW" return "END PGM " + program_id + " " + UNITS - + #def HEIDEN_ToolDef(tool_id, tool_lenght, tool_radius): # old machines don't have tool table, need tooldef list # return "TOOL DEF " + tool_id + " R" + "{:.3f}".format(tool_lenght) + " L" + "{:.3f}".format(tool_radius) @@ -502,7 +500,7 @@ def HEIDEN_ToolCall(tool_Params): H_Tool_ID = "0" H_Tool_Speed = 0 H_Tool_Comment = "" - + if hasattr(tool_Params, "Label"): # use Label as tool comment H_Tool_Comment = tool_Params.Label if hasattr(tool_Params, "SpindleDir"): # get spindle direction for this tool @@ -523,7 +521,7 @@ def HEIDEN_ToolCall(tool_Params): HEIDEN_Format(" S", H_Tool_Speed) + " ;" + str(H_Tool_Comment) ) -# create a linear movement +# create a linear movement def HEIDEN_Line(line_Params, line_comp, line_feed, line_rapid, line_M_funct, Cmd_Number): global FEED_MAX_SPEED global COMPENSATION_DIFF_STATUS @@ -543,7 +541,7 @@ def HEIDEN_Line(line_Params, line_comp, line_feed, line_rapid, line_M_funct, Cmd } H_Line = "L" H_Line_Params = [['X', 'Y', 'Z'], ['R0', line_feed, line_M_funct]] - + # check and hide duplicated axis movements, not last, update with new ones for i in H_Line_New: if G_FUNCTION_STORE['G91']: # incremental @@ -559,10 +557,10 @@ def HEIDEN_Line(line_Params, line_comp, line_feed, line_rapid, line_M_funct, Cmd if line_Params[i] != H_Line_New[i] or line_M_funct != '': H_Line += " " + HEIDEN_Format(i, line_Params[i]) H_Line_New[i] = line_Params[i] - + if H_Line == "L": #No movements no line return None - + if COMPENSATION_DIFF_STATUS[0]: # Diff from compensated ad not compensated path if COMPENSATION_DIFF_STATUS[1]: # skip if already compensated, not active by now Cmd_Number -= 1 # align @@ -578,13 +576,13 @@ def HEIDEN_Line(line_Params, line_comp, line_feed, line_rapid, line_M_funct, Cmd # COMPENSATION_DIFF_STATUS[1] = False else: H_Line_Params[1][0] = "R" + line_comp # not used by now - + # check if we need to skip already active parameters # R parameter if MACHINE_SKIP_PARAMS == False or H_Line_Params[1][0] != MACHINE_STORED_PARAMS[0]: MACHINE_STORED_PARAMS[0] = H_Line_Params[1][0] H_Line += " " + H_Line_Params[1][0] - + # F parameter (check rapid o feed) if line_rapid == True: H_Line_Params[1][1] = FEED_MAX_SPEED if MACHINE_USE_FMAX == True and line_rapid == True: @@ -593,12 +591,12 @@ def HEIDEN_Line(line_Params, line_comp, line_feed, line_rapid, line_M_funct, Cmd if MACHINE_SKIP_PARAMS == False or H_Line_Params[1][1] != MACHINE_STORED_PARAMS[1]: MACHINE_STORED_PARAMS[1] = H_Line_Params[1][1] H_Line += HEIDEN_Format(" F", H_Line_Params[1][1]) - + # M parameter if MACHINE_SKIP_PARAMS == False or H_Line_Params[1][2] != MACHINE_STORED_PARAMS[2]: MACHINE_STORED_PARAMS[2] = H_Line_Params[1][2] H_Line += " M" + H_Line_Params[1][2] - + # LBLIZE check and array creation if LBLIZE_STAUS: i = H_Line_Params[0][MACHINE_WORK_AXIS] @@ -607,11 +605,11 @@ def HEIDEN_Line(line_Params, line_comp, line_feed, line_rapid, line_M_funct, Cmd HEIDEN_LBL_Get(MACHINE_LAST_POSITION, H_Line_New[i]) else: HEIDEN_LBL_Get() - + # update machine position with new values for i in H_Line_New: MACHINE_LAST_POSITION[i] = H_Line_New[i] - + return H_Line # create a arc movement @@ -641,7 +639,7 @@ def HEIDEN_Arc(arc_Params, arc_direction, arc_comp, arc_feed, arc_rapid, arc_M_f 'Y': 99999, 'Z': 99999 } - + # get command values if G_FUNCTION_STORE['G91']: # incremental H_ArcIncr = "I" @@ -673,7 +671,7 @@ def HEIDEN_Arc(arc_Params, arc_direction, arc_comp, arc_feed, arc_rapid, arc_M_f if b in arc_Params: # to change if I J K are not always incremental H_Arc_CC[a] = H_Arc_CC[a] + arc_Params[b] - + def Axis_Select(a, b, c, incr): if a in arc_Params and b in arc_Params: _H_ArcCenter = ( @@ -693,7 +691,7 @@ def Axis_Select(a, b, c, incr): return [_H_ArcCenter, _H_ArcPoint] else: return ["", ""] - + # set the right work plane based on tool direction if MACHINE_WORK_AXIS == 0: # tool on X axis Axis_Result = Axis_Select('Y', 'Z', 'X', H_ArcIncr) @@ -707,7 +705,7 @@ def Axis_Select(a, b, c, incr): if H_ArcCenter == "CC ": #No movements no circle return None - + if arc_direction == "G2": # set the right arc direction H_ArcPoint += " DR-" else: @@ -728,12 +726,12 @@ def Axis_Select(a, b, c, incr): H_Arc_Params[1][0] = "R" + arc_comp # not used by now # check if we need to skip already active parameters - + # R parameter if MACHINE_SKIP_PARAMS == False or H_Arc_Params[1][0] != MACHINE_STORED_PARAMS[0]: MACHINE_STORED_PARAMS[0] = H_Arc_Params[1][0] H_ArcPoint += " " + H_Arc_Params[1][0] - + # F parameter if arc_rapid == True: H_Arc_Params[1][1] = FEED_MAX_SPEED if MACHINE_USE_FMAX == True and arc_rapid == True: @@ -742,7 +740,7 @@ def Axis_Select(a, b, c, incr): if MACHINE_SKIP_PARAMS == False or H_Arc_Params[1][1] != MACHINE_STORED_PARAMS[1]: MACHINE_STORED_PARAMS[1] = H_Arc_Params[1][1] H_ArcPoint += HEIDEN_Format(" F", H_Arc_Params[1][1]) - + # M parameter if MACHINE_SKIP_PARAMS == False or H_Arc_Params[1][2] != MACHINE_STORED_PARAMS[2]: MACHINE_STORED_PARAMS[2] = H_Arc_Params[1][2] @@ -753,7 +751,7 @@ def Axis_Select(a, b, c, incr): for i in H_Arc_Params[0]: H_Arc_P_NEW[i] = MACHINE_LAST_POSITION[i] + H_Arc_P_NEW[i] H_Arc_CC[i] = MACHINE_LAST_POSITION[i] + H_Arc_CC[i] - + # check if we can skip CC print if( MACHINE_LAST_CENTER['X'] == H_Arc_CC['X'] and @@ -761,7 +759,7 @@ def Axis_Select(a, b, c, incr): MACHINE_LAST_CENTER['Z'] == H_Arc_CC['Z'] ): H_ArcSameCenter = True - + # LBLIZE check and array creation if LBLIZE_STAUS: i = H_Arc_Params[0][MACHINE_WORK_AXIS] @@ -773,29 +771,29 @@ def Axis_Select(a, b, c, incr): HEIDEN_LBL_Get(MACHINE_LAST_POSITION, H_Arc_P_NEW[i], 1) else: HEIDEN_LBL_Get() - + # update machine position with new values for i in H_Arc_Params[0]: MACHINE_LAST_CENTER[i] = H_Arc_CC[i] MACHINE_LAST_POSITION[i] = H_Arc_P_NEW[i] - + # if the circle center is already the same we don't need to print it if H_ArcSameCenter: return [H_ArcPoint] else: return [H_ArcCenter, H_ArcPoint] - + def HEIDEN_PolarArc(pol_cc_X, pol_cc_Y, pol_X, pol_Y, pol_Z, pol_Axis, pol_Incr): pol_Angle = 0 pol_Result = "" - + # get delta distance form point to circle center delta_X = pol_X - pol_cc_X delta_Y = pol_Y - pol_cc_Y # prevent undefined result of atan if delta_X != 0 or delta_Y != 0: pol_Angle = math.degrees(math.atan2(delta_X, delta_Y)) - + # set the appropriate zero and direction of angle # with X axis zero have the Y+ direction if pol_Axis == "X": @@ -806,16 +804,16 @@ def HEIDEN_PolarArc(pol_cc_X, pol_cc_Y, pol_X, pol_Y, pol_Z, pol_Axis, pol_Incr) # with Z axis zero have the X+ direction elif pol_Axis == "Z": pol_Angle = 90 - pol_Angle - + # set inside +0° +360° range if pol_Angle > 0: if pol_Angle >= 360: pol_Angle = pol_Angle - 360 elif pol_Angle < 0: pol_Angle = pol_Angle + 360 if pol_Angle < 0: pol_Angle = pol_Angle + 360 - + pol_Result = "P" + HEIDEN_Format(" PA+", pol_Angle) + " " + pol_Incr + HEIDEN_Format(pol_Axis, pol_Z) - + return pol_Result def HEIDEN_Drill(drill_Obj, drill_Params, drill_Type, drill_feed): # create a drill cycle and movement @@ -830,12 +828,12 @@ def HEIDEN_Drill(drill_Obj, drill_Params, drill_Type, drill_feed): # create a dr drill_Surface = None drill_SafePoint = 0 drill_StartPoint = 0 - + # try to get the distance from Clearance Height and Start Depth if hasattr(drill_Obj, 'StartDepth') and hasattr(drill_Obj.StartDepth, 'Value'): drill_Surface = drill_Obj.StartDepth.Value - # initialize + # initialize if 'R' in drill_Params: # SafePoint equals to R position if G_FUNCTION_STORE['G91']: # incremental @@ -849,16 +847,16 @@ def HEIDEN_Drill(drill_Obj, drill_Params, drill_Type, drill_feed): # create a dr else: drill_Defs['DIST'] = 0 drill_StartPoint = drill_SafePoint - + if 'Z' in drill_Params: if G_FUNCTION_STORE['G91']: # incremental drill_Defs['DEPTH'] = drill_SafePoint + drill_Params['Z'] else: drill_Defs['DEPTH'] = drill_Params['Z'] - drill_StartPoint - + if drill_Defs['DEPTH'] > 0: drill_Output.append("; WARNING START DEPTH LOWER THAN FINAL DEPTH") - + drill_Defs['INCR'] = drill_Defs['DEPTH'] # overwrite if 'P' in drill_Params: drill_Defs['DWELL'] = drill_Params['P'] @@ -875,16 +873,16 @@ def HEIDEN_Drill(drill_Obj, drill_Params, drill_Type, drill_feed): # create a dr drill_Rapid = HEIDEN_Format(" F", FEED_MAX_SPEED) else: drill_Rapid = " R0" + HEIDEN_Format(" F", FEED_MAX_SPEED) + " M" - + # move to drill location drill_Movement = "L" if G_FUNCTION_STORE['G91']: # incremental # update Z value to R + actual_Z if first call - if G_FUNCTION_STORE[drill_Type] == False: + if G_FUNCTION_STORE[drill_Type] == False: MACHINE_LAST_POSITION['Z'] = drill_Defs['DIST'] + MACHINE_LAST_POSITION['Z'] drill_Movement = "L" + HEIDEN_Format(" Z", MACHINE_LAST_POSITION['Z']) + drill_Rapid drill_Output.append(drill_Movement) - + # update X and Y position if 'X' in drill_Params and drill_Params['X'] != 0: MACHINE_LAST_POSITION['X'] = drill_Params['X'] + MACHINE_LAST_POSITION['X'] @@ -900,7 +898,7 @@ def HEIDEN_Drill(drill_Obj, drill_Params, drill_Type, drill_feed): # create a dr drill_Movement = "L" + HEIDEN_Format(" Z", drill_SafePoint) + drill_Rapid drill_Output.append(drill_Movement) MACHINE_LAST_POSITION['Z'] = drill_SafePoint - + # update X and Y position if 'X' in drill_Params and drill_Params['X'] != MACHINE_LAST_POSITION['X']: MACHINE_LAST_POSITION['X'] = drill_Params['X'] @@ -916,16 +914,16 @@ def HEIDEN_Drill(drill_Obj, drill_Params, drill_Type, drill_feed): # create a dr drill_Movement = "L" + HEIDEN_Format(" Z", drill_SafePoint) + drill_Rapid drill_Output.append(drill_Movement) MACHINE_LAST_POSITION['Z'] = drill_SafePoint - + # check if cycle is already stored i = True for j in drill_Defs: if drill_Defs[j] != STORED_CANNED_PARAMS[j]: i = False - + if i == False: # not same cycle, update and print for j in drill_Defs: STORED_CANNED_PARAMS[j] = drill_Defs[j] - + # get the DEF template and replace the strings drill_CycleDef = MACHINE_CYCLE_DEF[1].format( DIST = str("{:.3f}".format(drill_Defs['DIST'])), @@ -935,13 +933,13 @@ def HEIDEN_Drill(drill_Obj, drill_Params, drill_Type, drill_feed): # create a dr FEED = str("{:.0f}".format(drill_Defs['FEED'])) ) drill_Output.extend(drill_CycleDef.split("\n")) - + # add the cycle call to do the drill if MACHINE_SKIP_PARAMS: drill_Output.append("CYCL CALL") else: drill_Output.append("CYCL CALL M") - + # set already active cycle, to do: check changes and movements until G80 G_FUNCTION_STORE[drill_Type] = True @@ -952,7 +950,7 @@ def HEIDEN_Format(formatType, formatValue): global FEED_DECIMALS global AXIS_DECIMALS returnString = "" - + formatType = str(formatType) if formatType == "S" or formatType == " S": returnString = '%.*f' % (SPINDLE_DECIMALS, formatValue) @@ -998,12 +996,12 @@ def HEIDEN_LBL_Get(GetPoint=None, GetLevel=None, GetAddit=0): if len(STORED_LBL) != 0 and len(STORED_LBL[-1][-1]) != 0: STORED_LBL[-1].append([]) return - + def HEIDEN_LBL_Replace(): global POSTGCODE global STORED_LBL global FIRST_LBL - + Gcode_Lenght = len(POSTGCODE) # this function look inside strings to find and replace it with LBL @@ -1011,7 +1009,7 @@ def HEIDEN_LBL_Replace(): # until the "Z" axis is moved or rapid movements are performed # these "planar with feed movements" create a new row with # the index of start and end POSTGCODE line - # to LBLize we need to diff with the first column backward + # to LBLize we need to diff with the first column backward # from the last row in the last column of indexes Cols = len(STORED_LBL) - 1 if Cols > 0: diff --git a/src/Mod/Path/PathScripts/post/jtech_post.py b/src/Mod/Path/PathScripts/post/jtech_post.py index 8628ad02e056..ef832205515a 100644 --- a/src/Mod/Path/PathScripts/post/jtech_post.py +++ b/src/Mod/Path/PathScripts/post/jtech_post.py @@ -1,5 +1,5 @@ # *************************************************************************** -# * (c) sliptonic (shopinthewoods@gmail.com) 2018 * +# * Copyright (c) 2018 sliptonic * # * * # * This file is part of the FreeCAD CAx development system. * # * * @@ -19,7 +19,8 @@ # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * # * USA * # * * -# ***************************************************************************/ +# *************************************************************************** + from __future__ import print_function import FreeCAD from FreeCAD import Units diff --git a/src/Mod/Path/PathScripts/post/linuxcnc_post.py b/src/Mod/Path/PathScripts/post/linuxcnc_post.py index 95ae5d289b38..691b018f85e2 100644 --- a/src/Mod/Path/PathScripts/post/linuxcnc_post.py +++ b/src/Mod/Path/PathScripts/post/linuxcnc_post.py @@ -1,5 +1,5 @@ # *************************************************************************** -# * (c) sliptonic (shopinthewoods@gmail.com) 2014 * +# * Copyright (c) 2014 sliptonic * # * * # * This file is part of the FreeCAD CAx development system. * # * * @@ -19,7 +19,8 @@ # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * # * USA * # * * -# ***************************************************************************/ +# *************************************************************************** + from __future__ import print_function import FreeCAD from FreeCAD import Units diff --git a/src/Mod/Path/PathScripts/post/mach3_mach4_post.py b/src/Mod/Path/PathScripts/post/mach3_mach4_post.py index 902c847952ba..cb1392ab95bd 100644 --- a/src/Mod/Path/PathScripts/post/mach3_mach4_post.py +++ b/src/Mod/Path/PathScripts/post/mach3_mach4_post.py @@ -1,5 +1,5 @@ # *************************************************************************** -# * (c) sliptonic (shopinthewoods@gmail.com) 2014 * +# * Copyright (c) 2014 sliptonic * # * * # * This file is part of the FreeCAD CAx development system. * # * * @@ -64,7 +64,7 @@ OUTPUT_LINE_NUMBERS = False SHOW_EDITOR = True MODAL = False # if true commands are suppressed if the same as previous line. -USE_TLO = True # if true G43 will be output following tool changes +USE_TLO = True # if true G43 will be output following tool changes OUTPUT_DOUBLES = True # if false duplicate axis values are suppressed if the same as previous line. COMMAND_SPACE = " " LINENR = 100 # line number starting value @@ -188,7 +188,7 @@ def export(objectslist, filename, argstring): for obj in objectslist: # Skip inactive operations - if hasattr(obj, 'Active'): + if hasattr(obj, 'Active'): if not obj.Active: continue if hasattr(obj, 'Base') and hasattr(obj.Base, 'Active'): @@ -255,7 +255,7 @@ def export(objectslist, filename, argstring): # turn coolant off if required if not coolantMode == 'None': if OUTPUT_COMMENTS: - gcode += linenumber() + '(Coolant Off:' + coolantMode + ')\n' + gcode += linenumber() + '(Coolant Off:' + coolantMode + ')\n' gcode += linenumber() +'M9' + '\n' # do the post_amble @@ -338,12 +338,12 @@ def parse(pathobj): if hasattr(pathobj.ToolController, 'HorizRapid') and pathobj.ToolController.HorizRapid > 0: opHorizRapid = Units.Quantity(pathobj.ToolController.HorizRapid, FreeCAD.Units.Velocity) else: - FreeCAD.Console.PrintWarning('Tool Controller Horizontal Rapid Values are unset'+ '\n') + FreeCAD.Console.PrintWarning('Tool Controller Horizontal Rapid Values are unset'+ '\n') if hasattr(pathobj.ToolController, 'VertRapid') and pathobj.ToolController.VertRapid > 0: opVertRapid = Units.Quantity(pathobj.ToolController.VertRapid, FreeCAD.Units.Velocity) else: - FreeCAD.Console.PrintWarning('Tool Controller Vertical Rapid Values are unset'+ '\n') + FreeCAD.Console.PrintWarning('Tool Controller Vertical Rapid Values are unset'+ '\n') for c in pathobj.Path.Commands: @@ -355,8 +355,8 @@ def parse(pathobj): command = 'G1' else: outstring.append('(Tool Controller Rapid Values are unset)' + '\n') - - + + outstring.append(command) # if modal: suppress the command if it is the same as the last one @@ -392,7 +392,7 @@ def parse(pathobj): pos = Units.Quantity(c.Parameters[param], FreeCAD.Units.Length) outstring.append( param + format(float(pos.getValueAs(UNIT_FORMAT)), precision_string)) - + if adaptiveOp and c.Name in ["G0", "G00"]: if opHorizRapid and opVertRapid: if 'Z' not in c.Parameters: diff --git a/src/Mod/Path/PathScripts/post/opensbp_post.py b/src/Mod/Path/PathScripts/post/opensbp_post.py index 274a5fd0ff00..b99c86602f02 100644 --- a/src/Mod/Path/PathScripts/post/opensbp_post.py +++ b/src/Mod/Path/PathScripts/post/opensbp_post.py @@ -1,9 +1,5 @@ -from __future__ import print_function -import datetime -from PathScripts import PostUtils - # *************************************************************************** -# * (c) sliptonic (shopinthewoods@gmail.com) 2014 * +# * Copyright (c) 2014 sliptonic * # * * # * This file is part of the FreeCAD CAx development system. * # * * @@ -23,7 +19,11 @@ # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * # * USA * # * * -# ***************************************************************************/ +# *************************************************************************** + +from __future__ import print_function +import datetime +from PathScripts import PostUtils TOOLTIP = ''' diff --git a/src/Mod/Path/PathScripts/post/opensbp_pre.py b/src/Mod/Path/PathScripts/post/opensbp_pre.py index eb8286eaf35b..4b8e58542e48 100644 --- a/src/Mod/Path/PathScripts/post/opensbp_pre.py +++ b/src/Mod/Path/PathScripts/post/opensbp_pre.py @@ -1,5 +1,6 @@ +# -*- coding: utf-8 -*- # *************************************************************************** -# * (c) sliptonic (shopinthewoodsgmail.com) 2014 * +# * Copyright (c) 2014 sliptonic gmail.com> * # * * # * This file is part of the FreeCAD CAx development system. * # * * @@ -19,7 +20,7 @@ # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * # * USA * # * * -# ***************************************************************************/ +# *************************************************************************** ''' This is a preprocessor file for the Path workbench. Its aim is to diff --git a/src/Mod/Path/PathScripts/post/philips_post.py b/src/Mod/Path/PathScripts/post/philips_post.py index 0a65625d5b74..41203ef07525 100644 --- a/src/Mod/Path/PathScripts/post/philips_post.py +++ b/src/Mod/Path/PathScripts/post/philips_post.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - #*************************************************************************** -#* * #* Copyright (c) 2016 Christoph Blaue * #* * #* This program is free software; you can redistribute it and/or modify * @@ -191,7 +189,7 @@ SUPPRESS_ZERO_FEED = True # possible values: True if feed is zero the F command is suppressed # False F commands are written even if they are zero -# This is useful for machines without special speeds for the G0 command. They could be +# This is useful for machines without special speeds for the G0 command. They could be # left zero and are suppressed in the output # The header is divided into two parts, one is dynamic, the other is a static GCode header. diff --git a/src/Mod/Path/PathScripts/post/rml_post.py b/src/Mod/Path/PathScripts/post/rml_post.py index 202d28475eb6..fd28d957f451 100644 --- a/src/Mod/Path/PathScripts/post/rml_post.py +++ b/src/Mod/Path/PathScripts/post/rml_post.py @@ -1,5 +1,5 @@ #*************************************************************************** -#* (c) Jon Nordby (jononor@gmail.com) 2015 * +#* Copyright (c) 2015 Jon Nordby * #* * #* This file is part of the FreeCAD CAx development system. * #* * @@ -19,7 +19,7 @@ #* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * #* USA * #* * -#***************************************************************************/ +#*************************************************************************** TOOLTIP=''' diff --git a/src/Mod/Path/PathScripts/post/slic3r_pre.py b/src/Mod/Path/PathScripts/post/slic3r_pre.py index 83de3eec0eb2..f9544f9c5740 100644 --- a/src/Mod/Path/PathScripts/post/slic3r_pre.py +++ b/src/Mod/Path/PathScripts/post/slic3r_pre.py @@ -1,5 +1,5 @@ # *************************************************************************** -# * (c) Yorik van Havre (yorik@uncreated.net) 2015 * +# * Copyright (c) 2015 Yorik van Havre * # * * # * This file is part of the FreeCAD CAx development system. * # * * @@ -19,7 +19,7 @@ # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * # * USA * # * * -# ***************************************************************************/ +# *************************************************************************** ''' This is an preprocessor to read gcode files produced from slic3r. diff --git a/src/Mod/Path/PathScripts/post/smoothie_post.py b/src/Mod/Path/PathScripts/post/smoothie_post.py index a8803be99b96..8ce7d99a457a 100644 --- a/src/Mod/Path/PathScripts/post/smoothie_post.py +++ b/src/Mod/Path/PathScripts/post/smoothie_post.py @@ -1,5 +1,5 @@ # *************************************************************************** -# * (c) sliptonic (shopinthewoods@gmail.com) 2017 * +# * Copyright (c) 2017 sliptonic * # * * # * This file is part of the FreeCAD CAx development system. * # * * @@ -19,7 +19,8 @@ # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * # * USA * # * * -# ***************************************************************************/ +# *************************************************************************** + from __future__ import print_function import argparse diff --git a/src/Mod/Path/PathSimulator/App/AppPathSimulator.cpp b/src/Mod/Path/PathSimulator/App/AppPathSimulator.cpp index 9acf34009759..c2e24aa78bfb 100644 --- a/src/Mod/Path/PathSimulator/App/AppPathSimulator.cpp +++ b/src/Mod/Path/PathSimulator/App/AppPathSimulator.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2017 Shai Seger * + * Copyright (c) 2017 Shai Seger * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/PathSimulator/App/PathSim.cpp b/src/Mod/Path/PathSimulator/App/PathSim.cpp index 621efe5b99b6..3c9dafbf2611 100644 --- a/src/Mod/Path/PathSimulator/App/PathSim.cpp +++ b/src/Mod/Path/PathSimulator/App/PathSim.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Shsi Seger (shaise at gmail) 2017 * + * Copyright (c) 2017 Shsi Seger * * * * This file is part of the FreeCAD CAx development system. * * * @@ -20,7 +20,6 @@ * * ***************************************************************************/ - #include "PreCompiled.h" #ifndef _PreComp_ @@ -61,7 +60,7 @@ void PathSim::BeginSimulation(Part::TopoShape * stock, float resolution) void PathSim::SetToolShape(const TopoDS_Shape& toolShape, float resolution) { - m_tool = new cSimTool(toolShape, resolution); + m_tool = new cSimTool(toolShape, resolution); } Base::Placement * PathSim::ApplyCommand(Base::Placement * pos, Command * cmd) diff --git a/src/Mod/Path/PathSimulator/App/PathSim.h b/src/Mod/Path/PathSimulator/App/PathSim.h index 90be142766a1..fb36e2fd4822 100644 --- a/src/Mod/Path/PathSimulator/App/PathSim.h +++ b/src/Mod/Path/PathSimulator/App/PathSim.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) Shsi Seger (shaise at gmail) 2017 * + * Copyright (c) 2017 Shai Seger * * * * This file is part of the FreeCAD CAx development system. * * * @@ -40,15 +40,15 @@ namespace PathSimulator { /** The representation of a CNC Toolpath Simulator */ - + class PathSimulatorExport PathSim : public Base::BaseClass { TYPESYSTEM_HEADER(); - + public: PathSim(); ~PathSim(); - + void BeginSimulation(Part::TopoShape * stock, float resolution); void SetToolShape(const TopoDS_Shape& toolShape, float resolution); Base::Placement * ApplyCommand(Base::Placement * pos, Command * cmd); diff --git a/src/Mod/Path/PathSimulator/App/PathSimPyImp.cpp b/src/Mod/Path/PathSimulator/App/PathSimPyImp.cpp index 708cc4b9a104..7b0b1d5ffd02 100644 --- a/src/Mod/Path/PathSimulator/App/PathSimPyImp.cpp +++ b/src/Mod/Path/PathSimulator/App/PathSimPyImp.cpp @@ -1,5 +1,5 @@ -/*************************************************************************** -* Copyright (c) 2017 Shai Seger * +/************************************************************************** +* Copyright (c) 2017 Shai Seger * * * * This file is part of the FreeCAD CAx development system. * * * @@ -44,7 +44,7 @@ std::string PathSimPy::representation(void) const PyObject *PathSimPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of PathSimPy and the Twin object + // create a new instance of PathSimPy and the Twin object return new PathSimPy(new PathSim); } @@ -135,7 +135,7 @@ PyObject *PathSimPy::getCustomAttributes(const char* /*attr*/) const int PathSimPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Path/PathSimulator/App/PreCompiled.cpp b/src/Mod/Path/PathSimulator/App/PreCompiled.cpp index 17da8b7b2fb9..d4ee9e9befda 100644 --- a/src/Mod/Path/PathSimulator/App/PreCompiled.cpp +++ b/src/Mod/Path/PathSimulator/App/PreCompiled.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2017 Shai Seger * + * Copyright (c) 2017 Shai Seger * * * * This file is part of the FreeCAD CAx development system. * * * @@ -21,4 +21,4 @@ ***************************************************************************/ -#include "PreCompiled.h" +#include "PreCompiled.h" diff --git a/src/Mod/Path/PathSimulator/App/PreCompiled.h b/src/Mod/Path/PathSimulator/App/PreCompiled.h index 830cacf252fb..afecd871fb8f 100644 --- a/src/Mod/Path/PathSimulator/App/PreCompiled.h +++ b/src/Mod/Path/PathSimulator/App/PreCompiled.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2017 Shai Seger * + * Copyright (c) 2017 Shai Seger * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/PathSimulator/App/VolSim.cpp b/src/Mod/Path/PathSimulator/App/VolSim.cpp index f32d9ba5bcd3..ce9490869da2 100644 --- a/src/Mod/Path/PathSimulator/App/VolSim.cpp +++ b/src/Mod/Path/PathSimulator/App/VolSim.cpp @@ -1,5 +1,5 @@ -/*************************************************************************** -* Copyright (c) Shsi Seger (shaise at gmail) 2017 * +/************************************************************************** +* Copyright (c) 2017 Shai Seger * * * * This file is part of the FreeCAD CAx development system. * * * @@ -717,7 +717,7 @@ void Point3D::UpdateCmd(Path::Command & cmd) //************************************************************************************************************ // Simulation tool //************************************************************************************************************ -cSimTool::cSimTool(const TopoDS_Shape& toolShape, float res){ +cSimTool::cSimTool(const TopoDS_Shape& toolShape, float res){ BRepCheck_Analyzer aChecker(toolShape); bool shapeIsValid = aChecker.IsValid() ? true : false; @@ -735,19 +735,19 @@ cSimTool::cSimTool(const TopoDS_Shape& toolShape, float res){ radius = (xMax - xMin) / 2; length = zMax - zMin; - Base::Vector3d pnt; - pnt.x = 0; + Base::Vector3d pnt; + pnt.x = 0; pnt.y = 0; pnt.z = 0; - + int radValue = (int)(radius / res) + 1; // Measure the performance of the profile extraction - //auto start = std::chrono::high_resolution_clock::now(); + //auto start = std::chrono::high_resolution_clock::now(); for (int x = 0; x < radValue; x++) { - // find the face of the tool by checking z points across the + // find the face of the tool by checking z points across the // radius to see if the point is inside the shape pnt.x = x * res; bool inside = isInside(toolShape, pnt, res); @@ -757,7 +757,7 @@ cSimTool::cSimTool(const TopoDS_Shape& toolShape, float res){ pnt.z -= res; inside = isInside(toolShape, pnt, res); } - + // move up until the point is first inside the shape and record the position while (!inside && pnt.z < length) { @@ -775,7 +775,7 @@ cSimTool::cSimTool(const TopoDS_Shape& toolShape, float res){ } // Report the performance of the profile extraction - //auto stop = std::chrono::high_resolution_clock::now(); + //auto stop = std::chrono::high_resolution_clock::now(); //auto duration = std::chrono::duration_cast(stop - start); //Base::Console().Log("cSimTool::cSimTool - Tool Profile Extraction Took: %i ms\n", duration.count() / 1000); diff --git a/src/Mod/Path/PathSimulator/App/VolSim.h b/src/Mod/Path/PathSimulator/App/VolSim.h index 0487db7eb250..fbf37ee59fa6 100644 --- a/src/Mod/Path/PathSimulator/App/VolSim.h +++ b/src/Mod/Path/PathSimulator/App/VolSim.h @@ -1,5 +1,5 @@ -/*************************************************************************** -* Copyright (c) Shsi Seger (shaise at gmail) 2017 * +/************************************************************************** +* Copyright (c) 2017 Shai Seger * * * * This file is part of the FreeCAD CAx development system. * * * @@ -38,7 +38,7 @@ struct toolShapePoint { float radiusPos; float heightPos; - + struct less_than{ bool operator()(const toolShapePoint &a, const toolShapePoint &b){ return a.radiusPos < b.radiusPos; @@ -75,7 +75,7 @@ inline static Point3D unit(const Point3D & a) { return a / length(a); } struct Triangle3D { Triangle3D() {} - Triangle3D(Point3D & p1, Point3D & p2, Point3D & p3) + Triangle3D(Point3D & p1, Point3D & p2, Point3D & p3) { points[0] = p1; points[1] = p2; @@ -89,7 +89,7 @@ struct cLineSegment cLineSegment() : len(0), lenXY(0) {} cLineSegment(Point3D & p1, Point3D & p2) { SetPoints(p1, p2); } void SetPoints(Point3D & p1, Point3D & p2); - void PointAt(float dist, Point3D & retp); + void PointAt(float dist, Point3D & retp); Point3D pStart; Point3D pDir; Point3D pDirXY; diff --git a/src/Mod/Path/PathTests/PathTestUtils.py b/src/Mod/Path/PathTests/PathTestUtils.py index 81313a84aeb2..c753d83f3503 100644 --- a/src/Mod/Path/PathTests/PathTestUtils.py +++ b/src/Mod/Path/PathTests/PathTestUtils.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2016 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathTests/TestPathCore.py b/src/Mod/Path/PathTests/TestPathCore.py index 96c5c0de379f..dae7c091e5d9 100644 --- a/src/Mod/Path/PathTests/TestPathCore.py +++ b/src/Mod/Path/PathTests/TestPathCore.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2016 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathTests/TestPathDeburr.py b/src/Mod/Path/PathTests/TestPathDeburr.py index aecb2ee181fc..48692a4e4806 100644 --- a/src/Mod/Path/PathTests/TestPathDeburr.py +++ b/src/Mod/Path/PathTests/TestPathDeburr.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2018 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathTests/TestPathDepthParams.py b/src/Mod/Path/PathTests/TestPathDepthParams.py index 02e441236d3c..313fd9de78f0 100644 --- a/src/Mod/Path/PathTests/TestPathDepthParams.py +++ b/src/Mod/Path/PathTests/TestPathDepthParams.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2016 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathTests/TestPathDressupDogbone.py b/src/Mod/Path/PathTests/TestPathDressupDogbone.py index 5057f8e9ba8e..5db688320de5 100644 --- a/src/Mod/Path/PathTests/TestPathDressupDogbone.py +++ b/src/Mod/Path/PathTests/TestPathDressupDogbone.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathTests/TestPathDressupHoldingTags.py b/src/Mod/Path/PathTests/TestPathDressupHoldingTags.py index b202430e5d7c..6d1c406f6220 100644 --- a/src/Mod/Path/PathTests/TestPathDressupHoldingTags.py +++ b/src/Mod/Path/PathTests/TestPathDressupHoldingTags.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2016 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathTests/TestPathGeom.py b/src/Mod/Path/PathTests/TestPathGeom.py index 2d06f744f4b4..d96d1ba202d2 100644 --- a/src/Mod/Path/PathTests/TestPathGeom.py +++ b/src/Mod/Path/PathTests/TestPathGeom.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2016 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathTests/TestPathHelix.py b/src/Mod/Path/PathTests/TestPathHelix.py index ab4012cf5010..0fb76c9f1a66 100644 --- a/src/Mod/Path/PathTests/TestPathHelix.py +++ b/src/Mod/Path/PathTests/TestPathHelix.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2019 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathTests/TestPathLog.py b/src/Mod/Path/PathTests/TestPathLog.py index 5af2a4f7b264..281d40e0a6b3 100644 --- a/src/Mod/Path/PathTests/TestPathLog.py +++ b/src/Mod/Path/PathTests/TestPathLog.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2016 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathTests/TestPathOpTools.py b/src/Mod/Path/PathTests/TestPathOpTools.py index e251bfd70c8d..bcd52de2281f 100644 --- a/src/Mod/Path/PathTests/TestPathOpTools.py +++ b/src/Mod/Path/PathTests/TestPathOpTools.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2018 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -147,7 +145,7 @@ def test11(self): self.assertEqual(1, len(wire.Edges)) self.assertRoughly(7, wire.Edges[0].Curve.Radius) self.assertCoincide(Vector(0, 0, 1), wire.Edges[0].Curve.Axis) - + wire = PathOpTools.offsetWire(small, obj.Shape, 9.9, True) self.assertIsNotNone(wire) self.assertEqual(1, len(wire.Edges)) diff --git a/src/Mod/Path/PathTests/TestPathPost.py b/src/Mod/Path/PathTests/TestPathPost.py index 0e504aeced40..eb047397d890 100644 --- a/src/Mod/Path/PathTests/TestPathPost.py +++ b/src/Mod/Path/PathTests/TestPathPost.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2016 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathTests/TestPathPreferences.py b/src/Mod/Path/PathTests/TestPathPreferences.py index 3696473125d3..4abff5352742 100644 --- a/src/Mod/Path/PathTests/TestPathPreferences.py +++ b/src/Mod/Path/PathTests/TestPathPreferences.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2019 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathTests/TestPathSetupSheet.py b/src/Mod/Path/PathTests/TestPathSetupSheet.py index 3bd770797845..9be34993260f 100644 --- a/src/Mod/Path/PathTests/TestPathSetupSheet.py +++ b/src/Mod/Path/PathTests/TestPathSetupSheet.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * @@ -35,7 +33,7 @@ def refstring(string): if sys.version_info.major < 3: return string return string.replace(" u'", " '") - + class TestPathSetupSheet(PathTestBase): diff --git a/src/Mod/Path/PathTests/TestPathStock.py b/src/Mod/Path/PathTests/TestPathStock.py index d85b957c5f28..8f9d22e4124b 100644 --- a/src/Mod/Path/PathTests/TestPathStock.py +++ b/src/Mod/Path/PathTests/TestPathStock.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathTests/TestPathTool.py b/src/Mod/Path/PathTests/TestPathTool.py index 85a1f2c82afc..a457118e36d5 100644 --- a/src/Mod/Path/PathTests/TestPathTool.py +++ b/src/Mod/Path/PathTests/TestPathTool.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathTests/TestPathToolBit.py b/src/Mod/Path/PathTests/TestPathToolBit.py index f5aac40ea62a..dd82c7fc6371 100644 --- a/src/Mod/Path/PathTests/TestPathToolBit.py +++ b/src/Mod/Path/PathTests/TestPathToolBit.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2019 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathTests/TestPathToolController.py b/src/Mod/Path/PathTests/TestPathToolController.py index 35fe171997ed..5f8bff716ce9 100644 --- a/src/Mod/Path/PathTests/TestPathToolController.py +++ b/src/Mod/Path/PathTests/TestPathToolController.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathTests/TestPathTooltable.py b/src/Mod/Path/PathTests/TestPathTooltable.py index 9ac2b722c1f8..1dcf8938e836 100644 --- a/src/Mod/Path/PathTests/TestPathTooltable.py +++ b/src/Mod/Path/PathTests/TestPathTooltable.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathTests/TestPathUtil.py b/src/Mod/Path/PathTests/TestPathUtil.py index a842bea8f1e5..5ed2d04afb77 100644 --- a/src/Mod/Path/PathTests/TestPathUtil.py +++ b/src/Mod/Path/PathTests/TestPathUtil.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/PathTests/TestPathVoronoi.py b/src/Mod/Path/PathTests/TestPathVoronoi.py index 451637d149f8..45713d806ac8 100644 --- a/src/Mod/Path/PathTests/TestPathVoronoi.py +++ b/src/Mod/Path/PathTests/TestPathVoronoi.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2020 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/TestPathApp.py b/src/Mod/Path/TestPathApp.py index 147cf9a16970..1f4c0247fb97 100644 --- a/src/Mod/Path/TestPathApp.py +++ b/src/Mod/Path/TestPathApp.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- - # *************************************************************************** -# * * # * Copyright (c) 2016 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify * diff --git a/src/Mod/Path/libarea/Adaptive.cpp b/src/Mod/Path/libarea/Adaptive.cpp index 8e138ec0b1d6..0dc5fa8a9a9d 100644 --- a/src/Mod/Path/libarea/Adaptive.cpp +++ b/src/Mod/Path/libarea/Adaptive.cpp @@ -1,5 +1,6 @@ /************************************************************************** -* Copyright (c) Kresimir Tusek (kresimir.tusek@gmail.com) 2018 * +* Copyright (c) 2018 Kresimir Tusek * +* * * This file is part of the FreeCAD CAx development system. * * * * This library is free software; you can redistribute it and/or * diff --git a/src/Mod/Path/libarea/Adaptive.hpp b/src/Mod/Path/libarea/Adaptive.hpp index 9cd674075b03..7b15e006adf5 100644 --- a/src/Mod/Path/libarea/Adaptive.hpp +++ b/src/Mod/Path/libarea/Adaptive.hpp @@ -1,5 +1,6 @@ /************************************************************************** -* Copyright (c) Kresimir Tusek (kresimir.tusek@gmail.com) 2018 * +* Copyright (c) 2018 Kresimir Tusek * +* * * This file is part of the FreeCAD CAx development system. * * * * This library is free software; you can redistribute it and/or * diff --git a/src/Mod/Path/path.dox b/src/Mod/Path/path.dox index 618fb810508f..eb75636e86b5 100644 --- a/src/Mod/Path/path.dox +++ b/src/Mod/Path/path.dox @@ -1,4 +1,4 @@ /** \defgroup PATH Path - * \ingroup PYTHONWORKBENCHES + * \ingroup PYTHONWORKBENCHES * \brief Tools to generate CNC toolpaths and G-Code */ diff --git a/src/Mod/Path/utils/path-lint.sh b/src/Mod/Path/utils/path-lint.sh index def379183c50..e1183a7eef87 100755 --- a/src/Mod/Path/utils/path-lint.sh +++ b/src/Mod/Path/utils/path-lint.sh @@ -1,7 +1,5 @@ #!/bin/bash -# # *************************************************************************** -# * * # * Copyright (c) 2017 sliptonic * # * * # * This program is free software; you can redistribute it and/or modify *