algorithmic modeling for Rhino
Hi,
I am trying to generate Penrose tiling using inflation-deflation method. I use a nested list to store the tiling pattern, but the output of the nested list shows no data, only description of the data type (Generic list).
Is there a way to output the nested list as a tree? Or is there any other data type that could do the job?
Thanks a lot!
Versions: Rhino5 and Grasshopper 0.8.0066
The file and screenshot are attached
Tags:
You cannot output nested collections, you must convert them into a tree first.
Dim penroseTree As New DataTree(Of Double)
For i As Int32 = 0 To PenroseTiles2.Count - 1
penroseTree.AddRange(PenroseTiles2(i), New GH_Path(i))
Next
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Thank you David!
Where can I get more information about DataTree and GH_Path? I couldn't find them on RhinoCommon or MSDN.
Thanks!
Hi David,
The nested list in my VB script seems to get modified unexpected. To be specific, "penroseTiling2" behaves normal on its own, but after the addition of the code for creating the next generation of tiles (penroseTiling3), it got modified without any code that modifies it. I couldn't figure out why.
I am wondering if it is related to the way how the code is parsed.
Thanks!
File is attached.
List(Of Double) is a reference type. When you put one into a List(Of List(Of Double), then modify the original list later on, it will change everywhere.
'add the tiles into penroseTiling2
PenroseTiling2.Add(ALTile2a)
PenroseTiling2.Add(ALTile2b)
PenroseTiling2.Add(ASTile2a)
If you want to modify ALTile2a later on you should duplicate it when adding it to the PenroseTiling2 instance.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Thanks!
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