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