Skip to content

v2.9.4 Custom non travel moves for CNC'ing

Compare
Choose a tag to compare
@remcoder remcoder released this 21 Jul 21:52
· 567 commits to develop since this release

This adds an option you can pass to GCode Preview to customize which commands are considered travel moves.

Originally, only commands that had an positive extrusion parameter (ex. G1 E10) are rendered differently from travel moves. But this doesn't work for CNC's. The convention for CNC's is to use G0/G00 for travel moves and cutting moves are done using G1/G2/G3 (or G01/G02/G03).

Here's an example of passing the new param:

 const preview = new GCodePreview.init({
    canvas: document.querySelector('.gcode-previewer'),
    nonTravelMoves: ['g1', 'g01', 'g2', 'g02', 'g3', 'g03']
  });