@r_gigante Thank you very much for your help, Riccardo!
The suggested method of calculating the ngon index works fine with the Modeling::SplitPolygon() function, but functions like Modeling::GetEdgeNgons() sometimes return unexpected indices, which seem to be based on a different logic.
I have updated the demo plugin and also included an image (NgonIndexProblem.png) in the zip file, which explains the problem:
In this case Modeling::GetEdgeNgons() and Modeling::GetPointNgons() returns indices which seem to be a confusing mix of ngon and polygon indices (or indices with and without offsets).
Do you have any more ideas?
Thanks in advance,