Grasshopper

algorithmic modeling for Rhino

Sorting diagonal grid diagonally to generate tool paths

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. 

Views: 1367

Attachments:

Replies to This Discussion

Hello johnny,

this got complicated. maybe someone will provide a simpler solution. but it does the job.

best

alex

Attachments:

Try this 

You will need anemone 

Attachments:

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. 

Attachments:

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.

Attachments:

+1

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. 

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service