On 05/05/2012 03:32 PM, Miguel Angel Ajo Pelayo wrote: > I'm going further, my plan is not only to make PLUGIN accesible from python, > that's the > first stone, > and a good one. > > The next part in the plan, is to make pcbnew/eeschema/etc, scriptable itself, > and that > means, > that the user can put ".py" extensions somewhere, and the pcbnew/eeschema/etc > get extended > with that .py modules functionality. > > http://bazaar.launchpad.net/~miguelangel-r/kicad/scripting/revision/3478 > <http://bazaar.launchpad.net/%7Emiguelangel-r/kicad/scripting/revision/3478> > > these are the "preliminary" python classes > http://bazaar.launchpad.net/~miguelangel-r/kicad/scripting/revision/3478#pcbnew/scripting/plugins.i > <http://bazaar.launchpad.net/%7Emiguelangel-r/kicad/scripting/revision/3478#pcbnew/scripting/plugins.i> > > that have their mirror C++ classes accessible: > http://bazaar.launchpad.net/~miguelangel-r/kicad/scripting/revision/3478#pcbnew/scripting/pcbnew_footprint_wizards.h > <http://bazaar.launchpad.net/%7Emiguelangel-r/kicad/scripting/revision/3478#pcbnew/scripting/pcbnew_footprint_wizards.h> > > > and get registered on load by the pcbnew.LoadPlugins() > http://bazaar.launchpad.net/~miguelangel-r/kicad/scripting/revision/3478#scripting/python_scripting.cpp > <http://bazaar.launchpad.net/%7Emiguelangel-r/kicad/scripting/revision/3478#scripting/python_scripting.cpp> > > This is a first wizard example: > http://bazaar.launchpad.net/~miguelangel-r/kicad/scripting/revision/3478#pcbnew/scripting/plugins/fpc_footprint_wizard.py > <http://bazaar.launchpad.net/%7Emiguelangel-r/kicad/scripting/revision/3478#pcbnew/scripting/plugins/fpc_footprint_wizard.py> > > > and now, I'm working to make a generic interface for the footprint wizards, > inside > pcbnew module editor, > it should be interactive, and as we modify any parameter we should see the > resulting > module on the right.
Shortly after PCB_IO starts to firm up, it should be pretty easy to teach the module editor to pull an entire module off the clipboard, i.e. paste module. It is one of the cleanest uses of clipboard support that I can foresee right now. So this gives you an option to work fully external to Pcbnew, using your own graphics strategy, and then when done simply pass the MODULE back to PCBNEW via clipboard. It requires that the user paste the module, but it is only a click or two if it comes with an implied "replace current module with clipboard contents" paradigm. Or you could simply write the new module into a footprint library. This gives you an option to use any standard python graphics API, more autonomy. Maybe you want to explore Torsten's GAL under python. There are some more degrees of freedom to consider. I personally would want to build a gem before I got too caught up in integrating it into Pcbnew, doing a tighter integration later is also a reasonable path, tighter than clipboard support. Later you could return a MODULE which replaces the one in the module editor, and is called from the module editor. Dick > > > > 2012/5/5 Dick Hollenbeck <d...@softplc.com <mailto:d...@softplc.com>> > > On 05/05/2012 08:55 AM, Miguel Angel Ajo Pelayo wrote: > > Thank you too Wayne, > > > > It's nice to team up with you all :-) > > > > > > I have a little prototype of the footprint wizards, for which I > should finish the C++ > > integration part, I just finished testing the python part. > > > What needs to be done in C++? > > I thought you already had a bridge from python to PLUGIN done. > > > > > _______________________________________________ > Mailing list: https://launchpad.net/~kicad-developers > <https://launchpad.net/%7Ekicad-developers> > Post to : kicad-developers@lists.launchpad.net > <mailto:kicad-developers@lists.launchpad.net> > Unsubscribe : https://launchpad.net/~kicad-developers > <https://launchpad.net/%7Ekicad-developers> > More help : https://help.launchpad.net/ListHelp > > > > > -- > > Miguel Angel Ajo Pelayo > http://www.nbee.es > +34 636 52 25 69 > skype: ajoajoajo _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp