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