ocs_doc_api: Phase 2b-a (Text/MText annotations)

- CreateText/CreateMText/SetTextContent ops + GetTextContent query (append-only).
- backend add_text/add_mtext/set_text_content/text_content (Text.value/MText.value).
- facade create_text/create_mtext + Text/MText handles with content()/set_content().
- Text/MText coarse bounds + transform (insertion point); ensure_transformable.
- spec Text/MText families; api_reference + binding_schema regenerated; mocks.
- can_modify backend hook (exists + not-locked) for SetTextContent validation.
- consistency baseline extended with the appended variants.
- Test phase2b_text_mtext_create_content_transform -> 605 host lib + 3 consistency green.
This commit is contained in:
Sebastian committed 2026-09-06 09:07:41 +02:00
1 parent 1925a83a25
commit fc0e2c2c9d
16 files changed
+449 -4

No files matched your search

+53
View File
@@ -237,6 +237,59 @@ args = [{ name = "origin", ty = "[f64; 3]" }, { name = "direction", ty = "[f64;
op = "CreateCurve"
fixed = { curve = "XLine" }
# ============================================================================
# ANNOTATION FAMILY (phase 2b) — text annotations
# ============================================================================
[[family]]
name = "Text"
acadrust_variant = "Text"
handle = "Text"
collection = "curves"
description = "Single-line text annotation. content()/set_content() read+replace the value; transform moves insertion point."
[[family.constructor]]
name = "create_text"
args = [{ name = "value", ty = "&str" }, { name = "insertion_point", ty = "[f64; 3]" }, { name = "height", ty = "f64" }, { name = "rotation", ty = "f64" }]
op = "CreateText"
[[family.method]]
name = "content"
kind = "query"
query = "GetTextContent"
returns = "String"
[[family.method]]
name = "set_content"
kind = "op"
op = "SetTextContent"
args = [{ name = "value", ty = "&str" }]
returns = "()"
[[family]]
name = "MText"
acadrust_variant = "MText"
handle = "MText"
collection = "curves"
description = "Multi-line text annotation. content()/set_content() read+replace the value; transform moves insertion point."
[[family.constructor]]
name = "create_mtext"
args = [{ name = "value", ty = "&str" }, { name = "insertion_point", ty = "[f64; 3]" }, { name = "height", ty = "f64" }]
op = "CreateMText"
[[family.method]]
name = "content"
kind = "query"
query = "GetTextContent"
returns = "String"
[[family.method]]
name = "set_content"
kind = "op"
op = "SetTextContent"
args = [{ name = "value", ty = "&str" }]
returns = "()"
# ============================================================================
# CONTAINER FAMILY (phase 3) — block references
# ============================================================================