Std ViewFitAll: Difference between revisions

From FreeCAD Documentation
No edit summary
(Mini-cube menu now calls this command.)
 
(11 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<languages/>
<languages/>

{{Page in progress}}

<translate>
<translate>


<!--T:8-->
{{Docnav
{{Docnav
|[[Std_MainFullscreen|Std MainFullscreen]]
|[[Std_MainFullscreen|MainFullscreen]]
|[[Std_ViewFitSelection|Std ViewFitSelection]]
|[[Std_ViewFitSelection|ViewFitSelection]]
|[[Std_View_Menu|Std View Menu]]
|[[Std_View_Menu|Std View Menu]]
|IconL=Std_MainFullscreen.svg
|IconL=Std_MainFullscreen.svg
Line 25: Line 23:
==Description== <!--T:2-->
==Description== <!--T:2-->


<!--T:9-->
The '''Std ViewFitAll''' command zooms and pans the camera so that all visible objects fit inside the active [[3D_view|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== <!--T:3-->
==Usage== <!--T:3-->


<!--T:10-->
# There are several ways to invoke the command:
# There are several ways to invoke the command:
#* Press the {{Button|[[Image:Std_ViewFitAll.svg|16px]] [[Std_ViewFitAll|Std ViewFitAll]]}} button.
#* Press the {{Button|[[Image:Std_ViewFitAll.svg|16px]] [[Std_ViewFitAll|Std ViewFitAll]]}} button.
#* Select the {{MenuCommand|View → Standard views → [[Image:Std_ViewFitAll.svg|16px]] Fit all}} option from the 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.
#* Select the {{MenuCommand|[[Image:Std_ViewFitAll.svg|16px]] Fit all}} option from the [[3D_view|3D view]] context menu.
#* Select the {{MenuCommand|[[Image:Std_ViewFitAll.svg|16px]] Fit all}} option from the Mini-cube menu of the [[Navigation_Cube|Navigation Cube]].
#* Use the keyboard shortcut: {{KEY|V}} then {{KEY|F}}.
#* Use the keyboard shortcut: {{KEY|V}} then {{KEY|F}}.


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


<!--T:14-->
{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].
{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].


<!--T:15-->
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.
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.


Line 49: Line 52:
<translate>
<translate>


<!--T:16-->
Alternatively the {{incode|SendMsgToActiveView}} method of the FreeCADGui object can be used. This method is not available if FreeCAD is in console mode.
Alternatively the {{incode|SendMsgToActiveView}} method of the FreeCADGui object can be used. This method is not available if FreeCAD is in console mode.


Line 55: Line 59:
import FreeCADGui
import FreeCADGui


FreeCADGui.SendMsgToActiveView("ViewFit")
FreeCADGui.SendMsgToActiveView('ViewFit')
}}
}}
<translate>
<translate>



<!--T:17-->
{{Docnav
{{Docnav
|[[Std_MainFullscreen|Std MainFullscreen]]
|[[Std_MainFullscreen|MainFullscreen]]
|[[Std_ViewFitSelection|Std ViewFitSelection]]
|[[Std_ViewFitSelection|ViewFitSelection]]
|[[Std_View_Menu|Std View Menu]]
|[[Std_View_Menu|Std View Menu]]
|IconL=Std_MainFullscreen.svg
|IconL=Std_MainFullscreen.svg

Latest revision as of 09:55, 7 June 2023

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.
    • Select the Fit all option from the Mini-cube menu of the Navigation Cube.
    • Use the keyboard shortcut: V then F.

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')