Part: FaceMakerRing from RealThunder's branch.

Co-authored-by: Zheng Lei <realthunder.dev@gmail.com>
Co-authored-by: Pierre-Louis Boyer <pierrelouis.boyer@gmail.com>
This commit is contained in:
paddle
2025-06-12 09:57:27 +02:00
committed by Chris Hennes
parent c1d17bcc6b
commit 24efbf4234
4 changed files with 302 additions and 63 deletions

View File

@@ -474,16 +474,18 @@ Part::TopoShape SketchObject::buildInternals(const Part::TopoShape &edges) const
joiner.getResultWires(result, "SKF");
result = result.makeElementFace(result.getSubTopoShapes(TopAbs_WIRE),
/*op*/"",
/*maker*/"Part::FaceMakerBullseye",
/*maker*/"Part::FaceMakerRing",
/*pln*/nullptr
);
}
Part::TopoShape openWires(getID(), getDocument()->getStringHasher());
joiner.getOpenWires(openWires, "SKF");
if (openWires.isNull())
if (openWires.isNull()) {
return result; // No open wires, return either face or empty toposhape
if (result.isNull())
}
if (result.isNull()) {
return openWires; // No face, but we have open wires to return as a shape
}
return result.makeElementCompound({result, openWires}); // Compound and return both
} catch (Base::Exception &e) {
FC_WARN("Failed to make face for sketch: " << e.what());