From e516eae53b46c33790b12fb1aa86abd8096dd995 Mon Sep 17 00:00:00 2001 From: Ladislav Michl Date: Sat, 28 Feb 2026 20:30:51 +0100 Subject: [PATCH] Part: Remove deprecated cutFaces --- src/Mod/Part/App/PartFeature.cpp | 47 -------------------------------- src/Mod/Part/App/PartFeature.h | 13 --------- 2 files changed, 60 deletions(-) diff --git a/src/Mod/Part/App/PartFeature.cpp b/src/Mod/Part/App/PartFeature.cpp index 1047e5fc8a..13810ca0e0 100644 --- a/src/Mod/Part/App/PartFeature.cpp +++ b/src/Mod/Part/App/PartFeature.cpp @@ -2029,53 +2029,6 @@ PyObject* Part::FeaturePython::getPyObject() template class PartExport FeaturePythonT; } // namespace App -// TODO: Toponaming April 2024 Deprecated in favor of TopoShape method. Remove when possible. -std::vector Part::findAllFacesCutBy( - const TopoDS_Shape& shape, - const TopoDS_Shape& face, - const gp_Dir& dir -) -{ - // Find the centre of gravity of the face - GProp_GProps props; - BRepGProp::SurfaceProperties(face, props); - gp_Pnt cog = props.CentreOfMass(); - - // create a line through the centre of gravity - gp_Lin line = gce_MakeLin(cog, dir); - - // Find intersection of line with all faces of the shape - std::vector result; - BRepIntCurveSurface_Inter mkSection; - // TODO: Less precision than Confusion() should be OK? - - for (mkSection.Init(shape, line, Precision::Confusion()); mkSection.More(); mkSection.Next()) { - gp_Pnt iPnt = mkSection.Pnt(); - double dsq = cog.SquareDistance(iPnt); - - if (dsq < Precision::Confusion()) { - continue; // intersection with original face - } - - // Find out which side of the original face the intersection is on - gce_MakeDir mkDir(cog, iPnt); - if (!mkDir.IsDone()) { - continue; // some error (appears highly unlikely to happen, though...) - } - - if (mkDir.Value().IsOpposite(dir, Precision::Confusion())) { - continue; // wrong side of face (opposite to extrusion direction) - } - - cutFaces newF; - newF.face = mkSection.Face(); - newF.distsq = dsq; - result.push_back(newF); - } - - return result; -} - std::vector Part::findAllFacesCutBy( const TopoShape& shape, const TopoShape& face, diff --git a/src/Mod/Part/App/PartFeature.h b/src/Mod/Part/App/PartFeature.h index 03178f731c..e46bbd0f9a 100644 --- a/src/Mod/Part/App/PartFeature.h +++ b/src/Mod/Part/App/PartFeature.h @@ -297,19 +297,6 @@ public: * Find all faces cut by a line through the centre of gravity of a given face * Useful for the "up to face" options to pocket or pad */ -// TODO: Toponaming April 2024 Deprecated in favor of TopoShape method. Remove when possible. -struct cutFaces -{ - TopoDS_Face face; - double distsq; -}; - -// TODO: Toponaming April 2024 Deprecated in favor of TopoShape method. Remove when possible. -PartExport std::vector findAllFacesCutBy( - const TopoDS_Shape& shape, - const TopoDS_Shape& face, - const gp_Dir& dir -); struct cutTopoShapeFaces { TopoShape face;