Macro Ruota la vista di 90°

From FreeCAD Documentation
Revision as of 18:07, 1 January 2014 by Renatorivo (talk | contribs) (Created page with "{{Macro/it|Icon=Text-x-python|Name=Rotate View by 90°|Name/it=Rotate View by 90°|Description=Questa macro ruota la vista corrente di 90° a sinistra. Funziona solo se si è ...")

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
Versione macro
1.0
Data ultima modifica
None
Versioni di FreeCAD
None
Scorciatoia
Nessuna
Vedere anche
Nessuno

This macro rotates the current view by 90° to the left. Only works if you are in Top view


 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