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