datum dialog does not perform Euler or Cardan transformation on rotations
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
datum dialog does not perform Euler or Cardan transformation on rotations
I fail on this simple task: I need a datum plane whose normal vector has the direction 1,1,1 (45° from all 3 coordinate axes)
At first I tried to create a datum line to get the normal for the plane. So I set the datum line onto the x-axis and then rotated it around the y and the z-axis. The result however is not the desired datum line in direction 1,1,1:
Obviously I made a mistake since after I created the datum line, I see in the Data -> Attachment a strange rotation angle and axis.
The same if for a datum plan - rotating it twice by 45° does not lead to the desired result.
How is this task done?
OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.19145 (Git)
Build type: Release
Branch: master
Hash: c43315728cc643c6a382af0bba5b596407bbaf26
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
At first I tried to create a datum line to get the normal for the plane. So I set the datum line onto the x-axis and then rotated it around the y and the z-axis. The result however is not the desired datum line in direction 1,1,1:
Obviously I made a mistake since after I created the datum line, I see in the Data -> Attachment a strange rotation angle and axis.
The same if for a datum plan - rotating it twice by 45° does not lead to the desired result.
How is this task done?
OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.19145 (Git)
Build type: Release
Branch: master
Hash: c43315728cc643c6a382af0bba5b596407bbaf26
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
Last edited by uwestoehr on Mon Jan 06, 2020 11:29 pm, edited 1 time in total.
Re: how to create datum plane and line with defined angle
Why not construct it the way you describe it:
- create DatumPoints in (0,0,0) and (1,1,1)
- create a DatumLine through these points
- create a plane normal to this line.
- create DatumPoints in (0,0,0) and (1,1,1)
- create a DatumLine through these points
- create a plane normal to this line.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: how to create datum plane and line with defined angle
… if CAD doesn't deliver enough insight, I always try it with "ancient" geometry.
Cube => three corner points => Sketcher plane on them.
Cube => three corner points => Sketcher plane on them.
- Attachments
-
- Datum-plane-issue_2.FCStd
- (18.54 KiB) Downloaded 195 times
Re: how to create datum plane and line with defined angle
I know I can do this but what is wrong by achieving the same with 2 rotations around two axes? See attached the difference: The yellow datums are correct and were created using datum points, the red ones were created using rotations. So either I have a severe thinko or the datum plane rotation has an issue. I want to assure that the latter is not the case and of course to understand why the rotation method fails so that I can describe it in the Wiki.
Re: how to create datum plane and line with defined angle
My first test to position your plane with Placement and Euler angles went also wrong.
https://en.wikipedia.org/wiki/Euler_angles
Roll 45 is not at all the correct angle. They must be known. Yaw 45° and Roll 54,736° (measured).
Calculate: angle = arc_tan(1/√2) - 90°
Something similar is the definition of the YZ-Sketcher plane => 120° if you look into placement under DataTab.
I didn't understand this weird trick since using FreeCAD.
Why not turn the XY plane simply 90° around Y-axis like XZ?
And why not defining it (0, 1, 1)? (1, 1 ,0); (1, 0, 1)
Some Vector mathematics.
https://forum.freecadweb.org/viewtopic.php?f=8&t=42169
https://en.wikipedia.org/wiki/Euler_angles
Roll 45 is not at all the correct angle. They must be known. Yaw 45° and Roll 54,736° (measured).
Calculate: angle = arc_tan(1/√2) - 90°
Something similar is the definition of the YZ-Sketcher plane => 120° if you look into placement under DataTab.
I didn't understand this weird trick since using FreeCAD.
Why not turn the XY plane simply 90° around Y-axis like XZ?
And why not defining it (0, 1, 1)? (1, 1 ,0); (1, 0, 1)
Some Vector mathematics.
https://forum.freecadweb.org/viewtopic.php?f=8&t=42169
Last edited by hammax on Mon Jan 06, 2020 2:04 pm, edited 2 times in total.
Re: how to create datum plane and line with defined angle
But that's the point. The ya, pitch and roll angles in FC's datum dialog are no Euler angles but obviously Cardan angles. I tried to use the Cardan transformation matrix to convert a vector (1,0,0) in fixed space to (1,1,1) in fixed space ,but failed. So how is this done? I mean there is a solution: Yaw 0°, Pitch 45° and Roll approx. 35 °
Re: how to create datum plane and line with defined angle
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
My macros on Gist.github here complete macros Wiki and forum.
Re: how to create datum plane and line with defined angle
That doesn't help me. I need to understand how FC works and if it works correctly. So I need to know the transformation matrix FC uses for the Cardan angles. Then I can calculate the necessary angles, Moreover I can add this important info to the Wiki that other users don't have the same problem.
Re: how to create datum plane and line with defined angle
hi
ok (it was for your work..),
but for the wiki explain well why (also in the Placement page):
1: Euler angle (XY'Z''):
for the rotation on the axis Z = Yaw Euler angle, in FreeCAD the axis X is modified and the rotation is done on Z axis
(personally i never understood)
2: Rotation axis with angle:
rotation on axis Z, the axis Z is modified
thanks
mario
ok (it was for your work..),
but for the wiki explain well why (also in the Placement page):
1: Euler angle (XY'Z''):
for the rotation on the axis Z = Yaw Euler angle, in FreeCAD the axis X is modified and the rotation is done on Z axis
(personally i never understood)
2: Rotation axis with angle:
rotation on axis Z, the axis Z is modified
thanks
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
My macros on Gist.github here complete macros Wiki and forum.
Re: how to create datum plane and line with defined angle
Hi Mario, thank you. nevertheless, you misunderstood me. The datum dialog offers rotations and there is no choose between Euler and only around one axis. Since one needs in practice datums a lot, we need to explain the users how the datum dialog works.
As I found out the rotation angles are no Euler angles but Cardan angles. This is an important difference (the third Euler angle rotated around the first rotation axis too). However, to get e.g. a datum line in the direction 1,1,1 the user is lost since one cannot use the Cardan rotation matrix to calculate the necessary angles.
So what I nee to find out is what the datum dialog actually does and if there is not maybe a bug (it seems so). So in the Wiki page for the datum feature I need to inform the users about the rotation matrix used by the dialog and make this clear with an example.
I had a look in the code but could not yet find out code that makes it clear to me what is happening on rotation. Any pointer and info is highly appreciated.
-------------------------------
Update: I am pretty sure now that there is a bug in the datum dialog because when I use 2 bodies and rotate one of it by each 45° Roll and Pitch using the placement dialog, the normal of the xy-plane of the rotated parts has the direction 1,1,1 in the unrotated coordinate system.
Here is the example file to demonstrate this:
Or do I have a severe thinko?