Skip to main content

Fit

The fit command calculates the bounding box of all entities in the drawing and adjusts both zoom level and pan position so every entity is visible with a small margin. It is the fastest way to recover a lost view or orient yourself after importing a DXF file.

Fitting the view

Click the Fit toolbar button or type fit in the terminal. The view adjusts immediately and the command exits — no interaction required.

Double-click the middle mouse button triggers the same Fit operation at any time without activating any command — the fastest shortcut to reset a lost view mid-drawing.

How the bounding box fit works

  1. Fit finds the axis-aligned bounding box enclosing all entities (min X, max X, min Y, max Y).
  2. The zoom level is set so the taller or wider dimension fills the canvas with a margin.
  3. The view is centered on the bounding box midpoint.
Drawing stateResult
Wider than tallZoom constrained by width
Taller than wideZoom constrained by height
Single entityFits around just that entity
Empty drawingView does not change

Fit vs manual zoom controls

FitZoom In / Zoom OutScroll wheel
Centers onAll entitiesViewport midpointCursor
Step sizeAutomatic (one shot)1.5× per step~1.1× per tick
Best forRecovering lost view, post-import orientStepping in/out from centerPrecise cursor-targeted zoom

Keyboard reference

There is no keyboard shortcut for this command. Use the middle mouse button double-click shortcut instead.

CommandWhat it does
PanShifts the viewport without zooming
Zoom InMultiplies zoom by 1.5× per step
Zoom OutDivides zoom by 1.5× per step