Complete Coincident command behavior

This commit is contained in:
ramox81 committed 2026-09-15 14:00:26 +03:00
1 parent dfe8b77cca
commit ba2b371269
13 files changed
+1183 -207

No files matched your search

+16
View File
@@ -214,6 +214,9 @@ fn properties(line: &Line) -> Vec<PropSection> {
ro(t!("Delta Z").as_ref(), "delta_z", format!("{dz:.4}")),
ro(t!("Length").as_ref(), "length", format!("{:.4}", line.length())),
ro(t!("Angle").as_ref(), "angle", format!("{angle:.2}")),
edit(t!("Normal X").as_ref(), "normal_x", line.normal.x),
edit(t!("Normal Y").as_ref(), "normal_y", line.normal.y),
edit(t!("Normal Z").as_ref(), "normal_z", line.normal.z),
],
}]
}
@@ -286,6 +289,19 @@ fn apply_geom_prop(line: &mut Line, field: &str, value: &str) {
"end_x" => line.end.x = v,
"end_y" => line.end.y = v,
"end_z" => line.end.z = v,
"normal_x" | "normal_y" | "normal_z" => {
let mut normal = glam::DVec3::new(line.normal.x, line.normal.y, line.normal.z);
match field {
"normal_x" => normal.x = v,
"normal_y" => normal.y = v,
"normal_z" => normal.z = v,
_ => unreachable!(),
}
if normal.is_finite() && normal.length_squared() > 1.0e-18 {
let normal = normal.normalize();
line.normal = acadrust::types::Vector3::new(normal.x, normal.y, normal.z);
}
}
_ => {}
}
}