Grasshopper

algorithmic modeling for Rhino

Moving all curve seams to the middle of the longest line.

Hello, I have a pattern I'd like to send for fabrication. For the purpose of getting a clean cut, I need to move all the curve seams to the middle of the longest line in each closed curve. At first I used the adjust curve seam component, but all the curves get a different result. Next, I thought I'd explode all the closed curves, compare lengths of the resulting segments, find the longest one, then find the midpoint of it, then join the lines back together. I'm guessing  I need to use lists to do this but I'm not sure how to proceed. Any ideas would be greatly appreciated.

Thanks!

Views: 1626

Replies to This Discussion

I found a solution and wanted to share if it helps anyone..

This shows the locations of the curve seams before and after. cheers

thanks for posting a solution!

you're welcome, glad to help.

hey woodduck,  would you mind attaching yours?  my recreation is coming up wrong.  thank you in advance!

Sorry, forgot to show some of the inputs. Here is the whole def as well.

thx.

Attachments:

Hi Woodduck.

Thanks for the post. I had the same problem. I wanted to find a way to move the crv seam to a specific point on a curve to enable me to do the nesting and tool pathing quicker. But I had a home or zero point that I wanted to use as a reference. So finally I got it to where it gave me the correct point but your script helped me to move the seam.

Here is my file. it works for 98% of all curve.

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service