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