Hi @gianfranco74, Take your time, as I said, there is already a script for this function offered by Pascal here
I am a trainer and a reseller so I am not after the command for my personal use, but for Rhino in general.
I will also be glad to give you feedback for your plug-in, contact me then.