← 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

FeatureOpenSCADPPSCAD
ParametersCustomizer annotations in commentsFirst-class param keyword with type, range, label
Modulesmodule name() { ... }mod name() { ... }
Functionsfunction name() = ...fn name() = ...
Variablesname = value;let name = value
SemicolonsRequiredNot required
RenderDesktop app (F5/F6)Browser - Cmd+Enter
SharingExport STL, share fileShare URL with live parameters
InstallDesktop download requiredNone - runs in browser
ExecutionNative, CGALWASM, 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 module with mod
  • Replace function with fn
  • Remove semicolons (optional but cleaner)
  • Replace customizer annotations with param declarations
  • Replace cube([x,y,z]) with cube(x, y, z)
  • Replace $fn with the resolution parameter on primitives if needed