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

Re: gEDA-user: transition of pcb internal units to metric (SI, mm)



On Mon, Feb 07, 2011 at 01:11:09PM -0800, Colin D Bennett wrote:
> On Mon, 7 Feb 2011 15:09:08 -0500
> DJ Delorie <dj@xxxxxxxxxxx> wrote:
> 
> > > this is NOT what the current software does
> > 
> > True.
> > 
> > > there are NO plans to change any of it.
> > 
> > False.
> 
> I will add only this: anyone with questions about the metric
> units/nanometer/64-bit change should read every single post in the
> following thread before proceeding so everyone does not have to repeat
> themselves:
> 
> First message subject: "Re: pcb crooked traces",
> Date: 2010-10-07 23:00:50 GMT.
> <http://thread.gmane.org/gmane.comp.cad.geda.user/32808>
> 
> The topic of metric units internally has come up on the list at least
> three or four times now in various forms, so I think we should have a
> brief FAQ item for this that summarizes
> (1) the specific issues it addresses (45-degree line stubs; precision
>     of metric footprints and layouts),
> (2) the options proposed along with reason for accepting or rejecting
>     each option (e.g., why integers are preferred to floating point,
>     why the file format does not need to incompatibly change), and

Spaeking of this, with floating point values, it is also extremely easy
to lose precision on formatted file I/O. For double, you need something
like 17 digits and the procedure conversion to/from ASCII is also 
much slower than for integers (not a problem with modern machiness since
PCB files are relatively small, but it is very visible when you read text 
files with 10 of millions of floating point values). 

Of course the other possibility is to use the hexadecimal floating point 
format (%a on output), but in this case you lose the advantage of human 
readability (and at this point why use a text format?).

Speaking of the coordinates and dimensions, I would not be opposed in writing 
them to files as mm.fraction with up to 6 digits in the fraction (suppressing
trailing zeroes). I think it would make the file more readable for humans,
not really harder to process with scripts (I sometimes use awk on my pcb
files). Files might even be a bit shorter, but that's not the motivation.

This said, I see that pcb uses bison or flex or some of these parser
generators which I've never been able to understand, and I don't know
at all what complications it may add to the grammar.

	Regards,
	Gabriel


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