Salome HOME
Mantis issues 0020939(GetSharedShapes) and 0020842(AllSorted meaning).
[modules/geom.git] / idl / GEOM_Gen.idl
index 0763fb49355c05b86db6aa5bd0b4b6ceba217bfe..304b16a861880d0a674f075b0d20cb0c1464ade6 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
 //  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__
 
@@ -114,6 +115,22 @@ module GEOM
     FSM_GetInPlaceByHistory
   };
 
+  /*!
+   *  Kind of method to perform filling operation
+   *  Is used in functions GEOM_Gen.MakeFilling<xxx>()
+   */
+  enum filling_oper_method
+  {
+    /*! Default (standard behaviour) */
+    FOM_Default,
+
+    /*! Use edges orientation */
+    FOM_UseOri,
+
+    /*! Auto-correct edges orientation */
+    FOM_AutoCorrect
+  };
+
 
   typedef sequence<string>      string_array;
   typedef sequence<short>       short_array;
@@ -539,6 +556,22 @@ module GEOM
                            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.
+     *  \param theShape The initial shape to detect the coordinate system.
+     *  \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.
+     *  \param theXVec Vector of X direction.
+     *  \param theYVec Vector of Y direction.
+     *  \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
@@ -1164,12 +1197,15 @@ module GEOM
      *  \param theTol2D a 2d tolerance to be reached
      *  \param theTol3D a 3d tolerance to be reached
      *  \param theNbIter a number of iteration of approximation algorithm
+     *  \param theMethod Kind of method to perform filling operation.
      *  \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 boolean theApprox);
+                            in long theNbIter,
+                             in filling_oper_method theMethod,
+                             in boolean theApprox);
 
     /*!
      *  Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
@@ -1354,6 +1390,13 @@ module GEOM
     GEOM_Object MakeGlueFacesByList (in GEOM_Object theShape, in double theTolerance,
                                     in ListOfGO theFaces, in boolean doKeepNonSolids);
 
+    /*!
+     *  Deprecated method. Use MakeAllSubShapes() instead.
+     */
+    ListOfGO MakeExplode (in GEOM_Object theShape,
+                         in long        theShapeType,
+                         in boolean     isSorted);
+
     /*!
      *  Explode a shape on subshapes of a given type.
      *  \param theShape Shape to be exploded.
@@ -1362,23 +1405,30 @@ module GEOM
      *                  sorted by coordinates of their gravity centers.
      *  \return List of sub-shapes of type theShapeType, contained in theShape.
      */
