Salome HOME
Documentation: use 'figure' instead of 'image'; improve caption layout; fix warnings.
[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 .. figure:: images/meas_length_32x32.png      
22    :align: left
23    :height: 24px
24
25 edge length 
26
27 .. figure:: images/meas_distance_32x32.png    
28    :align: left
29    :height: 24px
30
31 distance between objects
32
33 .. figure:: images/meas_radius_32x32.png    
34    :align: left
35    :height: 24px
36
37 radius
38
39 .. figure:: images/meas_angle_32x32.png    
40    :align: left
41    :height: 24px
42
43 angle between edges  
44
45 .. figure:: images/meas_angle3p_32x32.png    
46    :align: left
47    :height: 24px
48
49 angle by 3 points  
50
51 --------------------------------------------------------------------------------
52
53 Edge length
54 -----------
55
56 The length can be measured for straight or curved edge built on two points. 
57
58 .. figure:: images/Measurement1.png
59    :align: center
60
61    Edge length
62
63 Input fields:
64
65 - **Edge**  contains  edge to be measured selected in 3D OCC viewer or object browser. 
66
67 Note, that for curved edges length is displayed only in the property panel.
68
69 **TUI Command**:
70
71 .. py:function:: model.measureLength(Part_doc, edge)
72  
73     :param part: The current part object.
74     :param object: An edge in format *model.selection("EDGE", edge)*.
75     :return: Calculated value.
76
77
78 Distance between objects
79 ------------------------
80
81 **Distance between objects** calculates minimal distance for any pair of shapes: vertex, edge, face, solid.
82
83  .. figure:: images/Measurement2.png
84    :align: center
85
86    Distance between objects
87
88 Input fields:
89
90 - **From**, **To**  contain shapes between which distance is  measured. Shapes are selected in 3D OCC viewer or object browser. 
91
92 **TUI Command**:
93
94 .. py:function:: model.measureDistance(Part_doc, shape1, shape2)
95  
96     :param part: The current part object.
97     :param object: A first edge in format *model.selection("EDGE", edge)*.
98     :param object: A second edge in format *model.selection("EDGE", edge)*.
99     :return: Calculated value.
100
101 Radius
102 ------
103
104 **Radius** calculates radius for circular edge or cylindrical face. 
105
106 .. figure:: images/Measurement3.png
107    :align: center
108
109    Radius
110
111 Input fields:
112
113 - **Object**  contains shape to be measured selected in 3D OCC viewer or object browser.  
114
115
116 **TUI Command**:
117
118 .. py:function:: model.measureRadius(Part_doc, shape)
119  
120     :param part: The current part object.
121     :param object: An edge in format *model.selection("TYPE", shape)*.
122     :return: Calculated value.
123
124 Angle between edges
125 -------------------
126
127 **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.
128
129 .. figure:: images/Measurement4.png
130    :align: center
131
132    Angle between edges
133
134 Input fields:
135
136 - **First Edge**, **Second edge**  contain  edges between which angle is measured. Edges are selected in 3D OCC viewer or object browser. 
137
138 **TUI Command**:
139
140 .. py:function:: model.measureAngle(Part_doc, edge1, edge2)
141  
142     :param part: The current part object.
143     :param object: A first edge in format *model.selection("TYPE", shape)*.
144     :param object: A second edge in format *model.selection("TYPE", shape)*.
145     :return: Calculated value.
146
147 Angle by 3 points
148 -----------------
149
150 **Angle by 3 points** calculates angle between the selected three points. The second point is in the corner of the angle.
151
152 .. figure:: images/Measurement5.png
153    :align: center
154
155    Angle by 3 points
156
157 Input fields:
158
159 - **First point**, **Second point**, **Third point**  contain  point between which angle is measured. Points are selected in 3D OCC viewer or object browser. 
160
161 **TUI Command**:
162
163 .. py:function:: model.measureAngle(Part_doc, vertex1, vertex2, vertex3)
164   
165     :param part: The current part object.
166     :param object: A first vertex in format *model.selection("TYPE", shape)*.
167     :param object: A second vertex in format *model.selection("TYPE", shape)*.
168     :param object: A third vertex in format *model.selection("TYPE", shape)*.
169     :return: Calculated value.
170