In many ways @PirateJC pointed you to the right place. You do need to know about the vertex data structure of a mesh and how to update it in order to solve the problem they way I did.
I understand John but as I come from a software world, I was under the impression that I was looking for a simple PLANARXZ_MODE or something simple like that.
This being said I made a nice function from your script and now i can do it on the fly thanks to you.