[3dsMax Script] Scripted Helper Plug-ins, define a rotation to the grid helper at creation


hey guys, i am currently working on a scripted plugin based on a helper grid.
But I encounter a problem, on the creation of this helper.
I would like the first click to be a corner of the grid, then the second to be its adjacent corner to define the length and rotation of the node and finally the last to determine the width of the grid.

It will surely be clearer with a drawing

Do you think that possible?