]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Mantis issue (IMP) 0020756: GetGroups() of a GEOM object.
authorjfa <jfa@opencascade.com>
Fri, 23 Jul 2010 13:18:32 +0000 (13:18 +0000)
committerjfa <jfa@opencascade.com>
Fri, 23 Jul 2010 13:18:32 +0000 (13:18 +0000)
13 files changed:
idl/GEOM_Gen.idl
src/GEOM/GEOM_Engine.cxx
src/GEOM/GEOM_Function.cxx
src/GEOM/GEOM_Function.hxx
src/GEOM/GEOM_ISubShape.hxx
src/GEOMImpl/GEOMImpl_IGroupOperations.cxx
src/GEOMImpl/GEOMImpl_IShapesOperations.cxx
src/GEOMImpl/GEOMImpl_IShapesOperations.hxx
src/GEOM_I/GEOM_IShapesOperations_i.cc
src/GEOM_I/GEOM_IShapesOperations_i.hh
src/GEOM_SWIG/GEOM_TestAll.py
src/GEOM_SWIG/geompyDC.py
src/IGESImport/IGESImport.cxx

index 309d9bbe84621d75bc6d93e174a76b77c82642d2..4cef6701aaa9ea7126cd11313a213b11301ca0ea 100644 (file)
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-
 //  File   : GEOM_Gen.idl
 //  Author : Sergey RUIN
-//
+
 #ifndef __GEOM_GEN__
 #define __GEOM_GEN__
 
@@ -45,13 +44,13 @@ module GEOM
    * Marker type
    */
   enum marker_type { MT_NONE, MT_POINT, MT_PLUS, MT_STAR, MT_O, MT_X, MT_O_POINT, MT_O_PLUS,
-                    MT_O_STAR, MT_O_X, MT_BALL, MT_RING1, MT_RING2, MT_RING3, MT_USER };
+                     MT_O_STAR, MT_O_X, MT_BALL, MT_RING1, MT_RING2, MT_RING3, MT_USER };
 
   /*!
    * Marker size
    */
   enum marker_size { MS_NONE, MS_10, MS_15, MS_20, MS_25, MS_30, MS_35,
-                    MS_40, MS_45, MS_50, MS_55, MS_60, MS_65, MS_70 };
+                     MS_40, MS_45, MS_50, MS_55, MS_60, MS_65, MS_70 };
 
   /*!
    *  State of shape relatively geometrical surface like plane, sphere or cylinder.
@@ -166,10 +165,10 @@ module GEOM
      *  Get a <VAR>shape_type</VAR> of the object value.
      */
     shape_type GetShapeType();
-    
+
     /*!
      *  Get the topology type of the object value.
-     *  In contrast to the shape type, this function returns type of the most 
+     *  In contrast to the shape type, this function returns type of the most
      *  top-level sub-shape of the COMPOUND or COMPSOLID, if there is only one
      *  sub-shape there.
      *  \sa GetShapeType()
@@ -385,7 +384,7 @@ module GEOM
      *  \return New GEOM_Object, containing the created point.
      */
     GEOM_Object MakePointWithReference (in GEOM_Object theReference,
-                                       in double theX, in double theY, in double theZ);
+                                        in double theX, in double theY, in double theZ);
 
     /*!
      *  Create a point, corresponding to the given parameter on the given curve.
@@ -394,7 +393,7 @@ module GEOM
      *  \return New GEOM_Object, containing the created point.
      */
     GEOM_Object MakePointOnCurve (in GEOM_Object theRefCurve,
-                                 in double theParameter);
+                                  in double theParameter);
 
     /*!
      *  Create a point on the given curve, projecting given point
@@ -418,8 +417,8 @@ module GEOM
      *  \return New GEOM_Object, containing the created point.
      */
     GEOM_Object MakePointOnSurface (in GEOM_Object theRefSurf,
-                                   in double theUParameter,
-                                   in double theVParameter);
+                                    in double theUParameter,
+                                    in double theVParameter);
 
     /*!
      *  Create a point on the given surface, projecting given point
@@ -441,7 +440,7 @@ module GEOM
      *  \return New GEOM_Object, containing the created point.
      */
     GEOM_Object MakePointOnLinesIntersection (in GEOM_Object theRefLine1,
-                                             in GEOM_Object theRefLine2);
+                                              in GEOM_Object theRefLine2);
 
      /*!
      *  Create a vector, corresponding to tangent to the given parameter on the given curve.
@@ -452,7 +451,7 @@ module GEOM
      *  \return New GEOM_Object, containing the created point.
      */
      GEOM_Object MakeTangentOnCurve (in GEOM_Object theRefCurve,
-                                    in double theParameter);
+                                     in double theParameter);
 
     /*!
      *  Create a vector with the given components.
@@ -462,8 +461,8 @@ module GEOM
      *  \return New GEOM_Object, containing the created vector.
      */
     GEOM_Object MakeVectorDXDYDZ (in double theDX,
-                                 in double theDY,
-                                 in double theDZ);
+                                  in double theDY,
+                                  in double theDZ);
 
     /*!
      *  Create a vector between two points.
@@ -507,9 +506,9 @@ module GEOM
      *  \return New GEOM_Object, containing the created plane.
      */
     GEOM_Object MakePlaneThreePnt (in GEOM_Object thePnt1,
-                                  in GEOM_Object thePnt2,
-                                  in GEOM_Object thePnt3,
-                                  in double theTrimSize);
+                                   in GEOM_Object thePnt2,
+                                   in GEOM_Object thePnt3,
+                                   in double theTrimSize);
 
     /*!
      *  Create a plane, passing through the given point
@@ -520,8 +519,8 @@ module GEOM
      *  \return New GEOM_Object, containing the created plane.
      */
     GEOM_Object MakePlanePntVec (in GEOM_Object thePnt,
-                                in GEOM_Object theVec,
-                                in double theTrimSize);
+                                 in GEOM_Object theVec,
+                                 in double theTrimSize);
 
     /*!
      *  Create a plane, similar to the existing one, but with another size of representing face.
@@ -530,7 +529,7 @@ module GEOM
      *  \return New GEOM_Object, containing the created plane.
      */
     GEOM_Object MakePlaneFace (in GEOM_Object theFace,
-                              in double theTrimSize);
+                               in double theTrimSize);
 
     /*!
      *  Create a plane, by two vectors.
@@ -540,8 +539,8 @@ module GEOM
      *  \return New GEOM_Object, containing the created plane.
      */
     GEOM_Object MakePlane2Vec (in GEOM_Object theVec1,
-                              in GEOM_Object theVec2,
-                              in double theTrimSize);
+                               in GEOM_Object theVec2,
+                               in double theTrimSize);
 
     /*!
      *  Create a plane, defined by local coordinate system.
@@ -551,8 +550,8 @@ module GEOM
      *  \return New GEOM_Object, containing the created plane.
      */
     GEOM_Object MakePlaneLCS (in GEOM_Object theLCS,
-                             in double theTrimSize,
-                             in double theOrientation);
+                              in double theTrimSize,
+                              in double theOrientation);
 
     /*!
      *  Create a local coordinate system.
@@ -562,8 +561,8 @@ module GEOM
      *  \return New GEOM_Object, containing the created coordinate system.
      */
     GEOM_Object MakeMarker (in double theOX , in double theOY , in double theOZ,
-                           in double theXDX, in double theXDY, in double theXDZ,
-                           in double theYDX, in double theYDY, in double theYDZ);
+                            in double theXDX, in double theXDY, in double theXDZ,
+                            in double theYDX, in double theYDY, in double theYDZ);
 
     /*!
      *  Create a local coordinate system from shape.
@@ -571,7 +570,7 @@ module GEOM
      *  \return New GEOM_Object, containing the created coordinate system.
      */
     GEOM_Object MakeMarkerFromShape (in GEOM_Object theShape);
-   
+
     /*!
      *  Create a local coordinate system from point and two vectors (DX, DY).
      *  \param theOrigin Point of coordinate system origin.
@@ -580,7 +579,7 @@ module GEOM
      *  \return New GEOM_Object, containing the created coordinate system.
      */
     GEOM_Object MakeMarkerPntTwoVec (in GEOM_Object theOrigin, in GEOM_Object theXVec, in GEOM_Object theYVec);
-       
+
     /*!
      *  Create a tangent plane to specified face in the point with specified parameters.
      *  Values of parameters should be between 0. and 1.0
@@ -591,9 +590,9 @@ module GEOM
      *  \return New GEOM_Object, containing the face built on tangent plane.
      */
     GEOM_Object MakeTangentPlaneOnFace(in GEOM_Object theFace,
-                                      in double theParameterU,
-                                      in double theParameterV,
-                                      in double theTrimSize);
+                                       in double theParameterU,
+                                       in double theParameterV,
+                                       in double theTrimSize);
   };
 
   interface GEOM_ITransformOperations : GEOM_IOperations
@@ -606,8 +605,8 @@ module GEOM
      *  \return theObject.
      */
     GEOM_Object TranslateTwoPoints (in GEOM_Object theObject,
-                                   in GEOM_Object thePoint1,
-                                   in GEOM_Object thePoint2);
+                                    in GEOM_Object thePoint1,
+                                    in GEOM_Object thePoint2);
 
     /*!
      *  Translate the given object along the vector, specified
@@ -618,7 +617,7 @@ module GEOM
      *  \return New GEOM_Object, containing the translated object.
      */
     GEOM_Object TranslateTwoPointsCopy (in GEOM_Object theObject,
-                                       in GEOM_Object thePoint1,
+                                        in GEOM_Object thePoint1,
                                         in GEOM_Object thePoint2);
 
     /*!
@@ -628,7 +627,7 @@ module GEOM
      *  \return theObject.
      */
     GEOM_Object TranslateDXDYDZ (in GEOM_Object theObject,
-                                in double theDX, in double theDY, in double theDZ);
+                                 in double theDX, in double theDY, in double theDZ);
 
     /*!
      *  Translate the given object along the vector, specified
@@ -638,7 +637,7 @@ module GEOM
      *  \return New GEOM_Object, containing the translated object.
      */
     GEOM_Object TranslateDXDYDZCopy (in GEOM_Object theObject,
-                                    in double theDX, in double theDY, in double theDZ);
+                                     in double theDX, in double theDY, in double theDZ);
 
 
     /*!
@@ -648,7 +647,7 @@ module GEOM
      *  \return theObject.
      */
     GEOM_Object TranslateVector (in GEOM_Object theObject,
-                                in GEOM_Object theVector);
+                                 in GEOM_Object theVector);
 
     /*!
      *  Translate the given object along the given vector,
@@ -658,7 +657,7 @@ module GEOM
      *  \return New GEOM_Object, containing the translated object.
      */
     GEOM_Object TranslateVectorCopy (in GEOM_Object theObject,
-                                    in GEOM_Object theVector);
+                                     in GEOM_Object theVector);
 
     /*!
      *  Translate the given object along the given vector on given distance,
@@ -670,9 +669,9 @@ module GEOM
      *  \return New GEOM_Object, containing the translated object.
      */
     GEOM_Object TranslateVectorDistance (in GEOM_Object theObject,
-                                        in GEOM_Object theVector,
-                                        in double      theDistance,
-                                        in boolean     theCopy);
+                                         in GEOM_Object theVector,
+                                         in double      theDistance,
+                                         in boolean     theCopy);
 
     /*!
      *  Translate the given object along the given vector a given number times
@@ -684,9 +683,9 @@ module GEOM
      *          the shapes, obtained after each translation.
      */
     GEOM_Object MultiTranslate1D (in GEOM_Object theObject,
-                                 in GEOM_Object theVector,
-                                 in double theStep,
-                                 in long theNbTimes);
+                                  in GEOM_Object theVector,
+                                  in double theStep,
+                                  in long theNbTimes);
 
     /*!
      *  Conseqently apply two specified translations to theObject specified number of times.
@@ -701,12 +700,12 @@ module GEOM
      *          the shapes, obtained after each translation.
      */
     GEOM_Object MultiTranslate2D (in GEOM_Object theObject,
-                                 in GEOM_Object theVector1,
-                                 in double theStep1,
-                                 in long theNbTimes1,
-                                 in GEOM_Object theVector2,
-                                 in double theStep2,
-                                 in long theNbTimes2);
+                                  in GEOM_Object theVector1,
+                                  in double theStep1,
+                                  in long theNbTimes1,
+                                  in GEOM_Object theVector2,
+                                  in double theStep2,
+                                  in long theNbTimes2);
 
     /*!
      *  Rotate given object around vector perpendicular to plane containing three points.
@@ -717,9 +716,9 @@ module GEOM
      *  \return theObject.
      */
     GEOM_Object RotateThreePoints (in GEOM_Object theObject,
-                                  in GEOM_Object theCentPoint,
-                                  in GEOM_Object thePoint1,
-                                  in GEOM_Object thePoint2);
+                                   in GEOM_Object theCentPoint,
+                                   in GEOM_Object thePoint1,
+                                   in GEOM_Object thePoint2);
 
 
     /*!
@@ -732,9 +731,9 @@ module GEOM
      *  \return New GEOM_Object, containing the rotated object.
      */
     GEOM_Object RotateThreePointsCopy (in GEOM_Object theObject,
-                                      in GEOM_Object theCentPoint,
-                                      in GEOM_Object thePoint1,
-                                      in GEOM_Object thePoint2);
+                                       in GEOM_Object theCentPoint,
+                                       in GEOM_Object thePoint1,
+                                       in GEOM_Object thePoint2);
 
     /*!
      *  Rotate the given object around the given axis on the given angle.
@@ -744,8 +743,8 @@ module GEOM
      *  \return theObject.
      */
     GEOM_Object Rotate (in GEOM_Object theObject,
-                       in GEOM_Object theAxis,
-                       in double theAngle);
+                        in GEOM_Object theAxis,
+                        in double theAngle);
 
 
     /*!
@@ -757,8 +756,8 @@ module GEOM
      *  \return New GEOM_Object, containing the rotated object.
      */
     GEOM_Object RotateCopy (in GEOM_Object theObject,
-                           in GEOM_Object theAxis,
-                           in double theAngle);
+                            in GEOM_Object theAxis,
+                            in double theAngle);
 
 
     /*!
@@ -771,8 +770,8 @@ module GEOM
      *          shapes, obtained after each rotation.
      */
     GEOM_Object MultiRotate1D (in GEOM_Object theObject,
-                              in GEOM_Object theAxis,
-                              in long theNbTimes);
+                               in GEOM_Object theAxis,
+                               in long theNbTimes);
 
     /*!
      *  Rotate the given object around the
@@ -790,11 +789,11 @@ module GEOM
      *          shapes, obtained after each transformation.
      */
     GEOM_Object MultiRotate2D (in GEOM_Object theObject,
-                              in GEOM_Object theAxis,
-                              in double theAngle,
-                              in long theNbTimes1,
-                              in double theStep,
-                              in long theNbTimes2);
+                               in GEOM_Object theAxis,
+                               in double theAngle,
+                               in long theNbTimes1,
+                               in double theStep,
+                               in long theNbTimes2);
 
     /*!
      *  Replace the given object by an object,
@@ -871,7 +870,7 @@ module GEOM
      *  \return theObject.
      */
     GEOM_Object ScaleShape (in GEOM_Object theObject, in GEOM_Object thePoint,
-                           in double theFactor);
+                            in double theFactor);
 
     /*!
      *  Scale the given object by the factor, creating its copy before the scaling.
@@ -881,7 +880,7 @@ module GEOM
      *  \return New GEOM_Object, containing the scaled shape.
      */
     GEOM_Object ScaleShapeCopy (in GEOM_Object theObject, in GEOM_Object thePoint,
-                               in double theFactor);
+                                in double theFactor);
 
     /*!
      *  Scale the given object by different factors along coordinate axes.
@@ -922,8 +921,8 @@ module GEOM
      *  \return theObject.
      */
     GEOM_Object PositionShape (in GEOM_Object theObject,
-                              in GEOM_Object theStartLCS,
-                              in GEOM_Object theEndLCS);
+                               in GEOM_Object theStartLCS,
+                               in GEOM_Object theEndLCS);
 
     /*!
      *  Modify the Location of the given object by LCS,
@@ -938,24 +937,24 @@ module GEOM
      *  \return New GEOM_Object, containing the displaced shape.
      */
     GEOM_Object PositionShapeCopy (in GEOM_Object theObject,
-                                  in GEOM_Object theStartLCS,
-                                  in GEOM_Object theEndLCS);
+                                   in GEOM_Object theStartLCS,
+                                   in GEOM_Object theEndLCS);
 
     /*!
      *  Modify the Location of the given object by Path,
      *  \param  theObject The object to be displaced.
      *  \param  thePath Wire or Edge along that the object will be translated.
-     * \param  theDistance progress of Path (0 = actual location, 1 = end of path location).
-     * \param  theCopy is a true or false parameter. true is to create a copy, false to move the object.
-     * \param  theCopy is a true or false parameter. true is to reverse direction, false is to move normal direction.
+     *        \param  theDistance progress of Path (0 = actual location, 1 = end of path location).
+     *        \param  theCopy is a true or false parameter. true is to create a copy, false to move the object.
+     *        \param  theCopy is a true or false parameter. true is to reverse direction, false is to move normal direction.
      *  \return New GEOM_Object, containing the displaced shape.
      */
 
     GEOM_Object PositionAlongPath (in GEOM_Object theObject,
-                                  in GEOM_Object thePath,
-                                  in double theDistance,
-                                  in boolean theCopy,
-                                  in boolean theReverse);
+                                   in GEOM_Object thePath,
+                                   in double theDistance,
+                                   in boolean theCopy,
+                                   in boolean theReverse);
 
     /*!
      *  Recompute the shape from its arguments.
@@ -1019,16 +1018,16 @@ module GEOM
      *  \return New GEOM_Object, containing the created disk.
      */
     GEOM_Object MakeDiskPntVecR (in GEOM_Object thePnt,
-                                in GEOM_Object theVec,
-                                in double theR);
+                                 in GEOM_Object theVec,
+                                 in double theR);
     /*!
      *  Create a disk (circular face), passing through three given points
      *  \param thePnt1, thePnt2, thePnt3 Points, defining the disk.
      *  \return New GEOM_Object, containing the created disk.
      */
     GEOM_Object MakeDiskThreePnt (in GEOM_Object thePnt1,
-                                 in GEOM_Object thePnt2,
-                                 in GEOM_Object thePnt3);
+                                  in GEOM_Object thePnt2,
+                                  in GEOM_Object thePnt3);
 
     /*!
      *  Create a disk specified dimensions along OX-OY coordinate axes,
@@ -1058,9 +1057,9 @@ module GEOM
      *  \return New GEOM_Object, containing the created cylinder.
      */
     GEOM_Object MakeCylinderPntVecRH (in GEOM_Object thePnt,
-                                     in GEOM_Object theAxis,
-                                     in double      theR,
-                                     in double      theH);
+                                      in GEOM_Object theAxis,
+                                      in double      theR,
+                                      in double      theH);
 
     /*!
      *  Create a cone with given height and radiuses at
@@ -1087,10 +1086,10 @@ module GEOM
      *  \return New GEOM_Object, containing the created cone.
      */
     GEOM_Object MakeConePntVecR1R2H (in GEOM_Object thePnt,
-                                    in GEOM_Object theAxis,
-                                    in double      theR1,
-                                    in double      theR2,
-                                    in double      theH);
+                                     in GEOM_Object theAxis,
+                                     in double      theR1,
+                                     in double      theR2,
+                                     in double      theH);
 
     /*!
      *  Create a torus with given radiuses at the origin of coordinate system.
@@ -1099,7 +1098,7 @@ module GEOM
      *  \return New GEOM_Object, containing the created torus.
      */
     GEOM_Object MakeTorusRR (in double theRMajor,
-                            in double theRMinor);
+                             in double theRMinor);
 
     /*!
      *  Create a torus with given center, normal vector and radiuses.
@@ -1110,9 +1109,9 @@ module GEOM
      *  \return New GEOM_Object, containing the created torus.
      */
     GEOM_Object MakeTorusPntVecRR (in GEOM_Object thePnt,
-                                  in GEOM_Object theVec,
-                                  in double theRMajor,
-                                  in double theRMinor);
+                                   in GEOM_Object theVec,
+                                   in double theRMajor,
+                                   in double theRMinor);
 
     /*!
      *  Create a sphere with given radius at the origin of coordinate system.
@@ -1139,12 +1138,12 @@ module GEOM
      *  \return New GEOM_Object, containing the created prism.
      */
     GEOM_Object MakePrismVecH (in GEOM_Object theBase,
-                              in GEOM_Object theVec,
-                              in double      theH);
+                               in GEOM_Object theVec,
+                               in double      theH);
     /*  The Same Prism but in 2 directions (forward&backward) */
     GEOM_Object MakePrismVecH2Ways (in GEOM_Object theBase,
-                                   in GEOM_Object theVec,
-                                   in double      theH);
+                                    in GEOM_Object theVec,
+                                    in double      theH);
 
     /*!
      *  Create a shape by extrusion of the base shape along a vector, defined by two points.
@@ -1154,12 +1153,12 @@ module GEOM
      *  \return New GEOM_Object, containing the created prism.
      */
     GEOM_Object MakePrismTwoPnt (in GEOM_Object theBase,
-                                in GEOM_Object thePoint1,
-                                in GEOM_Object thePoint2);
+                                 in GEOM_Object thePoint1,
+                                 in GEOM_Object thePoint2);
     /*  The same prism but in two directions forward&backward */
     GEOM_Object MakePrismTwoPnt2Ways (in GEOM_Object theBase,
-                                     in GEOM_Object thePoint1,
-                                     in GEOM_Object thePoint2);
+                                      in GEOM_Object thePoint1,
+                                      in GEOM_Object thePoint2);
 
     /*!
      *  Create a shape by extrusion of the base shape along a vector, defined by DX DY DZ.
@@ -1168,7 +1167,7 @@ module GEOM
      *  \return New GEOM_Object, containing the created prism.
      */
     GEOM_Object MakePrismDXDYDZ (in GEOM_Object theBase,
-                                in double theDX, in double theDY, in double theDZ);
+                                   in double theDX, in double theDY, in double theDZ);
     /*  The same prism but in two directions forward&backward */
     GEOM_Object MakePrismDXDYDZ2Ways (in GEOM_Object theBase,
                                       in double theDX, in double theDY, in double theDZ);
@@ -1192,12 +1191,12 @@ module GEOM
      *  \return New GEOM_Object, containing the created revolution.
      */
     GEOM_Object MakeRevolutionAxisAngle (in GEOM_Object theBase,
-                                        in GEOM_Object theAxis,
-                                        in double theAngle);
+                                         in GEOM_Object theAxis,
+                                         in double theAngle);
     /*  The Same Revolution but in both ways forward&backward */
     GEOM_Object MakeRevolutionAxisAngle2Ways (in GEOM_Object theBase,
-                                             in GEOM_Object theAxis,
-                                             in double theAngle);
+                                              in GEOM_Object theAxis,
+                                              in double theAngle);
 
     /*!
      *  Create a filling from the given compound of contours.
@@ -1210,9 +1209,9 @@ module GEOM
      *  \return New GEOM_Object, containing the created filling surface.
      */
     GEOM_Object MakeFilling (in GEOM_Object theShape,
-                            in long theMinDeg, in long theMaxDeg,
-                            in double theTol2D, in double theTol3D,
-                            in long theNbIter,
+                             in long theMinDeg, in long theMaxDeg,
+                             in double theTol2D, in double theTol3D,
+                             in long theNbIter,
                              in filling_oper_method theMethod,
                              in boolean theApprox);
 
@@ -1225,8 +1224,8 @@ module GEOM
      *  \return New GEOM_Object, containing the created shell or solid.
      */
     GEOM_Object MakeThruSections(in ListOfGO theSeqSections,
-                                in boolean theModeSolid,
-                                in double thePreci,
+                                 in boolean theModeSolid,
+                                 in double thePreci,
                                  in boolean theRuled);
 
       /*!
@@ -1241,14 +1240,14 @@ module GEOM
      *  \param theWithContact - the mode defining that the section is translated to be in
      *                          contact with the spine.
      *  \param - WithCorrection - defining that the section is rotated to be
-     *                          orthogonal to the spine tangent in the correspondent point
+     *                                 orthogonal to the spine tangent in the correspondent point
      *  \return New GEOM_Object, containing the created pipe.
      */
     GEOM_Object MakePipeWithDifferentSections (in ListOfGO theSeqBases,
-                                              in ListOfGO theLocations,
-                                              in GEOM_Object thePath,
-                                              in boolean theWithContact ,
-                                              in boolean theWithCorrection );
+                                               in ListOfGO theLocations,
+                                               in GEOM_Object thePath,
+                                               in boolean theWithContact ,
+                                               in boolean theWithCorrection );
 
     /*!
      *  Create a shape by extrusion of the profile shape along
@@ -1263,15 +1262,15 @@ module GEOM
      *  \param theWithContact - the mode defining that the section is translated to be in
      *                          contact with the spine.
      *  \param - WithCorrection - defining that the section is rotated to be
-     *                          orthogonal to the spine tangent in the correspondent point
+     *                                 orthogonal to the spine tangent in the correspondent point
      *  \return New GEOM_Object, containing the created pipe.
      */
     GEOM_Object MakePipeWithShellSections (in ListOfGO theSeqBases,
-                                          in ListOfGO theSeqSubBases,
-                                          in ListOfGO theLocations,
-                                          in GEOM_Object thePath,
-                                          in boolean theWithContact ,
-                                          in boolean theWithCorrection );
+                                           in ListOfGO theSeqSubBases,
+                                           in ListOfGO theLocations,
+                                           in GEOM_Object thePath,
+                                           in boolean theWithContact ,
+                                           in boolean theWithCorrection );
 
     /*!
      * Create solids between given sections
@@ -1280,7 +1279,7 @@ module GEOM
      *  \return New GEOM_Object, containing the created solids.
      */
     GEOM_Object MakePipeShellsWithoutPath (in ListOfGO theSeqBases,
-                                          in ListOfGO theLocations);
+                                           in ListOfGO theLocations);
 
     /*!
      *  Create a shape by extrusion of the base shape along
@@ -1294,8 +1293,8 @@ module GEOM
      *  \return New GEOM_Object, containing the created pipe.
      */
     GEOM_Object MakePipeBiNormalAlongVector (in GEOM_Object theBase,
-                                            in GEOM_Object thePath,
-                                            in GEOM_Object theVec);
+                                             in GEOM_Object thePath,
+                                             in GEOM_Object theVec);
 
   };
 
@@ -1397,7 +1396,18 @@ module GEOM
      *  \return New GEOM_Object, containing a copy of theShape without some faces.
      */
     GEOM_Object MakeGlueFacesByList (in GEOM_Object theShape, in double theTolerance,
-                                    in ListOfGO theFaces, in boolean doKeepNonSolids);
+                                     in ListOfGO theFaces, in boolean doKeepNonSolids);
+
+    /*!
+     *  Get all sub-shapes and groups of \a theShape,
+     *  that were created already by any other methods.
+     *  \param theShape Any shape.
+     *  \param theGroupsOnly If this parameter is TRUE, only groups will be
+     *                       returned, else all found sub-shapes and groups.
+     *  \return List of existing sub-objects of \a theShape.
+     */
+    ListOfGO GetExistingSubObjects (in GEOM_Object theShape,
+                                    in boolean     theGroupsOnly);
 
     /*!
      *  Explode a shape on subshapes of a given type.
@@ -1408,8 +1418,8 @@ module GEOM
      *  \return List of sub-shapes of type theShapeType, contained in theShape.
      */
     ListOfGO MakeExplode (in GEOM_Object theShape,
-                         in long        theShapeType,
-                         in boolean     isSorted);
+                          in long        theShapeType,
+                          in boolean     isSorted);
 
     /*!
      *  Explode a shape on subshapes of a given type.
@@ -1422,8 +1432,8 @@ module GEOM
      *  \return List of IDs of sub-shapes of type theShapeType, contained in theShape.
      */
     ListOfLong SubShapeAllIDs (in GEOM_Object theShape,
-                              in long        theShapeType,
-                              in boolean     isSorted);
+                               in long        theShapeType,
+                               in boolean     isSorted);
 
     /*!
      *  Get a sub shape defined by its unique ID inside \a theMainShape
@@ -1431,7 +1441,7 @@ module GEOM
      *        Don't try to apply modification operations on them.
      */
     GEOM_Object GetSubShape (in GEOM_Object theMainShape,
-                            in long        theID);
+                             in long        theID);
 
     /*!
      *  Get global index of \a theSubShape in \a theMainShape.
@@ -1508,8 +1518,8 @@ module GEOM
      *  \return List of sub-shapes of theShape1, shared with theShape2.
      */
     ListOfGO GetSharedShapes (in GEOM_Object theShape1,
-                             in GEOM_Object theShape2,
-                             in long        theShapeType);
+                              in GEOM_Object theShape2,
+                              in long        theShapeType);
 
     /*!
      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
@@ -1522,9 +1532,9 @@ module GEOM
      *  \return List of all found sub-shapes.
      */
     ListOfGO GetShapesOnPlane (in GEOM_Object theShape,
-                              in long        theShapeType,
-                              in GEOM_Object theAx1,
-                              in shape_state theState);
+                               in long        theShapeType,
+                               in GEOM_Object theAx1,
+                               in shape_state theState);
     /*!
      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
      *  the specified plane by the certain way, defined through \a theState parameter.
@@ -1537,10 +1547,10 @@ module GEOM
      *  \return List of all found sub-shapes.
      */
     ListOfGO GetShapesOnPlaneWithLocation (in GEOM_Object theShape,
-                                          in long        theShapeType,
-                                          in GEOM_Object theAx1,
-                                          in GEOM_Object thePnt,
-                                          in shape_state theState);
+                                           in long        theShapeType,
+                                           in GEOM_Object theAx1,
+                                           in GEOM_Object thePnt,
+                                           in shape_state theState);
 
 
 
@@ -1556,10 +1566,10 @@ module GEOM
      *  \return List of all found sub-shapes.
      */
     ListOfGO GetShapesOnCylinder (in GEOM_Object theShape,
-                                 in long        theShapeType,
-                                 in GEOM_Object theAxis,
-                                 in double      theRadius,
-                                 in shape_state theState);
+                                  in long        theShapeType,
+                                  in GEOM_Object theAxis,
+                                  in double      theRadius,
+                                  in shape_state theState);
 
     /*!
      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
@@ -1591,10 +1601,10 @@ module GEOM
      *  \return List of all found sub-shapes.
      */
     ListOfGO GetShapesOnSphere (in GEOM_Object theShape,
-                               in long        theShapeType,
-                               in GEOM_Object theCenter,
-                               in double      theRadius,
-                               in shape_state theState);
+                                in long        theShapeType,
+                                in GEOM_Object theCenter,
+                                in double      theRadius,
+                                in shape_state theState);
 
     /*!
      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
@@ -1627,9 +1637,9 @@ module GEOM
      *  \return List of IDs of all found sub-shapes.
      */
     ListOfLong GetShapesOnPlaneIDs (in GEOM_Object theShape,
-                                   in long        theShapeType,
-                                   in GEOM_Object theAx1,
-                                   in shape_state theState);
+                                    in long        theShapeType,
+                                    in GEOM_Object theAx1,
+                                    in shape_state theState);
 
     /*!
      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
@@ -1643,10 +1653,10 @@ module GEOM
      *  \return List of IDs of all found sub-shapes.
      */
     ListOfLong GetShapesOnPlaneWithLocationIDs (in GEOM_Object theShape,
-                                               in long        theShapeType,
-                                               in GEOM_Object theAx1,
-                                               in GEOM_Object thePnt,
-                                               in shape_state theState);
+                                                in long        theShapeType,
+                                                in GEOM_Object theAx1,
+                                                in GEOM_Object thePnt,
+                                                in shape_state theState);
 
     /*!
      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
@@ -1660,10 +1670,10 @@ module GEOM
      *  \return List of IDs of all found sub-shapes.
      */
     ListOfLong GetShapesOnCylinderIDs (in GEOM_Object theShape,
-                                      in long        theShapeType,
-                                      in GEOM_Object theAxis,
-                                      in double      theRadius,
-                                      in shape_state theState);
+                                       in long        theShapeType,
+                                       in GEOM_Object theAxis,
+                                       in double      theRadius,
+                                       in shape_state theState);
 
     /*!
      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
@@ -1695,10 +1705,10 @@ module GEOM
      *  \return List of IDs of all found sub-shapes.
      */
     ListOfLong GetShapesOnSphereIDs (in GEOM_Object theShape,
-                                    in long        theShapeType,
-                                    in GEOM_Object theCenter,
-                                    in double      theRadius,
-                                    in shape_state theState);
+                                     in long        theShapeType,
+                                     in GEOM_Object theCenter,
+                                     in double      theRadius,
+                                     in shape_state theState);
 
     /*!
      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
@@ -1729,9 +1739,9 @@ module GEOM
      * \return List of IDs of all found sub-shapes.
      */
     ListOfLong GetShapesOnBoxIDs (in GEOM_Object theBox,
-                                 in GEOM_Object theShape,
-                                 in long        theShapeType,
-                                 in shape_state theState);
+                                  in GEOM_Object theShape,
+                                  in long        theShapeType,
+                                  in shape_state theState);
 
     /*!
      * \brief Find subshapes complying with given status
@@ -1742,9 +1752,9 @@ module GEOM
      * \return List of all found sub-shapes.
      */
     ListOfGO GetShapesOnBox (in GEOM_Object theBox,
-                            in GEOM_Object theShape,
-                            in long        theShapeType,
-                            in shape_state theState);
+                             in GEOM_Object theShape,
+                             in long        theShapeType,
+                             in shape_state theState);
 
     /*!
      * \brief Find subshapes complying with given status
@@ -1755,9 +1765,9 @@ module GEOM
      * \return List of IDs of all found sub-shapes.
      */
     ListOfLong GetShapesOnShapeIDs (in GEOM_Object theCheckShape,
-                                   in GEOM_Object theShape,
-                                   in short       theShapeType,
-                                   in shape_state theState);
+                                    in GEOM_Object theShape,
+                                    in short       theShapeType,
+                                    in shape_state theState);
 
     /*!
      * \brief Find subshapes complying with given status
@@ -1768,9 +1778,9 @@ module GEOM
      * \return List of all found sub-shapes.
      */
     ListOfGO GetShapesOnShape (in GEOM_Object theCheckShape,
-                              in GEOM_Object theShape,
-                              in short       theShapeType,
-                              in shape_state theState);
+                               in GEOM_Object theShape,
+                               in short       theShapeType,
+                               in shape_state theState);
 
     /*!
      * \brief Find subshapes complying with given status
@@ -1781,9 +1791,9 @@ module GEOM
      * \return compound includes all found sub-shapes.
      */
     GEOM_Object GetShapesOnShapeAsCompound (in GEOM_Object theCheckShape,
-                                           in GEOM_Object theShape,
-                                           in short       theShapeType,
-                                           in shape_state theState);
+                                            in GEOM_Object theShape,
+                                            in short       theShapeType,
+                                            in shape_state theState);
 
     /*!
      *  Get sub-shape(s) of \a theShapeWhere, which are
@@ -1793,7 +1803,7 @@ module GEOM
      *  \return Group of all found sub-shapes or a single found sub-shape.
      */
     GEOM_Object GetInPlace (in GEOM_Object theShapeWhere,
-                           in GEOM_Object theShapeWhat);
+                            in GEOM_Object theShapeWhat);
 
     /*!
      *  Get sub-shape(s) of \a theShapeWhere, which are
@@ -1810,7 +1820,7 @@ module GEOM
      *  \return Group of all found sub-shapes or a single found sub-shape.
      */
     GEOM_Object GetInPlaceByHistory (in GEOM_Object theShapeWhere,
-                                    in GEOM_Object theShapeWhat);
+                                     in GEOM_Object theShapeWhat);
 
     /*!
      *  Get sub-shape of theShapeWhere, which are
@@ -1820,7 +1830,7 @@ module GEOM
      *  \return found sub-shape.
      */
     GEOM_Object GetSame (in GEOM_Object theShapeWhere,
-                        in GEOM_Object theShapeWhat);
+                                in GEOM_Object theShapeWhat);
   };
 
   /*!
@@ -1841,9 +1851,9 @@ module GEOM
      *  \return New GEOM_Object, containing the created face.
      */
     GEOM_Object MakeQuad (in GEOM_Object theEdge1,
-                         in GEOM_Object theEdge2,
-                         in GEOM_Object theEdge3,
-                         in GEOM_Object theEdge4);
+                          in GEOM_Object theEdge2,
+                          in GEOM_Object theEdge3,
+                          in GEOM_Object theEdge4);
 
     /*!
      *  Create a quadrangle face on two edges.
@@ -1852,7 +1862,7 @@ module GEOM
      *  \return New GEOM_Object, containing the created face.
      */
     GEOM_Object MakeQuad2Edges (in GEOM_Object theEdge1,
-                               in GEOM_Object theEdge2);
+                                in GEOM_Object theEdge2);
 
     /*!
      *  Create a quadrangle face with specified corners.
@@ -1861,9 +1871,9 @@ module GEOM
      *  \return New GEOM_Object, containing the created face.
      */
     GEOM_Object MakeQuad4Vertices (in GEOM_Object thePnt1,
-                                  in GEOM_Object thePnt2,
-                                  in GEOM_Object thePnt3,
-                                  in GEOM_Object thePnt4);
+                                   in GEOM_Object thePnt2,
+                                   in GEOM_Object thePnt3,
+                                   in GEOM_Object thePnt4);
 
     /*!
      *  Create a hexahedral solid, bounded by the six given faces. Order of
@@ -1872,11 +1882,11 @@ module GEOM
      *  \return New GEOM_Object, containing the created solid.
      */
     GEOM_Object MakeHexa (in GEOM_Object theFace1,
-                         in GEOM_Object theFace2,
-                         in GEOM_Object theFace3,
-                         in GEOM_Object theFace4,
-                         in GEOM_Object theFace5,
-                         in GEOM_Object theFace6);
+                          in GEOM_Object theFace2,
+                          in GEOM_Object theFace3,
+                          in GEOM_Object theFace4,
+                          in GEOM_Object theFace5,
+                          in GEOM_Object theFace6);
 
     /*!
      *  Create a hexahedral solid between two given faces.
@@ -1885,7 +1895,7 @@ module GEOM
      *  \return New GEOM_Object, containing the created solid.
      */
     GEOM_Object MakeHexa2Faces (in GEOM_Object theFace1,
-                               in GEOM_Object theFace2);
+                                in GEOM_Object theFace2);
 
     /*!
      *  Extract elements of blocks and blocks compounds
@@ -1900,10 +1910,10 @@ module GEOM
      *  \return New GEOM_Object, containing the found vertex.
      */
     GEOM_Object GetPoint (in GEOM_Object theShape,
-                         in double      theX,
-                         in double      theY,
-                         in double      theZ,
-                         in double      theEpsilon);
+                          in double      theX,
+                          in double      theY,
+                          in double      theZ,
+                          in double      theEpsilon);
 
     /*!
      *  Find a vertex of the given shape, which has minimal distance to the given point.
@@ -1921,8 +1931,8 @@ module GEOM
      *  \return New GEOM_Object, containing the found edge.
      */
     GEOM_Object GetEdge (in GEOM_Object theShape,
-                        in GEOM_Object thePoint1,
-                        in GEOM_Object thePoint2);
+                         in GEOM_Object thePoint1,
+                         in GEOM_Object thePoint2);
 
     /*!
      *  Find an edge of the given shape, which has minimal distance to the given point.
@@ -1931,7 +1941,7 @@ module GEOM
      *  \return New GEOM_Object, containing the found edge.
      */
     GEOM_Object GetEdgeNearPoint (in GEOM_Object theShape,
-                                 in GEOM_Object thePoint);
+                                  in GEOM_Object thePoint);
 
     /*!
      *  Returns a face, found in the given shape by four given corner vertices.
@@ -1940,10 +1950,10 @@ module GEOM
      *  \return New GEOM_Object, containing the found face.
      */
     GEOM_Object GetFaceByPoints (in GEOM_Object theShape,
-                                in GEOM_Object thePoint1,
-                                in GEOM_Object thePoint2,
-                                in GEOM_Object thePoint3,
-                                in GEOM_Object thePoint4);
+                                 in GEOM_Object thePoint1,
+                                 in GEOM_Object thePoint2,
+                                 in GEOM_Object thePoint3,
+                                 in GEOM_Object thePoint4);
 
     /*!
      *  Get a face of block, found in the given shape by two given edges.
@@ -1952,8 +1962,8 @@ module GEOM
      *  \return New GEOM_Object, containing the found face.
      */
     GEOM_Object GetFaceByEdges (in GEOM_Object theShape,
-                               in GEOM_Object theEdge1,
-                               in GEOM_Object theEdge2);
+                                in GEOM_Object theEdge1,
+                                in GEOM_Object theEdge2);
 
     /*!
      *  Find a face, opposite to the given one in the given block.
@@ -1962,7 +1972,7 @@ module GEOM
      *  \return New GEOM_Object, containing the found face.
      */
     GEOM_Object GetOppositeFace (in GEOM_Object theBlock,
-                                in GEOM_Object theFace);
+                                 in GEOM_Object theFace);
 
     /*!
      *  Find a face of the given shape, which has minimal distance to the given point.
@@ -1971,7 +1981,7 @@ module GEOM
      *  \return New GEOM_Object, containing the found face.
      */
     GEOM_Object GetFaceNearPoint (in GEOM_Object theShape,
-                                 in GEOM_Object thePoint);
+                                  in GEOM_Object thePoint);
 
     /*!
      *  Find a face of block, whose outside normale has minimal angle with the given vector.
@@ -1980,7 +1990,7 @@ module GEOM
      *  \return New GEOM_Object, containing the found face.
      */
     GEOM_Object GetFaceByNormale (in GEOM_Object theBlock,
-                                 in GEOM_Object theVector);
+                                  in GEOM_Object theVector);
 
     /*!
      *  Find all subshapes of type \a theShapeType of the given shape,
@@ -2012,9 +2022,9 @@ module GEOM
      *  \return theNbBlocks Number of specified blocks in theCompound.
      */
     boolean IsCompoundOfBlocks (in GEOM_Object theCompound,
-                               in long        theMinNbFaces,
-                               in long        theMaxNbFaces,
-                               out long       theNbBlocks);
+                                in long        theMinNbFaces,
+                                in long        theMaxNbFaces,
+                                out long       theNbBlocks);
 
     /*!
      *  Enumeration of Blocks Compound defects.
@@ -2065,7 +2075,7 @@ module GEOM
      *  \return theErrors Structure, containing discovered errors and incriminated sub-shapes.
      */
     boolean CheckCompoundOfBlocks (in GEOM_Object theCompound,
-                                  out BCErrors   theErrors);
+                                   out BCErrors   theErrors);
 
     /*!
      *  Convert sequence of Blocks Compound errors, returned by
@@ -2075,7 +2085,7 @@ module GEOM
      *  \return String, describing all the errors in form, suitable for printing.
      */
     string PrintBCErrors (in GEOM_Object theCompound,
-                         in BCErrors    theErrors);
+                          in BCErrors    theErrors);
 
     /*!
      *  Remove all seam and degenerated edges from \a theShape.
@@ -2108,8 +2118,8 @@ module GEOM
      *  \return List of GEOM_Objects, containing the retrieved blocks.
      */
     ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound,
