export_stl
Export the active SOLIDWORKS part or assembly to an STL file for 3D printing or meshing, setting resolution, file unit and binary or ASCII format without altering the document.
Instructions
Export the active part or assembly as an STL file (.stl) for 3D printing or meshing: one file, in the model's own coordinates. resolution: fine (the default), coarse, or custom with deviation and angle. file_unit is the unit the file's numbers are in (STL files carry none): the document's length unit by default, or mm if that is not mm, cm, m, inch or ft. The document is not saved, renamed or changed, and SolidWorks' STL settings are put back afterwards. Reports the triangles and the file's bounding box in mm next to the model's. An STL file carries no unit: tell the user the file_unit the result names.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filepath": "<filepath>"
},
"name": "export_stl"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | Unit of deviation: mm, cm, m, inch or ft (default: the session unit, mm unless set_units changed it) | |
| angle | No | With resolution custom: the largest angle between neighbouring triangles, degrees (0-90] | |
| format | No | File format | binary |
| filepath | Yes | Where to write it, e.g. C:\Work\bracket.stl | |
| deviation | No | With resolution custom: the largest gap between the triangles and the true surface (in unit) | |
| file_unit | No | Unit of the numbers in the file (default the document's length unit) | |
| resolution | No | How finely curved faces are cut into triangles | fine |