-hypVolume = smesh.CreateHypothesis( "MaxElementVolume", "libStdMeshersEngine.so" )
-hypVolume.SetMaxElementVolume( maxElementVolume )
-print hypVolume.GetName()
-print hypVolume.GetId()
-print hypVolume.GetMaxElementVolume()
-
-smeshgui.SetName(salome.ObjectToID(hypVolume), "MaxElementVolume_20")
-
-print "-------------------------- Regular_1D"
-
-algoReg1D = smesh.CreateHypothesis( "Regular_1D", "libStdMeshersEngine.so" )
-listHyp =algoReg1D.GetCompatibleHypothesis()
-for hyp in listHyp:
- print hyp
-print algoReg1D.GetName()
-print algoReg1D.GetId()
-
-smeshgui.SetName(salome.ObjectToID(algoReg1D), "Regular_1D")
-
-print "-------------------------- MEFISTO_2D"
-
-algoMef = smesh.CreateHypothesis( "MEFISTO_2D", "libStdMeshersEngine.so" )
-listHyp = algoMef.GetCompatibleHypothesis()
-for hyp in listHyp:
- print hyp
-print algoMef.GetName()
-print algoMef.GetId()
-
-smeshgui.SetName(salome.ObjectToID(algoMef), "MEFISTO_2D")
-
-print "-------------------------- NETGEN_3D"
-
-algoNg = smesh.CreateHypothesis( "NETGEN_3D", "libNETGENEngine.so" )
-listHyp = algoNg.GetCompatibleHypothesis()
-for hyp in listHyp:
- print hyp
-print algoNg.GetName()
-print algoNg.GetId()
-
-smeshgui.SetName(salome.ObjectToID(algoNg), "NETGEN_3D")
-
-print "-------------------------- add hypothesis to main mechanic"
-
-shape_mesh = salome.IDToObject( Id_mechanic )
-
-mesh = smesh.CreateMesh(shape_mesh)
-
-idmesh = salome.ObjectToID(mesh)
-smeshgui.SetName( idmesh, "Mesh_mechanic_tetra" )
-
-mesh.AddHypothesis( shape_mesh, hypNbSeg ) # nb segments
-mesh.AddHypothesis( shape_mesh, hypArea ) # max area
-mesh.AddHypothesis( shape_mesh, hypVolume ) # max volume
+algo3 = mesh.Tetrahedron(smeshBuilder.NETGEN)
+hypVolume = algo3.MaxElementVolume(maxElementVolume)
+print(hypVolume.GetName())
+print(hypVolume.GetId())
+print(hypVolume.GetMaxElementVolume())
+smesh.SetName(hypVolume, "maxElementVolume_" + str(maxElementVolume))