TechDraw LandmarkDimension: Difference between revisions

From FreeCAD Documentation
(Command now has correctly named icon)
No edit summary
Line 15: Line 15:
|Name=TechDraw Dimension Landmark
|Name=TechDraw Dimension Landmark
|MenuLocation=TechDraw → Dimension Landmark
|MenuLocation=TechDraw → Dimension Landmark
|Workbenches=[[TechDraw Module|TechDraw]]
|Workbenches=[[TechDraw_Module|TechDraw]]
|SeeAlso=[[TechDraw Dimension Horizontal|TechDraw Dimension Horizontal]], [[TechDraw Dimension Vertical|TechDraw Dimension Vertical]]
|Version=0.19
|Version=0.19
|SeeAlso=[[TechDraw_Dimension_Horizontal|TechDraw Dimension Horizontal]], [[TechDraw_Dimension_Vertical|TechDraw Dimension Vertical]]
}}
}}


Line 23: Line 23:


<!--T:11-->
<!--T:11-->
The Dimension Landmark tool adds a linear dimension to a View. The dimension is based on two Point {{Emphasis|feature}} (Draft.Point or Part.Vertex) from the 3D model. Note that the points must be {{Emphasis|feature}} objects that appear in the model [[tree view]]. Random vertexes from a shape will not work.
The Dimension Landmark tool adds a linear dimension to a View. The dimension is based on two Point {{Emphasis|feature}} (Draft.Point or Part.Vertex) from the 3D model. Note that the points must be {{Emphasis|feature}} objects that appear in the model [[Tree_view|tree view]]. Random vertexes from a shape will not work.


<!--T:25-->
<!--T:25-->
The purpose of this tool is to provide a workaround to the corruption of dimension caused by "[[topological naming problem|topological naming]]" issues. The source points should use [[Expressions]] or other containing mechanism to establish their position. Since the points are [[Document Objects]], and not shape components, their name does not change with recomputes, and hence they are easily found.
The purpose of this tool is to provide a workaround to the corruption of dimension caused by "[[topological_naming_problem|topological naming]]" issues. The source points should use [[Expressions|Expressions]] or other containing mechanism to establish their position. Since the points are [[Document_Objects|Document Objects]], and not shape components, their name does not change with recomputes, and hence they are easily found.


<!--T:26-->
<!--T:26-->
See the Limitation and WorkAround sections of [[TechDraw Dimension Length|TechDraw Dimension Length]] for more on dimensions and topological naming.
See the Limitation and WorkAround sections of [[TechDraw_Dimension_Length|TechDraw Dimension Length]] for more on dimensions and topological naming.


<!--T:27-->
<!--T:27-->
Line 42: Line 42:
# Select 2 Point objects in the [[tree view]] or the [[3D view]].
# Select 2 Point objects in the [[tree view]] or the [[3D view]].
# Select also the View to which the dimension is to be added.
# Select also the View to which the dimension is to be added.
# Press the {{Button|[[Image:Techdraw-landmarkdistance.svg|20px]] [[TechDraw Dimension Landmark|Dimension Landmark]]}} button or {{MenuCommand|TechDraw → Dimension Landmark}}
# Press the {{Button|[[Image:Techdraw-landmarkdistance.svg|20px]] [[TechDraw_Dimension_Landmark|Dimension Landmark]]}} button or {{MenuCommand|TechDraw → Dimension Landmark}}
# A dimension will be added to the View. The dimension text may be dragged to the desired position.
# A dimension will be added to the View. The dimension text may be dragged to the desired position.


Line 58: Line 58:


<!--T:18-->
<!--T:18-->
{{Emphasis|See also:}} [[TechDraw API|TechDraw API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].
{{Emphasis|See also:}} [[TechDraw_API|TechDraw API]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].


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


</translate>
</translate>

Revision as of 22:09, 2 December 2020

TechDraw Dimension Landmark

Menu location
TechDraw → Dimension Landmark
Workbenches
TechDraw
Default shortcut
None
Introduced in version
0.19
See also
TechDraw Dimension Horizontal, TechDraw Dimension Vertical

Description

The Dimension Landmark tool adds a linear dimension to a View. The dimension is based on two Point feature (Draft.Point or Part.Vertex) from the 3D model. Note that the points must be feature objects that appear in the model tree view. Random vertexes from a shape will not work.

The purpose of this tool is to provide a workaround to the corruption of dimension caused by "topological naming" issues. The source points should use Expressions or other containing mechanism to establish their position. Since the points are Document Objects, and not shape components, their name does not change with recomputes, and hence they are easily found.

See the Limitation and WorkAround sections of TechDraw Dimension Length for more on dimensions and topological naming.

The Landmark Dimension generally behaves like any other Dimension


Usage

  1. Select 2 Point objects in the tree view or the 3D view.
  2. Select also the View to which the dimension is to be added.
  3. Press the File:Techdraw-landmarkdistance.svg Dimension Landmark button or TechDraw → Dimension Landmark
  4. A dimension will be added to the View. The dimension text may be dragged to the desired position.

Limitations

The Landmark Dimension tool is initially limited to "Distance" dimensions. Other types may be added if demand warrants.

Properties

Landmark Dimension does not introduce any new properties.

Scripting

See also: TechDraw API and FreeCAD Scripting Basics.

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

dim1 = FreeCAD.ActiveDocument.addObject('TechDraw::LandmarkDimension','Landmark')
dim1.Type = "Distance"
dim1.References2D=[(TDView, 'Vertex1')]
dim1.References3D=[(Point3d1, 'Vertex1')]
dim1.References3D=[(Point3d2, 'Vertex1')]
rc = page.addView(dim1)