Download free image to g code converter

Capolight Electronics Projects.

A collection of Reprap, LED and RC projects

One step conversion of an image to gcode for Makerbot Unicorn and Reprap style 3D Printers

How to take an image like this:

and in one step generate the gcodes required to do this:

All credit for cad.py goes to the original creator Neil Gershenfeld of MIT Center for Bits and Atoms and David Carr of Make Your Bot who optimised the code that is in use here.

By attaching a pen to a 3D printer it is easy to turn it into a basic pen plotter. However producing the G-codes require to drive your 3D printer as a pen plotter can be anything but easy. This short guide seeks to change that. There are currently a number of ways of producing plotting paths from images. A selection includes:

Program Installation

Download the following software for your respective OS. Note that python 2.6 must be used for cad.py to work. Either un-install newer versions or dirct cad.py to work with python2.6 only.

Generating the gcodes.

Run the Cad.py that suits your hardware. I have included three types all with the same interface but each outputs slightly different gcodes.

When the program begins do the following to test your setup:

  1. Select the test image.png file by clicking the “Input File” button and navigating to the “Test Images” folder.
  2. Set “in. per unit”: 25.4
  3. Click “Cam” button
  4. Click “Output Format” and select file type: “.gcodes”
  5. Set the following values:
    1. maximum vector: 0.75
    2. tool diameter: 0.03
    3. tool overlap: 0.1
    4. contours: 1
  6. Click “contour” and wait for the paths to be generated. They appear as red lines over the image at its edges.
  7. Click the save butting and the file will be output to the input directory.

Thats it, your done. Now load up your desired host, run the gcode and watch your bot draw. Here is a timelaps of my plotter at work.

Optimisation

Furthermore you can copy and past past multiple gcode files into one as long as you add the new starting position at the end of each file. As mentioned above you have a number of variables to play with in Cad.py. To the best of my knowledge this is their functions:

If you wish to go even further then use a text editor to modify the python script its self (eg (Cad.py) Plotting with Z axis movement.py). Remember to back up the original before making changes.

Finally as cad.py was originally designed to create tool paths for milling there is nothing to stop you from attaching an engraver, laser or similar and engraving your favourite pattern or quote on something interesting.

Related

Post navigation

Leave a Reply Cancel reply

Hi Richard, this could solve my problem, however (off course!), I am a simpleton when it comes to anythimg more than excel and word- installing the right py version raises questions- the 2,6,5 is not availble from poython, 2,6,6 is OK? also in my try outs I installed a ton of py programs, can I remove them without hurting maybe other programs- scary- with the commoditisation of the 3d print tech, it it noticeable that the software behind it is still in the specialist field

maybe you can help, I want to do the png to gcode for carving- very low resolution

a package install with a decent interface would be heaven! 😉

Unfortunately my rather unhelpful answer to your questions is that you will simply need to try it and see what works for you. If you keep track of what you change and do one thing at a time then you should be able to reverse any mistakes you make such as uninstalling a required program.

As for a dedicated installer, it would require a bit of work since every one uses a different OS and this has not really got that many downloads to justify the time involved.

Anyway, best of luck with your project and I would love some photos of the finished product if you have a link handy.

It seems like using the 64 bit version of python won’t work. Some of the links above redirect to more recent versions of code that won’t work together. Go to each site and download the exact file as it is written on this page (“PIL-1.1.7.win32-py2.6.exe” for example).

really awesome! Did just what you said and it worked perfectly! check it out on my blog! http://additive-edge.blogspot.se/ or on my website! http://www.additive-edge.com

The command prompt seems to be working on python 2.7.9, do you think there can be other problems ?