-# ---- create Algorithms
-print "-------------------------- create Algorithms"
-regular1D=smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
-quad2D=smesh.CreateHypothesis("Quadrangle_2D", "libStdMeshersEngine.so")
-hexa3D=smesh.CreateHypothesis("Hexa_3D", "libStdMeshersEngine.so")
-
-# ---- init a Mesh with the geom shape
-shape_mesh = blob
-myMesh=smesh.CreateMesh(shape_mesh)
-
-# ---- add hypothesis and algorithms to mesh
-print "-------------------------- add hypothesis to mesh"
-myMesh.AddHypothesis(shape_mesh,regular1D)
-myMesh.AddHypothesis(shape_mesh,quad2D)
-myMesh.AddHypothesis(shape_mesh,hexa3D)
-
-#myMesh.AddHypothesis(shape_mesh,hypNbSeg)
-
-myMesh.AddHypothesis(aretes[0],hypNbSegA)
-myMesh.AddHypothesis(aretes[2],hypNbSegA)
-myMesh.AddHypothesis(aretes[8],hypNbSegA)
-myMesh.AddHypothesis(aretes[10],hypNbSegA)
-
-myMesh.AddHypothesis(aretes[1],hypNbSegC)
-myMesh.AddHypothesis(aretes[3],hypNbSegC)
-myMesh.AddHypothesis(aretes[9],hypNbSegC)
-myMesh.AddHypothesis(aretes[11],hypNbSegC)
-
-myMesh.AddHypothesis(aretes[4],hypNbSegB)
-myMesh.AddHypothesis(aretes[5],hypNbSegB)
-myMesh.AddHypothesis(aretes[6],hypNbSegB)
-myMesh.AddHypothesis(aretes[7],hypNbSegB)
+# ---- assign local hypothesis and algorithms to mesh
+for edges in edgeGroups: # loop on groups of logically parallel edges
+ length = geompy.BasicProperties( edges )[0]
+ if length < 500: nbSeg = 4
+ elif length < 2000: nbSeg = 10
+ else: nbSeg = 15
+ algo = mesh.Segment( edges )
+ algo.NumberOfSegments( nbSeg )
+ pass