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