TechDraw HorizontalExtentDimension/en: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
 
(Updating to match new version of source page)
 
(21 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
<languages/>

{{Docnav|[[TechDraw_Dimension_Length|New Length]]|[[TechDraw_Dimension_Vertical Extent|New Vertical Extent]]|[[TechDraw_Module|TechDraw]]|IconL=Techdraw_Dimension_Length.png|IconC=Workbench_TechDraw.svg|IconR=TechDraw_Dimension_HExtent.svg}}
{{Docnav
|[[TechDraw_3PtAngleDimension|3PtAngleDimension]]
|[[TechDraw_VerticalExtentDimension|VerticalExtentDimension]]
|[[TechDraw_Workbench|TechDraw]]
|IconL=TechDraw_3PtAngleDimension.svg
|IconR=TechDraw_VerticalExtentDimension.svg
|IconC=Workbench_TechDraw.svg
}}


{{GuiCommand
{{GuiCommand
|Name=TechDraw Dimension Horizontal Extent
|Name=TechDraw HorizontalExtentDimension
|MenuLocation=TechDraw → Dimension Horizontal Extent
|MenuLocation=TechDraw → Dimensions → Insert Horizontal Extent Dimension
|Workbenches=[[TechDraw Module|TechDraw]]
|Workbenches=[[TechDraw_Workbench|TechDraw]]
|Version=0.19
|SeeAlso=[[TechDraw Dimension Length]], [[TechDraw Dimension Vertical Extent]]
|SeeAlso=[[TechDraw_LengthDimension|TechDraw LengthDimension]], [[TechDraw_VerticalExtentDimension|TechDraw VerticalExtentDimension]]
}}
}}


==Description==
==Description==


The Dimension Horizontal Extent 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. A CosmeticVertex will be placed at each point.
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.


[[Image:TechDraw_Dimension_Horizontal_Extent_example.png|400px]]
{{Caption|Horizontal and vertical extent dimensions of a B-spline}}


==Usage==
[[Image:TechDraw_Dimension_Horizontal_Extent_example.png]]
{{Caption|Horizontal Extent dimension of BSpline Face}}


# Select a View or a collection of Edges in a View.
==How to use==
# There are several ways to invoke the tool:
#* Press the {{Button|[[Image:TechDraw_HorizontalExtentDimension.svg|16px]] [[TechDraw_HorizontalExtentDimension|Insert Horizontal Extent Dimension]]}} button.
#* Select the {{MenuCommand|TechDraw → Dimensions → [[Image:TechDraw_HorizontalExtentDimension.svg|16px]] Insert Horizontal Extent Dimension}} option from the menu.
# A dimension is added to the View.
# The dimension may be dragged to the desired position.
# If needed, add tolerances as described on [[TechDraw_Geometric_dimensioning_and_tolerancing#Tolerances|this page]].


===Change properties===
# Select a View or a collection of Edges in a View.

# Press the {{Button|[[Image:TechDraw_Dimension_HExtent.svg|16px]] [[TechDraw Dimension Horizontal Extent|Dimension Horizontal Extent]]}} button
To change the properties of a dimension object either double-click it in the drawing or in the [[Tree_view|Tree view]]. This will open the [[TechDraw_LengthDimension#Dimension_dialog|Dimension dialog]].
# A dimension will be added to the View. The dimension may be dragged to the desired position.


== Limitations ==
== Limitations ==


Dimension objects are vulnerable to "topological naming" issues. See the information in the [[TechDraw Dimension Length]] tool for more information.
Dimension objects are vulnerable to the "[[Topological_naming_problem|topological naming problem]]". See [[TechDraw_LengthDimension|TechDraw LengthDimension]].

==Notes==

See [[TechDraw_LengthDimension#Notes|TechDraw LengthDimension]].


==Properties==
==Properties==


See [[TechDraw_LengthDimension#Properties|TechDraw LengthDimension]]. Exceptions noted below.
This object has the same properties as the [[TechDraw Dimension Length]] tool. See that tool for details. Exceptions noted.


=== Data ===
=== Data ===


{{Properties_Title|Base}}
* {{PropertyData|MeasureType}}: {{TRUE}} - based on 3D geometry or "Projected" - based on the drawing. Not normally manipulated directly by the end user. Not yet implemented for Dimension Horizontal Extent.

* {{PropertyData|Measure Type|Enumeration}}: Not yet implemented for extent dimensions.


==Scripting==
==Scripting==


{{Emphasis|See also:}} [[TechDraw API]] and [[FreeCAD Scripting Basics]].
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].


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


{{Code|code=
{{Code|code=
selection = [(view1, 'Edge1'), (view1, 'Edge2')] #or [] for all
selection = ['Edge1', 'Edge2'] # or [] for all
hExtentDim = TechDraw.Dimension.makeExtentDim(selection, HORIZONTAL)
rc = page.addView(hExtentDim)
}}


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
{{Docnav|[[TechDraw_Dimension_Length|New Length]]|[[TechDraw_Dimension_Vertical Extent|New Vertical Extent]]|[[TechDraw_Module|TechDraw]]|IconL=Techdraw_Dimension_Length.png|IconC=Workbench_TechDraw.svg|IconR=TechDraw_Dimension_HExtent.svg}}
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.
{{TechDraw Tools navi}}
}}


{{Docnav
|[[TechDraw_3PtAngleDimension|3PtAngleDimension]]
|[[TechDraw_VerticalExtentDimension|VerticalExtentDimension]]
|[[TechDraw_Workbench|TechDraw]]
|IconL=TechDraw_3PtAngleDimension.svg
|IconR=TechDraw_VerticalExtentDimension.svg
|IconC=Workbench_TechDraw.svg
}}


{{TechDraw Tools navi{{#translation:}}}}
{{Userdocnavi}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Latest revision as of 19:03, 27 July 2023

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

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

  1. Select a View or a collection of Edges in a View.
  2. There are several ways to invoke the tool:
  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

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

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

Notes

See TechDraw LengthDimension.

Properties

See TechDraw LengthDimension. Exceptions noted below.

Data

Base

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

Scripting

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.