Offsetting closed curve unexpectedly produces two curves

Offseting the below curve in GH for Rhino 8 unexpectedly results in two separate output curves. This did not occur in GH for Rhino 7. Any ideas why this might happen? Changing the corner style to “None” fixes the issue but I need this to be kept at “Sharp”.

The curves’ end points seem to be slightly misaligned.

You can do something like this:

Thanks for the reply. My input is a single, closed curve. The problem is that the offset component itself is producing disconnected curves.

Without sharing your file it is difficult to find the issue.

CurveOffsetIssue.gh (2.8 KB)
CurveOffsetIssue.3dm (86.2 KB)

First, you can internalize geometry. This means, you only need to share the *.gh definition.

Otherwise, i would avoid the native “OffsetCurve” at all costs. It’s slow and not very robust from my experience. This was 3 years ago, maybe it has improved. Nowadays, i just use the Clipper2 - Plugin. Clipper2GH | Food4Rhino


CurveOffsetIssue.gh (6.3 KB)

1 Like

the offset works fine if you provide the offset plane, which is always good practice:

OffsetCurve_wants_an_offset_plane.gh (6.3 KB)

note that if you go through Clipper then that curve must become a Polyline, which means goodbye arcs

3 Likes

No, it does not work fine or as expected. I am trying to get the smaller curve (offset inwards), which still results in two separate curves.

Foregoing arcs (sing Clipper) is not an option for me. Again, the Rhino 7 component worked fine. I am wondering what changed in Rhino 8 to spawn this issue and whether it can be fixed or if there is a workaround using native components.

that might depend on the direction the curve is drawn

by flipping it (corners is set to 0=None) I get this in R8 SR4 (8.4.24037.15001, 2024-02-06)

OffsetCurve_wants_an_offset_plane.gh (8.0 KB)

usually, in cases like this (planar closed curves), where not always the direction a curve is drawn is something I can control, the best option is to offset both direction and pick the shorter of the two
[ohh, I thought I was editing my previous post… sorry for that]

1 Like

Just wanted to retry and re-opened the file, but the output is now as expected. Find the sysinfo attached.

Summary

Rhino 8 SR3 2024-1-9 (Rhino 8, 8.3.24009.15001, Git hash:master @ 3541fa287a013b0f17849f0740f1e43a44031bfc)
License type: Educational, build 2024-01-09
License details: Cloud Zoo

Windows 10 (10.0.19045 SR0.0) or greater (Physical RAM: 32Gb)
.NET 7.0.15

Computer platform: DESKTOP

Standard graphics configuration.
Primary display and OpenGL: NVIDIA Quadro P2000 (NVidia) Memory: 5GB, Driver date: 8-4-2023 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 536.99
> Accelerated graphics device with 4 adapter port(s)
- Windows Main Display attached to adapter port #0
- Secondary monitor attached to adapter port #1
- Secondary monitor attached to adapter port #2

OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
Redraw scene when viewports are exposed: On
Graphics level being used: OpenGL 4.6 (primary GPU’s maximum)

Anti-alias mode: 4x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: High

Vendor Name: NVIDIA Corporation
Render version: 4.6
Shading Language: 4.60 NVIDIA
Driver Date: 8-4-2023
Driver Version: 31.0.15.3699
Maximum Texture size: 32768 x 32768
Z-Buffer depth: 24 bits
Maximum Viewport size: 32768 x 32768
Total Video Memory: 5 GB

Thanks for all the input!

Tried the above with SR3 and SR4 and unfortunately getting two detached curves in both releases. I have copied my sysinfo below.

@dn.aur, this is usually my approach as well (offset to both sides and pick shorter/longer based on needs). Unfortunately, flipping the curve (and multiplying the offset distance by -1) doesn’t fix the issue for me.

Rhino 8 SR4 2024-2-13 (Rhino 8, 8.4.24044.15001, Git hash:master @ 5d3f86ffffae3c2ed84d21147c008b3907a40a2e)
License type: Commercial, build 2024-02-13
License details: Cloud Zoo

Windows 10 (10.0.19045 SR0.0) or greater (Physical RAM: 32GB)
.NET 7.0.15

Computer platform: LAPTOP - Plugged in [99% battery remaining]

Non-hybrid graphics configuration.
Primary display and OpenGL: NVIDIA RTX A3000 Laptop GPU (NVidia) Memory: 6GB, Driver date: 11-2-2023 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 537.79
> Integrated accelerated graphics device with 4 adapter port(s)
- Windows Main Display is laptop’s integrated screen or built-in port
- Secondary monitor attached to adapter port #1
Primary OpenGL: NVIDIA RTX A3000 Laptop GPU (NVidia) Memory: 6GB, Driver date: 11-2-2023 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 537.79
> Integrated accelerated graphics device with 4 adapter port(s)
- Windows Main Display is laptop’s integrated screen or built-in port
- Secondary monitor attached to adapter port #1

Secondary graphics devices.
Intel(R) UHD Graphics (Intel) Memory: 1GB, Driver date: 3-16-2023 (M-D-Y).
> Integrated graphics device with 4 adapter port(s)
- There are no monitors attached to this device. Laptop lid is probably closed

OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
Redraw scene when viewports are exposed: On
Graphics level being used: OpenGL 4.6 (primary GPU’s maximum)

Anti-alias mode: 4x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: High

Vendor Name: NVIDIA Corporation
Render version: 4.6
Shading Language: 4.60 NVIDIA
Driver Date: 11-2-2023
Driver Version: 31.0.15.3779
Maximum Texture size: 32768 x 32768
Z-Buffer depth: 24 bits
Maximum Viewport size: 32768 x 32768
Total Video Memory: 6 GB

Would like to bring up this post again. Is there anyone who might clarify whether this is a bug or expected behaviour?

Curve is not internalized.

Internalized the curve.
CurveOffsetIssue.gh (4.8 KB)

I believe this is fixed in Rhino 8 SR 5. You may need to update to the latest service release candidate. The original issue was logged here. Opening your definition with the latest Rhino 8 produces the expected result of a single, closed curve.

1 Like

This fixed the issue, thanks Joshua!