mefistoID = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(mefisto2D) )
smeshgui.SetName(mefistoID, "MEFISTO_2D")
-print "-------------------------- Tetra_3D"
+print "-------------------------- NETGEN_3D"
-hypothesis=gen.CreateHypothesis("Tetra_3D")
-tetra3D = hypothesis._narrow(SMESH.SMESH_Tetra_3D)
-tetraID = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(tetra3D) )
-smeshgui.SetName(tetraID, "Tetra_3D")
+hypothesis=gen.CreateHypothesis("NETGEN_3D")
+netgen3D = hypothesis._narrow(SMESH.SMESH_NETGEN_3D)
+netgenID = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(netgen3D) )
+smeshgui.SetName(netgenID, "NETGEN_3D")
# ---- init a Mesh with the shell
print ret
ret=mesh.AddHypothesis(shell,hypArea)
print ret
-ret=mesh.AddHypothesis(shell,tetra3D)
+ret=mesh.AddHypothesis(shell,netgen3D)
print ret
ret=mesh.AddHypothesis(shell,hypVolume)
print ret
smeshgui.SetHypothesis( idmesh, idseg )
smeshgui.SetAlgorithms( idmesh, mefistoID )
smeshgui.SetHypothesis( idmesh, idarea )
-smeshgui.SetAlgorithms( idmesh, tetraID )
+smeshgui.SetAlgorithms( idmesh, netgenID )
smeshgui.SetHypothesis( idmesh, idvolume )
sg.updateObjBrowser(1)
# one has a race in common with the two others.
# Hypothesis and algorithms for the mesh generation are global
#
-
+>
import salome
from salome import sg
mefistoID = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(mefisto2D) )
smeshgui.SetName(mefistoID, "MEFISTO_2D")
-print "-------------------------- Tetra_3D"
+print "-------------------------- NETGEN_3D"
-hypothesis=gen.CreateHypothesis("Tetra_3D")
-tetra3D = hypothesis._narrow(SMESH.SMESH_Tetra_3D)
-tetraID = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(tetra3D) )
-smeshgui.SetName(tetraID, "Tetra_3D")
+hypothesis=gen.CreateHypothesis("NETGEN_3D")
+netgen3D = hypothesis._narrow(SMESH.SMESH_NETGEN_3D)
+netgenID = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(netgen3D) )
+smeshgui.SetName(netgenID, "NETGEN_3D")
# ---- init a Mesh with the shell
print ret
ret=mesh.AddHypothesis(shell,hypArea)
print ret
-ret=mesh.AddHypothesis(shell,tetra3D)
+ret=mesh.AddHypothesis(shell,netgen3D)
print ret
ret=mesh.AddHypothesis(shell,hypVolume)
print ret
smeshgui.SetHypothesis( idmesh, idseg )
smeshgui.SetAlgorithms( idmesh, mefistoID )
smeshgui.SetHypothesis( idmesh, idarea )
-smeshgui.SetAlgorithms( idmesh, tetraID )
+smeshgui.SetAlgorithms( idmesh, netgenID )
smeshgui.SetHypothesis( idmesh, idvolume )
sg.updateObjBrowser(1)
mefistoID = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(mefisto2D) )
smeshgui.SetName(mefistoID, "MEFISTO_2D")
-print "-------------------------- Tetra_3D"
+print "-------------------------- NETGEN_3D"
-hypothesis=gen.CreateHypothesis("Tetra_3D")
-tetra3D = hypothesis._narrow(SMESH.SMESH_Tetra_3D)
-tetraID = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(tetra3D) )
-smeshgui.SetName(tetraID, "Tetra_3D")
+hypothesis=gen.CreateHypothesis("NETGEN_3D")
+netgen3D = hypothesis._narrow(SMESH.SMESH_NETGEN_3D)
+netgenID = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(netgen3D) )
+smeshgui.SetName(netgenID, "NETGEN_3D")
# ---- init a Mesh with the boxe
print ret
ret=mesh.AddHypothesis(box,hypArea)
print ret
-ret=mesh.AddHypothesis(box,tetra3D)
+ret=mesh.AddHypothesis(box,netgen3D)
print ret
ret=mesh.AddHypothesis(box,hypVolume)
print ret
smeshgui.SetHypothesis( idmesh, idseg )
smeshgui.SetAlgorithms( idmesh, mefistoID )
smeshgui.SetHypothesis( idmesh, idarea )
-smeshgui.SetAlgorithms( idmesh, tetraID )
+smeshgui.SetAlgorithms( idmesh, netgenID )
smeshgui.SetHypothesis( idmesh, idvolume )
sg.updateObjBrowser(1)
idMef = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(algoMef) )
smeshgui.SetName( idMef, "MEFISTO_2D" )
-print "-------------------------- Tetra_3D"
+print "-------------------------- NETGEN_3D"
-alg3D = gen.CreateHypothesis( "Tetra_3D" )
+alg3D = gen.CreateHypothesis( "NETGEN_3D" )
algo3D = alg3D._narrow( SMESH.SMESH_Algo )
listHyp = algo3D.GetCompatibleHypothesis()
for hyp in listHyp:
print hyp
-algoNg = alg3D._narrow( SMESH.SMESH_Tetra_3D )
+algoNg = alg3D._narrow( SMESH.SMESH_NETGEN_3D )
print algoNg.GetName()
print algoNg.GetId()
idNg = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(algoNg) )
-smeshgui.SetName( idNg, "Tetra_2D" )
+smeshgui.SetName( idNg, "NETGEN_2D" )
print "-------------------------- add hypothesis to main mechanic"
print ret
ret = mesh.AddHypothesis( shape_mesh, algoMef ) # MEFISTO 2D
print ret
-ret = mesh.AddHypothesis( shape_mesh, algoNg ) # Tetra 3D
+ret = mesh.AddHypothesis( shape_mesh, algoNg ) # NETGEN 3D
print ret
ret = mesh.AddHypothesis( shape_mesh, hypNbSeg ) # nb segments
print ret
smeshgui.SetAlgorithms( idmesh, idReg1D ); # Regular 1D/wire discretisation
smeshgui.SetAlgorithms( idmesh, idMef ); # MEFISTO 2D
-smeshgui.SetAlgorithms( idmesh, idNg ); # Tetra 3D
+smeshgui.SetAlgorithms( idmesh, idNg ); # NETGEN 3D
smeshgui.SetHypothesis( idmesh, idSeg ); # nb segments
smeshgui.SetHypothesis( idmesh, idArea ); # max area
smeshgui.SetHypothesis( idmesh, idVolume ); # max volume