How do you get PCB_EDIT_FRAME functions exposed to python?
I've been looking around the source code tosee how to expose them.
Specifically, PCB_EDIT_FRAME::syncLayerVisibilities, and other PCB_EDIT_FRAME
functions.
It looks like to me the definitions are inpcbnew/pcbframe.cppand the
declarations are ininclude/wxPcbStruct.h
And the relevant swig files are inpcbnew/swig/pcbnew.i
Is it correct that modification of pcbnew.i to either1) (excerpt)%include
<gal/color4d.h>%include <id.h>%include <wxPcbStruct.h>
or 2)%include wxPcbStruct.i(and have some method for generating wxPcbStruct.i)?
The functions I'm wanting are declared in C++ as "protected:". Does thishave
any implications for running them from python through SWIG?
Finally, how do you make sure that all argument types are accessible from
python as well?
On Tuesday, August 22, 2017 1:02 PM, jp charras <[email protected]>
wrote:
Le 22/08/2017 à 19:33, Greg Smith a écrit :
> Continuing to review, it appears I am wrong. PCB_EDIT_FRAME:sLV does in fact
> synchronize the
> checkboxes, but also calls PCB_DRAW_PANEL_GAL::SLV to do the background
> synchronization of the layers.
>
> Thank you jp, and I apologize for not researching sufficiently your answer
> before posting.
>
> So at this point, how do we get PCB_EDIT_FRAME:sLV exposed in python?
>
> void PCB_EDIT_FRAME::syncLayerVisibilities ( )
>
> protected
>
Certainly the Python interface needs a few specific and "easy to call" methods
to update the GUI and
the canvases, when a board is modified by a python script.
The "legacy" canvas is easy to update, but the GAL canvas has a lot of cached
data, so it needs a
rebuild method.
I'll try to add this kind of methods. But remember: I have a (very) poor
knowledge of Python.
Also, I'll not be able to work on Kicad next 3 days.
--
Jean-Pierre CHARRAS
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kicad-developers
More help : https://help.launchpad.net/ListHelp
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kicad-developers
More help : https://help.launchpad.net/ListHelp