-                                     in long        theMinNbFaces,
-                                     in long        theMaxNbFaces);
+                                      in long        theMinNbFaces,
+                                      in long        theMaxNbFaces);
 
     /*!
      *  Find block, containing the given point inside its volume or on boundary.
@@ -2119,7 +2129,7 @@ module GEOM
      *  \return New GEOM_Object, containing the found block.
      */
     GEOM_Object GetBlockNearPoint (in GEOM_Object theCompound,
-                                  in GEOM_Object thePoint);
+                                   in GEOM_Object thePoint);
 
     /*!
      *  Find block, containing all the elements, passed as the parts, or maximum quantity of them.
@@ -2128,7 +2138,7 @@ module GEOM
      *  \return New GEOM_Object, containing the found block.
      */
     GEOM_Object GetBlockByParts (in GEOM_Object theCompound,
-                                in ListOfGO    theParts);
+                                 in ListOfGO    theParts);
 
     /*!
      *  Return all blocks, containing all the elements, passed as the parts.
@@ -2137,7 +2147,7 @@ module GEOM
      *  \return List of GEOM_Objects, containing the found blocks.
      */
     ListOfGO GetBlocksByParts (in GEOM_Object theCompound,
-                              in ListOfGO    theParts);
+                               in ListOfGO    theParts);
 
     /*!
      *  Operations on blocks with gluing of result
@@ -2155,9 +2165,9 @@ module GEOM
      *  \return New GEOM_Object, containing the result shape.
      */
     GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock,
-                                          in long        theDirFace1,
-                                          in long        theDirFace2,
-                                          in long        theNbTimes);
+                                           in long        theDirFace1,
+                                           in long        theDirFace2,
+                                           in long        theNbTimes);
 
     /*!
      *  Multi-transformate block and glue the result.
@@ -2168,12 +2178,12 @@ module GEOM
      *  \return New GEOM_Object, containing the result shape.
      */
     GEOM_Object MakeMultiTransformation2D (in GEOM_Object theBlock,
-                                          in long        theDirFace1U,
-                                          in long        theDirFace2U,
-                                          in long        theNbTimesU,
-                                          in long        theDirFace1V,
-                                          in long        theDirFace2V,
-                                          in long        theNbTimesV);
+                                           in long        theDirFace1U,
+                                           in long        theDirFace2U,
+                                           in long        theNbTimesU,
+                                           in long        theDirFace1V,
+                                           in long        theDirFace2V,
+                                           in long        theNbTimesV);
 
     /*!
      *  Special operation - propagation
@@ -2204,8 +2214,8 @@ module GEOM
      *  \return New GEOM_Object, containing the result shape.
      */
     GEOM_Object MakeBoolean (in GEOM_Object theShape1,
-                            in GEOM_Object theShape2,
-                            in long theOperation);
+                             in GEOM_Object theShape2,
+                             in long theOperation);
 
     /*!
      *  Perform partition operation.
@@ -2233,13 +2243,13 @@ module GEOM
      *  \return New GEOM_Object, containing the result shapes.
      */
     GEOM_Object MakePartition (in ListOfGO   theShapes,
-                              in ListOfGO   theTools,
-                              in ListOfGO   theKeepInside,
-                              in ListOfGO   theRemoveInside,
-                              in short      theLimit,
-                              in boolean    theRemoveWebs,
-                              in ListOfLong theMaterials,
-                              in short      theKeepNonlimitShapes);
+                               in ListOfGO   theTools,
+                               in ListOfGO   theKeepInside,
+                               in ListOfGO   theRemoveInside,
+                               in short      theLimit,
+                               in boolean    theRemoveWebs,
+                               in ListOfLong theMaterials,
+                               in short      theKeepNonlimitShapes);
 
     /*!
      *  Perform partition operation.
@@ -2255,13 +2265,13 @@ module GEOM
      *  \return New GEOM_Object, containing the result shapes.
      */
     GEOM_Object MakePartitionNonSelfIntersectedShape (in ListOfGO   theShapes,
-                                                     in ListOfGO   theTools,
-                                                     in ListOfGO   theKeepInside,
-                                                     in ListOfGO   theRemoveInside,
-                                                     in short      theLimit,
-                                                     in boolean    theRemoveWebs,
-                                                     in ListOfLong theMaterials,
-                                                     in short      theKeepNonlimitShapes);
+                                                      in ListOfGO   theTools,
+                                                      in ListOfGO   theKeepInside,
+                                                      in ListOfGO   theRemoveInside,
+                                                      in short      theLimit,
+                                                      in boolean    theRemoveWebs,
+                                                      in ListOfLong theMaterials,
+                                                      in short      theKeepNonlimitShapes);
 
     /*!
      *  Perform partition of the Shape with the Plane
@@ -2270,7 +2280,7 @@ module GEOM
      *  \return New GEOM_Object, containing the result shape.
      */
     GEOM_Object MakeHalfPartition (in GEOM_Object theShape,
-                                  in GEOM_Object thePlane);
+                                   in GEOM_Object thePlane);
   };
 
   /*!
@@ -2287,16 +2297,16 @@ module GEOM
      *  \return New GEOM_Object, containing the created circle.
      */
     GEOM_Object MakeCirclePntVecR (in GEOM_Object thePnt,
-                                  in GEOM_Object theVec,
-                                  in double theR);
+                                   in GEOM_Object theVec,
+                                   in double theR);
     /*!
      *  Create a circle, passing through three given points
      *  \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
      *  \return New GEOM_Object, containing the created circle.
      */
     GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1,
-                                   in GEOM_Object thePnt2,
-                                   in GEOM_Object thePnt3);
+                                    in GEOM_Object thePnt2,
+                                    in GEOM_Object thePnt3);
     /*!
      *  Create a circle with given center, with a radius equals the distance from center to Point1
      *  and on a plane defined by all of three points.
@@ -2304,8 +2314,8 @@ module GEOM
      *  \return New GEOM_Object, containing the created circle.
      */
     GEOM_Object MakeCircleCenter2Pnt (in GEOM_Object thePnt1,
-                                     in GEOM_Object thePnt2,
-                                     in GEOM_Object thePnt3);
+                                      in GEOM_Object thePnt2,
+                                      in GEOM_Object thePnt3);
     /*!
      *  Create an ellipse with given center, normal vector and radiuses.
      *  \param thePnt Ellipse center.
@@ -2315,9 +2325,9 @@ module GEOM
      *  \return New GEOM_Object, containing the created ellipse.
      */
     GEOM_Object MakeEllipse (in GEOM_Object thePnt,
-                            in GEOM_Object theVec,
-                            in double theRMajor,
-                            in double theRMinor);
+                             in GEOM_Object theVec,
+                             in double theRMajor,
+                             in double theRMinor);
 
     /*!
      *  Create an ellipse with given center, normal vector, main axis vector and radiuses.
@@ -2329,10 +2339,10 @@ module GEOM
      *  \return New GEOM_Object, containing the created ellipse.
      */
     GEOM_Object MakeEllipseVec (in GEOM_Object thePnt,
-                               in GEOM_Object theVec,
-                               in double theRMajor,
-                               in double theRMinor,
-                               in GEOM_Object theVecMaj);
+                                in GEOM_Object theVec,
+                                in double theRMajor,
+                                in double theRMinor,
+                                in GEOM_Object theVecMaj);
 
     /*!
      *  Create an arc of circle, passing through three given points.
@@ -2342,8 +2352,8 @@ module GEOM
      *  \return New GEOM_Object, containing the created arc.
      */
     GEOM_Object MakeArc (in GEOM_Object thePnt1,
-                        in GEOM_Object thePnt2,
-                        in GEOM_Object thePnt3);
+                         in GEOM_Object thePnt2,
+                         in GEOM_Object thePnt3);
 
     /*!
      *  Create an arc of circle of center C from one point to another
@@ -2366,8 +2376,8 @@ module GEOM
      *  \return New GEOM_Object, containing the created arc.
      */
     GEOM_Object MakeArcOfEllipse (in GEOM_Object theCenter,
-                                 in GEOM_Object thePnt1,
-                                 in GEOM_Object thePnt2);
+                                  in GEOM_Object thePnt1,
+                                  in GEOM_Object thePnt2);
 
 
     /*!
@@ -2463,7 +2473,7 @@ module GEOM
      *  \return New GEOM_Object, containing the result shape.
      */
     GEOM_Object MakeFilletAll (in GEOM_Object theShape,
-                              in double      theR);
+                               in double      theR);
 
     /*!
      *  Perform a fillet on the specified edges of the given shape
@@ -2475,12 +2485,12 @@ module GEOM
      *  \return New GEOM_Object, containing the result shape.
      */
     GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
-                                in double      theR,
-                                in ListOfLong  theEdges);
+                                 in double      theR,
+                                 in ListOfLong  theEdges);
     GEOM_Object MakeFilletEdgesR1R2 (in GEOM_Object theShape,
-                                    in double      theR1,
-                                    in double      theR2,
-                                    in ListOfLong  theEdges);
+                                     in double      theR1,
+                                     in double      theR2,
+                                     in ListOfLong  theEdges);
 
     /*!
      *  Perform a fillet on all edges of the specified faces of the given shape.
@@ -2492,13 +2502,13 @@ module GEOM
      *  \return New GEOM_Object, containing the result shape.
      */
     GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
-                                in double      theR,
-                                in ListOfLong  theFaces);
+                                 in double      theR,
+                                 in ListOfLong  theFaces);
 
     GEOM_Object MakeFilletFacesR1R2 (in GEOM_Object theShape,
-                                    in double      theR1,
-                                    in double      theR2,
-                                    in ListOfLong  theFaces);
+                                     in double      theR1,
+                                     in double      theR2,
+                                     in ListOfLong  theFaces);
 
     /*!
      *  Perform a fillet on face of the specified vertexes of the given shape.
@@ -2510,8 +2520,8 @@ module GEOM
      *  \return New GEOM_Object, containing the result shape.
      */
     GEOM_Object MakeFillet2D (in GEOM_Object theShape,
-                             in double      theR,
-                             in ListOfLong  theVertexes);
+                              in double      theR,
+                              in ListOfLong  theVertexes);
 
     /*!
      *  Perform a fillet on edges of the specified vertexes of the given wire.
@@ -2525,8 +2535,8 @@ module GEOM
      *  \return New GEOM_Object, containing the result shape.
      */
     GEOM_Object MakeFillet1D (in GEOM_Object theShape,
-                             in double      theR,
-                             in ListOfLong  theVertexes);
+                              in double      theR,
+                              in ListOfLong  theVertexes);
 
     /*!
      *  Perform a symmetric chamfer on all edges of the given shape.
@@ -2535,7 +2545,7 @@ module GEOM
      *  \return New GEOM_Object, containing the result shape.
      */
     GEOM_Object MakeChamferAll (in GEOM_Object theShape,
-                               in double      theD);
+                                in double      theD);
 
     /*!
      *  Perform a chamfer on edges, common to the specified faces.
@@ -2549,15 +2559,15 @@ module GEOM
      *  \return New GEOM_Object, containing the result shape.
      */
     GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
-                                in double theD1, in double theD2,
-                                in long theFace1, in long theFace2);
+                                 in double theD1, in double theD2,
+                                 in long theFace1, in long theFace2);
     /*!
      *  The Same but with params theD = Chamfer Lenght
      *  and theAngle = Chamfer Angle (Angle in radians)
      */
     GEOM_Object MakeChamferEdgeAD (in GEOM_Object theShape,
-                                  in double theD, in double theAngle,
-                                  in long theFace1, in long theFace2);
+                                   in double theD, in double theAngle,
+                                   in long theFace1, in long theFace2);
 
     /*!
      *  Perform a chamfer on all edges of the specified faces.
@@ -2573,15 +2583,15 @@ module GEOM
      *  \return New GEOM_Object, containing the result shape.
      */
     GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
