Salome HOME
Join modifications from branch BR_DEBUG_3_2_0b1
[modules/geom.git] / idl / GEOM_Gen.idl
index 35bcfaa4c703bf5ebbe69b830abaf8c89954a036..d5d18f0fa41cc29c0593d5774605095ba57eae80 100644 (file)
@@ -1,3 +1,22 @@
+// Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either 
+// version 2.1 of the License.
+// 
+// This library is distributed in the hope that it will be useful 
+// but WITHOUT ANY WARRANTY; without even the implied warranty of 
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public  
+// License along with this library; if not, write to the Free Software 
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 //  File   : GEOM_Gen.idl
 //  Author : Sergey RUIN
 
@@ -245,6 +264,18 @@ module GEOM
     GEOM_Object MakePointOnCurve (in GEOM_Object theRefCurve,
                                  in double theParameter);
 
+    
+     /*!
+     *  Create a vector, corresponding to tangent to the given parameter on the given curve.
+     *  \param theRefCurve The referenced curve.
+     *  \param theParameter Value of parameter on the referenced curve.This value should be have value
+     *  \between 0. and 1.. Value of 0. corresponds first parameter of curve value 1. corresponds
+     *  \last parameter of curve. 
+     *  \return New GEOM_Object, containing the created point.
+     */
+     GEOM_Object MakeTangentOnCurve (in GEOM_Object theRefCurve,
+                                    in double theParameter);
+
     /*!
      *  Create a vector with the given components.
      *  \param theDX X component of the vector.
@@ -325,6 +356,20 @@ module GEOM
     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);
+     
+    /*!
+     *  Create a tangent plane to specified face in the point with specified parameters.
+     *  Values of parameters should be between 0. and 1.0
+     *  \param theFace - face for which tangent plane shuold be built. 
+     *  \param theParameterU - value of parameter by U
+     *  \param theParameterV - value of parameter Vthe
+     *  \param theTrimSize - defines sizes of created face
+     *  \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);
   };
 
   interface GEOM_ITransformOperations : GEOM_IOperations
@@ -762,6 +807,41 @@ module GEOM
                             in long theMinDeg, in long theMaxDeg,
                             in double theTol2D, in double theTol3D,
                             in long theNbIter);
+
+    /*!
+     *  Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
+     *  \param theSeqSections - set of specified sections.
+     *  \param theModeSolid - mode defining building solid or shell
+     *  \param thePreci - precision 3D used for smoothing by default 1.e-6
+     *  \param theRuled - mode defining type of the result surfaces (ruled or smoothed).
+     *  \return New GEOM_Object, containing the created shell or solid.
+     */
+    GEOM_Object MakeThruSections(in ListOfGO theSeqSections,
+                                in boolean theModeSolid,
+                                in double thePreci,
+                                 in boolean theRuled);
+
+      /*!
+     *  Create a shape by extrusion of the profile shape along
+     *  the path shape. The path shape can be a wire or an edge.
+     *  the several profiles can be specified in the several locations of path.        
+     *  \param theSeqBases - list of  Bases shape to be extruded.
+     *  \param theLocations - list of locations on the path corresponding
+     *                        specified list of the Bases shapes. Number of locations
+     *                        should be equal to number of bases or list of locations can be empty.
+     *  \param thePath - Path shape to extrude the base shape along it.
+     *  \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
+     *  \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 );
+    
   };
 
   /*!
@@ -874,6 +954,35 @@ module GEOM
     GEOM_Object GetSubShape (in GEOM_Object theMainShape,
                             in long        theID);
 
+    /*!
+     *  Get global index of \a theSubShape in \a theMainShape.
+     *  \param theMainShape Main shape.
+     *  \param theSubShape Sub-shape of the main shape.
+     *  \return global index of \a theSubShape in \a theMainShape.
+     */
+    long GetSubShapeIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
+
+    /*!
+     *  Get index of \a theSubShape in \a theMainShape, unique among sub-shapes of the same type.
+     *  Together with method <VAR>GetShapeTypeString()</VAR> it can be used
+     *  to generate automatic names for sub-shapes, when publishing them in a study.
+     *  \param theMainShape Main shape.
+     *  \param theSubShape Sub-shape of the main shape.
+     *  \return index of \a theSubShape in a list of all sub-shapes of \a theMainShape of the same type.
+     */
+    long GetTopologyIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
+
+    /*!
+     *  \brief Get name of type of \a theShape.
+     *
+     *  Use wide type notation, taking into consideration both topology and geometry of the shape.
+     *  Together with method <VAR>GetTopologyIndex()</VAR> it can be used
+     *  to generate automatic names for sub-shapes, when publishing them in a study.
+     *  \param theShape The shape to get a type of.
+     *  \return String, containing a type name of \a theShape.
+     */
+    string GetShapeTypeString (in GEOM_Object theShape);
+
     /*!
      *  Count number of faces in the given shape.
      *  \param theShape Shape to count faces in.
@@ -962,6 +1071,94 @@ module GEOM
                                in double      theRadius,
                                in shape_state theState);
 
+    /*!
+     *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
+     *  the specified quadrangle by the certain way, defined through \a theState parameter.
+     *  \param theShape Shape to find sub-shapes of.
+     *  \param theShapeType Type of sub-shapes to be retrieved.
+     *  \param theTopLeftPoint Top left quadrangle corner
+     *  \param theTopRigthPoint Top right quadrangle corner
+     *  \param theBottomLeftPoint Bottom left quadrangle corner
+     *  \param theBottomRigthPoint Bottom right quadrangle corner
+     *  \param theState The state of the subshapes to find.
+     *  \return List of all found sub-shapes.
+     */
+    ListOfGO GetShapesOnQuadrangle (in GEOM_Object theShape,
+                                    in long        theShapeType,
+                                    in GEOM_Object theTopLeftPoint,
+                                    in GEOM_Object theTopRigthPoint,
+                                    in GEOM_Object theBottomLeftPoint,
+                                    in GEOM_Object theBottomRigthPoint,
+                                    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.
+     *  \param theShape Shape to find sub-shapes of.
+     *  \param theShapeType Type of sub-shapes to be retrieved.
+     *  \param theAx1 Vector (or line, or linear edge), specifying normal
+     *                direction and location of the plane to find shapes on.
+     *  \param theState The state of the subshapes to find.
+     *  \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);
+
+    /*!
+     *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
+     *  the specified cylinder by the certain way, defined through \a theState parameter.
+     *  \param theShape Shape to find sub-shapes of.
+     *  \param theShapeType Type of sub-shapes to be retrieved.
+     *  \param theAxis Vector (or line, or linear edge), specifying
+     *                 axis of the cylinder to find shapes on.
+     *  \param theRadius Radius of the cylinder to find shapes on.
+     *  \param theState The state of the subshapes to find.
+     *  \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);
+
+    /*!
+     *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
+     *  the specified sphere by the certain way, defined through \a theState parameter.
+     *  \param theShape Shape to find sub-shapes of.
+     *  \param theShapeType Type of sub-shapes to be retrieved.
+     *  \param theCenter Point, specifying center of the sphere to find shapes on.
+     *  \param theRadius Radius of the sphere to find shapes on.
+     *  \param theState The state of the subshapes to find.
+     *  \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);
+
+    /*!
+     *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
+     *  the specified quadrangle by the certain way, defined through \a theState parameter.
+     *  \param theShape Shape to find sub-shapes of.
+     *  \param theShapeType Type of sub-shapes to be retrieved.
+     *  \param theTopLeftPoint Top left quadrangle corner
+     *  \param theTopRigthPoint Top right quadrangle corner
+     *  \param theBottomLeftPoint Bottom left quadrangle corner
+     *  \param theBottomRigthPoint Bottom right quadrangle corner
+     *  \param theState The state of the subshapes to find.
+     *  \return List of IDs of all found sub-shapes.
+     */
+    ListOfLong GetShapesOnQuadrangleIDs (in GEOM_Object theShape,
+                                         in long        theShapeType,
+                                         in GEOM_Object theTopLeftPoint,
+                                         in GEOM_Object theTopRigthPoint,
+                                         in GEOM_Object theBottomLeftPoint,
+                                         in GEOM_Object theBottomRigthPoint,
+                                         in shape_state theState);
+
     /*!
      *  Get sub-shape(s) of theShapeWhere, which are
      *  coincident with \a theShapeWhat or could be a part of it.
@@ -1271,7 +1468,7 @@ module GEOM
      *  \param theDirFace2 Second direction face global index.
      *  \param theNbTimes Quantity of transformations to be done.
      *    \note Global index of sub-shape can be obtained, using method
-     *          <VAR>GEOM_ILocalOperations.GetSubShapeIndex()</VAR>.
+     *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
      *  \return New GEOM_Object, containing the result shape.
      */
     GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock,
