fix(props): angle rows format via AUNITS, not LUNITS (#297)

Every angle row went through the linear formatter, so switching LUNITS
to Architectural showed a block's Rotation as feet-and-inches — and the
string wouldn't parse back, wedging the field until it was cleared and
retyped. Only the decimal/fractional LUNITS survived by accident.

New edit_angle row helper formats angles with format_angle
(AUNITS/AUPREC: decimal degrees, DMS, grads or radians), applied to all
17 angle rows (rotations, obliquing, arc start/end, hatch pattern
angle, multileader text rotation). parse_angle_deg converts every
AUNITS display form back to degrees ("30°"/"30d", DMS 30°15'20",
33.33g, 0.52r) and parse_f64 falls back to it, so the displayed value
round-trips through an edit.

Closes #297

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Fable 5 committed 2026-07-22 16:42:14 +03:00
1 parent 51f07f1208
commit b998082c82
11 files changed
+87 -29

No files matched your search

+3 -3
View File
@@ -3,7 +3,7 @@ use truck_modeling::{builder, Point3};
use crate::command::EntityTransform;
use crate::entities::common::{
center_grip, edit_prop as edit, parse_f64, ro_prop as ro, square_grip,
center_grip, edit_angle_prop as edit_angle, edit_prop as edit, parse_f64, ro_prop as ro, square_grip,
};
use crate::entities::traits::TruckConvertible;
use crate::scene::convert::acad_to_truck::{extrusion_wall_tris, TruckEntity, TruckObject};
@@ -164,8 +164,8 @@ fn properties(arc: &Arc) -> Vec<PropSection> {
ro("End Y", "end_y", format!("{ey:.4}")),
ro("End Z", "end_z", format!("{ez:.4}")),
edit("Radius", "radius", arc.radius),
edit("Start angle", "start_angle", sa.to_degrees()),
edit("End angle", "end_angle", ea.to_degrees()),
edit_angle("Start angle", "start_angle", sa.to_degrees()),
edit_angle("End angle", "end_angle", ea.to_degrees()),
ro("Total angle", "total_angle", format!("{total_angle:.2}")),
ro("Arc length", "arc_length", format!("{arc_length:.4}")),
ro("Area", "area", format!("{area:.4}")),