forked from 1b-agent/opencadstudio-upstream
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:
1 parent
e41086b058
commit
d46351cdb3
8 files changed
+647
-47
No files matched your search
@@ -16,8 +16,8 @@ B-rep solid. Host resolves bodies via the solid_models cache (lift-on-miss from
|
||||
- **create_cone**(`base: [f64; 3], radius: f64, height: f64`) -> `Solid`
|
||||
- **create_torus**(`centre: [f64; 3], major_radius: f64, minor_radius: f64`) -> `Solid`
|
||||
- **create_wedge**(`origin: [f64; 3], size: [f64; 3]`) -> `Solid`
|
||||
- **extrude**(`profile: EntityRef, direction: [f64; 3]`) -> `Solid` — **not yet supported** (returns `ApiError::Unsupported`)
|
||||
- **revolve**(`profile: EntityRef, pivot: [f64; 3], axis: [f64; 3], angle: f64`) -> `Solid` — **not yet supported** (returns `ApiError::Unsupported`)
|
||||
- **extrude**(`profile: EntityRef, direction: [f64; 3]`) -> `Solid`
|
||||
- **revolve**(`profile: EntityRef, pivot: [f64; 3], axis: [f64; 3], angle: f64`) -> `Solid`
|
||||
|
||||
### Methods
|
||||
|
||||
@@ -48,7 +48,7 @@ B-rep solid. Host resolves bodies via the solid_models cache (lift-on-miss from
|
||||
|
||||
### Methods
|
||||
|
||||
- **add_vertex**(`at: usize, point: [f64; 3]`) -> `()` — op `AddVertex` — **not yet supported** (returns `ApiError::Unsupported`)
|
||||
- **add_vertex**(`at: usize, point: [f64; 3]`) -> `()` — op `AddVertex`
|
||||
|
||||
## `Point` (acadrust `Point`, collection `curves`)
|
||||
|
||||
@@ -57,6 +57,36 @@ B-rep solid. Host resolves bodies via the solid_models cache (lift-on-miss from
|
||||
- **create_point**(`position: [f64; 3]`) -> `Point`
|
||||
- **create_points**(`positions: &[[f64; 3]]`) -> `Vec<Point>` *(bulk op)*
|
||||
|
||||
## `ArcCurve` (acadrust `Arc`, collection `curves`)
|
||||
|
||||
### Constructors (`doc.curves()`)
|
||||
|
||||
- **create_arc**(`centre: [f64; 3], radius: f64, start_angle: f64, end_angle: f64`) -> `ArcCurve`
|
||||
|
||||
## `Ellipse` (acadrust `Ellipse`, collection `curves`)
|
||||
|
||||
### Constructors (`doc.curves()`)
|
||||
|
||||
- **create_ellipse**(`centre: [f64; 3], major_axis: [f64; 3], ratio: f64, start: f64, end: f64`) -> `Ellipse`
|
||||
|
||||
## `Spline` (acadrust `Spline`, collection `curves`)
|
||||
|
||||
### Constructors (`doc.curves()`)
|
||||
|
||||
- **create_spline**(`degree: i32, control_points: &[[f64; 3]], knots: &[f64], weights: &[f64]`) -> `Spline`
|
||||
|
||||
## `Ray` (acadrust `Ray`, collection `curves`)
|
||||
|
||||
### Constructors (`doc.curves()`)
|
||||
|
||||
- **create_ray**(`origin: [f64; 3], direction: [f64; 3]`) -> `Ray`
|
||||
|
||||
## `XLine` (acadrust `XLine`, collection `curves`)
|
||||
|
||||
### Constructors (`doc.curves()`)
|
||||
|
||||
- **create_xline**(`origin: [f64; 3], direction: [f64; 3]`) -> `XLine`
|
||||
|
||||
## Generic methods (every handle)
|
||||
|
||||
Every typed handle (`Solid`, `Line`, `Circle`, `Polyline`, `Point`, `Entity`) is a
|
||||
|
||||
Reference in new issue
Block a user