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