Hi,
I am stumped. Have tried every intersection component. I wish to create sort a grid into diagonal branches. It seemed logical to intersect the lines with points and then to sort the polygon with <curveClosestPt> ; however, this is not working at all.
I was hoping to have a data structure returned from the intersection where however many points the line encounters when intersecting would return a data tree of that length. My intent here is to generate toolpaths.
Thank you.
Mohamed Naeim
Jan 8, 2017
Pieter Segeren
Hi guys,

check out this faq: http://www.grasshopper3d.com/forum/topics/how-can-i-sort-in-two-dim...
My suggestion is to explode a(ny) diamond, pick one of its edges and use that to create an aligned (flat-)BBox (a Union Box of for all diamonds). Use one of its edges to 'sort 2D' like in the faq-post.
Jan 9, 2017
Raymundo Burgueno
Hello,
Even though this approach might not help your problem I figured it might help others who are trying to do something similar. I wanted to achieve this for a graphic design and I wrote the following code.
The logic I used was generate a grid, rotate it and move it to cover the rectangle, partition it into branches, eliminate the ones outside of my rectangle, clean the tree, reverse the order of every other branch than merge them together.
The only thing I don't like is that it isn't based off the initial rectangle, but this was a quick method that worked for me. It also gives me the added bonus of using other closed curves.
Jan 28, 2017