refactor(snap): widen key_vertices to f64 (world_offset removal P4)

WireModel/LocalWire/BatchEntry key_vertices are now Vec<[f64; 3]>;
tessellation keeps them in f64 (no f32 cast at offset subtraction),
producers (dimension, leader, multileader) build them from the acadrust
f64 source, the block-cache transform keeps f64, and the face3d Face3D
quad path splits them into the double-single (high, low) pair. Consumers
(snap endpoint/midpoint, xclip) read via f32 at the leaf. Still
offset-relative (inert); endpoint/midpoint snap is no longer f32-capped.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-06-23 22:23:56 +03:00
commit cca1086696
10 changed files with 54 additions and 40 deletions

View file

@ -3270,14 +3270,14 @@ impl Scene {
for &[x, y, z] in &wire.key_vertices {
if x.is_finite() && y.is_finite() && z.is_finite() {
min = min.min(glam::Vec3::new(
x + ox as f32,
y + oy as f32,
z + oz,
(x + ox) as f32,
(y + oy) as f32,
(z + oz as f64) as f32,
));
max = max.max(glam::Vec3::new(
x + ox as f32,
y + oy as f32,
z + oz,
(x + ox) as f32,
(y + oy) as f32,
(z + oz as f64) as f32,
));
any = true;
}
@ -8593,7 +8593,7 @@ fn lod_stub_wire(
line_weight_px: 1.0,
snap_pts: vec![],
tangent_geoms: vec![],
key_vertices: vec![[cx, cy, cz]],
key_vertices: vec![[cx as f64, cy as f64, cz as f64]],
aabb,
plinegen: true,
vp_scissor: None,