diff --git a/src/Mod/Part/App/ExtrusionHelper.cpp b/src/Mod/Part/App/ExtrusionHelper.cpp index 449c580e50..4529b1960d 100644 --- a/src/Mod/Part/App/ExtrusionHelper.cpp +++ b/src/Mod/Part/App/ExtrusionHelper.cpp @@ -406,7 +406,7 @@ void ExtrusionHelper::checkInnerWires(std::vector& isInnerWire, const gp_D // recursively call the function until all wires are checked if (numCheckWires > 1) checkInnerWires(isInnerWire, direction, checklist, !forInner, prisms); -}; +} void ExtrusionHelper::createTaperedPrismOffset(TopoDS_Wire sourceWire, const gp_Vec& translation, @@ -452,11 +452,9 @@ void ExtrusionHelper::createTaperedPrismOffset(TopoDS_Wire sourceWire, } catch (const Base::Exception& e) { throw Base::RuntimeError(e.what()); - result = TopoDS_Wire(); } if (!mkOffset.IsDone()) { Standard_Failure::Raise("Extrusion: Offset could not be created"); - result = TopoDS_Wire(); } if (numEdges == 1) { // we need to move the offset wire first back to its original position diff --git a/src/Mod/Part/App/GeometrySurfacePyImp.cpp b/src/Mod/Part/App/GeometrySurfacePyImp.cpp index 4b4fa9edd5..a9ea99ea3f 100644 --- a/src/Mod/Part/App/GeometrySurfacePyImp.cpp +++ b/src/Mod/Part/App/GeometrySurfacePyImp.cpp @@ -238,9 +238,6 @@ PyObject* GeometrySurfacePy::getDN(PyObject *args) PyErr_SetString(PartExceptionOCCError, e.GetMessageString()); return nullptr; } - - PyErr_SetString(PartExceptionOCCError, "Geometry is not a surface"); - return nullptr; } PyObject* GeometrySurfacePy::value(PyObject *args) diff --git a/src/Mod/Part/App/Tools.cpp b/src/Mod/Part/App/Tools.cpp index 8c65fa75f0..286c3fb194 100644 --- a/src/Mod/Part/App/Tools.cpp +++ b/src/Mod/Part/App/Tools.cpp @@ -663,7 +663,7 @@ Handle(Poly_Polygon3D) Part::Tools::polygonOfEdge(const TopoDS_Edge& edge, TopLo // helper function to use in getNormal, here we pass the local properties // of the surface given by the #LProp_SLProps objects template -void getNormalBySLProp(T prop, double u, double v, Standard_Real lastU, Standard_Real lastV, +void getNormalBySLProp(T& prop, double u, double v, Standard_Real lastU, Standard_Real lastV, const Standard_Real tol, gp_Dir& dir, Standard_Boolean& done) { if (prop.D1U().Magnitude() > tol && diff --git a/src/Mod/Part/Gui/DlgProjectionOnSurface.cpp b/src/Mod/Part/Gui/DlgProjectionOnSurface.cpp index 24293c0e1e..e892cb2392 100644 --- a/src/Mod/Part/Gui/DlgProjectionOnSurface.cpp +++ b/src/Mod/Part/Gui/DlgProjectionOnSurface.cpp @@ -195,7 +195,12 @@ DlgProjectionOnSurface::~DlgProjectionOnSurface() } for (auto it : m_shapeVec) { - higlight_object(it.partFeature, it.partName, false, 0); + try { + higlight_object(it.partFeature, it.partName, false, 0); + } + catch (Standard_NoSuchObject& e) { + Base::Console().Warning("DlgProjectionOnSurface::~DlgProjectionOnSurface: %s", e.GetMessageString()); + } } Gui::Selection().rmvSelectionGate(); } diff --git a/src/Mod/Part/Gui/SectionCutting.cpp b/src/Mod/Part/Gui/SectionCutting.cpp index fea27450ad..c157fe5228 100644 --- a/src/Mod/Part/Gui/SectionCutting.cpp +++ b/src/Mod/Part/Gui/SectionCutting.cpp @@ -247,7 +247,7 @@ void SectionCut::startCutting(bool isInitial) // refresh documents list onRefreshCutPBclicked(); - App::DocumentObject* anObject; + App::DocumentObject* anObject = nullptr; std::vector::iterator it; // lambda function to delete objects diff --git a/src/Mod/Part/Gui/TaskAttacher.cpp b/src/Mod/Part/Gui/TaskAttacher.cpp index 0c7273c858..32951d4525 100644 --- a/src/Mod/Part/Gui/TaskAttacher.cpp +++ b/src/Mod/Part/Gui/TaskAttacher.cpp @@ -119,6 +119,7 @@ TaskAttacher::TaskAttacher(Gui::ViewProviderDocumentObject *ViewProvider, QWidge , ViewProvider(ViewProvider) , ui(new Ui_TaskAttacher) , visibilityFunc(visFunc) + , completed(false) { //check if we are attachable if (!ViewProvider->getObject()->hasExtension(Part::AttachExtension::getExtensionClassTypeId()))