From d28391dfab329305c58421d6c3c34df41feda927 Mon Sep 17 00:00:00 2001 From: Andrea Date: Tue, 25 Feb 2025 08:49:20 +0100 Subject: [PATCH] [mod:part] fix compile warning . --- src/Mod/Sketcher/App/SketchObject.cpp | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index e881eee5e4..cfdceca3e6 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -323,7 +323,6 @@ static bool inline checkSmallEdge(const Part::TopoShape &s) { } void SketchObject::buildShape() { - // Shape.setValue(solvedSketch.toShape()); // We use the following instead to map element names std::vector shapes; @@ -4507,7 +4506,6 @@ bool SketchObject::isExternalAllowed(App::Document* pDoc, App::DocumentObject* p // Note: Checking for the body of the support doesn't work when the support are the three base // planes - // App::DocumentObject *support = this->AttachmentSupport.getValue(); Part::BodyBase* body_this = Part::BodyBase::findBodyOf(this); Part::BodyBase* body_obj = Part::BodyBase::findBodyOf(pObj); App::Part* part_this = App::Part::getPartOfObject(this); @@ -4580,7 +4578,6 @@ bool SketchObject::isCarbonCopyAllowed(App::Document* pDoc, App::DocumentObject* // Note: Checking for the body of the support doesn't work when the support are the three base // planes - // App::DocumentObject *support = this->AttachmentSupport.getValue(); Part::BodyBase* body_this = Part::BodyBase::findBodyOf(this); Part::BodyBase* body_obj = Part::BodyBase::findBodyOf(pObj); App::Part* part_this = App::Part::getPartOfObject(this); @@ -4671,8 +4668,7 @@ bool SketchObject::isCarbonCopyAllowed(App::Document* pDoc, App::DocumentObject* } int SketchObject::addSymmetric(const std::vector& geoIdList, int refGeoId, - Sketcher::PointPos refPosId /*=Sketcher::PointPos::none*/, - bool addSymmetryConstraints /*= false*/) + Sketcher::PointPos refPosId , bool addSymmetryConstraints ) { // no need to check input data validity as this is an sketchobject managed operation. Base::StateLocker lock(managedoperation, true); @@ -4714,7 +4710,7 @@ int SketchObject::addSymmetric(const std::vector& geoIdList, int refGeoId, continue; } - if (constr->Second == GeoEnum::GeoUndef /*&& constr->Third == GeoEnum::GeoUndef*/) { + if (constr->Second == GeoEnum::GeoUndef ){ if (refIsAxisAligned) { // in this case we want to keep the Vertical, Horizontal constraints // DistanceX ,and DistanceY constraints should also be possible to keep in @@ -5232,8 +5228,6 @@ std::vector SketchObject::getSymmetric(const std::vector& else if (geosym->is()) { auto* geosymaoe = static_cast(geosym); Base::Vector3d cp = geosymaoe->getCenter(); - - /*double df= geosymaoe->getFocal();*/ Base::Vector3d f1 = geosymaoe->getFocus(); Base::Vector3d sf1 = f1 + 2.0 * (refpoint - f1); @@ -5277,9 +5271,8 @@ std::vector SketchObject::getSymmetric(const std::vector& } int SketchObject::addCopy(const std::vector& geoIdList, const Base::Vector3d& displacement, - bool moveonly /*=false*/, bool clone /*=false*/, int csize /*=2*/, - int rsize /*=1*/, bool constraindisplacement /*= false*/, - double perpscale /*= 1.0*/) + bool moveonly , bool clone , int csize , int rsize , bool constraindisplacement , + double perpscale ) { // no need to check input data validity as this is an sketchobject managed operation. Base::StateLocker lock(managedoperation, true); @@ -8523,7 +8516,6 @@ void processEdge2(TopoDS_Edge& projEdge, std::vector projectShape(const TopoDS_Shape& inShape, const gp_Ax3 res.push_back(hlrToShape.Rg1LineVCompound()); } - /*if (!hlrToShape.RgNLineVCompound().IsNull()) { - res.push_back(hlrToShape.RgNLineVCompound()); - }*/ // we don't need the seams. - if (!hlrToShape.OutLineVCompound().IsNull()) { res.push_back(hlrToShape.OutLineVCompound()); } @@ -9037,10 +9025,6 @@ std::vector projectShape(const TopoDS_Shape& inShape, const gp_Ax3 res.push_back(hlrToShape.Rg1LineHCompound()); } - /*if (!hlrToShape.RgNLineHCompound().IsNull()) { - res.push_back(hlrToShape.RgNLineHCompound()); - }*/ - if (!hlrToShape.OutLineHCompound().IsNull()) { res.push_back(hlrToShape.OutLineHCompound()); } @@ -11137,7 +11121,7 @@ int SketchObject::port_reversedExternalArcs(bool justAnalyze) // no need to check input data validity as this is an sketchobject managed operation. Base::StateLocker lock(managedoperation, true); - int cntToBeAffected = 0;//==cntSuccess+cntFail + int cntToBeAffected = 0; const std::vector& vals = this->Constraints.getValues(); std::vector newVals(vals);// modifiable copy of pointers array @@ -11166,7 +11150,6 @@ int SketchObject::port_reversedExternalArcs(bool justAnalyze) if (geoId <= GeoEnum::RefExt && (posId == Sketcher::PointPos::start || posId == Sketcher::PointPos::end)) { // we are dealing with a link to an endpoint of external geom -// Part::Geometry* g = this->ExternalGeo[-geoId - 1]; Part::Geometry* g = this->ExternalGeo[-geoId - 1]; if (g->is()) { const Part::GeomArcOfCircle* segm =