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…
etc...}
the function just output numbers in the necessary syntax for the replace component.
in the image, there is a duplicate component so i think that the output function is:
{0} five times, {1} five times, {2} five times, {etc...}
The S input in the replace component its a series of integers (i think 0 to 35 in the image, 36 elements = the length of the list):
0, 1, 2, 3, 4, 5, ..., 35
Also R input its exactly 36 elements.
The replace component re-order the branches like this:
take the s={0} element and put it on r={0}, then
take the s={1} element and put it on r={0}, then
take the s={2} element and put it on r={0}, then
take the s={3} element and put it on r={0}, then
take the s={4} element and put it on r={0}, then
take the s={5} element and put it on r={1}, then
take the s={6} element and put it on r={1}, and so on...
i hope it helps...…
vas
Closing and creating a new file (memory resets when this is done) @4:00, 5:57, 6:53
System slow down and crashes @ 8:16 (takes 5 minutes to end the process - perhaps not the most entertaining movie to watch until the end - a good point to turn the kettle on)…
points 0, X-1, (2*x)-1, (3*X)-1, (4*X)-1, (5*X)-1 and then
1, X, (2*x), (3*X), (4*X), (5*X)
2, X+1, (2*x)+1, (3*X)+1, (4*X)+1, (5*X)+1
and so on till
5, X+4, (2*x)+4, (3*X)+4, (4*X)+4, (5*X)+4
How can I do this best?
Thanks,
Niels…
} (N=11) {0;1} (N=11) {0;2}(N = 11) {0;3}(N = 11) {0;4}(N = 11)
2. I run the Points that are coming out from the Divide Curve Components through the Path Mapper components with this definition:
{A;B} (i) > {A} (i)
3. I run data coming out from Path Mapper component through:
a) Parameter Viewer component and the result is:
{0} N=11 (data with 1 branches)
b) Point > Panel and the result is:
collection of 11 point (N=11) which is the exactly the same as the collection of point belonging to {0;4} (N = 11).
So, here is the question:
why the collection of points coming out from the Path Mapper {A;B} (i) > {A} (i) component is the same as the collection of points belonging to the curve {0;4}(N = 11) ?
Anyway ... It 's the first time I ask a question here... so I would like to thank you for what you do with your work! Thank you! You are really great!…
1+2+3+4+5+6 = 21
1+2+3+4+5+6+7 = 28
1+2+3+4+5+6+7+8 = 36
1+2+3+4+5+6+7+8+9 = 45
Is there a tool, that can do me that job?
How do I get this List {1,3,6,10,15,21,28,36,45}?…
Added by Ahmed Hossam at 2:19pm on September 22, 2013