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