-hyp3 = gen.CreateHypothesis( "MaxElementArea" )
-hypArea1 = hyp3._narrow( SMESH.SMESH_MaxElementArea )
-hypArea1.SetMaxElementArea( 25 )
-print hypArea1.GetName()
-print hypArea1.GetId()
-print hypArea1.GetMaxElementArea()
-
-idarea1 = smeshgui.AddNewHypothesis( salome.orb.object_to_string(hypArea1) );
-smeshgui.SetName(idarea1, "MaxElementArea_20");
-
-
-
-print "-------------------------- MaxElementArea"
-
-hyp4 = gen.CreateHypothesis( "MaxElementArea" )
-hypArea2 = hyp4._narrow( SMESH.SMESH_MaxElementArea )
-hypArea2.SetMaxElementArea( 35 )
-print hypArea2. GetName()
-print hypArea2.GetId()
-print hypArea2.GetMaxElementArea()
-
-idarea2 = smeshgui.AddNewHypothesis( salome.orb.object_to_string(hypArea2) );
-smeshgui.SetName(idarea2, "MaxElementArea_30");
-
-
-print "-------------------------- Regular_1D"
-
-alg1 = gen.CreateHypothesis( "Regular_1D" )
-algo1 = alg1._narrow( SMESH.SMESH_Algo )
-listHyp =algo1.GetCompatibleHypothesis()
-for hyp in listHyp:
- print hyp
-algoReg1d = alg1._narrow( SMESH.SMESH_Regular_1D )
-print algoReg1d.GetName()
-print algoReg1d.GetId()
-
-idreg1d = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(algoReg1d) );
-smeshgui.SetName( idreg1d, "Regular_1D" );
-
-
-
-print "-------------------------- MEFISTO_2D"
-
-alg2 = gen.CreateHypothesis( "MEFISTO_2D" )
-algo2 = alg2._narrow( SMESH.SMESH_Algo )
-listHyp = algo2.GetCompatibleHypothesis()
-for hyp in listHyp:
- print hyp
-algoMef = alg2._narrow( SMESH.SMESH_MEFISTO_2D )
-print algoMef.GetName()
-print algoMef.GetId()
-
-idmef = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(algoMef) );
-smeshgui.SetName( idmef, "MEFISTO_2D" );
-
-
-
-print "-------------------------- SMESH_Quadrangle_2D"
-
-alg3 = gen.CreateHypothesis( "Quadrangle_2D" )
-algo3 = alg3._narrow( SMESH.SMESH_2D_Algo )
-listHyp = algo3.GetCompatibleHypothesis()
-for hyp in listHyp:
- print hyp
-algoQad2 = alg3._narrow( SMESH.SMESH_Quadrangle_2D )
-print algoQad2.GetName()
-print algoQad2.GetId()
-
-idqad2 = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(algoQad2) );
-smeshgui.SetName( idqad2, "SMESH_Quadrangle_2D" );
-
-
-
-print "-------------------------- add hypothesis to main shape1"
-
-shape_mesh = salome.IDToObject( Id_shape1 )
-submesh = mesh.GetElementsOnShape( shape_mesh )
-
-ret = mesh.AddHypothesis( shape_mesh, algoReg1d ) # Regular 1D/wire discretisation
-print ret
-ret = mesh.AddHypothesis( shape_mesh, algoMef ) # MEFISTO 2D
-print ret
-ret = mesh.AddHypothesis( shape_mesh, hypNbSeg1 ) # nb segments
-print ret
-ret = mesh.AddHypothesis( shape_mesh, hypArea1 ) # max area
-print ret
-
-smeshgui.SetAlgorithms( idmesh, idreg1d ); # Regular 1D/wire discretisation
-smeshgui.SetAlgorithms( idmesh, idmef ); # MEFISTO 2D
-smeshgui.SetHypothesis( idmesh, idseg ); # nb segments
-smeshgui.SetHypothesis( idmesh, idarea1 ); # max area
-
-
-
-print "-------------------------- add hypothesis and algorith to sub face"
-
-sub_face = salome.IDToObject( Id_SubFace )
-submesh = mesh.GetElementsOnShape( sub_face )
-
-ret = mesh.AddHypothesis( sub_face, algoQad2 ) # Quadrangle 2D
-print ret
-ret = mesh.AddHypothesis( sub_face, hypArea2 ) # max area
-print ret
-
-idsm2 = smeshgui.AddSubMeshOnShape( idmesh,
- Id_SubFace,
- salome.orb.object_to_string(submesh),
- ShapeTypeFace )
-
-smeshgui.SetName(idsm2, "SubMeshFace")
-smeshgui.SetAlgorithms( idsm2, idqad2 ); # Quadrangle 2D
-smeshgui.SetHypothesis( idsm2, idarea2 ); # max area
-