@@ -1463,6 +1660,17 @@ module GEOM
      *  \return New GEOM_Object, containing the created wire.
      */
     GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane);
+
+      /*!
+     *  Create a sketcher (wire or face), following the textual description,
+     *  passed through \a theCommand argument. \n
+     *  For format of the description string see the previous method.\n
+     *  \param theCommand String, defining the sketcher in local
+     *                    coordinates of the working plane.
+     *  \param theWorkingPlane Planar Face of the working plane.
+     *  \return New GEOM_Object, containing the created wire.
+     */
+    GEOM_Object MakeSketcherOnPlane (in string theCommand, in GEOM_Object theWorkingPlane);
   };
 
   /*!
@@ -1484,7 +1692,8 @@ module GEOM
      *  \param theShape Shape, to perform fillet on.
      *  \param theR Fillet radius.
      *  \param theEdges Global indices of edges to perform fillet on.
-     *    \note Global index of sub-shape can be obtained, using method <VAR>GetSubShapeIndex()</VAR>.
+     *    \note Global index of sub-shape can be obtained, using method
+     *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
      *  \return New GEOM_Object, containing the result shape.
      */
     GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
@@ -1496,7 +1705,8 @@ module GEOM
      *  \param theShape Shape, to perform fillet on.
      *  \param theR Fillet radius.
      *  \param theFaces Global indices of faces to perform fillet on.
