hey guys,
In Constrain Contextually, when you're creating a constrain, the constrain follows your mouse pointer until you 'drop' it and it gets validated.
To do so the moveConstraint function is used.
Code: Select all
sketchgui->moveConstraint(ConStr.size() - 1, onSketchPos);
It works well, but my issue is that it moves right on top of the mouse pointer. Which is not ideal for visibility.
- move constr.png (4.88 KiB) Viewed 1591 times
So I'd like to be able to shift it slightly on one side or the other to get the text out of the way.
My problem is that moveConstraint use Base::Vector2d which are coordinate in X,Y mm. So if I do something like :
Code: Select all
sketchgui->moveConstraint(ConStr.size() - 1, onSketchPos + Base::Vector2d(5,5) );
Then the constraint moves 5mm to the right and 5mm to the top. But that means that it is not consistent. If I zoom or dezoom then the shift becomes too much or too less. What I need is to find a way to shift it by a number pixels.
Anyone knows how?