We have discovered a strange behavior in Modeling::SplitPolygon() in conjunction with Ngons, where it fails, depending on the indices.
It should, according to the documentation take an ngon index while what works is polygon indices. All you need to make this function fail is to give it the index of an ngon that doesn't contain any polygons that have the same index. We have created a very simple example plugin demonstrating this.
https://files.frankwilleke.de/index.php/s/BN0qwh8n6WrLJVa
Compile the project (only Windows project file included), run Cinema, and open the included C4D file. Open the console window, and switch to "Gouraud Shading (Lines)". Select the "Ngon Debug Tool" from the plugins menu, and click on the geometry in the viewport. See the split fail.
The question is easy: How do we make this work?
Thanks in advance & greetings from Berlin,
Frank