cosmétique

This commit is contained in:
GERALD NICOLAS 2021-01-27 11:51:06 +01:00
parent b00d213122
commit 39da29483f
12 changed files with 23 additions and 1 deletions

View File

@ -60,6 +60,7 @@ def calculePointsAxiauxPipe(edgesFondFiss, edgesIdByOrientation, facesDefaut,
meshFondExt = smesh.Mesh(wireFondFiss)
algo1d = meshFondExt.Segment()
hypo1d = algo1d.Adaptive(lgmin, lgmax, deflexion) # a ajuster selon la profondeur de la fissure
is_done = meshFondExt.Compute()
text = "calculePointsAxiauxPipe meshFondExt.Compute"
if is_done:

View File

@ -319,6 +319,7 @@ def construitFissureGenerale(maillagesSains,
putName(algo3d.GetSubMesh(), "boiteDefaut")
putName(algo3d, "algo3d_boiteDefaut")
putName(meshBoiteDefaut, "boiteDefaut")
is_done = meshBoiteDefaut.Compute()
text = "meshBoiteDefaut.Compute"
if is_done:

View File

@ -50,7 +50,8 @@ def mailleAretesEtJonction(internalBoundary, aretesVivesCoupees, lgAretesVives):
# --- maillage des éventuelles arêtes vives entre faces reconstruites
grpAretesVives = None
if len(aretesVivesCoupees) > 0:
if aretesVivesCoupees:
aretesVivesC = geompy.MakeCompound(aretesVivesCoupees)
meshAretesVives = smesh.Mesh(aretesVivesC)
algo1d = meshAretesVives.Segment()
@ -58,6 +59,7 @@ def mailleAretesEtJonction(internalBoundary, aretesVivesCoupees, lgAretesVives):
putName(algo1d.GetSubMesh(), "aretesVives")
putName(algo1d, "algo1d_aretesVives")
putName(hypo1d, "hypo1d_aretesVives")
is_done = meshAretesVives.Compute()
text = "meshAretesVives.Compute"
if is_done:
@ -66,6 +68,7 @@ def mailleAretesEtJonction(internalBoundary, aretesVivesCoupees, lgAretesVives):
text = "Erreur au calcul du maillage.\n" + text
logging.info(text)
raise Exception(text)
grpAretesVives = meshAretesVives.CreateEmptyGroup( SMESH.EDGE, 'grpAretesVives' )
nbAdd = grpAretesVives.AddFrom( meshAretesVives.GetMesh() )

View File

@ -128,6 +128,7 @@ def mailleFacesPeau(partitionsPeauFissFond, idFillingFromBout, facesDefaut,
text = "Erreur au calcul du maillage.\n" + text
logging.info(text)
raise Exception(text)
GroupFaces = meshFacePeau.CreateEmptyGroup( SMESH.FACE, "facePeau%d"%ifil )
nbAdd = GroupFaces.AddFrom( meshFacePeau.GetMesh() )
meshesFacesPeau.append(meshFacePeau)

View File

@ -82,6 +82,7 @@ Nb_Segments_1 = Regular_1D.NumberOfSegments(15)
Nb_Segments_1.SetDistrType( 0 )
Quadrangle_2D = Mesh_1.Quadrangle(algo=smeshBuilder.QUADRANGLE)
Hexa_3D = Mesh_1.Hexahedron(algo=smeshBuilder.Hexa)
is_done = Mesh_1.Compute()
text = "Mesh_1.Compute"
if is_done:
@ -90,6 +91,7 @@ else:
text = "Erreur au calcul du maillage.\n" + text
logging.info(text)
raise Exception(text)
Mesh_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "CubeAngle.med"))
## set object names

View File

@ -131,6 +131,7 @@ Quadrangle_2D = cubeFin_1.Quadrangle(algo=smeshBuilder.QUADRANGLE)
Hexa_3D = cubeFin_1.Hexahedron(algo=smeshBuilder.Hexa)
DEPL_1 = cubeFin_1.GroupOnGeom(DEPL,'DEPL',SMESH.FACE)
ENCASTR_1 = cubeFin_1.GroupOnGeom(ENCASTR,'ENCASTR',SMESH.FACE)
is_done = cubeFin_1.Compute()
text = "cubeFin_1.Compute"
if is_done:
@ -139,6 +140,7 @@ else:
text = "Erreur au calcul du maillage.\n" + text
logging.info(text)
raise Exception(text)
## Set names of Mesh objects
smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D')
smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D')

View File

@ -162,6 +162,7 @@ Nb_Segments_2.SetDistrType( 0 )
Regular_1D_2 = CylindreSain_1.Segment(geom=radial)
Nb_Segments_3 = Regular_1D_2.NumberOfSegments(6,[],[ ])
Nb_Segments_3.SetDistrType( 0 )
is_done = CylindreSain_1.Compute()
text = "CylindreSain_1.Compute"
if is_done:
@ -170,6 +171,7 @@ else:
text = "Erreur au calcul du maillage.\n" + text
logging.info(text)
raise Exception(text)
CylindreSain_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "CylindreSain.med"))
SubMesh_1 = Regular_1D_1.GetSubMesh()
SubMesh_2 = Regular_1D_2.GetSubMesh()

