You can just multiply by (nTonEdge-1) to delete the boundary edges, see About intalledges and internal edges - #2 by fb77
(nTonEdge-1)