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