From: GERALD NICOLAS Date: Wed, 27 Jan 2021 10:51:06 +0000 (+0100) Subject: cosmétique X-Git-Tag: V9_7_0a1~13^2~37 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=39da29483f11f860f3811b3189c33435dba0dc93;p=modules%2Fsmesh.git cosmétique --- diff --git a/src/Tools/blocFissure/gmu/calculePointsAxiauxPipe.py b/src/Tools/blocFissure/gmu/calculePointsAxiauxPipe.py index 01c7e0cd5..7bd9b93bc 100644 --- a/src/Tools/blocFissure/gmu/calculePointsAxiauxPipe.py +++ b/src/Tools/blocFissure/gmu/calculePointsAxiauxPipe.py @@ -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: diff --git a/src/Tools/blocFissure/gmu/construitFissureGenerale.py b/src/Tools/blocFissure/gmu/construitFissureGenerale.py index 84ef19835..8dfcfa527 100644 --- a/src/Tools/blocFissure/gmu/construitFissureGenerale.py +++ b/src/Tools/blocFissure/gmu/construitFissureGenerale.py @@ -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: diff --git a/src/Tools/blocFissure/gmu/mailleAretesEtJonction.py b/src/Tools/blocFissure/gmu/mailleAretesEtJonction.py index e208c0364..101b06d4f 100644 --- a/src/Tools/blocFissure/gmu/mailleAretesEtJonction.py +++ b/src/Tools/blocFissure/gmu/mailleAretesEtJonction.py @@ -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() ) diff --git a/src/Tools/blocFissure/gmu/mailleFacesPeau.py b/src/Tools/blocFissure/gmu/mailleFacesPeau.py index 6c4a86c23..6bbf3e10b 100644 --- a/src/Tools/blocFissure/gmu/mailleFacesPeau.py +++ b/src/Tools/blocFissure/gmu/mailleFacesPeau.py @@ -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) diff --git a/src/Tools/blocFissure/materielCasTests/cubeAngle.py b/src/Tools/blocFissure/materielCasTests/cubeAngle.py index e9be724e0..9b7556196 100644 --- a/src/Tools/blocFissure/materielCasTests/cubeAngle.py +++ b/src/Tools/blocFissure/materielCasTests/cubeAngle.py @@ -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 diff --git a/src/Tools/blocFissure/materielCasTests/cubeFin.py b/src/Tools/blocFissure/materielCasTests/cubeFin.py index 69ecdb813..51f1f34ec 100644 --- a/src/Tools/blocFissure/materielCasTests/cubeFin.py +++ b/src/Tools/blocFissure/materielCasTests/cubeFin.py @@ -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') diff --git a/src/Tools/blocFissure/materielCasTests/decoupeCylindre.py b/src/Tools/blocFissure/materielCasTests/decoupeCylindre.py index 83fb3f55e..b0d9fc275 100644 --- a/src/Tools/blocFissure/materielCasTests/decoupeCylindre.py +++ b/src/Tools/blocFissure/materielCasTests/decoupeCylindre.py @@ -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() diff --git a/src/Tools/blocFissure/materielCasTests/disque_perce.py b/src/Tools/blocFissure/materielCasTests/disque_perce.py index eeba533a2..72b925a30 100644 --- a/src/Tools/blocFissure/materielCasTests/disque_perce.py +++ b/src/Tools/blocFissure/materielCasTests/disque_perce.py @@ -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() diff --git a/src/Tools/blocFissure/materielCasTests/eprouvetteCourbe.py b/src/Tools/blocFissure/materielCasTests/eprouvetteCourbe.py index 40a434b0d..4118b610d 100644 --- a/src/Tools/blocFissure/materielCasTests/eprouvetteCourbe.py +++ b/src/Tools/blocFissure/materielCasTests/eprouvetteCourbe.py @@ -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() diff --git a/src/Tools/blocFissure/materielCasTests/eprouvetteDroite.py b/src/Tools/blocFissure/materielCasTests/eprouvetteDroite.py index 18850d6df..970507242 100644 --- a/src/Tools/blocFissure/materielCasTests/eprouvetteDroite.py +++ b/src/Tools/blocFissure/materielCasTests/eprouvetteDroite.py @@ -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() diff --git a/src/Tools/blocFissure/materielCasTests/fissureGauche.py b/src/Tools/blocFissure/materielCasTests/fissureGauche.py index 39d96b1ab..01e8f2145 100644 --- a/src/Tools/blocFissure/materielCasTests/fissureGauche.py +++ b/src/Tools/blocFissure/materielCasTests/fissureGauche.py @@ -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() diff --git a/src/Tools/blocFissure/materielCasTests/fissureGauche2.py b/src/Tools/blocFissure/materielCasTests/fissureGauche2.py index 88b4fbca1..ac9281080 100644 --- a/src/Tools/blocFissure/materielCasTests/fissureGauche2.py +++ b/src/Tools/blocFissure/materielCasTests/fissureGauche2.py @@ -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