# Offset polyline

Is there a way to offset poly-line so that curve that gets created is positioned directly under the original curve (x and y coordinates remains the same)? It’s easy when the whole curve lies in one plane. But if different segments of the curve lies in different planes the Offset Curve component doesn’t provide the result I want to achieve.

Curve_offset.gh (1.5 KB)

Move produces a copy in any direction you please.

1 Like

That’s true, but the distance between the curves then is not the same at all the locations. I’m looking for a way to get this distance to be the same everywhere…

No, the distance between the curves IS the same at each point. By definition, that’s what a translation (move) is. you can see here, I measure the distance between each point of the original and moved line. The distance is the same for each point.

If you’re asking something else you will have to be more clear.

Well I might be describing it in a wrong way. I want these distances to be the same:

That’s exactly what the offset command does with a polyline. The length of a perpendicular line between two segments will always be the same length.

What you want seems to be a offset where every y direction is flipped expect the first one? Or what’s the logic behind that?

Maybe like this? But you will move lines out of existance if the move value is to high and it only works on planar curves.

200812_semioffset.gh (11.9 KB)

Edit: This is how you could apply it to an non-planar polyline. The distance can’t be the same everywhere since you need to move the segments to make a new polyline. In blue is the normal offset comand as comparison but I forgot to apply planes there so no good comparison.

200812_semioffset_3D.gh (12.6 KB)

If you have a non-planar polyline and you want to offset it so that each segment’s X and Y positions are the same (AKA from a top-down view it looks identical), AND the distance from the original segments is consistent, this is an example of what you would get:

But actually the topmost red segment’s lower vertex is closer than 0.5" to the original middle segment. So not only does it break the polyline to achieve the constraints you want, I don’t actually think its possible unless the polyline is planar to begin with.

This offsets each segment in its vertical plane but as expected, the offset lines either don’t meet (gaps) or cross each other. Dealing with those gaps and cross-overs is problematic.

Curve_offset_2020Aug12a.gh (8.9 KB)

Thanks everyone! Joseph - seems that your solution is the best that can be achieved in this case.

What I posted is more of an approach than a solution. It illustrates the issues but despite some effort to extend and trim the offset segments to resolve the gaps and overlaps, I failed to find a real solution. That doesn’t mean there isn’t one.

Well, in my case it works. I have subdivided those initial segments and projected points back to the offset lines. Then draw a poly-line trough those points. It cuts the corners so it’s not perfect but in my case it’s good enough.Thanks!

Curve_offset.gh (7.4 KB)

That’s creative thinking but cutting the corners isn’t the only flaw. Intersection points for the offset segments are not directly above the original vertices.

It’s a tantalizing problem but all my tricks have failed so far.

Could you copy the polyline to coordinates?

The offset is not simply a copy, some segments get longer and some get shorter.