algorithmic modeling for Rhino
Hello All,
Maybe someone can, help me a bit.
My problem I want to draw 2 spindles around 2 curves. For Each curve it is working well . For for 2 I do not understand the result . And for me the tree structure looks good.
Please found a Jpg file to for a better understanding.
ANd my source files.
All comments are welcome!
have a nice sunday,
Cheers
Fred
Tags:
Hi Fred,
what you need to do is, to match the tree structure on the same level of hierarchy.
The easiest way to do this, is to shift the paths by -1 and match the data by longest list / short list or cross reference.
As I understand your desire, for you it is not possible to shift to a lower level, because you want to maintain the paths.
Here are two methods to do this. One with native components and the other one using VB.net (I believe originally written by Vicente Soler.):
( Private Sub RunScript(ByVal d As DataTree(Of System.Object), ByVal m As DataTree(Of System.Object), ByRef mD As Object)
Dim dt As New datatree(Of Object)
For j As Integer = 0 To m.BranchCount - 1
For i As Integer = 0 To d.BranchCount - 1
If m.Path(j).IsAncestor(d.Path(i), 0) Then
dt.addrange(d.Branch(i).ToArray, m.Path(j))
Exit For
End If
Next
Next
mD = dt
End Sub
Best,
Phillip
Edit:
Forgot about [Unflatten]:
Hi Philip,
Thanks you very much for your answer!
With the 3 options , it is just perfect to see al the side of my problem.
I tryed before with the "Offset" component , but I did not mange to make it work.
I try your definition, it is ok , I get it !
Only the tangent had the same problem (pict attach) it is look like if it is liked to the wrong curve. Not perpenticular.
But I will understand the way the offset component work . I work on it.
Thanks you again
Best,
Fred
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