algorithmic modeling for Rhino
Hi everyone,
I need to orient a list of surface on a horizontal plane. Each surface "contains" lines (from 1 to 20 lines for each surface) which are drawn on it.
I would like to orient all the lines with the surfaces they are related to. To do this I need to sort the lines in groups (one group for one surface) and then to orient them with the same command that i use to orient the surfaces.
How can I sort the lines in order to create such a list ?
Tags:
Peter can I ask you for a favor?
Can you please save this OrientInGroups.3dm file as Rhino 4 3D Models file (File-> Save as)?
You seem to be using Rhino 5, and Rhino 5 files can not be opened in Rhino 4.
Thank you.
Hi,
Pleas find attached the Rhino 4 flie.
Best, Peter
Peter can I dare to bother you a bit more?
I am very interested in your solution and I am trying to understand it.
Why can't we just plug in the "Curve" parameter directly into the second "Orient" component?
Why do we need to convert these curves from "Curve" parameter into the points on the surface (and connect them with "Line" parameter) and then input them as reference geometry into the second "Orient" component?
yeep, you are right, thats much smarter.
Thank you Michael.
Best regards
Peter
Thank you for the reply Michael.
But now I am even more confused. I want to understand the solution.
Why do we need to convert these curves from "Curve" parameter into the points on the surface (closest point on the surface) and then input them as reference geometry into the second "Orient" component?
Why can't we just plug in the "Curve" parameter directly into the second "Orient" component?
basically we need the points to test which curves are on which surface (look at the data structures) we get a point from the curve (can be any point. We pull every point to every surface, then we test if the pulled point equals the original point, this eliminates points in lists that are not on surfaces via true false culling. We can cull then the original curves based on this since their structure is the same. We are now left with the curves in lists that match the surface they are on. the reason is we want the curves on a surface to orient with that surface only.
See here the data structure of curves now matches to the surfaces they lay on.
Thank you for the help Michael.
I think I am starting to understand.
Again, an usual problem emerges: As an architect I do not think of this in terms of the data matching and the data flow. Which is exactly the core of the solution in this case, and in many other cases.
If I understood it correctly: we have a list of surfaces (in one branch) in "Geometry" parameter". And we have a list of end points (in one branch) from the lines that lie on these surfaces.
Both lists have only one branch.
We need to sort these end points, but in a way, that we know to which of surfaces they belong.
So that is why we are grafting the list of surfaces in order to get the separate branches for each surface. This new list of surfaces will enable us to classify (by "classify" I mean: to know to which surface, which end point belongs) the end points -> because we will match each of these end points (that we have in a list with only one branch) with a new list of surfaces (that we have in a list of several branches, where number of branches equals to the number of surfaces). Like this:
(I marked matching with only first two surfaces from the first list. The process goes in the same way for the rest of the surfaces)
The result of this data matching will be a new list (of end points), but the one with the same number of branches as the number of surfaces!!!
Now we just need to check if these new list of end points, which we got from the previous data matching in the "Surface Closest Point" component, match to those preliminary end points. If they match, then they belong to that surface. If they do not, then we cull them.
I might sound that I am just copying what you have just said, but that is not my intention. Sorry if it sounds like that.
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
© 2024 Created by Scott Davidson. Powered by