I believe there is a bug in the RhinoCommon implementation of:
Rhino.UI.Gumball.GumballDisplayConduit.PickGumball(
PickContext pickContext,
GetPoint getPoint
)
I encountered it while implementing a custom gumball using the pattern from McNeel’s official ex_gumball.cs example.
Observed behavior
With a custom GumballDisplayConduit and GetTransform:
- Dragging the gumball origin honors normal object snaps.
- Dragging an axis arrow does not honor End, Mid, Int, and other object snaps.
- Rhino displays the correct osnap tooltip under the pointer, but the resulting arrow translation does not use that snapped 3D point projected onto the gumball axis.
The call is made as shown in the official example:
displayConduit.PickGumball(pickContext, getTransform);
Apparent cause
The published RhinoCommon source currently contains:
IntPtr pGetPoint = IntPtr.Zero;
if (getPoint != null)
getPoint.NonConstPointer();
return UnsafeNativeMethods
.CRhinoGumballDisplayConduit_PickGumball(
pThis,
pConstPickContext,
pGetPoint
);
The return value from getPoint.NonConstPointer() is discarded, so pGetPoint remains IntPtr.Zero.
Source:
I also inspected the IL in my installed Rhino 9 WIP RhinoCommon.dll. It calls NonConstPointer(), immediately pops the result, and passes the still-zero local variable to the native method.
This appears to prevent native PickGumball from attaching the arrow’s line constraint to the supplied GetPoint/GetTransform. That would explain why unconstrained origin dragging receives normal osnaps while constrained axis dragging does not.
Proposed fix
The pointer should be assigned:
IntPtr pGetPoint = IntPtr.Zero;
if (getPoint != null)
pGetPoint = getPoint.NonConstPointer();
The existing GC.KeepAlive calls in the compiled wrapper can remain unchanged.
Could McNeel confirm whether this is a RhinoCommon wrapper bug and whether it can be corrected in Rhino 9 WIP?
I can provide a minimal custom-gumball reproduction if needed.
SystemInfo
Rhino 9 SR0 2026-7-7 (Rhino 9 BETA, 9.0.26188.13293, Git hash:master @ ac87238b2f9b57fd23752c796764855762dd1390)
License type: Evaluation, build 2026-07-07
License details: Cloud Zoo
Expires on: 2026-08-21
Windows 10 (10.0.19045 SR0.0) or greater (Physical RAM: 32GB)
.NET 10.0.9
Computer platform: LAPTOP - Plugged in [80% battery remaining]
Non-hybrid graphics configuration using DirectX
Primary display: NVIDIA GeForce RTX 3080 Laptop GPU (NVidia) Memory: 8GB, Driver date: 5-19-2026 (M-D-Y). DirectX(11)
> Integrated accelerated graphics device with 1 adapter port(s)
- Windows Main Display is laptop's integrated screen or built-in port
Secondary graphics devices.
Intel(R) UHD Graphics (Intel) Memory: 1GB, Driver date: 12-23-2021 (M-D-Y).
> Integrated graphics device with 4 adapter port(s)
- Secondary monitor is laptop's integrated screen or built-in port
- Secondary monitor attached to adapter port #1
DirectX Settings
Safe mode: Off
OpenBLAS: OpenBLAS 0.3.30 DYNAMIC_ARCH NO_AFFINITY SkylakeX MAX_THREADS=64.
Rhino plugins that do not ship with Rhino
C:\Users\StefanoMenci\AppData\Roaming\McNeel\Rhinoceros\packages\9.0\BlockEditNew\2.1.7\blockeditnew.rhp "BlockEditNew" 2.0.0.0
Rhino plugins that ship with Rhino
C:\Program Files\Rhino 9 WIP\Plug-ins\Commands.rhp "Commands" 9.0.26188.13293
C:\Program Files\Rhino 9 WIP\Plug-ins\rdk.rhp "Renderer Development Kit"
C:\Program Files\Rhino 9 WIP\Plug-ins\3dxRhino.9.rhp "3DxRhino.9"
C:\Program Files\Rhino 9 WIP\Plug-ins\UpdatesAndStatistics\UpdatesAndStatistics.rhp "UpdatesAndStatistics" 9.0.26188.13293
C:\Program Files\Rhino 9 WIP\Plug-ins\RhinoRenderCycles.rhp "Rhino Render" 9.0.26188.13293
C:\Program Files\Rhino 9 WIP\Plug-ins\rdk_etoui.rhp "RDK_EtoUI" 9.0.26188.13293
C:\Program Files\Rhino 9 WIP\Plug-ins\NamedSnapshots.rhp "Snapshots"
C:\Program Files\Rhino 9 WIP\Plug-ins\MeshCommands.rhp "MeshCommands" 9.0.26188.13293
C:\Program Files\Rhino 9 WIP\Plug-ins\RhinoCycles.rhp "RhinoCycles" 9.0.26188.13293
C:\Program Files\Rhino 9 WIP\Plug-ins\RhinoCode\RhinoCodePlugin.rhp "RhinoCodePlugin" 9.0.26188.13293
C:\Program Files\Rhino 9 WIP\Plug-ins\Displacement.rhp "Displacement"
C:\Program Files\Rhino 9 WIP\Plug-ins\SectionTools.rhp "SectionTools"