set the function samplePoints not random

Feel free to ask any question here
Post Reply
ZilongS
Posts: 21
Joined: Tue Oct 09, 2018 8:12 pm

set the function samplePoints not random

Post by ZilongS »

Hello, Daniel,

I am using the compiled version of CloudCompare, and I am trying to sample points from a mesh with the function cloud = ccmesh->samplePoints(true, 4.0, true, false, false, nullptr); however, with the same mesh (.stl) and the same parameters, each time the resulted point cloud is not the same, for the sake of repeatability, is there a way to set this function not 'random'?

Thanks in advance for your response.

Sincerely

Zilong
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: set the function samplePoints not random

Post by daniel »

Not in the current version.

You'll have to patch the method so that it can accept an optional seed, or simply hardcode it (by setting the seed to 0 for instance in the construction of the 'gen' member: https://github.com/CloudCompare/CloudCo ... s.cpp#L325).
Daniel, CloudCompare admin
Post Reply