From e8246031fdfe02922bb247334f8e5abd5012d07c Mon Sep 17 00:00:00 2001 From: Christopher Overbeck Date: Tue, 15 Sep 2026 12:32:56 -0500 Subject: [PATCH] Remap dimension associations across a copy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/scene/modify.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/scene/modify.rs b/src/scene/modify.rs index 0de4ad2e7..2983cdfc9 100644 --- a/src/scene/modify.rs +++ b/src/scene/modify.rs @@ -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.