forked from 1b-agent/opencadstudio-upstream
ocs_doc_api: Phase 4 (paper-space viewports)
- Operation::CreateViewport(ViewportSpec) appended to the wire enum (append-only). - backend add_viewport (center/width/height/view_target/view_height). - Viewport bounds (center +- w/2,h/2), transform (moves center), ensure_transformable. - facade EntityCollection::create_viewport; spec Viewport family; api_reference + binding_schema regenerated; mocks updated. - Test phase4_create_viewport_bounds_transform -> 600 host lib green. - IMPLEMENTATION.md: Phase 4 done (set_view/view-query remaining).
This commit is contained in:
1 parent
b03f68737e
commit
7a481c6ce2
13 files changed
+150
-5
No files matched your search
@@ -67,6 +67,18 @@ pub struct InsertSpec {
|
||||
pub rotation: f64,
|
||||
}
|
||||
|
||||
/// Construction spec for a paper-space `VIEWPORT`: a `width`×`height` viewport
|
||||
/// centered at `center` (paper space), looking at `view_target` (model space,
|
||||
/// WCS) with `view_height` (model-space height visible; the viewport's zoom).
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub struct ViewportSpec {
|
||||
pub center: [f64; 3],
|
||||
pub width: f64,
|
||||
pub height: f64,
|
||||
pub view_target: [f64; 3],
|
||||
pub view_height: f64,
|
||||
}
|
||||
|
||||
/// A rigid similarity (rotation + translation + optional uniform scale/reflection)
|
||||
/// as a plain-data mirror of `cadkernel::brep::transform`'s `Placement`
|
||||
/// (non-serde). Columns are the new basis axes; `origin` is the translation.
|
||||
@@ -115,6 +127,7 @@ impl crate::gen::Operation {
|
||||
TransformMany { .. } => "TransformMany",
|
||||
DeleteMany(_) => "DeleteMany",
|
||||
CreateInsert(_) => "CreateInsert",
|
||||
CreateViewport(_) => "CreateViewport",
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user