3MAH / microgen

Microstructure generation
https://3mah.github.io
GNU General Public License v3.0
67 stars 8 forks source link

Modified sphere generation using a numpy random generator instead of python built-in `random()` function #35

Closed ricardo0115 closed 8 months ago

ricardo0115 commented 8 months ago

During PR #26 in commit 352b517a898d8e2b4186de819b6e7b64a6b04ec9, an undeterministic behavior has been added in the generate() method of Sphere class. A random creation direction axis of the sphere is used as workaround to a bug of OpenCascade related to this issue https://github.com/CadQuery/cadquery/issues/1461

In order to provide a deterministic behavior in sphere generation. A numpy random generator with a fixed seed is used instead of the built-in python random() function.

kmarchais commented 8 months ago

Thanks!