Closed DavidMansolino closed 5 years ago
The problem is actually not only with the handles. But for example with this world:
#VRML_SIM R2019a utf8
WorldInfo {
}
Viewpoint {
orientation 0.010609946051950602 0.9878633572769442 0.15496262902486857 3.3907274957032123
position -0.3992181716610082 0.40240941607368513 -1.2618839874129562
}
TexturedBackground {
}
TexturedBackgroundLight {
}
Solid {
boundingObject Box {
size 0.1 0.1 0.1
}
}
Changing one of the dimensions of the box to 0.3
(either with the spinboxes or whit the mouse wheel), once saved gives:
#VRML_SIM R2019a utf8
WorldInfo {
}
Viewpoint {
orientation 0.010609946051950602 0.9878633572769442 0.15496262902486857 3.3907274957032123
position -0.3992181716610082 0.40240941607368513 -1.2618839874129562
}
TexturedBackground {
}
TexturedBackgroundLight {
}
Solid {
boundingObject Box {
size 0.30000000000000004 0.1 0.1
}
}
During the handle translation: https://github.com/omichel/webots/blob/e1040474db48abdd2ba9780a680cc6f45cce861c/src/webots/gui/WbDragTransformEvent.cpp#L213
0 0.05 -0.47
+ 0 0 0.01
= 0 0.05 -0.46
0 0.05 -0.47
+ 0 0 0.01
= 0 0.05 -0.45999999999999996
Fixed in#266
Describe the Bug When using the rotation and translation handles the field value is then not correctly rounded when saved, e.g.:
Steps to Reproduce
khepera3_gripper.wbt
world (in pause mode).CYLINDER_LOAD
Solid with the handle.Expected behavior The value should be rounded when saved, exactly like what is done if you directly enter it in the scene-tree.
System