Std OrthographicCamera: Difference between revisions

From FreeCAD Documentation
No edit summary
No edit summary
Line 38: Line 38:
#* Select the {{MenuCommand|View → Orthographic view}} option from the menu.
#* Select the {{MenuCommand|View → Orthographic view}} option from the menu.
#* Use the keyboard shortcut: {{KEY|V}} then {{KEY|O}}.
#* Use the keyboard shortcut: {{KEY|V}} then {{KEY|O}}.

==Scripting==

{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].

To change the view to orthographic use the {{incode|setCameraType}} method of the ActiveView object. This method is not available if FreeCAD is in console mode.

</translate>
{{Code|code=
import FreeCADGui

FreeCADGui.ActiveDocument.ActiveView.setCameraType("Orthographic")
FreeCADGui.ActiveDocument.ActiveView.getCameraType()
}}
<translate>


{{Docnav
{{Docnav

Revision as of 10:24, 28 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 OrthographicCamera

Menu location
View → Orthographic view
Workbenches
All
Default shortcut
V O
Introduced in version
-
See also
Std PerspectiveCamera

Description

The Std OrthographicCamera command switches the camera in the active 3D view to orthographic view mode. In this mode, objects that are further from the camera do not appear smaller than those that are closer.

Two cubes with the same dimensions in orthographic view

Usage

  1. There are several ways to invoke the command:
    • Select the View → Orthographic view option from the menu.
    • Use the keyboard shortcut: V then O.

Scripting

See also: FreeCAD Scripting Basics.

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

import FreeCADGui

FreeCADGui.ActiveDocument.ActiveView.setCameraType("Orthographic")
FreeCADGui.ActiveDocument.ActiveView.getCameraType()