Bug: Wrong unit

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
perot
Posts: 145
Joined: Wed Aug 30, 2017 5:40 pm

Bug: Wrong unit

Post by perot »

I found a situation where FreeCAD chooses default units inconsistently.

Load the file. Select the object, choose Part:Fillet. In the Fillet dialog, choose one of the edges, for instance "Edge9". Then at the bottom, in the "Radius:" field, enter "0.1" (no unit) and click OK. You find a nice fillet. Double clicking the fillet in the model tree re-opens the Fillet dialog, and you confirm that the radius has been accepted as "0.1mm".

Repeat the above, but instead of "0.1", enter "0.095". You'd expect it would choose "mm" as the default unit again, and you'd get almost the same fillet, now of radius 95µm. Instead, FreeCAD chooses "µm" as the default unit, and converts the entered value into 95nm (as you confirm by re-opening the Fillet dialog), which results in an invisibly tiny fillet.

I tried to think of a reason for this behaviour to be intended, but I cannot come up with any, so I figure this must be a bug.

Cheers Peter

Code: Select all

OS: Windows 7 SP 1 (6.1)
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: German/Germany (de_DE)
Attachments
problem.FCStd
(12.99 KiB) Downloaded 21 times
Last edited by perot on Fri Dec 03, 2021 4:47 pm, edited 1 time in total.
User avatar
bambuko
Veteran
Posts: 2114
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: Bug: Wrong unit

Post by bambuko »

Have a look at this thread:
https://forum.freecadweb.org/viewtopic.php?f=3&t=52057

Are your units set to "Metric small parts & CNC" ?
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
perot
Posts: 145
Joined: Wed Aug 30, 2017 5:40 pm

Re: Bug: Wrong unit

Post by perot »

bambuko wrote: Fri Dec 03, 2021 4:44 pm Have a look at this thread:
https://forum.freecadweb.org/viewtopic.php?f=3&t=52057

Are your units set to "Metric small parts & CNC" ?
Nope, my units are "Standard (mm/kg/s/degree)".

I'll take a look at that thread ...

Cheers Peter
openBrain
Veteran
Posts: 9031
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Bug: Wrong unit

Post by openBrain »

Do you have same thing if you use ',' (comma) instead of '.' (period) in your numbers?
chrisb
Veteran
Posts: 53785
Joined: Tue Mar 17, 2015 9:14 am

Re: Bug: Wrong unit

Post by chrisb »

Please add your FreeCAD infos. It works here correctly. I have the comma ',' as decimal separator.

OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.20.26375 (Git)
Build type: Release
Python version: 3.9.7
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: C/Default (C)
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: Bug: Wrong unit

Post by chrisb »

openBrain wrote: Fri Dec 03, 2021 4:51 pm Do you have same thing if you use ',' (comma) instead of '.' (period) in your numbers?
If I do it vice versa and enter "0.95" it becomes 95mm (not nm).
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
perot
Posts: 145
Joined: Wed Aug 30, 2017 5:40 pm

Re: Bug: Wrong unit

Post by perot »

bambuko wrote: Fri Dec 03, 2021 4:44 pm Have a look at this thread:
https://forum.freecadweb.org/viewtopic.php?f=3&t=52057
As I understand that thread, it is about FreeCAD displaying the numbers in suitable units, vs. forcing it to always display numbers in the same unit. That behaviour is fine with me.

My (suspected) bug is about FreeCAD assuming the wrong unit when accepting user input.

Cheers Peter
User avatar
thomas-neemann
Veteran
Posts: 11729
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Bug: Wrong unit

Post by thomas-neemann »

perot wrote: Fri Dec 03, 2021 4:39 pm

what speaks against specifying the unit mm?
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
perot
Posts: 145
Joined: Wed Aug 30, 2017 5:40 pm

Re: Bug: Wrong unit

Post by perot »

chrisb wrote: Fri Dec 03, 2021 4:54 pm
openBrain wrote: Fri Dec 03, 2021 4:51 pm Do you have same thing if you use ',' (comma) instead of '.' (period) in your numbers?
If I do it vice versa and enter "0.95" it becomes 95mm (not nm).
That does not make any sense either, I'd take it as another manifestation of the same bug.

Comma or decimal point does not make any difference for me. FreeCAD surprisingly accepts both, with the same wrong result.

Cheers Peter
openBrain
Veteran
Posts: 9031
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Bug: Wrong unit

Post by openBrain »

perot wrote: Fri Dec 03, 2021 4:56 pm My (suspected) bug is about FreeCAD assuming the wrong unit when accepting user input.
When you reopen the dialog to enter 0.095, did you pay attention to already present unit? Did you really delete it?
Post Reply