Import STEP
import_stepUse this when the user wants to start from their own STEP or STL file (a part they designed elsewhere, a vendor model). Give exactly one source: url (a public https direct-download link), upload (a file the user attached in ChatGPT), or content_base64 (raw bytes, small files only). Max 50 MB. The format is detected from the bytes (or pass format: 'step' | 'stl'). Writes the file and a starter .kcad.ts whose base body is lib.fromSTEP / lib.fromSTL into output_dir (default: a fresh temp dir), evaluates it, and returns { ok, format, model_path, script_path, code, bbox }. Pass script_path as { file } to evaluate_script, add_feature, dfm_review, export and the other tools, or edit code to build on the body. STL is a mesh: booleans, bbox and export work, but faces stay planar facets (use mesh_to_features for an editable feature tree). A non-watertight STL is refused unless allow_open is true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public https URL that downloads the .step/.stp/.stl file directly. | |
| name | No | Base name for the written files. Default 'imported'. | |
| format | No | Override format detection. | |
| upload | No | ChatGPT file reference for a file the user attached. | |
| file_name | No | Original file name, used for format detection. | |
| allow_open | No | STL only: accept a non-watertight mesh as an open shell. | |
| output_dir | No | Where to write the file and starter script. Default: a new temp directory. | |
| content_base64 | No | The file bytes, base64-encoded (small files). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||