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