View Full Version : cl-mill: opensource GCode Software

02-17-2009, 07:53 AM
Hello people,

I must say I'm a bit intimated by this forum. I'm a complete newbie in CNC and mechanics and machining. I got a CNC mill in december to help me build casings for my electronic devices, and being badly afflicted by the Not Invented Here syndrome, I decided to build my own "CAD/CAM" software (that's a really big word for my software).

Basically, it generates G-Code. You can either program geometric shapes (circle, rectangle), outline, inline or fill them (at different depths too), which is what I use to mill my casing frontplates and sidepaltes. You can already do some pretty complicated drawing with this, as it supports rotation, scaling, displacement.

Also, the program generates multiple "passes", so you can for example generate movements and store parts of the milling in a "drill", an "outline", a "rough", a "finishing" phase without having to split your drawings apart. You can then combine passes.

Also, it supports panelizing, so it can calculate the size of a part and then replicate that part inside the workpiece, and for example drill fastening holes between the different panels. It can also automatically generate bridges on pieces and then store the bridge cutting in a separate pass (which is pretty useful for the plywood milling and pcb milling i do).

Furthermore, I can import vector graphics out of an SVG file, which makes it pretty easy to do fonts and the like, or just communicate with graphic people :)

Also, I can trace bitmaps using the potrace library. As this library generates bezier curves, I wrote a pretty evolved algorithm to convert bezier curves into most fitting arcs, which seems to work quite well. I started working on an offseting algorithm, which works pretty well as long as offset lines don't create pockets, but I'll definitely build that cause I need it.

I also implemented a bridge to the processing.org application, which allows me to quickly convert sketches into milling files, which is very very nice. I wrote about it in my blog over at http://ruinwesen.com/blog?id=387 , and you can check the sourcecode out at http://cl-mill.googlecode.com/ .

It's all written in common lisp and is definitely not in releasable state, but I will try to work on it as much as I can in the next few months. Let me know if you can use some of that stuff (maybe the algorithms) and I'll try to document a bit better.

On the other hand I'm a cmplete newbie to milling, so I think I will post some videos of my workflow and ask if the stuff I'm doing is okay, cause I really don't know anything about it all. I can mill my wood and my aluminium without breaking too many bits and that's about it :)

02-17-2009, 07:57 AM
Oh I forgot it also has PDF export, so I can print things out before milling them to check dimensions and obivous errors.

ALso I wrote this bridge to the EAGLE PCB program, so I can mill prototypes of circuit boards before assembling them to check if the mechanics fit. some examples here: http://bl0rg.net/~manuel/holzproto.jpg http://bl0rg.net/~manuel/holzproto2.jpg

Also it allows me to driectly mill the frontplate out of the eagle schematic, so I don't need to have a separate CAD file, and I'm always sure the buttons and frontplate and holes and screws will align perfectly. It also allows me for example to mill a complete guitar pedal (with PCB milling and fronplate and casing) in one go :) :)

Furthermore, I use a lot of those functions I built to actually generate different forms and monsters and graphics, some of which you can see here http://bl0rg.net/~manuel/abspack-crowd/ (that's the processing script), and that's the boards and wooden pieces:


Here's a picture of my device casing (first engraving test, ws not really good, but I got it now):


02-23-2009, 07:18 AM
You describe yourself as a "Newbie" !!! Somehow the name does not fit with such excellent CNC programming!!! We should try and think of a better name for you. The CAD Man!!

I would just like to say thanks and I hope to be in a position to mill out some PCBs myself before the year gets much older....


Der Fisherman

02-23-2009, 10:26 AM
Sounds cool. I am a CADCAM guy from way back, and I love the thought of creating code that writes code. Although I have programmed since 1976, I have never programmed anything that creates G code for spindle movement. I am running a 4 axis mill at home, so I do a fair amount of coding and milling, and I am interested. I tried to access your source code, but was unable to do so....


02-23-2009, 11:16 AM
I tried to access your source code, but was unable to do so....


Click on the "Source" tab, then click on "browse".

02-23-2009, 05:26 PM
Nice work , once again a individual sharing his/hers ideas with the masses

keep up the good work


02-24-2009, 02:10 AM
i am interested in what you have done i have gone to your website and i have seen where your code is but i would just lie to be able to run it and see how it performs.

Is this possible or is it in a state that has no GUI fit for windows?

03-02-2009, 10:29 AM
Hi Charlm,

well I have to admit that I use it from inside my Lisp development envirnment, and it's not really something that I would want other people to set up. I will maybe do a GUI version one day, or package it so that people can try it out a bit easier, but at the moment we're super super busy over at the company and there is no real time for that :/

Cheers, Manuel