cad_assembly
Create and manage mechanical assemblies: add parts, constrain with mates, solve constraints, generate BOMs, and create exploded views.
Instructions
Create, edit, solve or analyze an assembly.
聚合装配操作。按 ``action`` 派发:create / add_part / add_subasm /
add_mate / remove_part / solve / bom / explode。
- ``create``: initialize the document's assembly container.
- ``add_part`` / ``add_subasm``: build the tree; parts may reference a
document ``entity_id`` and nest under a ``parent_id``.
- ``add_mate``: constrain two nodes (coincident / concentric / parallel /
perpendicular / distance / angle).
- ``solve``: apply mates in order and return every node's world transform.
- ``bom``: flattened bill of materials (``format`` json or csv).
- ``explode``: radial offsets by tree depth (``direction`` x/y/z).
When not to use: ``cad_assembly`` composes *parts*, not geometry. Create
part geometry first with ``cad_object`` (create), then add it to the
assembly. For drawings of an assembly use ``cad_drawing``.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| assembly | Yes | Assembly action to perform, discriminated by `action`: create, add_part, add_subasm, add_mate, remove_part, solve, bom or explode. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bom | No | BOM rows | |
| csv | No | CSV text when requested | |
| name | No | Assembly / node name | |
| action | Yes | Assembly action executed | |
| status | Yes | Operation status | |
| mate_id | No | Mate identifier | |
| message | No | Status description | |
| node_id | No | Assembly node identifier | |
| records | No | Exploded positions | |
| mate_type | No | Mate type | |
| mate_count | No | Number of mates solved | |
| part_count | No | Total number of parts | |
| transforms | No | World transform of every node | |
| assembly_id | No | Assembly identifier |