d an object, which allows me to define a value as an input and which then outputs an adjustable number of random values which - if summed - equal the input value. For example I want to define 50 as an input and the output should be 20 + 30 or 20 + 20 + 10 or 25 + 25,...
So basically I need something like a flipped addition object (but with an adjustable number of random output values) Is there anything like that in Grasshopper?
Thanks a lot in advance!
regards
Peter…
Added by Peter Steiner at 3:35pm on November 5, 2012
1#comments
But I seem to be having a problem with this closest to some value thing: values in my list are too small, up too 1 x 10^-30. The closest value I want to search for in that list is 1.25 x 10^-9
But Grasshoppers "find similar" component recognizes all of the values from the list, to be similar to 1.25 x 10^-9, because all of those values are in range from 0.1 to 1 x 10^-30.
Is there a way some kind of tolerance can be made, when it comes to recognizing a similar value?…
ou would do the following:
dim int1 as new inteval(0,1)
I suggest that you "reparameterize" your surface in code which happens like this:
(assuming that "sur" is a surface you've brought in or already dim'ed)
sur.setdomain(0, int1)
sur.setdomain(1,int1)
then if you want to cut the surface up into whatever pieces you can use the domains like percentages so 0 to .2 would be from the start to 20% and .2 to .3 would be 20% to 30% and so on.
I am not quite sure what you want with the chopped up domain unless you are trying to split the surface in which case please see the ghx I attached.
you could run that trim in a for loop to get a bunch of parts and add those surfaces to a list. Let me know if this is not what you needed and I'll see what I can do to help.
…
Loop'. The fun part of the slower version is that you can see what it's doing while it's running. 'Fast Loop' gives no indication that it's working, so you want to test it with small numbers and be sure it's coded properly before bumping the iteration count up.
The GH profiler running the slow version showed between 1 and 1.5 seconds per loop, but the reality was more like ~10 seconds per loop toward the end of an 11 X 11 grid, or ~20 minutes total. It's easier to be patient because you know it's working.
The 'Fast Loop' finished the same grid in 1.6 minutes! An impressive improvement. I've been running it on a 30 X 30 grid (900 points) for ~23 minutes so far and see nothing yet. Not the ~12 minutes I had hoped for... Now 36 minutes on this loop for 900 points... hope it's not stuck. Not fast! Later - DONE!! Profiler says 59 minutes for 900 points but it was more like an hour and twenty minutes total. It succeeded, I have a single 'Closed Brep' from 900 extruded rings, baked to Rhino.
Another strategy to explore would be doing 'SUnion' on a smaller grid using the Anemone loop, then replicate it by moving it as needed to form a larger grid; then run the copies through another 'SUnion' loop. I went ahead and implemented that while waiting. It works and is fast! Started with 3 X 3 and ran the result again as 5 X 5 (9 X 25 = 225 total) in barely ~70 seconds!? Trying 36 X 36 now... 1,296 points appears to have succeeded in less than ten minutes! Though it seems to take quite awhile after the loop ends before control is restored to GH/Rhino. I'll let you do your own experiments and benchmarks.
I encapsulated the loop in a cluster called 'suLoop' (blue groups).
Internal of 'suLoop' cluster:
…
Added by Joseph Oster at 11:14pm on March 22, 2017
set the percent to .05. It will load close to 30 of the scans and then crash. If I drop the percentage to .02 it works, but the cloud is pretty thin at that percentage and not very useful.
I did successfully load the LTU-A House file with .01 percent which is around 3 million points.
I am using Rhino 5. Thanks !…