Hallo,
as the Excellon format doesn't contain any indication what number format is
used, any guessing will go wrong in some situation. While zero suppression
may be guessed in most cases and imperial/metric is explicitly contained in
most files, number of leading and training digits can't be guessed. For
example the code in gerbv-0.16 goes astray, if Cadsoft Eagle Excellon is
used for an artwork greater 10 inches. I have added a simple testfile at
the end, gerbv.bs for the top copper and gerbv.drj for the drill.
I can get drillc:drill_guess_format() to guess right with both a small and a
large (> 10 inches) board with appended patch, but I guess I will spoil
other situations.
So I propose that some command line switch should be added, allowing to
overwrite the guesswork.
--- gerbv-0.16/src/drill.c~ 2004-05-19 22:01:17.000000000 +0200
+++ gerbv-0.16/src/drill.c 2004-12-21 20:48:34.526660701 +0100
@@ -401,7 +401,7 @@
calculation. */
if( (image->format->omit_zeros == LEADING ||
(max_leading_zeros == 0 && max_trailing_zeros == 0) ) &&
- image->format->x_dec <=3 && unit == INCH) {
+ image->format->x_dec <3 && unit == INCH) {
image->format->x_dec += 1;
image->format->y_dec += 1;
===
Valid Sample Excellon/Gerber Files by Eagle for a large board
======
%
M48
M72
T01C0.1260
%
T01
X404Y404
X14577Y20483
M30
====gerbv.bs===
G75*
G70*
%OFA0B0*%
%FSLAX24Y24*%
%IPPOS*%
%LPD*%
%AMOC8*
5,1,8,0,0,1.08239X$1,22.5*
%
%ADD10C,0.0000*%
%ADD11OC8,0.3937*%
D10*
X000101Y000101D02*
X000101Y208762D01*
X149707Y208762D01*
X149707Y000101D01*
X000101Y000101D01*
D11*
X004038Y004038D03*
X145770Y204825D03*
M02*
--
Uwe Bonnes [EMAIL PROTECTED]
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------