Description |
---|
This macro rotates the current view in ViewAxonometric. Macro version: 01.00 Last modified: 2010-11-17 FreeCAD version: All Download: ToolBar Icon Author: Yorik |
Author |
Yorik |
Download |
ToolBar Icon |
Links |
Macros recipes How to install macros How to customize toolbars |
Macro Version |
01.00 |
Date last modified |
2010-11-17 |
FreeCAD Version(s) |
All |
Default shortcut |
None |
See also |
Macro_Rotate_View |
This macro rotates the current view in ViewAxonometric (as is: Y).
You have two options:
For use the two macros, copy the first macro and name it "Macro_Rotate_ViewAxonometric_Y" (mode 1) without change the code and use this icon
Copy the second macro and name it "Macro_Rotate_ViewAxonometric_Z" (mode 2) and:
comment the line
11 #rot.setValue(coin.SbVec3f(1,0,0),-math.pi/2) # Y pointing upwards (mode 1)
and uncomment the line
12 rot.setValue(coin.SbVec3f(0,0,1),math.pi/2) # Z pointing upwards (mode 2 uncomment for use) and use this icon
Macro_Rotate_ViewAxonometric.FCMacro
import math import pivy from pivy import coin Gui.activeDocument().activeView().viewAxonometric() Gui.SendMsgToActiveView("ViewFit") cam = Gui.ActiveDocument.ActiveView.getCameraNode() rot = coin.SbRotation() rot.setValue(coin.SbVec3f(1,0,0),-math.pi/2) # Y pointing upwards (mode 1) #rot.setValue(coin.SbVec3f(0,0,1),math.pi/2) # Z pointing upwards (mode 2 uncomment for use) nrot = cam.orientation.getValue() * rot cam.orientation = nrot Gui.SendMsgToActiveView("ViewFit")