feat(f64): command layer compiles on DVec3

Whole command/snap/grip/cursor chain now builds on f64 DVec3 end to end,
so picked points, snaps and grip drags stay precise at UTM-scale
coordinates instead of quantizing to ~0.5 m through f32.

- All ~80 command files migrated: draw (line/circle/arc/ellipse/shapes
  in full f64; others via point methods), modify, annotate, insert, view,
  inquiry, layers, groups, clipboard, layout.
- Entity apply_grip impls updated for GripApply::{Absolute,Translate}(DVec3).
- Construction sites (EntityTransform/CmdResult/DynAnchor) emit DVec3;
  wire-preview boundaries cast to f32 only at the GPU edge.
- Modify/annotate commands keep internal Vec3 geometry where precision is
  non-critical, casting at the DVec3 boundary; key draw commands store f64.

Builds clean (no warnings). Visual verification of crosshair/snap/grip at
extreme UTM zoom pending.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-06-24 03:51:50 +03:00
commit 4f7a98a2ad
84 changed files with 358 additions and 336 deletions

View file

@ -188,9 +188,9 @@ impl Grippable for Hatch {
fn resolve(apply: &GripApply, cur: Vec3) -> (f64, f64) {
let p = match apply {
GripApply::Absolute(p) => *p,
GripApply::Translate(d) => cur + *d,
GripApply::Translate(d) => cur.as_dvec3() + *d,
};
(p.x as f64, p.y as f64)
(p.x, p.y)
}
'outer: for path in &mut self.paths {

View file

@ -24,7 +24,7 @@ pub(crate) fn mleader_v_anchor(attach: TextAttachmentType) -> MTextVAnchor {
| TextAttachmentType::BottomOfTopLineUnderlineAll => MTextVAnchor::BottomOfTopLine,
}
}
use glam::{DVec3, Vec3};
use glam::DVec3;
use crate::command::EntityTransform;
use crate::entities::common::{

View file

@ -78,7 +78,7 @@ impl Grippable for Solid3D {
self.point_of_reference.x += d.x as f64;
self.point_of_reference.y += d.y as f64;
self.point_of_reference.z += d.z as f64;
translate_wires(&mut self.wires, d);
translate_wires(&mut self.wires, d.as_vec3());
}
}
}
@ -154,7 +154,7 @@ impl Grippable for Region {
self.point_of_reference.x += d.x as f64;
self.point_of_reference.y += d.y as f64;
self.point_of_reference.z += d.z as f64;
translate_wires(&mut self.wires, d);
translate_wires(&mut self.wires, d.as_vec3());
}
}
}
@ -222,7 +222,7 @@ impl Grippable for Body {
self.point_of_reference.x += d.x as f64;
self.point_of_reference.y += d.y as f64;
self.point_of_reference.z += d.z as f64;
translate_wires(&mut self.wires, d);
translate_wires(&mut self.wires, d.as_vec3());
}
}
}