-# ------------------------------ Length Hypothesis
-
-print "-------------------------- create Hypothesis"
-print "-------------------------- LocalLength"
-hyp1 = smesh.CreateHypothesis("LocalLength", "libStdMeshersEngine.so")
-hyp1.SetLength( 100.0 )
-print hyp1.GetName()
-print hyp1.GetId()
-print hyp1.GetLength()
-
-idlength = salome.ObjectToID(hyp1)
-smeshgui.SetName(idlength, "Local_Length_100");
-
-print "-------------------------- NumberOfSegments"
-
-hyp2 = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
-hyp2.SetNumberOfSegments( 10 )
-print hyp2.GetName()
-print hyp2.GetId()
-print hyp2.GetNumberOfSegments()
-
-idseg = salome.ObjectToID(hyp2)
-smeshgui.SetName(idseg, "NumberOfSegments_12");
-
-print "-------------------------- MaxElementArea"
-
-hyp3 = smesh.CreateHypothesis( "MaxElementArea", "libStdMeshersEngine.so" )
-hyp3.SetMaxElementArea( 25 )
-print hyp3.GetName()
-print hyp3.GetId()
-print hyp3.GetMaxElementArea()
-
-idarea1 = salome.ObjectToID(hyp3)
-smeshgui.SetName(idarea1, "MaxElementArea_20");
-
-print "-------------------------- MaxElementArea"
-
-hyp4 = smesh.CreateHypothesis("MaxElementArea", "libStdMeshersEngine.so")
-hyp4.SetMaxElementArea( 35 )
-print hyp4.GetName()
-print hyp4.GetId()
-print hyp4.GetMaxElementArea()
-
-idarea2 = salome.ObjectToID(hyp4)
-smeshgui.SetName(idarea2, "MaxElementArea_30");
-
-
-print "-------------------------- Regular_1D"
-
-alg1 = smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
-listHyp =alg1.GetCompatibleHypothesis()
-for hyp in listHyp:
- print hyp
-print alg1.GetName()
-print alg1.GetId()
-
-idreg1d = salome.ObjectToID(alg1)
-smeshgui.SetName( idreg1d, "Regular_1D" );
-
-print "-------------------------- MEFISTO_2D"
-
-alg2 = smesh.CreateHypothesis("MEFISTO_2D", "libStdMeshersEngine.so")
-listHyp = alg2.GetCompatibleHypothesis()
-for hyp in listHyp:
- print hyp
-print alg2.GetName()
-print alg2.GetId()
-
-idmef = salome.ObjectToID(alg2)
-smeshgui.SetName( idmef, "MEFISTO_2D" );
-
-print "-------------------------- SMESH_Quadrangle_2D"
-
-alg3 = smesh.CreateHypothesis( "Quadrangle_2D", "libStdMeshersEngine.so" )
-listHyp = alg3.GetCompatibleHypothesis()
-for hyp in listHyp:
- print hyp
-print alg3.GetName()
-print alg3.GetId()
-
-idqad2 = salome.ObjectToID(alg3)
-smeshgui.SetName( idqad2, "SMESH_Quadrangle_2D" );
-
-
-print "-------------------------- add hypothesis to main shape1"
-
-shape_mesh = salome.IDToObject( Id_shape1 )
-
-mesh = smesh.CreateMesh(shape_mesh)
-
-idmesh = salome.ObjectToID(mesh)
-smeshgui.SetName( idmesh, "Mesh_mechanic" );
-
-mesh.AddHypothesis( shape_mesh, alg1 ) # Regular 1D/wire discretisation
-mesh.AddHypothesis( shape_mesh, alg2 ) # MEFISTO 2D