diff --git a/src/Mod/Part/App/AppPartPy.cpp b/src/Mod/Part/App/AppPartPy.cpp index ca9ce43b56..ba557f8dfb 100644 --- a/src/Mod/Part/App/AppPartPy.cpp +++ b/src/Mod/Part/App/AppPartPy.cpp @@ -124,14 +124,14 @@ PartExport void getPyShapes(PyObject *obj, std::vector &shapes) { return; if(PyObject_TypeCheck(obj,&Part::TopoShapePy::Type)) shapes.push_back(*static_cast(obj)->getTopoShapePtr()); - else if (PyObject_TypeCheck(obj, &GeometryPy::Type)) + else if (PyObject_TypeCheck(obj, &GeometryPy::Type)) shapes.emplace_back(static_cast(obj)->getGeometryPtr()->toShape()); else if(PySequence_Check(obj)) { Py::Sequence list(obj); for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) { if (PyObject_TypeCheck((*it).ptr(), &(Part::TopoShapePy::Type))) shapes.push_back(*static_cast((*it).ptr())->getTopoShapePtr()); - else if (PyObject_TypeCheck((*it).ptr(), &GeometryPy::Type)) + else if (PyObject_TypeCheck((*it).ptr(), &GeometryPy::Type)) shapes.emplace_back(static_cast( (*it).ptr())->getGeometryPtr()->toShape()); else @@ -622,7 +622,7 @@ public: " transformation matrix\n" "* retType: 0: return TopoShape,\n" " 1: return (shape,subObj,mat), where subObj is the object referenced in 'subname',\n" - " and 'mat' is the accumulated transformation matrix of that sub-object.\n" + " and 'mat' is the accumulated transformation matrix of that sub-object.\n" " 2: same as 1, but make sure 'subObj' is resolved if it is a link.\n" "* refine: refine the returned shape" ); @@ -885,7 +885,7 @@ private: { PyObject *shape; Py::List list; - if (!PyArg_ParseTuple(args.ptr(), "O", &shape)) + if (!PyArg_ParseTuple(args.ptr(), "O", &shape)) throw Py::Exception(); auto theShape = static_cast(shape)->getTopoShapePtr()->getShape(); for (TopExp_Explorer ex(theShape, TopAbs_FACE); ex.More(); ex.Next()) { @@ -2063,7 +2063,7 @@ private: try { if (useFontSpec) { #ifdef FC_OS_WIN32 -// Windows doesn't do Utf8 by default and FreeType doesn't do wchar. +// Windows doesn't do Utf8 by default and FreeType doesn't do wchar. // this is a hacky work around. // copy fontspec to Ascii temp name std::string tempFile = Base::FileInfo::getTempFileName(); //utf8/ascii @@ -2314,15 +2314,15 @@ private: PyObject *noElementMap = Py_False; PyObject *refine = Py_False; short retType = 0; - static char* kwd_list[] = {"obj", "subname", "mat", + static char* kwd_list[] = {"obj", "subname", "mat", "needSubElement","transform","retType","noElementMap","refine",nullptr}; if (!PyArg_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|sO!O!O!hO!O!", kwd_list, - &App::DocumentObjectPy::Type, &pObj, &subname, &Base::MatrixPy::Type, &pyMat, + &App::DocumentObjectPy::Type, &pObj, &subname, &Base::MatrixPy::Type, &pyMat, &PyBool_Type,&needSubElement,&PyBool_Type,&transform,&retType, &PyBool_Type,&noElementMap,&PyBool_Type,&refine)) throw Py::Exception(); - App::DocumentObject *obj = + App::DocumentObject *obj = static_cast(pObj)->getDocumentObjectPtr(); App::DocumentObject *subObj = nullptr; Base::Matrix4D mat; diff --git a/src/Mod/Part/App/ArcOfCirclePy.xml b/src/Mod/Part/App/ArcOfCirclePy.xml index ff5de20b48..1416c68f34 100644 --- a/src/Mod/Part/App/ArcOfCirclePy.xml +++ b/src/Mod/Part/App/ArcOfCirclePy.xml @@ -1,13 +1,13 @@ - diff --git a/src/Mod/Part/App/ArcOfCirclePyImp.cpp b/src/Mod/Part/App/ArcOfCirclePyImp.cpp index d48d76f122..16ce6a60d1 100644 --- a/src/Mod/Part/App/ArcOfCirclePyImp.cpp +++ b/src/Mod/Part/App/ArcOfCirclePyImp.cpp @@ -55,10 +55,10 @@ std::string ArcOfCirclePy::representation() const std::stringstream str; str << "ArcOfCircle ("; - str << "Radius : " << fRad << ", "; - str << "Position : (" << loc.X() << ", "<< loc.Y() << ", "<< loc.Z() << "), "; - str << "Direction : (" << dir.X() << ", "<< dir.Y() << ", "<< dir.Z() << "), "; - str << "Parameter : (" << u1 << ", " << u2 << ")"; + str << "Radius : " << fRad << ", "; + str << "Position : (" << loc.X() << ", "<< loc.Y() << ", "<< loc.Z() << "), "; + str << "Direction : (" << dir.X() << ", "<< dir.Y() << ", "<< dir.Z() << "), "; + str << "Parameter : (" << u1 << ", " << u2 << ")"; str << ")"; return str.str(); @@ -66,7 +66,7 @@ std::string ArcOfCirclePy::representation() const PyObject *ArcOfCirclePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of ArcOfCirclePy and the Twin object + // create a new instance of ArcOfCirclePy and the Twin object return new ArcOfCirclePy(new GeomArcOfCircle); } @@ -128,7 +128,7 @@ int ArcOfCirclePy::PyInit(PyObject* args, PyObject* /*kwds*/) Py::Float ArcOfCirclePy::getRadius() const { - return Py::Float(getGeomArcOfCirclePtr()->getRadius()); + return Py::Float(getGeomArcOfCirclePtr()->getRadius()); } void ArcOfCirclePy::setRadius(Py::Float arg) @@ -151,5 +151,5 @@ PyObject *ArcOfCirclePy::getCustomAttributes(const char* ) const int ArcOfCirclePy::setCustomAttributes(const char* , PyObject *) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/ArcOfConicPyImp.cpp b/src/Mod/Part/App/ArcOfConicPyImp.cpp index b795c0e220..68124dbc60 100644 --- a/src/Mod/Part/App/ArcOfConicPyImp.cpp +++ b/src/Mod/Part/App/ArcOfConicPyImp.cpp @@ -238,5 +238,5 @@ PyObject *ArcOfConicPy::getCustomAttributes(const char* ) const int ArcOfConicPy::setCustomAttributes(const char* , PyObject *) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/ArcOfEllipsePy.xml b/src/Mod/Part/App/ArcOfEllipsePy.xml index a7a4a14bc4..58b79fa0bb 100644 --- a/src/Mod/Part/App/ArcOfEllipsePy.xml +++ b/src/Mod/Part/App/ArcOfEllipsePy.xml @@ -1,13 +1,13 @@ - @@ -20,7 +20,7 @@ The major radius of the ellipse. - + The minor radius of the ellipse. diff --git a/src/Mod/Part/App/ArcOfEllipsePyImp.cpp b/src/Mod/Part/App/ArcOfEllipsePyImp.cpp index 8275935a4b..5da26a8cf3 100644 --- a/src/Mod/Part/App/ArcOfEllipsePyImp.cpp +++ b/src/Mod/Part/App/ArcOfEllipsePyImp.cpp @@ -51,23 +51,23 @@ std::string ArcOfEllipsePy::representation() const Standard_Real fMinRad = ellipse->MinorRadius(); Standard_Real u1 = trim->FirstParameter(); Standard_Real u2 = trim->LastParameter(); - + gp_Dir normal = ellipse->Axis().Direction(); gp_Dir xdir = ellipse->XAxis().Direction(); - + gp_Ax2 xdirref(loc, normal); // this is a reference XY for the ellipse - + Standard_Real fAngleXU = -xdir.AngleWithRef(xdirref.XDirection(),normal); - + std::stringstream str; str << "ArcOfEllipse ("; - str << "MajorRadius : " << fMajRad << ", "; + str << "MajorRadius : " << fMajRad << ", "; str << "MinorRadius : " << fMinRad << ", "; str << "AngleXU : " << fAngleXU << ", "; - str << "Position : (" << loc.X() << ", "<< loc.Y() << ", "<< loc.Z() << "), "; - str << "Direction : (" << dir.X() << ", "<< dir.Y() << ", "<< dir.Z() << "), "; - str << "Parameter : (" << u1 << ", " << u2 << ")"; + str << "Position : (" << loc.X() << ", "<< loc.Y() << ", "<< loc.Z() << "), "; + str << "Direction : (" << dir.X() << ", "<< dir.Y() << ", "<< dir.Z() << "), "; + str << "Parameter : (" << u1 << ", " << u2 << ")"; str << ")"; return str.str(); @@ -75,7 +75,7 @@ std::string ArcOfEllipsePy::representation() const PyObject *ArcOfEllipsePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of ArcOfEllipsePy and the Twin object + // create a new instance of ArcOfEllipsePy and the Twin object return new ArcOfEllipsePy(new GeomArcOfEllipse); } @@ -107,7 +107,7 @@ int ArcOfEllipsePy::PyInit(PyObject* args, PyObject* /*kwds*/) return -1; } } - + // All checks failed PyErr_SetString(PyExc_TypeError, "ArcOfEllipse constructor expects an ellipse curve and a parameter range"); @@ -116,7 +116,7 @@ int ArcOfEllipsePy::PyInit(PyObject* args, PyObject* /*kwds*/) Py::Float ArcOfEllipsePy::getMajorRadius() const { - return Py::Float(getGeomArcOfEllipsePtr()->getMajorRadius()); + return Py::Float(getGeomArcOfEllipsePtr()->getMajorRadius()); } void ArcOfEllipsePy::setMajorRadius(Py::Float arg) @@ -126,7 +126,7 @@ void ArcOfEllipsePy::setMajorRadius(Py::Float arg) Py::Float ArcOfEllipsePy::getMinorRadius() const { - return Py::Float(getGeomArcOfEllipsePtr()->getMinorRadius()); + return Py::Float(getGeomArcOfEllipsePtr()->getMinorRadius()); } void ArcOfEllipsePy::setMinorRadius(Py::Float arg) @@ -149,5 +149,5 @@ PyObject *ArcOfEllipsePy::getCustomAttributes(const char* ) const int ArcOfEllipsePy::setCustomAttributes(const char* , PyObject *) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/ArcOfHyperbolaPy.xml b/src/Mod/Part/App/ArcOfHyperbolaPy.xml index c6bdef44ba..4b7cc14c97 100644 --- a/src/Mod/Part/App/ArcOfHyperbolaPy.xml +++ b/src/Mod/Part/App/ArcOfHyperbolaPy.xml @@ -1,13 +1,13 @@ - @@ -20,7 +20,7 @@ The major radius of the hyperbola. - + The minor radius of the hyperbola. diff --git a/src/Mod/Part/App/ArcOfHyperbolaPyImp.cpp b/src/Mod/Part/App/ArcOfHyperbolaPyImp.cpp index 5276b7cdfa..2df2ab7b35 100644 --- a/src/Mod/Part/App/ArcOfHyperbolaPyImp.cpp +++ b/src/Mod/Part/App/ArcOfHyperbolaPyImp.cpp @@ -51,23 +51,23 @@ std::string ArcOfHyperbolaPy::representation() const Standard_Real fMinRad = hyperbola->MinorRadius(); Standard_Real u1 = trim->FirstParameter(); Standard_Real u2 = trim->LastParameter(); - + gp_Dir normal = hyperbola->Axis().Direction(); gp_Dir xdir = hyperbola->XAxis().Direction(); - + gp_Ax2 xdirref(loc, normal); // this is a reference XY for the hyperbola - + Standard_Real fAngleXU = -xdir.AngleWithRef(xdirref.XDirection(),normal); - + std::stringstream str; str << "ArcOfHyperbola ("; - str << "MajorRadius : " << fMajRad << ", "; + str << "MajorRadius : " << fMajRad << ", "; str << "MinorRadius : " << fMinRad << ", "; str << "AngleXU : " << fAngleXU << ", "; - str << "Position : (" << loc.X() << ", "<< loc.Y() << ", "<< loc.Z() << "), "; - str << "Direction : (" << dir.X() << ", "<< dir.Y() << ", "<< dir.Z() << "), "; - str << "Parameter : (" << u1 << ", " << u2 << ")"; + str << "Position : (" << loc.X() << ", "<< loc.Y() << ", "<< loc.Z() << "), "; + str << "Direction : (" << dir.X() << ", "<< dir.Y() << ", "<< dir.Z() << "), "; + str << "Parameter : (" << u1 << ", " << u2 << ")"; str << ")"; return str.str(); @@ -75,7 +75,7 @@ std::string ArcOfHyperbolaPy::representation() const PyObject *ArcOfHyperbolaPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of ArcOfHyperbolaPy and the Twin object + // create a new instance of ArcOfHyperbolaPy and the Twin object return new ArcOfHyperbolaPy(new GeomArcOfHyperbola); } @@ -107,7 +107,7 @@ int ArcOfHyperbolaPy::PyInit(PyObject* args, PyObject* /*kwds*/) return -1; } } - + // All checks failed PyErr_SetString(PyExc_TypeError, "ArcOfHyperbola constructor expects an hyperbola curve and a parameter range"); @@ -116,7 +116,7 @@ int ArcOfHyperbolaPy::PyInit(PyObject* args, PyObject* /*kwds*/) Py::Float ArcOfHyperbolaPy::getMajorRadius() const { - return Py::Float(getGeomArcOfHyperbolaPtr()->getMajorRadius()); + return Py::Float(getGeomArcOfHyperbolaPtr()->getMajorRadius()); } void ArcOfHyperbolaPy::setMajorRadius(Py::Float arg) @@ -126,7 +126,7 @@ void ArcOfHyperbolaPy::setMajorRadius(Py::Float arg) Py::Float ArcOfHyperbolaPy::getMinorRadius() const { - return Py::Float(getGeomArcOfHyperbolaPtr()->getMinorRadius()); + return Py::Float(getGeomArcOfHyperbolaPtr()->getMinorRadius()); } void ArcOfHyperbolaPy::setMinorRadius(Py::Float arg) @@ -149,5 +149,5 @@ PyObject *ArcOfHyperbolaPy::getCustomAttributes(const char* ) const int ArcOfHyperbolaPy::setCustomAttributes(const char* , PyObject *) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/ArcOfParabolaPy.xml b/src/Mod/Part/App/ArcOfParabolaPy.xml index d7110b4aed..a9b80ab471 100644 --- a/src/Mod/Part/App/ArcOfParabolaPy.xml +++ b/src/Mod/Part/App/ArcOfParabolaPy.xml @@ -1,13 +1,13 @@ - diff --git a/src/Mod/Part/App/ArcOfParabolaPyImp.cpp b/src/Mod/Part/App/ArcOfParabolaPyImp.cpp index 98b0fc3d84..12cd2ee609 100644 --- a/src/Mod/Part/App/ArcOfParabolaPyImp.cpp +++ b/src/Mod/Part/App/ArcOfParabolaPyImp.cpp @@ -50,22 +50,22 @@ std::string ArcOfParabolaPy::representation() const Standard_Real fFocal = parabola->Focal(); Standard_Real u1 = trim->FirstParameter(); Standard_Real u2 = trim->LastParameter(); - + gp_Dir normal = parabola->Axis().Direction(); gp_Dir xdir = parabola->XAxis().Direction(); - + gp_Ax2 xdirref(loc, normal); // this is a reference XY for the parabola - + Standard_Real fAngleXU = -xdir.AngleWithRef(xdirref.XDirection(),normal); - + std::stringstream str; str << "ArcOfParabola ("; - str << "Focal : " << fFocal << ", "; + str << "Focal : " << fFocal << ", "; str << "AngleXU : " << fAngleXU << ", "; - str << "Position : (" << loc.X() << ", "<< loc.Y() << ", "<< loc.Z() << "), "; - str << "Direction : (" << dir.X() << ", "<< dir.Y() << ", "<< dir.Z() << "), "; - str << "Parameter : (" << u1 << ", " << u2 << ")"; + str << "Position : (" << loc.X() << ", "<< loc.Y() << ", "<< loc.Z() << "), "; + str << "Direction : (" << dir.X() << ", "<< dir.Y() << ", "<< dir.Z() << "), "; + str << "Parameter : (" << u1 << ", " << u2 << ")"; str << ")"; return str.str(); @@ -73,7 +73,7 @@ std::string ArcOfParabolaPy::representation() const PyObject *ArcOfParabolaPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of ArcOfParabolaPy and the Twin object + // create a new instance of ArcOfParabolaPy and the Twin object return new ArcOfParabolaPy(new GeomArcOfParabola); } @@ -105,7 +105,7 @@ int ArcOfParabolaPy::PyInit(PyObject* args, PyObject* /*kwds*/) return -1; } } - + // All checks failed PyErr_SetString(PyExc_TypeError, "ArcOfParabola constructor expects an parabola curve and a parameter range"); @@ -114,7 +114,7 @@ int ArcOfParabolaPy::PyInit(PyObject* args, PyObject* /*kwds*/) Py::Float ArcOfParabolaPy::getFocal() const { - return Py::Float(getGeomArcOfParabolaPtr()->getFocal()); + return Py::Float(getGeomArcOfParabolaPtr()->getFocal()); } void ArcOfParabolaPy::setFocal(Py::Float arg) @@ -137,5 +137,5 @@ PyObject *ArcOfParabolaPy::getCustomAttributes(const char* ) const int ArcOfParabolaPy::setCustomAttributes(const char* , PyObject *) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/AttachEnginePy.xml b/src/Mod/Part/App/AttachEnginePy.xml index 4def905d37..e0ddc60795 100644 --- a/src/Mod/Part/App/AttachEnginePy.xml +++ b/src/Mod/Part/App/AttachEnginePy.xml @@ -1,13 +1,13 @@ - diff --git a/src/Mod/Part/App/AttachExtension.cpp b/src/Mod/Part/App/AttachExtension.cpp index fae069f712..fe76dd9f97 100644 --- a/src/Mod/Part/App/AttachExtension.cpp +++ b/src/Mod/Part/App/AttachExtension.cpp @@ -275,7 +275,7 @@ App::PropertyPlacement& AttachExtension::getPlacement() const { } PyObject* AttachExtension::getExtensionPyObject() { - + if (ExtensionPythonObject.is(Py::_None())){ // ref counter is set to 1 ExtensionPythonObject = Py::Object(new AttachExtensionPy(this),true); diff --git a/src/Mod/Part/App/AttachExtension.h b/src/Mod/Part/App/AttachExtension.h index ad80346303..0764bd68e8 100644 --- a/src/Mod/Part/App/AttachExtension.h +++ b/src/Mod/Part/App/AttachExtension.h @@ -118,7 +118,7 @@ public: protected: void extensionOnChanged(const App::Property* /*prop*/) override; virtual void extHandleChangedPropertyName(Base::XMLReader &reader, const char* TypeName, const char* PropName); - + App::PropertyPlacement& getPlacement() const; public: diff --git a/src/Mod/Part/App/AttachExtensionPy.xml b/src/Mod/Part/App/AttachExtensionPy.xml index df5f91dd33..e839670f4f 100644 --- a/src/Mod/Part/App/AttachExtensionPy.xml +++ b/src/Mod/Part/App/AttachExtensionPy.xml @@ -1,13 +1,13 @@  - diff --git a/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPy.xml b/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPy.xml index b49f027eda..e2dd1fd641 100644 --- a/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPy.xml +++ b/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPy.xml @@ -31,7 +31,7 @@ setTrihedronMode(point,direction) Sets a fixed trihedron to perform the sweeping. - All sections will be parallel. + All sections will be parallel. @@ -58,15 +58,15 @@ setAuxiliarySpine(wire, CurvilinearEquivalence, TypeOfContact) Sets an auxiliary spine to define the Normal. - + CurvilinearEquivalence = bool For each Point of the Spine P, an Point Q is evalued on AuxiliarySpine. If CurvilinearEquivalence=True Q split AuxiliarySpine with the same length ratio than P split Spine. - + * OCC before 6.7 TypeOfContact = bool True = keep Contact - + * OCC >= 6.7 TypeOfContact = long 0: No contact @@ -182,7 +182,7 @@ setMaxDegree(int degree) - Define the maximum V degree of resulting surface. + Define the maximum V degree of resulting surface. diff --git a/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp b/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp index d43f4b4ed7..4dc18a81da 100644 --- a/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp +++ b/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp @@ -46,7 +46,7 @@ using namespace Part; PyObject *BRepOffsetAPI_MakePipeShellPy::PyMake(struct _typeobject *, PyObject *args, PyObject *) // Python wrapper { - // create a new instance of BRepOffsetAPI_MakePipeShellPy and the Twin object + // create a new instance of BRepOffsetAPI_MakePipeShellPy and the Twin object PyObject* obj; if (!PyArg_ParseTuple(args, "O!",&(TopoShapePy::Type),&obj)) return nullptr; @@ -459,7 +459,7 @@ PyObject* BRepOffsetAPI_MakePipeShellPy::simulate(PyObject *args) return nullptr; try { - TopTools_ListOfShape list; + TopTools_ListOfShape list; this->getBRepOffsetAPI_MakePipeShellPtr()->Simulate(nbsec, list); Py::List shapes; @@ -484,5 +484,5 @@ PyObject *BRepOffsetAPI_MakePipeShellPy::getCustomAttributes(const char* ) const int BRepOffsetAPI_MakePipeShellPy::setCustomAttributes(const char* , PyObject *) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/BezierCurvePyImp.cpp b/src/Mod/Part/App/BezierCurvePyImp.cpp index d0630b5882..96f839f273 100644 --- a/src/Mod/Part/App/BezierCurvePyImp.cpp +++ b/src/Mod/Part/App/BezierCurvePyImp.cpp @@ -395,7 +395,7 @@ PyObject* BezierCurvePy::interpolate(PyObject * args) int nb_pts = constraints.size(); if (nb_pts < 2) Standard_Failure::Raise("not enough points given"); - + TColStd_Array1OfReal params(1, nb_pts); if (par) { Py::Sequence plist(par); @@ -413,7 +413,7 @@ PyObject* BezierCurvePy::interpolate(PyObject * args) params(idx+1) = (double)idx/((double)nb_pts-1); } } - + int num_poles = 0; for (Py::Sequence::iterator it1 = constraints.begin(); it1 != constraints.end(); ++it1) { Py::Sequence row(*it1); diff --git a/src/Mod/Part/App/BezierSurfacePy.xml b/src/Mod/Part/App/BezierSurfacePy.xml index df24314d95..8658710289 100644 --- a/src/Mod/Part/App/BezierSurfacePy.xml +++ b/src/Mod/Part/App/BezierSurfacePy.xml @@ -201,14 +201,14 @@ in the u parametric direction, and between V1 and V2 in the v parametric direction. U1, U2, V1, and V2 can be outside the bounds of this surface. - + -- U1 and U2 isoparametric Bezier curves, segmented between V1 and V2, become the two bounds of the surface in the v parametric direction (0. and 1. u isoparametric curves). -- V1 and V2 isoparametric Bezier curves, segmented between U1 and U2, become the two bounds of the surface in the u parametric direction (0. and 1. v isoparametric curves). - + The poles and weights tables are modified, but the degree of this surface in the u and v parametric directions does not change.U1 can be greater than U2, and V1 can be greater than V2. diff --git a/src/Mod/Part/App/BezierSurfacePyImp.cpp b/src/Mod/Part/App/BezierSurfacePyImp.cpp index 2ff67c75c6..fd628b4f69 100644 --- a/src/Mod/Part/App/BezierSurfacePyImp.cpp +++ b/src/Mod/Part/App/BezierSurfacePyImp.cpp @@ -48,7 +48,7 @@ std::string BezierSurfacePy::representation() const PyObject *BezierSurfacePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of BezierSurfacePy and the Twin object + // create a new instance of BezierSurfacePy and the Twin object return new BezierSurfacePy(new GeomBezierSurface); } @@ -673,35 +673,35 @@ Py::Long BezierSurfacePy::getUDegree() const { Handle(Geom_BezierSurface) surf = Handle(Geom_BezierSurface)::DownCast (getGeometryPtr()->handle()); - return Py::Long(surf->UDegree()); + return Py::Long(surf->UDegree()); } Py::Long BezierSurfacePy::getVDegree() const { Handle(Geom_BezierSurface) surf = Handle(Geom_BezierSurface)::DownCast (getGeometryPtr()->handle()); - return Py::Long(surf->VDegree()); + return Py::Long(surf->VDegree()); } Py::Long BezierSurfacePy::getMaxDegree() const { Handle(Geom_BezierSurface) surf = Handle(Geom_BezierSurface)::DownCast (getGeometryPtr()->handle()); - return Py::Long(surf->MaxDegree()); + return Py::Long(surf->MaxDegree()); } Py::Long BezierSurfacePy::getNbUPoles() const { Handle(Geom_BezierSurface) surf = Handle(Geom_BezierSurface)::DownCast (getGeometryPtr()->handle()); - return Py::Long(surf->NbUPoles()); + return Py::Long(surf->NbUPoles()); } Py::Long BezierSurfacePy::getNbVPoles() const { Handle(Geom_BezierSurface) surf = Handle(Geom_BezierSurface)::DownCast (getGeometryPtr()->handle()); - return Py::Long(surf->NbVPoles()); + return Py::Long(surf->NbVPoles()); } PyObject *BezierSurfacePy::getCustomAttributes(const char* /*attr*/) const @@ -711,5 +711,5 @@ PyObject *BezierSurfacePy::getCustomAttributes(const char* /*attr*/) const int BezierSurfacePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/BodyBase.cpp b/src/Mod/Part/App/BodyBase.cpp index 62ae889d94..44ce29bafa 100644 --- a/src/Mod/Part/App/BodyBase.cpp +++ b/src/Mod/Part/App/BodyBase.cpp @@ -80,7 +80,7 @@ bool BodyBase::isAfter(const App::DocumentObject *feature, const App::DocumentOb } void BodyBase::onBeforeChange (const App::Property* prop) { - + //Tip can't point outside the body, hence no base feature tip /*// If we are changing the base feature and tip point to it reset it if ( prop == &BaseFeature && BaseFeature.getValue() == Tip.getValue() && BaseFeature.getValue() ) { diff --git a/src/Mod/Part/App/BodyBasePy.xml b/src/Mod/Part/App/BodyBasePy.xml index 94b232fce9..5f7f9f0487 100644 --- a/src/Mod/Part/App/BodyBasePy.xml +++ b/src/Mod/Part/App/BodyBasePy.xml @@ -1,13 +1,13 @@  - diff --git a/src/Mod/Part/App/BodyBasePyImp.cpp b/src/Mod/Part/App/BodyBasePyImp.cpp index 97c0fbdfcc..c2950d5d5a 100644 --- a/src/Mod/Part/App/BodyBasePyImp.cpp +++ b/src/Mod/Part/App/BodyBasePyImp.cpp @@ -44,7 +44,7 @@ PyObject *BodyBasePy::getCustomAttributes(const char* /*attr*/) const int BodyBasePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/ChFi2d/ChFi2d_AnaFilletAlgoPy.xml b/src/Mod/Part/App/ChFi2d/ChFi2d_AnaFilletAlgoPy.xml index e7dfc30af9..dd1e79ee9f 100644 --- a/src/Mod/Part/App/ChFi2d/ChFi2d_AnaFilletAlgoPy.xml +++ b/src/Mod/Part/App/ChFi2d/ChFi2d_AnaFilletAlgoPy.xml @@ -1,13 +1,13 @@ - - - - - diff --git a/src/Mod/Part/App/CirclePyImp.cpp b/src/Mod/Part/App/CirclePyImp.cpp index 462e148028..7e1410406f 100644 --- a/src/Mod/Part/App/CirclePyImp.cpp +++ b/src/Mod/Part/App/CirclePyImp.cpp @@ -49,9 +49,9 @@ std::string CirclePy::representation() const std::stringstream str; str << "Circle ("; - str << "Radius : " << fRad << ", "; - str << "Position : (" << loc.X() << ", "<< loc.Y() << ", "<< loc.Z() << "), "; - str << "Direction : (" << dir.X() << ", "<< dir.Y() << ", "<< dir.Z() << ")"; + str << "Radius : " << fRad << ", "; + str << "Position : (" << loc.X() << ", "<< loc.Y() << ", "<< loc.Z() << "), "; + str << "Direction : (" << dir.X() << ", "<< dir.Y() << ", "<< dir.Z() << ")"; str << ")"; return str.str(); @@ -59,7 +59,7 @@ std::string CirclePy::representation() const PyObject *CirclePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of CirclePy and the Twin object + // create a new instance of CirclePy and the Twin object Handle(Geom_Circle) circle = new Geom_Circle(gp_Circ()); return new CirclePy(new GeomCircle(circle)); } @@ -164,7 +164,7 @@ int CirclePy::PyInit(PyObject* args, PyObject* kwds) Py::Float CirclePy::getRadius() const { Handle(Geom_Circle) circle = Handle(Geom_Circle)::DownCast(getGeomCirclePtr()->handle()); - return Py::Float(circle->Radius()); + return Py::Float(circle->Radius()); } void CirclePy::setRadius(Py::Float arg) @@ -180,5 +180,5 @@ PyObject *CirclePy::getCustomAttributes(const char* ) const int CirclePy::setCustomAttributes(const char* , PyObject *) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/ConePy.xml b/src/Mod/Part/App/ConePy.xml index be5b63d638..8b8c364a4a 100644 --- a/src/Mod/Part/App/ConePy.xml +++ b/src/Mod/Part/App/ConePy.xml @@ -1,14 +1,14 @@ - diff --git a/src/Mod/Part/App/ConePyImp.cpp b/src/Mod/Part/App/ConePyImp.cpp index c9ed212f85..09a0f2520f 100644 --- a/src/Mod/Part/App/ConePyImp.cpp +++ b/src/Mod/Part/App/ConePyImp.cpp @@ -48,7 +48,7 @@ std::string ConePy::representation() const PyObject *ConePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of ConePy and the Twin object + // create a new instance of ConePy and the Twin object return new ConePy(new GeomCone); } @@ -155,7 +155,7 @@ Py::Float ConePy::getRadius() const { Handle(Geom_ConicalSurface) s = Handle(Geom_ConicalSurface)::DownCast (getGeomConePtr()->handle()); - return Py::Float(s->RefRadius()); + return Py::Float(s->RefRadius()); } void ConePy::setRadius(Py::Float arg) @@ -169,7 +169,7 @@ Py::Float ConePy::getSemiAngle() const { Handle(Geom_ConicalSurface) s = Handle(Geom_ConicalSurface)::DownCast (getGeomConePtr()->handle()); - return Py::Float(s->SemiAngle()); + return Py::Float(s->SemiAngle()); } void ConePy::setSemiAngle(Py::Float arg) @@ -259,7 +259,7 @@ PyObject *ConePy::getCustomAttributes(const char* /*attr*/) const int ConePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/ConicPy.xml b/src/Mod/Part/App/ConicPy.xml index 4cc015c280..bf14ec9796 100644 --- a/src/Mod/Part/App/ConicPy.xml +++ b/src/Mod/Part/App/ConicPy.xml @@ -1,13 +1,13 @@ - diff --git a/src/Mod/Part/App/ConicPyImp.cpp b/src/Mod/Part/App/ConicPyImp.cpp index 06d5d4456d..685f8f0869 100644 --- a/src/Mod/Part/App/ConicPyImp.cpp +++ b/src/Mod/Part/App/ConicPyImp.cpp @@ -234,5 +234,5 @@ PyObject *ConicPy::getCustomAttributes(const char* ) const int ConicPy::setCustomAttributes(const char* , PyObject *) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/CylinderPy.xml b/src/Mod/Part/App/CylinderPy.xml index 19636c65c2..7b44e08b0a 100644 --- a/src/Mod/Part/App/CylinderPy.xml +++ b/src/Mod/Part/App/CylinderPy.xml @@ -1,14 +1,14 @@ - diff --git a/src/Mod/Part/App/CylinderPyImp.cpp b/src/Mod/Part/App/CylinderPyImp.cpp index 75559ce6a6..9297b43efb 100644 --- a/src/Mod/Part/App/CylinderPyImp.cpp +++ b/src/Mod/Part/App/CylinderPyImp.cpp @@ -49,7 +49,7 @@ std::string CylinderPy::representation() const PyObject *CylinderPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of CylinderPy and the Twin object + // create a new instance of CylinderPy and the Twin object return new CylinderPy(new GeomCylinder); } @@ -154,7 +154,7 @@ Py::Float CylinderPy::getRadius() const { Handle(Geom_CylindricalSurface) cyl = Handle(Geom_CylindricalSurface)::DownCast (getGeomCylinderPtr()->handle()); - return Py::Float(cyl->Radius()); + return Py::Float(cyl->Radius()); } void CylinderPy::setRadius(Py::Float arg) @@ -244,7 +244,7 @@ PyObject *CylinderPy::getCustomAttributes(const char* /*attr*/) const int CylinderPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/DatumFeature.cpp b/src/Mod/Part/App/DatumFeature.cpp index 8cabfb5d5a..670d75742c 100644 --- a/src/Mod/Part/App/DatumFeature.cpp +++ b/src/Mod/Part/App/DatumFeature.cpp @@ -57,12 +57,12 @@ TopoDS_Shape Datum::getShape() const return sh.getShape(); } -App::DocumentObject *Datum::getSubObject(const char *subname, +App::DocumentObject *Datum::getSubObject(const char *subname, PyObject **pyObj, Base::Matrix4D *pmat, bool transform, int depth) const { // For the sake of simplicity, we don't bother to check for subname, just // return the shape as it is, because a datum object only holds shape with - // one single geometry element. + // one single geometry element. (void)subname; (void)depth; @@ -75,7 +75,7 @@ App::DocumentObject *Datum::getSubObject(const char *subname, Base::PyGILStateLocker lock; PY_TRY { TopoShape ts(getShape().Located(TopLoc_Location())); - if(pmat && !ts.isNull()) + if(pmat && !ts.isNull()) ts.transformShape(*pmat,false,true); *pyObj = Py::new_reference_to(shape2pyshape(ts.getShape())); return const_cast(this); diff --git a/src/Mod/Part/App/EllipsePyImp.cpp b/src/Mod/Part/App/EllipsePyImp.cpp index 3630a8defd..034bc2b78a 100644 --- a/src/Mod/Part/App/EllipsePyImp.cpp +++ b/src/Mod/Part/App/EllipsePyImp.cpp @@ -46,7 +46,7 @@ std::string EllipsePy::representation() const PyObject *EllipsePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of EllipsePy and the Twin object + // create a new instance of EllipsePy and the Twin object return new EllipsePy(new GeomEllipse); } @@ -128,7 +128,7 @@ int EllipsePy::PyInit(PyObject* args, PyObject* kwds) Py::Float EllipsePy::getMajorRadius() const { Handle(Geom_Ellipse) ellipse = Handle(Geom_Ellipse)::DownCast(getGeomEllipsePtr()->handle()); - return Py::Float(ellipse->MajorRadius()); + return Py::Float(ellipse->MajorRadius()); } void EllipsePy::setMajorRadius(Py::Float arg) @@ -140,7 +140,7 @@ void EllipsePy::setMajorRadius(Py::Float arg) Py::Float EllipsePy::getMinorRadius() const { Handle(Geom_Ellipse) ellipse = Handle(Geom_Ellipse)::DownCast(getGeomEllipsePtr()->handle()); - return Py::Float(ellipse->MinorRadius()); + return Py::Float(ellipse->MinorRadius()); } void EllipsePy::setMinorRadius(Py::Float arg) @@ -152,7 +152,7 @@ void EllipsePy::setMinorRadius(Py::Float arg) Py::Float EllipsePy::getFocal() const { Handle(Geom_Ellipse) ellipse = Handle(Geom_Ellipse)::DownCast(getGeomEllipsePtr()->handle()); - return Py::Float(ellipse->Focal()); + return Py::Float(ellipse->Focal()); } Py::Object EllipsePy::getFocus1() const @@ -176,5 +176,5 @@ PyObject *EllipsePy::getCustomAttributes(const char* /*attr*/) const int EllipsePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/ExtrusionHelper.cpp b/src/Mod/Part/App/ExtrusionHelper.cpp index 27b6866bc1..0efaf139f0 100644 --- a/src/Mod/Part/App/ExtrusionHelper.cpp +++ b/src/Mod/Part/App/ExtrusionHelper.cpp @@ -108,7 +108,7 @@ void ExtrusionHelper::makeDraft(const TopoDS_Shape& shape, // methods like checking the center of mass etc. don't help us here. // As solution we build a prism with every wire, then subtract every prism from each other. // If the moment of inertia changes by a subtraction, we have an inner wire prism. - // + // // first build the prisms std::vector resultPrisms; TopoDS_Shape singlePrism; diff --git a/src/Mod/Part/App/FeatureGeometrySet.cpp b/src/Mod/Part/App/FeatureGeometrySet.cpp index 759c5df839..edab8409e2 100644 --- a/src/Mod/Part/App/FeatureGeometrySet.cpp +++ b/src/Mod/Part/App/FeatureGeometrySet.cpp @@ -54,7 +54,7 @@ App::DocumentObjectExecReturn *FeatureGeometrySet::execute() result.setShape(result.fuse(sh)); } } - + Shape.setValue(result); return App::DocumentObject::StdReturn; diff --git a/src/Mod/Part/App/FeaturePartBox.cpp b/src/Mod/Part/App/FeaturePartBox.cpp index 69b86d16e0..fb48eb9288 100644 --- a/src/Mod/Part/App/FeaturePartBox.cpp +++ b/src/Mod/Part/App/FeaturePartBox.cpp @@ -122,7 +122,7 @@ void Box::Restore(Base::XMLReader &reader) prop->setStatusValue(status.to_ulong()); } if (prop && strcmp(prop->getTypeId().getName(), TypeName) == 0) { - if (!prop->testStatus(App::Property::Transient) + if (!prop->testStatus(App::Property::Transient) && !status.test(App::Property::Transient) && !status.test(App::Property::PropTransient) && !(getPropertyType(prop) & App::Prop_Transient)) diff --git a/src/Mod/Part/App/FeaturePartCircle.cpp b/src/Mod/Part/App/FeaturePartCircle.cpp index b2f23dc648..c1d62f5282 100644 --- a/src/Mod/Part/App/FeaturePartCircle.cpp +++ b/src/Mod/Part/App/FeaturePartCircle.cpp @@ -65,7 +65,7 @@ App::DocumentObjectExecReturn *Circle::execute(void) { gp_Circ circle; circle.SetRadius(this->Radius.getValue()); - + BRepBuilderAPI_MakeEdge clMakeEdge(circle, Base::toRadians(this->Angle1.getValue()), Base::toRadians(this->Angle2.getValue())); const TopoDS_Edge& edge = clMakeEdge.Edge(); diff --git a/src/Mod/Part/App/FeaturePartCommon.cpp b/src/Mod/Part/App/FeaturePartCommon.cpp index d849d5009b..fa97633dba 100644 --- a/src/Mod/Part/App/FeaturePartCommon.cpp +++ b/src/Mod/Part/App/FeaturePartCommon.cpp @@ -121,7 +121,7 @@ App::DocumentObjectExecReturn *MultiCommon::execute() // Let's call algorithm computing a fuse operation: BRepAlgoAPI_Common mkCommon(resShape, *it); // Let's check if the fusion has been successful - if (!mkCommon.IsDone()) + if (!mkCommon.IsDone()) throw BooleanException("Intersection failed"); resShape = mkCommon.Shape(); diff --git a/src/Mod/Part/App/FeaturePartSection.h b/src/Mod/Part/App/FeaturePartSection.h index 74c233e0ff..e00a0df137 100644 --- a/src/Mod/Part/App/FeaturePartSection.h +++ b/src/Mod/Part/App/FeaturePartSection.h @@ -39,7 +39,7 @@ public: Section(); App::PropertyBool Approximation; - + /** @name methods override Feature */ //@{ /// recalculate the Feature diff --git a/src/Mod/Part/App/Geom2d/ArcOfCircle2dPy.xml b/src/Mod/Part/App/Geom2d/ArcOfCircle2dPy.xml index 444da061ba..feb6257f82 100644 --- a/src/Mod/Part/App/Geom2d/ArcOfCircle2dPy.xml +++ b/src/Mod/Part/App/Geom2d/ArcOfCircle2dPy.xml @@ -1,13 +1,13 @@ - diff --git a/src/Mod/Part/App/Geom2d/ArcOfCircle2dPyImp.cpp b/src/Mod/Part/App/Geom2d/ArcOfCircle2dPyImp.cpp index 37cf28cf92..566b4498d7 100644 --- a/src/Mod/Part/App/Geom2d/ArcOfCircle2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/ArcOfCircle2dPyImp.cpp @@ -48,7 +48,7 @@ std::string ArcOfCircle2dPy::representation() const PyObject *ArcOfCircle2dPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of ArcOfCirclePy and the Twin object + // create a new instance of ArcOfCirclePy and the Twin object return new ArcOfCircle2dPy(new Geom2dArcOfCircle); } @@ -132,5 +132,5 @@ PyObject *ArcOfCircle2dPy::getCustomAttributes(const char* ) const int ArcOfCircle2dPy::setCustomAttributes(const char* , PyObject *) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/Geom2d/ArcOfConic2dPy.xml b/src/Mod/Part/App/Geom2d/ArcOfConic2dPy.xml index b16fc7e717..27c438d22c 100644 --- a/src/Mod/Part/App/Geom2d/ArcOfConic2dPy.xml +++ b/src/Mod/Part/App/Geom2d/ArcOfConic2dPy.xml @@ -1,13 +1,13 @@ - diff --git a/src/Mod/Part/App/Geom2d/ArcOfConic2dPyImp.cpp b/src/Mod/Part/App/Geom2d/ArcOfConic2dPyImp.cpp index 20be65c3ec..c699ca5ca7 100644 --- a/src/Mod/Part/App/Geom2d/ArcOfConic2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/ArcOfConic2dPyImp.cpp @@ -117,5 +117,5 @@ PyObject *ArcOfConic2dPy::getCustomAttributes(const char* ) const int ArcOfConic2dPy::setCustomAttributes(const char* , PyObject *) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/Geom2d/ArcOfEllipse2dPy.xml b/src/Mod/Part/App/Geom2d/ArcOfEllipse2dPy.xml index 2da87e18c2..96692418eb 100644 --- a/src/Mod/Part/App/Geom2d/ArcOfEllipse2dPy.xml +++ b/src/Mod/Part/App/Geom2d/ArcOfEllipse2dPy.xml @@ -1,13 +1,13 @@ - @@ -20,7 +20,7 @@ The major radius of the ellipse. - + The minor radius of the ellipse. diff --git a/src/Mod/Part/App/Geom2d/ArcOfEllipse2dPyImp.cpp b/src/Mod/Part/App/Geom2d/ArcOfEllipse2dPyImp.cpp index 1cccf0b23f..0f92fe2d29 100644 --- a/src/Mod/Part/App/Geom2d/ArcOfEllipse2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/ArcOfEllipse2dPyImp.cpp @@ -70,7 +70,7 @@ int ArcOfEllipse2dPy::PyInit(PyObject* args, PyObject* /*kwds*/) return 0; } catch (Standard_Failure& e) { - + PyErr_SetString(PartExceptionOCCError, e.GetMessageString()); return -1; } @@ -79,7 +79,7 @@ int ArcOfEllipse2dPy::PyInit(PyObject* args, PyObject* /*kwds*/) return -1; } } - + // All checks failed PyErr_SetString(PyExc_TypeError, "ArcOfEllipse2d constructor expects an ellipse curve and a parameter range"); @@ -120,5 +120,5 @@ PyObject *ArcOfEllipse2dPy::getCustomAttributes(const char* ) const int ArcOfEllipse2dPy::setCustomAttributes(const char* , PyObject *) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/Geom2d/ArcOfHyperbola2dPy.xml b/src/Mod/Part/App/Geom2d/ArcOfHyperbola2dPy.xml index 8ebd9cc59f..0b16e03fcf 100644 --- a/src/Mod/Part/App/Geom2d/ArcOfHyperbola2dPy.xml +++ b/src/Mod/Part/App/Geom2d/ArcOfHyperbola2dPy.xml @@ -1,13 +1,13 @@ - @@ -20,7 +20,7 @@ The major radius of the hyperbola. - + The minor radius of the hyperbola. diff --git a/src/Mod/Part/App/Geom2d/ArcOfHyperbola2dPyImp.cpp b/src/Mod/Part/App/Geom2d/ArcOfHyperbola2dPyImp.cpp index a20d9f6713..793f27e1fe 100644 --- a/src/Mod/Part/App/Geom2d/ArcOfHyperbola2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/ArcOfHyperbola2dPyImp.cpp @@ -70,7 +70,7 @@ int ArcOfHyperbola2dPy::PyInit(PyObject* args, PyObject* /*kwds*/) return 0; } catch (Standard_Failure& e) { - + PyErr_SetString(PartExceptionOCCError, e.GetMessageString()); return -1; } @@ -79,7 +79,7 @@ int ArcOfHyperbola2dPy::PyInit(PyObject* args, PyObject* /*kwds*/) return -1; } } - + // All checks failed PyErr_SetString(PyExc_TypeError, "ArcOfHyperbola constructor expects an hyperbola curve and a parameter range"); @@ -121,5 +121,5 @@ PyObject *ArcOfHyperbola2dPy::getCustomAttributes(const char* ) const int ArcOfHyperbola2dPy::setCustomAttributes(const char* , PyObject *) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/Geom2d/ArcOfParabola2dPy.xml b/src/Mod/Part/App/Geom2d/ArcOfParabola2dPy.xml index c623e6166c..d45a81f7ee 100644 --- a/src/Mod/Part/App/Geom2d/ArcOfParabola2dPy.xml +++ b/src/Mod/Part/App/Geom2d/ArcOfParabola2dPy.xml @@ -1,13 +1,13 @@ - diff --git a/src/Mod/Part/App/Geom2d/ArcOfParabola2dPyImp.cpp b/src/Mod/Part/App/Geom2d/ArcOfParabola2dPyImp.cpp index c31836e611..9eaa5d93b0 100644 --- a/src/Mod/Part/App/Geom2d/ArcOfParabola2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/ArcOfParabola2dPyImp.cpp @@ -70,7 +70,7 @@ int ArcOfParabola2dPy::PyInit(PyObject* args, PyObject* /*kwds*/) return 0; } catch (Standard_Failure& e) { - + PyErr_SetString(PartExceptionOCCError, e.GetMessageString()); return -1; } @@ -79,7 +79,7 @@ int ArcOfParabola2dPy::PyInit(PyObject* args, PyObject* /*kwds*/) return -1; } } - + // All checks failed PyErr_SetString(PyExc_TypeError, "ArcOfParabola2d constructor expects an parabola curve and a parameter range"); @@ -111,5 +111,5 @@ PyObject *ArcOfParabola2dPy::getCustomAttributes(const char* ) const int ArcOfParabola2dPy::setCustomAttributes(const char* , PyObject *) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/Geom2d/BSplineCurve2dPyImp.cpp b/src/Mod/Part/App/Geom2d/BSplineCurve2dPyImp.cpp index f32ec4b3de..d7103e7610 100644 --- a/src/Mod/Part/App/Geom2d/BSplineCurve2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/BSplineCurve2dPyImp.cpp @@ -622,28 +622,28 @@ Py::Long BSplineCurve2dPy::getDegree() const { Handle(Geom2d_BSplineCurve) curve = Handle(Geom2d_BSplineCurve)::DownCast (getGeometry2dPtr()->handle()); - return Py::Long(curve->Degree()); + return Py::Long(curve->Degree()); } Py::Long BSplineCurve2dPy::getMaxDegree() const { Handle(Geom2d_BSplineCurve) curve = Handle(Geom2d_BSplineCurve)::DownCast (getGeometry2dPtr()->handle()); - return Py::Long(curve->MaxDegree()); + return Py::Long(curve->MaxDegree()); } Py::Long BSplineCurve2dPy::getNbPoles() const { Handle(Geom2d_BSplineCurve) curve = Handle(Geom2d_BSplineCurve)::DownCast (getGeometry2dPtr()->handle()); - return Py::Long(curve->NbPoles()); + return Py::Long(curve->NbPoles()); } Py::Long BSplineCurve2dPy::getNbKnots() const { Handle(Geom2d_BSplineCurve) curve = Handle(Geom2d_BSplineCurve)::DownCast (getGeometry2dPtr()->handle()); - return Py::Long(curve->NbKnots()); + return Py::Long(curve->NbKnots()); } Py::Object BSplineCurve2dPy::getStartPoint() const @@ -666,14 +666,14 @@ Py::Object BSplineCurve2dPy::getFirstUKnotIndex() const { Handle(Geom2d_BSplineCurve) curve = Handle(Geom2d_BSplineCurve)::DownCast (getGeometry2dPtr()->handle()); - return Py::Long(curve->FirstUKnotIndex()); + return Py::Long(curve->FirstUKnotIndex()); } Py::Object BSplineCurve2dPy::getLastUKnotIndex() const { Handle(Geom2d_BSplineCurve) curve = Handle(Geom2d_BSplineCurve)::DownCast (getGeometry2dPtr()->handle()); - return Py::Long(curve->LastUKnotIndex()); + return Py::Long(curve->LastUKnotIndex()); } Py::List BSplineCurve2dPy::getKnotSequence() const @@ -736,17 +736,17 @@ PyObject* BSplineCurve2dPy::approximate(PyObject *args, PyObject *kwds) double weight1 = 0; double weight2 = 0; double weight3 = 0; - + static char* kwds_interp[] = {"Points", "DegMax", "Continuity", "Tolerance", "DegMin", "ParamType", "Parameters", "LengthWeight", "CurvatureWeight", "TorsionWeight", nullptr}; - + if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|isdisOddd",kwds_interp, &obj, °Max, - &continuity, &tol3d, °Min, + &continuity, &tol3d, °Min, &parType, &par, &weight1, &weight2, &weight3)) return nullptr; - + try { Py::Sequence list(obj); TColgp_Array1OfPnt2d pnts(1,list.size()); @@ -759,7 +759,7 @@ PyObject* BSplineCurve2dPy::approximate(PyObject *args, PyObject *kwds) if (degMin > degMax) { Standard_Failure::Raise("DegMin must be lower or equal to DegMax"); } - + GeomAbs_Shape c; std::string str = continuity; if (str == "C0") @@ -778,7 +778,7 @@ PyObject* BSplineCurve2dPy::approximate(PyObject *args, PyObject *kwds) c = GeomAbs_CN; else c = GeomAbs_C2; - + if (weight1 || weight2 || weight3) { // It seems that this function only works with Continuity = C0, C1 or C2 if (!(c == GeomAbs_C0 || c == GeomAbs_C1 || c == GeomAbs_C2)) { @@ -796,7 +796,7 @@ PyObject* BSplineCurve2dPy::approximate(PyObject *args, PyObject *kwds) return nullptr; // goes to the catch block } } - + if (par) { Py::Sequence plist(par); TColStd_Array1OfReal parameters(1,plist.size()); @@ -805,7 +805,7 @@ PyObject* BSplineCurve2dPy::approximate(PyObject *args, PyObject *kwds) Py::Float f(*it); parameters(index++) = static_cast(f); } - + Geom2dAPI_PointsToBSpline fit(pnts, parameters, degMin, degMax, c, tol3d); Handle(Geom2d_BSplineCurve) spline = fit.Curve(); if (!spline.IsNull()) { @@ -817,7 +817,7 @@ PyObject* BSplineCurve2dPy::approximate(PyObject *args, PyObject *kwds) return nullptr; // goes to the catch block } } - + Approx_ParametrizationType pt; std::string pstr = parType; if (pstr == "Uniform") @@ -1278,5 +1278,5 @@ PyObject* BSplineCurve2dPy::getCustomAttributes(const char* /*attr*/) const int BSplineCurve2dPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/Geom2d/BezierCurve2dPyImp.cpp b/src/Mod/Part/App/Geom2d/BezierCurve2dPyImp.cpp index a56306bf40..6b23356a68 100644 --- a/src/Mod/Part/App/Geom2d/BezierCurve2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/BezierCurve2dPyImp.cpp @@ -341,21 +341,21 @@ Py::Long BezierCurve2dPy::getDegree() const { Handle(Geom2d_BezierCurve) curve = Handle(Geom2d_BezierCurve)::DownCast (getGeometry2dPtr()->handle()); - return Py::Long(curve->Degree()); + return Py::Long(curve->Degree()); } Py::Long BezierCurve2dPy::getMaxDegree() const { Handle(Geom2d_BezierCurve) curve = Handle(Geom2d_BezierCurve)::DownCast (getGeometry2dPtr()->handle()); - return Py::Long(curve->MaxDegree()); + return Py::Long(curve->MaxDegree()); } Py::Long BezierCurve2dPy::getNbPoles() const { Handle(Geom2d_BezierCurve) curve = Handle(Geom2d_BezierCurve)::DownCast (getGeometry2dPtr()->handle()); - return Py::Long(curve->NbPoles()); + return Py::Long(curve->NbPoles()); } Py::Object BezierCurve2dPy::getStartPoint() const @@ -381,5 +381,5 @@ PyObject *BezierCurve2dPy::getCustomAttributes(const char* /*attr*/) const int BezierCurve2dPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/Geom2d/Circle2dPy.xml b/src/Mod/Part/App/Geom2d/Circle2dPy.xml index eef278fcdc..66bb6176f5 100644 --- a/src/Mod/Part/App/Geom2d/Circle2dPy.xml +++ b/src/Mod/Part/App/Geom2d/Circle2dPy.xml @@ -1,13 +1,13 @@ - diff --git a/src/Mod/Part/App/Geom2d/Circle2dPyImp.cpp b/src/Mod/Part/App/Geom2d/Circle2dPyImp.cpp index c1ca37908f..9cf14aad0d 100644 --- a/src/Mod/Part/App/Geom2d/Circle2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/Circle2dPyImp.cpp @@ -164,7 +164,7 @@ PyObject* Circle2dPy::getCircleCenter(PyObject *args) Py::Float Circle2dPy::getRadius() const { Handle(Geom2d_Circle) circle = Handle(Geom2d_Circle)::DownCast(getGeom2dCirclePtr()->handle()); - return Py::Float(circle->Radius()); + return Py::Float(circle->Radius()); } void Circle2dPy::setRadius(Py::Float arg) @@ -180,5 +180,5 @@ PyObject *Circle2dPy::getCustomAttributes(const char* ) const int Circle2dPy::setCustomAttributes(const char* , PyObject *) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/Geom2d/Conic2dPy.xml b/src/Mod/Part/App/Geom2d/Conic2dPy.xml index b6d1caadcf..a02c16844e 100644 --- a/src/Mod/Part/App/Geom2d/Conic2dPy.xml +++ b/src/Mod/Part/App/Geom2d/Conic2dPy.xml @@ -1,13 +1,13 @@ - diff --git a/src/Mod/Part/App/Geom2d/Conic2dPyImp.cpp b/src/Mod/Part/App/Geom2d/Conic2dPyImp.cpp index 7f070c5e5f..580cbf910c 100644 --- a/src/Mod/Part/App/Geom2d/Conic2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/Conic2dPyImp.cpp @@ -111,5 +111,5 @@ PyObject *Conic2dPy::getCustomAttributes(const char* ) const int Conic2dPy::setCustomAttributes(const char* , PyObject *) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/Geom2d/Curve2dPy.xml b/src/Mod/Part/App/Geom2d/Curve2dPy.xml index a210aec2c8..68c33fff81 100644 --- a/src/Mod/Part/App/Geom2d/Curve2dPy.xml +++ b/src/Mod/Part/App/Geom2d/Curve2dPy.xml @@ -71,7 +71,7 @@ length([uMin,uMax,Tol]) -> Float - Returns the parameter on the curve of a point at the given distance from a starting parameter. + Returns the parameter on the curve of a point at the given distance from a starting parameter. parameterAtDistance([abscissa, startingParameter]) -> Float the diff --git a/src/Mod/Part/App/Geom2d/Curve2dPyImp.cpp b/src/Mod/Part/App/Geom2d/Curve2dPyImp.cpp index 79fe755056..e014f5c3e3 100644 --- a/src/Mod/Part/App/Geom2d/Curve2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/Curve2dPyImp.cpp @@ -230,7 +230,7 @@ PyObject* Curve2dPy::toShape(PyObject *args) return Py::new_reference_to(shape2pyshape(edge)); } catch (Standard_Failure& e) { - + PyErr_SetString(PartExceptionOCCError, e.GetMessageString()); return nullptr; } diff --git a/src/Mod/Part/App/Geom2d/Ellipse2dPyImp.cpp b/src/Mod/Part/App/Geom2d/Ellipse2dPyImp.cpp index 9fd42a96d7..f51ed2a619 100644 --- a/src/Mod/Part/App/Geom2d/Ellipse2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/Ellipse2dPyImp.cpp @@ -128,7 +128,7 @@ int Ellipse2dPy::PyInit(PyObject* args, PyObject* kwds) Py::Float Ellipse2dPy::getMajorRadius() const { Handle(Geom2d_Ellipse) ellipse = Handle(Geom2d_Ellipse)::DownCast(getGeom2dEllipsePtr()->handle()); - return Py::Float(ellipse->MajorRadius()); + return Py::Float(ellipse->MajorRadius()); } void Ellipse2dPy::setMajorRadius(Py::Float arg) @@ -140,7 +140,7 @@ void Ellipse2dPy::setMajorRadius(Py::Float arg) Py::Float Ellipse2dPy::getMinorRadius() const { Handle(Geom2d_Ellipse) ellipse = Handle(Geom2d_Ellipse)::DownCast(getGeom2dEllipsePtr()->handle()); - return Py::Float(ellipse->MinorRadius()); + return Py::Float(ellipse->MinorRadius()); } void Ellipse2dPy::setMinorRadius(Py::Float arg) @@ -152,7 +152,7 @@ void Ellipse2dPy::setMinorRadius(Py::Float arg) Py::Float Ellipse2dPy::getFocal() const { Handle(Geom2d_Ellipse) ellipse = Handle(Geom2d_Ellipse)::DownCast(getGeom2dEllipsePtr()->handle()); - return Py::Float(ellipse->Focal()); + return Py::Float(ellipse->Focal()); } Py::Object Ellipse2dPy::getFocus1() const @@ -176,5 +176,5 @@ PyObject *Ellipse2dPy::getCustomAttributes(const char* /*attr*/) const int Ellipse2dPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/Geom2d/Geometry2dPy.xml b/src/Mod/Part/App/Geom2d/Geometry2dPy.xml index 3e08f45e1c..2526fca098 100644 --- a/src/Mod/Part/App/Geom2d/Geometry2dPy.xml +++ b/src/Mod/Part/App/Geom2d/Geometry2dPy.xml @@ -1,14 +1,14 @@ - diff --git a/src/Mod/Part/App/Geom2d/Geometry2dPyImp.cpp b/src/Mod/Part/App/Geom2d/Geometry2dPyImp.cpp index e08976077c..d073b92555 100644 --- a/src/Mod/Part/App/Geom2d/Geometry2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/Geometry2dPyImp.cpp @@ -185,5 +185,5 @@ PyObject *Geometry2dPy::getCustomAttributes(const char* /*attr*/) const int Geometry2dPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/Geom2d/Hyperbola2dPyImp.cpp b/src/Mod/Part/App/Geom2d/Hyperbola2dPyImp.cpp index a65160d3d0..26a635728e 100644 --- a/src/Mod/Part/App/Geom2d/Hyperbola2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/Hyperbola2dPyImp.cpp @@ -128,7 +128,7 @@ int Hyperbola2dPy::PyInit(PyObject* args, PyObject* kwds) Py::Float Hyperbola2dPy::getMajorRadius() const { Handle(Geom2d_Hyperbola) hyperbola = Handle(Geom2d_Hyperbola)::DownCast(getGeom2dHyperbolaPtr()->handle()); - return Py::Float(hyperbola->MajorRadius()); + return Py::Float(hyperbola->MajorRadius()); } void Hyperbola2dPy::setMajorRadius(Py::Float arg) @@ -140,7 +140,7 @@ void Hyperbola2dPy::setMajorRadius(Py::Float arg) Py::Float Hyperbola2dPy::getMinorRadius() const { Handle(Geom2d_Hyperbola) hyperbola = Handle(Geom2d_Hyperbola)::DownCast(getGeom2dHyperbolaPtr()->handle()); - return Py::Float(hyperbola->MinorRadius()); + return Py::Float(hyperbola->MinorRadius()); } void Hyperbola2dPy::setMinorRadius(Py::Float arg) @@ -152,7 +152,7 @@ void Hyperbola2dPy::setMinorRadius(Py::Float arg) Py::Float Hyperbola2dPy::getFocal() const { Handle(Geom2d_Hyperbola) hyperbola = Handle(Geom2d_Hyperbola)::DownCast(getGeom2dHyperbolaPtr()->handle()); - return Py::Float(hyperbola->Focal()); + return Py::Float(hyperbola->Focal()); } Py::Object Hyperbola2dPy::getFocus1() const @@ -176,5 +176,5 @@ PyObject *Hyperbola2dPy::getCustomAttributes(const char* /*attr*/) const int Hyperbola2dPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/Geom2d/Line2dPy.xml b/src/Mod/Part/App/Geom2d/Line2dPy.xml index c9979e6d43..d210d14b46 100644 --- a/src/Mod/Part/App/Geom2d/Line2dPy.xml +++ b/src/Mod/Part/App/Geom2d/Line2dPy.xml @@ -1,13 +1,13 @@ - diff --git a/src/Mod/Part/App/Geom2d/Line2dPyImp.cpp b/src/Mod/Part/App/Geom2d/Line2dPyImp.cpp index 7ef16eb806..dfa990d4ed 100644 --- a/src/Mod/Part/App/Geom2d/Line2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/Line2dPyImp.cpp @@ -101,7 +101,7 @@ int Line2dPy::PyInit(PyObject* args, PyObject* /*kwd*/) return 0; } catch (Standard_Failure& e) { - + PyErr_SetString(PartExceptionOCCError, e.GetMessageString()); return -1; } @@ -221,5 +221,5 @@ PyObject *Line2dPy::getCustomAttributes(const char* /*attr*/) const int Line2dPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/Geom2d/Line2dSegmentPy.xml b/src/Mod/Part/App/Geom2d/Line2dSegmentPy.xml index 810724ceb3..55fa3f495c 100644 --- a/src/Mod/Part/App/Geom2d/Line2dSegmentPy.xml +++ b/src/Mod/Part/App/Geom2d/Line2dSegmentPy.xml @@ -1,13 +1,13 @@ - diff --git a/src/Mod/Part/App/Geom2d/Line2dSegmentPyImp.cpp b/src/Mod/Part/App/Geom2d/Line2dSegmentPyImp.cpp index ebf37a6d4f..482faeee62 100644 --- a/src/Mod/Part/App/Geom2d/Line2dSegmentPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/Line2dSegmentPyImp.cpp @@ -153,7 +153,7 @@ int Line2dSegmentPy::PyInit(PyObject* args, PyObject* /*kwd*/) return 0; } catch (Standard_Failure& e) { - + PyErr_SetString(PartExceptionOCCError, e.GetMessageString()); return -1; } @@ -189,7 +189,7 @@ PyObject* Line2dSegmentPy::setParameterRange(PyObject *args) return nullptr; } - Py_Return; + Py_Return; } Py::Object Line2dSegmentPy::getStartPoint() const @@ -307,5 +307,5 @@ PyObject *Line2dSegmentPy::getCustomAttributes(const char* /*attr*/) const int Line2dSegmentPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/Geom2d/OffsetCurve2dPyImp.cpp b/src/Mod/Part/App/Geom2d/OffsetCurve2dPyImp.cpp index c4f39e711a..987c497ebd 100644 --- a/src/Mod/Part/App/Geom2d/OffsetCurve2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/OffsetCurve2dPyImp.cpp @@ -131,5 +131,5 @@ PyObject *OffsetCurve2dPy::getCustomAttributes(const char* /*attr*/) const int OffsetCurve2dPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/Geom2d/Parabola2dPy.xml b/src/Mod/Part/App/Geom2d/Parabola2dPy.xml index c98f412f36..8a6aa7f3c7 100644 --- a/src/Mod/Part/App/Geom2d/Parabola2dPy.xml +++ b/src/Mod/Part/App/Geom2d/Parabola2dPy.xml @@ -1,13 +1,13 @@ - diff --git a/src/Mod/Part/App/Geom2d/Parabola2dPyImp.cpp b/src/Mod/Part/App/Geom2d/Parabola2dPyImp.cpp index 9c79d43a01..7e31ed29b7 100644 --- a/src/Mod/Part/App/Geom2d/Parabola2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/Parabola2dPyImp.cpp @@ -62,13 +62,13 @@ int Parabola2dPy::PyInit(PyObject* args, PyObject* /*kwd*/) Py::Float Parabola2dPy::getFocal() const { Handle(Geom2d_Parabola) curve = Handle(Geom2d_Parabola)::DownCast(getGeometry2dPtr()->handle()); - return Py::Float(curve->Focal()); + return Py::Float(curve->Focal()); } void Parabola2dPy::setFocal(Py::Float arg) { Handle(Geom2d_Parabola) curve = Handle(Geom2d_Parabola)::DownCast(getGeometry2dPtr()->handle()); - curve->SetFocal((double)arg); + curve->SetFocal((double)arg); } Py::Object Parabola2dPy::getFocus() const @@ -91,5 +91,5 @@ PyObject *Parabola2dPy::getCustomAttributes(const char* /*attr*/) const int Parabola2dPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/GeomPlate/BuildPlateSurfacePy.xml b/src/Mod/Part/App/GeomPlate/BuildPlateSurfacePy.xml index acc63debfb..7d64f73801 100644 --- a/src/Mod/Part/App/GeomPlate/BuildPlateSurfacePy.xml +++ b/src/Mod/Part/App/GeomPlate/BuildPlateSurfacePy.xml @@ -1,14 +1,14 @@ - diff --git a/src/Mod/Part/App/Geometry2d.cpp b/src/Mod/Part/App/Geometry2d.cpp index 9d362598a2..ae8d67422f 100644 --- a/src/Mod/Part/App/Geometry2d.cpp +++ b/src/Mod/Part/App/Geometry2d.cpp @@ -194,7 +194,7 @@ void Geom2dPoint::Restore(Base::XMLReader &reader) // get the value of my Attribute X = reader.getAttributeAsFloat("X"); Y = reader.getAttributeAsFloat("Y"); - + // set the read geometry setPoint(Base::Vector2d(X,Y)); } @@ -296,14 +296,14 @@ bool Geom2dCurve::closestParameter(const Base::Vector2d& point, double &u) const std::cout << e.GetMessageString() << std::endl; return false; } - + return false; } bool Geom2dCurve::closestParameterToBasicCurve(const Base::Vector2d& point, double &u) const { Handle(Geom2d_Curve) c = Handle(Geom2d_Curve)::DownCast(handle()); - + if (c->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve))){ Handle(Geom2d_TrimmedCurve) tc = Handle(Geom2d_TrimmedCurve)::DownCast(handle()); Handle(Geom2d_Curve) bc = tc->BasisCurve(); @@ -316,14 +316,14 @@ bool Geom2dCurve::closestParameterToBasicCurve(const Base::Vector2d& point, doub } } catch (Standard_Failure& e) { - + std::cout << e.GetMessageString() << std::endl; return false; } - - return false; - - } + + return false; + + } else { return this->closestParameter(point, u); } @@ -1060,7 +1060,7 @@ void Geom2dArcOfCircle::Restore(Base::XMLReader &reader) Handle(Geom2d_TrimmedCurve) tmpcurve = ma.Value(); Handle(Geom2d_Circle) tmpcircle = Handle(Geom2d_Circle)::DownCast(tmpcurve->BasisCurve()); Handle(Geom2d_Circle) circle = Handle(Geom2d_Circle)::DownCast(this->myCurve->BasisCurve()); - + circle->SetCirc2d(tmpcircle->Circ2d()); this->myCurve->SetTrim(tmpcurve->FirstParameter(), tmpcurve->LastParameter()); } @@ -1211,7 +1211,7 @@ void Geom2dEllipse::Restore(Base::XMLReader& reader) RestoreAxis(reader, axis); MajorRadius = reader.getAttributeAsFloat("MajorRadius"); MinorRadius = reader.getAttributeAsFloat("MinorRadius"); - + try { GCE2d_MakeEllipse mc(axis, MajorRadius, MinorRadius); if (!mc.IsDone()) @@ -1357,7 +1357,7 @@ void Geom2dArcOfEllipse::Save(Base::Writer &writer) const { // save the attributes of the father class Geom2dCurve::Save(writer); - + Handle(Geom2d_Ellipse) ellipse = Handle(Geom2d_Ellipse)::DownCast(this->myCurve->BasisCurve()); gp_Elips2d e = ellipse->Elips2d(); @@ -1393,15 +1393,15 @@ void Geom2dArcOfEllipse::Restore(Base::XMLReader &reader) GCE2d_MakeEllipse mc(axis, MajorRadius, MinorRadius); if (!mc.IsDone()) throw Base::CADKernelError(gce_ErrorStatusText(mc.Status())); - + GCE2d_MakeArcOfEllipse ma(mc.Value()->Elips2d(), u, v); if (!ma.IsDone()) throw Base::CADKernelError(gce_ErrorStatusText(ma.Status())); - + Handle(Geom2d_TrimmedCurve) tmpcurve = ma.Value(); Handle(Geom2d_Ellipse) tmpellipse = Handle(Geom2d_Ellipse)::DownCast(tmpcurve->BasisCurve()); Handle(Geom2d_Ellipse) ellipse = Handle(Geom2d_Ellipse)::DownCast(this->myCurve->BasisCurve()); - + ellipse->SetElips2d(tmpellipse->Elips2d()); this->myCurve->SetTrim(tmpcurve->FirstParameter(), tmpcurve->LastParameter()); } @@ -1619,7 +1619,7 @@ void Geom2dArcOfHyperbola::Save(Base::Writer &writer) const { // save the attributes of the father class Geom2dCurve::Save(writer); - + Handle(Geom2d_Hyperbola) hh = Handle(Geom2d_Hyperbola)::DownCast(this->myCurve->BasisCurve()); gp_Hypr2d h = hh->Hypr2d(); @@ -1655,15 +1655,15 @@ void Geom2dArcOfHyperbola::Restore(Base::XMLReader &reader) GCE2d_MakeHyperbola mc(axis, MajorRadius, MinorRadius); if (!mc.IsDone()) throw Base::CADKernelError(gce_ErrorStatusText(mc.Status())); - + GCE2d_MakeArcOfHyperbola ma(mc.Value()->Hypr2d(), u, v); if (!ma.IsDone()) throw Base::CADKernelError(gce_ErrorStatusText(ma.Status())); - + Handle(Geom2d_TrimmedCurve) tmpcurve = ma.Value(); Handle(Geom2d_Hyperbola) tmphyperbola = Handle(Geom2d_Hyperbola)::DownCast(tmpcurve->BasisCurve()); Handle(Geom2d_Hyperbola) hyperbola = Handle(Geom2d_Hyperbola)::DownCast(this->myCurve->BasisCurve()); - + hyperbola->SetHypr2d(tmphyperbola->Hypr2d()); this->myCurve->SetTrim(tmpcurve->FirstParameter(), tmpcurve->LastParameter()); } @@ -1844,7 +1844,7 @@ void Geom2dArcOfParabola::Save(Base::Writer &writer) const { // save the attributes of the father class Geom2dCurve::Save(writer); - + Handle(Geom2d_Parabola) hp = Handle(Geom2d_Parabola)::DownCast(this->myCurve->BasisCurve()); gp_Parab2d p = hp->Parab2d(); gp_Ax22d axis = p.Axis(); @@ -1878,7 +1878,7 @@ void Geom2dArcOfParabola::Restore(Base::XMLReader &reader) GCE2d_MakeParabola mc(axis, Focal); if (!mc.IsDone()) throw Base::CADKernelError(gce_ErrorStatusText(mc.Status())); - + GCE2d_MakeArcOfParabola ma(mc.Value()->Parab2d(), u, v); if (!ma.IsDone()) throw Base::CADKernelError(gce_ErrorStatusText(ma.Status())); @@ -1886,7 +1886,7 @@ void Geom2dArcOfParabola::Restore(Base::XMLReader &reader) Handle(Geom2d_TrimmedCurve) tmpcurve = ma.Value(); Handle(Geom2d_Parabola) tmpparabola = Handle(Geom2d_Parabola)::DownCast(tmpcurve->BasisCurve()); Handle(Geom2d_Parabola) parabola = Handle(Geom2d_Parabola)::DownCast(this->myCurve->BasisCurve()); - + parabola->SetParab2d(tmpparabola->Parab2d()); this->myCurve->SetTrim(tmpcurve->FirstParameter(), tmpcurve->LastParameter()); } @@ -1966,7 +1966,7 @@ void Geom2dLine::Save(Base::Writer &writer) const Base::Vector2d Pos = getPos(); Base::Vector2d Dir = getDir(); - writer.Stream() + writer.Stream() << writer.ind() << " - Returns a B-Spline representation of this surface. + Returns a B-Spline representation of this surface. The optional arguments are: * tolerance (default=1e-7) * continuity in u (as string e.g. C0, G0, G1, C1, G2, C3, CN) (default='C1') diff --git a/src/Mod/Part/App/GeometrySurfacePyImp.cpp b/src/Mod/Part/App/GeometrySurfacePyImp.cpp index aecc71d843..eb010d0e67 100644 --- a/src/Mod/Part/App/GeometrySurfacePyImp.cpp +++ b/src/Mod/Part/App/GeometrySurfacePyImp.cpp @@ -798,7 +798,7 @@ PyObject *GeometrySurfacePy::getCustomAttributes(const char* /*attr*/) const int GeometrySurfacePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } // Specialized intersection functions diff --git a/src/Mod/Part/App/HyperbolaPyImp.cpp b/src/Mod/Part/App/HyperbolaPyImp.cpp index 0abf235705..6c90b19077 100644 --- a/src/Mod/Part/App/HyperbolaPyImp.cpp +++ b/src/Mod/Part/App/HyperbolaPyImp.cpp @@ -46,7 +46,7 @@ std::string HyperbolaPy::representation() const PyObject *HyperbolaPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of HyperbolaPy and the Twin object + // create a new instance of HyperbolaPy and the Twin object return new HyperbolaPy(new GeomHyperbola); } @@ -128,7 +128,7 @@ int HyperbolaPy::PyInit(PyObject* args, PyObject* kwds) Py::Float HyperbolaPy::getMajorRadius() const { Handle(Geom_Hyperbola) hyperbola = Handle(Geom_Hyperbola)::DownCast(getGeomHyperbolaPtr()->handle()); - return Py::Float(hyperbola->MajorRadius()); + return Py::Float(hyperbola->MajorRadius()); } void HyperbolaPy::setMajorRadius(Py::Float arg) @@ -140,7 +140,7 @@ void HyperbolaPy::setMajorRadius(Py::Float arg) Py::Float HyperbolaPy::getMinorRadius() const { Handle(Geom_Hyperbola) hyperbola = Handle(Geom_Hyperbola)::DownCast(getGeomHyperbolaPtr()->handle()); - return Py::Float(hyperbola->MinorRadius()); + return Py::Float(hyperbola->MinorRadius()); } void HyperbolaPy::setMinorRadius(Py::Float arg) @@ -152,7 +152,7 @@ void HyperbolaPy::setMinorRadius(Py::Float arg) Py::Float HyperbolaPy::getFocal() const { Handle(Geom_Hyperbola) hyperbola = Handle(Geom_Hyperbola)::DownCast(getGeomHyperbolaPtr()->handle()); - return Py::Float(hyperbola->Focal()); + return Py::Float(hyperbola->Focal()); } Py::Object HyperbolaPy::getFocus1() const @@ -176,5 +176,5 @@ PyObject *HyperbolaPy::getCustomAttributes(const char* /*attr*/) const int HyperbolaPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/LinePy.xml b/src/Mod/Part/App/LinePy.xml index 2e034171ad..279d6e3e19 100644 --- a/src/Mod/Part/App/LinePy.xml +++ b/src/Mod/Part/App/LinePy.xml @@ -1,14 +1,14 @@ - diff --git a/src/Mod/Part/App/LinePyImp.cpp b/src/Mod/Part/App/LinePyImp.cpp index b593074341..2739fbe01b 100644 --- a/src/Mod/Part/App/LinePyImp.cpp +++ b/src/Mod/Part/App/LinePyImp.cpp @@ -46,14 +46,14 @@ std::string LinePy::representation() const PyObject *LinePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of LinePy and the Twin object + // create a new instance of LinePy and the Twin object return new LinePy(new GeomLine); } // constructor method int LinePy::PyInit(PyObject* args, PyObject* /*kwd*/) { - + if (PyArg_ParseTuple(args, "")) { // default line return 0; @@ -102,7 +102,7 @@ int LinePy::PyInit(PyObject* args, PyObject* /*kwd*/) return 0; } catch (Standard_Failure& e) { - + PyErr_SetString(PartExceptionOCCError, e.GetMessageString()); return -1; } @@ -225,5 +225,5 @@ PyObject *LinePy::getCustomAttributes(const char* /*attr*/) const int LinePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/LineSegmentPyImp.cpp b/src/Mod/Part/App/LineSegmentPyImp.cpp index 58438b1a91..42e7d18444 100644 --- a/src/Mod/Part/App/LineSegmentPyImp.cpp +++ b/src/Mod/Part/App/LineSegmentPyImp.cpp @@ -160,7 +160,7 @@ int LineSegmentPy::PyInit(PyObject* args, PyObject* /*kwd*/) return 0; } catch (Standard_Failure& e) { - + PyErr_SetString(PartExceptionOCCError, e.GetMessageString()); return -1; } @@ -195,7 +195,7 @@ PyObject* LineSegmentPy::setParameterRange(PyObject *args) return nullptr; } - Py_Return; + Py_Return; } Py::Object LineSegmentPy::getStartPoint(void) const @@ -317,5 +317,5 @@ PyObject *LineSegmentPy::getCustomAttributes(const char* /*attr*/) const int LineSegmentPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/OCCError.h b/src/Mod/Part/App/OCCError.h index 96558ecb0e..5c7902039d 100644 --- a/src/Mod/Part/App/OCCError.h +++ b/src/Mod/Part/App/OCCError.h @@ -38,9 +38,9 @@ PartExport extern PyObject* PartExceptionOCCConstructionError; PartExport extern PyObject* PartExceptionOCCDimensionError; -#define PY_TRY try +#define PY_TRY try -/// see docu of PY_TRY +/// see docu of PY_TRY # define _PY_CATCH_OCC(R) \ catch (Standard_Failure &e) \ { \ diff --git a/src/Mod/Part/App/OffsetCurvePyImp.cpp b/src/Mod/Part/App/OffsetCurvePyImp.cpp index 2b5f132473..e5ec19118c 100644 --- a/src/Mod/Part/App/OffsetCurvePyImp.cpp +++ b/src/Mod/Part/App/OffsetCurvePyImp.cpp @@ -45,7 +45,7 @@ std::string OffsetCurvePy::representation() const PyObject *OffsetCurvePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of OffsetCurvePy and the Twin object + // create a new instance of OffsetCurvePy and the Twin object return new OffsetCurvePy(new GeomOffsetCurve); } @@ -55,8 +55,8 @@ int OffsetCurvePy::PyInit(PyObject* args, PyObject* /*kwd*/) PyObject* pGeom; PyObject* pDir; double offset; - if (!PyArg_ParseTuple(args, "O!dO!", - &(GeometryPy::Type), &pGeom, + if (!PyArg_ParseTuple(args, "O!dO!", + &(GeometryPy::Type), &pGeom, &offset, &(Base::VectorPy::Type),&pDir)) return -1; @@ -158,5 +158,5 @@ PyObject *OffsetCurvePy::getCustomAttributes(const char* /*attr*/) const int OffsetCurvePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/OffsetSurfacePyImp.cpp b/src/Mod/Part/App/OffsetSurfacePyImp.cpp index 29a8a3ac2f..f5107d6c43 100644 --- a/src/Mod/Part/App/OffsetSurfacePyImp.cpp +++ b/src/Mod/Part/App/OffsetSurfacePyImp.cpp @@ -41,7 +41,7 @@ std::string OffsetSurfacePy::representation() const PyObject *OffsetSurfacePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of OffsetSurfacePy and the Twin object + // create a new instance of OffsetSurfacePy and the Twin object return new OffsetSurfacePy(new GeomOffsetSurface); } @@ -50,8 +50,8 @@ int OffsetSurfacePy::PyInit(PyObject* args, PyObject* /*kwd*/) { PyObject* pGeom; double offset; - if (!PyArg_ParseTuple(args, "O!d", - &(GeometryPy::Type), &pGeom, + if (!PyArg_ParseTuple(args, "O!d", + &(GeometryPy::Type), &pGeom, &offset)) return -1; @@ -128,5 +128,5 @@ PyObject *OffsetSurfacePy::getCustomAttributes(const char* /*attr*/) const int OffsetSurfacePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/ParabolaPy.xml b/src/Mod/Part/App/ParabolaPy.xml index 52675861cc..1606a2ea1e 100644 --- a/src/Mod/Part/App/ParabolaPy.xml +++ b/src/Mod/Part/App/ParabolaPy.xml @@ -1,13 +1,13 @@ - diff --git a/src/Mod/Part/App/ParabolaPyImp.cpp b/src/Mod/Part/App/ParabolaPyImp.cpp index d7c676802c..b777612ddf 100644 --- a/src/Mod/Part/App/ParabolaPyImp.cpp +++ b/src/Mod/Part/App/ParabolaPyImp.cpp @@ -46,7 +46,7 @@ std::string ParabolaPy::representation() const PyObject *ParabolaPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of ParabolaPy and the Twin object + // create a new instance of ParabolaPy and the Twin object return new ParabolaPy(new GeomParabola); } @@ -85,7 +85,7 @@ int ParabolaPy::PyInit(PyObject* args, PyObject* kwds) Base::Vector3d normal = static_cast(pV3)->value(); Base::Vector3d xvect = focus-center; - + // set the geometry gp_Pnt p1(center.x,center.y,center.z); gp_Dir norm(normal.x,normal.y,normal.z); @@ -103,7 +103,7 @@ int ParabolaPy::PyInit(PyObject* args, PyObject* kwds) parabola->SetParab(mc.Value()); return 0; } - + PyErr_SetString(PyExc_TypeError, "Parabola constructor accepts:\n" "-- empty parameter list\n" "-- Parabola\n" @@ -160,13 +160,13 @@ PyObject* ParabolaPy::compute(PyObject *args) Py::Float ParabolaPy::getFocal() const { Handle(Geom_Parabola) curve = Handle(Geom_Parabola)::DownCast(getGeometryPtr()->handle()); - return Py::Float(curve->Focal()); + return Py::Float(curve->Focal()); } void ParabolaPy::setFocal(Py::Float arg) { Handle(Geom_Parabola) curve = Handle(Geom_Parabola)::DownCast(getGeometryPtr()->handle()); - curve->SetFocal((double)arg); + curve->SetFocal((double)arg); } Py::Object ParabolaPy::getFocus() const @@ -180,7 +180,7 @@ Py::Object ParabolaPy::getFocus() const Py::Float ParabolaPy::getParameter() const { Handle(Geom_Parabola) curve = Handle(Geom_Parabola)::DownCast(getGeometryPtr()->handle()); - return Py::Float(curve->Parameter()); + return Py::Float(curve->Parameter()); } PyObject *ParabolaPy::getCustomAttributes(const char* /*attr*/) const @@ -190,7 +190,7 @@ PyObject *ParabolaPy::getCustomAttributes(const char* /*attr*/) const int ParabolaPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/Part2DObjectPy.xml b/src/Mod/Part/App/Part2DObjectPy.xml index 2312760870..a08fbfd1c6 100644 --- a/src/Mod/Part/App/Part2DObjectPy.xml +++ b/src/Mod/Part/App/Part2DObjectPy.xml @@ -1,12 +1,12 @@  - diff --git a/src/Mod/Part/App/PartFeature.cpp b/src/Mod/Part/App/PartFeature.cpp index 30a2717984..3773e5bb67 100644 --- a/src/Mod/Part/App/PartFeature.cpp +++ b/src/Mod/Part/App/PartFeature.cpp @@ -116,12 +116,12 @@ PyObject *Feature::getPyObject() return Py::new_reference_to(PythonObject); } -App::DocumentObject *Feature::getSubObject(const char *subname, +App::DocumentObject *Feature::getSubObject(const char *subname, PyObject **pyObj, Base::Matrix4D *pmat, bool transform, int depth) const { // having '.' inside subname means it is referencing some children object, // instead of any sub-element from ourself - if(subname && !Data::ComplexGeoData::isMappedElement(subname) && strchr(subname,'.')) + if(subname && !Data::ComplexGeoData::isMappedElement(subname) && strchr(subname,'.')) return App::DocumentObject::getSubObject(subname,pyObj,pmat,transform,depth); Base::Matrix4D _mat; @@ -143,12 +143,12 @@ App::DocumentObject *Feature::getSubObject(const char *subname, try { TopoShape ts(Shape.getShape()); bool doTransform = mat!=ts.getTransform(); - if(doTransform) + if(doTransform) ts.setShape(ts.getShape().Located(TopLoc_Location())); if(subname && *subname && !ts.isNull()) ts = ts.getSubShape(subname); if(doTransform && !ts.isNull()) { - static int sCopy = -1; + static int sCopy = -1; if(sCopy<0) { ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( "User parameter:BaseApp/Preferences/Mod/Part/General"); @@ -189,16 +189,16 @@ App::DocumentObject *Feature::getSubObject(const char *subname, if (msg) {str << msg;} else {str << "No OCCT Exception Message";} str << ": " << getFullName(); - if (subname) + if (subname) str << '.' << subname; FC_LOG(str.str()); return nullptr; } } -TopoDS_Shape Feature::getShape(const App::DocumentObject *obj, const char *subname, - bool needSubElement, Base::Matrix4D *pmat, App::DocumentObject **powner, - bool resolveLink, bool transform) +TopoDS_Shape Feature::getShape(const App::DocumentObject *obj, const char *subname, + bool needSubElement, Base::Matrix4D *pmat, App::DocumentObject **powner, + bool resolveLink, bool transform) { return getTopoShape(obj,subname,needSubElement,pmat,powner,resolveLink,transform,true).getShape(); } @@ -229,8 +229,8 @@ struct ShapeCache { const char *propName = prop.getName(); if(!App::Property::isValidName(propName)) return; - if(strcmp(propName,"Shape")==0 - || strcmp(propName,"Group")==0 + if(strcmp(propName,"Shape")==0 + || strcmp(propName,"Group")==0 || strstr(propName,"Touched")) slotClear(obj); } @@ -271,8 +271,8 @@ void Feature::clearShapeCache() { _ShapeCache.cache.clear(); } -static TopoShape _getTopoShape(const App::DocumentObject *obj, const char *subname, - bool needSubElement, Base::Matrix4D *pmat, App::DocumentObject **powner, +static TopoShape _getTopoShape(const App::DocumentObject *obj, const char *subname, + bool needSubElement, Base::Matrix4D *pmat, App::DocumentObject **powner, bool resolveLink, bool noElementMap, std::vector &linkStack) { @@ -324,7 +324,7 @@ static TopoShape _getTopoShape(const App::DocumentObject *obj, const char *subna } if(!linked) linked = owner; - if(powner) + if(powner) *powner = resolveLink?linked:owner; if(!shape.isNull()) @@ -373,9 +373,9 @@ static TopoShape _getTopoShape(const App::DocumentObject *obj, const char *subna } auto link = owner->getExtensionByType(true); - if(owner!=linked - && (!link || (!link->_ChildCache.getSize() - && link->getSubElements().size()<=1))) + if(owner!=linked + && (!link || (!link->_ChildCache.getSize() + && link->getSubElements().size()<=1))) { // if there is a linked object, and there is no child cache (which is used // for special handling of plain group), obtain shape from the linked object @@ -453,7 +453,7 @@ static TopoShape _getTopoShape(const App::DocumentObject *obj, const char *subna if(!linkStack.empty() && linkStack.back()==owner) linkStack.pop_back(); - if(shapes.empty()) + if(shapes.empty()) return shape; // shape.Tag = tag; @@ -479,11 +479,11 @@ static TopoShape _getTopoShape(const App::DocumentObject *obj, const char *subna return shape; } -TopoShape Feature::getTopoShape(const App::DocumentObject *obj, const char *subname, - bool needSubElement, Base::Matrix4D *pmat, App::DocumentObject **powner, +TopoShape Feature::getTopoShape(const App::DocumentObject *obj, const char *subname, + bool needSubElement, Base::Matrix4D *pmat, App::DocumentObject **powner, bool resolveLink, bool transform, bool noElementMap) { - if(!obj || !obj->getNameInDocument()) + if(!obj || !obj->getNameInDocument()) return TopoShape(); std::vector linkStack; @@ -493,7 +493,7 @@ TopoShape Feature::getTopoShape(const App::DocumentObject *obj, const char *subn // to false. So we manually apply the top level transform if asked. Base::Matrix4D mat; - auto shape = _getTopoShape(obj, subname, needSubElement, &mat, + auto shape = _getTopoShape(obj, subname, needSubElement, &mat, powner, resolveLink, noElementMap, linkStack); Base::Matrix4D topMat; diff --git a/src/Mod/Part/App/PartFeature.h b/src/Mod/Part/App/PartFeature.h index 5f39e45a8e..543e03f96d 100644 --- a/src/Mod/Part/App/PartFeature.h +++ b/src/Mod/Part/App/PartFeature.h @@ -69,7 +69,7 @@ public: DocumentObject *getSubObject(const char *subname, PyObject **pyObj, Base::Matrix4D *mat, bool transform, int depth) const override; - /** Convenience function to extract shape from fully qualified subname + /** Convenience function to extract shape from fully qualified subname * * @param obj: the parent object * @@ -90,12 +90,12 @@ public: * if pmat already include obj's transformation matrix. */ static TopoDS_Shape getShape(const App::DocumentObject *obj, - const char *subname=nullptr, bool needSubElement=false, Base::Matrix4D *pmat=nullptr, + const char *subname=nullptr, bool needSubElement=false, Base::Matrix4D *pmat=nullptr, App::DocumentObject **owner=nullptr, bool resolveLink=true, bool transform=true); static TopoShape getTopoShape(const App::DocumentObject *obj, - const char *subname=nullptr, bool needSubElement=false, Base::Matrix4D *pmat=nullptr, - App::DocumentObject **owner=nullptr, bool resolveLink=true, bool transform=true, + const char *subname=nullptr, bool needSubElement=false, Base::Matrix4D *pmat=nullptr, + App::DocumentObject **owner=nullptr, bool resolveLink=true, bool transform=true, bool noElementMap=false); static void clearShapeCache(); diff --git a/src/Mod/Part/App/PartFeaturePy.xml b/src/Mod/Part/App/PartFeaturePy.xml index 035f3beec6..21c361bb54 100644 --- a/src/Mod/Part/App/PartFeaturePy.xml +++ b/src/Mod/Part/App/PartFeaturePy.xml @@ -1,12 +1,12 @@  - diff --git a/src/Mod/Part/App/PartFeaturePyImp.cpp b/src/Mod/Part/App/PartFeaturePyImp.cpp index 7f184ea346..09c8a361cb 100644 --- a/src/Mod/Part/App/PartFeaturePyImp.cpp +++ b/src/Mod/Part/App/PartFeaturePyImp.cpp @@ -44,5 +44,5 @@ PyObject *PartFeaturePy::getCustomAttributes(const char* ) const int PartFeaturePy::setCustomAttributes(const char* , PyObject *) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/PlanePy.xml b/src/Mod/Part/App/PlanePy.xml index 9139c7f5ec..29d5ce4dd7 100644 --- a/src/Mod/Part/App/PlanePy.xml +++ b/src/Mod/Part/App/PlanePy.xml @@ -1,14 +1,14 @@  - diff --git a/src/Mod/Part/App/PlanePyImp.cpp b/src/Mod/Part/App/PlanePyImp.cpp index 37a26e00a4..3651ff637e 100644 --- a/src/Mod/Part/App/PlanePyImp.cpp +++ b/src/Mod/Part/App/PlanePyImp.cpp @@ -51,7 +51,7 @@ std::string PlanePy::representation() const PyObject *PlanePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of PlanePy and the Twin object + // create a new instance of PlanePy and the Twin object return new PlanePy(new GeomPlane); } @@ -257,5 +257,5 @@ PyObject *PlanePy::getCustomAttributes(const char* /*attr*/) const int PlanePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/PlateSurfacePyImp.cpp b/src/Mod/Part/App/PlateSurfacePyImp.cpp index d02f5a811a..b1b0b160a4 100644 --- a/src/Mod/Part/App/PlateSurfacePyImp.cpp +++ b/src/Mod/Part/App/PlateSurfacePyImp.cpp @@ -48,7 +48,7 @@ std::string PlateSurfacePy::representation() const PyObject *PlateSurfacePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of PlateSurfacePy and the Twin object + // create a new instance of PlateSurfacePy and the Twin object return new PlateSurfacePy(new GeomPlateSurface); } @@ -190,5 +190,5 @@ PyObject *PlateSurfacePy::getCustomAttributes(const char* /*attr*/) const int PlateSurfacePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/PointPy.xml b/src/Mod/Part/App/PointPy.xml index 52f94194d7..6a3ece5adf 100644 --- a/src/Mod/Part/App/PointPy.xml +++ b/src/Mod/Part/App/PointPy.xml @@ -1,14 +1,14 @@ - diff --git a/src/Mod/Part/App/PointPyImp.cpp b/src/Mod/Part/App/PointPyImp.cpp index d90946744d..04598e9571 100644 --- a/src/Mod/Part/App/PointPyImp.cpp +++ b/src/Mod/Part/App/PointPyImp.cpp @@ -45,20 +45,20 @@ std::string PointPy::representation() const { std::stringstream str; Base::Vector3d coords = getGeomPointPtr()->getPoint(); - str << ""; + str << ""; return str.str(); } PyObject *PointPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of PointPy and the Twin object + // create a new instance of PointPy and the Twin object return new PointPy(new GeomPoint); } // constructor method int PointPy::PyInit(PyObject* args, PyObject* /*kwd*/) { - + if (PyArg_ParseTuple(args, "")) { // default point return 0; @@ -190,5 +190,5 @@ PyObject *PointPy::getCustomAttributes(const char* /*attr*/) const int PointPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/PropertyGeometryList.cpp b/src/Mod/Part/App/PropertyGeometryList.cpp index 995c2f7157..3a62b6149c 100644 --- a/src/Mod/Part/App/PropertyGeometryList.cpp +++ b/src/Mod/Part/App/PropertyGeometryList.cpp @@ -109,7 +109,7 @@ void PropertyGeometryList::set1Value(int idx, std::unique_ptr &&lValue if(idx>=(int)_lValueList.size()) throw Base::IndexError("Index out of bound"); aboutToSetValue(); - if(idx < 0) + if(idx < 0) _lValueList.push_back(lValue.release()); else { delete _lValueList[idx]; diff --git a/src/Mod/Part/App/RectangularTrimmedSurfacePyImp.cpp b/src/Mod/Part/App/RectangularTrimmedSurfacePyImp.cpp index ab808449f4..cc6b2edcc9 100644 --- a/src/Mod/Part/App/RectangularTrimmedSurfacePyImp.cpp +++ b/src/Mod/Part/App/RectangularTrimmedSurfacePyImp.cpp @@ -43,7 +43,7 @@ std::string RectangularTrimmedSurfacePy::representation() const PyObject *RectangularTrimmedSurfacePy::PyMake(struct _typeobject *, PyObject *, PyObject *) { - // create a new instance of RectangularTrimmedSurfacePy and the Twin object + // create a new instance of RectangularTrimmedSurfacePy and the Twin object return new RectangularTrimmedSurfacePy(new GeomTrimmedSurface); } @@ -126,5 +126,5 @@ PyObject *RectangularTrimmedSurfacePy::getCustomAttributes(const char* /*attr*/) int RectangularTrimmedSurfacePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/ShapeFix/ShapeFix_EdgeConnectPy.xml b/src/Mod/Part/App/ShapeFix/ShapeFix_EdgeConnectPy.xml index fbcfc02903..0b9267faba 100644 --- a/src/Mod/Part/App/ShapeFix/ShapeFix_EdgeConnectPy.xml +++ b/src/Mod/Part/App/ShapeFix/ShapeFix_EdgeConnectPy.xml @@ -1,10 +1,10 @@ - - - - - - - - handle()); - return Py::Float(sphere->Radius()); + return Py::Float(sphere->Radius()); } void SpherePy::setRadius(Py::Float arg) @@ -93,14 +93,14 @@ Py::Float SpherePy::getArea() const { Handle(Geom_SphericalSurface) sphere = Handle(Geom_SphericalSurface)::DownCast (getGeomSpherePtr()->handle()); - return Py::Float(sphere->Area()); + return Py::Float(sphere->Area()); } Py::Float SpherePy::getVolume() const { Handle(Geom_SphericalSurface) sphere = Handle(Geom_SphericalSurface)::DownCast (getGeomSpherePtr()->handle()); - return Py::Float(sphere->Volume()); + return Py::Float(sphere->Volume()); } Py::Object SpherePy::getCenter() const @@ -183,5 +183,5 @@ PyObject *SpherePy::getCustomAttributes(const char* /*attr*/) const int SpherePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/SurfaceOfExtrusionPyImp.cpp b/src/Mod/Part/App/SurfaceOfExtrusionPyImp.cpp index be53783f48..9d114cf49b 100644 --- a/src/Mod/Part/App/SurfaceOfExtrusionPyImp.cpp +++ b/src/Mod/Part/App/SurfaceOfExtrusionPyImp.cpp @@ -45,7 +45,7 @@ std::string SurfaceOfExtrusionPy::representation() const PyObject *SurfaceOfExtrusionPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of SurfaceOfExtrusionPy and the Twin object + // create a new instance of SurfaceOfExtrusionPy and the Twin object return new SurfaceOfExtrusionPy(new GeomSurfaceOfExtrusion); } @@ -54,8 +54,8 @@ int SurfaceOfExtrusionPy::PyInit(PyObject* args, PyObject* /*kwd*/) { PyObject* pGeom; PyObject* pDir; - if (!PyArg_ParseTuple(args, "O!O!", - &(GeometryPy::Type), &pGeom, + if (!PyArg_ParseTuple(args, "O!O!", + &(GeometryPy::Type), &pGeom, &(Base::VectorPy::Type),&pDir)) return -1; @@ -152,5 +152,5 @@ PyObject *SurfaceOfExtrusionPy::getCustomAttributes(const char* /*attr*/) const int SurfaceOfExtrusionPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/SurfaceOfRevolutionPyImp.cpp b/src/Mod/Part/App/SurfaceOfRevolutionPyImp.cpp index df7164cb16..5ec90835a1 100644 --- a/src/Mod/Part/App/SurfaceOfRevolutionPyImp.cpp +++ b/src/Mod/Part/App/SurfaceOfRevolutionPyImp.cpp @@ -43,7 +43,7 @@ std::string SurfaceOfRevolutionPy::representation() const PyObject *SurfaceOfRevolutionPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of SurfaceOfRevolutionPy and the Twin object + // create a new instance of SurfaceOfRevolutionPy and the Twin object return new SurfaceOfRevolutionPy(new GeomSurfaceOfRevolution); } @@ -53,8 +53,8 @@ int SurfaceOfRevolutionPy::PyInit(PyObject* args, PyObject* /*kwd*/) PyObject* pGeom; PyObject* pPnt; PyObject* pDir; - if (!PyArg_ParseTuple(args, "O!O!O!", - &(GeometryPy::Type), &pGeom, + if (!PyArg_ParseTuple(args, "O!O!O!", + &(GeometryPy::Type), &pGeom, &(Base::VectorPy::Type),&pPnt, &(Base::VectorPy::Type),&pDir)) return -1; @@ -184,7 +184,7 @@ PyObject *SurfaceOfRevolutionPy::getCustomAttributes(const char* /*attr*/) const int SurfaceOfRevolutionPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/TopoShape.h b/src/Mod/Part/App/TopoShape.h index 310ead5a85..91b8e9bc5e 100644 --- a/src/Mod/Part/App/TopoShape.h +++ b/src/Mod/Part/App/TopoShape.h @@ -321,7 +321,7 @@ public: TopoDS_Shape makeShell(const TopoDS_Shape&) const; //@} - /** @name Element name mapping aware shape maker + /** @name Element name mapping aware shape maker * * To be complete in next batch of patches */ diff --git a/src/Mod/Part/App/TopoShapeEdgePyImp.cpp b/src/Mod/Part/App/TopoShapeEdgePyImp.cpp index e207f030ba..67e4ea5bba 100644 --- a/src/Mod/Part/App/TopoShapeEdgePyImp.cpp +++ b/src/Mod/Part/App/TopoShapeEdgePyImp.cpp @@ -1015,7 +1015,7 @@ PyObject* TopoShapeEdgePy::curveOnSurface(PyObject *args) Handle(Geom_Surface) surf; TopLoc_Location loc; Standard_Real first, last; - + BRep_Tool::CurveOnSurface(edge, curve, surf, loc, first, last, idx+1); if (curve.IsNull()) Py_Return; @@ -1025,7 +1025,7 @@ PyObject* TopoShapeEdgePy::curveOnSurface(PyObject *args) std::unique_ptr geosurf(makeFromSurface(surf)); if (!geosurf) Py_Return; - + gp_Trsf trsf = loc.Transformation(); gp_XYZ pos = trsf.TranslationPart(); gp_XYZ axis; @@ -1033,7 +1033,7 @@ PyObject* TopoShapeEdgePy::curveOnSurface(PyObject *args) trsf.GetRotation(axis, angle); Base::Rotation rot(Base::Vector3d(axis.X(), axis.Y(), axis.Z()), angle); Base::Placement placement(Base::Vector3d(pos.X(), pos.Y(), pos.Z()), rot); - + Py::Tuple tuple(5); tuple.setItem(0, Py::asObject(geo2d->getPyObject())); tuple.setItem(1, Py::asObject(geosurf->getPyObject())); diff --git a/src/Mod/Part/App/TopoShapeVertexPy.xml b/src/Mod/Part/App/TopoShapeVertexPy.xml index d0bc1992c9..973aa2723e 100644 --- a/src/Mod/Part/App/TopoShapeVertexPy.xml +++ b/src/Mod/Part/App/TopoShapeVertexPy.xml @@ -1,14 +1,14 @@ - diff --git a/src/Mod/Part/App/TopoShapeVertexPyImp.cpp b/src/Mod/Part/App/TopoShapeVertexPyImp.cpp index 158211ef0c..ede035af23 100644 --- a/src/Mod/Part/App/TopoShapeVertexPyImp.cpp +++ b/src/Mod/Part/App/TopoShapeVertexPyImp.cpp @@ -54,7 +54,7 @@ std::string TopoShapeVertexPy::representation() const PyObject *TopoShapeVertexPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of TopoShapeVertexPy and the Twin object + // create a new instance of TopoShapeVertexPy and the Twin object return new TopoShapeVertexPy(new TopoShape); } @@ -208,5 +208,5 @@ PyObject *TopoShapeVertexPy::getCustomAttributes(const char* /*attr*/) const int TopoShapeVertexPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/App/TopologyPy.cpp b/src/Mod/Part/App/TopologyPy.cpp index 732d70fb16..500386de58 100644 --- a/src/Mod/Part/App/TopologyPy.cpp +++ b/src/Mod/Part/App/TopologyPy.cpp @@ -145,8 +145,8 @@ PyObject *TopoShapePyOld::PyMake(PyTypeObject *ignored, PyObject *args, PyObjec int TopoShapePyOld::PyInit(PyObject* self, PyObject* args, PyObject*) { PyObject *pcObj=0; - if (!PyArg_ParseTuple(args, "|O!", &(TopoShapePyOld::Type), &pcObj)) // convert args: Python->C - return -1; // NULL triggers exception + if (!PyArg_ParseTuple(args, "|O!", &(TopoShapePyOld::Type), &pcObj)) // convert args: Python->C + return -1; // NULL triggers exception if ( pcObj ) { @@ -160,7 +160,7 @@ int TopoShapePyOld::PyInit(PyObject* self, PyObject* args, PyObject*) //-------------------------------------------------------------------------- // Parents structure //-------------------------------------------------------------------------- -PyParentObject TopoShapePyOld::Parents[] = {&Base::PyObjectBase::Type,&TopoShapePyOld::Type, NULL}; +PyParentObject TopoShapePyOld::Parents[] = {&Base::PyObjectBase::Type,&TopoShapePyOld::Type, NULL}; //-------------------------------------------------------------------------- // constructor @@ -171,46 +171,46 @@ TopoShapePyOld::TopoShapePyOld(PyTypeObject *T) Base::Console().Log("Create TopoShape: %p \n",this); } -TopoShapePyOld::TopoShapePyOld(const TopoDS_Shape &cShape, PyTypeObject *T) +TopoShapePyOld::TopoShapePyOld(const TopoDS_Shape &cShape, PyTypeObject *T) : PyObjectBase( 0,T), _cTopoShape(cShape) { Console().Log("Create TopoShape %p\n",this); } //-------------------------------------------------------------------------- -// TopoShapePyOld destructor +// TopoShapePyOld destructor //-------------------------------------------------------------------------- TopoShapePyOld::~TopoShapePyOld() // Everything handled in parent { Console().Log("Destroy TopoShape %p\n",this); -} +} //-------------------------------------------------------------------------- // TopoShapePyOld Attributes //-------------------------------------------------------------------------- PyObject *TopoShapePyOld::_getattr(const char *attr) // __getattr__ function: note only need to handle new state -{ +{ try{ // Access the number of attributes at this label if (Base::streq(attr, "AttributeCount")) { - return Py_BuildValue("i", 1); + return Py_BuildValue("i", 1); }else _getattr_up(PyObjectBase); // send to parent }catch(...){ Console().Log("Exception in TopoShapePyOld::_getattr()\n"); return 0; } -} +} int TopoShapePyOld::_setattr(const char *attr, PyObject *value) // __setattr__ function: note only need to handle new state -{ +{ if (Base::streq(attr, "Real")) // settable new state - ; - else + ; + else return PyObjectBase::_setattr(attr, value); // send up to parent return 0; -} +} //-------------------------------------------------------------------------- // PartFeaturePy representation @@ -229,23 +229,23 @@ PyObject *TopoShapePyOld::_repr(void) //-------------------------------------------------------------------------- PyObject *TopoShapePyOld::hasChild(PyObject *args) -{ - if (!PyArg_ParseTuple(args, "" )) - return NULL; - Py_Return; +{ + if (!PyArg_ParseTuple(args, "" )) + return NULL; + Py_Return; } PyObject *TopoShapePyOld::isNull(PyObject *args) -{ - if (!PyArg_ParseTuple(args, "" )) +{ + if (!PyArg_ParseTuple(args, "" )) return NULL; return Py_BuildValue("O", (_cTopoShape.IsNull() ? Py_True : Py_False)); } PyObject *TopoShapePyOld::isValid(PyObject *args) -{ - if (!PyArg_ParseTuple(args, "" )) +{ + if (!PyArg_ParseTuple(args, "" )) return NULL; if ( !_cTopoShape.IsNull() ) { @@ -253,12 +253,12 @@ PyObject *TopoShapePyOld::isValid(PyObject *args) return Py_BuildValue("O", (aChecker.IsValid() ? Py_True : Py_False)); } - return Py_BuildValue("O", Py_False); + return Py_BuildValue("O", Py_False); } PyObject *TopoShapePyOld::analyze(PyObject *args) -{ - if (!PyArg_ParseTuple(args, "" )) +{ + if (!PyArg_ParseTuple(args, "" )) return NULL; if ( !_cTopoShape.IsNull() ) { @@ -392,7 +392,7 @@ PyObject *TopoShapePyOld::analyze(PyObject *args) } } - Py_Return; + Py_Return; } #if 0 // need a define for version of OCC @@ -413,11 +413,11 @@ class ProgressIndicator : public MoniTool_ProgressIndicator { public: ProgressIndicator() {} - virtual ~ProgressIndicator() + virtual ~ProgressIndicator() { Base::Sequencer().stop(); } - + virtual void Reset() { } @@ -448,11 +448,11 @@ public: PyObject *TopoShapePyOld::importIGES(PyObject *args) { char* filename; - if (!PyArg_ParseTuple(args, "s", &filename )) + if (!PyArg_ParseTuple(args, "s", &filename )) return NULL; PY_TRY { - + // checking for the file Base::FileInfo File(filename); if(!File.isReadable()) { @@ -469,11 +469,11 @@ PyObject *TopoShapePyOld::importIGES(PyObject *args) } #if 0 - // get all root shapes + // get all root shapes Handle(TColStd_HSequenceOfTransient) aList=aReader.GiveList("xst-transferrable-roots"); for (Standard_Integer j=1; j<=aList->Length(); j++) { Handle(IGESData_IGESEntity) igesEntity=Handle(IGESData_IGESEntity)::DownCast(aList->Value(j)); - // get names + // get names Handle(TCollection_HAsciiString) name = igesEntity->NameValue(); if ( !name.IsNull() ) { const char* cname = name->ToCString(); @@ -486,13 +486,13 @@ PyObject *TopoShapePyOld::importIGES(PyObject *args) } const char* type = igesEntity->DynamicType()->Name(); } - + //Standard_Integer val = Interface_Static::IVal("read.iges.bspline.continuity"); //Interface_Static::SetIVal("read.iges.bspline.continuity", 2); //Standard_Integer ic = Interface_Static::IVal("read.precision.mode"); //Standard_Real rp = Interface_Static::RVal("read.precision.val"); - - //Handle(TColStd_HSequenceOfTransient) aList; + + //Handle(TColStd_HSequenceOfTransient) aList; //aList = aReader.GiveList ("iges-type(114)"); //int ct = aList->Length(); //Reader.TransferList(aList); @@ -502,17 +502,17 @@ PyObject *TopoShapePyOld::importIGES(PyObject *args) // one shape that contains all subshapes aReader.TransferRoots(); //ct = aReader.NbShapes(); - + _cTopoShape = aReader.OneShape(); } PY_CATCH; - Py_Return; + Py_Return; } PyObject *TopoShapePyOld::exportIGES(PyObject *args) { char* filename; - if (!PyArg_ParseTuple(args, "s", &filename )) + if (!PyArg_ParseTuple(args, "s", &filename )) return NULL; PY_TRY { @@ -553,13 +553,13 @@ PyObject *TopoShapePyOld::exportIGES(PyObject *args) } PY_CATCH; - Py_Return; + Py_Return; } PyObject *TopoShapePyOld::importSTEP(PyObject *args) { char* filename; - if (!PyArg_ParseTuple(args, "s", &filename )) + if (!PyArg_ParseTuple(args, "s", &filename )) return NULL; PY_TRY { @@ -581,7 +581,7 @@ PyObject *TopoShapePyOld::importSTEP(PyObject *args) Handle(TColStd_HSequenceOfTransient) aList=aReader.GiveList("xst-transferrable-roots"); for (Standard_Integer j=1; j<=aList->Length(); j++) { Handle(IGESData_IGESEntity) igesEntity=Handle(IGESData_IGESEntity)::DownCast(aList->Value(j)); - // get names + // get names Handle(TCollection_HAsciiString) name = igesEntity->NameValue(); if ( !name.IsNull() ) { const char* cname = name->ToCString(); @@ -623,7 +623,7 @@ PyObject *TopoShapePyOld::importSTEP(PyObject *args) } PY_CATCH; - Py_Return; + Py_Return; } PyObject *TopoShapePyOld::exportSTEP(PyObject *args) @@ -647,16 +647,16 @@ PyObject *TopoShapePyOld::exportSTEP(PyObject *args) PyErr_SetString(PartExceptionOCCError,"Writing STEP failed"); return NULL; } - + } PY_CATCH; - Py_Return; + Py_Return; } PyObject *TopoShapePyOld::importBREP(PyObject *args) { char* filename; - if (!PyArg_ParseTuple(args, "s", &filename )) + if (!PyArg_ParseTuple(args, "s", &filename )) return NULL; PY_TRY { @@ -666,7 +666,7 @@ PyObject *TopoShapePyOld::importBREP(PyObject *args) PyErr_SetString(PartExceptionOCCError,"File to read does not exist or is not readable"); return NULL; } - + // read brep file BRep_Builder aBuilder; if (!BRepTools::Read(_cTopoShape,(const Standard_CString)filename,aBuilder)) { @@ -675,7 +675,7 @@ PyObject *TopoShapePyOld::importBREP(PyObject *args) } } PY_CATCH; - Py_Return; + Py_Return; } PyObject *TopoShapePyOld::exportBREP(PyObject *args) @@ -692,7 +692,7 @@ PyObject *TopoShapePyOld::exportBREP(PyObject *args) } } PY_CATCH; - Py_Return; + Py_Return; } PyObject *TopoShapePyOld::exportSTL(PyObject *args) @@ -707,7 +707,7 @@ PyObject *TopoShapePyOld::exportSTL(PyObject *args) writer.Write( _cTopoShape, (const Standard_CString)filename ); } PY_CATCH; - Py_Return; + Py_Return; } #endif diff --git a/src/Mod/Part/App/TopologyPy.h b/src/Mod/Part/App/TopologyPy.h index 051095e7cf..05eb54dae5 100644 --- a/src/Mod/Part/App/TopologyPy.h +++ b/src/Mod/Part/App/TopologyPy.h @@ -46,15 +46,15 @@ class AppPartExport TopoShapePyOld :public Base::PyObjectBase Py_Header; protected: - /// Destruction + /// Destruction ~TopoShapePyOld(); public: - /// Constructor + /// Constructor TopoShapePyOld(PyTypeObject *T = &Type); TopoShapePyOld(const TopoDS_Shape &cShape, PyTypeObject *T = &TopoShapePyOld::Type); - /// for Construction in python + /// for Construction in python static PyObject *PyMake(PyTypeObject*, PyObject*, PyObject*); static int PyInit(PyObject*, PyObject*, PyObject*); @@ -67,7 +67,7 @@ public: TopoDS_Shape getTopoShape(void){return _cTopoShape;} //--------------------------------------------------------------------- - // python exports goes here +++++++++++++++++++++++++++++++++++++++++++ + // python exports goes here +++++++++++++++++++++++++++++++++++++++++++ //--------------------------------------------------------------------- virtual PyObject *_repr(void); // the representation diff --git a/src/Mod/Part/App/ToroidPy.xml b/src/Mod/Part/App/ToroidPy.xml index d2ff0af68c..89ac7f6fd4 100644 --- a/src/Mod/Part/App/ToroidPy.xml +++ b/src/Mod/Part/App/ToroidPy.xml @@ -1,14 +1,14 @@ - diff --git a/src/Mod/Part/App/ToroidPyImp.cpp b/src/Mod/Part/App/ToroidPyImp.cpp index 508142e7bd..cdb480059d 100644 --- a/src/Mod/Part/App/ToroidPyImp.cpp +++ b/src/Mod/Part/App/ToroidPyImp.cpp @@ -44,7 +44,7 @@ std::string ToroidPy::representation() const PyObject *ToroidPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper { - // create a new instance of ToroidPy and the Twin object + // create a new instance of ToroidPy and the Twin object return new ToroidPy(new GeomToroid); } @@ -66,7 +66,7 @@ Py::Float ToroidPy::getMajorRadius() const { Handle(Geom_ToroidalSurface) torus = Handle(Geom_ToroidalSurface)::DownCast (getGeomToroidPtr()->handle()); - return Py::Float(torus->MajorRadius()); + return Py::Float(torus->MajorRadius()); } void ToroidPy::setMajorRadius(Py::Float arg) @@ -85,7 +85,7 @@ Py::Float ToroidPy::getMinorRadius() const { Handle(Geom_ToroidalSurface) torus = Handle(Geom_ToroidalSurface)::DownCast (getGeomToroidPtr()->handle()); - return Py::Float(torus->MinorRadius()); + return Py::Float(torus->MinorRadius()); } void ToroidPy::setMinorRadius(Py::Float arg) @@ -171,14 +171,14 @@ Py::Float ToroidPy::getArea() const { Handle(Geom_ToroidalSurface) torus = Handle(Geom_ToroidalSurface)::DownCast (getGeomToroidPtr()->handle()); - return Py::Float(torus->Area()); + return Py::Float(torus->Area()); } Py::Float ToroidPy::getVolume() const { Handle(Geom_ToroidalSurface) torus = Handle(Geom_ToroidalSurface)::DownCast (getGeomToroidPtr()->handle()); - return Py::Float(torus->Volume()); + return Py::Float(torus->Volume()); } PyObject *ToroidPy::getCustomAttributes(const char* /*attr*/) const @@ -188,5 +188,5 @@ PyObject *ToroidPy::getCustomAttributes(const char* /*attr*/) const int ToroidPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } diff --git a/src/Mod/Part/AttachmentEditor/Commands.py b/src/Mod/Part/AttachmentEditor/Commands.py index 5d300df1bc..83a1ab9017 100644 --- a/src/Mod/Part/AttachmentEditor/Commands.py +++ b/src/Mod/Part/AttachmentEditor/Commands.py @@ -20,7 +20,7 @@ # * * # ***************************************************************************/ -from __future__ import absolute_import +from __future__ import absolute_import import FreeCAD as App @@ -30,47 +30,47 @@ except ImportError: def QT_TRANSLATE_NOOP(ctx, msg): return msg -def editAttachment(feature = None, - take_selection = False, - create_transaction = True, - callback_OK = None, - callback_Cancel = None, +def editAttachment(feature = None, + take_selection = False, + create_transaction = True, + callback_OK = None, + callback_Cancel = None, callback_Apply = None): '''Opens attachment editing dialog. - editAttachment(feature = None, - take_selection = False, - create_transaction = True, - callback_OK = None, - callback_Cancel = None, + editAttachment(feature = None, + take_selection = False, + create_transaction = True, + callback_OK = None, + callback_Cancel = None, callback_Apply = None) - feature: object to attach/modify. If None is supplied, the object is taken from + feature: object to attach/modify. If None is supplied, the object is taken from selection. - take_selection: if True, current selection is filled into first references (but only + take_selection: if True, current selection is filled into first references (but only if object to be attached doesn't have any references already) - create_transaction = if False, no undo transaction operations will be done by the - dialog (consequently, canceling the dialog will not reset the feature to original + create_transaction = if False, no undo transaction operations will be done by the + dialog (consequently, canceling the dialog will not reset the feature to original state). - callback_OK: function to be called upon OK. Invoked after writing values to feature, + callback_OK: function to be called upon OK. Invoked after writing values to feature, committing transaction and closing the dialog. callback_Cancel: called after closing the dialog and aborting transaction. callback_Apply: invoked after writing values to feature.''' - + import AttachmentEditor.TaskAttachmentEditor as TaskAttachmentEditor global taskd # exposing to outside, for ease of debugging if feature is None: feature = Gui.Selection.getSelectionEx()[0].Object - + try: - taskd = TaskAttachmentEditor.AttachmentEditorTaskPanel(feature, - take_selection= take_selection, + taskd = TaskAttachmentEditor.AttachmentEditorTaskPanel(feature, + take_selection= take_selection, create_transaction= create_transaction, - callback_OK= callback_OK, + callback_OK= callback_OK, callback_Cancel= callback_Cancel, callback_Apply= callback_Apply) Gui.Control.showDialog(taskd) except TaskAttachmentEditor.CancelError: pass - + class CommandEditAttachment: 'Command to edit attachment' @@ -79,7 +79,7 @@ class CommandEditAttachment: 'MenuText': QT_TRANSLATE_NOOP("Part_EditAttachment","Attachment..."), 'Accel': "", 'ToolTip': QT_TRANSLATE_NOOP("Part_EditAttachment","Edit attachment of selected object.")} - + def Activated(self): try: editAttachment() @@ -90,7 +90,7 @@ class CommandEditAttachment: mb.setText(str(err)) mb.setWindowTitle("Error") mb.exec_() - + def IsActive(self): sel = Gui.Selection.getSelectionEx() if len(sel) == 1: diff --git a/src/Mod/Part/BOPTools/GeneralFuseResult.py b/src/Mod/Part/BOPTools/GeneralFuseResult.py index b9d996039f..78884316fe 100644 --- a/src/Mod/Part/BOPTools/GeneralFuseResult.py +++ b/src/Mod/Part/BOPTools/GeneralFuseResult.py @@ -41,7 +41,7 @@ def myCustomFusionRoutine(list_of_shapes): def __define_attributes(self): # stores the data returned by generalFuse, supplied to class constructor - self.gfa_return = None + self.gfa_return = None # pieces that resulted from intersetion routine. List of shapes (non-decorated). self.pieces = None @@ -60,7 +60,7 @@ def myCustomFusionRoutine(list_of_shapes): # dictionary for finding, which source shapes did an element of pieces come from. # key = HashableShape (element). Value = set of ints - self._element_to_source = {} + self._element_to_source = {} self._freeze() diff --git a/src/Mod/Part/BOPTools/JoinFeatures.py b/src/Mod/Part/BOPTools/JoinFeatures.py index 14e8147636..2a486718b5 100644 --- a/src/Mod/Part/BOPTools/JoinFeatures.py +++ b/src/Mod/Part/BOPTools/JoinFeatures.py @@ -37,7 +37,7 @@ if FreeCAD.GuiUp: # -------------------------- translation-related code ------------------------- # Thanks, yorik! (see forum thread "A new Part tool is being born... JoinFeatures!" # http://forum.freecadweb.org/viewtopic.php?f=22&t=11112&start=30#p90239 ) - + try: _fromUtf8 = QtCore.QString.fromUtf8 except Exception: diff --git a/src/Mod/Part/BOPTools/SplitFeatures.py b/src/Mod/Part/BOPTools/SplitFeatures.py index 06cd1d7cf6..9edf63c1fd 100644 --- a/src/Mod/Part/BOPTools/SplitFeatures.py +++ b/src/Mod/Part/BOPTools/SplitFeatures.py @@ -318,7 +318,7 @@ def cmdCreateSliceFeature(name, mode, transaction=True): def cmdSliceApart(): FreeCAD.ActiveDocument.openTransaction("Slice apart") made = cmdCreateSliceFeature(name="Slice", mode="Split", transaction=False) - + if made: FreeCADGui.addModule("CompoundTools.Explode") FreeCADGui.doCommand("CompoundTools.Explode.explodeCompound(f)") diff --git a/src/Mod/Part/CompoundTools/CompoundFilter.py b/src/Mod/Part/CompoundTools/CompoundFilter.py index 786b51ac84..aac84d6950 100644 --- a/src/Mod/Part/CompoundTools/CompoundFilter.py +++ b/src/Mod/Part/CompoundTools/CompoundFilter.py @@ -40,7 +40,7 @@ def makeCompoundFilter(name, into_group = None): else: obj = into_group.newObject("Part::FeaturePython", name) _CompoundFilter(obj) - if obj.ViewObject: + if obj.ViewObject: _ViewProviderCompoundFilter(obj.ViewObject) return obj diff --git a/src/Mod/Part/CompoundTools/_CommandExplodeCompound.py b/src/Mod/Part/CompoundTools/_CommandExplodeCompound.py index 812cb66c66..824ab56822 100644 --- a/src/Mod/Part/CompoundTools/_CommandExplodeCompound.py +++ b/src/Mod/Part/CompoundTools/_CommandExplodeCompound.py @@ -90,7 +90,7 @@ def cmdExplode(): except Exception as ex: FreeCAD.ActiveDocument.abortTransaction() FreeCAD.Console.PrintError("{}\n".format(ex)) - + FreeCAD.ActiveDocument.commitTransaction() FreeCADGui.doCommand("App.ActiveDocument.recompute()") - + diff --git a/src/Mod/Part/Gui/Command.cpp b/src/Mod/Part/Gui/Command.cpp index 5a09d225c1..abaa2e14a3 100644 --- a/src/Mod/Part/Gui/Command.cpp +++ b/src/Mod/Part/Gui/Command.cpp @@ -307,7 +307,7 @@ CmdPartCut::CmdPartCut() void CmdPartCut::activated(int iMsg) { Q_UNUSED(iMsg); - std::vector Sel = + std::vector Sel = getSelection().getSelectionEx(nullptr, App::DocumentObject::getClassTypeId(), Gui::ResolveMode::FollowLink); if (Sel.size() != 2) { QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), @@ -385,7 +385,7 @@ CmdPartCommon::CmdPartCommon() void CmdPartCommon::activated(int iMsg) { Q_UNUSED(iMsg); - std::vector Sel = + std::vector Sel = getSelection().getSelectionEx(nullptr, App::DocumentObject::getClassTypeId(), Gui::ResolveMode::FollowLink); //test if selected object is a compound, and if it is, look how many children it has... @@ -485,7 +485,7 @@ CmdPartFuse::CmdPartFuse() void CmdPartFuse::activated(int iMsg) { Q_UNUSED(iMsg); - std::vector Sel = + std::vector Sel = getSelection().getSelectionEx(nullptr, App::DocumentObject::getClassTypeId(), Gui::ResolveMode::FollowLink); //test if selected object is a compound, and if it is, look how many children it has... @@ -974,7 +974,7 @@ CmdPartSection::CmdPartSection() void CmdPartSection::activated(int iMsg) { Q_UNUSED(iMsg); - std::vector Sel = + std::vector Sel = getSelection().getSelectionEx(nullptr, App::DocumentObject::getClassTypeId(), Gui::ResolveMode::FollowLink); if (Sel.size() != 2) { QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), diff --git a/src/Mod/Part/Gui/CommandSimple.cpp b/src/Mod/Part/Gui/CommandSimple.cpp index 72dfd89aa9..76a038e05e 100644 --- a/src/Mod/Part/Gui/CommandSimple.cpp +++ b/src/Mod/Part/Gui/CommandSimple.cpp @@ -203,7 +203,7 @@ static void _copyShape(const char *cmdName, bool resolve,bool needElement=false, const char *element = nullptr; auto sobj = obj->resolve(sub.c_str(),nullptr,nullptr,&element); if(!sobj) continue; - if(!needElement && element) + if(!needElement && element) subMap.emplace(sub.substr(0,element-sub.c_str()),sobj); else subMap.emplace(sub,sobj); @@ -221,7 +221,7 @@ static void _copyShape(const char *cmdName, bool resolve,bool needElement=false, needElement ? "True" : "False", refine ? "True" : "False", needElement ? ".copy()" : "", - v.second->getNameInDocument(), + v.second->getNameInDocument(), Gui::Command::getObjectCmd(v.second).c_str()); auto newObj = App::GetApplication().getActiveDocument()->getActiveObject(); Gui::Command::copyVisual(newObj, "ShapeColor", v.second); diff --git a/src/Mod/Part/Gui/CrossSections.cpp b/src/Mod/Part/Gui/CrossSections.cpp index 1a7e9196b2..8642006038 100644 --- a/src/Mod/Part/Gui/CrossSections.cpp +++ b/src/Mod/Part/Gui/CrossSections.cpp @@ -142,7 +142,7 @@ CrossSections::CrossSections(const Base::BoundBox3d& bb, QWidget* parent, Qt::Wi } } -/* +/* * Destroys the object and frees any allocated resources */ CrossSections::~CrossSections() diff --git a/src/Mod/Part/Gui/DlgBooleanOperation.cpp b/src/Mod/Part/Gui/DlgBooleanOperation.cpp index 0d75cf5334..d46816a21a 100644 --- a/src/Mod/Part/Gui/DlgBooleanOperation.cpp +++ b/src/Mod/Part/Gui/DlgBooleanOperation.cpp @@ -97,7 +97,7 @@ DlgBooleanOperation::DlgBooleanOperation(QWidget* parent) findShapes(); } -/* +/* * Destroys the object and frees any allocated resources */ DlgBooleanOperation::~DlgBooleanOperation() @@ -137,7 +137,7 @@ void DlgBooleanOperation::slotChangedObject(const App::DocumentObject& obj, Gui::Document* activeGui = Gui::Application::Instance->getDocument(obj.getDocument()); QString label = QString::fromUtf8(obj.Label.getValue()); QString name = QString::fromLatin1(obj.getNameInDocument()); - + QTreeWidgetItem* child = new BooleanOperationItem(); child->setCheckState(0, Qt::Unchecked); child->setText(0, label); @@ -222,7 +222,7 @@ void DlgBooleanOperation::findShapes() if (!shape.IsNull()) { QString label = QString::fromUtf8((*it)->Label.getValue()); QString name = QString::fromLatin1((*it)->getNameInDocument()); - + QTreeWidgetItem* child = new BooleanOperationItem(); child->setCheckState(0, Qt::Unchecked); child->setText(0, label); @@ -378,17 +378,17 @@ void DlgBooleanOperation::accept() } if (!litem || !indexOfCurrentItem(litem,ltop,lchild)) { - QMessageBox::critical(this, windowTitle(), + QMessageBox::critical(this, windowTitle(), tr("Select a shape on the left side, first")); return; } if (!ritem || !indexOfCurrentItem(ritem,rtop,rchild)) { - QMessageBox::critical(this, windowTitle(), + QMessageBox::critical(this, windowTitle(), tr("Select a shape on the right side, first")); return; } if (ltop == rtop && lchild == rchild) { - QMessageBox::critical(this, windowTitle(), + QMessageBox::critical(this, windowTitle(), tr("Cannot perform a boolean operation with the same shape")); return; } @@ -398,7 +398,7 @@ void DlgBooleanOperation::accept() shapeTwo = (const char*)ritem->data(0, Qt::UserRole).toByteArray(); App::Document* activeDoc = App::GetApplication().getActiveDocument(); if (!activeDoc) { - QMessageBox::critical(this, windowTitle(), + QMessageBox::critical(this, windowTitle(), tr("No active document available")); return; } @@ -408,14 +408,14 @@ void DlgBooleanOperation::accept() App::DocumentObject* obj2 = activeDoc->getObject(shapeTwo.c_str()); if (!obj1 || !obj2) { // objects don't exists (anymore) - QMessageBox::critical(this, windowTitle(), + QMessageBox::critical(this, windowTitle(), tr("One of the selected objects doesn't exist anymore")); return; } if (ui->unionButton->isChecked()) { if (!hasSolids(obj1) || !hasSolids(obj2)) { - QMessageBox::critical(this, windowTitle(), + QMessageBox::critical(this, windowTitle(), tr("Performing union on non-solids is not possible")); return; } @@ -424,7 +424,7 @@ void DlgBooleanOperation::accept() } else if (ui->interButton->isChecked()) { if (!hasSolids(obj1) || !hasSolids(obj2)) { - QMessageBox::critical(this, windowTitle(), + QMessageBox::critical(this, windowTitle(), tr("Performing intersection on non-solids is not possible")); return; } @@ -433,7 +433,7 @@ void DlgBooleanOperation::accept() } else if (ui->diffButton->isChecked()) { if (!hasSolids(obj1) || !hasSolids(obj2)) { - QMessageBox::critical(this, windowTitle(), + QMessageBox::critical(this, windowTitle(), tr("Performing difference on non-solids is not possible")); return; } diff --git a/src/Mod/Part/Gui/DlgExtrusion.cpp b/src/Mod/Part/Gui/DlgExtrusion.cpp index ba45b85d6d..e7534bbe24 100644 --- a/src/Mod/Part/Gui/DlgExtrusion.cpp +++ b/src/Mod/Part/Gui/DlgExtrusion.cpp @@ -439,7 +439,7 @@ void DlgExtrusion::apply() assert(sourceObj); if (Part::Feature::getTopoShape(sourceObj).isNull()){ - FC_ERR("Object " << sourceObj->getFullName() + FC_ERR("Object " << sourceObj->getFullName() << " is not Part object (has no OCC shape). Can't extrude it."); continue; } diff --git a/src/Mod/Part/Gui/DlgFilletEdges.cpp b/src/Mod/Part/Gui/DlgFilletEdges.cpp index f1693a7b96..5b74cd739f 100644 --- a/src/Mod/Part/Gui/DlgFilletEdges.cpp +++ b/src/Mod/Part/Gui/DlgFilletEdges.cpp @@ -289,7 +289,7 @@ DlgFilletEdges::DlgFilletEdges(FilletType type, Part::FilletBase* fillet, QWidge findShapes(); } -/* +/* * Destroys the object and frees any allocated resources */ DlgFilletEdges::~DlgFilletEdges() @@ -1043,7 +1043,7 @@ DlgChamferEdges::DlgChamferEdges(Part::FilletBase* chamfer, QWidget* parent, Qt: this->setWindowTitle(tr("Chamfer Edges")); } -/* +/* * Destroys the object and frees any allocated resources */ DlgChamferEdges::~DlgChamferEdges() diff --git a/src/Mod/Part/Gui/DlgFilletEdges.h b/src/Mod/Part/Gui/DlgFilletEdges.h index 187df645d1..e886eacf67 100644 --- a/src/Mod/Part/Gui/DlgFilletEdges.h +++ b/src/Mod/Part/Gui/DlgFilletEdges.h @@ -35,7 +35,7 @@ namespace Base { class Quantity; } -namespace Part { +namespace Part { class FilletBase; class Fillet; class Chamfer; @@ -58,7 +58,7 @@ public: void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override; - void updateEditorGeometry(QWidget *editor, + void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override; }; diff --git a/src/Mod/Part/Gui/DlgPartBoxImp.cpp b/src/Mod/Part/Gui/DlgPartBoxImp.cpp index 55833c1a36..efa0f22f70 100644 --- a/src/Mod/Part/Gui/DlgPartBoxImp.cpp +++ b/src/Mod/Part/Gui/DlgPartBoxImp.cpp @@ -28,9 +28,9 @@ using namespace PartGui; -/* - * Constructs a DlgPartBox which is a child of 'parent', with the - * name 'name' and widget flags set to 'f' +/* + * Constructs a DlgPartBox which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to * true to construct a modal dialog. @@ -40,7 +40,7 @@ DlgPartBoxImp::DlgPartBoxImp(QWidget* parent, Qt::WindowFlags fl) { } -/* +/* * Destroys the object and frees any allocated resources */ DlgPartBoxImp::~DlgPartBoxImp() diff --git a/src/Mod/Part/Gui/DlgPartImportIgesImp.cpp b/src/Mod/Part/Gui/DlgPartImportIgesImp.cpp index 90deac9a7f..f8f3d2d9e5 100644 --- a/src/Mod/Part/Gui/DlgPartImportIgesImp.cpp +++ b/src/Mod/Part/Gui/DlgPartImportIgesImp.cpp @@ -33,9 +33,9 @@ using namespace PartGui; /* TRANSLATOR PartGui::DlgPartImportIgesImp */ -/* - * Constructs a DlgPartImportIges which is a child of 'parent', with the - * name 'name' and widget flags set to 'f' +/* + * Constructs a DlgPartImportIges which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to * true to construct a modal dialog. @@ -47,7 +47,7 @@ DlgPartImportIgesImp::DlgPartImportIgesImp(QWidget* parent, Qt::WindowFlags fl) ui->setupUi(this); } -/* +/* * Destroys the object and frees any allocated resources */ DlgPartImportIgesImp::~DlgPartImportIgesImp() @@ -55,12 +55,12 @@ DlgPartImportIgesImp::~DlgPartImportIgesImp() // no need to delete child widgets, Qt does it all for us } -/* +/* * public slot */ void DlgPartImportIgesImp::OnApply() { - qWarning( "DlgPartImportIgesImp::OnApply() not yet implemented!" ); + qWarning( "DlgPartImportIgesImp::OnApply() not yet implemented!" ); } void DlgPartImportIgesImp::onChooseFileName() diff --git a/src/Mod/Part/Gui/DlgPartImportIgesImp.h b/src/Mod/Part/Gui/DlgPartImportIgesImp.h index afe22a5980..86df5b8ee1 100644 --- a/src/Mod/Part/Gui/DlgPartImportIgesImp.h +++ b/src/Mod/Part/Gui/DlgPartImportIgesImp.h @@ -29,7 +29,7 @@ namespace PartGui { class Ui_DlgPartImportIges; class DlgPartImportIgesImp : public QDialog -{ +{ Q_OBJECT public: diff --git a/src/Mod/Part/Gui/DlgPartImportStepImp.cpp b/src/Mod/Part/Gui/DlgPartImportStepImp.cpp index b69c884bad..64cc5a7f98 100644 --- a/src/Mod/Part/Gui/DlgPartImportStepImp.cpp +++ b/src/Mod/Part/Gui/DlgPartImportStepImp.cpp @@ -33,9 +33,9 @@ using namespace PartGui; /* TRANSLATOR PartGui::DlgPartImportStepImp */ -/* - * Constructs a DlgPartImportStep which is a child of 'parent', with the - * name 'name' and widget flags set to 'f' +/* + * Constructs a DlgPartImportStep which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to * true to construct a modal dialog. @@ -47,7 +47,7 @@ DlgPartImportStepImp::DlgPartImportStepImp( QWidget* parent, Qt::WindowFlags fl ui->setupUi(this); } -/* +/* * Destroys the object and frees any allocated resources */ DlgPartImportStepImp::~DlgPartImportStepImp() @@ -55,12 +55,12 @@ DlgPartImportStepImp::~DlgPartImportStepImp() // no need to delete child widgets, Qt does it all for us } -/* +/* * public slot */ void DlgPartImportStepImp::OnApply() { - qWarning( "DlgPartImportStepImp::OnApply() not yet implemented!" ); + qWarning( "DlgPartImportStepImp::OnApply() not yet implemented!" ); } void DlgPartImportStepImp::onChooseFileName() diff --git a/src/Mod/Part/Gui/DlgPartImportStepImp.h b/src/Mod/Part/Gui/DlgPartImportStepImp.h index d27cf02ab8..14d48dfe52 100644 --- a/src/Mod/Part/Gui/DlgPartImportStepImp.h +++ b/src/Mod/Part/Gui/DlgPartImportStepImp.h @@ -30,7 +30,7 @@ namespace PartGui { class Ui_DlgPartImportStep; class DlgPartImportStepImp : public QDialog -{ +{ Q_OBJECT public: diff --git a/src/Mod/Part/Gui/DlgPrimitives.h b/src/Mod/Part/Gui/DlgPrimitives.h index 80b62e97a9..49efac91ea 100644 --- a/src/Mod/Part/Gui/DlgPrimitives.h +++ b/src/Mod/Part/Gui/DlgPrimitives.h @@ -184,7 +184,7 @@ class TaskPrimitivesEdit : public Gui::TaskView::TaskDialog public: explicit TaskPrimitivesEdit(Part::Primitive* feature); ~TaskPrimitivesEdit() override; - + public: bool accept() override; bool reject() override; @@ -192,7 +192,7 @@ public: private: DlgPrimitives* widget; - Location* location; + Location* location; }; } // namespace PartGui diff --git a/src/Mod/Part/Gui/DlgProjectionOnSurface.h b/src/Mod/Part/Gui/DlgProjectionOnSurface.h index a786452bf8..739049fc20 100644 --- a/src/Mod/Part/Gui/DlgProjectionOnSurface.h +++ b/src/Mod/Part/Gui/DlgProjectionOnSurface.h @@ -132,7 +132,7 @@ private: std::string m_currentShowType; std::vector m_guiObjectVec; - + const QString m_projectionObjectName; Part::Feature* m_projectionObject; App::Document* m_partDocument; @@ -140,7 +140,7 @@ private: class EdgeSelection; EdgeSelection* filterEdge; - + class FaceSelection; FaceSelection* filterFace; }; diff --git a/src/Mod/Part/Gui/DlgRevolution.cpp b/src/Mod/Part/Gui/DlgRevolution.cpp index 0d87ccf3fa..ef0380427a 100644 --- a/src/Mod/Part/Gui/DlgRevolution.cpp +++ b/src/Mod/Part/Gui/DlgRevolution.cpp @@ -130,7 +130,7 @@ DlgRevolution::DlgRevolution(QWidget* parent, Qt::WindowFlags fl) autoSolid(); } -/* +/* * Destroys the object and frees any allocated resources */ DlgRevolution::~DlgRevolution() diff --git a/src/Mod/Part/Gui/DlgSettings3DViewPartImp.cpp b/src/Mod/Part/Gui/DlgSettings3DViewPartImp.cpp index 8e139e0d6a..c3d619326d 100644 --- a/src/Mod/Part/Gui/DlgSettings3DViewPartImp.cpp +++ b/src/Mod/Part/Gui/DlgSettings3DViewPartImp.cpp @@ -38,8 +38,8 @@ using namespace PartGui; /** - * Constructs a DlgSettings3DViewPart which is a child of 'parent', with the - * name 'name' and widget flags set to 'f' + * Constructs a DlgSettings3DViewPart which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' */ DlgSettings3DViewPart::DlgSettings3DViewPart(QWidget* parent) : PreferencePage(parent), ui(new Ui_DlgSettings3DViewPart), checkValue(false) @@ -51,7 +51,7 @@ DlgSettings3DViewPart::DlgSettings3DViewPart(QWidget* parent) ui->maxDeviation->setMinimum(lowerLimit); } -/** +/** * Destroys the object and frees any allocated resources */ DlgSettings3DViewPart::~DlgSettings3DViewPart() diff --git a/src/Mod/Part/Gui/DlgSettings3DViewPartImp.h b/src/Mod/Part/Gui/DlgSettings3DViewPartImp.h index fbcff0ec65..3d7defed66 100644 --- a/src/Mod/Part/Gui/DlgSettings3DViewPartImp.h +++ b/src/Mod/Part/Gui/DlgSettings3DViewPartImp.h @@ -35,7 +35,7 @@ class Ui_DlgSettings3DViewPart; * \author Jürgen Riegel */ class DlgSettings3DViewPart : public Gui::Dialog::PreferencePage -{ +{ Q_OBJECT public: diff --git a/src/Mod/Part/Gui/DlgSettingsObjectColor.cpp b/src/Mod/Part/Gui/DlgSettingsObjectColor.cpp index 783636d5cb..251fbae891 100644 --- a/src/Mod/Part/Gui/DlgSettingsObjectColor.cpp +++ b/src/Mod/Part/Gui/DlgSettingsObjectColor.cpp @@ -31,8 +31,8 @@ using namespace PartGui; /* TRANSLATOR PartGui::DlgSettingsObjectColor */ /** - * Constructs a DlgSettingsObjectColor which is a child of 'parent', with the - * name 'name' and widget flags set to 'f' + * Constructs a DlgSettingsObjectColor which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' */ DlgSettingsObjectColor::DlgSettingsObjectColor(QWidget* parent) : PreferencePage(parent) @@ -42,7 +42,7 @@ DlgSettingsObjectColor::DlgSettingsObjectColor(QWidget* parent) ui->DefaultShapeColor->setDisabled(ui->checkRandomColor->isChecked()); } -/** +/** * Destroys the object and frees any allocated resources */ DlgSettingsObjectColor::~DlgSettingsObjectColor() diff --git a/src/Mod/Part/Gui/DlgSettingsObjectColor.h b/src/Mod/Part/Gui/DlgSettingsObjectColor.h index ad6e143f36..151e16dde4 100644 --- a/src/Mod/Part/Gui/DlgSettingsObjectColor.h +++ b/src/Mod/Part/Gui/DlgSettingsObjectColor.h @@ -36,7 +36,7 @@ class Ui_DlgSettingsObjectColor; * @author Werner Mayer */ class DlgSettingsObjectColor : public Gui::Dialog::PreferencePage -{ +{ Q_OBJECT public: diff --git a/src/Mod/Part/Gui/Mirroring.cpp b/src/Mod/Part/Gui/Mirroring.cpp index 2b0e3fe108..1841f678df 100644 --- a/src/Mod/Part/Gui/Mirroring.cpp +++ b/src/Mod/Part/Gui/Mirroring.cpp @@ -77,7 +77,7 @@ Mirroring::Mirroring(QWidget* parent) sel.applyFrom(Gui::Selection().getObjectsOfType(App::Part::getClassTypeId())); } -/* +/* * Destroys the object and frees any allocated resources */ Mirroring::~Mirroring() @@ -110,7 +110,7 @@ void Mirroring::findShapes() if (!shape.isNull()) { QString label = QString::fromUtf8((*it)->Label.getValue()); QString name = QString::fromLatin1((*it)->getNameInDocument()); - + QTreeWidgetItem* child = new QTreeWidgetItem(); child->setText(0, label); child->setToolTip(0, label); diff --git a/src/Mod/Part/Gui/PreCompiled.cpp b/src/Mod/Part/Gui/PreCompiled.cpp index 3e85848b9a..7b200a1bf2 100644 --- a/src/Mod/Part/Gui/PreCompiled.cpp +++ b/src/Mod/Part/Gui/PreCompiled.cpp @@ -21,4 +21,4 @@ ***************************************************************************/ -#include "PreCompiled.h" +#include "PreCompiled.h" diff --git a/src/Mod/Part/Gui/SectionCutting.cpp b/src/Mod/Part/Gui/SectionCutting.cpp index 4c5b4828cf..983702c683 100644 --- a/src/Mod/Part/Gui/SectionCutting.cpp +++ b/src/Mod/Part/Gui/SectionCutting.cpp @@ -261,7 +261,7 @@ SectionCut::SectionCut(QWidget* parent) connect(ui->CutTransparency, &QSlider::sliderMoved, this, &SectionCut::onTransparencySliderMoved); connect(ui->CutTransparency, &QSlider::valueChanged, this, &SectionCut::onTransparencyChanged); - + // if there is a cut, perform it if (hasBoxX || hasBoxY || hasBoxZ) { ui->RefreshCutPB->setEnabled(false); @@ -319,7 +319,7 @@ void SectionCut::startCutting(bool isInitial) // it is dangerous to deal with the fact that the user is free // to uncheck cutting planes and to add/remove objects while this dialog is open // We must remove in this order because the tree hierary of the features is Z->Y->X and Cut->Box - + if (doc->getObject(CutZName)) deleteObject(CutZName); if (doc->getObject(BoxZName)) @@ -388,7 +388,7 @@ void SectionCut::startCutting(bool isInitial) // we need all Link objects in App::Part for example for Assembly 4 if (it->getObject()->getTypeId() == Base::Type::fromName("App::Part")) { App::Part* pcPart = static_cast(it->getObject()); - + // collect all its link objects auto groupObjects = pcPart->Group.getValue(); for (auto itGO = groupObjects.begin(); itGO != groupObjects.end(); ++itGO) { @@ -434,7 +434,7 @@ void SectionCut::startCutting(bool isInitial) ui->cutZHS->setEnabled(false); ui->cutZHS->setToolTip(SliderToolTip); } - + // sort out objects that are part of Part::Boolean, Part::MultiCommon, Part::MultiFuse, // Part::Thickness and Part::FilletBase std::vector::iterator it2; @@ -483,12 +483,12 @@ void SectionCut::startCutting(bool isInitial) ui->groupBoxZ->blockSignals(false); return; } - + // we cut this way: // 1. put all existing objects into a part compound // 2. create a box with the size of the bounding box // 3. cut the box from the compound - + // depending on how many cuts should be performed, we need as many boxes // if nothing is yet to be cut, we can return if (!ui->groupBoxX->isChecked() && !ui->groupBoxY->isChecked() @@ -532,7 +532,7 @@ void SectionCut::startCutting(bool isInitial) else newName = (*itCuts)->getNameInDocument(); newName = newName + "_CutLink"; - + auto newObject = doc->addObject("App::Link", newName.c_str()); if (!newObject) { Base::Console().Error("SectionCut error: 'App::Link' could not be added\n"); @@ -542,7 +542,7 @@ void SectionCut::startCutting(bool isInitial) // set the object to the created empty link object pcLink->LinkedObject.setValue((*itCuts)); // we want to get the link at the same position as the original - pcLink->LinkTransform.setValue(true); + pcLink->LinkTransform.setValue(true); // if the object is part of an App::Part container, // the link needs to get the container placement @@ -601,7 +601,7 @@ void SectionCut::startCutting(bool isInitial) // refresh all cut limits according to the new bounding box refreshCutRanges(CompoundBoundingBox); - + // prepare the cut box size according to the bounding box size std::vector BoundingBoxSize = { 0.0, 0.0, 0.0 }; CompoundBoundingBox.getSize(BoundingBoxSize[0], BoundingBoxSize[1], BoundingBoxSize[2]); @@ -746,7 +746,7 @@ void SectionCut::startCutting(bool isInitial) vpBox->ShapeColor.setValue(boxColor); vpBox->Transparency.setValue(boxTransparency); } - + auto CutFeature = doc->addObject("Part::Cut", CutYName); if (!CutFeature) { Base::Console().Error((std::string("SectionCut error: ") @@ -760,7 +760,7 @@ void SectionCut::startCutting(bool isInitial) else pcCut->Base.setValue(CutCompound); pcCut->Tool.setValue(CutBox); - + // set the cut value ui->cutY->setValue(CutPosY); if (!ui->groupBoxZ->isChecked()) @@ -1466,7 +1466,7 @@ void SectionCut::onFlipXclicked() return; } pcCut->recomputeFeature(true); - } + } } void SectionCut::onFlipYclicked() diff --git a/src/Mod/Part/Gui/SoBrepEdgeSet.cpp b/src/Mod/Part/Gui/SoBrepEdgeSet.cpp index 5733f02ec8..9c1fd24de6 100644 --- a/src/Mod/Part/Gui/SoBrepEdgeSet.cpp +++ b/src/Mod/Part/Gui/SoBrepEdgeSet.cpp @@ -98,19 +98,19 @@ void SoBrepEdgeSet::GLRender(SoGLRenderAction *action) if(ctx->selectionIndex.empty() || ctx->isSelectAll()) { if(ctx2) { ctx2->selectionColor = ctx->highlightColor; - renderSelection(action,ctx2); + renderSelection(action,ctx2); } else renderHighlight(action,ctx); }else{ if(!action->isRenderingDelayedPaths()) - renderSelection(action,ctx); + renderSelection(action,ctx); if(ctx2) { ctx2->selectionColor = ctx->highlightColor; - renderSelection(action,ctx2); + renderSelection(action,ctx2); } else renderHighlight(action,ctx); if(action->isRenderingDelayedPaths()) - renderSelection(action,ctx); + renderSelection(action,ctx); } return; } @@ -121,15 +121,15 @@ void SoBrepEdgeSet::GLRender(SoGLRenderAction *action) if(ctx->isSelectAll()) { if(ctx2) { ctx2->selectionColor = ctx->selectionColor; - renderSelection(action,ctx2); + renderSelection(action,ctx2); }else if(ctx->isSelectAll()) - renderSelection(action,ctx); + renderSelection(action,ctx); if(action->isRenderingDelayedPaths()) renderHighlight(action,ctx); return; } if(!action->isRenderingDelayedPaths()) - renderSelection(action,ctx); + renderSelection(action,ctx); } if(ctx2 && !ctx2->selectionIndex.empty()) renderSelection(action,ctx2,false); @@ -418,7 +418,7 @@ void SoBrepEdgeSet::doAction(SoAction* action) ctx = Gui::SoFCSelectionRoot::getActionContext(action,this,selContext); selCounter.checkAction(selaction,ctx); ctx->selectionColor = selaction->getColor(); - if(ctx->isSelectAll()) + if(ctx->isSelectAll()) ctx->selectionIndex.clear(); if(!ctx->selectionIndex.insert(index).second) return; diff --git a/src/Mod/Part/Gui/SoBrepFaceSet.cpp b/src/Mod/Part/Gui/SoBrepFaceSet.cpp index fb5e22d5f5..42adc44679 100644 --- a/src/Mod/Part/Gui/SoBrepFaceSet.cpp +++ b/src/Mod/Part/Gui/SoBrepFaceSet.cpp @@ -372,12 +372,12 @@ void SoBrepFaceSet::GLRender(SoGLRenderAction *action) if(ctx->isSelectAll()) { if(ctx2 && ctx2->selectionIndex.size()) { ctx2->selectionColor = ctx->selectionColor; - renderSelection(action,ctx2); + renderSelection(action,ctx2); } else - renderSelection(action,ctx); + renderSelection(action,ctx); return; } - renderSelection(action,ctx); + renderSelection(action,ctx); } if(ctx2 && ctx2->selectionIndex.size()) { renderSelection(action,ctx2,false); @@ -548,10 +548,10 @@ void SoBrepFaceSet::GLRender(SoGLRenderAction *action) // There are a few factors affects the rendering order. // // 1) For normal case, the highlight (pre-selection) is the top layer. And since - // the depth buffer clipping is on here, we shall draw highlight first, then + // the depth buffer clipping is on here, we shall draw highlight first, then // selection, then the rest part. // - // 2) If action->isRenderingDelayedPaths() is true, it means we are rendering + // 2) If action->isRenderingDelayedPaths() is true, it means we are rendering // with depth buffer clipping turned off (always on top rendering), so we shall // draw the top layer last, i.e. renderHighlight() last // @@ -566,19 +566,19 @@ void SoBrepFaceSet::GLRender(SoGLRenderAction *action) if(ctx->selectionIndex.empty() || ctx->isSelectAll()) { if(ctx2) { ctx2->selectionColor = ctx->highlightColor; - renderSelection(action,ctx2); + renderSelection(action,ctx2); } else renderHighlight(action,ctx); }else{ if(!action->isRenderingDelayedPaths()) - renderSelection(action,ctx); + renderSelection(action,ctx); if(ctx2) { ctx2->selectionColor = ctx->highlightColor; - renderSelection(action,ctx2); + renderSelection(action,ctx2); } else renderHighlight(action,ctx); if(action->isRenderingDelayedPaths()) - renderSelection(action,ctx); + renderSelection(action,ctx); } return; } @@ -589,20 +589,20 @@ void SoBrepFaceSet::GLRender(SoGLRenderAction *action) if(ctx->isSelectAll()) { if(ctx2) { ctx2->selectionColor = ctx->selectionColor; - renderSelection(action,ctx2); + renderSelection(action,ctx2); } else - renderSelection(action,ctx); + renderSelection(action,ctx); if(action->isRenderingDelayedPaths()) renderHighlight(action,ctx); return; } if(!action->isRenderingDelayedPaths()) - renderSelection(action,ctx); + renderSelection(action,ctx); } if(ctx2) { renderSelection(action,ctx2,false); if(action->isRenderingDelayedPaths()) { - renderSelection(action,ctx); + renderSelection(action,ctx); renderHighlight(action,ctx); } return; @@ -612,7 +612,7 @@ void SoBrepFaceSet::GLRender(SoGLRenderAction *action) SoMaterialBundle mb(action); // It is important to send material before shouldGLRender(), otherwise // material override with transparncy won't work. - mb.sendFirst(); + mb.sendFirst(); // When setting transparency shouldGLRender() handles the rendering and returns false. // Therefore generatePrimitives() needs to be re-implemented to handle the materials @@ -675,7 +675,7 @@ void SoBrepFaceSet::GLRender(SoGLRenderAction *action) if(notify) enableNotify(notify); state->pop(); }else if(action->isRenderingDelayedPaths()) { - renderSelection(action,ctx); + renderSelection(action,ctx); renderHighlight(action,ctx); } } @@ -723,10 +723,10 @@ bool SoBrepFaceSet::overrideMaterialBinding(SoGLRenderAction *action, SelContext // b) has transparency // c) has color override in secondary context - if((mb==SoMaterialBindingElement::OVERALL || - (mb==SoMaterialBindingElement::PER_PART && diffuse_size>=partIndex.getNum())) + if((mb==SoMaterialBindingElement::OVERALL || + (mb==SoMaterialBindingElement::PER_PART && diffuse_size>=partIndex.getNum())) && - ((ctx && Gui::Selection().needPickedList()) || + ((ctx && Gui::Selection().needPickedList()) || trans0!=0.0 || (ctx2 && !ctx2->colors.empty()))) { @@ -736,7 +736,7 @@ bool SoBrepFaceSet::overrideMaterialBinding(SoGLRenderAction *action, SelContext if(ctx && Gui::Selection().needPickedList()) { hasTransparency = true; - if(trans0 < 0.5) + if(trans0 < 0.5) trans0=0.5; trans_size = 1; if(ctx2) @@ -1388,7 +1388,7 @@ void SoBrepFaceSet::renderSelection(SoGLRenderAction *action, SelContextPtr ctx, state->pop(); // SoCacheElement::invalidate(state); } - + if (normalCacheUsed) this->readUnlockNormalCache(); } diff --git a/src/Mod/Part/Gui/SoBrepFaceSet.h b/src/Mod/Part/Gui/SoBrepFaceSet.h index 32a6d9c780..9f9ae7c49f 100644 --- a/src/Mod/Part/Gui/SoBrepFaceSet.h +++ b/src/Mod/Part/Gui/SoBrepFaceSet.h @@ -60,7 +60,7 @@ namespace PartGui { * Example: * Let's say you have a shape with two faces. When meshing face 1 it creates 10 triangles and face 2 creates 5 triangles. Then * the partIndex attribute would be the array [10,5]. - * + * * Highlighting/selection: * The highlightIndex now defines which part of the shape must be highlighted. So, in the above example it can have the values * 0, 1, or -1 (i.e. no highlighting). The highlightIndex is a SoSFInt32 field because only one part can be highlighted at a diff --git a/src/Mod/Part/Gui/SoBrepPointSet.cpp b/src/Mod/Part/Gui/SoBrepPointSet.cpp index afbf447a04..90db6c94f4 100644 --- a/src/Mod/Part/Gui/SoBrepPointSet.cpp +++ b/src/Mod/Part/Gui/SoBrepPointSet.cpp @@ -87,19 +87,19 @@ void SoBrepPointSet::GLRender(SoGLRenderAction *action) if(ctx->selectionIndex.empty() || ctx->isSelectAll()) { if(ctx2) { ctx2->selectionColor = ctx->highlightColor; - renderSelection(action,ctx2); + renderSelection(action,ctx2); } else renderHighlight(action,ctx); }else{ if(!action->isRenderingDelayedPaths()) - renderSelection(action,ctx); + renderSelection(action,ctx); if(ctx2) { ctx2->selectionColor = ctx->highlightColor; - renderSelection(action,ctx2); + renderSelection(action,ctx2); } else renderHighlight(action,ctx); if(action->isRenderingDelayedPaths()) - renderSelection(action,ctx); + renderSelection(action,ctx); } return; } @@ -110,15 +110,15 @@ void SoBrepPointSet::GLRender(SoGLRenderAction *action) if(ctx->isSelectAll()) { if(ctx2 && !ctx2->selectionIndex.empty()) { ctx2->selectionColor = ctx->selectionColor; - renderSelection(action,ctx2); + renderSelection(action,ctx2); }else - renderSelection(action,ctx); + renderSelection(action,ctx); if(action->isRenderingDelayedPaths()) renderHighlight(action,ctx); return; } if(!action->isRenderingDelayedPaths()) - renderSelection(action,ctx); + renderSelection(action,ctx); } if(ctx2 && !ctx2->selectionIndex.empty()) renderSelection(action,ctx2,false); @@ -333,7 +333,7 @@ void SoBrepPointSet::doAction(SoAction* action) SelContextPtr ctx = Gui::SoFCSelectionRoot::getActionContext(action,this,selContext); selCounter.checkAction(selaction,ctx); ctx->selectionColor = selaction->getColor(); - if(ctx->isSelectAll()) + if(ctx->isSelectAll()) ctx->selectionIndex.clear(); if(ctx->selectionIndex.insert(index).second) touch(); diff --git a/src/Mod/Part/Gui/TaskAttacher.cpp b/src/Mod/Part/Gui/TaskAttacher.cpp index 40cab985da..53cf3698c9 100644 --- a/src/Mod/Part/Gui/TaskAttacher.cpp +++ b/src/Mod/Part/Gui/TaskAttacher.cpp @@ -360,7 +360,7 @@ void TaskAttacher::onSelectionChanged(const Gui::SelectionChanges& msg) App::DocumentObject* selObj = ViewProvider->getObject()->getDocument()->getObject(msg.pObjectName); if (!selObj || selObj == ViewProvider->getObject())//prevent self-referencing return; - + std::string subname = msg.pSubName; // Remove subname for planes and datum features @@ -1003,7 +1003,7 @@ void TaskAttacher::visibilityAutomation(bool opening_not_closing) std::string editSubName; auto sels = Gui::Selection().getSelection(nullptr, Gui::ResolveMode::NoResolve, true); if(!sels.empty() && sels[0].pResolvedObject - && sels[0].pResolvedObject->getLinkedObject()==editObj) + && sels[0].pResolvedObject->getLinkedObject()==editObj) { editObj = sels[0].pObject; editSubName = sels[0].SubName; diff --git a/src/Mod/Part/Gui/TaskAttacher.h b/src/Mod/Part/Gui/TaskAttacher.h index c6f4763e3b..4c230380dc 100644 --- a/src/Mod/Part/Gui/TaskAttacher.h +++ b/src/Mod/Part/Gui/TaskAttacher.h @@ -44,7 +44,7 @@ namespace Gui { class ViewProvider; } -namespace PartGui { +namespace PartGui { class Ui_TaskAttacher; @@ -118,7 +118,7 @@ private: * current set of references. Maintains selection when possible. */ void updateListOfModes(); - + /** * @brief selectMapMode Select the given mode in the list widget */ @@ -167,11 +167,11 @@ public: bool accept() override; /// is called by the framework if the dialog is rejected (Cancel) bool reject() override; - /// is called by the framework if the user presses the help button + /// is called by the framework if the user presses the help button bool isAllowedAlterDocument(void) const override { return false; } - /// returns for Close and Help button + /// returns for Close and Help button QDialogButtonBox::StandardButtons getStandardButtons(void) const override { return QDialogButtonBox::Ok|QDialogButtonBox::Cancel; } diff --git a/src/Mod/Part/Gui/TaskDimension.cpp b/src/Mod/Part/Gui/TaskDimension.cpp index 6808c428c2..04e790ef52 100644 --- a/src/Mod/Part/Gui/TaskDimension.cpp +++ b/src/Mod/Part/Gui/TaskDimension.cpp @@ -126,7 +126,7 @@ bool PartGui::evaluateLinearPreSelection(TopoDS_Shape &shape1, TopoDS_Shape &sha std::vector::iterator it; std::vector shapes; DimSelections sels[2]; - + int i=0; for (it = selections.begin(); it != selections.end(); ++it) { @@ -147,9 +147,9 @@ bool PartGui::evaluateLinearPreSelection(TopoDS_Shape &shape1, TopoDS_Shape &sha shape1 = shapes.front(); shape2 = shapes.back(); - + auto doc = App::GetApplication().getActiveDocument(); - if(doc) + if(doc) _Measures[doc->getName()].emplace_back(sels[0],sels[1],true); return true; } @@ -322,7 +322,7 @@ void PartGui::eraseAllDimensions() void PartGui::refreshDimensions() { auto doc = App::GetApplication().getActiveDocument(); - if(!doc) + if(!doc) return; auto it = _Measures.find(doc->getName()); if(it == _Measures.end()) @@ -337,7 +337,7 @@ void PartGui::refreshDimensions() { PartGui::TaskMeasureAngular::buildDimension(info.sel1,info.sel2); } } - + void PartGui::toggle3d() { ParameterGrp::handle group = App::GetApplication().GetUserParameter(). @@ -621,10 +621,10 @@ void PartGui::TaskMeasureLinear::buildDimension(const DimSelections &sel1, const { if(sel1.selections.size() != 1 || sel2.selections.size() != 1) return; - + DimSelections::DimSelection current1 = sel1.selections.at(0); DimSelections::DimSelection current2 = sel2.selections.at(0); - + TopoDS_Shape shape1, shape2; if (!getShapeFromStrings(shape1, current1.documentName, current1.objectName, current1.subObjectName)) { @@ -637,7 +637,7 @@ void PartGui::TaskMeasureLinear::buildDimension(const DimSelections &sel1, const return; } auto doc = App::GetApplication().getActiveDocument(); - if(doc) + if(doc) _Measures[doc->getName()].emplace_back(sel1,sel2,true); goDimensionLinearNoTask(shape1, shape2); } @@ -870,12 +870,12 @@ bool PartGui::evaluateAngularPreSelection(VectorAdapter &vector1Out, VectorAdapt if (shape.IsNull()) break; mat.inverse(); - + if (shape.ShapeType() == TopAbs_VERTEX) { - if(sels.empty() || + if(sels.empty() || sels.back().selections.back().shapeType!=DimSelections::Vertex || - sels.back().selections.size()==1) + sels.back().selections.size()==1) { sels.emplace_back(); } @@ -927,7 +927,7 @@ bool PartGui::evaluateAngularPreSelection(VectorAdapter &vector1Out, VectorAdapt sel.x = v.x; sel.y = v.y; sel.z = v.z; - + if (shape.ShapeType() == TopAbs_EDGE) { sel.shapeType = DimSelections::Edge; @@ -973,7 +973,7 @@ bool PartGui::evaluateAngularPreSelection(VectorAdapter &vector1Out, VectorAdapt } auto doc = App::GetApplication().getActiveDocument(); - if(doc) + if(doc) _Measures[doc->getName()].emplace_back(sels[0],sels[1],false); return true; } @@ -1557,7 +1557,7 @@ void PartGui::TaskMeasureAngular::onSelectionChanged(const Gui::SelectionChanges { TopoDS_Shape shape; Base::Matrix4D mat; - if (!getShapeFromStrings(shape, std::string(msg.pDocName), + if (!getShapeFromStrings(shape, std::string(msg.pDocName), std::string(msg.pObjectName), std::string(msg.pSubName),&mat)) return; mat.inverse(); @@ -1596,7 +1596,7 @@ void PartGui::TaskMeasureAngular::onSelectionChanged(const Gui::SelectionChanges assert(selections1.selections.size() == 2); assert(selections1.selections.at(0).shapeType == DimSelections::Vertex); assert(selections1.selections.at(1).shapeType == DimSelections::Vertex); - + QTimer::singleShot(0, this, SLOT(selectionClearDelayedSlot())); stepped->getButton(1)->setEnabled(true); stepped->getButton(1)->setChecked(true); @@ -1766,7 +1766,7 @@ void PartGui::TaskMeasureAngular::buildDimension(const DimSelections &sel1, cons //build adapters. VectorAdapter adapt1 = buildAdapter(sel1); VectorAdapter adapt2 = buildAdapter(sel2); - + if (!adapt1.isValid() || !adapt2.isValid()) { Base::Console().Message("\ncouldn't build adapter\n\n"); diff --git a/src/Mod/Part/Gui/TaskDimension.h b/src/Mod/Part/Gui/TaskDimension.h index 7daaeeb3b1..b5da491100 100644 --- a/src/Mod/Part/Gui/TaskDimension.h +++ b/src/Mod/Part/Gui/TaskDimension.h @@ -198,17 +198,17 @@ public: ~SteppedSelection() override; QPushButton* getButton(const uint &index); void setIconDone(const uint &index); - + protected: using ButtonIconPairType = std::pair; std::vector buttons; QPixmap *stepActive; QPixmap *stepDone; - + private Q_SLOTS: void selectionSlot(bool checked); void buildPixmaps(); - + }; /*! just convenience container*/ @@ -256,7 +256,7 @@ public: bool needsFullSpace() const override {return false;} protected: void onSelectionChanged(const Gui::SelectionChanges& msg) override; - + protected Q_SLOTS: void selection1Slot(bool checked); void selection2Slot(bool checked); @@ -281,7 +281,7 @@ private: }; /*! @brief Convert to vector - * + * * Used to construct a vector from various input types */ class VectorAdapter @@ -303,7 +303,7 @@ public: /*!Build a vector From 2 vectors. *vector will be equal to @param vector2 - @param vector1.*/ VectorAdapter(const gp_Vec &vector1, const gp_Vec &vector2); - + /*!make sure no errors in vector construction. * @return true = vector is good. false = vector is NOT good.*/ bool isValid() const {return status;} @@ -313,7 +313,7 @@ public: /*!build occ line used for extrema calculation*/ operator gp_Lin() const;//explicit bombs gp_Vec getPickPoint() const {return origin;} - + private: void projectOriginOntoVector(const gp_Vec &pickedPointIn); bool status; @@ -335,7 +335,7 @@ public: bool needsFullSpace() const override {return false;} protected: void onSelectionChanged(const Gui::SelectionChanges& msg) override; - + protected Q_SLOTS: void selection1Slot(bool checked); void selection2Slot(bool checked); diff --git a/src/Mod/Part/Gui/TaskFaceColors.h b/src/Mod/Part/Gui/TaskFaceColors.h index 5051a01da3..76eddbcf7e 100644 --- a/src/Mod/Part/Gui/TaskFaceColors.h +++ b/src/Mod/Part/Gui/TaskFaceColors.h @@ -31,7 +31,7 @@ namespace Gui { class ViewProvider; } -namespace PartGui { +namespace PartGui { class ViewProviderPartExt; diff --git a/src/Mod/Part/Gui/TaskLoft.h b/src/Mod/Part/Gui/TaskLoft.h index ea3a63ce67..c06357d0a2 100644 --- a/src/Mod/Part/Gui/TaskLoft.h +++ b/src/Mod/Part/Gui/TaskLoft.h @@ -29,7 +29,7 @@ class QTreeWidgetItem; -namespace PartGui { +namespace PartGui { class LoftWidget : public QWidget { diff --git a/src/Mod/Part/Gui/TaskOffset.h b/src/Mod/Part/Gui/TaskOffset.h index f53030a40d..8ff7b52235 100644 --- a/src/Mod/Part/Gui/TaskOffset.h +++ b/src/Mod/Part/Gui/TaskOffset.h @@ -28,7 +28,7 @@ #include namespace Part { class Offset; } -namespace PartGui { +namespace PartGui { class OffsetWidget : public QWidget { diff --git a/src/Mod/Part/Gui/TaskShapeBuilder.h b/src/Mod/Part/Gui/TaskShapeBuilder.h index 2bb7a9e27a..e0c4429272 100644 --- a/src/Mod/Part/Gui/TaskShapeBuilder.h +++ b/src/Mod/Part/Gui/TaskShapeBuilder.h @@ -28,7 +28,7 @@ #include -namespace PartGui { +namespace PartGui { class ShapeBuilderWidget : public QWidget, public Gui::SelectionObserver diff --git a/src/Mod/Part/Gui/TaskSweep.cpp b/src/Mod/Part/Gui/TaskSweep.cpp index 4623e0de18..25fbf8d4f4 100644 --- a/src/Mod/Part/Gui/TaskSweep.cpp +++ b/src/Mod/Part/Gui/TaskSweep.cpp @@ -205,7 +205,7 @@ void SweepWidget::findShapes() shape.ShapeType() == TopAbs_VERTEX) { QString label = QString::fromUtf8((*it)->Label.getValue()); QString name = QString::fromLatin1((*it)->getNameInDocument()); - + QTreeWidgetItem* child = new QTreeWidgetItem(); child->setText(0, label); child->setToolTip(0, label); diff --git a/src/Mod/Part/Gui/TaskSweep.h b/src/Mod/Part/Gui/TaskSweep.h index b4051e226e..b4423686a0 100644 --- a/src/Mod/Part/Gui/TaskSweep.h +++ b/src/Mod/Part/Gui/TaskSweep.h @@ -33,7 +33,7 @@ namespace Gui { class SelectionObject; class StatusWidget; } -namespace PartGui { +namespace PartGui { class SweepWidget : public QWidget { diff --git a/src/Mod/Part/Gui/TaskThickness.cpp b/src/Mod/Part/Gui/TaskThickness.cpp index 41ceb30f88..859fef4c07 100644 --- a/src/Mod/Part/Gui/TaskThickness.cpp +++ b/src/Mod/Part/Gui/TaskThickness.cpp @@ -223,9 +223,9 @@ bool ThicknessWidget::accept() Gui::cmdAppObjectArgs(d->thickness, "Value = %f", d->ui.spinOffset->value().getValue()); Gui::cmdAppObjectArgs(d->thickness, "Mode = %i", d->ui.modeType->currentIndex()); Gui::cmdAppObjectArgs(d->thickness, "Join = %i", d->ui.joinType->currentIndex()); - Gui::cmdAppObjectArgs(d->thickness, "Intersection = %s", + Gui::cmdAppObjectArgs(d->thickness, "Intersection = %s", d->ui.intersection->isChecked() ? "True" : "False"); - Gui::cmdAppObjectArgs(d->thickness, "SelfIntersection = %s", + Gui::cmdAppObjectArgs(d->thickness, "SelfIntersection = %s", d->ui.selfIntersection->isChecked() ? "True" : "False"); Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.recompute()"); diff --git a/src/Mod/Part/Gui/TaskThickness.h b/src/Mod/Part/Gui/TaskThickness.h index 6cb6fa5279..515dca7b44 100644 --- a/src/Mod/Part/Gui/TaskThickness.h +++ b/src/Mod/Part/Gui/TaskThickness.h @@ -28,7 +28,7 @@ #include namespace Part { class Thickness; } -namespace PartGui { +namespace PartGui { class ThicknessWidget : public QWidget { diff --git a/src/Mod/Part/Gui/ViewProviderBoolean.cpp b/src/Mod/Part/Gui/ViewProviderBoolean.cpp index 34bb110c64..321f7f9dab 100644 --- a/src/Mod/Part/Gui/ViewProviderBoolean.cpp +++ b/src/Mod/Part/Gui/ViewProviderBoolean.cpp @@ -147,7 +147,7 @@ void ViewProviderBoolean::updateData(const App::Property* prop) bool ViewProviderBoolean::onDelete(const std::vector &) { // get the input shapes - Part::Boolean* pBool = static_cast(getObject()); + Part::Boolean* pBool = static_cast(getObject()); App::DocumentObject *pBase = pBool->Base.getValue(); App::DocumentObject *pTool = pBool->Tool.getValue(); @@ -203,7 +203,7 @@ void ViewProviderMultiFuse::updateData(const App::Property* prop) if (!objBase) continue; const TopoDS_Shape& baseShape = objBase->Shape.getValue(); - + TopTools_IndexedMapOfShape baseMap; TopExp::MapShapes(baseShape, TopAbs_FACE, baseMap); @@ -340,7 +340,7 @@ void ViewProviderMultiCommon::updateData(const App::Property* prop) if (!objBase) continue; const TopoDS_Shape& baseShape = objBase->Shape.getValue(); - + TopTools_IndexedMapOfShape baseMap; TopExp::MapShapes(baseShape, TopAbs_FACE, baseMap); diff --git a/src/Mod/Part/Gui/ViewProviderBoolean.h b/src/Mod/Part/Gui/ViewProviderBoolean.h index 996496a1e6..b5f048baf2 100644 --- a/src/Mod/Part/Gui/ViewProviderBoolean.h +++ b/src/Mod/Part/Gui/ViewProviderBoolean.h @@ -39,7 +39,7 @@ public: /// destructor ~ViewProviderBoolean() override; - /// grouping handling + /// grouping handling std::vector claimChildren() const override; QIcon getIcon() const override; void updateData(const App::Property*) override; @@ -57,7 +57,7 @@ public: /// destructor ~ViewProviderMultiFuse() override; - /// grouping handling + /// grouping handling std::vector claimChildren() const override; QIcon getIcon() const override; void updateData(const App::Property*) override; @@ -83,7 +83,7 @@ public: /// destructor ~ViewProviderMultiCommon() override; - /// grouping handling + /// grouping handling std::vector claimChildren() const override; QIcon getIcon() const override; void updateData(const App::Property*) override; diff --git a/src/Mod/Part/Gui/ViewProviderConeParametric.cpp b/src/Mod/Part/Gui/ViewProviderConeParametric.cpp index 9cbd9831cc..014490ffa6 100644 --- a/src/Mod/Part/Gui/ViewProviderConeParametric.cpp +++ b/src/Mod/Part/Gui/ViewProviderConeParametric.cpp @@ -33,7 +33,7 @@ using namespace std; PROPERTY_SOURCE(PartGui::ViewProviderConeParametric, PartGui::ViewProviderPrimitive) - + ViewProviderConeParametric::ViewProviderConeParametric() { sPixmap = "Part_Cone_Parametric"; diff --git a/src/Mod/Part/Gui/ViewProviderCurveNet.cpp b/src/Mod/Part/Gui/ViewProviderCurveNet.cpp index 37c4de96bd..f1dc6e2763 100644 --- a/src/Mod/Part/Gui/ViewProviderCurveNet.cpp +++ b/src/Mod/Part/Gui/ViewProviderCurveNet.cpp @@ -56,7 +56,7 @@ using namespace PartGui; PROPERTY_SOURCE(PartGui::ViewProviderCurveNet,PartGui::ViewProviderPart) - + ViewProviderCurveNet::ViewProviderCurveNet() : bInEdit(false),bMovePointMode(false),EdgeRoot(nullptr),VertexRoot(nullptr) { @@ -86,8 +86,8 @@ void ViewProviderCurveNet::attach(App::DocumentObject *pcFeat) SoSeparator* ModeRoot = new SoSeparator(); EdgeRoot = new SoSeparator(); ModeRoot->addChild(EdgeRoot); - EdgeRoot->addChild(pcLineStyle); - EdgeRoot->addChild(pcLineMaterial); + EdgeRoot->addChild(pcLineStyle); + EdgeRoot->addChild(pcLineMaterial); // setup the root and material for the vertexes VertexRoot = new SoSeparator(); @@ -225,7 +225,7 @@ bool ViewProviderCurveNet::handleEvent(const SoEvent * const ev, Gui::View3DInve VertexRoot->addChild(TransRoot); NodeList.push_back(n); - + return true; } } @@ -246,7 +246,7 @@ bool ViewProviderCurveNet::handleEvent(const SoEvent * const ev, Gui::View3DInve // const SoLocation2Event * const event = (const SoLocation2Event *) ev; if (bMovePointMode && Viewer.pickPoint(pos,point,norm) ){ - PointToMove.pcTransform->translation.setValue(point); + PointToMove.pcTransform->translation.setValue(point); return true; } } @@ -263,8 +263,8 @@ Standard_Boolean ViewProviderCurveNet::computeEdges(SoSeparator* root, const Top SoSeparator *EdgeRoot = new SoSeparator(); root->addChild(EdgeRoot); - EdgeRoot->addChild(pcLineStyle); - EdgeRoot->addChild(pcLineMaterial); + EdgeRoot->addChild(pcLineStyle); + EdgeRoot->addChild(pcLineMaterial); for (ex.Init(myShape, TopAbs_EDGE); ex.More(); ex.Next()) { @@ -314,7 +314,7 @@ Standard_Boolean ViewProviderCurveNet::computeVertices(SoSeparator* root, const for (ex.Init(myShape, TopAbs_VERTEX); ex.More(); ex.Next()) { - // get the shape + // get the shape const TopoDS_Vertex& aVertex = TopoDS::Vertex(ex.Current()); gp_Pnt gpPt = BRep_Tool::Pnt (aVertex); diff --git a/src/Mod/Part/Gui/ViewProviderExt.cpp b/src/Mod/Part/Gui/ViewProviderExt.cpp index 467de2c505..4b1761d6e7 100644 --- a/src/Mod/Part/Gui/ViewProviderExt.cpp +++ b/src/Mod/Part/Gui/ViewProviderExt.cpp @@ -108,7 +108,7 @@ App::PropertyQuantityConstraint::Constraints ViewProviderPartExt::angDeflectionR const char* ViewProviderPartExt::LightingEnums[]= {"One side","Two side",nullptr}; const char* ViewProviderPartExt::DrawStyleEnums[]= {"Solid","Dashed","Dotted","Dashdot",nullptr}; -ViewProviderPartExt::ViewProviderPartExt() +ViewProviderPartExt::ViewProviderPartExt() { VisualTouched = true; forceUpdateCount = 0; @@ -119,12 +119,12 @@ ViewProviderPartExt::ViewProviderPartExt() float lr,lg,lb; lr = ((lcol >> 24) & 0xff) / 255.0; lg = ((lcol >> 16) & 0xff) / 255.0; lb = ((lcol >> 8) & 0xff) / 255.0; // get default vertex color - unsigned long vcol = Gui::ViewParams::instance()->getDefaultShapeVertexColor(); + unsigned long vcol = Gui::ViewParams::instance()->getDefaultShapeVertexColor(); float vr,vg,vb; vr = ((vcol >> 24) & 0xff) / 255.0; vg = ((vcol >> 16) & 0xff) / 255.0; vb = ((vcol >> 8) & 0xff) / 255.0; int lwidth = Gui::ViewParams::instance()->getDefaultShapeLineWidth(); int psize = Gui::ViewParams::instance()->getDefaultShapePointSize(); - + ParameterGrp::handle hPart = App::GetApplication().GetParameterGroupByPath @@ -155,8 +155,8 @@ ViewProviderPartExt::ViewProviderPartExt() vmat.specularColor.set(0.0f,0.0f,0.0f); vmat.emissiveColor.set(0.0f,0.0f,0.0f); vmat.shininess = 1.0f; - vmat.transparency = 0.0f; - + vmat.transparency = 0.0f; + ADD_PROPERTY_TYPE(LineMaterial,(lmat), osgroup, App::Prop_None, "Object line material."); ADD_PROPERTY_TYPE(PointMaterial,(vmat), osgroup, App::Prop_None, "Object point material."); ADD_PROPERTY_TYPE(LineColor, (lmat.diffuseColor), osgroup, App::Prop_None, "Set object line color."); @@ -256,13 +256,13 @@ void ViewProviderPartExt::onChanged(const App::Property* prop) // to freeze the GUI // https://forum.freecadweb.org/viewtopic.php?f=3&t=24912&p=195613 if (prop == &Deviation) { - if(isUpdateForced()||Visibility.getValue()) + if(isUpdateForced()||Visibility.getValue()) updateVisual(); else VisualTouched = true; } if (prop == &AngularDeflection) { - if(isUpdateForced()||Visibility.getValue()) + if(isUpdateForced()||Visibility.getValue()) updateVisual(); else VisualTouched = true; @@ -834,7 +834,7 @@ bool ViewProviderPartExt::loadParameter() void ViewProviderPartExt::reload() { - if (loadParameter()) + if (loadParameter()) updateVisual(); } @@ -845,11 +845,11 @@ void ViewProviderPartExt::updateData(const App::Property* prop) // calculate the visual only if visible if (isUpdateForced() || Visibility.getValue()) updateVisual(); - else + else VisualTouched = true; if (!VisualTouched) { - if (this->faceset->partIndex.getNum() > + if (this->faceset->partIndex.getNum() > this->pcShapeMaterial->diffuseColor.getNum()) { this->pcFaceBind->value = SoMaterialBinding::OVERALL; } @@ -1074,7 +1074,7 @@ void ViewProviderPartExt::updateVisual() #endif if (NormalsFromUV) Part::Tools::getPointNormals(actFace, mesh, Normals); - + for (int g=1;g<=nbTriInFace;g++) { // Get the triangle Standard_Integer N1,N2,N3; @@ -1155,12 +1155,12 @@ void ViewProviderPartExt::updateVisual() edgeVector.push_back((int32_t)edgeIndex-1); // already processed this index ? if (edgeIdxSet.find(edgeIndex)!=edgeIdxSet.end()) { - + // this holds the indices of the edge's triangulation to the current polygon Handle(Poly_PolygonOnTriangulation) aPoly = BRep_Tool::PolygonOnTriangulation(curEdge, mesh, aLoc); if (aPoly.IsNull()) continue; // polygon does not exist - + // getting the indexes of the edge polygon const TColStd_Array1OfInteger& indices = aPoly->Nodes(); for (Standard_Integer i=indices.Lower();i <= indices.Upper();i++) { @@ -1189,7 +1189,7 @@ void ViewProviderPartExt::updateVisual() } edgeVector.push_back(-1); - + // counting up the per Face offsets faceNodeOffset += nbNodesInFace; faceTriaOffset += nbTriInFace; @@ -1237,10 +1237,10 @@ void ViewProviderPartExt::updateVisual() verts[faceNodeOffset+i].setValue((float)(pnt.X()),(float)(pnt.Y()),(float)(pnt.Z())); } - // normalize all normals + // normalize all normals for (int i = 0; i< numNorms ;i++) norms[i].normalize(); - + std::vector lineSetCoords; for (std::map >::iterator it = lineSetMap.begin(); it != lineSetMap.end(); ++it) { lineSetCoords.insert(lineSetCoords.end(), it->second.begin(), it->second.end()); diff --git a/src/Mod/Part/Gui/ViewProviderExt.h b/src/Mod/Part/Gui/ViewProviderExt.h index d7a63cb2b0..01b75aaa2a 100644 --- a/src/Mod/Part/Gui/ViewProviderExt.h +++ b/src/Mod/Part/Gui/ViewProviderExt.h @@ -129,7 +129,7 @@ public: void unsetHighlightedPoints(); //@} - /** @name Color management methods + /** @name Color management methods */ //@{ std::map getElementColors(const char *element=nullptr) const override; diff --git a/src/Mod/Part/Gui/ViewProviderExtrusion.h b/src/Mod/Part/Gui/ViewProviderExtrusion.h index 0468c357e1..d8e2816e0b 100644 --- a/src/Mod/Part/Gui/ViewProviderExtrusion.h +++ b/src/Mod/Part/Gui/ViewProviderExtrusion.h @@ -39,7 +39,7 @@ public: /// destructor ~ViewProviderExtrusion() override; - /// grouping handling + /// grouping handling std::vector claimChildren(void)const override; }; diff --git a/src/Mod/Part/Gui/ViewProviderMirror.cpp b/src/Mod/Part/Gui/ViewProviderMirror.cpp index ed9bb368e8..d9287b8ea5 100644 --- a/src/Mod/Part/Gui/ViewProviderMirror.cpp +++ b/src/Mod/Part/Gui/ViewProviderMirror.cpp @@ -184,7 +184,7 @@ std::vector ViewProviderMirror::claimChildren() const bool ViewProviderMirror::onDelete(const std::vector &) { // get the input shape - Part::Mirroring* pMirroring = static_cast(getObject()); + Part::Mirroring* pMirroring = static_cast(getObject()); App::DocumentObject *pSource = pMirroring->Source.getValue(); if (pSource) Gui::Application::Instance->showViewProvider(pSource); @@ -321,7 +321,7 @@ std::vector ViewProviderFillet::claimChildren() const bool ViewProviderFillet::onDelete(const std::vector &) { // get the input shape - Part::Fillet* pFillet = static_cast(getObject()); + Part::Fillet* pFillet = static_cast(getObject()); App::DocumentObject *pBase = pFillet->Base.getValue(); if (pBase) Gui::Application::Instance->showViewProvider(pBase); @@ -433,7 +433,7 @@ std::vector ViewProviderChamfer::claimChildren() const bool ViewProviderChamfer::onDelete(const std::vector &) { // get the input shape - Part::Chamfer* pChamfer = static_cast(getObject()); + Part::Chamfer* pChamfer = static_cast(getObject()); App::DocumentObject *pBase = pChamfer->Base.getValue(); if (pBase) Gui::Application::Instance->showViewProvider(pBase); @@ -464,7 +464,7 @@ std::vector ViewProviderRevolution::claimChildren() const bool ViewProviderRevolution::onDelete(const std::vector &) { // get the input shape - Part::Revolution* pRevolve = static_cast(getObject()); + Part::Revolution* pRevolve = static_cast(getObject()); App::DocumentObject *pBase = pRevolve->Source.getValue(); if (pBase) Gui::Application::Instance->showViewProvider(pBase); @@ -592,7 +592,7 @@ std::vector ViewProviderOffset::claimChildren() const bool ViewProviderOffset::onDelete(const std::vector &) { // get the support and Sketch - Part::Offset* offset = static_cast(getObject()); + Part::Offset* offset = static_cast(getObject()); App::DocumentObject* source = offset->Source.getValue(); if (source){ Gui::Application::Instance->getViewProvider(source)->show(); @@ -676,7 +676,7 @@ std::vector ViewProviderThickness::claimChildren() const bool ViewProviderThickness::onDelete(const std::vector &) { // get the support and Sketch - Part::Thickness* thickness = static_cast(getObject()); + Part::Thickness* thickness = static_cast(getObject()); App::DocumentObject* source = thickness->Faces.getValue(); if (source){ Gui::Application::Instance->getViewProvider(source)->show(); diff --git a/src/Mod/Part/Gui/ViewProviderMirror.h b/src/Mod/Part/Gui/ViewProviderMirror.h index 11ad437455..bf68790d1b 100644 --- a/src/Mod/Part/Gui/ViewProviderMirror.h +++ b/src/Mod/Part/Gui/ViewProviderMirror.h @@ -41,7 +41,7 @@ public: void setupContextMenu(QMenu*, QObject*, const char*) override; std::vector claimChildren() const override; bool onDelete(const std::vector &) override; - + protected: bool setEdit(int ModNum) override; void unsetEdit(int ModNum) override; @@ -108,7 +108,7 @@ public: /// destructor ~ViewProviderRevolution() override; - /// grouping handling + /// grouping handling std::vector claimChildren()const override; bool onDelete(const std::vector &) override; }; @@ -123,7 +123,7 @@ public: /// destructor ~ViewProviderLoft() override; - /// grouping handling + /// grouping handling std::vector claimChildren()const override; bool onDelete(const std::vector &) override; }; @@ -138,7 +138,7 @@ public: /// destructor ~ViewProviderSweep() override; - /// grouping handling + /// grouping handling std::vector claimChildren()const override; bool onDelete(const std::vector &) override; }; @@ -153,7 +153,7 @@ public: /// destructor ~ViewProviderOffset() override; - /// grouping handling + /// grouping handling std::vector claimChildren()const override; void setupContextMenu(QMenu*, QObject*, const char*) override; bool onDelete(const std::vector &) override; @@ -183,7 +183,7 @@ public: /// destructor ~ViewProviderThickness() override; - /// grouping handling + /// grouping handling std::vector claimChildren()const override; void setupContextMenu(QMenu*, QObject*, const char*) override; bool onDelete(const std::vector &) override; diff --git a/src/Mod/Part/Gui/ViewProviderRegularPolygon.cpp b/src/Mod/Part/Gui/ViewProviderRegularPolygon.cpp index f2e33549fd..c72fc5acb9 100644 --- a/src/Mod/Part/Gui/ViewProviderRegularPolygon.cpp +++ b/src/Mod/Part/Gui/ViewProviderRegularPolygon.cpp @@ -33,7 +33,7 @@ using namespace std; PROPERTY_SOURCE(PartGui::ViewProviderRegularPolygon, PartGui::ViewProviderPrimitive) - + ViewProviderRegularPolygon::ViewProviderRegularPolygon() { sPixmap = "Part_Polygon_Parametric"; diff --git a/src/Mod/Part/Gui/ViewProviderRuledSurface.cpp b/src/Mod/Part/Gui/ViewProviderRuledSurface.cpp index 6e76556cdf..b8d8e7d885 100644 --- a/src/Mod/Part/Gui/ViewProviderRuledSurface.cpp +++ b/src/Mod/Part/Gui/ViewProviderRuledSurface.cpp @@ -66,11 +66,11 @@ void ViewProviderRuledSurface::updateData(const App::Property* prop) //const std::vector& hist = static_cast // (prop)->getValues(); } - /* //The following hides the Children shapes. If the edges from which the Ruled Surface was created - * were selected from the subshapes of another shape, it is likely that one would not want to hide the shape + /* //The following hides the Children shapes. If the edges from which the Ruled Surface was created + * were selected from the subshapes of another shape, it is likely that one would not want to hide the shape * hence this section is commented out - Part::RuledSurface* pRuledSurface = static_cast(getObject()); - App::DocumentObject *pCurve1 = pRuledSurface->Curve1.getValue(); + Part::RuledSurface* pRuledSurface = static_cast(getObject()); + App::DocumentObject *pCurve1 = pRuledSurface->Curve1.getValue(); App::DocumentObject *pCurve2 = pRuledSurface->Curve2.getValue(); if (pCurve1) Gui::Application::Instance->hideViewProvider(pCurve1); @@ -78,12 +78,12 @@ void ViewProviderRuledSurface::updateData(const App::Property* prop) Gui::Application::Instance->hideViewProvider(pCurve2);*/ } - + bool ViewProviderRuledSurface::onDelete(const std::vector &) { // get the input shape - Part::RuledSurface* pRuledSurface = static_cast(getObject()); - App::DocumentObject *pCurve1 = pRuledSurface->Curve1.getValue(); + Part::RuledSurface* pRuledSurface = static_cast(getObject()); + App::DocumentObject *pCurve1 = pRuledSurface->Curve1.getValue(); App::DocumentObject *pCurve2 = pRuledSurface->Curve2.getValue(); if (pCurve1) Gui::Application::Instance->showViewProvider(pCurve1); diff --git a/src/Mod/Part/Gui/Workbench.h b/src/Mod/Part/Gui/Workbench.h index 22723bb99e..7c2134ab48 100644 --- a/src/Mod/Part/Gui/Workbench.h +++ b/src/Mod/Part/Gui/Workbench.h @@ -49,4 +49,4 @@ protected: } // namespace PartGui -#endif // PART_WORKBENCH_H +#endif // PART_WORKBENCH_H diff --git a/src/Mod/Part/Init.py b/src/Mod/Part/Init.py index a0ba689b53..0a4ff26c8c 100644 --- a/src/Mod/Part/Init.py +++ b/src/Mod/Part/Init.py @@ -1,8 +1,8 @@ -# FreeCAD init script of the part module +# FreeCAD init script of the part module # (c) 2001 Juergen Riegel #*************************************************************************** -#* (c) Juergen Riegel (juergen.riegel@web.de) 2002 * +#* (c) Juergen Riegel (juergen.riegel@web.de) 2002 * #* * #* This file is part of the FreeCAD CAx development system. * #* * @@ -13,12 +13,12 @@ #* 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 * #* * diff --git a/src/Mod/Part/TestPartGui.py b/src/Mod/Part/TestPartGui.py index 9fe980ed69..2f64b82d29 100644 --- a/src/Mod/Part/TestPartGui.py +++ b/src/Mod/Part/TestPartGui.py @@ -37,7 +37,7 @@ import FreeCAD, FreeCADGui, os, sys, unittest, Part, PartGui # self.Box.addGeometry(Part.LineSegment(App.Vector(69.432587,36.960674,0),App.Vector(69.432587,-53.196629,0))) # self.Box.addGeometry(Part.LineSegment(App.Vector(69.432587,-53.196629,0),App.Vector(-99.230339,-53.196629,0))) # self.Box.addGeometry(Part.LineSegment(App.Vector(-99.230339,-53.196629,0),App.Vector(-99.230339,36.960674,0))) -# +# # def tearDown(self): # #closing doc # FreeCAD.closeDocument("PartGuiTest")