View Issue Details

IDProjectCategoryView StatusLast Update
0003537DraftBugpublic2019-10-17 16:00
Reportermumf83 Assigned Toyorik  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformMacBook ProOSMac OS XOS Version10.13.5
Product Version0.17 
Summary0003537: [macOS] Draft Edit mode not working (HiDPi issue)
DescriptionForum thread with all the details, videos and images - https://forum.freecadweb.org/viewtopic.php?f=3&t=29743

After I've drawn from any of the tools available from the Draft workbench and I click the "Edit" button. I see the anchors but I can't click on any on them to move or add/remove points to the objects.

The error not only happens in v0.17 but in v0.18 as well. However, in v0.16 everything works as expected.
Steps To ReproduceIt appears that `wandererfan` and `chrisb` is able to use the edit tool without any problems who are Mac users. So I'm not sure how it can be reproduced but I know I've tried 2 different Mac computers and I get the same issue. 1 x MacBook Pro, 1 x iMac.
Additional InformationOS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13519 (Git)
Build type: Release
Branch: (HEAD detached at 1a8b868)
Hash: 1a8b868018f45ea486c0023fdbfeb06febc1fb89
Python version: 2.7.14
Qt version: 5.10.1
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedKingdom (en_GB)
TagsDraft, HiDPI, macOS
FreeCAD Information

Activities

mumf83

2018-07-14 08:06

reporter  

v0.16.png (896,885 bytes)   
v0.16.png (896,885 bytes)   
v0.17.png (985,768 bytes)   
v0.17.png (985,768 bytes)   

mumf83

2018-07-19 12:08

reporter   ~0011537

I was just messing around and I noticed this has started to work! However, I'm currently using an external monitor on my MacBook. When I move the application back to my MacBook screen it stops working. Do you think its got something to do with a Retina screen? My iMAC also has a Retina screen.

Kunda1

2019-02-27 20:44

administrator   ~0012785

@mumf83 Can you reproduce this on 0.18_pre?
https://github.com/FreeCAD/FreeCAD/releases/tag/0.18_pre
HiDPI/Retina is an issue for FreeCAD currently due to it's reliance on the upstream coin3d library.

Kunda1

2019-03-03 14:03

administrator   ~0012825

@mumf83 please respond

mumf83

2019-03-03 22:13

reporter   ~0012841

@Kunda1 - Yes I can reproduce this in 0.18_pre. I find a few things hard on a retina screen. for example, the coordinate system located bottom right is very small and hard to read.

Kunda1

2019-03-03 22:26

administrator   ~0012842

@mumf83 are you using the python3/qt5 build ?

mumf83

2019-03-04 10:13

reporter   ~0012846

@Kunda1 - No its not the python/qt5 build.

mumf83

2019-03-04 10:29

reporter   ~0012847

@Kunta1 - just tried it with this build - FreeCAD_0.18-15525.1a7d3d9-OSX-x86_64-Qt5-Py3.dmg - and its still not working and the coordinates system is very small still.

Kunda1

2019-03-06 00:16

administrator   ~0012851

@mumf83 please post the full version info of the 0.18-15525 build.
Unfortunately, that version is about +500 commits behind master (due to issues with getting OSX to to build on Conda)

mumf83

2019-03-06 09:44

reporter   ~0012853

@Kunda1 - think you mean the below?

OS: macOS 10.14
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15525 (Git)
Build type: Release
Branch: master
Hash: 1a7d3d9a37fe43468c8ac84590c1db53e2b2000a
Python version: 3.6.7
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)

jmborer

2019-03-09 23:44

reporter   ~0012872

Last edited: 2019-03-09 23:50

Ok guys, found the issue. It is related to the resolution.

I had the same issue when using an external monitor wich natively is 3860x2160 and I scaled it to 1980x1200 (otherwise it is too small).

When I run the native resolution, I can edit the drafted objects. When I use the scaled resolution, it doesn't work. So the issue lies somewhere in the handling of the resolution "densitity".

To make things clear: when I say that I scale the resolution to 1980x1080 on a 3860x2160 monitor, it means MacOSX is still using 3860x2160 pixels, but everything is rendered in a higher resolution (not a simple upscale). Everthing is bigger but still crystal sharp.

Hope it helps for debugging.

I also have a Macbook Pro which is able of even more resolution. I gonna test and see if the bug occurs there too.

For those suffering from this bug, try to use the native full resolution of your display.

To conclude, I tried today the latest Qt5/Py3 build. Issue it still there.

craig9

2019-03-11 10:28

reporter   ~0012881

Maybe the "hit" area for clicking on a vertex/node needs to be proportionately larger for very high dpi screens?

jmborer

2019-03-11 11:44

reporter   ~0012883

Probably. QT5 is supposed to support latest MacOSX. It has support for HiDPI and also graphical acceleration, but here correct me if I am wrong, the sketching is done in the 3D view which means that the 3D engine must be HiDPI aware as well.

carlopav

2019-05-05 17:05

developer   ~0013081

Hello @mumf83, can you try with 0.19dev? Yorik and I made some changes to the way node selection works...

Also @Yorik maybe it could it be possible to use QT devicePixelRatio to scale the edit node when it is created?

mw=FreeCADGui.getMainWindow()
mw.devicePixelRatio()

Or does coin have a similar method?

mumf83

2019-05-07 13:42

reporter   ~0013082

hi @carlopav, the issue is still there and I can't click on anything.

