kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #03803
Re: where footprints come from (was Re: Re: Internal
--000325554fdaa90a44047b43cc81 Content-Type: text/plain; charset=UTF-8
2009/12/21 viking632 <oyvind.aabling@...>
>
>
> Why perl ? Well, perl has everything you need: Object Oriented
> programming, anon arrays and hashes to stash stuff into, very
> powerful regexps, automatic housekeeping for vars and values, etc.
>
Don't feel offended, but PERL is write-only language without future. It is
strong and powerful for current tasks, but not for projects. Even BIG
framework in my company started to move into python. It is a matter of
conversion.
> Also, I've been writing tons of perl code over the last 13+ years,
> so this was a natural choice (just ask anyone who knows me ;-)
>
I personally wrote only couple of configuration lines in the framework
mentioned above and I am always saying that I do not know perl. But I know
lot of people knowing perl and python, and they naturally choose python for
new projects.
If it can't be done in perl, use C. If it can't be done in C,
> use assembler, and if it can't be done in assembler,
> it obviously isn't worth doing :-)
>
That was true in late '90, now Java and C++ have very strong position.
Python can be easily joined with Java (thanks to Jython) and with .NET/MONO
(thanks to IronPython).
As to the presense of a recent perl interpreter, all
> the systems I know of has one included by default these
> days (*), and my PCB parts code doesn't make use of anything
> special, so any perl 5 installation should do just fine.
>
On Windows it requires ActiveState Perl, which is available for free (I
think), but it is closed source commercial application.
(*) And if not, perl is available for all major platforms,
> although Windooze does require cygwin, I think (but then I
> generally try to stay as long away from M$ as possible ...).
>
Cywin is evil these days.
To define a part, my approach uses only the class and physical
> dimensions of the part (including the land pattern) as input.
>
> Obviously, there's also some perl code for each type of silkscreen,
> footprint layout and 3D body and pin shape to define the parts.
> [...]
>
> If a particular part is missing from a class (or slightly wrong),
> only its class and (correct) physical dimensions needs
> to be entered, but new part types/classes will generally
> require some code as well, especially for the 3D stuff.
>
>
You've probably done good job. And it is appreciated.
All above is my private opinion - I think, if that job would be done in
python it could be embedded somehow into KiCad (optionally) through
scripting integration (Dick, you want to abandon that?)
--
Manveru
jabber: manveru@...
gg: 1624001
http://www.manveru.pl
--000325554fdaa90a44047b43cc81 Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<br><br><div class=3D"gmail_quote">2009/12/21 viking632 <span dir=3D"ltr">&=
lt;<a href=3D"mailto:oyvind.aabling@...">oyvind.aabling@...</a>&g=
t;</span><br><blockquote class=3D"gmail_quote" style=3D"border-left: 1px so=
lid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style=3D"background-color: rgb(255, 255, 255);">
<span>=C2=A0</span>
<div>
<div>
<div>
=20=20=20=20=20=20
=20=20=20=20=20=20
<p></p>
Why perl ? Well, perl has everything you need: Object Oriented<br>
programming, anon arrays and hashes to stash stuff into, very<br>
powerful regexps, automatic housekeeping for vars and values, etc.<br></div=
></div></div></div></blockquote><div><br>Don't feel offended, but PERL =
is write-only language without future. It is strong and powerful for curren=
t tasks, but not for projects. Even BIG framework in my company started to =
move into python. It is a matter of conversion.<br>
=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"border-left: 1px sol=
id rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div =
style=3D"background-color: rgb(255, 255, 255);"><div><div><div>
Also, I've been writing tons of perl code over the last 13+ years,<br>
so this was a natural choice (just ask anyone who knows me ;-)<br>
</div></div></div></div></blockquote><div style=3D"background-color: rgb(25=
5, 255, 255);"><div><div><div><br>I personally wrote only couple of configu=
ration lines in the framework mentioned above and I am always saying that I=
do not know perl. But I know lot of people knowing perl and python, and th=
ey naturally choose python for new projects.<br>
<br></div></div></div></div><blockquote class=3D"gmail_quote" style=3D"bord=
er-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-l=
eft: 1ex;"><div style=3D"background-color: rgb(255, 255, 255);"><div><div><=
div>
If it can't be done in perl, use C. If it can't be done in C,<br>
use assembler, and if it can't be done in assembler,<br>
it obviously isn't worth doing :-)<br>
</div></div></div></div></blockquote><div style=3D"background-color: rgb(25=
5, 255, 255);"><div><div><div><br>That was true in late '90, now Java a=
nd C++ have very strong position. Python can be easily joined with Java (th=
anks to Jython) and with .NET/MONO (thanks to IronPython).<br>
<br></div></div></div></div><blockquote class=3D"gmail_quote" style=3D"bord=
er-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-l=
eft: 1ex;"><div style=3D"background-color: rgb(255, 255, 255);"><div><div><=
div>
As to the presense of a recent perl interpreter, all<br>
the systems I know of has one included by default these<br>
days (*), and my PCB parts code doesn't make use of anything<br>
special, so any perl 5 installation should do just fine.<br>
</div></div></div></div></blockquote><div style=3D"background-color: rgb(25=
5, 255, 255);"><div><div><div><br>On Windows it requires ActiveState Perl, =
which is available for free (I think), but it is closed source commercial a=
pplication.<br>
<br></div></div></div></div><blockquote class=3D"gmail_quote" style=3D"bord=
er-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-l=
eft: 1ex;"><div style=3D"background-color: rgb(255, 255, 255);"><div><div><=
div>
(*) And if not, perl is available for all major platforms,<br>
although Windooze does require cygwin, I think (but then I<br>
generally try to stay as long away from M$ as possible ...).<br>
</div></div></div></div></blockquote><div style=3D"background-color: rgb(25=
5, 255, 255);"><div><div><div><br>Cywin is evil these days.<br><br></div></=
div></div></div><blockquote class=3D"gmail_quote" style=3D"border-left: 1px=
solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style=3D"background-color: rgb(255, 255, 255);"><div><div><div>
To define a part, my approach uses only the class and physical<br>
dimensions of the part (including the land pattern) as input.<br>
<br>
Obviously, there's also some perl code for each type of silkscreen,<br>
footprint layout and 3D body and pin shape to define the parts.<br>
[...]<br>
<br>
If a particular part is missing from a class (or slightly wrong),<br>
only its class and (correct) physical dimensions needs<br>
to be entered, but new part types/classes will generally<br>
require some code as well, especially for the 3D stuff.<br clear=3D"all"><b=
r></div></div></div></div></blockquote></div><br>You've probably done g=
ood job. And it is appreciated.<br><br>All above is my private opinion - I =
think, if that job would be done in python it could be embedded somehow int=
o KiCad (optionally) through scripting integration (Dick, you want to aband=
on that?)<br>
<br>-- <br>Manveru<br>jabber: <a href=3D"mailto:manveru@...">manveru=
@manveru.pl</a><br> =C2=A0 =C2=A0 gg: 1624001<br> =C2=A0 <a href=3D"http://=
www.manveru.pl">http://www.manveru.pl</a><br>
--000325554fdaa90a44047b43cc81--
Follow ups
References