Difference between revisions of "CAM"

From ShapeOko
Jump to: navigation, search
(2D (Laser or plasma machines))
Line 151: Line 151:
See also:
See also:
* https://www.thuijzer.nl/image2gcode/ [https://www.reddit.com/r/CNC/comments/nnh0be/cnc_stl_files/gzvc77h/]
* https://fwei.tk/blog/opening-black-boxes.html [https://www.reddit.com/r/CNC/comments/e3k05y/rastercarve_a_freeopensource_alternative_to/]
* https://fwei.tk/blog/opening-black-boxes.html [https://www.reddit.com/r/CNC/comments/e3k05y/rastercarve_a_freeopensource_alternative_to/]
*[http://www.mattshaver.com/cncutils/bmp2cnc-0.22.tgz bmp2cnc] --- command line program to convert bitmaps to g-code, that runs in Linux, DOS and Windows http://www.mr-soft.net/en/bmp2cnc.html [https://www.shapeoko.com/forum/viewtopic.php?f=15&t=8696&p=66717#p66717]
*[http://www.mattshaver.com/cncutils/bmp2cnc-0.22.tgz bmp2cnc] --- command line program to convert bitmaps to g-code, that runs in Linux, DOS and Windows http://www.mr-soft.net/en/bmp2cnc.html [https://www.shapeoko.com/forum/viewtopic.php?f=15&t=8696&p=66717#p66717]

Revision as of 07:49, 29 May 2021

In this wiki-page we aim for listing all the available Free and Open Source CAM software. Please note that proprietary software have been moved to their own page. Also see Free software section in Wikipedia CAM. See also Interactive G-Code Generators.

CAM programs can generate several sorts of tool paths, and some CAM/previewing programs are able to transform one sort of G-code tool path into another as an optimization step. Examples of this include high speed machining (HSM) and proprietary systems such as Volumill [1] Page discussing such: http://www.cnccookbook.com/CCCAMToolpaths.htm

Some CAM programs will require the selection of a post-processor. The creation/customization of one is described in: G-Code: Post Processors.

File formats

Notes on file formats:


  • dxf --- AutoCAD’s drawing exchange format. Older versions are limited to only straight lines, files are either in Imperial or metric mode
  • stl --- stereo lithography triangle mesh. Often used for 3D printing stl is a general-purpose triangle mesh which may be processed by many CAM programs
  • SVG --- scalable vector graphics are intended for use on screens, so scaling is done in terms of pixels and defining how many pixels there are in a unit of measure is an afterthought, if considered at all. When trying an SVG file from a new drawing program, if possible always include an object of known dimension for scaling purposes.


  • STEP-->step/stp Standard for the Exchange of Product model data
  • IGES-->iges/igs Initial Graphics Exchange Specification
  • X3D
  • PHIGS-->(Programmer's Hierarchical Interactive Graphics System)
  • ACIS
  • VRML wrl-->Virtual Reality Modeling Language vector file
  • COLLADA dae
  • STL Stereolithography file format (binary and ANSI structure) surface triangulations, Standard Triangulated Language
  • OBJ Wavefront

Machine languages

  • G-code: gcode tutorial is a good reference material to get you started writing g-code by hand. This is a great point of reference once you get into creating your own gcode, or if you need to modify generated g-code. There is a list of editors for G-Code (some of which have syntax highlighting) on the Programming page.
  • OpenSBP
  • HPGL (Hewlett-Packard Graphics Language)
  • Cutter Location (CL) Data, APT


One common need for many CAM applications is a post-processor to convert from and internal G-code representation to a particular variant. Effort to collect them here: https://www.mycampost.com/ (note that it may include some commercial post-processors)[2]

QCAD has a CAM module implemented as a script: https://www.qcad.org/en/92-qcad-cam

Tool-path generators

Note that some CAD programs are able to directly export to G-code, FreeCAD for example has added a Path Workbench which is particularly capable, and certain other special purpose CAD tools may serve for CAM functions.

2D (Laser or plasma machines)

The simplest use case, software for this may also allow the machine to function as a plotter. Note that Grbl 1.0 and later over-ride M4 to enable lasermode.

A notable example of this potential is the nascent fork of the “MakerBot Unicorn G-Code Output for Inkscape Plugin”: https://github.com/Emerica/inkscape-shapeoko3 [3]

Type Name/Link Description
2D Laser laser-code Part-cutting software which does a “travelling salesman” routine to determine optimal path.
2D Laser JTech Photonic Inkscape plug-in
2D Laser Raster 2 Laser GCode generator[4]
2D Laser SnapFracturePop's Laser GCode converter Tool to modify G-code for use on a laser.
2D Laser LaserWeb up to version 3: LaserWeb3[5] Node.js based, Windows/Linux/Mac/Raspberry Pi/Vagrant supported, host software for Lasercutters/Engravers running Marlin/Smoothieware/Grbl/LasaurGrbl with integrated parametric Gcode generators, Raster support, as well as Raster and Vector Engraving. SVG and DXF supported for cutting, PNG, BMP, JPEG support for raster engraving.
2D Laser (Windows) Image2Gcode Image to Gcode converter, it is designed for laser engravers based on GRBL.

See also Font to G-Code CNC VB2005E which allows one to directly convert text using any Windows font into G-code which will cut to a specified depth.

See also the Windows tool G-code Optimizer lists on the G-Code Utilities

http://cammill.github.io/ https://github.com/cammill/cammill





http://www.hci.rwth-aachen.de/visicut --- https://github.com/t-oster/VisiCut

K40 Whisperer: Control software for the stock K40 Laser controller with M2nano controller board --- alternative to the the Laser Draw (LaserDRW) program that comes with the cheap Chinese laser cutters available on E-Bay and Amazon. Reads SVG and DXF files interprets the data and sends commands to the K40 controller to move the laser head and control the laser accordingly.[6]

c.f., https://github.com/mbugert/laserscad (interface for OpenSCAD.[7]



http://plas.mx/ --- open-source pure javascript CAM for plasma cutters [9]

3D printing

http://fullcontrolgcode.com/software --- https://github.com/AndyGlx/FullControl-GCode-Designer Article at: https://lucept.com/2021/04/28/fullcontrol-gcode-designer/


Kiri:Moto https://grid.space/kiri --- combination CAM tool [10] and slicer for FFF, lasercutting and rotary spindles. Noted as working well w/ OnShape.[11]

https://cam.openbuilds.com/ --- https://github.com/OpenBuilds/cam --- based on: https://github.com/LaserWeb [12] or maths it leverages off Clipper https://sourceforge.net/p/jsclipper/wiki/Home%206/ openjscad may be used for parametric work.



https://github.com/alanbattersby/OTWB [13]



Note that some 2.5D programs listed in the next section are also able to import images for CAM.

http://rastercarve.live/ [14] [15] https://github.com/built1n/rastercarve

Also see: CAD: Image Depth Maps

Processing technique: Image_Engraving: The Gold Method

Another option is to start with a 3D model, and then render that into a grayscale pixel image: https://www.reddit.com/r/CNC/comments/63eayp/how_to_create_this_type_of_gray_scale_image_for/dfuac1m/

Type Name/Link Description
2.5D Image engraving Scan2 CNC Convert image to G-Code.
2.5D Image engraving Reactor and Halftoner Windows programs (requiring DOT NET 3.5) to engrave pixel maps as either halftones or dot patterns.
2.5D Image engraving (opensource) Dmap2gcode Generates g-code to cut depth

based on a gray scale image darkness or lightness.

2.5D Image engraving LoboCNC LoboLitho.exe Very basic Windows program for converting bitmap images (.bmp files) to G-Code for carving lithophanes. C++ source included

See also:





Hole Tolerance

https://castirony.github.io/tolliver/ [24]

Toolpath strategies

Overview of terminology: https://www.cnccookbook.com/3d-cnc-milling-machining-cam-toolpaths/ (written by Robert Grzesek, author of MeshCAM, it is excellent as an overview of terminology used in that program)

Peel milling

Trochoidal milling


Type Name/Link Description
2.5D (also engraving and texturing) Carbide Create Freely distributed (provide e-mail for newsletter subscription (cancellable) for download link) Mac OS X and Windows. Imports DXFs and SVGs, CAD/CAM functionality, and supports V-carving and texturing.
2.5D web based MakerCAM[25] Open source and web based software in Flash based on PartKam. Hosted and maintained by Edward Ford.

See: https://forum.shapeoko.com/viewtopic.php?f=33&t=9624&p=70457#p70457 for a discussion of internals. c.f., FlatCAM below.

2.5D PathCAM Open Source Toolpath generation software, available for Windows and Ubuntu. Supports .stl .obj .dae files. Sends GCode to GRBL v8.0c.
2.5D jscut[26] Converts SVG files to CNC cutting paths. GPL, source available on github.[27]
2.5D pocketing and PCBs BCAM - offline foss CAM Open source and is written in python. Project at hackaday.io: https://hackaday.io/project/3985-bcam-2d-computer-aided-manufacturing packaged for ubuntu utopic https://launchpad.net/~snegovick/+archive/ubuntu/bcam-preview Uses https://pypi.python.org/pypi/dxfgrabber/
2.5D CAM/engraving (opensource) Gcodetools Inkscape plug-in.
2.5D engraving (opensource) F-Engrave Python program for generating G-code from outline fonts (w/ algebraic analysis of outlines to vary depth when using a v-shaped bit and the ability to place text on an arc), (some) dxf files, pbm graphics (using potrace).

Blog post w/ an Intro to V Carving @ buildlog.net

2.5D engraving (Lithophanes) Image to Lithophane Online app to generate lithophanes as .stl files
2.5D engraving (Lithophanes) CNC Lithophane Toolpath Generator Program Lithophanes obtain their shading by having different thicknesses of translucent material to perform shading, and then are back lit.
2.5D engraving (Lithophanes) http://hobbymaro.puhasoft.hu/Tweakie/Mach1Filter.exe Free, stand-alone, Windows based application for producing Lithophanes and 3D Reliefs.[28]

See also:

Nascent: https://github.com/nathanielstenzel/bucket_mill


Note that LaserWeb now supports CNC milling and has extensive documentation: http://cncpro.co/index.php

See also http://www.artcam.com/free/index.asp

2D CAD to tool-path

See also the PostScript to G-Code conversion tool ps2gc, listed under Programmatic G-Code Generators.

See also dxf 1.1.1 a Python library to generate DXFs and DXF Halftone 2.1 mentioned above. Cf. Using AutoCAD file formats with open source libraries (IBM Developer Works article).

Type Name/Link Description
DXF to DXF DXF File Z Axis Deletion Program Takes DXF file and collapses all Z dimensions to zero.
HPGL to DXF HPGL to DXF Translation Program Accomodates the basic set of HPGL-1 commands and translates them into a DXF file.
DXF to G-Code Ace Converter Open-source freeware (GPL) utility to convert two dimensional DXF files to g-code.
DXF to G-Code flatcam Ruby command-line tool to generate gcode from a dxf-file.
DXF to G-Code CNC Code Generator Open-source software to generate NC code for machining operations like end-milling, drilling, turning, etc. generates the NC code by extracting features from a 2D DXF file.
DXF to G-Code dxf2gcode Graphical Python program to convert a 2D dxf drawing to CNC machine compatible G-Code, including preview window. Now includes drag knife support[29]. (Formerly hosted on Google Code)
DXF to G-Code Gcode2000 for Windows 95/98/2000/XP/Vista /Windows 7, reads Lines,Arcs,Rect,Circle,PolyLines,LWPolylines, Ellipse, Sorts object by size. Reads and writes DXF files.
DXF and Gerber files to G-Code gCncCam GNU Cam Processor Graphical program to convert DXF-Files and GERBER NC-Files (Drill-Files) to G-Code (RS-274) NC-Files for the Linux EMC2 cnc. Features include:
  • Creating of Tool Properties
  • Creating of Milling Properties (Layer Properties) for different Layers of the DXF-Cad Drawing
  • Saving of Tool Properties and Layer Properties to Template files
PCB to G-Code Convert Excellon Drill File to G-Code
SVG to G-Code svg2gcode https://github.com/sameer/svg2gcode A command line utility for converting SVG to G-Code using Gcanvas and canvg.
HPGL to G-Code hp2xx Opensource tool to convert vector-oriented graphics data given in Hewlett-Packard's HP-GL plotter language to a variety of formats including G-code.

https://github.com/fenrus75/FenrusCNCtools [30]

See also http://www.dewittindustries.com/cgibin/metavector/ and http://www.lindsayengraving.com/other_interests/gcode/index.html




https://cloudconvert.com/svg-to-dxf [31]

https://github.com/lemgandi/3mf2stl --- 3mf to stl converter for Linux[32]

https://leomcelroy.com/barkbeetlejs_v2.x/ [33]



Merging the boundaries between 2D and 3D, CAD and CAM, there's http://www.flatfab.com/ Fabrication Design Software that helps you design and fabricate 3D objects. Ideate and draw in 2D, fabricate in 3D.

Type Name/Link Description
3D modeling GSimple Program to design 3D objects and generate the G-code for them. Made for Windows but runs on Linux with Wine. Not capable of true 3D, better suited for steel, G-code needs post-processing.[34]
3D modeling HeeksCNC A CAD/CAM application for Windows or Linux that can help you produce NC code. How to use different operations in HeeksCNC. When importing DXF from Inkscape, only check "use ROBO-Master type of spline output" and set the base unit as mm.[35]
3D modeling PhlatScript Google SketchUp plugin for generating G-code.
3D CAM FreeMill Free 3D Machining with very easy to use wizard. Accepts .stl files.[36] Post-processor[37]
3D CAM PyCAM A toolpath generator for 3-axis CNC machining. It loads 3D models in STL format or 2D contour models from DXF or SVG files. The stable release is working but extremely slow and uses a lot of RAM for complex models in 3D. The development release is much faster and should be prefered. MacOS install. PyCAM.


3D CAM GCAM GNU 3-Axis CAM with a simple interface for making bolt holes, drill holes, sketches, templates, and more.
3D CAM cl-mill BSD-licensed milling application generating G-Code, built in Common Lisp.
3D CAM Blender CAM Open source solution for artistic CAM, a g-code generation tool, an extension for the free open-source Blender 3D package.[38]
3D CAM OpenSCAD2CNC Tool written in C# that generates toolpaths from OpenSCAD code instead of STL files.

https://github.com/koppi/stl2ngc/blob/master/stl2ngc.cpp --- STL to G-Code converter in C++[39]

Note that GrblGru v3.5 is able to slice an STL into layers so as to create a stair-stepped version of an STL.[40]

https://grid.space/kiri --- combination CAM tool and slicer for FFF, lasercutting and rotary spindles.

Flatcam (see PCBs below) is noted as being generally useful.[41]

https://github.com/ahmetcemturan/SFACT --- formerly Skeinforge (also known as SF-ACT), Python


https://github.com/vilemduha/blendercam [42]

3D Slicing for Additive Manufacturing

See: 3D Printing: Software

Multiple Axis

Type Name/Link Description
4 and 5 Axis simplemultiaxiscam Very simple, yet well documented program to generate G-Code for 4 and 5 axis CNC machines.
4th axis pyturn Simple python code generator for CNC lathe programs
4th axis CNC G Code Wrapper Program Wraps an XY plane toolpath around the A Axis.
4th axis G-Code Ripper Map linear axis to rotary axis.
4th axis GCodeMapper Maps simple g-code programs (G0, G1, G2, G3 movements) from a plane to a cylinder.
4th axis Spherical Turning Program Use your parting tool to do spherical turning.
4th axis Wrapper Wrapper (wrap a toolpath around a cylinder for those who have a lathe as a 4th Axis).
multiple axis The CNC Toolkit Collection of utilities to help users produce, edit, import and export the machine control codes for general automation, mechatronic, hexapod, robotic and animatronic applications. Source code.
multiple axis CAMVOX Open source application designed for producing multi-axis toolpaths. Features: CSG (Constructive Solid Geometry), High resolution voxel space , Full 3D milling with 4 or 5-axis, Collision avoidance.[43]

http://genericcam.sourceforge.net/ --- multi-axis, reads STL, GTS and DXF

http://cncsimple.wordpress.com/download/ --- also listed on CAD page since it includes CAD functionality, includes lathe support

Ezilathe: http://www.cnczone.com/forums/uncategorised-cam-discussion/263938-cnc-forum.html [44]


CNC Wrapper is a commercial program which has a number of free utilities associated with it: https://www.cncwrapper.com/freeware/ which are useful for 4th axis and lathe work.


https://github.com/em/gcanvas (abandoned)

See also Aptos on the Programmatic G-Code Generators page


StickFont v1.1 http://ncplot.com/freetools.htm --- converts text to G-Code (or DXF) using a single stroke font.

The Hershey fonts are supported by Inkscape

https://github.com/wholder/LaserCut --- Browser Based Hershey Text Typing Tool

https://nationalparktypeface.com/ being based on a router template is especially well-suited to being cut out by the machine.


http://www.microtechstelladata.com/TextToNCcode.aspx --- tool to create G-Code for single line text


Type Name/Link Description
PCB Carbide Copper Carbide 3D Blog. Docs. Based on rapid-pcb (see below).[45]

Accept Gerber files for input.

Useful links:

PCB cad.py Python script for creating G-Code files for isolation milling and drilling. Tutorial http://web.media.mit.edu/~neilg/fab/dist/cam.py
PCB FlatCAM Open-source PCB CAM. Includes Viewer, Isolation Routing, support for Double-sided boards [46] [47]
PCB Visolate Application for calculating machining toolpaths (G-code) for manufacturing printed circuit boards (PCBs) by isolation milling. As an outstanding feature, this calculation is done on the computer's screen, using the features of 3D graphics drivers.
PCB drl2ngc Bash script to convert Excellon drill files (.drl) to g-code (.ngc) files.[48]
PCB PCB-Gcode Script for generating G-code for milling a PCB out an Eagle PCB layout. See also Stencil-Gcode for generating an SMD stencil. Yahoo group(from this helpful post)
PCB FreePCB A free, open-source PCB editor for Microsoft Windows, released under the GNU General Public License.
PCB Line Grinder Gerber to GCode Isolation Milling. MIT. Windows.
PCB pcb2gcode Imports standard gerber RS274-X and Excellon files, and creates fully EMC2-compatible RS274-NGC files. Will not run on Windows, includes Voronoi region analysis.
PCB (Mac OS X 10.8 or later) Otherplan Imports Eagle (.brd), Gerber (.gtl and .grb), G-Code (.nc and .tap), PCBmodE (.svg) --- intended for use w/ the OtherMill, but outputs standard G-code.
PCB (online generator) rapid-pcb.com Online tool to generate G-Code from board design files. http://carbide3d.com/apps/rapidpcb/ [49]
PCB (online generator) SimpleGCoder Online tool to build circuit boards, which generates G-Code for CNC.
PCB (previewer) gerbv Free/Open Source Gerber Viewer.


http://cirqwizard.org/ --- cross-platform open source software designed to control PCB prototyping machines. Gerber to GCode converter, also controls the machine and guides a user through the processes of PCB manufacture.[50]

http://www.pentalogix.com/viewmate.php --- ViewMate Gerber Viewer

gcam --- Software for generating gcodes from gerber files https://github.com/bubbapizza/GCAM forked into a 2.5D program[51]

See also:



An interesting alternative to tramming or flattening one's workarea is instead to use special software to modify G-code to match one's bed: Autoleveller Hackaday: Mill Warped PCB Blanks On An Uneven Bed. Also: http://martin2250.blogspot.de/2014/12/grbl-height-probing-tutorial.html and https://github.com/synthetos/TinyG/wiki/ChiliPeppr-PCB-Auto-Level as well as bCNC.

PCB probing software[54]

bCNC also has a facility for this. https://github.com/vlachoudis/bCNC/wiki/AutoLevel

http://www.decarpentier.nl/adding-auto-leveling [55]

Thread Cutting

Note that this may require a special "threadmill" endmill.

Type Name/Link Description
Right hand threads CNC Thread Milling G Code Generator Program Internal and external thread milling.

See the forum discussion thread milling with shapeoko2?.

https://community.carbide3d.com/t/thread-milling-in-metal-on-the-shapeoko-3/5332 and https://old.reddit.com/r/shapeoko/comments/m79y0c/thread_milling_3412_uns_hand_ground_thread_mill/

Youtube: Nomad 883 Drill and Tap with Threadmill

Drag Knife Support

Type Name/Link Description
Drag Knife Optimizer for G-Code Donek Tools Swivel Program Excel spreadsheet which will optimize G-Code for cutting with a drag knife. See: https://donektools.com/free-cnc-router-software/ for further information.

Note that dxf2gcode (see below under Conversion programs) has added support for drag knives.


https://github.com/vlachoudis/bCNC/wiki/Plugins:-Drag-Knife [56]

If a design will accommodate rounding all of the corners, one can cut it without the need for special cornering action moves. With only such rounded movements any CAM software should give you a workable result with a Drag Knife. Simply use an engraving style (follow) toolpath which follows the line in your design which you would wish to have cut.[57]

Fret cutting

Type Name/Link Description
Guitar LoboCNC Fretboard.exe Free Windows application written by Jeff Kerr for cutting blind fret slots in guitar or other instrument fret boards using a small diameter end mill (~0.023"). C++ source included.



https://deepnest.io/ https://github.com/Jack000/Deepnest [58]

http://svgnest.com/ [59] https://github.com/Jack000/SVGnest [60]

http://shinyprints.com/cnc/ [61]

http://www.mynesting.com/ [62]


https://www.cutlistoptimizer.com/ --- has a free mode


Note that there are opensource scripts for some commercial apps, see the Commercial Software page.

Discussion of techniques: http://www.packomania.com/ [63]

Cut lists

Other programs






https://github.com/svenhb/GRBL-Plotter https://www.youtube.com/results?search_query=grbl-plotter https://github.com/svenhb/GRBL-Plotter/wiki/Image-import [65]




https://github.com/arpruss/gcodeplot --- Generate 3-axis plotter gcode (or HPGL) from HPGL or an SVG subset. See http://www.instructables.com/id/Use-3D-Printer-As-a-Plottercutter/

https://github.com/evil-mad/stipplegen/releases/tag/v2.31 example image at: http://www.shapeoko.com/forum/viewtopic.php?f=30&t=8211&p=64435#p64433






http://kokompe.cba.mit.edu/ --- set of software tools for personal fabrication, intended for use with machines common to fab labs, includes Tools to design 2D and 3D objects, Functions to generate 2D and 3D toolpaths, GUIs workflow from design files to machine commands

https://github.com/1944GPW/ptap2dxf https://github.com/1944GPW/ptap2dxf/blob/master/Documentation/PTAP2DXF_User_Manual_v1.0.pdf --- generates DXFs for cutting workable 8-level, 5-level and other-level paper tapes using a normal home CNC craft stencil cutting machine



https://github.com/onekk/eurocam [66]


A welcome feature would be automatically returning to the origin, say by adding G0 X0 Y0 Z0 at the end of files (prefaced by a G0 Z<safety height>).

Note that GrblGru = Free 3D-Simulation for ShapeOko2 has added CAM functionality as of v2.[67]

Open source computer aided manufacturing algorithms library: https://github.com/aewallin/opencamlib Explanations of the algorithmic details at: http://www.anderswallin.net/category/cnc/cam/ [68] Used in stl2ngc.cpp listed above.

The ShapeOko 3 (and Nomad 883) are directly supported by Carbide Create a CAD/CAM program developed by Carbide3D (available under a free license).

Toolpaths: https://www.cnccookbook.com/3d-cnc-milling-machining-cam-toolpaths/

Forum Poll