forked from 1b-agent/opencadstudio-upstream
feat(3d): instance block-definition solid meshes per INSERT
3D solid meshes inside block definitions were drawn once at block-local coordinates without the INSERT transform, so a block authored in mm and placed into a metre drawing at a 0.001 INSERT scale rendered ~1000x too large. Split solid meshes into top-level (layout-owned, offset and drawn flat) and block-definition (kept block-local) sets, and emit a transformed instance of each block-def mesh per model-space INSERT, accumulating nested transforms. Layout blocks are identified from the Layout objects' block_record handles, since BlockRecord::is_layout() also flags ordinary blocks in some files. (#123) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
2be26e9e2e
commit
25c347f9b0
2 files changed
+173
-10
No files matched your search
@@ -567,6 +567,7 @@ impl OpenCADStudio {
|
||||
self.tabs[i].scene.hatches = caches.hatches;
|
||||
self.tabs[i].scene.images = caches.images;
|
||||
self.tabs[i].scene.meshes = caches.meshes;
|
||||
self.tabs[i].scene.block_meshes = caches.block_meshes;
|
||||
// Invalidate the wire cache so the new document is tessellated.
|
||||
self.tabs[i].scene.bump_geometry();
|
||||
self.tabs[i].scene.selected = rustc_hash::FxHashSet::default();
|
||||
|
||||
Reference in new issue
Block a user