kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #32201
Re: Signal integrity simulation within Kicad
Hi Andreas,
For (1), I will defer to others who know more about this, I seem to
remember a conversation about this a while ago on the mailing list, with
the conclusion being that it is indeed hard to be notified when BOARD
changes, and fixing this could be a bit of work.
For (2), the PCB_BASE_FRAME methods are for the legacy canvas, so I
wouldn't worry about implementing your feature there if I were you, since
it will eventually be removed.
The RATSNEST_VIEWITEM is what is used on the GAL (OpenGL/Cairo) canvases.
Regarding the layer, you could use LAYER_GP_OVERLAY for prototyping, but
you are right that (at the moment) you can't add layers at runtime.
If you think that all of the simulation outputs can be drawn with a single
graphics layer, I think it is perfectly reasonable for you to expand the
enum with another layer definition.
You could use this new layer for your triangle mesh drawing, and then use
LAYER_GP_OVERLAY if you wanted to add any annotations to the graphics
perhaps? (meaning: measurements, etc, as is done with the RULER_ITEM)
-Jon
On Tue, Dec 5, 2017 at 9:42 AM, Andreas Buhr <andreas@xxxxxxxxxxxxxx> wrote:
> Dear Kicad developers,
>
> I am browsing the Kicad source code to get an idea how to integrate a
> simulation tool.
>
> I'd like the following:
>
> 1. The plugin should be informed whenever something changes. It would be
> great to get a bounding box of the change.
> 2. The plugin should be able to draw on the canvas. I'd like to register
> a new layer (for example to show the triangle mesh). The user should
> then be able to enable/disable this layer.
>
> These two requirements are in some sense similar to the requirements of
> "ratsnest", so I followed "ratsnest" through the code.
>
> Concerning (1):
> I got the impression that it is not easy to be informed about all
> changes in a BOARD. Is this correct?
>
> Concerning (2):
> And I got the impression that there is not one way to draw to the
> canvas. I found two drawing methods for ratsnest, one in PCB_BASE_FRAME,
> the other in RATSNEST_VIEWITEM::ViewDraw. Is it necessary to implement
> two drawing methods for each feature?
>
> And it seems that the layers are organized in an enum (GAL_LAYER_ID), so
> adding a layer at runtime seems impossible without larger infrastructure
> changes. Is this correct?
>
> What would you propose? How can a plugin be informed about all changes
> to the board? And how could a plugin draw on the canvas?
>
> thanks a lot in advance,
> Cheers,
> Andreas
>
>
> On 11/30/2017 12:18 AM, Wayne Stambaugh wrote:
> > Hi Andreas,
> >
> > Per our previous conversation, if you want to write your solver in C++,
> > then I would prefer that you do it as part of a solver plugin rather
> > than a command event handler in Pcbnew. I image there would be other
> > uses for a solver plugin object such as a thermal mapping solver which
> > has been proposed in the past. The other option would be to use the
> > Python action object and write the entire solver in Python rather than
> > C++. That may make your life a bit easier.
> >
> > Cheers,
> >
> > Wayne
> >
> > On 11/29/2017 01:09 PM, Andreas Buhr wrote:
> >> Dear Kicad developers,
> >>
> >> I'm new to Kicad development. Maybe you could give me some starting
> tips?
> >>
> >> I am a 5th year PhD student at the university of Münster in Germany,
> >> website:
> >> https://www.uni-muenster.de/AMM/en/ohlberger/team/andreas_buhr.shtml
> >>
> >> I am doing mathematical research targeted at developing solvers for 3D
> >> Maxwell's equations in highly complex structures, such as PCBs. While
> >> being in an early stage, the goal is to develop a signal integrity
> >> solver which does a full-wave simulation of the electromagnetic fields
> >> and calculates S-parameters within a very short time.
> >>
> >> I would love to develop and test my algorithms within KiCad.
> >>
> >> The input which my solver needs would be an array of polygons,
> >> representing the copper-filled areas on each layer.
> >> I then want to create a 2D triangle mesh and based on that a 3D prism
> >> mesh for finite element analysis.
> >>
> >> What would you recommend? How to I get polygons, representing the copper
> >> filled areas of each layer?
> >> I do have some experience developing C++.
> >>
> >> thanks a lot in advance,
> >> best regards,
> >>
> >> Andreas
> >>
> >>
> >>
> >> _______________________________________________
> >> 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
> >
>
>
>
> _______________________________________________
> 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