From 7a8a453746a8e4a845219948591fd17f4494a067 Mon Sep 17 00:00:00 2001 From: luz paz Date: Wed, 16 Nov 2022 18:34:33 -0500 Subject: [PATCH] Path: remove trailing whitespace --- src/Mod/Path/App/Area.cpp | 2 +- src/Mod/Path/App/AreaPy.xml | 16 ++++----- src/Mod/Path/App/AreaPyImp.cpp | 36 +++++++++---------- src/Mod/Path/App/Command.h | 6 ++-- src/Mod/Path/App/CommandPy.xml | 18 +++++----- src/Mod/Path/App/CommandPyImp.cpp | 4 +-- src/Mod/Path/App/FeatureAreaPy.xml | 16 ++++----- src/Mod/Path/App/FeatureAreaPyImp.cpp | 6 ++-- src/Mod/Path/App/FeaturePath.cpp | 2 +- src/Mod/Path/App/FeaturePathCompound.cpp | 2 +- src/Mod/Path/App/FeaturePathCompound.h | 2 +- src/Mod/Path/App/FeaturePathCompoundPy.xml | 16 ++++----- src/Mod/Path/App/FeaturePathShape.h | 4 +-- src/Mod/Path/App/Path.cpp | 2 +- src/Mod/Path/App/Path.h | 16 ++++----- src/Mod/Path/App/PathPy.xml | 16 ++++----- src/Mod/Path/App/VoronoiCellPy.xml | 16 ++++----- src/Mod/Path/App/VoronoiEdgePy.xml | 16 ++++----- src/Mod/Path/App/VoronoiPy.xml | 16 ++++----- src/Mod/Path/App/VoronoiVertexPy.xml | 16 ++++----- .../Post/scripts/KineticNCBeamicon2_post.py | 8 ++--- src/Mod/Path/PathSimulator/App/PathSimPy.xml | 16 ++++----- 22 files changed, 126 insertions(+), 126 deletions(-) diff --git a/src/Mod/Path/App/Area.cpp b/src/Mod/Path/App/Area.cpp index 8f4499f1c3..94a5758b4d 100644 --- a/src/Mod/Path/App/Area.cpp +++ b/src/Mod/Path/App/Area.cpp @@ -2646,7 +2646,7 @@ struct ShapeInfo { if (mySupportEdge) { //if best point is on some edge, split the edge in half if (edge.IsEqual(mySupport)) { - //to fix PointProjectionFailed. + //to fix PointProjectionFailed. GeomAPI_ProjectPointOnCurve gpp; gpp.Init(myBestPt, curve); gpp.Perform(myBestPt); diff --git a/src/Mod/Path/App/AreaPy.xml b/src/Mod/Path/App/AreaPy.xml index 6061a3976b..372deb2162 100644 --- a/src/Mod/Path/App/AreaPy.xml +++ b/src/Mod/Path/App/AreaPy.xml @@ -1,13 +1,13 @@ - diff --git a/src/Mod/Path/App/AreaPyImp.cpp b/src/Mod/Path/App/AreaPyImp.cpp index a39776231a..dffe627c64 100644 --- a/src/Mod/Path/App/AreaPyImp.cpp +++ b/src/Mod/Path/App/AreaPyImp.cpp @@ -48,7 +48,7 @@ static PyObject * areaSetParams(PyObject *, PyObject *args, PyObject *kwd) { static char *kwlist[] = {PARAM_FIELD_STRINGS(NAME,AREA_PARAMS_STATIC_CONF),nullptr}; - if(args && PySequence_Size(args)>0) + if(args && PySequence_Size(args)>0) PyErr_SetString(PyExc_ValueError,"Non-keyword argument is not supported"); //Declare variables defined in the NAME field of the CONF parameter list @@ -62,9 +62,9 @@ static PyObject * areaSetParams(PyObject *, PyObject *args, PyObject *kwd) { //populate the CONF variables with params PARAM_FOREACH(AREA_SET,AREA_PARAMS_STATIC_CONF) - //Parse arguments to overwrite CONF variables - if (!PyArg_ParseTupleAndKeywords(args, kwd, - "|" PARAM_PY_KWDS(AREA_PARAMS_STATIC_CONF), kwlist, + //Parse arguments to overwrite CONF variables + if (!PyArg_ParseTupleAndKeywords(args, kwd, + "|" PARAM_PY_KWDS(AREA_PARAMS_STATIC_CONF), kwlist, PARAM_REF(PARAM_FNAME,AREA_PARAMS_STATIC_CONF))) return nullptr; @@ -258,8 +258,8 @@ PyObject* AreaPy::add(PyObject *args, PyObject *keywds) //they added '$' to address that issue. static char *kwlist[] = {"shape",PARAM_FIELD_STRINGS(ARG,AREA_PARAMS_OPCODE), nullptr}; - if (!PyArg_ParseTupleAndKeywords(args, keywds, - "O|" PARAM_PY_KWDS(AREA_PARAMS_OPCODE), + if (!PyArg_ParseTupleAndKeywords(args, keywds, + "O|" PARAM_PY_KWDS(AREA_PARAMS_OPCODE), kwlist,&pcObj,PARAM_REF(PARAM_FARG,AREA_PARAMS_OPCODE))) return nullptr; @@ -303,8 +303,8 @@ PyObject* AreaPy::makeOffset(PyObject *args, PyObject *keywds) PARAM_PY_DECLARE_INIT(PARAM_FARG,AREA_PARAMS_OFFSET) //Parse arguments to overwrite the defaults - if (!PyArg_ParseTupleAndKeywords(args, keywds, - "|h" PARAM_PY_KWDS(AREA_PARAMS_OFFSET), kwlist, + if (!PyArg_ParseTupleAndKeywords(args, keywds, + "|h" PARAM_PY_KWDS(AREA_PARAMS_OFFSET), kwlist, &index,PARAM_REF(PARAM_FARG,AREA_PARAMS_OFFSET))) return nullptr; @@ -325,8 +325,8 @@ PyObject* AreaPy::makePocket(PyObject *args, PyObject *keywds) //Override pocket mode default mode = Area::PocketModeZigZagOffset; - if (!PyArg_ParseTupleAndKeywords(args, keywds, - "|h" PARAM_PY_KWDS(AREA_PARAMS_POCKET), kwlist, + if (!PyArg_ParseTupleAndKeywords(args, keywds, + "|h" PARAM_PY_KWDS(AREA_PARAMS_POCKET), kwlist, &index,PARAM_REF(PARAM_FARG,AREA_PARAMS_POCKET))) return nullptr; @@ -339,15 +339,15 @@ PyObject* AreaPy::makePocket(PyObject *args, PyObject *keywds) PyObject* AreaPy::makeSections(PyObject *args, PyObject *keywds) { - static char *kwlist[] = {PARAM_FIELD_STRINGS(ARG,AREA_PARAMS_SECTION_EXTRA), + static char *kwlist[] = {PARAM_FIELD_STRINGS(ARG,AREA_PARAMS_SECTION_EXTRA), "heights", "plane", nullptr}; PyObject *heights = nullptr; PyObject *plane = nullptr; PARAM_PY_DECLARE_INIT(PARAM_FARG,AREA_PARAMS_SECTION_EXTRA) - if (!PyArg_ParseTupleAndKeywords(args, keywds, - "|" PARAM_PY_KWDS(AREA_PARAMS_SECTION_EXTRA) "OO!", kwlist, + if (!PyArg_ParseTupleAndKeywords(args, keywds, + "|" PARAM_PY_KWDS(AREA_PARAMS_SECTION_EXTRA) "OO!", kwlist, PARAM_REF(PARAM_FARG,AREA_PARAMS_SECTION_EXTRA), &heights, &(Part::TopoShapePy::Type), &plane)) return nullptr; @@ -380,7 +380,7 @@ PyObject* AreaPy::makeSections(PyObject *args, PyObject *keywds) h,plane?GET_TOPOSHAPE(plane):TopoDS_Shape()); Py::List ret; - for(auto &area : sections) + for(auto &area : sections) ret.append(Py::asObject(new AreaPy(new Area(*area,true)))); return Py::new_reference_to(ret); } PY_CATCH_OCC @@ -403,9 +403,9 @@ PyObject* AreaPy::setParams(PyObject *args, PyObject *keywds) //populate the CONF variables with params PARAM_FOREACH(AREA_SET,AREA_PARAMS_CONF) - //Parse arguments to overwrite CONF variables - if (!PyArg_ParseTupleAndKeywords(args, keywds, - "|" PARAM_PY_KWDS(AREA_PARAMS_CONF), kwlist, + //Parse arguments to overwrite CONF variables + if (!PyArg_ParseTupleAndKeywords(args, keywds, + "|" PARAM_PY_KWDS(AREA_PARAMS_CONF), kwlist, PARAM_REF(PARAM_FNAME,AREA_PARAMS_CONF))) return nullptr; @@ -485,5 +485,5 @@ PyObject *AreaPy::getCustomAttributes(const char* /*attr*/) const int AreaPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Path/App/Command.h b/src/Mod/Path/App/Command.h index 323e41923b..a2cde1f8bc 100644 --- a/src/Mod/Path/App/Command.h +++ b/src/Mod/Path/App/Command.h @@ -36,7 +36,7 @@ namespace Path class PathExport Command : public Base::Persistence { TYPESYSTEM_HEADER(); - + public: //constructors Command(); @@ -47,7 +47,7 @@ namespace Path virtual unsigned int getMemSize (void) const; virtual void Save (Base::Writer &/*writer*/) const; virtual void Restore(Base::XMLReader &/*reader*/); - + // specific methods Base::Placement getPlacement (const Base::Vector3d pos = Base::Vector3d()) const; // returns a placement from the x,y,z,a,b,c parameters Base::Vector3d getCenter (void) const; // returns a 3d vector from the i,j,k parameters @@ -70,7 +70,7 @@ namespace Path std::string Name; std::map Parameters; }; - + } //namespace Path #endif // PATH_COMMAND_H diff --git a/src/Mod/Path/App/CommandPy.xml b/src/Mod/Path/App/CommandPy.xml index 1588b9dbe1..01da6a0587 100644 --- a/src/Mod/Path/App/CommandPy.xml +++ b/src/Mod/Path/App/CommandPy.xml @@ -1,13 +1,13 @@ - @@ -15,7 +15,7 @@ Command([name],[parameters]): Represents a basic Gcode command name (optional) is the name of the command, ex. G1 -parameters (optional) is a dictionary containing string:number +parameters (optional) is a dictionary containing string:number pairs, or a placement, or a vector diff --git a/src/Mod/Path/App/CommandPyImp.cpp b/src/Mod/Path/App/CommandPyImp.cpp index ab3d366dc7..835756ee71 100644 --- a/src/Mod/Path/App/CommandPyImp.cpp +++ b/src/Mod/Path/App/CommandPyImp.cpp @@ -56,7 +56,7 @@ std::string CommandPy::representation() const return str.str(); } -// +// // Py::Dict parameters_copy_dict is now a class member to avoid delete/create/copy on every read access from python code // Now the pre-filled Py::Dict is returned which is more consistent with normal python behaviour. // It should be cleared whenever the c++ Parameters object is changed eg setParameters() or other objects invalidate its content, eg setPlacement() @@ -154,7 +154,7 @@ void CommandPy::setName(Py::String arg) Py::Dict CommandPy::getParameters() const { // dict now a class member , https://forum.freecadweb.org/viewtopic.php?f=15&t=50583 - if (parameters_copy_dict.length()==0) { + if (parameters_copy_dict.length()==0) { for(std::map::iterator i = getCommandPtr()->Parameters.begin(); i != getCommandPtr()->Parameters.end(); ++i) { parameters_copy_dict.setItem(i->first, Py::Float(i->second)); } diff --git a/src/Mod/Path/App/FeatureAreaPy.xml b/src/Mod/Path/App/FeatureAreaPy.xml index da1b916d3d..d827bcc43f 100644 --- a/src/Mod/Path/App/FeatureAreaPy.xml +++ b/src/Mod/Path/App/FeatureAreaPy.xml @@ -1,13 +1,13 @@ - diff --git a/src/Mod/Path/App/FeatureAreaPyImp.cpp b/src/Mod/Path/App/FeatureAreaPyImp.cpp index cc975a8ca4..1bf741aae3 100644 --- a/src/Mod/Path/App/FeatureAreaPyImp.cpp +++ b/src/Mod/Path/App/FeatureAreaPyImp.cpp @@ -65,9 +65,9 @@ PyObject* FeatureAreaPy::setParams(PyObject *args, PyObject *keywds) //populate the CONF variables with values in properties PARAM_FOREACH(AREA_SET,AREA_PARAMS_CONF) - //Parse arguments to overwrite CONF variables - if (!PyArg_ParseTupleAndKeywords(args, keywds, - "|" PARAM_PY_KWDS(AREA_PARAMS_CONF), kwlist, + //Parse arguments to overwrite CONF variables + if (!PyArg_ParseTupleAndKeywords(args, keywds, + "|" PARAM_PY_KWDS(AREA_PARAMS_CONF), kwlist, PARAM_REF(PARAM_FNAME,AREA_PARAMS_CONF))) return nullptr; diff --git a/src/Mod/Path/App/FeaturePath.cpp b/src/Mod/Path/App/FeaturePath.cpp index ad41da82c7..fe9d8eec06 100644 --- a/src/Mod/Path/App/FeaturePath.cpp +++ b/src/Mod/Path/App/FeaturePath.cpp @@ -55,7 +55,7 @@ PyObject *Feature::getPyObject() // ref counter is set to 1 PythonObject = Py::Object(new App::DocumentObjectPy(this),true); } - return Py::new_reference_to(PythonObject); + return Py::new_reference_to(PythonObject); } void Feature::onChanged(const App::Property* prop) diff --git a/src/Mod/Path/App/FeaturePathCompound.cpp b/src/Mod/Path/App/FeaturePathCompound.cpp index c29329c59f..4dc2a38951 100644 --- a/src/Mod/Path/App/FeaturePathCompound.cpp +++ b/src/Mod/Path/App/FeaturePathCompound.cpp @@ -71,7 +71,7 @@ App::DocumentObjectExecReturn *FeatureCompound::execute() result.setCenter(Path.getValue().getCenter()); Path.setValue(result); - + return App::DocumentObject::StdReturn; } diff --git a/src/Mod/Path/App/FeaturePathCompound.h b/src/Mod/Path/App/FeaturePathCompound.h index cf46f8239e..b20bbdafb4 100644 --- a/src/Mod/Path/App/FeaturePathCompound.h +++ b/src/Mod/Path/App/FeaturePathCompound.h @@ -53,7 +53,7 @@ public: return "PathGui::ViewProviderPathCompound"; } virtual App::DocumentObjectExecReturn *execute(void); - + /// Checks whether the object \a obj is part of this group. bool hasObject(const DocumentObject* obj) const; /// Adds an object to this group. diff --git a/src/Mod/Path/App/FeaturePathCompoundPy.xml b/src/Mod/Path/App/FeaturePathCompoundPy.xml index 58dcb7a10a..180b707ee2 100644 --- a/src/Mod/Path/App/FeaturePathCompoundPy.xml +++ b/src/Mod/Path/App/FeaturePathCompoundPy.xml @@ -1,13 +1,13 @@ - diff --git a/src/Mod/Path/App/FeaturePathShape.h b/src/Mod/Path/App/FeaturePathShape.h index df8723020b..a6fd3b3c51 100644 --- a/src/Mod/Path/App/FeaturePathShape.h +++ b/src/Mod/Path/App/FeaturePathShape.h @@ -49,7 +49,7 @@ public: /// Constructor FeatureShape(); virtual ~FeatureShape(); - + // Part::PropertyPartShape Shape; App::PropertyLinkList Sources; App::PropertyVector StartPoint; @@ -65,7 +65,7 @@ public: virtual const char* getViewProviderName() const { return "PathGui::ViewProviderPathShape"; } - + protected: /// get called by the container when a property has changed //virtual void onChanged (const App::Property* prop); diff --git a/src/Mod/Path/App/Path.cpp b/src/Mod/Path/App/Path.cpp index 0d026c51c2..8357ac817f 100644 --- a/src/Mod/Path/App/Path.cpp +++ b/src/Mod/Path/App/Path.cpp @@ -282,7 +282,7 @@ Base::BoundBox3d Toolpath::getBoundBox() const BoundBoxSegmentVisitor visitor; PathSegmentWalker walker(*this); walker.walk(visitor, Vector3d(0, 0, 0)); - + return visitor.bb; } diff --git a/src/Mod/Path/App/Path.h b/src/Mod/Path/App/Path.h index b937602048..875fea6be8 100644 --- a/src/Mod/Path/App/Path.h +++ b/src/Mod/Path/App/Path.h @@ -35,25 +35,25 @@ namespace Path { /** The representation of a CNC Toolpath */ - + class PathExport Toolpath : public Base::Persistence { TYPESYSTEM_HEADER(); - + public: Toolpath(); Toolpath(const Toolpath&); ~Toolpath(); - + Toolpath &operator=(const Toolpath&); - + // from base class virtual unsigned int getMemSize (void) const; virtual void Save (Base::Writer &/*writer*/) const; virtual void Restore(Base::XMLReader &/*reader*/); void SaveDocFile (Base::Writer &writer) const; void RestoreDocFile(Base::Reader &reader); - + // interface void clear(void); // clears the internal data void addCommand(const Command &Cmd); // adds a command at the end @@ -65,12 +65,12 @@ namespace Path void setFromGCode(const std::string); // sets the path from the contents of the given GCode string std::string toGCode(void) const; // gets a gcode string representation from the Path Base::BoundBox3d getBoundBox(void) const; - + // shortcut functions unsigned int getSize(void) const { return vpcCommands.size(); } const std::vector &getCommands(void) const { return vpcCommands; } const Command &getCommand(unsigned int pos) const { return *vpcCommands[pos]; } - + // support for rotation const Base::Vector3d& getCenter() const { return center; } void setCenter(const Base::Vector3d &c); @@ -81,7 +81,7 @@ namespace Path std::vector vpcCommands; Base::Vector3d center; //KDL::Path_Composite *pcPath; - + /* inline KDL::Frame toFrame(const Base::Placement &To){ return KDL::Frame(KDL::Rotation::Quaternion(To.getRotation()[0], diff --git a/src/Mod/Path/App/PathPy.xml b/src/Mod/Path/App/PathPy.xml index 7338401db4..7a9f8ed42b 100644 --- a/src/Mod/Path/App/PathPy.xml +++ b/src/Mod/Path/App/PathPy.xml @@ -1,13 +1,13 @@ - diff --git a/src/Mod/Path/App/VoronoiCellPy.xml b/src/Mod/Path/App/VoronoiCellPy.xml index 49fcdf33f2..1d439da46a 100644 --- a/src/Mod/Path/App/VoronoiCellPy.xml +++ b/src/Mod/Path/App/VoronoiCellPy.xml @@ -1,14 +1,14 @@ - - - diff --git a/src/Mod/Path/App/VoronoiVertexPy.xml b/src/Mod/Path/App/VoronoiVertexPy.xml index b5262808ad..dc049bf0dd 100644 --- a/src/Mod/Path/App/VoronoiVertexPy.xml +++ b/src/Mod/Path/App/VoronoiVertexPy.xml @@ -1,14 +1,14 @@ - -