forked from 1b-agent/opencadstudio-upstream
Complete hatch creation and editing workflow
This commit is contained in:
1 parent
573ed3245e
commit
f83037271c
18 files changed
+1248
-338
No files matched your search
@@ -1726,6 +1726,9 @@ pub(super) fn on_tab_close(&mut self, idx: usize) -> Task<Message> {
|
||||
entry.gpu,
|
||||
crate::scene::model::hatch_model::HatchPattern::Solid
|
||||
);
|
||||
dxf.pattern_type =
|
||||
acadrust::entities::HatchPatternType::Predefined;
|
||||
dxf.gradient_color.enabled = false;
|
||||
}
|
||||
if let Some(model) = self.tabs[i].scene.hatches.get_mut(&handle) {
|
||||
model.pattern = entry.gpu.clone();
|
||||
|
||||
@@ -3490,13 +3490,24 @@ impl OpenCADStudio {
|
||||
.unwrap_or(false)
|
||||
{
|
||||
if let Some(model) = self.tabs[i].scene.hatches.get(&handle).cloned() {
|
||||
let annotative = self.tabs[i]
|
||||
.scene
|
||||
.document
|
||||
.get_entity(handle)
|
||||
.is_some_and(|entity| {
|
||||
crate::scene::annotative::is_annotative(
|
||||
&self.tabs[i].scene.document,
|
||||
entity,
|
||||
)
|
||||
});
|
||||
use crate::command::CadCommand;
|
||||
use crate::modules::draw::draw::hatchedit::HatcheditCommand;
|
||||
let cmd: Box<dyn CadCommand> = Box::new(HatcheditCommand::with_handle(
|
||||
handle,
|
||||
model.name.clone(),
|
||||
model.scale,
|
||||
model.angle_offset,
|
||||
model.angle_offset.to_degrees(),
|
||||
annotative,
|
||||
));
|
||||
self.command_line.push_info(&cmd.prompt());
|
||||
self.tabs[i].active_cmd = Some(cmd);
|
||||
|
||||
Reference in new issue
Block a user