kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #44128
Re: Assumptions about EDA_DRAW_FRAME in pcbnew
On 7/3/20 9:22 PM, Seth Hillbrand wrote:
Hi Reece-
I think I mentioned back then that I'm happy to help with the
implementation. The offer remains if you are interested.
It is easy enough to overload with a pure virtual function in the base
class. The derived classes can override (not overload) the virtual
functions that apply to each. So pcbnew gets one viable function
signature and eeschema gets the other. Misusing this gets an error in
compiling, which keeps errors from creeping down to the user.
One aspect of dynamic_cast that is sometimes overlooked is that casts
to the base class are optimized out by the compiler. I think that
might save your implementation (if I understand your intention correctly)
Best-
Seth
Hi Seth,
I think it'd be great if you'd participate in the discussions of this
feature. As far as I'm concerned, the more input I get the better.
Last year I tried posting patches periodically for people to comment on
as my development progressed but I didn't get a lot of response. This
time I've created a GitLab repo which might make it easier for folk to
see what I'm doing in context:
https://gitlab.com/RRPollack/kicad/-/tree/rrp-5.99-origin-transform
Note that this is a rewrite -- not a port -- of last year's work, though
the user interface is intended to be the same. I've pushed the first
phase of changes, which implement the Pcbnew status line and the dialogs
that use the UNIT_BINDER class. It all compiles cleanly. The parts I've
tested work fine but I have to remember how to get to some of the
dialogs. The code needs some clean-up, especially in the Doxygen
support, and there's some development spew to the console so I can
verify the conversions taking place are appropriate.
Conspicuously missing is the settings panel that allows easy
configuration; I just haven't gotten to it yet. To change to use the Aux
origin and flip the Y axis (my normal configuration) add these lines to
the pcbnew.json "pcb_display" section:
"origin_invert_x_axis": false,
"origin_invert_y_axis": true,
"origin_mode": 1,
Also missing is support for GetMsgPanelInfo, GetSelectMenuText, and DRC
markers. All in good time!
It'd be nice to get some feedback before I get too far down the road.
-Reece
Follow ups
References