nts me this:
[[0], [0, 1], [0, 1, 2], [0, 1, 2, 3], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4, 5], [0, 1, 2, 3, 4, 5, 6], [0, 1, 2, 3, 4, 5, 6, 7]]
this is what I wanted but how to convert this to tree in grasshopper?
In grasshopper I just get:
8x IronPython.Runtime.List…
hem. Now I need to search through the original points that comprise the voronoi diagram and replace them with the new averaged points. I need to do this while still preserving the logic of the old data tree which is comprised of {i}j values. In other words each point is grouped into a vornoi cell so that the cells can be created with the polyline component
I believe I have a relatively simple solution, but need help create a python script that searches and replaces values within a data tree.See the psuedo code below:
Psuedo-Code:
For each item(i) in Data tree B (list of index values points to be replaced grouped into a data tree corresponding to the new point) find the corresponding integer in Data tree C (list of points grouped around {i;j} values)Then replace the integer in Data Tree C with the key value (the data tree path) that corresponds to the item from Data tree B that is replacing the item from Data tree CFor example:Data Tree B{14}(0)2(1)3(2)6(3)11(4)13(5)14Data Tree C{0;1}(0)2(1)3(2)6Output:Data Tree {0;1}(0){14}(1){14}(2){14}
List A - Single point (New Point) with Data Tree/Key value corresponding to group of points it will replace ( List B)
List B-list of index values of flattened voronoi point list with Data Tree/Key Value corresponding to List A - in other words these are all the points I need to replace with the point in List A
List C-list of index values of flattened voronoi point list with Data Tree/Key Value corresponding to {i}j values necessary to re-create voronoi cells with the polyline component
Once this is done I can use the Output and the new Points in List A to replace the set of old points in the original voronoi diagram with the new set up reduced points.
If there is another way to achieve the goal of eliminating small edges of a vorononi diagram, I'm open to suggestions.
…
could accomplish this by adding something like '5.0 + Slider * 3.0' into the expression field... (and having an integer slider with domain 0 to 6).
--
David Rutten
david@mcneel.com
Poprad, Slovakia…
Added by David Rutten at 10:19am on February 24, 2011
hink you need recursion to modify the random seed; many other ways to accomplish that (use the length of each curve as the seed, for example).
Using multiples of twelve makes it harder for me to grasp the essence of the matter; another way of looking at it is that you want to generate random integers from 2 to 5 (24,36, 48 and 60) and have them add up exactly to curve lengths of 5 (x12=60), 9 (x12=108) or 14 (x12=168).
So you want to generate random numbers until their sum ('Mass Addition') plus 5 is equal to or greater than the curve length (5, 9 or 14). The last number in the series is then not random but just the difference between the two.
For example, for curve length = 5 (x12=60), there are only three possible numbers that can be used as the first in the sequence: 2, 3 or 5. If it's 5, you're done. If it's 2, the second number is 3 (5-2), if it's 3, the second number is 2 (5 - 3). You can't use '4' at all because the remainder, 1 (x12=12) isn't one of your solution options.
There is no point in generating the last number randomly, eh?
P.S. You didn't use 'Internalize data' for the 'Curve (Crv)' param in your GH file.…
Added by Joseph Oster at 2:29pm on September 12, 2015
x and min values for x,y,z and calculate energy for each optionand collect these results in excel sheet ...
option No. x y z Annual coiling demand(by DIva)
1 10 10 10
2 10 15 20
3 11 10 19
4 12 14 17
5 15 16 15
6 16 11 14
7 18 12 12
.
.
etc
Regards ...
hossam
Hossam.wefki@gmail.com…
e a branch. Say I had two geometry collections with 14 objects each, which makes for 28 geometries. Is there a way to retain each geometry collection's list as individual branches rather than them getting turned into individual branches per geometry?
I.e. when i check what pts.BranchCount outputs, I get 28 instead of 2.…