algorithmic modeling for Rhino
Hi!
I'm stuck with this, and probably it's a good reason to start understanding the trees better. I have a three main branches each of it has a some data. After apply to them collection of parameters the tree changes, now i have another collection of parameters with the same structure as the fist one and i can't apply them to the changed data tree. I understand that i'm somehow have to repeat data tree structure and copy data into each branch, but i cant get the point how to do this.
There is decision on the pictures you can see it, don't think that this a beauty one :)
Would be really glad to any help
Tags:
Can you upload your file (with all geometry internalized)?
Sorry it's a big one. This is only a small piece of it. If you think it's necessary i can repeat this part.
This is the file for your experiments, maybe it's easy for you to showing then to explain :)
Hello Dmitrii, :-))))
I am afraid I can't understand what you are trying to do with your definition...
You have a group of points and a group of lines and you offset the lines by a distance equal to the X coordinate of the points and then you move them in Z by a distance equal to the Y coordinate (!!!!!!!!)...
Can you please explain what your goal is? I am not sure this is a data structure problem or a more general problem with the definition..
cheers, nikos
Definition do what it do anyway, there is a farthest goal that you can't see. :) It's really hard to explain, i've tried different approaches and this is the best. As i said before this definition works. But i've changed the tree through the series of multiplications, if the data in the same situation would be not a numbers or even if data has a Nulls this definition falling down.
It's not a question about what it do, the question about how it do.
Again, the question not about what to do, but any way. What did this script? It puts mouldings on the each side of the surfaces. Why this way? Because i'm need in a clean mesh for subdividing it. In a case of using extrude it is much longer, and it loses the small coplanar lines on the corners.
Ok, let me see if I get this right:
1. The definition you have posted works as intended.
2. Your question is not about this definition specifically, but rather a general question about data structures.
If the above are correct then I am afraid there is no solid answer, data matching (how to modify 2 groups of data so that they work together) can be done in many ways and no one is suitable for every case.
For example in the [move] component in your definition you have the G input receiving 27 lists with 54 lines each (1458 lines) and you want to move these lines in Z direction. Depending on how you want to move them it could make sense to have T input receiving:
a. One vector (this would move all the lines by this vector)
b. 54 vectors (this would move the first line of each list by the first vector, the second line of each list by the second vector, ...... , the last line of each list by the last vector)
c. 27 vectors grafted so that the paths match (this would move the first list of lines by the first vector, the second list of lines by the second vector, ...... , the last list of lines by the last vector)
d. 27 lists with 54 vectors each (1458 vectors). This way each line will move by the corresponding vector.
So, as you can see there is not a global solution.
In order to be able to decide how to format your data you must always be aware of what your existing data structure means. For example, in the above case, you have your lines in the format {A;B;}N. Now A has 6 values (0 to 5) which is the number of your original surfaces. B has various values because it is the number of edges that each surface had(deconstruct Brep component). Finally N (the number of items in each list) is 54 because you offseted each edge 54 times (offset component).
So in order to decide which of the above cases suits you best you must have these things in mind.
In general some useful components for data matching are: [tree statistics] [list length] [repeat data] [graft] [simplify] and [flatten] and of course many more, depending on the case...
But in order to use these properly you must first study about data trees and how they work.....
Hope this helped a bit and please post back if you need some help into a specific part of your definition.
Thank you for answer. But though question was not about what this script do, it was concrete questions, about exactly this attempt of fit the trees. Probably this is my english, sorry. Anyway there is picture with two question i think it can explain what i can't.
I think the way to form data tree that i used here is a wrong. And i looking for advices how to achieve the same result but without stupid multiply by 1 and 0 that i'm do only for fit the trees.
Hello Dimitri,
You have one tree and you want to create another tree with the exact same structure, right?
What I have been trying to tell you all along is that this is not enough to get an answer because you are not saying what you want inside the second tree. You say this is not important, ok... then just take the first tree as it is and there you have it! Two trees with the same structure!....
Of course I am guessing the above answer will not satisfy you, so let's take it in your case:
You want to move 1458 lines on Z axis.
The question is: How high do you want to move each line?
A. You want to move them all 1 unit high? then do this:
B. You want to move eash of the 54 lines of every list by the corresponding 54 Y values? Then do this:
C. You want to do tha same as (B) but with the 2 trees having the exact same structure? There is absolutely no point in that but if you are obsessed about it you could do this:
What I am trying to say is that the structure of a tree is irelevant if you don't know what you want to have inside it.
And the method to create a tree with the desired structure depends again on what you want to have inside the tree....
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by