-                                 in double theD1, in double theD2,
-                                 in ListOfLong theFaces);
+                                  in double theD1, in double theD2,
+                                  in ListOfLong theFaces);
     /*!
      *  The Same but with params theD = Chamfer Lenght
      *  and theAngle = Chamfer Angle (Angle in radians)
      */
     GEOM_Object MakeChamferFacesAD (in GEOM_Object theShape,
-                                   in double theD, in double theAngle,
-                                   in ListOfLong theFaces);
+                                    in double theD, in double theAngle,
+                                    in ListOfLong theFaces);
 
    /*!
     *  Perform a chamfer on edges,
@@ -2592,15 +2602,15 @@ module GEOM
     *  \return New GEOM_Object, containing the result shape.
     */
     GEOM_Object MakeChamferEdges (in GEOM_Object theShape,
-                                 in double theD1, in double theD2,
-                                 in ListOfLong theEdges);
+                                  in double theD1, in double theD2,
+                                  in ListOfLong theEdges);
     /*!
      *  The Same but with params theD = Chamfer Lenght
      *  and theAngle = Chamfer Angle (Angle in radians)
      */
     GEOM_Object MakeChamferEdgesAD (in GEOM_Object theShape,
-                                   in double theD, in double theAngle,
-                                   in ListOfLong theEdges);
+                                    in double theD, in double theAngle,
+                                    in ListOfLong theEdges);
 
     /*!
      *  Perform an Archimde operation on the given shape with given parameters.
@@ -2613,9 +2623,9 @@ module GEOM
      *          by a plane, corresponding to water level.
      */
     GEOM_Object MakeArchimede (in GEOM_Object theShape,
-                              in double theWeight,
-                              in double theWaterDensity,
-                              in double theMeshDeflection);
+                               in double theWeight,
+                               in double theWaterDensity,
+                               in double theMeshDeflection);
 
     /*!
      *  Duplicates <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
@@ -2641,9 +2651,9 @@ module GEOM
      *  \return New GEOM_Object, containing processed shape.
      */
     GEOM_Object ProcessShape (in GEOM_Object theShapes,
-                             in string_array theOperators,
-                             in string_array theParameters,
-                             in string_array theValues);
+                              in string_array theOperators,
+                              in string_array theParameters,
+                              in string_array theValues);
 
     /*!
      *  Get default sequence of operators, their parameters and parameters' values
@@ -2655,8 +2665,8 @@ module GEOM
      *                           as parameters are listed in \a theParameters list.
      */
     void GetShapeProcessParameters (out string_array theOperators,
-                                   out string_array theParameters,
-                                   out string_array theValues);
+                                    out string_array theParameters,
+                                    out string_array theValues);
     /*!
      *  Get parameters and parameters' values for the given Shape Process operation.
      *  In the current implementation the defaults are
@@ -2667,8 +2677,8 @@ module GEOM
      *                           as parameters are listed in \a theParameters list.
      */
     void GetOperatorParameters (in string theOperator,
-                               out string_array theParameters,
-                               out string_array theValues);
+                                out string_array theParameters,
+                                out string_array theValues);
 
     /*!
      *  Remove faces from the given object (shape).
@@ -2689,7 +2699,7 @@ module GEOM
      *  \return New GEOM_Object, containing processed shape.
      */
     GEOM_Object CloseContour (in GEOM_Object theObject, in short_array theWires,
-                             in boolean isCommonVertex);
+                              in boolean isCommonVertex);
 
     /*!
      *  Remove internal wires and edges from the given object (face).
@@ -2729,7 +2739,7 @@ module GEOM
      *  \return New GEOM_Object, containing processed shape.
      */
     GEOM_Object DivideEdge (in GEOM_Object theObject, in short theEdgeIndex,
-                           in double theValue, in boolean isByParameter);
+                            in double theValue, in boolean isByParameter);
 
     /*!
      *  Get a list of wires (wrapped in GEOM_Object-s),
@@ -2740,8 +2750,8 @@ module GEOM
      *  \return FALSE, if an error(s) occured during the method execution.
      */
     boolean GetFreeBoundary (in GEOM_Object theObject,
-                            out ListOfGO theClosedWires,
-                            out ListOfGO theOpenWires);
+                             out ListOfGO theClosedWires,
+                             out ListOfGO theOpenWires);
 
     /*!
      *  Change orientation of the given object.
@@ -2800,7 +2810,7 @@ module GEOM
      *  \return Returns available formats and patterns through the arguments.
      */
     void ImportTranslators (out string_array theFormats,
-                           out string_array thePatterns);
+                            out string_array thePatterns);
 
     /*!
      *  Get the supported export formats and corresponding patterns for File dialog.
@@ -2809,7 +2819,7 @@ module GEOM
      *  \return Returns available formats and patterns through the arguments.
      */
     void ExportTranslators (out string_array theFormats,
-                           out string_array thePatterns);
+                            out string_array thePatterns);
 
     /*!
      * Load texture from file
@@ -2910,8 +2920,8 @@ module GEOM
      */
     //short KindOfShape (in GEOM_Object   theShape,
     GEOM_IKindOfShape::shape_kind KindOfShape (in  GEOM_Object  theShape,
-                                              out ListOfLong   theIntegers,
-                                              out ListOfDouble theDoubles);
+                                               out ListOfLong   theIntegers,
+                                               out ListOfDouble theDoubles);
 
     /*!
      *  Get position (LCS) of theShape.
@@ -2925,9 +2935,9 @@ module GEOM
      *  \return Returns position of the shape through the last nine arguments.
      */
     void GetPosition (in GEOM_Object theShape,
-                     out double Ox, out double Oy, out double Oz,
-                     out double Zx, out double Zy, out double Zz,
-                     out double Xx, out double Xy, out double Xz);
+                      out double Ox, out double Oy, out double Oz,
+                      out double Zx, out double Zy, out double Zz,
+                      out double Xx, out double Xy, out double Xz);
 
     /*!
      *  Get summarized length of all wires,
@@ -2939,9 +2949,9 @@ module GEOM
      *  \return Returns shape properties through the last three arguments.
      */
     void GetBasicProperties (in GEOM_Object theShape,
-                            out double theLength,
-                            out double theSurfArea,
-                            out double theVolume);
+                             out double theLength,
+                             out double theSurfArea,
+                             out double theVolume);
 
     /*!
      *  Get a point, situated at the centre of mass of theShape.
@@ -2949,8 +2959,7 @@ module GEOM
      *  \return New GEOM_Object, containing the created point.
      */
     GEOM_Object GetCentreOfMass (in GEOM_Object theShape);
-    
-    
+
     /*
      *  Get the vertex by index for 1D objects depends the edge/wire orientation
      *  \param theShape Shape (wire or edge) to find the vertex on it
@@ -2968,7 +2977,7 @@ module GEOM
      *  \return New GEOM_Object, containing the created normal vector.
      */
     GEOM_Object GetNormal (in GEOM_Object theFace,
-                          in GEOM_Object theOptionalPoint);
+                           in GEOM_Object theOptionalPoint);
 
     /*!
      *  Get inertia matrix and moments of inertia of theShape.
@@ -2978,10 +2987,10 @@ module GEOM
      *  \return Returns inertia through the last twelve arguments.
      */
     void GetInertia (in GEOM_Object theShape,
-                    out double I11, out double I12, out double I13,
-                    out double I21, out double I22, out double I23,
-                    out double I31, out double I32, out double I33,
-                    out double Ix , out double Iy , out double Iz);
+                     out double I11, out double I12, out double I13,
+                     out double I21, out double I22, out double I23,
+                     out double I31, out double I32, out double I33,
+                     out double Ix , out double Iy , out double Iz);
 
     /*!
      *  Get parameters of bounding box of the given shape
@@ -2992,9 +3001,9 @@ module GEOM
      *  \return Returns parameters of bounding box through the last six arguments.
      */
     void GetBoundingBox (in GEOM_Object theShape,
-                        out double Xmin, out double Xmax,
-                        out double Ymin, out double Ymax,
-                        out double Zmin, out double Zmax);
+                         out double Xmin, out double Xmax,
+                         out double Ymin, out double Ymax,
+                         out double Zmin, out double Zmax);
 
     /*!
      *  Get min and max tolerances of sub-shapes of theShape
@@ -3005,9 +3014,9 @@ module GEOM
      *  \return Returns shape tolerances through the last six arguments.
      */
     void GetTolerance (in GEOM_Object theShape,
-                      out double FaceMin, out double FaceMax,
-                      out double EdgeMin, out double EdgeMax,
-                      out double VertMin, out double VertMax);
+                       out double FaceMin, out double FaceMax,
+                       out double EdgeMin, out double EdgeMax,
+                       out double VertMin, out double VertMax);
 
     /*!
      *  Check a topology of the given shape.
@@ -3016,7 +3025,7 @@ module GEOM
      *  \return TRUE, if the shape "seems to be valid" from the topological point of view.
      */
     boolean CheckShape (in GEOM_Object theShape,
-                       out string     theDescription);
+                        out string     theDescription);
 
     /*!
      *  Check a topology and a geometry of the given shape.
@@ -3025,7 +3034,7 @@ module GEOM
      *  \return TRUE, if the shape "seems to be valid".
      */
     boolean CheckShapeWithGeometry (in GEOM_Object theShape,
-                                   out string     theDescription);
+                                    out string     theDescription);
 
     /*!
      *  Obtain description of the given shape
@@ -3042,8 +3051,8 @@ module GEOM
      *  \return Value of the minimal distance between the given shapes.
      */
     double GetMinDistance (in GEOM_Object theShape1, in GEOM_Object theShape2,
-                          out double X1, out double Y1, out double Z1,
-                          out double X2, out double Y2, out double Z2);
+                           out double X1, out double Y1, out double Z1,
+                           out double X2, out double Y2, out double Z2);
 
     /*!
      *  Get angle between the given lines or linear edges.
@@ -3081,7 +3090,7 @@ module GEOM
      *  \return Value of curvature.
      */
     double MaxSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
-                                      in double theVParam);
+                                       in double theVParam);
 
     /*!
      *  Get max radius of curvature of surface in the given point
@@ -3099,7 +3108,7 @@ module GEOM
      *  \return Value of curvature.
      */
     double MinSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
-                                      in double theVParam);
+                                       in double theVParam);
 
     /*!
      *  Get min radius of curvature of surface in the given point
@@ -3208,9 +3217,9 @@ module GEOM
      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
      *  \return List of GEOM_Objects, containing the created shape and propagation groups.
      */
-    ListOfGO MakePipeTShape (in double theR1, in double theW1, in double theL1, 
-                               in double theR2, in double theW2, in double theL2,
-                               in boolean theHexMesh);
+    ListOfGO MakePipeTShape (in double theR1, in double theW1, in double theL1,
+                                in double theR2, in double theW2, in double theL2,
+                                in boolean theHexMesh);
     /*!
      *  Create a T-shape object with specified caracteristics for the main and
      *  the incident pipes (radius, width, half-length).
@@ -3228,10 +3237,10 @@ module GEOM
      *  \param theP3 Junction point of incident pipe
      *  \return List of GEOM_Objects, containing the created shape and propagation groups.
      */
-    ListOfGO MakePipeTShapeWithPosition (in double theR1, in double theW1, in double theL1, 
-                                           in double theR2, in double theW2, in double theL2,
-                                           in boolean theHexMesh,
-                                           in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
+    ListOfGO MakePipeTShapeWithPosition (in double theR1, in double theW1, in double theL1,
+                                            in double theR2, in double theW2, in double theL2,
+                                            in boolean theHexMesh,
+                                            in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
     /*!
      *  Create a T-shape object with specified caracteristics for the main and
      *  the incident pipes (radius, width, half-length). A chamfer is created
@@ -3249,8 +3258,8 @@ module GEOM
      *  \return List of GEOM_Objects, containing the created shape and propagation groups.
      */
     ListOfGO MakePipeTShapeChamfer (in double theR1, in double theW1, in double theL1,
-                                   in double theR2, in double theW2, in double theL2,
-                                   in double theH, in double theW, in boolean theHexMesh);
+                                    in double theR2, in double theW2, in double theL2,
+                                    in double theH, in double theW, in boolean theHexMesh);
     /*!
      *  Create a T-shape object with specified caracteristics for the main and
      *  the incident pipes (radius, width, half-length). A chamfer is created
@@ -3271,10 +3280,10 @@ module GEOM
      *  \param theP3 Junction point of incident pipe
      *  \return List of GEOM_Objects, containing the created shape and propagation groups.
      */
-    ListOfGO MakePipeTShapeChamferWithPosition (in double theR1, in double theW1, in double theL1, 
-                                                  in double theR2, in double theW2, in double theL2, 
-                                                  in double theH, in double theW, in boolean theHexMesh,
-                                                  in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
+    ListOfGO MakePipeTShapeChamferWithPosition (in double theR1, in double theW1, in double theL1,
+                                                   in double theR2, in double theW2, in double theL2,
+                                                   in double theH, in double theW, in boolean theHexMesh,
+                                                   in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
     /*!
      *  Create a T-shape object with specified caracteristics for the main and
      *  the incident pipes (radius, width, half-length). A fillet is created
@@ -3290,9 +3299,9 @@ module GEOM
      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
      *  \return List of GEOM_Objects, containing the created shape and propagation groups.
      */
-    ListOfGO MakePipeTShapeFillet (in double theR1, in double theW1, in double theL1, 
-                                     in double theR2, in double theW2, in double theL2, 
-                                     in double theRF, in boolean theHexMesh);
+    ListOfGO MakePipeTShapeFillet (in double theR1, in double theW1, in double theL1,
+                                      in double theR2, in double theW2, in double theL2,
+                                      in double theRF, in boolean theHexMesh);
     /*!
      *  Create a T-shape object with specified caracteristics for the main and
      *  the incident pipes (radius, width, half-length). A fillet is created
@@ -3312,13 +3321,13 @@ module GEOM
      *  \param theP3 Junction point of incident pipe
      *  \return List of GEOM_Objects, containing the created shape and propagation groups.
      */
-    ListOfGO MakePipeTShapeFilletWithPosition (in double theR1, in double theW1, in double theL1, 
-                                                 in double theR2, in double theW2, in double theL2, 
-                                                 in double theRF, in boolean theHexMesh,
-                                                 in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
+    ListOfGO MakePipeTShapeFilletWithPosition (in double theR1, in double theW1, in double theL1,
+                                                  in double theR2, in double theW2, in double theL2,
+                                                  in double theRF, in boolean theHexMesh,
+                                                  in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
     /*@@ insert new functions before this line @@ do not remove this line @@*/
   };
-    
+
   /*!
    *  GEOM_Gen: Interface to access other GEOM interfaces.
    *  Also contains some methods to access and manage GEOM objects.
@@ -3340,9 +3349,9 @@ module GEOM
      * Returns a SObject where theObject is placed
      */
     SALOMEDS::SObject AddInStudy (in SALOMEDS::Study theStudy,
-                                 in GEOM_Object theObject,
-                                 in string theName,
-                                 in GEOM_Object theFather);
+                                  in GEOM_Object theObject,
+                                  in string theName,
+                                  in GEOM_Object theFather);
 
     /*!
      *  Publish sub-shapes, standing for arguments and sub-shapes of arguments
@@ -3368,10 +3377,10 @@ module GEOM
      *  \return list of published sub-shapes
      */
     ListOfGO RestoreSubShapesO (in SALOMEDS::Study   theStudy,
-                               in GEOM_Object       theObject,
-                               in ListOfGO          theArgs,
-                               in find_shape_method theFindMethod,
-                               in boolean           theInheritFirstArg,
+                                 in GEOM_Object       theObject,
+                                in ListOfGO          theArgs,
+                                in find_shape_method theFindMethod,
+                                in boolean           theInheritFirstArg,
                                 in boolean           theAddPrefix);
 
     /*!
@@ -3411,10 +3420,10 @@ module GEOM
      *  \param theSObject study object, referencing GEOM object, arguments of which will be published
      */
     ListOfGO RestoreSubShapesSO (in SALOMEDS::Study   theStudy,
-                                in SALOMEDS::SObject theSObject,
-                                in ListOfGO          theArgs,
-                                in find_shape_method theFindMethod,
-                                in boolean           theInheritFirstArg,
+                                 in SALOMEDS::SObject theSObject,
+                                 in ListOfGO          theArgs,
+                                 in find_shape_method theFindMethod,
+                                 in boolean           theInheritFirstArg,
                                  in boolean           theAddPrefix);
 
     /*!
@@ -3495,8 +3504,8 @@ module GEOM
      *  \param theObject   The object which named subshapes are published
      */
     ListOfGO PublishNamedShapesInStudy(in SALOMEDS::Study theStudy,
-                                            //in SObject theSObject,
-                                            in Object theObject);
+                                       //in SObject theSObject,
+                                       in Object theObject);
   };
 };
 
