Macro Align Face Object to View/fr: Difference between revisions

From FreeCAD Documentation
mNo edit summary
(Updating to match new version of source page)
 
(27 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
{{Macro/fr|Icon=Text-x-python|Name=Macro Align Face Object to View|Name/fr=Macro Align Face Object to View|Description=This macro directs the face of the object on the side of the ActiveView.|Author=Mario52|Version=0.1 (16/01/2015)}}

{{Macro/fr
|Name=Macro Align Face Object to View
|Icon=Macro_Align_Face_Object_to_View.png
|Description=Cette macro dirige la face de l'objet sur la face de la vue active.
|Author=Mario52
|Version=0.1
|Date=2015-01-16
|Download=[https://www.freecadweb.org/wiki/images/d/d5/Macro_Align_Face_Object_to_View.png ToolBar Icon]
|FCVersion=Toutes
|SeeAlso=[[File:FCCamera 00.png|32px|FCCamera]] [[Macro_FCCamera/fr|Macro_FCCamera]]
}}


==Description==
==Description==
This macro directs the face of the object on the side of the ActiveView (camera).
In the case of the face of a borehole (or internal or cylinder) face drilling facing the screen


Cette macro dirige la face de l'objet sur la face de la vue active (caméra).
==How to use==
Dans le cas de la face d'un perçage (ou interne ou cylindre), face à l'écran.
* Select your object and run the macro

* Your object will be of the camera
==Utilisation==

* Sélectionnez une face de votre objet et lancez la macro.
* Votre sélection fait face à l'écran.


==Script==
==Script==

Icône de la barre d'outils
[[Image:Macro_Align_Face_Object_to_View.png]]

'''Macro_Align_Face_Object_to_View.FCMacro'''
'''Macro_Align_Face_Object_to_View.FCMacro'''


{{Code|code=
{{MacroCode|code=
# This macro directs the face of the object on the side of the ActiveView (camera)
# This macro directs the face of the object on the side of the ActiveView (camera)
# extact
# extact FCCamera
# 16/01/2015
# 16/01/2015


__title__="FCCamera"
__title__="Macro_Align_Face_Object_to_View"
__author__ = "Mario52"
__author__ = "Mario52"


Line 38: Line 56:


{{clear}}
{{clear}}
<languages/>

Latest revision as of 10:08, 21 December 2021

Other languages:

Macro Align Face Object to View

Description
Cette macro dirige la face de l'objet sur la face de la vue active.

Version macro : 0.1
Date dernière modification : 2015-01-16
Version FreeCAD : Toutes
Téléchargement : ToolBar Icon
Auteur: Mario52
Auteur
Mario52
Téléchargement
ToolBar Icon
Liens
Version Macro
0.1
Dernière modification
2015-01-16
Version(s) FreeCAD
Toutes
Raccourci clavier
None
Voir aussi
FCCamera Macro_FCCamera

Description

Cette macro dirige la face de l'objet sur la face de la vue active (caméra). Dans le cas de la face d'un perçage (ou interne ou cylindre), face à l'écran.

Utilisation

  • Sélectionnez une face de votre objet et lancez la macro.
  • Votre sélection fait face à l'écran.

Script

Icône de la barre d'outils

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")

Links

Original macro by wmayer Looking for some helpful GUI-commands