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:
putName(algo3d.GetSubMesh(), "boiteDefaut")
putName(algo3d, "algo3d_boiteDefaut")
putName(meshBoiteDefaut, "boiteDefaut")
+
is_done = meshBoiteDefaut.Compute()
text = "meshBoiteDefaut.Compute"
if is_done:
# --- 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()
putName(algo1d.GetSubMesh(), "aretesVives")
putName(algo1d, "algo1d_aretesVives")
putName(hypo1d, "hypo1d_aretesVives")
+
is_done = meshAretesVives.Compute()
text = "meshAretesVives.Compute"
if is_done:
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() )
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)
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:
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
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:
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')
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:
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()
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:
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()
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:
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()
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:
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()
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:
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()
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:
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