From 2192baba0240e1f54c9951c530f868314399d427 Mon Sep 17 00:00:00 2001 From: ramox81 <184937705+ramox81@users.noreply.github.com> Date: Fri, 9 Oct 2026 18:03:44 +0300 Subject: [PATCH] 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 --- src/scene/model/sweep_model.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/scene/model/sweep_model.rs b/src/scene/model/sweep_model.rs index ac1300ad2..1fadb9183 100644 --- a/src/scene/model/sweep_model.rs +++ b/src/scene/model/sweep_model.rs @@ -291,8 +291,11 @@ pub fn extruded_surface( direction: [f64; 3], taper_angle: f64, ) -> Option { - 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(