you can used AI tools (Python 3) Open3d Packedge to do that
1- get all voxel of the mesh
2- cluster all voxel to groups
labels1 = np.array(downpcd.cluster_dbscan(eps=0.05, min_points=10))
3- Re convert each group the mech
bpa_mesh = o3d.geometry.TriangleMesh.create_from_point_cloud_ball_pivoting(rest,o3d.utility.DoubleVector([1radius, radius2]))
mybe the below example help you to write your code