Building US Units are not displayed correctly in dimensions
Building US Units are not displayed correctly in dimensions
I have a problem with Techdraw. It is not displaying Building US dimensions correctly. Consider the following drawing
The height of the wall is shown a 8.5 ft but it should be shown as 8' 6".
The info for the version of freecad is
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23683 (Git)
Build type: Release
Branch: master
Hash: af4de262e326452fd79f036253cf7cac6a7e7e00
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
I have attached the model.
-David
.The height of the wall is shown a 8.5 ft but it should be shown as 8' 6".
The info for the version of freecad is
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23683 (Git)
Build type: Release
Branch: master
Hash: af4de262e326452fd79f036253cf7cac6a7e7e00
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
I have attached the model.
-David
- Attachments
-
- WallWithDimensions.FCStd
- (15.61 KiB) Downloaded 43 times
Last edited by elsordo on Thu Jan 14, 2021 7:40 pm, edited 1 time in total.
Re: Building US Units are not displayed correctly in dimensions
Please don't attach your FreeCAD infos as a separate file. Copy the text directly into the post. You can edit your post and correct it.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Building US Units are not displayed correctly in dimensions
Looks like we're seeing the same issue.
Should a bug be filed for this?
Should a bug be filed for this?
Re: Building US Units are not displayed correctly in dimensions
I believe the bug is in lines 813-821 of DrawViewDimension.cpp
This attempts to fix up the dimension text for ImperialBuilding. It has at least two problems.
Code: Select all
if ((unitSystem == Base::UnitSystem::ImperialBuilding) &&
!angularMeasure) {
qMultiValueStr = formattedValue;
if (!genPrefix.empty()) {
//qUserString from Quantity includes units - prefix + R + nnn ft + suffix
qMultiValueStr = formatPrefix + qGenPrefix + qUserString + formatSuffix;
}
formattedValue = qMultiValueStr;
}
- It does nothing when there is no prefix. This is why linear dimensions end up with fractional ft.
- It unnecessarily adds prefix and suffix when there is a prefix. So, for example, for a radius I see something like:
Re: Building US Units are not displayed correctly in dimensions
I recently switched from version 0.18 to version 0.19 and I am having this same problem with the TechDraw workbench. Version 0.18 will display correctly 10' 6+1/2" whereas version 0.19 will only display 10.542 ft
Regards
Bill
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23578 (Git)
Build type: Release
Branch: master
Hash: 50c3cbf00579dc4941ca743c25720d016b0453ce
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/Canada (en_CA)
Regards
Bill
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23578 (Git)
Build type: Release
Branch: master
Hash: 50c3cbf00579dc4941ca743c25720d016b0453ce
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/Canada (en_CA)
Re: Building US Units are not displayed correctly in dimensions
When will this be fixed?
Re: Building US Units are not displayed correctly in dimensions
I'm new to the FreeCAD community. I'm not sure what the process is to have a TechDraw dev look at this and verify it's a bug.
It seems like a possible workaround is to use 0.18 for TechDraw. However, 0.18 hangs when I try to load the file that I made 0.19.
It seems like a possible workaround is to use 0.18 for TechDraw. However, 0.18 hangs when I try to load the file that I made 0.19.
Re: Building US Units are not displayed correctly in dimensions
I'm afraid that version 0.18 is quite outdated today. However, I think the changes in v 0.19 might be related to the recent improvements made into the unit printing code. These changes have been discussed in the threads linked below, and developer uwestoehr has programmed the improvements, so most likely he knows best what if anything related to US unit printing has been changed recently.
https://forum.freecadweb.org/viewtopic.php?f=35&t=52545
https://forum.freecadweb.org/viewtopic.php?f=35&t=53473
uwestoehr wrote: pinged by pinger macro
Re: Building US Units are not displayed correctly in dimensions
Thanks for the report. We recently applied some improvements for the dimension handling concerning tolerances. That way I realized that US Building seems not to work correctly. But there was nobody who could give input. With the help of you, we can now also fix US Building.
@aapo, could you have a look? I am at the moment busy with some PartDesign things, thus I might needs some days before I can have a look.
Re: Building US Units are not displayed correctly in dimensions
Okay, I guess I can spend a few hours on this, although I'm not familiar with the US unit schemes either. It seems quite straightforward though, as I believe that it has been very well documented in this thread how the desired output should look like. Thanks @elsordo and @pfong!
