diff --git a/src/app/command_driver.rs b/src/app/command_driver.rs
index 2fa61e4f6..16be1a02c 100644
--- a/src/app/command_driver.rs
+++ b/src/app/command_driver.rs
@@ -4650,7 +4650,7 @@ impl OpenCADStudio {
let valid_handles:Vec<_>=sources.keys().copied().collect();
self.tabs[i].scene.edit_hatch_boundary_handles(handle,&valid_handles,true);
}
- HatchEditOperation::RecreateBoundary { associate } => {
+ HatchEditOperation::RecreateBoundary { associate, region } => {
let source = self.tabs[i].scene.document.get_entity(handle).cloned();
if let Some(acadrust::EntityType::Hatch(source)) = source {
let storage = crate::entities::curve::ocs_plane(
@@ -4662,8 +4662,20 @@ impl OpenCADStudio {
glam::DVec3::from_array(storage.x_axis),
glam::DVec3::from_array(storage.y_axis),
);
- let rings = crate::scene::hatch_boundary_rings(&source);
- let entities = crate::scene::boundary_entities(&rings, plane);
+ let entities = if region {
+ let entities = source.paths.iter().map(|path| {
+ let curves = path.edges.iter().map(crate::entities::hatch::edge_curve).collect::