create_component
Create 3D primitives (cube, cylinder, cone, sphere) in SketchUp by specifying type, position, dimensions, and optional name. Returns bounding box for verification.
Instructions
Create a primitive (cube / cylinder / cone / sphere) in SketchUp.
All linear values are millimeters (mm). Minimum size per dimension: 0.1 mm for cube (thin stock like veneer is fine), 1.0 mm for sphere / cylinder / cone (tessellated types degenerate earlier). position is the bounding-box MIN corner (not the center); the same anchor is used by transform_component.position. Per-type dimensions: cube uses [x, y, z]; cylinder and cone use [0]=diameter, [2]=height ([1] is ignored); sphere uses [0]=diameter only. New geometry is wrapped in a SketchUp Group.
Returns: JSON {id, name, type, bbox_mm{min,max}|null}. Read bbox_mm to verify the result before the next step.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional name for the new group so find_components can locate it later | |
| type | No | Primitive type to create | cube |
| position | No | Bounding-box MIN corner [x, y, z] in mm (not the center) | |
| dimensions | No | Sizes [x, y, z] in mm; cylinder/cone use [0]=diameter, [2]=height; sphere uses [0]=diameter |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |