forked from 1b-agent/opencadstudio-upstream
Remap dimension associations across a copy
COPY, MIRROR and ARRAY duplicated a dimension's baked block but left the copy with no association at all. Now a copy keeps one, on one condition: every handle in every chain — the viewport, each INSERT on the block path, the source entity, and an intersection's second chain — must have been copied too. Then the whole chain is remapped onto the copies, so the copy measures the copied geometry. The condition is all-or-nothing on purpose. A partially-remapped chain would leave a copy quietly driven by the original's geometry, which is worse than no association; and copying a dimension on its own still produces an unassociated dimension, which is exactly what the model space path did before. It is the same rule `copy_complete_groups` uses for groups, applied to a longer chain. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
1 parent
2697b60d21
commit
e8246031fd
1 file changed
+5
@@ -744,6 +744,11 @@ impl Scene {
|
||||
// Complete group copies record their new Group objects and dictionary
|
||||
// entry as targeted object deltas inside copy_complete_groups.
|
||||
self.copy_complete_groups(&handle_map);
|
||||
// A dimension copied together with everything it measures (its
|
||||
// viewport, its block path and its source) keeps an association, with
|
||||
// every handle remapped onto the copies. Copied on its own it keeps
|
||||
// none — see `copy_dimension_associations`.
|
||||
self.copy_dimension_associations(&handle_map);
|
||||
// The copies are new handles (natural memo misses, tessellated fresh)
|
||||
// and reference only already-cached blocks — no block defn changes.
|
||||
// Report them as additions so derived caches patch in exactly the copies.
|
||||
|
||||
Reference in new issue
Block a user