PartDesign: Fix hole centered on point edge case (#21257)

* Light refactor of getTopoShape function

* Fix hole edge case

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update src/Mod/Part/App/PartFeature.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update src/Mod/Part/App/PartFeature.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update src/Mod/Part/App/PartFeature.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update src/Mod/Part/App/PartFeature.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Refactor simplifyCompound()

* Use Base::Flags<GetShapeOption>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Shorten enum name and move it from class scope to namespace scope

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
This commit is contained in:
theo-vt
2025-05-29 16:37:54 -04:00
committed by GitHub
parent 17e56f6570
commit 13e7952ccc
52 changed files with 449 additions and 223 deletions

View File

@@ -108,7 +108,11 @@ TopoDS_Face ProjectOnSurface::getSupportFace() const
throw Base::ValueError("Expect exactly one support face");
}
auto topoSupport = Feature::getTopoShape(support, subStrings[0].c_str(), true);
auto topoSupport = Feature::getTopoShape(support,
ShapeOption::NeedSubElement
| ShapeOption::ResolveLink
| ShapeOption::Transform,
subStrings[0].c_str());
return TopoDS::Face(topoSupport.getShape());
}
@@ -122,7 +126,11 @@ std::vector<TopoDS_Shape> ProjectOnSurface::getProjectionShapes() const
}
for (std::size_t index = 0; index < objects.size(); index++) {
auto topoSupport = Feature::getTopoShape(objects[index], subvalues[index].c_str(), true);
auto topoSupport = Feature::getTopoShape(objects[index],
ShapeOption::NeedSubElement
| ShapeOption::ResolveLink
| ShapeOption::Transform,
subvalues[index].c_str());
shapes.push_back(topoSupport.getShape());
}