assembly_new_component
Creates an empty component with a new occurrence under root or a parent, optionally offset in millimeters, so you can build geometry after activation.
Instructions
Create an empty component with one new occurrence, under root or inside the
component of parent, optionally offset by translate_mm (mm). Build its geometry
after activating it (assembly_activate) or by targeting the component.
Returns {"component": "component:", "occurrence": occurrence}. Occurrence object: {"ref": "occurrence:", "transform", "is_grounded", ...}. The whole call is undone on failure.
Example: assembly_new_component(name="Box") -> {"component": "component:Box", "occurrence": {"ref": "occurrence:Box:1", "transform": {"translation_mm": [0, 0, 0], ...}}}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Component name (unique in the design) | |
| parent | No | Parent occurrence ref; default: the root component | |
| translate_mm | No | [dx, dy, dz] in mm, in assembly space |