Salome HOME
Merge branch 'master' into gni/evolution
[modules/smesh.git] / src / Tools / blocFissure / gmu / prolongeWire.py
index 75cbb518add48e103705067f37abc9dd02d464e0..b35db538ba61d34cf53861ff8f01c6444f77ec6b 100644 (file)
@@ -1,4 +1,22 @@
 # -*- coding: utf-8 -*-
+# Copyright (C) 2014-2021  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
+#
 
 import logging
 from .geomsmesh import geompy
@@ -10,7 +28,7 @@ from .orderEdgesFromWire import orderEdgesFromWire
 # -----------------------------------------------------------------------------
 # --- prolongation d'un wire par deux segments tangents
 
-def prolongeWire(aWire, extrem, norms, long):
+def prolongeWire(aWire, extrem, norms, lg):
   """
   """
   logging.info("start")
@@ -22,7 +40,7 @@ def prolongeWire(aWire, extrem, norms, long):
     uneSeuleEdge = True
   edgesBout = []
   for i, v1 in enumerate(extrem):
-    exts = [geompy.MakeTranslationVectorDistance(v1, norms[i], l) for l in (-int, int)]
+    exts = [geompy.MakeTranslationVectorDistance(v1, norms[i], l) for l in (-lg, lg)]
     dists = [(geompy.MinDistance(v, aWire), i , v) for i, v in enumerate(exts)]
     dists.sort()
     v2 = dists[-1][-1]