ing to its indices within the three-dimensional matrix, but I'm not sure it's even possible for adjustable grid dimensions.
1. Select Branches
This has seemed to be missing to me since trees were introduced. Like Replace Branches, this component would allow the user to filter a tree with a branch pattern, but it would preserve the branch paths of the output elements instead of merging them into a given path. Maybe this can be done with Path Compare and Cull Pattern, but it should be easier.
E.g. for
{0:0:0}
0 Point 1
{0:1:0}
0 Point 2
{0:1:1}
0 Point 3
1 Point 4
Selecting 0:1:* would give
{0:1:0}
0 Point 2
{0:1:1}
0 Point 3
1 Point 4
2. Extract Paths
Given an input tree this component would output a new tree where each element was the path of the corresponding element in the input tree.
E.g. for
{0:0}
0 Referenced Point
1 Referenced Point
{0:1}
0 Referenced Point
1 Referenced Point
2 Referenced Point
The result would be
{0:0}
0 {0:0}
1 {0:0}
{0:1}
0 {0:1}
1 {0:1}
2 {0:1}
3. Set paths
This component would take a data tree and a path tree and apply the paths to the elements of the data tree.
E.g. for
(Tree 1 - data)
{0}
0 Point 1
1 Point 2
2 Point 3
{1}
0 Point 4
1 Point 5
(Tree 2 - paths)
{0}
0 {0:1}
1 {1:0}
{1}
0 {0:0}
1 {1:0}
The result would be
{0}
0 Point 3
{0:0}
1 Point 4
{0:1}
0 Point 1
{1:0}
0 Point 2
1 Point 5
Any elements in the data tree for which there is not a corresponding path in the path tree would retain its path (like Point 3).
If anyone wants more clarification on these examples I would be happy to oblige.…
Added by Andy Edwards at 6:45pm on November 3, 2009
e
7. True
8. True <-- this one
9. True
10. False
11. True
12. False
13. True
14. True <-- this one
15. True
16. False
17. True
18. False
19. True
20. True <-- this one
21. True
22. False
23. True
24. False
25. True
26. True <-- this one
27. True
28. False
29. True
30. False
31. True
32. True <-- this one
33. True
Any idea how I can solve this?
Thanks!…
, branches, and trees.
This is currently how I think of it:
A 'point' component with 5 points will generally be compared to a 1-dimensional array with 5 indices.
If we flip this "path" then it becomes a 2-dimensional array looking like this [5][1].
Although it seems like Grasshopper does not iterate through these 'arrays' as one would assume.
Also, the question arises when we have a "tree" whose "paths" looks like:
{0;0;0} (5)
{0;0;1} (5)
{0;1;0} (5)
{0;1;1} (5)
{1;0;0} (5)
{1;0;1} (5)
{1;1;0} (5)
{1;1;1} (5)
For example.
Anyone have any insight here? Or where insight may be found.
Thanks!…
another example could be:
index 3 value 6
index 4 value 6
index 5 value 6
flipped and branched:
branch 6 index 0 value 3
branch 6 index 1 value 4
branch 6 index 2 value 5
Added by Ante Ljubas at 12:50pm on October 22, 2010
eep track of the path names yourself.
You can use the Replace Branches component to rename.
For instance:
(Paths = 2)
{0;1}
{0;2}
and
(Paths = 3)
{0;1} rename {0;3}
{0;2} rename {0;4}
{0;3} rename {0;5}
Does this make enough sense to get you started?
-taz…
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…