forked from 1b-agent/opencadstudio-upstream
ocs_doc_api: Phase 2c-iii — 2-line angular dimension (all dimension sub-types done)
- CreateDimensionAngular2Ln(DimensionAngularSpec) op (append-only). - backend add_dimension_angular2ln (DimensionAngular2Ln::new computes angle). - facade create_dimension_angular2ln; spec constructor; api_reference + binding_schema regenerated; mocks + baseline. - IMPLEMENTATION.md: fix stale Status line (all 5 phases complete, current test counts); mark all dimension sub-types done. - Test phase2ciii_dimension_angular2ln (90-degree 2-line angle) -> 616 host lib + 3 consistency green.
This commit is contained in:
1 parent
240831edcd
commit
612e8e13e0
12 files changed
+82
-7
No files matched your search
@@ -146,6 +146,11 @@ impl DocApiBackend for MockBackend {
|
||||
}
|
||||
Ok(self.alloc("AttributeDefinition"))
|
||||
}
|
||||
fn add_dimension_angular2ln(&mut self, _spec: &ocs_doc_api::ops::DimensionAngularSpec) -> ApiResult<ObjectId> {
|
||||
let id = self.alloc("Dimension");
|
||||
self.dimension_measurements.insert(id, 90.0); // mock: 90 degrees
|
||||
Ok(id)
|
||||
}
|
||||
fn add_table(&mut self, spec: &ocs_doc_api::ops::TableSpec) -> ApiResult<ObjectId> {
|
||||
let cols = spec.data.first().map(|r| r.len()).unwrap_or(0);
|
||||
if spec.data.is_empty() || cols == 0 || spec.data.iter().any(|r| r.len() != cols) {
|
||||
|
||||
@@ -71,6 +71,7 @@ fn operation_variants() -> Vec<String> {
|
||||
tag: String::new(), prompt: String::new(), default_value: String::new(), insertion_point: [0.0; 3], height: 0.0, rotation: 0.0,
|
||||
}),
|
||||
Operation::CreateTable(ocs_doc_api::ops::TableSpec { insertion_point: [0.0; 3], data: vec![] }),
|
||||
Operation::CreateDimensionAngular2Ln(ocs_doc_api::ops::DimensionAngularSpec { vertex: [0.0; 3], first_point: [0.0; 3], second_point: [0.0; 3], arc_location: [0.0; 3] }),
|
||||
];
|
||||
// Derive the variant names by serializing a probe of each and reading the
|
||||
// bincode variant index -> name map is not available; instead match by
|
||||
@@ -165,6 +166,7 @@ const OPERATION_BASELINE: &[&str] = &[
|
||||
"CreateDimensionAngular",
|
||||
"CreateAttributeDefinition",
|
||||
"CreateTable",
|
||||
"CreateDimensionAngular2Ln",
|
||||
];
|
||||
|
||||
/// Recorded baseline of the `Query` variant order.
|
||||
|
||||
Reference in new issue
Block a user