Hello,
Is there an implementation for a functionality such as “ExtractMeshFaces” as a clickable interaction in ShapeDiver? meaning there is a mesh loaded and the user can mouse click and select certain faces manually?
(I am currently not a premium ShapeDiver user so I can’t check if this functionality exists. )
If you send a single mesh to the online viewer, there will not be any way to select individual faces there. Even if we expose this functionality, this will likely not give you what you need, because the mesh representation in the viewer does not necessarily match the one you have in Grasshopper, and therefore information about which face of the mesh is selected will not be usable in your algorithm. Maybe if you explain your use case a little more, I can provide ideas for workarounds, depending on what you are trying to do.
I see, thank you for the elaborate thought.
I suppose this is not a very common use case of grasshopper.
The workaround I can find is to create some sort of a sphere that is movable by the user and creates an intersection with the larger mesh in order to select the area. It’s not the best experience but I assume it would work?
Again, that depends on what you want to do. But indeed, if you create a draggable sphere in the viewer and send it back to Grasshopper, you can do the intersection of the mesh and the sphere in Grasshopper and find which face(s) belong to the intersection. Such a setup can be achieved through the viewer API (see an example with draggable spheres here: Simple Sphere Dragging - CodeSandbox).