# Detect Self-intersections
import salome
-salome.salome_init()
+salome.salome_init_without_session()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
# create a box
box = geompy.MakeBoxDXDYDZ(100,100,100)
# check self-intersection
IsValid = geompy.CheckSelfIntersections(compound)
if not IsValid:
- print "Shape is self-intersected!"
+ print("Shape is self-intersected!")
else:
- print "No self-intersection detected in a shape"
+ print("No self-intersection detected in a shape")