]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Modifications from Erwan Adam for bug PAL12407 : Improvement of batchmode_geompy.py. V2_2_0_maintainance_FINAL
authormkr <mkr@opencascade.com>
Thu, 18 May 2006 10:44:16 +0000 (10:44 +0000)
committermkr <mkr@opencascade.com>
Thu, 18 May 2006 10:44:16 +0000 (10:44 +0000)
src/GEOM_SWIG/batchmode_geompy.py

index 1bdbb8aec6fc06862da9df0dbfd6b40c695e64c4..db9850c5429e235fba4f70cecf217f05d6bf15e5 100644 (file)
@@ -31,10 +31,16 @@ import GEOM
 
 g=None
 step = 0
-while step < 50 and g == None:
+sleeping_time = 0.01
+sleeping_time_max = 1.0
+while 1:
     g = lcc.FindOrLoadComponent("FactoryServer", "GEOM")
+    if g is not None: break
     step = step + 1
-    time.sleep(4)
+    if step > 100: break
+    time.sleep(sleeping_time)
+    sleeping_time = max(sleeping_time_max, 2*sleeping_time)
+    pass
 geom = g._narrow( GEOM.GEOM_Gen )
 myBuilder = myStudy.NewBuilder()