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...
* Add Draft_LinkArray and Draft_PathLinkArray that uses link for both
data and visualization, which supports linking external objects
* Add link group support for draft snap
* Fix ArchWindows expression ambiguity
* Relaxed valid base shape requirement, as long as it can return a
shape using part.getShape()
* Improve ViewProviderPath performance by sharing the same selection
observer
* Relocate libarea binary installation
* Support link and group objects
* Support view sync by implementing view provider API getMDIView()
* Use handleChangedPropertyType() for object migration instead of
reimplementing Restore() because of a lots of changes in
PropertyContainer::Restore().
* Various other small fixes.
* Added Part::Feature::getTopoShape/getShape() function that can obtain
shape from any object with proper implementation of getSubObject(). It
can even construct compound from group object with proper implementation
of getSubObjects().
* Modified ViewProviderExt to work on any object, because it now obtain
the shape using Part::Feature::getShape()
* Modified various Part features to obtain base/tool shapes using
Part::getShape(), which allows them to be any type of object,
including Link and groups.
* Modified various Part command to relax type requirement on selected
objects.
* Add support of link and group to dimension, and add dimension refresh
command
* Support link and group in simple command command, and add a few more
copy command variations.
* Add special handling of 'Shape' attribute in PropertyContainerPy and
use Part::Feature::getShape() to return shape for any object without
Shape property. This allows many python feature work with any object
without modification.
* GeometrySurface/CurvePy, add convenience attribute 'Rotation'
* TopoShapePy:
* Extended support of sub shape attribute, e.g. Compound1, Solid2,
SubShape3 ('SubShape' is used to access child shape of a compound)
* makeWires(), new API to sort and return wires given a list of edges.
* transformed/translated/rotated/scaled(), return a new shape with
some transformation.
* findPlane(), find the plane of a planar shape
* isCoplanar(), check if two shape are coplanar
* Add always zoom invariant and always on top rendering to
ViewProviderDatumCS
* Add a new utility class AxisOrigin for more efficient axis rendering.
Also exposed to python.
* Change ViewProviderPlacement to use AxisOrigin for rendering.
A single instance of AxisOrigin is shared by all
ViewProviderPlacement. Selection context is used to distinguish among
different instances.
Implement box element selection that support linked and grouped objects.
Also modified original box selection command to support the same with
the same code.