pcb_place_3d_body
Place a STEP model directly on an open PCB as a free 3D body, not inside a component or library footprint. Use it for fixtures, enclosures, or test devices that are not parts.
Instructions
Place a STEP model directly on the open PCB, as a free 3D body.
The equivalent of Altium's Place > 3D Body > Generic STEP Model: the model lands on the document itself, not inside a component.
USE THIS RATHER THAN lib_link_3d_model WHEN THE MODEL IS NOT
A PART. That tool writes into a .PcbLib footprint, so putting a
fixture, an enclosure or a device-under-test onto a board with it
means inventing a library, authoring a footprint, placing it and
then deleting all of that again. Reach for it only when the model
genuinely belongs to a component in a library.
Rotation cannot be set from here. IPCB_ComponentBody exposes
no Rotation, and the rotation that does exist lives on the
model behind an undocumented four-argument call, so the reply
reports rotation_applied: false rather than guessing. Rotate
in the editor if the orientation is wrong.
Args: model_path: absolute path to the .step / .stp file. x: body origin X in mils. This is the model's own origin, so where it lands depends on how the STEP was authored; check it against a known feature such as a silkscreen outline rather than assuming it is centred. y: body origin Y in mils. layer: board layer to attach it to. Default TopLayer. standoff_height: height in mils of the body's underside above the board. 0 sits it on the surface.
Returns:
{"success": true, "model_path": ..., "x": N, "y": N, "layer": ..., "standoff_height": N, "standoff_applied": bool, "rotation_applied": false, "note": ...}. The x and y are
READ BACK from the placed body, not echoed, because the
position is the one thing that cannot be checked without
opening the 3D view.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| layer | No | TopLayer | |
| model_path | Yes | ||
| standoff_height | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||