Salome HOME
22649: EDF SMESH: A second Origin/BaseVectors is created when we assign a set of...
authoreap <eap@opencascade.com>
Wed, 15 Apr 2015 16:26:05 +0000 (19:26 +0300)
committereap <eap@opencascade.com>
Wed, 15 Apr 2015 16:26:05 +0000 (19:26 +0300)
src/Tools/blocFissure/gmu/triedreBase.py

index 5313563..ffc3a1b 100644 (file)
@@ -23,10 +23,11 @@ def triedreBase():
     OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
     OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
     OZ = geompy.MakeVectorDXDYDZ(0, 0, 1)
-  
-    geompy.addToStudy( O, 'O' )
-    geompy.addToStudy( OX, 'OX' )
-    geompy.addToStudy( OY, 'OY' )
-    geompy.addToStudy( OZ, 'OZ' )
+
+    if not geompy.myStudy.FindObjectByName( 'OX', geompy.ComponentDataType() ):
+      geompy.addToStudy( O, 'O' )
+      geompy.addToStudy( OX, 'OX' )
+      geompy.addToStudy( OY, 'OY' )
+      geompy.addToStudy( OZ, 'OZ' )
 
   return O, OX, OY, OZ