From: Gérald NICOLAS Date: Wed, 7 Apr 2021 14:11:37 +0000 (+0200) Subject: correction faceGauche2 X-Git-Tag: V9_7_0a1~6^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=25cb0387a3f161e944cfae4f446cd2edce1aba3e;p=modules%2Fsmesh.git correction faceGauche2 --- diff --git a/src/Tools/blocFissure/CasTests/execution_Cas.py b/src/Tools/blocFissure/CasTests/execution_Cas.py index d0f4c7906..e96a824ab 100644 --- a/src/Tools/blocFissure/CasTests/execution_Cas.py +++ b/src/Tools/blocFissure/CasTests/execution_Cas.py @@ -49,7 +49,7 @@ else: print ("TORUN = {} # OK".format(TORUNOK)) print ("TORUN = {} # PB".format(TORUNPB)) # genereMateriel - TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0] # aucun + TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0] # aucun TORUN = [ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # cubeAngle TORUN = [ 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # cubeFin TORUN = [ 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # decoupeCylindre @@ -58,7 +58,8 @@ else: TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # ellipse_probleme + fissureGauche2 TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # eprouvetteCourbe TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # eprouvetteDroite - TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # fissureGauche + fissureGauche2 + TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # fissureGauche + TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # fissureGauche2 fissureGauche2 TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0] # vis TORUN = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1] # tube # 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28 @@ -144,29 +145,30 @@ def caract_l_problemes (): n_cas = 13 # genereMateriel : fissureGauche - # genereMateriel : fissureGauche2 from blocFissure.CasTests.faceGauche import faceGauche l_problemes.append(faceGauche(n_cas)) n_cas = 14 - # genereMateriel : aucun + # genereMateriel : fissureGauche2 from blocFissure.CasTests.faceGauche_2 import faceGauche_2 l_problemes.append(faceGauche_2(n_cas)) - #"boiteDefaut" has not been computed: - #- "algo3d_boiteDefaut" failed. Error: Algorithm failed. Presumably, the surface mesh is not compatible with the domain being processed (warning). + #th. 140348470327040 - Trace /home/D68518/salome-dev/DEV_package/modules/src/SMESH/src/SMESH/SMESH_subMesh.cxx [2051] : MG-Tetra failed on sub-shape #1 with error COMPERR_ALGO_FAI + #LED "Presumably, the surface mesh is not compatible with the domain being processed (warning). #An edge is unique (i.e., bounds a hole in the surface). #The surface mesh includes at least one hole. The domain is not well defined. - #See /tmp/GHS3D_18605_10269264.log for more information + #See /tmp/GHS3D_6406_1149841264.log for more information" + #5845 construitFissureGenerale_c[89] Erreur au calcul du maillage. + #meshBoiteDefaut.Compute #Traceback (most recent call last): - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/CasTests/execution_Cas.py", line 222, in + #File "/local01/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/CasTests/execution_Cas.py", line 278, in calcul_cas #ok_maillage = cas.executeProbleme() - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/gmu/fissureGenerique.py", line 122, in executeProbleme - #self.maillageFissureParams, elementsDefaut, step) - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/CasTests/faceGauche_2.py", line 108, in genereMaillageFissure - #maillageFissureParams, elementsDefaut, step) - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/gmu/construitFissureGenerale.py", line 330, in construitFissureGenerale - #raise Exception(text) - #Exception: Erreur au calcul du maillage. + #File "/local01/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/gmu/fissureGenerique.py", line 137, in executeProbleme + #elementsDefaut, step, mailleur) + #File "/local01/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/CasTests/faceGauche_2.py", line 118, in genereMaillageFissure + #step, mailleur, self.numeroCas) + #File "/local01/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/gmu/construitFissureGenerale.py", line 227, in construitFissureGenerale + #mailleur, nro_cas ) + #File "/local01/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/gmu/construitFissureGenerale_c.py", line 90, in construitFisureGenerale_c n_cas = 15 # genereMateriel : aucun @@ -222,35 +224,11 @@ def caract_l_problemes (): # genereMateriel : aucun from blocFissure.CasTests.fissure_Coude import fissure_Coude l_problemes.append(fissure_Coude(n_cas)) -#"Mesh_366" has not been computed: -#- global 1D algorithm is missing - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/CasTests/execution_Cas.py", line 274, in calcul_cas - #ok_maillage = cas.executeProbleme() - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/gmu/fissureGenerique.py", line 137, in executeProbleme - #elementsDefaut, step, mailleur) - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/CasTests/fissure_Coude.py", line 513, in genereMaillageFissure - #step, mailleur) - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/gmu/insereFissureLongue.py", line 435, in insereFissureLongue - #mailleur ) - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/gmu/insereFissureLongue_c.py", line 82, in insereFissureLongue_c - #raise Exception(text) n_cas = 26 # genereMateriel : aucun from blocFissure.CasTests.fissure_Coude_4 import fissure_Coude_4 l_problemes.append(fissure_Coude_4(n_cas)) -#"Mesh_375" has not been computed: -#- global 1D algorithm is missing - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/CasTests/execution_Cas.py", line 274, in calcul_cas - #ok_maillage = cas.executeProbleme() - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/gmu/fissureGenerique.py", line 137, in executeProbleme - #elementsDefaut, step, mailleur) - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/CasTests/fissure_Coude.py", line 513, in genereMaillageFissure - #step, mailleur) - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/gmu/insereFissureLongue.py", line 435, in insereFissureLongue - #mailleur ) - #File "/home/D68518/salome-dev/DEV_package/appli_DEV_package/lib/python3.6/site-packages/salome/blocFissure/gmu/insereFissureLongue_c.py", line 82, in insereFissureLongue_c - #raise Exception(text) n_cas = 27 # genereMateriel : vis diff --git a/src/Tools/blocFissure/gmu/construitFissureGenerale.py b/src/Tools/blocFissure/gmu/construitFissureGenerale.py index 9bb9a937b..814dab4fc 100644 --- a/src/Tools/blocFissure/gmu/construitFissureGenerale.py +++ b/src/Tools/blocFissure/gmu/construitFissureGenerale.py @@ -47,6 +47,7 @@ from .construitMaillagePipe import construitMaillagePipe from .mailleAretesEtJonction import mailleAretesEtJonction from .mailleFacesFissure import mailleFacesFissure from .mailleFacesPeau import mailleFacesPeau +from .putName import putName from .construitFissureGenerale_a import construitFissureGenerale_a from .construitFissureGenerale_b import construitFissureGenerale_b @@ -216,6 +217,7 @@ def construitFissureGenerale(shapesFissure, shapeFissureParams, \ listMeshes.append(mfpeau.GetMesh()) meshBoiteDefaut = smesh.Concatenate(listMeshes, 1, 1, 1e-05,False) + putName(meshBoiteDefaut, "boiteDefaut", i_pref=nro_cas) # Maillage complet maillageComplet = construitFissureGenerale_c( maillageSain, meshBoiteDefaut, \ diff --git a/src/Tools/blocFissure/gmu/construitFissureGenerale_b.py b/src/Tools/blocFissure/gmu/construitFissureGenerale_b.py index 9569f15ee..bf2c5d4fd 100644 --- a/src/Tools/blocFissure/gmu/construitFissureGenerale_b.py +++ b/src/Tools/blocFissure/gmu/construitFissureGenerale_b.py @@ -60,7 +60,8 @@ pour chaque face de peau : 0, 1 ou 2 faces débouchante du fond de fissure if partitionPeauFissFond is not None: dataPPFF,aretesVivesCoupees = identifieElementsGeometriquesPeau(ifil, partitionPeauFissFond, \ edgesPipeFiss, edgesFondFiss, wireFondFiss, aretesVivesC, \ - facesDefaut, centreFondFiss, rayonPipe, aretesVivesCoupees) + facesDefaut, centreFondFiss, rayonPipe, aretesVivesCoupees, \ + nro_cas) ptEdgeFond[ifil] = dataPPFF['endsEdgeFond'] fsPipePeau[ifil] = dataPPFF['facesPipePeau'] edRadFPiPo[ifil] = dataPPFF['edgeRadFacePipePeau'] diff --git a/src/Tools/blocFissure/gmu/construitFissureGenerale_c.py b/src/Tools/blocFissure/gmu/construitFissureGenerale_c.py index c1fce9720..af5c4510d 100644 --- a/src/Tools/blocFissure/gmu/construitFissureGenerale_c.py +++ b/src/Tools/blocFissure/gmu/construitFissureGenerale_c.py @@ -79,7 +79,6 @@ def construitFissureGenerale_c(maillageSain, meshBoiteDefaut, \ hypo3d.SetRemoveLogOnSuccess( 1 ) putName(algo3d.GetSubMesh(), "boiteDefaut", i_pref=nro_cas) putName(algo3d, "algo3d_boiteDefaut", i_pref=nro_cas) - putName(meshBoiteDefaut, "boiteDefaut", i_pref=nro_cas) is_done = meshBoiteDefaut.Compute() text = "meshBoiteDefaut.Compute" diff --git a/src/Tools/blocFissure/gmu/identifieElementsGeometriquesPeau.py b/src/Tools/blocFissure/gmu/identifieElementsGeometriquesPeau.py index 5c4f021ce..e507fa3ff 100644 --- a/src/Tools/blocFissure/gmu/identifieElementsGeometriquesPeau.py +++ b/src/Tools/blocFissure/gmu/identifieElementsGeometriquesPeau.py @@ -30,7 +30,8 @@ from .identifieEdgesPeau import identifieEdgesPeau def identifieElementsGeometriquesPeau(ifil, partitionPeauFissFond, edgesPipeFiss, \ edgesFondFiss, wireFondFiss, aretesVivesC, \ facesDefaut, centreFondFiss, rayonPipe, \ - aretesVivesCoupees): + aretesVivesCoupees, \ + nro_cas=None): """Identification des éléments géométriques de la face de peau""" logging.info('start') fillingFaceExterne = facesDefaut[ifil] @@ -63,7 +64,8 @@ def identifieElementsGeometriquesPeau(ifil, partitionPeauFissFond, edgesPipeFiss (facePeau, facesPeauSorted, edgesPeauFondIn) = identifieFacesPeau(ifil, verticesPipePeau, facesOnside, wireFondFiss, \ verticesEdgesFondIn, pipexts, cercles, \ - fillingFaceExterne, centreFondFiss) + fillingFaceExterne, centreFondFiss, \ + nro_cas) # --- identification précise des edges et disques des faces de peau selon index extremité fissure diff --git a/src/Tools/blocFissure/gmu/identifieFacesPeau.py b/src/Tools/blocFissure/gmu/identifieFacesPeau.py index 3ea6da9e4..1558f9f81 100644 --- a/src/Tools/blocFissure/gmu/identifieFacesPeau.py +++ b/src/Tools/blocFissure/gmu/identifieFacesPeau.py @@ -29,9 +29,10 @@ from .geomsmesh import geomPublish from .sortFaces import sortFaces from .extractionOrientee import extractionOrientee -def identifieFacesPeau(ifil, verticesPipePeau, facesOnside, wireFondFiss, - verticesEdgesFondIn, pipexts, cercles, - fillingFaceExterne, centreFondFiss): +def identifieFacesPeau(ifil, verticesPipePeau, facesOnside, wireFondFiss, \ + verticesEdgesFondIn, pipexts, cercles, \ + fillingFaceExterne, centreFondFiss, \ + nro_cas=None): """Inventaire des faces de peau : face de peau percée du pipe, extrémités du pipe La partition avec le pipe peut créer un vertex (et un edge) de trop sur le cercle projeté, @@ -77,7 +78,7 @@ def identifieFacesPeau(ifil, verticesPipePeau, facesOnside, wireFondFiss, outilPart[j_aux] = geompy.MakeProjection(cercles[j_aux],facesOnside[0]) partitionPeauByPipe = geompy.MakePartition(facesAndFond, outilPart, [], [], geompy.ShapeType["FACE"], 0, [], 1) - name="partitionPeauByPipe{}".format(ifil) + name="partitionPeauByPipe_{}".format(ifil) geomPublish(initLog.debug, partitionPeauByPipe, name) [edgesPeauFondIn, _, _] = extractionOrientee(fillingFaceExterne, partitionPeauByPipe, centreFondFiss, "EDGE", 1.e-3) [_, _, facesPeauFondOn] = extractionOrientee(fillingFaceExterne, partitionPeauByPipe, centreFondFiss, "FACE", 1.e-3) @@ -89,7 +90,7 @@ def identifieFacesPeau(ifil, verticesPipePeau, facesOnside, wireFondFiss, facePeau =geompy.MakePartition(facesPeauFondOn, [], [], [], geompy.ShapeType["FACE"], 0, [], 1) facesPeauSorted = [facePeau] - name="facePeau{}".format(ifil) - geomPublish(initLog.debug, facePeau, name) + name="facePeau_{}".format(ifil) + geomPublish(initLog.always, facePeau, name, nro_cas) return (facePeau, facesPeauSorted, edgesPeauFondIn) diff --git a/src/Tools/blocFissure/gmu/mailleFacesPeau.py b/src/Tools/blocFissure/gmu/mailleFacesPeau.py index b3c4de65f..fde4e492f 100644 --- a/src/Tools/blocFissure/gmu/mailleFacesPeau.py +++ b/src/Tools/blocFissure/gmu/mailleFacesPeau.py @@ -81,7 +81,6 @@ def mailleFacesPeau(partitionsPeauFissFond, idFillingFromBout, facesDefaut, \ bordsVifs = gpedgeVifs[ifil] # pour chaque face de peau : groupe subshape des edges aux bords correspondant à des arêtes vives edgesFissurePeau = edFissPeau[ifil] # pour chaque face de peau : [subshape edge en peau des faces de fissure externes] - logging.info("a") meshFacePeau = smesh.Mesh(facePeau) algo1d = meshFacePeau.UseExisting1DElements(geom=groupEdgesBordPeau) @@ -90,7 +89,6 @@ def mailleFacesPeau(partitionsPeauFissFond, idFillingFromBout, facesDefaut, \ putName(algo1d, "algo1d_bordsLibres", ifil, nro_cas) putName(hypo1d, "hypo1d_bordsLibres", ifil, nro_cas) - logging.info("b") algo1d = meshFacePeau.UseExisting1DElements(geom=geompy.MakeCompound(edgesFissurePeau)) hypo1d = algo1d.SourceEdges([ grpEdgesPeauFissureExterne ],0,0) putName(algo1d.GetSubMesh(), "edgePeauFiss", ifil, nro_cas) @@ -118,7 +116,6 @@ def mailleFacesPeau(partitionsPeauFissFond, idFillingFromBout, facesDefaut, \ putName(algo1d, "algo1d_" + name, ifil, nro_cas) putName(hypo1d, "hypo1d_" + name, ifil, nro_cas) - logging.info("c") logging.info("Maillage avec %s", mailleur) if ( mailleur == "MeshGems"): algo2d = meshFacePeau.Triangle(algo=smeshBuilder.MG_CADSurf) @@ -136,7 +133,6 @@ def mailleFacesPeau(partitionsPeauFissFond, idFillingFromBout, facesDefaut, \ hypo2d.SetFineness( 2 ) hypo2d.SetMinSize( rayonPipe/float(nbsegRad) ) hypo2d.SetQuadAllowed( 0 ) - logging.info("d") putName(algo2d.GetSubMesh(), "facePeau", ifil, nro_cas) putName(algo2d, "algo2d_facePeau", ifil, nro_cas) putName(hypo2d, "hypo2d_facePeau", ifil, nro_cas)