I have a complex geometry mesh object, which is an irregular shape.

I want to redraw that complex geometry mesh object using multiple simple primitive shapes.

For example, I want to use cuboid, sphere and cylinder to represent a complex geometry mesh object.

I am given only the vertices points, triangular of that complex geometry mesh.

How do I decompose the geometry shape into cuboid, sphere, cylinder.

Please ask if you need details. Thank you.

  • $\begingroup$ You can't necessarily decompose a mesh into cuboids, spheres, and cylinders. You can decompose it into triangles, though. $\endgroup$
    – Dan Hulme
    Apr 11, 2018 at 14:24
  • $\begingroup$ @DanHulme, why I cannot decompose mesh into cuboids, spheres, cylinder? $\endgroup$ Apr 11, 2018 at 14:42
  • $\begingroup$ Because not all solids can be expressed as the union of finitely many cuboids, spheres, and cylinders. $\endgroup$
    – Dan Hulme
    Apr 11, 2018 at 15:11
  • $\begingroup$ Something like perso.telecom-paristech.fr/boubek/papers/SphereMeshes ? $\endgroup$
    – user106
    Apr 12, 2018 at 6:01

1 Answer 1


It might be a bit of an overkill, but you could use spatial partitioning, such as Octrees.

Once you have it built, you can start evaluating partitions, given a max depth level of your choice, and form bounding volumes with the vertices inside each partition.

You can test all of your shapes for each partition and choose the one that approximates the best all vertices you are enclosing in it (you can measure this by, for example, the volume which, while enclosing all vertices, takes up the less volume).

PS: I've never tried anything like this, is purely theoretical


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.