From a933c22dadf61cf8e9195895d4e230a807c8fc80 Mon Sep 17 00:00:00 2001 From: theo-vt Date: Wed, 2 Jul 2025 08:50:12 -0400 Subject: [PATCH] Allow open wires in Part::getProfileNormal --- src/Mod/Part/App/PartFeature.cpp | 2 +- src/Mod/PartDesign/App/FeatureSketchBased.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Mod/Part/App/PartFeature.cpp b/src/Mod/Part/App/PartFeature.cpp index 5ec7a459fa..f219d3ff1a 100644 --- a/src/Mod/Part/App/PartFeature.cpp +++ b/src/Mod/Part/App/PartFeature.cpp @@ -1352,7 +1352,7 @@ TopoShape Feature::simplifyCompound(TopoShape compoundShape) TopAbs_COMPSOLID, TopAbs_FACE, TopAbs_SHELL, - TopAbs_SHELL, + TopAbs_EDGE, TopAbs_WIRE, TopAbs_VERTEX}; diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.cpp b/src/Mod/PartDesign/App/FeatureSketchBased.cpp index 761519429b..ea308e4c70 100644 --- a/src/Mod/PartDesign/App/FeatureSketchBased.cpp +++ b/src/Mod/PartDesign/App/FeatureSketchBased.cpp @@ -1239,8 +1239,9 @@ Base::Vector3d ProfileBased::getProfileNormal() const { Base::Vector3d SketchVector(0, 0, 1); auto obj = getVerifiedObject(true); - if (!obj) + if (!obj) { return SketchVector; + } // get the Sketch plane if (obj->isDerivedFrom()) { @@ -1252,7 +1253,7 @@ Base::Vector3d ProfileBased::getProfileNormal() const { // For newer version, do not do fitting, as it may flip the face normal for // some reason. - TopoShape shape = getTopoShapeVerifiedFace(true); //, _ProfileBasedVersion.getValue() <= 0); + TopoShape shape = getTopoShapeVerifiedFace(true, true, true); //, _ProfileBasedVersion.getValue() <= 0); gp_Pln pln; if (shape.findPlane(pln)) {