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