kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #44473
Re: Evaluating cross-selection between the 3D-Viewer and Pcbnew
The 3d viewer does have access to the kiway, but I really think we need to
think about how this is done before we just go adding a cross-probing
interface between pcbnew and the 3d viewer. As our kiway is written
currently, adding the cross-probing will basically be adding a brand-new
messaging protocol between those two frames - and I would like for us to
avoid adding a new cross-probing specification when we already have two in
existence (the pcbnew <-> eeschema one and eeschema <-> simulator) that
both are different.
Jon, Seth and I had been discussing the future of the kiway off and on for
the last few months, and I think we are going to propose upgrading the
kiway to be a more structured interface (possibly using something like
JSON-RPC, but that hasn't been spec'd yet and I don't want to start the
discussion at this moment) with every frame listening on a local port for
the messages (instead of the current wx-event system relying on passing
strings/objects in memory) for v7. The thinking is then we define a
"cross-probe" command in the new RPC system that will be sent over the
kiway and all frames receive it and act on it if they want (so then you can
select a module in pcbnew and it will send a single cross-probe request
that can be ingested by both eeschema and the 3d-viewer instead of having
to send two different requests in possibly two different formats).
I don't think Seth, Jon or I will have much time in the next month to write
up a spec on this new interface yet since we all have work to do before
feature freeze. But I think this can definitely be something we ensure is
inside the kiway spec so it will be implementable in v7.
The part I have never been sure of is how the actual 3d-viewer parts would
be implemented, because it is not obvious to me if there is a nice way to
show the selection in the rendering, or if we can get user-input to select
models in the 3d viewer and then cross-probe them back to the board in our
system. This is something that is possible in the OpenCascade viewer system
though, so we might be able to add similar functionality to ours.
-Ian
On Wed, Sep 2, 2020 at 2:04 PM Wayne Stambaugh <stambaughw@xxxxxxxxx> wrote:
> It's part of the kiway mail messaging system. Take a look at the
> kiway*.{h/cpp} files. I'm not sure if the 3D viewer is derived from
> KIWAY_PLAYER. If it is, this should be fairly straight forward assuming
> you can figure out the component position from the model geometry and
> translate that back to the board position. If not, you will have a lot
> more work to do. I do no want to add another messaging protocol to the
> board editor.
>
> On 9/1/20 6:15 PM, 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@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help : https://help.launchpad.net/ListHelp
> >
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
Follow ups
References