Salome HOME
Changing version to 6.3.1
[modules/geom.git] / idl / GEOM_Gen.idl
index 4e8d98733f0a38b8c9e44c3ab46419234aa6ba28..febb9b324b3f4166c098ade03e9d40c4f44f8e13 100644 (file)
@@ -1,23 +1,23 @@
-//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2011  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
+// Copyright (C) 2003-2007  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 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.
+// 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
+// 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
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //  File   : GEOM_Gen.idl
 //  Author : Sergey RUIN
@@ -135,6 +135,21 @@ module GEOM
     FOM_AutoCorrect
   };
 
+  /*!
+   * Kind of the curves.
+   * Used in the function GEOM_Gen.MakeCurveParametric()
+   */
+  enum curve_type {
+    /*! Polyline curve */
+    Polyline,
+    
+    /*! Bezier curve */
+    Bezier,
+
+    /*! Interpolation, curve */
+    Interpolation
+  };
+
 
   typedef sequence<string>      string_array;
   typedef sequence<short>       short_array;
@@ -428,13 +443,15 @@ module GEOM
     /*!
      *  Create a point, corresponding to the given length on the given curve.
      *  \param theRefCurve The referenced curve.
-     *  \param theLength Length on the referenced curve.
-     *  \param theReverse Direction for the calculation of the length (false = forward or true = reversed).
+     *  \param theLength Length on the referenced curve. It can be negative.
+     *  \param theStartPoint Any vertex close to one of edge's
+     *                       ends to select start point among them.
+     *                       If NULL, fist vertex is used.
      *  \return New GEOM_Object, containing the created point.
      */
     GEOM_Object MakePointOnCurveByLength (in GEOM_Object theRefCurve,
-                                          in double theLength,
-                                          in boolean theReverse);
+                                          in double      theLength,
+                                          in GEOM_Object theStartPoint);
 
     /*!
      *  Create a point on the given curve, projecting given point
@@ -904,6 +921,14 @@ module GEOM
      */
     GEOM_Object OffsetShapeCopy (in GEOM_Object theObject, in double theOffset);
 
