feat(entities): surface remaining 3D fields + add Mesh render path

Closes out the 3D-entity audit. Mesh (modern SubD mesh) gained a full
render impl since it had no TruckConvertible / Grippable / PropertyEditable
hookup at all — it was silently dropped on open. Remaining mesh-style
entities pick up the few fields the parser populated:

- Mesh (SubD): wireframe + face-fan fill_tris rendering, per-vertex grips,
  Properties panel surfaces version, subdivision_level, blend_crease,
  creased-edge count, vertex / face / edge counts; wired into the
  Transformable / Grippable / PropertyEditable / TruckConvertible
  dispatch in entities/traits.rs
- Polyline3D: smooth_type, default_start_width, default_end_width,
  mesh_m_count, mesh_n_count, smooth_m_density, smooth_n_density
  (widths editable)
- PolygonMesh: smooth_type, m/n_smooth_density, elevation, normal
- PolyfaceMesh: smooth_surface, seqend_handle, elevation, normal,
  thickness

Solid3D / Region / Body's uid + silhouettes + history_handle were
included in the prior 2D commit since they share the same file.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 4.7 committed 2026-05-19 21:35:14 +03:00
1 parent 0b4facc50d
commit 6110da99a5
3 files changed
+243 -1

No files matched your search

+30
View File
@@ -520,10 +520,32 @@ impl Grippable for Polyline3D {
impl PropertyEditable for Polyline3D {
fn geometry_properties(&self, _text_style_names: &[String]) -> PropSection {
use acadrust::entities::polyline3d::SmoothSurfaceType as SST;
let smooth = match self.smooth_type {
SST::None => "None",
SST::QuadraticBSpline => "Quadratic",
SST::CubicBSpline => "Cubic",
SST::Bezier => "Bezier",
};
PropSection {
title: "Geometry".into(),
props: vec![
ro("Vertices", "vertices", self.vertices.len().to_string()),
edit("Default Start W", "pl3_start_w", self.default_start_width),
edit("Default End W", "pl3_end_w", self.default_end_width),
ro("Smooth", "pl3_smooth", smooth),
ro("Mesh M", "pl3_mesh_m", self.mesh_m_count.to_string()),
ro("Mesh N", "pl3_mesh_n", self.mesh_n_count.to_string()),
ro(
"Smooth M Density",
"pl3_smooth_m",
self.smooth_m_density.to_string(),
),
ro(
"Smooth N Density",
"pl3_smooth_n",
self.smooth_n_density.to_string(),
),
Property {
label: "Closed".into(),
field: "pl3_closed",
@@ -548,6 +570,14 @@ impl PropertyEditable for Polyline3D {
} else {
self.open();
}
return;
}
if let Ok(v) = value.trim().parse::<f64>() {
match field {
"pl3_start_w" if v >= 0.0 => self.default_start_width = v,
"pl3_end_w" if v >= 0.0 => self.default_end_width = v,
_ => {}
}
}
}
}