Offset in a same side

Hi everyone,
I have some curves in different levels and after selecting the curves of every level I want to offset them in a same side, but until level 7 they are offset in a same side and from level 8 they are offset in the opposite side…



OFFSET IN A SAME SIDE.gh (56.1 KB)

You can offset both sides and just return the one with the shorter/longer length

Some of them are straight and their lengths are equal

With open curves, there’s no way to tell. The offset direction will depend on the curve direction from start to end. If you reverse the curve direction, you reverse the ‘natural’ offset side (with a positive distance input).

If the curves are somewhat organized it may be possible to find a single point that indicates the offset direction for all curves (like the native Rhino command), in GH you would then need offset both directions, check the distance from the point to some point on each of the offset curves and choose the shortest distance. The choice of the offset direction point and the point on the curve to measure will be critical.


OFFSET IN A SAME SIDE_reV1.gh (91.2 KB)

3 Likes

That’s great! :heart_eyes:
Thanks a lot :pray: :four_leaf_clover: :tulip: