algorithmic modeling for Rhino
Basically i have a 2 data trees that contains points in the layout of straight panels, and i want to add one into the other starting from the next consecutive branch number from the first.
I tried insert items but because they're grafted to insert an index made the final points not merge as one
so the resulting branches should be 0,1,2,3,4,5... rather than the common branches, (0,1,2,3,4) merging with each other
Tags:
This is actually a fairly tricky operation...It's doable with native components, but a script will perform this operation much more simply.
Private Sub RunScript(ByVal Pi As Integer, ByVal T1 As DataTree(Of Object), ByVal T2 As DataTree(Of Object), ByRef A As Object)
Dim NP As New GH_Path(T1.Paths.Last)
For P As Int32 = 0 To T2.Paths.Count - 1
Dim PathAppend As New GH_Path(NP)
PathAppend.Indices(Pi) = NP.Indices(Pi) + 1 + P
T1.AddRange(T2.Branch(P), PathAppend)
Next
A = T1
End Sub
Thanks david this helped alot! The script works like a charm
Of course! I'm probably going to add it to Tree Sloth as well, but by all means use it.
Thanks.
All VB components on the trees are interesting.
This allows to better manage data tree.
Best,
Cool! You're using Tree Sloth!
Thanks! that worked for me
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