From 50b28513810bb05871c30a978420eac67d63ddfe Mon Sep 17 00:00:00 2001 From: ramox81 <184937705+ramox81@users.noreply.github.com> Date: Fri, 16 Oct 2026 16:21:59 +0300 Subject: [PATCH] Drawing extents include solids placed through inserts Zoom Extents skips an insert's marker wire and counts solids through their meshes, but only model-space meshes were read: a drawing whose solids all sit in blocks had no extents and the view did not move. The instanced block meshes now count with their placed bounds. Co-Authored-By: Claude Opus 5.5 --- src/scene/camera_ops.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/scene/camera_ops.rs b/src/scene/camera_ops.rs index 509d2de38..4b2cee7ab 100644 --- a/src/scene/camera_ops.rs +++ b/src/scene/camera_ops.rs @@ -1778,6 +1778,21 @@ impl Scene { fold!(Some((lo.min(hi), lo.max(hi)))); } } + // Solids inside blocks draw as one mesh instance per insert, placed + // where the insert puts them: that is the content the skipped insert + // marker stands for. + for set in self.instanced_block_meshes( + block, + None, + scale, + self.annotation_all_visible(), + None, + None, + ) { + if let Some([x0, y0, z0, x1, y1, z1]) = set.instance_aabb { + fold!(Some((glam::DVec3::new(x0, y0, z0), glam::DVec3::new(x1, y1, z1)))); + } + } // Raster images, OLE frames and underlays draw as GPU quads; with // their frames hidden they carry no wire outline at all.