cad_execute_script
Executes JavaScript to generate large or procedural geometry (loops, patterns, algorithms) without spending context tokens. Runs in a separate Node process that cannot write files, start programs or read anything outside the CAD sources; 30 s limit. Variables: CAD, M (CADMath), G (CADGeometry), E (CADEntities), S (CADState), D (CADDXF), L (CADLayouts), parametric, solid(recipe) (adds a 3D solid), console. Changes to the drawing are kept.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | JavaScript code to execute. Can call S.addEntity(), parametric.*, M.*, E.*, etc. |