Salome HOME
Message à bon escient
[modules/smesh.git] / src / Tools / blocFissure / gmu / rotTrans.py
index 7b8ff6e476cee960d0625dfb049c504966e156c1..ffae930ae344fa03bfaa96fa3db95d9f0f59af46 100644 (file)
@@ -1,9 +1,30 @@
 # -*- 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
+#
 
 import logging
-from geomsmesh import geompy
+from .geomsmesh import geompy
+from .geomsmesh import geomPublish
+from .geomsmesh import geomPublishInFather
+from . import initLog
 import math
-from triedreBase import triedreBase
+from .triedreBase import triedreBase
 O, OX, OY, OZ = triedreBase()
 
 # -----------------------------------------------------------------------------
@@ -48,9 +69,9 @@ def rotTrans(objet, orientation, point, normal, trace = False):
   logging.debug("alpha",alpha)
   logging.debug("beta",beta)
   if trace:
-    geompy.addToStudy( rot1, 'rot1' )
-    geompy.addToStudy( axe2, 'axe2' )
-    geompy.addToStudy( rot2, 'rot2' )
+    geomPublish(initLog.debug,  rot1, 'rot1' )
+    geomPublish(initLog.debug,  axe2, 'axe2' )
+    geomPublish(initLog.debug,  rot2, 'rot2' )
 
   xyz = geompy.PointCoordinates(point)
   trans = geompy.MakeTranslation(rot2, xyz[0], xyz[1], xyz[2])