-     *    \note Global index of sub-shape can be obtained, using method <VAR>GetSubShapeIndex()</VAR>.
+     *    \note Global index of sub-shape can be obtained, using method
+     *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
      *  \return New GEOM_Object, containing the result shape.
      */
     GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
@@ -1519,7 +1729,8 @@ module GEOM
      *  \param theD1 Chamfer size along \a theFace1.
      *  \param theD2 Chamfer size along \a theFace2.
      *  \param theFace1,theFace2 Global indices of two faces of \a theShape.
-     *    \note Global index of sub-shape can be obtained, using method <VAR>GetSubShapeIndex()</VAR>.
+     *    \note Global index of sub-shape can be obtained, using method
+     *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
      *  \return New GEOM_Object, containing the result shape.
      */
     GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
@@ -1535,7 +1746,8 @@ module GEOM
      *               will be get along face, which is nearer to \a theFaces beginning.
      *  \param theD2 Chamfer size along another of two faces, connected to the edge.
      *  \param theFaces Sequence of global indices of faces of \a theShape.
-     *    \note Global index of sub-shape can be obtained, using method <VAR>GetSubShapeIndex()</VAR>.
+     *    \note Global index of sub-shape can be obtained, using method
+     *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
      *  \return New GEOM_Object, containing the result shape.
      */
     GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
