Salome HOME
Merge remote-tracking branch 'origin/EDF_2019'
[modules/shaper.git] / src / FeaturesPlugin / doc / measurementFeature.rst
1 .. |measurement.icon|    image:: images/measurement.png
2
3 Measurement
4 ===========
5
6 The feature **Measurement** calculates dimensions of sub-elements of a geometrical object (shape).
7
8 The measured dimension is displayed in the property panel and shown in 3D OCC viewer.
9
10 The  properties of dimension text and line, such as font, color, arrow size, etc. can be defined in the Preferences  :ref:`visualization_preferences`.
11
12 **Apply** button does not generate any result and has the same effect as **Cancel** for this feature.  
13
14 To start Measurement in the active part:
15
16 #. select in the Main Menu *Part - > Measurement* item  or
17 #. click |measurement.icon| **Measurement** button in the toolbar
18
19 The following dimensions can be calculated:
20
21   .. image:: images/meas_length_32x32.png      
22     :align: left
23   edge length 
24
25   .. image:: images/meas_distance_32x32.png    
26     :align: left
27   distance between objects
28
29   .. image:: images/meas_radius_32x32.png    
30     :align: left
31   radius
32
33   .. image:: images/meas_angle_32x32.png    
34     :align: left
35   angle between edges  
36
37   .. image:: images/meas_angle3p_32x32.png    
38     :align: left
39   angle by 3 points  
40
41 Edge length
42 -----------
43
44 The length can be measured for straight or curved edge built on two points. 
45
46 .. image:: images/Measurement1.png
47   :align: center
48
49 .. centered::
50   Edge length
51
52 Input fields:
53
54 - **Edge**  contains  edge to be measured selected in 3D OCC viewer or object browser. 
55
56 Note, that for curved edges length is displayed only in the property panel.
57
58 **TUI Command**:
59
60 .. py:function:: model.measureLength(Part_doc, edge)
61  
62     :param part: The current part object.
63     :param object: An edge in format *model.selection("EDGE", edge)*.
64     :return: Calculated value.
65
66
67 Distance between objects
68 ------------------------
69
70 **Distance between objects** calculates minimal distance for any pair of shapes: vertex, edge, face, solid.
71
72  .. image:: images/Measurement2.png
73   :align: center
74
75 .. centered::
76   Distance between objects
77
78 Input fields:
79
80 - **From**, **To**  contain shapes between which distance is  measured. Shapes are selected in 3D OCC viewer or object browser. 
81
82 **TUI Command**:
83
84 .. py:function:: model.measureDistance(Part_doc, shape1, shape2)
85  
86     :param part: The current part object.
87     :param object: A first edge in format *model.selection("EDGE", edge)*.
88     :param object: A second edge in format *model.selection("EDGE", edge)*.
89     :return: Calculated value.
90
91 Radius
92 ------
93
94 **Radius** calculates radius for circular edge or cylindrical face. 
95
96 .. image:: images/Measurement3.png
97   :align: center
98
99 .. centered::
100   Radius
101
102 Input fields:
103
104 - **Object**  contains shape to be measured selected in 3D OCC viewer or object browser.  
105
106
107 **TUI Command**:
108
109 .. py:function:: model.measureRadius(Part_doc, shape)
110  
111     :param part: The current part object.
112     :param object: An edge in format *model.selection("TYPE", shape)*.
113     :return: Calculated value.
114
115 Angle between edges
116 -------------------
117
118 **Angle between edges** calculates angle between the selected pair of edges in the point of intersection. If there are several points of intersection, then angles are calculated in all points.
119
120 .. image:: images/Measurement4.png
121   :align: center
122
123 .. centered::
124   Angle between edges
125
126 Input fields:
127
128 - **First Edge**, **Second edge**  contain  edges between which angle is measured. Edges are selected in 3D OCC viewer or object browser. 
129
130 **TUI Command**:
131
132 .. py:function:: model.measureAngle(Part_doc, edge1, edge2)
133  
134     :param part: The current part object.
135     :param object: A first edge in format *model.selection("TYPE", shape)*.
136     :param object: A second edge in format *model.selection("TYPE", shape)*.
137     :return: Calculated value.
138
139 Angle by 3 points
140 -----------------
141
142 **Angle by 3 points** calculates angle between the selected three points. The second point is in the corner of the angle.
143
144 .. image:: images/Measurement5.png
145   :align: center
146
147 .. centered::
148   Angle by 3 points
149
150 Input fields:
151
152 - **First point**, **Second point**, **Third point**  contain  point between which angle is measured. Points are selected in 3D OCC viewer or object browser. 
153
154 **TUI Command**:
155
156 .. py:function:: model.measureAngle(Part_doc, vertex1, vertex2, vertex3)
157   
158     :param part: The current part object.
159     :param object: A first vertex in format *model.selection("TYPE", shape)*.
160     :param object: A second vertex in format *model.selection("TYPE", shape)*.
161     :param object: A third vertex in format *model.selection("TYPE", shape)*.
162     :return: Calculated value.
163