Part: Remove deprecated cutFaces

This commit is contained in:
Ladislav Michl
2026-02-28 20:30:51 +01:00
committed by Benjamin Nauck
parent e12d8fd01e
commit e516eae53b
2 changed files with 0 additions and 60 deletions
-47
View File
@@ -2029,53 +2029,6 @@ PyObject* Part::FeaturePython::getPyObject()
template class PartExport FeaturePythonT<Part::Feature>;
} // namespace App
// TODO: Toponaming April 2024 Deprecated in favor of TopoShape method. Remove when possible.
std::vector<Part::cutFaces> 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<cutFaces> 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::cutTopoShapeFaces> Part::findAllFacesCutBy(
const TopoShape& shape,
const TopoShape& face,
-13
View File
@@ -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<cutFaces> findAllFacesCutBy(
const TopoDS_Shape& shape,
const TopoDS_Shape& face,
const gp_Dir& dir
);
struct cutTopoShapeFaces
{
TopoShape face;