feat(hatch): add associative boundaries

This commit is contained in:
Hakan Seven committed 2026-08-13 23:47:50 +03:00
1 parent 3d2848021f
commit 1d2f0a09c1
10 files changed
+577 -49

No files matched your search

+10 -2
View File
@@ -625,8 +625,16 @@ impl OpenCADStudio {
.selected_entities()
.into_iter()
.map(|(handle, _)| handle)
.collect();
let new_cmd = HatchCommand::new(outlines, boundary_sources, selected);
.collect::<Vec<_>>();
let inherited = selected
.iter()
.find_map(|handle| {
let model = self.tabs[i].scene.hatches.get(handle)?.clone();
let common = self.tabs[i].scene.document.get_entity(*handle)?.common();
Some((model, common.color.clone(), common.transparency))
});
let new_cmd =
HatchCommand::new(outlines, boundary_sources, selected, inherited);
self.command_line.push_info(&new_cmd.prompt());
self.tabs[i].active_cmd = Some(Box::new(new_cmd));
self.refresh_area_preview(i);