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