Offset curve while keeping connectivity

Hello community,

I have a pattern of repeating curves and would like to offset them while retaining connectivity between them (i.e. I would like to avoid the small gap that can be seen on the picture).
Any ideas on how to do this?

Thanks!

offset while keeping connectivity.gh (12.5 KB)

This seems to work. It extends that tiny portion by line to the nearest curve. You didn’t specify how you wanted to handle the curves hanging out on the edges . I gave the option of not extending them.

offset while keeping connectivity-b.gh (17.5 KB)

Thank you for your quick answer @akilli!
However, when zooming in quite a bit, the two curves don’t seem exactly connected to each other. :neutral_face:

Since your pattern is regular, the extension distance for all the interior curves is the same, which simplifies it. The exterior curves are now extended by that same amount.

offset while keeping connectivity-c.gh (13.8 KB)

I’ll save you the trouble of sending me another frowning emoji. It still is off. Be back in a few minutes.

I’m back!
I don’t know why Extend Curve didn’t work in all cases, so I just “manually” extended them. by line, to the nearest point. The curves at the edge are not extended. Get out your electron microscope.

offset while keeping connectivity-d.gh (17.2 KB)

:sweat_smile: thank you for your help!

Extend offset curves and shatter at intersection points.


offset while keeping connectivity_2021Jan22a.gh (18.7 KB)

It bothered me why my first approach didn’t work and I finally realized that it will only work if the two curves are perpendicular, which they appeared to be from your image. Wrong. Unless they are perpendicular, there will always be a tiny shortfall. My flaw is encapsulated here:

If you need extensions which are tangent to the original curve, then @Joseph_Oster 's approach is better.

Extend Curve ‘T’ input offers three choices: ‘Line’ (Tangent), ‘Arc’ and ‘Smooth’.

offset while keeping connectivity_2021Jan22a2

It doesn’t make any difference in this case because the extended curve will always fall short, just by plugging in the length to the nearest point. In fact, smooth and arc are even worse.

I was referring to my model, not yours. I can see a very small difference between ‘Line’ and ‘Smooth’. Both work fine.

Thank you both for your help! I will keep @Joseph_Oster’s solution, I very much like the “smooth” option. :blush:

The difference is negligible. Your original curves are not fair, as shown by Curvature Graph:

1 Like

Good as always