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…
the one-but-last list [4]. After running out of the n- items avalaible it should continue with the second item of list 0 and so on for all items on all the lists.
Intput, six lists of 30 items each
[0] (n=30)
[1] (n=30)
[2] (n=30)
[3] (n=30)
[4] (n=30)
[5] (n=30)
Output, 18 lists of 10 items each
[0],i=0;[5],i=4; [4],i=7;...
[0],i=1;[5],i=5; [4],i=8;...
...
[5],i=1;[4],i=5; [3],i=0;...
I thought perhaps the weave component or the relative tree item component but didn't manage to figure out how to compose the mask. I couldn't find much on how to use these. I guess it should wrap the lists, but not the items.
Any help would be greatly appreciated.…
Added by Thorsten Lang at 2:27am on January 24, 2011
cenPt As New On3dPoint(0, 0, 0)
Dim tSphere As New OnSphere
Dim rad As Double = 5.0
tSphere.Create(cenPt, rad)
Dim nSphere As New OnNurbsSurface
tSphere.GetNurbForm(nSphere)
Dim tSrf As New OnNurbsSurface
Dim ptList As New List (Of On3dPoint)
ptList.Add(New On3dPoint(-5, -5, 0))
ptList.Add(New On3dPoint(-5, 5, 0))
ptList.Add(New On3dPoint(5, 5, 0))
ptList.Add(New On3dPoint(5, -5, 0))
tSrf = RhUtil.RhinoCreateSurfaceFromCorners(ptList(0), ptList(1), ptList(2), ptList(3))
Dim arrCrv(0) As OnCurve
RHUtil.RhinoIntersectSurfaces(nSphere, tSrf, tol, arrCrv, Nothing)
A = arrCrv…