Std ViewTop/en: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
 
(Updating to match new version of source page)
Line 5: Line 5:
|Workbenches=All
|Workbenches=All
|Shortcut=2
|Shortcut=2
|SeeAlso=[[Std_OrthographicCamera|Orthographic camera]]
|SeeAlso=[[Std_ViewFront|ViewFront]], [[Std_ViewRight|ViewRight]]
}}
}}


==Description==
==Description==


Puts the camera in the [[3D view|3D view]] looking down from above, in the direction of the negative Z axis.
[[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]}}.


[[File:FreeCAD_views_front.svg]]
[[File:FreeCAD_views_front.svg]]
Line 17: Line 17:
==How to use==
==How to use==


* Go to the menu {{MenuCommand|View → Standard views → [[File:Std_ViewTop.svg|16px]] [[Std_ViewIsometric|Top]]}}.
* Go to the menu {{MenuCommand|View → Standard views → [[File:Std_ViewTop.svg|16px]] [[Std_ViewTop|Top]]}}.
* Or press the {{Button|[[File:Std_ViewTop.svg|16px]] [[Std_ViewTop|Top]]}} button.
* Or press the {{Button|[[File:Std_ViewTop.svg|16px]] [[Std_ViewTop|Top]]}} button.
* Or press {{KEY|2}} in the numerical pad of the keyboard.
* Or press {{KEY|2}} in the numerical pad of the keyboard.
Line 23: Line 23:
== Scripting ==
== Scripting ==


The isometric view can be set from the [[Python|Python]] console.
The top view can be set from the [[Python console|Python console]].


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.
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.


{{Code|code=
{{Code|code=
import FreeCAD as App
App.Gui.ActiveDocument.ActiveView.viewTop()

import FreeCADGui as Gui
import FreeCADGui as Gui
Gui.ActiveDocument.ActiveView.viewTop()
Gui.ActiveDocument.ActiveView.viewTop()

Gui.ActiveDocument.ActiveView.getViewDirection()
}}
}}



Revision as of 15:41, 24 November 2019

Std ViewTop

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

Description

Std ViewTop puts the camera in the 3D view looking down from above, in the direction of the negative Z axis, [0.0, 0.0, -1.0].

The top view sets the camera looking down, in the direction of the negative Z axis.

How to use

  • Go to the menu View → Standard views → Top.
  • Or press the Top button.
  • Or press 2 in the numerical pad of the keyboard.

Scripting

The top view can be set from the Python console.

It is a method of the ActiveView of the ActiveDocument. The ActiveView only exists when the graphical interface is available; it does not exist when FreeCAD is used in purely console mode.

import FreeCADGui as Gui
Gui.ActiveDocument.ActiveView.viewTop()

Gui.ActiveDocument.ActiveView.getViewDirection()