| Beschreibung |
|---|
| Dieses Makro richtet die Vorderseite des Objekts auf die Seite des AktiveAnsicht aus. Versionsmakro : 0.1 Datum der letzten Änderung : 2015-01-16 FreeCAD version : Alle Herunterladen : Werkzeugleisten-Symbol Autor: Mario52 |
| Autor |
| Mario52 |
| Herunterladen |
| Werkzeugleisten-Symbol |
| Links |
| Makros Rezepte Wie man Makros installiert Symbolleisten anpassen |
| Macro-Version |
| 0.1 |
| Datum der letzten Änderung |
| 2015-01-16 |
| FreeCAD-Version(s) |
| Alle |
| Standardverknüpfung |
| None |
| Siehe auch |
Dieses Makro richtet die Fläche des Objekts auf die Seite des AktiveAnsicht (Kamera) aus. Im Falle einer Bohrlochfläche (oder einer Innen- oder Zylinderfläche) wird die Bohrfläche zum Bildschirm ausgerichtet.
Macro_Align_Face_Object_to_View.FCMacro
# This macro directs the face of the object on the side of the ActiveView (camera)
# extact FCCamera
# 16/01/2015
__title__="Macro_Align_Face_Object_to_View"
__author__ = "Mario52"
import pivy
from pivy import coin
try:
v=Gui.Selection.getSelectionEx()[0].SubObjects[0].Surface.Axis # to Axis
# v = Gui.Selection.getSelectionEx()[0].SubObjects[0].normalAt(0,0) # normalAt
r=App.Rotation(App.Vector(0,0,1),v)
Gui.ActiveDocument.ActiveView.setCameraOrientation(r.Q)
except Exception:
App.Console.PrintError("Select a face and run the macro"+"\n")
Original macro by wmayer Looking for some helpful GUI-commands