You are quite right.
With the plugin GHGL you can play a bit with that.
Related thread:
I tried to combine 2 meshes to create the visual effect of a solid boolean operation, but never managed to make buffers work at all
Anyway, you actually tell each and every pixel if to display on screen or not. When not, the “raycast” from the camera continue and search for the next geometry to display.
(my description probably sucks…)
Accessing this OpenGL coding through a c# or python script is not possible, as far as I understood past then.
Steve might answer you in detail…
Probably it does the same as above but in the the opposite way, using the mesh to discard the plane pixels when the raycast intercepted the mesh an even amount of times before reaching the plane…
Google “openGL depth peeling”.