cnr-isti-vclab / PyMeshLab

The open source mesh processing python library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Random Seed Stuck in generate_stratified_triangle()

zachconnor97 opened this issue · comments

I was using the generate_stratified_triangle() function to generate faux point clouds from OBJ files.

ms = pymeshlab.MeshSet()
ms.load_new_mesh(filepath)
ms.generate_sampling_stratified_triangle(samplenum=10000, sampling=2, random=True)

I thought this filter would behave like it does in the Windows version of Meshlab where the random seed is not fixed and each point cloud generated from the same OBJ (or any other mesh file) would be unique (or at least pseudo-random).

However, the PyMeshLab implementation of the Stratified Triangle sampling returns the exact same point cloud every time you run it.
Is there a way to manually set the random seed for the random sampling so that I can manually adjust it to get unique point clouds? What about allowing the random seed to change?

I have searched the docs, but all the random seed assignments don't apply to this specific filter.