← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Enhanced arc tool in pcbnew


Hi Tom,


There are many ways to specify arcs that we should probably eventually
support. Arc-by-three-points and tangent to line as well. Most CAD
software has several modes for each of arc, circle and polyline (etc)

I think we'd probably want to approach that with a
MULTISTEP_GEOM_MANAGER each (perhaps via some sort of base class for
"arc managers" if that adds anything useful) and then either new
preview items, or extend the existing one, depending on how different
the preview items turn out to be. The GAL event loop can probably be
fairly similar, if not reusable, with the right polymorphism on the
geometry managers (that's the idea of them, anyay).

Another issue will be how to fit the controls into the menu - maybe
some sort of popout might be needed if we start accreting too many
geometric tools? We already need another space for a rectangle tool
and a bezier tool for when they become "things".



On Wed, Mar 15, 2017 at 6:09 PM, Tomasz Wlostowski
<tomasz.wlostowski@xxxxxxx> wrote:
> On 14.03.2017 16:44, John Beard wrote:
>> Hi,
>> This is something I've bene toying with for a little while: an
>> enhanced overlay and construction method for arcs in Pcbnew.
>> The flashiest part is the new overlay, which is similar to the ruler
>> tool in concept and feel and uses many of the same utility functions.
>> New features for the tool are ability to "go back" with backspace and
>> snap angles with the Ctrl key.
>> It introduces a couple of new classes, which, as members of
>> common/preview_items, can theoretically be used from other GAL
>> canvases for implementing similar tools.
>> I tried to genericise the event loop code, but failed to make it much
>> clearer, so I put it back: it's still a custom event lootp in
>> DRAWING_TOOL::drawArc.
> Hi John,
> Great job again, I vote for merging it. BTW - do you think it would be
> worth to extend the arc tool with more drawing modes? For example,
> defining an arc with a constant angle by its two endpoints?
> Cheers,
> Tom