Salome HOME
Merge from V6_main 11/02/2013
[modules/smesh.git] / doc / salome / examples / measurements_ex02.py
diff --git a/doc/salome/examples/measurements_ex02.py b/doc/salome/examples/measurements_ex02.py
new file mode 100644 (file)
index 0000000..3333bc0
--- /dev/null
@@ -0,0 +1,22 @@
+# Bounding Box
+
+import smesh
+from SMESH_mechanic import mesh as mesh1
+from SMESH_test1 import mesh as mesh2
+
+mesh1.Compute()
+mesh2.Compute()
+
+# compute bounding box for mesh1
+mesh1.BoundingBox()
+
+# compute bounding box for list of nodes of mesh1
+mesh1.BoundingBox([363, 364, 370, 371, 372, 373, 379, 380, 381])
+
+# compute bounding box for list of elements of mesh1
+mesh1.BoundingBox([363, 364, 370, 371, 372, 373, 379, 380, 381], isElem=True)
+
+# compute common bounding box of mesh1 and mesh2
+smesh.BoundingBox([mesh1, mesh2])
+
+# etc...