Preview geometry from a GH definition persists after Context Bake in R8

See the attached GH definition. It is set up to be used with GH Player. It creates a polysurface object based on user input. It shows the GH red preview geometry while the command is running, but the preview geometry should disappear when the command is finished. It disappears in Rhino 7 but not in Rhino 8. It persists in the CAD view of Rhino 8 even if you choose File / New.

Is this the intended behavior of GH?

I’ve confirmed that turning off the preview geometry in the definition before running it via Player avoids the problem. Should this be required? Documentation that I’ve found indicates that the preview geometry should disappear after the Context Bake component is run. This is true in V7 but not in V8.

To see the problem, start a new model in Rhino and run the attached GH file in Player. Enter the following parameters as an example, but any valid values show the problem.

Enter the Z location of the rib array: -10
Enter the lens diameter ( Undo ): 20
Enter the rib width ( Undo ): 2
Enter the rib angular extent (positive bulges downward) ( Undo ): 60
Enter the outer shaft diameter (0 for no outer shaft) ( Undo ): 5
Enter the thickness of the rib array solid ( Undo ): .1

Any feedback would be appreciated since I prefer not to change and recompile a set of tools I have like this that are distributed as plug-in commands. Thank you.
PhotopiaCylindricalRibs.gh (37.0 KB)

Hi @mark15

I tried following your steps, but I don’t see the error on my side.

preview-geometry-from-a-gh-definition-persists-after-context-bake-in-r8

Since you’ve already tried restarting Rhino, try clearing cache / temp files on your computer, and try again?

~ ~ ~ ~ ~ ~ ~ ~
Kaushik LS
Chennai, IN

Thanks for your quick response and it’s interesting that you didn’t see the problem. It is consistent for me and it was reported to me by a customer in France experiencing the same problem. See my attached video. I’m not sure what cache I should try clearing, but I also don’t see how this could be related to a cache since the preview is different with each new set of parameters I enter, as you see in the example. FYI - I’m running Rhino 8 SR15.

Mark

Further to my last message, I’ve now upgraded to R16 and the issue is unchanged.

It also seems to be the case that if you open the GH file and turn off the preview, then the red preview geometry goes away. If I start a new model however, and run this GH file as a plug-in, the way it is actually being used, then the red preview geometry persists even if you open the GH window and explicitly turn off the preview geometry, as shown here:

I’ve attached the compiled plug-in file in case you want to test it.

Thank you.

PhotopiaCylindricalRibs.rhp (73.5 KB)

Hi Mark -

To change that behavior in Rhino 8, you need to open that Grasshopper file, go to the document properties for that file, and uncheck the “Keep open after command completes” option for “GH Player”.
-wim

Thanks for your quick reply. The “Keep open after command completes” option seems to be new in Rhino 8 since it’s not shown in 7. I’ve made this change to the GH file in 8, saved the file and recompiled in 7. The plug-in now seems to work as intended in both 7 and 8, thank you.

I was also going to test if compiling in 8 would result in a plug-in that still works in 7. Since the oldest version of Rhino supported was a setting in the 7 compiler, I assume so. However, I can’t find how to compile a GH file in 8. I’ve seen some information saying to use the new Script Editor and then choose File / Publish. But if you open a GH file from the Script Editor, it opens the standard GH canvas screen and there is no File / Publish option. Can you please direct me to the appropriate documentation for compiling GH files in 8? Thank you.

Hi Mark -
Please start new threads for new questions.

You don’t open the GH file in the Editor. You add it to the project that you are going to compile.

-wim