1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2014-2024 CEA, EDF
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 """Eléments débouchants (intersection pipe et peau), indexés selon les edges du fond de fissure (edgesFondIn)"""
24 from .identifieElementsDebouchants_a import identifieElementsDebouchants_a
25 from .identifieElementsDebouchants_b import identifieElementsDebouchants_b
26 from .identifieElementsDebouchants_c import identifieElementsDebouchants_c
27 from .identifieElementsDebouchants_d import identifieElementsDebouchants_d
29 def identifieElementsDebouchants(ifil, facesDefaut, partitionPeauFissFond, \
30 edgesFondIn, edgesFondFiss, wireFondFiss, \
31 aretesVivesC, fillingFaceExterne, \
32 edgesPipeIn, verticesPipePeau, rayonPipe, \
33 facesInside, facesOnside):
34 """Eléments débouchants (intersection pipe et peau), indexés selon les edges du fond de fissure (edgesFondIn)"""
38 verticesEdgesFondIn = list() # les points du fond de fissure au débouché du pipe sur la peau (indice de edgesFondIn)
39 pipexts = list() # les segments de pipe associés au points de fond de fissure débouchants (même indice)
40 cercles = list() # les cercles de generation des pipes débouchant (même indice)
41 facesFissExt = list() # les faces de la fissure externe associés au points de fond de fissure débouchants (même indice)
42 edgesFissExtPeau = list() # edges des faces de fissure externe sur la peau (même indice)
43 edgesFissExtPipe = list() # edges des faces de fissure externe sur le pipe (même indice)
45 #logging.debug("edgesFondIn %s", edgesFondIn)
46 for iedf, edge in enumerate(edgesFondIn):
48 ptPeau, centre, norm, localEdgeInFondFiss, localEdgeInFondFiss, cercle = \
49 identifieElementsDebouchants_a(iedf, \
50 partitionPeauFissFond, edgesFondFiss, wireFondFiss, \
51 verticesPipePeau, rayonPipe, edge,)
52 verticesEdgesFondIn.append(centre)
53 cercles.append(cercle)
55 # --- estimation de la longueur du pipe necessaire de part et d'autre du point de sortie
56 loc_pt0, lgp = identifieElementsDebouchants_b(ifil, \
57 facesDefaut,aretesVivesC, fillingFaceExterne, rayonPipe, \
58 ptPeau, centre, norm, localEdgeInFondFiss)
60 # --- position des points extremite du pipe sur l'edge debouchante
61 identifieElementsDebouchants_c(iedf,\
62 partitionPeauFissFond, wireFondFiss, \
63 centre, localEdgeInFondFiss, cercle, loc_pt0, lgp, pipexts)
65 # --- Recherche edges communes entre une face inside et (faces onside, edges pipe et fond débouchante)
66 identifieElementsDebouchants_d(iedf,\
67 partitionPeauFissFond, edgesFondIn, edgesPipeIn, \
68 facesInside, facesOnside, \
69 ptPeau, facesFissExt, edgesFissExtPeau, edgesFissExtPipe)
71 return (verticesEdgesFondIn, pipexts, cercles, facesFissExt, edgesFissExtPeau, edgesFissExtPipe)