Nice rounded corners (bevel) in 2D

   1292   3   0
User Avatar
Member
74 posts
Joined: 1月 2015
Offline
What's the most elegant way to get a nice. rounded corner in a 2D shape, where the sharp corners are? I tried bevel on points (on light green points), bevel on edges (the dark green edges), but the results aren't smooth. The best results I got was with qLibs "Rounded corners" OTL, plus some smoothing (on the right), but it still took some post-processing.

Attachments:
426.png (23.3 KB)

User Avatar
Member
670 posts
Joined: 9月 2013
Offline
I usually calculate the smooth minimum of a grid towards both curves.

Attachments:
curves_smooth.hipnc (109.0 KB)

https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
User Avatar
Member
670 posts
Joined: 9月 2013
Offline
You could also look into blurring with weights.

Attachments:
curves_smooth_2.hipnc (154.1 KB)

https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
User Avatar
Member
74 posts
Joined: 1月 2015
Offline
Thanks, both work. I measured the cook time, the weights seem ~1.5 x slower. I prefer to keep the exact points from the original shapes (outside of the rounded area) for 100% sharp corners, but it's easy to do with nearpoint, snap etc
Edited by element33 - 2022年6月16日 10:54:09
  • Quick Links