-numberOfSegmentsA = 4
-
-algo = mesh.Segment(aretes[0])
-algo.NumberOfSegments(numberOfSegmentsA)
-algo = mesh.Segment(aretes[2])
-algo.NumberOfSegments(numberOfSegmentsA)
-algo = mesh.Segment(aretes[8])
-algo.NumberOfSegments(numberOfSegmentsA)
-algo = mesh.Segment(aretes[10])
-algo.NumberOfSegments(numberOfSegmentsA)
-
-
-numberOfSegmentsC = 15
-
-algo = mesh.Segment(aretes[1])
-algo.NumberOfSegments(numberOfSegmentsC)
-algo = mesh.Segment(aretes[3])
-algo.NumberOfSegments(numberOfSegmentsC)
-algo = mesh.Segment(aretes[9])
-algo.NumberOfSegments(numberOfSegmentsC)
-algo = mesh.Segment(aretes[11])
-algo.NumberOfSegments(numberOfSegmentsC)
-
-
-numberOfSegmentsB = 10
-algo = mesh.Segment(aretes[4])
-algo.NumberOfSegments(numberOfSegmentsB)
-algo = mesh.Segment(aretes[5])
-algo.NumberOfSegments(numberOfSegmentsB)
-algo = mesh.Segment(aretes[6])
-algo.NumberOfSegments(numberOfSegmentsB)
-algo = mesh.Segment(aretes[7])
-algo.NumberOfSegments(numberOfSegmentsB)
-
+# ---- 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