Error in the keyword constructor of App.Rotation (Python)

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
galou_breizh
Posts: 437
Joined: Wed Sep 15, 2010 9:38 am

Error in the keyword constructor of App.Rotation (Python)

Post by galou_breizh »

There's a bug in the Python constructor of App.Rotation with keyword arguments: "App.Rotation(x=1, y=0, z=0, w=0)" always returns the identity rotation: "Rotation (0.0, 0.0, 0.0, 1.0)".

Gaël

OS: Ubuntu 20.04.3 LTS (i3/i3)
Word size of FreeCAD: 64-bit
Version: 0.20.
Build type: Release
Branch: unknown
Hash: 751227402db14aad83f5aa87d63e514109bd438f
Python version: 3.8.10
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/United States (en_US)
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Error in the keyword constructor of App.Rotation (Python)

Post by openBrain »

From the code, construction from quaternion using keywords isn't supported. ;)
galou_breizh
Posts: 437
Joined: Wed Sep 15, 2010 9:38 am

Re: Error in the keyword constructor of App.Rotation (Python)

Post by galou_breizh »

Thanks for the info!

The problem is then that this unsupported feature should raise an exception rather than ignore its input.
Post Reply