As cad.py works from images, your not restricted to just PCB designs. You can also import any black or white image or text. As long as its white lines on a black back ground it should work. So there is no reason why you couldn’t use cad.py to mill logo’s or names onto things other than blank PCB’s.
Following on from the previous post:
How to use cad.py on Windows.
- Open your pcb in Eagle and from the top menu select View->Display/Hide Layers and then deselect all but Top, pads and vias and then select ok.
- From the top menu again select File->Export->Image and choose monochrome and suitably high DPI. The larger the image file the lower the chance of traces overlapping, but requires a longer time to process. Images above 3000x3000pixels may result in a memory error. Then save as a .png.
- Load cad.py (or similar) and select “Input” and choose a .png image file.
- Choose your settings such as x-width and y-width. Thses settings will determine the size of your PCB. By changing one and pressing enter, the other will be scaled to keep the right size ratio. Changing the max and min intensity is useful if your image is not completely black or white, but have a grey areas. The inches per unit changes the units for your pcb. By setting to 25.4 your x-width and y-width will be in cm. After changing any of the settings select ‘render’ to re-render the image.
- When ready to output your gcode select ‘cam’ and choose gcodes from the drop down menu.
- You may then adjust more settings such as ‘minimum vector fit error (which alters how closely the tool path will match the image), tool diameter (in inches), tool overlap (a ratio) and feed rate (does not alter feed rate for reprap host, change the host settings).
- Once finished choosing your settings select ‘contour’ and wait for the processing to be done. Once completed, select save and the output .gcode (or .g) file will be in the same location as the image file.
- Load up the .gcode file with your desired host and print. This has only been tested with the Reprap host. You may want to undergo testing with a pen and plotting on paper before moving on to milling your first PCB.
A full copy of the instillation and use instructions can be found on the reprap wiki.
I made a few changes to David Carr’s modified version of cad.py. It now outputs ’.gcode’ files as opposed to ‘.g’ and I changed a few of the default parameters including setting the ‘inches per unit’ default for milimeters.
Another problem was that no matter what feed rate was set, the end mill always moved at the same very fast speed. This turned out to be because every gcode movement command printed by cad.py was preceded by G0 (rapid move) as opposed to G1 (controlled move). I changed this, but i’m not sure if it was the right way about it. You can find a copy of this modified version of cad.py here.