Salome HOME
Merge remote branch 'origin/V7_dev'
[modules/smesh.git] / doc / salome / examples / use_existing_faces.py
index 12b5a9a567e831c707a0c22fbf91ff4d1faccf42..c4b95fdafd945440e9733368422c9f6c32f90760 100644 (file)
@@ -1,6 +1,17 @@
-# Use existing faces algorithm
+# Usage of "Use Faces to be Created Manually" algorithm
+
+
+import salome
+salome.salome_init()
+import GEOM
+from salome.geom import geomBuilder
+geompy = geomBuilder.New(salome.myStudy)
+
+import SMESH, SALOMEDS
+from salome.smesh import smeshBuilder
+smesh =  smeshBuilder.New(salome.myStudy)
+import salome_notebook
 
-import smesh, geompy
 import numpy as np
 
 # define my 2D algorithm
@@ -98,8 +109,8 @@ mesh.Compute()
 
 # compute 2D mesh
 mesh.Quadrangle()
-mesh.UseExistingFaces(f1) # UseExistingFaces() allows using my2DMeshing()
-mesh.UseExistingFaces(f2)
+mesh.UseExistingFaces(f1) # UseExistingFaces() allows using my2DMeshing();
+mesh.UseExistingFaces(f2) # assign UseExistingFaces() BEFORE calling my2DMeshing()!
 my2DMeshing( f1 )
 my2DMeshing( f2 )
 assert mesh.Compute()