Saturday, December 18, 2010

DataTree in C#


How to create a DataTree in C# using Grasshopper:

DataTree Tree = new DataTree();

for (int i = 0; i <= y; i++){

    // Adding data to a DataTree requires a path.

    // In this case the path will have a single branch index.

    // There will be only one Point associated with each path

    Point3d pt = new Point3d(i, 0, 0);

    EH_Path Path = new EH_Path(i);

    Tree.Add(pt, Path);

}

No comments:

Post a Comment