Well friends,
Imagine a brep with a single face (a trimmed surface) that "approximates" some tensile membrane that may look like this image attached (prior sending stuff to Kangaroo). Not my project: in fact some friend's friend asked that in order to send a collection of random "anchor" points to Kangaroo and ... blah blah.
The requirement is to find anchor points by (a) creating a random set of points (within the projected face in a given plane, in most of cases the global xy) and then (b) "culling" them as follows:
(b.1) no two points are closer than MinDistance.
So this script attempts to "cull" randomly placed points that satisfy(?) the MinMax criteria and do the rest. NOTE: points are few ... so don't stick to algorithm's efficiency.
2 questions for the willing gurus out there:
Script 1: this "cull" approach is rather wrong - I'm open to any suggestion.
Script 2: change the MaxDist value and observe the script turning from red to OK status. Why?
NOTE: GH fails to internalize stuff quite frequently. If this is the case, use Rhino file
best, Peter
Thomas
Hi!
Script 1:
If I understand you correctly you have a list of points and you want to select the points where the shortest distance to all other points is within a given interval.
A very simple attempt:
The result might depend on the order of the points (first point -> higher priority).
Sep 19, 2014
Vicente Soler
If you reference the Vector.gha assembly in a scripting component you can use the PopulationSolver class that is used in the Populate components. You'll have to create a derived class that inherits it.
(I don't know if I'm breaking the user agreement doing this.)
Sample code for a C# scripting component:
Sep 21, 2014