algorithmic modeling for Rhino
Hallo,
I am trying to find the easiest way converting from GH_structure(of IGH_Goo) to GH_Structure(of GH_Integer). I tried this, which works fine but is there an easier way?
Private Function convertDTToInt(ByVal DT As GH_Structure(Of IGH_Goo)) _
As GH_Structure(Of GH_Integer)
Dim dtI As New GH_Structure(Of GH_Integer)
Dim int As Integer
For Each P As GH_Path In DT.Paths
dtI.EnsurePath(P)
For Each item As IGH_Goo In DT.DataList(P)
If GH_Convert.ToInt32(item, int, GH_Conversion.Both) Then
dtI.DataList(P).Add(New GH_Integer(int))
End If
Next
Next
Return dtI
End Function
Tags:
Welcome to
Grasshopper
Added by Parametric House 1 Comment 0 Likes
Added by Parametric House 1 Comment 0 Likes
© 2026 Created by Scott Davidson.
Powered by