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