← Back to team overview

kicad-developers team mailing list archive

Re: KICAD_PLUGIN for libraries/components (pcbnew)

 

On 04/12/2012 01:42 AM, Miguel Angel Ajo Pelayo wrote:
> I've started reverse engineering a little bit what we have, learning which objects, how
> it's done and when do they use the library / modules functionality.
>
> http://projects.nbee.es/display/KICAD/Footprint%20libraries%20support%20in%20io_mgr%20and%20plugins
>
> I got a few preliminary conclusions:
>
> 1) The libraries are don't seem to be stored in memory at all (good for memory), they
> are always wrote and read from disk, but may be some set of objects that keep them
> indexed in ram would be nice (if that already doesn't exist)
>
> 2) I'm still not sure, but may be PLUGIN function receive some common class instead of
> BOARD*. 
> MODULE/BOARD/"LIBRARY" could be derived from that class (existing or new "ITEM THAT CAN
> BE SAVED CLASS"). 
>
> BOARD_ITEM would be ideal but LIBRARY doesn't look to me like a descendant of BOARD_ITEM
> or EDA_ITEM.


The changes to PLUGIN should be "additional functions for MODULEs".  I like what we have
for BOARDs now.

The new work entails abstracting the *loading* and *saving* of a MODULE from/to a "MODULE
library" (aka MODULE collection).

So I would expect to see MODULE* in most of the new function prototypes.

Along with loading and saving, one may have to know which MODULEs are in a library, so in
comes MODULE *enumerating or listing*.

I'm not saying anything positive or negative about caching, or when or if it should
happen.  I am open to suggestions on that.

I am not really even saying that this goal is achievable, since I have not yet spent
sufficient time on it myself.  In the near term, if we can jam in this PLUGIN interface,
and re-position PCBNEW on top of it with respect to MODULE access, then we would then
pickup the following types of MODULEs, even without converting them before using them:


*) legacy KiCad modules
*) s-expression module in nanometers
*) Eagle module libraries ?
*) GEDA libraries ?


Conceptually the work is like cutting an electrical cord, and outfitting it with a defined
set of connectors, so that you can replace the downstream portion without change to the
upstream portion.

Yes, we are talking about a software interface.

We have done this successfully for BOARDs. It works, in 45 minutes I could put even the
specctra round-tripper into a PLUGIN.  Most if not all the import export operations also.

The question is now, can we do it for MODULEs from libraries, and do it in PLUGIN, or does
it take a lot more? 





Follow ups

References