Hi all, I am trying to perform some operations on a 3D model using Rhino and Human UI. As we select “Set one Mesh” from “Mesh” component in Grasshopper, similarly I want to do the same operation by using Human UI.
I want to set a mesh in Human UI by clicking the 3D model in Rhino window rather than using Grasshopper’s “Mesh” component. Can anyone help?
My Grasshopper file and Sample 3D model is attached herewith.
ConnectingMeshViaHumanUI.gh (6.6 KB) ExampleSTL File.3dm (199.8 KB)
you may have to do that through a custom script
try this:
forum-pickmesh.gh (3.4 KB)
downside is that when the pick action fires up, you have to click into active viewport first.
Hi @Will_Wang, the problem is still there. I need to “set one mesh” to Human UI interface (See Figure 1) directly without clicking grasshopper’s “mesh” component (See Figure 2).
I am unable to run the code and any button is not appearing in the control window, Why is that?
My file and screenshot is attached here.
CodeNotRuning.gh (6.5 KB)
give your button a name, will you?
1 Like
Oh, Thanks man! It is working now
@Will_Wang, the code is running fine but it is not performing the operation.
Why is that? Please refer to the image and file posted below.
I have tried to connect this button to geometry in Rhino but it is not giving any outputs.
CodeNotRuning.gh (9.6 KB)
like I said, after you click the button, you may have to first click back in the Rhino viewport to get focus and then click the geometry. you can also try Andrew’s script. that one doesn’t seem to have this get-back-to-focus fuss.
Also make sure you are indeed selecting a mesh, not a polysurface
@Will_Wang, I have the last question, How can we clear or Deselect the selected Mesh through the button in Human UI?
The Screenshot and file are attached here.
CodeNotRuning.gh (9.6 KB)
forum-pickmesh.gh (3.6 KB)
try this
if you pick nothing and hit enter, the return value goes to null