[FIXED] Dimensions repeat their Arbitrary labels

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
aapo
Posts: 626
Joined: Mon Oct 29, 2018 6:41 pm

[FIXED] Dimensions repeat their Arbitrary labels

Post by aapo »

Hi!

I noticed that whenever I change a dimension format to "Arbitrary" in a recent TechDraw version, the text entered into the Format Spec box repeats twice. Also, setting "Arbitrary" to false causes any other characters than the numeric value (e.g., "%g") to have no effect, i.e., only the raw number is shown in the actual dimension. I also get a lot of warnings, even though the there is a format specifier in Dimension001, and the number actually shows in the dimension:

Code: Select all

Warning - no numeric format in formatSpec - Dimension001
20191017-TechDraw-dimension-arbitrary-repeats-pic01.png
20191017-TechDraw-dimension-arbitrary-repeats-pic01.png (33.01 KiB) Viewed 1420 times
20191017-TechDraw-dimension-arbitrary-repeats-pic02.png
20191017-TechDraw-dimension-arbitrary-repeats-pic02.png (41.5 KiB) Viewed 1420 times

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18542 (Git)
Build type: Release
Branch: master
Hash: 432d4f25528300d0febf53b85df578fcdde1eda7
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)
Last edited by aapo on Sun Oct 20, 2019 9:53 pm, edited 1 time in total.
Syres
Veteran
Posts: 2902
Joined: Thu Aug 09, 2018 11:14 am

Re: [Bug?] Dimensions repeat their Arbitrary labels

Post by Syres »

Confirmed using (and later builds):

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18516 (Git)
Build type: Release
Branch: master
Hash: 867a09f731926bf75695e8a6f063cbc9c1033b40
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)

Last correct working build was:

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18504 (Git)
Build type: Release
Branch: master
Hash: f66023a646db4b2502bb3637897443b3525ca3c7
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)

therefore it is possible that commit https://github.com/FreeCAD/FreeCAD/commit/90fad81 may have caused the regression.
User avatar
wandererfan
Veteran
Posts: 6326
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: [Bug?] Dimensions repeat their Arbitrary labels

Post by wandererfan »

should be fixed by git commit a1de871e93
aapo
Posts: 626
Joined: Mon Oct 29, 2018 6:41 pm

Re: [Bug?] Dimensions repeat their Arbitrary labels

Post by aapo »

wandererfan wrote: Fri Oct 18, 2019 2:00 pm should be fixed by git commit a1de871e93
Thanks! This indeed fixes the bug with Arbitrary labels, the word "Text" in the screenshot below with build 18567 is shown only once, as it should. However, the smaller bug with formatted labels still exists with the latest master, which has your patch. If I put a Format Spec value of

Code: Select all

(%.2f) x2
to the dimension, the result is shown in the screenshot below. Note that the value "10.00" shows in place of %.2f, but the braces and the text "x2" are not shown. Sometimes I use braces around helper dimensions in order to indicate that these are secondary dimensions, which can be calculated from other dimensions.

Screenshot_20191019_222534.png
Screenshot_20191019_222534.png (42.17 KiB) Viewed 1333 times


OS: Debian GNU/Linux bullseye/sid (KDE//usr/share/xsessions/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18567 (Git)
Build type: Release
Branch: master
Hash: f8f52e6fcfd40ae6187fc5d4f883ffb3f747f3ef
Python version: 2.7.17rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
aapo
Posts: 626
Joined: Mon Oct 29, 2018 6:41 pm

Re: [Bug?] Dimensions repeat their Arbitrary labels

Post by aapo »

Now it works for me, after I compiled the very latest master. Apparently you had committed a new patch today, which solves the problem for builds larger than 18590. Thanks! :)

Screenshot_20191021_004701.png
Screenshot_20191021_004701.png (35.38 KiB) Viewed 1281 times

OS: Debian GNU/Linux bullseye/sid (KDE//usr/share/xsessions/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18591 (Git)
Build type: Release
Branch: master
Hash: c6cd65916caf466ba174aa09044c96a20790a72f
Python version: 2.7.17rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
User avatar
wandererfan
Veteran
Posts: 6326
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: [Bug?] Dimensions repeat their Arbitrary labels

Post by wandererfan »

aapo wrote: Sun Oct 20, 2019 9:51 pm Now it works for me, after I compiled the very latest master. Apparently you had committed a new patch today, which solves the problem for builds larger than 18590. Thanks! :)
Just sat down to put out a notice, but you beat me to it. Thanks for testing!
Post Reply