Function to convert meshes in Rhinoceros to meshes in GShark #421
Sophielelerre
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have been working on an implementation for the GShark library regarding a "closest point to mesh" function. To test and debug, I have used Rhinoceros and I have a RhinoCommand cs file that selects the mesh in Rhinoceros, converts it to a GShark mesh, and selects the point.
I have defined separately a method for the Rhino.Geometry.Mesh to GShark.Geometry.Mesh conversion. Although it has not been properly tested, it looks like it works for triangle meshes, quad meshes, and Ngon meshes. Rhinoceros Ngon mesh faces have an extra vertex in the middle making the conversion fail if those vertices are added to the list in the GShark mesh constructor method. For this reason, I extracted the vertices from the edges and then re-indexed those to match the indexes of the faces.
Would you be interested in a "Rhino to GShark mesh" implementation code?
This is a link to check it out:
https://github.com/mulestudio/RhinoToGSharkMeshConverter/blob/1d7b1955e6c82006f0f09d2e5093ee85c8cbfd29/RhinoToGShark.cs#L89
Beta Was this translation helpful? Give feedback.
All reactions