forked from 1b-agent/opencadstudio-upstream
ocs_doc_api: Phase 5 typed raster image create
- CreateRasterImage(RasterImageSpec) op (append-only). - backend add_raster_image (RasterImage with file_path/insertion/u/v/size; the scene auto-registers the ImageDefinition on add_entity). - facade create_raster_image; spec RasterImage constructor; api_reference + binding_schema regenerated; mocks + baseline. - Test phase5_create_raster_image_registers_definition (asserts definition_handle auto-registered + 4-corner bounds) -> 610 host lib + 3 consistency green. - Phase 5 complete.
This commit is contained in:
1 parent
e6c132e0eb
commit
46a5922520
12 files changed
+109
-6
No files matched your search
@@ -115,6 +115,19 @@ pub struct DimensionSpec {
|
||||
pub definition_point: [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.
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub struct RasterImageSpec {
|
||||
pub file_path: String,
|
||||
pub insertion_point: [f64; 3],
|
||||
pub u_vector: [f64; 3],
|
||||
pub v_vector: [f64; 3],
|
||||
/// Pixel size (width, height).
|
||||
pub size: [f64; 2],
|
||||
}
|
||||
|
||||
/// 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.
|
||||
@@ -171,6 +184,7 @@ impl crate::gen::Operation {
|
||||
CreateDimensionLinear(_) => "CreateDimensionLinear",
|
||||
SetAttribute { .. } => "SetAttribute",
|
||||
SetViewportView { .. } => "SetViewportView",
|
||||
CreateRasterImage(_) => "CreateRasterImage",
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user