[0][1][2]
{0;2;0} → [0][2][0]
{0;2;1} → [0][2][1]
...
{1;2;2} → [1][2][2]
{2;2;0} → [2][2][0]
{2;2;1} → [2][2][1]
{2;2;2} → [2][2][2]
The first element in each path identifies the top level list, the second element the first nested list and the third element the deepest nested list. And like you said, you can change 0, 1 and 2 into whatever (non-negative) integers you want.
GH_Structure<T>.Append(data, new GH_Path(1,2,2));
--
David Rutten
david@mcneel.com…
Added by David Rutten at 3:21am on December 10, 2013
That is the [List Item] component. In the latest GH versions you can zoom in on the component and add additional outputs for +1, +2, +3 etc. and -1, -2, -3 etc.
--> {B}
----------------
{0;0} --> {0}
{0;1} --> {1}
{0;2} --> {2}
{1;0} --> {0}
{1;1} --> {1}
{1;2} --> {2}
{2;0} --> {0}
{2;1} --> {1}
{2;2} --> {2}
...
{24;1} --> {1}
{24;2} --> {2}
Also a very recent addition to Grasshopper was the Shift Paths component so you can now achieve the same results with "normal" components. I've included both examples in the file attached
…
Added by Danny Boyes at 4:11pm on February 12, 2012
The best way is to use a C# or a VB component to transpose these
lists. I think in C# you can use transpose directly. You can ask this
on the VB/C# forum on our new website, www.grasshopper3d.com
- Scott
On May 27, 3:56 am, Tonsgaard wrote:
> Being a long time user of Generative Components trying to use
> grasshopper i miss the "transpose" command.
> I have a point list like this:
>
> 0, 1, 2, 3, 4, 5
> 0, 1, 2, 3, 4, 5
> 0, 1, 2, 3, 4, 5
> 0, 1, 2, 3, 4, 5
> 0, 1, 2, 3, 4, 5
>
> and a want to transpose dimensions to:
>
> 1, 1, 1, 1, 1
> 2, 2, 2, 2, 2
> 3, 3, 3, 3, 3
> 4, 4, 4, 4, 4
> 5, 5, 5, 5, 5
>
> Surely I am not the first in need of this...
> how would i go about and do this...? I suppose its quite easy in VB
> script, but being used to GC's C# like language, I kinda dont know how
> to do this...
>
> thanks...
>
> Tonsgaard…
(0) --> {0}(0) overwrite etc
---
{2;2}(1) --> {2}(1)
{2;3}(0) --> {2}(0)
{2;3}(1) --> {2}(1)
Correct use of index in this case {A;B}(i) --> {A}
but because you don't need to use the index on the right hand side, don't specify it on the left, as it takes the [Path Mapper] longer to process when the index is used.…
Added by Danny Boyes at 2:00pm on September 25, 2011
circles that can be populated (for each radius size) is set as an integer (or slider)
(ie. radius 1.5 = 10 , radius 3= 6, radius 6 = 6, radius 9=4)
Conditions are:
1) Each of the circle has a radius of influence,
Radius of influence = double the radius of the circle)
(3, 6, 12, 18)
2) Any overlapping circles in either: Radius of influence or the Circles are removed so that
No circles overlap.
3) There must also be 4 circles set at the corner points of the grid - These must be circles with a radius of 3 or 6
If you can do that I will be amazed as i've been trying for weeks! :(
Ive attached a sketch of what im looking for…
.
Example input
Values : keys
Rectangle 1 : area 3
Rectangle 2 : area 1
Rectangle 3 : area 2
Output
Values : Keys
Rectangle 2 : area 1
Rectangle 3 : area 2
Rectangle 1 : area 3
So it seems you want to use area so use area of the surfaces into keys and keep the surfaces into values.…
Added by Michael Pryor at 2:03am on December 20, 2014