# ---- 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()
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()
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()
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()
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
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