Hi all.
Trying to look for info how rotation calculates here with (x,y,z,A - options in Orientation).
What i need:
i have body, that i need to rotate depends on 3 angles in spreadsheet (YAW(X,Z,bodyaxisX in scene))
Example:
is Spreadsheet:
---------------
| Y | A | W |
---------------
| 0 |90 | 45|
---------------
| result: |
---------------
| x | calculated |
| y | calculated |
| z | calculated |
| A | calculated |
---------------------
next cells will be used in body orientation for calculated values.
What i search:
How current calculation works? and how i can recalculate?
ps. tryin to search euler angles calculations, but can't figure out what kind of calculation used here. or may be someone show me what source file makes calculations in freecad.
pps, i don't need using menu or manualy write x,y,z,A or rotate using other drawing tools, because i need flexible calculation
Orientation with Spreadsheet
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!
Re: Orientation with Spreadsheet
Hi and welcome to the forum!
See Expressions on calculation possibilities
If it is not done automatically, click the Recompute icon.and how i can recalculate?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Orientation with Spreadsheet
Hi, i know how spreedsheet works. i need calculation of rotation. in short, i have rotation scheme like ZYZ, or XZX with known angels, like (90,45,90) in YZY, i set those angles in spreedsheet and need to translate it into (Angle, axises(x,y,z))-form that i will use in body->Placement. how i can calculate this (Angle,x,y,z) matrix. i can't understand how FreeCad calculates Body position from them and how i can calculate from ZYZ(for example) into (A,x,y,z) form (it manualy able to do from Edit->Placement step by step, but i need to do this in spreedsheet).
also if i have current(A.x,y,z) - i need to recalculate it for ZYZ(for example) rotation with (90,45,90)angles (as example) and get new values for (A,x,y,z)
-
- Veteran
- Posts: 3180
- Joined: Thu Sep 24, 2020 10:31 pm
- Location: Hawaii
- Contact:
Re: Orientation with Spreadsheet
It's not clear what it is you don't know how to do. Spreadsheets support the creation of rotations and placements. They support the compounding of rotations eg rot = rot_yaw * rot_pitch * rot_roll
Here's a file with a spreadsheet, placing cubes with the same rotation computed directly or from yaw, pitch, roll separately.
https://wiki.freecadweb.org/Expressions#Create_function
https://wiki.freecadweb.org/Sandbox:Edw ... ler_Angles
Here's a file with a spreadsheet, placing cubes with the same rotation computed directly or from yaw, pitch, roll separately.
https://wiki.freecadweb.org/Expressions#Create_function
https://wiki.freecadweb.org/Sandbox:Edw ... ler_Angles
- Attachments
-
- spreadsheetrotations.FCStd
- (6.18 KiB) Downloaded 9 times
Re: Orientation with Spreadsheet
strange file for me. i see functions, but do not see how it sets coordinates of cube. on cube properties-> placement Angle and axis do not linked to spreedsheet's cells and no macros there. in functions i do not see linkage with any cube. how it sets cube's placement data?
-
- Veteran
- Posts: 3180
- Joined: Thu Sep 24, 2020 10:31 pm
- Location: Hawaii
- Contact:
Re: Orientation with Spreadsheet
Right click on the Placement property and select Expressions. It shows the linkage to the spreadsheet alias.
EDIT: You may want to pay attention to right click|show all in Properties - which shows stuff that is not normally useful to the casual user.
EDIT: You may want to pay attention to right click|show all in Properties - which shows stuff that is not normally useful to the casual user.
Last edited by edwilliams16 on Thu May 26, 2022 7:29 pm, edited 1 time in total.
Re: Orientation with Spreadsheet
thanks, now i see.
for now i think this is best way to set rotations.
for now i think this is best way to set rotations.