Jump to content

TechDraw HorizontalExtentDimension

From FreeCAD Documentation
Revision as of 08:53, 20 September 2024 by Roy 043 (talk | contribs) (New way to invoke.)

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)

TechDraw HorizontalExtentDimension

Menu location
TechDraw → Dimensions → Insert Horizontal Extent Dimension
Workbenches
TechDraw
Default shortcut
None
Introduced in version
0.19
See also
TechDraw LengthDimension, TechDraw VerticalExtentDimension

Description[edit | edit source]

The TechDraw HorizontalExtentDimension tool adds a linear dimension to a View. The dimension extends from the left most point on the selected objects to the right most point.

Horizontal and vertical extent dimensions of a B-spline

Usage[edit | edit source]

  1. Select a View or a collection of Edges in a View.
  2. There are several ways to invoke the tool:
    • introduced in 1.0: If the Dimensioning tools preference is set to Single tool (default): press the down arrow to the right of the button and select the Insert Horizontal Extent Dimension option from the dropdown.
    • If this preference has a different value (and in 0.21 and below): press the Insert Horizontal Extent Dimension button.
    • Select the TechDraw → Dimensions → Insert Horizontal Extent Dimension option from the menu.
  3. A dimension is added to the View.
  4. The dimension may be dragged to the desired position.
  5. If needed, add tolerances as described on this page.

Change properties[edit | edit source]

To change the properties of a dimension object either double-click it in the drawing or in the Tree view. This will open the Dimension dialog.

Limitations[edit | edit source]

Dimension objects are vulnerable to the "topological naming problem". See TechDraw LengthDimension.

Notes[edit | edit source]

See TechDraw LengthDimension.

Properties[edit | edit source]

See TechDraw LengthDimension. Exceptions noted below.

Data[edit | edit source]

Base

  • DataMeasure Type (Enumeration): Not yet implemented for extent dimensions.

Scripting[edit | edit source]

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

The Horizontal Extent Dimension tool can be used in macros and from the Python console by using the following functions:

selection = ['Edge1', 'Edge2']                      # or [] for all

TechDraw.makeExtentDim(view1, selection, 0)         # view1 is a DrawViewPart; 0 for horizontal
App.ActiveDocument.DimExtent.Y = -60                # offset dimension line from dimensioned edges in Y direction
App.ActiveDocument.DimExtent.X = 10                 # offset dimension text along dimension line in X direction
App.ActiveDocument.DimExtent.FormatSpec = '%.0f'    # Dimension format

TechDraw.makeExtentDim(view1, selection, 1)         # view1 is a DrawViewPart; 1 for vertical
App.ActiveDocument.DimExtent001.X = -130            # offset dimension line from dimensioned edges in X direction
App.ActiveDocument.DimExtent001.Y = 10              # offset dimension text along dimension line in Y direction
App.ActiveDocument.DimExtent001.FormatSpec = '%.0f'

# Note the dimension names are 'DimExtent', 'DimExtent001' etc in the order created.