Macro Rotate View/cs: Difference between revisions

From FreeCAD Documentation
m (Replaced content with "==Description==")
(Created page with "Toto makro otočí objekt o 90° doleva. Funguje jen pokud jste v pohledu shora rotation 90 degrees")
Line 15: Line 15:
==Description==
==Description==


Toto makro otočí objekt o 90° doleva. Funguje jen pokud jste v pohledu shora
This macro rotates the current view by 90° to the left. Only works if you are in Top view [[File:Macro_Rotate_View_view_90_Degrees.png|rotation 90 degrees]]
[[File:Macro_Rotate_View_view_90_Degrees.png|rotation 90 degrees]]


==Script==
==Script==

Revision as of 15:37, 25 July 2019

Rotate View by 90°

Popis
Toto makro otočí objekt o 90° doleva. Funguje jen pokud jste v pohledu shora

Version macro : 01.00
Date last modification : 2010-11-17
FreeCAD version : All
Download : Macro_Rotate_View_view_90_Degrees
Autor: Yorik
Autor
Yorik
Download
Macro_Rotate_View_view_90_Degrees
Odkazy
Verze
01.00
Datum poslední úpravy
2010-11-17
Verze FreeCAD
All
Výchozí zástupce
None
Viz též
Macro_Rotate_ViewAxonometric
Macro Rotate View Free

Description

Toto makro otočí objekt o 90° doleva. Funguje jen pokud jste v pohledu shora rotation 90 degrees

Script

ToolBar Icon

Macro_Rotate_View_90_Degrees.FCMacro

import math
from pivy import coin
cam = Gui.ActiveDocument.ActiveView.getCameraNode()
rot = coin.SbRotation()
rot.setValue(coin.SbVec3f(0,0,1),math.pi/2)
nrot = cam.orientation.getValue() * rot
cam.orientation = nrot