refactor: remove remaining world_offset vestiges in app/

Clean up the last zero-valued world_offset locals outside the scene
tessellation core: the UCS wire-affine / grid-basis origin shift
(document.rs), the coordinate readout (view.rs), grip absolute-apply
(update.rs), the dead properties-edit re-offset guard, the MTEXT preview
glyph-box shift (mtext_editor.rs), and the cross-drawing paste correction
(commands.rs / cmd_result.rs) — including the now-dead
`clipboard_world_offset` field. Coordinates are absolute throughout.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-06-24 19:01:25 +03:00
1 parent ef8d5b2610
commit cc43969ce0
8 files changed
+12 -82

No files matched your search

+1 -15
View File
@@ -540,7 +540,6 @@ impl OpenCADStudio {
self.clipboard_centroid = super::helpers::entities_centroid(
&self.tabs[i].scene.wire_models_for(&handles),
);
self.clipboard_world_offset = [0.0_f64; 3];
self.clipboard = entities;
self.clipboard_deps = super::ClipboardDeps::capture(
&self.tabs[i].scene.document,
@@ -573,7 +572,6 @@ impl OpenCADStudio {
self.clipboard_centroid = super::helpers::entities_centroid(
&self.tabs[i].scene.wire_models_for(&handles),
);
self.clipboard_world_offset = [0.0_f64; 3];
let count = entities.len();
self.clipboard = entities;
self.clipboard_deps = super::ClipboardDeps::capture(
@@ -595,19 +593,7 @@ impl OpenCADStudio {
self.command_line.push_error("Clipboard is empty.");
} else {
let wires = self.tabs[i].scene.wires_for_entities(&self.clipboard);
// The preview wires are tessellated in THIS drawing's
// offset-relative frame, but the stored centroid is in the
// source drawing's. Shift it by the world_offset difference
// so the ghost tracks the cursor instead of drifting by the
// offset gap. Zero within one drawing. (#135)
let src_wo = self.clipboard_world_offset;
let tgt_wo = [0.0_f64; 3];
let centroid = self.clipboard_centroid
+ glam::DVec3::new(
src_wo[0] - tgt_wo[0],
src_wo[1] - tgt_wo[1],
src_wo[2] - tgt_wo[2],
);
let centroid = self.clipboard_centroid;
use crate::modules::draw::clipboard::paste::PasteCommand;
// The ghost anchor is a display-only offset; the precise
// paste delta is computed in f64 at commit time.