fix(blocks): preserve UCS transformations

Bake BEDIT frames into block-local geometry while keeping model and viewport UCS isolated. Normalize legacy nonzero block origins during load.
This commit is contained in:
Hakan Seven committed 2026-07-30 19:50:33 +03:00
1 parent 02d15f5d23
commit 2c64888048
22 files changed
+693 -41

No files matched your search

+9 -1
View File
@@ -932,9 +932,17 @@ impl OpenCADStudio {
base,
} => {
self.push_undo_snapshot(i, "BLOCK");
let ucs = self.tabs[i].ucs_xform();
let world_to_block = ucs.to_ucs_transform_at(base);
let block_to_world = ucs.to_wcs_transform_at(base);
match self.tabs[i]
.scene
.create_block_from_entities(&handles, &name, base)
.create_block_from_entities(
&handles,
&name,
&world_to_block,
&block_to_world,
)
{
Ok(insert_handle) => {
self.tabs[i].dirty = true;