RoundedBox

It’s a quite common situation that the sharp Box edges look not “natural” in some places, so I wrote RoundedBox. Maybe you find it useful. It behaves much like the normal Box class. As you can see on the first picture, the normals “go around the corner” to avoid sharp edges. The width and dephth of the “bevel” is configurable.



not meaning to hijack but any hope of the cutmull curves getting in aswell I've been finding them useful

Cool  :slight_smile:

Thanks!

Very nice, played with it a bit and works well. Might find a place in the shapes package if you don't mind.

great stuff, should be added to the shape package yes. just one thing, shouldnt the normals on the flat sides be pointing straight out from the box? otherwise the sides and not only the bevel would look rounded…(might just be seeing the normals wrong on the pic though)

Agreed, if you create your default rounded box using just the constructor with extents, the normal issue is apparent.

If you want to have it in the shape package, please do it, I'd feel honoured.



Regarding the normals I was also thinking about this, but for my small examples the "round" look was fine, but I guess for bigger boxes it will look strange. Also for more rectangular boxes the normals of the edges are probably not so good. As I'm not so experienced with this, I'd like to ask if someone else could have a look. How about you, MrCoder?  :smiley: