Convert an OpenSCAD file to a STEP file, from the command line. No Python knowledge required.
uvx scad2step yourfile.scad -o out.stepSTEP is the standard interchange format nearly every CAD program (Fusion 360, SolidWorks, FreeCAD) reads as a real solid body with exact curves — unlike OpenSCAD's own STL export, which is always a mesh of flat triangles. scad2step gets this by handing your file to the real OpenSCAD program (so every language feature and library works exactly as it always has) and rebuilding the result on build123d's OpenCASCADE kernel instead of a mesh — see scad123d, which does the actual conversion work, for the details and the Python API.
- uv — a package
manager for Python programs. It's what runs the
uvx scad2step ...command below, and installing it gets you everything else scad2step needs to run (including Python itself) automatically — no separate Python setup required. - The OpenSCAD program installed.
scad2step looks for it on your
$PATHand in the usual install locations automatically; if it's somewhere else, set$SCAD123D_OPENSCADto point at it directly.
uvx scad2step yourfile.scad -o out.stepLeave out -o and the output defaults to the input filename with a .step
extension:
uvx scad2step yourfile.scad # writes yourfile.stepPass variable overrides the same way OpenSCAD's own -D flag does, if your
file has top-level variables you want to set from the command line (a -D name=value for each one):
uvx scad2step yourfile.scad -o out.step -D width=40 -D holes=6Run uvx scad2step --help for the rest of the options (mesh fallback
behavior, timeout, etc.) — the defaults are right for almost everyone.
uvx runs scad2step without installing anything persistent. If you'd rather
have the command always available:
uv tool install scad2stepMIT