Imperial Dimensions Displayed with mm Values no conversion happening

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Linden
Posts: 109
Joined: Wed Aug 19, 2015 10:35 pm
Location: Canada/Philippines

Imperial Dimensions Displayed with mm Values no conversion happening

Post by Linden »

Has any one else noticed this. In the last 10 days or so something has changed in how freecad calculates dimensions shown on the page. If I have my freecad global units settings set to US Customary, Imperial Decimal or any other non metric setting I get the mm value proceeded by the imperial unit on the page. In sketcher units are displayed as expected and if I use a dimension from the draft work bench it also displayed as expected. See pdfs attached.
Any help or suggestions would be much appreciated.

Thanks Linden

50mm is not the same as 50in. ;-)

OS: Linux Mint 20 (MATE/mate)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: ea0ce293f770c5b68a1d17566c18d2fe3277e740
Python version: 3.8.5
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.3.0
Locale: English/Canada (en_CA)
Attachments
Dim inches.pdf
(27.96 KiB) Downloaded 61 times
Dim mm.pdf
(27.88 KiB) Downloaded 58 times
Linden
aapo
Posts: 608
Joined: Mon Oct 29, 2018 6:41 pm

Re: Imperial Dimentions Displayed with mm Values no conversion happening

Post by aapo »

Linden wrote: Sun Dec 20, 2020 7:02 pm Has any one else noticed this. In the last 10 days or so something has changed in how freecad calculates dimensions shown on the page. If I have my freecad global units settings set to US Customary, Imperial Decimal or any other non metric setting I get the mm value proceeded by the imperial unit on the page.
There has indeed been recently some changes to FreeCAD TechDraw unit processing, see here: https://forum.freecadweb.org/viewtopic.php?f=35&t=52545. I'm not sure if the problem you see is related to the improvements discussed there, but it might be possible that uwestoehr knows something about this, as he authored the new code. At the very least, he is quite familiar how the code printing the units works.

uwestoehr wrote: pinged by pinger macro
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Imperial Dimentions Displayed with mm Values no conversion happening

Post by uwestoehr »

Linden wrote: Sun Dec 20, 2020 7:02 pm 50mm is not the same as 50in. ;-)
Thanks for the report. I see that the fix from this week destroyed the unit conversion.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Imperial Dimentions Displayed with mm Values no conversion happening

Post by uwestoehr »

uwestoehr wrote: Sun Dec 20, 2020 11:10 pm Thanks for the report. I see that the fix from this week destroyed the unit conversion.
Here is the PR that fixes the issue: https://github.com/FreeCAD/FreeCAD/pull/4175

The problem was introduced by me with git commit cbcf45a4b977
Linden
Posts: 109
Joined: Wed Aug 19, 2015 10:35 pm
Location: Canada/Philippines

Re: Imperial Dimentions Displayed with mm Values no conversion happening

Post by Linden »

Thanks for looking after this uwestoehr !!
Unfortunately we live in a world where we have to work with both metric units and imperial units.
Drives me nuts some time.

Linden
Linden
aapo
Posts: 608
Joined: Mon Oct 29, 2018 6:41 pm

Re: Imperial Dimentions Displayed with mm Values no conversion happening

Post by aapo »

Linden wrote: Mon Dec 21, 2020 2:02 am Unfortunately we live in a world where we have to work with both metric units and imperial units.
Indeed. If possible, could you please upload your original test file (.FCStd) as an attachment into this thread, so that me and uwe could test his new PR fixing the issue with that file, too. :)
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Imperial Dimentions Displayed with mm Values no conversion happening

Post by uwestoehr »

aapo wrote: Mon Dec 21, 2020 7:08 am If possible, could you please upload your original test file (.FCStd) as an attachment into this thread, so that me and uwe could test his new PR fixing the issue with that file, too. :)
Not necessary because I can reproduce the issue with every document.
alberich
Posts: 77
Joined: Thu Aug 17, 2017 2:09 pm
Location: Texas

Re: Imperial Dimentions Displayed with mm Values no conversion happening

Post by alberich »

Confirming behavior reported by OP.

Code: Select all

OS: Linux Mint 19.3 (MATE/mate)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23463 (Git) AppImage
Build type: Release
Branch: master
Hash: adc6db8f32c17e9f67cb82aa7962d1e42ce061c6
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Imperial Dimentions Displayed with mm Values no conversion happening

Post by uwestoehr »

alberich wrote: Tue Dec 22, 2020 1:46 pm Confirming behavior reported by OP.
We know, the fix is already ready waiting to be committed by the maintainers.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Imperial Dimentions Displayed with mm Values no conversion happening

Post by uwestoehr »

uwestoehr wrote: Tue Dec 22, 2020 3:58 pm We know, the fix is already ready waiting to be committed by the maintainers.
It has been committed, please report back if you still have issues.
Post Reply