]> SALOME platform Git repositories - modules/geom.git/blob - idl/GEOM_Gen.idl
Salome HOME
0016756: EDF 545 GEOM : Extrusion, give the coordinates of the vector as input
[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   /*!
798    *  GEOM_I3DPrimOperations: Interface for 3D primitives creation
799    *  Box, Cylinder, Cone, Sphere, Prism (extrusion),
800    *  Pipe (extrusion along contour), Revolution, Solid (from shell).
801    */
802   interface GEOM_I3DPrimOperations : GEOM_IOperations
803   {
804     /*!
805      *  Create a box with specified dimensions along the coordinate axes
806      *  and with edges, parallel to the coordinate axes.
807      *  Center of the box will be at point (DX/2, DY/2, DZ/2).
808      *  \param theDX Length of Box edges, parallel to OX axis.
809      *  \param theDY Length of Box edges, parallel to OY axis.
810      *  \param theDZ Length of Box edges, parallel to OZ axis.
811      *  \return New GEOM_Object, containing the created box.
812      */
813     GEOM_Object MakeBoxDXDYDZ (in double theDX, in double theDY, in double theDZ);
814
815     /*!
816      *  Create a box with two specified opposite vertices,
817      *  and with edges, parallel to the coordinate axes
818      *  \param thePnt1 First of two opposite vertices.
819      *  \param thePnt2 Second of two opposite vertices.
820      *  \return New GEOM_Object, containing the created box.
821      */
822     GEOM_Object MakeBoxTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
823
824     /*!
825      *  Create a cylinder with given radius and height at
826      *  the origin of coordinate system. Axis of the cylinder
827      *  will be collinear to the OZ axis of the coordinate system.
828      *  \param theR Cylinder radius.
829      *  \param theH Cylinder height.
830      *  \return New GEOM_Object, containing the created cylinder.
831      */
832     GEOM_Object MakeCylinderRH (in double theR, in double theH);
833
834     /*!
835      *  Create a cylinder with given base point, axis, radius and height.
836      *  \param thePnt Central point of cylinder base.
837      *  \param theAxis Cylinder axis.
838      *  \param theR Cylinder radius.
839      *  \param theH Cylinder height.
840      *  \return New GEOM_Object, containing the created cylinder.
841      */
842     GEOM_Object MakeCylinderPntVecRH (in GEOM_Object thePnt,
843                                       in GEOM_Object theAxis,
844                                       in double      theR,
845                                       in double      theH);
846
847     /*!
848      *  Create a cone with given height and radiuses at
849      *  the origin of coordinate system. Axis of the cone will
850      *  be collinear to the OZ axis of the coordinate system.
851      *  \param theR1 Radius of the first cone base.
852      *  \param theR2 Radius of the second cone base.
853      *    \note If both radiuses are non-zero, the cone will be truncated.
854      *    \note If the radiuses are equal, a cylinder will be created instead.
855      *  \param theH Cone height.
856      *  \return New GEOM_Object, containing the created cone.
857      */
858     GEOM_Object MakeConeR1R2H (in double theR1, in double theR2, in double theH);
859
860     /*!
861      *  Create a cone with given base point, axis, height and radiuses.
862      *  \param thePnt Central point of the first cone base.
863      *  \param theAxis Cone axis.
864      *  \param theR1 Radius of the first cone base.
865      *  \param theR2 Radius of the second cone base.
866      *    \note If both radiuses are non-zero, the cone will be truncated.
867      *    \note If the radiuses are equal, a cylinder will be created instead.
868      *  \param theH Cone height.
869      *  \return New GEOM_Object, containing the created cone.
870      */
871     GEOM_Object MakeConePntVecR1R2H (in GEOM_Object thePnt,
872                                      in GEOM_Object theAxis,
873                                      in double      theR1,
874                                      in double      theR2,
875                                      in double      theH);
876
877     /*!
878      *  Create a torus with given radiuses at the origin of coordinate system.
879      *  \param theRMajor Torus major radius.
880      *  \param theRMinor Torus minor radius.
881      *  \return New GEOM_Object, containing the created torus.
882      */
883     GEOM_Object MakeTorusRR (in double theRMajor,
884                              in double theRMinor);
885
886     /*!
887      *  Create a torus with given center, normal vector and radiuses.
888      *  \param thePnt Torus central point.
889      *  \param theVec Torus axis of symmetry.
890      *  \param theRMajor Torus major radius.
891      *  \param theRMinor Torus minor radius.
892      *  \return New GEOM_Object, containing the created torus.
893      */
894     GEOM_Object MakeTorusPntVecRR (in GEOM_Object thePnt,
895                                    in GEOM_Object theVec,
896                                    in double theRMajor,
897                                    in double theRMinor);
898
899     /*!
900      *  Create a sphere with given radius at the origin of coordinate system.
901      *  \param theR Sphere radius.
902      *  \return New GEOM_Object, containing the created sphere.
903      */
904     GEOM_Object MakeSphereR (in double theR);
905
906     /*!
907      *  Create a sphere with given center and radius.
908      *  \param thePnt Sphere center.
909      *  \param theR Sphere radius.
910      *  \return New GEOM_Object, containing the created .
911      */
912     GEOM_Object MakeSpherePntR (in GEOM_Object thePnt, in double theR);
913
914     /*!
915      *  Create a shape by extrusion of the base shape along the vector,
916      *  i.e. all the space, transfixed by the base shape during its translation
917      *  along the vector on the given distance.
918      *  \param theBase Base shape to be extruded.
919      *  \param theVec Direction of extrusion.
920      *  \param theH Prism dimension along theVec.
921      *  \return New GEOM_Object, containing the created prism.
922      */
923     GEOM_Object MakePrismVecH (in GEOM_Object theBase,
924                                in GEOM_Object theVec,
925                                in double      theH);
926     /*  The Same Prism but in 2 directions (forward&backward) */
927     GEOM_Object MakePrismVecH2Ways (in GEOM_Object theBase,
928                                     in GEOM_Object theVec,
929                                     in double      theH);
930
931     /*!
932      *  Create a shape by extrusion of the base shape along a vector, defined by two points.
933      *  \param theBase Base shape to be extruded.
934      *  \param thePoint1 First end of extrusion vector.
935      *  \param thePoint2 Second end of extrusion vector.
936      *  \return New GEOM_Object, containing the created prism.
937      */
938     GEOM_Object MakePrismTwoPnt (in GEOM_Object theBase,
939                                  in GEOM_Object thePoint1,
940                                  in GEOM_Object thePoint2);
941     /*  The same prism but in two directions forward&backward */
942     GEOM_Object MakePrismTwoPnt2Ways (in GEOM_Object theBase,
943                                       in GEOM_Object thePoint1,
944                                       in GEOM_Object thePoint2);
945                                     
946     /*!
947      *  Create a shape by extrusion of the base shape along a vector, defined by DX DY DZ.
948      *  \param theBase Base shape to be extruded.
949      *  \param DX, DY, DZ end of extrusion vector.
950      *  \return New GEOM_Object, containing the created prism.
951      */
952     GEOM_Object MakePrismDXDYDZ (in GEOM_Object theBase,
953                                  in double theDX, in double theDY, in double theDZ);
954     /*  The same prism but in two directions forward&backward */
955     GEOM_Object MakePrismDXDYDZ2Ways (in GEOM_Object theBase,
956                                       in double theDX, in double theDY, in double theDZ);
957
958     /*!
959      *  Create a shape by extrusion of the base shape along
960      *  the path shape. The path shape can be a wire or an edge.
961      *  \param theBase Base shape to be extruded.
962      *  \param thePath Path shape to extrude the base shape along it.
963      *  \return New GEOM_Object, containing the created pipe.
964      */
965     GEOM_Object MakePipe (in GEOM_Object theBase, in GEOM_Object thePath);
966
967     /*!
968      *  Create a shape by revolution of the base shape around the axis
969      *  on the given angle, i.e. all the space, transfixed by the base
970      *  shape during its rotation around the axis on the given angle.
971      *  \param theBase Base shape to be rotated.
972      *  \param theAxis Rotation axis.
973      *  \param theAngle Rotation angle in radians.
974      *  \return New GEOM_Object, containing the created revolution.
975      */
976     GEOM_Object MakeRevolutionAxisAngle (in GEOM_Object theBase,
977                                          in GEOM_Object theAxis,
978                                          in double theAngle);
979     /*  The Same Revolution but in both ways forward&backward */
980     GEOM_Object MakeRevolutionAxisAngle2Ways (in GEOM_Object theBase,
981                                               in GEOM_Object theAxis,
982                                               in double theAngle);
983
984     /*!
985      *  Create a filling from the given compound of contours.
986      *  \param theMinDeg a minimal degree of BSpline surface to create
987      *  \param theMaxDeg a maximal degree of BSpline surface to create
988      *  \param theTol2D a 2d tolerance to be reached
989      *  \param theTol3D a 3d tolerance to be reached
990      *  \param theNbIter a number of iteration of approximation algorithm
991      *  \return New GEOM_Object, containing the created filling surface.
992      */
993     GEOM_Object MakeFilling (in GEOM_Object theShape,
994                              in long theMinDeg, in long theMaxDeg,
995                              in double theTol2D, in double theTol3D,
996                              in long theNbIter, in boolean theApprox);
997
998     /*!
999      *  Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
1000      *  \param theSeqSections - set of specified sections.
1001      *  \param theModeSolid - mode defining building solid or shell
1002      *  \param thePreci - precision 3D used for smoothing by default 1.e-6
1003      *  \param theRuled - mode defining type of the result surfaces (ruled or smoothed).
1004      *  \return New GEOM_Object, containing the created shell or solid.
1005      */
1006     GEOM_Object MakeThruSections(in ListOfGO theSeqSections,
1007                                  in boolean theModeSolid,
1008                                  in double thePreci,
1009                                  in boolean theRuled);
1010
1011       /*!
1012      *  Create a shape by extrusion of the profile shape along
1013      *  the path shape. The path shape can be a wire or an edge.
1014      *  the several profiles can be specified in the several locations of path. 
1015      *  \param theSeqBases - list of  Bases shape to be extruded.
1016      *  \param theLocations - list of locations on the path corresponding
1017      *                        specified list of the Bases shapes. Number of locations
1018      *                        should be equal to number of bases or list of locations can be empty.
1019      *  \param thePath - Path shape to extrude the base shape along it.
1020      *  \param theWithContact - the mode defining that the section is translated to be in
1021      *                          contact with the spine.
1022      *  \param - WithCorrection - defining that the section is rotated to be
1023      *                           orthogonal to the spine tangent in the correspondent point
1024      *  \return New GEOM_Object, containing the created pipe.
1025      */
1026     GEOM_Object MakePipeWithDifferentSections (in ListOfGO theSeqBases,
1027                                                in ListOfGO theLocations,
1028                                                in GEOM_Object thePath,
1029                                                in boolean theWithContact ,
1030                                                in boolean theWithCorrection );
1031
1032     /*!
1033      *  Create a shape by extrusion of the profile shape along
1034      *  the path shape. The path shape can be a shell or a face.
1035      *  the several profiles can be specified in the several locations of path. 
1036      *  \param theSeqBases - list of  Bases shape to be extruded.
1037      *  \param theSeqSubBases - list of corresponding subshapes of section shapes.
1038      *  \param theLocations - list of locations on the path corresponding
1039      *                        specified list of the Bases shapes. Number of locations
1040      *                        should be equal to number of bases.
1041      *  \param thePath - Path shape to extrude the base shape along it.
1042      *  \param theWithContact - the mode defining that the section is translated to be in
1043      *                          contact with the spine.
1044      *  \param - WithCorrection - defining that the section is rotated to be
1045      *                           orthogonal to the spine tangent in the correspondent point
1046      *  \return New GEOM_Object, containing the created pipe.
1047      */
1048     GEOM_Object MakePipeWithShellSections (in ListOfGO theSeqBases,
1049                                            in ListOfGO theSeqSubBases,
1050                                            in ListOfGO theLocations,
1051                                            in GEOM_Object thePath,
1052                                            in boolean theWithContact ,
1053                                            in boolean theWithCorrection );
1054
1055     /*!
1056      * Create solids between given sections
1057      *  \param theSeqBases - list of sections (shell or face).
1058      *  \param theLocations - list of corresponding vertexes
1059      *  \return New GEOM_Object, containing the created solids.
1060      */
1061     GEOM_Object MakePipeShellsWithoutPath (in ListOfGO theSeqBases,
1062                                            in ListOfGO theLocations);
1063   };
1064
1065   /*!
1066    *  GEOM_IShapesOperations: Interface for Shapes creation:
1067    *  Edge from two points, Wire from edges, Face from wire,
1068    *  Shell from faces, Solid from shells, Compound from shapes
1069    */
1070   interface GEOM_IShapesOperations : GEOM_IOperations
1071   {
1072     /*!
1073      *  Create a linear edge with specified ends.
1074      *  \param thePnt1 Point for the first end of edge.
1075      *  \param thePnt2 Point for the second end of edge.
1076      *  \return New GEOM_Object, containing the created edge.
1077      */
1078     GEOM_Object MakeEdge (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
1079
1080     /*!
1081      *  Create a wire from the set of edges and wires.
1082      *  \param theEdgesAndWires List of edge and/or wires.
1083      *  \return New GEOM_Object, containing the created wire.
1084      */
1085     GEOM_Object MakeWire (in ListOfGO theEdgesAndWires);
1086
1087     /*!
1088      *  Create a face on the given wire.
1089      *  \param theWire closed Wire or Edge to build the face on.
1090      *  \param isPlanarWanted If TRUE, only planar face will be built.
1091      *                        If impossible, NULL object will be returned.
1092      *  \return New GEOM_Object, containing the created face.
1093      */
1094     GEOM_Object MakeFace (in GEOM_Object theWire, in boolean isPlanarWanted);
1095
1096     /*!
1097      *  Create a face on the given wires set.
1098      *  \param theWires List of closed wires or edges to build the face on.
1099      *  \param isPlanarWanted If TRUE, only planar face will be built.
1100      *                        If impossible, NULL object will be returned.
1101      *  \return New GEOM_Object, containing the created face.
1102      */
1103     GEOM_Object MakeFaceWires (in ListOfGO theWires, in boolean isPlanarWanted);
1104
1105     /*!
1106      *  Create a shell from the set of faces and shells.
1107      *  \param theFacesAndShells List of faces and/or shells.
1108      *  \return New GEOM_Object, containing the created shell.
1109      */
1110     GEOM_Object MakeShell (in ListOfGO theFacesAndShells);
1111
1112     /*!
1113      *  Create a solid, bounded by the given shell.
1114      *  \param theShell Bounding shell.
1115      *  \return New GEOM_Object, containing the created solid.
1116      */
1117     GEOM_Object MakeSolidShell (in GEOM_Object theShell);
1118
1119     /*!
1120      *  Create a solid, bounded by the given shells.
1121      *  \param theShells Bounding shells.
1122      *  \return New GEOM_Object, containing the created solid.
1123      */
1124     GEOM_Object MakeSolidShells (in ListOfGO theShells);
1125
1126     /*!
1127      *  Create a compound of the given shapes.
1128      *  \param theShapes List of shapes to put in compound.
1129      *  \return New GEOM_Object, containing the created compound.
1130      */
1131     GEOM_Object MakeCompound (in ListOfGO theShapes);
1132
1133     /*!
1134      *  Replace coincident faces in theShape by one face.
1135      *  \param theShape Initial shape.
1136      *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
1137      *  \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
1138      *  \return New GEOM_Object, containing a copy of theShape without coincident faces.
1139      */
1140     GEOM_Object MakeGlueFaces (in GEOM_Object theShape, in double theTolerance, in boolean doKeepNonSolids);
1141
1142     /*!
1143      *  Find coincident faces in theShape for possible gluing.
1144      *  \param theShape Initial shape.
1145      *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
1146      *  \return ListOfGO
1147      */
1148     ListOfGO GetGlueFaces (in GEOM_Object theShape, in double theTolerance);
1149
1150     /*!
1151      *  Replace coincident faces in theShape by one face
1152      *  in compliance with given list of faces
1153      *  \param theShape Initial shape.
1154      *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
1155      *  \param theFaces List of faces for gluing.
1156      *  \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
1157      *  \return New GEOM_Object, containing a copy of theShape without some faces.
1158      */
1159     GEOM_Object MakeGlueFacesByList (in GEOM_Object theShape, in double theTolerance,
1160                                      in ListOfGO theFaces, in boolean doKeepNonSolids);
1161
1162     /*!
1163      *  Explode a shape on subshapes of a given type.
1164      *  \param theShape Shape to be exploded.
1165      *  \param theShapeType Type of sub-shapes to be retrieved.
1166      *  \param isSorted If this parameter is TRUE, sub-shapes will be
1167      *                  sorted by coordinates of their gravity centers.
1168      *  \return List of sub-shapes of type theShapeType, contained in theShape.
1169      */
1170     ListOfGO MakeExplode (in GEOM_Object theShape,
1171                           in long        theShapeType,
1172                           in boolean     isSorted);
1173
1174     /*!
1175      *  Explode a shape on subshapes of a given type.
1176      *  Does the same, as the above method, but returns IDs of sub-shapes,
1177      *  not GEOM_Objects. It works faster.
1178      *  \param theShape Shape to be exploded.
1179      *  \param theShapeType Type of sub-shapes to be retrieved.
1180      *  \param isSorted If this parameter is TRUE, sub-shapes will be
1181      *                  sorted by coordinates of their gravity centers.
1182      *  \return List of IDs of sub-shapes of type theShapeType, contained in theShape.
1183      */
1184     ListOfLong SubShapeAllIDs (in GEOM_Object theShape,
1185                                in long        theShapeType,
1186                                in boolean     isSorted);
1187
1188     /*!
1189      *  Get a sub shape defined by its unique ID inside \a theMainShape
1190      *  \note The sub shape GEOM_Objects can has ONLY ONE function.
1191      *        Don't try to apply modification operations on them.
1192      */
1193     GEOM_Object GetSubShape (in GEOM_Object theMainShape,
1194                              in long        theID);
1195
1196     /*!
1197      *  Get global index of \a theSubShape in \a theMainShape.
1198      *  \param theMainShape Main shape.
1199      *  \param theSubShape Sub-shape of the main shape.
1200      *  \return global index of \a theSubShape in \a theMainShape.
1201      */
1202     long GetSubShapeIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
1203
1204     /*!
1205      *  Get index of \a theSubShape in \a theMainShape, unique among sub-shapes of the same type.
1206      *  Together with method <VAR>GetShapeTypeString()</VAR> it can be used
1207      *  to generate automatic names for sub-shapes, when publishing them in a study.
1208      *  \param theMainShape Main shape.
1209      *  \param theSubShape Sub-shape of the main shape.
1210      *  \return index of \a theSubShape in a list of all sub-shapes of \a theMainShape of the same type.
1211      */
1212     long GetTopologyIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
1213
1214     /*!
1215      *  \brief Get name of type of \a theShape.
1216      *
1217      *  Use wide type notation, taking into consideration both topology and geometry of the shape.
1218      *  Together with method <VAR>GetTopologyIndex()</VAR> it can be used
1219      *  to generate automatic names for sub-shapes, when publishing them in a study.
1220      *  \param theShape The shape to get a type of.
1221      *  \return String, containing a type name of \a theShape.
1222      */
1223     string GetShapeTypeString (in GEOM_Object theShape);
1224
1225     /*!
1226      *  Count number of faces in the given shape.
1227      *  \param theShape Shape to count faces in.
1228      *  \return Number of faces in the given shape.
1229      */
1230     long NumberOfFaces (in GEOM_Object theShape);
1231
1232     /*!
1233      *  Count number of edges in the given shape.
1234      *  \param theShape Shape to count edges in.
1235      *  \return Number of edges in theShape.
1236      */
1237     long NumberOfEdges (in GEOM_Object theShape);
1238
1239     /*!
1240      *  Reverses an orientation the given shape.
1241      *  \param theShape Shape to be reversed.
1242      *  \return The reversed copy of theShape.
1243      */
1244     GEOM_Object ChangeOrientation (in GEOM_Object theShape);
1245
1246     /*!
1247      *  Retrieve all free faces from the given shape.
1248      *  Free face is a face, which is not shared between two shells of the shape.
1249      *  \param theShape Shape to find free faces in.
1250      *  \return List of IDs of all free faces, contained in theShape.
1251      */
1252     ListOfLong GetFreeFacesIDs (in GEOM_Object theShape);
1253
1254     /*!
1255      *  Get all sub-shapes of theShape1 of the given type, shared with theShape2.
1256      *  \param theShape1 Shape to find sub-shapes in.
1257      *  \param theShape2 Shape to find shared sub-shapes with.
1258      *  \param theShapeType Type of sub-shapes to be retrieved.
1259      *  \return List of sub-shapes of theShape1, shared with theShape2.
1260      */
1261     ListOfGO GetSharedShapes (in GEOM_Object theShape1,
1262                               in GEOM_Object theShape2,
1263                               in long        theShapeType);
1264
1265     /*!
1266      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1267      *  the specified plane by the certain way, defined through \a theState parameter.
1268      *  \param theShape Shape to find sub-shapes of.
1269      *  \param theShapeType Type of sub-shapes to be retrieved.
1270      *  \param theAx1 Vector (or line, or linear edge), specifying normal
1271      *                direction and location of the plane to find shapes on.
1272      *  \param theState The state of the subshapes to find.
1273      *  \return List of all found sub-shapes.
1274      */
1275     ListOfGO GetShapesOnPlane (in GEOM_Object theShape,
1276                                in long        theShapeType,
1277                                in GEOM_Object theAx1,
1278                                in shape_state theState);
1279     /*!
1280      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1281      *  the specified plane by the certain way, defined through \a theState parameter.
1282      *  \param theShape Shape to find sub-shapes of.
1283      *  \param theShapeType Type of sub-shapes to be retrieved.
1284      *  \param theAx1 Vector (or line, or linear edge), specifying normal
1285      *                direction of the plane to find shapes on.
1286      *  \param thePnt Point specifying location of the plane to find shapes on.
1287      *  \param theState The state of the subshapes to find.
1288      *  \return List of all found sub-shapes.
1289      */
1290     ListOfGO GetShapesOnPlaneWithLocation (in GEOM_Object theShape,
1291                                            in long        theShapeType,
1292                                            in GEOM_Object theAx1,
1293                                            in GEOM_Object thePnt,
1294                                            in shape_state theState);
1295
1296
1297
1298     /*!
1299      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1300      *  the specified cylinder by the certain way, defined through \a theState parameter.
1301      *  \param theShape Shape to find sub-shapes of.
1302      *  \param theShapeType Type of sub-shapes to be retrieved.
1303      *  \param theAxis Vector (or line, or linear edge), specifying
1304      *                 axis of the cylinder to find shapes on.
1305      *  \param theRadius Radius of the cylinder to find shapes on.
1306      *  \param theState The state of the subshapes to find.
1307      *  \return List of all found sub-shapes.
1308      */
1309     ListOfGO GetShapesOnCylinder (in GEOM_Object theShape,
1310                                   in long        theShapeType,
1311                                   in GEOM_Object theAxis,
1312                                   in double      theRadius,
1313                                   in shape_state theState);
1314
1315     /*!
1316      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1317      *  the specified sphere by the certain way, defined through \a theState parameter.
1318      *  \param theShape Shape to find sub-shapes of.
1319      *  \param theShapeType Type of sub-shapes to be retrieved.
1320      *  \param theCenter Point, specifying center of the sphere to find shapes on.
1321      *  \param theRadius Radius of the sphere to find shapes on.
1322      *  \param theState The state of the subshapes to find.
1323      *  \return List of all found sub-shapes.
1324      */
1325     ListOfGO GetShapesOnSphere (in GEOM_Object theShape,
1326                                 in long        theShapeType,
1327                                 in GEOM_Object theCenter,
1328                                 in double      theRadius,
1329                                 in shape_state theState);
1330
1331     /*!
1332      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1333      *  the specified quadrangle by the certain way, defined through \a theState parameter.
1334      *  \param theShape Shape to find sub-shapes of.
1335      *  \param theShapeType Type of sub-shapes to be retrieved.
1336      *  \param theTopLeftPoint Top left quadrangle corner
1337      *  \param theTopRigthPoint Top right quadrangle corner
1338      *  \param theBottomLeftPoint Bottom left quadrangle corner
1339      *  \param theBottomRigthPoint Bottom right quadrangle corner
1340      *  \param theState The state of the subshapes to find.
1341      *  \return List of all found sub-shapes.
1342      */
1343     ListOfGO GetShapesOnQuadrangle (in GEOM_Object theShape,
1344                                     in long        theShapeType,
1345                                     in GEOM_Object theTopLeftPoint,
1346                                     in GEOM_Object theTopRigthPoint,
1347                                     in GEOM_Object theBottomLeftPoint,
1348                                     in GEOM_Object theBottomRigthPoint,
1349                                     in shape_state theState);
1350
1351     /*!
1352      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1353      *  the specified plane by the certain way, defined through \a theState parameter.
1354      *  \param theShape Shape to find sub-shapes of.
1355      *  \param theShapeType Type of sub-shapes to be retrieved.
1356      *  \param theAx1 Vector (or line, or linear edge), specifying normal
1357      *                direction and location of the plane to find shapes on.
1358      *  \param theState The state of the subshapes to find.
1359      *  \return List of IDs of all found sub-shapes.
1360      */
1361     ListOfLong GetShapesOnPlaneIDs (in GEOM_Object theShape,
1362                                     in long        theShapeType,
1363                                     in GEOM_Object theAx1,
1364                                     in shape_state theState);
1365
1366     /*!
1367      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1368      *  the specified plane by the certain way, defined through \a theState parameter.
1369      *  \param theShape Shape to find sub-shapes of.
1370      *  \param theShapeType Type of sub-shapes to be retrieved.
1371      *  \param theAx1 Vector (or line, or linear edge), specifying normal
1372      *                direction of the plane to find shapes on.
1373      *  \param thePnt Point specifying location of the plane to find shapes on.
1374      *  \param theState The state of the subshapes to find.
1375      *  \return List of IDs of all found sub-shapes.
1376      */
1377     ListOfLong GetShapesOnPlaneWithLocationIDs (in GEOM_Object theShape,
1378                                                 in long        theShapeType,
1379                                                 in GEOM_Object theAx1,
1380                                                 in GEOM_Object thePnt,
1381                                                 in shape_state theState);
1382
1383     /*!
1384      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1385      *  the specified cylinder by the certain way, defined through \a theState parameter.
1386      *  \param theShape Shape to find sub-shapes of.
1387      *  \param theShapeType Type of sub-shapes to be retrieved.
1388      *  \param theAxis Vector (or line, or linear edge), specifying
1389      *                 axis of the cylinder to find shapes on.
1390      *  \param theRadius Radius of the cylinder to find shapes on.
1391      *  \param theState The state of the subshapes to find.
1392      *  \return List of IDs of all found sub-shapes.
1393      */
1394     ListOfLong GetShapesOnCylinderIDs (in GEOM_Object theShape,
1395                                        in long        theShapeType,
1396                                        in GEOM_Object theAxis,
1397                                        in double      theRadius,
1398                                        in shape_state theState);
1399
1400     /*!
1401      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1402      *  the specified sphere by the certain way, defined through \a theState parameter.
1403      *  \param theShape Shape to find sub-shapes of.
1404      *  \param theShapeType Type of sub-shapes to be retrieved.
1405      *  \param theCenter Point, specifying center of the sphere to find shapes on.
1406      *  \param theRadius Radius of the sphere to find shapes on.
1407      *  \param theState The state of the subshapes to find.
1408      *  \return List of IDs of all found sub-shapes.
1409      */
1410     ListOfLong GetShapesOnSphereIDs (in GEOM_Object theShape,
1411                                      in long        theShapeType,
1412                                      in GEOM_Object theCenter,
1413                                      in double      theRadius,
1414                                      in shape_state theState);
1415
1416     /*!
1417      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1418      *  the specified quadrangle by the certain way, defined through \a theState parameter.
1419      *  \param theShape Shape to find sub-shapes of.
1420      *  \param theShapeType Type of sub-shapes to be retrieved.
1421      *  \param theTopLeftPoint Top left quadrangle corner
1422      *  \param theTopRigthPoint Top right quadrangle corner
1423      *  \param theBottomLeftPoint Bottom left quadrangle corner
1424      *  \param theBottomRigthPoint Bottom right quadrangle corner
1425      *  \param theState The state of the subshapes to find.
1426      *  \return List of IDs of all found sub-shapes.
1427      */
1428     ListOfLong GetShapesOnQuadrangleIDs (in GEOM_Object theShape,
1429                                          in long        theShapeType,
1430                                          in GEOM_Object theTopLeftPoint,
1431                                          in GEOM_Object theTopRigthPoint,
1432                                          in GEOM_Object theBottomLeftPoint,
1433                                          in GEOM_Object theBottomRigthPoint,
1434                                          in shape_state theState);
1435
1436     /*!
1437      * \brief Find subshapes complying with given status
1438      * \param theBox - the box to check state of subshapes against
1439      * \param theShape - the shape to explore
1440      * \param theShapeType - type of subshape of theShape
1441      * \param theState - required state
1442      * \return List of IDs of all found sub-shapes.
1443      */
1444     ListOfLong GetShapesOnBoxIDs (in GEOM_Object theBox,
1445                                   in GEOM_Object theShape,
1446                                   in long        theShapeType,
1447                                   in shape_state theState);
1448
1449     /*!
1450      * \brief Find subshapes complying with given status
1451      * \param theBox - the box to check state of subshapes against
1452      * \param theShape - the shape to explore
1453      * \param theShapeType - type of subshape of theShape
1454      * \param theState - required state
1455      * \return List of all found sub-shapes.
1456      */
1457     ListOfGO GetShapesOnBox (in GEOM_Object theBox,
1458                              in GEOM_Object theShape,
1459                              in long        theShapeType,
1460                              in shape_state theState);
1461
1462     /*!
1463      * \brief Find subshapes complying with given status
1464      * \param theCheckShape - the shape to check state of subshapes against
1465      * \param theShape - the shape to explore
1466      * \param theShapeType - type of subshape of theShape
1467      * \param theState - required state
1468      * \return List of IDs of all found sub-shapes.
1469      */
1470     ListOfLong GetShapesOnShapeIDs (in GEOM_Object theCheckShape,
1471                                     in GEOM_Object theShape,
1472                                     in short       theShapeType,
1473                                     in shape_state theState);
1474
1475     /*!
1476      * \brief Find subshapes complying with given status
1477      * \param theCheckShape - the shape to check state of subshapes against
1478      * \param theShape - the shape to explore
1479      * \param theShapeType - type of subshape of theShape
1480      * \param theState - required state
1481      * \return List of all found sub-shapes.
1482      */
1483     ListOfGO GetShapesOnShape (in GEOM_Object theCheckShape,
1484                                in GEOM_Object theShape,
1485                                in short       theShapeType,
1486                                in shape_state theState);
1487
1488     /*!
1489      * \brief Find subshapes complying with given status
1490      * \param theCheckShape - the shape to check state of subshapes against
1491      * \param theShape - the shape to explore
1492      * \param theShapeType - type of subshape of theShape
1493      * \param theState - required state
1494      * \return compound includes all found sub-shapes.
1495      */
1496     GEOM_Object GetShapesOnShapeAsCompound (in GEOM_Object theCheckShape,
1497                                             in GEOM_Object theShape,
1498                                             in short       theShapeType,
1499                                             in shape_state theState);
1500
1501     /*!
1502      *  Get sub-shape(s) of \a theShapeWhere, which are
1503      *  coincident with \a theShapeWhat or could be a part of it.
1504      *  \param theShapeWhere Shape to find sub-shapes of.
1505      *  \param theShapeWhat Shape, specifying what to find.
1506      *  \return Group of all found sub-shapes or a single found sub-shape.
1507      */
1508     GEOM_Object GetInPlace (in GEOM_Object theShapeWhere,
1509                             in GEOM_Object theShapeWhat);
1510
1511     /*!
1512      *  Get sub-shape(s) of \a theShapeWhere, which are
1513      *  coincident with \a theShapeWhat or could be a part of it.
1514      *
1515      *  Implementation of this method is based on a saved history of an operation,
1516      *  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
1517      *  arguments (an argument shape or a sub-shape of an argument shape).
1518      *  The operation could be the Partition or one of boolean operations,
1519      *  performed on simple shapes (not on compounds).
1520      *
1521      *  \param theShapeWhere Shape to find sub-shapes of.
1522      *  \param theShapeWhat Shape, specifying what to find.
1523      *  \return Group of all found sub-shapes or a single found sub-shape.
1524      */
1525     GEOM_Object GetInPlaceByHistory (in GEOM_Object theShapeWhere,
1526                                      in GEOM_Object theShapeWhat);
1527
1528     /*!
1529      *  Get sub-shape of theShapeWhere, which are
1530      *  coincident with \a theShapeWhat that can either SOLID, FACE, EDGE or VERTEX.
1531      *  \param theShapeWhere Shape to find sub-shapes of.
1532      *  \param theShapeWhat Shape, specifying what to find.
1533      *  \return found sub-shape.
1534      */
1535     GEOM_Object GetSame (in GEOM_Object theShapeWhere,
1536                          in GEOM_Object theShapeWhat);
1537   };
1538
1539   /*!
1540    *  GEOM_IBlocksOperations: Interface for Blocks construction
1541    *  Face from points or edges, Block from faces,
1542    *  Blocks multi-translation and multi-rotation
1543    */
1544   interface GEOM_IBlocksOperations : GEOM_IOperations
1545   {
1546     /*!
1547      *  Creation of blocks
1548      */
1549
1550     /*!
1551      *  Create a quadrangle face from four edges. Order of Edges is not
1552      *  important. It is  not necessary that edges share the same vertex.
1553      *  \param theEdge1,theEdge2,theEdge3,theEdge4 Edges for the face bound.
1554      *  \return New GEOM_Object, containing the created face.
1555      */
1556     GEOM_Object MakeQuad (in GEOM_Object theEdge1,
1557                           in GEOM_Object theEdge2,
1558                           in GEOM_Object theEdge3,
1559                           in GEOM_Object theEdge4);
1560
1561     /*!
1562      *  Create a quadrangle face on two edges.
1563      *  The missing edges will be built by creating the shortest ones.
1564      *  \param theEdge1,theEdge2 Two opposite edges for the face.
1565      *  \return New GEOM_Object, containing the created face.
1566      */
1567     GEOM_Object MakeQuad2Edges (in GEOM_Object theEdge1,
1568                                 in GEOM_Object theEdge2);
1569
1570     /*!
1571      *  Create a quadrangle face with specified corners.
1572      *  The missing edges will be built by creating the shortest ones.
1573      *  \param thePnt1,thePnt2,thePnt3,thePnt4 Corner vertices for the face.
1574      *  \return New GEOM_Object, containing the created face.
1575      */
1576     GEOM_Object MakeQuad4Vertices (in GEOM_Object thePnt1,
1577                                    in GEOM_Object thePnt2,
1578                                    in GEOM_Object thePnt3,
1579                                    in GEOM_Object thePnt4);
1580
1581     /*!
1582      *  Create a hexahedral solid, bounded by the six given faces. Order of
1583      *  faces is not important. It is  not necessary that Faces share the same edge.
1584      *  \param theFace1-theFace6 Faces for the hexahedral solid.
1585      *  \return New GEOM_Object, containing the created solid.
1586      */
1587     GEOM_Object MakeHexa (in GEOM_Object theFace1,
1588                           in GEOM_Object theFace2,
1589                           in GEOM_Object theFace3,
1590                           in GEOM_Object theFace4,
1591                           in GEOM_Object theFace5,
1592                           in GEOM_Object theFace6);
1593
1594     /*!
1595      *  Create a hexahedral solid between two given faces.
1596      *  The missing faces will be built by creating the smallest ones.
1597      *  \param theFace1,theFace2 Two opposite faces for the hexahedral solid.
1598      *  \return New GEOM_Object, containing the created solid.
1599      */
1600     GEOM_Object MakeHexa2Faces (in GEOM_Object theFace1,
1601                                 in GEOM_Object theFace2);
1602
1603     /*!
1604      *  Extract elements of blocks and blocks compounds
1605      */
1606
1607     /*!
1608      *  Get a vertex, found in the given shape by its coordinates.
1609      *  \param theShape Block or a compound of blocks.
1610      *  \param theX,theY,theZ Coordinates of the sought vertex.
1611      *  \param theEpsilon Maximum allowed distance between the resulting
1612      *                    vertex and point with the given coordinates.
1613      *  \return New GEOM_Object, containing the found vertex.
1614      */
1615     GEOM_Object GetPoint (in GEOM_Object theShape,
1616                           in double      theX,
1617                           in double      theY,
1618                           in double      theZ,
1619                           in double      theEpsilon);
1620
1621     /*!
1622      *  Get an edge, found in the given shape by two given vertices.
1623      *  \param theShape Block or a compound of blocks.
1624      *  \param thePoint1,thePoint2 Points, close to the ends of the desired edge.
1625      *  \return New GEOM_Object, containing the found edge.
1626      */
1627     GEOM_Object GetEdge (in GEOM_Object theShape,
1628                          in GEOM_Object thePoint1,
1629                          in GEOM_Object thePoint2);
1630
1631     /*!
1632      *  Find an edge of the given shape, which has minimal distance to the given point.
1633      *  \param theShape Block or a compound of blocks.
1634      *  \param thePoint Point, close to the desired edge.
1635      *  \return New GEOM_Object, containing the found edge.
1636      */
1637     GEOM_Object GetEdgeNearPoint (in GEOM_Object theShape,
1638                                   in GEOM_Object thePoint);
1639
1640     /*!
1641      *  Returns a face, found in the given shape by four given corner vertices.
1642      *  \param theShape Block or a compound of blocks.
1643      *  \param thePoint1-thePoint4 Points, close to the corners of the desired face.
1644      *  \return New GEOM_Object, containing the found face.
1645      */
1646     GEOM_Object GetFaceByPoints (in GEOM_Object theShape,
1647                                  in GEOM_Object thePoint1,
1648                                  in GEOM_Object thePoint2,
1649                                  in GEOM_Object thePoint3,
1650                                  in GEOM_Object thePoint4);
1651
1652     /*!
1653      *  Get a face of block, found in the given shape by two given edges.
1654      *  \param theShape Block or a compound of blocks.
1655      *  \param theEdge1,theEdge2 Edges, close to the edges of the desired face.
1656      *  \return New GEOM_Object, containing the found face.
1657      */
1658     GEOM_Object GetFaceByEdges (in GEOM_Object theShape,
1659                                 in GEOM_Object theEdge1,
1660                                 in GEOM_Object theEdge2);
1661
1662     /*!
1663      *  Find a face, opposite to the given one in the given block.
1664      *  \param theBlock Must be a hexahedral solid.
1665      *  \param theFace Face of \a theBlock, opposite to the desired face.
1666      *  \return New GEOM_Object, containing the found face.
1667      */
1668     GEOM_Object GetOppositeFace (in GEOM_Object theBlock,
1669                                  in GEOM_Object theFace);
1670
1671     /*!
1672      *  Find a face of the given shape, which has minimal distance to the given point.
1673      *  \param theShape Block or a compound of blocks.
1674      *  \param thePoint Point, close to the desired face.
1675      *  \return New GEOM_Object, containing the found face.
1676      */
1677     GEOM_Object GetFaceNearPoint (in GEOM_Object theShape,
1678                                   in GEOM_Object thePoint);
1679
1680     /*!
1681      *  Find a face of block, whose outside normale has minimal angle with the given vector.
1682      *  \param theShape Block or a compound of blocks.
1683      *  \param theVector Vector, close to the normale of the desired face.
1684      *  \return New GEOM_Object, containing the found face.
1685      */
1686     GEOM_Object GetFaceByNormale (in GEOM_Object theBlock,
1687                                   in GEOM_Object theVector);
1688
1689     /*!
1690      *  Extract blocks from blocks compounds
1691      */
1692
1693     /*!
1694      *  Check, if the compound contains only specified blocks.
1695      *  \param theCompound The compound to check.
1696      *  \param theMinNbFaces If solid has lower number of faces, it is not a block.
1697      *  \param theMaxNbFaces If solid has higher number of faces, it is not a block.
1698      *    \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
1699      *  \return TRUE, if the given compound contains only blocks.
1700      *  \return theNbBlocks Number of specified blocks in theCompound.
1701      */
1702     boolean IsCompoundOfBlocks (in GEOM_Object theCompound,
1703                                 in long        theMinNbFaces,
1704                                 in long        theMaxNbFaces,
1705                                 out long       theNbBlocks);
1706
1707     /*!
1708      *  Enumeration of Blocks Compound defects.
1709      */
1710     enum BCErrorType
1711     {
1712       /* Each element of the compound should be a Block */
1713       NOT_BLOCK,
1714
1715       /* An element is a potential block, but has degenerated and/or seam edge(s). */
1716       EXTRA_EDGE,
1717
1718       /* A connection between two Blocks should be an entire face or an entire edge */
1719       INVALID_CONNECTION,
1720
1721       /* The compound should be connexe */
1722       NOT_CONNECTED,
1723
1724       /* The glue between two quadrangle faces should be applied */
1725       NOT_GLUED
1726     };
1727
1728     /*!
1729      *  Description of Blocks Compound defect: type and incriminated sub-shapes.
1730      */
1731     struct BCError
1732     {
1733       BCErrorType error;
1734       ListOfLong  incriminated;
1735     };
1736
1737     /*!
1738      *  Sequence of all Blocks Compound defects.
1739      */
1740     typedef sequence<BCError> BCErrors;
1741
1742     /*!
1743      *  Check, if the compound of blocks is given.
1744      *  To be considered as a compound of blocks, the
1745      *  given shape must satisfy the following conditions:
1746      *  - Each element of the compound should be a Block (6 faces and 12 edges).
1747      *  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
1748      *  - The compound should be connexe.
1749      *  - The glue between two quadrangle faces should be applied.
1750      *    \note Single block is also accepted as a valid compound of blocks.
1751      *  \param theCompound The compound to check.
1752      *  \return TRUE, if the given shape is a compound of blocks.
1753      *  \return theErrors Structure, containing discovered errors and incriminated sub-shapes.
1754      */
1755     boolean CheckCompoundOfBlocks (in GEOM_Object theCompound,
1756                                    out BCErrors   theErrors);
1757
1758     /*!
1759      *  Convert sequence of Blocks Compound errors, returned by
1760      *  <VAR>CheckCompoundOfBlocks()</VAR>, into string.
1761      *  \param theCompound The bad compound.
1762      *  \param theErrors The sequence of \a theCompound errors.
1763      *  \return String, describing all the errors in form, suitable for printing.
1764      */
1765     string PrintBCErrors (in GEOM_Object theCompound,
1766                           in BCErrors    theErrors);
1767
1768     /*!
1769      *  Remove all seam and degenerated edges from \a theShape.
1770      *  Unite faces and edges, sharing one surface.
1771      *  \param theShape The compound or single solid to remove irregular edges from.
1772      *  \return Improved shape.
1773      */
1774     GEOM_Object RemoveExtraEdges (in GEOM_Object theShape);
1775
1776     /*!
1777      *  Check, if the given shape is a blocks compound.
1778      *  Fix all detected errors.
1779      *    \note Single block can be also fixed by this method.
1780      *  \param theCompound The compound to check and improve.
1781      *  \return Improved compound.
1782      */
1783     GEOM_Object CheckAndImprove (in GEOM_Object theCompound);
1784
1785     /*!
1786      *  Get all the blocks, contained in the given compound.
1787      *  \param theCompound The compound to explode.
1788      *  \param theMinNbFaces If solid has lower number of faces, it is not a block.
1789      *  \param theMaxNbFaces If solid has higher number of faces, it is not a block.
1790      *    \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
1791      *  \return List of GEOM_Objects, containing the retrieved blocks.
1792      */
1793     ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound,
1794                                       in long        theMinNbFaces,
1795                                       in long        theMaxNbFaces);
1796
1797     /*!
1798      *  Find block, containing the given point inside its volume or on boundary.
1799      *  \param theCompound Compound, to find block in.
1800      *  \param thePoint Point, close to the desired block. If the point lays on
1801      *         boundary between some blocks, we return block with nearest center.
1802      *  \return New GEOM_Object, containing the found block.
1803      */
1804     GEOM_Object GetBlockNearPoint (in GEOM_Object theCompound,
1805                                    in GEOM_Object thePoint);
1806
1807     /*!
1808      *  Find block, containing all the elements, passed as the parts, or maximum quantity of them.
1809      *  \param theCompound Compound, to find block in.
1810      *  \param theParts List of faces and/or edges and/or vertices to be parts of the found block.
1811      *  \return New GEOM_Object, containing the found block.
1812      */
1813     GEOM_Object GetBlockByParts (in GEOM_Object theCompound,
1814                                  in ListOfGO    theParts);
1815
1816     /*!
1817      *  Return all blocks, containing all the elements, passed as the parts.
1818      *  \param theCompound Compound, to find blocks in.
1819      *  \param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
1820      *  \return List of GEOM_Objects, containing the found blocks.
1821      */
1822     ListOfGO GetBlocksByParts (in GEOM_Object theCompound,
1823                                in ListOfGO    theParts);
1824
1825     /*!
1826      *  Operations on blocks with gluing of result
1827      */
1828
1829     /*!
1830      *  Multi-transformate block and glue the result.
1831      *  Transformation is defined so, as to superpose theDirFace1 with theDirFace2.
1832      *  \param theBlock Hexahedral solid to be multi-transformed.
1833      *  \param theDirFace1 First direction face global index.
1834      *  \param theDirFace2 Second direction face global index.
1835      *  \param theNbTimes Quantity of transformations to be done.
1836      *    \note Global index of sub-shape can be obtained, using method
1837      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
1838      *  \return New GEOM_Object, containing the result shape.
1839      */
1840     GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock,
1841                                            in long        theDirFace1,
1842                                            in long        theDirFace2,
1843                                            in long        theNbTimes);
1844
1845     /*!
1846      *  Multi-transformate block and glue the result.
1847      *  \param theBlock Hexahedral solid to be multi-transformed.
1848      *  \param theDirFace1U,theDirFace2U Direction faces for the first transformation.
1849      *  \param theDirFace1V,theDirFace2V Direction faces for the second transformation.
1850      *  \param theNbTimesU,theNbTimesV Quantity of transformations to be done.
1851      *  \return New GEOM_Object, containing the result shape.
1852      */
1853     GEOM_Object MakeMultiTransformation2D (in GEOM_Object theBlock,
1854                                            in long        theDirFace1U,
1855                                            in long        theDirFace2U,
1856                                            in long        theNbTimesU,
1857                                            in long        theDirFace1V,
1858                                            in long        theDirFace2V,
1859                                            in long        theNbTimesV);
1860
1861     /*!
1862      *  Special operation - propagation
1863      */
1864
1865     /*!
1866      *  Build all possible propagation groups.
1867      *  Propagation group is a set of all edges, opposite to one (main)
1868      *  edge of this group directly or through other opposite edges.
1869      *  Notion of Opposite Edge make sence only on quadrangle face.
1870      *  \param theShape Shape to build propagation groups on.
1871      *  \return List of GEOM_Objects, each of them is a propagation group.
1872      */
1873     ListOfGO Propagate (in GEOM_Object theShape);
1874   };
1875
1876   /*!
1877    *  GEOM_IBooleanOperations: Interface for boolean operations (Cut, Fuse, Common)
1878    */
1879   interface GEOM_IBooleanOperations : GEOM_IOperations
1880   {
1881     /*!
1882      *  Perform one of boolean operations on two given shapes.
1883      *  \param theShape1 First argument for boolean operation.
1884      *  \param theShape2 Second argument for boolean operation.
1885      *  \param theOperation Indicates the operation to be done:
1886      *                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
1887      *  \return New GEOM_Object, containing the result shape.
1888      */
1889     GEOM_Object MakeBoolean (in GEOM_Object theShape1,
1890                              in GEOM_Object theShape2,
1891                              in long theOperation);
1892
1893     /*!
1894      *  Perform partition operation.
1895      *  \param theShapes Shapes to be intersected.
1896      *  \param theTools Shapes to intersect theShapes.
1897      *  \note  Each compound from ListShapes and ListTools will be exploded in order
1898      *         to avoid possible intersection between shapes from this compound.
1899      *  \param theLimit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
1900      #  \param KeepNonlimitShapes: if this parameter == 0 - only shapes with
1901      #                             type <= Limit are kept in the result,
1902      #                             else - shapes with type > Limit are kept
1903      #                             also (if they exist)
1904      *
1905      *  After implementation new version of PartitionAlgo (October 2006)
1906      *  other parameters are ignored by current functionality. They are kept
1907      *  in this function only for supporting old versions.
1908      *  Ignored parameters:
1909      *  \param theKeepInside Shapes, outside which the results will be deleted.
1910      *         Each shape from theKeepInside must belong to theShapes also.
1911      *  \param theRemoveInside Shapes, inside which the results will be deleted.
1912      *         Each shape from theRemoveInside must belong to theShapes also.
1913      *  \param theRemoveWebs If TRUE, perform Glue 3D algorithm.
1914      *  \param theMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
1915      *
1916      *  \return New GEOM_Object, containing the result shapes.
1917      */
1918     GEOM_Object MakePartition (in ListOfGO   theShapes,
1919                                in ListOfGO   theTools,
1920                                in ListOfGO   theKeepInside,
1921                                in ListOfGO   theRemoveInside,
1922                                in short      theLimit,
1923                                in boolean    theRemoveWebs,
1924                                in ListOfLong theMaterials,
1925                                in short      theKeepNonlimitShapes);
1926
1927     /*!
1928      *  Perform partition operation.
1929      *  This method may be usefull if it is needed to make a partition for
1930      *  a compound containing nonintersected shapes. Performance will be better
1931      *  since intersection between shapes from compound is not performed.
1932      *
1933      *  Description of all parameters as in previous method MakePartition()
1934      *
1935      *  \note Passed compounds (via ListShapes or via ListTools)
1936      *        have to consist of nonintersecting shapes.
1937      *
1938      *  \return New GEOM_Object, containing the result shapes.
1939      */
1940     GEOM_Object MakePartitionNonSelfIntersectedShape (in ListOfGO   theShapes,
1941                                                       in ListOfGO   theTools,
1942                                                       in ListOfGO   theKeepInside,
1943                                                       in ListOfGO   theRemoveInside,
1944                                                       in short      theLimit,
1945                                                       in boolean    theRemoveWebs,
1946                                                       in ListOfLong theMaterials,
1947                                                       in short      theKeepNonlimitShapes);
1948
1949     /*!
1950      *  Perform partition of the Shape with the Plane
1951      *  \param theShape Shape to be intersected.
1952      *  \param thePlane Tool shape, to intersect theShape.
1953      *  \return New GEOM_Object, containing the result shape.
1954      */
1955     GEOM_Object MakeHalfPartition (in GEOM_Object theShape,
1956                                    in GEOM_Object thePlane);
1957   };
1958
1959   /*!
1960    *  GEOM_ICurvesOperations: Interface for curves creation.
1961    *  Polyline, Circle, Spline (Bezier and Interpolation)
1962    */
1963   interface GEOM_ICurvesOperations : GEOM_IOperations
1964   {
1965     /*!
1966      *  Create a circle with given center, normal vector and radius.
1967      *  \param thePnt Circle center.
1968      *  \param theVec Vector, normal to the plane of the circle.
1969      *  \param theR Circle radius.
1970      *  \return New GEOM_Object, containing the created circle.
1971      */
1972     GEOM_Object MakeCirclePntVecR (in GEOM_Object thePnt,
1973                                    in GEOM_Object theVec,
1974                                    in double theR);
1975     /*!
1976      *  Create a circle, passing through three given points
1977      *  \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1978      *  \return New GEOM_Object, containing the created circle.
1979      */
1980     GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1,
1981                                     in GEOM_Object thePnt2,
1982                                     in GEOM_Object thePnt3);
1983     /*!
1984      *  Create a circle with given center, with a radius equals the distance from center to Point1
1985      *  and on a plane defined by all of three points.
1986      *  \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1987      *  \return New GEOM_Object, containing the created circle.
1988      */
1989     GEOM_Object MakeCircleCenter2Pnt (in GEOM_Object thePnt1,
1990                                       in GEOM_Object thePnt2,
1991                                       in GEOM_Object thePnt3);
1992     /*!
1993      *  Create an ellipse with given center, normal vector and radiuses.
1994      *  \param thePnt Ellipse center.
1995      *  \param theVec Vector, normal to the plane of the ellipse.
1996      *  \param theRMajor Major ellipse radius.
1997      *  \param theRMinor Minor ellipse radius.
1998      *  \return New GEOM_Object, containing the created ellipse.
1999      */
2000     GEOM_Object MakeEllipse (in GEOM_Object thePnt,
2001                              in GEOM_Object theVec,
2002                              in double theRMajor,
2003                              in double theRMinor);
2004
2005     /*!
2006      *  Create an arc of circle, passing through three given points.
2007      *  \param thePnt1 Start point of the arc.
2008      *  \param thePnt2 Middle point of the arc.
2009      *  \param thePnt3 End point of the arc.
2010      *  \return New GEOM_Object, containing the created arc.
2011      */
2012     GEOM_Object MakeArc (in GEOM_Object thePnt1,
2013                          in GEOM_Object thePnt2,
2014                          in GEOM_Object thePnt3);
2015
2016     /*!
2017      *  Create an arc of circle of center C from one point to another
2018      *  \param theCenter Center point of the arc.
2019      *  \param thePnt1 Start point of the arc.
2020      *  \param thePnt2 End point of the arc.
2021      *  \param theSense Orientation of the arc
2022      *  \return New GEOM_Object, containing the created arc.
2023      */
2024     GEOM_Object MakeArcCenter (in GEOM_Object theCenter,
2025                                in GEOM_Object thePnt1,
2026                                in GEOM_Object thePnt2,
2027                                in boolean theSense);
2028
2029
2030     /*!
2031      *  Create a polyline on the set of points.
2032      *  \param thePoints Sequence of points for the polyline.
2033      *  \return New GEOM_Object, containing the created polyline.
2034      */
2035     GEOM_Object MakePolyline (in ListOfGO thePoints);
2036
2037     /*!
2038      *  Create bezier curve on the set of points.
2039      *  \param thePoints Sequence of points for the bezier curve.
2040      *  \return New GEOM_Object, containing the created bezier curve.
2041      */
2042     GEOM_Object MakeSplineBezier (in ListOfGO thePoints);
2043
2044     /*!
2045      *  Create B-Spline curve on the set of points.
2046      *  \param thePoints Sequence of points for the B-Spline curve.
2047      *  \return New GEOM_Object, containing the created B-Spline curve.
2048      */
2049     GEOM_Object MakeSplineInterpolation (in ListOfGO thePoints);
2050
2051     /*!
2052      *  Create a sketcher (wire or face), following the textual description,
2053      *  passed through \a theCommand argument. \n
2054      *  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2055      *  Format of the description string have to be the following:
2056      *
2057      *  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2058      *
2059      *  Where:
2060      *  - x1, y1 are coordinates of the first sketcher point (zero by default),
2061      *  - CMD is one of
2062      *     - "R angle" : Set the direction by angle
2063      *     - "D dx dy" : Set the direction by DX & DY
2064      *     .
2065      *       \n
2066      *     - "TT x y" : Create segment by point at X & Y
2067      *     - "T dx dy" : Create segment by point with DX & DY
2068      *     - "L length" : Create segment by direction & Length
2069      *     - "IX x" : Create segment by direction & Intersect. X
2070      *     - "IY y" : Create segment by direction & Intersect. Y
2071      *     .
2072      *       \n
2073      *     - "C radius length" : Create arc by direction, radius and length(in degree)
2074      *     .
2075      *       \n
2076      *     - "WW" : Close Wire (to finish)
2077      *     - "WF" : Close Wire and build face (to finish)
2078      *
2079      *  \param theCommand String, defining the sketcher in local
2080      *                    coordinates of the working plane.
2081      *  \param theWorkingPlane Nine double values, defining origin,
2082      *                         OZ and OX directions of the working plane.
2083      *  \return New GEOM_Object, containing the created wire.
2084      */
2085     GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane);
2086
2087       /*!
2088      *  Create a sketcher (wire or face), following the textual description,
2089      *  passed through \a theCommand argument. \n
2090      *  For format of the description string see the previous method.\n
2091      *  \param theCommand String, defining the sketcher in local
2092      *                    coordinates of the working plane.
2093      *  \param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2094      *  \return New GEOM_Object, containing the created wire.
2095      */
2096     GEOM_Object MakeSketcherOnPlane (in string theCommand, in GEOM_Object theWorkingPlane);
2097   };
2098
2099   /*!
2100    *  GEOM_ILocalOperations: Interface for fillet and chamfer creation.
2101    */
2102   interface GEOM_ILocalOperations : GEOM_IOperations
2103   {
2104     /*!
2105      *  Perform a fillet on all edges of the given shape.
2106      *  \param theShape Shape, to perform fillet on.
2107      *  \param theR Fillet radius.
2108      *  \return New GEOM_Object, containing the result shape.
2109      */
2110     GEOM_Object MakeFilletAll (in GEOM_Object theShape,
2111                                in double      theR);
2112
2113     /*!
2114      *  Perform a fillet on the specified edges of the given shape
2115      *  \param theShape Shape, to perform fillet on.
2116      *  \param theR Fillet radius.
2117      *  \param theEdges Global indices of edges to perform fillet on.
2118      *    \note Global index of sub-shape can be obtained, using method
2119      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2120      *  \return New GEOM_Object, containing the result shape.
2121      */
2122     GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
2123                                  in double      theR,
2124                                  in ListOfLong  theEdges);
2125     GEOM_Object MakeFilletEdgesR1R2 (in GEOM_Object theShape,
2126                                      in double      theR1,
2127                                      in double      theR2,
2128                                      in ListOfLong  theEdges);
2129
2130     /*!
2131      *  Perform a fillet on all edges of the specified faces of the given shape.
2132      *  \param theShape Shape, to perform fillet on.
2133      *  \param theR Fillet radius.
2134      *  \param theFaces Global indices of faces to perform fillet on.
2135      *    \note Global index of sub-shape can be obtained, using method
2136      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2137      *  \return New GEOM_Object, containing the result shape.
2138      */
2139     GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
2140                                  in double      theR,
2141                                  in ListOfLong  theFaces);
2142     GEOM_Object MakeFilletFacesR1R2 (in GEOM_Object theShape,
2143                                      in double      theR1,
2144                                      in double      theR2,
2145                                      in ListOfLong  theFaces);
2146
2147     /*!
2148      *  Perform a symmetric chamfer on all edges of the given shape.
2149      *  \param theShape Shape, to perform chamfer on.
2150      *  \param theD Chamfer size along each face.
2151      *  \return New GEOM_Object, containing the result shape.
2152      */
2153     GEOM_Object MakeChamferAll (in GEOM_Object theShape,
2154                                 in double      theD);
2155
2156     /*!
2157      *  Perform a chamfer on edges, common to the specified faces.
2158      *  with distance D1 on the Face1
2159      *  \param theShape Shape, to perform chamfer on.
2160      *  \param theD1 Chamfer size along \a theFace1.
2161      *  \param theD2 Chamfer size along \a theFace2.
2162      *  \param theFace1,theFace2 Global indices of two faces of \a theShape.
2163      *    \note Global index of sub-shape can be obtained, using method
2164      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2165      *  \return New GEOM_Object, containing the result shape.
2166      */
2167     GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
2168                                  in double theD1, in double theD2,
2169                                  in long theFace1, in long theFace2);
2170     /*!
2171      *  The Same but with params theD = Chamfer Lenght
2172      *  and theAngle = Chamfer Angle (Angle in radians)
2173      */
2174     GEOM_Object MakeChamferEdgeAD (in GEOM_Object theShape,
2175                                    in double theD, in double theAngle,
2176                                    in long theFace1, in long theFace2);
2177
2178     /*!
2179      *  Perform a chamfer on all edges of the specified faces.
2180      *  with distance D1 on the first specified face (if several for one edge)
2181      *  \param theShape Shape, to perform chamfer on.
2182      *  \param theD1 Chamfer size along face from \a theFaces. If both faces,
2183      *               connected to the edge, are in \a theFaces, \a theD1
2184      *               will be get along face, which is nearer to \a theFaces beginning.
2185      *  \param theD2 Chamfer size along another of two faces, connected to the edge.
2186      *  \param theFaces Sequence of global indices of faces of \a theShape.
2187      *    \note Global index of sub-shape can be obtained, using method
2188      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2189      *  \return New GEOM_Object, containing the result shape.
2190      */
2191     GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
2192                                   in double theD1, in double theD2,
2193                                   in ListOfLong theFaces);
2194     /*!
2195      *  The Same but with params theD = Chamfer Lenght
2196      *  and theAngle = Chamfer Angle (Angle in radians)
2197      */
2198     GEOM_Object MakeChamferFacesAD (in GEOM_Object theShape,
2199                                     in double theD, in double theAngle,
2200                                     in ListOfLong theFaces);
2201
2202    /*!
2203     *  Perform a chamfer on edges,
2204     *  with distance D1 on the first specified face (if several for one edge)
2205     *  \param theShape Shape, to perform chamfer on.
2206     *  \param theD1 theD2 Chamfer size
2207     *  \param theEdges Sequence of edges of \a theShape.
2208     *  \return New GEOM_Object, containing the result shape.
2209     */
2210     GEOM_Object MakeChamferEdges (in GEOM_Object theShape,
2211                                   in double theD1, in double theD2,
2212                                   in ListOfLong theEdges);
2213     /*!
2214      *  The Same but with params theD = Chamfer Lenght
2215      *  and theAngle = Chamfer Angle (Angle in radians)
2216      */
2217     GEOM_Object MakeChamferEdgesAD (in GEOM_Object theShape,
2218                                     in double theD, in double theAngle,
2219                                     in ListOfLong theEdges);
2220
2221     /*!
2222      *  Perform an Archimde operation on the given shape with given parameters.
2223      *                    The object presenting the resulting face is returned
2224      *  \param theShape Shape to be put in water.
2225      *  \param theWeight Weight og the shape.
2226      *  \param theWaterDensity Density of the water.
2227      *  \param theMeshDeflection Deflection od the mesh, using to compute the section.
2228      *  \return New GEOM_Object, containing a section of \a theShape
2229      *          by a plane, corresponding to water level.
2230      */
2231     GEOM_Object MakeArchimede (in GEOM_Object theShape,
2232                                in double theWeight,
2233                                in double theWaterDensity,
2234                                in double theMeshDeflection);
2235
2236     /*!
2237      *  Duplicates <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2238      *  Present here only for compatibility.
2239      */
2240     long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape);
2241   };
2242
2243   /*!
2244    *  GEOM_IHealingOperations: Interface for shape healing operations.
2245    *  Shape Processing, SuppressFaces, etc.
2246    */
2247   interface GEOM_IHealingOperations : GEOM_IOperations
2248   {
2249     /*!
2250      *  Apply a sequence of Shape Healing operators to the given object.
2251      *  \param theShapes Shape to be processed.
2252      *  \param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
2253      *  \param theParameters List of names of parameters
2254      *                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
2255      *  \param theValues List of values of parameters, in the same order
2256      *                    as parameters are listed in \a theParameters list.
2257      *  \return New GEOM_Object, containing processed shape.
2258      */
2259     GEOM_Object ProcessShape (in GEOM_Object theShapes,
2260                               in string_array theOperators,
2261                               in string_array theParameters,
2262                               in string_array theValues);
2263
2264     /*!
2265      *  Get default sequence of operators, their parameters and parameters' values
2266      *  of Shape Process operation. In the current implementation the defaults are
2267      *  read from the file pointed by CSF_ShHealingDefaults environmental variable.
2268      *  \param theOperators Output. Default list of names of operators.
2269      *  \param theParameters Output. Default list of names of parameters.
2270      *  \param theValues Output. List of default values of parameters, in the same order
2271      *                           as parameters are listed in \a theParameters list.
2272      */
2273     void GetShapeProcessParameters (out string_array theOperators,
2274                                     out string_array theParameters,
2275                                     out string_array theValues);
2276     /*!
2277      *  Get parameters and parameters' values for the given Shape Process operation.
2278      *  In the current implementation the defaults are
2279      *  read from the file pointed by CSF_ShHealingDefaults environmental variable.
2280      *  \param theOperator Input. The operator's name.
2281      *  \param theParameters Output. Default list of names of parameters.
2282      *  \param theValues Output. List of default values of parameters, in the same order
2283      *                           as parameters are listed in \a theParameters list.
2284      */
2285     void GetOperatorParameters (in string theOperator,
2286                                 out string_array theParameters,
2287                                 out string_array theValues);
2288
2289     /*!
2290      *  Remove faces from the given object (shape).
2291      *  \param theObject Shape to be processed.
2292      *  \param theFaces Indices of faces to be removed, if EMPTY then the method
2293      *                  removes ALL faces of the given object.
2294      *  \return New GEOM_Object, containing processed shape.
2295      */
2296     GEOM_Object SuppressFaces (in GEOM_Object theObject, in short_array theFaces);
2297
2298     /*!
2299      *  Close an open wire.
2300      *  \param theObject Shape to be processed.
2301      *  \param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
2302      *                  if -1, then theObject itself is a wire.
2303      *  \param isCommonVertex If TRUE : closure by creation of a common vertex,
2304      *                        If FALS : closure by creation of an edge between ends.
2305      *  \return New GEOM_Object, containing processed shape.
2306      */
2307     GEOM_Object CloseContour (in GEOM_Object theObject, in short_array theWires,
2308                               in boolean isCommonVertex);
2309
2310     /*!
2311      *  Remove internal wires and edges from the given object (face).
2312      *  \param theObject Shape to be processed.
2313      *  \param theWires Indices of wires to be removed, if EMPTY then the method
2314      *                  removes ALL internal wires of the given object.
2315      *  \return New GEOM_Object, containing processed shape.
2316      */
2317     GEOM_Object RemoveIntWires (in GEOM_Object theObject, in short_array theWires);
2318
2319     /*!
2320      *  Remove internal closed contours (holes) from the given object.
2321      *  \param theObject Shape to be processed.
2322      *  \param theWires Indices of wires to be removed, if EMPTY then the method
2323      *                  removes ALL internal holes of the given object
2324      *  \return New GEOM_Object, containing processed shape.
2325      */
2326     GEOM_Object FillHoles (in GEOM_Object theObject, in short_array theWires);
2327
2328     /*!
2329      *  Sewing of the given object.
2330      *  \param theObject Shape to be processed.
2331      *  \param theTolerance Required tolerance value.
2332      *  \return New GEOM_Object, containing processed shape.
2333      */
2334     GEOM_Object Sew (in GEOM_Object theObject, in double theTolerance);
2335
2336     /*!
2337      *  Addition of a point to a given edge object.
2338      *  \param theObject Shape to be processed.
2339      *  \param theEdgeIndex Index of edge to be divided within theObject's shape,
2340      *                      if -1, then theObject itself is the edge.
2341      *  \param theValue Value of parameter on edge or length parameter,
2342      *                  depending on \a isByParameter.
2343      *  \param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1],
2344      *                       if FALSE : \a theValue is treated as a length parameter [0..1]
2345      *  \return New GEOM_Object, containing processed shape.
2346      */
2347     GEOM_Object DivideEdge (in GEOM_Object theObject, in short theEdgeIndex,
2348                             in double theValue, in boolean isByParameter);
2349
2350     /*!
2351      *  Get a list of wires (wrapped in GEOM_Object-s),
2352      *  that constitute a free boundary of the given shape.
2353      *  \param theObject Shape to get free boundary of.
2354      *  \param theClosedWires Output. Closed wires on the free boundary of the given shape.
2355      *  \param theOpenWires Output. Open wires on the free boundary of the given shape.
2356      *  \return FALSE, if an error(s) occured during the method execution.
2357      */
2358     boolean GetFreeBoundary (in GEOM_Object theObject,
2359                              out ListOfGO theClosedWires,
2360                              out ListOfGO theOpenWires);
2361
2362     /*!
2363      *  Change orientation of the given object.
2364      *  \param theObject Shape to be processed.
2365      *  \return New GEOM_Object, containing processed shape.
2366      */
2367     GEOM_Object ChangeOrientation (in GEOM_Object theObject);
2368     GEOM_Object ChangeOrientationCopy (in GEOM_Object theObject);
2369
2370   };
2371
2372   /*!
2373    *  GEOM_IInsertOperations: Interface for shape insert operations (like copy, import).
2374    *
2375    */
2376   interface GEOM_IInsertOperations : GEOM_IOperations
2377   {
2378     /*!
2379      *  Create a copy of the given object
2380      */
2381     GEOM_Object MakeCopy (in GEOM_Object theOriginal);
2382
2383     /*!
2384      *  Export the given shape into a file with given name.
2385      *  \param theObject Shape to be stored in the file.
2386      *  \param theFileName Name of the file to store the given shape in.
2387      *  \param theFormatName Specify format for the shape storage.
2388      *         Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
2389      */
2390     void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName);
2391
2392     /*!
2393      *  Import a shape from the BRep or IGES or STEP file
2394      *  (depends on given format) with given name.
2395      *  \param theFileName The file, containing the shape.
2396      *  \param theFormatName Specify format for the file reading.
2397      *         Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
2398      *  \return New GEOM_Object, containing the imported shape.
2399      */
2400     GEOM_Object Import (in string theFileName, in string theFormatName);
2401
2402     /*!
2403      *  Get the supported import formats and corresponding patterns for File dialog.
2404      *  \param theFormats Output. List of formats, available for import.
2405      *  \param thePatterns Output. List of file patterns, corresponding to available formats.
2406      *  \return Returns available formats and patterns through the arguments.
2407      */
2408     void ImportTranslators (out string_array theFormats,
2409                             out string_array thePatterns);
2410
2411     /*!
2412      *  Get the supported export formats and corresponding patterns for File dialog.
2413      *  \param theFormats Output. List of formats, available for export.
2414      *  \param thePatterns Output. List of file patterns, corresponding to available formats.
2415      *  \return Returns available formats and patterns through the arguments.
2416      */
2417     void ExportTranslators (out string_array theFormats,
2418                             out string_array thePatterns);
2419   };
2420
2421   /*!
2422    *  GEOM_IKindOfShape: namespace for shape_kind enumeration.
2423    */
2424   interface GEOM_IKindOfShape
2425   {
2426     enum shape_kind {
2427       NO_SHAPE,
2428       // COMPOSITEs
2429       COMPOUND,
2430       COMPSOLID,
2431       SHELL,
2432       WIRE,
2433       // SOLIDs
2434       SPHERE,       // full sphere
2435       CYLINDER,     // cylinder
2436       BOX,          // box with faces, parallel to global coordinate planes
2437       ROTATED_BOX,  // other box
2438       TORUS,        // full torus
2439       CONE,         // cone
2440       POLYHEDRON,   // solid, bounded by polygons
2441       SOLID,        // other solid
2442       // FACEs
2443       SPHERE2D,     // spherical face (closed)
2444       CYLINDER2D,   // cylindrical face with defined height
2445       TORUS2D,      // toroidal face (closed)
2446       CONE2D,       // conical face with defined height
2447       DISK_CIRCLE,  // planar, bounded by circle
2448       DISK_ELLIPSE, // planar, bounded by ellipse
2449       POLYGON,      // planar, bounded by segments
2450       PLANE,        // infinite planar
2451       PLANAR,       // other planar
2452       FACE,         // other face
2453       // EDGEs
2454       CIRCLE,       // full circle
2455       ARC_CIRCLE,   // arc of circle
2456       ELLIPSE,      // full ellipse
2457       ARC_ELLIPSE,  // arc of ellipse
2458       LINE,         // infinite segment
2459       SEGMENT,      // segment
2460       EDGE,         // other edge
2461       // VERTEX
2462       VERTEX
2463     };
2464   };
2465
2466
2467   /*!
2468    *  GEOM_IMeasureOperations: Interface for measurement (distance, whatis) and
2469    *  properties calculation (like Centre of Mass, Inertia, etc.).
2470    *
2471    */
2472   interface GEOM_IMeasureOperations : GEOM_IOperations
2473   {
2474     /*!
2475      *  Get kind of theShape.
2476      *  \param theShape Shape to get a kind of.
2477      *  \param theIntegers Output. Integer and enumerated shape's parameters
2478      *                     (kind of surface, closed/unclosed, number of edges, etc.)
2479      *  \param theDoubles  Output. Double shape's parameters (coordinates, dimensions, etc.)
2480      *  \note  Concrete meaning of each value, returned via \a theIntegers
2481      *         or \a theDoubles list depends on the kind of the shape.
2482      *  \return Returns a kind of shape in terms of <VAR>GEOM_IKindOfShape.shape_kind</VAR> enumeration.
2483      */
2484     //short KindOfShape (in GEOM_Object   theShape,
2485     GEOM_IKindOfShape::shape_kind KindOfShape (in  GEOM_Object  theShape,
2486                                                out ListOfLong   theIntegers,
2487                                                out ListOfDouble theDoubles);
2488
2489     /*!
2490      *  Get position (LCS) of theShape.
2491      *  \param theShape Shape to calculate position of.
2492      *  \param Ox,Oy,Oz Output. Coordinates of shape's location origin.
2493      *                  Origin of the LCS is situated at the shape's center of mass.
2494      *  \param Zx,Zy,Zz Output. Coordinates of shape's location normal(main) direction.
2495      *  \param Xx,Xy,Xz Output. Coordinates of shape's location X direction.
2496      *                  Axes of the LCS are obtained from shape's location or,
2497      *                  if the shape is a planar face, from position of its plane.
2498      *  \return Returns position of the shape through the last nine arguments.
2499      */
2500     void GetPosition (in GEOM_Object theShape,
2501                       out double Ox, out double Oy, out double Oz,
2502                       out double Zx, out double Zy, out double Zz,
2503                       out double Xx, out double Xy, out double Xz);
2504
2505     /*!
2506      *  Get summarized length of all wires,
2507      *  area of surface and volume of the given shape.
2508      *  \param theShape Shape to define properties of.
2509      *  \param theLength Output. Summarized length of all wires of the given shape.
2510      *  \param theSurfArea Output. Area of surface of the given shape.
2511      *  \param theVolume Output. Volume of the given shape.
2512      *  \return Returns shape properties through the last three arguments.
2513      */
2514     void GetBasicProperties (in GEOM_Object theShape,
2515                              out double theLength,
2516                              out double theSurfArea,
2517                              out double theVolume);
2518
2519     /*!
2520      *  Get a point, situated at the centre of mass of theShape.
2521      *  \param theShape Shape to define centre of mass of.
2522      *  \return New GEOM_Object, containing the created point.
2523      */
2524     GEOM_Object GetCentreOfMass (in GEOM_Object theShape);
2525
2526     /*!
2527      *  Get a vector, representing the normal of theFace.
2528      *  If the face is not planar, theOptionalPoint is obligatory.
2529      *  \param theFace Shape (face) to define the normal of.
2530      *  \param theOptionalPoint Shape (point) to define the normal at.
2531      *                          Can be NULL in case of planar face.
2532      *  \return New GEOM_Object, containing the created normal vector.
2533      */
2534     GEOM_Object GetNormal (in GEOM_Object theFace,
2535                            in GEOM_Object theOptionalPoint);
2536
2537     /*!
2538      *  Get inertia matrix and moments of inertia of theShape.
2539      *  \param theShape Shape to calculate inertia of.
2540      *  \param I(1-3)(1-3) Output. Components of the inertia matrix of the given shape.
2541      *  \param Ix,Iy,Iz Output. Moments of inertia of the given shape.
2542      *  \return Returns inertia through the last twelve arguments.
2543      */
2544     void GetInertia (in GEOM_Object theShape,
2545                      out double I11, out double I12, out double I13,
2546                      out double I21, out double I22, out double I23,
2547                      out double I31, out double I32, out double I33,
2548                      out double Ix , out double Iy , out double Iz);
2549
2550     /*!
2551      *  Get parameters of bounding box of the given shape
2552      *  \param theShape Shape to obtain bounding box of.
2553      *  \param Xmin,Xmax Output. Limits of shape along OX axis.
2554      *  \param Ymin,Ymax Output. Limits of shape along OY axis.
2555      *  \param Zmin,Zmax Output. Limits of shape along OZ axis.
2556      *  \return Returns parameters of bounding box through the last six arguments.
2557      */
2558     void GetBoundingBox (in GEOM_Object theShape,
2559                          out double Xmin, out double Xmax,
2560                          out double Ymin, out double Ymax,
2561                          out double Zmin, out double Zmax);
2562
2563     /*!
2564      *  Get min and max tolerances of sub-shapes of theShape
2565      *  \param theShape Shape, to get tolerances of.
2566      *  \param FaceMin,FaceMax Output. Min and max tolerances of the faces.
2567      *  \param EdgeMin,EdgeMax Output. Min and max tolerances of the edges.
2568      *  \param VertMin,VertMax Output. Min and max tolerances of the vertices.
2569      *  \return Returns shape tolerances through the last six arguments.
2570      */
2571     void GetTolerance (in GEOM_Object theShape,
2572                        out double FaceMin, out double FaceMax,
2573                        out double EdgeMin, out double EdgeMax,
2574                        out double VertMin, out double VertMax);
2575
2576     /*!
2577      *  Check a topology of the given shape.
2578      *  \param theShape Shape to check validity of.
2579      *  \param theDescription Output. Description of problems in the shape, if they are.
2580      *  \return TRUE, if the shape "seems to be valid" from the topological point of view.
2581      */
2582     boolean CheckShape (in GEOM_Object theShape,
2583                         out string     theDescription);
2584
2585     /*!
2586      *  Check a topology and a geometry of the given shape.
2587      *  \param theShape Shape to check validity of.
2588      *  \param theDescription Output. Description of problems in the shape, if they are.
2589      *  \return TRUE, if the shape "seems to be valid".
2590      */
2591     boolean CheckShapeWithGeometry (in GEOM_Object theShape,
2592                                     out string     theDescription);
2593
2594     /*!
2595      *  Obtain description of the given shape
2596      *  \param theShape Shape to be described.
2597      *  \return Description of the given shape.
2598      */
2599     string WhatIs (in GEOM_Object theShape);
2600
2601     /*!
2602      *  Get minimal distance between the given shapes.
2603      *  \param theShape1,theShape2 Shapes to find minimal distance between.
2604      *  \param X1,Y1,Z1 Output. Coordinates of point on theShape1, nearest to theShape2.
2605      *  \param X2,Y2,Z2 Output. Coordinates of point on theShape2, nearest to theShape1.
2606      *  \return Value of the minimal distance between the given shapes.
2607      */
2608     double GetMinDistance (in GEOM_Object theShape1, in GEOM_Object theShape2,
2609                            out double X1, out double Y1, out double Z1,
2610                            out double X2, out double Y2, out double Z2);
2611
2612     /*!
2613      *  Get angle between the given lines or linear edges.
2614      *  \param theShape1,theShape2 Shapes to find angle between. Lines or linear edges.
2615      *  \return Value of the angle between the given shapes.
2616      */
2617     double GetAngle (in GEOM_Object theShape1, in GEOM_Object theShape2);
2618
2619     /*!
2620      *  Get point coordinates
2621      */
2622     void PointCoordinates (in GEOM_Object theShape, out double X, out double Y, out double Z);
2623
2624     /*!
2625      *  Get radius of curvature of curve in the point determinated by param
2626      *  \param theShape - curve.
2627      *  \param theParam - parameter on curve
2628      *  \return Value of curvature.
2629      */
2630     double CurveCurvatureByParam (in GEOM_Object theShape, in double theParam);
2631
2632     /*!
2633      *  Get radius of curvature of curve in the given point
2634      *  \param theShape - curve.
2635      *  \param thePoint - point
2636      *  \return Value of curvature.
2637      */
2638     double CurveCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
2639
2640     /*!
2641      *  Get max radius of curvature of surface in the point determinated by params
2642      *  \param theShape - surface.
2643      *  \param theUParam - U-parameter on surface
2644      *  \param theVParam - V-parameter on surface
2645      *  \return Value of curvature.
2646      */
2647     double MaxSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
2648                                        in double theVParam);
2649
2650     /*!
2651      *  Get max radius of curvature of surface in the given point
2652      *  \param theShape - surface.
2653      *  \param thePoint - point
2654      *  \return Value of curvature.
2655      */
2656     double MaxSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
2657
2658     /*!
2659      *  Get min radius of curvature of surface in the point determinated by params
2660      *  \param theShape - surface.
2661      *  \param theUParam - U-parameter on surface
2662      *  \param theVParam - V-parameter on surface
2663      *  \return Value of curvature.
2664      */
2665     double MinSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
2666                                        in double theVParam);
2667
2668     /*!
2669      *  Get min radius of curvature of surface in the given point
2670      *  \param theShape - surface.
2671      *  \param thePoint - point
2672      *  \return Value of curvature.
2673      */
2674     double MinSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
2675
2676   };
2677
2678
2679   /*!
2680    *  GEOM_IGroupOperations: Interface for groups creation.
2681    */
2682   interface GEOM_IGroupOperations : GEOM_IOperations
2683   {
2684     /*!
2685      *  Creates a new group which will store  sub shapes of theMainShape
2686      *  \param theMainShape is a GEOM object on which the group is selected
2687      *  \param theShapeType defines a shape type of the group
2688      *  \return a newly created GEOM group
2689      */
2690     GEOM_Object CreateGroup (in GEOM_Object theMainShape, in long theShapeType);
2691
2692     /*!
2693      *  Adds a sub object with ID theSubShapeId to the group
2694      *  \param theGroup is a GEOM group to which the new sub shape is added
2695      *  \param theSubShapeId is a sub shape ID in the main object.
2696      *  \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub shape
2697      */
2698     void AddObject (in GEOM_Object theGroup, in long theSubShapeId);
2699
2700     /*!
2701      *  Removes a sub object with ID \a theSubShapeId from the group
2702      *  \param theGroup is a GEOM group from which the sub shape is removed.
2703      *  \param theSubShapeId is a sub shape ID in the main object.
2704      *  \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub shape
2705      */
2706     void RemoveObject (in GEOM_Object theGroup, in long theSubShapeId);
2707
2708     /*!
2709      *  Adds to the group all the given shapes. No errors, if some shapes are alredy included.
2710      *  \param theGroup is a GEOM group to which the new sub shapes are added.
2711      *  \param theSubShapes is a list of sub shapes to be added.
2712      */
2713     void UnionList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
2714
2715     /*!
2716      *  Removes from the group all the given shapes. No errors, if some shapes are not included.
2717      *  \param theGroup is a GEOM group from which the sub-shapes are removed.
2718      *  \param theSubShapes is a list of sub-shapes to be removed.
2719      */
2720     void DifferenceList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
2721
2722     /*!
2723      *  Adds to the group all the given shapes. No errors, if some shapes are alredy included.
2724      *  \param theGroup is a GEOM group to which the new sub shapes are added.
2725      *  \param theSubShapes is a list of IDs of sub shapes to be added.
2726      */
2727     void UnionIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
2728
2729     /*!
2730      *  Removes from the group all the given shapes. No errors, if some shapes are not included.
2731      *  \param theGroup is a GEOM group from which the sub-shapes are removed.
2732      *  \param theSubShapes is a list of IDs of sub-shapes to be removed.
2733      */
2734     void DifferenceIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
2735
2736     /*!
2737      *  Returns a type of sub objects stored in the group
2738      *  \param theGroup is a GEOM group which type is returned.
2739      */
2740     long GetType (in GEOM_Object theGroup);
2741
2742     /*!
2743      *  Returns a main shape associated with the group
2744      *  \param theGroup is a GEOM group for which a main shape object is requested
2745      *  \return a GEOM object which is a main shape for theGroup
2746      */
2747     GEOM_Object GetMainShape (in GEOM_Object theGroup);
2748
2749     /*!
2750      *  Returns a list of sub objects ID stored in the group
2751      *  \param theGroup is a GEOM group for which a list of IDs is requested
2752      */
2753     ListOfLong GetObjects (in GEOM_Object theGroup);
2754   };
2755
2756
2757   /*!
2758    *  GEOM_Gen: Interface to access other GEOM interfaces.
2759    *  Also contains some methods to access and manage GEOM objects.
2760    */
2761   interface GEOM_Gen : Engines::Component,SALOMEDS::Driver
2762   {
2763     /*!
2764      *  Undo/Redo Management
2765      */
2766
2767     void Undo (in long theStudyID);
2768
2769     void Redo (in long theStudyID);
2770
2771     /*!
2772      * Publishing management
2773      * Adds in theStudy a object theObject under with a name theName,
2774      * if theFather is not NULL the object is placed under thFather's SObject.
2775      * Returns a SObject where theObject is placed
2776      */
2777     SALOMEDS::SObject AddInStudy (in SALOMEDS::Study theStudy,
2778                                   in GEOM_Object theObject,
2779                                   in string theName,
2780                                   in GEOM_Object theFather);
2781
2782     /*!
2783      *  Publish sub-shapes, standing for arguments and sub-shapes of arguments
2784      *  To be used from python scripts out of geompy.addToStudy (non-default usage)
2785      *  \param theStudy  the study, in which theObject is published already,
2786      *                   and in which the arguments will be published
2787      *  \param theObject published GEOM object, arguments of which will be published
2788      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
2789      *                   If this list is empty, all operation arguments will be published
2790      *  \param theFindMethod method to search subshapes, corresponding to arguments and
2791      *                       their subshapes. Value from enumeration GEOM::find_shape_method.
2792      *  \param theInheritFirstArg set properties of the first argument for \a theObject.
2793      *                            Do not publish subshapes in place of arguments, but only
2794      *                            in place of subshapes of the first argument,
2795      *                            because the whole shape corresponds to the first argument.
2796      *                            Mainly to be used after transformations, but it also can be
2797      *                            usefull after partition with one object shape, and some other
2798      *                            operations, where only the first argument has to be considered.
2799      *                            If theObject has only one argument shape, this flag is automatically
2800      *                            considered as True, not regarding really passed value.
2801      *  \return True in case of success, False otherwise.
2802      */
2803     boolean RestoreSubShapesO (in SALOMEDS::Study   theStudy,
2804                                in GEOM_Object       theObject,
2805                                in ListOfGO          theArgs,
2806                                in find_shape_method theFindMethod,
2807                                in boolean           theInheritFirstArg);
2808
2809     /*!
2810      *  Publish sub-shapes, standing for arguments and sub-shapes of arguments
2811      *  To be used from GUI and from geompy.addToStudy.
2812      *  Work like the above method, but accepts study object theSObject instead of GEOM_Object.
2813      *  \param theSObject study object, referencing GEOM object, arguments of which will be published
2814      */
2815     boolean RestoreSubShapesSO (in SALOMEDS::Study   theStudy,
2816                                 in SALOMEDS::SObject theSObject,
2817                                 in ListOfGO          theArgs,
2818                                 in find_shape_method theFindMethod,
2819                                 in boolean           theInheritFirstArg);
2820
2821     /*!
2822      *  Methods to access interfaces for objects creation and transformation
2823      */
2824     GEOM_IBasicOperations     GetIBasicOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
2825     GEOM_ITransformOperations GetITransformOperations(in long theStudyID) raises (SALOME::SALOME_Exception);
2826     GEOM_I3DPrimOperations    GetI3DPrimOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
2827     GEOM_IShapesOperations    GetIShapesOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
2828     GEOM_IBooleanOperations   GetIBooleanOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
2829     GEOM_ICurvesOperations    GetICurvesOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
2830     GEOM_ILocalOperations     GetILocalOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
2831     GEOM_IHealingOperations   GetIHealingOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
2832     GEOM_IInsertOperations    GetIInsertOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
2833     GEOM_IMeasureOperations   GetIMeasureOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
2834     GEOM_IBlocksOperations    GetIBlocksOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
2835     GEOM_IGroupOperations     GetIGroupOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
2836
2837     /*!
2838      *  Objects Management
2839      */
2840
2841     /*!
2842      *  Removes the object from the GEOM component
2843      *  \param theObject is a GEOM object to be removed
2844      */
2845     void RemoveObject (in GEOM_Object theObject);
2846
2847     /*!
2848      *  Returns an object defined by the study and its entry in the GEOM component
2849      *  \param theStudyID is a SALOMEDS Study ID
2850      *  \param theEntry is an entry of the requested GEOM object in the GEOM component
2851      *  \note if the object has not previously been created a NULL GEOM object is returned
2852      */
2853     GEOM_Object GetObject (in long theStudyID, in string theEntry);
2854
2855     /*!
2856      *  Add a sub shape defined by indices in \a theIndices
2857      *  (contains unique IDs of sub shapes inside theMainShape)
2858      *  \note The sub shape GEOM_Objects can has ONLY ONE function.
2859      *        Don't try to apply modification operations on them.
2860      *  \note Internal method
2861      */
2862     GEOM_Object AddSubShape (in GEOM_Object theMainShape, in ListOfLong theIndices);
2863
2864     /*!
2865      *  GEOM object's IOR Management
2866      */
2867
2868     /*!
2869      *  Returns a GEOM Object defined by its IOR
2870      *  \param theIOR a string containg an IOR of the requested GEOM object
2871      */
2872     GEOM_Object GetIORFromString (in string theIOR);
2873
2874     /*!
2875      *  Returns a string which contains an IOR of the GEOM object
2876      *  \param theObject is a GEOM object which IOR is requested
2877      */
2878     string GetStringFromIOR (in GEOM_Object theObject);
2879
2880     /*!
2881      *  Returns a name with which a GEOM object was dumped into python script
2882      *  \param theStudyEntry is an entry of the GEOM object in the study
2883      */
2884     string GetDumpName (in string theStudyEntry);
2885
2886     /*!
2887      *  Returns all names with which a GEOM objects was dumped
2888      *  into python script to avoid the same names in SMESH script
2889      */
2890     string_array GetAllDumpNames();
2891   };
2892 };
2893
2894 #endif