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:
parent
cd1d3bb619
commit
cca1086696
10 changed files with 54 additions and 40 deletions
|
|
@ -1120,12 +1120,13 @@ fn tessellate_dimension_inner(
|
|||
};
|
||||
|
||||
let snap_pts = dimension_snap_pts(dim, world_offset);
|
||||
let key_vertices: Vec<[f32; 3]> = geom
|
||||
let key_vertices: Vec<[f64; 3]> = geom
|
||||
.dim_lines
|
||||
.iter()
|
||||
.chain(geom.ext_lines.iter())
|
||||
.copied()
|
||||
.filter(|p| !(p[0].is_nan() || p[1].is_nan() || p[2].is_nan()))
|
||||
.map(|[x, y, z]| [x as f64, y as f64, z as f64])
|
||||
.collect();
|
||||
|
||||
// DIMLWD (dim line + arrows) and DIMLWE (extension lines). Negative
|
||||
|
|
|
|||
|
|
@ -623,7 +623,7 @@ impl LeaderTess for Leader {
|
|||
|
||||
let mut points: Vec<[f32; 3]> = verts.iter().map(|v| p3(v)).collect();
|
||||
let mut tangents: Vec<TangentGeom> = Vec::new();
|
||||
let key_vertices: Vec<[f32; 3]> = verts.iter().map(|v| p3(v)).collect();
|
||||
let key_vertices: Vec<[f64; 3]> = verts.iter().map(|v| [v.x, v.y, v.z]).collect();
|
||||
let mut fill_tris: Vec<[f32; 3]> = Vec::new();
|
||||
|
||||
for i in 0..verts.len().saturating_sub(1) {
|
||||
|
|
|
|||
|
|
@ -1161,7 +1161,7 @@ impl MultiLeaderTess for MultiLeader {
|
|||
|
||||
// ── Leader / arrow / dogleg points ───────────────────────────────────────
|
||||
let mut points: Vec<[f32; 3]> = Vec::new();
|
||||
let mut key_verts: Vec<[f32; 3]> = Vec::new();
|
||||
let mut key_verts: Vec<[f64; 3]> = Vec::new();
|
||||
let mut snap_pts: Vec<(glam::DVec3, SnapHint)> = Vec::new();
|
||||
let mut tangents: Vec<TangentGeom> = Vec::new();
|
||||
let mut arrow_fill: Vec<[f32; 3]> = Vec::new();
|
||||
|
|
@ -1209,7 +1209,7 @@ impl MultiLeaderTess for MultiLeader {
|
|||
ctrl.push(cp_f);
|
||||
}
|
||||
for &c in &ctrl {
|
||||
key_verts.push(c);
|
||||
key_verts.push([c[0] as f64, c[1] as f64, c[2] as f64]);
|
||||
snap_pts.push((Vec3::from(c).as_dvec3(), SnapHint::Node));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue