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