View Issue Details

IDProjectCategoryView StatusLast Update
0002792DraftBugpublic2018-03-08 15:48
ReporterTomV Assigned Toyorik  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSUbuntuOS Version 16.04.1 LTS
Product Version0.17 
Target Version0.18Fixed in Version0.17 
Summary0002792: Negative distances measured in feet/inch calculated incorrectly
DescriptionWhen specifying a negative distance in <ft>'<inch>", such a -7'3", FreeCAD actually calculated the following distance: -7' + 3" = -6'9"

This is obviously wrong...
Steps To Reproduce- Set units to ft/inch
- Create an object
- select move object
- select relative / copy
- specify second point as -7'3"

In the python console, you'll see the following:

>>> Draft.move([FreeCAD.ActiveDocument.Rectangle001],FreeCAD.Vector(0.0,-2057.4,0.0),copy=True)

-2057.4 = -6'9" instead of -7'3"
Additional InformationOS: Ubuntu 16.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.8939 (Git)
Build type: None
Branch: master
Hash: cb16eda2165d1af34ebbd73628f82aa00037f667
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Tagspython, unicode, units
FreeCAD Information

Activities

Kunda1

2017-01-11 18:12

administrator   ~0007637

Started forum thread: http://forum.freecadweb.org/viewtopic.php?f=10&t=19794

Kunda1

2017-07-16 11:38

administrator   ~0009763

Part of a larger issue: https://forum.freecadweb.org/viewtopic.php?f=10&t=7182
Problem with negative values in InputField

yorik

2017-07-19 01:03

administrator   ~0009779

The problem is that the unit parser currently has problems understanding these complex unit notations... The 7'+3" is a (bad) workaround I found provisorily. The unit parser actually needs to be extended to understand things like 7'3" or 7'3 1/4"...

Kunda1

2017-11-29 00:58

administrator   ~0010498

Keep in the 0.17 roadmap or bump to 0.18 ?

yorik

2018-03-08 15:47

administrator   ~0011024

Fixed in https://github.com/FreeCAD/FreeCAD/commit/46acd2f6a2ad32cb3ed56b551925dd483e8a55bc

This is somewhat of a "hack" (notation now is -7'-3") but at least it works and is mathematically consistent...

Issue History

Date Modified Username Field Change
2016-11-23 04:53 TomV New Issue
2017-01-11 18:12 Kunda1 Note Added: 0007637
2017-01-23 22:20 Kunda1 Tag Attached: units
2017-02-15 07:08 kkremitzki Status new => confirmed
2017-02-15 07:08 kkremitzki Target Version => 0.17
2017-07-16 11:38 Kunda1 Note Added: 0009763
2017-07-19 01:03 yorik Note Added: 0009779
2017-10-10 02:17 Kunda1 Tag Attached: unicode
2017-11-05 13:53 Kunda1 Tag Attached: python
2017-11-29 00:58 Kunda1 Note Added: 0010498
2018-03-07 19:06 wmayer Target Version 0.17 => 0.18
2018-03-08 15:47 yorik Note Added: 0011024
2018-03-08 15:48 yorik Assigned To => yorik
2018-03-08 15:48 yorik Status confirmed => closed
2018-03-08 15:48 yorik Resolution open => fixed
2018-03-08 15:48 yorik Fixed in Version => 0.17