forked from 1b-agent/opencadstudio-upstream
CLIP on raster images and viewports, IMAGECLIP, VPCLIP, clip depth rules
- CLIP continues as IMAGECLIP on a raster image and as VPCLIP on a layout viewport, with the reference prompts and stored data. - Image clip boundaries sit on pixel centres, OFF only clears the display flag, and an inverted boundary cuts the image. - VPCLIP polygon (Arc/Length/Close/Undo), clipping object and Delete; the viewport shrinks to the boundary's exact extents, view kept. - XCLIP Clipdepth: Remove clears only the plane asked, a front plane behind the back one is rejected with the reference message. - Attached and imported images carry the reference display flags. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
857f2f2e58
commit
bd17e7e0d4
12 files changed
+569
-112
No files matched your search
+12
-3
@@ -169,13 +169,22 @@ pub fn set_insert_clip_enabled(doc: &mut CadDocument, insert: Handle, on: bool)
|
||||
}
|
||||
|
||||
/// Front and back clipping planes (None = off) of an insert's clip.
|
||||
pub fn set_insert_clip_depth(doc: &mut CadDocument, insert: Handle, front: Option<f64>, back: Option<f64>) -> bool {
|
||||
pub fn set_insert_clip_depth(
|
||||
doc: &mut CadDocument,
|
||||
insert: Handle,
|
||||
front: Option<Option<f64>>,
|
||||
back: Option<Option<f64>>,
|
||||
) -> bool {
|
||||
let Some(spatial) = filter_handle(doc, insert) else {
|
||||
return false;
|
||||
};
|
||||
if let Some(ObjectType::SpatialFilter(f)) = doc.objects.get_mut(&spatial) {
|
||||
f.front_clip = front;
|
||||
f.back_clip = back;
|
||||
if let Some(front) = front {
|
||||
f.front_clip = front;
|
||||
}
|
||||
if let Some(back) = back {
|
||||
f.back_clip = back;
|
||||
}
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user