[PR #3965] Sketcher: Merged constraint selection fix.

Merged, abandoned or rejected pull requests are moved here to clear the main Pull Requests forum.
Bei3lay
Posts: 22
Joined: Wed Aug 28, 2019 6:48 am

[PR #3965] Sketcher: Merged constraint selection fix.

Postby Bei3lay » Fri Oct 16, 2020 6:08 am

This problem is in some way similar to the one I already solved before https://forum.freecadweb.org/viewtopic.php?f=17&t=50862. Under certain conditions constraints can't be selected from the merged constraint icons. It happens independent of zoom when sketch is not in XY plane. The reason is that icon position is given in sketcher coordinates but method getCoordsOnSketchPlane is used to project point given in global coordinates to the sketch plane. So it makes no sense to use sketcher coordinates with it. To fix it I manually map sketcher coordinates to global by applying the same rotation and translation as the sketch. Global coordinates are required in order to project point to the screen.
git commit 4516547c8743e44b08441a924f9220efb8b4cd14
PR: https://github.com/FreeCAD/FreeCAD/pull/3965
Last edited by Bei3lay on Fri Oct 16, 2020 3:52 pm, edited 1 time in total.
User avatar
Kunda1
Posts: 8417
Joined: Thu Jan 05, 2017 9:03 pm

Re: [PR #3965] Sketcher: Merged constraint selection fix.

Postby Kunda1 » Fri Oct 16, 2020 1:39 pm

Please add PR link in the OP as well, thanks ;)
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
chrisb
Posts: 27983
Joined: Tue Mar 17, 2015 9:14 am

Re: [PR #3965] Sketcher: Merged constraint selection fix.

Postby chrisb » Fri Oct 16, 2020 6:11 pm

I'm eager to see this in master and see how it works on the Mac.
abdullah
Posts: 3533
Joined: Sun May 04, 2014 3:16 pm

Re: [PR #3965] Sketcher: Merged constraint selection fix.

Postby abdullah » Thu Oct 22, 2020 12:06 pm

chrisb wrote:
Fri Oct 16, 2020 6:11 pm
I'm eager to see this in master and see how it works on the Mac.
It works good on Linux. In the example I tried in XZ plane the selection was unusable without this fix.