Interestingly, there are no definitive answers to this question on the Internet.
Converting from a grid to a point cloud is not like clogging the vertices of a grid into a point cloud! Mesh is a rare representation of a point cloud. Therefore, in order to convert the grid to a point cloud, you need to try the points on the surface of the grid. PCL has a utility for execution called pcl_mesh_sampling . Source code is located here .
In principle, samples of methods N uniformly displayed from the surface of the grid using VTK. It is very effective and you will get point clouds with any number of points that you want.
source share