kicad-developers team mailing list archive
Mailing list archive
Re: RS274X file format.
Dick Hollenbeck <dick@...>
Wed, 29 Apr 2009 13:35:27 -0500
Thunderbird 18.104.22.168 (X11/20090318)
Wayne Stambaugh wrote:
Does any one know if the RS274X aperture definition "%ADD26MTHOLE,
0.0300 X0.0100 X0.0050 X0.0*%" is valid? The Gerbview parser is choking
on the spaces between the optional X parameters. The fix is trivial but
is this best way to procedeed? At the very least Gerbview should
complain about an invalid gerber file.
Yes. I share that philosophy, and in one instance where I had
sufficient time to spend on putting it into Kicad, I wrote the lexer and
parser that are in the specctra import. That code uses exceptions and
tells you exactly which line and exactly which character offset into the
reported line is the problem. So you get line number and character
offset, which lets you load the file into a text editor and look at it.
By using exceptions, it was possible to keep the "error reporting UI
code" out of the low level parser and up at a higher calling layer where
the catch resides.
It may take another few years, but this might be nice long term
direction for other parts of Kicad also.
All of the documentation I can
find on the RS274X file format shows no spaces but I can't find any
mention of spaces not being valid. I have seen documentation that
newlines inside the command delimiter (*) are acceptable for
readability. Is this true for all white space? If anyone has any
expertise in this area, I would appreciate the help. Gerber file
formats are not something I have a lot of experience with. I'll fix the
parsing bug in Gerbview but I would like to implement a valid solution
not just a quick fix to solve my problem.
The reason I am asking is I have board gerbers generated by P-CAD and I
want to use Gerbview to export to PCBNew so I can modify the PCB outline
and add some mounting holes. I haven't tried this with Gerview so I
don't know how well this code performs.
Thanks in advance for any help.
Yahoo! Groups Links