Salome HOME
Fix compilation error (conflict of OK name between OCCT Plate_Plate.hxx and GEOM...
[modules/geom.git] / doc / salome / examples / free_faces.py
index 16d705614394039b3a616fb188441f27933fd7e3..cdc01fcb82751e25a351554a63419536a21bf9e8 100644 (file)
@@ -1,7 +1,10 @@
 # Check Free Faces
 
-import geompy
 import salome
+salome.salome_init_without_session()
+import GEOM
+from salome.geom import geomBuilder
+geompy = geomBuilder.New()
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a vertex and a vector
@@ -28,7 +31,7 @@ cut_without_f_2 = geompy.SuppressFaces(cut, [f_2])
 
 # suppress the specified wire
 result = geompy.GetFreeFacesIDs(cut_without_f_2)
-print "A number of free faces is ", len(result)
+print("A number of free faces is ", len(result))
 
 # add objects in the study
 all_faces = geompy.SubShapeAllSortedCentres(cut_without_f_2, geompy.ShapeType["FACE"])