Skip to content

Print3r: OpenSCAD

Rene K. Mueller edited this page Nov 14, 2018 · 4 revisions

Print3r integrates OpenSCAD nicely:

  • print (or preview or slice) OpenSCAD files
  • print (or preview or slice) OpenSCAD code from command line

OpenSCAD Files

Print3r automatically converts .scad files into .stl to process further:

% print3r print cube.scad
% print3r preview cube.scad
% print3r --output=cube.gcode slice cube.scad

OpenSCAD Code in Command Line

When using --scad flag Print3r takes OpenSCAD code as arguments:

% print3r --scad print 'cube(20)'
% printer --scad print 'scale([20,5,15]) sphere()'
% printer --scad preview 'rotate([30,45,45]) cube(30)'

Using Modules (and Libraries)

% print3r --scadlib=models/scad/washer.scad --scad print 'washer(5)' 'washer(5,20)' 'washer(5,16,5)'

which prints

  • washer M5 1mm thick
  • washer M5 20mm diameter 1mm thick
  • washer M5 16mm diameter 5mm thick

Multiple Libraries

The setting --scadlib=<files> allows multiple entries separated by ',' or ':':

% print3r --scadlib=.../lib/parts.scad,models/scad/washer.scad --scad print 'c_2020()' 'edge_idler_mount()'