cad_object
Create, read, update, delete, copy, transform, list, and boolean-operate on CAD geometry objects in the current document.
Instructions
Create, read, update, delete, copy, transform, list or boolean objects.
聚合对象操作。按 ``action`` 派发:create / read / update / delete / copy /
transform / list / boolean。
- ``create``: add an entity by ``type`` (line, circle, arc, rectangle,
polygon, polyline, box, cylinder, sphere, cone) with ``params``;
returns the new ``object_id`` and bounding box.
- ``read`` / ``update`` / ``delete`` / ``copy``: inspect, edit (geometry /
layer / properties), remove, or duplicate an object by ``object_id``.
- ``transform``: apply a 4x4 matrix (column-major, translation in the
fourth column) for translate / rotate / scale.
- ``list``: enumerate objects, optionally filtered by ``layer``.
- ``boolean``: combine objects (union / subtract / intersect) into a new
mesh; requires the optional ``boolean`` extra.
When not to use: ``cad_object`` edits the current document's geometry.
For interop file formats use ``cad_file`` (import/export); for JSON
scene round-trips use ``cad_json``; for measurements on existing objects
use ``cad_measure``; for geometric validation use ``cad_validate``.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| object | Yes | Object action to perform, discriminated by `action`: create, read, update, delete, copy, transform, list or boolean. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bbox | No | Bounding box | |
| type | No | Object type | |
| layer | No | Layer name | |
| action | Yes | Object action executed | |
| status | Yes | Operation status | |
| message | No | Status description | |
| objects | No | Object summaries | |
| geometry | No | Geometry parameters | |
| object_id | No | Object unique identifier | |
| result_id | No | Result object id (boolean / copy) | |
| properties | No | Object properties |