Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/smesh.git] / doc / salome / gui / SMESH / input / tui_measurements.doc
1 /*!
2
3 \page tui_measurements_page Measurements
4
5 \section tui_min_distance Minimum Distance
6
7 \code
8
9 import smesh
10 from SMESH_mechanic import mesh as mesh1
11 from SMESH_test1 import mesh as mesh2
12
13 mesh1.Compute()
14 mesh2.Compute()
15
16 # compute min distance from mesh1 to the origin (not available yet)
17 smesh.MinDistance(mesh1)
18
19 # compute min distance from node 10 of mesh1 to the origin
20 smesh.MinDistance(mesh1, id1=10)
21 # ... or
22 mesh1.MinDistance(10)
23
24 # compute min distance between nodes 10 and 20 of mesh1
25 smesh.MinDistance(mesh1, id1=10, id2=20)
26 # ... or
27 mesh1.MinDistance(10, 20)
28
29 # compute min distance from element 100 of mesh1 to the origin (not available yet)
30 smesh.MinDistance(mesh1, id1=100, isElem1=True)
31 # ... or
32 mesh1.MinDistance(100, isElem1=True)
33
34 # compute min distance between elements 100 and 200 of mesh1 (not available yet)
35 smesh.MinDistance(mesh1, id1=100, id2=200, isElem1=True, isElem2=True)
36 # ... or
37 mesh1.MinDistance(100, 200, True, True)
38
39 # compute min distance from element 100 to node 20 of mesh1 (not available yet)
40 smesh.MinDistance(mesh1, id1=100, id2=20, isElem1=True)
41 # ... or
42 mesh1.MinDistance(100, 20, True)
43
44 # compute min distance from mesh1 to mesh2 (not available yet)
45 smesh.MinDistance(mesh1, mesh2)
46
47 # compute min distance from node 10 of mesh1 to node 20 of mesh2
48 smesh.MinDistance(mesh1, mesh2, 10, 20)
49
50 # compute min distance from node 10 of mesh1 to element 200 of mesh2 (not available yet)
51 smesh.MinDistance(mesh1, mesh2, 10, 200, isElem2=True)
52
53 # etc...
54
55 \endcode
56
57 \section tui_bounding_box Bounding Box
58
59 \code
60
61 import smesh
62 from SMESH_mechanic import mesh as mesh1
63 from SMESH_test1 import mesh as mesh2
64
65 mesh1.Compute()
66 mesh2.Compute()
67
68 # compute bounding box for mesh1
69 mesh1.BoundingBox()
70
71 # compute bounding box for list of nodes of mesh1
72 mesh1.BoundingBox([363, 364, 370, 371, 372, 373, 379, 380, 381])
73
74 # compute bounding box for list of elements of mesh1
75 mesh1.BoundingBox([363, 364, 370, 371, 372, 373, 379, 380, 381], isElem=True)
76
77 # compute common bounding box of mesh1 and mesh2
78 smesh.BoundingBox([mesh1, mesh2])
79
80 # etc...
81
82 \endcode
83
84 */