forked from 1b-agent/opencadstudio-upstream
Cargo: codec aad7053, kernel 1a52eaf, graph 263de59; honour viewport clipping
Brings codec PRs #84 (cross-version visual styles, table styles, subentity managers), #88 (viewport clipping flag, DXF boundary handle), #89 (DXF viewport snap/twist in degrees) and #92 (field format codes, event updates). With #88 a viewport keeps a stored boundary whether or not clipping is on, so a linked boundary alone no longer means "clipped": rendering, paper picking, VPCLIP and the Clipped property check the clipping flag too, and VPCLIP / MVIEW Object and Polygon set it. Before, OCS never set the flag, so its clipped viewports opened rectangular elsewhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2dfa9f3f2a
commit
81bb8d48cf
12 files changed
+32
-19
No files matched your search
@@ -497,7 +497,7 @@ impl CadCommand for ClipCommand {
|
||||
}
|
||||
// The layout's own paper-space viewport (id 1) is not clippable.
|
||||
Some(EntityType::Viewport(vp)) if vp.id != 1 => {
|
||||
let clipped = !vp.clip_boundary_handle.is_null();
|
||||
let clipped = crate::entities::viewport::is_clipped(&vp);
|
||||
self.inner = Some(Box::new(MviewCommand::vpclip(handle, clipped)));
|
||||
CmdResult::NeedPoint
|
||||
}
|
||||
|
||||
@@ -799,7 +799,7 @@ impl CadCommand for MviewCommand {
|
||||
if self.step == Step::ClipSelect {
|
||||
return match self.picked.take() {
|
||||
Some(EntityType::Viewport(vp)) if vp.id != 1 => {
|
||||
self.clip = Some((handle, !vp.clip_boundary_handle.is_null()));
|
||||
self.clip = Some((handle, crate::entities::viewport::is_clipped(&vp)));
|
||||
self.step = Step::ClipChoice;
|
||||
CmdResult::NeedPoint
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user