Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Check Shape
1 # Check Shape
2 
3 import salome
4 salome.salome_init()
5 import GEOM
6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
8 
9 # create a box
10 box = geompy.MakeBoxDXDYDZ(100,30,100)
11 (IsValid, err) = geompy.CheckShape(box, 0, 2)
12 if IsValid == 0:
13  geompy.PrintShapeErrors(box, err)
14  raise RuntimeError, "Invalid box created"
15 else:
16  print "\nBox is valid"

Download this script