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