Ticket #3967 - Datum plane yaw setting is ignored

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
uwestoehr
Posts: 753
Joined: Sun Jan 27, 2019 3:21 am

Ticket #3967 - Datum plane yaw setting is ignored

Postby uwestoehr » Sun May 12, 2019 4:19 pm

Attached is a simple FC file. It contains 2 datum planes.
- I want to make plane 2 make parallel to plane 1 in a defined distance.
- Therefore I edit plane 2 and set its yaw angle to -10°
- In the preview it looks perfect - both planes are parallel
- But when I click OK to finish the editing, the plane yaw angle is reset to 0°, so my change was in fact ignored.

It seems to be a bug.

OS: Windows 7
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
Locale: German/Germany (de_DE)
Attachments
Datum-Plane-Bug.FCStd
file to reproduce
(8.3 KiB) Downloaded 11 times
Last edited by Kunda1 on Wed Jul 03, 2019 5:46 pm, edited 1 time in total.
Reason: Added ticket number to thread title
User avatar
GlouGlou
Posts: 1674
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: Datum plane yaw setting is ignored

Postby GlouGlou » Sun May 12, 2019 4:58 pm

Attachment of datum plane 2 should be like this, I think.
Attachments
Capture.JPG
Capture.JPG (62.56 KiB) Viewed 351 times
User avatar
uwestoehr
Posts: 753
Joined: Sun Jan 27, 2019 3:21 am

Re: Datum plane yaw setting is ignored

Postby uwestoehr » Sun May 12, 2019 6:48 pm

GlouGlou wrote:
Sun May 12, 2019 4:58 pm
Attachment of datum plane 2 should be like this, I think.
I purposely did not select plane 1 as reference but the xy-plane. (In the construction where I discovered the problem there is no plane 1 and I try to reference the base planes.) So concerning the xy-plane, I think I did everything correct but the yaw angle setting is simply ignored by FC.
User avatar
DeepSOIC
Posts: 7049
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Datum plane yaw setting is ignored

Postby DeepSOIC » Sun May 12, 2019 7:23 pm

Seems to be a gimbal lock problem. If I set Pitch to 80, yaw is remembered correctly.
User avatar
DeepSOIC
Posts: 7049
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Datum plane yaw setting is ignored

Postby DeepSOIC » Sun May 12, 2019 7:29 pm

A simple console snippet to demonstrate that we have a problem:

Code: Select all

>>> r1 = App.Rotation(10,90,0)
>>> r1.toEuler()
(0.0, 90.0, 0.0)
>>> r2 = App.Rotation(*r1.toEuler())
>>> r2.isSame(r1)
False
>>> 
User avatar
uwestoehr
Posts: 753
Joined: Sun Jan 27, 2019 3:21 am

Re: Datum plane yaw setting is ignored

Postby uwestoehr » Sun May 12, 2019 9:25 pm

DeepSOIC wrote:
Sun May 12, 2019 7:23 pm
If I set Pitch to 80, yaw is remembered correctly.
Not for me. If I set the pitch to 80° the yaw setting is still ignored while the pitch settings is correctly taken into account.
User avatar
uwestoehr
Posts: 753
Joined: Sun Jan 27, 2019 3:21 am

Re: Datum plane yaw setting is ignored

Postby uwestoehr » Sun May 12, 2019 9:39 pm

uwestoehr wrote:
Sun May 12, 2019 9:25 pm
Not for me. If I set the pitch to 80° the yaw setting is still ignored while the pitch settings is correctly taken into account.
I was not correct. The problem is that the result seems to be dependent on what angle you have set before you made the change.
It gets even more weird if you set e.g. the pitch > 90°. Then the yaw AND the pitch angle turn out wrong.

I opened now issue #3967 as reference.
User avatar
Kunda1
Posts: 5781
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #3967 - Datum plane yaw setting is ignored

Postby Kunda1 » Fri Aug 23, 2019 2:59 am

Ticket issue #3967 added to thread title
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
DeepSOIC
Posts: 7049
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Ticket #3967 - Datum plane yaw setting is ignored

Postby DeepSOIC » Sat Aug 24, 2019 12:38 am

Actually, it should have been fixed. At least, running the console snippet gives True for the isSame test, despite returning different set of angles than one on the input.

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17803 (Git)
Build type: Release
Branch: master
Hash: 89961a33d46063a43e9fb5b0308ca95d559eca94
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Russian/Russia (ru_RU)
TheMarkster
Posts: 1060
Joined: Thu Apr 05, 2018 1:53 am

Re: Ticket #3967 - Datum plane yaw setting is ignored

Postby TheMarkster » Sat Aug 24, 2019 1:07 am

Werner recently fixed a similar issue with Euler angles in the placement task dialog, which I'm thinking probably fixed this, too. But I don't know if the fix was backported to 0.18.