Salome HOME
Merge with OCC_development_01
[modules/geom.git] / idl / GEOM_Gen.idl
1 //  File   : GEOM_Gen.idl
2 //  Author : Sergey RUIN
3
4 #ifndef __GEOM_GEN__
5 #define __GEOM_GEN__
6
7 #include "SALOME_Exception.idl"
8 #include "SALOME_Component.idl"
9 #include "SALOMEDS.idl"
10
11 #include "SALOME_GenericObj.idl"
12
13 module GEOM
14 {
15   /*!
16    *  Topological types of shapes (like Open Cascade types)
17    */
18   enum shape_type { COMPOUND, COMPSOLID, SOLID, SHELL,
19                     FACE, WIRE, EDGE, VERTEX, SHAPE };
20
21   typedef sequence<string>      string_array;
22   typedef sequence<short>       short_array;
23   typedef sequence<long>        ListOfLong;
24   typedef sequence<double>      ListOfDouble;
25
26   interface GEOM_Object;
27
28   typedef sequence<GEOM_Object> ListOfGO;
29
30   /*!
31    *  GEOM_Object: interface of geometric object
32    */
33   interface GEOM_Object : SALOME::GenericObj
34   {
35
36     /*!
37      *  Get an entry of the object in GEOM component.
38      */
39     string GetEntry();
40
41     /*!
42      *  Get ID of study, where the object is created.
43      */
44     long GetStudyID();
45
46     /*!
47      *  Get internal type of the object (POINT, BOX, CYLINDER, EXTRUSION...).
48      */
49     long GetType();
50
51     /*!
52      *  Get a <VAR>shape_type</VAR> of the object value.
53      */
54     shape_type GetShapeType();
55
56     /*!
57      *  Set name of the object.
58      *  \param theName is a name which will be associated with this object.
59      */
60     void SetName (in string theName);
61
62     /*!
63      *  Get name of the object associated with this object.
64      */
65     string GetName();
66
67     /*!
68      *  Set a Study entry where this object was published.
69      */
70     void SetStudyEntry (in string theEntry);
71
72     /*!
73      *  Get a Study entry where this object was published.
74      */
75     string GetStudyEntry();
76
77     /*!
78      *  Get a list of all GEOM objects on which were the arguments
79      *  when this object was constructed and modified.
80      *  \note This method is supposed to be used by GUI only.
81      */
82     ListOfGO GetDependency();
83
84     /*!
85      *  Get a list of GEOM objects on which the last function that created or modified the object depends.
86      *  \note This method is supposed to be used by GUI only.
87      */
88     ListOfGO GetLastDependency();
89
90     /*!
91      *  Get the TopoDS_Shape, for colocated case only.
92      */
93     long getShape();
94
95     /*!
96      ######################################################################
97      *  Internal methods (For sub shape identification)
98      ######################################################################
99      */
100
101     /*!
102      *  Get geometric shape of the object as a byte stream
103      */
104     SALOMEDS::TMPFile GetShapeStream();
105
106     /*
107      *  Returns True if this object is not a sub shape of another object.
108      */
109     boolean IsMainShape();
110
111     /*
112      *  Get a list of ID's of sub shapes in the main shape.
113      *  \note Internal method, suppopsed to be used only by GEOM_Client
114      */
115     ListOfLong GetSubShapeIndices();
116
117     /*
118      *  Get a main shape object to which this object is a sub shape
119      *  \note Internal method, suppopsed to be used only by GEOM_Client
120      */
121     GEOM_Object GetMainShape();
122
123     /*
124      *  Return true if geom object representes a shape.
125      *  For example, method return false for GEOM_MARKER
126      */
127      boolean IsShape();
128   };
129
130
131   /*!
132    *  GEOM_IOperations: basic methods of all geometric operations
133    */
134   interface GEOM_IOperations : SALOME::GenericObj
135   {
136     /*!
137      *  To know, if the operation was successfully performed
138      */
139     boolean IsDone();
140
141     /*!
142      *  Set the operation error code
143      *  \param theErrorID is a string describing the error occured
144      *  \note This method is supposed to be used only by interfaces inheriting from IOperations.
145      */
146     void SetErrorCode (in string theErrorID);
147
148     /*!
149      *  Get the operation error code
150      */
151     string GetErrorCode();
152
153     /*!
154      *  Get ID of study, where the operation is defined
155      */
156     long GetStudyID();
157
158     /*!
159      *  Opens a new transaction
160      */
161     void StartOperation();
162
163     /*!
164      *  Closes the previously opened trasaction
165      */
166     void FinishOperation();
167
168     /*!
169      *  Aborts the previously opened transaction
170      */
171     void AbortOperation();
172   };
173
174   /*!
175    *  GEOM_IBasicOperations: interface for basic geometry creation
176    *  (Point, Vector, Plane, Marker)
177    */
178   interface GEOM_IBasicOperations : GEOM_IOperations
179   {
180     /*!
181      *  Create point by three coordinates.
182      *  \param theX The X coordinate of the point.
183      *  \param theY The Y coordinate of the point.
184      *  \param theZ The Z coordinate of the point.
185      *  \return New GEOM_Object, containing the created point.
186      */
187     GEOM_Object MakePointXYZ (in double theX, in double theY, in double theZ);
188
189     /*!
190      *  Create a point, distant from the referenced point
191      *  on the given distances along the coordinate axes.
192      *  \param theReference The referenced point.
193      *  \param theX Displacement from the referenced point along OX axis.
194      *  \param theY Displacement from the referenced point along OY axis.
195      *  \param theZ Displacement from the referenced point along OZ axis.
196      *  \return New GEOM_Object, containing the created point.
197      */
198     GEOM_Object MakePointWithReference (in GEOM_Object theReference,
199                                         in double theX, in double theY, in double theZ);
200
201     /*!
202      *  Create a point, corresponding to the given parameter on the given curve.
203      *  \param theRefCurve The referenced curve.
204      *  \param theParameter Value of parameter on the referenced curve.
205      *  \return New GEOM_Object, containing the created point.
206      */
207     GEOM_Object MakePointOnCurve (in GEOM_Object theRefCurve,
208                                   in double theParameter);
209
210     /*!
211      *  Create a vector with the given components.
212      *  \param theDX X component of the vector.
213      *  \param theDY Y component of the vector.
214      *  \param theDZ Z component of the vector.
215      *  \return New GEOM_Object, containing the created vector.
216      */
217     GEOM_Object MakeVectorDXDYDZ (in double theDX,
218                                   in double theDY,
219                                   in double theDZ);
220
221     /*!
222      *  Create a vector between two points.
223      *  \param thePnt1 Start point for the vector.
224      *  \param thePnt2 End point for the vector.
225      *  \return New GEOM_Object, containing the created vector.
226      */
227     GEOM_Object MakeVectorTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
228
229     /*!
230      *  Create a line, passing through the given point
231      *  and parrallel to the given direction
232      *  \param thePnt Point. The resulting line will pass through it.
233      *  \param theDir Direction. The resulting line will be parallel to it.
234      *  \return New GEOM_Object, containing the created line.
235      */
236     GEOM_Object MakeLine (in GEOM_Object thePnt, in GEOM_Object theDir);
237
238     /*!
239      *  Create a line, passing through the given points
240      *  \param thePnt1 First of two points, defining the line.
241      *  \param thePnt2 Second of two points, defining the line.
242      *  \return New GEOM_Object, containing the created line.
243      */
244     GEOM_Object MakeLineTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
245
246     /*!
247      *  Create a plane, passing through the three given points
248      *  \param thePnt1 First of three points, defining the plane.
249      *  \param thePnt2 Second of three points, defining the plane.
250      *  \param thePnt3 Fird of three points, defining the plane.
251      *  \param theTrimSize Half size of a side of quadrangle face, representing the plane.
252      *  \return New GEOM_Object, containing the created plane.
253      */
254     GEOM_Object MakePlaneThreePnt (in GEOM_Object thePnt1,
255                                    in GEOM_Object thePnt2,
256                                    in GEOM_Object thePnt3,
257                                    in double theTrimSize);
258
259     /*!
260      *  Create a plane, passing through the given point
261      *  and normal to the given vector.
262      *  \param thePnt Point, the plane has to pass through.
263      *  \param theVec Vector, defining the plane normal direction.
264      *  \param theTrimSize Half size of a side of quadrangle face, representing the plane.
265      *  \return New GEOM_Object, containing the created plane.
266      */
267     GEOM_Object MakePlanePntVec (in GEOM_Object thePnt,
268                                  in GEOM_Object theVec,
269                                  in double theTrimSize);
270
271     /*!
272      *  Create a plane, similar to the existing one, but with another size of representing face.
273      *  \param theFace Referenced plane.
274      *  \param theTrimSize New half size of a side of quadrangle face, representing the plane.
275      *  \return New GEOM_Object, containing the created plane.
276      */
277     GEOM_Object MakePlaneFace (in GEOM_Object theFace,
278                                in double theTrimSize);
279
280     /*!
281      *  Create a local coordinate system.
282      *  \param theOX,theOY,theOZ Three coordinates of coordinate system origin.
283      *  \param theXDX,theXDY,theXDZ Three components of OX direction
284      *  \param theYDX,theYDY,theYDZ Three components of OY direction
285      *  \return New GEOM_Object, containing the created coordinate system.
286      */
287     GEOM_Object MakeMarker (in double theOX , in double theOY , in double theOZ,
288                             in double theXDX, in double theXDY, in double theXDZ,
289                             in double theYDX, in double theYDY, in double theYDZ);
290   };
291
292   interface GEOM_ITransformOperations : GEOM_IOperations
293   {
294     /*!
295      *  Translate the given object along the vector, specified by its end points.
296      *  \param theObject The object to be translated.
297      *  \param thePoint1 Start point of translation vector.
298      *  \param thePoint2 End point of translation vector.
299      *  \return theObject.
300      */
301     GEOM_Object TranslateTwoPoints (in GEOM_Object theObject,
302                                     in GEOM_Object thePoint1,
303                                     in GEOM_Object thePoint2);
304
305     /*!
306      *  Translate the given object along the vector, specified
307      *  by its end points, creating its copy before the translation.
308      *  \param theObject The object to be translated.
309      *  \param thePoint1 Start point of translation vector.
310      *  \param thePoint2 End point of translation vector.
311      *  \return New GEOM_Object, containing the translated object.
312      */
313     GEOM_Object TranslateTwoPointsCopy (in GEOM_Object theObject,
314                                         in GEOM_Object thePoint1,
315                                         in GEOM_Object thePoint2);
316
317     /*!
318      *  Translate the given object along the vector, specified by its components.
319      *  \param theObject The object to be translated.
320      *  \param theDX,theDY,theDZ Components of translation vector.
321      *  \return theObject.
322      */
323     GEOM_Object TranslateDXDYDZ (in GEOM_Object theObject,
324                                  in double theDX, in double theDY, in double theDZ);
325
326     /*!
327      *  Translate the given object along the vector, specified
328      *  by its components, creating its copy before the translation.
329      *  \param theObject The object to be translated.
330      *  \param theDX,theDY,theDZ Components of translation vector.
331      *  \return New GEOM_Object, containing the translated object.
332      */
333     GEOM_Object TranslateDXDYDZCopy (in GEOM_Object theObject,
334                                      in double theDX, in double theDY, in double theDZ);
335
336
337     /*!
338      *  Translate the given object along the given vector.
339      *  \param theObject The object to be translated.
340      *  \param theVector Translation vector, giving both direction and distance.
341      *  \return theObject.
342      */
343     GEOM_Object TranslateVector (in GEOM_Object theObject,
344                                  in GEOM_Object theVector);
345
346     /*!
347      *  Translate the given object along the given vector,
348      *  creating its copy before the translation.
349      *  \param theObject The object to be translated.
350      *  \param theVector Translation vector, giving both direction and distance.
351      *  \return New GEOM_Object, containing the translated object.
352      */
353     GEOM_Object TranslateVectorCopy (in GEOM_Object theObject,
354                                      in GEOM_Object theVector);
355
356     /*!
357      *  Translate the given object along the given vector a given number times
358      *  \param theObject The object to be translated.
359      *  \param theVector Direction of the translation.
360      *  \param theStep Distance to translate on.
361      *  \param theNbTimes Quantity of translations to be done.
362      *  \return New GEOM_Object, containing compound of all
363      *          the shapes, obtained after each translation.
364      */
365     GEOM_Object MultiTranslate1D (in GEOM_Object theObject,
366                                   in GEOM_Object theVector,
367                                   in double theStep,
368                                   in long theNbTimes);
369
370     /*!
371      *  Conseqently apply two specified translations to theObject specified number of times.
372      *  \param theObject The object to be translated.
373      *  \param theVector1 Direction of the first translation.
374      *  \param theStep1 Step of the first translation.
375      *  \param theNbTimes1 Quantity of translations to be done along theVector1.
376      *  \param theVector2 Direction of the second translation.
377      *  \param theStep2 Step of the second translation.
378      *  \param theNbTimes2 Quantity of translations to be done along theVector2.
379      *  \return New GEOM_Object, containing compound of all
380      *          the shapes, obtained after each translation.
381      */
382     GEOM_Object MultiTranslate2D (in GEOM_Object theObject,
383                                   in GEOM_Object theVector1,
384                                   in double theStep1,
385                                   in long theNbTimes1,
386                                   in GEOM_Object theVector2,
387                                   in double theStep2,
388                                   in long theNbTimes2);
389
390     /*!
391      *  Rotate the given object around the given axis on the given angle.
392      *  \param theObject The object to be rotated.
393      *  \param theAxis Rotation axis.
394      *  \param theAngle Rotation angle in radians.
395      *  \return theObject.
396      */
397     GEOM_Object Rotate (in GEOM_Object theObject,
398                         in GEOM_Object theAxis,
399                         in double theAngle);
400
401     /*!
402      *  Rotate the given object around the given axis
403      *  on the given angle, creating its copy before the rotatation.
404      *  \param theObject The object to be rotated.
405      *  \param theAxis Rotation axis.
406      *  \param theAngle Rotation angle in radians.
407      *  \return New GEOM_Object, containing the rotated object.
408      */
409     GEOM_Object RotateCopy (in GEOM_Object theObject,
410                             in GEOM_Object theAxis,
411                             in double theAngle);
412
413     /*!
414      *  Rotate the given object around the given axis a given number times.
415      *  Rotation angle will be 2*PI/theNbTimes.
416      *  \param theObject The object to be rotated.
417      *  \param theAxis The rotation axis.
418      *  \param theNbTimes Quantity of rotations to be done.
419      *  \return New GEOM_Object, containing compound of all the
420      *          shapes, obtained after each rotation.
421      */
422     GEOM_Object MultiRotate1D (in GEOM_Object theObject,
423                                in GEOM_Object theAxis,
424                                in long theNbTimes);
425
426     /*!
427      *  Rotate the given object around the
428      *  given axis on the given angle a given number
429      *  times and multi-translate each rotation result.
430      *  Translation direction passes through center of gravity
431      *  of rotated shape and its projection on the rotation axis.
432      *  \param theObject The object to be rotated.
433      *  \param theAxis Rotation axis.
434      *  \param theAngle Rotation angle in graduces.
435      *  \param theNbTimes1 Quantity of rotations to be done.
436      *  \param theStep Translation distance.
437      *  \param theNbTimes2 Quantity of translations to be done.
438      *  \return New GEOM_Object, containing compound of all the
439      *          shapes, obtained after each transformation.
440      */
441     GEOM_Object MultiRotate2D (in GEOM_Object theObject,
442                                in GEOM_Object theAxis,
443                                in double theAngle,
444                                in long theNbTimes1,
445                                in double theStep,
446                                in long theNbTimes2);
447
448     /*!
449      *  Replace the given object by an object,
450      *  symmetrical to it relatively the given plane.
451      *  \param theObject The object to be mirrored.
452      *  \param thePlane Plane of symmetry.
453      */
454     GEOM_Object MirrorPlane (in GEOM_Object theObject, in GEOM_Object thePlane);
455
456     /*!
457      *  Create an object, symmetrical
458      *  to the given one relatively the given plane.
459      *  \param theObject The object to be mirrored.
460      *  \param thePlane Plane of symmetry.
461      *  \return New GEOM_Object, containing the mirrored shape.
462      */
463     GEOM_Object MirrorPlaneCopy (in GEOM_Object theObject, in GEOM_Object thePlane);
464
465     /*!
466      *  Replace the given object by an object,
467      *  symmetrical to it relatively the given axis.
468      *  \param theObject The object to be mirrored.
469      *  \param theAxis Axis of symmetry.
470      *  \return theObject.
471      */
472     GEOM_Object MirrorAxis (in GEOM_Object theObject, in GEOM_Object theAxis);
473
474     /*!
475      *  Create an object, symmetrical
476      *  to the given one relatively the given axis.
477      *  \param theObject The object to be mirrored.
478      *  \param theAxis Axis of symmetry.
479      *  \return New GEOM_Object, containing the mirrored object.
480      */
481     GEOM_Object MirrorAxisCopy (in GEOM_Object theObject, in GEOM_Object theAxis);
482
483     /*!
484      *  Replace the given object by an object, symmetrical to it relatively the given point.
485      *  \param theObject The object to be mirrored.
486      *  \param thePoint Point of symmetry.
487      *  \return theObject.
488      */
489     GEOM_Object MirrorPoint (in GEOM_Object theObject, in GEOM_Object thePoint);
490
491     /*!
492      *  Create an object, symmetrical to the given one relatively the given point.
493      *  \param theObject The object to be mirrored.
494      *  \param thePoint Point of symmetry.
495      *  \return New GEOM_Object, containing the mirrored object.
496      */
497     GEOM_Object MirrorPointCopy (in GEOM_Object theObject, in GEOM_Object thePoint);
498
499     /*!
500      *  Replace the given object by its offset.
501      *  \param theObject The base object for the offset.
502      *  \param theOffset Offset value.
503      *  \return theObject.
504      */
505     GEOM_Object OffsetShape (in GEOM_Object theObject, in double theOffset);
506
507     /*!
508      *  Create new object as offset of the given one.
509      *  \param theObject The base object for the offset.
510      *  \param theOffset Offset value.
511      *  \return New GEOM_Object, containing the offset object.
512      */
513     GEOM_Object OffsetShapeCopy (in GEOM_Object theObject, in double theOffset);
514
515     /*!
516      *  Scale the given object by the factor.
517      *  \param theObject The object to be scaled.
518      *  \param thePoint Center point for scaling.
519      *  \param theFactor Scaling factor value.
520      *  \return theObject.
521      */
522     GEOM_Object ScaleShape (in GEOM_Object theObject, in GEOM_Object thePoint,
523                             in double theFactor);
524
525     /*!
526      *  Scale the given object by the factor, creating its copy before the scaling.
527      *  \param theObject The object to be scaled.
528      *  \param thePoint Center point for scaling.
529      *  \param theFactor Scaling factor value.
530      *  \return New GEOM_Object, containing the scaled shape.
531      */
532     GEOM_Object ScaleShapeCopy (in GEOM_Object theObject, in GEOM_Object thePoint,
533                                 in double theFactor);
534
535     /*!
536      *  Modify the Location of the given object by LCS
537      */
538     GEOM_Object PositionShape (in GEOM_Object theObject,
539                                in GEOM_Object theStartLCS,
540                                in GEOM_Object theEndLCS);
541
542     /*!
543      *  Modify the Location of the given object by LCS
544      *  creating its copy before the setting
545      */
546     GEOM_Object PositionShapeCopy (in GEOM_Object theObject,
547                                    in GEOM_Object theStartLCS,
548                                    in GEOM_Object theEndLCS);
549   };
550
551   /*!
552    *  GEOM_I3DPrimOperations: Interface for 3D primitives creation
553    *  Box, Cylinder, Cone, Sphere, Prism (extrusion),
554    *  Pipe (extrusion along contour), Revolution, Solid (from shell).
555    */
556   interface GEOM_I3DPrimOperations : GEOM_IOperations
557   {
558     /*!
559      *  Create a box with specified dimensions along the coordinate axes
560      *  and with edges, parallel to the coordinate axes.
561      *  Center of the box will be at point (DX/2, DY/2, DZ/2).
562      *  \param theDX Length of Box edges, parallel to OX axis.
563      *  \param theDY Length of Box edges, parallel to OY axis.
564      *  \param theDZ Length of Box edges, parallel to OZ axis.
565      *  \return New GEOM_Object, containing the created box.
566      */
567     GEOM_Object MakeBoxDXDYDZ (in double theDX, in double theDY, in double theDZ);
568
569     /*!
570      *  Create a box with two specified opposite vertices,
571      *  and with edges, parallel to the coordinate axes
572      *  \param thePnt1 First of two opposite vertices.
573      *  \param thePnt2 Second of two opposite vertices.
574      *  \return New GEOM_Object, containing the created box.
575      */
576     GEOM_Object MakeBoxTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
577
578     /*!
579      *  Create a cylinder with given radius and height at
580      *  the origin of coordinate system. Axis of the cylinder
581      *  will be collinear to the OZ axis of the coordinate system.
582      *  \param theR Cylinder radius.
583      *  \param theH Cylinder height.
584      *  \return New GEOM_Object, containing the created cylinder.
585      */
586     GEOM_Object MakeCylinderRH (in double theR, in double theH);
587
588     /*!
589      *  Create a cylinder with given base point, axis, radius and height.
590      *  \param thePnt Central point of cylinder base.
591      *  \param theAxis Cylinder axis.
592      *  \param theR Cylinder radius.
593      *  \param theH Cylinder height.
594      *  \return New GEOM_Object, containing the created cylinder.
595      */
596     GEOM_Object MakeCylinderPntVecRH (in GEOM_Object thePnt,
597                                       in GEOM_Object theAxis,
598                                       in double      theR,
599                                       in double      theH);
600
601     /*!
602      *  Create a cone with given height and radiuses at
603      *  the origin of coordinate system. Axis of the cone will
604      *  be collinear to the OZ axis of the coordinate system.
605      *  \param theR1 Radius of the first cone base.
606      *  \param theR2 Radius of the second cone base.
607      *    \note If both radiuses are non-zero, the cone will be truncated.
608      *    \note If the radiuses are equal, a cylinder will be created instead.
609      *  \param theH Cone height.
610      *  \return New GEOM_Object, containing the created cone.
611      */
612     GEOM_Object MakeConeR1R2H (in double theR1, in double theR2, in double theH);
613
614     /*!
615      *  Create a cone with given base point, axis, height and radiuses.
616      *  \param thePnt Central point of the first cone base.
617      *  \param theAxis Cone axis.
618      *  \param theR1 Radius of the first cone base.
619      *  \param theR2 Radius of the second cone base.
620      *    \note If both radiuses are non-zero, the cone will be truncated.
621      *    \note If the radiuses are equal, a cylinder will be created instead.
622      *  \param theH Cone height.
623      *  \return New GEOM_Object, containing the created cone.
624      */
625     GEOM_Object MakeConePntVecR1R2H (in GEOM_Object thePnt,
626                                      in GEOM_Object theAxis,
627                                      in double      theR1,
628                                      in double      theR2,
629                                      in double      theH);
630
631     /*!
632      *  Create a torus with given radiuses at the origin of coordinate system.
633      *  \param theRMajor Torus major radius.
634      *  \param theRMinor Torus minor radius.
635      *  \return New GEOM_Object, containing the created torus.
636      */
637     GEOM_Object MakeTorusRR (in double theRMajor,
638                              in double theRMinor);
639
640     /*!
641      *  Create a torus with given center, normal vector and radiuses.
642      *  \param thePnt Torus central point.
643      *  \param theVec Torus axis of symmetry.
644      *  \param theRMajor Torus major radius.
645      *  \param theRMinor Torus minor radius.
646      *  \return New GEOM_Object, containing the created torus.
647      */
648     GEOM_Object MakeTorusPntVecRR (in GEOM_Object thePnt,
649                                    in GEOM_Object theVec,
650                                    in double theRMajor,
651                                    in double theRMinor);
652
653     /*!
654      *  Create a sphere with given radius at the origin of coordinate system.
655      *  \param theR Sphere radius.
656      *  \return New GEOM_Object, containing the created sphere.
657      */
658     GEOM_Object MakeSphereR (in double theR);
659
660     /*!
661      *  Create a sphere with given center and radius.
662      *  \param thePnt Sphere center.
663      *  \param theR Sphere radius.
664      *  \return New GEOM_Object, containing the created .
665      */
666     GEOM_Object MakeSpherePntR (in GEOM_Object thePnt, in double theR);
667
668     /*!
669      *  Create a shape by extrusion of the base shape along the vector,
670      *  i.e. all the space, transfixed by the base shape during its translation
671      *  along the vector on the given distance.
672      *  \param theBase Base shape to be extruded.
673      *  \param theVec Direction of extrusion.
674      *  \param theH Prism dimension along theVec.
675      *  \return New GEOM_Object, containing the created prism.
676      */
677     GEOM_Object MakePrismVecH (in GEOM_Object theBase,
678                                in GEOM_Object theVec,
679                                in double      theH);
680
681     /*!
682      *  Create a shape by extrusion of the base shape along a vector, defined by two points.
683      *  \param theBase Base shape to be extruded.
684      *  \param thePoint1 First end of extrusion vector.
685      *  \param thePoint2 Second end of extrusion vector.
686      *  \return New GEOM_Object, containing the created prism.
687      */
688     GEOM_Object MakePrismTwoPnt (in GEOM_Object theBase,
689                                  in GEOM_Object thePoint1,
690                                  in GEOM_Object thePoint2);
691
692     /*!
693      *  Create a shape by extrusion of the base shape along
694      *  the path shape. The path shape can be a wire or an edge.
695      *  \param theBase Base shape to be extruded.
696      *  \param thePath Path shape to extrude the base shape along it.
697      *  \return New GEOM_Object, containing the created pipe.
698      */
699     GEOM_Object MakePipe (in GEOM_Object theBase, in GEOM_Object thePath);
700
701     /*!
702      *  Create a shape by revolution of the base shape around the axis
703      *  on the given angle, i.e. all the space, transfixed by the base
704      *  shape during its rotation around the axis on the given angle.
705      *  \param theBase Base shape to be rotated.
706      *  \param theAxis Rotation axis.
707      *  \param theAngle Rotation angle in radians.
708      *  \return New GEOM_Object, containing the created revolution.
709      */
710     GEOM_Object MakeRevolutionAxisAngle (in GEOM_Object theBase,
711                                          in GEOM_Object theAxis,
712                                          in double theAngle);
713
714     /*!
715      *  Create a filling from the given compound of contours.
716      *  \param theMinDeg a minimal degree
717      *  \param theMaxDeg a maximal degree
718      *  \param theTol2D a 2d tolerance
719      *  \param theTol3D a 3d tolerance
720      *  \param theNbIter a number of iteration
721      *  \return New GEOM_Object, containing the created filling surface.
722      */
723     GEOM_Object MakeFilling (in GEOM_Object theShape,
724                              in long theMinDeg, in long theMaxDeg,
725                              in double theTol2D, in double theTol3D,
726                              in long theNbIter);
727   };
728
729   /*!
730    *  GEOM_IShapesOperations: Interface for Shapes creation:
731    *  Edge from two points, Wire from edges, Face from wire,
732    *  Shell from faces, Solid from shells, Compound from shapes
733    */
734   interface GEOM_IShapesOperations : GEOM_IOperations
735   {
736     /*!
737      *  Create a linear edge with specified ends.
738      *  \param thePnt1 Point for the first end of edge.
739      *  \param thePnt2 Point for the second end of edge.
740      *  \return New GEOM_Object, containing the created edge.
741      */
742     GEOM_Object MakeEdge (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
743
744     /*!
745      *  Create a wire from the set of edges and wires.
746      *  \param theEdgesAndWires List of edge and/or wires.
747      *  \return New GEOM_Object, containing the created wire.
748      */
749     GEOM_Object MakeWire (in ListOfGO theEdgesAndWires);
750
751     /*!
752      *  Create a face on the given wire.
753      *  \param theWire Wire to build the face on.
754      *  \param isPlanarWanted If TRUE, only planar face will be built.
755      *                        If impossible, NULL object will be returned.
756      *  \return New GEOM_Object, containing the created face.
757      */
758     GEOM_Object MakeFace (in GEOM_Object theWire, in boolean isPlanarWanted);
759
760     /*!
761      *  Create a face on the given wires set.
762      *  \param theWires List of wires to build the face on.
763      *  \param isPlanarWanted If TRUE, only planar face will be built.
764      *                        If impossible, NULL object will be returned.
765      *  \return New GEOM_Object, containing the created face.
766      */
767     GEOM_Object MakeFaceWires (in ListOfGO theWires, in boolean isPlanarWanted);
768
769     /*!
770      *  Create a shell from the set of faces and shells.
771      *  \param theFacesAndShells List of faces and/or shells.
772      *  \return New GEOM_Object, containing the created shell.
773      */
774     GEOM_Object MakeShell (in ListOfGO theFacesAndShells);
775
776     /*!
777      *  Create a solid, bounded by the given shell.
778      *  \param theShell Bounding shell.
779      *  \return New GEOM_Object, containing the created solid.
780      */
781     GEOM_Object MakeSolidShell (in GEOM_Object theShell);
782
783     /*!
784      *  Create a solid, bounded by the given shells.
785      *  \param theShells Bounding shells.
786      *  \return New GEOM_Object, containing the created solid.
787      */
788     GEOM_Object MakeSolidShells (in ListOfGO theShells);
789
790     /*!
791      *  Create a compound of the given shapes.
792      *  \param theShapes List of shapes to put in compound.
793      *  \return New GEOM_Object, containing the created compound.
794      */
795     GEOM_Object MakeCompound (in ListOfGO theShapes);
796
797     /*!
798      *  Replace coincident faces in theShape by one face.
799      *  \param theShape Initial shape.
800      *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
801      *  \return New GEOM_Object, containing a copy of theShape without coincident faces.
802      */
803     GEOM_Object MakeGlueFaces (in GEOM_Object theShape, in double theTolerance);
804
805     /*!
806      *  Explode a shape on subshapes of a given type.
807      *  \param theShape Shape to be exploded.
808      *  \param theShapeType Type of sub-shapes to be retrieved.
809      *  \param isSorted If this parameter is TRUE, sub-shapes will be
810      *                  sorted by coordinates of their gravity centers.
811      *  \return List of sub-shapes of type theShapeType, contained in theShape.
812      */
813     ListOfGO MakeExplode (in GEOM_Object theShape,
814                           in long        theShapeType,
815                           in boolean     isSorted);
816
817     /*!
818      *  Explode a shape on subshapes of a given type.
819      *  Does the same, as the above method, but returns IDs of sub-shapes,
820      *  not GEOM_Objects. It works faster.
821      *  \param theShape Shape to be exploded.
822      *  \param theShapeType Type of sub-shapes to be retrieved.
823      *  \param isSorted If this parameter is TRUE, sub-shapes will be
824      *                  sorted by coordinates of their gravity centers.
825      *  \return List of IDs of sub-shapes of type theShapeType, contained in theShape.
826      */
827     ListOfLong SubShapeAllIDs (in GEOM_Object theShape,
828                                in long        theShapeType,
829                                in boolean     isSorted);
830
831     /*!
832      *  Get a sub shape defined by its unique ID inside \a theMainShape
833      *  \note The sub shape GEOM_Objects can has ONLY ONE function.
834      *        Don't try to apply modification operations on them.
835      */
836     GEOM_Object GetSubShape (in GEOM_Object theMainShape,
837                              in long        theID);
838
839     /*!
840      *  Count number of faces in the given shape.
841      *  \param theShape Shape to count faces in.
842      *  \return Number of faces in the given shape.
843      */
844     long NumberOfFaces (in GEOM_Object theShape);
845
846     /*!
847      *  Count number of edges in the given shape.
848      *  \param theShape Shape to count edges in.
849      *  \return Number of edges in theShape.
850      */
851     long NumberOfEdges (in GEOM_Object theShape);
852
853     /*!
854      *  Reverses an orientation the given shape.
855      *  \param theShape Shape to be reversed.
856      *  \return The reversed copy of theShape.
857      */
858     GEOM_Object ChangeOrientation (in GEOM_Object theShape);
859
860     /*!
861      *  Retrieve all free faces from the given shape.
862      *  Free face is a face, which is not shared between two shells of the shape.
863      *  \param theShape Shape to find free faces in.
864      *  \return List of IDs of all free faces, contained in theShape.
865      */
866     ListOfLong GetFreeFacesIDs (in GEOM_Object theShape);
867
868     /*!
869      *  Get all sub-shapes of theShape1 of the given type, shared with theShape2.
870      *  \param theShape1 Shape to find sub-shapes in.
871      *  \param theShape2 Shape to find shared sub-shapes with.
872      *  \param theShapeType Type of sub-shapes to be retrieved.
873      *  \return List of sub-shapes of theShape1, shared with theShape2.
874      */
875     ListOfGO GetSharedShapes (in GEOM_Object theShape1,
876                               in GEOM_Object theShape2,
877                               in long        theShapeType);
878
879     /*!
880      *  Get sub-shapes of theShape of the given type,
881      *  laying on the specified plane.
882      *  \param theShape Shape to find sub-shapes of.
883      *  \param theShapeType Type of sub-shapes to be retrieved.
884      *  \param thePlane Face, specifying the plane to find shapes on.
885      *  \return Group of all found sub-shapes.
886      */
887     GEOM_Object GetShapesOnPlane (in GEOM_Object theShape,
888                                   in long        theShapeType,
889                                   in GEOM_Object thePlane);
890
891     /*!
892      *  Get sub-shape of theShape of the given type,
893      *  laying on the specified cylinder.
894      *  \param theShape Shape to find sub-shapes of.
895      *  \param theShapeType Type of sub-shapes to be retrieved.
896      *  \param theAxis Vector (or line, or linear edge), specifying
897      *                 axis of the cylinder to find shapes on.
898      *  \param theRadius Radius of the cylinder to find shapes on.
899      *  \return Group of all found sub-shapes.
900      */
901     GEOM_Object GetShapesOnCylinder (in GEOM_Object theShape,
902                                      in long        theShapeType,
903                                      in GEOM_Object theAxis,
904                                      in double      theRadius);
905
906     /*!
907      *  Get sub-shape of theShape of the given type,
908      *  laying on the specified sphere.
909      *  \param theShape Shape to find sub-shapes of.
910      *  \param theShapeType Type of sub-shapes to be retrieved.
911      *  \param theCenter Point, specifying center of the sphere to find shapes on.
912      *  \param theRadius Radius of the sphere to find shapes on.
913      *  \return Group of all found sub-shapes.
914      */
915     GEOM_Object GetShapesOnSphere (in GEOM_Object theShape,
916                                    in long        theShapeType,
917                                    in GEOM_Object theCenter,
918                                    in double      theRadius);
919
920     /*!
921      *  Get sub-shape(s) of theShapeWhere, which are
922      *  coincident with \a theShapeWhat or could be a part of it.
923      *  \param theShapeWhere Shape to find sub-shapes of.
924      *  \param theShapeWhat Shape, specifying what to find.
925      *  \return Group of all found sub-shapes or a single found sub-shape.
926      */
927     GEOM_Object GetInPlace (in GEOM_Object theShapeWhere,
928                             in GEOM_Object theShapeWhat);
929   };
930
931   /*!
932    *  GEOM_IBlocksOperations: Interface for Blocks construction
933    *  Face from points or edges, Block from faces,
934    *  Blocks multi-translation and multi-rotation
935    */
936   interface GEOM_IBlocksOperations : GEOM_IOperations
937   {
938     /*!
939      *  Creation of blocks
940      */
941
942     /*!
943      *  Create a quadrangle face from four edges. Order of Edges is not
944      *  important. It is  not necessary that edges share the same vertex.
945      *  \param theEdge1,theEdge2,theEdge3,theEdge4 Edges for the face bound.
946      *  \return New GEOM_Object, containing the created face.
947      */
948     GEOM_Object MakeQuad (in GEOM_Object theEdge1,
949                           in GEOM_Object theEdge2,
950                           in GEOM_Object theEdge3,
951                           in GEOM_Object theEdge4);
952
953     /*!
954      *  Create a quadrangle face on two edges.
955      *  The missing edges will be built by creating the shortest ones.
956      *  \param theEdge1,theEdge2 Two opposite edges for the face.
957      *  \return New GEOM_Object, containing the created face.
958      */
959     GEOM_Object MakeQuad2Edges (in GEOM_Object theEdge1,
960                                 in GEOM_Object theEdge2);
961
962     /*!
963      *  Create a quadrangle face with specified corners.
964      *  The missing edges will be built by creating the shortest ones.
965      *  \param thePnt1,thePnt2,thePnt3,thePnt4 Corner vertices for the face.
966      *  \return New GEOM_Object, containing the created face.
967      */
968     GEOM_Object MakeQuad4Vertices (in GEOM_Object thePnt1,
969                                    in GEOM_Object thePnt2,
970                                    in GEOM_Object thePnt3,
971                                    in GEOM_Object thePnt4);
972
973     /*!
974      *  Create a hexahedral solid, bounded by the six given faces. Order of
975      *  faces is not important. It is  not necessary that Faces share the same edge.
976      *  \param theFace1-theFace6 Faces for the hexahedral solid.
977      *  \return New GEOM_Object, containing the created solid.
978      */
979     GEOM_Object MakeHexa (in GEOM_Object theFace1,
980                           in GEOM_Object theFace2,
981                           in GEOM_Object theFace3,
982                           in GEOM_Object theFace4,
983                           in GEOM_Object theFace5,
984                           in GEOM_Object theFace6);
985
986     /*!
987      *  Create a hexahedral solid between two given faces.
988      *  The missing faces will be built by creating the smallest ones.
989      *  \param theFace1,theFace2 Two opposite faces for the hexahedral solid.
990      *  \return New GEOM_Object, containing the created solid.
991      */
992     GEOM_Object MakeHexa2Faces (in GEOM_Object theFace1,
993                                 in GEOM_Object theFace2);
994
995     /*!
996      *  Extract elements of blocks and blocks compounds
997      */
998
999     /*!
1000      *  Get a vertex, found in the given shape by its coordinates.
1001      *  \param theShape Block or a compound of blocks.
1002      *  \param theX,theY,theZ Coordinates of the sought vertex.
1003      *  \param theEpsilon Maximum allowed distance between the resulting
1004      *                    vertex and point with the given coordinates.
1005      *  \return New GEOM_Object, containing the found vertex.
1006      */
1007     GEOM_Object GetPoint (in GEOM_Object theShape,
1008                           in double      theX,
1009                           in double      theY,
1010                           in double      theZ,
1011                           in double      theEpsilon);
1012
1013     /*!
1014      *  Get an edge, found in the given shape by two given vertices.
1015      *  \param theShape Block or a compound of blocks.
1016      *  \param thePoint1,thePoint2 Points, close to the ends of the desired edge.
1017      *  \return New GEOM_Object, containing the found edge.
1018      */
1019     GEOM_Object GetEdge (in GEOM_Object theShape,
1020                          in GEOM_Object thePoint1,
1021                          in GEOM_Object thePoint2);
1022
1023     /*!
1024      *  Find an edge of the given shape, which has minimal distance to the given point.
1025      *  \param theShape Block or a compound of blocks.
1026      *  \param thePoint Point, close to the desired edge.
1027      *  \return New GEOM_Object, containing the found edge.
1028      */
1029     GEOM_Object GetEdgeNearPoint (in GEOM_Object theShape,
1030                                   in GEOM_Object thePoint);
1031
1032     /*!
1033      *  Returns a face, found in the given shape by four given corner vertices.
1034      *  \param theShape Block or a compound of blocks.
1035      *  \param thePoint1-thePoint4 Points, close to the corners of the desired face.
1036      *  \return New GEOM_Object, containing the found face.
1037      */
1038     GEOM_Object GetFaceByPoints (in GEOM_Object theShape,
1039                                  in GEOM_Object thePoint1,
1040                                  in GEOM_Object thePoint2,
1041                                  in GEOM_Object thePoint3,
1042                                  in GEOM_Object thePoint4);
1043
1044     /*!
1045      *  Get a face of block, found in the given shape by two given edges.
1046      *  \param theShape Block or a compound of blocks.
1047      *  \param theEdge1,theEdge2 Edges, close to the edges of the desired face.
1048      *  \return New GEOM_Object, containing the found face.
1049      */
1050     GEOM_Object GetFaceByEdges (in GEOM_Object theShape,
1051                                 in GEOM_Object theEdge1,
1052                                 in GEOM_Object theEdge2);
1053
1054     /*!
1055      *  Find a face, opposite to the given one in the given block.
1056      *  \param theBlock Must be a hexahedral solid.
1057      *  \param theFace Face of \a theBlock, opposite to the desired face.
1058      *  \return New GEOM_Object, containing the found face.
1059      */
1060     GEOM_Object GetOppositeFace (in GEOM_Object theBlock,
1061                                  in GEOM_Object theFace);
1062
1063     /*!
1064      *  Find a face of the given shape, which has minimal distance to the given point.
1065      *  \param theShape Block or a compound of blocks.
1066      *  \param thePoint Point, close to the desired face.
1067      *  \return New GEOM_Object, containing the found face.
1068      */
1069     GEOM_Object GetFaceNearPoint (in GEOM_Object theShape,
1070                                   in GEOM_Object thePoint);
1071
1072     /*!
1073      *  Find a face of block, whose outside normale has minimal angle with the given vector.
1074      *  \param theShape Block or a compound of blocks.
1075      *  \param theVector Vector, close to the normale of the desired face.
1076      *  \return New GEOM_Object, containing the found face.
1077      */
1078     GEOM_Object GetFaceByNormale (in GEOM_Object theBlock,
1079                                   in GEOM_Object theVector);
1080
1081     /*!
1082      *  Extract blocks from blocks compounds
1083      */
1084
1085     /*!
1086      *  Check, if the compound contains only specified blocks.
1087      *  \param theCompound The compound to check.
1088      *  \param theMinNbFaces If solid has lower number of faces, it is not a block.
1089      *  \param theMaxNbFaces If solid has higher number of faces, it is not a block.
1090      *    \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
1091      *  \return TRUE, if the given compound contains only blocks.
1092      *  \return theNbBlocks Number of specified blocks in theCompound.
1093      */
1094     boolean IsCompoundOfBlocks (in GEOM_Object theCompound,
1095                                 in long        theMinNbFaces,
1096                                 in long        theMaxNbFaces,
1097                                 out long       theNbBlocks);
1098
1099     /*!
1100      *  Enumeration of Blocks Compound defects.
1101      */
1102     enum BCErrorType
1103     {
1104       /* Each element of the compound should be a Block */
1105       NOT_BLOCK,
1106
1107       /* An element is a potential block, but has degenerated and/or seam edge(s). */
1108       EXTRA_EDGE,
1109
1110       /* A connection between two Blocks should be an entire face or an entire edge */
1111       INVALID_CONNECTION,
1112
1113       /* The compound should be connexe */
1114       NOT_CONNECTED,
1115
1116       /* The glue between two quadrangle faces should be applied */
1117       NOT_GLUED
1118     };
1119
1120     /*!
1121      *  Description of Blocks Compound defect: type and incriminated sub-shapes.
1122      */
1123     struct BCError
1124     {
1125       BCErrorType error;
1126       ListOfLong  incriminated;
1127     };
1128
1129     /*!
1130      *  Sequence of all Blocks Compound defects.
1131      */
1132     typedef sequence<BCError> BCErrors;
1133
1134     /*!
1135      *  Check, if the compound of blocks is given.
1136      *  To be considered as a compound of blocks, the
1137      *  given shape must satisfy the following conditions:
1138      *  - Each element of the compound should be a Block (6 faces and 12 edges).
1139      *  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
1140      *  - The compound should be connexe.
1141      *  - The glue between two quadrangle faces should be applied.
1142      *    \note Single block is also accepted as a valid compound of blocks.
1143      *  \param theCompound The compound to check.
1144      *  \return TRUE, if the given shape is a compound of blocks.
1145      *  \return theErrors Structure, containing discovered errors and incriminated sub-shapes.
1146      */
1147     boolean CheckCompoundOfBlocks (in GEOM_Object theCompound,
1148                                    out BCErrors   theErrors);
1149
1150     /*!
1151      *  Convert sequence of Blocks Compound errors, returned by
1152      *  <VAR>CheckCompoundOfBlocks()</VAR>, into string.
1153      *  \param theCompound The bad compound.
1154      *  \param theErrors The sequence of \a theCompound errors.
1155      *  \return String, describing all the errors in form, suitable for printing.
1156      */
1157     string PrintBCErrors (in GEOM_Object theCompound,
1158                           in BCErrors    theErrors);
1159
1160     /*!
1161      *  Remove all seam and degenerated edges from \a theShape.
1162      *  Unite faces and edges, sharing one surface.
1163      *  \param theShape The compound or single solid to remove irregular edges from.
1164      *  \return Improved shape.
1165      */
1166     GEOM_Object RemoveExtraEdges (in GEOM_Object theShape);
1167
1168     /*!
1169      *  Check, if the given shape is a blocks compound.
1170      *  Fix all detected errors.
1171      *    \note Single block can be also fixed by this method.
1172      *  \param theCompound The compound to check and improve.
1173      *  \return Improved compound.
1174      */
1175     GEOM_Object CheckAndImprove (in GEOM_Object theCompound);
1176
1177     /*!
1178      *  Get all the blocks, contained in the given compound.
1179      *  \param theCompound The compound to explode.
1180      *  \param theMinNbFaces If solid has lower number of faces, it is not a block.
1181      *  \param theMaxNbFaces If solid has higher number of faces, it is not a block.
1182      *    \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
1183      *  \return List of GEOM_Objects, containing the retrieved blocks.
1184      */
1185     ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound,
1186                                       in long        theMinNbFaces,
1187                                       in long        theMaxNbFaces);
1188
1189     /*!
1190      *  Find block, containing the given point inside its volume or on boundary.
1191      *  \param theCompound Compound, to find block in.
1192      *  \param thePoint Point, close to the desired block. If the point lays on
1193      *         boundary between some blocks, we return block with nearest center.
1194      *  \return New GEOM_Object, containing the found block.
1195      */
1196     GEOM_Object GetBlockNearPoint (in GEOM_Object theCompound,
1197                                    in GEOM_Object thePoint);
1198
1199     /*!
1200      *  Find block, containing all the elements, passed as the parts, or maximum quantity of them.
1201      *  \param theCompound Compound, to find block in.
1202      *  \param theParts List of faces and/or edges and/or vertices to be parts of the found block.
1203      *  \return New GEOM_Object, containing the found block.
1204      */
1205     GEOM_Object GetBlockByParts (in GEOM_Object theCompound,
1206                                  in ListOfGO    theParts);
1207
1208     /*!
1209      *  Return all blocks, containing all the elements, passed as the parts.
1210      *  \param theCompound Compound, to find blocks in.
1211      *  \param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
1212      *  \return List of GEOM_Objects, containing the found blocks.
1213      */
1214     ListOfGO GetBlocksByParts (in GEOM_Object theCompound,
1215                                in ListOfGO    theParts);
1216
1217     /*!
1218      *  Operations on blocks with gluing of result
1219      */
1220
1221     /*!
1222      *  Multi-transformate block and glue the result.
1223      *  Transformation is defined so, as to superpose theDirFace1 with theDirFace2.
1224      *  \param theBlock Hexahedral solid to be multi-transformed.
1225      *  \param theDirFace1 First direction face global index.
1226      *  \param theDirFace2 Second direction face global index.
1227      *  \param theNbTimes Quantity of transformations to be done.
1228      *    \note Global index of sub-shape can be obtained, using method
1229      *          <VAR>GEOM_ILocalOperations.GetSubShapeIndex()</VAR>.
1230      *  \return New GEOM_Object, containing the result shape.
1231      */
1232     GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock,
1233                                            in long        theDirFace1,
1234                                            in long        theDirFace2,
1235                                            in long        theNbTimes);
1236
1237     /*!
1238      *  Multi-transformate block and glue the result.
1239      *  \param theBlock Hexahedral solid to be multi-transformed.
1240      *  \param theDirFace1U,theDirFace2U Direction faces for the first transformation.
1241      *  \param theDirFace1V,theDirFace2V Direction faces for the second transformation.
1242      *  \param theNbTimesU,theNbTimesV Quantity of transformations to be done.
1243      *  \return New GEOM_Object, containing the result shape.
1244      */
1245     GEOM_Object MakeMultiTransformation2D (in GEOM_Object theBlock,
1246                                            in long        theDirFace1U,
1247                                            in long        theDirFace2U,
1248                                            in long        theNbTimesU,
1249                                            in long        theDirFace1V,
1250                                            in long        theDirFace2V,
1251                                            in long        theNbTimesV);
1252
1253     /*!
1254      *  Special operation - propagation
1255      */
1256
1257     /*!
1258      *  Build all possible propagation groups.
1259      *  Propagation group is a set of all edges, opposite to one (main)
1260      *  edge of this group directly or through other opposite edges.
1261      *  Notion of Opposite Edge make sence only on quadrangle face.
1262      *  \param theShape Shape to build propagation groups on.
1263      *  \return List of GEOM_Objects, each of them is a propagation group.
1264      */
1265     ListOfGO Propagate (in GEOM_Object theShape);
1266   };
1267
1268   /*!
1269    *  GEOM_IBooleanOperations: Interface for boolean operations (Cut, Fuse, Common)
1270    */
1271   interface GEOM_IBooleanOperations : GEOM_IOperations
1272   {
1273     /*!
1274      *  Perform one of boolean operations on two given shapes.
1275      *  \param theShape1 First argument for boolean operation.
1276      *  \param theShape2 Second argument for boolean operation.
1277      *  \param theOperation Indicates the operation to be done:
1278      *                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
1279      *  \return New GEOM_Object, containing the result shape.
1280      */
1281     GEOM_Object MakeBoolean (in GEOM_Object theShape1,
1282                              in GEOM_Object theShape2,
1283                              in long theOperation);
1284
1285     /*!
1286      *  Perform partition operation.
1287      *  \param theShapes Shapes to be intersected.
1288      *  \param theTools Shapes to intersect theShapes.
1289      *  \param theKeepInside Shapes, outside which the results will be deleted.
1290      *         Each shape from theKeepInside must belong to theShapes also.
1291      *  \param theRemoveInside Shapes, inside which the results will be deleted.
1292      *         Each shape from theRemoveInside must belong to theShapes also.
1293      *  \param theLimit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
1294      *  \param theRemoveWebs If TRUE, perform Glue 3D algorithm.
1295      *  \param theMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
1296      *  \return New GEOM_Object, containing the result shapes.
1297      */
1298     GEOM_Object MakePartition (in ListOfGO   theShapes,
1299                                in ListOfGO   theTools,
1300                                in ListOfGO   theKeepInside,
1301                                in ListOfGO   theRemoveInside,
1302                                in short      theLimit,
1303                                in boolean    theRemoveWebs,
1304                                in ListOfLong theMaterials);
1305
1306     /*!
1307      *  Perform partition of the Shape with the Plane
1308      *  \param theShape Shape to be intersected.
1309      *  \param thePlane Tool shape, to intersect theShape.
1310      *  \return New GEOM_Object, containing the result shape.
1311      */
1312     GEOM_Object MakeHalfPartition (in GEOM_Object theShape,
1313                                    in GEOM_Object thePlane);
1314   };
1315
1316   /*!
1317    *  GEOM_ICurvesOperations: Interface for curves creation.
1318    *  Polyline, Circle, Spline (Bezier and Interpolation)
1319    */
1320   interface GEOM_ICurvesOperations : GEOM_IOperations
1321   {
1322     /*!
1323      *  Create a circle with given center, normal vector and radius.
1324      *  \param thePnt Circle center.
1325      *  \param theVec Vector, normal to the plane of the circle.
1326      *  \param theR Circle radius.
1327      *  \return New GEOM_Object, containing the created circle.
1328      */
1329     GEOM_Object MakeCirclePntVecR (in GEOM_Object thePnt,
1330                                    in GEOM_Object theVec,
1331                                    in double theR);
1332     /*!
1333      *  Create a circle, passing through three given points
1334      *  \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1335      *  \return New GEOM_Object, containing the created circle.
1336      */
1337     GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1,
1338                                     in GEOM_Object thePnt2,
1339                                     in GEOM_Object thePnt3);
1340
1341     /*!
1342      *  Create an ellipse with given center, normal vector and radiuses.
1343      *  \param thePnt Ellipse center.
1344      *  \param theVec Vector, normal to the plane of the ellipse.
1345      *  \param theRMajor Major ellipse radius.
1346      *  \param theRMinor Minor ellipse radius.
1347      *  \return New GEOM_Object, containing the created ellipse.
1348      */
1349     GEOM_Object MakeEllipse (in GEOM_Object thePnt,
1350                              in GEOM_Object theVec,
1351                              in double theRMajor,
1352                              in double theRMinor);
1353
1354     /*!
1355      *  Create an arc of circle, passing through three given points.
1356      *  \param thePnt1 Start point of the arc.
1357      *  \param thePnt2 Middle point of the arc.
1358      *  \param thePnt3 End point of the arc.
1359      *  \return New GEOM_Object, containing the created arc.
1360      */
1361     GEOM_Object MakeArc (in GEOM_Object thePnt1,
1362                          in GEOM_Object thePnt2,
1363                          in GEOM_Object thePnt3);
1364
1365     /*!
1366      *  Create a polyline on the set of points.
1367      *  \param thePoints Sequence of points for the polyline.
1368      *  \return New GEOM_Object, containing the created polyline.
1369      */
1370     GEOM_Object MakePolyline (in ListOfGO thePoints);
1371
1372     /*!
1373      *  Create bezier curve on the set of points.
1374      *  \param thePoints Sequence of points for the bezier curve.
1375      *  \return New GEOM_Object, containing the created bezier curve.
1376      */
1377     GEOM_Object MakeSplineBezier (in ListOfGO thePoints);
1378
1379     /*!
1380      *  Create B-Spline curve on the set of points.
1381      *  \param thePoints Sequence of points for the B-Spline curve.
1382      *  \return New GEOM_Object, containing the created B-Spline curve.
1383      */
1384     GEOM_Object MakeSplineInterpolation (in ListOfGO thePoints);
1385
1386     /*!
1387      *  Create a sketcher (wire or face), following the textual description,
1388      *  passed through \a theCommand argument. \n
1389      *  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
1390      *  Format of the description string have to be the following:
1391      *
1392      *  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
1393      *
1394      *  Where:
1395      *  - x1, y1 are coordinates of the first sketcher point (zero by default),
1396      *  - CMD is one of
1397      *     - "R angle" : Set the direction by angle
1398      *     - "D dx dy" : Set the direction by DX & DY
1399      *     .
1400      *       \n
1401      *     - "TT x y" : Create segment by point at X & Y
1402      *     - "T dx dy" : Create segment by point with DX & DY
1403      *     - "L length" : Create segment by direction & Length
1404      *     - "IX x" : Create segment by direction & Intersect. X
1405      *     - "IY y" : Create segment by direction & Intersect. Y
1406      *     .
1407      *       \n
1408      *     - "C radius length" : Create arc by direction, radius and length(in degree)
1409      *     .
1410      *       \n
1411      *     - "WW" : Close Wire (to finish)
1412      *     - "WF" : Close Wire and build face (to finish)
1413      *
1414      *  \param theCommand String, defining the sketcher in local
1415      *                    coordinates of the working plane.
1416      *  \param theWorkingPlane Nine double values, defining origin,
1417      *                         OZ and OX directions of the working plane.
1418      *  \return New GEOM_Object, containing the created wire.
1419      */
1420     GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane);
1421   };
1422
1423   /*!
1424    *  GEOM_ILocalOperations: Interface for fillet and chamfer creation.
1425    */
1426   interface GEOM_ILocalOperations : GEOM_IOperations
1427   {
1428     /*!
1429      *  Perform a fillet on all edges of the given shape.
1430      *  \param theShape Shape, to perform fillet on.
1431      *  \param theR Fillet radius.
1432      *  \return New GEOM_Object, containing the result shape.
1433      */
1434     GEOM_Object MakeFilletAll (in GEOM_Object theShape,
1435                                in double      theR);
1436
1437     /*!
1438      *  Perform a fillet on the specified edges of the given shape
1439      *  \param theShape Shape, to perform fillet on.
1440      *  \param theR Fillet radius.
1441      *  \param theEdges Global indices of edges to perform fillet on.
1442      *    \note Global index of sub-shape can be obtained, using method <VAR>GetSubShapeIndex()</VAR>.
1443      *  \return New GEOM_Object, containing the result shape.
1444      */
1445     GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
1446                                  in double      theR,
1447                                  in ListOfLong  theEdges);
1448
1449     /*!
1450      *  Perform a fillet on all edges of the specified faces of the given shape.
1451      *  \param theShape Shape, to perform fillet on.
1452      *  \param theR Fillet radius.
1453      *  \param theFaces Global indices of faces to perform fillet on.
1454      *    \note Global index of sub-shape can be obtained, using method <VAR>GetSubShapeIndex()</VAR>.
1455      *  \return New GEOM_Object, containing the result shape.
1456      */
1457     GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
1458                                  in double      theR,
1459                                  in ListOfLong  theFaces);
1460
1461     /*!
1462      *  Perform a symmetric chamfer on all edges of the given shape.
1463      *  \param theShape Shape, to perform chamfer on.
1464      *  \param theD Chamfer size along each face.
1465      *  \return New GEOM_Object, containing the result shape.
1466      */
1467     GEOM_Object MakeChamferAll (in GEOM_Object theShape,
1468                                 in double      theD);
1469
1470     /*!
1471      *  Perform a chamfer on edges, common to the specified faces.
1472      *  with distance D1 on the Face1
1473      *  \param theShape Shape, to perform chamfer on.
1474      *  \param theD1 Chamfer size along \a theFace1.
1475      *  \param theD2 Chamfer size along \a theFace2.
1476      *  \param theFace1,theFace2 Global indices of two faces of \a theShape.
1477      *    \note Global index of sub-shape can be obtained, using method <VAR>GetSubShapeIndex()</VAR>.
1478      *  \return New GEOM_Object, containing the result shape.
1479      */
1480     GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
1481                                  in double theD1, in double theD2,
1482                                  in long theFace1, in long theFace2);
1483
1484     /*!
1485      *  Perform a chamfer on all edges of the specified faces.
1486      *  with distance D1 on the first specified face (if several for one edge)
1487      *  \param theShape Shape, to perform chamfer on.
1488      *  \param theD1 Chamfer size along face from \a theFaces. If both faces,
1489      *               connected to the edge, are in \a theFaces, \a theD1
1490      *               will be get along face, which is nearer to \a theFaces beginning.
1491      *  \param theD2 Chamfer size along another of two faces, connected to the edge.
1492      *  \param theFaces Sequence of global indices of faces of \a theShape.
1493      *    \note Global index of sub-shape can be obtained, using method <VAR>GetSubShapeIndex()</VAR>.
1494      *  \return New GEOM_Object, containing the result shape.
1495      */
1496     GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
1497                                   in double theD1, in double theD2,
1498                                   in ListOfLong theFaces);
1499
1500     /*!
1501      *  Perform an Archimde operation on the given shape with given parameters.
1502      *                    The object presenting the resulting face is returned
1503      *  \param theShape Shape to be put in water.
1504      *  \param theWeight Weight og the shape.
1505      *  \param theWaterDensity Density of the water.
1506      *  \param theMeshDeflection Deflection od the mesh, using to compute the section.
1507      *  \return New GEOM_Object, containing a section of \a theShape
1508      *          by a plane, corresponding to water level.
1509      */
1510     GEOM_Object MakeArchimede (in GEOM_Object theShape,
1511                                in double theWeight,
1512                                in double theWaterDensity,
1513                                in double theMeshDeflection);
1514
1515     /*!
1516      *  Get global index of \a theSubShape in \a theShape.
1517      *  \param theShape Main shape.
1518      *  \param theSubShape Sub-shape of the main shape.
1519      *  \return global index of \a theSubShape in \a theShape.
1520      */
1521     long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape);
1522   };
1523
1524   /*!
1525    *  GEOM_IHealingOperations: Interface for shape healing operations.
1526    *  Shape Processing, SuppressFaces, etc.
1527    */
1528   interface GEOM_IHealingOperations : GEOM_IOperations
1529   {
1530     /*!
1531      *  Apply a sequence of Shape Healing operators to the given object.
1532      *  \param theShapes Shape to be processed.
1533      *  \param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
1534      *  \param theParameters List of names of parameters
1535      *                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
1536      *  \param theValues List of values of parameters, in the same order
1537      *                    as parameters are listed in \a theParameters list.
1538      *  \return New GEOM_Object, containing processed shape.
1539      */
1540     GEOM_Object ProcessShape (in GEOM_Object theShapes,
1541                               in string_array theOperators,
1542                               in string_array theParameters,
1543                               in string_array theValues);
1544
1545     /*!
1546      *  Get default sequence of operators, their parameters and parameters' values
1547      *  of Shape Process operation. In the current implementation the defaults are
1548      *  read from the file pointed by CSF_ShHealingDefaults environmental variable.
1549      *  \param theOperators Output. Default list of names of operators.
1550      *  \param theParameters Output. Default list of names of parameters.
1551      *  \param theValues Output. List of default values of parameters, in the same order
1552      *                           as parameters are listed in \a theParameters list.
1553      */
1554     void GetShapeProcessParameters (out string_array theOperators,
1555                                     out string_array theParameters,
1556                                     out string_array theValues);
1557
1558     /*!
1559      *  Remove faces from the given object (shape).
1560      *  \param theObject Shape to be processed.
1561      *  \param theFaces Indices of faces to be removed, if EMPTY then the method
1562      *                  removes ALL faces of the given object.
1563      *  \return New GEOM_Object, containing processed shape.
1564      */
1565     GEOM_Object SuppressFaces (in GEOM_Object theObject, in short_array theFaces);
1566
1567     /*!
1568      *  Close an open wire.
1569      *  \param theObject Shape to be processed.
1570      *  \param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
1571      *                  if -1, then theObject itself is a wire.
1572      *  \param isCommonVertex If TRUE : closure by creation of a common vertex,
1573      *                        If FALS : closure by creation of an edge between ends.
1574      *  \return New GEOM_Object, containing processed shape.
1575      */
1576     GEOM_Object CloseContour (in GEOM_Object theObject, in short_array theWires,
1577                               in boolean isCommonVertex);
1578
1579     /*!
1580      *  Remove internal wires and edges from the given object (face).
1581      *  \param theObject Shape to be processed.
1582      *  \param theWires Indices of wires to be removed, if EMPTY then the method
1583      *                  removes ALL internal wires of the given object.
1584      *  \return New GEOM_Object, containing processed shape.
1585      */
1586     GEOM_Object RemoveIntWires (in GEOM_Object theObject, in short_array theWires);
1587
1588     /*!
1589      *  Remove internal closed contours (holes) from the given object.
1590      *  \param theObject Shape to be processed.
1591      *  \param theWires Indices of wires to be removed, if EMPTY then the method
1592      *                  removes ALL internal holes of the given object
1593      *  \return New GEOM_Object, containing processed shape.
1594      */
1595     GEOM_Object FillHoles (in GEOM_Object theObject, in short_array theWires);
1596
1597     /*!
1598      *  Sewing of the given object.
1599      *  \param theObject Shape to be processed.
1600      *  \param theTolerance Required tolerance value.
1601      *  \return New GEOM_Object, containing processed shape.
1602      */
1603     GEOM_Object Sew (in GEOM_Object theObject, in double theTolerance);
1604
1605     /*!
1606      *  Addition of a point to a given edge object.
1607      *  \param theObject Shape to be processed.
1608      *  \param theEdgeIndex Index of edge to be divided within theObject's shape,
1609      *                      if -1, then theObject itself is the edge.
1610      *  \param theValue Value of parameter on edge or length parameter,
1611      *                  depending on \a isByParameter.
1612      *  \param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1],
1613      *                       if FALSE : \a theValue is treated as a length parameter [0..1]
1614      *  \return New GEOM_Object, containing processed shape.
1615      */
1616     GEOM_Object DivideEdge (in GEOM_Object theObject, in short theEdgeIndex,
1617                             in double theValue, in boolean isByParameter);
1618
1619     /*!
1620      *  Get a list of wires (wrapped in GEOM_Object-s),
1621      *  that constitute a free boundary of the given shape.
1622      *  \param theObject Shape to get free boundary of.
1623      *  \param theClosedWires Output. Closed wires on the free boundary of the given shape.
1624      *  \param theOpenWires Output. Open wires on the free boundary of the given shape.
1625      *  \return FALSE, if an error(s) occured during the method execution.
1626      */
1627     boolean GetFreeBoundary (in GEOM_Object theObject,
1628                              out ListOfGO theClosedWires,
1629                              out ListOfGO theOpenWires);
1630   };
1631
1632   /*!
1633    *  GEOM_IInsertOperations: Interface for shape insert operations (like copy, import).
1634    *
1635    */
1636   interface GEOM_IInsertOperations : GEOM_IOperations
1637   {
1638     /*!
1639      *  Create a copy of the given object
1640      */
1641     GEOM_Object MakeCopy (in GEOM_Object theOriginal);
1642
1643     /*!
1644      *  Export the given shape into a file with given name.
1645      *  \param theObject Shape to be stored in the file.
1646      *  \param theFileName Name of the file to store the given shape in.
1647      *  \param theFormatName Specify format for the shape storage.
1648      *         Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
1649      */
1650     void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName);
1651
1652     /*!
1653      *  Import a shape from the BRep or IGES or STEP file
1654      *  (depends on given format) with given name.
1655      *  \param theFileName The file, containing the shape.
1656      *  \param theFormatName Specify format for the file reading.
1657      *         Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
1658      *  \return New GEOM_Object, containing the imported shape.
1659      */
1660     GEOM_Object Import (in string theFileName, in string theFormatName);
1661
1662     /*!
1663      *  Get the supported import formats and corresponding patterns for File dialog.
1664      *  \param theFormats Output. List of formats, available for import.
1665      *  \param thePatterns Output. List of file patterns, corresponding to available formats.
1666      *  \return Returns available formats and patterns through the arguments.
1667      */
1668     void ImportTranslators (out string_array theFormats,
1669                             out string_array thePatterns);
1670
1671     /*!
1672      *  Get the supported export formats and corresponding patterns for File dialog.
1673      *  \param theFormats Output. List of formats, available for export.
1674      *  \param thePatterns Output. List of file patterns, corresponding to available formats.
1675      *  \return Returns available formats and patterns through the arguments.
1676      */
1677     void ExportTranslators (out string_array theFormats,
1678                             out string_array thePatterns);
1679   };
1680
1681   /*!
1682    *  GEOM_IMeasureOperations: Interface for measurement (distance, whatis) and
1683    *  properties calculation (like Centre of Mass, Inertia, etc.).
1684    *
1685    */
1686   interface GEOM_IMeasureOperations : GEOM_IOperations
1687   {
1688     /*!
1689      *  Get summarized length of all wires,
1690      *  area of surface and volume of the given shape.
1691      *  \param theShape Shape to define properties of.
1692      *  \param theLength Output. Summarized length of all wires of the given shape.
1693      *  \param theSurfArea Output. Area of surface of the given shape.
1694      *  \param theVolume Output. Volume of the given shape.
1695      *  \return Returns shape properties through the last three arguments.
1696      */
1697     void GetBasicProperties (in GEOM_Object theShape,
1698                              out double theLength,
1699                              out double theSurfArea,
1700                              out double theVolume);
1701
1702     /*!
1703      *  Get a point, situated at the centre of mass of theShape.
1704      *  \param theShape Shape to define centre of mass of.
1705      *  \return New GEOM_Object, containing the created point.
1706      */
1707     GEOM_Object GetCentreOfMass (in GEOM_Object theShape);
1708
1709     /*!
1710      *  Get inertia matrix and moments of inertia of theShape.
1711      *  \param theShape Shape to calculate inertia of.
1712      *  \param I(1-3)(1-3) Output. Components of the inertia matrix of the given shape.
1713      *  \param Ix,Iy,Iz Output. Moments of inertia of the given shape.
1714      *  \return Returns inertia through the last twelve arguments.
1715      */
1716     void GetInertia (in GEOM_Object theShape,
1717                      out double I11, out double I12, out double I13,
1718                      out double I21, out double I22, out double I23,
1719                      out double I31, out double I32, out double I33,
1720                      out double Ix , out double Iy , out double Iz);
1721
1722     /*!
1723      *  Get parameters of bounding box of the given shape
1724      *  \param theShape Shape to obtain bounding box of.
1725      *  \param Xmin,Xmax Output. Limits of shape along OX axis.
1726      *  \param Ymin,Ymax Output. Limits of shape along OY axis.
1727      *  \param Zmin,Zmax Output. Limits of shape along OZ axis.
1728      *  \return Returns parameters of bounding box through the last six arguments.
1729      */
1730     void GetBoundingBox (in GEOM_Object theShape,
1731                          out double Xmin, out double Xmax,
1732                          out double Ymin, out double Ymax,
1733                          out double Zmin, out double Zmax);
1734
1735     /*!
1736      *  Get min and max tolerances of sub-shapes of theShape
1737      *  \param theShape Shape, to get tolerances of.
1738      *  \param FaceMin,FaceMax Output. Min and max tolerances of the faces.
1739      *  \param EdgeMin,EdgeMax Output. Min and max tolerances of the edges.
1740      *  \param VertMin,VertMax Output. Min and max tolerances of the vertices.
1741      *  \return Returns shape tolerances through the last six arguments.
1742      */
1743     void GetTolerance (in GEOM_Object theShape,
1744                        out double FaceMin, out double FaceMax,
1745                        out double EdgeMin, out double EdgeMax,
1746                        out double VertMin, out double VertMax);
1747
1748     /*!
1749      *  Check a topology of the given shape.
1750      *  \param theShape Shape to check validity of.
1751      *  \param theDescription Output. Description of problems in the shape, if they are.
1752      *  \return TRUE, if the shape "seems to be valid" from the topological point of view.
1753      */
1754     boolean CheckShape (in GEOM_Object theShape,
1755                         out string     theDescription);
1756
1757     /*!
1758      *  Obtain description of the given shape
1759      *  \param theShape Shape to be described.
1760      *  \return Description of the given shape.
1761      */
1762     string WhatIs (in GEOM_Object theShape);
1763
1764     /*!
1765      *  Get minimal distance between the given shapes.
1766      *  \param theShape1,theShape2 Shapes to find minimal distance between.
1767      *  \param X1,Y1,Z1 Output. Coordinates of point on theShape1, nearest to theShape2.
1768      *  \param X2,Y2,Z2 Output. Coordinates of point on theShape2, nearest to theShape1.
1769      *  \return Value of the minimal distance between the given shapes.
1770      */
1771     double GetMinDistance (in GEOM_Object theShape1, in GEOM_Object theShape2,
1772                            out double X1, out double Y1, out double Z1,
1773                            out double X2, out double Y2, out double Z2);
1774
1775
1776     /*!
1777      *  Get point coordinates
1778      */
1779     void PointCoordinates (in GEOM_Object theShape, out double X, out double Y, out double Z);
1780   };
1781
1782
1783   /*!
1784    *  GEOM_IGroupOperations: Interface for groups creation.
1785    */
1786   interface GEOM_IGroupOperations : GEOM_IOperations
1787   {
1788     /*!
1789      *  Creates a new group which will store  sub shapes of theMainShape
1790      *  \param theMainShape is a GEOM object on which the group is selected
1791      *  \param theShapeType defines a shape type of the group
1792      *  \return a newly created GEOM group
1793      */
1794     GEOM_Object CreateGroup (in GEOM_Object theMainShape, in long theShapeType);
1795
1796     /*!
1797      *  Adds a sub object with ID theSubShapeId to the group
1798      *  \param theGroup is a GEOM group to which the new sub shape is added
1799      *  \param theSubShapeId is a sub shape ID in the main object.
1800      *  \note Use method <VAR>ILocalOperations.GetSubShapeIndex()</VAR> to get an ID by the sub shape
1801      */
1802     void AddObject (in GEOM_Object theGroup, in long theSubShapeId);
1803
1804     /*!
1805      *  Removes a sub object with ID \a theSubShapeId from the group
1806      *  \param theGroup is a GEOM group from which the new sub shape is removed
1807      *  \param theSubShapeId is a sub shape ID in the main object.
1808      *  \note Use method <VAR>ILocalOperations.GetSubShapeIndex()</VAR> to get an ID by the sub shape
1809      */
1810     void RemoveObject (in GEOM_Object theGroup, in long theSubShapeId);
1811
1812     /*!
1813      *  Returns a type of sub objects stored in the group
1814      *  \param theGroup is a GEOM group which type is returned.
1815      */
1816     long GetType (in GEOM_Object theGroup);
1817
1818     /*!
1819      *  Returns a main shape associated with the group
1820      *  \param theGroup is a GEOM group for which a main shape object is requested
1821      *  \return a GEOM object which is a main shape for theGroup
1822      */
1823     GEOM_Object GetMainShape (in GEOM_Object theGroup);
1824
1825     /*!
1826      *  Returns a list of sub objects ID stored in the group
1827      *  \param theGroup is a GEOM group for which a list of IDs is requested
1828      */
1829     ListOfLong GetObjects (in GEOM_Object theGroup);
1830   };
1831
1832
1833   /*!
1834    *  GEOM_Gen: Interface to access other GEOM interfaces.
1835    *  Also contains some methods to access and manage GEOM objects.
1836    */
1837   interface GEOM_Gen : Engines::Component,SALOMEDS::Driver
1838   {
1839     /*!
1840      *  Undo/Redo Management
1841      */
1842
1843     void Undo (in long theStudyID);
1844
1845     void Redo (in long theStudyID);
1846
1847     /*!
1848      * Publishing manangement
1849      * Adds in theStudy a object theObject under with a name theName,
1850      * if theFather is not NULL the object is placed under thFather's SObject.
1851      * Returns a SObject where theObject is placed
1852      */
1853     SALOMEDS::SObject AddInStudy (in SALOMEDS::Study theStudy,
1854                                   in GEOM_Object theObject,
1855                                   in string theName,
1856                                   in GEOM_Object theFather);
1857
1858     /*!
1859      *  Methods to access interfaces for objects creation and transformation
1860      */
1861     GEOM_IBasicOperations     GetIBasicOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
1862     GEOM_ITransformOperations GetITransformOperations(in long theStudyID) raises (SALOME::SALOME_Exception);
1863     GEOM_I3DPrimOperations    GetI3DPrimOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
1864     GEOM_IShapesOperations    GetIShapesOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
1865     GEOM_IBooleanOperations   GetIBooleanOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
1866     GEOM_ICurvesOperations    GetICurvesOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
1867     GEOM_ILocalOperations     GetILocalOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
1868     GEOM_IHealingOperations   GetIHealingOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
1869     GEOM_IInsertOperations    GetIInsertOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
1870     GEOM_IMeasureOperations   GetIMeasureOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
1871     GEOM_IBlocksOperations    GetIBlocksOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
1872     GEOM_IGroupOperations     GetIGroupOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
1873
1874     /*!
1875      *  Objects Management
1876      */
1877
1878     /*!
1879      *  Removes the object from the GEOM component
1880      *  \param theObject is a GEOM object to be removed
1881      */
1882     void RemoveObject (in GEOM_Object theObject);
1883
1884     /*!
1885      *  Returns an object defined by the study and its entry in the GEOM component
1886      *  \param theStudyID is a SALOMEDS Study ID
1887      *  \param theEntry is an entry of the requested GEOM object in the GEOM component
1888      *  \note if the object has not previously been created a NULL GEOM object is returned
1889      */
1890     GEOM_Object GetObject (in long theStudyID, in string theEntry);
1891
1892     /*!
1893      *  Add a sub shape defined by indices in \a theIndices
1894      *  (contains unique IDs of sub shapes inside theMainShape)
1895      *  \note The sub shape GEOM_Objects can has ONLY ONE function.
1896      *        Don't try to apply modification operations on them.
1897      *  \note Internal method
1898      */
1899     GEOM_Object AddSubShape (in GEOM_Object theMainShape, in ListOfLong theIndices);
1900
1901     /*!
1902      *  GEOM object's IOR Management
1903      */
1904
1905     /*!
1906      *  Returns a GEOM Object defined by its IOR
1907      *  \param theIOR a string containg an IOR of the requested GEOM object
1908      */
1909     GEOM_Object GetIORFromString (in string theIOR);
1910
1911     /*!
1912      *  Returns a string which contains an IOR of the GEOM object
1913      *  \param theObject is a GEOM object which IOR is requested
1914      */
1915     string GetStringFromIOR (in GEOM_Object theObject);
1916   };
1917 };
1918
1919 #endif