Consider an object like this one: Is it possible to, and if it is how, automatically generate a body that is convex for every cut along the xy-plane, without destroying the radial variation in along the z axis.
I realize that this can be tricky do on a general mesh, where the edge loops are not strictly planar. Instead I thought that following approach could work:
- Manually add some horizontal edge loops to a new mesh, at chosen z coordinate
- Use the shrinkwrap modifier, with the non-convex mesh as target
- Scale each loop such that all vertices within one loop has the z coordinate
Instead of shrinkwraping and scaling, it should also be possible create new loops by intersecting radial edges with horizontal planes. Anyhow, we have created a set of horizontal edges, that encloses the geometry well.
- Apply the convhull operator on the edge loops individually
- Connect vertices to generate new faces
If I am not wrong, it should be possible to script steps 2-5. Here tips on appropriate python APIs is of interest. However, the procedure fails after step 4, since the convhull operator pollutes the mesh with new, coplanar and overlapping faces, that I do not want. Is it possible to remove that extra geometry automatically?