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…
per components.
I have attached a 3dm file and a picture so you guys can see what I am talking about.
I have previously translated boxes into breps, which i did with this code:
Dim bbx As New box(pl, New interval(-.5, .5), New interval(-.5, .5), New interval(-.5, .5)) Dim ms As New Mesh() ms.Vertices.AddVertices(bbx.GetCorners) ms.Faces.AddFace(0, 1, 2, 3) ms.Faces.AddFace(0, 1, 5, 4) ms.Faces.AddFace(1, 2, 6, 5) ms.Faces.AddFace(2, 3, 7, 6) ms.Faces.AddFace(3, 0, 4, 7) ms.faces.addface(4, 5, 6, 7) ms.Normals.ComputeNormals()
ms.Compact()
I have tried to do something similar with this specific example, and I now that meshes only consist of quads or triangles, so i broke down the geometry into quads without any succes.
Looking foreward to any suggestions.
- Jens…
where each branch contains all the points generated by dividing each curve, so if you divide into 10 segments, you'll get:
{0;0}(N = 11)
{0;1}(N = 11)
{0;2}(N = 11)
{0;3}(N = 11)
{0;4}(N = 11)
Where the second integer in the curly brackets refers back to the index of the curve in the original list.
Another way to look at this data is to see it as a table. It's got 5 rows (one for each original curve) and 11 columns, where every column contains a specific division point.
--
David Rutten
david@mcneel.com
Poprad, Slovakia…
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
ll these 12500 points.
Group 1 would represent the point located at 0, 5, 10, 15, 20 etc.
Group 2 - 1, 6, 11, 16, 21 etc.
Group 3 - 2, 7, 12, 17, 22 etc.
Group 4 - 3, 8, 13, 18, 23 etc.
Group 5 - 4, 9, 14, 19, 24 etc.
I can create the pattern but the selection of points are all the points in row 0 and then all the points in row 5 and so on.
I would like the selection of points to start at the bottom left, and sequentially continue to the right and then continue on the 2nd row (left to right & bottom to top). i am hoping the pattern i am trying to achieve is more understood with the quick screen capture I uploaded.
the end goal is to be able to select all the points in the grid that are in each pattern.
Thanks in advance for any guidance with this. …
Added by Alyne Rankin at 6:53am on October 11, 2017