mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 18:00:34 +05:00
cosmétique
This commit is contained in:
parent
b00d213122
commit
39da29483f
@ -60,6 +60,7 @@ def calculePointsAxiauxPipe(edgesFondFiss, edgesIdByOrientation, facesDefaut,
|
|||||||
meshFondExt = smesh.Mesh(wireFondFiss)
|
meshFondExt = smesh.Mesh(wireFondFiss)
|
||||||
algo1d = meshFondExt.Segment()
|
algo1d = meshFondExt.Segment()
|
||||||
hypo1d = algo1d.Adaptive(lgmin, lgmax, deflexion) # a ajuster selon la profondeur de la fissure
|
hypo1d = algo1d.Adaptive(lgmin, lgmax, deflexion) # a ajuster selon la profondeur de la fissure
|
||||||
|
|
||||||
is_done = meshFondExt.Compute()
|
is_done = meshFondExt.Compute()
|
||||||
text = "calculePointsAxiauxPipe meshFondExt.Compute"
|
text = "calculePointsAxiauxPipe meshFondExt.Compute"
|
||||||
if is_done:
|
if is_done:
|
||||||
|
@ -319,6 +319,7 @@ def construitFissureGenerale(maillagesSains,
|
|||||||
putName(algo3d.GetSubMesh(), "boiteDefaut")
|
putName(algo3d.GetSubMesh(), "boiteDefaut")
|
||||||
putName(algo3d, "algo3d_boiteDefaut")
|
putName(algo3d, "algo3d_boiteDefaut")
|
||||||
putName(meshBoiteDefaut, "boiteDefaut")
|
putName(meshBoiteDefaut, "boiteDefaut")
|
||||||
|
|
||||||
is_done = meshBoiteDefaut.Compute()
|
is_done = meshBoiteDefaut.Compute()
|
||||||
text = "meshBoiteDefaut.Compute"
|
text = "meshBoiteDefaut.Compute"
|
||||||
if is_done:
|
if is_done:
|
||||||
|
@ -50,7 +50,8 @@ def mailleAretesEtJonction(internalBoundary, aretesVivesCoupees, lgAretesVives):
|
|||||||
# --- maillage des éventuelles arêtes vives entre faces reconstruites
|
# --- maillage des éventuelles arêtes vives entre faces reconstruites
|
||||||
|
|
||||||
grpAretesVives = None
|
grpAretesVives = None
|
||||||
if len(aretesVivesCoupees) > 0:
|
if aretesVivesCoupees:
|
||||||
|
|
||||||
aretesVivesC = geompy.MakeCompound(aretesVivesCoupees)
|
aretesVivesC = geompy.MakeCompound(aretesVivesCoupees)
|
||||||
meshAretesVives = smesh.Mesh(aretesVivesC)
|
meshAretesVives = smesh.Mesh(aretesVivesC)
|
||||||
algo1d = meshAretesVives.Segment()
|
algo1d = meshAretesVives.Segment()
|
||||||
@ -58,6 +59,7 @@ def mailleAretesEtJonction(internalBoundary, aretesVivesCoupees, lgAretesVives):
|
|||||||
putName(algo1d.GetSubMesh(), "aretesVives")
|
putName(algo1d.GetSubMesh(), "aretesVives")
|
||||||
putName(algo1d, "algo1d_aretesVives")
|
putName(algo1d, "algo1d_aretesVives")
|
||||||
putName(hypo1d, "hypo1d_aretesVives")
|
putName(hypo1d, "hypo1d_aretesVives")
|
||||||
|
|
||||||
is_done = meshAretesVives.Compute()
|
is_done = meshAretesVives.Compute()
|
||||||
text = "meshAretesVives.Compute"
|
text = "meshAretesVives.Compute"
|
||||||
if is_done:
|
if is_done:
|
||||||
@ -66,6 +68,7 @@ def mailleAretesEtJonction(internalBoundary, aretesVivesCoupees, lgAretesVives):
|
|||||||
text = "Erreur au calcul du maillage.\n" + text
|
text = "Erreur au calcul du maillage.\n" + text
|
||||||
logging.info(text)
|
logging.info(text)
|
||||||
raise Exception(text)
|
raise Exception(text)
|
||||||
|
|
||||||
grpAretesVives = meshAretesVives.CreateEmptyGroup( SMESH.EDGE, 'grpAretesVives' )
|
grpAretesVives = meshAretesVives.CreateEmptyGroup( SMESH.EDGE, 'grpAretesVives' )
|
||||||
nbAdd = grpAretesVives.AddFrom( meshAretesVives.GetMesh() )
|
nbAdd = grpAretesVives.AddFrom( meshAretesVives.GetMesh() )
|
||||||
|
|
||||||
|
@ -128,6 +128,7 @@ def mailleFacesPeau(partitionsPeauFissFond, idFillingFromBout, facesDefaut,
|
|||||||
text = "Erreur au calcul du maillage.\n" + text
|
text = "Erreur au calcul du maillage.\n" + text
|
||||||
logging.info(text)
|
logging.info(text)
|
||||||
raise Exception(text)
|
raise Exception(text)
|
||||||
|
|
||||||
GroupFaces = meshFacePeau.CreateEmptyGroup( SMESH.FACE, "facePeau%d"%ifil )
|
GroupFaces = meshFacePeau.CreateEmptyGroup( SMESH.FACE, "facePeau%d"%ifil )
|
||||||
nbAdd = GroupFaces.AddFrom( meshFacePeau.GetMesh() )
|
nbAdd = GroupFaces.AddFrom( meshFacePeau.GetMesh() )
|
||||||
meshesFacesPeau.append(meshFacePeau)
|
meshesFacesPeau.append(meshFacePeau)
|
||||||
|
@ -82,6 +82,7 @@ Nb_Segments_1 = Regular_1D.NumberOfSegments(15)
|
|||||||
Nb_Segments_1.SetDistrType( 0 )
|
Nb_Segments_1.SetDistrType( 0 )
|
||||||
Quadrangle_2D = Mesh_1.Quadrangle(algo=smeshBuilder.QUADRANGLE)
|
Quadrangle_2D = Mesh_1.Quadrangle(algo=smeshBuilder.QUADRANGLE)
|
||||||
Hexa_3D = Mesh_1.Hexahedron(algo=smeshBuilder.Hexa)
|
Hexa_3D = Mesh_1.Hexahedron(algo=smeshBuilder.Hexa)
|
||||||
|
|
||||||
is_done = Mesh_1.Compute()
|
is_done = Mesh_1.Compute()
|
||||||
text = "Mesh_1.Compute"
|
text = "Mesh_1.Compute"
|
||||||
if is_done:
|
if is_done:
|
||||||
@ -90,6 +91,7 @@ else:
|
|||||||
text = "Erreur au calcul du maillage.\n" + text
|
text = "Erreur au calcul du maillage.\n" + text
|
||||||
logging.info(text)
|
logging.info(text)
|
||||||
raise Exception(text)
|
raise Exception(text)
|
||||||
|
|
||||||
Mesh_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "CubeAngle.med"))
|
Mesh_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "CubeAngle.med"))
|
||||||
|
|
||||||
## set object names
|
## set object names
|
||||||
|
@ -131,6 +131,7 @@ Quadrangle_2D = cubeFin_1.Quadrangle(algo=smeshBuilder.QUADRANGLE)
|
|||||||
Hexa_3D = cubeFin_1.Hexahedron(algo=smeshBuilder.Hexa)
|
Hexa_3D = cubeFin_1.Hexahedron(algo=smeshBuilder.Hexa)
|
||||||
DEPL_1 = cubeFin_1.GroupOnGeom(DEPL,'DEPL',SMESH.FACE)
|
DEPL_1 = cubeFin_1.GroupOnGeom(DEPL,'DEPL',SMESH.FACE)
|
||||||
ENCASTR_1 = cubeFin_1.GroupOnGeom(ENCASTR,'ENCASTR',SMESH.FACE)
|
ENCASTR_1 = cubeFin_1.GroupOnGeom(ENCASTR,'ENCASTR',SMESH.FACE)
|
||||||
|
|
||||||
is_done = cubeFin_1.Compute()
|
is_done = cubeFin_1.Compute()
|
||||||
text = "cubeFin_1.Compute"
|
text = "cubeFin_1.Compute"
|
||||||
if is_done:
|
if is_done:
|
||||||
@ -139,6 +140,7 @@ else:
|
|||||||
text = "Erreur au calcul du maillage.\n" + text
|
text = "Erreur au calcul du maillage.\n" + text
|
||||||
logging.info(text)
|
logging.info(text)
|
||||||
raise Exception(text)
|
raise Exception(text)
|
||||||
|
|
||||||
## Set names of Mesh objects
|
## Set names of Mesh objects
|
||||||
smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D')
|
smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D')
|
||||||
smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D')
|
smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D')
|
||||||
|
@ -162,6 +162,7 @@ Nb_Segments_2.SetDistrType( 0 )
|
|||||||
Regular_1D_2 = CylindreSain_1.Segment(geom=radial)
|
Regular_1D_2 = CylindreSain_1.Segment(geom=radial)
|
||||||
Nb_Segments_3 = Regular_1D_2.NumberOfSegments(6,[],[ ])
|
Nb_Segments_3 = Regular_1D_2.NumberOfSegments(6,[],[ ])
|
||||||
Nb_Segments_3.SetDistrType( 0 )
|
Nb_Segments_3.SetDistrType( 0 )
|
||||||
|
|
||||||
is_done = CylindreSain_1.Compute()
|
is_done = CylindreSain_1.Compute()
|
||||||
text = "CylindreSain_1.Compute"
|
text = "CylindreSain_1.Compute"
|
||||||
if is_done:
|
if is_done:
|
||||||
@ -170,6 +171,7 @@ else:
|
|||||||
text = "Erreur au calcul du maillage.\n" + text
|
text = "Erreur au calcul du maillage.\n" + text
|
||||||
logging.info(text)
|
logging.info(text)
|
||||||
raise Exception(text)
|
raise Exception(text)
|
||||||
|
|
||||||
CylindreSain_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "CylindreSain.med"))
|
CylindreSain_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "CylindreSain.med"))
|
||||||
SubMesh_1 = Regular_1D_1.GetSubMesh()
|
SubMesh_1 = Regular_1D_1.GetSubMesh()
|
||||||
SubMesh_2 = Regular_1D_2.GetSubMesh()
|
SubMesh_2 = Regular_1D_2.GetSubMesh()
|
||||||
|
@ -89,6 +89,7 @@ Nb_Segments_2.SetDistrType( 0 )
|
|||||||
Regular_1D_2 = Disque_1.Segment(geom=Compound_4)
|
Regular_1D_2 = Disque_1.Segment(geom=Compound_4)
|
||||||
status = Disque_1.AddHypothesis(Nb_Segments_2,Compound_4)
|
status = Disque_1.AddHypothesis(Nb_Segments_2,Compound_4)
|
||||||
Quadrangle_2D = Disque_1.Quadrangle(algo=smeshBuilder.QUADRANGLE)
|
Quadrangle_2D = Disque_1.Quadrangle(algo=smeshBuilder.QUADRANGLE)
|
||||||
|
|
||||||
is_done = Disque_1.Compute()
|
is_done = Disque_1.Compute()
|
||||||
text = "Disque_1.Compute"
|
text = "Disque_1.Compute"
|
||||||
if is_done:
|
if is_done:
|
||||||
@ -97,6 +98,7 @@ else:
|
|||||||
text = "Erreur au calcul du maillage.\n" + text
|
text = "Erreur au calcul du maillage.\n" + text
|
||||||
logging.info(text)
|
logging.info(text)
|
||||||
raise Exception(text)
|
raise Exception(text)
|
||||||
|
|
||||||
Disque_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "disque.med"))
|
Disque_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "disque.med"))
|
||||||
SubMesh_1 = Regular_1D_1.GetSubMesh()
|
SubMesh_1 = Regular_1D_1.GetSubMesh()
|
||||||
SubMesh_2 = Regular_1D_2.GetSubMesh()
|
SubMesh_2 = Regular_1D_2.GetSubMesh()
|
||||||
|
@ -106,6 +106,7 @@ Nb_Segments_2.SetDistrType( 0 )
|
|||||||
Regular_1D_2 = EprouvetteCourbe_1.Segment(geom=Compound_y)
|
Regular_1D_2 = EprouvetteCourbe_1.Segment(geom=Compound_y)
|
||||||
Nb_Segments_3 = Regular_1D_2.NumberOfSegments(25)
|
Nb_Segments_3 = Regular_1D_2.NumberOfSegments(25)
|
||||||
Nb_Segments_3.SetDistrType( 0 )
|
Nb_Segments_3.SetDistrType( 0 )
|
||||||
|
|
||||||
is_done = EprouvetteCourbe_1.Compute()
|
is_done = EprouvetteCourbe_1.Compute()
|
||||||
text = "EprouvetteCourbe_1.Compute"
|
text = "EprouvetteCourbe_1.Compute"
|
||||||
if is_done:
|
if is_done:
|
||||||
@ -114,6 +115,7 @@ else:
|
|||||||
text = "Erreur au calcul du maillage.\n" + text
|
text = "Erreur au calcul du maillage.\n" + text
|
||||||
logging.info(text)
|
logging.info(text)
|
||||||
raise Exception(text)
|
raise Exception(text)
|
||||||
|
|
||||||
EprouvetteCourbe_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "EprouvetteCourbe.med"))
|
EprouvetteCourbe_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "EprouvetteCourbe.med"))
|
||||||
SubMesh_1 = Regular_1D_1.GetSubMesh()
|
SubMesh_1 = Regular_1D_1.GetSubMesh()
|
||||||
SubMesh_2 = Regular_1D_2.GetSubMesh()
|
SubMesh_2 = Regular_1D_2.GetSubMesh()
|
||||||
|
@ -140,6 +140,7 @@ Nb_Segments_2.SetDistrType( 0 )
|
|||||||
Regular_1D_2 = eprouvetteDroite_1.Segment(geom=Compound_x)
|
Regular_1D_2 = eprouvetteDroite_1.Segment(geom=Compound_x)
|
||||||
Nb_Segments_3 = Regular_1D_2.NumberOfSegments(10,[],[ ])
|
Nb_Segments_3 = Regular_1D_2.NumberOfSegments(10,[],[ ])
|
||||||
Nb_Segments_3.SetDistrType( 0 )
|
Nb_Segments_3.SetDistrType( 0 )
|
||||||
|
|
||||||
is_done = eprouvetteDroite_1.Compute()
|
is_done = eprouvetteDroite_1.Compute()
|
||||||
text = "eprouvetteDroite_1.Compute"
|
text = "eprouvetteDroite_1.Compute"
|
||||||
if is_done:
|
if is_done:
|
||||||
@ -148,6 +149,7 @@ else:
|
|||||||
text = "Erreur au calcul du maillage.\n" + text
|
text = "Erreur au calcul du maillage.\n" + text
|
||||||
logging.info(text)
|
logging.info(text)
|
||||||
raise Exception(text)
|
raise Exception(text)
|
||||||
|
|
||||||
eprouvetteDroite_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "eprouvetteDroite.med"))
|
eprouvetteDroite_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "eprouvetteDroite.med"))
|
||||||
SubMesh_1 = Regular_1D_1.GetSubMesh()
|
SubMesh_1 = Regular_1D_1.GetSubMesh()
|
||||||
SubMesh_2 = Regular_1D_2.GetSubMesh()
|
SubMesh_2 = Regular_1D_2.GetSubMesh()
|
||||||
|
@ -135,6 +135,7 @@ Nb_Segments_2.SetDistrType( 0 )
|
|||||||
Regular_1D_2 = objetSain_1.Segment(geom=epaisseurs)
|
Regular_1D_2 = objetSain_1.Segment(geom=epaisseurs)
|
||||||
Nb_Segments_3 = Regular_1D_2.NumberOfSegments(5,[],[ ])
|
Nb_Segments_3 = Regular_1D_2.NumberOfSegments(5,[],[ ])
|
||||||
Nb_Segments_3.SetDistrType( 0 )
|
Nb_Segments_3.SetDistrType( 0 )
|
||||||
|
|
||||||
is_done = objetSain_1.Compute()
|
is_done = objetSain_1.Compute()
|
||||||
text = "objetSain_1.Compute"
|
text = "objetSain_1.Compute"
|
||||||
if is_done:
|
if is_done:
|
||||||
@ -143,6 +144,7 @@ else:
|
|||||||
text = "Erreur au calcul du maillage.\n" + text
|
text = "Erreur au calcul du maillage.\n" + text
|
||||||
logging.info(text)
|
logging.info(text)
|
||||||
raise Exception(text)
|
raise Exception(text)
|
||||||
|
|
||||||
objetSain_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "faceGaucheSain.med"))
|
objetSain_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "faceGaucheSain.med"))
|
||||||
SubMesh_1 = Regular_1D_1.GetSubMesh()
|
SubMesh_1 = Regular_1D_1.GetSubMesh()
|
||||||
SubMesh_2 = Regular_1D_2.GetSubMesh()
|
SubMesh_2 = Regular_1D_2.GetSubMesh()
|
||||||
|
@ -103,6 +103,7 @@ Nb_Segments_1 = Regular_1D.NumberOfSegments(15,[],[ ])
|
|||||||
Nb_Segments_1.SetDistrType( 0 )
|
Nb_Segments_1.SetDistrType( 0 )
|
||||||
Quadrangle_2D = Mesh_1.Quadrangle(algo=smeshBuilder.QUADRANGLE)
|
Quadrangle_2D = Mesh_1.Quadrangle(algo=smeshBuilder.QUADRANGLE)
|
||||||
Hexa_3D = Mesh_1.Hexahedron(algo=smeshBuilder.Hexa)
|
Hexa_3D = Mesh_1.Hexahedron(algo=smeshBuilder.Hexa)
|
||||||
|
|
||||||
is_done = Mesh_1.Compute()
|
is_done = Mesh_1.Compute()
|
||||||
text = "Mesh_1.Compute"
|
text = "Mesh_1.Compute"
|
||||||
if is_done:
|
if is_done:
|
||||||
@ -111,6 +112,7 @@ else:
|
|||||||
text = "Erreur au calcul du maillage.\n" + text
|
text = "Erreur au calcul du maillage.\n" + text
|
||||||
logging.info(text)
|
logging.info(text)
|
||||||
raise Exception(text)
|
raise Exception(text)
|
||||||
|
|
||||||
Mesh_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "boiteSaine.med"))
|
Mesh_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "boiteSaine.med"))
|
||||||
|
|
||||||
## set object names
|
## set object names
|
||||||
|
Loading…
Reference in New Issue
Block a user