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 SevenandClaude Opus 4.7 committed 2026-06-23 22:23:56 +03:00
1 parent cd1d3bb619
commit cca1086696
10 files changed
+54 -40

No files matched your search

+15 -5
View File
@@ -126,11 +126,21 @@ impl Face3DGpu {
let fill_color = [r * 0.45, g * 0.45, b * 0.45, a];
let depth = depth_of(wire);
let p = &wire.key_vertices;
let v = |i: usize| Face3DVertex {
position: p[i],
color: fill_color,
draw_depth: depth,
position_low: [0.0; 3],
// key_vertices are f64 (offset-relative); split into the
// double-single (high, low) pair the face3d shader expects.
let v = |i: usize| {
let [x, y, z] = p[i];
let h = [x as f32, y as f32, z as f32];
Face3DVertex {
position: h,
color: fill_color,
draw_depth: depth,
position_low: [
(x - h[0] as f64) as f32,
(y - h[1] as f64) as f32,
(z - h[2] as f64) as f32,
],
}
};
verts_3d.push(v(0));
verts_3d.push(v(1));