View File

@ -89,6 +89,7 @@ Nb_Segments_2.SetDistrType( 0 )
Regular_1D_2 = Disque_1.Segment(geom=Compound_4)
status = Disque_1.AddHypothesis(Nb_Segments_2,Compound_4)
Quadrangle_2D = Disque_1.Quadrangle(algo=smeshBuilder.QUADRANGLE)
is_done = Disque_1.Compute()
text = "Disque_1.Compute"
if is_done:
@ -97,6 +98,7 @@ else:
text = "Erreur au calcul du maillage.\n" + text
logging.info(text)
raise Exception(text)
Disque_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "disque.med"))
SubMesh_1 = Regular_1D_1.GetSubMesh()
SubMesh_2 = Regular_1D_2.GetSubMesh()

View File

@ -106,6 +106,7 @@ Nb_Segments_2.SetDistrType( 0 )
Regular_1D_2 = EprouvetteCourbe_1.Segment(geom=Compound_y)
Nb_Segments_3 = Regular_1D_2.NumberOfSegments(25)
Nb_Segments_3.SetDistrType( 0 )
is_done = EprouvetteCourbe_1.Compute()
text = "EprouvetteCourbe_1.Compute"
if is_done:
@ -114,6 +115,7 @@ else:
text = "Erreur au calcul du maillage.\n" + text
logging.info(text)
raise Exception(text)
EprouvetteCourbe_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "EprouvetteCourbe.med"))
SubMesh_1 = Regular_1D_1.GetSubMesh()
SubMesh_2 = Regular_1D_2.GetSubMesh()

View File

@ -140,6 +140,7 @@ Nb_Segments_2.SetDistrType( 0 )
Regular_1D_2 = eprouvetteDroite_1.Segment(geom=Compound_x)
Nb_Segments_3 = Regular_1D_2.NumberOfSegments(10,[],[ ])
Nb_Segments_3.SetDistrType( 0 )
is_done = eprouvetteDroite_1.Compute()
text = "eprouvetteDroite_1.Compute"
if is_done:
@ -148,6 +149,7 @@ else:
text = "Erreur au calcul du maillage.\n" + text
logging.info(text)
raise Exception(text)
eprouvetteDroite_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "eprouvetteDroite.med"))
SubMesh_1 = Regular_1D_1.GetSubMesh()
SubMesh_2 = Regular_1D_2.GetSubMesh()

View File

@ -135,6 +135,7 @@ Nb_Segments_2.SetDistrType( 0 )
Regular_1D_2 = objetSain_1.Segment(geom=epaisseurs)
Nb_Segments_3 = Regular_1D_2.NumberOfSegments(5,[],[ ])
Nb_Segments_3.SetDistrType( 0 )
is_done = objetSain_1.Compute()
text = "objetSain_1.Compute"
if is_done:
@ -143,6 +144,7 @@ else:
text = "Erreur au calcul du maillage.\n" + text
logging.info(text)
raise Exception(text)
objetSain_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "faceGaucheSain.med"))
SubMesh_1 = Regular_1D_1.GetSubMesh()
SubMesh_2 = Regular_1D_2.GetSubMesh()

View File

@ -103,6 +103,7 @@ Nb_Segments_1 = Regular_1D.NumberOfSegments(15,[],[ ])
Nb_Segments_1.SetDistrType( 0 )
Quadrangle_2D = Mesh_1.Quadrangle(algo=smeshBuilder.QUADRANGLE)
Hexa_3D = Mesh_1.Hexahedron(algo=smeshBuilder.Hexa)
is_done = Mesh_1.Compute()
text = "Mesh_1.Compute"
if is_done:
@ -111,6 +112,7 @@ else:
text = "Erreur au calcul du maillage.\n" + text
logging.info(text)
raise Exception(text)
Mesh_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "boiteSaine.med"))
## set object names