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

+3 -5
View File
@@ -38,7 +38,7 @@ pub struct LocalWire {
/// Low-bit residual paired with `points` so block-instance wires keep
/// sub-f32 precision once the renderer translates them to world space.
pub points_low: Vec<[f32; 3]>,
pub key_vertices: Vec<[f32; 3]>,
pub key_vertices: Vec<[f64; 3]>,
pub snap_pts: Vec<(glam::DVec3, SnapHint)>,
pub tangent_geoms: Vec<TangentGeom>,
pub fill_tris: Vec<[f32; 3]>,
@@ -1042,7 +1042,7 @@ struct BatchEntry {
points: Vec<[f32; 3]>,
points_low: Vec<[f32; 3]>,
snap_pts: Vec<(glam::DVec3, SnapHint)>,
key_vertices: Vec<[f32; 3]>,
key_vertices: Vec<[f64; 3]>,
tangent_geoms: Vec<TangentGeom>,
fill_tris: Vec<[f32; 3]>,
min_x: f32,
@@ -1454,9 +1454,7 @@ fn emit_wire(
p[1] as f64 + lo_y,
p[2] as f64 + lo_z,
));
entry
.key_vertices
.push([(v.x - ox) as f32, (v.y - oy) as f32, (v.z - oz) as f32]);
entry.key_vertices.push([v.x - ox, v.y - oy, v.z - oz]);
}
for (p, hint) in &lw.snap_pts {
let v = accum_xform.apply(Vector3::new(