Makro Otočení pohledu

From FreeCAD Documentation
Revision as of 10:53, 6 May 2014 by FuzzyBot (talk | contribs) (Updating to match new version of source page)

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

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

Author: Yorik
Author
Yorik
Download
None
Links
Macro Version
1.0
Date last modified
None
FreeCAD Version(s)
None
Default shortcut
None
See also
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