[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: Units used by software
>> andrewm wrote:
>> <SNIP about metric footprints>
>> If it's not been done by anyone already I am going
>> to just write some kind of parser that does it for
>> me external.
> DJ Delorie wrote:
> Sounds like a useful tool. Teach it to allow
> overrides on a per-value basis (like my 2pad script
> does). I.e.:
>
> Pin[0.2 0.2 0.5 0.2 0.2 10mil 0.1]
>
> Hmm^2... teach pcb's parser to support a unit suffix
> on each value! We only need mil and mm, but the
> mechanism should allow for more as needed. It won't
> *save* that way, but it lets you read in footprints
> with human-simpler values.
OK - well I am not very bright and the chances of me
modifying the code tree for PCB without breaking
something are slim to none. So I shall do it external.
I will public the code, however I would have to prefix
it with a warning that veiwing my C style may cause
people to run away screaming "my eyes my eyes". It
really is that ugly.
If no one has any better suggestions I am going to make
it take one input file read-modify-write it.
Any line in the file that has a dimension suffix it will
comment out, add a comment line to say it is
autogenerated and then put the computer readable
centimil version.
Eg.
pin[0.2mm 0.2 0.5 0.2 0.2 10mil 0.1mm]
in the file would end up
# pin[0.2mm 0.2 0.5 0.2mm 0.2mm 10mil 0.1mm]
# The following line was automatically generated
pin[7874 7874 19685 7874 7874 1000 3937]
That should mean that you can un-comment the old version
and try again if you made a mistake.
I will make it so that you only need to sufix the unit
if it changes. In the example above only the first
dimension had a sufix until the units changes at 10mil
and then the next metric after that one needed a sufix
again.
Or is this getting to complex to document for people ?
(it's trivial code wise but may cause headaches in terms
of noob questions)
Finaly any objections to
mm = Millimeter
um = Micrometer
mil = thousanth of an inch
cmil = 100 thousanth of an inch
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user