export_geometry
Export finalized COMSOL geometry to STL, STEP, IGES, Parasolid, ACIS, or native files; validates the output on disk for CAD or analysis workflows.
Instructions
Export a finalized geometry to STL, STEP, IGES, Parasolid, ACIS or native.
Uses COMSOL's geometry export tool: setType(...) then
geom.export(path). The file is validated on disk.
Args:
type: stl/stlbin (default), stlascii, step, iges,
parasolidbin (.x_b), parasolidascii (.x_t), acisbin
(.sab), acisascii (.sat), nativebin (.mphbin),
nativeascii (.mphtxt).
tag: geometry sequence tag (default "geom1").
path: output file path (auto under artifact root when omitted).
component: component owning the geometry (default "comp1").
selection: optional geometry object numbers to export; omit for all.
model: model name/tag (None = current model).
Notes: STEP/IGES/Parasolid/ACIS need the CAD Import Module or a CAD LiveLink license; STL and native formats work with the base installation. STL exports the boundary surface of the geometry.
Example: export_geometry("step", path="C:/out/part.step") export_geometry("stl", path="C:/out/part.stl")
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "export_geometry"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | geom1 | |
| path | No | ||
| type | No | stl | |
| model | No | ||
| component | No | comp1 | |
| selection | No |