index 5de5a1e170f7879ea61db8905f731fd889df0f18..b0ea5a0c2dd3c1ebe149ffba50dc8b63f4cb03ee 100644 (file)
@@ -310,7 +310,7 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object) theMainShape,
                                              Handle(TColStd_HArray1OfInteger) theIndices,
                                              bool isStandaloneOperation)
 {
-  if(theMainShape.IsNull() || theIndices.IsNull()) return NULL;
+  if (theMainShape.IsNull() || theIndices.IsNull()) return NULL;
 
   Handle(TDocStd_Document) aDoc = GetDocument(theMainShape->GetDocID());
   Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
@@ -319,21 +319,6 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object) theMainShape,
   //            if this label has been freed (object deleted)
   bool useExisting = false;
   TDF_Label aChild;
-  /*
-  if (!_lastCleared.IsNull()) {
-    if (_lastCleared.Root() == aDoc->Main().Root()) {
-      useExisting = true;
-      aChild = _lastCleared;
-      // 0020229: if next label exists and is empty, try to reuse it
-      Standard_Integer aNextTag = aChild.Tag() + 1;
-      TDF_Label aNextL = aDoc->Main().FindChild(aNextTag, Standard_False);
-      if (!aNextL.IsNull() && !aNextL.HasAttribute())
-        _lastCleared = aNextL;
-      else
-        _lastCleared.Nullify();
-    }
-  }
-  */
   int aDocID = theMainShape->GetDocID();
   if (_freeLabels.find(aDocID) != _freeLabels.end()) {
     std::list<TDF_Label>& aFreeLabels = _freeLabels[aDocID];
@@ -349,10 +334,10 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object) theMainShape,
   }
 
   Handle(GEOM_Function) aMainShape = theMainShape->GetLastFunction();
-  Handle(GEOM_Object) anObject = new GEOM_Object(aChild, 28); //28 is SUBSHAPE type
+  Handle(GEOM_Object) anObject = new GEOM_Object (aChild, 28); //28 is SUBSHAPE type
   Handle(GEOM_Function) aFunction = anObject->AddFunction(GEOM_Object::GetSubShapeID(), 1);
 
-  GEOM_ISubShape aSSI(aFunction);
+  GEOM_ISubShape aSSI (aFunction);
   aSSI.SetMainShape(aMainShape);
   aSSI.SetIndices(theIndices);
 
@@ -372,11 +357,14 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object) theMainShape,
     return NULL;
   }
 
-  //Put an object in the map of created objects
+  // Put an object in the map of created objects
   TCollection_AsciiString anID = BuildIDFromObject(anObject);
-  if(_objects.IsBound(anID)) _objects.UnBind(anID);
+  if (_objects.IsBound(anID)) _objects.UnBind(anID);
   _objects.Bind(anID, anObject);
 
+  // Put this subshape in the list of subshapes of theMainShape
+  aMainShape->AddSubShapeReference(aFunction);
+
   GEOM::TPythonDump pd (aFunction);
 
   if (isStandaloneOperation) {
@@ -410,9 +398,17 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_Object) theObject)
   TCollection_AsciiString anID = BuildIDFromObject(theObject);
   if (_objects.IsBound(anID)) _objects.UnBind(anID);
 
+  // If subshape, remove it from the list of subshapes of its main shape
+  if (!theObject->IsMainShape()) {
+    Handle(GEOM_Function) aFunction = theObject->GetFunction(1);
+    GEOM_ISubShape aSSI (aFunction);
+    Handle(GEOM_Function) aMainShape = aSSI.GetMainShape();
+    aMainShape->RemoveSubShapeReference(aFunction);
+  }
+
   int nb = theObject->GetNbFunctions();
   Handle(TDataStd_TreeNode) aNode;
