[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Gerber magic numbers



On Mon, 23 May 2011 11:09:23 -0700
Andrew Poelstra <asp11@xxxxxx> wrote:

> On Sun, May 22, 2011 at 03:00:35PM -0700, Andrew Poelstra wrote:
> > 
> > I am cleaning up the unit handling for the gerber
> > exporter, using the guide at
> > 
> > http://www.linux-cae.net/PCB/rs274xrevd_e.pdf
> > 
> > Things are mostly straightforward, but I am lost
> > as to the /10 factors in
> > 
> > /* These are for drills */
> > #define gerberDrX(pcb, x) ((long) ((x)/10))
> > #define gerberDrY(pcb, y) ((long) (((pcb)->MaxHeight - (y)))/10)
> > 
> > Why are the drill numbers divided by 10, and why are
> > they output with leading zeroes?...
> 
> 
> The reason for this seems to be that drill layers are
> output in their own format in .cnc files, which use
> different units than the .gbr (and do not terminate
> their lines with *).
> 
> What is the format of these files?

The drill files output by pcb's gerber export are NC drill files,
commonly called Excellon format.

See:
<http://www.apcircuits.com/resources/information/nc_introduction.html>
<http://en.wikipedia.org/wiki/Excellon_Format>

Regards,
Colin


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user