View Issue Details

IDProjectCategoryView StatusLast Update
0001453FreeCADFeaturepublic2019-07-29 15:17
Reportershoogen Assigned Towmayer  
PrioritylowSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Versiontrunk 
Summary0001453: Use string representation for PropertyPlacement editor that presevers double precision
DescriptionCurrently editing the Placement Property in the GUI (either from the property view or form the placement dialog) degradges the precision.
This happens due to the serialisation to a string with is then provided to the runCommand function (and thus to a recorded macro).

Furthermore the description of a rotation in not intuitive an unexperienced user. For simple rotations, a description using Eulerian angles could represent the exact rotation with a few decimal places.

Another viable description could be an Axis with an Angle. In this representation the python command would include calls to convert the angle to radians and normalize the axis vector.
Steps To Reproducechange the placement of an object to 30° around +z.
the python window will show
App.Rotation(0,0,0.258819,0.965926)
obviously this value was rounded/truncated to 6 decimal digits, which roughly resembles single float precision. The value of the resulting rotation will differ because the normalization of the quaternion is performed with double precision.
One example of the amount of error introduced:
>>> ((1.0-App.Rotation(0,0,0.258819,0.965926).toEuler()[0]/30)).hex()
'0x1.6b13c52200000p-22'
Additional InformationQString::arg(d,0,'g',6)
TagsNo tags attached.
FreeCAD Information

Relationships

child of 0000458 closed Problem fusing a cylinder with a torus (Probleme de fusion entre un cylindre et un tor) 

Activities

wmayer

2014-03-01 10:42

administrator   ~0004336

git show 1acba88 fixes the issue for the placement dialog.

Related Changesets

FreeCAD: master de727642

2014-03-01 11:41:42

wmayer

Details Diff
0001453: Use string representation for PropertyPlacement editor that presevers double precision Affected Issues
0001453
mod - src/Gui/Placement.cpp Diff File
mod - src/Gui/Placement.h Diff File

FreeCAD: master 7ebfa363

2014-03-01 12:41:29

wmayer

Details Diff
+ fixes 0001453: Use string representation for PropertyPlacement editor that presevers double precision Affected Issues
0001453
mod - src/Gui/propertyeditor/PropertyItem.cpp Diff File
mod - src/Gui/propertyeditor/PropertyItem.h Diff File

Issue History

Date Modified Username Field Change
2014-02-28 12:17 shoogen New Issue
2014-02-28 12:20 shoogen Steps to Reproduce Updated
2014-03-01 10:42 wmayer Note Added: 0004336
2014-03-01 12:09 wmayer Changeset attached => FreeCAD Master master 7ebfa363
2014-03-01 12:09 wmayer Assigned To => wmayer
2014-03-01 12:09 wmayer Status new => closed
2014-03-01 12:09 wmayer Resolution open => fixed
2015-01-30 12:29 shoogen Relationship added child of 0000458
2019-07-29 15:17 Kunda1 Changeset attached => FreeCAD master de727642