It's interesting that there aren't any definitive answers to this question on the web.
Conversion from a mesh to a point cloud is not similar to jamming the mesh's vertices into a point cloud! Mesh is a sparse representation of a point cloud. Therefore, to convert a mesh to a point cloud, you need to sample points on the surface of the mesh. PCL has a utility for doing that called pcl_mesh_sampling
. The source code is located here.
Basically, the method samples N
points uniformly from the surface of the mesh using VTK. It is very effective and you'll get point clouds with any number of points you want.