Extrude a region's exact boundary loop as a surface

A region of several edges kept its display wires one per edge, so the
surface extrusion found no polygon and refused it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
ramox81andClaude Opus 5.5 committed 2026-10-09 18:03:44 +03:00
1 parent 37a9e5775d
commit 2192baba02
1 file changed
+5 -2
+5 -2
View File
@@ -291,8 +291,11 @@ pub fn extruded_surface(
direction: [f64; 3],
taper_angle: f64,
) -> Option<Body> {
if matches!(entity, EntityType::Region(region) if region.wires.len() > 1) {
return None;
// A region's surface is its one boundary loop, read from its exact edges.
if let EntityType::Region(_) = entity {
let (plane, loops, _) = super::presspull_model::profile_geometry(entity)?;
let [boundary] = loops.as_slice() else { return None };
return brep::extrude_surface_tapered(plane, boundary, direction, taper_angle);
}
let (profile, _) = extrusion_profile_of(entity)?;
brep::extrude_surface_tapered(