gcode export for mill/drill

Asked by Karl Zeilhofer

Hello,

is there a way to generate gcode for cnc milling/drilling from a kicad project all with open source software?
Perhaps this is possible without generating gerber-files as intermediate format.

greets from Austria,
Karl

Question information

Language:
English Edit question
Status:
Solved
For:
KiCad Edit question
Assignee:
No assignee Edit question
Solved by:
Karl Zeilhofer
Solved:
Last query:
Last reply:
Revision history for this message
Lorenzo Marcantonio (l-marcantonio) said :
#1

On Mon, 12 Jul 2010, Karl Zeilhofer wrote:

> is there a way to generate gcode for cnc milling/drilling from a kicad project all with open source software?
> Perhaps this is possible without generating gerber-files as intermediate format.

Have you tried gcnc?

Putting gcode generation in kicad is a duplication of efforts, and
anyway gerbers are the only good way to accurately check the results
before manufacturing.

--
Lorenzo Marcantonio
Logos Srl

Revision history for this message
Karl Zeilhofer (zeilhofer) said :
#2

Hi,
thanks for your hint.
I think you ment gcnccam, did you?
This program is only available for linux and i work mainly on windows.
It's long ago that i ran my kubuntu installation. After updating to kubuntu 10.4 it will not log in to the KDE desktop any more.
So it will take me some time to reinstall kubuntu and try gcnccam for milling.

greets, Karl

Revision history for this message
Karl Zeilhofer (zeilhofer) said :
#3

I got my Kubuntu running without reinstalling it :-)

gcnccam is a nice program for cutting out some simple parts, but definitely not for milling a pcb.
I wanted to load the pic-programmer example, after about 15 minutes waiting to load the drawing I killed the process.
also it is doubtful that gcnccam can distinguish the many lines which are crossing, so that a pad inclusive its track get isolated.

perhaps it is good for drilling a pcb though.
Lorenzo, did you ever used this program for pcb manufacuring?

greetz, Karl

Revision history for this message
Lorenzo Marcantonio (l-marcantonio) said :
#4

On Tue, 13 Jul 2010, Karl Zeilhofer wrote:

> Lorenzo, did you ever used this program for pcb manufacuring?

Actually not, I use phototools for prototyping, since vias have to be
done manually with conductor isolation anyway... *and* 0,3 mm drilling
is a real PITA :D OTOH I agree that for coarse work in hobby it would be
a great way to make a board (I'm a pro in ED so I can even afford a 24h
proto board service).

Since you're using Windows I think that there are already some
conversion tools (I've heard of coppercam and kellycam, some search will
pop up more of them).

You could also open a wishlist in the kicad tracker, but I'd expect it
would be very low priority as a feature.

BTW, do you know that excellon is actually a g-code dialect? the drill
part is already done :P

--
Lorenzo Marcantonio
Logos Srl

Revision history for this message
Karl Zeilhofer (zeilhofer) said :
#5

Thanks for your answer.
I also think photo tools are a very good way to make PCBs.
But thus i have a CNC milling machine, i would like to use it. Mainly for getting the holes drilled with just a little extra effort. I'll try 0.45mm drilled vias on my next board.

I have tried coppercam some days ago. It has most things I'm expecting of a PCB CAM processor.
But I cannot believe, that there is no open source CAM software available when there is such a great suite like Kicad.

So perhaps I want to write my own program?!
Is there something like a standard c++ library for the RS-274X format?
Because I'm programming with Qt, i would like to use this toolkit instead of wxWidgets.

How can I get into the source code of the Gerber Viewer of Kicad? Are there programmer manuals?
I just downloaded the source, but I don't get an overview of all the many classes.

Revision history for this message
Lorenzo Marcantonio (l-marcantonio) said :
#6

On Wed, 14 Jul 2010, Karl Zeilhofer wrote:

> Is there something like a standard c++ library for the RS-274X format?

I'd say that's iostream :D really RS274X is nothing more than a list of
coordinates point to plot to... it's actually a kind of G-code
(with an header detailing the 'tools').

> How can I get into the source code of the Gerber Viewer of Kicad? Are there programmer manuals?
> I just downloaded the source, but I don't get an overview of all the many classes.

You could try to doxygen the sources... or look in the gerbv viewer,
it's gtk based but it's IMHO better than gerbview. Since for isolation
routing you have to offset polygons (pick each track as a polygon, union
them and -- the tricky part -- extract the boundaries offsets by tool
radius), I'd look into the kbool library (used by kicad but available
externally too).

--
Lorenzo Marcantonio
Logos Srl

Revision history for this message
Karl Zeilhofer (zeilhofer) said :
#7

so gerbv with libgerbv is what i was looking for. as you said its written in gtk.
but a side project of gerbv is pcb2gcode and is more interesting than a gerber library.
https://sourceforge.net/projects/pcb2gcode/
it is a command based CAM processor for PCBs.

This project uses a nice approach (as i understand it so far from source codes):
they plot the gerber file to an image buffer. and afterwards they produce out of this "picture" the tool paths.

I still have some problems with this program, but i'm looking forward to get what i want out of it, since I don't have the time to write all on my own.

For browsing a source code, eclipse does a wonderful job.
I like the integrated c/c++ parser which generates automatically all necessary links to all the declarations.
Just make a dummy project and import the source code into it.

Thanks a lot,
Karl