Round-edged box flat

Your parameters do not make sense geometrically.

w = 1 // width
h = 5 // height
t = 1 // thick

r = 3 // radius corner => double radius of the corners is 6, but the width and height is much smaller
s = 1 // smoothness

I have not included a check, as nonsensical values sometimes result in interesting things.

See RoundedRectangle + Squircle (5th and 6th picture)

3 Likes