Hi Baris, here’s a simple script for creating a dual mesh using Plankton… Hope it helps!

// convert the input Rhino mesh to a Plankton mesh
var pmesh = x.ToPlanktonMesh();
// create a new, empty Plankton mesh
var dual = new PlanktonMesh();
// add a vertex to the dual for every face of the input mesh
for (int i = 0; i < pmesh.Faces.Count; i++)
{
var fc = pmesh.Faces.GetFaceCenter(i);
dual.Vertices.Add(fc.X, fc.Y, fc.Z);
}
// add a face to the dual for every interior vertex of the input mesh
for (int i = 0; i < pmesh.Vertices.Count; i++)
{
// skip boundary vertices (require special rules)
if (pmesh.Vertices.IsBoundary(i))
continue;
// create a face from the neighbouring faces of each vertex
dual.Faces.AddFace(pmesh.Vertices.GetVertexFaces(i));
}
// output
A = dual;