Projected convex hull in plane 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?
I solved the problem with the following algorithm


Create N horizontal planes of appropriate size
For each plane


Apply the boolean modifier (intersect the plane with the target object)
Extrude the plane in the z direction, giving it some height
Apply the convex hull operator
Remove the extra plane created in step 2
Remove any vertices inside triangles

Merge planes into one object
Bridge the edge loops
Remove interior faces (they were left from the convex hull operator)


Here is the Python script with room for some improvements: https://gist.github.com/milasudril/960f5c2c4c3735f3fdea566cfdc003d9