Macro Rotate View/it: Difference between revisions
Renatorivo (talk | contribs) (Created page with "Questa macro ruota la vista corrente di 90° a sinistra. Funziona solo se si è in vista dall'alto") |
(Updating to match new version of source page) |
||
Line 5: | Line 5: | ||
<syntaxhighlight> |
<syntaxhighlight> |
||
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 |
|||
</syntaxhighlight> |
</syntaxhighlight> |
Revision as of 10:54, 6 May 2014
File:Text-x-python Rotate View by 90° |
Descrizione |
---|
Questa macro ruota la vista corrente di 90° a sinistra. Funziona solo se si è in vista dall'alto Autore: Yorik |
Autore |
Yorik |
Download |
None |
Link |
Raccolta di macro Come installare le macro Personalizzare la toolbar |
Versione macro |
1.0 |
Data ultima modifica |
None |
Versioni di FreeCAD |
None |
Scorciatoia |
Nessuna |
Vedere anche |
Nessuno |
Questa macro ruota la vista corrente di 90° a sinistra. Funziona solo se si è in vista dall'alto
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