problem is that I am inputting 8 points and getting 24 point out because grasshopper is matching every point to every surface. The correct way would be 3 points for surface {0}, 3 points for surface {1}, and 2 points for surface {2}.
Anyway, is there a way to say that every branch with a {0;?} should relate to the {0} surface, the {1;?} branches should match with the {1} surface, etc?
…
0}
{0;2;1}
{0;2;2}
{0;2;3}
And you trim to a depth of 1, the last number will be removed, resulting in:
{0;0}
{0;1}
{0;2}
In effect it is like Shift Paths, but simpler to use. That was the idea anyway.
--
David Rutten
david@mcneel.com
Poprad, Slovakia…
0;3} (N = 2)
{0;0;0;4} (N = 2)
{0;0;1;0} (N = 2)
{0;0;1;1} (N = 2)
{0;0;1;2} (N = 2)
{0;0;1;3} (N = 2)
{0;0;1;4} (N = 2)
Flattening this structure using the Flatten component would result in:
{0} (N = 20)
However, using a Path Mapper with the following masks will flatten is somewhat more intelligently:
{A;B;C;D} -> {A;B;C}
Now, you get:
{0;0;0} (N = 10)
{0;0;1} (N = 10)
--
David Rutten
david@mcneel.com
Poprad, Slovakia…
Added by David Rutten at 3:19am on December 14, 2009
I have this :
list 3 : 0 1 2 3 4 5 6
list 2 : 0 1 2 3 4 5 6
list 1 : 0 1 2 3 4 5 6
list 0 : 0 1 2 3 4 5 6
and I want to group the points of index 0 in a branch, the points of index 1 in another branch and so on.
I attached a file in which I generated the points.
Thank you in advance for your help !
Regards
Red…
;-2;-1;0;1;2;3) and beside that i don't want to have 0 as a result.
So at the End I would like to have only 6 numbers: -3;-2;-1;1;2;3
I already came to an result with integer numbers but it actually only rounded up the random results. when one of the results was -0.473 it ended up as 0.
I'm sure it's pretty easy to solve, I'm just missing something.
thx for help…
nce to graft:
{A}(i) --> {A;i}
becomes
{0}(0) --> {0;0}
{0}(1) --> {0;1}
{0}(2) --> {0;2}
...
{0}(n) --> {0;n}
So now to apply this to any complex situation that the Path Mapper might be able to do. A recent post here on the Forum asked about duplicating every branch to the next branch. For example:
{0;0} = 1
{0;1} = 2
{0;2} = 3
needs to be
{0;0} = 1
{0;1} = 1
{0;2} = 2
{0;3} = 2
{0;4} = 3
{0;5} = 3
First we need to make a gap for the duplicated data to be slotted into.
{A;B} --> {A;2*B}
becomes
{0;0} --> {0;2*0} = {0;0}
{0;1} --> {0;2*1} = {0;2}
{0;2} --> {0;2*2} = {0;4}
Then we need to map the same branches into the next branch
{A;B} --> {A;2*B+1}
becomes
{0;0} --> {0;2*0+1} = {0;1}
{0;1} --> {0;2*1+1} = {0;3}
{0;2} --> {0;2*2+1} = {0;5}
Now when these two paths structures are combined you will get the desired results.
So it comes down to how you wish to map your paths and coming up with a formula to do so.
…
Added by Danny Boyes at 2:50pm on October 20, 2011