Allow open wires in Part::getProfileNormal

This commit is contained in:
theo-vt
2025-07-02 08:50:12 -04:00
committed by Chris Hennes
parent 401d9ae4e3
commit a933c22dad
2 changed files with 4 additions and 3 deletions

View File

@@ -1352,7 +1352,7 @@ TopoShape Feature::simplifyCompound(TopoShape compoundShape)
TopAbs_COMPSOLID,
TopAbs_FACE,
TopAbs_SHELL,
TopAbs_SHELL,
TopAbs_EDGE,
TopAbs_WIRE,
TopAbs_VERTEX};

View File

@@ -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<Part::Part2DObject>()) {
@@ -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)) {