Skip to content

Commit

Permalink
PD: allow non-face support for sketch based feature
Browse files Browse the repository at this point in the history
Fixes #970
  • Loading branch information
realthunder committed Apr 30, 2024
1 parent 2ce4543 commit d2b55a3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Mod/PartDesign/App/FeatureSketchBased.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,20 +486,20 @@ TopoShape ProfileBased::getSupportFace() const {
shape = Part::Feature::getTopoShape(
ref, Support.getSubValues().size() ? Support.getSubValues()[0].c_str() : "", true);
}
if (!shape.isNull()) {
if (shape.shapeType(true) != TopAbs_FACE) {
if (!shape.hasSubShape(TopAbs_FACE))
throw Base::ValueError("Null face in SketchBased::getSupportFace()!");
if (shape.shapeType(true) != TopAbs_FACE) {
if (shape.hasSubShape(TopAbs_FACE))
shape = shape.getSubTopoShape(TopAbs_FACE, 1);
}
else
shape = TopoShape();
}
if (!shape.isNull()) {
gp_Pln pln;
if (!shape.findPlane(pln))
throw Base::TypeError("No planar face in SketchBased::getSupportFace()!");

throw Base::TypeError("No planar support face");
return shape;
}
if (!sketch)
throw Base::RuntimeError("No planar support");
throw Base::RuntimeError("No planar support face");
return Feature::makeShapeFromPlane(sketch);
}

Expand Down

0 comments on commit d2b55a3

Please sign in to comment.