forked from 1b-agent/opencadstudio-upstream
1 parent
0038e386f7
commit
7a8da58d55
12 files changed
+352
-120
No files matched your search
@@ -14,7 +14,15 @@ impl OpenCADStudio {
|
||||
true
|
||||
}
|
||||
|
||||
fn refresh_area_preview(&mut self, i: usize) {
|
||||
pub(super) fn refresh_area_preview(&mut self, i: usize) {
|
||||
let hatches = self.tabs[i]
|
||||
.active_cmd
|
||||
.as_ref()
|
||||
.and_then(|command| command.hatch_preview_models());
|
||||
if let Some(hatches) = hatches {
|
||||
self.tabs[i].scene.set_command_preview_hatches(hatches);
|
||||
return;
|
||||
}
|
||||
let regions = self.tabs[i]
|
||||
.active_cmd
|
||||
.as_ref()
|
||||
|
||||
@@ -619,9 +619,17 @@ impl OpenCADStudio {
|
||||
"HATCH" => {
|
||||
use crate::modules::draw::draw::hatch::HatchCommand;
|
||||
let outlines = self.tabs[i].scene.hatch_boundary_outlines();
|
||||
let new_cmd = HatchCommand::new(outlines);
|
||||
let boundary_sources = self.tabs[i].scene.hatch_boundary_sources();
|
||||
let selected = self.tabs[i]
|
||||
.scene
|
||||
.selected_entities()
|
||||
.into_iter()
|
||||
.map(|(handle, _)| handle)
|
||||
.collect();
|
||||
let new_cmd = HatchCommand::new(outlines, boundary_sources, selected);
|
||||
self.command_line.push_info(&new_cmd.prompt());
|
||||
self.tabs[i].active_cmd = Some(Box::new(new_cmd));
|
||||
self.refresh_area_preview(i);
|
||||
}
|
||||
|
||||
"HATCHEDIT" => {
|
||||
|
||||
Reference in new issue
Block a user