ocs_doc_api: Phase 5 (media & misc, read-mostly)

- entity_kind_name names the media/misc families (RasterImage, Table, Leader,
  MultiLeader, MLine, Mesh, Helix, Region, Body, Surface, Face3D, Dimension,
  Hatch) so GetEntity reports a real kind instead of 'Other'.
- RasterImage coarse bounds (insertion + u*width + v*height).
- Generic delete already works on these families; no typed create in v1
  (read-only EntityView per plan).
- spec RasterImage/Table read-mostly families; IMPLEMENTATION.md updated.
- Test phase5_media_entities_read_kind_and_bounds -> 601 host lib green.
This commit is contained in:
Sebastian committed 2026-09-06 01:22:28 +02:00
1 parent 7a481c6ce2
commit f24c0b2d75
6 files changed
+110 -4

No files matched your search

+8 -4
View File
@@ -75,10 +75,14 @@ variants append at enum end.
viewport-view query (view target/center/scale DTOs).
### Phase 5 — media & misc (read-mostly)
- **Entities:** raster image, underlay, table, light.
- **Methods:** CRUD + property queries; few/no geometric actions. These families
largely stay read-only `EntityView` DTOs — typed ops only where the spec
declares an action mapping.
- **Done:** media/misc families report a **real `kind`** via `GetEntity`
(`RasterImage`, `Table`, `Leader`, `MultiLeader`, `MLine`, `Mesh`, `Helix`,
`Region`, `Body`, `Surface`, `Face3D`, `Dimension`, `Hatch`) instead of "Other";
`RasterImage` has coarse bounds (insertion + u·width + v·height); generic
`delete` works on all. Covered by `phase5_*` test.
- **Remaining:** typed create/property ops for `RasterImage`/`Table`/light;
these largely stay read-only `EntityView` DTOs (typed ops only where the spec
declares an action mapping).
## 🔧 Outstanding methods on supported families
+19
View File
@@ -267,6 +267,25 @@ name = "create_viewport"
args = [{ name = "center", ty = "[f64; 3]" }, { name = "width", ty = "f64" }, { name = "height", ty = "f64" }, { name = "view_target", ty = "[f64; 3]" }, { name = "view_height", ty = "f64" }]
op = "CreateViewport"
# ============================================================================
# MEDIA & MISC (phase 5, read-mostly) — read-only EntityView, no typed create.
# These families report a real `kind` via GetEntity and coarse bounds where
# computable; they have no typed construction/geometric ops in v1.
# ============================================================================
[[family]]
name = "RasterImage"
acadrust_variant = "RasterImage"
handle = "Entity"
collection = "entities"
description = "Raster image (read-mostly): GetEntity kind + coarse bounds (insertion + u*width + v*height); generic delete. No typed create in v1."
[[family]]
name = "Table"
acadrust_variant = "Table"
handle = "Entity"
collection = "entities"
description = "Table (read-only): GetEntity kind; generic delete. No typed create/bounds in v1."
# ============================================================================
# Cross-cutting ops (generic handles + bulk) — documented in build.rs
# ============================================================================
@@ -103,6 +103,14 @@ Paper-space viewport: a width×height window at center looking at view_target wi
- **create_viewport**(`center: [f64; 3], width: f64, height: f64, view_target: [f64; 3], view_height: f64`) -> `Entity`
## `Entity` (acadrust `RasterImage`, collection `entities`)
Raster image (read-mostly): GetEntity kind + coarse bounds (insertion + u*width + v*height); generic delete. No typed create in v1.
## `Entity` (acadrust `Table`, collection `entities`)
Table (read-only): GetEntity kind; generic delete. No typed create/bounds in v1.
## Generic methods (every handle)
Every typed handle (`Solid`, `Line`, `Circle`, `Polyline`, `Point`, `Entity`) is a
@@ -201,6 +201,20 @@
"handle": "Entity",
"methods": [],
"name": "Viewport"
},
{
"acadrust_variant": "RasterImage",
"collection": "entities",
"handle": "Entity",
"methods": [],
"name": "RasterImage"
},
{
"acadrust_variant": "Table",
"collection": "entities",
"handle": "Entity",
"methods": [],
"name": "Table"
}
],
"layouts": {