]> SALOME platform Git repositories - modules/geom.git/blob - idl/GEOM_Gen.idl
Salome HOME
Mantis issue 0021837: [CEA 654] Add new method to make any point inside a face.
[modules/geom.git] / idl / GEOM_Gen.idl
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  File   : GEOM_Gen.idl
23 //  Author : Sergey RUIN
24
25 #ifndef __GEOM_GEN__
26 #define __GEOM_GEN__
27
28 #include "SALOME_Exception.idl"
29 #include "SALOME_Component.idl"
30 #include "SALOMEDS.idl"
31 #include "SALOMEDS_Attributes.idl"
32
33 #include "SALOME_GenericObj.idl"
34
35 module GEOM
36 {
37   /*!
38    *  \brief Topological types of shapes (like Open Cascade types)
39    */
40   enum shape_type 
41   { 
42     /*!  */
43     COMPOUND,
44     /*! A collection of solids */ 
45     COMPSOLID, 
46     /*! A part of 3D space bound by a shell */
47     SOLID, 
48     /*! A collection of faces connected by some edges of their wire boundaries */
49     SHELL,
50     /*! Part of a plane (in 2D geometry) or a surface (in 3D geometry) bounded by a close wire */
51     FACE, 
52     /*!  A sequence of edges connected by their vertices */
53     WIRE, 
54     /*! Edge, a shape corresponding to a curve, and bound by a vertex at each extremity */
55     EDGE, 
56     /*! A zero-dimensional shape corresponding to a point in geometry */
57     VERTEX,
58     /*!  */ 
59     SHAPE };
60
61   /*!
62    * \brief Marker type
63    */
64   enum marker_type { MT_NONE, MT_POINT, MT_PLUS, MT_STAR, MT_O, MT_X, MT_O_POINT, MT_O_PLUS,
65                      MT_O_STAR, MT_O_X, MT_BALL, MT_RING1, MT_RING2, MT_RING3, MT_USER };
66
67   /*!
68    * /brief Marker size
69    */
70   enum marker_size { MS_NONE, MS_10, MS_15, MS_20, MS_25, MS_30, MS_35,
71                      MS_40, MS_45, MS_50, MS_55, MS_60, MS_65, MS_70 };
72
73   /*!
74    *  \brief State of shape relatively geometrical surface like plane, sphere or cylinder.
75    *
76    *  Is used in functions GEOM_IShapesOperations.GetShapesOn<xxx>()
77    */
78   enum shape_state
79   {
80     /*! Shape is on surface */
81     ST_ON,
82
83     /*!
84      *  Shape is in the direction defined by the normal and not on surface.
85      *  For plane it means above the plane,
86      *  For sphere and cylinder it means outside of volume, bounded by the surface.
87      */
88     ST_OUT,
89     
90     /*!
91      *  Shape is in the direction defined by the normal and on surface.
92      *  ONOUT = ON || OUT
93      */
94     ST_ONOUT,
95
96     /*!
97      *  Complementary to ONOUT.
98      *  For plane it means below the plane,
99      *  For sphere and cylinder it means inside the volume, bounded by the surface
100      *  (beyond axis and surface for cylinder and beyond cented and surface for sphere).
101      */
102     ST_IN,
103
104     /*!
105      *  Complementary to OUT.
106      *  ONIN = ON || IN
107      */
108     ST_ONIN
109   };
110
111   /*!
112    *  \brief Kind of method to find inside one main shape some sub-shapes,
113    *  corresponding to other given shape (its argument)
114    *
115    *  Is used in functions GEOM_Gen.RestoreSubShapesO(), GEOM_Gen.RestoreSubShapesSO()
116    */
117   enum find_shape_method
118   {
119     /*! Use GetInPlace functionality. Suits all cases, except transformations */
120     FSM_GetInPlace,
121
122     /*! To be used only for transformation result, to find sub-shapes of argument.
123      *  Only this method can be used after transformation.
124      */
125     FSM_Transformed,
126
127     /*! To find only shared sub-shapes, not modified by the operation */
128     FSM_GetSame,
129
130     /*! Use GetShapesOnShape method (can work only on solids) */
131     FSM_GetShapesOnShape,
132
133     /*! Use GetInPlaceByHistory method (can work only after Partition) */
134     FSM_GetInPlaceByHistory,
135
136     /*! To be used only for multi-transformation result.
137      *  Only this method can be used after multi-transformation.
138      */
139     FSM_MultiTransformed
140   };
141
142   /*!
143    *  \brief Kind of method to perform filling operation
144    *
145    *  Is used in functions GEOM_I3DPrimOperations.MakeFilling()
146    */
147   enum filling_oper_method
148   {
149     /*! Default (standard behaviour) */
150     FOM_Default,
151
152     /*! Use edges orientation  - orientation of edges is used: if the edge is 
153      * reversed, the curve from this edge is reversed before using it in 
154      *  the filling algorithm.
155      */
156     FOM_UseOri,
157
158     /*! Auto-correct edges orientation - changes the orientation of the curves 
159      *  using minimization of sum of distances between the end points of the edges.
160      */
161     FOM_AutoCorrect
162   };
163
164   /*!
165    * \brief Kind of the curves.
166    *
167    * Used in the functions GEOM_ICurvesOperations.MakeCurveParametric(), GEOM_ICurvesOperations.MakeCurveParametricNew()
168    */
169   enum curve_type {
170     /*! Polyline curve */
171     Polyline,
172     
173     /*! Bezier curve */
174     Bezier,
175
176     /*! Interpolation, curve */
177     Interpolation
178   };
179
180  /*!
181    * \brief Pattern for block division of the disk
182    *
183    * Used in the functions GEOM_IAdvancedOperations.MakeDividedDisk(), GEOM_ICurvesOperations.MakeDividedDiskPntVecR()
184    */
185   enum pattern {
186     /*! Square */
187     SQUARE,
188     
189     /*! Hexagon */
190     HEXAGON
191   };
192
193
194   typedef sequence<string>      string_array;
195   typedef sequence<short>       short_array;
196   typedef sequence<boolean>     ListOfBool;
197   typedef sequence<long>        ListOfLong;
198   typedef sequence<double>      ListOfDouble;
199
200   interface GEOM_Object;
201
202   typedef sequence<GEOM_Object> ListOfGO;
203
204   //# GEOM_Object
205   /*!
206    *  \brief Interface of geometric object
207    */
208   interface GEOM_Object : SALOME::GenericObj
209   {
210
211     /*!
212      *  \brief Get an entry of the object in GEOM component.
213      */
214     string GetEntry();
215
216     /*!
217      *  \brief Get ID of study, where the object is created.
218      */
219     long GetStudyID();
220
221     /*!
222      *  \brief Get internal type of the object (POINT, BOX, CYLINDER, EXTRUSION...).
223      */
224     long GetType();
225
226     /*!
227      *  \brief Get a <VAR>shape_type</VAR> of the object value.
228      */
229     shape_type GetShapeType();
230
231     /*!
232      *  \brief Get the topology type of the object value.
233      *
234      *  In contrast to the shape type, this function returns type of the most
235      *  top-level sub-shape of the COMPOUND or COMPSOLID, if there is only one
236      *  sub-shape there.
237      *  \sa GetShapeType()
238      */
239     shape_type GetTopologyType();
240
241     /*!
242      *  \brief Get a minimal type of the top-level shapes contained in the object.
243      *
244      *  This function is useful for the compounds only; for simple shapes it
245      *  exactly the same value as GetShapeType().
246      *  Note, that compounds are procesed recursively.
247      *
248      *  \sa GetShapeType(), GetTopologyType(), GetMaxShapeType()
249      */
250     shape_type GetMinShapeType();
251
252     /*!
253      *  \brief Get a maximal type of the top-level shapes contained in the object.
254      *
255      *  This function is useful for the compounds only; for simple shapes it
256      *  exactly the same value as GetShapeType().
257      *  Note, that compounds are procesed recursively.
258      *
259      *  \sa GetShapeType(), GetTopologyType(), GetMinShapeType()
260      */
261     shape_type GetMaxShapeType();
262
263     /*!
264      *  \brief Set name of the object.
265      *
266      *  \param theName is a name which will be associated with this object.
267      */
268     void SetName (in string theName);
269
270     /*!
271      *  \brief Get name of the object associated with this object.
272      */
273     string GetName();
274
275     /*!
276      *  \brief Set color of the object.
277      *
278      *  \param theColor is a color of the object.
279      */
280     void SetColor(in SALOMEDS::Color theColor);
281
282     /*!
283      *  Get color of the object.
284      */
285     SALOMEDS::Color GetColor();
286
287     /*!
288      *  Toggle auto color mode on the object.
289      *  \param theAutoColor is a flag which toggles auto color mode.
290      */
291     void SetAutoColor(in boolean theAutoColor);
292
293     /*!
294      *  \brief Get flag of object's auto color mode.
295      */
296     boolean GetAutoColor();
297
298     /*!
299      * \brief Set standard point marker for the object
300      * \param theType standard marker type
301      * \param theSize marker relative size
302      */
303     void SetMarkerStd(in marker_type theType, in marker_size theSize );
304
305     /*!
306      * \brief Set custom point marker for the object. 
307      *
308      * The texture can be added by LoadTexture() or AddTexture() functions.
309      * \param theTextureId texture ID
310      */
311     void SetMarkerTexture(in long theTextureId);
312
313     /*!
314      * \brief Get type of the point marker assigned to the object
315      * \return current marker type (MT_NONE if no marker is set)
316      */
317     marker_type GetMarkerType();
318
319     /*!
320      * \brief Get size of the point marker assigned to the object
321      * \return current marker relative size (MS_NONE if no marker is set)
322      */
323     marker_size GetMarkerSize();
324
325     /*!
326      * \brief Get texture idenifier of the point marker assigned to the object
327      * \return marker texture ID (0 if no marker set)
328      */
329     long GetMarkerTexture();
330
331     /*!
332      *  \brief Set a Study entry where this object was published.
333      */
334     void SetStudyEntry (in string theEntry);
335
336     /*!
337      *  \brief Get a Study entry where this object was published.
338      */
339     string GetStudyEntry();
340
341     /*!
342      *  \brief Get a list of all GEOM_Object on which were the arguments
343      *  when this object was constructed and modified.
344      *  \note This method is supposed to be used by GUI only.
345      */
346     ListOfGO GetDependency();
347
348     /*!
349      *  \brief Get a list of GEOM_Object on which the last function that created or modified the object depends.
350      *  \note This method is supposed to be used by GUI only.
351      */
352     ListOfGO GetLastDependency();
353
354     /*!
355      *  \brief Get the TopoDS_Shape, for colocated case only.
356      */
357     long long getShape();
358
359  //   ######################################################################
360  //   # Internal methods (For sub-shape identification)
361  //   ######################################################################
362     /*!
363      *  \brief Get geometric shape of the object as a byte stream
364      */
365     SALOMEDS::TMPFile GetShapeStream();
366
367     /*
368      *  \brief Returns True if this object is not a sub-shape of another object.
369      */
370     boolean IsMainShape();
371
372     /*
373      *  \brief Get a list of ID's of sub-shapes in the main shape.
374      *  \note Internal method, suppopsed to be used only by GEOM_Client
375      */
376     ListOfLong GetSubShapeIndices();
377
378     /*
379      *  \brief Get a main shape object to which this object is a sub-shape
380      *  \note Internal method, suppopsed to be used only by GEOM_Client
381      */
382     GEOM_Object GetMainShape();
383
384     /*
385      *  \brief Return true if geom object representes a shape.
386      *
387      *  For example, method return false for GEOM_MARKER
388      */
389      boolean IsShape();
390
391     /*
392      *  \brief Return true if passed object is identical to this object
393      *
394      *  \param other object being compared with this one
395      */
396     boolean IsSame(in GEOM_Object other);
397
398      /*!
399      *  Set list of parameters
400      *  \param theParameters is a string containing the notebook variables separated by ":" symbol,
401      *         used for object creation
402      */
403     void SetParameters (in string theParameters);
404
405     /*!
406      *  \brief Return list of notebook variables used for object creation separated by ":" symbol
407      */
408     string GetParameters();
409   };
410
411  // # GEOM_IOperations:
412   /*!
413    *  \brief Basic methods of all geometric operations
414    */
415   interface GEOM_IOperations : SALOME::GenericObj
416   {
417     /*!
418      *  \brief To know, if the operation was successfully performed
419      */
420     boolean IsDone();
421
422     /*!
423      *  \brief Set the operation error code
424      *  \param theErrorID is a string describing the error occured
425      *  \note This method is supposed to be used only by interfaces inheriting from IOperations.
426      */
427     void SetErrorCode (in string theErrorID);
428
429     /*!
430      *  \brief Get the operation error code
431      */
432     string GetErrorCode();
433
434     /*!
435      *  \brief Get ID of study, where the operation is defined
436      */
437     long GetStudyID();
438
439     /*!
440      *  \brief Opens a new transaction
441      */
442     void StartOperation();
443
444     /*!
445      *  \brief Closes the previously opened trasaction
446      */
447     void FinishOperation();
448
449     /*!
450      *  \brief Aborts the previously opened transaction
451      */
452     void AbortOperation();
453   };
454   //# GEOM_IBasicOperations:
455   /*!
456    *  \brief Interface for basic geometry creation
457    *
458    *  (Point, Vector, Plane, Marker)
459    */
460   interface GEOM_IBasicOperations : GEOM_IOperations
461   {
462     /*!
463      *  \brief Create point by three coordinates.
464      *  \param theX The X coordinate of the point.
465      *  \param theY The Y coordinate of the point.
466      *  \param theZ The Z coordinate of the point.
467      *  \return New GEOM_Object, containing the created point.
468      */
469     GEOM_Object MakePointXYZ (in double theX, in double theY, in double theZ);
470
471     /*!
472      *  \brief Create a point, distant from the referenced point
473      *  on the given distances along the coordinate axes.
474      *  \param theReference The referenced point.
475      *  \param theX Displacement from the referenced point along OX axis.
476      *  \param theY Displacement from the referenced point along OY axis.
477      *  \param theZ Displacement from the referenced point along OZ axis.
478      *  \return New GEOM_Object, containing the created point.
479      */
480     GEOM_Object MakePointWithReference (in GEOM_Object theReference,
481                                         in double theX, in double theY, in double theZ);
482
483     /*!
484      *  Create a point, corresponding to the given parameter on the given curve.
485      *  \param theRefCurve The referenced curve.
486      *  \param theParameter Value of parameter on the referenced curve.
487      *  \return New GEOM_Object, containing the created point.
488      */
489     GEOM_Object MakePointOnCurve (in GEOM_Object theRefCurve,
490                                   in double theParameter);
491
492     /*!
493      *  \brief Create a point, corresponding to the given length on the given curve.
494      *  \param theRefCurve The referenced curve.
495      *  \param theLength Length on the referenced curve. It can be negative.
496      *  \param theStartPoint Any vertex close to one of edge's
497      *                       ends to select start point among them.
498      *                       If NULL, fist vertex is used.
499      *  \return New GEOM_Object, containing the created point.
500      */
501     GEOM_Object MakePointOnCurveByLength (in GEOM_Object theRefCurve,
502                                           in double      theLength,
503                                           in GEOM_Object theStartPoint);
504
505     /*!
506      *  \brief Create a point on the given curve, projecting given point
507      *  \param theRefCurve The referenced curve.
508      *  \param theXParameter X co-ordinate of point to project on curve
509      *  \param theYParameter Y co-ordinate of point to project on curve
510      *  \param theZParameter Z co-ordinate of point to project on curve
511      *  \return New GEOM_Object, containing the created point.
512      */
513     GEOM_Object MakePointOnCurveByCoord (in GEOM_Object theRefCurve,
514                                          in double theXParameter,
515                                          in double theYParameter,
516                                          in double theZParameter);
517
518     /*!
519      *  \brief Create a point, corresponding to the given parameters on the
520      *    given surface.
521      *  \param theRefSurf The referenced surface.
522      *  \param theUParameter Value of U-parameter on the referenced surface.
523      *  \param theVParameter Value of V-parameter on the referenced surface.
524      *  \return New GEOM_Object, containing the created point.
525      */
526     GEOM_Object MakePointOnSurface (in GEOM_Object theRefSurf,
527                                     in double theUParameter,
528                                     in double theVParameter);
529
530     /*!
531      *  \brief Create a point on the given surface, projecting given point
532      *  \param theRefSurf The referenced surface.
533      *  \param theXParameter X co-ordinate of point to project on curve
534      *  \param theYParameter Y co-ordinate of point to project on curve
535      *  \param theZParameter Z co-ordinate of point to project on curve
536      *  \return New GEOM_Object, containing the created point.
537      */
538     GEOM_Object MakePointOnSurfaceByCoord (in GEOM_Object theRefSurf,
539                                            in double theXParameter,
540                                            in double theYParameter,
541                                            in double theZParameter);
542
543     /*!
544      *  \brief Create a point, which lays on the given face.
545      *         The point will lay in arbitrary place of the face.
546      *         The only condition on it is a non-zero distance to the face boundary.
547      *         Such point can be used to uniquely identify the face inside any
548      *         shape in case, when the shape does not contain overlapped faces.
549      *  \param theFace The referenced face.
550      *  \return New GEOM_Object, containing the created point.
551      */
552     GEOM_Object MakePointOnFace (in GEOM_Object theFace);
553
554     /*!
555      *  \brief Create a point, on two lines intersection.
556      *  \param theRefLine1, theRefLine2 The referenced lines.
557      *  \return New GEOM_Object, containing the created point.
558      */
559     GEOM_Object MakePointOnLinesIntersection (in GEOM_Object theRefLine1,
560                                               in GEOM_Object theRefLine2);
561
562      /*!
563      *  \brief Create a vector, corresponding to tangent to the given parameter on the given curve.
564      *  \param theRefCurve The referenced curve.
565      *  \param theParameter Value of parameter on the referenced curve.This value should be have value
566      *                      between 0. and 1.. Value of 0. corresponds first parameter of curve; value
567      *                      1. corresponds last parameter of curve.
568      *  \return New GEOM_Object, containing the created point.
569      */
570      GEOM_Object MakeTangentOnCurve (in GEOM_Object theRefCurve,
571                                      in double theParameter);
572
573     /*!
574      *  \brief Create a vector with the given components.
575      *  \param theDX X component of the vector.
576      *  \param theDY Y component of the vector.
577      *  \param theDZ Z component of the vector.
578      *  \return New GEOM_Object, containing the created vector.
579      */
580     GEOM_Object MakeVectorDXDYDZ (in double theDX,
581                                   in double theDY,
582                                   in double theDZ);
583
584     /*!
585      *  \brief Create a vector between two points.
586      *  \param thePnt1 Start point for the vector.
587      *  \param thePnt2 End point for the vector.
588      *  \return New GEOM_Object, containing the created vector.
589      */
590     GEOM_Object MakeVectorTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
591
592     /*!
593      *  C\brief reate a line, passing through the given point
594      *  and parrallel to the given direction
595      *  \param thePnt Point. The resulting line will pass through it.
596      *  \param theDir Direction. The resulting line will be parallel to it.
597      *  \return New GEOM_Object, containing the created line.
598      */
599     GEOM_Object MakeLine (in GEOM_Object thePnt, in GEOM_Object theDir);
600
601     /*!
602      *  \brief Create a line, passing through the given points
603      *  \param thePnt1 First of two points, defining the line.
604      *  \param thePnt2 Second of two points, defining the line.
605      *  \return New GEOM_Object, containing the created line.
606      */
607     GEOM_Object MakeLineTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
608
609     /*!
610      *  \brief Create a line, given by two faces intersection.
611      *  \param theFace1 First of two faces, defining the line.
612      *  \param theFace2 Second of two faces, defining the line.
613      *  \return New GEOM_Object, containing the created line.
614      */
615     GEOM_Object MakeLineTwoFaces (in GEOM_Object theFace1, in GEOM_Object theFace2);
616
617     /*!
618      *  \brief Create a plane, passing through the three given points
619      *  \param thePnt1 First of three points, defining the plane.
620      *  \param thePnt2 Second of three points, defining the plane.
621      *  \param thePnt3 Fird of three points, defining the plane.
622      *  \param theTrimSize Half size of a side of quadrangle face, representing the plane.
623      *  \return New GEOM_Object, containing the created plane.
624      */
625     GEOM_Object MakePlaneThreePnt (in GEOM_Object thePnt1,
626                                    in GEOM_Object thePnt2,
627                                    in GEOM_Object thePnt3,
628                                    in double theTrimSize);
629
630     /*!
631      *  \brief Create a plane, passing through the given point
632      *  and normal to the given vector.
633      *  \param thePnt Point, the plane has to pass through.
634      *  \param theVec Vector, defining the plane normal direction.
635      *  \param theTrimSize Half size of a side of quadrangle face, representing the plane.
636      *  \return New GEOM_Object, containing the created plane.
637      */
638     GEOM_Object MakePlanePntVec (in GEOM_Object thePnt,
639                                  in GEOM_Object theVec,
640                                  in double theTrimSize);
641
642     /*!
643      *  \brief Create a plane, similar to the existing one, but with another size of representing face.
644      *  \param theFace Referenced plane or LCS(Marker).
645      *  \param theTrimSize New half size of a side of quadrangle face, representing the plane.
646      *  \return New GEOM_Object, containing the created plane.
647      */
648     GEOM_Object MakePlaneFace (in GEOM_Object theFace,
649                                in double theTrimSize);
650
651     /*!
652      *  \brief Create a plane, by two vectors.
653      *  \param theVec1 Vector1, the plane has to pass through first point of this vector.
654      *  \param theVec2 Vector2, defining the plane normal direction.
655      *  \param theTrimSize Half size of a side of quadrangle face, representing the plane.
656      *  \return New GEOM_Object, containing the created plane.
657      */
658     GEOM_Object MakePlane2Vec (in GEOM_Object theVec1,
659                                in GEOM_Object theVec2,
660                                in double theTrimSize);
661
662     /*!
663      *  \brief Create a plane, defined by local coordinate system.
664      *  \param theLCS Referenced LCS(Marker).
665      *  \param theTrimSize Half size of a side of quadrangle face, representing the plane.
666      *  \param theOrientation OXY, OYZ or OZX orientation = (1, 2 or 3).
667      *  \return New GEOM_Object, containing the created plane.
668      */
669     GEOM_Object MakePlaneLCS (in GEOM_Object theLCS,
670                               in double theTrimSize,
671                               in double theOrientation);
672
673     /*!
674      *  \brief Create a local coordinate system.
675      *  \param theOX,theOY,theOZ Three coordinates of coordinate system origin.
676      *  \param theXDX,theXDY,theXDZ Three components of OX direction
677      *  \param theYDX,theYDY,theYDZ Three components of OY direction
678      *  \return New GEOM_Object, containing the created coordinate system.
679      */
680     GEOM_Object MakeMarker (in double theOX , in double theOY , in double theOZ,
681                             in double theXDX, in double theXDY, in double theXDZ,
682                             in double theYDX, in double theYDY, in double theYDZ);
683
684     /*!
685      *  \brief Create a local coordinate system from shape.
686      *  \param theShape The initial shape to detect the coordinate system.
687      *  \return New GEOM_Object, containing the created coordinate system.
688      */
689     GEOM_Object MakeMarkerFromShape (in GEOM_Object theShape);
690
691     /*!
692      *  \brief Create a local coordinate system from point and two vectors (DX, DY).
693      *  \param theOrigin Point of coordinate system origin.
694      *  \param theXVec Vector of X direction.
695      *  \param theYVec Vector of Y direction.
696      *  \return New GEOM_Object, containing the created coordinate system.
697      */
698     GEOM_Object MakeMarkerPntTwoVec (in GEOM_Object theOrigin,
699                                      in GEOM_Object theXVec, in GEOM_Object theYVec);
700
701     /*!
702      *  \brief Create a tangent plane to specified face in the point with specified parameters.
703      *
704      *  Values of parameters should be between 0. and 1.0
705      *  \param theFace - face for which tangent plane shuold be built.
706      *  \param theParameterU - value of parameter by U
707      *  \param theParameterV - value of parameter Vthe
708      *  \param theTrimSize - defines sizes of created face
709      *  \return New GEOM_Object, containing the face built on tangent plane.
710      */
711     GEOM_Object MakeTangentPlaneOnFace(in GEOM_Object theFace,
712                                        in double theParameterU,
713                                        in double theParameterV,
714                                        in double theTrimSize);
715   };
716
717   interface GEOM_ITransformOperations : GEOM_IOperations
718   {
719     /*!
720      *  \brief Translate the given object along the vector, specified by its end points.
721      *  \param theObject The object to be translated.
722      *  \param thePoint1 Start point of translation vector.
723      *  \param thePoint2 End point of translation vector.
724      *  \return theObject.
725      */
726     GEOM_Object TranslateTwoPoints (in GEOM_Object theObject,
727                                     in GEOM_Object thePoint1,
728                                     in GEOM_Object thePoint2);
729
730     /*!
731      *  \brief Translate the given object along the vector, specified
732      *  by its end points, creating its copy before the translation.
733      *  \param theObject The object to be translated.
734      *  \param thePoint1 Start point of translation vector.
735      *  \param thePoint2 End point of translation vector.
736      *  \return New GEOM_Object, containing the translated object.
737      */
738     GEOM_Object TranslateTwoPointsCopy (in GEOM_Object theObject,
739                                         in GEOM_Object thePoint1,
740                                         in GEOM_Object thePoint2);
741
742     /*!
743      *  \brief Translate the given object along the vector, specified by its components.
744      *  \param theObject The object to be translated.
745      *  \param theDX,theDY,theDZ Components of translation vector.
746      *  \return theObject.
747      */
748     GEOM_Object TranslateDXDYDZ (in GEOM_Object theObject,
749                                  in double theDX, in double theDY, in double theDZ);
750
751     /*!
752      *  \brief Translate the given object along the vector, specified
753      *  by its components, creating its copy before the translation.
754      *  \param theObject The object to be translated.
755      *  \param theDX,theDY,theDZ Components of translation vector.
756      *  \return New GEOM_Object, containing the translated object.
757      */
758     GEOM_Object TranslateDXDYDZCopy (in GEOM_Object theObject,
759                                      in double theDX, in double theDY, in double theDZ);
760
761
762     /*!
763      *  \brief Translate the given object along the given vector.
764      *  \param theObject The object to be translated.
765      *  \param theVector Translation vector, giving both direction and distance.
766      *  \return theObject.
767      */
768     GEOM_Object TranslateVector (in GEOM_Object theObject,
769                                  in GEOM_Object theVector);
770
771     /*!
772      *  \brief Translate the given object along the given vector,
773      *  creating its copy before the translation.
774      *  \param theObject The object to be translated.
775      *  \param theVector Translation vector, giving both direction and distance.
776      *  \return New GEOM_Object, containing the translated object.
777      */
778     GEOM_Object TranslateVectorCopy (in GEOM_Object theObject,
779                                      in GEOM_Object theVector);
780
781     /*!
782      *  \brief Translate the given object along the given vector on given distance,
783      *  creating its copy before the translation.
784      *  \param theObject The object to be translated.
785      *  \param theVector Translation vector, giving a direction.
786      *  \param theDistance Translation distance, giving a distance.
787      *  \param theCopy Translation copy, creating its copy if true.
788      *  \return New GEOM_Object, containing the translated object.
789      */
790     GEOM_Object TranslateVectorDistance (in GEOM_Object theObject,
791                                          in GEOM_Object theVector,
792                                          in double      theDistance,
793                                          in boolean     theCopy);
794
795     /*!
796      *  \brief Translate the given object along the given vector a given number times
797      *  \param theObject The object to be translated.
798      *  \param theVector Direction of the translation.
799      *  \param theStep Distance to translate on.
800      *  \param theNbTimes Quantity of translations to be done.
801      *  \return New GEOM_Object, containing compound of all
802      *          the shapes, obtained after each translation.
803      */
804     GEOM_Object MultiTranslate1D (in GEOM_Object theObject,
805                                   in GEOM_Object theVector,
806                                   in double theStep,
807                                   in long theNbTimes);
808
809     /*!
810      *  \brief Conseqently apply two specified translations to theObject specified number of times.
811      *  \param theObject The object to be translated.
812      *  \param theVector1 Direction of the first translation.
813      *  \param theStep1 Step of the first translation.
814      *  \param theNbTimes1 Quantity of translations to be done along theVector1.
815      *  \param theVector2 Direction of the second translation.
816      *  \param theStep2 Step of the second translation.
817      *  \param theNbTimes2 Quantity of translations to be done along theVector2.
818      *  \return New GEOM_Object, containing compound of all
819      *          the shapes, obtained after each translation.
820      */
821     GEOM_Object MultiTranslate2D (in GEOM_Object theObject,
822                                   in GEOM_Object theVector1,
823                                   in double theStep1,
824                                   in long theNbTimes1,
825                                   in GEOM_Object theVector2,
826                                   in double theStep2,
827                                   in long theNbTimes2);
828
829     /*!
830      *  \brief Rotate given object around vector perpendicular to plane containing three points.
831      *  \param theObject The object to be rotated.
832      *  \param theCentPoint central point - the axis is the vector perpendicular to the plane
833      *                      containing the three points.
834      *  \param thePoint1,thePoint2 - in a perpendicular plan of the axis.
835      *  \return theObject.
836      */
837     GEOM_Object RotateThreePoints (in GEOM_Object theObject,
838                                    in GEOM_Object theCentPoint,
839                                    in GEOM_Object thePoint1,
840                                    in GEOM_Object thePoint2);
841
842
843     /*!
844      *  \brief Rotate given object around vector perpendicular to plane containing three points.
845      *
846      *  Creating its copy before the rotatation.
847      *  \param theObject The object to be rotated.
848      *  \param theCentPoint central point - the axis is the vector perpendicular to the plane
849      *  containing the three points.
850      *  \param thePoint1,thePoint2 - in a perpendicular plan of the axis.
851      *  \return New GEOM_Object, containing the rotated object.
852      */
853     GEOM_Object RotateThreePointsCopy (in GEOM_Object theObject,
854                                        in GEOM_Object theCentPoint,
855                                        in GEOM_Object thePoint1,
856                                        in GEOM_Object thePoint2);
857
858     /*!
859      *  \brief Rotate the given object around the given axis on the given angle.
860      *  \param theObject The object to be rotated.
861      *  \param theAxis Rotation axis.
862      *  \param theAngle Rotation angle in radians.
863      *  \return theObject.
864      */
865     GEOM_Object Rotate (in GEOM_Object theObject,
866                         in GEOM_Object theAxis,
867                         in double theAngle);
868
869
870     /*!
871      *  Rotate the given object around the given axis
872      *  on the given angle, creating its copy before the rotatation.
873      *  \param theObject The object to be rotated.
874      *  \param theAxis Rotation axis.
875      *  \param theAngle Rotation angle in radians.
876      *  \return New GEOM_Object, containing the rotated object.
877      */
878     GEOM_Object RotateCopy (in GEOM_Object theObject,
879                             in GEOM_Object theAxis,
880                             in double theAngle);
881
882
883     /*!
884      *  \brief Rotate the given object around the given axis a given number times.
885      *
886      *  Rotation angle will be 2*PI/theNbTimes.
887      *  \param theObject The object to be rotated.
888      *  \param theAxis The rotation axis.
889      *  \param theNbTimes Quantity of rotations to be done.
890      *  \return New GEOM_Object, containing compound of all the
891      *          shapes, obtained after each rotation.
892      */
893     GEOM_Object MultiRotate1D (in GEOM_Object theObject,
894                                in GEOM_Object theAxis,
895                                in long theNbTimes);
896
897     /*!
898      *  \brief Rotate the given object around the
899      *  given axis on the given angle a given number
900      *  times and multi-translate each rotation result.
901      *
902      *  Translation direction passes through center of gravity
903      *  of rotated shape and its projection on the rotation axis.
904      *  \param theObject The object to be rotated.
905      *  \param theAxis Rotation axis.
906      *  \param theAngle Rotation angle in graduces.
907      *  \param theNbTimes1 Quantity of rotations to be done.
908      *  \param theStep Translation distance.
909      *  \param theNbTimes2 Quantity of translations to be done.
910      *  \return New GEOM_Object, containing compound of all the
911      *          shapes, obtained after each transformation.
912      */
913     GEOM_Object MultiRotate2D (in GEOM_Object theObject,
914                                in GEOM_Object theAxis,
915                                in double theAngle,
916                                in long theNbTimes1,
917                                in double theStep,
918                                in long theNbTimes2);
919
920     /*!
921      *  \brief Replace the given object by an object,
922      *  symmetrical to it relatively the given plane.
923      *  \param theObject The object to be mirrored.
924      *  \param thePlane Plane of symmetry.
925      */
926     GEOM_Object MirrorPlane (in GEOM_Object theObject, in GEOM_Object thePlane);
927
928     /*!
929      *  \brief Create an object, symmetrical
930      *  to the given one relatively the given plane.
931      *  \param theObject The object to be mirrored.
932      *  \param thePlane Plane of symmetry.
933      *  \return New GEOM_Object, containing the mirrored shape.
934      */
935     GEOM_Object MirrorPlaneCopy (in GEOM_Object theObject, in GEOM_Object thePlane);
936
937     /*!
938      *  \brief Replace the given object by an object,
939      *  symmetrical to it relatively the given axis.
940      *  \param theObject The object to be mirrored.
941      *  \param theAxis Axis of symmetry.
942      *  \return theObject.
943      */
944     GEOM_Object MirrorAxis (in GEOM_Object theObject, in GEOM_Object theAxis);
945
946     /*!
947      *  \brief Create an object, symmetrical
948      *  to the given one relatively the given axis.
949      *  \param theObject The object to be mirrored.
950      *  \param theAxis Axis of symmetry.
951      *  \return New GEOM_Object, containing the mirrored object.
952      */
953     GEOM_Object MirrorAxisCopy (in GEOM_Object theObject, in GEOM_Object theAxis);
954
955     /*!
956      *  \brief Replace the given object by an object, symmetrical to it relatively the given point.
957      *  \param theObject The object to be mirrored.
958      *  \param thePoint Point of symmetry.
959      *  \return theObject.
960      */
961     GEOM_Object MirrorPoint (in GEOM_Object theObject, in GEOM_Object thePoint);
962
963     /*!
964      *  \brief Create an object, symmetrical to the given one relatively the given point.
965      *  \param theObject The object to be mirrored.
966      *  \param thePoint Point of symmetry.
967      *  \return New GEOM_Object, containing the mirrored object.
968      */
969     GEOM_Object MirrorPointCopy (in GEOM_Object theObject, in GEOM_Object thePoint);
970
971     /*!
972      *  \brief Replace the given object by its offset.
973      *  \param theObject The base object for the offset.
974      *  \param theOffset Offset value.
975      *  \return theObject.
976      */
977     GEOM_Object OffsetShape (in GEOM_Object theObject, in double theOffset);
978
979     /*!
980      *  \brief Create new object as offset of the given one.
981      *  \param theObject The base object for the offset.
982      *  \param theOffset Offset value.
983      *  \return New GEOM_Object, containing the offset object.
984      */
985     GEOM_Object OffsetShapeCopy (in GEOM_Object theObject, in double theOffset);
986
987     /*!
988      *  \brief Create new object as projection of the given one on a 2D surface.
989      *  \param theSource The source object for the projection. It can be a point, edge or wire.
990      *  \param theTarget The target object. It can be planar or cylindrical face.
991      *  \return New GEOM_Object, containing the projection.
992      */
993     GEOM_Object ProjectShapeCopy (in GEOM_Object theSource, in GEOM_Object theTarget);
994
995     /*!
996      *  \brief Scale the given object by the factor.
997      *  \param theObject The object to be scaled.
998      *  \param thePoint Center point for scaling.
999      *  \param theFactor Scaling factor value.
1000      *  \return theObject.
1001      */
1002     GEOM_Object ScaleShape (in GEOM_Object theObject, in GEOM_Object thePoint,
1003                             in double theFactor);
1004
1005     /*!
1006      *  \brief Scale the given object by the factor, creating its copy before the scaling.
1007      *  \param theObject The object to be scaled.
1008      *  \param thePoint Center point for scaling.
1009      *  \param theFactor Scaling factor value.
1010      *  \return New GEOM_Object, containing the scaled shape.
1011      */
1012     GEOM_Object ScaleShapeCopy (in GEOM_Object theObject, in GEOM_Object thePoint,
1013                                 in double theFactor);
1014
1015     /*!
1016      *  \brief Scale the given object by different factors along coordinate axes.
1017      *  \param theObject The object to be scaled.
1018      *  \param thePoint Center point for scaling.
1019      *  \param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
1020      *  \return theObject.
1021      */
1022     GEOM_Object ScaleShapeAlongAxes (in GEOM_Object theObject,
1023                                      in GEOM_Object thePoint,
1024                                      in double theFactorX,
1025                                      in double theFactorY,
1026                                      in double theFactorZ);
1027
1028     /*!
1029      *  \brief Scale the given object by different factors along coordinate axes,
1030      *  creating its copy before the scaling.
1031      *  \param theObject The object to be scaled.
1032      *  \param thePoint Center point for scaling.
1033      *  \param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
1034      *  \return New GEOM_Object, containing the scaled shape.
1035      */
1036     GEOM_Object ScaleShapeAlongAxesCopy (in GEOM_Object theObject,
1037                                          in GEOM_Object thePoint,
1038                                          in double theFactorX,
1039                                          in double theFactorY,
1040                                          in double theFactorZ);
1041
1042     /*!
1043      *  \brief Modify the Location of the given object by LCS.
1044      *  \param theObject The object to be displaced.
1045      *  \param theStartLCS Coordinate system to perform displacement from it.
1046      *                     If \a theStartLCS is NULL, displacement
1047      *                     will be performed from global CS.
1048      *                     If \a theObject itself is used as \a theStartLCS,
1049      *                     its location will be changed to \a theEndLCS.
1050      *  \param theEndLCS Coordinate system to perform displacement to it.
1051      *  \return theObject.
1052      */
1053     GEOM_Object PositionShape (in GEOM_Object theObject,
1054                                in GEOM_Object theStartLCS,
1055                                in GEOM_Object theEndLCS);
1056
1057     /*!
1058      *  \brief Modify the Location of the given object by LCS,
1059      *  creating its copy before the setting.
1060      *  \param theObject The object to be displaced.
1061      *  \param theStartLCS Coordinate system to perform displacement from it.
1062      *                     If \a theStartLCS is NULL, displacement
1063      *                     will be performed from global CS.
1064      *                     If \a theObject itself is used as \a theStartLCS,
1065      *                     its location will be changed to \a theEndLCS.
1066      *  \param theEndLCS Coordinate system to perform displacement to it.
1067      *  \return New GEOM_Object, containing the displaced shape.
1068      */
1069     GEOM_Object PositionShapeCopy (in GEOM_Object theObject,
1070                                    in GEOM_Object theStartLCS,
1071                                    in GEOM_Object theEndLCS);
1072
1073     /*!
1074      *  \brief Modify the Location of the given object by Path,
1075      *  \param  theObject The object to be displaced.
1076      *  \param  thePath Wire or Edge along that the object will be translated.
1077      *  \param  theDistance progress of Path (0 = actual location, 1 = end of path location).
1078      *  \param  theCopy is a true or false parameter. true is to create a copy, false to move the object.
1079      *  \param  theReverse is a true or false parameter. true is to reverse direction, false is to move normal direction.
1080      *  \return New GEOM_Object, containing the displaced shape.
1081      */
1082     GEOM_Object PositionAlongPath (in GEOM_Object theObject,
1083                                    in GEOM_Object thePath,
1084                                    in double theDistance,
1085                                    in boolean theCopy,
1086                                    in boolean theReverse);
1087
1088     /*!
1089      *  \brief Transform the shape in the same way what was used for the sample shape creation.
1090      *  \param theObject The object to be transformed.
1091      *  \param theSample The object containing information about required transformation.
1092      *  \note Implementation of this method is limited by multi-transformations now.
1093      *  \note Internal method.
1094      *  \return New GEOM_Object, containing the transformed shape.
1095      */
1096     GEOM_Object TransformLikeOtherCopy (in GEOM_Object theObject,
1097                                         in GEOM_Object theSample);
1098
1099     /*!
1100      *  \brief Recompute the shape from its arguments.
1101      *  \param theObject The object to be recomputed.
1102      *  \return theObject.
1103      */
1104     GEOM_Object RecomputeObject (in GEOM_Object theObject);
1105   };
1106   
1107  // # GEOM_I3DPrimOperations:
1108   /*!
1109    *  \brief Interface for 3D primitives creation
1110    *
1111    *  Box, Cylinder, Cone, Sphere, Prism (extrusion),
1112    *  Pipe (extrusion along contour), Revolution, Solid (from shell).
1113    */
1114   interface GEOM_I3DPrimOperations : GEOM_IOperations
1115   {
1116     /*!
1117      *  \brief Create a box with specified dimensions along the coordinate axes
1118      *  and with edges, parallel to the coordinate axes.
1119      *
1120      *  Center of the box will be at point (DX/2, DY/2, DZ/2).
1121      *  \param theDX Length of Box edges, parallel to OX axis.
1122      *  \param theDY Length of Box edges, parallel to OY axis.
1123      *  \param theDZ Length of Box edges, parallel to OZ axis.
1124      *  \return New GEOM_Object, containing the created box.
1125      */
1126     GEOM_Object MakeBoxDXDYDZ (in double theDX, in double theDY, in double theDZ);
1127
1128     /*!
1129      *  \brief Create a box with two specified opposite vertices,
1130      *  and with edges, parallel to the coordinate axes
1131      *  \param thePnt1 First of two opposite vertices.
1132      *  \param thePnt2 Second of two opposite vertices.
1133      *  \return New GEOM_Object, containing the created box.
1134      */
1135     GEOM_Object MakeBoxTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
1136
1137     /*!
1138      *  \brief Create a face specified dimensions along OX-OY coordinate axes,
1139      *  with edges parallel to the coordinate axes.
1140      *
1141      *  Center of the face will be at point (0, 0, 0).
1142      *  \param theH Height of the Face.
1143      *  \param theW Width of the Face.
1144      *  \param theOrientation Orientation belong axis OXY OYZ OZX
1145      *  \return New GEOM_Object, containing the created face.
1146      */
1147     GEOM_Object MakeFaceHW (in double theH, in double theW, in short theOrientation);
1148     /*!
1149      *  \brief Create a face by normale vector or edge and two specified sizes,
1150      *  vertical (H) and horisontal (W).
1151      *  \param theObj defines plane.
1152      *  \param theH vertical size (height).
1153      *  \param theW horisontal size (width).
1154      *  \return New GEOM_Object, containing the created face.
1155      */
1156     GEOM_Object MakeFaceObjHW (in GEOM_Object theObj, in double theH, in double theW);
1157     /*!
1158      *  \brief Create a Disk (circular face) with given center, normal vector and radius.
1159      *  \param thePnt disk center.
1160      *  \param theVec Vector, normal to the plane of the disk.
1161      *  \param theR Disk radius.
1162      *  \return New GEOM_Object, containing the created disk.
1163      */
1164     GEOM_Object MakeDiskPntVecR (in GEOM_Object thePnt,
1165                                  in GEOM_Object theVec,
1166                                  in double theR);
1167     /*!
1168      *  \brief Create a disk (circular face), passing through three given points
1169      *  \param thePnt1, thePnt2, thePnt3 Points, defining the disk.
1170      *  \return New GEOM_Object, containing the created disk.
1171      */
1172     GEOM_Object MakeDiskThreePnt (in GEOM_Object thePnt1,
1173                                   in GEOM_Object thePnt2,
1174                                   in GEOM_Object thePnt3);
1175
1176     /*!
1177      *  \brief Create a disk specified dimensions along OX-OY coordinate axes.
1178      *
1179      *  Center of the disk at point (0, 0, 0).
1180      *  \param theR of the Disk.
1181      *  \param theOrientation Orientation belong axis OXY OYZ OZX
1182      *  \return New GEOM_Object, containing the created disk.
1183      */
1184     GEOM_Object MakeDiskR (in double theR, in short theOrientation);
1185
1186     /*!
1187      *  \brief Create a cylinder with given radius and height at
1188      *  the origin of coordinate system.
1189      *
1190      *  Axis of the cylinder will be collinear to the OZ axis of the coordinate system.
1191      *  \param theR Cylinder radius.
1192      *  \param theH Cylinder height.
1193      *  \return New GEOM_Object, containing the created cylinder.
1194      */
1195     GEOM_Object MakeCylinderRH (in double theR, in double theH);
1196
1197     /*!
1198      *  \brief Create a cylinder with given base point, axis, radius and height.
1199      *  \param thePnt Central point of cylinder base.
1200      *  \param theAxis Cylinder axis.
1201      *  \param theR Cylinder radius.
1202      *  \param theH Cylinder height.
1203      *  \return New GEOM_Object, containing the created cylinder.
1204      */
1205     GEOM_Object MakeCylinderPntVecRH (in GEOM_Object thePnt,
1206                                       in GEOM_Object theAxis,
1207                                       in double      theR,
1208                                       in double      theH);
1209
1210     /*!
1211      *  \brief Create a cone with given height and radiuses at
1212      *  the origin of coordinate system. 
1213      *
1214      *  Axis of the cone will be collinear to the OZ axis of the coordinate system.
1215      *  \param theR1 Radius of the first cone base.
1216      *  \param theR2 Radius of the second cone base.
1217      *    \note If both radiuses are non-zero, the cone will be truncated.
1218      *    \note If the radiuses are equal, a cylinder will be created instead.
1219      *  \param theH Cone height.
1220      *  \return New GEOM_Object, containing the created cone.
1221      */
1222     GEOM_Object MakeConeR1R2H (in double theR1, in double theR2, in double theH);
1223
1224     /*!
1225      *  \brief Create a cone with given base point, axis, height and radiuses.
1226      *  \param thePnt Central point of the first cone base.
1227      *  \param theAxis Cone axis.
1228      *  \param theR1 Radius of the first cone base.
1229      *  \param theR2 Radius of the second cone base.
1230      *    \note If both radiuses are non-zero, the cone will be truncated.
1231      *    \note If the radiuses are equal, a cylinder will be created instead.
1232      *  \param theH Cone height.
1233      *  \return New GEOM_Object, containing the created cone.
1234      */
1235     GEOM_Object MakeConePntVecR1R2H (in GEOM_Object thePnt,
1236                                      in GEOM_Object theAxis,
1237                                      in double      theR1,
1238                                      in double      theR2,
1239                                      in double      theH);
1240
1241     /*!
1242      *  \brief Create a torus with given radiuses at the origin of coordinate system.
1243      *  \param theRMajor Torus major radius.
1244      *  \param theRMinor Torus minor radius.
1245      *  \return New GEOM_Object, containing the created torus.
1246      */
1247     GEOM_Object MakeTorusRR (in double theRMajor,
1248                              in double theRMinor);
1249
1250     /*!
1251      *  \brief Create a torus with given center, normal vector and radiuses.
1252      *  \param thePnt Torus central point.
1253      *  \param theVec Torus axis of symmetry.
1254      *  \param theRMajor Torus major radius.
1255      *  \param theRMinor Torus minor radius.
1256      *  \return New GEOM_Object, containing the created torus.
1257      */
1258     GEOM_Object MakeTorusPntVecRR (in GEOM_Object thePnt,
1259                                    in GEOM_Object theVec,
1260                                    in double theRMajor,
1261                                    in double theRMinor);
1262
1263     /*!
1264      *  \brief Create a sphere with given radius at the origin of coordinate system.
1265      *  \param theR Sphere radius.
1266      *  \return New GEOM_Object, containing the created sphere.
1267      */
1268     GEOM_Object MakeSphereR (in double theR);
1269
1270     /*!
1271      *  \brief Create a sphere with given center and radius.
1272      *  \param thePnt Sphere center.
1273      *  \param theR Sphere radius.
1274      *  \return New GEOM_Object, containing the created .
1275      */
1276     GEOM_Object MakeSpherePntR (in GEOM_Object thePnt, in double theR);
1277
1278     /*!
1279      *  \brief Create a shape by extrusion of the base shape along the vector
1280      *
1281      *  All the space, transfixed by the base shape during its translation
1282      *  along the vector on the given distance.
1283      *  \param theBase Base shape to be extruded.
1284      *  \param theVec Direction of extrusion.
1285      *  \param theH Prism dimension along theVec.
1286      *  \return New GEOM_Object, containing the created prism.
1287      */
1288     GEOM_Object MakePrismVecH (in GEOM_Object theBase,
1289                                in GEOM_Object theVec,
1290                                in double      theH);
1291     /*  \brief The Same Prism but in 2 directions (forward&backward) */
1292     GEOM_Object MakePrismVecH2Ways (in GEOM_Object theBase,
1293                                     in GEOM_Object theVec,
1294                                     in double      theH);
1295     /*  \brief The Same as MakePrismVecH but with scaling */
1296     GEOM_Object MakePrismVecHWithScaling (in GEOM_Object theBase,
1297                                           in GEOM_Object theVec,
1298                                           in double      theH,
1299                                           in double      theScaleFactor);
1300
1301     /*!
1302      *  \brief Create a shape by extrusion of the base shape along a vector, defined by two points.
1303      *  \param theBase Base shape to be extruded.
1304      *  \param thePoint1 First end of extrusion vector.
1305      *  \param thePoint2 Second end of extrusion vector.
1306      *  \return New GEOM_Object, containing the created prism.
1307      */
1308     GEOM_Object MakePrismTwoPnt (in GEOM_Object theBase,
1309                                  in GEOM_Object thePoint1,
1310                                  in GEOM_Object thePoint2);
1311     /*  \brief The same prism but in two directions forward&backward */
1312     GEOM_Object MakePrismTwoPnt2Ways (in GEOM_Object theBase,
1313                                       in GEOM_Object thePoint1,
1314                                       in GEOM_Object thePoint2);
1315     /*  \brief The Same as MakePrismTwoPnt but with scaling */
1316     GEOM_Object MakePrismTwoPntWithScaling (in GEOM_Object theBase,
1317                                             in GEOM_Object thePoint1,
1318                                             in GEOM_Object thePoint2,
1319                                             in double      theScaleFactor);
1320
1321     /*!
1322      *  \brief Create a shape by extrusion of the base shape along a vector, defined by DX DY DZ.
1323      *  \param theBase Base shape to be extruded.
1324      *  \param theDX, theDY, theDZ end of extrusion vector.
1325      *  \return New GEOM_Object, containing the created prism.
1326      */
1327     GEOM_Object MakePrismDXDYDZ (in GEOM_Object theBase,
1328                                    in double theDX, in double theDY, in double theDZ);
1329     /*  \brief The same prism but in two directions forward&backward */
1330     GEOM_Object MakePrismDXDYDZ2Ways (in GEOM_Object theBase,
1331                                       in double theDX, in double theDY, in double theDZ);
1332     /*  \brief The Same as MakePrismDXDYDZ but with scaling */
1333     GEOM_Object MakePrismDXDYDZWithScaling (in GEOM_Object theBase,
1334                                             in double theDX, in double theDY, in double theDZ,
1335                                             in double theScaleFactor);
1336
1337
1338     /*!
1339      *  \brief Add / Remove material to / from  a solid by extrusion of the base shape on the given distance.
1340      *  \param theInitShape Initial shape on which to perform the feature.It has to be a solid or 
1341      *   a compound made of a single solid
1342      *  \param theBase Edge or wire defining the base shape to be extruded. 
1343      *  \param theHeight Prism dimension along the normal of the face.
1344      *  \param theAngle Draft angel in degrees
1345      *  \param theFuse If true material is added else material is removed
1346      *  \return New GEOM_Object, containing the modified shape
1347      */
1348     GEOM_Object MakeDraftPrism (in GEOM_Object theInitShape,
1349                                 in GEOM_Object theBase,
1350                                 in double theHeight, 
1351                                 in double theAngle,
1352                                 in boolean theFuse);
1353
1354     /*!
1355      *  \brief Create a shape by extrusion of the base shape along
1356      *  the path shape. The path shape can be a wire or an edge.
1357      *  \param theBase Base shape to be extruded.
1358      *  \param thePath Path shape to extrude the base shape along it.
1359      *  \return New GEOM_Object, containing the created pipe.
1360      */
1361     GEOM_Object MakePipe (in GEOM_Object theBase, in GEOM_Object thePath);
1362
1363     /*!
1364      *  \brief Create a shape by revolution of the base shape around the axis
1365      *  on the given angle. 
1366      *
1367      *  All the space, transfixed by the base
1368      *  shape during its rotation around the axis on the given angle.
1369      *  \param theBase Base shape to be rotated.
1370      *  \param theAxis Rotation axis.
1371      *  \param theAngle Rotation angle in radians.
1372      *  \return New GEOM_Object, containing the created revolution.
1373      */
1374     GEOM_Object MakeRevolutionAxisAngle (in GEOM_Object theBase,
1375                                          in GEOM_Object theAxis,
1376                                          in double theAngle);
1377     /*  The Same Revolution but in both ways forward&backward */
1378     GEOM_Object MakeRevolutionAxisAngle2Ways (in GEOM_Object theBase,
1379                                               in GEOM_Object theAxis,
1380                                               in double theAngle);
1381
1382     /*!
1383      *  \brief Create a filling from the given compound of contours.
1384      *  \param theShape Initial shape on which to perform the feature.
1385      *  \param theMinDeg a minimal degree of BSpline surface to create
1386      *  \param theMaxDeg a maximal degree of BSpline surface to create
1387      *  \param theTol2D a 2d tolerance to be reached
1388      *  \param theTol3D a 3d tolerance to be reached
1389      *  \param theNbIter a number of iteration of approximation algorithm
1390      *  \param theMethod Kind of method to perform filling operation.
1391      *  \param theApprox Boolean indicating if result should be approximated
1392      *  \return New GEOM_Object, containing the created filling surface.
1393      */
1394     GEOM_Object MakeFilling (in GEOM_Object theShape,
1395                              in long theMinDeg, in long theMaxDeg,
1396                              in double theTol2D, in double theTol3D,
1397                              in long theNbIter,
1398                              in filling_oper_method theMethod,
1399                              in boolean theApprox);
1400
1401     /*!
1402      *  \brief Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
1403      *  \param theSeqSections - set of specified sections.
1404      *  \param theModeSolid - mode defining building solid or shell
1405      *  \param thePreci - precision 3D used for smoothing by default 1.e-6
1406      *  \param theRuled - mode defining type of the result surfaces (ruled or smoothed).
1407      *  \return New GEOM_Object, containing the created shell or solid.
1408      */
1409     GEOM_Object MakeThruSections(in ListOfGO theSeqSections,
1410                                  in boolean theModeSolid,
1411                                  in double thePreci,
1412                                  in boolean theRuled);
1413
1414      /*!
1415      *  \brief Create a shape by extrusion of the profile shape along
1416      *  the path shape. 
1417      *
1418      *  The path shape can be a wire or an edge.
1419      *  the several profiles can be specified in the several locations of path.
1420      *  \param theSeqBases - list of  Bases shape to be extruded.
1421      *  \param theLocations - list of locations on the path corresponding
1422      *                        specified list of the Bases shapes. Number of locations
1423      *                        should be equal to number of bases or list of locations can be empty.
1424      *  \param thePath - Path shape to extrude the base shape along it.
1425      *  \param theWithContact - the mode defining that the section is translated to be in
1426      *                          contact with the spine.
1427      *  \param theWithCorrection - defining that the section is rotated to be
1428      *                                 orthogonal to the spine tangent in the correspondent point
1429      *  \return New GEOM_Object, containing the created pipe.
1430      */
1431     GEOM_Object MakePipeWithDifferentSections (in ListOfGO theSeqBases,
1432                                                in ListOfGO theLocations,
1433                                                in GEOM_Object thePath,
1434                                                in boolean theWithContact ,
1435                                                in boolean theWithCorrection );
1436
1437     /*!
1438      *  \brief Create a shape by extrusion of the profile shape along
1439      *  the path shape. 
1440      *
1441      *  The path shape can be a shell or a face.
1442      *  the several profiles can be specified in the several locations of path.
1443      *  \param theSeqBases - list of  Bases shape to be extruded.
1444      *  \param theSeqSubBases - list of corresponding sub-shapes of section shapes.
1445      *  \param theLocations - list of locations on the path corresponding
1446      *                        specified list of the Bases shapes. Number of locations
1447      *                        should be equal to number of bases.
1448      *  \param thePath - Path shape to extrude the base shape along it.
1449      *  \param theWithContact - the mode defining that the section is translated to be in
1450      *                          contact with the spine.
1451      *  \param theWithCorrection - defining that the section is rotated to be
1452      *                                 orthogonal to the spine tangent in the correspondent point
1453      *  \return New GEOM_Object, containing the created pipe.
1454      */
1455     GEOM_Object MakePipeWithShellSections (in ListOfGO theSeqBases,
1456                                            in ListOfGO theSeqSubBases,
1457                                            in ListOfGO theLocations,
1458                                            in GEOM_Object thePath,
1459                                            in boolean theWithContact ,
1460                                            in boolean theWithCorrection );
1461
1462     /*!
1463      *  \brief Create solids between given sections
1464      *  \param theSeqBases - list of sections (shell or face).
1465      *  \param theLocations - list of corresponding vertexes
1466      *  \return New GEOM_Object, containing the created solids.
1467      */
1468     GEOM_Object MakePipeShellsWithoutPath (in ListOfGO theSeqBases,
1469                                            in ListOfGO theLocations);
1470
1471     /*!
1472      *  \brief Create a shape by extrusion of the base shape along
1473      *  the path shape with constant bi-normal direction along the given vector.
1474      *
1475      *  The path shape can be a wire or an edge.
1476      *  \param theBase Base shape to be extruded.
1477      *  \param thePath Path shape to extrude the base shape along it.
1478      *  \param theVec Vector defines a constant binormal direction to keep the
1479      *                same angle beetween the Direction and the sections
1480      *                along the sweep surface.
1481      *  \return New GEOM_Object, containing the created pipe.
1482      */
1483     GEOM_Object MakePipeBiNormalAlongVector (in GEOM_Object theBase,
1484                                              in GEOM_Object thePath,
1485                                              in GEOM_Object theVec);
1486
1487   };
1488
1489  // # GEOM_IShapesOperations
1490   /*!
1491    *  \brief Interface for Shapes creation:
1492    *
1493    *  Edge from two points, Wire from edges, Face from wire,
1494    *  Shell from faces, Solid from shells, Compound from shapes
1495    */
1496   interface GEOM_IShapesOperations : GEOM_IOperations
1497   {
1498     /*!
1499      *  \brief Create a linear edge with specified ends.
1500      *  \param thePnt1 Point for the first end of edge.
1501      *  \param thePnt2 Point for the second end of edge.
1502      *  \return New GEOM_Object, containing the created edge.
1503      */
1504     GEOM_Object MakeEdge (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
1505
1506     /*!
1507      *  \brief Create an edge on another edge, corresponding to the given length on the given edge.
1508      *  \param theRefCurve The referenced edge.
1509      *  \param theLength Length on the referenced edge. It can be
1510      *                   negative for extrapolation on base curve.
1511      *  \param theStartPoint Any vertex close to one of edge's
1512      *                       ends to select start point among them.
1513      *                       If NULL, fist vertex is used.
1514      *  \return New GEOM_Object, containing the created edge.
1515      */
1516     GEOM_Object MakeEdgeOnCurveByLength (in GEOM_Object theRefCurve,
1517                                          in double      theLength,
1518                                          in GEOM_Object theStartPoint);
1519
1520     /*!
1521      *  \brief Create an edge from specified wire.
1522      *  \param theWire source Wire.
1523      *  \param theLinearTolerance linear tolerance value
1524      *  \param theAngularTolerance angular tolerance value
1525      *  \return New GEOM_Object, containing the created edge.
1526      */
1527     GEOM_Object MakeEdgeWire (in GEOM_Object theWire,
1528                               in double theLinearTolerance,
1529                               in double theAngularTolerance);
1530
1531     /*!
1532      *  \brief Create a wire from the set of edges and wires.
1533      *  \param theEdgesAndWires List of edge and/or wires.
1534      *  \param theTolerance Maximum distance between vertices, that will be merged.
1535      *                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
1536      *  \return New GEOM_Object, containing the created wire.
1537      */
1538     GEOM_Object MakeWire (in ListOfGO theEdgesAndWires,
1539                           in double   theTolerance);
1540
1541     /*!
1542      *  \brief Create a face on the given wire.
1543      *  \param theWire closed Wire or Edge to build the face on.
1544      *  \param isPlanarWanted If TRUE, only planar face will be built.
1545      *                        If impossible, NULL object will be returned.
1546      *  \return New GEOM_Object, containing the created face.
1547      */
1548     GEOM_Object MakeFace (in GEOM_Object theWire, in boolean isPlanarWanted);
1549
1550     /*!
1551      *  \brief Create a face on the given wires set.
1552      *  \param theWires List of closed wires or edges to build the face on.
1553      *  \param isPlanarWanted If TRUE, only planar face will be built.
1554      *                        If impossible, NULL object will be returned.
1555      *  \return New GEOM_Object, containing the created face.
1556      */
1557     GEOM_Object MakeFaceWires (in ListOfGO theWires, in boolean isPlanarWanted);
1558
1559     /*!
1560      *  \brief Create a shell from the set of faces and shells.
1561      *  \param theFacesAndShells List of faces and/or shells.
1562      *  \return New GEOM_Object, containing the created shell.
1563      */
1564     GEOM_Object MakeShell (in ListOfGO theFacesAndShells);
1565
1566     /*!
1567      *  \brief Create a solid, bounded by the given shell.
1568      *  \param theShell Bounding shell.
1569      *  \return New GEOM_Object, containing the created solid.
1570      */
1571     GEOM_Object MakeSolidShell (in GEOM_Object theShell);
1572
1573     /*!
1574      *  \brief Create a solid, bounded by the given shells.
1575      *  \param theShells Bounding shells.
1576      *  \return New GEOM_Object, containing the created solid.
1577      */
1578     GEOM_Object MakeSolidShells (in ListOfGO theShells);
1579
1580     /*!
1581      *  \brief Create a compound of the given shapes.
1582      *  \param theShapes List of shapes to put in compound.
1583      *  \return New GEOM_Object, containing the created compound.
1584      */
1585     GEOM_Object MakeCompound (in ListOfGO theShapes);
1586
1587     /*!
1588      *  \brief Replace coincident faces in theShape by one face.
1589      *  \param theShape Initial shape.
1590      *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
1591      *  \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
1592      *  \return New GEOM_Object, containing a copy of theShape without coincident faces.
1593      */
1594     GEOM_Object MakeGlueFaces (in GEOM_Object theShape, in double theTolerance, in boolean doKeepNonSolids);
1595
1596     /*!
1597      *  Find coincident faces in theShape for possible gluing.
1598      *  \param theShape Initial shape.
1599      *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
1600      *  \return ListOfGO
1601      */
1602     ListOfGO GetGlueFaces (in GEOM_Object theShape, in double theTolerance);
1603
1604     /*!
1605      *  \brief Replace coincident faces in theShape by one face
1606      *  in compliance with given list of faces
1607      *  \param theShape Initial shape.
1608      *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
1609      *  \param theFaces List of faces for gluing.
1610      *  \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
1611      *  \param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
1612      *                        will be glued, otherwise only the edges,
1613      *                        belonging to <VAR>theFaces</VAR>.
1614      *  \return New GEOM_Object, containing a copy of theShape without some faces.
1615      */
1616     GEOM_Object MakeGlueFacesByList (in GEOM_Object theShape, in double theTolerance,
1617                                      in ListOfGO theFaces, in boolean doKeepNonSolids,
1618                                      in boolean doGlueAllEdges);
1619
1620     /*!
1621      *  \brief Replace coincident edges in theShape by one edge.
1622      *  \param theShape Initial shape.
1623      *  \param theTolerance Maximum distance between edges, which can be considered as coincident.
1624      *  \return New GEOM_Object, containing a copy of theShape without coincident edges.
1625      */
1626     GEOM_Object MakeGlueEdges (in GEOM_Object theShape, in double theTolerance);
1627
1628     /*!
1629      *  Find coincident edges in theShape for possible gluing.
1630      *  \param theShape Initial shape.
1631      *  \param theTolerance Maximum distance between edges, which can be considered as coincident.
1632      *  \return ListOfGO
1633      */
1634     ListOfGO GetGlueEdges (in GEOM_Object theShape, in double theTolerance);
1635
1636     /*!
1637      *  \brief Replace coincident edges in theShape by one edge
1638      *  in compliance with given list of edges
1639      *  \param theShape Initial shape.
1640      *  \param theTolerance Maximum distance between edges, which can be considered as coincident.
1641      *  \param theEdges List of edges for gluing.
1642      *  \return New GEOM_Object, containing a copy of theShape without some edges.
1643      */
1644     GEOM_Object MakeGlueEdgesByList (in GEOM_Object theShape,
1645                                      in double theTolerance,
1646                                      in ListOfGO theEdges);
1647
1648     /*!
1649      *  \brief Get all sub-shapes and groups of \a theShape,
1650      *  that were created already by any other methods.
1651      *  \param theShape Any shape.
1652      *  \param theGroupsOnly If this parameter is TRUE, only groups will be
1653      *                       returned, else all found sub-shapes and groups.
1654      *  \return List of existing sub-objects of \a theShape.
1655      */
1656     ListOfGO GetExistingSubObjects (in GEOM_Object theShape,
1657                                     in boolean     theGroupsOnly);
1658
1659     /*!
1660      *  \brief Deprecated method. 
1661      *
1662      *  Use MakeAllSubShapes() instead.
1663      */
1664     ListOfGO MakeExplode (in GEOM_Object theShape,
1665                           in long        theShapeType,
1666                           in boolean     isSorted);
1667
1668     /*!
1669      *  \brief Explode a shape on sub-shapes of a given type. 
1670      *
1671      *  If the shape itself has the given type, it is also returned.
1672      *  \param theShape Shape to be exploded.
1673      *  \param theShapeType Type of sub-shapes to be retrieved.
1674      *  \param isSorted If this parameter is TRUE, sub-shapes will be
1675      *                  sorted by coordinates of their gravity centers.
1676      *  \return List of sub-shapes of type theShapeType, contained in theShape.
1677      */
1678     ListOfGO MakeAllSubShapes (in GEOM_Object theShape,
1679                                in long        theShapeType,
1680                                in boolean     isSorted);
1681
1682     /*!
1683      *  \brief Extract all sub-shapes of the given type from
1684      *  the given shape, excluding the shape itself.
1685      *  \param theShape Shape to be exploded.
1686      *  \param theShapeType Type of sub-shapes to be retrieved.
1687      *  \param isSorted If this parameter is TRUE, sub-shapes will be
1688      *                  sorted by coordinates of their gravity centers.
1689      *  \return List of sub-shapes of type theShapeType, contained in theShape.
1690      */
1691     ListOfGO ExtractSubShapes (in GEOM_Object theShape,
1692                                in long        theShapeType,
1693                                in boolean     isSorted);
1694
1695     /*!
1696      *  \brief Deprecated method. Use GetAllSubShapesIDs() instead.
1697      */
1698     ListOfLong SubShapeAllIDs (in GEOM_Object theShape,
1699                                in long        theShapeType,
1700                                in boolean     isSorted);
1701
1702     /*!
1703      *  \brief Explode a shape on sub-shapes of a given type.
1704      *
1705      *  Does the same, as MakeAllSubShapes, but returns IDs of
1706      *  sub-shapes, not GEOM_Object. It works faster.
1707      *  \param theShape Shape to be exploded.
1708      *  \param theShapeType Type of sub-shapes to be retrieved.
1709      *  \param isSorted If this parameter is TRUE, sub-shapes will be
1710      *                  sorted by coordinates of their gravity centers.
1711      *  \return List of IDs of sub-shapes of type theShapeType, contained in theShape.
1712      */
1713     ListOfLong GetAllSubShapesIDs (in GEOM_Object theShape,
1714                                    in long        theShapeType,
1715                                    in boolean     isSorted);
1716
1717     /*!
1718      *  \brief Get a sub-shape defined by its unique ID inside \a theMainShape
1719      *  \param theMainShape Main shape.
1720      *  \param theID Unique ID of sub-shape inside \a theMainShape.
1721      *  \return GEOM_Object, corresponding to found sub-shape.
1722      *  \note The sub-shape GEOM_Object can has ONLY ONE function.
1723      *        Don't try to apply modification operations (without copy) on them.
1724      */
1725     GEOM_Object GetSubShape (in GEOM_Object theMainShape,
1726                              in long        theID);
1727
1728     /*!
1729      *  \brief Get a set of sub-shapes defined by their unique IDs inside \a theMainShape
1730      *  \param theMainShape Main shape.
1731      *  \param theIndices List of unique IDs of sub-shapes inside \a theMainShape.
1732      *  \return List of GEOM_Object, corresponding to found sub-shapes.
1733      *  \note The sub-shape GEOM_Object can has ONLY ONE function.
1734      *        Don't try to apply modification operations (without copy) on them.
1735      */
1736     ListOfGO MakeSubShapes (in GEOM_Object theMainShape,
1737                             in ListOfLong  theIndices);
1738
1739     /*!
1740      *  Get global index of \a theSubShape in \a theMainShape.
1741      *  \param theMainShape Main shape.
1742      *  \param theSubShape Sub-shape of the main shape.
1743      *  \return global index of \a theSubShape in \a theMainShape.
1744      */
1745     long GetSubShapeIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
1746
1747     /*!
1748      *  \brief Get index of \a theSubShape in \a theMainShape, unique among sub-shapes of the same type.
1749      *
1750      *  Together with method <VAR>GetShapeTypeString()</VAR> it can be used
1751      *  to generate automatic names for sub-shapes, when publishing them in a study.
1752      *  \param theMainShape Main shape.
1753      *  \param theSubShape Sub-shape of the main shape.
1754      *  \return index of \a theSubShape in a list of all sub-shapes of \a theMainShape of the same type.
1755      */
1756     long GetTopologyIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
1757
1758     /*!
1759      *  \brief Get name of type of \a theShape.
1760      *
1761      *  Use wide type notation, taking into consideration both topology and geometry of the shape.
1762      *  Together with method <VAR>GetTopologyIndex()</VAR> it can be used
1763      *  to generate automatic names for sub-shapes, when publishing them in a study.
1764      *  \param theShape The shape to get a type of.
1765      *  \return String, containing a type name of \a theShape.
1766      */
1767     string GetShapeTypeString (in GEOM_Object theShape);
1768
1769     /*!
1770      *  \brief Count number of faces in the given shape.
1771      *  \param theShape Shape to count faces in.
1772      *  \return Number of faces in the given shape.
1773      */
1774     long NumberOfFaces (in GEOM_Object theShape);
1775
1776     /*!
1777      *  \brief Count number of edges in the given shape.
1778      *  \param theShape Shape to count edges in.
1779      *  \return Number of edges in theShape.
1780      */
1781     long NumberOfEdges (in GEOM_Object theShape);
1782
1783     /*!
1784      *  \brief Count number of sub-shapes of type \a theShapeType in the given shape.
1785      *  \param theShape Shape to count sub-shapes in.
1786      *  \param theShapeType The type of sub-shapes to count.
1787      *  \return Number of sub-shapes of type \a theShapeType in \a theShape.
1788      */
1789     long NumberOfSubShapes (in GEOM_Object theShape,
1790                             in long        theShapeType);
1791
1792     /*!
1793      *  Reverses an orientation the given shape.
1794      *  \param theShape Shape to be reversed.
1795      *  \return The reversed copy of theShape.
1796      */
1797     GEOM_Object ChangeOrientation (in GEOM_Object theShape);
1798
1799     /*!
1800      *  \brief Retrieve all free faces from the given shape.
1801      *
1802      *  Free face is a face, which is not shared between two shells of the shape.
1803      *  \param theShape Shape to find free faces in.
1804      *  \return List of IDs of all free faces, contained in theShape.
1805      */
1806     ListOfLong GetFreeFacesIDs (in GEOM_Object theShape);
1807
1808     /*!
1809      *  \brief Get all sub-shapes of theShape1 of the given type, shared with theShape2.
1810      *  \param theShape1 Shape to find sub-shapes in.
1811      *  \param theShape2 Shape to find shared sub-shapes with.
1812      *  \param theShapeType Type of sub-shapes to be retrieved.
1813      *  \return List of sub-shapes of theShape1, shared with theShape2.
1814      */
1815     ListOfGO GetSharedShapes (in GEOM_Object theShape1,
1816                               in GEOM_Object theShape2,
1817                               in long        theShapeType);
1818
1819     /*!
1820      *  \brief Get all sub-shapes, shared by all shapes in the list \a theShapes.
1821      *  \param theShapes Shapes to find common sub-shapes of.
1822      *  \param theShapeType Type of sub-shapes to be retrieved.
1823      *  \return List of objects, that are sub-shapes of all given shapes.
1824      */
1825     ListOfGO GetSharedShapesMulti (in ListOfGO theShapes,
1826                                    in long     theShapeType);
1827
1828     /*!
1829      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1830      *  the specified plane by the certain way, defined through \a theState parameter.
1831      *  \param theShape Shape to find sub-shapes of.
1832      *  \param theShapeType Type of sub-shapes to be retrieved.
1833      *  \param theAx1 Vector (or line, or linear edge), specifying normal
1834      *                direction and location of the plane to find shapes on.
1835      *  \param theState The state of the sub-shapes to find.
1836      *  \return List of all found sub-shapes.
1837      */
1838     ListOfGO GetShapesOnPlane (in GEOM_Object theShape,
1839                                in long        theShapeType,
1840                                in GEOM_Object theAx1,
1841                                in shape_state theState);
1842     /*!
1843      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1844      *  the specified plane by the certain way, defined through \a theState parameter.
1845      *  \param theShape Shape to find sub-shapes of.
1846      *  \param theShapeType Type of sub-shapes to be retrieved.
1847      *  \param theAx1 Vector (or line, or linear edge), specifying normal
1848      *                direction of the plane to find shapes on.
1849      *  \param thePnt Point specifying location of the plane to find shapes on.
1850      *  \param theState The state of the sub-shapes to find.
1851      *  \return List of all found sub-shapes.
1852      */
1853     ListOfGO GetShapesOnPlaneWithLocation (in GEOM_Object theShape,
1854                                            in long        theShapeType,
1855                                            in GEOM_Object theAx1,
1856                                            in GEOM_Object thePnt,
1857                                            in shape_state theState);
1858
1859
1860
1861     /*!
1862      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1863      *  the specified cylinder by the certain way, defined through \a theState parameter.
1864      *  \param theShape Shape to find sub-shapes of.
1865      *  \param theShapeType Type of sub-shapes to be retrieved.
1866      *  \param theAxis Vector (or line, or linear edge), specifying
1867      *                 axis of the cylinder to find shapes on.
1868      *  \param theRadius Radius of the cylinder to find shapes on.
1869      *  \param theState The state of the sub-shapes to find.
1870      *  \return List of all found sub-shapes.
1871      */
1872     ListOfGO GetShapesOnCylinder (in GEOM_Object theShape,
1873                                   in long        theShapeType,
1874                                   in GEOM_Object theAxis,
1875                                   in double      theRadius,
1876                                   in shape_state theState);
1877
1878     /*!
1879      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1880      *  the specified cylinder by the certain way, defined through \a theState parameter.
1881      *  \param theShape Shape to find sub-shapes of.
1882      *  \param theShapeType Type of sub-shapes to be retrieved.
1883      *  \param theAxis Vector (or line, or linear edge), specifying
1884      *                 axis of the cylinder to find shapes on.
1885      *  \param thePnt Point specifying location of the bottom of the cylinder.
1886      *  \param theRadius Radius of the cylinder to find shapes on.
1887      *  \param theState The state of the sub-shapes to find.
1888      *  \return List of all found sub-shapes.
1889      */
1890     ListOfGO GetShapesOnCylinderWithLocation (in GEOM_Object theShape,
1891                                               in long        theShapeType,
1892                                               in GEOM_Object theAxis,
1893                                               in GEOM_Object thePnt,
1894                                               in double      theRadius,
1895                                               in shape_state theState);
1896
1897     /*!
1898      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1899      *  the specified sphere by the certain way, defined through \a theState parameter.
1900      *  \param theShape Shape to find sub-shapes of.
1901      *  \param theShapeType Type of sub-shapes to be retrieved.
1902      *  \param theCenter Point, specifying center of the sphere to find shapes on.
1903      *  \param theRadius Radius of the sphere to find shapes on.
1904      *  \param theState The state of the sub-shapes to find.
1905      *  \return List of all found sub-shapes.
1906      */
1907     ListOfGO GetShapesOnSphere (in GEOM_Object theShape,
1908                                 in long        theShapeType,
1909                                 in GEOM_Object theCenter,
1910                                 in double      theRadius,
1911                                 in shape_state theState);
1912
1913     /*!
1914      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1915      *  the specified quadrangle by the certain way, defined through \a theState parameter.
1916      *  \param theShape Shape to find sub-shapes of.
1917      *  \param theShapeType Type of sub-shapes to be retrieved.
1918      *  \param theTopLeftPoint Top left quadrangle corner
1919      *  \param theTopRigthPoint Top right quadrangle corner
1920      *  \param theBottomLeftPoint Bottom left quadrangle corner
1921      *  \param theBottomRigthPoint Bottom right quadrangle corner
1922      *  \param theState The state of the sub-shapes to find.
1923      *  \return List of all found sub-shapes.
1924      */
1925     ListOfGO GetShapesOnQuadrangle (in GEOM_Object theShape,
1926                                     in long        theShapeType,
1927                                     in GEOM_Object theTopLeftPoint,
1928                                     in GEOM_Object theTopRigthPoint,
1929                                     in GEOM_Object theBottomLeftPoint,
1930                                     in GEOM_Object theBottomRigthPoint,
1931                                     in shape_state theState);
1932
1933     /*!
1934      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1935      *  the specified plane by the certain way, defined through \a theState parameter.
1936      *  \param theShape Shape to find sub-shapes of.
1937      *  \param theShapeType Type of sub-shapes to be retrieved.
1938      *  \param theAx1 Vector (or line, or linear edge), specifying normal
1939      *                direction and location of the plane to find shapes on.
1940      *  \param theState The state of the sub-shapes to find.
1941      *  \return List of IDs of all found sub-shapes.
1942      */
1943     ListOfLong GetShapesOnPlaneIDs (in GEOM_Object theShape,
1944                                     in long        theShapeType,
1945                                     in GEOM_Object theAx1,
1946                                     in shape_state theState);
1947
1948     /*!
1949      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1950      *  the specified plane by the certain way, defined through \a theState parameter.
1951      *  \param theShape Shape to find sub-shapes of.
1952      *  \param theShapeType Type of sub-shapes to be retrieved.
1953      *  \param theAx1 Vector (or line, or linear edge), specifying normal
1954      *                direction of the plane to find shapes on.
1955      *  \param thePnt Point specifying location of the plane to find shapes on.
1956      *  \param theState The state of the sub-shapes to find.
1957      *  \return List of IDs of all found sub-shapes.
1958      */
1959     ListOfLong GetShapesOnPlaneWithLocationIDs (in GEOM_Object theShape,
1960                                                 in long        theShapeType,
1961                                                 in GEOM_Object theAx1,
1962                                                 in GEOM_Object thePnt,
1963                                                 in shape_state theState);
1964
1965     /*!
1966      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1967      *  the specified cylinder by the certain way, defined through \a theState parameter.
1968      *  \param theShape Shape to find sub-shapes of.
1969      *  \param theShapeType Type of sub-shapes to be retrieved.
1970      *  \param theAxis Vector (or line, or linear edge), specifying
1971      *                 axis of the cylinder to find shapes on.
1972      *  \param theRadius Radius of the cylinder to find shapes on.
1973      *  \param theState The state of the sub-shapes to find.
1974      *  \return List of IDs of all found sub-shapes.
1975      */
1976     ListOfLong GetShapesOnCylinderIDs (in GEOM_Object theShape,
1977                                        in long        theShapeType,
1978                                        in GEOM_Object theAxis,
1979                                        in double      theRadius,
1980                                        in shape_state theState);
1981
1982     /*!
1983      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1984      *  the specified cylinder by the certain way, defined through \a theState parameter.
1985      *  \param theShape Shape to find sub-shapes of.
1986      *  \param theShapeType Type of sub-shapes to be retrieved.
1987      *  \param theAxis Vector (or line, or linear edge), specifying
1988      *                 axis of the cylinder to find shapes on.
1989      *  \param thePnt Point specifying location of the bottom of the cylinder.
1990      *  \param theRadius Radius of the cylinder to find shapes on.
1991      *  \param theState The state of the sub-shapes to find.
1992      *  \return List of IDs all found sub-shapes.
1993      */
1994     ListOfLong GetShapesOnCylinderWithLocationIDs (in GEOM_Object theShape,
1995                                                    in long        theShapeType,
1996                                                    in GEOM_Object theAxis,
1997                                                    in GEOM_Object thePnt,
1998                                                    in double      theRadius,
1999                                                    in shape_state theState);
2000
2001     /*!
2002      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2003      *  the specified sphere by the certain way, defined through \a theState parameter.
2004      *  \param theShape Shape to find sub-shapes of.
2005      *  \param theShapeType Type of sub-shapes to be retrieved.
2006      *  \param theCenter Point, specifying center of the sphere to find shapes on.
2007      *  \param theRadius Radius of the sphere to find shapes on.
2008      *  \param theState The state of the sub-shapes to find.
2009      *  \return List of IDs of all found sub-shapes.
2010      */
2011     ListOfLong GetShapesOnSphereIDs (in GEOM_Object theShape,
2012                                      in long        theShapeType,
2013                                      in GEOM_Object theCenter,
2014                                      in double      theRadius,
2015                                      in shape_state theState);
2016
2017     /*!
2018      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2019      *  the specified quadrangle by the certain way, defined through \a theState parameter.
2020      *  \param theShape Shape to find sub-shapes of.
2021      *  \param theShapeType Type of sub-shapes to be retrieved.
2022      *  \param theTopLeftPoint Top left quadrangle corner
2023      *  \param theTopRigthPoint Top right quadrangle corner
2024      *  \param theBottomLeftPoint Bottom left quadrangle corner
2025      *  \param theBottomRigthPoint Bottom right quadrangle corner
2026      *  \param theState The state of the sub-shapes to find.
2027      *  \return List of IDs of all found sub-shapes.
2028      */
2029     ListOfLong GetShapesOnQuadrangleIDs (in GEOM_Object theShape,
2030                                          in long        theShapeType,
2031                                          in GEOM_Object theTopLeftPoint,
2032                                          in GEOM_Object theTopRigthPoint,
2033                                          in GEOM_Object theBottomLeftPoint,
2034                                          in GEOM_Object theBottomRigthPoint,
2035                                          in shape_state theState);
2036
2037     /*!
2038      * \brief Find sub-shapes complying with given status
2039      * \param theBox - the box to check state of sub-shapes against
2040      * \param theShape - the shape to explore
2041      * \param theShapeType - type of sub-shape of theShape
2042      * \param theState - required state
2043      * \return List of IDs of all found sub-shapes.
2044      */
2045     ListOfLong GetShapesOnBoxIDs (in GEOM_Object theBox,
2046                                   in GEOM_Object theShape,
2047                                   in long        theShapeType,
2048                                   in shape_state theState);
2049
2050     /*!
2051      * \brief Find sub-shapes complying with given status
2052      * \param theBox - the box to check state of sub-shapes against
2053      * \param theShape - the shape to explore
2054      * \param theShapeType - type of sub-shape of theShape
2055      * \param theState - required state
2056      * \return List of all found sub-shapes.
2057      */
2058     ListOfGO GetShapesOnBox (in GEOM_Object theBox,
2059                              in GEOM_Object theShape,
2060                              in long        theShapeType,
2061                              in shape_state theState);
2062
2063     /*!
2064      * \brief Find sub-shapes complying with given status
2065      * \param theCheckShape - the shape to check state of sub-shapes against. It must be a solid.
2066      * \param theShape - the shape to explore
2067      * \param theShapeType - type of sub-shape of theShape
2068      * \param theState - required state
2069      * \return List of IDs of all found sub-shapes.
2070      */
2071     ListOfLong GetShapesOnShapeIDs (in GEOM_Object theCheckShape,
2072                                     in GEOM_Object theShape,
2073                                     in short       theShapeType,
2074                                     in shape_state theState);
2075
2076     /*!
2077      * \brief Find sub-shapes complying with given status
2078      * \param theCheckShape - the shape to check state of sub-shapes against. It must be a solid.
2079      * \param theShape - the shape to explore
2080      * \param theShapeType - type of sub-shape of theShape
2081      * \param theState - required state
2082      * \return List of all found sub-shapes.
2083      */
2084     ListOfGO GetShapesOnShape (in GEOM_Object theCheckShape,
2085                                in GEOM_Object theShape,
2086                                in short       theShapeType,
2087                                in shape_state theState);
2088
2089     /*!
2090      * \brief Find sub-shapes complying with given status
2091      * \param theCheckShape - the shape to check state of sub-shapes against. It must be a solid.
2092      * \param theShape - the shape to explore
2093      * \param theShapeType - type of sub-shape of theShape
2094      * \param theState - required state
2095      * \return compound includes all found sub-shapes.
2096      */
2097     GEOM_Object GetShapesOnShapeAsCompound (in GEOM_Object theCheckShape,
2098                                             in GEOM_Object theShape,
2099                                             in short       theShapeType,
2100                                             in shape_state theState);
2101
2102     /*!
2103      *  \brief Get sub-shape(s) of \a theShapeWhere, which are
2104      *  coincident with \a theShapeWhat or could be a part of it.
2105      *  \param theShapeWhere Shape to find sub-shapes of.
2106      *  \param theShapeWhat Shape, specifying what to find.
2107      *  \return Group of all found sub-shapes or a single found sub-shape.
2108      */
2109     GEOM_Object GetInPlace (in GEOM_Object theShapeWhere,
2110                             in GEOM_Object theShapeWhat);
2111
2112     /*!
2113      *  Old implementation of GetInPlace functionality, based on shape properties.
2114      */
2115     GEOM_Object GetInPlaceOld (in GEOM_Object theShapeWhere,
2116                                in GEOM_Object theShapeWhat);
2117
2118     /*!
2119      *  \brief Get sub-shape(s) of \a theShapeWhere, which are
2120      *  coincident with \a theShapeWhat or could be a part of it.
2121      *
2122      *  Implementation of this method is based on a saved history of an operation,
2123      *  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
2124      *  arguments (an argument shape or a sub-shape of an argument shape).
2125      *  The operation could be the Partition or one of boolean operations,
2126      *  performed on simple shapes (not on compounds).
2127      *
2128      *  \param theShapeWhere Shape to find sub-shapes of.
2129      *  \param theShapeWhat Shape, specifying what to find.
2130      *  \return Group of all found sub-shapes or a single found sub-shape.
2131      */
2132     GEOM_Object GetInPlaceByHistory (in GEOM_Object theShapeWhere,
2133                                      in GEOM_Object theShapeWhat);
2134
2135     /*!
2136      *  \brief Get sub-shape of theShapeWhere, which are
2137      *  coincident with \a theShapeWhat that can either SOLID, FACE, EDGE or VERTEX.
2138      *  \param theShapeWhere Shape to find sub-shapes of.
2139      *  \param theShapeWhat Shape, specifying what to find.
2140      *  \return found sub-shape.
2141      */
2142     GEOM_Object GetSame (in GEOM_Object theShapeWhere,
2143                                 in GEOM_Object theShapeWhat);
2144
2145     /*!
2146      *  \brief Get sub-shape Ids of theShapeWhere, which are
2147      *   coincident with \a theShapeWhat that can either SOLID, FACE, EDGE or VERTEX.
2148      *  \param theShapeWhere Shape to find sub-shapes of.
2149      *  \param theShapeWhat Shape, specifying what to find.
2150      *  \return found sub-shape Ids.
2151      */
2152     ListOfLong GetSameIDs (in GEOM_Object theShapeWhere,
2153                            in GEOM_Object theShapeWhat);
2154
2155   };
2156
2157  // # GEOM_IBlocksOperations: 
2158   /*!
2159    *  \brief Interface for Blocks construction
2160    *  Face from points or edges, Block from faces,
2161    *  Blocks multi-translation and multi-rotation
2162    */
2163   interface GEOM_IBlocksOperations : GEOM_IOperations
2164   {
2165    
2166   //  # Creation of blocks
2167
2168     /*!
2169      *  \brief Create a quadrangle face from four edges. Order of Edges is not
2170      *  important. It is  not necessary that edges share the same vertex.
2171      *  \param theEdge1,theEdge2,theEdge3,theEdge4 Edges for the face bound.
2172      *  \return New GEOM_Object, containing the created face.
2173      */
2174     GEOM_Object MakeQuad (in GEOM_Object theEdge1,
2175                           in GEOM_Object theEdge2,
2176                           in GEOM_Object theEdge3,
2177                           in GEOM_Object theEdge4);
2178
2179     /*!
2180      *  \brief Create a quadrangle face on two edges.
2181      *
2182      *  The missing edges will be built by creating the shortest ones.
2183      *  \param theEdge1,theEdge2 Two opposite edges for the face.
2184      *  \return New GEOM_Object, containing the created face.
2185      */
2186     GEOM_Object MakeQuad2Edges (in GEOM_Object theEdge1,
2187                                 in GEOM_Object theEdge2);
2188
2189     /*!
2190      *  \brief Create a quadrangle face with specified corners.
2191      *
2192      *  The missing edges will be built by creating the shortest ones.
2193      *  \param thePnt1,thePnt2,thePnt3,thePnt4 Corner vertices for the face.
2194      *  \return New GEOM_Object, containing the created face.
2195      */
2196     GEOM_Object MakeQuad4Vertices (in GEOM_Object thePnt1,
2197                                    in GEOM_Object thePnt2,
2198                                    in GEOM_Object thePnt3,
2199                                    in GEOM_Object thePnt4);
2200
2201     /*!
2202      *  \brief Create a hexahedral solid, bounded by the six given faces. Order of
2203      *  faces is not important. 
2204      *
2205      *  It is  not necessary that Faces share the same edge.
2206      *  \param theFace1,theFace2,theFace3,theFace4,theFace5,theFace6 Faces for the hexahedral solid.
2207      *  \return New GEOM_Object, containing the created solid.
2208      */
2209     GEOM_Object MakeHexa (in GEOM_Object theFace1,
2210                           in GEOM_Object theFace2,
2211                           in GEOM_Object theFace3,
2212                           in GEOM_Object theFace4,
2213                           in GEOM_Object theFace5,
2214                           in GEOM_Object theFace6);
2215
2216     /*!
2217      *  \brief Create a hexahedral solid between two given faces.
2218      *
2219      *  The missing faces will be built by creating the smallest ones.
2220      *  \param theFace1,theFace2 Two opposite faces for the hexahedral solid.
2221      *  \return New GEOM_Object, containing the created solid.
2222      */
2223     GEOM_Object MakeHexa2Faces (in GEOM_Object theFace1,
2224                                 in GEOM_Object theFace2);
2225
2226     
2227   //  # Extract elements of blocks and blocks compounds
2228      
2229
2230     /*!
2231      *  \brief Get a vertex, found in the given shape by its coordinates.
2232      *  \param theShape Block or a compound of blocks.
2233      *  \param theX,theY,theZ Coordinates of the sought vertex.
2234      *  \param theEpsilon Maximum allowed distance between the resulting
2235      *                    vertex and point with the given coordinates.
2236      *  \return New GEOM_Object, containing the found vertex.
2237      */
2238     GEOM_Object GetPoint (in GEOM_Object theShape,
2239                           in double      theX,
2240                           in double      theY,
2241                           in double      theZ,
2242                           in double      theEpsilon);
2243
2244     /*!
2245      *  \brief Find a vertex of the given shape, which has minimal distance to the given point.
2246      *  \param theShape Any shape.
2247      *  \param thePoint Point, close to the desired vertex.
2248      *  \return New GEOM_Object, containing the found vertex.
2249      */
2250     GEOM_Object GetVertexNearPoint (in GEOM_Object theShape,
2251                                     in GEOM_Object thePoint);
2252
2253     /*!
2254      *  \brief Get an edge, found in the given shape by two given vertices.
2255      *  \param theShape Block or a compound of blocks.
2256      *  \param thePoint1,thePoint2 Points, close to the ends of the desired edge.
2257      *  \return New GEOM_Object, containing the found edge.
2258      */
2259     GEOM_Object GetEdge (in GEOM_Object theShape,
2260                          in GEOM_Object thePoint1,
2261                          in GEOM_Object thePoint2);
2262
2263     /*!
2264      *  \brief Find an edge of the given shape, which has minimal distance to the given point.
2265      *  \param theShape Block or a compound of blocks.
2266      *  \param thePoint Point, close to the desired edge.
2267      *  \return New GEOM_Object, containing the found edge.
2268      */
2269     GEOM_Object GetEdgeNearPoint (in GEOM_Object theShape,
2270                                   in GEOM_Object thePoint);
2271
2272     /*!
2273      *  \brief Returns a face, found in the given shape by four given corner vertices.
2274      *  \param theShape Block or a compound of blocks.
2275      *  \param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
2276      *  \return New GEOM_Object, containing the found face.
2277      */
2278     GEOM_Object GetFaceByPoints (in GEOM_Object theShape,
2279                                  in GEOM_Object thePoint1,
2280                                  in GEOM_Object thePoint2,
2281                                  in GEOM_Object thePoint3,
2282                                  in GEOM_Object thePoint4);
2283
2284     /*!
2285      *  \brief Get a face of block, found in the given shape by two given edges.
2286      *  \param theShape Block or a compound of blocks.
2287      *  \param theEdge1,theEdge2 Edges, close to the edges of the desired face.
2288      *  \return New GEOM_Object, containing the found face.
2289      */
2290     GEOM_Object GetFaceByEdges (in GEOM_Object theShape,
2291                                 in GEOM_Object theEdge1,
2292                                 in GEOM_Object theEdge2);
2293
2294     /*!
2295      *  \brief Find a face, opposite to the given one in the given block.
2296      *  \param theBlock Must be a hexahedral solid.
2297      *  \param theFace Face of \a theBlock, opposite to the desired face.
2298      *  \return New GEOM_Object, containing the found face.
2299      */
2300     GEOM_Object GetOppositeFace (in GEOM_Object theBlock,
2301                                  in GEOM_Object theFace);
2302
2303     /*!
2304      *  \brief Find a face of the given shape, which has minimal distance to the given point.
2305      *  \param theShape Block or a compound of blocks.
2306      *  \param thePoint Point, close to the desired face.
2307      *  \return New GEOM_Object, containing the found face.
2308      */
2309     GEOM_Object GetFaceNearPoint (in GEOM_Object theShape,
2310                                   in GEOM_Object thePoint);
2311
2312     /*!
2313      *  \brief Find a face of block, whose outside normale has minimal angle with the given vector.
2314      *  \param theBlock Block or a compound of blocks.
2315      *  \param theVector Vector, close to the normale of the desired face.
2316      *  \return New GEOM_Object, containing the found face.
2317      */
2318     GEOM_Object GetFaceByNormale (in GEOM_Object theBlock,
2319                                   in GEOM_Object theVector);
2320
2321     /*!
2322      *  \brief Find all sub-shapes of type \a theShapeType of the given shape,
2323      *  which have minimal distance to the given point.
2324      *  \param theShape Any shape.
2325      *  \param thePoint Point, close to the desired shape.
2326      *  \param theShapeType Defines what kind of sub-shapes is searched.
2327      *  \param theTolerance The tolerance for distances comparison. All shapes
2328      *                      with distances to the given point in interval
2329      *                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
2330      *  \return New GEOM_Object, containing a group of all found shapes.
2331      */
2332     GEOM_Object GetShapesNearPoint (in GEOM_Object theShape,
2333                                     in GEOM_Object thePoint,
2334                                     in long        theShapeType,
2335                                     in double      theTolerance);
2336
2337    //  #  Extract blocks from blocks compounds
2338      
2339
2340     /*!
2341      *  \brief Check, if the compound contains only specified blocks.
2342      *  \param theCompound The compound to check.
2343      *  \param theMinNbFaces If solid has lower number of faces, it is not a block.
2344      *  \param theMaxNbFaces If solid has higher number of faces, it is not a block.
2345      *    \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
2346      *  \param theNbBlocks Number of specified blocks in theCompound.
2347      *  \return TRUE, if the given compound contains only blocks.
2348      */
2349     boolean IsCompoundOfBlocks (in GEOM_Object theCompound,
2350                                 in long        theMinNbFaces,
2351                                 in long        theMaxNbFaces,
2352                                 out long       theNbBlocks);
2353
2354     /*!
2355      *  \brief Enumeration of Blocks Compound defects.
2356      */
2357     enum BCErrorType
2358     {
2359       /* Each element of the compound should be a Block */
2360       NOT_BLOCK,
2361
2362       /* An element is a potential block, but has degenerated and/or seam edge(s). */
2363       EXTRA_EDGE,
2364
2365       /* A connection between two Blocks should be an entire face or an entire edge */
2366       INVALID_CONNECTION,
2367
2368       /* The compound should be connexe */
2369       NOT_CONNECTED,
2370
2371       /* The glue between two quadrangle faces should be applied */
2372       NOT_GLUED
2373     };
2374
2375     /*!
2376      *  \brief Description of Blocks Compound defect: type and incriminated sub-shapes.
2377      */
2378     struct BCError
2379     {
2380       BCErrorType error;
2381       ListOfLong  incriminated;
2382     };
2383
2384     /*!
2385      *  \brief Sequence of all Blocks Compound defects.
2386      */
2387     typedef sequence<BCError> BCErrors;
2388
2389     /*!
2390      *  \brief Check, if the compound of blocks is given.
2391      *
2392      *  To be considered as a compound of blocks, the
2393      *  given shape must satisfy the following conditions:
2394      *  - Each element of the compound should be a Block (6 faces and 12 edges).
2395      *  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
2396      *  - The compound should be connexe.
2397      *  - The glue between two quadrangle faces should be applied.
2398      *    \note Single block is also accepted as a valid compound of blocks.
2399      *  \param theCompound The compound to check.
2400      *  \param theErrors Structure, containing discovered errors and incriminated sub-shapes.
2401      *  \return TRUE, if the given shape is a compound of blocks.
2402      */
2403     boolean CheckCompoundOfBlocks (in GEOM_Object theCompound,
2404                                    out BCErrors   theErrors);
2405
2406     /*!
2407      *  \brief Convert sequence of Blocks Compound errors, returned by
2408      *  <VAR>CheckCompoundOfBlocks()</VAR>, into string.
2409      *  \param theCompound The bad compound.
2410      *  \param theErrors The sequence of \a theCompound errors.
2411      *  \return String, describing all the errors in form, suitable for printing.
2412      */
2413     string PrintBCErrors (in GEOM_Object theCompound,
2414                           in BCErrors    theErrors);
2415
2416     /*!
2417      *  \brief Retrieve all non blocks solids and faces from a shape.
2418      *
2419      *  \param theShape The shape to explore.
2420      *  \param theNonQuads Output parameter. Group of all non quadrangular faces.
2421      *
2422      *  \return Group of all non block solids (= not 6 faces, or with 6
2423      *          faces, but with the presence of non-quadrangular faces).
2424      */
2425     GEOM_Object GetNonBlocks (in GEOM_Object theShape, out GEOM_Object theNonQuads);
2426
2427     /*!
2428      *  \brief Remove all seam and degenerated edges from \a theShape.
2429      *
2430      *  Unite faces and edges, sharing one surface.
2431      *  \param theShape The compound or single solid to remove irregular edges from.
2432      *  \param theOptimumNbFaces If more than zero, unite faces only for those solids,
2433      *         that have more than theOptimumNbFaces faces. If zero, unite faces always,
2434      *         regardsless their quantity in the solid. If negative, do not unite faces at all.
2435      *         For blocks repairing recommended value is 6.
2436      *  \return Improved shape.
2437      */
2438     GEOM_Object RemoveExtraEdges (in GEOM_Object theShape,
2439                                   in long        theOptimumNbFaces);
2440
2441     /*!
2442      *  \brief Check, if the given shape is a blocks compound.
2443      *
2444      *  Fix all detected errors.
2445      *    \note Single block can be also fixed by this method.
2446      *  \param theCompound The compound to check and improve.
2447      *  \return Improved compound.
2448      */
2449     GEOM_Object CheckAndImprove (in GEOM_Object theCompound);
2450
2451     /*!
2452      *  \brief Get all the blocks, contained in the given compound.
2453      *
2454      *  \param theCompound The compound to explode.
2455      *  \param theMinNbFaces If solid has lower number of faces, it is not a block.
2456      *  \param theMaxNbFaces If solid has higher number of faces, it is not a block.
2457      *    \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
2458      *  \return List of GEOM_Object, containing the retrieved blocks.
2459      */
2460     ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound,
2461                                       in long        theMinNbFaces,
2462                                       in long        theMaxNbFaces);
2463
2464     /*!
2465      *  \brief Find block, containing the given point inside its volume or on boundary.
2466      *  \param theCompound Compound, to find block in.
2467      *  \param thePoint Point, close to the desired block. If the point lays on
2468      *         boundary between some blocks, we return block with nearest center.
2469      *  \return New GEOM_Object, containing the found block.
2470      */
2471     GEOM_Object GetBlockNearPoint (in GEOM_Object theCompound,
2472                                    in GEOM_Object thePoint);
2473
2474     /*!
2475      *  \brief Find block, containing all the elements, passed as the parts, or maximum quantity of them.
2476      *  \param theCompound Compound, to find block in.
2477      *  \param theParts List of faces and/or edges and/or vertices to be parts of the found block.
2478      *  \return New GEOM_Object, containing the found block.
2479      */
2480     GEOM_Object GetBlockByParts (in GEOM_Object theCompound,
2481                                  in ListOfGO    theParts);
2482
2483     /*!
2484      *  \brief Return all blocks, containing all the elements, passed as the parts.
2485      *  \param theCompound Compound, to find blocks in.
2486      *  \param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
2487      *  \return List of GEOM_Object, containing the found blocks.
2488      */
2489     ListOfGO GetBlocksByParts (in GEOM_Object theCompound,
2490                                in ListOfGO    theParts);
2491
2492   // #  Operations on blocks with gluing of result
2493
2494     /*!
2495      *  \brief Multi-transformate block and glue the result.
2496      *
2497      *  Transformation is defined so, as to superpose theDirFace1 with theDirFace2.
2498      *  \param theBlock Hexahedral solid to be multi-transformed.
2499      *  \param theDirFace1 First direction face global index.
2500      *  \param theDirFace2 Second direction face global index.
2501      *  \param theNbTimes Quantity of transformations to be done.
2502      *    \note Global index of sub-shape can be obtained, using method
2503      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2504      *  \return New GEOM_Object, containing the result shape.
2505      */
2506     GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock,
2507                                            in long        theDirFace1,
2508                                            in long        theDirFace2,
2509                                            in long        theNbTimes);
2510
2511     /*!
2512      *  \brief Multi-transformate block and glue the result.
2513      *  \param theBlock Hexahedral solid to be multi-transformed.
2514      *  \param theDirFace1U,theDirFace2U Direction faces for the first transformation.
2515      *  \param theDirFace1V,theDirFace2V Direction faces for the second transformation.
2516      *  \param theNbTimesU,theNbTimesV Quantity of transformations to be done.
2517      *  \return New GEOM_Object, containing the result shape.
2518      */
2519     GEOM_Object MakeMultiTransformation2D (in GEOM_Object theBlock,
2520                                            in long        theDirFace1U,
2521                                            in long        theDirFace2U,
2522                                            in long        theNbTimesU,
2523                                            in long        theDirFace1V,
2524                                            in long        theDirFace2V,
2525                                            in long        theNbTimesV);
2526
2527   // # Special operation - propagation
2528    
2529
2530     /*!
2531      *  \brief Build all possible propagation groups.
2532      *
2533      *  Propagation group is a set of all edges, opposite to one (main)
2534      *  edge of this group directly or through other opposite edges.
2535      *  Notion of Opposite Edge make sence only on quadrangle face.
2536      *  \param theShape Shape to build propagation groups on.
2537      *  \return List of GEOM_Object, each of them is a propagation group.
2538      */
2539     ListOfGO Propagate (in GEOM_Object theShape);
2540   };
2541
2542  // # GEOM_IBooleanOperations
2543   /*!
2544    *  \brief Interface for boolean operations (Cut, Fuse, Common)
2545    */
2546   interface GEOM_IBooleanOperations : GEOM_IOperations
2547   {
2548     /*!
2549      *  \brief Perform one of boolean operations on two given shapes.
2550      *  \param theShape1 First argument for boolean operation.
2551      *  \param theShape2 Second argument for boolean operation.
2552      *  \param theOperation Indicates the operation to be done:
2553      *                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
2554      *  \return New GEOM_Object, containing the result shape.
2555      */
2556     GEOM_Object MakeBoolean (in GEOM_Object theShape1,
2557                              in GEOM_Object theShape2,
2558                              in long theOperation);
2559
2560     /*!
2561      *  \brief Perform partition operation.
2562      *
2563      *  \param theShapes Shapes to be intersected.
2564      *  \param theTools Shapes to intersect theShapes.
2565      *  \note  Each compound from ListShapes and ListTools will be exploded in order
2566      *         to avoid possible intersection between shapes from this compound.
2567      *  \param theLimit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
2568      *  \param theKeepNonlimitShapes: if this parameter == 0, then only shapes of
2569      *                             target type (equal to Limit) are kept in the result,
2570      *                             else standalone shapes of lower dimension
2571      *                             are kept also (if they exist).
2572      *
2573      *  After implementation new version of PartitionAlgo (October 2006)
2574      *  other parameters are ignored by current functionality. They are kept
2575      *  in this function only for supporting old versions.
2576      *  Ignored parameters:
2577      *  \param theKeepInside Shapes, outside which the results will be deleted.
2578      *         Each shape from theKeepInside must belong to theShapes also.
2579      *  \param theRemoveInside Shapes, inside which the results will be deleted.
2580      *         Each shape from theRemoveInside must belong to theShapes also.
2581      *  \param theRemoveWebs If TRUE, perform Glue 3D algorithm.
2582      *  \param theMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
2583      *
2584      *  \return New GEOM_Object, containing the result shapes.
2585      */
2586     GEOM_Object MakePartition (in ListOfGO   theShapes,
2587                                in ListOfGO   theTools,
2588                                in ListOfGO   theKeepInside,
2589                                in ListOfGO   theRemoveInside,
2590                                in short      theLimit,
2591                                in boolean    theRemoveWebs,
2592                                in ListOfLong theMaterials,
2593                                in short      theKeepNonlimitShapes);
2594
2595     /*!
2596      *  \brief Perform partition operation.
2597      *
2598      *  This method may be usefull if it is needed to make a partition for
2599      *  a compound containing nonintersected shapes. Performance will be better
2600      *  since intersection between shapes from compound is not performed.
2601      *
2602      *  Description of all parameters as in previous method MakePartition()
2603      *
2604      *  \note Passed compounds (via ListShapes or via ListTools)
2605      *        have to consist of nonintersecting shapes.
2606      *
2607      *  \return New GEOM_Object, containing the result shapes.
2608      */
2609     GEOM_Object MakePartitionNonSelfIntersectedShape (in ListOfGO   theShapes,
2610                                                       in ListOfGO   theTools,
2611                                                       in ListOfGO   theKeepInside,
2612                                                       in ListOfGO   theRemoveInside,
2613                                                       in short      theLimit,
2614                                                       in boolean    theRemoveWebs,
2615                                                       in ListOfLong theMaterials,
2616                                                       in short      theKeepNonlimitShapes);
2617
2618     /*!
2619      *  \brief Perform partition of the Shape with the Plane
2620      *  \param theShape Shape to be intersected.
2621      *  \param thePlane Tool shape, to intersect theShape.
2622      *  \return New GEOM_Object, containing the result shape.
2623      */
2624     GEOM_Object MakeHalfPartition (in GEOM_Object theShape,
2625                                    in GEOM_Object thePlane);
2626   };
2627
2628  // # GEOM_ICurvesOperations:
2629   /*!
2630    *  \brief Interface for curves creation.
2631    *
2632    *  Polyline, Circle, Spline (Bezier and Interpolation)
2633    */
2634   interface GEOM_ICurvesOperations : GEOM_IOperations
2635   {
2636     /*!
2637      *  \brief Create a circle with given center, normal vector and radius.
2638      *  \param thePnt Circle center.
2639      *  \param theVec Vector, normal to the plane of the circle.
2640      *  \param theR Circle radius.
2641      *  \return New GEOM_Object, containing the created circle.
2642      */
2643     GEOM_Object MakeCirclePntVecR (in GEOM_Object thePnt,
2644                                    in GEOM_Object theVec,
2645                                    in double theR);
2646     /*!
2647      *  \brief Create a circle, passing through three given points
2648      *  \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2649      *  \return New GEOM_Object, containing the created circle.
2650      */
2651     GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1,
2652                                     in GEOM_Object thePnt2,
2653                                     in GEOM_Object thePnt3);
2654     /*!
2655      *  \brief Create a circle with given center, with a radius equals the distance from center to Point1
2656      *  and on a plane defined by all of three points.
2657      *  \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2658      *  \return New GEOM_Object, containing the created circle.
2659      */
2660     GEOM_Object MakeCircleCenter2Pnt (in GEOM_Object thePnt1,
2661                                       in GEOM_Object thePnt2,
2662                                       in GEOM_Object thePnt3);
2663     /*!
2664      *  \brief Create an ellipse with given center, normal vector and radiuses.
2665      *  \param thePnt Ellipse center.
2666      *  \param theVec Vector, normal to the plane of the ellipse.
2667      *  \param theRMajor Major ellipse radius.
2668      *  \param theRMinor Minor ellipse radius.
2669      *  \return New GEOM_Object, containing the created ellipse.
2670      */
2671     GEOM_Object MakeEllipse (in GEOM_Object thePnt,
2672                              in GEOM_Object theVec,
2673                              in double theRMajor,
2674                              in double theRMinor);
2675
2676     /*!
2677      *  \brief Create an ellipse with given center, normal vector, main axis vector and radiuses.
2678      *  \param thePnt Ellipse center.
2679      *  \param theVec Vector, normal to the plane of the ellipse.
2680      *  \param theRMajor Major ellipse radius.
2681      *  \param theRMinor Minor ellipse radius.
2682      *  \param theVecMaj Vector, direction of the ellipse's main axis.
2683      *  \return New GEOM_Object, containing the created ellipse.
2684      */
2685     GEOM_Object MakeEllipseVec (in GEOM_Object thePnt,
2686                                 in GEOM_Object theVec,
2687                                 in double theRMajor,
2688                                 in double theRMinor,
2689                                 in GEOM_Object theVecMaj);
2690
2691     /*!
2692      *  \brief Create an arc of circle, passing through three given points.
2693      *  \param thePnt1 Start point of the arc.
2694      *  \param thePnt2 Middle point of the arc.
2695      *  \param thePnt3 End point of the arc.
2696      *  \return New GEOM_Object, containing the created arc.
2697      */
2698     GEOM_Object MakeArc (in GEOM_Object thePnt1,
2699                          in GEOM_Object thePnt2,
2700                          in GEOM_Object thePnt3);
2701
2702     /*!
2703      *  \brief Create an arc of circle of center C from one point to another
2704      *  \param theCenter Center point of the arc.
2705      *  \param thePnt1 Start point of the arc.
2706      *  \param thePnt2 End point of the arc.
2707      *  \param theSense Orientation of the arc
2708      *  \return New GEOM_Object, containing the created arc.
2709      */
2710     GEOM_Object MakeArcCenter (in GEOM_Object theCenter,
2711                                in GEOM_Object thePnt1,
2712                                in GEOM_Object thePnt2,
2713                                in boolean theSense);
2714
2715     /*!
2716      *  \brief Create an arc of ellipse of center C and two points P1 P2.
2717      *  \param theCenter Center point of the arc.
2718      *  \param thePnt1 Major radius is distance from center to Pnt1.
2719      *  \param thePnt2 define a plane and Minor radius as a shortest
2720      *                 distance from Pnt2 to vector Center->Pnt1.
2721      *  \return New GEOM_Object, containing the created arc.
2722      */
2723     GEOM_Object MakeArcOfEllipse (in GEOM_Object theCenter,
2724                                   in GEOM_Object thePnt1,
2725                                   in GEOM_Object thePnt2);
2726
2727
2728     /*!
2729      *  \brief Create a polyline on the set of points.
2730      *  \param thePoints Sequence of points for the polyline.
2731      *  \param theIsClosed If TRUE, build a closed wire.
2732      *  \return New GEOM_Object, containing the created polyline.
2733      */
2734     GEOM_Object MakePolyline (in ListOfGO thePoints,
2735                               in boolean  theIsClosed);
2736
2737     /*!
2738      *  \brief Create bezier curve on the set of points.
2739      *  \param thePoints Sequence of points for the bezier curve.
2740      *  \param theIsClosed If TRUE, build a closed curve.
2741      *  \return New GEOM_Object, containing the created bezier curve.
2742      */
2743     GEOM_Object MakeSplineBezier (in ListOfGO thePoints,
2744                                   in boolean  theIsClosed);
2745
2746     /*!
2747      *  \brief Create B-Spline curve on the set of points.
2748      *  \param thePoints Sequence of points for the B-Spline curve.
2749      *  \param theIsClosed If TRUE, build a closed curve.
2750      *  \param theDoReordering If TRUE, the algo does not follow the order of
2751      *                         \a thePoints but searches for the closest vertex.
2752      *  \return New GEOM_Object, containing the created B-Spline curve.
2753      */
2754     GEOM_Object MakeSplineInterpolation (in ListOfGO thePoints,
2755                                          in boolean  theIsClosed,
2756                                          in boolean  theDoReordering);
2757
2758     /*!
2759      *  \brief Creates a curve using the parametric definition of the basic points.
2760      *  \param thexExpr parametric equation of the coordinates X.
2761      *  \param theyExpr parametric equation of the coordinates Y.
2762      *  \param thezExpr parametric equation of the coordinates Z.
2763      *  \param theParamMin the minimal value of the parameter.
2764      *  \param theParamMax the maximum value of the parameter.
2765      *  \param theParamStep the step of the parameter.
2766      *  \param theCurveType the type of the curve.
2767      *  \return New GEOM_Object, containing the created curve.
2768      */    
2769     GEOM_Object MakeCurveParametric(in string thexExpr,
2770                                     in string theyExpr,
2771                                     in string thezExpr,
2772                                     in double theParamMin,
2773                                     in double theParamMax,
2774                                     in double theParamStep,
2775                                     in curve_type theCurveType);
2776
2777      /*!
2778      *  \brief Creates a curve using the parametric definition of the basic points.
2779      *  \param thexExpr parametric equation of the coordinates X.
2780      *  \param theyExpr parametric equation of the coordinates Y.
2781      *  \param thezExpr parametric equation of the coordinates Z.
2782      *  \param theParamMin the minimal value of the parameter.
2783      *  \param theParamMax the maximum value of the parameter.
2784      *  \param theParamNbStep the number of steps of the parameter discretization.
2785      *  \param theCurveType the type of the curve.
2786      *  \return New GEOM_Object, containing the created curve.
2787      */    
2788     GEOM_Object MakeCurveParametricNew(in string thexExpr,
2789                     in string theyExpr,
2790                     in string thezExpr,
2791                     in double theParamMin,
2792                     in double theParamMax,
2793                     in long   theParamNbStep,
2794                     in curve_type theCurveType);
2795
2796     /*!
2797      *  \brief Create a sketcher (wire or face), following the textual description,
2798      *         passed through \a theCommand argument.
2799      *
2800      *  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2801      *  Format of the description string has to be the following:
2802      *
2803      *  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2804      *
2805      *  Where:
2806      *  - x1, y1 are coordinates of the first sketcher point (zero by default),
2807      *  - CMD is one of
2808      *     - "R angle" : Set the direction by angle
2809      *     - "D dx dy" : Set the direction by DX & DY
2810      *     .
2811      *       \n
2812      *     - "TT x y" : Create segment by point at X & Y
2813      *     - "T dx dy" : Create segment by point with DX & DY
2814      *     - "L length" : Create segment by direction & Length
2815      *     - "IX x" : Create segment by direction & Intersect. X
2816      *     - "IY y" : Create segment by direction & Intersect. Y
2817      *     .
2818      *       \n
2819      *     - "C radius length" : Create arc by direction, radius and length(in degree)
2820      *     .
2821      *       \n
2822      *     - "WW" : Close Wire (to finish)
2823      *     - "WF" : Close Wire and build face (to finish)
2824      *
2825      *  \param theCommand String, defining the sketcher in local
2826      *                    coordinates of the working plane.
2827      *  \param theWorkingPlane Nine double values, defining origin,
2828      *                         OZ and OX directions of the working plane.
2829      *  \return New GEOM_Object, containing the created wire or face.
2830      */
2831     GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane);
2832
2833     /*!
2834      *  \brief Create a sketcher (wire or face), following the textual description,
2835      *         passed through \a theCommand argument. 
2836      *
2837      *  For format of the description string see the previous method.\n
2838      *
2839      *  \param theCommand String, defining the sketcher in local
2840      *                    coordinates of the working plane.
2841      *  \param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2842      *  \return New GEOM_Object, containing the created wire or face.
2843      */
2844     GEOM_Object MakeSketcherOnPlane (in string theCommand, in GEOM_Object theWorkingPlane);
2845
2846     /*!
2847      *  \brief Create a 3D sketcher, following the textual description,
2848      *         passed through \a theCommand argument. 
2849      *
2850      *  Format of the description string has to be the following:
2851      *
2852      *  "3DSketcher:CMD[:CMD[:CMD...]]"
2853      *
2854      *  Where CMD is one of
2855      *     - "TT x y z" : Create segment by point at X & Y or set the first point
2856      *     - "T dx dy dz" : Create segment by point with DX & DY
2857      *     .
2858      *       \n
2859      *     - "OXY angleX angle2 length" : Create segment by two angles and length
2860      *     - "OYZ angleY angle2 length" : Create segment by two angles and length
2861      *     - "OXZ angleX angle2 length" : Create segment by two angles and length
2862      *     .
2863      *       \n
2864      *     - "WW" : Close Wire (to finish)
2865      *
2866      *  \param theCommand String, defining the sketcher in local
2867      *                    coordinates of the working plane.
2868      *  \return New GEOM_Object, containing the created wire.
2869      */
2870     GEOM_Object Make3DSketcherCommand (in string theCommand);
2871
2872     /*!
2873      *  \brief Create a 3D sketcher, made of a straight segments, joining points
2874      *         with coordinates passed through \a theCoordinates argument. 
2875      *
2876      *  Order of coordinates has to be the following:
2877      *  x1, y1, z1, x2, y2, z2, ..., xN, yN, zN
2878      *
2879      *  \param theCoordinates List of double values.
2880      *  \return New GEOM_Object, containing the created wire.
2881      */
2882     GEOM_Object Make3DSketcher (in ListOfDouble theCoordinates);
2883   };
2884
2885  // # GEOM_ILocalOperations:
2886   /*!
2887    *  \brief Interface for fillet and chamfer creation.
2888    */
2889   interface GEOM_ILocalOperations : GEOM_IOperations
2890   {
2891     /*!
2892      *  \brief Perform a fillet on all edges of the given shape.
2893      *  \param theShape Shape, to perform fillet on.
2894      *  \param theR Fillet radius.
2895      *  \return New GEOM_Object, containing the result shape.
2896      */
2897     GEOM_Object MakeFilletAll (in GEOM_Object theShape,
2898                                in double      theR);
2899
2900     /*!
2901      *  \brief Perform a fillet on the specified edges of the given shape
2902      *  \param theShape Shape, to perform fillet on.
2903      *  \param theR Fillet radius.
2904      *  \param theEdges Global indices of edges to perform fillet on.
2905      *    \note Global index of sub-shape can be obtained, using method
2906      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2907      *  \return New GEOM_Object, containing the result shape.
2908      */
2909     GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
2910                                  in double      theR,
2911                                  in ListOfLong  theEdges);
2912     GEOM_Object MakeFilletEdgesR1R2 (in GEOM_Object theShape,
2913                                      in double      theR1,
2914                                      in double      theR2,
2915                                      in ListOfLong  theEdges);
2916
2917     /*!
2918      *  \brief Perform a fillet on all edges of the specified faces of the given shape.
2919      *  \param theShape Shape, to perform fillet on.
2920      *  \param theR Fillet radius.
2921      *  \param theFaces Global indices of faces to perform fillet on.
2922      *    \note Global index of sub-shape can be obtained, using method
2923      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2924      *  \return New GEOM_Object, containing the result shape.
2925      */
2926     GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
2927                                  in double      theR,
2928                                  in ListOfLong  theFaces);
2929
2930     GEOM_Object MakeFilletFacesR1R2 (in GEOM_Object theShape,
2931                                      in double      theR1,
2932                                      in double      theR2,
2933                                      in ListOfLong  theFaces);
2934
2935     /*!
2936      *  \brief Perform a fillet on a face or a shell at the specified vertexes.
2937      *  \param theShape Shape, to perform fillet on.
2938      *  \param theR Fillet radius.
2939      *  \param theVertexes Global indices of vertexes to perform fillet on.
2940      *    \note Global index of sub-shape can be obtained, using method
2941      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2942      *  \return New GEOM_Object, containing the result shape.
2943      */
2944     GEOM_Object MakeFillet2D (in GEOM_Object theShape,
2945                               in double      theR,
2946                               in ListOfLong  theVertexes);
2947
2948     /*!
2949      *  \brief Perform a fillet on edges of the specified vertexes of the given wire.
2950      *  \param theShape Shape, to perform fillet on.
2951      *  \param theR Fillet radius.
2952      *  \param theVertexes Global indices of vertexes to perform fillet on.
2953      *    \note Global index of sub-shape can be obtained, using method
2954      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2955      *    \note The list of vertices coudl be empty, in this case fillet fill be done
2956      *          at all vertices in given wire
2957      *  \param doIgnoreSecantVertices If FALSE, fillet radius is always limited
2958      *         by the length of the edges, nearest to the fillet vertex.
2959      *         But sometimes the next edge is C1 continuous with the one, nearest to
2960      *         the fillet point, and such two (or more) edges can be united to allow
2961      *         bigger radius. Set this flag to TRUE to allow collinear edges union,
2962      *         thus ignoring the secant vertex (vertices).
2963      *  \return New GEOM_Object, containing the result shape.
2964      */
2965     GEOM_Object MakeFillet1D (in GEOM_Object theShape,
2966                               in double      theR,
2967                               in ListOfLong  theVertexes,
2968                               in boolean     doIgnoreSecantVertices);
2969
2970     /*!
2971      *  \brief Perform a symmetric chamfer on all edges of the given shape.
2972      *  \param theShape Shape, to perform chamfer on.
2973      *  \param theD Chamfer size along each face.
2974      *  \return New GEOM_Object, containing the result shape.
2975      */
2976     GEOM_Object MakeChamferAll (in GEOM_Object theShape,
2977                                 in double      theD);
2978
2979     /*!
2980      *  \brief Perform a chamfer on edges, common to the specified faces.
2981      *  with distance D1 on the Face1
2982      *  \param theShape Shape, to perform chamfer on.
2983      *  \param theD1 Chamfer size along \a theFace1.
2984      *  \param theD2 Chamfer size along \a theFace2.
2985      *  \param theFace1,theFace2 Global indices of two faces of \a theShape.
2986      *    \note Global index of sub-shape can be obtained, using method
2987      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2988      *  \return New GEOM_Object, containing the result shape.
2989      */
2990     GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
2991                                  in double theD1, in double theD2,
2992                                  in long theFace1, in long theFace2);
2993     /*!
2994      *  \brief The Same but with params theD = Chamfer Lenght
2995      *  and theAngle = Chamfer Angle (Angle in radians)
2996      */
2997     GEOM_Object MakeChamferEdgeAD (in GEOM_Object theShape,
2998                                    in double theD, in double theAngle,
2999                                    in long theFace1, in long theFace2);
3000
3001     /*!
3002      *  \brief Perform a chamfer on all edges of the specified faces.
3003      *  with distance D1 on the first specified face (if several for one edge)
3004      *  \param theShape Shape, to perform chamfer on.
3005      *  \param theD1 Chamfer size along face from \a theFaces. If both faces,
3006      *               connected to the edge, are in \a theFaces, \a theD1
3007      *               will be get along face, which is nearer to \a theFaces beginning.
3008      *  \param theD2 Chamfer size along another of two faces, connected to the edge.
3009      *  \param theFaces Sequence of global indices of faces of \a theShape.
3010      *    \note Global index of sub-shape can be obtained, using method
3011      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3012      *  \return New GEOM_Object, containing the result shape.
3013      */
3014     GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
3015                                   in double theD1, in double theD2,
3016                                   in ListOfLong theFaces);
3017     /*!
3018      *  The Same but with params theD = Chamfer Lenght
3019      *  and theAngle = Chamfer Angle (Angle in radians)
3020      */
3021     GEOM_Object MakeChamferFacesAD (in GEOM_Object theShape,
3022                                     in double theD, in double theAngle,
3023                                     in ListOfLong theFaces);
3024
3025    /*!
3026     *  \brief Perform a chamfer on edges,
3027     *  with distance D1 on the first specified face (if several for one edge)
3028     *  \param theShape Shape, to perform chamfer on.
3029     *  \param theD1,theD2 Chamfer size
3030     *  \param theEdges Sequence of edges of \a theShape.
3031     *  \return New GEOM_Object, containing the result shape.
3032     */
3033     GEOM_Object MakeChamferEdges (in GEOM_Object theShape,
3034                                   in double theD1, in double theD2,
3035                                   in ListOfLong theEdges);
3036     /*!
3037      *  The Same but with params theD = Chamfer Lenght
3038      *  and theAngle = Chamfer Angle (Angle in radians)
3039      */
3040     GEOM_Object MakeChamferEdgesAD (in GEOM_Object theShape,
3041                                     in double theD, in double theAngle,
3042                                     in ListOfLong theEdges);
3043
3044     /*!
3045      *  \brief Perform an Archimde operation on the given shape with given parameters.
3046      *                    The object presenting the resulting face is returned
3047      *  \param theShape Shape to be put in water.
3048      *  \param theWeight Weight og the shape.
3049      *  \param theWaterDensity Density of the water.
3050      *  \param theMeshDeflection Deflection od the mesh, using to compute the section.
3051      *  \return New GEOM_Object, containing a section of \a theShape
3052      *          by a plane, corresponding to water level.
3053      */
3054     GEOM_Object MakeArchimede (in GEOM_Object theShape,
3055                                in double theWeight,
3056                                in double theWaterDensity,
3057                                in double theMeshDeflection);
3058
3059     /*!
3060      *  \brief Duplicates <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3061      *
3062      *  Present here only for compatibility.
3063      */
3064     long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape);
3065   };
3066
3067  // #  GEOM_IHealingOperations: 
3068   /*!
3069    *  \brief Interface for shape healing operations
3070    *
3071    *  Shape Processing, SuppressFaces, etc.
3072    */
3073   interface GEOM_IHealingOperations : GEOM_IOperations
3074   {
3075     /*!
3076      *  \brief Apply a sequence of Shape Healing operators to the given object.
3077      *  \param theShapes Shape to be processed.
3078      *  \param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
3079      *  \param theParameters List of names of parameters
3080      *                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
3081      *  \param theValues List of values of parameters, in the same order
3082      *                    as parameters are listed in \a theParameters list.
3083      *  \return New GEOM_Object, containing processed shape.
3084      */
3085     GEOM_Object ProcessShape (in GEOM_Object theShapes,
3086                               in string_array theOperators,
3087                               in string_array theParameters,
3088                               in string_array theValues);
3089
3090     /*!
3091      *  \brief Get default sequence of operators, their parameters and parameters' values
3092      *  of Shape Process operation. 
3093      *
3094      *  In the current implementation the defaults are
3095      *  read from the file pointed by CSF_ShHealingDefaults environmental variable.
3096      *  \param theOperators Output. Default list of names of operators.
3097      *  \param theParameters Output. Default list of names of parameters.
3098      *  \param theValues Output. List of default values of parameters, in the same order
3099      *                           as parameters are listed in \a theParameters list.
3100      */
3101     void GetShapeProcessParameters (out string_array theOperators,
3102                                     out string_array theParameters,
3103                                     out string_array theValues);
3104     /*!
3105      *  \brief Get parameters and parameters' values for the given Shape Process operation.
3106      *
3107      *  In the current implementation the defaults are
3108      *  read from the file pointed by CSF_ShHealingDefaults environmental variable.
3109      *  \param theOperator Input. The operator's name.
3110      *  \param theParameters Output. Default list of names of parameters.
3111      *  \param theValues Output. List of default values of parameters, in the same order
3112      *                           as parameters are listed in \a theParameters list.
3113      */
3114     void GetOperatorParameters (in string theOperator,
3115                                 out string_array theParameters,
3116                                 out string_array theValues);
3117
3118     /*!
3119      *  \brief Remove faces from the given object (shape).
3120      *  \param theObject Shape to be processed.
3121      *  \param theFaces Indices of faces to be removed, if EMPTY then the method
3122      *                  removes ALL faces of the given object.
3123      *  \return New GEOM_Object, containing processed shape.
3124      */
3125     GEOM_Object SuppressFaces (in GEOM_Object theObject, in short_array theFaces);
3126
3127     /*!
3128      *  \brief Close an open wire.
3129      *  \param theObject Shape to be processed.
3130      *  \param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
3131      *                  if -1, then theObject itself is a wire.
3132      *  \param isCommonVertex If TRUE : closure by creation of a common vertex,
3133      *                        If FALS : closure by creation of an edge between ends.
3134      *  \return New GEOM_Object, containing processed shape.
3135      */
3136     GEOM_Object CloseContour (in GEOM_Object theObject, in short_array theWires,
3137                               in boolean isCommonVertex);
3138
3139     /*!
3140      *  \brief Remove internal wires and edges from the given object (face).
3141      *  \param theObject Shape to be processed.
3142      *  \param theWires Indices of wires to be removed, if EMPTY then the method
3143      *                  removes ALL internal wires of the given object.
3144      *  \return New GEOM_Object, containing processed shape.
3145      */
3146     GEOM_Object RemoveIntWires (in GEOM_Object theObject, in short_array theWires);
3147
3148     /*!
3149      *  \brief Remove internal closed contours (holes) from the given object.
3150      *  \param theObject Shape to be processed.
3151      *  \param theWires Indices of wires to be removed, if EMPTY then the method
3152      *                  removes ALL internal holes of the given object
3153      *  \return New GEOM_Object, containing processed shape.
3154      */
3155     GEOM_Object FillHoles (in GEOM_Object theObject, in short_array theWires);
3156
3157     /*!
3158      *  Sewing of the given object.
3159      *  \param theObject Shape to be processed.
3160      *  \param theTolerance Required tolerance value.
3161      *  \return New GEOM_Object, containing processed shape.
3162      */
3163     GEOM_Object Sew (in GEOM_Object theObject, in double theTolerance);
3164
3165     /*!
3166      *  \brief Addition of a point to a given edge object.
3167      *  \param theObject Shape to be processed.
3168      *  \param theEdgeIndex Index of edge to be divided within theObject's shape,
3169      *                      if -1, then theObject itself is the edge.
3170      *  \param theValue Value of parameter on edge or length parameter,
3171      *                  depending on \a isByParameter.
3172      *  \param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1],
3173      *                       if FALSE : \a theValue is treated as a length parameter [0..1]
3174      *  \return New GEOM_Object, containing processed shape.
3175      */
3176     GEOM_Object DivideEdge (in GEOM_Object theObject, in short theEdgeIndex,
3177                             in double theValue, in boolean isByParameter);
3178
3179     /*!
3180      *  \brief Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
3181      *  \param theWire Wire to minimize the number of C1 continuous edges in.
3182      *  \param theVertices A list of vertices to suppress. If the list
3183      *                     is empty, all vertices in a wire will be assumed.
3184      *  \return New GEOM_Object with modified wire.
3185      */
3186     GEOM_Object FuseCollinearEdgesWithinWire (in GEOM_Object theWire,
3187                                               in ListOfGO theVertices);
3188
3189     /*!
3190      *  \brief Get a list of wires (wrapped in GEOM_Object-s),
3191      *  that constitute a free boundary of the given shape.
3192      *  \param theObject Shape to get free boundary of.
3193      *  \param theClosedWires Output. Closed wires on the free boundary of the given shape.
3194      *  \param theOpenWires Output. Open wires on the free boundary of the given shape.
3195      *  \return FALSE, if an error(s) occured during the method execution.
3196      */
3197     boolean GetFreeBoundary (in GEOM_Object theObject,
3198                              out ListOfGO theClosedWires,
3199                              out ListOfGO theOpenWires);
3200
3201     /*!
3202      *  \brief Change orientation of the given object.
3203      *  \param theObject Shape to be processed.
3204      *  \return New GEOM_Object, containing processed shape.
3205      */
3206     GEOM_Object ChangeOrientation (in GEOM_Object theObject);
3207     GEOM_Object ChangeOrientationCopy (in GEOM_Object theObject);
3208
3209     /*!
3210      *  \brief Try to limit tolerance of the given object by value \a theTolerance.
3211      *  \param theObject Shape to be processed.
3212      *  \param theTolerance Required tolerance value.
3213      *  \return New GEOM_Object, containing processed shape.
3214      */
3215     GEOM_Object LimitTolerance (in GEOM_Object theObject, in double theTolerance);
3216
3217   };
3218
3219  // # GEOM_IInsertOperations:
3220   /*!
3221    *  \brief Interface for shape insert operations (like copy, import).
3222    *
3223    */
3224   interface GEOM_IInsertOperations : GEOM_IOperations
3225   {
3226     /*!
3227      *  \brief Create a copy of the given object
3228      */
3229     GEOM_Object MakeCopy (in GEOM_Object theOriginal);
3230
3231     /*!
3232      *  \brief Export the given shape into a file with given name.
3233      *  \param theObject Shape to be stored in the file.
3234      *  \param theFileName Name of the file to store the given shape in.
3235      *  \param theFormatName Specify format for the shape storage.
3236      *         Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
3237      */
3238     void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName);
3239
3240     /*!
3241      *  \brief Import a shape from the BRep or IGES or STEP file
3242      *  (depends on given format) with given name.
3243      *  \param theFileName The file, containing the shape.
3244      *  \param theFormatName Specify format for the file reading.
3245      *         Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
3246      *         If format 'IGES_SCALE' is used instead 'IGES' length unit will be
3247      *         set to 'meter' and result model will be scaled.
3248      *  \return New GEOM_Object, containing the imported shape.
3249      */
3250     GEOM_Object ImportFile (in string theFileName, in string theFormatName);
3251
3252     /*!
3253      *  \brief Read a value of parameter from a file, containing a shape.
3254      *  \param theFileName The file, containing the shape.
3255      *  \param theFormatName Specify format for the file reading.
3256      *         Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
3257      *  \param theParameterName Specify the parameter. For example, pass "LEN_UNITS"
3258      *                          to obtain length units, in which the file is written.
3259      *  \return Value of requested parameter in form of text string.
3260      */
3261     string ReadValue (in string theFileName, in string theFormatName, in string theParameterName);
3262
3263     /*!
3264      *  \brief Get the supported import formats and corresponding patterns for File dialog.
3265      *  \param theFormats Output. List of formats, available for import.
3266      *  \param thePatterns Output. List of file patterns, corresponding to available formats.
3267      *  \return Returns available formats and patterns through the arguments.
3268      */
3269     void ImportTranslators (out string_array theFormats,
3270                             out string_array thePatterns);
3271
3272     /*!
3273      *  \brief Get the supported export formats and corresponding patterns for File dialog.
3274      *  \param theFormats Output. List of formats, available for export.
3275      *  \param thePatterns Output. List of file patterns, corresponding to available formats.
3276      *  \return Returns available formats and patterns through the arguments.
3277      */
3278     void ExportTranslators (out string_array theFormats,
3279                             out string_array thePatterns);
3280
3281     /*!
3282      * \brief Load texture from file
3283      * \param theTextureFile texture file name
3284      * \return unique texture identifier
3285      */
3286     long LoadTexture(in string theTextureFile);
3287
3288     /*!
3289      * \brief Add texture to the study
3290      * \param theWidth texture width in pixels
3291      * \param theHeight texture height in pixels
3292      * \param theTexture texture byte array
3293      * \return unique texture identifier
3294      */
3295     long AddTexture(in long theWidth, in long theHeight, in SALOMEDS::TMPFile theTexture);
3296
3297     /*!
3298      * \brief Get previously loaded texture data
3299      * \param theID texture identifier
3300      * \param theWidth texture width in pixels
3301      * \param theHeight texture height in pixels
3302      * \return texture byte array
3303      */
3304     SALOMEDS::TMPFile GetTexture(in long theID, out long theWidth, out long theHeight);
3305
3306     /*!
3307      * \brief Get list of all avaiable texture IDs
3308      * \return list of all texture IDs avaiable for the current study
3309      */
3310     ListOfLong GetAllTextures();
3311   };
3312
3313  // # GEOM_IKindOfShape:
3314   /*!
3315    *  \brief Interface for shape_kind enumeration.
3316    */
3317   interface GEOM_IKindOfShape
3318   {
3319     enum shape_kind {
3320       NO_SHAPE,
3321       //COMPOSITEs
3322       COMPOUND,
3323       COMPSOLID,
3324       SHELL,
3325       WIRE,
3326       // SOLIDs
3327       /*! full sphere */
3328       SPHERE,
3329       /*! cylinder */
3330       CYLINDER,
3331       /*! box with faces, parallel to global coordinate planes */
3332       BOX,
3333       /*! other box */
3334       ROTATED_BOX, 
3335       /*! full torus */
3336       TORUS,   
3337       /*! cone */  
3338       CONE,   
3339       /*! solid, bounded by polygons */
3340       POLYHEDRON,  
3341       /*! other solid */
3342       SOLID,       
3343       // FACEs
3344       /*! spherical face (closed) */
3345       SPHERE2D,    
3346       /*! cylindrical face with defined height */
3347       CYLINDER2D,
3348       /*! toroidal face (closed) */
3349       TORUS2D,     
3350       /*! conical face with defined height */
3351       CONE2D,
3352       /*! planar, bounded by circle */
3353       DISK_CIRCLE,
3354       /*! planar, bounded by ellipse */
3355       DISK_ELLIPSE,
3356       /*! planar, bounded by segments */
3357       POLYGON,     
3358       /*! infinite planar */
3359       PLANE,        
3360        /*! other planar */
3361       PLANAR,      
3362       /*! other face */
3363       FACE,      
3364       // EDGEs
3365       /*! full circle */
3366       CIRCLE,      
3367       /*! arc of circle */
3368       ARC_CIRCLE, 
3369       /*! full ellipse */
3370       ELLIPSE,    
3371       /*! arc of ellipse */
3372       ARC_ELLIPSE,  
3373       /*! infinite segment */
3374       LINE,         
3375       /*! segment */
3376       SEGMENT,      
3377       /*! other edge */
3378       EDGE,       
3379       // VERTEX
3380       VERTEX,
3381       // ADVANCED shapes
3382       /*! all advanced shapes (temporary implementation) */
3383       ADVANCED    
3384     };
3385   };
3386
3387  // # GEOM_IMeasureOperations:
3388   /*!
3389    *  \brief Interface for measurement (distance, whatis) and
3390    *  properties calculation (like Centre of Mass, Inertia, etc.).
3391    *
3392    */
3393   interface GEOM_IMeasureOperations : GEOM_IOperations
3394   {
3395     /*!
3396      *  \brief Get kind of theShape.
3397      *  \param theShape Shape to get a kind of.
3398      *  \param theIntegers Output. Integer and enumerated shape's parameters
3399      *                     (kind of surface, closed/unclosed, number of edges, etc.)
3400      *  \param theDoubles  Output. Double shape's parameters (coordinates, dimensions, etc.)
3401      *  \note  Concrete meaning of each value, returned via \a theIntegers
3402      *         or \a theDoubles list depends on the kind of the shape.
3403      *  \return Returns a kind of shape in terms of <VAR>GEOM_IKindOfShape.shape_kind</VAR> enumeration.
3404      */
3405     //short KindOfShape (in GEOM_Object   theShape,
3406     GEOM_IKindOfShape::shape_kind KindOfShape (in  GEOM_Object  theShape,
3407                                                out ListOfLong   theIntegers,
3408                                                out ListOfDouble theDoubles);
3409
3410     /*!
3411      *  \brief Get position (LCS) of theShape.
3412      *  \param theShape Shape to calculate position of.
3413      *  \param Ox,Oy,Oz Output. Coordinates of shape's location origin.
3414      *                  Origin of the LCS is situated at the shape's center of mass.
3415      *  \param Zx,Zy,Zz Output. Coordinates of shape's location normal(main) direction.
3416      *  \param Xx,Xy,Xz Output. Coordinates of shape's location X direction.
3417      *                  Axes of the LCS are obtained from shape's location or,
3418      *                  if the shape is a planar face, from position of its plane.
3419      *  \return Returns position of the shape through the last nine arguments.
3420      */
3421     void GetPosition (in GEOM_Object theShape,
3422                       out double Ox, out double Oy, out double Oz,
3423                       out double Zx, out double Zy, out double Zz,
3424                       out double Xx, out double Xy, out double Xz);
3425
3426     /*!
3427      *  \brief Get summarized length of all wires,
3428      *  area of surface and volume of the given shape.
3429      *  \param theShape Shape to define properties of.
3430      *  \param theLength Output. Summarized length of all wires of the given shape.
3431      *  \param theSurfArea Output. Area of surface of the given shape.
3432      *  \param theVolume Output. Volume of the given shape.
3433      *  \return Returns shape properties through the last three arguments.
3434      */
3435     void GetBasicProperties (in GEOM_Object theShape,
3436                              out double theLength,
3437                              out double theSurfArea,
3438                              out double theVolume);
3439
3440     /*!
3441      *  \brief Get a point, situated at the centre of mass of theShape.
3442      *  \param theShape Shape to define centre of mass of.
3443      *  \return New GEOM_Object, containing the created point.
3444      */
3445     GEOM_Object GetCentreOfMass (in GEOM_Object theShape);
3446
3447     /*
3448      *  Get the vertex by index for 1D objects depends the edge/wire orientation
3449      *  \param theShape Shape (wire or edge) to find the vertex on it
3450      *  \param theIndex Index of vertex sub-shape
3451      *  \return New GEOM_Object, vertex.
3452      */
3453     GEOM_Object GetVertexByIndex( in GEOM_Object theShape, in long index );
3454
3455     /*!
3456      *  \brief Get a vector, representing the normal of theFace.
3457      *  If the face is not planar, theOptionalPoint is obligatory.
3458      *  \param theFace Shape (face) to define the normal of.
3459      *  \param theOptionalPoint Shape (point) to define the normal at.
3460      *                          Can be NULL in case of planar face.
3461      *  \return New GEOM_Object, containing the created normal vector.
3462      */
3463     GEOM_Object GetNormal (in GEOM_Object theFace,
3464                            in GEOM_Object theOptionalPoint);
3465
3466     /*!
3467      *  \brief Get inertia matrix and moments of inertia of theShape.
3468      *  \param theShape Shape to calculate inertia of.
3469      *  \param I11,I12,I13,I21,I22,I23,I31,I32,I33 Output. Components of the inertia matrix of the given shape.
3470      *  \param Ix,Iy,Iz Output. Moments of inertia of the given shape.
3471      *  \return Returns inertia through the last twelve arguments.
3472      */
3473     void GetInertia (in GEOM_Object theShape,
3474                      out double I11, out double I12, out double I13,
3475                      out double I21, out double I22, out double I23,
3476                      out double I31, out double I32, out double I33,
3477                      out double Ix , out double Iy , out double Iz);
3478
3479     /*!
3480      *  \brief Get parameters of bounding box of the given shape
3481      *  \param theShape Shape to obtain bounding box of.
3482      *  \param Xmin,Xmax Output. Limits of shape along OX axis.
3483      *  \param Ymin,Ymax Output. Limits of shape along OY axis.
3484      *  \param Zmin,Zmax Output. Limits of shape along OZ axis.
3485      *  \return Returns parameters of bounding box through the last six arguments.
3486      */
3487     void GetBoundingBox (in GEOM_Object theShape,
3488                          out double Xmin, out double Xmax,
3489                          out double Ymin, out double Ymax,
3490                          out double Zmin, out double Zmax);
3491
3492     /*!
3493      *  \brief Get min and max tolerances of sub-shapes of theShape
3494      *  \param theShape Shape, to get tolerances of.
3495      *  \param FaceMin,FaceMax Output. Min and max tolerances of the faces.
3496      *  \param EdgeMin,EdgeMax Output. Min and max tolerances of the edges.
3497      *  \param VertMin,VertMax Output. Min and max tolerances of the vertices.
3498      *  \return Returns shape tolerances through the last six arguments.
3499      */
3500     void GetTolerance (in GEOM_Object theShape,
3501                        out double FaceMin, out double FaceMax,
3502                        out double EdgeMin, out double EdgeMax,
3503                        out double VertMin, out double VertMax);
3504
3505     /*!
3506      *  \brief Check a topology of the given shape.
3507      *  \param theShape Shape to check validity of.
3508      *  \param theDescription Output. Description of problems in the shape, if they are.
3509      *  \return TRUE, if the shape "seems to be valid" from the topological point of view.
3510      */
3511     boolean CheckShape (in GEOM_Object theShape,
3512                         out string     theDescription);
3513
3514     /*!
3515      *  \brief Check a topology and a geometry of the given shape.
3516      *  \param theShape Shape to check validity of.
3517      *  \param theDescription Output. Description of problems in the shape, if they are.
3518      *  \return TRUE, if the shape "seems to be valid".
3519      */
3520     boolean CheckShapeWithGeometry (in GEOM_Object theShape,
3521                                     out string     theDescription);
3522
3523     /*!
3524      *  \brief Check a topology of the given shape on self-intersections presence.
3525      *  \param theShape Shape to check validity of.
3526      *  \param theIntersections Output. List of intersected sub-shapes IDs, it contains pairs of IDs.
3527      *  \return TRUE, if the shape does not have any self-intersections.
3528      */
3529     boolean CheckSelfIntersections (in GEOM_Object theShape,
3530                                     out ListOfLong theIntersections);
3531
3532     /*!
3533      *  \brief Check if the given shape can be an argument for MakeSolid operation
3534      *  \param theShape Shape to be described.
3535      *  \return Empty string if a solid can be made on this shape, error code otherwise.
3536      */
3537     string IsGoodForSolid (in GEOM_Object theShape);
3538
3539     /*!
3540      *  O\brief btain description of the given shape
3541      *  \param theShape Shape to be described.
3542      *  \return Description of the given shape.
3543      */
3544     string WhatIs (in GEOM_Object theShape);
3545
3546     /*!
3547      *  \brief Check if points defined by coords = [x1, y1, z1, x2, y2, z2, ...] are inside or on
3548      *  the shape theShape.
3549      *  \param theShape Shape to check.
3550      *  \param coords list of coordinates.
3551      *  \param tolerance tolerance.
3552      *  \return list of boolean.
3553      */
3554     ListOfBool AreCoordsInside(in GEOM_Object theShape, in ListOfDouble coords, in double tolerance);
3555
3556     /*!
3557      *  \brief Get minimal distance between the given shapes.
3558      *  \param theShape1,theShape2 Shapes to find minimal distance between.
3559      *  \param X1,Y1,Z1 Output. Coordinates of point on theShape1, nearest to theShape2.
3560      *  \param X2,Y2,Z2 Output. Coordinates of point on theShape2, nearest to theShape1.
3561      *  \return Value of the minimal distance between the given shapes.
3562      */
3563     double GetMinDistance (in GEOM_Object theShape1, in GEOM_Object theShape2,
3564                            out double X1, out double Y1, out double Z1,
3565                            out double X2, out double Y2, out double Z2);
3566
3567     /*!
3568      *  \brief Get angle between the given lines or linear edges.
3569      *  \param theShape1,theShape2 Shapes to find angle between. Lines or linear edges.
3570      *  \return Value of the angle between the given shapes.
3571      */
3572     double GetAngle (in GEOM_Object theShape1, in GEOM_Object theShape2);
3573
3574     /*!
3575      *  \brief Get angle between the given vectors.
3576      *  \param theShape1,theShape2 Vectors to find angle between.
3577      *  \return Value of the angle between the given vectors.
3578      */
3579     double GetAngleBtwVectors (in GEOM_Object theShape1, in GEOM_Object theShape2);
3580
3581     /*!
3582      *  \brief Get point coordinates
3583      */
3584     void PointCoordinates (in GEOM_Object theShape, out double X, out double Y, out double Z);
3585
3586     /*!
3587      *  \brief Get radius of curvature of curve in the point determinated by param
3588      *  \param theShape - curve.
3589      *  \param theParam - parameter on curve
3590      *  \return Value of curvature.
3591      */
3592     double CurveCurvatureByParam (in GEOM_Object theShape, in double theParam);
3593
3594     /*!
3595      *  \brief Get radius of curvature of curve in the given point
3596      *  \param theShape - curve.
3597      *  \param thePoint - point
3598      *  \return Value of curvature.
3599      */
3600     double CurveCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
3601
3602     /*!
3603      *  \brief Get max radius of curvature of surface in the point determinated by params
3604      *  \param theShape - surface.
3605      *  \param theUParam - U-parameter on surface
3606      *  \param theVParam - V-parameter on surface
3607      *  \return Value of curvature.
3608      */
3609     double MaxSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
3610                                        in double theVParam);
3611
3612     /*!
3613      *  \brief Get max radius of curvature of surface in the given point
3614      *  \param theShape - surface.
3615      *  \param thePoint - point
3616      *  \return Value of curvature.
3617      */
3618     double MaxSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
3619
3620     /*!
3621      *  \brief Get min radius of curvature of surface in the point determinated by params
3622      *  \param theShape - surface.
3623      *  \param theUParam - U-parameter on surface
3624      *  \param theVParam - V-parameter on surface
3625      *  \return Value of curvature.
3626      */
3627     double MinSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
3628                                        in double theVParam);
3629
3630     /*!
3631      *  \brief Get min radius of curvature of surface in the given point
3632      *  \param theShape - surface.
3633      *  \param thePoint - point
3634      *  \return Value of curvature.
3635      */
3636     double MinSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
3637
3638   };
3639
3640  // # GEOM_IGroupOperations:
3641   /*!
3642    *  \brief Interface for groups creation.
3643    */
3644   interface GEOM_IGroupOperations : GEOM_IOperations
3645   {
3646     /*!
3647      *  \brief Creates a new group which will store  sub-shapes of theMainShape
3648      *  \param theMainShape is a GEOM_Object on which the group is selected
3649      *  \param theShapeType defines a shape type of the group
3650      *  \return a newly created GEOM group
3651      */
3652     GEOM_Object CreateGroup (in GEOM_Object theMainShape, in long theShapeType);
3653
3654     /*!
3655      *  \brief Adds a sub-object with ID theSubShapeId to the group
3656      *  \param theGroup is a GEOM group to which the new sub-shape is added
3657      *  \param theSubShapeId is a sub-shape ID in the main object.
3658      *  \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub-shape
3659      */
3660     void AddObject (in GEOM_Object theGroup, in long theSubShapeId);
3661
3662     /*!
3663      *  \brief Removes a sub-object with ID \a theSubShapeId from the group
3664      *  \param theGroup is a GEOM group from which the sub-shape is removed.
3665      *  \param theSubShapeId is a sub-shape ID in the main object.
3666      *  \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub-shape
3667      */
3668     void RemoveObject (in GEOM_Object theGroup, in long theSubShapeId);
3669
3670     /*!
3671      *  \brief Adds to the group all the given shapes. No errors, if some shapes are alredy included.
3672      *  \param theGroup is a GEOM group to which the new sub-shapes are added.
3673      *  \param theSubShapes is a list of sub-shapes to be added.
3674      */
3675     void UnionList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
3676
3677     /*!
3678      *  \brief Removes from the group all the given shapes. No errors, if some shapes are not included.
3679      *  \param theGroup is a GEOM group from which the sub-shapes are removed.
3680      *  \param theSubShapes is a list of sub-shapes to be removed.
3681      */
3682     void DifferenceList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
3683
3684     /*!
3685      *  \brief Adds to the group all the given shapes. No errors, if some shapes are alredy included.
3686      *  \param theGroup is a GEOM group to which the new sub-shapes are added.
3687      *  \param theSubShapes is a list of IDs of sub-shapes to be added.
3688      */
3689     void UnionIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
3690
3691     /*!
3692      *  \brief Removes from the group all the given shapes. No errors, if some shapes are not included.
3693      *  \param theGroup is a GEOM group from which the sub-shapes are removed.
3694      *  \param theSubShapes is a list of IDs of sub-shapes to be removed.
3695      */
3696     void DifferenceIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
3697
3698     /*!
3699      *  \brief Returns a type of sub-objects stored in the group
3700      *  \param theGroup is a GEOM group which type is returned.
3701      */
3702     long GetType (in GEOM_Object theGroup);
3703
3704     /*!
3705      *  \brief Returns a main shape associated with the group
3706      *  \param theGroup is a GEOM group for which a main shape object is requested
3707      *  \return a GEOM_Object which is a main shape for theGroup
3708      */
3709     GEOM_Object GetMainShape (in GEOM_Object theGroup);
3710
3711     /*!
3712      *  \brief Returns a list of sub-objects ID stored in the group
3713      *  \param theGroup is a GEOM group for which a list of IDs is requested
3714      */
3715     ListOfLong GetObjects (in GEOM_Object theGroup);
3716   };
3717
3718  // # GEOM_IAdvancedOperations:
3719   /*!
3720    *  \brief Interface for advanced modeling functions.
3721    */
3722   interface GEOM_IAdvancedOperations : GEOM_IOperations
3723   {
3724     /*!
3725      *  \brief Create a T-shape object with specified caracteristics for the main and
3726      *  the incident pipes (radius, width, half-length).
3727      *
3728      *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
3729      *  \param theR1 Internal radius of main pipe
3730      *  \param theW1 Width of main pipe
3731      *  \param theL1 Half-length of main pipe
3732      *  \param theR2 Internal radius of incident pipe (R2 < R1)
3733      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
3734      *  \param theL2 Half-length of incident pipe
3735      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
3736      *  \return List of GEOM_Object, containing the created shape and propagation groups.
3737      */
3738     ListOfGO MakePipeTShape (in double theR1, in double theW1, in double theL1,
3739                              in double theR2, in double theW2, in double theL2,
3740                              in boolean theHexMesh);
3741     /*!
3742      *  \brief Create a T-shape object with specified caracteristics for the main and
3743      *  the incident pipes (radius, width, half-length).
3744      *
3745      *  The extremities of the main pipe are located on junctions points P1 and P2.
3746      *  The extremity of the incident pipe is located on junction point P3.
3747      *  \param theR1 Internal radius of main pipe
3748      *  \param theW1 Width of main pipe
3749      *  \param theL1 Half-length of main pipe
3750      *  \param theR2 Internal radius of incident pipe (R2 < R1)
3751      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
3752      *  \param theL2 Half-length of incident pipe
3753      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
3754      *  \param theP1 1st junction point of main pipe
3755      *  \param theP2 2nd junction point of main pipe
3756      *  \param theP3 Junction point of incident pipe
3757      *  \return List of GEOM_Object, containing the created shape and propagation groups.
3758      */
3759     ListOfGO MakePipeTShapeWithPosition (in double theR1, in double theW1, in double theL1,
3760                                          in double theR2, in double theW2, in double theL2,
3761                                          in boolean theHexMesh,
3762                                          in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
3763     /*!
3764      *  \brief Create a T-shape object with specified caracteristics for the main and
3765      *  the incident pipes (radius, width, half-length). A chamfer is created
3766      *  on the junction of the pipes.
3767      *  
3768      *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
3769      *  \param theR1 Internal radius of main pipe
3770      *  \param theW1 Width of main pipe
3771      *  \param theL1 Half-length of main pipe
3772      *  \param theR2 Internal radius of incident pipe (R2 < R1)
3773      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
3774      *  \param theL2 Half-length of incident pipe
3775      *  \param theH Height of the chamfer.
3776      *  \param theW Width of the chamfer.
3777      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
3778      *  \return List of GEOM_Object, containing the created shape and propagation groups.
3779      */
3780     ListOfGO MakePipeTShapeChamfer (in double theR1, in double theW1, in double theL1,
3781                                     in double theR2, in double theW2, in double theL2,
3782                                     in double theH, in double theW, in boolean theHexMesh);
3783     /*!
3784      *  \brief Create a T-shape object with specified caracteristics for the main and
3785      *  the incident pipes (radius, width, half-length). 
3786      * 
3787      *  A chamfer is created on the junction of the pipes.
3788      *  The extremities of the main pipe are located on junctions points P1 and P2.
3789      *  The extremity of the incident pipe is located on junction point P3.
3790      *  \param theR1 Internal radius of main pipe
3791      *  \param theW1 Width of main pipe
3792      *  \param theL1 Half-length of main pipe
3793      *  \param theR2 Internal radius of incident pipe (R2 < R1)
3794      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
3795      *  \param theL2 Half-length of incident pipe
3796      *  \param theH Height of the chamfer.
3797      *  \param theW Width of the chamfer.
3798      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
3799      *  \param theP1 1st junction point of main pipe
3800      *  \param theP2 2nd junction point of main pipe
3801      *  \param theP3 Junction point of incident pipe
3802      *  \return List of GEOM_Object, containing the created shape and propagation groups.
3803      */
3804     ListOfGO MakePipeTShapeChamferWithPosition (in double theR1, in double theW1, in double theL1,
3805                                                 in double theR2, in double theW2, in double theL2,
3806                                                 in double theH, in double theW, in boolean theHexMesh,
3807                                                 in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
3808     /*!
3809      *  \brief Create a T-shape object with specified caracteristics for the main and
3810      *  the incident pipes (radius, width, half-length). 
3811      *
3812      *  A fillet is created on the junction of the pipes.
3813      *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
3814      *  \param theR1 Internal radius of main pipe
3815      *  \param theW1 Width of main pipe
3816      *  \param theL1 Half-length of main pipe
3817      *  \param theR2 Internal radius of incident pipe (R2 < R1)
3818      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
3819      *  \param theL2 Half-length of incident pipe
3820      *  \param theRF Radius of curvature of fillet.
3821      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
3822      *  \return List of GEOM_Object, containing the created shape and propagation groups.
3823      */
3824     ListOfGO MakePipeTShapeFillet (in double theR1, in double theW1, in double theL1,
3825                                    in double theR2, in double theW2, in double theL2,
3826                                    in double theRF, in boolean theHexMesh);
3827     /*!
3828      *  \brief Create a T-shape object with specified caracteristics for the main and
3829      *  the incident pipes (radius, width, half-length).
3830      *
3831      *  A fillet is created on the junction of the pipes.
3832      *  The extremities of the main pipe are located on junctions points P1 and P2.
3833      *  The extremity of the incident pipe is located on junction point P3.
3834      *  \param theR1 Internal radius of main pipe
3835      *  \param theW1 Width of main pipe
3836      *  \param theL1 Half-length of main pipe
3837      *  \param theR2 Internal radius of incident pipe (R2 < R1)
3838      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
3839      *  \param theL2 Half-length of incident pipe
3840      *  \param theRF Radius of curvature of fillet.
3841      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
3842      *  \param theP1 1st junction point of main pipe
3843      *  \param theP2 2nd junction point of main pipe
3844      *  \param theP3 Junction point of incident pipe
3845      *  \return List of GEOM_Object, containing the created shape and propagation groups.
3846      */
3847     ListOfGO MakePipeTShapeFilletWithPosition (in double theR1, in double theW1, in double theL1,
3848                                                in double theR2, in double theW2, in double theL2,
3849                                                in double theRF, in boolean theHexMesh,
3850                                                in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
3851     /*!
3852      *  This function allows to create a disk already divided into blocks. It
3853      *  can be use to create divided pipes for later meshing in hexaedra.
3854      *  \param theR Radius of the disk
3855      *  \param theRatio Relative size of the central square diagonal against the disk diameter
3856      *  \param theOrientation Plane on which the disk will be built
3857      *  \return New GEOM_Object, containing the created shape.
3858      */
3859     GEOM_Object MakeDividedDisk (in double theR, 
3860                                  in double theRatio, 
3861                                  in short theOrientation,
3862                                  in pattern thePattern);
3863
3864     /*!
3865      *  \brief Create a Disk prepared for hexa meshing with given center, normal vector and radius.
3866      *  \param thePnt disk center.
3867      *  \param theVec Vector, normal to the plane of the disk.
3868      *  \param theR Disk radius.
3869      *  \param theRatio Relative size of the central square diagonal against the disk diameter
3870      *  \return New GEOM_Object, containing the created disk.
3871      */
3872     GEOM_Object MakeDividedDiskPntVecR ( in GEOM_Object thePnt,
3873                                          in GEOM_Object theVec,
3874                                          in double theR, 
3875                                          in double theRatio,
3876                                          in pattern thePattern);
3877
3878     /*!
3879      *  Builds a cylinder prepared for hexa meshes
3880      *  \param theR Radius of the cylinder
3881      *  \param theH Height of the cylinder
3882      *  \return New GEOM_Object, containing the created shape.
3883      */
3884     GEOM_Object MakeDividedCylinder (in double theR, 
3885                                      in double theH,
3886                                      in pattern thePattern );
3887
3888     /*@@ insert new functions before this line @@ do not remove this line @@*/
3889   };
3890
3891  // # GEOM_Gen:
3892   /*!
3893    *  \brief Interface to access other GEOM interfaces.
3894    *
3895    *  Also contains some methods to access and manage GEOM_Object.
3896    */
3897   interface GEOM_Gen : Engines::EngineComponent,SALOMEDS::Driver
3898   {
3899     /*!
3900      *  \brief Undo/Redo Management
3901      */
3902
3903     void Undo (in long theStudyID);
3904
3905     void Redo (in long theStudyID);
3906
3907     /*!
3908      * \brief Publishing management
3909      *
3910      * Adds in theStudy a object theObject under with a name theName,
3911      * if theFather is not NULL the object is placed under thFather's SObject.
3912      * Returns a SObject where theObject is placed
3913      */
3914     SALOMEDS::SObject AddInStudy (in SALOMEDS::Study theStudy,
3915                                   in GEOM_Object theObject,
3916                                   in string theName,
3917                                   in GEOM_Object theFather);
3918
3919     /*!
3920      *  \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
3921      *
3922      *  To be used from python scripts out of geompy.addToStudy (non-default usage)
3923      *  \param theStudy  the study, in which theObject is published already,
3924      *                   and in which the arguments will be published
3925      *  \param theObject published GEOM_Object, arguments of which will be published
3926      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
3927      *                   If this list is empty, all operation arguments will be published
3928      *  \param theFindMethod method to search sub-shapes, corresponding to arguments and
3929      *                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
3930      *  \param theInheritFirstArg set properties of the first argument for \a theObject.
3931      *                            Do not publish sub-shapes in place of arguments, but only
3932      *                            in place of sub-shapes of the first argument,
3933      *                            because the whole shape corresponds to the first argument.
3934      *                            Mainly to be used after transformations, but it also can be
3935      *                            usefull after partition with one object shape, and some other
3936      *                            operations, where only the first argument has to be considered.
3937      *                            If theObject has only one argument shape, this flag is automatically
3938      *                            considered as True, not regarding really passed value.
3939      *  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
3940      *                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
3941      *  \return list of published sub-shapes
3942      */
3943     ListOfGO RestoreSubShapesO (in SALOMEDS::Study   theStudy,
3944                                 in GEOM_Object       theObject,
3945                                 in ListOfGO          theArgs,
3946                                 in find_shape_method theFindMethod,
3947                                 in boolean           theInheritFirstArg,
3948                                 in boolean           theAddPrefix);
3949
3950     /*!
3951      *  \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
3952      *
3953      *  To be used from python scripts out of geompy.addToStudy (non-default usage)
3954      *  \param theStudy  the study, in which theObject is published already,
3955      *                   and in which the arguments will be published
3956      *  \param theObject published GEOM_Object, arguments of which will be published
3957      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
3958      *                   If this list is empty, all operation arguments will be published
3959      *  \param theFindMethod method to search sub-shapes, corresponding to arguments and
3960      *                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
3961      *  \param theInheritFirstArg set properties of the first argument for \a theObject.
3962      *                            Do not publish sub-shapes in place of arguments, but only
3963      *                            in place of sub-shapes of the first argument,
3964      *                            because the whole shape corresponds to the first argument.
3965      *                            Mainly to be used after transformations, but it also can be
3966      *                            usefull after partition with one object shape, and some other
3967      *                            operations, where only the first argument has to be considered.
3968      *                            If theObject has only one argument shape, this flag is automatically
3969      *                            considered as True, not regarding really passed value.
3970      *  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
3971      *                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
3972      *  \return list of published sub-shapes
3973      */
3974     ListOfGO RestoreGivenSubShapesO (in SALOMEDS::Study   theStudy,
3975                                      in GEOM_Object       theObject,
3976                                      in ListOfGO          theArgs,
3977                                      in find_shape_method theFindMethod,
3978                                      in boolean           theInheritFirstArg,
3979                                      in boolean           theAddPrefix);
3980
3981     /*!
3982      *  \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
3983      *
3984      *  To be used from GUI and from geompy.addToStudy.
3985      *  Work like the above method, but accepts study object theSObject instead of GEOM_Object.
3986      *  \param theStudy  the study, in which theObject is published already,
3987      *                   and in which the arguments will be published
3988      *  \param theSObject study object, referencing GEOM_Object, arguments of which will be published
3989      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
3990      *                   If this list is empty, all operation arguments will be published
3991      *  \param theFindMethod method to search sub-shapes, corresponding to arguments and
3992      *                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
3993      *  \param theInheritFirstArg set properties of the first argument for \a theObject.
3994      *                            Do not publish sub-shapes in place of arguments, but only
3995      *                            in place of sub-shapes of the first argument,
3996      *                            because the whole shape corresponds to the first argument.
3997      *                            Mainly to be used after transformations, but it also can be
3998      *                            usefull after partition with one object shape, and some other
3999      *                            operations, where only the first argument has to be considered.
4000      *                            If theObject has only one argument shape, this flag is automatically
4001      *                            considered as True, not regarding really passed value.
4002      *  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
4003      *                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
4004      */
4005     ListOfGO RestoreSubShapesSO (in SALOMEDS::Study   theStudy,
4006                                  in SALOMEDS::SObject theSObject,
4007                                  in ListOfGO          theArgs,
4008                                  in find_shape_method theFindMethod,
4009                                  in boolean           theInheritFirstArg,
4010                                  in boolean           theAddPrefix);
4011
4012    // #  Methods to access interfaces for objects creation and transformation
4013     
4014     GEOM_IBasicOperations     GetIBasicOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
4015     GEOM_ITransformOperations GetITransformOperations(in long theStudyID) raises (SALOME::SALOME_Exception);
4016     GEOM_I3DPrimOperations    GetI3DPrimOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
4017     GEOM_IShapesOperations    GetIShapesOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
4018     GEOM_IBooleanOperations   GetIBooleanOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
4019     GEOM_ICurvesOperations    GetICurvesOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
4020     GEOM_ILocalOperations     GetILocalOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
4021     GEOM_IHealingOperations   GetIHealingOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
4022     GEOM_IInsertOperations    GetIInsertOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
4023     GEOM_IMeasureOperations   GetIMeasureOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
4024     GEOM_IBlocksOperations    GetIBlocksOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
4025     GEOM_IGroupOperations     GetIGroupOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
4026     GEOM_IAdvancedOperations  GetIAdvancedOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
4027
4028   //  # Objects Management
4029      
4030
4031     /*!
4032      *  \brief Removes the object from the GEOM component
4033      *  \param theObject is a GEOM_Object to be removed
4034      */
4035     void RemoveObject (in GEOM_Object theObject);
4036
4037     /*!
4038      *  \brief Returns an object defined by the study and its entry in the GEOM component
4039      *  \param theStudyID is a SALOMEDS Study ID
4040      *  \param theEntry is an entry of the requested GEOM_Object in the GEOM component
4041      *  \note if the object has not previously been created a NULL GEOM_Object is returned
4042      */
4043     GEOM_Object GetObject (in long theStudyID, in string theEntry);
4044
4045     /*!
4046      *  \brief Add a sub-shape defined by indices in \a theIndices
4047      *  (contains unique IDs of sub-shapes inside \a theMainShape)
4048      *  \note The sub-shape GEOM_Object can has ONLY ONE function.
4049      *        Don't try to apply modification operations on them.
4050      *  \note Internal method
4051      */
4052     GEOM_Object AddSubShape (in GEOM_Object theMainShape, in ListOfLong theIndices);
4053
4054  // #  GEOM_Objects IOR Management
4055     
4056     /*!
4057      *  \brief Returns a GEOM_Object defined by its IOR
4058      *  \param theIOR a string containg an IOR of the requested GEOM_Object
4059      */
4060     GEOM_Object GetIORFromString (in string theIOR);
4061
4062     /*!
4063      *  \brief Returns a string which contains an IOR of the GEOM_Object
4064      *  \param theObject is a GEOM_Object which IOR is requested
4065      */
4066     string GetStringFromIOR (in GEOM_Object theObject);
4067
4068     /*!
4069      *  \brief Returns a name with which a GEOM_Object was dumped into python script
4070      *  \param theStudyEntry is an entry of the GEOM_Object in the study
4071      */
4072     string GetDumpName (in string theStudyEntry);
4073
4074     /*!
4075      *  \brief Returns all names with which a GEOM_Object was dumped
4076      *  into python script to avoid the same names in SMESH script
4077      */
4078     string_array GetAllDumpNames();
4079
4080     /*!
4081      *  \brief Publishes the named sub-shapes of given object in the study.
4082      *  \param theStudy    The study in which the object is published
4083      *  \param theObject   The object which named sub-shapes are published
4084      */
4085     ListOfGO PublishNamedShapesInStudy(in SALOMEDS::Study theStudy,
4086                                        //in SObject theSObject,
4087                                        in Object theObject);
4088   };
4089 };
4090
4091 #endif