feat(properties): conform entity property groups to PROPERTIES.md

Rewrite each entity's property builder to the per-entity group/row spec:
the correct sections (Geometry, Misc, Text, Pattern, Lines & Arrows, Leaders,
Block, …) with the spec's rows and real computed values — Diameter,
Circumference, Area, Delta X/Y/Z, Angle, Total angle, Arc length, Radius ratio,
etc. — plus apply routing for the editable rows.

Covers ~26 entities (Line, Circle, Arc, Point, Ellipse, Spline, polylines,
Ray/XLine, Insert, Text, MText, Hatch, Leader, MultiLeader, Tolerance, Solid,
Solid3D/Region/Body, meshes, MLine, Raster/Wipeout, Underlay, Table, Viewport,
Attribute, OLE). The 3D Visualization/Material group and the full Dimension
spec are deferred (they need document access for material/dimstyle name
resolution). Rows whose data is not in the pinned acadrust revision are shown
as empty placeholders, to be filled when the dependency is bumped.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-07-02 23:03:18 +03:00
1 parent b2b2bfb246
commit b9cebab951
26 files changed
+1917 -1558

No files matched your search

+14 -7
View File
@@ -119,23 +119,26 @@ fn grips(circle: &Circle) -> Vec<GripDef> {
}
fn properties(circle: &Circle) -> Vec<PropSection> {
use std::f64::consts::PI;
let r = circle.radius;
vec![PropSection {
title: "Geometry".into(),
props: vec![
edit("Center X", "center_x", circle.center.x),
edit("Center Y", "center_y", circle.center.y),
edit("Center Z", "center_z", circle.center.z),
edit("Radius", "radius", circle.radius),
ro(
"Diameter",
"diameter",
format!("{:.4}", circle.radius * 2.0),
),
edit("Radius", "radius", r),
ro("Diameter", "diameter", format!("{:.4}", r * 2.0)),
ro(
"Circumference",
"circumference",
format!("{:.4}", circle.radius * 2.0 * std::f64::consts::PI),
format!("{:.4}", 2.0 * PI * r),
),
ro("Area", "area", format!("{:.4}", PI * r * r)),
edit("Normal X", "normal_x", circle.normal.x),
edit("Normal Y", "normal_y", circle.normal.y),
edit("Normal Z", "normal_z", circle.normal.z),
edit("Thickness", "thickness", circle.thickness),
],
}]
}
@@ -149,6 +152,10 @@ fn apply_geom_prop(circle: &mut Circle, field: &str, value: &str) {
"center_y" => circle.center.y = v,
"center_z" => circle.center.z = v,
"radius" if v > 0.0 => circle.radius = v,
"normal_x" => circle.normal.x = v,
"normal_y" => circle.normal.y = v,
"normal_z" => circle.normal.z = v,
"thickness" => circle.thickness = v,
_ => {}
}
}