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