Salome HOME
ef15e7e25c4d52bdc59695c9d1e3a3ba053f6e7c
[modules/smesh.git] / doc / salome / examples / measurements_ex03.py
1 # Basic Properties
2
3
4 import salome
5 salome.salome_init()
6 import GEOM
7 from salome.geom import geomBuilder
8 geompy = geomBuilder.New(salome.myStudy)
9
10 import SMESH, SALOMEDS
11 from salome.smesh import smeshBuilder
12 smesh =  smeshBuilder.New(salome.myStudy)
13 import salome_notebook
14
15 from SMESH_mechanic import mesh as mesh1
16
17 mesh1.Compute()
18
19 # compute length for mesh1
20 length = mesh1.GetLength()
21
22 # compute area for mesh1
23 area = mesh1.GetArea()
24
25 # compute volume for mesh1
26 volume = mesh1.GetVolume()
27
28 # print basic properties
29 print
30 print "Basic Properties for mesh:"
31 print "* length =", length
32 print "* area   =", area
33 print "* volume =", volume
34 print