Grasshopper

algorithmic modeling for Rhino

Hi everyone, I'm generating some windows starting from a curve, and the problem I'm having is that sometimes the same offset distance produces an outward or inward curve.

My idea is to calculate both offsets, compare the lengths and use the smaller curve:

I get to the comparition with no problem, but i really don't know where to go from there.

If anyone has some ideas, they would be very welcomed!

Views: 657

Attachments:

Replies to This Discussion

Hi,

beast practice is to start with orientated curves or to check the orientation of your closed curves first.

Search the forum for orientate clockwise or orientate manually your initial curves.

If you want to compare something, then compare the areas.

Best,

Raul

Hi Alejandro, 

As Raul says, the best thing is to use consistently oriented curves to be able to offset predictably.

That said, a quick fix would be to:

1. Graft both lists (so there is one value per branch)

2. Use merge to combine both lists (now two values per branch)

3. Find curve length, then use sort these in sync with the curves.

4. Select first element.

5. Trim tree to go back to original tree structure.

Thanks,

Andy

So close!

I would merge the two offset curves together, so they each were on indexes 0 and 1.

 

Then, a List Item which used the "Smaller" component as its Index would pick from those merged curves (because in Grasshopper a Boolean "False" and "True" are equivalent to "0" and "1")

 

This would probably output the one with the largest length, so just use a NOT gate after "Smaller"

 

It's hard to explain in words, hope that made sense!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service