[Merged] Refactoring ViewProviderSketch

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
openBrain
Veteran
Posts: 9031
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Refactoring ViewProviderSketch

Post by openBrain »

abdullah wrote: Wed Nov 17, 2021 1:36 pm I cannot reproduce in the previous version I had (PPA from 1108). I have just upgraded to the latest PPA:
Here what I have
diamIssue.png
diamIssue.png (18.57 KiB) Viewed 2279 times
As this seems to be environment specific, I'll stop cluttering this topic and eventually open another dedicated one when I find time to investigate. ;)
chrisb
Veteran
Posts: 53785
Joined: Tue Mar 17, 2015 9:14 am

Re: Refactoring ViewProviderSketch

Post by chrisb »

This could indeed be a graphics card issue. Does the issue persist if you use FitAll?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
adrianinsaval
Veteran
Posts: 5534
Joined: Thu Apr 05, 2018 5:15 pm

Re: Refactoring ViewProviderSketch

Post by adrianinsaval »

no issue in any of these:

Code: Select all

OS: Manjaro Linux (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.20.26414 (Git)
Build type: Release
Branch: master
Hash: f0646d8b51fe7e8ae667c08c7a40017a4d83359b
Python version: 3.9.7
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United Kingdom (en_GB)

OS: Manjaro Linux (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.20.26306 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 6701788)
Hash: 670178869ecdca52f7dcd332c513cb0c82b25cce
Python version: 3.9.7
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: English/United Kingdom (en_GB)

OS: KDE Flatpak runtime (KDE/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.14555 (Git shallow)
Build type: Release
Branch: (HEAD detached at 0.19.2)
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.8
Qt version: 5.15.3
Coin version: 4.0.0
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)
Does changing the sketcher text size has any effect?
openBrain
Veteran
Posts: 9031
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Refactoring ViewProviderSketch

Post by openBrain »

abdullah wrote: Wed Nov 17, 2021 1:36 pm I cannot reproduce in the previous version I had (PPA from 1108). I have just upgraded to the latest PPA:
chrisb wrote: Wed Nov 17, 2021 10:38 pm This could indeed be a graphics card issue. Does the issue persist if you use FitAll?
adrianinsaval wrote: Thu Nov 18, 2021 1:28 am Does changing the sketcher text size has any effect?
OK, I get it right at the first try. :) I removed from code the prepending "diameter sign" (which is an UTF-8 only character) and everything is fine.
What you guys would think of an option to use "D" instead of "diameter sign" -- disabled by default -- ?
chrisb
Veteran
Posts: 53785
Joined: Tue Mar 17, 2015 9:14 am

Re: Refactoring ViewProviderSketch

Post by chrisb »

Not at my computer at the moment, but isn‘t there a diameter symbol in the ascii table as well?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 53785
Joined: Tue Mar 17, 2015 9:14 am

Re: Refactoring ViewProviderSketch

Post by chrisb »

How about ASCII 248 ?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
openBrain
Veteran
Posts: 9031
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Refactoring ViewProviderSketch

Post by openBrain »

chrisb wrote: Thu Nov 18, 2021 9:40 am Not at my computer at the moment, but isn‘t there a diameter symbol in the ascii table as well?
Nope :)
chrisb wrote: Thu Nov 18, 2021 9:41 am How about ASCII 248 ?
Using degree symbol seems a bit weird to me as it links to angles...
User avatar
adrianinsaval
Veteran
Posts: 5534
Joined: Thu Apr 05, 2018 5:15 pm

Re: Refactoring ViewProviderSketch

Post by adrianinsaval »

can we bundle the character with FreeCAD so it falls back to that if it's not in the system font? Still, why does the absence of a character cuts out the others? :? software is a strange realm
openBrain
Veteran
Posts: 9031
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Refactoring ViewProviderSketch

Post by openBrain »

adrianinsaval wrote: Thu Nov 18, 2021 11:28 am Still, why does the absence of a character cuts out the others? :?
My guess is that Qt switches to another font which breaks the alignment.
openBrain
Veteran
Posts: 9031
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Refactoring ViewProviderSketch

Post by openBrain »

chrisb wrote: Thu Nov 18, 2021 9:41 am How about ASCII 248 ?
Think I got it. Actually you were talking about Unicode 248, not ASCII 248. :P
I tested and works. I even chosen Unicode 216 (capital letter) which I find looks better as it has same size as digits.
diamSolved.png
diamSolved.png (14.11 KiB) Viewed 2021 times
I'll prepare the PR. Feel free to tell me here what you think about this (everybody, not just @chrisb ;) ).

@abdullah : sorry for cluttering, feel free to split.
Post Reply