Std ViewTop: Difference between revisions

From FreeCAD Documentation
No edit summary
(Revised. 'In progress' for now.)
Line 1: Line 1:
<languages/>
<languages/>

{{Page in progress}}

<translate>
<translate>

{{Docnav
|[[Std_ViewFront|Std ViewFront]]
|[[Std_ViewRight|Std ViewRight]]
|[[Std_View_Menu|Std View Menu]]
|IconL=Std_ViewFront.svg
|IconR=Std_ViewRight.svg
|IconC=Freecad.svg
}}

<!--T:1-->
<!--T:1-->
{{GuiCommand
{{GuiCommand
|Name=Std ViewTop
|Name=Std ViewTop
|MenuLocation={{StdMenu|[[Std View Menu|View]]}} → Standard views → Top
|MenuLocation=View → Standard views → Top
|Workbenches=All
|Workbenches=All
|Shortcut={{KEY|2}}
|Shortcut={{KEY|2}}
|SeeAlso=[[Std_ViewFront|ViewFront]], [[Std_ViewRight|ViewRight]]
|SeeAlso=[[Std_ViewFront|Std ViewFront]], [[Std_ViewRight|Std ViewRight]]
}}
}}


Line 13: Line 26:


<!--T:3-->
<!--T:3-->
[[Std_ViewTop|Std ViewTop]] puts the camera in the [[3D view|3D view]] looking down from above, in the direction of the negative Z axis, {{incode|[0.0, 0.0, -1.0]}}.
The '''Std ViewTop''' command changes the view direction of the active [[3D_view|3D view]] to match the direction of the negative Z axis.


</translate>
</translate>
[[File:FreeCAD_views_front.svg]]
[[Image:FreeCAD_views_front.svg]]
<translate>
<translate>
<!--T:4-->
<!--T:4-->
{{Caption|The top view sets the camera looking down, in the direction of the negative Z axis.}}
{{Caption|Arrow 2 points in the direction of the top view}}


==Usage== <!--T:5-->
==Usage== <!--T:5-->


<!--T:6-->
<!--T:6-->
# There are several ways to invoke the command:
* Go to the menu {{MenuCommand|{{StdMenu|[[Std View Menu|View]]}} → Standard views → [[File:Std_ViewTop.svg|16px]] [[Std_ViewTop|Top]]}}.
* Or press the {{Button|[[File:Std_ViewTop.svg|16px]] [[Std_ViewTop|Top]]}} button.
#* Press the {{Button|[[Image:Std_ViewTop.svg|16px]] [[Std_ViewTop|Std ViewTop]]}} button.
#* Select the {{MenuCommand|View → Standard views → [[Image:Std_ViewTop.svg|16px]] Top}} option from the menu.
* Or press {{KEY|2}} in the numerical pad of the keyboard.
#* Select the {{MenuCommand|Standard views → [[Image:Std_ViewTop.svg|16px]] Top}} option from the [[3D_view|3D view]] context menu.
#* Use the keyboard shortcut: {{KEY|2}}.


== Scripting == <!--T:7-->
==Scripting== <!--T:7-->


<!--T:8-->
<!--T:8-->
{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].
The top view can be set from the [[Python console|Python console]].


<!--T:9-->
<!--T:9-->
It is a method of the {{incode|ActiveView}} of the {{incode|ActiveDocument}}. The {{incode|ActiveView}} only exists when the graphical interface is available; it does not exist when FreeCAD is used in purely console mode.
To change the active view to top view use the {{incode|viewTop}} method of the ActiveView object. This method is not available if FreeCAD is in console mode.


</translate>
</translate>
{{Code|code=
{{Code|code=
import FreeCADGui as Gui
import FreeCADGui
Gui.ActiveDocument.ActiveView.viewTop()


Gui.ActiveDocument.ActiveView.getViewDirection()
FreeCADGui.ActiveDocument.ActiveView.viewTop()
FreeCADGui.ActiveDocument.ActiveView.getViewDirection()
}}
}}
<translate>
<translate>

{{Docnav
|[[Std_ViewFront|Std ViewFront]]
|[[Std_ViewRight|Std ViewRight]]
|[[Std_View_Menu|Std View Menu]]
|IconL=Std_ViewFront.svg
|IconR=Std_ViewRight.svg
|IconC=Freecad.svg
}}


</translate>
</translate>

Revision as of 22:32, 27 March 2020

This documentation is a work in progress. Please don't mark it as translatable since it will change in the next hours and days.


Std ViewTop

Menu location
View → Standard views → Top
Workbenches
All
Default shortcut
2
Introduced in version
-
See also
Std ViewFront, Std ViewRight

Description

The Std ViewTop command changes the view direction of the active 3D view to match the direction of the negative Z axis.

Arrow 2 points in the direction of the top view

Usage

  1. There are several ways to invoke the command:
    • Press the Std ViewTop button.
    • Select the View → Standard views → Top option from the menu.
    • Select the Standard views → Top option from the 3D view context menu.
    • Use the keyboard shortcut: 2.

Scripting

See also: FreeCAD Scripting Basics.

To change the active view to top view use the viewTop method of the ActiveView object. This method is not available if FreeCAD is in console mode.

import FreeCADGui

FreeCADGui.ActiveDocument.ActiveView.viewTop()
FreeCADGui.ActiveDocument.ActiveView.getViewDirection()