-  for (int i = 1; i<=nb; i++) {
+  for (int i = 1; i <= nb; i++) {
     Handle(GEOM_Function) aFunction = theObject->GetFunction(i);
     if (aFunction->GetEntry().FindAttribute(GEOM_Function::GetFunctionTreeID(), aNode))
       aNode->Remove();
index 3a348fd5e429e71b694da1a1488b5a823e4bef56..0c048ffbec79233deed0f6e1fbd22a47d0f56087 100644 (file)
@@ -18,7 +18,6 @@
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
 
 #include <Standard_Stream.hxx>
 
@@ -43,6 +42,7 @@
 #include <TDataStd_UAttribute.hxx>
 #include <TDataStd_ChildNodeIterator.hxx>
 #include <TDataStd_ExtStringArray.hxx>
+#include <TDataStd_ExtStringList.hxx>
 #include <TDocStd_Owner.hxx>
 #include <TDocStd_Document.hxx>
 #include <TFunction_Function.hxx>
@@ -64,6 +64,7 @@
 #define RESULT_LABEL 2
 #define DESCRIPTION_LABEL 3
 #define HISTORY_LABEL 4
+#define SUBSHAPES_LABEL 5 // 0020756: GetGroups
 
 #define ARGUMENTS _label.FindChild((ARGUMENT_LABEL))
 #define ARGUMENT(thePosition) _label.FindChild((ARGUMENT_LABEL)).FindChild((thePosition))
@@ -471,8 +472,8 @@ TCollection_AsciiString GEOM_Function::GetString(int thePosition)
 void GEOM_Function::SetReference(int thePosition, Handle(GEOM_Function) theReference)
 {
   _isDone = false;
-  if(thePosition <= 0) return;
-  if(theReference.IsNull()) return;
+  if (thePosition <= 0) return;
+  if (theReference.IsNull()) return;
   TDF_Label anArgLabel = ARGUMENT(thePosition);
   TDF_Reference::Set(anArgLabel, theReference->GetEntry());
   TDataStd_UAttribute::Set(anArgLabel, GetDependencyID());
@@ -670,6 +671,85 @@ void GEOM_Function::GetDependency(TDF_LabelSequence& theSeq)
   }
 }
 
+//=============================================================================
+/*!
+ *  AddSubShapeReference
+ */
+//=============================================================================
+void GEOM_Function::AddSubShapeReference(Handle(GEOM_Function) theSubShape)
+{
+  _isDone = false;
+
+  TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL);
+
+  Handle(TDataStd_ExtStringList) aList;
+  if (!aSubShapesLabel.FindAttribute(TDataStd_ExtStringList::GetID(), aList)) {
+    aList = new TDataStd_ExtStringList;
+    aSubShapesLabel.AddAttribute(aList);
+  }
+
+  TCollection_AsciiString anEntry;
+  TDF_Tool::Entry(theSubShape->GetOwnerEntry(), anEntry);
+  aList->Append(anEntry);
+
+  _isDone = true;
+}
+
+//=============================================================================
+/*!
+ *  RemoveSubShapeReference
+ */
+//=============================================================================
+void GEOM_Function::RemoveSubShapeReference(Handle(GEOM_Function) theSubShape)
+{
+  _isDone = false;
+
+  TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL);
+
+  Handle(TDataStd_ExtStringList) aList;
+  if (aSubShapesLabel.FindAttribute(TDataStd_ExtStringList::GetID(), aList)) {
+    TCollection_AsciiString anEntry;
+    TDF_Tool::Entry(theSubShape->GetOwnerEntry(), anEntry);
+    aList->Remove(anEntry);
+  }
+
+  _isDone = true;
+}
+
+//=============================================================================
+/*!
+ *  HasSubShapeReferences
+ */
+//=============================================================================
+bool GEOM_Function::HasSubShapeReferences()
+{
+  _isDone = true;
+
+  TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL);
+  return aSubShapesLabel.IsAttribute(TDataStd_ExtStringList::GetID());
+}
+
+//=============================================================================
+/*!
+ *  GetSubShapeReferences
+ */
+//=============================================================================
+const TDataStd_ListOfExtendedString& GEOM_Function::GetSubShapeReferences()
+{
+  _isDone = false;
+
+  TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL);
+
+  Handle(TDataStd_ExtStringList) aList;
+  if (!aSubShapesLabel.FindAttribute(TDataStd_ExtStringList::GetID(), aList)) {
+    aList = new TDataStd_ExtStringList;
+    aSubShapesLabel.AddAttribute(aList);
+  }
+
+  _isDone = true;
+  return aList->List();
+}
+
 //=============================================================================
 /*!
  *  GetHistoryEntry
@@ -721,10 +801,9 @@ Standard_EXPORT Handle_Standard_Type& GEOM_Function_Type_()
 {
 
   static Handle_Standard_Type aType1 = STANDARD_TYPE(MMgt_TShared);
-  if ( aType1.IsNull()) aType1 = STANDARD_TYPE(MMgt_TShared);
+  if (aType1.IsNull()) aType1 = STANDARD_TYPE(MMgt_TShared);
   static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient);
-  if ( aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient);
-
+  if (aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient);
 
   static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
   static Handle_Standard_Type _aType = new Standard_Type("GEOM_Function",
@@ -751,5 +830,5 @@ const Handle(GEOM_Function) Handle(GEOM_Function)::DownCast(const Handle(Standar
      }
   }
 
-  return _anOtherObject ;
+  return _anOtherObject;
 }
index 4cd9fe3ff974c525aec31c18ebcecc626f7240ce..a7eed17b523d56e62d69e8256026deda876a645d 100644 (file)
@@ -18,7 +18,6 @@
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
 
 #ifndef _GEOM_Function_HeaderFile
 #define _GEOM_Function_HeaderFile
 #endif
 #ifndef _Handle_MMgt_TShared_HeaderFile
 #include <Handle_MMgt_TShared.hxx>
-#endif  
+#endif
 #ifndef _MMgt_TShared_HeaderFile
 #include <MMgt_TShared.hxx>
-#endif  
+#endif
 #ifndef _Standard_GUID_HeaderFile
 #include <Standard_GUID.hxx>
 #endif
@@ -65,31 +64,31 @@ class Handle(MMgt_TShared);
 class GEOM_Function;
 
 #include <TCollection_AsciiString.hxx>
-
+#include <TDataStd_ListOfExtendedString.hxx>
 
 Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOM_Function);
 
 class Handle(GEOM_Function) : public Handle(MMgt_TShared) {
   public:
-    inline void* operator new(size_t,void* anAddress) 
+    inline void* operator new(size_t,void* anAddress)
       {
         return anAddress;
       }
-    inline void* operator new(size_t size) 
-      { 
-        return Standard::Allocate(size); 
+    inline void* operator new(size_t size)
+      {
+        return Standard::Allocate(size);
       }
-    inline void  operator delete(void *anAddress) 
-      { 
-        if (anAddress) Standard::Free((Standard_Address&)anAddress); 
+    inline void  operator delete(void *anAddress)
+      {
+        if (anAddress) Standard::Free((Standard_Address&)anAddress);
       }
 
-    Handle(GEOM_Function)():Handle(MMgt_TShared)() {} 
-    Handle(GEOM_Function)(const Handle(GEOM_Function)& aHandle) : Handle(MMgt_TShared)(aHandle) 
+    Handle(GEOM_Function)():Handle(MMgt_TShared)() {}
+    Handle(GEOM_Function)(const Handle(GEOM_Function)& aHandle) : Handle(MMgt_TShared)(aHandle)
      {
      }
 
-    Handle(GEOM_Function)(const GEOM_Function* anItem) : Handle(MMgt_TShared)((MMgt_TShared *)anItem) 
+    Handle(GEOM_Function)(const GEOM_Function* anItem) : Handle(MMgt_TShared)((MMgt_TShared *)anItem)
      {
      }
 
@@ -105,18 +104,18 @@ class Handle(GEOM_Function) : public Handle(MMgt_TShared) {
       return *this;
      }
 
-    GEOM_Function* operator->() 
+    GEOM_Function* operator->()
      {
       return (GEOM_Function *)ControlAccess();
      }
 
-    GEOM_Function* operator->() const 
+    GEOM_Function* operator->() const
      {
       return (GEOM_Function *)ControlAccess();
      }
 
    Standard_EXPORT ~Handle(GEOM_Function)() {};
+
    Standard_EXPORT static const Handle(GEOM_Function) DownCast(const Handle(Standard_Transient)& AnObject);
 };
 
@@ -125,24 +124,26 @@ class GEOM_Function : public MMgt_TShared
 
 public:
 
-    inline void* operator new(size_t,void* anAddress) 
+    inline void* operator new(size_t,void* anAddress)
       {
         return anAddress;
       }
-    inline void* operator new(size_t size) 
-      { 
-        return Standard::Allocate(size); 
+    inline void* operator new(size_t size)
+      {
+        return Standard::Allocate(size);
       }
-    inline void  operator delete(void *anAddress) 
-      { 
-        if (anAddress) Standard::Free((Standard_Address&)anAddress); 
+    inline void  operator delete(void *anAddress)
+      {
+        if (anAddress) Standard::Free((Standard_Address&)anAddress);
       }
 
     // Type management
     //
     Standard_EXPORT friend Handle_Standard_Type& GEOM_Function_Type_();
-    Standard_EXPORT const Handle(Standard_Type)& DynamicType() const  { return STANDARD_TYPE(GEOM_Function) ; }
-    Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOM_Function) == AType || MMgt_TShared::IsKind(AType)); } 
+    Standard_EXPORT const Handle(Standard_Type)& DynamicType() const
+      { return STANDARD_TYPE(GEOM_Function) ; }
+    Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const
+      { return (STANDARD_TYPE(GEOM_Function) == AType || MMgt_TShared::IsKind(AType)); }
 
 
 private:
@@ -150,22 +151,22 @@ private:
 
 public:
 
-  //Returns a GUID for a function tree  
+  //Returns a GUID for a function tree
   Standard_EXPORT static const Standard_GUID& GetFunctionTreeID();
 
-  //Returns the ID which is associated with a reference to another function  
+  //Returns the ID which is associated with a reference to another function
   Standard_EXPORT static const Standard_GUID& GetDependencyID();
 
   //Finds and returns a function located on a label theEntry
   Standard_EXPORT static Handle(GEOM_Function) GetFunction(const TDF_Label& theEntry);
 
 
-  Standard_EXPORT GEOM_Function(const TDF_Label& theEntry, const Standard_GUID& theGUID, int theType); 
+  Standard_EXPORT GEOM_Function(const TDF_Label& theEntry, const Standard_GUID& theGUID, int theType);
   Standard_EXPORT ~GEOM_Function() {;}
 
   Standard_EXPORT TDF_Label GetOwnerEntry();
 
-  //Access to properties 
+  //Access to properties
 
   //Returns a result of the function built by the function Driver
   Standard_EXPORT TopoDS_Shape GetValue();
@@ -177,7 +178,7 @@ public:
   Standard_EXPORT TDF_Label& GetEntry() { return _label; }
 
   //Returns the type of the function
-  Standard_EXPORT int GetType();    
+  Standard_EXPORT int GetType();
 
   //Returns a function Driver GUID
   Standard_EXPORT Standard_GUID GetDriverGUID();
@@ -185,8 +186,8 @@ public:
   //Returns aPython description of the function
   Standard_EXPORT TCollection_AsciiString GetDescription();
 
-  //Sets aPython description of the function  
-  Standard_EXPORT void SetDescription(const TCollection_AsciiString& theDescription);  
+  //Sets aPython description of the function
+  Standard_EXPORT void SetDescription(const TCollection_AsciiString& theDescription);
 
   //Access to arguments
 
@@ -206,8 +207,8 @@ public:
   Standard_EXPORT void SetInteger(int thePosition, int theValue);
 
   //Returns an integer argument at position thePosition
-  Standard_EXPORT int GetInteger(int thePosition);  
-  
+  Standard_EXPORT int GetInteger(int thePosition);
+
   //Sets an integer array argument at position thePosition
   Standard_EXPORT void SetIntegerArray(int thePosition, const Handle(TColStd_HArray1OfInteger)& theArray);
 
@@ -221,18 +222,18 @@ public:
   Standard_EXPORT void SetString(int thePosition, const TCollection_AsciiString& theValue);
 
   //Returns a string argument at position thePosition
-  Standard_EXPORT TCollection_AsciiString GetString(int thePosition);  
-  
+  Standard_EXPORT TCollection_AsciiString GetString(int thePosition);
+
   //Returns a reference to other function argument at position thePosition
-  Standard_EXPORT Handle(GEOM_Function) GetReference(int thePosition); 
+  Standard_EXPORT Handle(GEOM_Function) GetReference(int thePosition);
 
   //Set an array of ExtendedString
   Standard_EXPORT void SetStringArray(int thePosition, const Handle(TColStd_HArray1OfExtendedString)& theArray);
-    
+
   //Returns the array of ExtendedString
   Standard_EXPORT Handle(TColStd_HArray1OfExtendedString) GetStringArray(int thePosition);
 
-  //Returns a GUID for a references tree  
+  //Returns a GUID for a references tree
   Standard_EXPORT static const Standard_GUID& GetReferencesTreeID();
 
   //Sets a list of references to other function arguments at position thePosition
@@ -240,31 +241,36 @@ public:
                          const Handle(TColStd_HSequenceOfTransient)& theRefList);
 
   //Returns a list of references to other function arguments at position thePosition
-  Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetReferenceList (int thePosition); 
+  Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetReferenceList (int thePosition);
 
   //Sets a TopoDS_Shape argument at position thePosition
   //void SetShape(int thePosition, const TopoDS_Shape& theShape);
-    
+
   //Returns a TopoDS_Shape argument at position thePosition
-  //TopoDS_Shape GetShape(int thePosition);  
-  
-  //Returns true if the last method succided 
+  //TopoDS_Shape GetShape(int thePosition);
+
+  //Returns true if the last method succided
   Standard_EXPORT bool IsDone() { return _isDone; }
 
   //Returns a sequence of the external dependencies of this function
   Standard_EXPORT void GetDependency(TDF_LabelSequence& theSeq);
 
+  // Add/Remove/Check/Get subshape references
+  Standard_EXPORT void AddSubShapeReference   (Handle(GEOM_Function) theSubShape);
+  Standard_EXPORT void RemoveSubShapeReference(Handle(GEOM_Function) theSubShape);
+  Standard_EXPORT bool HasSubShapeReferences();
+  Standard_EXPORT const TDataStd_ListOfExtendedString& GetSubShapeReferences();
+
   //Returns top label of this function's history tree
   Standard_EXPORT TDF_Label GetHistoryEntry (const Standard_Boolean create = Standard_True);
 
   //Returns history label, corresponding to the label,
   //on which a reference on argument is stored
   Standard_EXPORT TDF_Label GetArgumentHistoryEntry (const TDF_Label&       theArgumentRefEntry,
-                                     const Standard_Boolean create = Standard_True);
+                                                     const Standard_Boolean create = Standard_True);
 
 private:
 
-  
   TDF_Label    _label;
   bool _isDone;
 };
index 96e9809188d8b55e31fba3e3ee69ce5c1191bf4f..2f09aa141b17c4ae324efd0518dc70332fe0ad4e 100644 (file)
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+//  NOTE: This is an intreface to a function for the Shapes
+//  (Wire, Face, Shell, Solid and Compound) creation.
 
-// NOTE: This is an intreface to a function for the Shapes
-// (Wire, Face, Shell, Solid and Compound) creation.
-//
 #include "GEOM_Function.hxx"
 
 #include "TColStd_HSequenceOfTransient.hxx"
 #include "TColStd_HArray1OfInteger.hxx"
 
-#define SHAPE_ARG_MAIN_SHAPE     1 
-#define SHAPE_ARG_INDICES             2 
-#define SHAPE_ARG_SORTED             3
+#define SHAPE_ARG_MAIN_SHAPE  1
+#define SHAPE_ARG_INDICES     2
 
 class GEOM_ISubShape
 {
index 0d7ce44353e22eac4837cbe4bfa8ee6a0175524e..cf81ed23c84d85a8e4b2e4748f05b2f233549665 100644 (file)
@@ -18,7 +18,6 @@
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
 
 #include <Standard_Stream.hxx>
 
index 520b136807bec2e1174737c10d2d9b7c057d38bf..41dee6fa7a47a823904942d031b3979f65d75558 100644 (file)
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-
 // File      : GEOMImpl_IShapesOperations.cxx
 // Created   :
 // Author    : modified by Lioka RAZAFINDRAZAKA (CEA) 22/06/2007
 // Project   : SALOME
 // $Header$
-//
+
 #include <Standard_Stream.hxx>
 
 #include "GEOMImpl_IShapesOperations.hxx"
@@ -66,6 +65,7 @@
 #include <TFunction_Logbook.hxx>
 #include <TDataStd_Integer.hxx>
 #include <TDataStd_IntegerArray.hxx>
+#include <TDataStd_ListIteratorOfListOfExtendedString.hxx>
 #include <TDF_Tool.hxx>
 
 #include <BRepExtrema_ExtCF.hxx>
@@ -803,6 +803,70 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeGlueFacesByList
   return aGlued;
 }
 
+//=============================================================================
+/*!
+ *  GetExistingSubObjects
+ */
+//=============================================================================
+Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetExistingSubObjects
+                                          (Handle(GEOM_Object)    theShape,
+                                           const Standard_Boolean theGroupsOnly)
+{
+  SetErrorCode(KO);
+
+  if (theShape.IsNull()) return NULL;
+
+  Handle(GEOM_Function) aMainShape = theShape->GetLastFunction();
+  if (aMainShape.IsNull()) return NULL;
+
+  Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
+  SetErrorCode(NOT_FOUND_ANY);
+
+  if (!aMainShape->HasSubShapeReferences()) return aSeq;
+  const TDataStd_ListOfExtendedString& aListEntries = aMainShape->GetSubShapeReferences();
+  if (aListEntries.IsEmpty()) return aSeq;
+
+  SetErrorCode(KO);
+
+  TCollection_AsciiString anAsciiList;
+
+  TDataStd_ListIteratorOfListOfExtendedString anIt (aListEntries);
+  for (; anIt.More(); anIt.Next()) {
+    TCollection_ExtendedString anEntry = anIt.Value();
+    Standard_Integer aStrLen = anEntry.LengthOfCString();
+    char* anEntryStr = new char[aStrLen];
+    anEntry.ToUTF8CString(anEntryStr);
+    Handle(GEOM_Object) anObj = GetEngine()->GetObject(GetDocID(), anEntryStr, false);
+    if (!anObj.IsNull()) {
+      if (!theGroupsOnly || anObj->GetType() == GEOM_GROUP) {
+        aSeq->Append(anObj);
+
+        // for python command
+        anAsciiList += anEntryStr;
+        anAsciiList += ",";
+      }
+    }
+    delete [] anEntryStr;
+  }
+
+  if (aSeq->Length() == 0) {
+    SetErrorCode(NOT_FOUND_ANY);
+    return aSeq;
+  }
+
+  //Make a Python command
+  anAsciiList.Trunc(anAsciiList.Length() - 1);
+
+  GEOM::TPythonDump pd (aMainShape, /*append=*/true);
+  pd << "[" << anAsciiList.ToCString();
+  pd << "] = geompy.GetExistingSubObjects(";
+  pd << theShape << ", " << (int)theGroupsOnly << ")";
+
+  SetErrorCode(OK);
+
+  return aSeq;
+}
+
 //=============================================================================
 /*!
  *  MakeExplode
index ee9a83b02d4f65b791731d33a101f39d409313ec..c776217c9f273b976471838061a32abd1b6eaf48 100644 (file)
@@ -85,6 +85,10 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations
                                                            std::list<Handle(GEOM_Object)> theFaces,
                                                            const Standard_Boolean doKeepNonSolids);
 
+  Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetExistingSubObjects
+    (Handle(GEOM_Object)    theShape,
+     const Standard_Boolean theGroupsOnly);
+
   Standard_EXPORT Handle(TColStd_HSequenceOfTransient) MakeExplode (Handle(GEOM_Object)    theShape,
                                                                     const Standard_Integer theShapeType,
                                                                     const Standard_Boolean isSorted);
index 38238921eecf5ebbde97665215a16767ba4bdacf..f6ff7d0e20bd43022a918778409115e48f45d39b 100644 (file)
@@ -18,7 +18,6 @@
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
 
 #include <Standard_Stream.hxx>
 
@@ -411,6 +410,31 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeGlueFacesByList
   return GetObject(anObject);
 }
 
+//=============================================================================
+/*!
+ *  GetExistingSubObjects
+ */
+//=============================================================================
+GEOM::ListOfGO* GEOM_IShapesOperations_i::GetExistingSubObjects (GEOM::GEOM_Object_ptr theShape,
+                                                                 CORBA::Boolean        theGroupsOnly)
+{
+  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+
+  Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
+  if (aShape.IsNull()) return aSeq._retn();
+
+  Handle(TColStd_HSequenceOfTransient) aHSeq =
+    GetOperations()->GetExistingSubObjects(aShape, theGroupsOnly);
+  if (!GetOperations()->IsDone() || aHSeq.IsNull())
+    return aSeq._retn();
+
+  Standard_Integer aLength = aHSeq->Length();
+  aSeq->length(aLength);
+  for (Standard_Integer i = 1; i <= aLength; i++)
+    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
+
+  return aSeq._retn();
+}
 
 //=============================================================================
 /*!
index 5ae1ed2f040a448c05042ef0c574eee939a5d7ba..fdc3e4ba05855532334c33c5520292308d70f18d 100644 (file)
@@ -18,7 +18,6 @@
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
 
 #ifndef _GEOM_IShapesOperations_i_HeaderFile
 #define _GEOM_IShapesOperations_i_HeaderFile
@@ -39,21 +38,21 @@ class GEOM_I_EXPORT GEOM_IShapesOperations_i :
 {
  public:
   GEOM_IShapesOperations_i (PortableServer::POA_ptr       thePOA,
-                           GEOM::GEOM_Gen_ptr            theEngine,
-                           ::GEOMImpl_IShapesOperations* theImpl);
+                            GEOM::GEOM_Gen_ptr            theEngine,
+                            ::GEOMImpl_IShapesOperations* theImpl);
   ~GEOM_IShapesOperations_i();
 
   GEOM::GEOM_Object_ptr MakeEdge (GEOM::GEOM_Object_ptr thePnt1,
-                                 GEOM::GEOM_Object_ptr thePnt2);
+                                  GEOM::GEOM_Object_ptr thePnt2);
 
   GEOM::GEOM_Object_ptr MakeWire (const GEOM::ListOfGO& theEdgesAndWires,
                                   const CORBA::Double   theTolerance);
 
   GEOM::GEOM_Object_ptr MakeFace (GEOM::GEOM_Object_ptr theWire,
-                                 CORBA::Boolean  isPlanarWanted);
+                                  CORBA::Boolean  isPlanarWanted);
 
   GEOM::GEOM_Object_ptr MakeFaceWires (const GEOM::ListOfGO& theWires,
-                                      CORBA::Boolean  isPlanarWanted);
+                                       CORBA::Boolean  isPlanarWanted);
 
   GEOM::GEOM_Object_ptr MakeShell (const GEOM::ListOfGO& theFacesAndShells);
 
@@ -64,34 +63,36 @@ class GEOM_I_EXPORT GEOM_IShapesOperations_i :
   GEOM::GEOM_Object_ptr MakeCompound (const GEOM::ListOfGO& theShapes);
 
   GEOM::GEOM_Object_ptr MakeGlueFaces (GEOM::GEOM_Object_ptr theShape,
-                                      CORBA::Double         theTolerance,
+                                       CORBA::Double         theTolerance,
                                        CORBA::Boolean        doKeepNonSolids);
 
   GEOM::ListOfGO* GetGlueFaces (GEOM::GEOM_Object_ptr theShape,
-                               CORBA::Double         theTolerance);
+                                CORBA::Double         theTolerance);
 
   GEOM::GEOM_Object_ptr MakeGlueFacesByList (GEOM::GEOM_Object_ptr theShape,
-                                            CORBA::Double         theTolerance,
-                                            const GEOM::ListOfGO& theFaces,
-                                                CORBA::Boolean  doKeepNonSolids);
+                                             CORBA::Double         theTolerance,
+                                             const GEOM::ListOfGO& theFaces,
+                                             CORBA::Boolean  doKeepNonSolids);
 
+  GEOM::ListOfGO* GetExistingSubObjects (GEOM::GEOM_Object_ptr theShape,
+                                         CORBA::Boolean        theGroupsOnly);
 
   GEOM::ListOfGO* MakeExplode (GEOM::GEOM_Object_ptr theShape,
-                              CORBA::Long           theShapeType,
-                              CORBA::Boolean  isSorted);
+                               CORBA::Long           theShapeType,
+                               CORBA::Boolean  isSorted);
 
   GEOM::ListOfLong* SubShapeAllIDs (GEOM::GEOM_Object_ptr theShape,
-                                   CORBA::Long           theShapeType,
-                                   CORBA::Boolean  isSorted);
+                                    CORBA::Long           theShapeType,
+                                    CORBA::Boolean  isSorted);
 
   GEOM::GEOM_Object_ptr GetSubShape (GEOM::GEOM_Object_ptr theMainShape,
-                                    CORBA::Long           theID);
+                                     CORBA::Long           theID);
 
   CORBA::Long GetSubShapeIndex (GEOM::GEOM_Object_ptr theMainShape,
-                               GEOM::GEOM_Object_ptr theSubShape);
+                                GEOM::GEOM_Object_ptr theSubShape);
 
   CORBA::Long GetTopologyIndex (GEOM::GEOM_Object_ptr theMainShape,
-                               GEOM::GEOM_Object_ptr theSubShape);
+                                GEOM::GEOM_Object_ptr theSubShape);
 
   char* GetShapeTypeString (GEOM::GEOM_Object_ptr theShape);
 
@@ -105,25 +106,25 @@ class GEOM_I_EXPORT GEOM_IShapesOperations_i :
   GEOM::ListOfLong* GetFreeFacesIDs (GEOM::GEOM_Object_ptr theShape);
 
   GEOM::ListOfGO* GetSharedShapes (GEOM::GEOM_Object_ptr theShape1,
-                                  GEOM::GEOM_Object_ptr theShape2,
-                                  CORBA::Long           theShapeType);
+                                   GEOM::GEOM_Object_ptr theShape2,
+                                   CORBA::Long           theShapeType);
 
   GEOM::ListOfGO* GetShapesOnPlane (GEOM::GEOM_Object_ptr theShape,
-                                   CORBA::Long           theShapeType,
-                                   GEOM::GEOM_Object_ptr theAx1,
-                                   GEOM::shape_state     theState);
+                                    CORBA::Long           theShapeType,
+                                    GEOM::GEOM_Object_ptr theAx1,
+                                    GEOM::shape_state     theState);
 
   GEOM::ListOfGO* GetShapesOnPlaneWithLocation(GEOM::GEOM_Object_ptr theShape,
-                                              CORBA::Long           theShapeType,
-                                              GEOM::GEOM_Object_ptr theAx1,
-                                              GEOM::GEOM_Object_ptr thePnt,
-                                              GEOM::shape_state     theState);
+                                               CORBA::Long           theShapeType,
+                                               GEOM::GEOM_Object_ptr theAx1,
+                                               GEOM::GEOM_Object_ptr thePnt,
+                                               GEOM::shape_state     theState);
 
   GEOM::ListOfGO* GetShapesOnCylinder (GEOM::GEOM_Object_ptr theShape,
-                                      CORBA::Long           theShapeType,
-                                      GEOM::GEOM_Object_ptr theAxis,
-                                      CORBA::Double         theRadius,
-                                      GEOM::shape_state     theState);
+                                       CORBA::Long           theShapeType,
+                                       GEOM::GEOM_Object_ptr theAxis,
+                                       CORBA::Double         theRadius,
+                                       GEOM::shape_state     theState);
 
   GEOM::ListOfGO* GetShapesOnCylinderWithLocation (GEOM::GEOM_Object_ptr theShape,
                                                    CORBA::Long           theShapeType,
@@ -133,10 +134,10 @@ class GEOM_I_EXPORT GEOM_IShapesOperations_i :
                                                    GEOM::shape_state     theState);
 
   GEOM::ListOfGO* GetShapesOnSphere (GEOM::GEOM_Object_ptr theShape,
-                                    CORBA::Long           theShapeType,
-                                    GEOM::GEOM_Object_ptr theCenter,
-                                    CORBA::Double         theRadius,
-                                    GEOM::shape_state     theState);
+                                     CORBA::Long           theShapeType,
+                                     GEOM::GEOM_Object_ptr theCenter,
+                                     CORBA::Double         theRadius,
+                                     GEOM::shape_state     theState);
 
   GEOM::ListOfGO* GetShapesOnQuadrangle (GEOM::GEOM_Object_ptr theShape,
                                          CORBA::Long           theShapeType,
@@ -147,21 +148,21 @@ class GEOM_I_EXPORT GEOM_IShapesOperations_i :
                                          GEOM::shape_state     theState);
 
   GEOM::ListOfLong* GetShapesOnPlaneIDs (GEOM::GEOM_Object_ptr theShape,
-                                        CORBA::Long           theShapeType,
-                                        GEOM::GEOM_Object_ptr theAx1,
-                                        GEOM::shape_state     theState);
+                                         CORBA::Long           theShapeType,
+                                         GEOM::GEOM_Object_ptr theAx1,
+                                         GEOM::shape_state     theState);
 
   GEOM::ListOfLong* GetShapesOnPlaneWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
-                                                    CORBA::Long           theShapeType,
-                                                    GEOM::GEOM_Object_ptr theAx1,
-                                                    GEOM::GEOM_Object_ptr thePnt,
-                                                    GEOM::shape_state     theState);
+                                                     CORBA::Long           theShapeType,
+                                                     GEOM::GEOM_Object_ptr theAx1,
+                                                     GEOM::GEOM_Object_ptr thePnt,
+                                                     GEOM::shape_state     theState);
 
   GEOM::ListOfLong* GetShapesOnCylinderIDs (GEOM::GEOM_Object_ptr theShape,
-                                           CORBA::Long           theShapeType,
-                                           GEOM::GEOM_Object_ptr theAxis,
-                                           CORBA::Double         theRadius,
-                                           GEOM::shape_state     theState);
+                                            CORBA::Long           theShapeType,
+                                            GEOM::GEOM_Object_ptr theAxis,
+                                            CORBA::Double         theRadius,
+                                            GEOM::shape_state     theState);
 
   GEOM::ListOfLong* GetShapesOnCylinderWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
                                                         CORBA::Long           theShapeType,
@@ -171,10 +172,10 @@ class GEOM_I_EXPORT GEOM_IShapesOperations_i :
                                                         GEOM::shape_state     theState);
 
   GEOM::ListOfLong* GetShapesOnSphereIDs (GEOM::GEOM_Object_ptr theShape,
-                                         CORBA::Long           theShapeType,
-                                         GEOM::GEOM_Object_ptr theCenter,
-                                         CORBA::Double         theRadius,
-                                         GEOM::shape_state     theState);
+                                          CORBA::Long           theShapeType,
+                                          GEOM::GEOM_Object_ptr theCenter,
+                                          CORBA::Double         theRadius,
+                                          GEOM::shape_state     theState);
 
   GEOM::ListOfLong* GetShapesOnQuadrangleIDs (GEOM::GEOM_Object_ptr theShape,
                                               CORBA::Long           theShapeType,
@@ -185,39 +186,39 @@ class GEOM_I_EXPORT GEOM_IShapesOperations_i :
                                               GEOM::shape_state     theState);
 
   GEOM::ListOfGO* GetShapesOnBox (GEOM::GEOM_Object_ptr theBox,
-                                 GEOM::GEOM_Object_ptr theShape,
-                                 CORBA::Long           theShapeType,
-                                 GEOM::shape_state     theState);
+                                  GEOM::GEOM_Object_ptr theShape,
+                                  CORBA::Long           theShapeType,
+                                  GEOM::shape_state     theState);
 
   GEOM::ListOfLong* GetShapesOnBoxIDs (GEOM::GEOM_Object_ptr theBox,
-                                      GEOM::GEOM_Object_ptr theShape,
-                                      CORBA::Long           theShapeType,
-                                      GEOM::shape_state     theState);
+                                       GEOM::GEOM_Object_ptr theShape,
+                                       CORBA::Long           theShapeType,
+                                       GEOM::shape_state     theState);
 
   GEOM::ListOfGO* GetShapesOnShape (GEOM::GEOM_Object_ptr theSheckShape,
-                                   GEOM::GEOM_Object_ptr theShape,
-                                   CORBA::Short          theShapeType,
-                                   GEOM::shape_state     theState);
+                                    GEOM::GEOM_Object_ptr theShape,
+                                    CORBA::Short          theShapeType,
+                                    GEOM::shape_state     theState);
 
   GEOM::GEOM_Object_ptr GetShapesOnShapeAsCompound
                                    (GEOM::GEOM_Object_ptr theSheckShape,
-                                   GEOM::GEOM_Object_ptr theShape,
-                                   CORBA::Short          theShapeType,
-                                   GEOM::shape_state     theState);
+                                    GEOM::GEOM_Object_ptr theShape,
+                                    CORBA::Short          theShapeType,
+                                    GEOM::shape_state     theState);
 
   GEOM::ListOfLong* GetShapesOnShapeIDs (GEOM::GEOM_Object_ptr theCheckShape,
-                                        GEOM::GEOM_Object_ptr theShape,
-                                        CORBA::Short          theShapeType,
-                                        GEOM::shape_state     theState);
+                                         GEOM::GEOM_Object_ptr theShape,
+                                         CORBA::Short          theShapeType,
+                                         GEOM::shape_state     theState);
 
   GEOM::GEOM_Object_ptr GetInPlace (GEOM::GEOM_Object_ptr theShapeWhere,
-                                   GEOM::GEOM_Object_ptr theShapeWhat);
+                                    GEOM::GEOM_Object_ptr theShapeWhat);
 
   GEOM::GEOM_Object_ptr GetInPlaceByHistory (GEOM::GEOM_Object_ptr theShapeWhere,
-                                            GEOM::GEOM_Object_ptr theShapeWhat);
+                                             GEOM::GEOM_Object_ptr theShapeWhat);
 
   GEOM::GEOM_Object_ptr GetSame (GEOM::GEOM_Object_ptr theShapeWhere,
-                                GEOM::GEOM_Object_ptr theShapeWhat);
+                                 GEOM::GEOM_Object_ptr theShapeWhat);
 
   ::GEOMImpl_IShapesOperations* GetOperations()
   { return (::GEOMImpl_IShapesOperations*)GetImpl(); }
index 9098f1207239aae3f56002c5b340cf43e4e1c19a..e11291430b326a9d8187c42e8c4a92d8661ca9ed 100644 (file)
@@ -437,6 +437,14 @@ def TestAll (geompy, math):
   nameS      = geompy.SubShapeName(SubFaceS, Box)
   id_SubFace = geompy.addToStudyInFather(Box, SubFaceS, nameS)
 
+  # GetExistingSubObjects
+  SubObjsAll = geompy.GetExistingSubObjects(Box, True)
+  print "For now, Box has the following created sub-objects:", SubObjsAll
+
+  # GetGroups
+  SubGrpsAll = geompy.GetGroups(Box)
+  print "For now, Box has the following created groups:", SubGrpsAll
+
   # SubShapeAll
   SubEdgeList = geompy.SubShapeAll(SubFace, geompy.ShapeType["EDGE"])
   i=0
index 0f570563f7b0d62df73223995b8cd0682beffa88..fd60e8a67e44cdcb95d66f0495ac1c25daf278f1 100644 (file)
@@ -2052,6 +2052,32 @@ class geompyDC(GEOM._objref_GEOM_Gen):
         ## @addtogroup l4_decompose
         ## @{
 
+        ## Get all sub-shapes and groups of \a theShape,
+        #  that were created already by any other methods.
+        #  @param theShape Any shape.
+        #  @param theGroupsOnly If this parameter is TRUE, only groups will be
+        #                       returned, else all found sub-shapes and groups.
+        #  @return List of existing sub-objects of \a theShape.
+        #
+        #  @ref swig_all_decompose "Example"
+        def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
+            # Example: see GEOM_TestAll.py
+            ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
+            RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
+            return ListObj
+
+        ## Get all groups of \a theShape,
+        #  that were created already by any other methods.
+        #  @param theShape Any shape.
+        #  @return List of existing groups of \a theShape.
+        #
+        #  @ref swig_all_decompose "Example"
+        def GetGroups(self, theShape):
+            # Example: see GEOM_TestAll.py
+            ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
+            RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
+            return ListObj
+
         ## Explode a shape on subshapes of a given type.
         #  @param aShape Shape to be exploded.
         #  @param aType Type of sub-shapes to be retrieved.
index 2c4eb04a9aec9ba2ed2b96cb6a38550cca7fe1b0..5e57079adcb35f42d5cd16555bd7a392f8b48b64 100644 (file)
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+//  File:        IGESImport.cxx
+//  Created:     Wed May 19 14:36:35 2004
+//  Author:      Pavel TELKOV
+//               <ptv@mutex.nnov.opencascade.com>
 
-// File:        IGESImport.cxx
-// Created:     Wed May 19 14:36:35 2004
-// Author:      Pavel TELKOV
-//              <ptv@mutex.nnov.opencascade.com>
-//
 #include "utilities.h"
 
 #include <Basics_Utils.hxx>