[Merged] PR #3923 Sketcher: Fix merged constraint preselection bug
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
[Merged] PR #3923 Sketcher: Fix merged constraint preselection bug
Hello. There is bug in sketcher that does not allow you to preselect constraints if you increase zoom. See https://imgur.com/a/1WXSmNQ. It only happens if constraint icons are close enough to each other so that they get merged into a single icon. I've looked through the tracker and didn't find anything similar to this. Solution is pretty simple but it took a few weeks to find it.
Last edited by Bei3lay on Mon Oct 12, 2020 4:07 pm, edited 1 time in total.
Re: [PR #3923] Sketcher: Fix merged constraint preselection bug
Please add the about info of the FC version you can recreate this bug on
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: [PR #3923] Sketcher: Fix merged constraint preselection bug
I think you can recreate it on any version. I've checked 0.18 and the latest build of 0.19
OS: Linux Mint 19.3 (X-Cinnamon/cinnamon)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22614 (Git)
Build type: Debug
Branch: master
Hash: 9c20ce05edd82d6a76f48c1948beab7098927ed5
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
OS: Linux Mint 19.3 (X-Cinnamon/cinnamon)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22614 (Git)
Build type: Debug
Branch: master
Hash: 9c20ce05edd82d6a76f48c1948beab7098927ed5
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Re: [PR #3923] Sketcher: Fix merged constraint preselection bug
I can only confirm half of this issue: if an element has multiple constraints, it is not possible to select one of them. There should be a trycker entry for this.
This behaviour doesn't change here even I zoom in or out.
OS: macOS 10.15
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22611 (Git)
Build type: Release
Branch: master
Hash: 7eeec7a5990cc786723225ca8de16ca3186545b3
Python version: 3.8.5
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)
This behaviour doesn't change here even I zoom in or out.
OS: macOS 10.15
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22611 (Git)
Build type: Release
Branch: master
Hash: 7eeec7a5990cc786723225ca8de16ca3186545b3
Python version: 3.8.5
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: [PR #3923] Sketcher: Fix merged constraint preselection bug
In the file https://github.com/FreeCAD/FreeCAD/blob ... Sketch.cpp function ViewProviderSketch::detectPreselectionConstr there is a commented line that would print a lot of relevant variables. You can see that if you increase zoom, the icon position coordinates become huge. For example, my output for low zoom
high zoom
Here
The output will only be printed when cursor is moving over one of the merged icons.
Code: Select all
Abs(-9.989820,-0.095376),Trans(1.250000,0.000000),Coords(245,144),iCoords(249.608734,159.353897),icon(6,34),isize(23,35),boundingbox([0,19],[15,34])
Code: Select all
Abs(-9.989820,-0.095376),Trans(1.250000,0.000000),Coords(340,165),iCoords(244433.703125,174.197723),icon(-244082,28),isize(23,35),boundingbox([0,19],[15,34])
- Abs - Absolute position of the icon on sketch plane
- Trans - relative position of the icon on sketch plane
- Coords - cursor coordinates on the screen
- iCoords - icon coordinates on the screen
- icon - position of the cursor relative to the position of the icon
The output will only be printed when cursor is moving over one of the merged icons.