I’m trying to import MeshTrim command from rhino into my GhPython but it seems that this command is missing from rhinoscriptsyntax. I appreciate any workaround for this problem. I need to parametrize this process in my grasshopper script. Thanks.
Hi you can script any rhino command using rs.Command()
still I don’t find mesh trim, that’s my problem, mesh trim command is missing
You’ll need to call into RhinoCommon and use Mesh.Split. Then, just toss the piece(s) you don’t need.
Thanks for the responses everyone, but it seems that I was not clear about my problem. The mesh split command in rhino splits a mesh with another mesh, but what I actually want to do is to trim a mesh with a nurbs surface in which case, only meshtrim can do the job for me. but unfortunately I don’t find this command in rhinoscriptsyntax library. thanks again
You will need to create a mesh from the nurbs surface first then split the other mesh with that. That’s what MeshTrim does.