kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #22651
Re: [RFC PATCH] Rounded rectangle pads
Hello Clemens.
Clemens Koller writes:
> Hello, Mathias!
>
> Thank you for your time spending on this.
>
> >>> Clemens Koller <cko@xxxxxxxxx> writes:
> >> First feedback: It would be great to make the corner radius variable
> >> instead of fixing it to 25% of the shorter pad edge and <=0.25mm. [1]
>
> > That can certainly be done.
> > What do you think how it should work?
>
> Well, you can keep your defaults as they are as an "automatic"
> radius feature, which idea I really like:
> [X] Adjust corner radius automatically to [p] percent where
> p can be entered in a textbox. p=25% seems fine as a default.
> And show the calcualted [r] radius i.e. in a greyed out
> textbox for information.
OK.
> If you uncheck the automatic option, you simply grey out the
> [p] percent and allow to fill in the desired [r] radius
> with proper clipping of the value as necessary.
OK.
So this would need two input fields and a checkbox. I will check whether
the dialogs can be made to do the logic behind it.
> > I imagine the following:
> > - optionally a radius can be given, <= 0 or not given means use default
> > as above (I need to check how the file format handles optional values)
>
> I would prefer to see what the default as well as what the current setting
> is. 0 is 0 and not "default" which is 25% of the shorter pad dimension,
> which calculates 2mm down to 0.5mm.
OK.
> > - actual value used is clamped between 50% of shorter edge and some
> > small value (a radius of 1 or 2 internal units might cause nasty
> > numerical problems)
>
> 50% of shorter edge and some clipping in the small scale is fine.
> You had 100nm there IIRC. But are the numerical problems caused
> by a bug which should be fixed anyway?
Calling it numerical problem is probably wrong.
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.
I just fear that in some corner, maybe even an OpenGL lib or a graphics
driver, this will lead to a problem. It can't be easily tested because
there are so many versions of libs/drivers.
> > - in the pad properties dialog the input field is empty by default for
> > new pads
> > Would the possibility to alternatively give the radius as a percentage
> > of the shorter edge be useful? It would complicate things a bit though.
>
> Sorry, seems like I cannot follow you here. Which input field?
The idea was to have only one input field for corner radius.
Input "0.2" and it means 0.2 mm, input "20%" and it is taken as 20% of
the shorter pad edge.
With separate input fields as you suggest this is moot.
MGri
Follow ups
References