Salome HOME
PAL9969: update geompy.py to new functions
[modules/geom.git] / src / GEOM_SWIG / batchmode_geompy.py
index fb2c74e31543de18f64dd46f9928b006769534ac..2ef3c1d680dc42e62fb5e1030b239a42fa93a7b4 100644 (file)
@@ -46,19 +46,19 @@ CurvesOp = None
 PrimOp   = None
 ShapesOp = None
 HealOp   = None
-InsertOp = None 
-BoolOp   = None 
+InsertOp = None
+BoolOp   = None
 TrsfOp   = None
 LocalOp  = None
 MeasuOp  = None
 BlocksOp = None
-GroupOp  = None 
+GroupOp  = None
 
 def init_geom(theStudy):
 
     global myStudy, myBuilder, myStudyId, BasicOp, CurvesOp, PrimOp, ShapesOp, HealOp
     global InsertOp, BoolOp, TrsfOp, LocalOp, MeasuOp, BlocksOp, GroupOp, father
-    
+
     myStudy = theStudy
     myStudyId = myStudy._get_StudyId()
     myBuilder = myStudy.NewBuilder()
@@ -73,7 +73,7 @@ def init_geom(theStudy):
        aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
        myBuilder.DefineComponentInstance(father,geom)
         pass
-        
+
     # -----------------------------------------------------------------------------
     # Assign Operations Interfaces
     # -----------------------------------------------------------------------------
@@ -89,7 +89,7 @@ def init_geom(theStudy):
     LocalOp  = geom.GetILocalOperations    (myStudyId)
     MeasuOp  = geom.GetIMeasureOperations  (myStudyId)
     BlocksOp = geom.GetIBlocksOperations   (myStudyId)
-    GroupOp  = geom.GetIGroupOperations   (myStudyId) 
+    GroupOp  = geom.GetIGroupOperations   (myStudyId)
     pass
 
 init_geom(myStudy)
@@ -478,18 +478,36 @@ def GetShapesOnPlane(theShape, theShapeType, theAx1, theState):
       print "GetShapesOnPlane : ", ShapesOp.GetErrorCode()
     return aList
 
+def GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState):
+    aList = ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
+    if ShapesOp.IsDone() == 0:
+        print "GetShapesOnPlaneIDs : ", ShapesOp.GetErrorCode()
+    return aList
+
 def GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState):
     aList = ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
     if ShapesOp.IsDone() == 0:
       print "GetShapesOnCylinder : ", ShapesOp.GetErrorCode()
     return aList
 
+def GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState):
+    aList = ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
+    if ShapesOp.IsDone() == 0:
+        print "GetShapesOnCylinderIDs : ", ShapesOp.GetErrorCode()
+    return aList
+
 def GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState):
     aList = ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
     if ShapesOp.IsDone() == 0:
       print "GetShapesOnSphere : ", ShapesOp.GetErrorCode()
     return aList
 
+def GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState):
+    aList = ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
+    if ShapesOp.IsDone() == 0:
+        print "GetShapesOnSphereIDs : ", ShapesOp.GetErrorCode()
+    return aList
+
 def GetInPlace(theShapeWhere, theShapeWhat):
     anObj = ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
     if ShapesOp.IsDone() == 0:
@@ -1105,11 +1123,21 @@ def UnionList (theGroup, theSubShapes):
     if GroupOp.IsDone() == 0:
       print "UnionList : ", GroupOp.GetErrorCode()
 
+def UnionIDs(theGroup, theSubShapes):
+    GroupOp.UnionIDs(theGroup, theSubShapes)
+    if GroupOp.IsDone() == 0:
+        print "UnionIDs : ", GroupOp.GetErrorCode()
+
 def DifferenceList (theGroup, theSubShapes):
     GroupOp.DifferenceList(theGroup, theSubShapes)
     if GroupOp.IsDone() == 0:
       print "DifferenceList : ", GroupOp.GetErrorCode()
 
+def DifferenceIDs(theGroup, theSubShapes):
+    GroupOp.DifferenceIDs(theGroup, theSubShapes)
+    if GroupOp.IsDone() == 0:
+        print "DifferenceIDs : ", GroupOp.GetErrorCode()
+
 def GetObjectIDs(Group):
     ListIDs = GroupOp.GetObjects(Group)
     if GroupOp.IsDone() == 0: