I notice that when I am doing the .ToPlanktonMesh() and .ToRhinoMesh() afterwards, the ngon structure supported by Rhino 6 gets lost. I need the plankton halfedge structure for some mesh manipulation. But I want to preserve the ngons on the mesh. Any suggestions?
Hey @vincentfs, Plankton was written before Rhino 6 was released, so it never supported ngons. You’ll need to construct the plankton mesh yourself from the ngons. For example, in python…
p = Plankton.PlanktonMesh()
for v in mesh.Vertices:
p.Vertices.Add(v.X, v.Y, v.Z)
for n in mesh.Ngons:
verts = [int(i) for i in n.BoundaryVertexIndexList()] # hack to convert unit[] to int[]
p.Faces.AddFace(verts)
Thank you @will . Is it possible to share the original .ToPlanktonMesh() and .ToRhinoMesh() source codes? I would like to rewrite them for ngon supporting in python.