Skip to content
Rene K. Mueller edited this page Nov 18, 2018 · 35 revisions

Usage

% print3r [<options>] <command> <file1> ...

commands:

  • print: print the part (and perform necessary conversions to achieve print)
  • slice: just slice the part to gcode with slic3r, slicer-pe or cura
  • preview: preview print as gcode
  • render: render image of print
  • gcode: send Gcode from command-line
  • gconsole: start Gcode console to interactively send commands

Print (Convert & Slice & Print)

% print3r print cube.scad
% print3r print cube.stl
% print3r print cube.gcode
% print3r --scad print "cube(20)"

Slice (Without Printing)

Just slice the part to Gcode:

% print3r --output=cube.gcode slice cube.scad
% print3r --output=cube.gcode slice cube.stl

Preview (Preview without Printing)

Preview the resulting Gcode:

% print3r preview cube.scad
% print3r preview cube.stl
% print3r preview cube.gcode
% print3r --scad preview "cube(20)"

Render (View without Printing)

Render the Gcode into an image:

% print3r --output=test.png render cube.scad
% print3r --output=test.png --scad render "cube(20)"
% print3r --output=test.png render cube.stl
% print3r --output=test.png render cube.gcode

Usage Overview

Print3r (print3r) 0.1.6 USAGE: [<options>] <cmd> <file1> [<...>]

   options:
      --verbose or -v or -vv  increase verbosity
      --quiet or -q           no output except fatal errors
      --baudrate=<n>          set baudrate, default: 115200
      --device=<d>            set device, default: /dev/ttyUSB0
      --slicer=<slicer>       set slicer, default: slic3r
                                 slic3r, slic3r-pe, cura-legacy, cura
      --printer=<name>        config of printer, default: default
      --version               display version and exit
      --output=<file>         define output file for 'slice' and 'render' command
      --scad                  consider all arguments as actual OpenSCAD code (not files)
      --scadlib=<files>       define OpenSCAD files separated by "," or ":"
      part preprocessing:
         --random-placement   place print randomly on the bed
         --auto-center        place print in the center
         --multiply-part=<n>  multiply part(s)
         --scale=<x>,<y>,<z>     scale part x,y,z (absolute if 'mm' is appended)
         --scale=<f>             scale part f,f,f
         --rotate=<x>,<y>,<z>    rotate x,y,z
         --translate=<x>,<y>,<z> translate x,y,z
         --mirror=<x>,<y>,<z>    mirror x,y,z (0=keep, 1=mirror)
       --<key>=<value>        include any valid slicer option (e.g. slic3r --help)

   commands:
      print <file> [...]      print (convert & slice & print) part(s) (.scad, .stl, .obj, .gcode)
      slice <file> [...]      slice file(s) to gcode (.scad, .stl, .amf, .obj, .3mf)
      preview <file> [...]    slice & preview (.scad, .stl, .obj, .gcode)
      render <file> [...]     render an image (use '--output=sample.png' or so)
      gcode <code1> [...]     send gcode lines
      gconsole                start gcode console
      help

   examples:
      export PRINT3R "printer=my_printer" --OR-- setenv PRINT3R "printer=my_printer"
      print3r slice cube.stl  
      print3r --layer-height=0.2 --output=test.gcode slice cube.stl
      print3r --printer=ender3 --device=/dev/ttyUSB1 print test.gcode
      print3r --printer=corexy --device=/dev/ttyUSB2 --nozzle-diameter=0.5 --layer-height=0.4 --fill-density=0 print cube.stl
      print3r print cube.scad 
      print3r --scad print "cube(20)"
      print3r gcode 'G28 X Y' 'G1 X60' 'G28 Z'
      print3r gconsole
      == Print3r: Gcode Console (gconsole) - use CTRL-C or 'exit' or 'quit' to exit
         for valid Gcode see https://reprap.org/wiki/G-code
         conf: device /dev/ttyUSB0, connected
      > M115                        
      ...

Slicers

Following slicers are supported via --slicer=<slicer>:

  • slic3r: Slic3r
  • slic3r-pe: Slic3r Prusa Edition
  • cura-legacy: CuraEngine 15.04 with old profiles
  • cura: CuraEngine 3.x or later

/usr/share/print3r/slicer/<slicer>/base.ini contains the base settings for a particular slicer.

Print

print command converts, slices and sends the resulting Gcode to the USB port of your choice.

Slice

slice command converts and slices the model to Gcode file, best set --output=file.gcode to define the filename.

Preview

preview command converts, slices and display the resulting Gcode with yagv Gcode viewer.

Render

render command converts, slices and renders the resulting Gcode into a PNG image, best set --output=test.png to define the filename.

Gcode Console (gconsole)

gconsole command launches an interactive console to send Gcode and custom commands to USB connected printer:

== Print3r: Gcode Console (gconsole) - use CTRL-C or 'exit' or 'quit' to exit
   for valid Gcode see https://reprap.org/wiki/G-code
conf: device /dev/ttyUSB0, connected
> 

Commands

  • any valid Gcode line
  • in gconsole/commands reside a few gcode script which simplify handling:
    • home, homex, homey, homez, hx, hy, hz: homing all or individual axis
    • left <n>, right <n> move left or right (X-axis) relatively
    • up <n>, down <n> move up or down (Z-axis) relatively
    • forward <n>, back <n> move forward or back (Y-axis) relatively
    • x <n>, y <n>, z <n> move each axis absolutely
    • nozzle <temp> set nozzle temperature
    • bed <temp> set bed temperature
    • off turn everything off (motors, nozzle, bed)

Examples

> homex
send <G28 X>
-----
X:0.00 Y:0.00 Z:5.00 E:0.00 Count X:0 Y:0 Z:16000
ok
.
> right 10
send <G91>
-----
X:0.00 Y:0.00 Z:5.00 E:0.00 Count X:0 Y:0 Z:16000
ok
.
send <G1 X10>
-----
ok
.
> _
Clone this wiki locally