]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
SWP12925
authorouv <ouv@opencascade.com>
Mon, 21 Aug 2006 07:35:25 +0000 (07:35 +0000)
committerouv <ouv@opencascade.com>
Mon, 21 Aug 2006 07:35:25 +0000 (07:35 +0000)
src/KERNEL_PY/salome_test.py

index 41d53f90f4fc71ab7c0cc9feafdbde663fb96f84..a89ab45d6c74fb650cd728133df4697c43e3e99f 100755 (executable)
@@ -133,9 +133,14 @@ idedge=geompy.addToStudyInFather(face,edge,name)
 
 # ---- create Hypothesis
 
+if sys.platform == "win32":
+  stdMeshersEngine = "StdMeshersEngine.dll"
+else:
+  stdMeshersEngine = "libStdMeshersEngine.so"
+
 print "-------------------------- create Hypothesis"
 print "-------------------------- LocalLength"
-hypLen1 = smesh.CreateHypothesis( "LocalLength", "StdMeshersEngine" )
+hypLen1 = smesh.CreateHypothesis( "LocalLength", stdMeshersEngine )
 hypLen1.SetLength(100)
 print hypLen1.GetName()
 print hypLen1.GetId()
@@ -144,7 +149,7 @@ print hypLen1.GetLength()
 smeshgui.SetName(salome.ObjectToID(hypLen1), "Local_Length_100")
 
 print "-------------------------- NumberOfSegments"
-hypNbSeg1= smesh.CreateHypothesis( "NumberOfSegments", "StdMeshersEngine" )
+hypNbSeg1= smesh.CreateHypothesis( "NumberOfSegments", stdMeshersEngine )
 hypNbSeg1.SetNumberOfSegments(7)
 print hypNbSeg1.GetName()
 print hypNbSeg1.GetId()
@@ -153,7 +158,7 @@ print hypNbSeg1.GetNumberOfSegments()
 smeshgui.SetName(salome.ObjectToID(hypNbSeg1), "NumberOfSegments_7")
 
 print "-------------------------- MaxElementArea"
-hypArea1 = smesh.CreateHypothesis( "MaxElementArea", "StdMeshersEngine" )
+hypArea1 = smesh.CreateHypothesis( "MaxElementArea", stdMeshersEngine )
 hypArea1.SetMaxElementArea(2500)
 print hypArea1.GetName()
 print hypArea1.GetId()
@@ -162,7 +167,7 @@ print hypArea1.GetMaxElementArea()
 smeshgui.SetName(salome.ObjectToID(hypArea1), "MaxElementArea_2500")
 
 print "-------------------------- MaxElementArea"
-hypArea2 = smesh.CreateHypothesis( "MaxElementArea", "StdMeshersEngine" )
+hypArea2 = smesh.CreateHypothesis( "MaxElementArea", stdMeshersEngine )
 hypArea2.SetMaxElementArea(500)
 print hypArea2.GetName()
 print hypArea2.GetId()
@@ -171,7 +176,7 @@ print hypArea2.GetMaxElementArea()
 smeshgui.SetName(salome.ObjectToID(hypArea2), "MaxElementArea_500")
 
 print "-------------------------- Regular_1D"
-algoReg = smesh.CreateHypothesis( "Regular_1D", "StdMeshersEngine" )
+algoReg = smesh.CreateHypothesis( "Regular_1D", stdMeshersEngine )
 listHyp=algoReg.GetCompatibleHypothesis()
 for hyp in listHyp:
     print hyp
@@ -181,7 +186,7 @@ print algoReg.GetId()
 smeshgui.SetName(salome.ObjectToID(algoReg), "Regular_1D" )
 
 print "-------------------------- MEFISTO_2D"
-algoMef = smesh.CreateHypothesis( "MEFISTO_2D", "StdMeshersEngine" )
+algoMef = smesh.CreateHypothesis( "MEFISTO_2D", stdMeshersEngine )
 listHyp=algoMef.GetCompatibleHypothesis()
 for hyp in listHyp:
     print hyp