Raising segmentation resolution of polyline offset?

Hello Grasshoppers,

Today I’ve been fighting with grasshopper to raise the segment length of the arcs that are part of what the Polyline Offset component has generated.

See the GH file:
polyline_offset_clipper.gh (8.7 KB)

What I’m trying to do is to have a whole list of curves to have multiple offsets towards the middle. Polyline Offset is a component from Clipper. This gave me the desired result visually, but not technically. Maybe there are better ways?

Initially the source curve is not segmented, this happens due to the offset.

After it being offset it get segmented in a too low resolution:

When trying a normal offset I get this with certain shapes:
Screenshot 2021-06-07 194121

Error because I’m trying this on multiple curves:
Screenshot 2021-06-07 194135

This is that shape:
normal_offset.gh (5.6 KB)

Hi @ohmarinus,

Is your offset starting value specific in any way?

As in: does it have to be 3.899?

As you can see, offset fails after a certain distance increment - because after certain increment it’s not an offset anymore - or it is, but not a nice one - gh still tries though…but perhaps it shouldn’t give you what doesn’t work? who knows…

Maybe for this case you’re better off using scaling if it’s close enough?
normal_offset.gh (26.8 KB)


The lines are smooth, however, when using this on multiple curves with graft enabled on the discontinuity and scale inputs, it generates the following geometry, which is undesired. Not all shapes have the center in the physical absolute center:

The scaling option also doesn’t get applied to a perfect circle.

It’s right before bedtime right now, I’ll dig deeper tomorrow to see if I can change your GH file to make it work more in the way that I desire. Thanks a lot for your efforts of coming up with your possible solution.

well that’s different…

LoL - seems like you already have the answer…

It seems ‘logical’ to think the same ‘logic’ will apply here:

and here:

anyway with situations like these I usually grab curve control points and regenerate iteratively based on PWK

True, true, however I think in this image the issue is that the offset goes beyond a certain ‘zero point’ and it turns inside itself, moving the points further away from the center again, because there’s no space for another offset.

I wonder if there’s an option to detect if an offset has gone beyond a certain point and consequently cull that curve.

there is one, it’s called color red of death :frowning: :
Screenshot 2021-06-07 194135

jk, I feel you

what you can do is write a code I guess, or just allow the failure then cull the nulls…

lol ‘cull the nulls’ I like how that sounds…