Hi, I have a surface on which I want to generate random points, and I’ve already done this being able to choose the number of points and the seed.
However I would like to do the same thing but instead of inputting the number of points, I would like to input the minimum distance between points, so that the quantity is generated accordingly.
One (easy but a bit brute force) approach is to generate a much denser distribution than you need, then cull duplicates with the minimum distance as your tolerance and the ‘leave one’ option.
There’s various ways to do “quality” rnd pts … but get the simplest (as you asked). Using a Point3dList for prox checks (existed collection VS candidate pt).
sorry to bump this old topic, but I found your component very usefull. I’m just trying to figure out what the InnerAtt and OuterAtt inputs exactly control.
2 nested loops (i.e. an outer and an inner using a classic while (true)) are on duty . Outer/Inner attempts vars control the exit conditions (hope dies last … but it does anyway).
Like creating a 2d grid, “distort” randomly pts (in ±x/y) and then map these pts to the underlying BrepFace Surface while keeping the ones contained in the Face.
Or … taking into account outer/inner BrepFaces Loops