Automatic Partitioning of 3D Meshes