Cleaned up imports a suggested by @vocx.
Also cleaned up various things inside the tool.
[Draft] Edit small change in imports
[Draft] Edit updated documentation
Initial support for context menu.
Menu is triggered by Alt+Click or by pressin E Key.
Menu is customized on the clicked object.
Supported functions ATM: addPoint, deletePoint.
Documented better the whole tool.
Changed the name of self.call to self. selection_callback for easier code reading.
[Draft] Edit small bugfix
Deleted a bunch of code I PR by error
Changed names of several methods from set to get, changed the general set of nodes, improved placement calculation to use getGlobalPlacement instead of Placement.
Modified to accept multiple object (max 5). The tool set EditTrackers for every selected object. Then edited object is identified using clicked EditTracker.
self.trakers is changed from list to dictionary. It now stores EditTrackers with {'object':[pointlist]}. Initial implementation is to allow editing wall height and wall base object.
https://forum.freecadweb.org/viewtopic.php?f=3&t=29743&start=70
To solve issue with Hidpi display (fixes#3537), but also to improve node selection, I used some of @looo code from pivy graphics into the tool.
So:
- i got rid of the action function
- i separated selection and editing callbacks
- i got the mouse position from the callback event and not from FreeCADGui.ActiveDocument.ActiveView.getCursorPos()
- i rewrote the node selection mechanism using soraypickaction instead of getObjectInfo() and getObjectsInfo()
- i tried to put a bit of order in all the mess i made and try to document it.
- also fixed some of the preview code.
- i'm really really sorry for not being able to split the commit in multiple one, but the changes are huge and i was just able to separate minor things...
Fixed a bug so arc editing take correctly the placement into account.
Added preliminary support for preview during arc editing. To be improved in the future.