Grasshopper

algorithmic modeling for Rhino

So I have a closed curve I want to offset out, so i set the offset distance to +2.

However because the direction of each curve is different, sometimes it offsets inward, smaller (image attached below--pink curve)

So, is there a way i can in put both + and - value and set up a function or conditional statement that will always select larger area or longer length of a curve?

Please help!

Views: 2181

Replies to This Discussion

Hi Lina, I think this could be optimized, but this is what I got for now.

Hi Pieter,

 

Thanks for your reply.

 

But what "command" is the one comes in between offset/ curve length and sort,

that looks like A,B,C --> B?

 

Thanks again

 

Jina

that is path mapper -> see path mapper help (search grasshopper forum)
Hi Jina, I noticed Mateusz already answered this. This particular {A;B;C --> B} remapping works for me because I just used some random rectangles (with random directions) I created in Rhino. In your situation the paths are probably different. Right click the path mapper, create null mapping first, then keep only the second last character.

Maybe you can come up with a way to keep the direction of all the curves the same (or flip the flipped ones:) ), making the approach above not necessary...
the definitions:
Attachments:

Hello,

 

so I tried your method, but it game some irregular shapes for more complex geometry.

I got some hint from your methods and used SORT to solve the problem.

so i offset the joined curves in both positive and negative value, so i get two offset curves.

Then i used CURVE LENGTH to evaluate the two lengths and sort them by their length.

and use LIST ITEM to always select the greater length curve!

and WALLAH! it works!!!

 

Thanks for all your help!!!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service