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