mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-14 02:30:33 +05:00
changes due to the fact that Tetra_3D has been remplaced by NETGEN_3D.
This commit is contained in:
parent
28a1583230
commit
5f6e315d29
@ -137,12 +137,12 @@ mefisto2D = hypothesis._narrow(SMESH.SMESH_MEFISTO_2D)
|
|||||||
mefistoID = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(mefisto2D) )
|
mefistoID = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(mefisto2D) )
|
||||||
smeshgui.SetName(mefistoID, "MEFISTO_2D")
|
smeshgui.SetName(mefistoID, "MEFISTO_2D")
|
||||||
|
|
||||||
print "-------------------------- Tetra_3D"
|
print "-------------------------- NETGEN_3D"
|
||||||
|
|
||||||
hypothesis=gen.CreateHypothesis("Tetra_3D")
|
hypothesis=gen.CreateHypothesis("NETGEN_3D")
|
||||||
tetra3D = hypothesis._narrow(SMESH.SMESH_Tetra_3D)
|
netgen3D = hypothesis._narrow(SMESH.SMESH_NETGEN_3D)
|
||||||
tetraID = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(tetra3D) )
|
netgenID = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(netgen3D) )
|
||||||
smeshgui.SetName(tetraID, "Tetra_3D")
|
smeshgui.SetName(netgenID, "NETGEN_3D")
|
||||||
|
|
||||||
# ---- init a Mesh with the shell
|
# ---- init a Mesh with the shell
|
||||||
|
|
||||||
@ -163,7 +163,7 @@ ret=mesh.AddHypothesis(shell,mefisto2D)
|
|||||||
print ret
|
print ret
|
||||||
ret=mesh.AddHypothesis(shell,hypArea)
|
ret=mesh.AddHypothesis(shell,hypArea)
|
||||||
print ret
|
print ret
|
||||||
ret=mesh.AddHypothesis(shell,tetra3D)
|
ret=mesh.AddHypothesis(shell,netgen3D)
|
||||||
print ret
|
print ret
|
||||||
ret=mesh.AddHypothesis(shell,hypVolume)
|
ret=mesh.AddHypothesis(shell,hypVolume)
|
||||||
print ret
|
print ret
|
||||||
@ -172,7 +172,7 @@ smeshgui.SetAlgorithms( idmesh, regularID)
|
|||||||
smeshgui.SetHypothesis( idmesh, idseg )
|
smeshgui.SetHypothesis( idmesh, idseg )
|
||||||
smeshgui.SetAlgorithms( idmesh, mefistoID )
|
smeshgui.SetAlgorithms( idmesh, mefistoID )
|
||||||
smeshgui.SetHypothesis( idmesh, idarea )
|
smeshgui.SetHypothesis( idmesh, idarea )
|
||||||
smeshgui.SetAlgorithms( idmesh, tetraID )
|
smeshgui.SetAlgorithms( idmesh, netgenID )
|
||||||
smeshgui.SetHypothesis( idmesh, idvolume )
|
smeshgui.SetHypothesis( idmesh, idvolume )
|
||||||
|
|
||||||
sg.updateObjBrowser(1)
|
sg.updateObjBrowser(1)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# one has a race in common with the two others.
|
# one has a race in common with the two others.
|
||||||
# Hypothesis and algorithms for the mesh generation are global
|
# Hypothesis and algorithms for the mesh generation are global
|
||||||
#
|
#
|
||||||
|
>
|
||||||
import salome
|
import salome
|
||||||
from salome import sg
|
from salome import sg
|
||||||
|
|
||||||
@ -149,12 +149,12 @@ mefisto2D = hypothesis._narrow(SMESH.SMESH_MEFISTO_2D)
|
|||||||
mefistoID = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(mefisto2D) )
|
mefistoID = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(mefisto2D) )
|
||||||
smeshgui.SetName(mefistoID, "MEFISTO_2D")
|
smeshgui.SetName(mefistoID, "MEFISTO_2D")
|
||||||
|
|
||||||
print "-------------------------- Tetra_3D"
|
print "-------------------------- NETGEN_3D"
|
||||||
|
|
||||||
hypothesis=gen.CreateHypothesis("Tetra_3D")
|
hypothesis=gen.CreateHypothesis("NETGEN_3D")
|
||||||
tetra3D = hypothesis._narrow(SMESH.SMESH_Tetra_3D)
|
netgen3D = hypothesis._narrow(SMESH.SMESH_NETGEN_3D)
|
||||||
tetraID = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(tetra3D) )
|
netgenID = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(netgen3D) )
|
||||||
smeshgui.SetName(tetraID, "Tetra_3D")
|
smeshgui.SetName(netgenID, "NETGEN_3D")
|
||||||
|
|
||||||
# ---- init a Mesh with the shell
|
# ---- init a Mesh with the shell
|
||||||
|
|
||||||
@ -175,7 +175,7 @@ ret=mesh.AddHypothesis(shell,mefisto2D)
|
|||||||
print ret
|
print ret
|
||||||
ret=mesh.AddHypothesis(shell,hypArea)
|
ret=mesh.AddHypothesis(shell,hypArea)
|
||||||
print ret
|
print ret
|
||||||
ret=mesh.AddHypothesis(shell,tetra3D)
|
ret=mesh.AddHypothesis(shell,netgen3D)
|
||||||
print ret
|
print ret
|
||||||
ret=mesh.AddHypothesis(shell,hypVolume)
|
ret=mesh.AddHypothesis(shell,hypVolume)
|
||||||
print ret
|
print ret
|
||||||
@ -184,7 +184,7 @@ smeshgui.SetAlgorithms( idmesh, regularID)
|
|||||||
smeshgui.SetHypothesis( idmesh, idseg )
|
smeshgui.SetHypothesis( idmesh, idseg )
|
||||||
smeshgui.SetAlgorithms( idmesh, mefistoID )
|
smeshgui.SetAlgorithms( idmesh, mefistoID )
|
||||||
smeshgui.SetHypothesis( idmesh, idarea )
|
smeshgui.SetHypothesis( idmesh, idarea )
|
||||||
smeshgui.SetAlgorithms( idmesh, tetraID )
|
smeshgui.SetAlgorithms( idmesh, netgenID )
|
||||||
smeshgui.SetHypothesis( idmesh, idvolume )
|
smeshgui.SetHypothesis( idmesh, idvolume )
|
||||||
|
|
||||||
sg.updateObjBrowser(1)
|
sg.updateObjBrowser(1)
|
||||||
|
@ -110,12 +110,12 @@ mefisto2D = hypothesis._narrow(SMESH.SMESH_MEFISTO_2D)
|
|||||||
mefistoID = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(mefisto2D) )
|
mefistoID = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(mefisto2D) )
|
||||||
smeshgui.SetName(mefistoID, "MEFISTO_2D")
|
smeshgui.SetName(mefistoID, "MEFISTO_2D")
|
||||||
|
|
||||||
print "-------------------------- Tetra_3D"
|
print "-------------------------- NETGEN_3D"
|
||||||
|
|
||||||
hypothesis=gen.CreateHypothesis("Tetra_3D")
|
hypothesis=gen.CreateHypothesis("NETGEN_3D")
|
||||||
tetra3D = hypothesis._narrow(SMESH.SMESH_Tetra_3D)
|
netgen3D = hypothesis._narrow(SMESH.SMESH_NETGEN_3D)
|
||||||
tetraID = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(tetra3D) )
|
netgenID = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(netgen3D) )
|
||||||
smeshgui.SetName(tetraID, "Tetra_3D")
|
smeshgui.SetName(netgenID, "NETGEN_3D")
|
||||||
|
|
||||||
# ---- init a Mesh with the boxe
|
# ---- init a Mesh with the boxe
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ ret=mesh.AddHypothesis(box,mefisto2D)
|
|||||||
print ret
|
print ret
|
||||||
ret=mesh.AddHypothesis(box,hypArea)
|
ret=mesh.AddHypothesis(box,hypArea)
|
||||||
print ret
|
print ret
|
||||||
ret=mesh.AddHypothesis(box,tetra3D)
|
ret=mesh.AddHypothesis(box,netgen3D)
|
||||||
print ret
|
print ret
|
||||||
ret=mesh.AddHypothesis(box,hypVolume)
|
ret=mesh.AddHypothesis(box,hypVolume)
|
||||||
print ret
|
print ret
|
||||||
@ -145,7 +145,7 @@ smeshgui.SetAlgorithms( idmesh, regularID)
|
|||||||
smeshgui.SetHypothesis( idmesh, idseg )
|
smeshgui.SetHypothesis( idmesh, idseg )
|
||||||
smeshgui.SetAlgorithms( idmesh, mefistoID )
|
smeshgui.SetAlgorithms( idmesh, mefistoID )
|
||||||
smeshgui.SetHypothesis( idmesh, idarea )
|
smeshgui.SetHypothesis( idmesh, idarea )
|
||||||
smeshgui.SetAlgorithms( idmesh, tetraID )
|
smeshgui.SetAlgorithms( idmesh, netgenID )
|
||||||
smeshgui.SetHypothesis( idmesh, idvolume )
|
smeshgui.SetHypothesis( idmesh, idvolume )
|
||||||
|
|
||||||
sg.updateObjBrowser(1)
|
sg.updateObjBrowser(1)
|
||||||
|
@ -203,19 +203,19 @@ print algoMef.GetId()
|
|||||||
idMef = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(algoMef) )
|
idMef = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(algoMef) )
|
||||||
smeshgui.SetName( idMef, "MEFISTO_2D" )
|
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 )
|
algo3D = alg3D._narrow( SMESH.SMESH_Algo )
|
||||||
listHyp = algo3D.GetCompatibleHypothesis()
|
listHyp = algo3D.GetCompatibleHypothesis()
|
||||||
for hyp in listHyp:
|
for hyp in listHyp:
|
||||||
print hyp
|
print hyp
|
||||||
algoNg = alg3D._narrow( SMESH.SMESH_Tetra_3D )
|
algoNg = alg3D._narrow( SMESH.SMESH_NETGEN_3D )
|
||||||
print algoNg.GetName()
|
print algoNg.GetName()
|
||||||
print algoNg.GetId()
|
print algoNg.GetId()
|
||||||
|
|
||||||
idNg = smeshgui.AddNewAlgorithms( salome.orb.object_to_string(algoNg) )
|
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 "-------------------------- add hypothesis to main mechanic"
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ ret = mesh.AddHypothesis( shape_mesh, algoReg1D ) # Regular 1D/wire discretisa
|
|||||||
print ret
|
print ret
|
||||||
ret = mesh.AddHypothesis( shape_mesh, algoMef ) # MEFISTO 2D
|
ret = mesh.AddHypothesis( shape_mesh, algoMef ) # MEFISTO 2D
|
||||||
print ret
|
print ret
|
||||||
ret = mesh.AddHypothesis( shape_mesh, algoNg ) # Tetra 3D
|
ret = mesh.AddHypothesis( shape_mesh, algoNg ) # NETGEN 3D
|
||||||
print ret
|
print ret
|
||||||
ret = mesh.AddHypothesis( shape_mesh, hypNbSeg ) # nb segments
|
ret = mesh.AddHypothesis( shape_mesh, hypNbSeg ) # nb segments
|
||||||
print ret
|
print ret
|
||||||
@ -237,7 +237,7 @@ print ret
|
|||||||
|
|
||||||
smeshgui.SetAlgorithms( idmesh, idReg1D ); # Regular 1D/wire discretisation
|
smeshgui.SetAlgorithms( idmesh, idReg1D ); # Regular 1D/wire discretisation
|
||||||
smeshgui.SetAlgorithms( idmesh, idMef ); # MEFISTO 2D
|
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, idSeg ); # nb segments
|
||||||
smeshgui.SetHypothesis( idmesh, idArea ); # max area
|
smeshgui.SetHypothesis( idmesh, idArea ); # max area
|
||||||
smeshgui.SetHypothesis( idmesh, idVolume ); # max volume
|
smeshgui.SetHypothesis( idmesh, idVolume ); # max volume
|
||||||
|
Loading…
Reference in New Issue
Block a user