Std PerspectiveCamera: Difference between revisions

From FreeCAD Documentation
No edit summary
(Removed 'In Progress'.)
Line 1: Line 1:
<languages/>
<languages/>

{{Page in progress}}

<translate>
<translate>



Revision as of 09:16, 1 April 2020

Std PerspectiveCamera

Menu location
View → Perspective view
Workbenches
All
Default shortcut
V P
Introduced in version
-
See also
Std OrthographicCamera

Description

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

Two cubes with the same dimensions in perspective view

Usage

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

Scripting

See also: FreeCAD Scripting Basics.

To change the view to perspective 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('Perspective')
FreeCADGui.ActiveDocument.ActiveView.getCameraType()