Hi,

I'll try to answer what I can, hopefully others can complete if
something important is missing.


Here are two related issues :

https://gitlab.com/kicad/code/kicad/-/issues/3859

https://gitlab.com/kicad/code/kicad/-/issues/4440


These are some functions to cross probe,:

https://docs.kicad-pcb.org/doxygen/classSCH__EDITOR__CONTROL.html#a3a19f716e072022435374ea02d7911e6

https://docs.kicad-pcb.org/doxygen/classPCB__INSPECTION__TOOL.html#aff17bf2b3e2d92ad1f71d4c62a0f2bdd


- Does a footprint has a flag that says it is selected? or there is some other 
list of selected footprints?

Any BOARD_CONNECTED_ITEM have a IsSelected() method :

https://docs.kicad-pcb.org/doxygen/classEDA__ITEM.html#aff5c182b0ba2fbb771c57acbba7a4401

Though, for tracks , vias, arcs, and pad you might want to use
IsBrightened(), if you want to brighten them in the 3d viewer as well.

https://docs.kicad-pcb.org/doxygen/classEDA__ITEM.html#ac79173dface6b7523f8d2f865b99daf9

- How can I flag/or select a footprint and notify pcbnew/eeschema?

I think you could try to set the aforementioned flags. As for the
notifying part, I don't really know, but I think some links before
contain good information for the topic. I think you'll have to search
about the kiway and kiway players a little:

https://docs.kicad-pcb.org/doxygen/classKIWAY.html

https://docs.kicad-pcb.org/doxygen/classKIWAY__PLAYER.html


This is a function that notifies pcbnew from eeschema :

https://docs.kicad-pcb.org/doxygen/classSCH__EDIT__FRAME.html#abec0b5520ba9517c1c6f3fc49509d421


Hope it helps.


Best regards,

Fabien Corona

On 9/2/20 12:15 AM, Mário Luzeiro wrote:
> Hello all,
>
> I'm evaluating how/ if it will be possible to implement some kind of cross 
> footprint selection between the 3D-Viewer and Pcbnew.
> I know that it works with Schematic and Board so I believe there are already 
> some existent mechanisms.. but I don't know what exists in KiCad source-code 
> for that.
>
> Could someone point me where can I find relevant code that is already used or 
> implemented for this purpose?
>
> I have the following questions do clarify:
> - Can I notify 3D-Viewer to update the render from pcbnew/eeschema?
> - How can I flag/or select a footprint and notify pcbnew/eeschema?
> - Does a footprint has a flag that says it is selected? or there is some 
> other list of selected footprints?
>
> Any other concerns or things that I should have a look?
>
> Regards,
> Mario Luzeiro
>
> _______________________________________________
> 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

_______________________________________________
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

Reply via email to