refactor(wire): add WireModel.points_low parallel buffer (empty default)

Foundation for double-single positions: WireModel now carries an
index-paired f32 residual buffer (`points_low`) next to the existing
`points` high half. Empty means "all-zero residual", so every existing
constructor (interactive draw, previews) is unchanged in behaviour;
tessellation from CAD f64 will fill it in the next steps so vertex
precision survives at UTM-scale coordinates.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.7 committed 2026-06-23 18:28:52 +03:00
1 parent a0b4968ad2
commit 97d6993768
39 files changed
+72 -1

No files matched your search

+1
View File
@@ -168,6 +168,7 @@ impl CadCommand for AttdefCommand {
[pt.x, pt.y, pt.z - d],
[pt.x, pt.y, pt.z + d],
],
points_low: Vec::new(),
color: WireModel::CYAN,
selected: false,
pattern_length: 0.0,
+1
View File
@@ -613,6 +613,7 @@ fn line_wire(from: Vec3, to: Vec3) -> WireModel {
WireModel {
name: "rubber_band".into(),
points: vec![[from.x, from.y, from.z], [to.x, to.y, to.z]],
points_low: Vec::new(),
color: WireModel::CYAN,
selected: false,
pattern_length: 0.0,
+1
View File
@@ -78,6 +78,7 @@ impl CadCommand for LineCommand {
Some(WireModel {
name: "rubber_band".to_string(),
points: vec![[last.x, last.y, last.z], [pt.x, pt.y, pt.z]],
points_low: Vec::new(),
color: WireModel::CYAN,
selected: false,
pattern_length: 0.0,
+1
View File
@@ -133,6 +133,7 @@ impl CadCommand for MlineCommand {
Some(WireModel {
name: "mline_preview".into(),
points: pts,
points_low: Vec::new(),
color: WireModel::CYAN,
selected: false,
pattern_length: 0.0,
+1
View File
@@ -110,6 +110,7 @@ impl CadCommand for ImageCommand {
Some(WireModel {
name: "image_preview".into(),
points: vec![p0, p1, p2, p3, p0],
points_low: Vec::new(),
color: WireModel::CYAN,
selected: false,
pattern_length: 0.0,
+2
View File
@@ -76,6 +76,7 @@ impl CadCommand for RayCommand {
Some(WireModel {
name: "ray_preview".into(),
points: vec![[base.x, base.y, base.z], [far.x, far.y, far.z]],
points_low: Vec::new(),
color: WireModel::CYAN,
selected: false,
pattern_length: 0.0,
@@ -157,6 +158,7 @@ impl CadCommand for XLineCommand {
[far_neg.x, far_neg.y, far_neg.z],
[far_pos.x, far_pos.y, far_pos.z],
],
points_low: Vec::new(),
color: WireModel::CYAN,
selected: false,
pattern_length: 0.0,
+1
View File
@@ -82,6 +82,7 @@ impl CadCommand for RevCloudCommand {
Some(WireModel {
name: "revcloud_preview".into(),
points: preview_pts,
points_low: Vec::new(),
color: WireModel::CYAN,
selected: false,
pattern_length: 0.0,
+2
View File
@@ -122,6 +122,7 @@ impl CadCommand for WipeoutCommand {
[min.x, max.y, max.z],
[min.x, min.y, min.z],
],
points_low: Vec::new(),
color: WireModel::CYAN,
selected: false,
pattern_length: 0.0,
@@ -148,6 +149,7 @@ impl CadCommand for WipeoutCommand {
Some(WireModel {
name: "wipeout_poly_preview".into(),
points: pts,
points_low: Vec::new(),
color: WireModel::CYAN,
selected: false,
pattern_length: 0.0,
+1
View File
@@ -66,6 +66,7 @@ impl CadCommand for AreaCommand {
Some(WireModel {
name: "area_preview".into(),
points: pts,
points_low: Vec::new(),
color: WireModel::CYAN,
selected: false,
pattern_length: 0.0,
+1
View File
@@ -61,6 +61,7 @@ impl CadCommand for DistCommand {
Some(WireModel {
name: "dist_preview".into(),
points: vec![[p1.x, p1.y, p1.z], [pt.x, pt.y, pt.z]],
points_low: Vec::new(),
color: WireModel::CYAN,
selected: false,
pattern_length: 0.0,