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