TechDraw LengthDimension: Difference between revisions

From FreeCAD Documentation
No edit summary
(PR10860)
 
(148 intermediate revisions by 10 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>

<!--T:23-->
<!--T:23-->
{{Docnav
{{Docnav
|[[TechDraw_ToggleFrame|ToggleFrame]]
|[[TechDraw_ClipMinus|ClipMinus]]
|[[TechDraw_HorizontalDimension|HorizontalDimension]]
|[[TechDraw_Dimension_Horizontal|New Horizontal]]
|[[TechDraw_Module|TechDraw]]
|[[TechDraw_Workbench|TechDraw]]
|IconL=techdraw-clipminus.svg
|IconL=TechDraw_ToggleFrame.svg
|IconR=TechDraw_HorizontalDimension.svg
|IconC=Workbench_TechDraw.svg
|IconC=Workbench_TechDraw.svg
|IconR=Techdraw_Dimension_Horizontal.png
}}
}}


<!--T:1-->
<!--T:1-->
{{GuiCommand
{{GuiCommand
|Name=TechDraw Dimension Length
|Name=TechDraw LengthDimension
|MenuLocation=TechDraw → Dimension Length
|MenuLocation=TechDraw → Dimensions → Insert Length Dimension
|Workbenches=[[TechDraw Module|TechDraw]]
|Workbenches=[[TechDraw_Workbench|TechDraw]]
|SeeAlso=[[TechDraw Dimension Horizontal|TechDraw Dimension Horizontal]], [[TechDraw Dimension Vertical|TechDraw Dimension Vertical]]
|SeeAlso=[[TechDraw_HorizontalDimension|TechDraw HorizontalDimension]], [[TechDraw_VerticalDimension|TechDraw VerticalDimension]]
}}
}}


Line 22: Line 23:


<!--T:11-->
<!--T:11-->
The Dimension Length tool adds a linear dimension to a View. The dimension may be between the distance between two vertices, the length of one edge or the distance between 2 edges. The distance will initially be the projected distance (ie as shown on the drawing), but this may be changed to the actual 3D distance using the {{Button|[[Image:TechDraw_Dimension_Link.svg|16px]] [[TechDraw_Dimension_Link|Link Dimension]]}} tool.
The '''TechDraw LengthDimension''' tool adds a linear dimension to a View. The dimension may be the distance between two points, the length of a straight edge, the perpendicular distance between two edges, or the perpendicular distance between a point and an edge.


</translate>
</translate>
[[Image:TechDraw_Dimension_Length_example.png]]
[[Image:TechDraw_Dimension_Length_example.png|220px]]
<translate>
<translate>
<!--T:12-->
<!--T:12-->
{{Caption|Length dimension taken from two arbitrary nodes of the view}}
{{Caption|Length dimension taken from two points}}


==How to use== <!--T:3-->
==Usage== <!--T:3-->


<!--T:13-->
<!--T:13-->
# Select the points or edge which define your measurement.
# Select the points and/or edges which define your measurement. The geometry may be selected in the [[3D_view|3D view]] (first two options) or in the drawing (all options):
#* Select two points.
# Press the {{Button|[[Image:TechDraw_Dimension_Length.png|16px]] [[TechDraw Dimension Length|Dimension Length]]}} button
#* Select a single straight edge.
# A dimension will be added to the View. The dimension may be dragged to the desired position.
#* Select two edges. If both edges are straight they must be parallel. This will produce a perpendicular dimension if an endpoint of one of the edges has a perpendicular projection on the other edge (the resultant point must lie on the actual edge). If multiple solutions are possible, the endpoint that is closest to its projected point is used. If there is no valid perpendicular projection, the dimension will be the distance between the nearest endpoints of the edges.
#* Select a point and an edge. This will produce a perpendicular dimension. In {{VersionMinus|0.21}} the dimension will only be perpendicular if the point has a perpendicular projection on the actual edge. Else the dimension will be the distance between the point and the nearest endpoint of the edge.
# If you have selected geometry in the 3D view: add the correct TechDraw View to the selection by selecting it in the [[Tree_view|Tree view]].
# There are several ways to invoke the tool:
#* Press the {{Button|[[Image:TechDraw_LengthDimension.svg|16px]] [[TechDraw_LengthDimension|Insert Length Dimension]]}} button.
#* Select the {{MenuCommand|TechDraw → Dimensions → [[Image:TechDraw_LengthDimension.svg|16px]] Insert Length 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]].

===Display 3D measurement=== <!--T:68-->

<!--T:69-->
The dimension will initially display the projected measurement (i.e. as shown in the drawing). If required, and if the dimension is based on 3D references, it can be changed to the actual 3D measurement by changing its {{PropertyData|Measure Type}} property to {{Value|True}}. To base a dimension on 3D references select geometry from the [[3D_view|3D view]] at creation time, or use the [[Image:TechDraw_DimensionRepair.svg|16px]] [[TechDraw_DimensionRepair|TechDraw DimensionRepair]] tool to update existing dimensions.

===Change properties=== <!--T:70-->

<!--T:32-->
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 [[#Dimension dialog|Dimension dialog]].

==Dimension dialog== <!--T:33-->

<!--T:35-->
[[Image:TechDraw_DimensionDialog.png|frame|right]]

<!--T:34-->
The dimension dialog offers the following settings:

===Tolerancing=== <!--T:36-->

<!--T:37-->
* '''Theoretically Exact''': If checked, the dimension is specified as theoretically exact. As such, it shall not have any tolerances. The dimension will be displayed with a frame around the value: [[Image:TechDraw_theoretically_exact.png|100px]]

<!--T:38-->
* '''Equal Tolerance''': If checked, the over- and undertolerance are equal and the negated value of the overtolerance is used as undertolerance. The display will be [[Image:TechDraw_equal-tolerance.png|100px]], otherwise it will be [[Image:TechDraw_Non-equal-tolerance.png|80px]].

<!--T:39-->
* '''Overtolerance''': The amount by which the dimension may be larger.

<!--T:40-->
* '''Undertolerance''': The amount by which the dimension may be smaller.

===Formatting=== <!--T:41-->

<!--T:42-->
* '''Format Specifier''': How the dimension value will be formatted. By default the specifier is {{Value|%.xf}} where {{Value|x}} is the number of decimals. For the formatting syntax see [https://en.wikipedia.org/wiki/Printf_format_string this Wikipedia page]. There is also an additional {{Value|%w}} format that prints the specified number of digits after the decimal separator and removes trailing zeros. For example, {{Value|%.2w}} means that at most 2 decimals will be printed and any trailing zeros will be cut off.

<!--T:43-->
* '''Arbitrary Text''': If checked, the dimension is replaced by the content of the '''Format Specifier''' field.

<!--T:44-->
* '''OverTolerance Format Specifier''': How the overtolerance value will be formatted. By default the specifier is {{Value|%.xf}} where {{Value|x}} is the number of decimals. For the formatting syntax see [https://en.wikipedia.org/wiki/Printf_format_string this Wikipedia page].

<!--T:45-->
* '''UnderTolerance Format Specifier''': How the undertolerance value will be formatted. By default the specifier is {{Value|%.xf}} where {{Value|x}} is the number of decimals. For the formatting syntax see [https://en.wikipedia.org/wiki/Printf_format_string this Wikipedia page].

<!--T:46-->
* '''Arbitrary Tolerance Text''': If checked, the tolerances are replaced by the content of the '''OverTolerance Format Specifier''' '''UnderTolerance Format Specifier''' fields.

===Display Style=== <!--T:47-->

<!--T:48-->
* '''Flip Arrowheads''': Flips the direction of the dimension line arrows. By default they are inside the dimension line/arc and point outwards.

<!--T:49-->
* '''Color''': The color for lines and text.

<!--T:50-->
* '''Font Size''': The dimension text size.

<!--T:51-->
* '''Drawing Style''': The standard (and its style) according to which the dimension is drawn. See the property [[#View|'''Standard And Style''']] for details.

===Lines=== <!--T:52-->

<!--T:53-->
* '''Override Angles''': If checked, the usual angles for the dimension line and extension lines will be overridden by the specified values.

<!--T:54-->
* '''Dimension line angle''': Override value for angle of dimension line with view X axis (in degrees).

<!--T:55-->
* '''Use default''': Set dimension line angle to the usual angle.

<!--T:56-->
* '''Use selection''': Set dimension line angle to match the angle of the selected edge (or 2 vertices) in the view.

<!--T:57-->
* '''Extension line angle''': Override value for angle of extension lines with view X axis (in degrees).

<!--T:58-->
* '''Use default''': Set extension line angle to the usual angle.

<!--T:59-->
* '''Use selection''': Set extension line angle to match the angle of the selected edge (or 2 vertices) in the view.


== Limitations == <!--T:7-->
== Limitations == <!--T:7-->


<!--T:14-->
<!--T:14-->
Dimension objects are vulnerable to the "[[topological naming problem|topological naming problem]]". This means that if you modify the 3D geometry the faces and edges of the model may be renamed internally; if a dimension is attached to an edge that is then modified, the dimension may break. In general, it is not possible to keep the projected 2D dimensions synchronized with the actual 3D objects.
Dimension objects are vulnerable to the "[[Topological_naming_problem|topological naming problem]]". This means that if you modify the 3D geometry, the faces and edges of the model may be renamed internally. If a dimension is attached to an edge that is then modified, the dimension may break. In general, it is not possible to keep the projected 2D dimensions synchronized with the actual 3D objects.


<!--T:15-->
<!--T:15-->
Line 48: Line 144:


<!--T:26-->
<!--T:26-->
If you want to keep a TechDraw view with dimensions that won't break, you need to dimension an object that won't change.
If you want to keep a TechDraw view with dimensions that won't break, you need to dimension an object that won't change:
* Select the object that you want to project, then switch to the [[Part Workbench|Part Workbench]] and use {{MenuCommand|Part → [[Image:Part_SimpleCopy.svg|16px]] [[Part SimpleCopy|Create simple copy]]}}. This will create a single object that is not parametric, that is, no longer editable.
* Create a non-parametric copy of the object that you want to project with [[Part_SimpleCopy|Part SimpleCopy]].
* Select this copy, then use [[TechDraw NewView|TechDraw NewView]], and add the desired dimensions.
* Select this copy, then use [[TechDraw_View|TechDraw View]], and add the desired dimensions.
* If the original 3D model is modified, the modifications won't affect the simple copy, nor the dimensions in the TechDraw view.
* If the original 3D model is modified, the modifications won't affect the simple copy, nor the dimensions in the TechDraw view.

<!--T:31-->
See [[TechDraw_LandmarkDimension|Landmark Dimensions]] for another approach to circumventing the topological naming issue.

==Notes== <!--T:10-->

<!--T:20-->
* '''Edge selection'''. Edges can be difficult to select. You can adjust the selection area for edges by changing the [[TechDraw_Preferences#Advanced|Edge Fuzz preference]].
* '''Decimal places'''. Dimensions use the global decimal places setting by default. This can be changed in the [[TechDraw_Preferences#Dimensions|preferences]] or by changing the FormatSpec property.
* '''Multiple objects'''. Views may contain multiple 3D objects as Source. Dimensions may be applied to geometry from any object(s) in the View (ex from Object1.Vertex0 to Object2.Vertex3).


==Properties== <!--T:5-->
==Properties== <!--T:5-->


=== Data === <!--T:16-->
=== Data === <!--T:60-->

<!--T:61-->
{{Properties_Title|Base}}
{{Properties_Title|Base}}

* {{PropertyData|X}}: Horizontal position of the dimension text relative to the View.
<!--T:16-->
* {{PropertyData|Y}}: Vertical position of the dimension text relative to the View.
* {{PropertyData|References 2D|LinkSubList}}: The 2D drawing View object(s) on which the measurement is based. Used if {{PropertyData|Measure Type}} is {{Value|Projected}}.
* {{PropertyData|Type}}: Length,radius,diameter, etc. Not normally manipulated by the end user.
* {{PropertyData|MeasureType}}: {{TRUE}} - based on 3D geometry or "Projected" - based on the drawing. Not normally manipulated directly by the end user.
* {{PropertyData|References 3D|LinkSubList}}: The 3D object(s) on which the measurement is based. Used if {{PropertyData|Measure Type}} is {{Value|True}}.
* {{PropertyData|TheoreticalExact}}: Specifies a theoretically exact (or basic) dimension.
* {{PropertyData|Type|Enumeration}}: Length, radius, diameter, etc. Not normally manipulated by the end user.
* {{PropertyData|Measure Type|Enumeration}}: How the measurement is performed.
::<code>True</code> - based on 3D geometry.
::<code>Projected</code> - based on 2D drawing View geometry.
* {{PropertyData|Theoretical Exact|Bool}}: Specifies a theoretically exact (or basic) dimension.
::{{FALSE}} - a common dimension by default, possibly with tolerances.
::{{FALSE}} - a common dimension by default, possibly with tolerances.
::{{TRUE}} - a theoretical value. As such, it shall not bear any tolerances. Marked by a frame around the value.
::{{TRUE}} - a theoretical value. As such, it shall not bear any tolerances. The dimension will be displayed by a frame around the value: [[Image:TechDraw_theoretically_exact.png|100px]]
* {{PropertyData|OverTolerance}}: The amount by which the piece may be larger than the Dimension shown.
* {{PropertyData|Equal Tolerance|Bool}}: If over- and undertolerance are equal. Then the negated value of the overtolerance is used as undertolerance.
::{{TRUE}} - the negated value of the {{PropertyData|Over Tolerance}} is used as {{PropertyData|Under Tolerance}}. The display will be [[Image:TechDraw_equal-tolerance.png|100px]]
* {{PropertyData|UnderTolerance}}: The amount by which the piece may be smaller than the Dimension shown.
::{{FALSE}} - the {{PropertyData|Under Tolerance}} is taken into account. The display will be [[Image:TechDraw_Non-equal-tolerance.png|80px]]
* {{PropertyData|Inverted}}: Marks whether the dimension represents a common or an inverted value.
* {{PropertyData|Over Tolerance|QuantityConstraint}}: The amount by which the dimension may be larger.
* {{PropertyData|Under Tolerance|QuantityConstraint}}: The amount by which the dimension may be smaller.
* {{PropertyData|Inverted|Bool}}: Marks whether the dimension represents a common or an inverted value.
::{{FALSE}} - the ordinary value is used. For length it is a positive number, for angle the oblique value (0° - 180°).
::{{FALSE}} - the ordinary value is used. For length it is a positive number, for angle the oblique value (0° - 180°).
::{{TRUE}} - the inverted value is used. For length a negative number, for angle the reflex value (180° - 360°).
::{{TRUE}} - the inverted value is used. For length a negative number, for angle the reflex value (180° - 360°).
* {{PropertyData|X|Distance}}: Horizontal position of the dimension text relative to the View.
* {{PropertyData|Y|Distance}}: Vertical position of the dimension text relative to the View.
* {{PropertyData|Lock Position|Bool|Hidden}}: Locks the position of the dimension text when {{TRUE}}.
* {{PropertyData|Rotation|Angle|Hidden}}: Read only.
* {{PropertyData|Scale Type|Enumeration|Hidden}}: Read only.
* {{PropertyData|Scale|FloatConstant|Hidden}}: Read only.
* {{PropertyData|Caption|String|Hidden}}: Not used.


<!--T:27-->
<!--T:62-->
{{Properties_Title|Format}}
{{Properties_Title|Format}}
* {{PropertyData|FormatSpec}}: Allows additional text to be added to the dimension text.
::Dimension value will replace the <code>%.2f</code> part of text (or any other valid format specifier - see [https://en.wikipedia.org/wiki/Printf_format_string printf]).
* {{PropertyData|Arbitrary}}: Specifies, whether treat '''FormatSpec''' as a template or an actual text.
::{{FALSE}} - replace the format specifier with the actual dimensional value.
::{{TRUE}} - ignore the dimensional value and display exactly '''FormatSpec''' as value.


=== View === <!--T:17-->
<!--T:27-->
* {{PropertyData|Format Spec|String}}: How the dimension value will be formatted. See [[#Formatting|Formatting]].
{{Properties_Title|Base}}
* {{PropertyData|Format Spec Over Tolerance|String}}: Like {{PropertyData|Format Spec}}, but for overtolerances.
* {{PropertyView|Visibility}}: Sets whether the dimension is visible. {{TRUE}} - visible, {{FALSE}} - hidden.
* {{PropertyData|Format Spec Under Tolerance|String}}: Like {{PropertyData|Format Spec}}, but for undertolerances.
{{Properties_Title|Dim Format}}
* {{PropertyData|Arbitrary|Bool}}: Whether the dimension is replaced by the content of the '''Format Spec''' field.
* {{PropertyView|Font}}: The name of the font to use for the dimension text.
::{{FALSE}} - the content of the '''Format Spec''' is used to format the actual dimensional value.
* {{PropertyView|FontSize}}: Dimension text size in mm.
::{{TRUE}} - the content of the '''Format Spec''' will be displayed as text instead of the dimension value.
* {{PropertyView|LineWidth}}: Dimension line weight.
* {{PropertyData|Arbitrary Tolerances|Bool}}: Like {{PropertyData|Arbitrary}}, but for the tolerance.
* {{PropertyView|Color}}: Color for lines and text.

* {{PropertyView|StandardAndStyle}}: Specifies the standard (and the style of it) according to which the dimension is drawn:
<!--T:63-->
::<code>ISO Oriented</code> - drawn according to ISO 129.1 (international standard), text is rotated to be parallel with the dimension line tangent.
{{Properties_Title|Override}}
::<code>ISO Referencing</code> - drawn in compliance with ISO-129.1, text is always horizontal, above the shortest possible reference line.

::<code>ASME Inlined</code> - drawn according to ASME Y14.5M (US standard), text is horizontal, inserted in a break within the dimension line or arc.
<!--T:64-->
::<code>ASME Referencing</code> - drawn in compliance with ASME Y14.5M, text is horizontal, short reference line is attached to one side's vertical center.
* {{PropertyData|Angle Override|Bool}}: Whether the direction of dimension and extension lines is overridden.
* {{PropertyView|RenderingExtent}}: Rather universal property specifying how much space the dimension drawing may take up:
::{{FALSE}} - the directions are computed as usual.
::{{TRUE}} - the directions are overridden by LineAngle and ExtensionAngle property values.
* {{PropertyData|Line Angle|Angle}}: Angle of dimension line with view X axis (in degrees).
* {{PropertyData|Extension Angle|Angle}}: Angle of extension line(s) with view X axis (in degrees).

<!--T:71-->
{{Properties_Title|References}}

<!--T:72-->
* {{PropertyData|Saved Geometry|TopoShapeList|Hidden}}: Reference geometry. {{Version|0.21}}

=== View === <!--T:65-->

<!--T:73-->
{{TitleProperty|Base}}

<!--T:74-->
* {{PropertyView|Keep Label|Bool}}: Not used.
* {{PropertyView|Stack Order|Integer}}: Over or underlap relative to other drawing objects. {{Version|0.21}}

<!--T:67-->
{{Properties_Title|Dimension Format}}

<!--T:17-->
* {{PropertyView|Arrowsize|Length}}: The size of the dimension arrows. {{Version|0.21}}
* {{PropertyView|Color|Color}}: Color for lines and text.
* {{PropertyView|Flip Arrowheads|Bool}}: By default the value ''inside'' the dimension line/arc means the arrows pointing ''outwards''. If placed ''outside'' the dimension line/arc, the arrows point ''inwards'' the dimension line/arc.
::{{FALSE}} - Let the direction of arrows to be selected automatically according to the rule above.
::{{TRUE}} - Override the automatically chosen direction and force the opposite one.
* {{PropertyView|Font|Font}}: The name of the font to use for the dimension text.
* {{PropertyView|Fontsize|Length}}: Dimension text size.
* {{PropertyView|Gap Factor ASME|Float}}: Adjusts the gap between the dimension points and the start of the extension lines. The gap is this value times the line width. {{Version|0.21}}
* {{PropertyView|Gap Factor ISO|Float}}: Adjusts the gap between the dimension points and the start of the extension lines. The gap is this value times the line width. {{Version|0.21}}
* {{PropertyView|Line Spacing Factor|Float}}: Adjusts the gap between the dimension text and the dimension line. The gap is this value times the line width. {{Version|0.21}}
* {{PropertyView|Line Width|Length}}: Dimension line weight.
* {{PropertyView|Rendering Extent|Enumeration}}: Rather universal property specifying how much space the dimension drawing may take up:
::<code>None</code> - no lines or arrows are drawn, only the bare dimension value is displayed.
::<code>None</code> - no lines or arrows are drawn, only the bare dimension value is displayed.
::<code>Minimal</code> - for lengths and angles a single headed line connecting the dimensional value and the end point's ''virtual extension line'' is drawn. The extension line itself is not added.
::<code>Minimal</code> - for lengths and angles a single headed line connecting the dimensional value and the end point's ''virtual extension line'' is drawn. The extension line itself is not added.
Line 103: Line 256:
::Radii are drawn as a single headed line from center to the closest arc point.
::Radii are drawn as a single headed line from center to the closest arc point.
::<code>Expanded</code> - Only diameters support this value, rendering them in a horizontal or vertical length-like way. Other dimension types are rendered as with <code>Normal</code> extent.
::<code>Expanded</code> - Only diameters support this value, rendering them in a horizontal or vertical length-like way. Other dimension types are rendered as with <code>Normal</code> extent.
* {{PropertyView|Standard And Style|Enumeration}}: Specifies the standard (and its style) according to which the dimension is drawn:
* {{PropertyView|FlipArrowheads}}: By default the value ''inside'' the dimension line/arc means the arrows pointing ''outwards''. If placed ''outside'' the dimension line/arc, the arrows point ''inwards'' the dimension line/arc.
::[[File:TechDraw_Dimension_standardization.png|500px|Differences between the supported standards]]
::{{FALSE}} - Let the direction of arrows to be selected automatically according to the rule above.
::<code>ISO Oriented</code> - drawn according to the standard ISO 129-1, text is rotated to be parallel with the dimension line tangent.
::{{TRUE}} - Override the automatically chosen direction and force the opposite one.
::<code>ISO Referencing</code> - drawn in compliance with ISO 129-1, text is always horizontal, above the shortest possible reference line.

::<code>ASME Inlined</code> - drawn according to the standard ASME Y14.5M, text is horizontal, inserted in a break within the dimension line or arc.
==Standard and Style== <!--T:28-->
::<code>ASME Referencing</code> - drawn in compliance with ASME Y14.5M, text is horizontal, short reference line is attached to one side's vertical center.

<!--T:29-->
For a quick preview and presentation of the 4 basic Standard And Style differences, please see the picture below (from https://forum.freecadweb.org/viewtopic.php?f=35&t=39571):

<!--T:30-->
[[File:TechDraw Dimension standardization.png]]


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


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


<!--T:19-->
<!--T:19-->
The Dimension Length tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using the following functions:
The Length Dimension tool can be used in [[Macros|macros]] and from the [[Python|Python]] console by using the following functions:


</translate>
</translate>
{{Code|code=
{{Code|code=
dim1 = FreeCAD.ActiveDocument.addObject('TechDraw::DrawViewDimension','Dimension')
dim1 = FreeCAD.ActiveDocument.addObject("TechDraw::DrawViewDimension", "Dimension")
dim1.Type = "Distance"
dim1.Type = "Distance"
dim1.References2D=[(view1, 'Edge1')]
dim1.References2D=[(view1, "Edge1")]
rc = page.addView(dim1)
page.addView(dim1)
}}
}}
<translate>
<translate>


==Notes== <!--T:10-->

<!--T:20-->
* '''Edge selection'''. Edges can be difficult to select. You can adjust the selection area for edges using the parameter "/Mod/TechDraw/General/EdgeFuzz" (see [[Std_DlgParameter|Std_DlgParameter]]). This is a dimension-less number. The default is 10.0. Values in the 20-30 range will make it noticeably easier to select edges. Large numbers will cause overlaps with other drawing elements.
* '''Decimal places'''. Dimensions use the global decimal places setting by default. This can be changed via [[TechDraw_Preferences#Dimensions|preferences]] or by changing the FormatSpec property.
* Views may contain multiple 3D objects as Source. Dimensions may be applied to geometry from any object(s) in the View (ex from Object1.Vertex0 to Object2.Vertex3).




<!--T:24-->
<!--T:24-->
{{Docnav
{{Docnav
|[[TechDraw_ToggleFrame|ToggleFrame]]
|[[TechDraw_ClipMinus|ClipMinus]]
|[[TechDraw_HorizontalDimension|HorizontalDimension]]
|[[TechDraw_Dimension_Horizontal|New Horizontal]]
|[[TechDraw_Module|TechDraw]]
|[[TechDraw_Workbench|TechDraw]]
|IconL=techdraw-clipminus.svg
|IconL=TechDraw_ToggleFrame.svg
|IconR=TechDraw_HorizontalDimension.svg
|IconC=Workbench_TechDraw.svg
|IconC=Workbench_TechDraw.svg
|IconR=Techdraw_Dimension_Horizontal.png
}}
}}


<!--T:21-->
{{TechDraw Tools navi}}

<!--T:22-->
{{Userdocnavi}}
</translate>
</translate>
{{TechDraw Tools navi{{#translation:}}}}
{{clear}}
{{Userdocnavi{{#translation:}}}}

Latest revision as of 14:31, 12 October 2023

TechDraw LengthDimension

Menu location
TechDraw → Dimensions → Insert Length Dimension
Workbenches
TechDraw
Default shortcut
None
Introduced in version
-
See also
TechDraw HorizontalDimension, TechDraw VerticalDimension

Description

The TechDraw LengthDimension tool adds a linear dimension to a View. The dimension may be the distance between two points, the length of a straight edge, the perpendicular distance between two edges, or the perpendicular distance between a point and an edge.

Length dimension taken from two points

Usage

  1. Select the points and/or edges which define your measurement. The geometry may be selected in the 3D view (first two options) or in the drawing (all options):
    • Select two points.
    • Select a single straight edge.
    • Select two edges. If both edges are straight they must be parallel. This will produce a perpendicular dimension if an endpoint of one of the edges has a perpendicular projection on the other edge (the resultant point must lie on the actual edge). If multiple solutions are possible, the endpoint that is closest to its projected point is used. If there is no valid perpendicular projection, the dimension will be the distance between the nearest endpoints of the edges.
    • Select a point and an edge. This will produce a perpendicular dimension. In version 0.21 and below the dimension will only be perpendicular if the point has a perpendicular projection on the actual edge. Else the dimension will be the distance between the point and the nearest endpoint of the edge.
  2. If you have selected geometry in the 3D view: add the correct TechDraw View to the selection by selecting it in the Tree view.
  3. There are several ways to invoke the tool:
    • Press the Insert Length Dimension button.
    • Select the TechDraw → Dimensions → Insert Length Dimension option from the menu.
  4. A dimension is added to the View.
  5. The dimension may be dragged to the desired position.
  6. If needed, add tolerances as described on this page.

Display 3D measurement

The dimension will initially display the projected measurement (i.e. as shown in the drawing). If required, and if the dimension is based on 3D references, it can be changed to the actual 3D measurement by changing its DataMeasure Type property to True. To base a dimension on 3D references select geometry from the 3D view at creation time, or use the TechDraw DimensionRepair tool to update existing dimensions.

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.

Dimension dialog

The dimension dialog offers the following settings:

Tolerancing

  • Theoretically Exact: If checked, the dimension is specified as theoretically exact. As such, it shall not have any tolerances. The dimension will be displayed with a frame around the value:
  • Equal Tolerance: If checked, the over- and undertolerance are equal and the negated value of the overtolerance is used as undertolerance. The display will be , otherwise it will be .
  • Overtolerance: The amount by which the dimension may be larger.
  • Undertolerance: The amount by which the dimension may be smaller.

Formatting

  • Format Specifier: How the dimension value will be formatted. By default the specifier is %.xf where x is the number of decimals. For the formatting syntax see this Wikipedia page. There is also an additional %w format that prints the specified number of digits after the decimal separator and removes trailing zeros. For example, %.2w means that at most 2 decimals will be printed and any trailing zeros will be cut off.
  • Arbitrary Text: If checked, the dimension is replaced by the content of the Format Specifier field.
  • OverTolerance Format Specifier: How the overtolerance value will be formatted. By default the specifier is %.xf where x is the number of decimals. For the formatting syntax see this Wikipedia page.
  • UnderTolerance Format Specifier: How the undertolerance value will be formatted. By default the specifier is %.xf where x is the number of decimals. For the formatting syntax see this Wikipedia page.
  • Arbitrary Tolerance Text: If checked, the tolerances are replaced by the content of the OverTolerance Format Specifier UnderTolerance Format Specifier fields.

Display Style

  • Flip Arrowheads: Flips the direction of the dimension line arrows. By default they are inside the dimension line/arc and point outwards.
  • Color: The color for lines and text.
  • Font Size: The dimension text size.
  • Drawing Style: The standard (and its style) according to which the dimension is drawn. See the property Standard And Style for details.

Lines

  • Override Angles: If checked, the usual angles for the dimension line and extension lines will be overridden by the specified values.
  • Dimension line angle: Override value for angle of dimension line with view X axis (in degrees).
  • Use default: Set dimension line angle to the usual angle.
  • Use selection: Set dimension line angle to match the angle of the selected edge (or 2 vertices) in the view.
  • Extension line angle: Override value for angle of extension lines with view X axis (in degrees).
  • Use default: Set extension line angle to the usual angle.
  • Use selection: Set extension line angle to match the angle of the selected edge (or 2 vertices) in the view.

Limitations

Dimension objects are vulnerable to the "topological naming problem". This means that if you modify the 3D geometry, the faces and edges of the model may be renamed internally. If a dimension is attached to an edge that is then modified, the dimension may break. In general, it is not possible to keep the projected 2D dimensions synchronized with the actual 3D objects.

Therefore, it is recommended that dimensions be added when the 3D model is no longer being modified.

Workaround

If you want to keep a TechDraw view with dimensions that won't break, you need to dimension an object that won't change:

  • Create a non-parametric copy of the object that you want to project with Part SimpleCopy.
  • Select this copy, then use TechDraw View, and add the desired dimensions.
  • If the original 3D model is modified, the modifications won't affect the simple copy, nor the dimensions in the TechDraw view.

See Landmark Dimensions for another approach to circumventing the topological naming issue.

Notes

  • Edge selection. Edges can be difficult to select. You can adjust the selection area for edges by changing the Edge Fuzz preference.
  • Decimal places. Dimensions use the global decimal places setting by default. This can be changed in the preferences or by changing the FormatSpec property.
  • Multiple objects. Views may contain multiple 3D objects as Source. Dimensions may be applied to geometry from any object(s) in the View (ex from Object1.Vertex0 to Object2.Vertex3).

Properties

Data

Base

  • DataReferences 2D (LinkSubList): The 2D drawing View object(s) on which the measurement is based. Used if DataMeasure Type is Projected.
  • DataReferences 3D (LinkSubList): The 3D object(s) on which the measurement is based. Used if DataMeasure Type is True.
  • DataType (Enumeration): Length, radius, diameter, etc. Not normally manipulated by the end user.
  • DataMeasure Type (Enumeration): How the measurement is performed.
True - based on 3D geometry.
Projected - based on 2D drawing View geometry.
  • DataTheoretical Exact (Bool): Specifies a theoretically exact (or basic) dimension.
false - a common dimension by default, possibly with tolerances.
true - a theoretical value. As such, it shall not bear any tolerances. The dimension will be displayed by a frame around the value:
  • DataEqual Tolerance (Bool): If over- and undertolerance are equal. Then the negated value of the overtolerance is used as undertolerance.
true - the negated value of the DataOver Tolerance is used as DataUnder Tolerance. The display will be
false - the DataUnder Tolerance is taken into account. The display will be
  • DataOver Tolerance (QuantityConstraint): The amount by which the dimension may be larger.
  • DataUnder Tolerance (QuantityConstraint): The amount by which the dimension may be smaller.
  • DataInverted (Bool): Marks whether the dimension represents a common or an inverted value.
false - the ordinary value is used. For length it is a positive number, for angle the oblique value (0° - 180°).
true - the inverted value is used. For length a negative number, for angle the reflex value (180° - 360°).
  • DataX (Distance): Horizontal position of the dimension text relative to the View.
  • DataY (Distance): Vertical position of the dimension text relative to the View.
  • Data (Hidden)Lock Position (Bool): Locks the position of the dimension text when true.
  • Data (Hidden)Rotation (Angle): Read only.
  • Data (Hidden)Scale Type (Enumeration): Read only.
  • Data (Hidden)Scale (FloatConstant): Read only.
  • Data (Hidden)Caption (String): Not used.

Format

  • DataFormat Spec (String): How the dimension value will be formatted. See Formatting.
  • DataFormat Spec Over Tolerance (String): Like DataFormat Spec, but for overtolerances.
  • DataFormat Spec Under Tolerance (String): Like DataFormat Spec, but for undertolerances.
  • DataArbitrary (Bool): Whether the dimension is replaced by the content of the Format Spec field.
false - the content of the Format Spec is used to format the actual dimensional value.
true - the content of the Format Spec will be displayed as text instead of the dimension value.
  • DataArbitrary Tolerances (Bool): Like DataArbitrary, but for the tolerance.

Override

  • DataAngle Override (Bool): Whether the direction of dimension and extension lines is overridden.
false - the directions are computed as usual.
true - the directions are overridden by LineAngle and ExtensionAngle property values.
  • DataLine Angle (Angle): Angle of dimension line with view X axis (in degrees).
  • DataExtension Angle (Angle): Angle of extension line(s) with view X axis (in degrees).

References

View

Base

  • ViewKeep Label (Bool): Not used.
  • ViewStack Order (Integer): Over or underlap relative to other drawing objects. introduced in version 0.21

Dimension Format

  • ViewArrowsize (Length): The size of the dimension arrows. introduced in version 0.21
  • ViewColor (Color): Color for lines and text.
  • ViewFlip Arrowheads (Bool): By default the value inside the dimension line/arc means the arrows pointing outwards. If placed outside the dimension line/arc, the arrows point inwards the dimension line/arc.
false - Let the direction of arrows to be selected automatically according to the rule above.
true - Override the automatically chosen direction and force the opposite one.
  • ViewFont (Font): The name of the font to use for the dimension text.
  • ViewFontsize (Length): Dimension text size.
  • ViewGap Factor ASME (Float): Adjusts the gap between the dimension points and the start of the extension lines. The gap is this value times the line width. introduced in version 0.21
  • ViewGap Factor ISO (Float): Adjusts the gap between the dimension points and the start of the extension lines. The gap is this value times the line width. introduced in version 0.21
  • ViewLine Spacing Factor (Float): Adjusts the gap between the dimension text and the dimension line. The gap is this value times the line width. introduced in version 0.21
  • ViewLine Width (Length): Dimension line weight.
  • ViewRendering Extent (Enumeration): Rather universal property specifying how much space the dimension drawing may take up:
None - no lines or arrows are drawn, only the bare dimension value is displayed.
Minimal - for lengths and angles a single headed line connecting the dimensional value and the end point's virtual extension line is drawn. The extension line itself is not added.
Diameters are rendered following Confined extent, radii following Reduced extent.
Confined - for lengths and angles a double headed line (or arc) connecting the start and end point's virtual extension lines is drawn, though the extension lines themselves are not added.
Diameters are drawn with a minimal single headed line from dimensional value to the closest point on circle, radii as with Reduced extent.
Reduced - for lengths and angles a single headed line connecting the dimensional value and the end point's extension line is drawn along with the extension line itself.
Diameters are drawn with a single headed line from the center to the closest point on circle, radii with a minimal single headed line from dimensional value to the closest arc point.
Normal - the default value. For lengths and angles a double headed line (or arc) connecting the start and end point's extension lines is drawn, the extension lines themselves as well.
Diameters are drawn as double headed lines striking the center and connecting the closest and farthest points on the circle.
Radii are drawn as a single headed line from center to the closest arc point.
Expanded - Only diameters support this value, rendering them in a horizontal or vertical length-like way. Other dimension types are rendered as with Normal extent.
  • ViewStandard And Style (Enumeration): Specifies the standard (and its style) according to which the dimension is drawn:
Differences between the supported standards
ISO Oriented - drawn according to the standard ISO 129-1, text is rotated to be parallel with the dimension line tangent.
ISO Referencing - drawn in compliance with ISO 129-1, text is always horizontal, above the shortest possible reference line.
ASME Inlined - drawn according to the standard ASME Y14.5M, text is horizontal, inserted in a break within the dimension line or arc.
ASME Referencing - drawn in compliance with ASME Y14.5M, text is horizontal, short reference line is attached to one side's vertical center.

Scripting

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

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

dim1 = FreeCAD.ActiveDocument.addObject("TechDraw::DrawViewDimension", "Dimension")
dim1.Type = "Distance"
dim1.References2D=[(view1, "Edge1")]
page.addView(dim1)