Offset curves in outwards/inwards direction

Hi,

I have a set of curves that I wanted to offset all outwards. But when I am doing so, the offset is random. I have tried multiple options but couldn’t figure out what is the problem.
I have even created a region outside and used short list with the distance but didn’t work.
Actually, I want the curves to be louvers. So, I am offsetting it outwards and then will create surface between those 2 lines sets and then will extrude that surface to make it solid.
I am inserting a grasshopper file with integrated curves.Offset curves.gh (110.1 KB)
If anyone can help me with it, will be very helpful.
Thank you!


This is an image of part of your code:

I see no reason to graft your geometry? And I see no reason to have a list of offsets for Offset Curve :question: The ‘Distance’ input expects a distance value, not a vector (or list of vectors).

I didn’t study all your options. This is the basic code:


Offset curves_2025Jan31a.gh (26.1 KB)

As to the “random” offset directions, flip curve or flip plane can fix that but it would help to first clean up your geometry (curves).

P.S. Some of your planes are “vertical” instead of horizontal.

just so you know, in your list of curves there are many duplicates:

I think you would get much better results if those curves were generated in a more reliable way

and because it looks like those curves are generated over some Breps/Surfaces (I assume it’s the exterior of a building?) sharing also those Breps/Surfaces could be much helpful because could use their Normals to find the direction along which you want the offset to happen

so the question somehow simplifies, because it’s not anymore about the direction of the offset of a curve in space, but is the direction of a curve offset in relation to the Surface on which it lies

for instance, you could even think of offsetting the surface itself, and find the curves on this outer surface directly

1 Like

Yes, and there are diagonal lines (wrong :interrobang: should be removed) among the horizontal lines. GIGO.

The purple group in this version culls only the horizontal lines (yellow group) and ignores the rest.

Then uses Brep CP to pull midpoints to an outer “wall” that surrounds all the curves and uses Side (Curve Side) to P’n’C (Pick’n’Choose) the original curve or a flipped curve for Offset Curve.


Offset curves_2025Jan31b.gh (43.8 KB)

I made no effort to cull duplicate curves.

My initial thought was that I will offset the curve in both directions and will sort the list with only outer curves. That’s why I have grafted the set of curves in first place.
Yes, I got the mistake you are pointing of vector input in the distance.

Thank you for giving your time. I will clean up the curves and provide the breps/surfaces on which the curves are setting. I got you point that we can take the Surface plan and can offset the curves on the normal of that.
In one of the options. I have extruded the line in z-direction and took normal of those surfaces, but the surface normal was not pointing out, rather it was random.

Those diagonal lines also need to be offseted.

Thank you for your efforts, I will take notes on it and will try to create a workflow around it. I will post soon if it gets solved.