TechDraw HorizontalExtentDimension: Difference between revisions

From FreeCAD Documentation
(TechDraw_Dimension_HExtent.svg->TechDraw_Dimension_Horizontal_Extent.svg)
(Marked this version for translation)
 
(24 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>

<!--T:18-->
<!--T:18-->
{{Docnav
{{Docnav
|[[TechDraw_3PtAngleDimension|3PtAngleDimension]]
|[[TechDraw_Balloon|New Balloon]]
|[[TechDraw_VerticalExtentDimension|VerticalExtentDimension]]
|[[TechDraw_Dimension_Vertical Extent|New Vertical Extent]]
|[[TechDraw_Module|TechDraw]]
|[[TechDraw_Workbench|TechDraw]]
|IconL=TechDraw_Balloon.svg
|IconL=TechDraw_3PtAngleDimension.svg
|IconR=TechDraw_VerticalExtentDimension.svg
|IconC=Workbench_TechDraw.svg
|IconC=Workbench_TechDraw.svg
|IconR=TechDraw_Dimension_VExtent.svg
}}
}}


<!--T:1-->
<!--T:1-->
{{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
|Version=0.19
|SeeAlso=[[TechDraw Dimension Length|TechDraw Dimension Length]], [[TechDraw Dimension Vertical Extent|TechDraw Dimension Vertical Extent]]
|SeeAlso=[[TechDraw_LengthDimension|TechDraw LengthDimension]], [[TechDraw_VerticalExtentDimension|TechDraw VerticalExtentDimension]]
}}
}}


Line 23: Line 24:


<!--T:8-->
<!--T:8-->
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.


</translate>
</translate>
Line 29: Line 30:
<translate>
<translate>
<!--T:9-->
<!--T:9-->
{{Caption|Horizontal Extent dimension of BSpline Face}}
{{Caption|Horizontal and vertical extent dimensions of a B-spline}}


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


<!--T:10-->
<!--T:10-->
# Select a View or a collection of Edges in a View.
# Select a View or a collection of Edges in a View.
# There are several ways to invoke the tool:
# Press the {{Button|[[Image:TechDraw_Dimension_Horizontal_Extent.svg|16px]] [[TechDraw Dimension Horizontal Extent|Dimension Horizontal Extent]]}} button
#* Press the {{Button|[[Image:TechDraw_HorizontalExtentDimension.svg|16px]] [[TechDraw_HorizontalExtentDimension|Insert Horizontal Extent Dimension]]}} button.
# A dimension will be added to the View. The dimension may be dragged to the desired position.
#* 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=== <!--T:23-->

<!--T:24-->
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]].


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


<!--T:12-->
<!--T:12-->
Dimension objects are vulnerable to "[[topological naming problem|topological naming]]" issues. See the information in the {{Button|[[Image:TechDraw_Dimension_Length.svg|16px]] [[TechDraw Dimension Length|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== <!--T:25-->

<!--T:26-->
See [[TechDraw_LengthDimension#Notes|TechDraw LengthDimension]].


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


<!--T:13-->
<!--T:13-->
This object has the same properties as the [[TechDraw Dimension Length|TechDraw Dimension Length]] tool. See that tool for details. Exceptions noted.
See [[TechDraw_LengthDimension#Properties|TechDraw LengthDimension]]. Exceptions noted below.


=== Data === <!--T:20-->
=== Data === <!--T:20-->

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


<!--T:21-->
<!--T:21-->
* {{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== <!--T:6-->
==Scripting== <!--T:6-->


<!--T:14-->
<!--T:14-->
{{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:15-->
<!--T:15-->
The Dimension Horizontal Extent tool can be used in [[macros|macros]] and from the [[Python|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:


</translate>
</translate>
{{Code|code=
{{Code|code=
selection = [(view1, 'Edge1'), (view1, 'Edge2')] #or [] for all
selection = ['Edge1', 'Edge2'] # or [] for all

hExtentDim = TechDraw.Dimension.makeExtentDim(selection, HORIZONTAL)
TechDraw.makeExtentDim(view1, selection, 0) # view1 is a DrawViewPart; 0 for horizontal
rc = page.addView(hExtentDim)
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.
}}
}}
<translate>
<translate>
Line 72: Line 100:
<!--T:19-->
<!--T:19-->
{{Docnav
{{Docnav
|[[TechDraw_3PtAngleDimension|3PtAngleDimension]]
|[[TechDraw_Balloon|New Balloon]]
|[[TechDraw_VerticalExtentDimension|VerticalExtentDimension]]
|[[TechDraw_Dimension_Vertical Extent|New Vertical Extent]]
|[[TechDraw_Module|TechDraw]]
|[[TechDraw_Workbench|TechDraw]]
|IconL=TechDraw_Balloon.svg
|IconL=TechDraw_3PtAngleDimension.svg
|IconR=TechDraw_VerticalExtentDimension.svg
|IconC=Workbench_TechDraw.svg
|IconC=Workbench_TechDraw.svg
|IconR=TechDraw_Dimension_VExtent.svg
}}
}}


Line 83: Line 111:
{{TechDraw Tools navi{{#translation:}}}}
{{TechDraw Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Latest revision as of 19:02, 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.