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