+    /*!
+     *  Create new object as projection of the given one on a 2D surface.
+     *  \param theSource The source object for the projection. It can be a point, edge or wire.
+     *  \param theTarget The target object. It can be planar or cylindrical face.
+     *  \return New GEOM_Object, containing the projection.
+     */
+    GEOM_Object ProjectShapeCopy (in GEOM_Object theSource, in GEOM_Object theTarget);
+
     /*!
      *  Scale the given object by the factor.
      *  \param theObject The object to be scaled.
@@ -1379,6 +1404,20 @@ module GEOM
      */
     GEOM_Object MakeEdge (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
 
+    /*!
+     *  Create an edge on another edge, corresponding to the given length on the given edge.
+     *  \param theRefCurve The referenced edge.
+     *  \param theLength Length on the referenced edge. It can be
+     *                   negative for extrapolation on base curve.
+     *  \param theStartPoint Any vertex close to one of edge's
+     *                       ends to select start point among them.
+     *                       If NULL, fist vertex is used.
+     *  \return New GEOM_Object, containing the created edge.
+     */
+    GEOM_Object MakeEdgeOnCurveByLength (in GEOM_Object theRefCurve,
+                                         in double      theLength,
+                                         in GEOM_Object theStartPoint);
+
     /*!
      *  Create an edge from specified wire.
      *  \param theWire source Wire.
@@ -1470,10 +1509,42 @@ module GEOM
      *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
      *  \param theFaces List of faces for gluing.
      *  \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
+     *  \param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
+     *                        will be glued, otherwise only the edges,
+     *                        belonging to <VAR>theFaces</VAR>.
      *  \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,
+                                     in boolean doGlueAllEdges);
+
+    /*!
+     *  Replace coincident edges in theShape by one edge.
+     *  \param theShape Initial shape.
+     *  \param theTolerance Maximum distance between edges, which can be considered as coincident.
+     *  \return New GEOM_Object, containing a copy of theShape without coincident edges.
+     */
+    GEOM_Object MakeGlueEdges (in GEOM_Object theShape, in double theTolerance);
+
+    /*!
+     *  Find coincident edges in theShape for possible gluing.
+     *  \param theShape Initial shape.
+     *  \param theTolerance Maximum distance between edges, which can be considered as coincident.
+     *  \return ListOfGO
+     */
+    ListOfGO GetGlueEdges (in GEOM_Object theShape, in double theTolerance);
+
+    /*!
+     *  Replace coincident edges in theShape by one edge
+     *  in compliance with given list of edges
+     *  \param theShape Initial shape.
+     *  \param theTolerance Maximum distance between edges, which can be considered as coincident.
+     *  \param theFaces List of edges for gluing.
+     *  \return New GEOM_Object, containing a copy of theShape without some edges.
+     */
+    GEOM_Object MakeGlueEdgesByList (in GEOM_Object theShape,
+                                     in double theTolerance,
+                                     in ListOfGO theEdges);
 
     /*!
      *  Get all sub-shapes and groups of \a theShape,
@@ -1542,12 +1613,26 @@ module GEOM
 
     /*!
      *  Get a sub shape defined by its unique ID inside \a theMainShape
+     *  \param theMainShape Main shape.
+     *  \param theID Unique ID of sub shape inside \a theMainShape.
+     *  \return GEOM_Object, corresponding to found sub shape.
      *  \note The sub shape GEOM_Objects can has ONLY ONE function.
-     *        Don't try to apply modification operations on them.
+     *        Don't try to apply modification operations (without copy) on them.
      */
     GEOM_Object GetSubShape (in GEOM_Object theMainShape,
                              in long        theID);
 
+    /*!
+     *  Get a set of sub shapes defined by their unique IDs inside \a theMainShape
+     *  \param theMainShape Main shape.
+     *  \param theIndices List of unique IDs of sub shapes inside \a theMainShape.
+     *  \return List of GEOM_Objects, corresponding to found sub shapes.
+     *  \note The sub shape GEOM_Objects can has ONLY ONE function.
+     *        Don't try to apply modification operations (without copy) on them.
+     */
+    ListOfGO MakeSubShapes (in GEOM_Object theMainShape,
+                            in ListOfLong  theIndices);
+
     /*!
      *  Get global index of \a theSubShape in \a theMainShape.
      *  \param theMainShape Main shape.
@@ -2525,6 +2610,25 @@ module GEOM
                                          in boolean  theIsClosed,
                                          in boolean  theDoReordering);
 
+    /*!
+     *  Creates a curve using the parametric definition of the basic points.
+     *  \param thexExpr parametric equation of the coordinates X.
+     *  \param theyExpr parametric equation of the coordinates Y.
+     *  \param thezExpr parametric equation of the coordinates Z.
+     *  \param theParamMin the minimal value of the parameter.
+     *  \param theParamMax the maximum value of the parameter.
+     *  \param theParamStep the step of the parameter.
+     *  \param theCurveType the type of the curve.
+     *  \return New GEOM_Object, containing the created curve.
+     */    
+    GEOM_Object MakeCurveParametric(in string thexExpr,
+                                   in string theyExpr,
+                                   in string thezExpr,
+                                   in double theParamMin,
+                                   in double theParamMax,
+                                   in double theParamStep,
+                                   in curve_type theCurveType);
+
     /*!
      *  Create a sketcher (wire or face), following the textual description,
      *  passed through \a theCommand argument. \n
@@ -2923,7 +3027,7 @@ module GEOM
      *         set to 'meter' and result model will be scaled.
      *  \return New GEOM_Object, containing the imported shape.
      */
-    GEOM_Object Import (in string theFileName, in string theFormatName);
+    GEOM_Object ImportFile (in string theFileName, in string theFormatName);
 
     /*!
      *  Get the supported import formats and corresponding patterns for File dialog.
@@ -3158,6 +3262,13 @@ module GEOM
     boolean CheckShapeWithGeometry (in GEOM_Object theShape,
                                     out string     theDescription);
 
+    /*!
+     *  Check if the given shape can be an argument for MakeSolid operation
+     *  \param theShape Shape to be described.
+     *  \return Empty string if a solid can be made on this shape, error code otherwise.
+     */
+    string IsGoodForSolid (in GEOM_Object theShape);
+
     /*!
      *  Obtain description of the given shape
      *  \param theShape Shape to be described.
@@ -3193,6 +3304,13 @@ module GEOM
      */
     double GetAngle (in GEOM_Object theShape1, in GEOM_Object theShape2);
 
+    /*!
+     *  Get angle between the given vectors.
+     *  \param theShape1,theShape2 Vectors to find angle between.
+     *  \return Value of the angle between the given vectors.
+     */
+    double GetAngleBtwVectors (in GEOM_Object theShape1, in GEOM_Object theShape2);
+
     /*!
      *  Get point coordinates
      */
@@ -3595,7 +3713,7 @@ module GEOM
 
     /*!
      *  Add a sub shape defined by indices in \a theIndices
-     *  (contains unique IDs of sub shapes inside theMainShape)
+     *  (contains unique IDs of sub shapes inside \a theMainShape)
      *  \note The sub shape GEOM_Objects can has ONLY ONE function.
      *        Don't try to apply modification operations on them.
      *  \note Internal method