Over/Under Tolerances

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
reox
Posts: 929
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: Over/Under Tolerances

Post by reox »

It looks like, that no formatter works for me. WIth tolerances and without

Code: Select all

OS: Debian GNU/Linux buster/sid
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15976 (Git)
Build type: Release
Hash: 21353779d9f53cdf143e66dba0bcb593f5d9de00
Python version: 2.7.15+
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Austria (de_AT)
Attachments
g_formatter.FCStd
(9.85 KiB) Downloaded 36 times
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Over/Under Tolerances

Post by NormandC »

reox wrote: Fri Feb 15, 2019 4:00 pm OS: Debian GNU/Linux buster/sid
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15976 (Git)
Build type: Release
Hash: 21353779d9f53cdf143e66dba0bcb593f5d9de00
Python version: 2.7.15+
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Austria (de_AT)
What is that version? The current revision number is 15884 as can be seen on the Github repo (it's the total amount of commits) https://github.com/FreeCAD/FreeCAD

Your FreeCAD info should include a branch info right underneath the Build type, it does not.

Before saying that it doesn't work for you, maybe you should check by compiling the actual master branch, rather than some unknown and undocumented branch that may not track all commits in master.

FYI here's my own FC info from last night.
NormandC wrote: Fri Feb 15, 2019 3:31 am OS: Ubuntu 18.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15883 (Git)
Build type: Unknown
Branch: master
Hash: 60f91fbef22e465386b9dc741c71d5c3103609f0
Python version: 3.6.7
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/Canada (fr_CA)
And I just noticed that I forgot to set my Build setting to Release when I compiled...
User avatar
wandererfan
Veteran
Posts: 6326
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Over/Under Tolerances

Post by wandererfan »

reox wrote: Fri Feb 15, 2019 4:00 pm It looks like, that no formatter works for me. WIth tolerances and without
Looks ok here:
g_formatter.png
g_formatter.png (60.13 KiB) Viewed 996 times
with
OS: Linux Mint 19
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15883 (Git)
Build type: debug
Branch: Foreground
Hash: 60f91fbef22e465386b9dc741c71d5c3103609f0
Python version: 3.6.7
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Canada (en_CA)
reox
Posts: 929
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: Over/Under Tolerances

Post by reox »

NormandC wrote: Fri Feb 15, 2019 6:00 pm
reox wrote: Fri Feb 15, 2019 4:00 pm OS: Debian GNU/Linux buster/sid
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15976 (Git)
Build type: Release
Hash: 21353779d9f53cdf143e66dba0bcb593f5d9de00
Python version: 2.7.15+
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Austria (de_AT)
What is that version? The current revision number is 15884 as can be seen on the Github repo (it's the total amount of commits) https://github.com/FreeCAD/FreeCAD

Your FreeCAD info should include a branch info right underneath the Build type, it does not.

Before saying that it doesn't work for you, maybe you should check by compiling the actual master branch, rather than some unknown and undocumented branch that may not track all commits in master.
The current rev should be something like:

Code: Select all

$ git rev-list --all --count
15988
So 15976 looks OK for me...

This is a build of freecad-daily against master using debian sid using this version:
https://github.com/FreeCAD/FreeCAD/comm ... 93f5d9de00
(as the hash suggest)
The branch info is not included, as I had a typo in the script generating Version.h - thanks for seeing this!

Btw if you want to build such stuff, here is the script: https://gist.github.com/reox/522922a1a6 ... edd484f48f
wandererfan wrote: Fri Feb 15, 2019 7:56 pm
reox wrote: Fri Feb 15, 2019 4:00 pm It looks like, that no formatter works for me. WIth tolerances and without
Looks ok here:
thanks for testing! So either my build is crooked or my configuration... I'll investigate!
reox
Posts: 929
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: Over/Under Tolerances

Post by reox »

:roll: ok found the issue: I had "use global decimals" active. This seems to overwrite the formatter. Is that correct?
User avatar
wandererfan
Veteran
Posts: 6326
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Over/Under Tolerances

Post by wandererfan »

reox wrote: Sat Feb 16, 2019 1:18 pm :roll: ok found the issue: I had "use global decimals" active. This seems to overwrite the formatter. Is that correct?
Yes. If "use global decimals" is selected, the format string is ignored.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Over/Under Tolerances

Post by NormandC »

reox wrote: Sat Feb 16, 2019 1:14 pm The current rev should be something like:

Code: Select all

$ git rev-list --all --count
15988
So 15976 looks OK for me...
No, it's wrong. This is not how the revision number is counted. Again, have a look at how Github lists it as of right this instant:

FC_Github_commits_15897.png
FC_Github_commits_15897.png (19.18 KiB) Viewed 951 times

So your value of 15976 exceeds the amount of commits.

The information listed in the About FreeCAD menu is extracted from the /src/Build/Version.h file that is generated by the CMake configuration. In the source code, /src/Build/CMakeLists.txt executes /src/Tools/SubWCRev.py.

After pulling from master in my code folder and running cmake in my build folder right this instant, this is what my Version.h file looks like:

Code: Select all

// Version Number
#define FCVersionMajor "0"
#define FCVersionMinor "18"
#define FCVersionName  "Vulcan"
// test: $Format:Hash (%H), Date: %ci$
#define FCRevision      "15897 (Git)"      //Highest committed revision number
#define FCRevisionDate  "2019/02/16 15:30:46"     //Date of highest committed revision
#define FCRepositoryURL "git://github.com/FreeCAD/FreeCAD.git master"      //Repository URL of the working copy

// Git relevant stuff
#define FCRepositoryHash   "36dc7b42425dcb08abf6313c6dee6ce306b7bcdc"
#define FCRepositoryBranch "master"
FCRevision is 15897 which matches the number of commits shown on Github for master. That your revision number is higher was inexplicable to me, which led me to guess that you were pulling from a separate branch, not from master.
reox
Posts: 929
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: Over/Under Tolerances

Post by reox »

NormandC wrote: Sat Feb 16, 2019 5:20 pm
reox wrote: Sat Feb 16, 2019 1:14 pm The current rev should be something like:

Code: Select all

$ git rev-list --all --count
15988
So 15976 looks OK for me...
No, it's wrong.
Found it:

Code: Select all

reox@helios ~/tmp/FreeCAD (git)-[master] % git rev-list --all --count
15995
reox@helios ~/tmp/FreeCAD (git)-[master] % git rev-list master --count
15901
so using --all uses all revs from all branches... Makes sense. I'll fix that in the build script!
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Over/Under Tolerances

Post by NormandC »

reox wrote: Sun Feb 17, 2019 4:53 pm so using --all uses all revs from all branches... Makes sense. I'll fix that in the build script!
That explains it. I had a look at your script, but overlooked this, I'm really not very proficient with git... :oops:

Edit: your script is very interesting in that it manually creates the Version.h file without having to go through the CMake configuration process. This might be useful for the freecad-daily PPA repository. I wonder if these instructions could be added to a makefile (the /debian/rules file)? I'll ask the expert (kkremitzki)...
reox
Posts: 929
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: Over/Under Tolerances

Post by reox »

NormandC wrote: Sun Feb 17, 2019 5:54 pm Edit: your script is very interesting in that it manually creates the Version.h file without having to go through the CMake configuration process. This might be useful for the freecad-daily PPA repository. I wonder if these instructions could be added to a makefile (the /debian/rules file)? I'll ask the expert (kkremitzki)...
Yes, first I used the gitversioning repo, but this takes ages to clone, as it contains many commits.
So this is basically a shortcut.
The problem is, that you need to create the file before merging with the gitpackaging repo, otherwise you get wrong commit IDs (and wrong rev numbers as well). Thus at buildtime the information is wrong. I think this is probably the reason for the versioning repo in the first place.
Post Reply