Using cad.py on a Windows PC

To quote from makeyourbot.org

cad.py is a CAM program that can be used to generate g-code tool paths for milling 2D and 3D objects. It operates on images instead of vector formats like Gerber, DXF, or SVG, so you’ll have to export your board/object as a PNG image first. For larger objects without very fine features 200-300 dpi is fine, but for circuit boards I use 1000 dpi.

This page describes the general process.


In order to run cad.py on a Windows PC you need to install the following software:

  1. Python 2.6
  2. Numerical Python (numpy)
  3. Scientific Library for Pythom (scipy)
  4. Python Imaging library (PIL)

You can then download and run Neil Gershenfeld’s original cad.py or an optimized cad.py by David Carr, which is faster, but not as well tested.

Again, quote from makeyourbot.org:

cad.py was written by Neil Gershenfeld of the MIT Center for Bits and Atoms. I’ve modified Neil’s latest version to implement the “Original start, global optimization, original Z motion” algorithm described on this page. In some cases this optimization reduces the milling path length by 50% or more.

If you run cad.py only to see a command prompt for a split second before returning to the desktop then it is most likely you have not installed all the required modules, software numbered 2 to 4 above. It is also possible that you have more than one version of python installed. Insure that you only have python 2.6 installed.

About Richard

I am a Materials Engineering working in the field of Magnetic Materials in Melbourne, Australia. This blog covers my personal interest in all things CNC.
This entry was posted in Mendel Build and tagged , , , , , , , , , . Bookmark the permalink.

Leave a comment