Page 1 of 1

set the function samplePoints not random

Posted: Mon Jun 03, 2019 4:26 pm
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

Re: set the function samplePoints not random

Posted: Mon Jun 03, 2019 7:32 pm
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).