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