-    ListOfGO MakeExplode (in GEOM_Object theShape,
-                         in long        theShapeType,
-                         in boolean     isSorted);
+    ListOfGO MakeAllSubShapes (in GEOM_Object theShape,
+                               in long        theShapeType,
+                               in boolean     isSorted);
+
+    /*!
+     *  Deprecated method. Use GetAllSubShapesIDs() instead.
+     */
+    ListOfLong SubShapeAllIDs (in GEOM_Object theShape,
+                              in long        theShapeType,
+                              in boolean     isSorted);
 
     /*!
      *  Explode a shape on subshapes of a given type.
-     *  Does the same, as the above method, but returns IDs of sub-shapes,
-     *  not GEOM_Objects. It works faster.
+     *  Does the same, as MakeAllSubShapes, but returns IDs of
+     *  sub-shapes, not GEOM_Objects. It works faster.
      *  \param theShape Shape to be exploded.
      *  \param theShapeType Type of sub-shapes to be retrieved.
      *  \param isSorted If this parameter is TRUE, sub-shapes will be
      *                  sorted by coordinates of their gravity centers.
      *  \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);
+    ListOfLong GetAllSubShapesIDs (in GEOM_Object theShape,
+                                   in long        theShapeType,
+                                   in boolean     isSorted);
 
     /*!
      *  Get a sub shape defined by its unique ID inside \a theMainShape
@@ -1466,6 +1516,15 @@ module GEOM
                              in GEOM_Object theShape2,
                              in long        theShapeType);
 
+    /*!
+     *  Get all sub-shapes, shared by all shapes in the list \a theShapes.
+     *  \param theShapes Shapes to find common sub-shapes of.
+     *  \param theShapeType Type of sub-shapes to be retrieved.
+     *  \return List of objects, that are sub-shapes of all given shapes.
+     */
+    ListOfGO GetSharedShapesMulti (in ListOfGO theShapes,
+                                   in long     theShapeType);
+
     /*!
      *  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.
@@ -1703,7 +1762,7 @@ module GEOM
 
     /*!
      * \brief Find subshapes complying with given status
-     * \param theCheckShape - the shape to check state of subshapes against
+     * \param theCheckShape - the shape to check state of subshapes against. It must be a solid.
      * \param theShape - the shape to explore
      * \param theShapeType - type of subshape of theShape
      * \param theState - required state
@@ -1716,7 +1775,7 @@ module GEOM
 
     /*!
      * \brief Find subshapes complying with given status
-     * \param theCheckShape - the shape to check state of subshapes against
+     * \param theCheckShape - the shape to check state of subshapes against. It must be a solid.
      * \param theShape - the shape to explore
      * \param theShapeType - type of subshape of theShape
      * \param theState - required state
@@ -1729,7 +1788,7 @@ module GEOM
 
     /*!
      * \brief Find subshapes complying with given status
-     * \param theCheckShape - the shape to check state of subshapes against
+     * \param theCheckShape - the shape to check state of subshapes against. It must be a solid.
      * \param theShape - the shape to explore
      * \param theShapeType - type of subshape of theShape
      * \param theState - required state
@@ -2144,10 +2203,10 @@ module GEOM
      *  \note  Each compound from ListShapes and ListTools will be exploded in order
      *         to avoid possible intersection between shapes from this compound.
      *  \param theLimit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
-     #  \param KeepNonlimitShapes: if this parameter == 0 - only shapes with
-     #                             type <= Limit are kept in the result,
-     #                             else - shapes with type > Limit are kept
-     #                             also (if they exist)
+     *  \param KeepNonlimitShapes: if this parameter == 0, then only shapes of
+     *                             target type (equal to Limit) are kept in the result,
+     *                             else standalone shapes of lower dimension
+     *                             are kept also (if they exist).
      *
      *  After implementation new version of PartitionAlgo (October 2006)
      *  other parameters are ignored by current functionality. They are kept
@@ -2806,7 +2865,9 @@ module GEOM
       SEGMENT,      // segment
       EDGE,         // other edge
       // VERTEX
-      VERTEX
+      VERTEX,
+      // ADVANCED shapes
+      ADVANCED      // all advanced shapes (temporary implementation)
     };
   };
 
@@ -2869,6 +2930,15 @@ 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
+     *  \param theIndex Index of vertex subshape
+     *  \return New GEOM_Object, vertex.
+     */
+    GEOM_Object GetVertexByIndex( in GEOM_Object theShape, in long index );
 
     /*!
      *  Get a vector, representing the normal of theFace.
@@ -3101,6 +3171,135 @@ module GEOM
   };
 
 
+  /*!
+   *  GEOM_IAdvancedOperations: Interface for advanced modeling functions.
+   */
+  interface GEOM_IAdvancedOperations : GEOM_IOperations
+  {
+    /*!
+     *  Create a T-shape object with specified caracteristics for the main and
+     *  the incident pipes (radius, width, half-length).
+     *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+     *  \param theR1 Internal radius of main pipe
+     *  \param theW1 Width of main pipe
+     *  \param theL1 Half-length of main pipe
+     *  \param theR2 Internal radius of incident pipe (R2 < R1)
+     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+     *  \param theL2 Half-length of incident pipe
+     *  \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);
+    /*!
+     *  Create a T-shape object with specified caracteristics for the main and
+     *  the incident pipes (radius, width, half-length).
+     *  The extremities of the main pipe are located on junctions points P1 and P2.
+     *  The extremity of the incident pipe is located on junction point P3.
+     *  \param theR1 Internal radius of main pipe
+     *  \param theW1 Width of main pipe
+     *  \param theL1 Half-length of main pipe
+     *  \param theR2 Internal radius of incident pipe (R2 < R1)
+     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+     *  \param theL2 Half-length of incident pipe
+     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+     *  \param theP1 1st junction point of main pipe
+     *  \param theP2 2nd junction point of main pipe
+     *  \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);
+    /*!
+     *  Create a T-shape object with specified caracteristics for the main and
+     *  the incident pipes (radius, width, half-length). A chamfer is created
+     *  on the junction of the pipes.
+     *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+     *  \param theR1 Internal radius of main pipe
+     *  \param theW1 Width of main pipe
+     *  \param theL1 Half-length of main pipe
+     *  \param theR2 Internal radius of incident pipe (R2 < R1)
+     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+     *  \param theL2 Half-length of incident pipe
+     *  \param theH Height of the chamfer.
+     *  \param theW Width of the chamfer.
+     *  \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 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);
+    /*!
+     *  Create a T-shape object with specified caracteristics for the main and
+     *  the incident pipes (radius, width, half-length). A chamfer is created
+     *  on the junction of the pipes.
+     *  The extremities of the main pipe are located on junctions points P1 and P2.
+     *  The extremity of the incident pipe is located on junction point P3.
+     *  \param theR1 Internal radius of main pipe
+     *  \param theW1 Width of main pipe
+     *  \param theL1 Half-length of main pipe
+     *  \param theR2 Internal radius of incident pipe (R2 < R1)
+     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+     *  \param theL2 Half-length of incident pipe
+     *  \param theH Height of the chamfer.
+     *  \param theW Width of the chamfer.
+     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+     *  \param theP1 1st junction point of main pipe
+     *  \param theP2 2nd junction point of main pipe
+     *  \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);
+    /*!
+     *  Create a T-shape object with specified caracteristics for the main and
+     *  the incident pipes (radius, width, half-length). A fillet is created
+     *  on the junction of the pipes.
+     *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+     *  \param theR1 Internal radius of main pipe
+     *  \param theW1 Width of main pipe
+     *  \param theL1 Half-length of main pipe
+     *  \param theR2 Internal radius of incident pipe (R2 < R1)
+     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+     *  \param theL2 Half-length of incident pipe
+     *  \param theRF Radius of curvature of fillet.
+     *  \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);
+    /*!
+     *  Create a T-shape object with specified caracteristics for the main and
+     *  the incident pipes (radius, width, half-length). A fillet is created
+     *  on the junction of the pipes.
+     *  The extremities of the main pipe are located on junctions points P1 and P2.
+     *  The extremity of the incident pipe is located on junction point P3.
+     *  \param theR1 Internal radius of main pipe
+     *  \param theW1 Width of main pipe
+     *  \param theL1 Half-length of main pipe
+     *  \param theR2 Internal radius of incident pipe (R2 < R1)
+     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+     *  \param theL2 Half-length of incident pipe
+     *  \param theRF Radius of curvature of fillet.
+     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+     *  \param theP1 1st junction point of main pipe
+     *  \param theP2 2nd junction point of main pipe
+     *  \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);
+    /*@@ 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.
@@ -3145,13 +3344,16 @@ module GEOM
      *                            operations, where only the first argument has to be considered.
      *                            If theObject has only one argument shape, this flag is automatically
      *                            considered as True, not regarding really passed value.
+     *  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
+     *                      and prefix "from_subshapes_of_" to names of partially restored subshapes.
      *  \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 boolean           theInheritFirstArg,
+                                in boolean           theAddPrefix);
 
     /*!
      *  Publish sub-shapes, standing for arguments and sub-shapes of arguments
@@ -3163,7 +3365,8 @@ module GEOM
                                 in SALOMEDS::SObject theSObject,
                                 in ListOfGO          theArgs,
                                 in find_shape_method theFindMethod,
-                                in boolean           theInheritFirstArg);
+                                in boolean           theInheritFirstArg,
+                                 in boolean           theAddPrefix);
 
     /*!
      *  Methods to access interfaces for objects creation and transformation
@@ -3180,6 +3383,7 @@ module GEOM
     GEOM_IMeasureOperations   GetIMeasureOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
     GEOM_IBlocksOperations    GetIBlocksOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
     GEOM_IGroupOperations     GetIGroupOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
+    GEOM_IAdvancedOperations  GetIAdvancedOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
 
     /*!
      *  Objects Management