algorithmic modeling for Rhino
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.
Tags:
Thanks for the responses Alex and Mohamed.
I realized this was a puzzle and you both proposed very logical solutions which I have been dissecting for the past hours. Both approaches prove to solve the problem in similar yet different approaches which is helpful for learning.
I attempted to simplify the logic somewhat (as pictured below); however, I have not yet finished. I think projecting the points onto the curves will most likely not solve the problem of a points along the curve that correlate to the diamond polygons. (sorry if this doesn't make sense it is late here).... Furthermore, I am trying to construct some limits so that the definition remains parametric and does not break if the inputted grid changes.
Thank you again for your help! I'll review it again in the morning.
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.
Hi Pete,
This is a very compelling response. I appreciate the link to the post. This is a technique that I have never thought to use. Thanks you!
+2
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.
Hope this helps others who want a quick diagonal line across a given shape.
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
© 2024 Created by Scott Davidson. Powered by