mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-19 23:12:35 +00:00
M7c: SurfaceLoft + SurfaceFill (open skins from profiles / a boundary)
The two remaining ways to create a sheet body. SurfaceLoft skins 2+ profile sketches without end caps via a new SketchEngine::make_loft_surface — a sibling of make_loft with the ThruSections solid flag false, so no existing call site changes. SurfaceFill patches a single closed boundary wire into a smooth face with BRepOffsetAPI_MakeFilling, adding each boundary edge as a C0 constraint. Purely additive: two enum values appended to CadFeatureType, reusing the existing loft_profile_refs/loft_ruled and sketch_ref fields. No new cereal fields, recipe stays v2, golden fixture unchanged (30773). MCP surface_loft/surface_fill added as pure additions. Suite 107 cases / 1553 assertions green, including a test contrasting the open skin against the solid loft of the same profiles. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BVzKmX6Y1aEteit1HTXG4Q
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
2da75d28ca
commit
9c28be5860
@@ -378,6 +378,24 @@ TopoDS_Shape SketchEngine::make_loft(const std::vector<TopoDS_Wire>& profiles, b
|
||||
return s;
|
||||
}
|
||||
|
||||
// ponytail: sibling of make_loft that builds an open shell (sheet) instead of a solid.
|
||||
TopoDS_Shape SketchEngine::make_loft_surface(const std::vector<TopoDS_Wire>& profiles, bool ruled)
|
||||
{
|
||||
if (profiles.size() < 2)
|
||||
throw std::runtime_error("loft needs at least 2 profiles");
|
||||
BRepOffsetAPI_ThruSections loft(Standard_False /*shell, no end caps*/,
|
||||
ruled ? Standard_True : Standard_False);
|
||||
for (const TopoDS_Wire& w : profiles) {
|
||||
if (w.IsNull()) throw std::runtime_error("loft: null profile wire");
|
||||
loft.AddWire(w);
|
||||
}
|
||||
loft.Build();
|
||||
if (!loft.IsDone()) throw std::runtime_error("loft failed");
|
||||
TopoDS_Shape s = loft.Shape();
|
||||
if (s.IsNull()) throw std::runtime_error("loft produced no shape");
|
||||
return s;
|
||||
}
|
||||
|
||||
TopoDS_Shape SketchEngine::make_pocket(const TopoDS_Wire& wire, const SketchPlane& plane,
|
||||
const TopoDS_Shape& target, double depth)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user