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