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