Cxddie

OpenSCAD

Solid modelling as plain source, rendered by the OpenSCAD CLI.

Kind: Code CAD · Document: .scad · Install: brew install --cask openscad · winget install OpenSCAD.OpenSCAD · Override: CXDDIE_OPENSCAD

The model is the .scad file in the workspace (usually model.scad). Cxddie renders it with the OpenSCAD CLI and updates the live view on every render.

What agents get

run_code replaces the .scad file with the complete source passed in and renders it. An empty string re-renders the file as it is on disk — useful when the agent edits the file with its own tools. It returns ECHO / WARNING output plus the rendered size, volume and bounding box. Syntax and CGAL errors come back as tool errors.

Conventions agents are told

  • Units are millimetres, Z up.
  • Prefer named modules and top-level parameters so the model stays easy to change.
  • Use $fn for smooth curves.
length = 60; width = 30; t = 6; $fn = 64;

module plate() {
  difference() {
    cube([length, width, t]);
    for (y = [8, 22]) translate([40, y, -1]) cylinder(d = 5, h = t + 2);
  }
}
plate();

On this page