[SOLVED]: Sketcher cannot select points

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
User avatar
easyw-fc
Posts: 2448
Joined: Thu Jul 09, 2015 9:34 am

[SOLVED]: Sketcher cannot select points

Postby easyw-fc » Fri Jun 01, 2018 10:36 am

Hi,
in the attached file I cannot select points to add a constraint.
It is also not possible to add a constraint even when selecting the points with a different method from simple click,
sketcher.gif
sketcher.gif (776.1 KiB) Viewed 1091 times
sk1.FCStd
(3.49 KiB) Downloaded 14 times
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13870 (Git)
Build type: Release
Branch: master
Hash: f0964a9c052ee666631cd9caec1655790964ecb6
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)

This was possible until
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13830 (Git)
Build type: Release
Branch: master
Hash: 262d7c0cd05c6072d5807ebb98a0a3113cfebba0
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)
Last edited by easyw-fc on Sat Jun 02, 2018 10:28 pm, edited 1 time in total.
chrisb
Posts: 15618
Joined: Tue Mar 17, 2015 9:14 am

Re: Bug: Sketcher cannot select points

Postby chrisb » Fri Jun 01, 2018 4:16 pm

No problem here. Did you try to close and reopen the file? Or restart FreeCAD?

OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13826 (Git)
Build type: Release
Branch: (HEAD detached at 3b02ff2)
Hash: 3b02ff2a9481f0883063c7e24c312978ef0ce642
Python version: 2.7.15
Qt version: 5.11.0
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
User avatar
easyw-fc
Posts: 2448
Joined: Thu Jul 09, 2015 9:34 am

Re: Bug: Sketcher cannot select points

Postby easyw-fc » Fri Jun 01, 2018 4:55 pm

chrisb wrote:
Fri Jun 01, 2018 4:16 pm
No problem here. Did you try to close and reopen the file? Or restart FreeCAD?

OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13826 (Git)
but have you read my post?
I have this issue with Version: 0.18.13870 (Git)
and not until
Version: 0.18.13830 (Git) included

you are on Version: 0.18.13826 (Git) which is before the still good one
GeneFC
Posts: 1007
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Bug: Sketcher cannot select points

Postby GeneFC » Fri Jun 01, 2018 6:58 pm

I can verify on Windows 7.

Works correctly in 0.18.13824.

Fails in 0.18.13870.

Gene
chrisb
Posts: 15618
Joined: Tue Mar 17, 2015 9:14 am

Re: Bug: Sketcher cannot select points

Postby chrisb » Fri Jun 01, 2018 7:56 pm

easyw-fc wrote:
Fri Jun 01, 2018 4:55 pm
but have you read my post?
I have this issue with Version: 0.18.13870 (Git)
and not until
Version: 0.18.13830 (Git) included
Sorry, I missed the line above the second FreeCAD info and had thought it doesn't work on these two versions :oops: .
wmayer
Site Admin
Posts: 14229
Joined: Thu Feb 19, 2009 10:32 am

Re: Bug: Sketcher cannot select points

Postby wmayer » Sat Jun 02, 2018 9:12 am

I guess it's a regression caused by this PR https://github.com/FreeCAD/FreeCAD/pull/1483/files
User avatar
DeepSOIC
Posts: 6536
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Bug: Sketcher cannot select points

Postby DeepSOIC » Sat Jun 02, 2018 11:43 am

No problem here:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13870 (Git)
Build type: Release
Branch: master
Hash: f0964a9c052ee666631cd9caec1655790964ecb6
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: Russian/RussianFederation (ru_RU)

WTF?
User avatar
DeepSOIC
Posts: 6536
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Bug: Sketcher cannot select points

Postby DeepSOIC » Sat Jun 02, 2018 11:46 am

OK, I see WTF. If I turn the grid on, I have the same problem.

The points ARE being selected (I can see it in selection view), but the selection does not render. It is affected by grid being rendered somehow.

For example, I have no grid, and select a point. So far so good. Now I switch the grid on, and the point becomes red. And I toggle the grid back off and the point is green again.
wmayer
Site Admin
Posts: 14229
Joined: Thu Feb 19, 2009 10:32 am

Re: Bug: Sketcher cannot select points

Postby wmayer » Sat Jun 02, 2018 2:26 pm

And it looks like that only points that have a coincidence applied are affected because selection works correctly for the start or end points of a polyline. And when selecting the inner points via box selection then the rendering is OK because then both points are selected.

So, it must have something to do with the z values used for the rendering.
abdullah
Posts: 3092
Joined: Sun May 04, 2014 3:16 pm

Re: Bug: Sketcher cannot select points

Postby abdullah » Sat Jun 02, 2018 2:50 pm

DeepSOIC wrote:
Sat Jun 02, 2018 11:46 am
The points ARE being selected (I can see it in selection view), but the selection does not render. It is affected by grid being rendered somehow.
Somehow, grid rendering affects points at a height lower than zHighlight. The algorithm was setting the zheight of the points regardless of whether the where selected/preselected.

This should fix it:
https://github.com/FreeCAD/FreeCAD/pull/1490