diff --git a/doc/salome/tui/CMakeLists.txt b/doc/salome/tui/CMakeLists.txt index 24c9938e9..4d12f3f42 100644 --- a/doc/salome/tui/CMakeLists.txt +++ b/doc/salome/tui/CMakeLists.txt @@ -25,11 +25,10 @@ SALOME_CONFIGURE_FILE(static/header.html.in static/header.html) ADD_CUSTOM_TARGET(dev_docs ${DOXYGEN_EXECUTABLE}) -INSTALL(CODE "FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/SMESH)") -INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/SMESH +INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/SMESH + OPTIONAL DESTINATION ${SALOME_INSTALL_DOC}/tui PATTERN "*.md5" EXCLUDE PATTERN "*.map" EXCLUDE) -INSTALL(FILES images/head.png DESTINATION ${SALOME_INSTALL_DOC}/tui/SMESH) SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES SMESH) diff --git a/doc/salome/tui/doxyfile.in b/doc/salome/tui/doxyfile.in index 561246e2f..e123d5bb4 100644 --- a/doc/salome/tui/doxyfile.in +++ b/doc/salome/tui/doxyfile.in @@ -119,6 +119,7 @@ HTML_FILE_EXTENSION = .html HTML_HEADER = @CMAKE_CURRENT_BINARY_DIR@/static/header.html HTML_FOOTER = @CMAKE_CURRENT_SOURCE_DIR@/static/footer.html HTML_EXTRA_STYLESHEET = @CMAKE_CURRENT_SOURCE_DIR@/static/salome_extra.css +HTML_EXTRA_FILES = @CMAKE_CURRENT_SOURCE_DIR@/images/head.png HTML_ALIGN_MEMBERS = YES GENERATE_HTMLHELP = NO CHM_FILE = diff --git a/src/Tools/blocFissure/CasTests/execution_Cas.py b/src/Tools/blocFissure/CasTests/execution_Cas.py index 7049af67a..e96a824ab 100644 --- a/src/Tools/blocFissure/CasTests/execution_Cas.py +++ b/src/Tools/blocFissure/CasTests/execution_Cas.py @@ -20,7 +20,9 @@ """Lancement des cas-tests de blocFissure""" import traceback + import logging + from blocFissure import gmu from blocFissure.gmu import initLog from blocFissure.gmu import geomsmesh @@ -33,7 +35,7 @@ from blocFissure.gmu.casStandard import casStandard #initLog.setPerfTests() # ---tous les cas en séquence, ou les cas sélectionnés ... -TORUNOK = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0] # OK +TORUNOK = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0] # OK # 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 #RUNALL = False RUNALL = True @@ -47,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 @@ -56,11 +58,12 @@ 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 - TORUN = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0] # OK + TORUN = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0] # OK # ----------------------------------------------------------------------------------------------- def caract_l_problemes (): @@ -142,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 @@ -220,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/initLog.py b/src/Tools/blocFissure/gmu/initLog.py index 22eeb4307..01918d56d 100644 --- a/src/Tools/blocFissure/gmu/initLog.py +++ b/src/Tools/blocFissure/gmu/initLog.py @@ -21,6 +21,7 @@ import logging import os +import tempfile debug = 10 info = 20 @@ -29,9 +30,13 @@ error = 40 critical = 50 always = 100 +filelog = os.path.join(tempfile.gettempdir(),"blocFissure.log") + loglevel = warning -logging.basicConfig(format='%(funcName)s[%(lineno)d] %(message)s', - level=logging.WARNING) + +logging.basicConfig(format='%(funcName)s[%(lineno)d] %(message)s', \ + level=logging.WARNING, \ + filename=filelog) ch = None fh = None 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) diff --git a/src/Tools/blocFissure/materielCasTests/fissureGauche2.py b/src/Tools/blocFissure/materielCasTests/fissureGauche2.py index aa3f3300b..2ea914c72 100644 --- a/src/Tools/blocFissure/materielCasTests/fissureGauche2.py +++ b/src/Tools/blocFissure/materielCasTests/fissureGauche2.py @@ -17,93 +17,98 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +"""Géométrie et maillage de base nécessaire au cas-test : +. faceGauche_2 +""" + +import os +import math import logging -import sys import salome +from salome.smesh import smeshBuilder +from salome.StdMeshers import StdMeshersBuilder +import GEOM +import SMESH +import SALOMEDS -salome.salome_init() - -import salome_notebook -notebook = salome_notebook.notebook - -import os from blocFissure import gmu +from blocFissure.gmu.geomsmesh import geompy +from blocFissure.gmu.geomsmesh import geomPublish +from blocFissure.gmu.geomsmesh import geomPublishInFather + +from blocFissure.gmu.triedreBase import triedreBase +from blocFissure.gmu.putName import putName +from blocFissure.gmu import initLog ### ### GEOM component ### -import GEOM -from salome.geom import geomBuilder -import math -import SALOMEDS +O, OX, OY, OZ = triedreBase() - -geompy = geomBuilder.New() - -O = geompy.MakeVertex(0, 0, 0) -OX = geompy.MakeVectorDXDYDZ(1, 0, 0) -OY = geompy.MakeVectorDXDYDZ(0, 1, 0) -OZ = geompy.MakeVectorDXDYDZ(0, 0, 1) -Circle_1 = geompy.MakeCircle(O, OX, 500) +Circle_1 = geompy.MakeCircle(O, OX, 500.) Extrusion_1 = geompy.MakePrismVecH2Ways(Circle_1, OX, 500) -Vertex_1 = geompy.MakeVertex(500, 0, 0) +Vertex_1 = geompy.MakeVertex(500., 0., 0.) Circle_3 = geompy.MakeCircle(Vertex_1, OZ, 300) Extrusion_2 = geompy.MakePrismVecH(Circle_3, OZ, 1000) Partition_1 = geompy.MakePartition([Extrusion_1], [Extrusion_2], [], [], geompy.ShapeType["FACE"], 0, [], 0) [Face_1,Face_2] = geompy.SubShapes(Partition_1, [18, 13]) + FaceFissExt = geompy.MakeFuse(Face_2, Face_1) +geompy.addToStudy( FaceFissExt, 'FaceFissExt' ) geompy.ExportBREP(FaceFissExt, os.path.join(gmu.pathBloc, "materielCasTests", "faceGauche2Fiss.brep")) + Vertex_2 = geompy.MakeVertex(0, -500, 0) Vertex_3 = geompy.MakeVertex(400, 500, 800) objetSain = geompy.MakeBoxTwoPnt(Vertex_3, Vertex_2) -Rotation_1 = geompy.MakeRotation(Extrusion_1, OX, 180*math.pi/180.0) +geompy.addToStudy( objetSain, 'objetSain' ) + +Rotation_1 = geompy.MakeRotation(Extrusion_1, OX, math.pi) Partition_2 = geompy.MakePartition([Rotation_1], [Extrusion_2], [], [], geompy.ShapeType["FACE"], 0, [], 0) geompy.addToStudy( Partition_2, 'Partition_2' ) [FaceFissExtSimple] = geompy.SubShapes(Partition_2, [13]) geompy.addToStudyInFather( Partition_2, FaceFissExtSimple, 'FaceFissExtSimple' ) -Plane_1 = geompy.MakePlaneLCS(None, 2000, 3) +Plane_1 = geompy.MakePlaneLCS(None, 2000., 3) + FaceFissExtCoupe = geompy.MakePartition([FaceFissExtSimple], [Plane_1], [], [], geompy.ShapeType["FACE"], 0, [], 0) -geompy.ExportBREP(FaceFissExtCoupe, os.path.join(gmu.pathBloc, "materielCasTests", "faceGauche2FissCoupe.brep")) -geompy.addToStudy( O, 'O' ) -geompy.addToStudy( OX, 'OX' ) -geompy.addToStudy( OY, 'OY' ) -geompy.addToStudy( OZ, 'OZ' ) -geompy.addToStudy( Circle_1, 'Circle_1' ) -geompy.addToStudy( Extrusion_1, 'Extrusion_1' ) -geompy.addToStudy( Vertex_1, 'Vertex_1' ) -geompy.addToStudy( Circle_3, 'Circle_3' ) -geompy.addToStudy( Extrusion_2, 'Extrusion_2' ) -geompy.addToStudy( Partition_1, 'Partition_1' ) -geompy.addToStudyInFather( Partition_1, Face_1, 'Face_1' ) -geompy.addToStudyInFather( Partition_1, Face_2, 'Face_2' ) -geompy.addToStudy( FaceFissExt, 'FaceFissExt' ) -geompy.addToStudy( Vertex_2, 'Vertex_2' ) -geompy.addToStudy( Vertex_3, 'Vertex_3' ) -geompy.addToStudy( objetSain, 'objetSain' ) -geompy.addToStudy( Rotation_1, 'Rotation_1' ) -geompy.addToStudy( Plane_1, 'Plane_1' ) geompy.addToStudy( FaceFissExtCoupe, 'FaceFissExtCoupe' ) +geompy.ExportBREP(FaceFissExtCoupe, os.path.join(gmu.pathBloc, "materielCasTests", "faceGauche2FissCoupe.brep")) + +geomPublish(initLog.debug, Circle_1, 'Circle_1' ) +geomPublish(initLog.debug, Extrusion_1, 'Extrusion_1' ) +geomPublish(initLog.debug, Vertex_1, 'Vertex_1' ) +geomPublish(initLog.debug, Circle_3, 'Circle_3' ) +geomPublish(initLog.debug, Extrusion_2, 'Extrusion_2' ) +geomPublish(initLog.debug, Partition_1, 'Partition_1' ) +geomPublishInFather(initLog.debug, Partition_1, Face_1, 'Face_1' ) +geomPublishInFather(initLog.debug, Partition_1, Face_2, 'Face_2' ) +geomPublish(initLog.debug, Vertex_2, 'Vertex_2' ) +geomPublish(initLog.debug, Vertex_3, 'Vertex_3' ) +geomPublish(initLog.debug, Rotation_1, 'Rotation_1' ) +geomPublish(initLog.debug, Plane_1, 'Plane_1' ) + ### ### SMESH component ### - -import SMESH, SALOMEDS -from salome.smesh import smeshBuilder - smesh = smeshBuilder.New() -from salome.StdMeshers import StdMeshersBuilder Mesh_1 = smesh.Mesh(objetSain) -smesh.SetName(Mesh_1, 'Mesh_1') +putName(Mesh_1.GetMesh(), 'Mesh_1') + Regular_1D = Mesh_1.Segment() 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) +## set object names +#smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D') +#smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D') +#smesh.SetName(Hexa_3D.GetAlgorithm(), 'Hexa_3D') +putName(Nb_Segments_1, 'Nb. Segments_1', i_pref='fissuregauche2') + is_done = Mesh_1.Compute() text = "Mesh_1.Compute" if is_done: @@ -115,12 +120,5 @@ else: Mesh_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "boiteSaine.med")) -## set object names -smesh.SetName(Mesh_1.GetMesh(), 'Mesh_1') -smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D') -smesh.SetName(Nb_Segments_1, 'Nb. Segments_1') -smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D') -smesh.SetName(Hexa_3D.GetAlgorithm(), 'Hexa_3D') - if salome.sg.hasDesktop(): salome.sg.updateObjBrowser() diff --git a/src/Tools/padder/doc/doxyfile.in b/src/Tools/padder/doc/doxyfile.in index 7c02edb28..74f287c5c 100644 --- a/src/Tools/padder/doc/doxyfile.in +++ b/src/Tools/padder/doc/doxyfile.in @@ -29,7 +29,8 @@ GENERATE_HTML = YES HTML_OUTPUT = . HTML_HEADER = @CMAKE_CURRENT_BINARY_DIR@/static/header.html HTML_FOOTER = @CMAKE_CURRENT_SOURCE_DIR@/static/footer.html -HTML_STYLESHEET = @CMAKE_CURRENT_SOURCE_DIR@/static/salome_extra.css +HTML_EXTRA_STYLESHEET = @CMAKE_CURRENT_SOURCE_DIR@/static/salome_extra.css +HTML_EXTRA_FILES = @CMAKE_CURRENT_SOURCE_DIR@/images/head.png TOC_EXPAND = YES DISABLE_INDEX = NO GENERATE_TREEVIEW = YES diff --git a/doc/salome/gui/SMESH/images/head.png b/src/Tools/padder/doc/images/head.png old mode 100755 new mode 100644 similarity index 100% rename from doc/salome/gui/SMESH/images/head.png rename to src/Tools/padder/doc/images/head.png