Would like to find some tutorial and documents for blender 290 about python vectors, raycast and modal.
i am doing my best trying to create this tool, right now i can only create new object, add them some vertex and edges but i am really far from using a modal and snap the coordinates on the surface..
i would like to change quite often the "Target plane shape", So i plan to have the event of the keyboard change from mode A to mode B But i also worried about the existing shortcut , they fight with the modal?
Surface_target A ( we can change this with every drawing A)
Sequence_Edges B ( the edge you drawn remain there)
Thank you for your time
EDIT: To "Draw" using the mouse, require the use of a modal to get the events of the mouse, and read the position and the clicks. Making a modal and a tool is harder than i thought.
I posted a working basis to use a UITool and a modal to get and update the mouse events . https://blenderartists.org/t/event-leftmouse-pressed-disturbed-by-tool-selection/1270882 Once understand the behaviour you can add some of the function of the template like, Ray cast modal, to get the 3D location of the mouse .
Text Editor > Templates > Python > Operator View3D Modal Raycast
is a good starting point. $\endgroup$