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