4 salome.salome_init_without_session()
6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New()
10 point = geompy.MakeVertex(15., 23., 80.)
12 # get the coordinates of the point and check its values
13 coords = geompy.PointCoordinates(point)
15 # check the obtained coordinate values
16 def IsEqual(val1, val2, tolerance = 1.e-07):
18 return (math.fabs(val1 - val2) < tolerance)
20 if IsEqual(coords[0], 15.) and IsEqual(coords[1], 23.) and IsEqual(coords[2], 80.):
21 print("All values are OK.")
23 print("Coordinates of point must be (15, 23, 80), but returned (", end=' ')
24 print(coords[0], ", ", coords[1], ", ", coords[2], ")")