thanks for replying. I should clarify more precisely. With this constructor and method it will create viewable point cloud. but this points we need to provide as input may be from vertices.
What I already know / have tried
Converting mesh vertices directly into a PointCloud (e.g. new PointCloud(mesh.Vertices)) is easy, but this produces a point distribution that depends heavily on tessellation and is not uniform.
For my use case, I need points sampled on mesh faces, ideally proportional to face area, with:
fixed point count
deterministic results (fixed seed)
independence from mesh vertex density
Current approach
Right now I’m manually:
iterating over mesh.Faces
computing face areas
sampling points inside faces using barycentric coordinates
adding those points to a PointCloud
This works, but I want to confirm whether this is the intended / recommended approach in RhinoCommon, or if there is an existing API or utility I may have missed.
My questions
Is there any RhinoCommon-supported method or helper for uniform surface sampling of a mesh (not vertices)?
If not, is manual face-area–weighted sampling the correct and stable approach?
Are there any pitfalls with this approach in Rhino (performance, precision, edge cases)?
Would you recommend sampling from:
the mesh directly, or
converting mesh → Brep and sampling from Brep faces?