1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2014-2021 EDF R&D
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 """listes de nappes radiales en filling à chaque extrémité débouchante"""
25 from .geomsmesh import geompy
26 from .geomsmesh import geomPublish
29 def construitEdgesRadialesDebouchantes_a(idisklim, idiskout, gptsdisks, raydisks, nbsegCercle):
30 """listes de nappes radiales en filling à chaque extrémité débouchante"""
33 facesDebouchantes = [False, False]
35 for n_extr, idisk in enumerate(idisklim):
36 numout = idiskout[n_extr]
37 logging.debug("extremité %s, indices disques interne %s, externe %s",n_extr, idisk, numout)
39 if (idisk != 0) and (idisk != len(gptsdisks)-1): # si extrémité débouchante
40 for n_ray in range(nbsegCercle):
42 iddeb = max(0, numout)
43 idfin = max(iddeb+3,idisk+1) # il faut 3 rayons pour faire un filling qui suive le fond de fissure
44 #logging.debug("extremité %s, indices retenus interne %s, externe %s",n_extr, idfin, iddeb)
45 comp = geompy.MakeCompound(raydisks[n_ray][iddeb:idfin])
46 name='compoundRay%d'%n_ray
47 geomPublish(initLog.debug, comp, name)
49 idfin = min(len(gptsdisks), numout+1)
50 iddeb = min(idfin-3, idisk) # il faut 3 rayons pour faire un filling qui suive le fond de fissure
51 #logging.debug("extremité %s, indices retenus interne %s, externe %s",n_extr, idfin, iddeb)
52 comp = geompy.MakeCompound(raydisks[n_ray][iddeb:idfin])
53 name='compoundRay%d'%n_ray
54 geomPublish(initLog.debug, comp, name)
55 nappe = geompy.MakeFilling(comp, 2, 5, 0.0001, 0.0001, 0, GEOM.FOM_Default)
58 geomPublish(initLog.debug, nappe, name)
59 facesDebouchantes[n_extr] = True
60 listNappes.append(nappes)
62 return facesDebouchantes, listNappes