← Docs
PPSCAD vs OpenSCAD
PPSCAD is heavily inspired by OpenSCAD. If you know OpenSCAD, you will feel at home. Here are the key differences.
What is the same
- CSG approach: union, difference, intersection
- Same primitives: cube, cylinder, sphere
- Same transforms: translate, rotate, scale
- Extrude and revolve for 2D-to-3D
- Hull operation
- For loops and if/else
What is different
| Feature | OpenSCAD | PPSCAD |
|---|---|---|
| Parameters | Customizer annotations in comments | First-class param keyword with type, range, label |
| Modules | module name() { ... } | mod name() { ... } |
| Functions | function name() = ... | fn name() = ... |
| Variables | name = value; | let name = value |
| Semicolons | Required | Not required |
| Render | Desktop app (F5/F6) | Browser - Cmd+Enter |
| Sharing | Export STL, share file | Share URL with live parameters |
| Install | Desktop download required | None - runs in browser |
| Execution | Native, CGAL | WASM, client-side |
Syntax comparison
OpenSCAD
// OpenSCAD
$fn = 60;
width = 40; // [10:100]
height = 20; // [5:50]
wall = 2; // [1:5]
difference() {
cube([width, height, 20]);
translate([wall, wall, wall])
cube([width-wall*2, height-wall*2, 21]);
}PPSCAD
// PPSCAD
param width: float = 40 [10:100] "Width (mm)"
param height: float = 20 [5:50] "Height (mm)"
param wall: float = 2 [1:5:0.5] "Wall (mm)"
difference {
cube(width, height, 20)
translate(wall, wall, wall)
cube(width - wall*2, height - wall*2, 21)
}Migration tips
- Replace
modulewithmod - Replace
functionwithfn - Remove semicolons (optional but cleaner)
- Replace customizer annotations with
paramdeclarations - Replace
cube([x,y,z])withcube(x, y, z) - Replace
$fnwith the resolution parameter on primitives if needed