Makro Otočení pohledu

From FreeCAD Documentation
Revision as of 08:50, 24 May 2014 by Renatorivo (talk | contribs)

File:Text-x-python Rotate View by 90°

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

Autor: Yorik
Autor
Yorik
Download
None
Odkazy
Verze
1.0
Datum poslední úpravy
None
Verze FreeCAD
None
Výchozí zástupce
None
Viz též
None

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


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