On Fri, Jun 17, 2011 at 11:41:22AM +0200, Gabriel Paubert wrote: > On Fri, Jun 17, 2011 at 10:49:34AM +0200, Gabriel Paubert wrote: > > On Thu, Jun 16, 2011 at 08:44:13PM +0200, Gabriel Paubert wrote: > > > Hi Andrew, > > > > > > I just pulled PCB from git head and I have trouble with arcs in Gerber > > > output. I strongly suspect the latest commit: layers which do not > > > have arcs appear fine in gerbv, but automatic zooming layers which > > > contain arcs zoom out and give coordinates in the range of several > > > meters (with the screen staying lack). Also my outline has a single > > > arc in one corner and this is precisely this segment which is missing. > > > > > > I can not prepare a test case right now but will tomorrow (it's almost > > > 9 pm here), if you've not beat me to fix it before. > > > > For some reason Andrew replied priavtely, but I want to thank him > > for having fixed the bug in git head, and having added a testcase > > for arcs. > > > > Now it is the drill file (I did not come around to checking it > > yesterday, sorry) which is incorrect: too targe blobs and > > in the wrong place :-( > > Correction: only the coordinates are wrong, the sizes look correct.
And it turned out to be relatively easy once you understand the %m conversion: mixing imperial and metric can easily veer you off course, you don't need to be close to Mars. diff --git a/src/hid/gerber/gerber.c b/src/hid/gerber/gerber.c index 5e0b7b6..f949d42 100644 --- a/src/hid/gerber/gerber.c +++ b/src/hid/gerber/gerber.c @@ -646,7 +646,7 @@ gerber_set_layer (const char *name, int group, int empty) Aperture *ap = findAperture (curr_aptr_list, pending_drills[i].diam, ROUND); fprintf (f, "T%02d\r\n", ap->dCode); } - pcb_fprintf (f, "X%06.0mmY%06.0mm\r\n", + pcb_fprintf (f, "X%06.0mlY%06.0ml\r\n", gerberDrX (PCB, pending_drills[i].x), gerberDrY (PCB, pending_drills[i].y)); } Regards, Gabriel _______________________________________________ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user