Merge pull request #1485 from ramox81/codex/clip-followups

CLIP on images and viewports, IMAGECLIP, VPCLIP, linked clip boundaries and clip depth
This commit is contained in:
Hakan Seven committed 2026-09-25 15:17:53 +03:00
commit 22a5a8d16c
14 files changed
+930 -266

No files matched your search

+12
View File
@@ -715,6 +715,18 @@ impl OpenCADStudio {
self.command_line.push_info(&command.prompt());
self.tabs[i].active_cmd = Some(Box::new(command));
}
"IMAGECLIP" => {
use crate::command::CadCommand;
let command = crate::modules::insert::pdf_clip::PdfClipCommand::image();
self.command_line.push_info(&command.prompt());
self.tabs[i].active_cmd = Some(Box::new(command));
}
"VPCLIP" => {
use crate::command::CadCommand;
let command = crate::modules::layout::mview::MviewCommand::vpclip_select();
self.command_line.push_info(&command.prompt());
self.tabs[i].active_cmd = Some(Box::new(command));
}
"CLIP" => {
use crate::command::CadCommand;
let command = crate::modules::insert::xclip::ClipCommand::new();
+4 -1
View File
@@ -37,6 +37,9 @@ impl OpenCADStudio {
inserts: Vec<codec::Handle>,
action: XclipAction,
) {
if let XclipAction::Depth { rejected: true, .. } = action {
self.command_line.push_error(crate::modules::insert::xclip::DEPTH_REJECTED);
}
self.push_undo_snapshot(i, "XCLIP");
let extents: Vec<_> = inserts.iter().map(|h| self.insert_extents(i, *h)).collect();
let current_layer = self.tabs[i].scene.document.header.current_layer_name.clone();
@@ -51,7 +54,7 @@ impl OpenCADStudio {
XclipAction::Delete => {
clip::remove_insert_clip(doc, *insert);
}
XclipAction::Depth { front, back } => {
XclipAction::Depth { front, back, .. } => {
clip::set_insert_clip_depth(doc, *insert, *front, *back);
}
XclipAction::New { boundary, inverted } => {