Troubleshooting: offset in the same direction multiple closed curves

Hi all
i got some closed curves from deconstruct brep and i want to offset them towards the interior; the problem is that some offset towards interior and others toward exterior.


I tried to flip the curves with a guide curve direction, but it doesnt work.
Here the definition with internalised data, and lower my attempt to solve the problem.

offset multiple closed curves.gh (180.0 KB)

Offset in 2 directions and sort these curve by length. Then choose the shortest curve.
If you accept polyline use Clipper plugin

4 Likes

nice trick! Thank you very much

I am working on offsetting a circle for ring sizes. How do I offset by 2 directions and then sort by longest?

I need to find outside circumference length to use to cut metal lengths.

Thanks,
«Randy

ring sizes to lines 2018.gh (18.6 KB)

Like this?

offset multiple closed curves_v1.gh (166.0 KB)

2 Likes

I think this will do for you.

ring sizes to lines 2018_v1.gh (17.1 KB)

Not with my pc now
You have to input a positive and negative value in offset, the 2 offseted curves need to be on the same branch, then you measure the length of the curves, sort the length and the curves. Finally extract first item with list item component. Is it clear ?

2 Likes

I am just back. I have about 30 minutes to play before off again. Most of it makes sense. I am just opening @davidsmavrov definition to see.

Thank you,
«Randy

thanks, this will work.

So it is the math * -1 that causes an opposite offset?

«Randy

1 Like

Thanks, I will look at this this afternoon when I have more time.

«Randy

1 Like

Nice trick @davidsmavrov. Anyway I don’t understand why it works with those planes from planar component and the circles plugged in the G input of Flip; instead it doesnt work if i use the same planes but i plug in G the curves from graft.
Surely there is something I am not understanding @DavidRutten


offset multiple closed curves_v1_RE.gh (332.5 KB)

Because you can’t use the geometry you will be guiding as a guide. Doesn’t make sense. And the cirlce is perfect, because it is predictable and it will always have the same orientation. In other words, works as a guide.

1 Like

@laurent_delrieu
I did as you advised and it works.

offset multiple closed curves_1.gh (305.5 KB)

@davidsmavrov You are right. This is an alternative solution proposed by @laurent_delrieu. Check it out.

Hi, thanks for useful solution!
I’m struggling with a similar problem, but I want to use Offset on Srf instead of Offset. It works like a charm with Offset, but it does not work with Offset on Srf. Is there a differens between the two that can explain this?

Regards,
Tj


Hi guys, I am trying to offset the lines to make flaps for sticking it and make a polysurface model. but some lines are offsetting inside and some outside as you can see…I want all the offset to be outside …Any suggestion?