Grasshopper

algorithmic modeling for Rhino

When I "bake" curves generated with different kinds of grids, sometimes depending on grid density or structure, result of baking causes lines to overlap.

Is there possible to remove or unify overlapping lines with grasshopper?

This needs to be done for laser cutting, so laser wont cut same area several times etc.


Views: 7559

Replies to This Discussion

One option would be to use the RemoveDuplicateLines component in Kangaroo2:

It takes as input a list of lines (note that duplicates in separate branches will not be removed, so flatten them first) and a tolerance value. If the ends of a pair of lines are closer than this(with the lines oriented in either direction) it considers them duplicates and removes one.

I'm not experienced with complex instructions or kangaroo. Can you send screenshot containing names with command boxes because I'm not familiar with graphic only interface. Or script itself if possible?

When I replied earlier, I didn't see the image you posted.  Had I seen that, and realized how simple your example is - or had you posted code initially - I would have replied as follows:

Attachments:

Yes thanks a lot :)

I will study and build that model myself from your example to learn how this is done. 


The tool path will be near optimal if each line is cut from start to end, in sequence.  To be more explicit, and even better about that, I added an Anemone loop to identify 25 contiguous segment tool paths for the 93 line segments in my example - all counter-clockwise around each hexagon:

(re-posted; more explicit with three colors instead of two)  

Attachments:

Or you can skip Anemone and get the same number of tool paths (if a little more chaotic?) using 'Join' curves alone.  This color pattern doesn't differentiate well enough... in some cases adjacent curves are shown with the same color.  Adding a 5th color almost fixes it...

Attachments:

Forget about multiple colors, just use this 'Tree/List Viewer' ('list idx' slider) to see each curve.  Again, no Anemone, just 'Join' curves.

Attachments:

This demands time to investigate and memorize how to build. Is it possible to define "curve" group direction in hexagonal grid, for example "from top to bottom or left to right" and color code them as layer or RGB for laser cutting?

memorize how to build

I gave you the code, no need to memorize.

As to sorting and layering, many things are possible.  You need to understand data trees and paths, though.  For example, you can reverse the output of the 'HexGrid' component and/or the 'tool_paths' list ('Shift' output).  The original grid rows and columns are lost, unfortunately, by flattening the 'Item L' input.

Reverse list and 'Flip' matrix on the 'HexGrid' output results in left to right, top to bottom "rows":

Attachments:

Sorry for the drip, drip...  This is Anemone again, by the way, as the results are more predictable.

Had to define seven colors before getting clear separation between tool paths.  Numbers are placed at start points (paths zero and one share the same start point).

Attachments:

Bake the 'Shift tool_paths' output, 'select all' in Rhino, 'Analyze | Direction', and you see these white arrows on the tool paths, starting at each path number.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service