Curve.Offset unexepected behavior and freezes


We are experiencing some issues with Curve.Offset, which they also seem to happen with the Offset command in Rhino.

If we use Curve.Offset command with a low enough tolerance (somewhere between 0.5mm and 0.1mm in the specific case we are testing), it freezes. The same happens with the Offset command if Trim = Yes.
Interestingly, when using the command, the preview looks just fine, but once you accept it, it freezes.

If the tolerance is set high enough, then the command won’t freeze but the result will not match the preview.
Furthermore, although the preview is mostly ok, it actually shows some kinks.
I have attached some pictures as an example and the problematic curve.

curve.3dm (166.6 KB)

If the trim option is set to No, then the command seems to work just fine, except for the aforementioned “kinks”. We have tried to replicate this behavior using Curve.Offset, but to our knowledge, there is no Trim option equivalent. Is there a way to achieve the same effect?

I am not sure if this is the expected behavior for Curve.Offset or a bug. In any case I would appreciate some input into how to deal with this issue.

Thanks in advance.

Hi @endika,

Your curve has issues. First it has too many points, imo. But the bigger issue it that it has stacked points. The dynamic image displayed by the Offset command shows this:

If you zoom in enough, you will see this:

Clean these up and Offset should work.

– Dale

Hi @dale,

thanks a lot. The curve is the result of an squish, and we did not notice that it returns a polyline, hence the amount of points.
Now we are rebuilding the curve as a NURBS before applying the offset and everything works smoothly.

Thanks again :slight_smile: