• ## Feeds

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

• CommentAuthorandyL
• CommentTimeSep 13th 2017

To round the corner of a polygon I could use .round_corners(inner radius, outer radius, number of points) and we use it quite a lot.
> round_corners(double rinner,double router,unsigned int n)
Is there a way to access only one corner to be rounded?
I'm facing the issue to round corner with a different value.

Thanks and Best Regards,
Andy
• CommentAuthordavidnhutch
• CommentTimeSep 13th 2017 edited

I don't know of a direct answer to your question, but I'll just point out something. This may already be obvious, but in case not --

The same can be achieved with two (or more) overlapping shapes. Let's say you have a rectangle with three large radius and one small radius corner. Let's say the small radius corner is in the lower left. Then draw the rectangle and round all four corners at the large radius. Then draw a smaller rectangle with the same lower left coordinate but a different upper right coordinate (so it's a smaller rectangle). Then round all four corners of the smaller rectangle with the smaller corner radius.

This works in most cases for most polygons you could imagine, but admittedly is not as convenient as accessing individual corners with .round_corners

Another alternative is to make the code generate every point of a single polygon, so it looks just how you want.

• CommentAuthorandyL
• CommentTimeSep 13th 2017

Hi David,
Thanks a lot for your feedback.
Right now that's what I'm doing.
But as a next step I need to get the selected rect, get all corners and all points of the box and do some boolean operations.
So before I continue I wonder to if there might be an easier way to round one corener or corner differently.
(I also checked your TRT ..)

Kind Regards,
Andy
• CommentAuthorMatthias
• CommentTimeSep 14th 2017

Hi all,

I don't know whether this is acceptable: you can basically inhibit corner rounding by introducing a small segment. Since collinear segments are merged, you need to create a small artificial corner.

For example: this polygon:

``````0.00000     0.00000
0.00000     99.99900
0.00100     100.00000
100.00000   100.00000
100.00000   0.00000
``````

has a small cut at the 0/100 corner. This cut will make this corner being ignored. So if you apply rounding to this polygon, the upper left corner is not touched.

Kind regards,

Matthias

@David ... thanks for your help :-)

• CommentAuthorandyL
• CommentTimeSep 18th 2017

Hello Matthias,