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 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-10-06 13:57:55 +03:00
1 parent 2dfa9f3f2a
commit 81bb8d48cf
12 files changed
+32 -19

No files matched your search

+9 -2
View File
@@ -119,7 +119,7 @@ fn properties(vp: &Viewport) -> Vec<PropSection> {
ro(
"Clipped",
"vp_clipped",
if vp.clip_boundary_handle.is_null() { "No" } else { "Yes" },
if is_clipped(vp) { "Yes" } else { "No" },
),
Property {
label: "Display locked".into(),
@@ -342,6 +342,13 @@ fn apply_grip(vp: &mut Viewport, grip_id: usize, apply: GripApply) {
/// Stretch a rectangular paper-space viewport by the corners captured by a
/// crossing window. Bounds that have no captured corner stay anchored.
/// A viewport clipped by its boundary object: the boundary is linked and
/// non-rectangular clipping is on. A stored boundary with clipping off draws
/// the rectangular viewport.
pub(crate) fn is_clipped(vp: &Viewport) -> bool {
!vp.clip_boundary_handle.is_null() && vp.status.non_rectangular_clipping
}
pub fn stretch(
vp: &mut Viewport,
win_min: glam::DVec3,
@@ -435,7 +442,7 @@ impl crate::entities::traits::FallbackTess for Viewport {
// A clipped viewport uses its linked boundary entity as its visible
// frame. Drawing the viewport's rectangular extents as well leaves an
// incorrect box around polygonal/Object MVIEW results.
if !self.clip_boundary_handle.is_null() {
if is_clipped(self) {
return (vec![], vec![], vec![], vec![]);
}
let cx = self.center.x;