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:
@@ -125,7 +125,12 @@ MeasureType Measurement::findType()
|
||||
for (; obj != objects.end(); ++obj, ++subEl) {
|
||||
TopoDS_Shape refSubShape;
|
||||
try {
|
||||
refSubShape = Part::Feature::getShape(*obj, (*subEl).c_str(), true);
|
||||
refSubShape = Part::Feature::getShape(*obj,
|
||||
Part::ShapeOption::NeedSubElement
|
||||
| Part::ShapeOption::ResolveLink
|
||||
| Part::ShapeOption::Transform,
|
||||
(*subEl).c_str());
|
||||
|
||||
if (refSubShape.IsNull()) {
|
||||
return MeasureType::Invalid;
|
||||
}
|
||||
@@ -751,7 +756,12 @@ bool Measurement::planesAreParallel() const
|
||||
for (size_t i = 0; i < objects.size(); ++i) {
|
||||
TopoDS_Shape refSubShape;
|
||||
try {
|
||||
refSubShape = Part::Feature::getShape(objects[i], subElements[i].c_str(), true);
|
||||
refSubShape = Part::Feature::getShape(objects[i],
|
||||
Part::ShapeOption::NeedSubElement
|
||||
| Part::ShapeOption::ResolveLink
|
||||
| Part::ShapeOption::Transform,
|
||||
subElements[i].c_str());
|
||||
|
||||
if (refSubShape.IsNull()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user