generative modeling for Rhino
Hi guys,
Is there a way to split a list when a "new line starts" as the image below indicates in blue? The grid is not regular so "flip matrix" would not work. I have also tried using distances to dispatch but faced another issue.
Many thanks,
Arthur
Tags: cull, dispatch, flatten, flattened, grid, irregular, lines, list, lists, split
Permalink Reply by Systemiq on December 11, 2011 at 1:34pm You can use this.
Order of points matter.
Permalink Reply by Arthur Mani on December 11, 2011 at 1:56pm Absolutely brilliant!!
Thanks so much Systemiq!
Two questions if you have time:
-How does the C# script work?
int j = 0;
DataTree <Point3d> Tree = new DataTree<Point3d>();
{GH_Path Path = new GH_Path(j);
Tree.Add(x[0], Path);}for(int i = 1;i <= x.Count - 1;i++)
{if (x[i].DistanceTo(x[i - 1]) > dist) j++;
GH_Path Path = new GH_Path(j);
Tree.Add(x[i], Path);
}
A = Tree;
-Can you use this to classify the polyline cells around the points?
Permalink Reply by Systemiq on December 11, 2011 at 2:36pm It simply iterates through the points in the list, if there is a "row jump" (i.e. distance to previous point is > to some preset value) the current point is added in a new branch.
You can input the cells and they will get same data structure.
Permalink Reply by Arthur Mani on December 11, 2011 at 3:02pm
© 2012 Created by Scott Davidson.
Powered by