Std ViewFitAll/en: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>

{{Docnav
|[[Std_MainFullscreen|Std MainFullscreen]]
|[[Std_ViewFitSelection|Std ViewFitSelection]]
|[[Std_View_Menu|Std View Menu]]
|IconL=Std_MainFullscreen.svg
|IconR=Std_ViewFitSelection.svg
|IconC=Freecad.svg
}}

{{GuiCommand
{{GuiCommand
|Name=Std ViewFitAll
|Name=Std ViewFitAll
|MenuLocation={{StdMenu|[[Std View Menu|View]]}} → Standard views‏‎FitAll
|MenuLocation=View → Standard viewsFit all
|Workbenches=All
|Workbenches=All
|Shortcut={{KEY|V}} {{KEY|F}}
|Shortcut={{KEY|V}} {{KEY|F}}
|SeeAlso=[[Std_ViewFitSelection|Fit selection]]
|SeeAlso=[[Std_ViewFitSelection|Std ViewFitSelection]]
}}
}}


==Description==
==Description==

The [[Image:Std_ViewFitAll.svg|24px]] [[Std ViewFitAll|FitAll]] command zooms outwards until all visible objects in the active document are shown in the [[3D view]].
The '''Std ViewFitAll''' command zooms and pans the camera so that all visible objects fit inside the active [[3D_view|3D view]].


==Usage==
==Usage==

# There are several ways to invoke the ViewFitAll command:
# There are several ways to invoke the command:
#* Click on [[Image:Std_ViewFitAll.svg|24px]] button in the toolbar
#* Press the {{Button|[[Image:Std_ViewFitAll.svg|16px]] [[Std_ViewFitAll|Std ViewFitAll]]}} button.
#* Use the {{KEY|V}} then {{KEY|F}} keyboard shortcut
#* Use the {{MenuCommand|{{StdMenu|[[Std View Menu|View]]}} → Standard views → [[Image:Std_ViewFitAll.svg|16px]] Fit all}} entry from the top menu
#* Select the {{MenuCommand|View → Standard views → [[Image:Std_ViewFitAll.svg|16px]] Fit all}} option from the menu.
#* Select the {{MenuCommand|[[Image:Std_ViewFitAll.svg|16px]] Fit all}} option from the [[3D_view|3D view]] context menu.
Note: The command is also available by right clicking in the [[3D view]] (and having nothing pre-selected).
#* Use the keyboard shortcut: {{KEY|V}} then {{KEY|F}}.

==Notes==

* It is also possible to zoom to a 'fit all' via the Mini-cube menu of the [[Navigation_Cube|Navigation Cube]].

==Scripting==

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

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

{{Code|code=
import FreeCADGui

FreeCADGui.ActiveDocument.ActiveView.fitAll()
}}

Alternatively the {{incode|SendMsgToActiveView}} method of the FreeCADGui object can be used. This method is not available if FreeCAD is in console mode.

{{Code|code=
import FreeCADGui

FreeCADGui.SendMsgToActiveView('ViewFit')
}}

{{Docnav
|[[Std_MainFullscreen|Std MainFullscreen]]
|[[Std_ViewFitSelection|Std ViewFitSelection]]
|[[Std_View_Menu|Std View Menu]]
|IconL=Std_MainFullscreen.svg
|IconR=Std_ViewFitSelection.svg
|IconC=Freecad.svg
}}


{{Std Base navi{{#translation:}}}}
{{Std Base navi{{#translation:}}}}

Revision as of 20:04, 9 April 2020

Std ViewFitAll

Menu location
View → Standard views → Fit all
Workbenches
All
Default shortcut
V F
Introduced in version
-
See also
Std ViewFitSelection

Description

The Std ViewFitAll command zooms and pans the camera so that all visible objects fit inside the active 3D view.

Usage

  1. There are several ways to invoke the command:
    • Press the Std ViewFitAll button.
    • Select the View → Standard views → Fit all option from the menu.
    • Select the Fit all option from the 3D view context menu.
    • Use the keyboard shortcut: V then F.

Notes

  • It is also possible to zoom to a 'fit all' via the Mini-cube menu of the Navigation Cube.

Scripting

See also: FreeCAD Scripting Basics.

To change the view to 'fit all' use the fitAll method of the ActiveView object. This method is not available if FreeCAD is in console mode.

import FreeCADGui

FreeCADGui.ActiveDocument.ActiveView.fitAll()

Alternatively the SendMsgToActiveView method of the FreeCADGui object can be used. This method is not available if FreeCAD is in console mode.

import FreeCADGui

FreeCADGui.SendMsgToActiveView('ViewFit')