Std ViewFitSelection: Difference between revisions

From FreeCAD Documentation
No edit summary
No edit summary
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<languages/>
<languages/>

{{Page in progress}}

<translate>
<translate>


<!--T:10-->
{{Docnav
{{Docnav
|[[Std_ViewFitAll|Std ViewFitAll]]
|[[Std_ViewFitAll|ViewFitAll]]
|[[Std_ViewIsometric|Std ViewIsometric]]
|[[Std_ViewIsometric|ViewIsometric]]
|[[Std_View_Menu|Std View Menu]]
|[[Std_View_Menu|Std View Menu]]
|IconL=Std_ViewFitAll.svg
|IconL=Std_ViewFitAll.svg
Line 26: Line 24:


<!--T:8-->
<!--T:8-->
The '''Std ViewFitSelection''' command zooms and pans the camera so that all selected objects fit inside the active 3D view.
The '''Std ViewFitSelection''' command zooms and pans the camera so that all selected objects fit inside the active [[3D_view|3D view]]. This command is useful in cases where for some reason objects are beyond the boundaries of the current 3D View or can't be easily found using [[Mouse_navigation|3D navigation]].


==Usage== <!--T:3-->
==Usage== <!--T:3-->


<!--T:9-->
<!--T:9-->
# Select one or more objects.
# There are several ways to invoke the command:
# There are several ways to invoke the command:
#* Press the {{Button|[[Image:Std_ViewFitSelection.svg|16px]] [[Std_ViewFitSelection|Std ViewFitSelection]]}} button.
#* Press the {{Button|[[Image:Std_ViewFitSelection.svg|16px]] [[Std_ViewFitSelection|Std ViewFitSelection]]}} button.
Line 37: Line 36:
#* Use the keyboard shortcut: {{KEY|V}} then {{KEY|S}}.
#* Use the keyboard shortcut: {{KEY|V}} then {{KEY|S}}.


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


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


<!--T:13-->
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 selection' the {{incode|SendMsgToActiveView}} method of the FreeCADGui object can be used. This method is not available if FreeCAD is in console mode.


</translate>
</translate>
Line 47: Line 48:
import FreeCADGui
import FreeCADGui


FreeCADGui.ActiveDocument.ActiveView.fitAll()
FreeCADGui.SendMsgToActiveView('ViewSelection')
}}
}}
<translate>
<translate>



<!--T:14-->
{{Docnav
{{Docnav
|[[Std_ViewFitAll|Std ViewFitAll]]
|[[Std_ViewFitAll|ViewFitAll]]
|[[Std_ViewIsometric|Std ViewIsometric]]
|[[Std_ViewIsometric|ViewIsometric]]
|[[Std_View_Menu|Std View Menu]]
|[[Std_View_Menu|Std View Menu]]
|IconL=Std_ViewFitAll.svg
|IconL=Std_ViewFitAll.svg
Line 63: Line 66:
{{Std Base navi{{#translation:}}}}
{{Std Base navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Latest revision as of 10:34, 19 March 2023

Std ViewFitSelection

Menu location
View → Standard views → Fit selection
Workbenches
All
Default shortcut
V S
Introduced in version
-
See also
Std ViewFitAll

Description

The Std ViewFitSelection command zooms and pans the camera so that all selected objects fit inside the active 3D view. This command is useful in cases where for some reason objects are beyond the boundaries of the current 3D View or can't be easily found using 3D navigation.

Usage

  1. Select one or more objects.
  2. There are several ways to invoke the command:
    • Press the Std ViewFitSelection button.
    • Select the View → Standard views → Fit selection option from the menu.
    • Select the Fit selection option from the 3D view context menu.
    • Use the keyboard shortcut: V then S.

Scripting

See also: FreeCAD Scripting Basics.

To change the view to 'fit selection' 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('ViewSelection')