Bug #2792 Negative distances measured in feet/inch calculated incorrectly

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Post Reply
User avatar
Kunda1
Veteran
Posts: 13443
Joined: Thu Jan 05, 2017 9:03 pm

Bug #2792 Negative distances measured in feet/inch calculated incorrectly

Post by Kunda1 »

issue #2792
When 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 Information OS:
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
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13443
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bug #2792 Negative distances measured in feet/inch calculated incorrectly

Post by Kunda1 »

This is part of a bigger issue I realize. I've attached this bug to a previous thread: Problem with negative values in InputField https://forum.freecadweb.org/viewtopic. ... 13#p157013
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13443
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bug #2792 Negative distances measured in feet/inch calculated incorrectly

Post by Kunda1 »

bump
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply