mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 02:00:34 +05:00
Découpage de construitFissureGenerale
This commit is contained in:
parent
a685bd8705
commit
42c23b637c
@ -111,10 +111,9 @@ class cubeAngle(fissureGenerique):
|
||||
logging.info(texte)
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
maillageFissure = construitFissureGenerale(maillagesSains,
|
||||
shapesFissure, shapeFissureParams,
|
||||
maillageFissureParams, elementsDefaut, step, \
|
||||
mailleur)
|
||||
maillageFissure = construitFissureGenerale(shapesFissure, shapeFissureParams, \
|
||||
maillageFissureParams, elementsDefaut, \
|
||||
step, mailleur)
|
||||
return maillageFissure
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -106,10 +106,9 @@ class cylindre(fissureGenerique):
|
||||
mailleur="MeshGems"):
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
maillageFissure = construitFissureGenerale(maillagesSains,
|
||||
shapesFissure, shapeFissureParams,
|
||||
maillageFissureParams, elementsDefaut, step, \
|
||||
mailleur)
|
||||
maillageFissure = construitFissureGenerale(shapesFissure, shapeFissureParams, \
|
||||
maillageFissureParams, elementsDefaut, \
|
||||
step, mailleur)
|
||||
return maillageFissure
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -120,10 +120,9 @@ class ellipse_1(fissureGenerique):
|
||||
logging.info(texte)
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
maillageFissure = construitFissureGenerale(maillagesSains,
|
||||
shapesFissure, shapeFissureParams,
|
||||
maillageFissureParams, elementsDefaut, step, \
|
||||
mailleur)
|
||||
maillageFissure = construitFissureGenerale(shapesFissure, shapeFissureParams, \
|
||||
maillageFissureParams, elementsDefaut, \
|
||||
step, mailleur)
|
||||
return maillageFissure
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -114,10 +114,9 @@ class eprouvetteCourbe(fissureGenerique):
|
||||
logging.info(texte)
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
maillageFissure = construitFissureGenerale(maillagesSains,
|
||||
shapesFissure, shapeFissureParams,
|
||||
maillageFissureParams, elementsDefaut, step, \
|
||||
mailleur)
|
||||
maillageFissure = construitFissureGenerale(shapesFissure, shapeFissureParams, \
|
||||
maillageFissureParams, elementsDefaut, \
|
||||
step, mailleur)
|
||||
return maillageFissure
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -111,10 +111,9 @@ class eprouvetteDroite(fissureGenerique):
|
||||
mailleur="MeshGems"):
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
maillageFissure = construitFissureGenerale(maillagesSains,
|
||||
shapesFissure, shapeFissureParams,
|
||||
maillageFissureParams, elementsDefaut, step, \
|
||||
mailleur)
|
||||
maillageFissure = construitFissureGenerale(shapesFissure, shapeFissureParams, \
|
||||
maillageFissureParams, elementsDefaut, \
|
||||
step, mailleur)
|
||||
return maillageFissure
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -27,9 +27,7 @@ import math
|
||||
import GEOM
|
||||
import SALOMEDS
|
||||
import SMESH
|
||||
#import StdMeshers
|
||||
#import GHS3DPlugin
|
||||
#import NETGENPlugin
|
||||
|
||||
import logging
|
||||
|
||||
from blocFissure.gmu.fissureGenerique import fissureGenerique
|
||||
@ -111,10 +109,9 @@ class faceGauche(fissureGenerique):
|
||||
mailleur="MeshGems"):
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
maillageFissure = construitFissureGenerale(maillagesSains,
|
||||
shapesFissure, shapeFissureParams,
|
||||
maillageFissureParams, elementsDefaut, step, \
|
||||
mailleur)
|
||||
maillageFissure = construitFissureGenerale(shapesFissure, shapeFissureParams, \
|
||||
maillageFissureParams, elementsDefaut, \
|
||||
step, mailleur)
|
||||
return maillageFissure
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -111,10 +111,9 @@ class faceGauche_2(fissureGenerique):
|
||||
mailleur="MeshGems"):
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
maillageFissure = construitFissureGenerale(maillagesSains,
|
||||
shapesFissure, shapeFissureParams,
|
||||
maillageFissureParams, elementsDefaut, step, \
|
||||
mailleur)
|
||||
maillageFissure = construitFissureGenerale(shapesFissure, shapeFissureParams, \
|
||||
maillageFissureParams, elementsDefaut, \
|
||||
step, mailleur)
|
||||
return maillageFissure
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -507,10 +507,10 @@ class fissure_Coude(fissureGenerique):
|
||||
mailleur="MeshGems"):
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
maillageFissure = insereFissureLongue(geometriesSaines, maillagesSains, \
|
||||
maillageFissure = insereFissureLongue(geometriesSaines, \
|
||||
shapesFissure, shapeFissureParams, \
|
||||
maillageFissureParams, elementsDefaut, step, \
|
||||
mailleur)
|
||||
maillageFissureParams, elementsDefaut, \
|
||||
step, mailleur)
|
||||
return maillageFissure
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -116,10 +116,9 @@ class tube(fissureGenerique):
|
||||
logging.info(texte)
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
maillageFissure = construitFissureGenerale(maillagesSains,
|
||||
shapesFissure, shapeFissureParams,
|
||||
maillageFissureParams, elementsDefaut, step, \
|
||||
mailleur)
|
||||
maillageFissure = construitFissureGenerale(shapesFissure, shapeFissureParams, \
|
||||
maillageFissureParams, elementsDefaut, \
|
||||
step, mailleur)
|
||||
return maillageFissure
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -117,10 +117,9 @@ class vis_1(fissureGenerique):
|
||||
logging.info(texte)
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
maillageFissure = construitFissureGenerale(maillagesSains,
|
||||
shapesFissure, shapeFissureParams,
|
||||
maillageFissureParams, elementsDefaut, step, \
|
||||
mailleur)
|
||||
maillageFissure = construitFissureGenerale(shapesFissure, shapeFissureParams, \
|
||||
maillageFissureParams, elementsDefaut, \
|
||||
step, mailleur)
|
||||
return maillageFissure
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -31,6 +31,9 @@ SET(plugin_SCRIPTS
|
||||
compoundFromList.py
|
||||
construitEdgesRadialesDebouchantes.py
|
||||
construitFissureGenerale.py
|
||||
construitFissureGenerale_a.py
|
||||
construitFissureGenerale_b.py
|
||||
construitFissureGenerale_c.py
|
||||
construitMaillagePipe.py
|
||||
construitPartitionsPeauFissure.py
|
||||
creePointsPipePeau.py
|
||||
|
@ -173,8 +173,7 @@ class casStandard(fissureGenerique):
|
||||
shapesFissure, shapeFissureParams, \
|
||||
maillageFissureParams, elementsDefaut, step, \
|
||||
mailleur="MeshGems"):
|
||||
maillageFissure = construitFissureGenerale(maillagesSains, \
|
||||
shapesFissure, shapeFissureParams, \
|
||||
maillageFissure = construitFissureGenerale(shapesFissure, shapeFissureParams, \
|
||||
maillageFissureParams, elementsDefaut, \
|
||||
step, mailleur)
|
||||
return maillageFissure
|
||||
|
@ -17,51 +17,23 @@
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
import os
|
||||
"""procédure complète de construction d'une fissure générale"""
|
||||
|
||||
import logging
|
||||
import salome
|
||||
from .geomsmesh import geompy
|
||||
from .geomsmesh import geomPublish
|
||||
from .geomsmesh import geomPublishInFather
|
||||
from . import initLog
|
||||
import GEOM
|
||||
from .geomsmesh import smesh
|
||||
from salome.smesh import smeshBuilder
|
||||
import SMESH
|
||||
import math
|
||||
import bisect
|
||||
import traceback
|
||||
|
||||
# from extractionOrientee import extractionOrientee
|
||||
# from extractionOrienteeMulti import extractionOrienteeMulti
|
||||
# from sortFaces import sortFaces
|
||||
#from sortEdges import sortEdges
|
||||
# from eliminateDoubles import eliminateDoubles
|
||||
# from substractSubShapes import substractSubShapes
|
||||
# from produitMixte import produitMixte
|
||||
# from findWireEndVertices import findWireEndVertices
|
||||
#from findWireIntermediateVertices import findWireIntermediateVertices
|
||||
from .orderEdgesFromWire import orderEdgesFromWire
|
||||
# from getSubshapeIds import getSubshapeIds
|
||||
from .putName import putName
|
||||
# from distance2 import distance2
|
||||
from .enleveDefaut import enleveDefaut
|
||||
from .shapeSurFissure import shapeSurFissure
|
||||
from .regroupeSainEtDefaut import RegroupeSainEtDefaut
|
||||
from .triedreBase import triedreBase
|
||||
# from checkDecoupePartition import checkDecoupePartition
|
||||
# from whichSide import whichSide
|
||||
# from whichSideMulti import whichSideMulti
|
||||
#from whichSideVertex import whichSideVertex
|
||||
#from projettePointSurCourbe import projettePointSurCourbe
|
||||
# from prolongeWire import prolongeWire
|
||||
from .restreintFaceFissure import restreintFaceFissure
|
||||
from .partitionneFissureParPipe import partitionneFissureParPipe
|
||||
from .construitPartitionsPeauFissure import construitPartitionsPeauFissure
|
||||
from .compoundFromList import compoundFromList
|
||||
from .identifieElementsGeometriquesPeau import identifieElementsGeometriquesPeau
|
||||
from .identifieFacesEdgesFissureExterne import identifieFacesEdgesFissureExterne
|
||||
from .calculePointsAxiauxPipe import calculePointsAxiauxPipe
|
||||
from .elimineExtremitesPipe import elimineExtremitesPipe
|
||||
@ -72,23 +44,21 @@ from .construitMaillagePipe import construitMaillagePipe
|
||||
from .mailleAretesEtJonction import mailleAretesEtJonction
|
||||
from .mailleFacesFissure import mailleFacesFissure
|
||||
from .mailleFacesPeau import mailleFacesPeau
|
||||
from .fissError import fissError
|
||||
|
||||
from .construitFissureGenerale_a import construitFissureGenerale_a
|
||||
from .construitFissureGenerale_b import construitFissureGenerale_b
|
||||
from .construitFissureGenerale_c import construitFissureGenerale_c
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# --- procédure complète fissure générale
|
||||
|
||||
def construitFissureGenerale(maillagesSains, \
|
||||
shapesFissure, shapeFissureParams, \
|
||||
def construitFissureGenerale(shapesFissure, shapeFissureParams, \
|
||||
maillageFissureParams, elementsDefaut, \
|
||||
step=-1, mailleur="MeshGems"):
|
||||
"""
|
||||
TODO: a completer
|
||||
"""
|
||||
"""procédure complète fissure générale"""
|
||||
logging.info('start')
|
||||
logging.info(mailleur)
|
||||
logging.info("Usage du mailleur %s", mailleur)
|
||||
|
||||
shapeDefaut = shapesFissure[0] # faces de fissure, débordant
|
||||
fondFiss = shapesFissure[4] # groupe d'edges de fond de fissure
|
||||
|
||||
rayonPipe = shapeFissureParams['rayonPipe']
|
||||
if 'lenSegPipe' in shapeFissureParams:
|
||||
@ -96,10 +66,6 @@ def construitFissureGenerale(maillagesSains, \
|
||||
else:
|
||||
lenSegPipe = rayonPipe
|
||||
|
||||
nomRep = maillageFissureParams['nomRep']
|
||||
nomFicSain = maillageFissureParams['nomFicSain']
|
||||
nomFicFissure = maillageFissureParams['nomFicFissure']
|
||||
|
||||
nbsegRad = maillageFissureParams['nbsegRad'] # nombre de couches selon un rayon du pipe
|
||||
nbsegCercle = maillageFissureParams['nbsegCercle'] # nombre de secteur dans un cercle du pipe
|
||||
areteFaceFissure = maillageFissureParams['areteFaceFissure']
|
||||
@ -107,25 +73,8 @@ def construitFissureGenerale(maillagesSains, \
|
||||
if 'aretesVives' in maillageFissureParams:
|
||||
lgAretesVives = maillageFissureParams['aretesVives']
|
||||
|
||||
pointIn_x = 0.0
|
||||
pointIn_y = 0.0
|
||||
pointIn_z = 0.0
|
||||
isPointInterne = False
|
||||
if 'pointIn_x' in shapeFissureParams:
|
||||
pointIn_x = shapeFissureParams['pointIn_x']
|
||||
isPointInterne = True
|
||||
if 'pointIn_y' in shapeFissureParams:
|
||||
pointIn_y = shapeFissureParams['pointIn_y']
|
||||
isPointInterne = True
|
||||
if 'pointIn_z' in shapeFissureParams:
|
||||
pointIn_z = shapeFissureParams['pointIn_z']
|
||||
isPointInterne = True
|
||||
if isPointInterne:
|
||||
pointInterne = geompy.MakeVertex(pointIn_x, pointIn_y, pointIn_z)
|
||||
else:
|
||||
pointInterne = None
|
||||
|
||||
fichierMaillageFissure = os.path.join (nomRep , '{}.med'.format(nomFicFissure))
|
||||
# Point interne
|
||||
pointInterne = construitFissureGenerale_a (geompy, shapeFissureParams)
|
||||
|
||||
# fillings des faces en peau
|
||||
facesDefaut = elementsDefaut[0]
|
||||
@ -148,9 +97,6 @@ def construitFissureGenerale(maillagesSains, \
|
||||
if lgAretesVives == 0:
|
||||
lgAretesVives = dmoyen
|
||||
|
||||
|
||||
O, OX, OY, OZ = triedreBase()
|
||||
|
||||
# --- restriction de la face de fissure au domaine solide :
|
||||
# partition face fissure étendue par fillings, on garde la face interne
|
||||
|
||||
@ -159,7 +105,8 @@ def construitFissureGenerale(maillagesSains, \
|
||||
# --- pipe de fond de fissure, prolongé, partition face fissure par pipe
|
||||
# identification des edges communes pipe et face fissure
|
||||
|
||||
(fissPipe, edgesPipeFiss, edgesFondFiss, wirePipeFiss, wireFondFiss) = partitionneFissureParPipe(shapesFissure, elementsDefaut, rayonPipe)
|
||||
(fissPipe, edgesPipeFiss, edgesFondFiss, wirePipeFiss, wireFondFiss) = \
|
||||
partitionneFissureParPipe(shapesFissure, elementsDefaut, rayonPipe)
|
||||
edgesFondFiss, edgesIdByOrientation = orderEdgesFromWire(wireFondFiss)
|
||||
|
||||
for i,edge in enumerate(edgesFondFiss):
|
||||
@ -178,59 +125,16 @@ def construitFissureGenerale(maillagesSains, \
|
||||
# et quadranglesToShapeWithCorner)
|
||||
|
||||
aretesVivesC = compoundFromList(bordsPartages, "areteVive")
|
||||
aretesVivesCoupees = list() # ensembles des arêtes vives identifiées sur les faces de peau dans l'itération sur partitionsPeauFissFond
|
||||
aretesVivesCoupees = list() # ensemble des arêtes vives identifiées sur les faces de peau dans l'itération sur partitionsPeauFissFond
|
||||
|
||||
# --- inventaire des faces de peau coupées par la fissure
|
||||
# pour chaque face de peau : 0, 1 ou 2 faces débouchante du fond de fissure
|
||||
# 0, 1 ou plus edges de la face de fissure externe au pipe
|
||||
|
||||
nbFacesFilling = len(partitionsPeauFissFond)
|
||||
texte = "nbFacesFilling : {} ".format(nbFacesFilling)
|
||||
logging.info(texte)
|
||||
|
||||
ptEdgeFond = [ list() for i in range(nbFacesFilling)] # pour chaque face [points edge fond de fissure aux débouchés du pipe]
|
||||
fsPipePeau = [ list() for i in range(nbFacesFilling)] # pour chaque face [faces du pipe débouchantes]
|
||||
edRadFPiPo = [ list() for i in range(nbFacesFilling)] # pour chaque face [edge radiale des faces du pipe débouchantes ]
|
||||
fsFissuExt = [ list() for i in range(nbFacesFilling)] # pour chaque face [faces de fissure externes au pipe]
|
||||
edFisExtPe = [ list() for i in range(nbFacesFilling)] # pour chaque face [edge en peau des faces de fissure externes (pas subshape facePeau)]
|
||||
edFisExtPi = [ list() for i in range(nbFacesFilling)] # pour chaque face [edge commun au pipe des faces de fissure externes]
|
||||
facesPeaux = [None for i in range(nbFacesFilling)] # pour chaque face : la face de peau finale a mailler (percée des faces débouchantes)
|
||||
edCircPeau = [ list() for i in range(nbFacesFilling)] # pour chaque face de peau : [subshape edge circulaire aux débouchés du pipe]
|
||||
ptCircPeau = [ list() for i in range(nbFacesFilling)] # pour chaque face de peau : [subshape point sur edge circulaire aux débouchés du pipe]
|
||||
gpedgeBord = [None for i in range(nbFacesFilling)] # pour chaque face de peau : groupe subshape des edges aux bords liés à la partie saine
|
||||
gpedgeVifs = [None for i in range(nbFacesFilling)] # pour chaque face de peau : groupes subshape des edges aux arêtes vives entre fillings
|
||||
edFissPeau = [ list() for i in range(nbFacesFilling)] # pour chaque face de peau : [subshape edge en peau des faces de fissure externes]
|
||||
ptFisExtPi = [ list() for i in range(nbFacesFilling)] # pour chaque face de peau : [point commun edFissPeau edCircPeau]
|
||||
|
||||
for ifil, partitionPeauFissFond in enumerate(partitionsPeauFissFond):
|
||||
if partitionPeauFissFond is not None:
|
||||
dataPPFF,aretesVivesCoupees = identifieElementsGeometriquesPeau(ifil, partitionPeauFissFond, edgesPipeFiss,
|
||||
edgesFondFiss, wireFondFiss, aretesVivesC,
|
||||
facesDefaut, centreFondFiss, rayonPipe,
|
||||
aretesVivesCoupees)
|
||||
ptEdgeFond[ifil] = dataPPFF['endsEdgeFond']
|
||||
fsPipePeau[ifil] = dataPPFF['facesPipePeau']
|
||||
edRadFPiPo[ifil] = dataPPFF['edgeRadFacePipePeau']
|
||||
fsFissuExt[ifil] = dataPPFF['facesFissExt']
|
||||
edFisExtPe[ifil] = dataPPFF['edgesFissExtPeau']
|
||||
edFisExtPi[ifil] = dataPPFF['edgesFissExtPipe']
|
||||
facesPeaux[ifil] = dataPPFF['facePeau']
|
||||
edCircPeau[ifil] = dataPPFF['edgesCircPeau']
|
||||
ptCircPeau[ifil] = dataPPFF['verticesCircPeau']
|
||||
gpedgeBord[ifil] = dataPPFF['groupEdgesBordPeau']
|
||||
gpedgeVifs[ifil] = dataPPFF['bordsVifs']
|
||||
edFissPeau[ifil] = dataPPFF['edgesFissurePeau']
|
||||
ptFisExtPi[ifil] = dataPPFF['verticesPipePeau']
|
||||
|
||||
facesPipePeau = list()
|
||||
edgeRadFacePipePeau = list()
|
||||
for ifil in range(nbFacesFilling):
|
||||
facesPipePeau += fsPipePeau[ifil]
|
||||
edgeRadFacePipePeau += edRadFPiPo[ifil]
|
||||
|
||||
for i, avc in enumerate(aretesVivesCoupees):
|
||||
name = "areteViveCoupee%d"%i
|
||||
geomPublish(initLog.debug, avc, name)
|
||||
ptEdgeFond, fsFissuExt, edFisExtPe, edFisExtPi, \
|
||||
facesPeaux, edCircPeau, ptCircPeau, gpedgeBord, gpedgeVifs, edFissPeau, ptFisExtPi, \
|
||||
edgeRadFacePipePeau, facesPipePeau = \
|
||||
construitFissureGenerale_b( partitionsPeauFissFond, \
|
||||
edgesPipeFiss, edgesFondFiss, wireFondFiss, aretesVivesC, \
|
||||
facesDefaut, centreFondFiss, rayonPipe, aretesVivesCoupees )
|
||||
|
||||
# --- identification des faces et edges de fissure externe pour maillage
|
||||
|
||||
@ -242,8 +146,8 @@ def construitFissureGenerale(maillagesSains, \
|
||||
# - points sur les edges de fond de fissure et edges pipe/face fissure,
|
||||
# - vecteurs tangents au fond de fissure (normal au disque maillé)
|
||||
|
||||
(centres, gptsdisks, raydisks) = calculePointsAxiauxPipe(edgesFondFiss, edgesIdByOrientation, facesDefaut,
|
||||
centreFondFiss, wireFondFiss, wirePipeFiss,
|
||||
(centres, gptsdisks, raydisks) = calculePointsAxiauxPipe(edgesFondFiss, edgesIdByOrientation, facesDefaut, \
|
||||
centreFondFiss, wireFondFiss, wirePipeFiss, \
|
||||
lenSegPipe, rayonPipe, nbsegCercle, nbsegRad)
|
||||
|
||||
# --- recherche des points en trop (externes au volume à remailler)
|
||||
@ -257,12 +161,12 @@ def construitFissureGenerale(maillagesSains, \
|
||||
|
||||
# --- construction des listes d'edges radiales sur chaque extrémité débouchante
|
||||
|
||||
(listEdges, idFacesDebouchantes) = construitEdgesRadialesDebouchantes(idisklim, idiskout, gptsdisks, raydisks,
|
||||
(listEdges, idFacesDebouchantes) = construitEdgesRadialesDebouchantes(idisklim, idiskout, gptsdisks, raydisks, \
|
||||
facesPipePeau, edgeRadFacePipePeau, nbsegCercle)
|
||||
|
||||
# --- création des points du maillage du pipe sur la face de peau
|
||||
|
||||
(gptsdisks, idisklim) = creePointsPipePeau(listEdges, idFacesDebouchantes, idFillingFromBout,
|
||||
(gptsdisks, idisklim) = creePointsPipePeau(listEdges, idFacesDebouchantes, idFillingFromBout, \
|
||||
ptEdgeFond, ptFisExtPi, edCircPeau, gptsdisks, idisklim, nbsegRad)
|
||||
|
||||
# --- ajustement precis des points sur edgesPipeFissureExterneC
|
||||
@ -279,7 +183,7 @@ def construitFissureGenerale(maillagesSains, \
|
||||
|
||||
# --- maillage faces de fissure
|
||||
|
||||
(meshFaceFiss, grpFaceFissureExterne, grpEdgesPeauFissureExterne, grpEdgesPipeFissureExterne) = \
|
||||
(meshFaceFiss, _, grpEdgesPeauFissureExterne, _) = \
|
||||
mailleFacesFissure(faceFissureExterne, \
|
||||
edgesPipeFissureExterneC, edgesPeauFissureExterneC, \
|
||||
meshPipeGroups, areteFaceFissure, rayonPipe, nbsegRad, \
|
||||
@ -295,80 +199,18 @@ def construitFissureGenerale(maillagesSains, \
|
||||
|
||||
# --- regroupement des maillages du défaut
|
||||
|
||||
listMeshes = [internalBoundary.GetMesh(),
|
||||
meshPipe.GetMesh(),
|
||||
meshFaceFiss.GetMesh()]
|
||||
for mp in meshesFacesPeau:
|
||||
listMeshes.append(mp.GetMesh())
|
||||
listMeshes = [internalBoundary.GetMesh(), meshPipe.GetMesh(), meshFaceFiss.GetMesh()]
|
||||
for mfpeau in meshesFacesPeau:
|
||||
listMeshes.append(mfpeau.GetMesh())
|
||||
|
||||
meshBoiteDefaut = smesh.Concatenate(listMeshes, 1, 1, 1e-05,False)
|
||||
# pour aider l'algo hexa-tetra à ne pas mettre de pyramides à l'exterieur des volumes repliés sur eux-mêmes
|
||||
# on désigne les faces de peau en quadrangles par le groupe "skinFaces"
|
||||
group_faceFissOutPipe = None
|
||||
group_faceFissInPipe = None
|
||||
groups = meshBoiteDefaut.GetGroups()
|
||||
for grp in groups:
|
||||
if grp.GetType() == SMESH.FACE:
|
||||
if grp.GetName() == "fisOutPi":
|
||||
group_faceFissOutPipe = grp
|
||||
elif grp.GetName() == "fisInPi":
|
||||
group_faceFissInPipe = grp
|
||||
|
||||
# le maillage NETGEN ne passe pas toujours ==> on force l'usage de MG_Tetra
|
||||
mailleur = "MeshGems"
|
||||
logging.info("Maillage avec %s", mailleur)
|
||||
if ( mailleur == "MeshGems"):
|
||||
algo3d = meshBoiteDefaut.Tetrahedron(algo=smeshBuilder.MG_Tetra)
|
||||
else:
|
||||
algo3d = meshBoiteDefaut.Tetrahedron(algo=smeshBuilder.NETGEN)
|
||||
hypo3d = algo3d.MaxElementVolume(1000.0)
|
||||
hypo3d.SetVerboseLevel( 0 )
|
||||
hypo3d.SetStandardOutputLog( 0 )
|
||||
hypo3d.SetRemoveLogOnSuccess( 1 )
|
||||
putName(algo3d.GetSubMesh(), "boiteDefaut")
|
||||
putName(algo3d, "algo3d_boiteDefaut")
|
||||
putName(meshBoiteDefaut, "boiteDefaut")
|
||||
|
||||
is_done = meshBoiteDefaut.Compute()
|
||||
text = "meshBoiteDefaut.Compute"
|
||||
if is_done:
|
||||
logging.info(text+" OK")
|
||||
else:
|
||||
text = "Erreur au calcul du maillage.\n" + text
|
||||
logging.info(text)
|
||||
raise Exception(text)
|
||||
|
||||
faceFissure = meshBoiteDefaut.GetMesh().UnionListOfGroups( [ group_faceFissOutPipe, group_faceFissInPipe ], \
|
||||
'FACE1' )
|
||||
maillageSain = enleveDefaut(maillageSain, zoneDefaut, zoneDefaut_skin,
|
||||
zoneDefaut_internalFaces, zoneDefaut_internalEdges)
|
||||
putName(maillageSain, nomFicSain+"_coupe")
|
||||
_, normfiss = shapeSurFissure(facesPortFissure)
|
||||
maillageComplet = RegroupeSainEtDefaut(maillageSain, meshBoiteDefaut, \
|
||||
None, None, 'COMPLET', normfiss)
|
||||
|
||||
logging.info("conversion quadratique")
|
||||
maillageComplet.ConvertToQuadratic( 1 )
|
||||
logging.info("groupes")
|
||||
groups = maillageComplet.GetGroups()
|
||||
grps = [ grp for grp in groups if grp.GetName() == 'FONDFISS']
|
||||
fond = maillageComplet.GetMesh().CreateDimGroup( grps, SMESH.NODE, 'FONDFISS' )
|
||||
|
||||
logging.info("réorientation face de fissure FACE1")
|
||||
grps = [ grp for grp in groups if grp.GetName() == 'FACE1']
|
||||
nb = maillageComplet.Reorient2D( grps[0], normfiss, grps[0].GetID(1))
|
||||
|
||||
logging.info("réorientation face de fissure FACE2")
|
||||
plansim = geompy.MakePlane(O, normfiss, 10000)
|
||||
fissnorm = geompy.MakeMirrorByPlane(normfiss, plansim)
|
||||
grps = [ grp for grp in groups if grp.GetName() == 'FACE2']
|
||||
nb = maillageComplet.Reorient2D( grps[0], fissnorm, grps[0].GetID(1))
|
||||
fond = maillageComplet.GetMesh().CreateDimGroup( grps, SMESH.NODE, 'FACE2' )
|
||||
|
||||
logging.info("export maillage fini")
|
||||
maillageComplet.ExportMED(fichierMaillageFissure)
|
||||
putName(maillageComplet, nomFicFissure)
|
||||
logging.info("fichier maillage fissure %s", fichierMaillageFissure)
|
||||
# Maillage complet
|
||||
maillageComplet = construitFissureGenerale_c( maillageSain, meshBoiteDefaut, \
|
||||
zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges, \
|
||||
facesPortFissure, \
|
||||
maillageFissureParams, \
|
||||
mailleur )
|
||||
|
||||
if salome.sg.hasDesktop():
|
||||
salome.sg.updateObjBrowser()
|
||||
|
49
src/Tools/blocFissure/gmu/construitFissureGenerale_a.py
Normal file
49
src/Tools/blocFissure/gmu/construitFissureGenerale_a.py
Normal file
@ -0,0 +1,49 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2020 EDF R&D
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
"""construction de la fissure générale - le point interne"""
|
||||
|
||||
import logging
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
def construitFissureGenerale_a (geompy, shapeFissureParams):
|
||||
"""construction de la fissure générale - le point interne"""
|
||||
logging.info('start')
|
||||
|
||||
point_in_x = 0.0
|
||||
point_in_y = 0.0
|
||||
point_in_z = 0.0
|
||||
is_point_interne = False
|
||||
if 'pointIn_x' in shapeFissureParams:
|
||||
point_in_x = shapeFissureParams['pointIn_x']
|
||||
is_point_interne = True
|
||||
if 'pointIn_y' in shapeFissureParams:
|
||||
point_in_y = shapeFissureParams['pointIn_y']
|
||||
is_point_interne = True
|
||||
if 'pointIn_z' in shapeFissureParams:
|
||||
point_in_z = shapeFissureParams['pointIn_z']
|
||||
is_point_interne = True
|
||||
|
||||
if is_point_interne:
|
||||
pointInterne = geompy.MakeVertex(point_in_x, point_in_y, point_in_z)
|
||||
else:
|
||||
pointInterne = None
|
||||
|
||||
return pointInterne
|
89
src/Tools/blocFissure/gmu/construitFissureGenerale_b.py
Normal file
89
src/Tools/blocFissure/gmu/construitFissureGenerale_b.py
Normal file
@ -0,0 +1,89 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2020 EDF R&D
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
"""construction de la fissure générale - inventaire des faces de peau coupées par la fissure"""
|
||||
|
||||
import logging
|
||||
from .geomsmesh import geomPublish
|
||||
from . import initLog
|
||||
|
||||
from .identifieElementsGeometriquesPeau import identifieElementsGeometriquesPeau
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
def construitFissureGenerale_b( partitionsPeauFissFond, \
|
||||
edgesPipeFiss, edgesFondFiss, wireFondFiss, aretesVivesC, \
|
||||
facesDefaut, centreFondFiss, rayonPipe, aretesVivesCoupees ):
|
||||
"""construction de la fissure générale - inventaire des faces de peau coupées par la fissure
|
||||
|
||||
pour chaque face de peau : 0, 1 ou 2 faces débouchante du fond de fissure
|
||||
0, 1 ou plus edges de la face de fissure externe au pipe
|
||||
"""
|
||||
logging.info('start')
|
||||
|
||||
nbFacesFilling = len(partitionsPeauFissFond)
|
||||
texte = "nbFacesFilling : {} ".format(nbFacesFilling)
|
||||
logging.info(texte)
|
||||
|
||||
ptEdgeFond = [ list() for i in range(nbFacesFilling)] # pour chaque face [points edge fond de fissure aux débouchés du pipe]
|
||||
fsPipePeau = [ list() for i in range(nbFacesFilling)] # pour chaque face [faces du pipe débouchantes]
|
||||
edRadFPiPo = [ list() for i in range(nbFacesFilling)] # pour chaque face [edge radiale des faces du pipe débouchantes ]
|
||||
fsFissuExt = [ list() for i in range(nbFacesFilling)] # pour chaque face [faces de fissure externes au pipe]
|
||||
edFisExtPe = [ list() for i in range(nbFacesFilling)] # pour chaque face [edge en peau des faces de fissure externes (pas subshape facePeau)]
|
||||
edFisExtPi = [ list() for i in range(nbFacesFilling)] # pour chaque face [edge commun au pipe des faces de fissure externes]
|
||||
facesPeaux = [None for i in range(nbFacesFilling)] # pour chaque face : la face de peau finale a mailler (percée des faces débouchantes)
|
||||
edCircPeau = [ list() for i in range(nbFacesFilling)] # pour chaque face de peau : [subshape edge circulaire aux débouchés du pipe]
|
||||
ptCircPeau = [ list() for i in range(nbFacesFilling)] # pour chaque face de peau : [subshape point sur edge circulaire aux débouchés du pipe]
|
||||
gpedgeBord = [None for i in range(nbFacesFilling)] # pour chaque face de peau : groupe subshape des edges aux bords liés à la partie saine
|
||||
gpedgeVifs = [None for i in range(nbFacesFilling)] # pour chaque face de peau : groupes subshape des edges aux arêtes vives entre fillings
|
||||
edFissPeau = [ list() for i in range(nbFacesFilling)] # pour chaque face de peau : [subshape edge en peau des faces de fissure externes]
|
||||
ptFisExtPi = [ list() for i in range(nbFacesFilling)] # pour chaque face de peau : [point commun edFissPeau edCircPeau]
|
||||
|
||||
for ifil, partitionPeauFissFond in enumerate(partitionsPeauFissFond):
|
||||
if partitionPeauFissFond is not None:
|
||||
dataPPFF,aretesVivesCoupees = identifieElementsGeometriquesPeau(ifil, partitionPeauFissFond, \
|
||||
edgesPipeFiss, edgesFondFiss, wireFondFiss, aretesVivesC, \
|
||||
facesDefaut, centreFondFiss, rayonPipe, aretesVivesCoupees)
|
||||
ptEdgeFond[ifil] = dataPPFF['endsEdgeFond']
|
||||
fsPipePeau[ifil] = dataPPFF['facesPipePeau']
|
||||
edRadFPiPo[ifil] = dataPPFF['edgeRadFacePipePeau']
|
||||
fsFissuExt[ifil] = dataPPFF['facesFissExt']
|
||||
edFisExtPe[ifil] = dataPPFF['edgesFissExtPeau']
|
||||
edFisExtPi[ifil] = dataPPFF['edgesFissExtPipe']
|
||||
facesPeaux[ifil] = dataPPFF['facePeau']
|
||||
edCircPeau[ifil] = dataPPFF['edgesCircPeau']
|
||||
ptCircPeau[ifil] = dataPPFF['verticesCircPeau']
|
||||
gpedgeBord[ifil] = dataPPFF['groupEdgesBordPeau']
|
||||
gpedgeVifs[ifil] = dataPPFF['bordsVifs']
|
||||
edFissPeau[ifil] = dataPPFF['edgesFissurePeau']
|
||||
ptFisExtPi[ifil] = dataPPFF['verticesPipePeau']
|
||||
|
||||
facesPipePeau = list()
|
||||
edgeRadFacePipePeau = list()
|
||||
for ifil in range(nbFacesFilling):
|
||||
facesPipePeau += fsPipePeau[ifil]
|
||||
edgeRadFacePipePeau += edRadFPiPo[ifil]
|
||||
|
||||
for i, avc in enumerate(aretesVivesCoupees):
|
||||
name = "areteViveCoupee%d"%i
|
||||
geomPublish(initLog.debug, avc, name)
|
||||
|
||||
return ptEdgeFond, fsFissuExt, edFisExtPe, edFisExtPi, facesPeaux, edCircPeau, \
|
||||
ptCircPeau, gpedgeBord, gpedgeVifs, edFissPeau, ptFisExtPi, \
|
||||
edgeRadFacePipePeau, facesPipePeau
|
124
src/Tools/blocFissure/gmu/construitFissureGenerale_c.py
Normal file
124
src/Tools/blocFissure/gmu/construitFissureGenerale_c.py
Normal file
@ -0,0 +1,124 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2020 EDF R&D
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
"""construction de la fissure générale - maillage"""
|
||||
|
||||
import os
|
||||
|
||||
import logging
|
||||
import salome
|
||||
from .geomsmesh import geompy
|
||||
import GEOM
|
||||
from .geomsmesh import smesh
|
||||
from salome.smesh import smeshBuilder
|
||||
import SMESH
|
||||
|
||||
from .putName import putName
|
||||
from .enleveDefaut import enleveDefaut
|
||||
from .shapeSurFissure import shapeSurFissure
|
||||
from .regroupeSainEtDefaut import RegroupeSainEtDefaut
|
||||
from .triedreBase import triedreBase
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
def construitFissureGenerale_c(maillageSain, meshBoiteDefaut, \
|
||||
zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges, \
|
||||
facesPortFissure, \
|
||||
maillageFissureParams, \
|
||||
mailleur="MeshGems"):
|
||||
"""construction de la fissure générale - maillage"""
|
||||
logging.info('start')
|
||||
logging.info("Usage du mailleur %s", mailleur)
|
||||
|
||||
nomRep = maillageFissureParams['nomRep']
|
||||
nomFicSain = maillageFissureParams['nomFicSain']
|
||||
nomFicFissure = maillageFissureParams['nomFicFissure']
|
||||
|
||||
O, _, _, _ = triedreBase()
|
||||
|
||||
# pour aider l'algo hexa-tetra à ne pas mettre de pyramides à l'exterieur des volumes repliés sur eux-mêmes
|
||||
# on désigne les faces de peau en quadrangles par le groupe "skinFaces"
|
||||
group_faceFissOutPipe = None
|
||||
group_faceFissInPipe = None
|
||||
groups = meshBoiteDefaut.GetGroups()
|
||||
for grp in groups:
|
||||
if grp.GetType() == SMESH.FACE:
|
||||
if grp.GetName() == "fisOutPi":
|
||||
group_faceFissOutPipe = grp
|
||||
elif grp.GetName() == "fisInPi":
|
||||
group_faceFissInPipe = grp
|
||||
|
||||
# le maillage NETGEN ne passe pas toujours ==> on force l'usage de MG_Tetra
|
||||
mailleur = "MeshGems"
|
||||
logging.info("Maillage avec %s", mailleur)
|
||||
if ( mailleur == "MeshGems"):
|
||||
algo3d = meshBoiteDefaut.Tetrahedron(algo=smeshBuilder.MG_Tetra)
|
||||
else:
|
||||
algo3d = meshBoiteDefaut.Tetrahedron(algo=smeshBuilder.NETGEN)
|
||||
hypo3d = algo3d.MaxElementVolume(1000.0)
|
||||
hypo3d.SetVerboseLevel( 0 )
|
||||
hypo3d.SetStandardOutputLog( 0 )
|
||||
hypo3d.SetRemoveLogOnSuccess( 1 )
|
||||
putName(algo3d.GetSubMesh(), "boiteDefaut")
|
||||
putName(algo3d, "algo3d_boiteDefaut")
|
||||
putName(meshBoiteDefaut, "boiteDefaut")
|
||||
|
||||
is_done = meshBoiteDefaut.Compute()
|
||||
text = "meshBoiteDefaut.Compute"
|
||||
if is_done:
|
||||
logging.info(text+" OK")
|
||||
else:
|
||||
text = "Erreur au calcul du maillage.\n" + text
|
||||
logging.info(text)
|
||||
raise Exception(text)
|
||||
|
||||
_ = meshBoiteDefaut.GetMesh().UnionListOfGroups( [ group_faceFissOutPipe, group_faceFissInPipe ], \
|
||||
'FACE1' )
|
||||
maillageSain = enleveDefaut(maillageSain, zoneDefaut, zoneDefaut_skin,
|
||||
zoneDefaut_internalFaces, zoneDefaut_internalEdges)
|
||||
putName(maillageSain, nomFicSain+"_coupe")
|
||||
_, normfiss = shapeSurFissure(facesPortFissure)
|
||||
maillageComplet = RegroupeSainEtDefaut(maillageSain, meshBoiteDefaut, \
|
||||
None, None, 'COMPLET', normfiss)
|
||||
|
||||
logging.info("conversion quadratique")
|
||||
maillageComplet.ConvertToQuadratic( 1 )
|
||||
logging.info("groupes")
|
||||
groups = maillageComplet.GetGroups()
|
||||
grps = [ grp for grp in groups if grp.GetName() == 'FONDFISS']
|
||||
_ = maillageComplet.GetMesh().CreateDimGroup( grps, SMESH.NODE, 'FONDFISS' )
|
||||
|
||||
logging.info("réorientation face de fissure FACE1")
|
||||
grps = [ grp for grp in groups if grp.GetName() == 'FACE1']
|
||||
_ = maillageComplet.Reorient2D( grps[0], normfiss, grps[0].GetID(1))
|
||||
|
||||
logging.info("réorientation face de fissure FACE2")
|
||||
plansim = geompy.MakePlane(O, normfiss, 10000)
|
||||
fissnorm = geompy.MakeMirrorByPlane(normfiss, plansim)
|
||||
grps = [ grp for grp in groups if grp.GetName() == 'FACE2']
|
||||
_ = maillageComplet.Reorient2D( grps[0], fissnorm, grps[0].GetID(1))
|
||||
_ = maillageComplet.GetMesh().CreateDimGroup( grps, SMESH.NODE, 'FACE2' )
|
||||
|
||||
logging.info("export maillage fini")
|
||||
fichierMaillageFissure = os.path.join (nomRep , '{}.med'.format(nomFicFissure))
|
||||
maillageComplet.ExportMED(fichierMaillageFissure)
|
||||
putName(maillageComplet, nomFicFissure)
|
||||
logging.info("fichier maillage fissure %s", fichierMaillageFissure)
|
||||
|
||||
return maillageComplet
|
@ -682,8 +682,7 @@ class fissureCoude(fissureGenerique):
|
||||
shapesFissure, shapeFissureParams, \
|
||||
maillageFissureParams, elementsDefaut, step, \
|
||||
mailleur="MeshGems"):
|
||||
maillageFissure = construitFissureGenerale(maillagesSains, \
|
||||
shapesFissure, shapeFissureParams, \
|
||||
maillageFissure = construitFissureGenerale(shapesFissure, shapeFissureParams, \
|
||||
maillageFissureParams, elementsDefaut, \
|
||||
step, mailleur)
|
||||
return maillageFissure
|
||||
|
@ -22,8 +22,8 @@
|
||||
import logging
|
||||
|
||||
from blocFissure import gmu
|
||||
from blocFissure.gmu.initEtude import initEtude
|
||||
from blocFissure.gmu.getStatsMaillageFissure import getStatsMaillageFissure
|
||||
from .initEtude import initEtude
|
||||
from .getStatsMaillageFissure import getStatsMaillageFissure
|
||||
|
||||
class fissureGenerique(object):
|
||||
"""classe générique problème fissure:
|
||||
@ -34,12 +34,17 @@ class fissureGenerique(object):
|
||||
"""
|
||||
|
||||
nomProbleme = "fissureGenerique"
|
||||
geomParams = dict()
|
||||
meshParams = dict()
|
||||
shapeFissureParams = dict()
|
||||
maillageFissureParams = dict()
|
||||
|
||||
def __init__(self, numeroCas):
|
||||
initEtude()
|
||||
self.numeroCas = numeroCas
|
||||
self.nomCas = self.nomProbleme +"_%d"%(self.numeroCas)
|
||||
self.fissureLongue = False
|
||||
self.referencesMaillageFissure = None
|
||||
|
||||
def setParamGeometrieSaine(self):
|
||||
"""setParamGeometrieSaine"""
|
||||
@ -109,33 +114,28 @@ class fissureGenerique(object):
|
||||
geometriesSaines = self.genereGeometrieSaine(self.geomParams)
|
||||
if step == 1:
|
||||
return
|
||||
logging.info("AAAAAAAAAAAAAAAAAAAA")
|
||||
|
||||
self.setParamMaillageSain()
|
||||
maillagesSains = self.genereMaillageSain(geometriesSaines, self.meshParams)
|
||||
if step == 2:
|
||||
return
|
||||
logging.info("BBBBBBBBBBBBBBBBBBBBB")
|
||||
|
||||
self.setParamShapeFissure()
|
||||
mailleur = self.mailleur2d3d()
|
||||
shapesFissure = self.genereShapeFissure(geometriesSaines, self.geomParams, self.shapeFissureParams, mailleur)
|
||||
if step == 3:
|
||||
return
|
||||
logging.info("CCCCCCCCCCCCCCCCCCCCCCCC")
|
||||
|
||||
self.setParamMaillageFissure()
|
||||
elementsDefaut = self.genereZoneDefaut(geometriesSaines, maillagesSains, \
|
||||
shapesFissure, self.shapeFissureParams, self.maillageFissureParams)
|
||||
if step == 4:
|
||||
return
|
||||
logging.info("DDDDDDDDDDDDDDDDDDDD")
|
||||
|
||||
maillageFissure = self.genereMaillageFissure(geometriesSaines, maillagesSains, \
|
||||
shapesFissure, self.shapeFissureParams, self.maillageFissureParams, \
|
||||
elementsDefaut, step, mailleur)
|
||||
|
||||
logging.info("EEEEEEEEEEEEEEEEEES")
|
||||
self.setReferencesMaillageFissure()
|
||||
ok_maillage = getStatsMaillageFissure(maillageFissure, self.referencesMaillageFissure, self.maillageFissureParams)
|
||||
return ok_maillage
|
||||
|
@ -25,9 +25,8 @@ import SMESH
|
||||
|
||||
|
||||
def getStatsMaillageFissure(maillage, referencesMaillageFissure, maillageFissureParams):
|
||||
"""
|
||||
TODO: a completer
|
||||
"""
|
||||
""""Statistiques maillage"""
|
||||
|
||||
logging.debug('start')
|
||||
|
||||
if 'nomRep' in maillageFissureParams:
|
||||
@ -75,17 +74,17 @@ def getStatsMaillageFissure(maillage, referencesMaillageFissure, maillageFissure
|
||||
fic_stat.write(text+"\n")
|
||||
text_2 += " {} = {}, \\\n".format(key,d_resu[key])
|
||||
|
||||
|
||||
if ok_maillage:
|
||||
print ("Calcul cohérent avec la référence.")
|
||||
text = "Calcul cohérent avec la référence."
|
||||
else:
|
||||
# Résultats de référence pour intégration dans le python du cas pour une mise à jour
|
||||
with open(fichierNewRef, "w") as fic_info :
|
||||
fic_info.write(text_2[:-4]+" \\")
|
||||
text = "Calcul différent de la référence.\n"
|
||||
text += "Voir le fichier {}\n".format(fichierStatMaillageFissure)
|
||||
text += "La nouvelle référence est disponible dans le fichier :\n{}\n".format(fichierNewRef)
|
||||
text += "Il faut l'insérer pour créer le dictionnaire 'referencesMaillageFissure' dans le paramétrage du cas."
|
||||
print (text)
|
||||
# Résultats de référence pour intégration dans le python du cas pour une mise à jour
|
||||
with open(fichierNewRef, "w") as fic_info :
|
||||
fic_info.write(text_2[:-4]+" \\")
|
||||
|
||||
print (text)
|
||||
|
||||
return ok_maillage
|
||||
|
@ -17,6 +17,7 @@
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
"""procédure complète de construction d'une fissure longue"""
|
||||
|
||||
import os
|
||||
|
||||
@ -46,27 +47,22 @@ from .shapeSurFissure import shapeSurFissure
|
||||
from .regroupeSainEtDefaut import RegroupeSainEtDefaut
|
||||
from .triedreBase import triedreBase
|
||||
|
||||
from blocFissure.gmu.insereFissureLongue_a import insereFissureLongue_a
|
||||
from blocFissure.gmu.insereFissureLongue_b import insereFissureLongue_b
|
||||
from blocFissure.gmu.insereFissureLongue_c import insereFissureLongue_c
|
||||
from blocFissure.gmu.insereFissureLongue_d import insereFissureLongue_d
|
||||
from .insereFissureLongue_a import insereFissureLongue_a
|
||||
from .insereFissureLongue_b import insereFissureLongue_b
|
||||
from .insereFissureLongue_c import insereFissureLongue_c
|
||||
from .insereFissureLongue_d import insereFissureLongue_d
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# --- procedure complete fissure longue
|
||||
|
||||
def insereFissureLongue(geometriesSaines, maillagesSains, \
|
||||
def insereFissureLongue(geometriesSaines, \
|
||||
shapesFissure, shapeFissureParams, \
|
||||
maillageFissureParams, elementsDefaut, \
|
||||
step=-1, mailleur="MeshGems"):
|
||||
"""
|
||||
TODO: a completer
|
||||
"""
|
||||
"""procedure complete fissure longue"""
|
||||
logging.info('start')
|
||||
logging.info("Usage du mailleur %s", mailleur)
|
||||
|
||||
#geometrieSaine = geometriesSaines[0]
|
||||
#maillageSain = maillagesSains[0]
|
||||
#isHexa = maillagesSains[1]
|
||||
shapeDefaut = shapesFissure[0] # face de fissure, debordant
|
||||
#tailleDefaut = shapesFissure[2]
|
||||
wiretube = shapesFissure[4] # wire fond de fissure, debordant
|
||||
|
@ -18,12 +18,12 @@
|
||||
#
|
||||
|
||||
from blocFissure import gmu
|
||||
from blocFissure.gmu.initEtude import initEtude
|
||||
from .initEtude import initEtude
|
||||
initEtude()
|
||||
from blocFissure.gmu.triedreBase import triedreBase
|
||||
from .triedreBase import triedreBase
|
||||
O, OX, OY, OZ = triedreBase()
|
||||
|
||||
from blocFissure.gmu.distance2 import distance2
|
||||
from .distance2 import distance2
|
||||
a=[10, 20, 30]
|
||||
b=[5, 7, 3]
|
||||
c=distance2(a,b)
|
||||
|
Loading…
Reference in New Issue
Block a user