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