Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/geom.git] / doc / salome / gui / GEOM / input / tui_point_coordinates.doc
1 /*!
2
3 \page tui_point_coordinates_page Point Coordinates
4
5 \code
6 import math
7 import geompy
8
9 # create a point
10 point = geompy.MakeVertex(15., 23., 80.)
11
12 # get the coordinates of the point and check its values
13 coords = geompy.PointCoordinates(point)
14
15 # check the obtained coordinate values
16 tolerance = 1.e-07
17 def IsEqual(val1, val2): return (math.fabs(val1 - val2) < tolerance)
18
19 if IsEqual(coords[0], 15.) and IsEqual(coords[1], 23.) and IsEqual(coords[2], 80.):
20     print "All values are OK."
21 else :
22     print "Coordinates of point must be (15, 23, 80), but returned (",
23     print coords[0], ", ", coords[1], ", ", coords[2], ")"
24     pass
25 \endcode
26
27 */