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