forked from 1b-agent/opencadstudio-upstream
ocs_doc_api: Phase 2c-ii — dimension sub-types (radius/diameter/angular)
- CreateDimensionRadius/CreateDimensionDiameter (DimensionRadialSpec) + CreateDimensionAngular (DimensionAngularSpec) ops (append-only). - backend add_dimension_radius/diameter (DimensionRadius/DimensionDiameter::new) + add_dimension_angular (DimensionAngular3Pt::new computes angle); dimension_measurement returns degrees for angular sub-types. - facade create_dimension_radius/diameter/angular; spec constructors; api_reference + binding_schema regenerated; mocks + baseline. - Test phase2cii_dimension_radius_diameter_angular -> 613 host lib + 3 consistency green.
This commit is contained in:
1 parent
2522979285
commit
8d8c120880
12 files changed
+205
-3
No files matched your search
@@ -116,6 +116,26 @@ pub struct DimensionSpec {
|
||||
pub definition_point: [f64; 3],
|
||||
}
|
||||
|
||||
/// Construction spec for a radial/diameter `DIMENSION`: the circle center and a
|
||||
/// point on the circle (radius) or a chord point (diameter).
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub struct DimensionRadialSpec {
|
||||
/// Center of the arc/circle (radius) or first chord point (diameter).
|
||||
pub center: [f64; 3],
|
||||
/// A point on the arc/circle (radius) or the far chord point (diameter).
|
||||
pub point: [f64; 3],
|
||||
}
|
||||
|
||||
/// Construction spec for a 3-point angular `DIMENSION`: vertex + one point on
|
||||
/// each leg, plus the dimension-arc location.
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub struct DimensionAngularSpec {
|
||||
pub vertex: [f64; 3],
|
||||
pub first_point: [f64; 3],
|
||||
pub second_point: [f64; 3],
|
||||
pub arc_location: [f64; 3],
|
||||
}
|
||||
|
||||
/// Construction spec for a `RASTER_IMAGE`: an image file placed at
|
||||
/// `insertion_point` with per-pixel world-unit vectors `u_vector`/`v_vector` and
|
||||
/// pixel `size` (width, height). The host auto-registers the ImageDefinition.
|
||||
@@ -187,6 +207,9 @@ impl crate::gen::Operation {
|
||||
SetViewportView { .. } => "SetViewportView",
|
||||
CreateRasterImage(_) => "CreateRasterImage",
|
||||
Loft { .. } => "Loft",
|
||||
CreateDimensionRadius(_) => "CreateDimensionRadius",
|
||||
CreateDimensionDiameter(_) => "CreateDimensionDiameter",
|
||||
CreateDimensionAngular(_) => "CreateDimensionAngular",
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user