How to use plugins

Asked by Mitch Bradley

I see references to a new plugin feature, in particular an EAGLE_PLUGIN so pcbnew can read Eagle .brd files, but I can't find anything that tells how to use it. Is there anything written about it, other than "Use the Source, Luke" ? I searched through all the menus I could find on a recent build (2013-07-14 BZR 4242) and saw nothing about plugins.

Question information

Language:
English Edit question
Status:
Answered
For:
KiCad Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Mitch Bradley (wmb-a) said :
#1

Oh, I should mention that I am using a Windows7 version. Perhaps I would have different results with Ubuntu?

Revision history for this message
Dick Hollenbeck (dickelbeck) said :
#2

On 07/30/2013 03:41 PM, Mitch Bradley wrote:
> Question #233282 on KiCad changed:
> https://answers.launchpad.net/kicad/+question/233282
>
> Mitch Bradley gave more information on the question:
> Oh, I should mention that I am using a Windows7 version. Perhaps I
> would have different results with Ubuntu?

The pcbnew PLUGINs are callable from three primary places:

a) from pcbnew for loading a board. (maybe saving it too.)

b) from pcbnew for reading footprint libraries. (maybe writing to them too.)

c) python scripts for either above.

The "maybe" support depends if the "write" and "save" functions are implemented within a
PLUGIN. They are optional, and most plugins do not implement them, since nobody that has
worked on them has had an interest in saving to a foreign format. The primary interest
has been in grabbing designs *into* KiCad *from* foreign formats.

However, the PLUGIN design also intends to "organize" code into logical buckets of
functionality, and although those buckets can be empty, if the "maybe" support were
needed, a person/developer now knows where to put that new desired functionality.

Currently only a) and c) are available for use. The b) support is not available until the
"fp library table" support is completed. That is supposed to be before the end of the
summer (of this year), per Wayne who is working on it now, with standby and advisory help
from me.

If you want to see a) in action, say to load an Eagle board file, do this:

1) verify that the eagle board is version 6.x format which is xml. Upgrade your eagle if
needed to >= 6.0, load and save the older board into the newer eagle first if needed.
This is done simply by loading the older board file and saving it in the new eagle.

2) in pcbnew:

  *) Menu File -> Open
  *) In file open dialog, change file type display above the Cancel Open pair
     to "Eagle ver. 6.x XML.."
  *) Find your eagle XML *.brd file which unfortunately shares the same extension
     as the old kicad board files.
  *) click open.

In the interim, until the b) support is callable from PCBNEW, you can use the above
technique to move footprints from Eagle into KiCad, simply by putting the ones you want
moved into a dummy Eagle board file.

Lastly, I recently committed a python script which should also allow a person to convert
an entire library from one format to another, constrained by the "maybe" functionality
buckets mentioned above. The scripting API is a back door way to invoke the b)
functionality without waiting for the "fp lib table" support. So with this script, named
lib_convert.py, one could use it on top and the EAGLE plugin beneath it to read eagle
ver.6 footprint libraries.

This is the extent of the documentation for now. The fp lib table support will entail a
dialog window which should make it more clear wrt b).

Revision history for this message
Mitch Bradley (wmb-a) said :
#3

Thanks very much for the detailed answer! I tried (a) with my most recent Eagle design and it worked like a charm.

Based on that and other recent evaluations, I am recommending to my coworkers that we use KiCad for new designs.

Thanks to the development team for all the great work in improving KiCad. I had a minor role in KiCad's development before there was a team. About 10 years ago I submitted a set of patches improving the display algorithms. At the time, KiCad tended to leave a lot of screen artifacts when moving objects, requiring frequent invocation of "redisplay" to clean things up. I fixed every such problem I found; it is encouraging to see that the current version still works reasonably well in that respect. On Windows, there are some display glitches related to moving entire windows, but internal KiCad operations maintain the display quite well.

Can you help with this problem?

Provide an answer of your own, or ask Mitch Bradley for more information if necessary.

To post a message you must log in.