# -*- coding: utf-8 -*-
-# Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+# 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
import SMESH
from .putName import putName
-
+
def mailleAretesEtJonction(internalBoundary, aretesVivesCoupees, lgAretesVives):
"""
edges de bord, faces défaut à respecter
nbAdd = skinFaces.AddFrom( internalBoundary.GetMesh() )
# --- maillage des éventuelles arêtes vives entre faces reconstruites
-
+
grpAretesVives = None
- if len(aretesVivesCoupees) > 0:
+ if aretesVivesCoupees:
+
aretesVivesC = geompy.MakeCompound(aretesVivesCoupees)
meshAretesVives = smesh.Mesh(aretesVivesC)
algo1d = meshAretesVives.Segment()
putName(algo1d.GetSubMesh(), "aretesVives")
putName(algo1d, "algo1d_aretesVives")
putName(hypo1d, "hypo1d_aretesVives")
- isDone = meshAretesVives.Compute()
- logging.info("aretesVives fini")
+
+ is_done = meshAretesVives.Compute()
+ text = "meshAretesVives.Compute"
+ if is_done:
+ logging.info(text+" OK")
+ else:
+ text = "Erreur au calcul du maillage.\n" + text
+ logging.info(text)
+ raise Exception(text)
+
grpAretesVives = meshAretesVives.CreateEmptyGroup( SMESH.EDGE, 'grpAretesVives' )
nbAdd = grpAretesVives.AddFrom( meshAretesVives.GetMesh() )
- return (internalBoundary, bordsLibres, grpAretesVives)
\ No newline at end of file
+ return (internalBoundary, bordsLibres, grpAretesVives)