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