How to sample points for the surface

When I sample points for surface by using of equal interval of (u, v), I find the points in the inner hole of surface has also been sampled, which should be empty. So I wonder if there is any special API for sample points in the surface. Thanks a lot

Jun WANG's picture

By using of BRep_Tool::Triangulation, the result is achieved. However, the discretized points are too sparse and thin. Can I set some parameters to get dense points in the surface. ????????

Rob Bachrach's picture

BRep_Tool::Triangulation only contains what is needed to draw the shape. It does not fill in any additional detail. You have a several options for getting more sample points within the shape. Here are a few that I know of:

1 - Try using DBRep_IsoBuilder to generate isolines representing your face. Load the isolines into a DBRep_Face. Then, you can query the isolines to get U and V parameters. Finally, use BRepAdaptor_Surface::Value to get the actual points along the isolines.
2 - Purchase the mesh framework from OCC
3 - Use a free mesh framework (like netgen)