# how to draw mesh equal distance from irregular shape geometry bounding box

I am given an irregular geometry shape with its vertices, bounding box information.

How to draw a smooth mesh equal distance from that irregular geometry shape's bounding box?

Please refer to the image here:

My attempt: 1) I have tried to create 8 spheres at 8 corners of a bounding box and a box for X, Y, Z direction. The result looks very ugly and not smooth like this:

Is there any algorithm or formula I can utilise to draw mesh around a bounding box?

Thank you

• You're almost there, just add cylinders along each edge of the bounding box as well. If you then want to render it transparent and not see all the intersections between the spheres, cylinders, and boxes, there is a simple way to do that too, but it is too long for this comment box. – Rahul May 4 '18 at 15:40
• @Rahul, how to render the intersections between spheres, cylinders, boxes to be transparent? You can write it as an answer if you wish. Thanks. – user2150279 May 4 '18 at 19:56

$$\hskip2.5in$$
$$\hskip2.5in$$