Bug with VariableOffsetSrf

I found a bug while trying to offset the surface in the attached file via the VariableOffsetSrf command. The offset works in one direction, but fails in the opposite direction, resulting in creation of a huge surface with random shape that causes extremely bad performance of my Rhino 7 and I’m forced to restart Rhino to be able to use it normally again.

Bug with VariableOffsetSrf.3dm (209.9 KB)

FWIW this seems to work ok in both directions in Rhino 8 (using default offset):


Bug with VariableOffsetSrf OK in v8.3dm (122.6 KB)
(saved as R7 file)

While it works with the basic “Offset” tool, it fails with the variable one. At least in Rhino 7. In fact, while trying to create a -5 mm variable offset surface, Rhino 7 created a bad object with a huge size. You can see that in my video below:

Bug with VariableOffsetSrf.3dm (159.7 KB)

Hi Bobi,

As your title referred to VariableOffsetSrf that’s what I used… I just did it again in Rhino 8, this time with 5mm offsets in both directions. It looks like the curve at one end is too tight for -5mm though.

HTH
Jeremy

It’s understandable, but the main issue is that the preview is highly misleading. That’s because the preview uses the original surface’s structure (and control points count), whereas the resulting output surface is an approximation. It’s pity that this particular tool lacks a “Loose” option in the Command line and the user is left ro suffer with an unpredictable and misleading end result. Not to mention that sometimes is also crashes Rhino due to the lack of such an option.

hi @Rhino_Bulgaria I am getting weird behavior in Rhino 7 as well. Instead of flipping the surface, a negative offset seems to work better.

Anyhow, like @jeremy5 pointed out, there is a curvature restriction at this end:

Regarding the loose offset, what’s your expectation how the points get offset?

I think that the preview pretty much shows the correct way of making a loose variable offset surface. You will notice that it uses the original surface’s control points, this is why the preview outline is simplified and does not follow the natural offset of the surface.

By the way, both tools (OffsetSrf and VariableOffsetSrf) also lack an option to keep the tangency around the border of the surface. As a result, the end points look weird and destroy the expected tangency, eventually forcing the user to fix that manually. Notice the distorted control points on the upper left corner. The offset surface is the top one. The 2nd row of control points is supposed to be vertical, but instead Rhino made them heavily inclined at approximately 45 degrees.

I’m not so sure of that, see for example a loose offset of the edge curve (3 units) in red and the difference with the preview of VariableOffsetSrf:

I mean that the preview is probably using the same structure (number of control points) as the input surface. Having a “Loose” option for the VariableOffsetSrf tool would help to avoid the inevitable over-complication of the output surface. Even if I set a tolerance of 20 units (millimeters in this sample file), Rhino still fails to create a variable offset surface with the same number of control points like the original surface.

added a YT to the other thread

1 Like

Another thing to think about is why Rhino failed to select the last created object. You can see that around the 36th second of the video (SelLast failded), and again at the 40th second (SelPrev failed). In my opinion, Rhino must always remember which is the last created object (or objects) instead of “forgetting it” for no obvious reason.