I wrote a GHPython script that takes a mesh as input and creates a mesh shell from it. It only makes sense with triangulated meshes, so, at first, I want to check if the input mesh has quad faces and triangulate it if so.
There’s a code example in the RhinoScriptSyntax docs:
import rhinoscriptsyntax as rs
obj = rs.GetObject(“Select mesh”, rs.filter.mesh )
This works when the Python component’s mesh input type hint is set to “ghdoc”.
However, I need the type hint set to “mesh”, because later in the code I use RhinoCommon access to mesh.TopologyVertices and mesh.TopologyEdges.
There does not seem to be a “triangulate” function in Rhino.Geometry.Mesh.
So, is there a way to get the mesh data from a Guid object?