ant to find all paths where exactly two items are the same like in branch {1}. How can I solve this in VB? Is there an easy "search in list" class or do I have to iterate over all items by myself ??
Regards Alex…
It could look like this in a panel
{0}
0 - A
1 - B
{1}
0 - C
1 - D
{2}
0 - E
1 - F
question: can you operate on elements between branches?
By default, when you apply polyline, it will connect the elements inside their branch. But how do we connect '{0} 0 - A' with '{1} 0 - B' and '{2} 0 - C'?
2)If we have 6 elements (A,B,C,D,E,F) at the same level or issued from a flatten operation, how do we create a tree like this one:
{0}
0 - A
1 - B
{1}
0 - C
1 - D
{2}
0 - E
1 - F
?
3) a work around would be to reverse the branch:
as the following transformation:
from this list:
{0}
0 - A
1 - B
{1}
0 - C
1 - D
{2}
0 - E
1 - F
that would transform in this one
{0}
0 - A
1 - C
2 - E
{1}
0 - B
1 - D
2 - F
?
4) Can we do such operation:
from this list:
{0;0}
0 - A
{0;1}
0 - B
{1;0}
0 - C
{1;1}
0 - D
{2;0}
0 - E
{2;1}
0 - F
to
{0}
0 - A
1 - B
{1}
0 - C
1 - D
{2}
0 - E
1 - F
5) I saw in a previous discussion in the VB# corner (about grid) that David was suggesting using some methods but I don't know how to use the "GH_Path" and the "Grasshopper.DataTree" object? is there other methods which are not mention either in SDK doc and Primer Grasshopper hand book?
Many thanks…
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...…
a specific location. In this case, it refers to the numbers that are part of a data-tree path list. For example, the path {0;0;3} has 3 loci. The path {0;0;3;1;2;6} has six loci. When you want to flip a data-tree using Flip Matrix, then all the paths can only differ at a single locus, thus:
{0;0;0}
{0;0;1}
{0;0;2}
{0;0;3}
is fine because only the third locus differs. If the tree is more complex:
{0;0;0}
{0;0;1}
{0;1;0}
{0;1;1}
then Flip Matrix doesn't understand which rows and columns to flip.
You'll have to use a Path Mapper to solve this problem I think.
--
David Rutten
david@mcneel.com
Tirol, Austria…
Added by David Rutten at 4:46pm on October 8, 2013