【Help】Problems on split mesh in GH Python

Hello, I am a beginner of using Rhino Python. I am trying to get a lighted area by splitting the face of the cube (mesh) with the shadow (mesh). However, “Rhino.Geometry.Mesh.Split” method dosesn’t split the face as expected. I noticed that there are new factors could be added to control the split method (from here: Mesh.Split Method (rhino3d.com)), but I don’t understand what “textLog”, "cancellation token"and “progress reporter item” mean.

Could anyone have a look at it and tell me what’s wrong with it? Or is there any other method to achieve my goal? I have also tried BooleanSplit and the result is also very weird…

The related code is on the line605

Thanks!



Demo.zip (177.6 KB)