ocs_doc_api: fix review findings (layouts, Helix bounds, points_aabb, mass-properties budget, docs)

- layouts.json: append the 6 missing ops (CreateDimensionRadius/Diameter/Angular,
  CreateAttributeDefinition, CreateTable, CreateDimensionAngular2Ln); regenerate
  binding_schema.json + api_reference.md wire vocabulary (all 28 ops).
- Helix bounds: bound the evaluated spline control polygon (was a degenerate
  single-start-point AABB).
- points_aabb: empty -> Geometry::Empty('entity has no points to bound'), not
  UnknownId (the entity exists; don't misclassify as stale/deleted).
- mass_properties: accuracy-first fine tessellation + graceful degradation to the
  approximate meshes.metrics value when the cold-tess budget is exhausted (large
  distinct-solid batches no longer hard-fail).
- IMPLEMENTATION.md: Volume/Centroid rows + accuracy paragraph + test count (618)
  consistent with the final design.
- 618 host lib + 8 crate + 3 consistency green.
This commit is contained in:
Sebastian committed 2026-09-06 14:23:00 +02:00
1 parent 28c8e0ef1a
commit ac54d6079b
6 files changed
+52 -16

No files matched your search

+9 -8
View File
@@ -15,8 +15,8 @@ content).
| Booleans | `intersect` / `union` / `subtract` | `SolidBoolean{op, a, b, erase_sources:true}` → `brep::combine` |
| Transform | `transform(placement)` (in-place) | `Transform{id, placement}` → `brep::transform`; solids |
| Bounds | `bounds()` | `GetBounds` → `brep::body_bounds` (lift-on-miss) |
| Volume | `volume()` | `GetVolume` → `meshes.metrics` cache, mesh-divergence fallback |
| Centroid | `centroid()` | `GetCentroid` → `meshes.metrics` cache, mesh-divergence fallback |
| Volume | `volume()` | `GetVolume` → fine-tessellation `mesh_body(0.1, 1e-4)` (near-analytic); memoized per handle+epoch; budget-exhausted → approximate `meshes.metrics` |
| Centroid | `centroid()` | `GetCentroid` → same accuracy path as `volume()` |
| Delete | `delete()` / `delete_many` | `Delete`/`DeleteMany` |
### Minimal 2D (phase-1 set, used as profiles/inputs)
@@ -53,7 +53,7 @@ variants append at enum end.
(full 2D curves + annotations incl. dimension sub-types), Phase 3 (block references
+ attributes + traversal + attribute definitions), Phase 4 (viewports + set_view +
view query), Phase 5 (media read-mostly + typed raster image + typed table). All
tested: 615 host lib + 8 crate unit + 3 spec↔wire consistency tests green.
tested: 618 host lib + 8 crate unit + 3 spec↔wire consistency tests green.
### Phase 2 — full 2D + annotations
- **Done (2a):** typed curve families `ArcCurve`/`Ellipse`/`Spline`/`Ray`/`XLine` —
@@ -121,12 +121,13 @@ tested: 615 host lib + 8 crate unit + 3 spec↔wire consistency tests green.
## 🔧 Outstanding methods on supported families
**Completed (accuracy):** `GetVolume`/`GetCentroid` now compute via a **fine
**Completed (accuracy):** `GetVolume`/`GetCentroid` compute via a **fine
tessellation** (`mesh_body(0.1, 1e-4)`) for near-analytic results — the
render-mesh metrics cache is the coarse display LOD and no longer shadows query
accuracy; results memoized per (handle, geometry_epoch). Verified by
`accurate_volume_centroid_sphere_and_cube` (sphere volume within 0.5% of 4/3πr³,
centroid at centre, cube exact).
render-mesh metrics cache is the coarse display LOD and does not drive queries;
results memoized per (handle, geometry_epoch); when the cold-tess budget is
exhausted the path degrades to the approximate `meshes.metrics` value rather than
failing. Verified by `accurate_volume_centroid_sphere_and_cube` (sphere volume
within 0.5% of 4/3πr³, centroid at centre, cube exact).
**Completed (outstanding methods):** `loft(profiles)` — `Operation::Loft{profiles}`,
resolves each profile to curve sets (all-or-nothing), `brep::loft` (`loft_two_profiles_*`