How to rotate the central axis of object to the given direction?

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
stefankorisnik3
Posts: 101
Joined: Sun Jul 24, 2022 12:49 pm

How to rotate the central axis of object to the given direction?

Post by stefankorisnik3 »

The object and central axis vector of that object is given.

The central axis vector of the object starts from the origin (0,0,0) like on the picture: https://imgur.com/zZm6kY9

How can i rotate the whole object so the other end of the central axis (orange point on the picture) land on the z axis like on the picture?
Last edited by stefankorisnik3 on Thu Aug 11, 2022 7:29 pm, edited 2 times in total.
stefankorisnik3
Posts: 101
Joined: Sun Jul 24, 2022 12:49 pm

Re: How to rotate the central axis of object to the given direction?

Post by stefankorisnik3 »

I think it can be solved axis by axis rotation. But don't know exactly how.
Last edited by stefankorisnik3 on Thu Aug 11, 2022 9:48 pm, edited 1 time in total.
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: How to rotate the central axis of object to the given direction?

Post by chrisb »

Please attach in the future images directly to the post. Less clicking, no inadvertent vanishing of images.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
johnwang
Veteran
Posts: 1345
Joined: Sun Jan 27, 2019 12:41 am

Re: How to rotate the central axis of object to the given direction?

Post by johnwang »

f.jpg
f.jpg (49.75 KiB) Viewed 292 times
hfc series CAE workbenches for FreeCAD (hfcNastran95, hfcMystran, hfcFrame3DD, hfcSU2 and more)
Post Reply