Offset Curves towards or away from the center

Hello All,

I have sets of curves arranged in a somewhat circular way:

What I would like to do is to have these curves flipped in the direction facing away from the center, so I can offset them all outwards

Unfortunately it’s always the case that some of the curves are flipped inwards, while some outwards, like you see here when I plug them in to the offset component:

image

This is a simplified example, I have many more curves in different circular arrangements.

how can I flip all the curves inwards our outwards consistently? any help is appreciated!

here’s the internalised GH file:
flip outwards.gh (6.6 KB)

Thank you All!

Maths to the rescue here, check the determinant of three vectors (Z axis, line direction and vector from the center to the line).

flip outwards.gh (12.5 KB)

2 Likes

flip outwards.gh (7.9 KB)
A curve has direction, and your curves have contradictory directions.
Unifying them is the solution. The plugin is called Flexibility.


2 Likes

I don’t trust curve direction anymore since I’ve seen this:

Bug: Surface orientation / curve direction inconsistency - Serengeti (Rhino WIP) - McNeel Forum

1 Like

You can offset line in the two directions then choose the line furthest from the center

flip outwards.gh (10.5 KB)

2 Likes

Great methods, very helpful, thank so much all!