Hopefully I'm using the right version as you mentioned 0.19dev but I can only see 0.19_pre in the releases tab on GitHub. If its not then please send me a link of the required version I should be downloading.

OS: macOS 10.14
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16639 (Git)
Build type: Release
Branch: master
Hash: 2cc733035519b3ba690fc2416cbe65ffa0457b5e
Python version: 3.7.3
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)

yorik

2019-05-09 01:55

administrator   ~0013087

The problem is that the pixel size of these edit markers is hard-coded in coin: https://grey.colorado.edu/coin3d/classSoMarkerSet.html There are only 3 sizes: 5, 7 and 9 pixels. We are using 9 already.

However, on that same page, it indicates that it's apparently possible to replace some of the markers with a custom bitmap in XMP form. So it looks possible to define our own. But it doesn't look very easy to implement...

jmborer

2019-05-23 10:27

reporter   ~0013117

Last edited: 2019-05-23 10:29

Hi everyone. I just gave 0.19pre a go and on my MacBook Pro with retina display it FreeCAD is almost unusable: I cannot select the edition handles and the as you can see on the attached image the dimensions are also wrongly placed. The HiDPi leads to show blocker issues in the 3D view.

I tried scaled and non scaled resolution. Both had the same issue on the MacBookPro.

OS: macOS 10.13
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16793 (Git)
Build type: Release
Branch: master
Hash: 51c317dc96e41a9a39b9bbec9ab73c2604597e28
Python version: 3.7.3
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

Kunda1

2019-05-28 11:47

administrator   ~0013124

@chrisb care to weigh in ?

jmborer

2019-07-16 08:56

reporter   ~0013350

Hi guys,

Any progress on this issue?

yorik

2019-08-20 13:31

administrator   ~0013434

Fix committed to master branch.

Related Changesets

FreeCAD: master 13e60591

2019-08-15 20:07:27

carlopav


Committer: yorik Details Diff
[Draft] Draft Edit - various fixes (fixes 0003537)

https://forum.freecadweb.org/viewtopic.php?f=3&t=29743&start=70
To solve issue with Hidpi display (fixes 0003537), 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...
Affected Issues
0003537
mod - src/Mod/Draft/DraftEdit.py Diff File

Issue History

Date Modified Username Field Change
2018-07-14 08:06 mumf83 New Issue
2018-07-14 08:06 mumf83 Tag Attached: Draft
2018-07-14 08:06 mumf83 File Added: v0.16.png
2018-07-14 08:06 mumf83 File Added: v0.17.png
2018-07-14 11:52 Kunda1 Tag Attached: MacOSX
2018-07-19 12:08 mumf83 Note Added: 0011537
2018-12-18 11:34 Kunda1 Tag Attached: #pending
2019-02-27 20:44 Kunda1 Note Added: 0012785
2019-02-27 20:44 Kunda1 Status new => feedback
2019-02-27 20:44 Kunda1 Severity block => major
2019-03-03 14:03 Kunda1 Note Added: 0012825
2019-03-03 22:13 mumf83 Note Added: 0012841
2019-03-03 22:13 mumf83 Status feedback => new
2019-03-03 22:26 Kunda1 Note Added: 0012842
2019-03-04 10:13 mumf83 Note Added: 0012846
2019-03-04 10:29 mumf83 Note Added: 0012847
2019-03-06 00:16 Kunda1 Note Added: 0012851
2019-03-06 09:44 mumf83 Note Added: 0012853
2019-03-09 23:44 jmborer Note Added: 0012872
2019-03-09 23:48 jmborer Note Edited: 0012872
2019-03-09 23:48 jmborer Note Edited: 0012872
2019-03-09 23:49 jmborer Note Edited: 0012872
2019-03-09 23:50 jmborer Note Edited: 0012872
2019-03-11 10:28 craig9 Note Added: 0012881
2019-03-11 11:44 jmborer Note Added: 0012883
2019-05-05 17:05 carlopav Note Added: 0013081
2019-05-07 13:42 mumf83 File Added: Screenshot 2019-05-07 at 14.37.15.png
2019-05-07 13:42 mumf83 Note Added: 0013082
2019-05-09 01:55 yorik Note Added: 0013087
2019-05-23 10:27 jmborer File Added: Screen Shot 2019-05-23 at 12.16.15.png
2019-05-23 10:27 jmborer Note Added: 0013117
2019-05-23 10:29 jmborer Note Edited: 0013117
2019-05-28 11:47 Kunda1 Note Added: 0013124
2019-05-28 11:47 Kunda1 Tag Attached: HiDPI
2019-06-17 06:43 Kunda1 Status new => confirmed
2019-06-17 06:43 Kunda1 Target Version => 0.19
2019-06-17 07:25 Kunda1 Summary Edit mode not working => Draft Edit mode not working (HiDPi issue)
2019-06-17 07:26 Kunda1 Summary Draft Edit mode not working (HiDPi issue) => [macOS] Draft Edit mode not working (HiDPi issue)
2019-07-16 08:56 jmborer Note Added: 0013350
2019-08-20 13:31 yorik Changeset attached => FreeCAD master 13e60591
2019-08-20 13:31 yorik Note Added: 0013434
2019-08-20 13:31 yorik Assigned To => yorik
2019-08-20 13:31 yorik Status confirmed => closed
2019-08-20 13:31 yorik Resolution open => fixed
2019-10-17 15:22 Kunda1 Tag Detached: #pending
2019-10-17 16:00 Kunda1 Fixed in Version => 0.19
2020-11-13 14:08 Kunda1 Tag Renamed MacOSX => macOS