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