I’m looking for some sample code, or an algorithm, or a free function library, or a well-written blog post, that can take a mesh that defines an enclosed solid and calculate the vertices for an “inner” mesh to make that solid hollow while retaining a specific relatively uniform wall thickness.
The input mesh would be 2-manifold, and the output mesh would need to be as well.
If it’s not obvious from the description, this would be for 3D printing.
My geometry is all surfaces of rotation right now, think a vertical cylinder with varying radii along the Y axis, but it would be nice if the algorithm can handle any kind of mesh.
Duplicate the vertices and offset them along their normals. Offset distance being equal to desired shell thickness.
Build the new inner (or outer) shell faces by replicating the original topology
Reverse the normals for new vertices/faces
The problem actually has nothing to do with OpenGL. If your mesh is not generative you can use any 3d modeling application (e.g. Blender) and just extrude the mesh.