ocs_doc_api: Phase 0 + Phase 2a (sweep profiles, non-solid transform, full 2D curves)

Phase 0 (outstanding supported-family methods):
- add_vertex on LwPolyline (insert vertex, out-of-range validation).
- extrude / revolve from profiles (entity_to_profile_curves: Line/Circle/Arc/
  LwPolyline straight-segment conversion -> geom2d::Curve -> brep::extrude/revolve).
- non-solid transform + transform_many via acadrust geometry
  (transform_entity_geometry for Line/Circle/Arc/Point/LwPolyline).
- ensure_transformable broadened accordingly (all-or-nothing pre-validation).

Phase 2a (full 2D curve families): ArcCurve/Ellipse/Spline/Ray/XLine.
- Curve2Spec extended (Arc/Ellipse/Spline/Ray/XLine) + create_arc/create_ellipse/
  create_spline/create_ray/create_xline facade constructors + handle types.
- entity_kind_name, entity_bounds (Arc coarse, Ellipse major-axis, Spline bbox;
  Ray/XLine unbounded), transform_entity_geometry, ensure_transformable extended.
- spec/entities.toml families; api_reference.md + binding_schema.json regenerated.

Tests: +6 doc_api integration tests (phase0_*, phase2_*) -> 598 host lib green.
IMPLEMENTATION.md updated (Phase 0 done, Phase 2a done / 2b remaining).
This commit is contained in:
Sebastian committed 2026-09-06 00:51:39 +02:00
1 parent e41086b058
commit d46351cdb3
8 files changed
+647 -47

No files matched your search

+11
View File
@@ -34,6 +34,17 @@ pub enum Curve2Spec {
Circle { centre: [f64; 3], radius: f64 },
Polyline { points: Vec<[f64; 3]>, closed: bool },
Point { position: [f64; 3] },
/// Circular arc, counter-clockwise from `start_angle` to `end_angle` (radians).
Arc { centre: [f64; 3], radius: f64, start_angle: f64, end_angle: f64 },
/// Ellipse: `major_axis` is the major-axis endpoint relative to `centre`;
/// `ratio` = minor/major. `start`/`end` parameters 0..2π (full ellipse = 0..2π).
Ellipse { centre: [f64; 3], major_axis: [f64; 3], ratio: f64, start: f64, end: f64 },
/// NURBS spline (control points + knots + weights; `degree` typically 3).
Spline { degree: i32, control_points: Vec<[f64; 3]>, knots: Vec<f64>, weights: Vec<f64> },
/// A ray from `origin` along `direction` (bounded at origin only).
Ray { origin: [f64; 3], direction: [f64; 3] },
/// An infinite construction line through `origin` along `direction`.
XLine { origin: [f64; 3], direction: [f64; 3] },
}
/// A generic entity-construction payload used by the bulk op