Geometry disappear from Perspective view when opening Grasshopper

Re-reading this i’m leaning more towards a plugin causing the issue.

Can you run systeminfo into your command line and paste back here.

Also try moving all unnecessary (your wire plugin for example) plugins to a new temp folder and see if that resolves the issue.

I removed the wire plugin and re-opened everything ,still same issue.

Systeminfo below:

Rhino 7 SR15 2022-2-8 (Rhino 7, 7.15.22039.13001, Git hash:master @ 2833e18992fc4b5cf99bb29c4d8e8add4f02074d)
License type: Commercial, build 2022-02-08
License details: Cloud Zoo

Windows 10.0.19044 SR0.0 or greater (Physical RAM: 16Gb)

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

Non-hybrid graphics configuration.
Primary display and OpenGL: NVIDIA GeForce RTX 2070 Super with Max-Q Design (NVidia) Memory: 8GB, Driver date: 12-29-2021 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 511.09
> Integrated accelerated graphics device with 4 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: 1-22-2020 (M-D-Y).
> Integrated graphics device with 3 adapter port(s)
- Secondary monitor is laptop’s integrated screen or built-in port

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: 12-29-2021
Driver Version: 30.0.15.1109
Maximum Texture size: 32768 x 32768
Z-Buffer depth: 24 bits
Maximum Viewport size: 32768 x 32768
Total Video Memory: 8 GB

Rhino plugins that do not ship with Rhino

Rhino plugins that ship with Rhino
C:\Program Files\Rhino 7\Plug-ins\Commands.rhp “Commands” 7.15.22039.13001
C:\Program Files\Rhino 7\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino 7\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 7.15.22039.13001
C:\Program Files\Rhino 7\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 7.15.22039.13001
C:\Program Files\Rhino 7\Plug-ins\rdk_ui.rhp “Renderer Development Kit UI”
C:\Program Files\Rhino 7\Plug-ins\import_ACAD.rhp “AutoCAD file import: import_ACAD”
C:\Program Files\Rhino 7\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino 7\Plug-ins\IronPython\RhinoDLR_Python.rhp “IronPython” 7.15.22039.13001
C:\Program Files\Rhino 7\Plug-ins\RhinoCycles.rhp “RhinoCycles” 7.15.22039.13001
C:\Program Files\Rhino 7\Plug-ins\Grasshopper\GrasshopperPlugin.rhp “Grasshopper” 7.15.22039.13001
C:\Program Files\Rhino 7\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 7.15.22039.13001
C:\Program Files\Rhino 7\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino 7\Plug-ins\Displacement.rhp “Displacement”

I’m going to remove everything except these used plugins and see if we figure this out.

image

That was a dead end, one thing i did notice that if i used a different Units in the file (Decimal Feet for instance) I lose the view, in millimeters everything is fine.

To elaborate, create a fresh file in MM, add your DWG file and i have no issues.

I had also issues with dissapearing geometry,when I recall correctly it was the some plane componentor with a plane input(like mirror). You maybe could backtrack it by deleting them to see if the geo appears

I have a Grasshopper definition to add panel thickness to planar climbing wall surfaces.

Until very shortly I’ve been using the cosine of the angle of adjacent surfaces to get the mitres right.

The cosine of a 90° angle is 0.

Dividing my panel thickness of 21 mm by the cosine results in the length of the mitre.

21 divided by 0 results in an infinite number… 342967353296061000.00 to be exact…

Long story short, if there is a 90° angle somewhere, I have an extrusion with an infinite amplitude and all my geometry disappears from my perspective viewport.

I have found a better solution in the meantime and I’m not interested in any workarounds. The purpose of this post is solely to explain a possible cause of geometry disappearing in the perspective viewport…

1 Like

It’s been brought to my attention that line/plane intersection has been reported to cause this in rare cases as well. So down to a large value being created or line/plane component.

1 Like

Ok, I’ll do some tests and see what I can find.

Yes! This did the trick, when I disabled the Division component the problem goes away. Thanks @martinsiegrist

@Japhy I feel like you could add a divide by 0 function in the Division component to prevent this?

image

In the example below, disabling the division by 0 component shows the GH geometry. However the problem is actually what happens with the big number resulting in the division by 0. The division by 0 can remain enabled. It’s the extrusion and the translation which cause the geometry to disappear. Selecting the problematic component shows the geometry outline selected again. At least the extrusion component has this behavior…

I find it interesting that the sine of 0° raises an error in the division component but a sine of 360° or cosine of 90° doesn not.

sine_cosine_division_0_big_number_geometry_disappears.gh (21.2 KB)

@Oskar_Scherdin why don’t you test your sine output for “invalid” results and replace those with some number… possibly 1?

1 Like

Hi Martin, yeah I have already done the test/bypass so script running fine now. Cheers again :ok_hand:

1 Like

Invalid geometry would sometimes mess up Rhino’s preview. I also have some experience before, majorly due to infinite boundingbox.

I hope it can be fixed from the Rhino end (as well as the preview pipeline of Grasshopper).

This is definitely a bug…I encountered this situation several times all happened in a sudden. The script worked fine, and unexpected disappearance of all my geometries in perspective view. No even involved a divide-zero operation in my script.

Peijunfei, Can you provide an example? If its confidential please send to the private upload.

https://www.rhino3d.com/upload

Happened to me as well. Attached here is my GH-file, where the culprit is an ‘Offset on Srf’ module.
As soon as I enable it, the perspective view fails to render.

GH_bug.gh (15.5 KB)

@Janis_Petke looking at your definition I noticed you projected a curve onto the brep and created a ruled surface to split the brep and I think that’s problematic. The ruled surface wraps around the corner. This is causing problems later on and in my opinion it is not a Grasshopper bug.

I would much rather split the brep with a simple extrusion that fully intersects.

I would also do the edge filtering a bit different…

GH_bug.gh (25.0 KB)

1 Like

Thank you, Martin.

I agree on your solution. My original file was something quite quick and dirty. Still, the developers should look into the bug inside grasshopper causing geometry in Rhino to dissappear.

But luckily, cleaning up the grasshopper code like you showed, helps!

1 Like