View Issue Details

IDProjectCategoryView StatusLast Update
0003925ExpressionsBugpublic2022-01-23 00:01
Reportermetatheorem Assigned To 
Status confirmedResolutionopen 
Product Version0.18 
Target Version0.20 
Summary0003925: Negative numbers with multiple units interpeted as expressions
DescriptionWhen typing in a negative measurement, such as in the Draft Move tool, combinations of units are interpreted as an addition expression. For example, the expression "-1m 10mm" is evaluated to "-990.0 mm" instead of "-1010.0 mm" as it should be. This appears to happen regardless of the units used.

Forum disussion here: Negative numbers in feet/inches interpreted wrong
Steps To Reproduce1. In the Draft workspace, create a two-point rectangle.
2. In any of the point value fields (x, y, or z), type in an expression such as "-1m 10mm".
3. Move keyboard focus away from the field, and the entry changes to "-990.0 mm".
Additional InformationThis can happen either when a text entry field loses focus or when a tool is applied.

1. If possible, key in a single type of unit.
2. If not possible, such as when working with feet and inches, perform two operations that add up to the desired measurement. This may not work for all operations.

OS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.Unknown
Build type: Unknown
Python version: 2.7.15
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.9.1.oce-0.18
Locale: English/UnitedStates (en_US)
FreeCAD Information


related to 0003808 closed FreeCAD "2nd length" in "Pocket parameters" shows wrong value when a negative f(x) was defined 
related to 0004263 new FreeCAD Problem with negative offset "Placement" when the preference are "Building US" units 



2019-04-24 11:19

administrator   ~0013041

In the future, please follow our guidelines (mentioned in the yellow banner at the top of the page)

How did you build FreeCAD?
Can you please try with a Qt5/Py3/OCC7.3 build?
or even better try the 0.19_pre


2019-04-27 03:46

reporter   ~0013059


I've teste the version 18.1

But there is the same behavior.
1.-Draw a line.
2- Change its X end point typing -1m 10mm the result was -990mm instead of the -1010mm

OS: Windows 8.1
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16110 (Git)
Build type: Release
Branch: (HEAD detached at upstream/releases/FreeCAD-0-18)
Hash: f7dccfaa909e5b9da26bf50c4a22ccca9bb10c40
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0


2019-06-13 04:49

administrator   ~0013195

Another relevant forum thread:


2022-03-03 13:55

administrator   ~0016744

This ticket has been migrated to GitHub as issue 5909.

Issue History

Date Modified Username Field Change
2019-04-04 22:47 metatheorem New Issue
2019-04-05 11:18 Kunda1 Relationship added related to 0003808
2019-04-24 11:19 Kunda1 Status new => feedback
2019-04-24 11:19 Kunda1 Note Added: 0013041
2019-04-27 03:46 Geoplace File Added: Compound units negative values are substracted.PNG
2019-04-27 03:46 Geoplace Note Added: 0013059
2019-06-13 04:49 Kunda1 Note Added: 0013195
2019-06-13 04:50 Kunda1 Project FreeCAD => Expressions
2019-06-13 04:50 Kunda1 Status feedback => confirmed
2019-06-13 04:50 Kunda1 Target Version => 0.19
2020-02-10 11:00 openBrain Relationship added related to 0004263
2021-02-06 06:30 abdullah Target Version => 0.20
2022-01-23 00:01 Kunda1 Tag Attached: units