kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #11562
Re: netlist reading of nickname-less fpids.
On 11/1/2013 8:42 PM, Dick Hollenbeck wrote:
>
> Wayne,
>
> I enabled an experimental feature when USE_FP_LIB_TABLE is in play.
>
> If you pass a nickname-less (nickname is blank) FPID from eeschema FOOTPRINT field through
> netlist into pcbnew, there is a compile flag to take that incomplete FPID and do a
> sequential search through all nicknames for the footprint.
>
> Please take a look at this, see how much I broke. To make it work I extended:
>
> MODULE* PCB_BASE_FRAME::loadFootprint( const FPID& aFootprintId )
>
> to take the partial FPID.
>
> It actually works. Was concerned about side effects, and I would like for the Reporter to
> tell which nickname was used. This is obtainable from the MODULE itself, since that
> nickname portion is set in FP_LIB_TABLE::FootprintLoad(). So the Reporter could be using
> that nickname, rather than the blank nickname in the original FPID.
>
> The sequential search is alphabetical through all nicknames. (Please, no talk of "search
> paths", which are on a death march.)
>
> I don't know about other side effects. It is enabled by compiling in ALLOW_PARTIAL_FPID
> from netlist.cpp.
>
> Let me know what you think. I don't see where it is important long term, after a person
> can actually pick a footprint from eeschema sensibly, so I am thinking it is a short term
> aid only.
I think it's a good idea. This will be better than nothing once the
search path stuff gets removed (at least for Pcbnew and CvPcb, yeah!!!).
It still could lead to incorrect footprint selection in the case where
there are footprints with the same name in multiple libraries. I don't
think this is much a problem with the standard KiCad libraries but we
could run into issues with third party libraries. In the short term,
it's probably not going to cause many problems. However, given that we
now support so many different library types, the risk for footprint name
clashes increases. Maybe we should check for duplicate footprint names
and warn the operator in the case where the select footprint name exists
in more than one library and no nickname is defined. This way the user
will have a chance to select the correct library nickname without having
to go back and define the library nickname in Eeschema. I'll try to
find the time to take a look at it this weekend.
Thanks,
Wayne
>
>
> Dick
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
References