kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #22703
Re: [RFC PATCH] Rounded rectangle pads
Hi Clemens,
Clemens Koller writes:
> Hi, Mathias!
>
> On 2016-01-14 20:06, Mathias Grimmberger wrote:
> > In the current drawing code in some places we build polygons
> > approximating the corner quarter circles, e.g. using 8 segments. For a
> > very small radius there will be segments of zero length in that
> > approximation.
>
> Can you point me to some code where this is done?
> Just want to see and understand it.
Hmm, there are not as many places as I seemed to remember, the legacy
drawing uses proper arcs.
In board_items_to_polygon_shape_transform.cpp, function
D_PAD::TransformShapeWithClearanceToPolygon(), the cases for
PAD_SHAPE_TRAPEZOID, PAD_SHAPE_RECT and PAD_SHAPE_ROUNDRECT: the calls
to "outline.inflate()".
In common_plotGERBER_functions.cpp, function
GERBER_PLOTTER::FlashPadRoundRect(), the case for pads rotated not by 0,
90, 180 or 270 deg: in the for loop "for( int rot = 100; rot < 900; rot
+= 100 )".
In file pns_router.cpp, function PNS_ROUTER::syncPad(), a SHAPE_CONVEX
needs to be constructed, which will need to approximate the round
corners - this is not implemented yet.
MGri
References