@@ -1558,10 +1770,8 @@ module GEOM
                               in double theMeshDeflection);
 
     /*!
-     *  Get global index of \a theSubShape in \a theShape.
-     *  \param theShape Main shape.
-     *  \param theSubShape Sub-shape of the main shape.
-     *  \return global index of \a theSubShape in \a theShape.
+     *  Duplicates <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
+     *  Present here only for compatibility.
      */
     long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape);
   };
@@ -1599,6 +1809,18 @@ module GEOM
     void GetShapeProcessParameters (out string_array theOperators,
                                    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
+     *  read from the file pointed by CSF_ShHealingDefaults environmental variable.
+     *  \param theOperator Input. The operator's name.
+     *  \param theParameters Output. Default list of names of parameters.
+     *  \param theValues Output. List of default values of parameters, in the same order
+     *                           as parameters are listed in \a theParameters list.
+     */
+    void GetOperatorParameters (in string theOperator,
+                               out string_array theParameters,
+                               out string_array theValues);
 
     /*!
      *  Remove faces from the given object (shape).
@@ -1842,18 +2064,46 @@ module GEOM
      *  Adds a sub object with ID theSubShapeId to the group
      *  \param theGroup is a GEOM group to which the new sub shape is added
      *  \param theSubShapeId is a sub shape ID in the main object.
-     *  \note Use method <VAR>ILocalOperations.GetSubShapeIndex()</VAR> to get an ID by the sub shape
+     *  \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub shape
      */
     void AddObject (in GEOM_Object theGroup, in long theSubShapeId);
 
     /*!
      *  Removes a sub object with ID \a theSubShapeId from the group
-     *  \param theGroup is a GEOM group from which the new sub shape is removed
+     *  \param theGroup is a GEOM group from which the sub shape is removed.
      *  \param theSubShapeId is a sub shape ID in the main object.
-     *  \note Use method <VAR>ILocalOperations.GetSubShapeIndex()</VAR> to get an ID by the sub shape
+     *  \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub shape
      */
     void RemoveObject (in GEOM_Object theGroup, in long theSubShapeId);
 
+    /*!
+     *  Adds to the group all the given shapes. No errors, if some shapes are alredy included.
+     *  \param theGroup is a GEOM group to which the new sub shapes are added.
+     *  \param theSubShapes is a list of sub shapes to be added.
+     */
+    void UnionList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
+
+    /*!
+     *  Removes from the group all the given shapes. No errors, if some shapes are not included.
+     *  \param theGroup is a GEOM group from which the sub-shapes are removed.
+     *  \param theSubShapes is a list of sub-shapes to be removed.
+     */
+    void DifferenceList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
+
+    /*!
+     *  Adds to the group all the given shapes. No errors, if some shapes are alredy included.
+     *  \param theGroup is a GEOM group to which the new sub shapes are added.
+     *  \param theSubShapes is a list of IDs of sub shapes to be added.
+     */
+    void UnionIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
+
+    /*!
+     *  Removes from the group all the given shapes. No errors, if some shapes are not included.
+     *  \param theGroup is a GEOM group from which the sub-shapes are removed.
+     *  \param theSubShapes is a list of IDs of sub-shapes to be removed.
+     */
+    void DifferenceIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
+
     /*!
      *  Returns a type of sub objects stored in the group
      *  \param theGroup is a GEOM group which type is returned.
@@ -1958,6 +2208,18 @@ module GEOM
      *  \param theObject is a GEOM object which IOR is requested
      */
     string GetStringFromIOR (in GEOM_Object theObject);
+
+    /*!
+     *  Returns a name with which a GEOM object was dumped into python script
+     *  \param theStudyEntry is an entry of the GEOM object in the study
+     */
+    string GetDumpName (in string theStudyEntry);
+
+    /*!
+     *  Returns all names with which a GEOM objects was dumped
+     *  into python script to avoid the same names in SMESH script
+     */
+    string_array GetAllDumpNames();
   };
 };