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