Salome HOME
BUG: GEOM/CMake build procedure: VTK and OCCT are Geom specifics. They are not used...
[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 Scale the given object by the factor.
1273      *  \param theObject The object to be scaled.
1274      *  \param thePoint Center point for scaling.
1275      *  \param theFactor Scaling factor value.
1276      *  \return theObject.
1277      */
1278     GEOM_Object ScaleShape (in GEOM_Object theObject, in GEOM_Object thePoint,
1279                             in double theFactor);
1280
1281     /*!
1282      *  \brief Scale the given object by the factor, creating its copy before the scaling.
1283      *  \param theObject The object to be scaled.
1284      *  \param thePoint Center point for scaling.
1285      *  \param theFactor Scaling factor value.
1286      *  \return New GEOM_Object, containing the scaled shape.
1287      */
1288     GEOM_Object ScaleShapeCopy (in GEOM_Object theObject, in GEOM_Object thePoint,
1289                                 in double theFactor);
1290
1291     /*!
1292      *  \brief Scale the given object by different factors along coordinate axes.
1293      *  \param theObject The object to be scaled.
1294      *  \param thePoint Center point for scaling.
1295      *  \param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
1296      *  \return theObject.
1297      */
1298     GEOM_Object ScaleShapeAlongAxes (in GEOM_Object theObject,
1299                                      in GEOM_Object thePoint,
1300                                      in double theFactorX,
1301                                      in double theFactorY,
1302                                      in double theFactorZ);
1303
1304     /*!
1305      *  \brief Scale the given object by different factors along coordinate axes,
1306      *  creating its copy before the scaling.
1307      *  \param theObject The object to be scaled.
1308      *  \param thePoint Center point for scaling.
1309      *  \param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
1310      *  \return New GEOM_Object, containing the scaled shape.
1311      */
1312     GEOM_Object ScaleShapeAlongAxesCopy (in GEOM_Object theObject,
1313                                          in GEOM_Object thePoint,
1314                                          in double theFactorX,
1315                                          in double theFactorY,
1316                                          in double theFactorZ);
1317
1318     /*!
1319      *  \brief Modify the Location of the given object by LCS.
1320      *  \param theObject The object to be displaced.
1321      *  \param theStartLCS Coordinate system to perform displacement from it.
1322      *                     If \a theStartLCS is NULL, displacement
1323      *                     will be performed from global CS.
1324      *                     If \a theObject itself is used as \a theStartLCS,
1325      *                     its location will be changed to \a theEndLCS.
1326      *  \param theEndLCS Coordinate system to perform displacement to it.
1327      *  \return theObject.
1328      */
1329     GEOM_Object PositionShape (in GEOM_Object theObject,
1330                                in GEOM_Object theStartLCS,
1331                                in GEOM_Object theEndLCS);
1332
1333     /*!
1334      *  \brief Modify the Location of the given object by LCS,
1335      *  creating its copy before the setting.
1336      *  \param theObject The object to be displaced.
1337      *  \param theStartLCS Coordinate system to perform displacement from it.
1338      *                     If \a theStartLCS is NULL, displacement
1339      *                     will be performed from global CS.
1340      *                     If \a theObject itself is used as \a theStartLCS,
1341      *                     its location will be changed to \a theEndLCS.
1342      *  \param theEndLCS Coordinate system to perform displacement to it.
1343      *  \return New GEOM_Object, containing the displaced shape.
1344      */
1345     GEOM_Object PositionShapeCopy (in GEOM_Object theObject,
1346                                    in GEOM_Object theStartLCS,
1347                                    in GEOM_Object theEndLCS);
1348
1349     /*!
1350      *  \brief Modify the Location of the given object by Path,
1351      *  \param  theObject The object to be displaced.
1352      *  \param  thePath Wire or Edge along that the object will be translated.
1353      *  \param  theDistance progress of Path (0 = actual location, 1 = end of path location).
1354      *  \param  theCopy is a true or false parameter. true is to create a copy, false to move the object.
1355      *  \param  theReverse is a true or false parameter. True is to reverse
1356      *                     direction, false is to move normal direction.
1357      *  \return New GEOM_Object, containing the displaced shape.
1358      */
1359     GEOM_Object PositionAlongPath (in GEOM_Object theObject,
1360                                    in GEOM_Object thePath,
1361                                    in double theDistance,
1362                                    in boolean theCopy,
1363                                    in boolean theReverse);
1364
1365     /*!
1366      *  \brief Recompute the shape from its arguments.
1367      *  \param theObject The object to be recomputed.
1368      *  \return theObject.
1369      */
1370     GEOM_Object RecomputeObject (in GEOM_Object theObject);
1371   };
1372   
1373   /*!
1374    *  \brief Interface for 3D primitives creation
1375    *
1376    *  Box, Cylinder, Cone, Sphere, Prism (extrusion),
1377    *  Pipe (extrusion along contour), Revolution, Solid (from shell).
1378    */
1379   interface GEOM_I3DPrimOperations : GEOM_IOperations
1380   {
1381     /*!
1382      *  \brief Create a box with specified dimensions along the coordinate axes
1383      *  and with edges, parallel to the coordinate axes.
1384      *
1385      *  Center of the box will be at point (DX/2, DY/2, DZ/2).
1386      *  \param theDX Length of Box edges, parallel to OX axis.
1387      *  \param theDY Length of Box edges, parallel to OY axis.
1388      *  \param theDZ Length of Box edges, parallel to OZ axis.
1389      *  \return New GEOM_Object, containing the created box.
1390      */
1391     GEOM_Object MakeBoxDXDYDZ (in double theDX, in double theDY, in double theDZ);
1392
1393     /*!
1394      *  \brief Create a box with two specified opposite vertices,
1395      *  and with edges, parallel to the coordinate axes
1396      *  \param thePnt1 First of two opposite vertices.
1397      *  \param thePnt2 Second of two opposite vertices.
1398      *  \return New GEOM_Object, containing the created box.
1399      */
1400     GEOM_Object MakeBoxTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
1401
1402     /*!
1403      *  \brief Create a face specified dimensions along OX-OY coordinate axes,
1404      *  with edges parallel to the coordinate axes.
1405      *
1406      *  Center of the face will be at point (0, 0, 0).
1407      *  \param theH Height of the Face.
1408      *  \param theW Width of the Face.
1409      *  \param theOrientation Orientation belong axis OXY OYZ OZX
1410      *  \return New GEOM_Object, containing the created face.
1411      */
1412     GEOM_Object MakeFaceHW (in double theH, in double theW, in short theOrientation);
1413     /*!
1414      *  \brief Create a face by normale vector or edge and two specified sizes,
1415      *  vertical (H) and horisontal (W).
1416      *  \param theObj defines plane.
1417      *  \param theH vertical size (height).
1418      *  \param theW horisontal size (width).
1419      *  \return New GEOM_Object, containing the created face.
1420      */
1421     GEOM_Object MakeFaceObjHW (in GEOM_Object theObj, in double theH, in double theW);
1422     /*!
1423      *  \brief Create a Disk (circular face) with given center, normal vector and radius.
1424      *  \param thePnt disk center.
1425      *  \param theVec Vector, normal to the plane of the disk.
1426      *  \param theR Disk radius.
1427      *  \return New GEOM_Object, containing the created disk.
1428      */
1429     GEOM_Object MakeDiskPntVecR (in GEOM_Object thePnt,
1430                                  in GEOM_Object theVec,
1431                                  in double theR);
1432     /*!
1433      *  \brief Create a disk (circular face), passing through three given points
1434      *  \param thePnt1, thePnt2, thePnt3 Points, defining the disk.
1435      *  \return New GEOM_Object, containing the created disk.
1436      */
1437     GEOM_Object MakeDiskThreePnt (in GEOM_Object thePnt1,
1438                                   in GEOM_Object thePnt2,
1439                                   in GEOM_Object thePnt3);
1440
1441     /*!
1442      *  \brief Create a disk specified dimensions along OX-OY coordinate axes.
1443      *
1444      *  Center of the disk at point (0, 0, 0).
1445      *  \param theR of the Disk.
1446      *  \param theOrientation Orientation belong axis OXY OYZ OZX
1447      *  \return New GEOM_Object, containing the created disk.
1448      */
1449     GEOM_Object MakeDiskR (in double theR, in short theOrientation);
1450
1451     /*!
1452      *  \brief Create a cylinder with given radius and height at
1453      *  the origin of coordinate system.
1454      *
1455      *  Axis of the cylinder will be collinear to the OZ axis of the coordinate system.
1456      *  \param theR Cylinder radius.
1457      *  \param theH Cylinder height.
1458      *  \return New GEOM_Object, containing the created cylinder.
1459      */
1460     GEOM_Object MakeCylinderRH (in double theR, in double theH);
1461
1462     /*!
1463      *  \brief Create a cylinder with given base point, axis, radius and height.
1464      *  \param thePnt Central point of cylinder base.
1465      *  \param theAxis Cylinder axis.
1466      *  \param theR Cylinder radius.
1467      *  \param theH Cylinder height.
1468      *  \return New GEOM_Object, containing the created cylinder.
1469      */
1470     GEOM_Object MakeCylinderPntVecRH (in GEOM_Object thePnt,
1471                                       in GEOM_Object theAxis,
1472                                       in double      theR,
1473                                       in double      theH);
1474
1475     /*!
1476      *  \brief Create a cone with given height and radiuses at
1477      *  the origin of coordinate system. 
1478      *
1479      *  Axis of the cone will be collinear to the OZ axis of the coordinate system.
1480      *  \param theR1 Radius of the first cone base.
1481      *  \param theR2 Radius of the second cone base.
1482      *    \note If both radiuses are non-zero, the cone will be truncated.
1483      *    \note If the radiuses are equal, a cylinder will be created instead.
1484      *  \param theH Cone height.
1485      *  \return New GEOM_Object, containing the created cone.
1486      */
1487     GEOM_Object MakeConeR1R2H (in double theR1, in double theR2, in double theH);
1488
1489     /*!
1490      *  \brief Create a cone with given base point, axis, height and radiuses.
1491      *  \param thePnt Central point of the first cone base.
1492      *  \param theAxis Cone axis.
1493      *  \param theR1 Radius of the first cone base.
1494      *  \param theR2 Radius of the second cone base.
1495      *    \note If both radiuses are non-zero, the cone will be truncated.
1496      *    \note If the radiuses are equal, a cylinder will be created instead.
1497      *  \param theH Cone height.
1498      *  \return New GEOM_Object, containing the created cone.
1499      */
1500     GEOM_Object MakeConePntVecR1R2H (in GEOM_Object thePnt,
1501                                      in GEOM_Object theAxis,
1502                                      in double      theR1,
1503                                      in double      theR2,
1504                                      in double      theH);
1505
1506     /*!
1507      *  \brief Create a torus with given radiuses at the origin of coordinate system.
1508      *  \param theRMajor Torus major radius.
1509      *  \param theRMinor Torus minor radius.
1510      *  \return New GEOM_Object, containing the created torus.
1511      */
1512     GEOM_Object MakeTorusRR (in double theRMajor,
1513                              in double theRMinor);
1514
1515     /*!
1516      *  \brief Create a torus with given center, normal vector and radiuses.
1517      *  \param thePnt Torus central point.
1518      *  \param theVec Torus axis of symmetry.
1519      *  \param theRMajor Torus major radius.
1520      *  \param theRMinor Torus minor radius.
1521      *  \return New GEOM_Object, containing the created torus.
1522      */
1523     GEOM_Object MakeTorusPntVecRR (in GEOM_Object thePnt,
1524                                    in GEOM_Object theVec,
1525                                    in double theRMajor,
1526                                    in double theRMinor);
1527
1528     /*!
1529      *  \brief Create a sphere with given radius at the origin of coordinate system.
1530      *  \param theR Sphere radius.
1531      *  \return New GEOM_Object, containing the created sphere.
1532      */
1533     GEOM_Object MakeSphereR (in double theR);
1534
1535     /*!
1536      *  \brief Create a sphere with given center and radius.
1537      *  \param thePnt Sphere center.
1538      *  \param theR Sphere radius.
1539      *  \return New GEOM_Object, containing the created .
1540      */
1541     GEOM_Object MakeSpherePntR (in GEOM_Object thePnt, in double theR);
1542
1543     /*!
1544      *  \brief Create a shape by extrusion of the base shape along the vector
1545      *
1546      *  All the space, transfixed by the base shape during its translation
1547      *  along the vector on the given distance.
1548      *  \param theBase Base shape to be extruded.
1549      *  \param theVec Direction of extrusion.
1550      *  \param theH Prism dimension along theVec.
1551      *  \return New GEOM_Object, containing the created prism.
1552      */
1553     GEOM_Object MakePrismVecH (in GEOM_Object theBase,
1554                                in GEOM_Object theVec,
1555                                in double      theH);
1556     /*  \brief The Same Prism but in 2 directions (forward&backward) */
1557     GEOM_Object MakePrismVecH2Ways (in GEOM_Object theBase,
1558                                     in GEOM_Object theVec,
1559                                     in double      theH);
1560     /*  \brief The Same as MakePrismVecH but with scaling */
1561     GEOM_Object MakePrismVecHWithScaling (in GEOM_Object theBase,
1562                                           in GEOM_Object theVec,
1563                                           in double      theH,
1564                                           in double      theScaleFactor);
1565
1566     /*!
1567      *  \brief Create a shape by extrusion of the base shape along a vector, defined by two points.
1568      *  \param theBase Base shape to be extruded.
1569      *  \param thePoint1 First end of extrusion vector.
1570      *  \param thePoint2 Second end of extrusion vector.
1571      *  \return New GEOM_Object, containing the created prism.
1572      */
1573     GEOM_Object MakePrismTwoPnt (in GEOM_Object theBase,
1574                                  in GEOM_Object thePoint1,
1575                                  in GEOM_Object thePoint2);
1576     /*  \brief The same prism but in two directions forward&backward */
1577     GEOM_Object MakePrismTwoPnt2Ways (in GEOM_Object theBase,
1578                                       in GEOM_Object thePoint1,
1579                                       in GEOM_Object thePoint2);
1580     /*  \brief The Same as MakePrismTwoPnt but with scaling */
1581     GEOM_Object MakePrismTwoPntWithScaling (in GEOM_Object theBase,
1582                                             in GEOM_Object thePoint1,
1583                                             in GEOM_Object thePoint2,
1584                                             in double      theScaleFactor);
1585
1586     /*!
1587      *  \brief Create a shape by extrusion of the base shape along a vector, defined by DX DY DZ.
1588      *  \param theBase Base shape to be extruded.
1589      *  \param theDX, theDY, theDZ end of extrusion vector.
1590      *  \return New GEOM_Object, containing the created prism.
1591      */
1592     GEOM_Object MakePrismDXDYDZ (in GEOM_Object theBase,
1593                                    in double theDX, in double theDY, in double theDZ);
1594     /*  \brief The same prism but in two directions forward&backward */
1595     GEOM_Object MakePrismDXDYDZ2Ways (in GEOM_Object theBase,
1596                                       in double theDX, in double theDY, in double theDZ);
1597     /*  \brief The Same as MakePrismDXDYDZ but with scaling */
1598     GEOM_Object MakePrismDXDYDZWithScaling (in GEOM_Object theBase,
1599                                             in double theDX, in double theDY, in double theDZ,
1600                                             in double theScaleFactor);
1601
1602
1603     /*!
1604      *  \brief Add / Remove material to / from  a solid by extrusion of the base shape on the given distance.
1605      *  \param theInitShape Initial shape on which to perform the feature.It has to be a solid or 
1606      *   a compound made of a single solid
1607      *  \param theBase Edge or wire defining the base shape to be extruded. 
1608      *  \param theHeight Prism dimension along the normal of the face.
1609      *  \param theAngle Draft angel in degrees
1610      *  \param theFuse If true material is added else material is removed
1611      *  \return New GEOM_Object, containing the modified shape
1612      */
1613     GEOM_Object MakeDraftPrism (in GEOM_Object theInitShape,
1614                                 in GEOM_Object theBase,
1615                                 in double theHeight, 
1616                                 in double theAngle,
1617                                 in boolean theFuse);
1618
1619     /*!
1620      *  \brief Create a shape by extrusion of the base shape along
1621      *  the path shape. The path shape can be a wire or an edge.
1622      *  \param theBase Base shape to be extruded.
1623      *  \param thePath Path shape to extrude the base shape along it.
1624      *  \return New GEOM_Object, containing the created pipe.
1625      */
1626     GEOM_Object MakePipe (in GEOM_Object theBase, in GEOM_Object thePath);
1627
1628     /*!
1629      *  \brief Create a shape by revolution of the base shape around the axis
1630      *  on the given angle. 
1631      *
1632      *  All the space, transfixed by the base
1633      *  shape during its rotation around the axis on the given angle.
1634      *  \param theBase Base shape to be rotated.
1635      *  \param theAxis Rotation axis.
1636      *  \param theAngle Rotation angle in radians.
1637      *  \return New GEOM_Object, containing the created revolution.
1638      */
1639     GEOM_Object MakeRevolutionAxisAngle (in GEOM_Object theBase,
1640                                          in GEOM_Object theAxis,
1641                                          in double theAngle);
1642     /*  The Same Revolution but in both ways forward&backward */
1643     GEOM_Object MakeRevolutionAxisAngle2Ways (in GEOM_Object theBase,
1644                                               in GEOM_Object theAxis,
1645                                               in double theAngle);
1646
1647     /*!
1648      *  \brief Create a filling from the given compound of contours.
1649      *  \param theShape Initial shape on which to perform the feature.
1650      *  \param theMinDeg a minimal degree of BSpline surface to create
1651      *  \param theMaxDeg a maximal degree of BSpline surface to create
1652      *  \param theTol2D a 2d tolerance to be reached
1653      *  \param theTol3D a 3d tolerance to be reached
1654      *  \param theNbIter a number of iteration of approximation algorithm
1655      *  \param theMethod Kind of method to perform filling operation.
1656      *  \param theApprox Boolean indicating if result should be approximated
1657      *  \return New GEOM_Object, containing the created filling surface.
1658      */
1659     GEOM_Object MakeFilling (in GEOM_Object theShape,
1660                              in long theMinDeg, in long theMaxDeg,
1661                              in double theTol2D, in double theTol3D,
1662                              in long theNbIter,
1663                              in filling_oper_method theMethod,
1664                              in boolean theApprox);
1665
1666     /*!
1667      *  \brief Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
1668      *  \param theSeqSections - set of specified sections.
1669      *  \param theModeSolid - mode defining building solid or shell
1670      *  \param thePreci - precision 3D used for smoothing by default 1.e-6
1671      *  \param theRuled - mode defining type of the result surfaces (ruled or smoothed).
1672      *  \return New GEOM_Object, containing the created shell or solid.
1673      */
1674     GEOM_Object MakeThruSections(in ListOfGO theSeqSections,
1675                                  in boolean theModeSolid,
1676                                  in double thePreci,
1677                                  in boolean theRuled);
1678
1679      /*!
1680      *  \brief Create a shape by extrusion of the profile shape along
1681      *  the path shape. 
1682      *
1683      *  The path shape can be a wire or an edge.
1684      *  the several profiles can be specified in the several locations of path.
1685      *  \param theSeqBases - list of  Bases shape to be extruded.
1686      *  \param theLocations - list of locations on the path corresponding
1687      *                        specified list of the Bases shapes. Number of locations
1688      *                        should be equal to number of bases or list of locations can be empty.
1689      *  \param thePath - Path shape to extrude the base shape along it.
1690      *  \param theWithContact - the mode defining that the section is translated to be in
1691      *                          contact with the spine.
1692      *  \param theWithCorrection - defining that the section is rotated to be
1693      *                                 orthogonal to the spine tangent in the correspondent point
1694      *  \return New GEOM_Object, containing the created pipe.
1695      */
1696     GEOM_Object MakePipeWithDifferentSections (in ListOfGO theSeqBases,
1697                                                in ListOfGO theLocations,
1698                                                in GEOM_Object thePath,
1699                                                in boolean theWithContact ,
1700                                                in boolean theWithCorrection );
1701
1702     /*!
1703      *  \brief Create a shape by extrusion of the profile shape along
1704      *  the path shape. 
1705      *
1706      *  The path shape can be a shell or a face.
1707      *  the several profiles can be specified in the several locations of path.
1708      *  \param theSeqBases - list of  Bases shape to be extruded.
1709      *  \param theSeqSubBases - list of corresponding sub-shapes of section shapes.
1710      *  \param theLocations - list of locations on the path corresponding
1711      *                        specified list of the Bases shapes. Number of locations
1712      *                        should be equal to number of bases.
1713      *  \param thePath - Path shape to extrude the base shape along it.
1714      *  \param theWithContact - the mode defining that the section is translated to be in
1715      *                          contact with the spine.
1716      *  \param theWithCorrection - defining that the section is rotated to be
1717      *                                 orthogonal to the spine tangent in the correspondent point
1718      *  \return New GEOM_Object, containing the created pipe.
1719      */
1720     GEOM_Object MakePipeWithShellSections (in ListOfGO theSeqBases,
1721                                            in ListOfGO theSeqSubBases,
1722                                            in ListOfGO theLocations,
1723                                            in GEOM_Object thePath,
1724                                            in boolean theWithContact ,
1725                                            in boolean theWithCorrection );
1726
1727     /*!
1728      *  \brief Create solids between given sections
1729      *  \param theSeqBases - list of sections (shell or face).
1730      *  \param theLocations - list of corresponding vertexes
1731      *  \return New GEOM_Object, containing the created solids.
1732      */
1733     GEOM_Object MakePipeShellsWithoutPath (in ListOfGO theSeqBases,
1734                                            in ListOfGO theLocations);
1735
1736     /*!
1737      *  \brief Create a shape by extrusion of the base shape along
1738      *  the path shape with constant bi-normal direction along the given vector.
1739      *
1740      *  The path shape can be a wire or an edge.
1741      *  \param theBase Base shape to be extruded.
1742      *  \param thePath Path shape to extrude the base shape along it.
1743      *  \param theVec Vector defines a constant binormal direction to keep the
1744      *                same angle beetween the Direction and the sections
1745      *                along the sweep surface.
1746      *  \return New GEOM_Object, containing the created pipe.
1747      */
1748     GEOM_Object MakePipeBiNormalAlongVector (in GEOM_Object theBase,
1749                                              in GEOM_Object thePath,
1750                                              in GEOM_Object theVec);
1751
1752
1753      /*!
1754      *  \brief Make a thick solid from a surface shape (face or shell)
1755      *  \param theObject Surface from which the thick solid is made
1756      *  \param theThickness Value of the thickness
1757      *  \param isCopy To make a copy of \a theObject ot to modify \a theObject.
1758      *  \return New GEOM_Object, containing the created pipe if isCopy = true
1759      *          or the modified object if isCopy = false
1760      */
1761     GEOM_Object MakeThickening (in GEOM_Object theObject,
1762                                 in double theThickness,
1763                                 in boolean isCopy);
1764
1765     
1766     /*!
1767      *  \brief Build a middle path of a pipe-like shape.
1768      *
1769      *  The path shape can be a wire or an edge.
1770      *  \param theShape It can be closed or unclosed pipe-like shell
1771      *                  or a pipe-like solid.
1772      *  \param theBase1, theBase2 Two bases of the supposed pipe. This
1773      *                            should be wires or faces of \a theShape.
1774      *  \note It is not assumed that exact or approximate copy of \a theShape
1775      *        can be obtained by applying existing Pipe operation on the
1776      *        resulting "Path" wire taking \a theBase1 as the base - it is not
1777      *        always possible; though in some particular cases it might work
1778      *        it is not guaranteed. Thus, RestorePath function should not be
1779      *        considered as an exact reverse operation of the Pipe.
1780      *  \return New GEOM_Object, containing an edge or wire that represent
1781      *                           source pipe's "path".
1782      */
1783     GEOM_Object RestorePath (in GEOM_Object theShape,
1784                              in GEOM_Object theBase1,
1785                              in GEOM_Object theBase2);
1786
1787     /*!
1788      *  \brief Build a middle path of a pipe-like shape.
1789      *
1790      *  The path shape can be a wire or an edge.
1791      *  \param theShape It can be closed or unclosed pipe-like shell
1792      *                  or a pipe-like solid.
1793      *  \param theBase1, theBase2 Two bases of the supposed pipe. This
1794      *                            should be lists of edges of \a theShape.
1795      *  \note It is not assumed that exact or approximate copy of \a theShape
1796      *        can be obtained by applying existing Pipe operation on the
1797      *        resulting "Path" wire taking \a theBase1 as the base - it is not
1798      *        always possible; though in some particular cases it might work
1799      *        it is not guaranteed. Thus, RestorePath function should not be
1800      *        considered as an exact reverse operation of the Pipe.
1801      *  \return New GEOM_Object, containing an edge or wire that represent
1802      *                           source pipe's "path".
1803      */
1804     GEOM_Object RestorePathEdges (in GEOM_Object theShape,
1805                                   in ListOfGO theBase1,
1806                                   in ListOfGO theBase2);
1807   };
1808
1809   /*!
1810    *  \brief Interface for Shapes creation:
1811    *
1812    *  Edge from two points, Wire from edges, Face from wire,
1813    *  Shell from faces, Solid from shells, Compound from shapes
1814    */
1815   interface GEOM_IShapesOperations : GEOM_IOperations
1816   {
1817     /*!
1818      *  \brief Create a linear edge with specified ends.
1819      *  \param thePnt1 Point for the first end of edge.
1820      *  \param thePnt2 Point for the second end of edge.
1821      *  \return New GEOM_Object, containing the created edge.
1822      */
1823     GEOM_Object MakeEdge (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
1824
1825     /*!
1826      *  \brief Create an edge on another edge, corresponding to the given length on the given edge.
1827      *  \param theRefCurve The referenced edge.
1828      *  \param theLength Length on the referenced edge. It can be
1829      *                   negative for extrapolation on base curve.
1830      *  \param theStartPoint Any vertex close to one of edge's
1831      *                       ends to select start point among them.
1832      *                       If NULL, fist vertex is used.
1833      *  \return New GEOM_Object, containing the created edge.
1834      */
1835     GEOM_Object MakeEdgeOnCurveByLength (in GEOM_Object theRefCurve,
1836                                          in double      theLength,
1837                                          in GEOM_Object theStartPoint);
1838
1839     /*!
1840      *  \brief Create an edge from specified wire.
1841      *  \param theWire source Wire.
1842      *  \param theLinearTolerance linear tolerance value
1843      *  \param theAngularTolerance angular tolerance value
1844      *  \return New GEOM_Object, containing the created edge.
1845      */
1846     GEOM_Object MakeEdgeWire (in GEOM_Object theWire,
1847                               in double theLinearTolerance,
1848                               in double theAngularTolerance);
1849
1850     /*!
1851      *  \brief Create a wire from the set of edges and wires.
1852      *  \param theEdgesAndWires List of edge and/or wires.
1853      *  \param theTolerance Maximum distance between vertices, that will be merged.
1854      *                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
1855      *  \return New GEOM_Object, containing the created wire.
1856      */
1857     GEOM_Object MakeWire (in ListOfGO theEdgesAndWires,
1858                           in double   theTolerance);
1859
1860     /*!
1861      *  \brief Create a face on the given wire.
1862      *  \param theWire closed Wire or Edge to build the face on.
1863      *  \param isPlanarWanted If TRUE, only planar face will be built.
1864      *                        If impossible, NULL object will be returned.
1865      *  \return New GEOM_Object, containing the created face.
1866      */
1867     GEOM_Object MakeFace (in GEOM_Object theWire, in boolean isPlanarWanted);
1868
1869     /*!
1870      *  \brief Create a face on the given wires set.
1871      *  \param theWires List of closed wires or edges to build the face on.
1872      *  \param isPlanarWanted If TRUE, only planar face will be built.
1873      *                        If impossible, NULL object will be returned.
1874      *  \return New GEOM_Object, containing the created face.
1875      */
1876     GEOM_Object MakeFaceWires (in ListOfGO theWires, in boolean isPlanarWanted);
1877
1878     /*!
1879      *  \brief Create a shell from the set of faces and shells.
1880      *  \param theFacesAndShells List of faces and/or shells.
1881      *  \return New GEOM_Object, containing the created shell.
1882      */
1883     GEOM_Object MakeShell (in ListOfGO theFacesAndShells);
1884
1885     /*!
1886      *  \brief Create a solid, bounded by the given shell.
1887      *  \param theShell Bounding shell.
1888      *  \return New GEOM_Object, containing the created solid.
1889      */
1890     GEOM_Object MakeSolidShell (in GEOM_Object theShell);
1891
1892     /*!
1893      *  \brief Create a solid, bounded by the given shells.
1894      *  \param theShells Bounding shells.
1895      *  \return New GEOM_Object, containing the created solid.
1896      */
1897     GEOM_Object MakeSolidShells (in ListOfGO theShells);
1898
1899     /*!
1900      *  \brief Create a compound of the given shapes.
1901      *  \param theShapes List of shapes to put in compound.
1902      *  \return New GEOM_Object, containing the created compound.
1903      */
1904     GEOM_Object MakeCompound (in ListOfGO theShapes);
1905
1906     /*!
1907      *  \brief Replace coincident faces in theShape by one face.
1908      *  \param theShape Initial shape.
1909      *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
1910      *  \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
1911      *  \return New GEOM_Object, containing a copy of theShape without coincident faces.
1912      */
1913     GEOM_Object MakeGlueFaces (in GEOM_Object theShape, in double theTolerance, in boolean doKeepNonSolids);
1914
1915     /*!
1916      *  Find coincident faces in theShape for possible gluing.
1917      *  \param theShape Initial shape.
1918      *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
1919      *  \return ListOfGO
1920      */
1921     ListOfGO GetGlueFaces (in GEOM_Object theShape, in double theTolerance);
1922
1923     /*!
1924      *  \brief Replace coincident faces in theShape by one face
1925      *  in compliance with given list of faces
1926      *  \param theShape Initial shape.
1927      *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
1928      *  \param theFaces List of faces for gluing.
1929      *  \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
1930      *  \param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
1931      *                        will be glued, otherwise only the edges,
1932      *                        belonging to <VAR>theFaces</VAR>.
1933      *  \return New GEOM_Object, containing a copy of theShape without some faces.
1934      */
1935     GEOM_Object MakeGlueFacesByList (in GEOM_Object theShape, in double theTolerance,
1936                                      in ListOfGO theFaces, in boolean doKeepNonSolids,
1937                                      in boolean doGlueAllEdges);
1938
1939     /*!
1940      *  \brief Replace coincident edges in theShape by one edge.
1941      *  \param theShape Initial shape.
1942      *  \param theTolerance Maximum distance between edges, which can be considered as coincident.
1943      *  \return New GEOM_Object, containing a copy of theShape without coincident edges.
1944      */
1945     GEOM_Object MakeGlueEdges (in GEOM_Object theShape, in double theTolerance);
1946
1947     /*!
1948      *  Find coincident edges in theShape for possible gluing.
1949      *  \param theShape Initial shape.
1950      *  \param theTolerance Maximum distance between edges, which can be considered as coincident.
1951      *  \return ListOfGO
1952      */
1953     ListOfGO GetGlueEdges (in GEOM_Object theShape, in double theTolerance);
1954
1955     /*!
1956      *  \brief Replace coincident edges in theShape by one edge
1957      *  in compliance with given list of edges
1958      *  \param theShape Initial shape.
1959      *  \param theTolerance Maximum distance between edges, which can be considered as coincident.
1960      *  \param theEdges List of edges for gluing.
1961      *  \return New GEOM_Object, containing a copy of theShape without some edges.
1962      */
1963     GEOM_Object MakeGlueEdgesByList (in GEOM_Object theShape,
1964                                      in double theTolerance,
1965                                      in ListOfGO theEdges);
1966
1967     /*!
1968      *  \brief Get all sub-shapes and groups of \a theShape,
1969      *  that were created already by any other methods.
1970      *  \param theShape Any shape.
1971      *  \param theGroupsOnly If this parameter is TRUE, only groups will be
1972      *                       returned, else all found sub-shapes and groups.
1973      *  \return List of existing sub-objects of \a theShape.
1974      */
1975     ListOfGO GetExistingSubObjects (in GEOM_Object theShape,
1976                                     in boolean     theGroupsOnly);
1977
1978     /*!
1979      *  \brief Deprecated method. 
1980      *
1981      *  Use MakeAllSubShapes() instead.
1982      */
1983     ListOfGO MakeExplode (in GEOM_Object theShape,
1984                           in long        theShapeType,
1985                           in boolean     isSorted);
1986
1987     /*!
1988      *  \brief Explode a shape on sub-shapes of a given type. 
1989      *
1990      *  If the shape itself has the given type, it is also returned.
1991      *  \param theShape Shape to be exploded.
1992      *  \param theShapeType Type of sub-shapes to be retrieved.
1993      *  \param isSorted If this parameter is TRUE, sub-shapes will be
1994      *                  sorted by coordinates of their gravity centers.
1995      *  \return List of sub-shapes of type theShapeType, contained in theShape.
1996      */
1997     ListOfGO MakeAllSubShapes (in GEOM_Object theShape,
1998                                in long        theShapeType,
1999                                in boolean     isSorted);
2000
2001     /*!
2002      *  \brief Extract all sub-shapes of the given type from
2003      *  the given shape, excluding the shape itself.
2004      *  \param theShape Shape to be exploded.
2005      *  \param theShapeType Type of sub-shapes to be retrieved.
2006      *  \param isSorted If this parameter is TRUE, sub-shapes will be
2007      *                  sorted by coordinates of their gravity centers.
2008      *  \return List of sub-shapes of type theShapeType, contained in theShape.
2009      */
2010     ListOfGO ExtractSubShapes (in GEOM_Object theShape,
2011                                in long        theShapeType,
2012                                in boolean     isSorted);
2013
2014     /*!
2015      *  \brief Deprecated method. Use GetAllSubShapesIDs() instead.
2016      */
2017     ListOfLong SubShapeAllIDs (in GEOM_Object theShape,
2018                                in long        theShapeType,
2019                                in boolean     isSorted);
2020
2021     /*!
2022      *  \brief Explode a shape on sub-shapes of a given type.
2023      *
2024      *  Does the same, as MakeAllSubShapes, but returns IDs of
2025      *  sub-shapes, not GEOM_Object. It works faster.
2026      *  \param theShape Shape to be exploded.
2027      *  \param theShapeType Type of sub-shapes to be retrieved.
2028      *  \param isSorted If this parameter is TRUE, sub-shapes will be
2029      *                  sorted by coordinates of their gravity centers.
2030      *  \return List of IDs of sub-shapes of type theShapeType, contained in theShape.
2031      */
2032     ListOfLong GetAllSubShapesIDs (in GEOM_Object theShape,
2033                                    in long        theShapeType,
2034                                    in boolean     isSorted);
2035
2036     /*!
2037      *  \brief Get a sub-shape defined by its unique ID inside \a theMainShape
2038      *  \param theMainShape Main shape.
2039      *  \param theID Unique ID of sub-shape inside \a theMainShape.
2040      *  \return GEOM_Object, corresponding to found sub-shape.
2041      *  \note The sub-shape GEOM_Object can has ONLY ONE function.
2042      *        Don't try to apply modification operations (without copy) on them.
2043      */
2044     GEOM_Object GetSubShape (in GEOM_Object theMainShape,
2045                              in long        theID);
2046
2047     /*!
2048      *  \brief Get a set of sub-shapes defined by their unique IDs inside \a theMainShape
2049      *  \param theMainShape Main shape.
2050      *  \param theIndices List of unique IDs of sub-shapes inside \a theMainShape.
2051      *  \return List of GEOM_Object, corresponding to found sub-shapes.
2052      *  \note The sub-shape GEOM_Object can has ONLY ONE function.
2053      *        Don't try to apply modification operations (without copy) on them.
2054      */
2055     ListOfGO MakeSubShapes (in GEOM_Object theMainShape,
2056                             in ListOfLong  theIndices);
2057
2058     /*!
2059      *  Get global index of \a theSubShape in \a theMainShape.
2060      *  \param theMainShape Main shape.
2061      *  \param theSubShape Sub-shape of the main shape.
2062      *  \return global index of \a theSubShape in \a theMainShape.
2063      */
2064     long GetSubShapeIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
2065
2066     /*!
2067      *  Get global indices of \a theSubShapes in \a theMainShape.
2068      *  \param theMainShape Main shape.
2069      *  \param theSubShapes List of sub-shapes of the main shape.
2070      *  \return list of global indices of \a theSubShapes in \a theMainShape.
2071      */
2072     ListOfLong GetSubShapesIndices (in GEOM_Object theMainShape, in ListOfGO theSubShapes);
2073
2074     /*!
2075      *  \brief Get index of \a theSubShape in \a theMainShape, unique among sub-shapes of the same type.
2076      *
2077      *  Together with method <VAR>GetShapeTypeString()</VAR> it can be used
2078      *  to generate automatic names for sub-shapes, when publishing them in a study.
2079      *  \param theMainShape Main shape.
2080      *  \param theSubShape Sub-shape of the main shape.
2081      *  \return index of \a theSubShape in a list of all sub-shapes of \a theMainShape of the same type.
2082      */
2083     long GetTopologyIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
2084
2085     /*!
2086      *  \brief Get name of type of \a theShape.
2087      *
2088      *  Use wide type notation, taking into consideration both topology and geometry of the shape.
2089      *  Together with method <VAR>GetTopologyIndex()</VAR> it can be used
2090      *  to generate automatic names for sub-shapes, when publishing them in a study.
2091      *  \param theShape The shape to get a type of.
2092      *  \return String, containing a type name of \a theShape.
2093      */
2094     string GetShapeTypeString (in GEOM_Object theShape);
2095
2096     /*!
2097      *  \brief Count number of faces in the given shape.
2098      *  \param theShape Shape to count faces in.
2099      *  \return Number of faces in the given shape.
2100      */
2101     long NumberOfFaces (in GEOM_Object theShape);
2102
2103     /*!
2104      *  \brief Count number of edges in the given shape.
2105      *  \param theShape Shape to count edges in.
2106      *  \return Number of edges in theShape.
2107      */
2108     long NumberOfEdges (in GEOM_Object theShape);
2109
2110     /*!
2111      *  \brief Count number of sub-shapes of type \a theShapeType in the given shape.
2112      *  \param theShape Shape to count sub-shapes in.
2113      *  \param theShapeType The type of sub-shapes to count.
2114      *  \return Number of sub-shapes of type \a theShapeType in \a theShape.
2115      */
2116     long NumberOfSubShapes (in GEOM_Object theShape,
2117                             in long        theShapeType);
2118
2119     /*!
2120      *  Reverses an orientation the given shape.
2121      *  \param theShape Shape to be reversed.
2122      *  \return The reversed copy of theShape.
2123      */
2124     GEOM_Object ChangeOrientation (in GEOM_Object theShape);
2125
2126     /*!
2127      *  \brief Retrieve all free faces from the given shape.
2128      *
2129      *  Free face is a face, which is not shared between two shells of the shape.
2130      *  \param theShape Shape to find free faces in.
2131      *  \return List of IDs of all free faces, contained in theShape.
2132      */
2133     ListOfLong GetFreeFacesIDs (in GEOM_Object theShape);
2134
2135     /*!
2136      *  \brief Get all sub-shapes of theShape1 of the given type, shared with theShape2.
2137      *  \param theShape1 Shape to find sub-shapes in.
2138      *  \param theShape2 Shape to find shared sub-shapes with.
2139      *  \param theShapeType Type of sub-shapes to be retrieved.
2140      *  \return List of sub-shapes of theShape1, shared with theShape2.
2141      */
2142     ListOfGO GetSharedShapes (in GEOM_Object theShape1,
2143                               in GEOM_Object theShape2,
2144                               in long        theShapeType);
2145
2146     /*!
2147      *  \brief Get all sub-shapes, shared by all shapes in the list \a theShapes.
2148      *  \param theShapes Shapes to find common sub-shapes of.
2149      *  \param theShapeType Type of sub-shapes to be retrieved.
2150      *  \return List of objects, that are sub-shapes of all given shapes.
2151      */
2152     ListOfGO GetSharedShapesMulti (in ListOfGO theShapes,
2153                                    in long     theShapeType);
2154
2155     /*!
2156      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2157      *  the specified plane by the certain way, defined through \a theState parameter.
2158      *  \param theShape Shape to find sub-shapes of.
2159      *  \param theShapeType Type of sub-shapes to be retrieved.
2160      *  \param theAx1 Vector (or line, or linear edge), specifying normal
2161      *                direction and location of the plane to find shapes on.
2162      *  \param theState The state of the sub-shapes to find.
2163      *  \return List of all found sub-shapes.
2164      */
2165     ListOfGO GetShapesOnPlane (in GEOM_Object theShape,
2166                                in long        theShapeType,
2167                                in GEOM_Object theAx1,
2168                                in shape_state theState);
2169     /*!
2170      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2171      *  the specified plane by the certain way, defined through \a theState parameter.
2172      *  \param theShape Shape to find sub-shapes of.
2173      *  \param theShapeType Type of sub-shapes to be retrieved.
2174      *  \param theAx1 Vector (or line, or linear edge), specifying normal
2175      *                direction of the plane to find shapes on.
2176      *  \param thePnt Point specifying location of the plane to find shapes on.
2177      *  \param theState The state of the sub-shapes to find.
2178      *  \return List of all found sub-shapes.
2179      */
2180     ListOfGO GetShapesOnPlaneWithLocation (in GEOM_Object theShape,
2181                                            in long        theShapeType,
2182                                            in GEOM_Object theAx1,
2183                                            in GEOM_Object thePnt,
2184                                            in shape_state theState);
2185
2186
2187
2188     /*!
2189      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2190      *  the specified cylinder by the certain way, defined through \a theState parameter.
2191      *  \param theShape Shape to find sub-shapes of.
2192      *  \param theShapeType Type of sub-shapes to be retrieved.
2193      *  \param theAxis Vector (or line, or linear edge), specifying
2194      *                 axis of the cylinder to find shapes on.
2195      *  \param theRadius Radius of the cylinder to find shapes on.
2196      *  \param theState The state of the sub-shapes to find.
2197      *  \return List of all found sub-shapes.
2198      */
2199     ListOfGO GetShapesOnCylinder (in GEOM_Object theShape,
2200                                   in long        theShapeType,
2201                                   in GEOM_Object theAxis,
2202                                   in double      theRadius,
2203                                   in shape_state theState);
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 thePnt Point specifying location of the bottom of the cylinder.
2213      *  \param theRadius Radius of the cylinder to find shapes on.
2214      *  \param theState The state of the sub-shapes to find.
2215      *  \return List of all found sub-shapes.
2216      */
2217     ListOfGO GetShapesOnCylinderWithLocation (in GEOM_Object theShape,
2218                                               in long        theShapeType,
2219                                               in GEOM_Object theAxis,
2220                                               in GEOM_Object thePnt,
2221                                               in double      theRadius,
2222                                               in shape_state theState);
2223
2224     /*!
2225      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2226      *  the specified sphere by the certain way, defined through \a theState parameter.
2227      *  \param theShape Shape to find sub-shapes of.
2228      *  \param theShapeType Type of sub-shapes to be retrieved.
2229      *  \param theCenter Point, specifying center of the sphere to find shapes on.
2230      *  \param theRadius Radius of the sphere 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 GetShapesOnSphere (in GEOM_Object theShape,
2235                                 in long        theShapeType,
2236                                 in GEOM_Object theCenter,
2237                                 in double      theRadius,
2238                                 in shape_state theState);
2239
2240     /*!
2241      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2242      *  the specified quadrangle by the certain way, defined through \a theState parameter.
2243      *  \param theShape Shape to find sub-shapes of.
2244      *  \param theShapeType Type of sub-shapes to be retrieved.
2245      *  \param theTopLeftPoint Top left quadrangle corner
2246      *  \param theTopRigthPoint Top right quadrangle corner
2247      *  \param theBottomLeftPoint Bottom left quadrangle corner
2248      *  \param theBottomRigthPoint Bottom right quadrangle corner
2249      *  \param theState The state of the sub-shapes to find.
2250      *  \return List of all found sub-shapes.
2251      */
2252     ListOfGO GetShapesOnQuadrangle (in GEOM_Object theShape,
2253                                     in long        theShapeType,
2254                                     in GEOM_Object theTopLeftPoint,
2255                                     in GEOM_Object theTopRigthPoint,
2256                                     in GEOM_Object theBottomLeftPoint,
2257                                     in GEOM_Object theBottomRigthPoint,
2258                                     in shape_state theState);
2259
2260     /*!
2261      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2262      *  the specified plane by the certain way, defined through \a theState parameter.
2263      *  \param theShape Shape to find sub-shapes of.
2264      *  \param theShapeType Type of sub-shapes to be retrieved.
2265      *  \param theAx1 Vector (or line, or linear edge), specifying normal
2266      *                direction and location of the plane to find shapes on.
2267      *  \param theState The state of the sub-shapes to find.
2268      *  \return List of IDs of all found sub-shapes.
2269      */
2270     ListOfLong GetShapesOnPlaneIDs (in GEOM_Object theShape,
2271                                     in long        theShapeType,
2272                                     in GEOM_Object theAx1,
2273                                     in shape_state theState);
2274
2275     /*!
2276      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2277      *  the specified plane by the certain way, defined through \a theState parameter.
2278      *  \param theShape Shape to find sub-shapes of.
2279      *  \param theShapeType Type of sub-shapes to be retrieved.
2280      *  \param theAx1 Vector (or line, or linear edge), specifying normal
2281      *                direction of the plane to find shapes on.
2282      *  \param thePnt Point specifying location of the plane to find shapes on.
2283      *  \param theState The state of the sub-shapes to find.
2284      *  \return List of IDs of all found sub-shapes.
2285      */
2286     ListOfLong GetShapesOnPlaneWithLocationIDs (in GEOM_Object theShape,
2287                                                 in long        theShapeType,
2288                                                 in GEOM_Object theAx1,
2289                                                 in GEOM_Object thePnt,
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 cylinder 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 theAxis Vector (or line, or linear edge), specifying
2298      *                 axis of the cylinder to find shapes on.
2299      *  \param theRadius Radius of the cylinder 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 GetShapesOnCylinderIDs (in GEOM_Object theShape,
2304                                        in long        theShapeType,
2305                                        in GEOM_Object theAxis,
2306                                        in double      theRadius,
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 thePnt Point specifying location of the bottom of the cylinder.
2317      *  \param theRadius Radius of the cylinder to find shapes on.
2318      *  \param theState The state of the sub-shapes to find.
2319      *  \return List of IDs all found sub-shapes.
2320      */
2321     ListOfLong GetShapesOnCylinderWithLocationIDs (in GEOM_Object theShape,
2322                                                    in long        theShapeType,
2323                                                    in GEOM_Object theAxis,
2324                                                    in GEOM_Object thePnt,
2325                                                    in double      theRadius,
2326                                                    in shape_state theState);
2327
2328     /*!
2329      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2330      *  the specified sphere by the certain way, defined through \a theState parameter.
2331      *  \param theShape Shape to find sub-shapes of.
2332      *  \param theShapeType Type of sub-shapes to be retrieved.
2333      *  \param theCenter Point, specifying center of the sphere to find shapes on.
2334      *  \param theRadius Radius of the sphere to find shapes on.
2335      *  \param theState The state of the sub-shapes to find.
2336      *  \return List of IDs of all found sub-shapes.
2337      */
2338     ListOfLong GetShapesOnSphereIDs (in GEOM_Object theShape,
2339                                      in long        theShapeType,
2340                                      in GEOM_Object theCenter,
2341                                      in double      theRadius,
2342                                      in shape_state theState);
2343
2344     /*!
2345      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2346      *  the specified quadrangle by the certain way, defined through \a theState parameter.
2347      *  \param theShape Shape to find sub-shapes of.
2348      *  \param theShapeType Type of sub-shapes to be retrieved.
2349      *  \param theTopLeftPoint Top left quadrangle corner
2350      *  \param theTopRigthPoint Top right quadrangle corner
2351      *  \param theBottomLeftPoint Bottom left quadrangle corner
2352      *  \param theBottomRigthPoint Bottom right quadrangle corner
2353      *  \param theState The state of the sub-shapes to find.
2354      *  \return List of IDs of all found sub-shapes.
2355      */
2356     ListOfLong GetShapesOnQuadrangleIDs (in GEOM_Object theShape,
2357                                          in long        theShapeType,
2358                                          in GEOM_Object theTopLeftPoint,
2359                                          in GEOM_Object theTopRigthPoint,
2360                                          in GEOM_Object theBottomLeftPoint,
2361                                          in GEOM_Object theBottomRigthPoint,
2362                                          in shape_state theState);
2363
2364     /*!
2365      * \brief Find sub-shapes complying with given status
2366      * \param theBox - the box to check state of sub-shapes against
2367      * \param theShape - the shape to explore
2368      * \param theShapeType - type of sub-shape of theShape
2369      * \param theState - required state
2370      * \return List of IDs of all found sub-shapes.
2371      */
2372     ListOfLong GetShapesOnBoxIDs (in GEOM_Object theBox,
2373                                   in GEOM_Object theShape,
2374                                   in long        theShapeType,
2375                                   in shape_state theState);
2376
2377     /*!
2378      * \brief Find sub-shapes complying with given status
2379      * \param theBox - the box to check state of sub-shapes against
2380      * \param theShape - the shape to explore
2381      * \param theShapeType - type of sub-shape of theShape
2382      * \param theState - required state
2383      * \return List of all found sub-shapes.
2384      */
2385     ListOfGO GetShapesOnBox (in GEOM_Object theBox,
2386                              in GEOM_Object theShape,
2387                              in long        theShapeType,
2388                              in shape_state theState);
2389
2390     /*!
2391      * \brief Find sub-shapes complying with given status
2392      * \param theCheckShape - the shape to check state of sub-shapes against. It must be a solid.
2393      * \param theShape - the shape to explore
2394      * \param theShapeType - type of sub-shape of theShape
2395      * \param theState - required state
2396      * \return List of IDs of all found sub-shapes.
2397      */
2398     ListOfLong GetShapesOnShapeIDs (in GEOM_Object theCheckShape,
2399                                     in GEOM_Object theShape,
2400                                     in short       theShapeType,
2401                                     in shape_state theState);
2402
2403     /*!
2404      * \brief Find sub-shapes complying with given status
2405      * \param theCheckShape - the shape to check state of sub-shapes against. It must be a solid.
2406      * \param theShape - the shape to explore
2407      * \param theShapeType - type of sub-shape of theShape
2408      * \param theState - required state
2409      * \return List of all found sub-shapes.
2410      */
2411     ListOfGO GetShapesOnShape (in GEOM_Object theCheckShape,
2412                                in GEOM_Object theShape,
2413                                in short       theShapeType,
2414                                in shape_state theState);
2415
2416     /*!
2417      * \brief Find sub-shapes complying with given status
2418      * \param theCheckShape - the shape to check state of sub-shapes against. It must be a solid.
2419      * \param theShape - the shape to explore
2420      * \param theShapeType - type of sub-shape of theShape
2421      * \param theState - required state
2422      * \return compound includes all found sub-shapes.
2423      */
2424     GEOM_Object GetShapesOnShapeAsCompound (in GEOM_Object theCheckShape,
2425                                             in GEOM_Object theShape,
2426                                             in short       theShapeType,
2427                                             in shape_state theState);
2428
2429     /*!
2430      *  \brief Get sub-shape(s) of \a theShapeWhere, which are
2431      *  coincident with \a theShapeWhat or could be a part of it.
2432      *  \param theShapeWhere Shape to find sub-shapes of.
2433      *  \param theShapeWhat Shape, specifying what to find.
2434      *  \return Group of all found sub-shapes or a single found sub-shape.
2435      */
2436     GEOM_Object GetInPlace (in GEOM_Object theShapeWhere,
2437                             in GEOM_Object theShapeWhat);
2438
2439     /*!
2440      *  Old implementation of GetInPlace functionality, based on shape properties.
2441      */
2442     GEOM_Object GetInPlaceOld (in GEOM_Object theShapeWhere,
2443                                in GEOM_Object theShapeWhat);
2444
2445     /*!
2446      *  \brief Get sub-shape(s) of \a theShapeWhere, which are
2447      *  coincident with \a theShapeWhat or could be a part of it.
2448      *
2449      *  Implementation of this method is based on a saved history of an operation,
2450      *  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
2451      *  arguments (an argument shape or a sub-shape of an argument shape).
2452      *  The operation could be the Partition or one of boolean operations,
2453      *  performed on simple shapes (not on compounds).
2454      *
2455      *  \param theShapeWhere Shape to find sub-shapes of.
2456      *  \param theShapeWhat Shape, specifying what to find.
2457      *  \return Group of all found sub-shapes or a single found sub-shape.
2458      */
2459     GEOM_Object GetInPlaceByHistory (in GEOM_Object theShapeWhere,
2460                                      in GEOM_Object theShapeWhat);
2461
2462     /*!
2463      *  \brief Get sub-shape of theShapeWhere, which are
2464      *  coincident with \a theShapeWhat that can either SOLID, FACE, EDGE or VERTEX.
2465      *  \param theShapeWhere Shape to find sub-shapes of.
2466      *  \param theShapeWhat Shape, specifying what to find.
2467      *  \return found sub-shape.
2468      */
2469     GEOM_Object GetSame (in GEOM_Object theShapeWhere,
2470                          in GEOM_Object theShapeWhat);
2471
2472     /*!
2473      *  \brief Get sub-shape Ids of theShapeWhere, which are
2474      *   coincident with \a theShapeWhat that can either SOLID, FACE, EDGE or VERTEX.
2475      *  \param theShapeWhere Shape to find sub-shapes of.
2476      *  \param theShapeWhat Shape, specifying what to find.
2477      *  \return found sub-shape Ids.
2478      */
2479     ListOfLong GetSameIDs (in GEOM_Object theShapeWhere,
2480                            in GEOM_Object theShapeWhat);
2481
2482   };
2483
2484  // # GEOM_IBlocksOperations: 
2485   /*!
2486    *  \brief Interface for Blocks construction
2487    *  Face from points or edges, Block from faces,
2488    *  Blocks multi-translation and multi-rotation
2489    */
2490   interface GEOM_IBlocksOperations : GEOM_IOperations
2491   {
2492    
2493   //  # Creation of blocks
2494
2495     /*!
2496      *  \brief Create a quadrangle face from four edges. Order of Edges is not
2497      *  important. It is  not necessary that edges share the same vertex.
2498      *  \param theEdge1,theEdge2,theEdge3,theEdge4 Edges for the face bound.
2499      *  \return New GEOM_Object, containing the created face.
2500      */
2501     GEOM_Object MakeQuad (in GEOM_Object theEdge1,
2502                           in GEOM_Object theEdge2,
2503                           in GEOM_Object theEdge3,
2504                           in GEOM_Object theEdge4);
2505
2506     /*!
2507      *  \brief Create a quadrangle face on two edges.
2508      *
2509      *  The missing edges will be built by creating the shortest ones.
2510      *  \param theEdge1,theEdge2 Two opposite edges for the face.
2511      *  \return New GEOM_Object, containing the created face.
2512      */
2513     GEOM_Object MakeQuad2Edges (in GEOM_Object theEdge1,
2514                                 in GEOM_Object theEdge2);
2515
2516     /*!
2517      *  \brief Create a quadrangle face with specified corners.
2518      *
2519      *  The missing edges will be built by creating the shortest ones.
2520      *  \param thePnt1,thePnt2,thePnt3,thePnt4 Corner vertices for the face.
2521      *  \return New GEOM_Object, containing the created face.
2522      */
2523     GEOM_Object MakeQuad4Vertices (in GEOM_Object thePnt1,
2524                                    in GEOM_Object thePnt2,
2525                                    in GEOM_Object thePnt3,
2526                                    in GEOM_Object thePnt4);
2527
2528     /*!
2529      *  \brief Create a hexahedral solid, bounded by the six given faces. Order of
2530      *  faces is not important. 
2531      *
2532      *  It is  not necessary that Faces share the same edge.
2533      *  \param theFace1,theFace2,theFace3,theFace4,theFace5,theFace6 Faces for the hexahedral solid.
2534      *  \return New GEOM_Object, containing the created solid.
2535      */
2536     GEOM_Object MakeHexa (in GEOM_Object theFace1,
2537                           in GEOM_Object theFace2,
2538                           in GEOM_Object theFace3,
2539                           in GEOM_Object theFace4,
2540                           in GEOM_Object theFace5,
2541                           in GEOM_Object theFace6);
2542
2543     /*!
2544      *  \brief Create a hexahedral solid between two given faces.
2545      *
2546      *  The missing faces will be built by creating the smallest ones.
2547      *  \param theFace1,theFace2 Two opposite faces for the hexahedral solid.
2548      *  \return New GEOM_Object, containing the created solid.
2549      */
2550     GEOM_Object MakeHexa2Faces (in GEOM_Object theFace1,
2551                                 in GEOM_Object theFace2);
2552
2553     
2554   //  # Extract elements of blocks and blocks compounds
2555      
2556
2557     /*!
2558      *  \brief Get a vertex, found in the given shape by its coordinates.
2559      *  \param theShape Block or a compound of blocks.
2560      *  \param theX,theY,theZ Coordinates of the sought vertex.
2561      *  \param theEpsilon Maximum allowed distance between the resulting
2562      *                    vertex and point with the given coordinates.
2563      *  \return New GEOM_Object, containing the found vertex.
2564      */
2565     GEOM_Object GetPoint (in GEOM_Object theShape,
2566                           in double      theX,
2567                           in double      theY,
2568                           in double      theZ,
2569                           in double      theEpsilon);
2570
2571     /*!
2572      *  \brief Find a vertex of the given shape, which has minimal distance to the given point.
2573      *  \param theShape Any shape.
2574      *  \param thePoint Point, close to the desired vertex.
2575      *  \return New GEOM_Object, containing the found vertex.
2576      */
2577     GEOM_Object GetVertexNearPoint (in GEOM_Object theShape,
2578                                     in GEOM_Object thePoint);
2579
2580     /*!
2581      *  \brief Get an edge, found in the given shape by two given vertices.
2582      *  \param theShape Block or a compound of blocks.
2583      *  \param thePoint1,thePoint2 Points, close to the ends of the desired edge.
2584      *  \return New GEOM_Object, containing the found edge.
2585      */
2586     GEOM_Object GetEdge (in GEOM_Object theShape,
2587                          in GEOM_Object thePoint1,
2588                          in GEOM_Object thePoint2);
2589
2590     /*!
2591      *  \brief Find an edge of the given shape, which has minimal distance to the given point.
2592      *  \param theShape Block or a compound of blocks.
2593      *  \param thePoint Point, close to the desired edge.
2594      *  \return New GEOM_Object, containing the found edge.
2595      */
2596     GEOM_Object GetEdgeNearPoint (in GEOM_Object theShape,
2597                                   in GEOM_Object thePoint);
2598
2599     /*!
2600      *  \brief Returns a face, found in the given shape by four given corner vertices.
2601      *  \param theShape Block or a compound of blocks.
2602      *  \param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
2603      *  \return New GEOM_Object, containing the found face.
2604      */
2605     GEOM_Object GetFaceByPoints (in GEOM_Object theShape,
2606                                  in GEOM_Object thePoint1,
2607                                  in GEOM_Object thePoint2,
2608                                  in GEOM_Object thePoint3,
2609                                  in GEOM_Object thePoint4);
2610
2611     /*!
2612      *  \brief Get a face of block, found in the given shape by two given edges.
2613      *  \param theShape Block or a compound of blocks.
2614      *  \param theEdge1,theEdge2 Edges, close to the edges of the desired face.
2615      *  \return New GEOM_Object, containing the found face.
2616      */
2617     GEOM_Object GetFaceByEdges (in GEOM_Object theShape,
2618                                 in GEOM_Object theEdge1,
2619                                 in GEOM_Object theEdge2);
2620
2621     /*!
2622      *  \brief Find a face, opposite to the given one in the given block.
2623      *  \param theBlock Must be a hexahedral solid.
2624      *  \param theFace Face of \a theBlock, opposite to the desired face.
2625      *  \return New GEOM_Object, containing the found face.
2626      */
2627     GEOM_Object GetOppositeFace (in GEOM_Object theBlock,
2628                                  in GEOM_Object theFace);
2629
2630     /*!
2631      *  \brief Find a face of the given shape, which has minimal distance to the given point.
2632      *  \param theShape Block or a compound of blocks.
2633      *  \param thePoint Point, close to the desired face.
2634      *  \return New GEOM_Object, containing the found face.
2635      */
2636     GEOM_Object GetFaceNearPoint (in GEOM_Object theShape,
2637                                   in GEOM_Object thePoint);
2638
2639     /*!
2640      *  \brief Find a face of block, whose outside normale has minimal angle with the given vector.
2641      *  \param theBlock Block or a compound of blocks.
2642      *  \param theVector Vector, close to the normale of the desired face.
2643      *  \return New GEOM_Object, containing the found face.
2644      */
2645     GEOM_Object GetFaceByNormale (in GEOM_Object theBlock,
2646                                   in GEOM_Object theVector);
2647
2648     /*!
2649      *  \brief Find all sub-shapes of type \a theShapeType of the given shape,
2650      *  which have minimal distance to the given point.
2651      *  \param theShape Any shape.
2652      *  \param thePoint Point, close to the desired shape.
2653      *  \param theShapeType Defines what kind of sub-shapes is searched.
2654      *  \param theTolerance The tolerance for distances comparison. All shapes
2655      *                      with distances to the given point in interval
2656      *                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
2657      *  \return New GEOM_Object, containing a group of all found shapes.
2658      */
2659     GEOM_Object GetShapesNearPoint (in GEOM_Object theShape,
2660                                     in GEOM_Object thePoint,
2661                                     in long        theShapeType,
2662                                     in double      theTolerance);
2663
2664    //  #  Extract blocks from blocks compounds
2665      
2666
2667     /*!
2668      *  \brief Check, if the compound contains only specified blocks.
2669      *  \param theCompound The compound to check.
2670      *  \param theMinNbFaces If solid has lower number of faces, it is not a block.
2671      *  \param theMaxNbFaces If solid has higher number of faces, it is not a block.
2672      *    \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
2673      *  \param theNbBlocks Number of specified blocks in theCompound.
2674      *  \return TRUE, if the given compound contains only blocks.
2675      */
2676     boolean IsCompoundOfBlocks (in GEOM_Object theCompound,
2677                                 in long        theMinNbFaces,
2678                                 in long        theMaxNbFaces,
2679                                 out long       theNbBlocks);
2680
2681     /*!
2682      *  \brief Enumeration of Blocks Compound defects.
2683      */
2684     enum BCErrorType
2685     {
2686       /* Each element of the compound should be a Block */
2687       NOT_BLOCK,
2688
2689       /* An element is a potential block, but has degenerated and/or seam edge(s). */
2690       EXTRA_EDGE,
2691
2692       /* A connection between two Blocks should be an entire face or an entire edge */
2693       INVALID_CONNECTION,
2694
2695       /* The compound should be connexe */
2696       NOT_CONNECTED,
2697
2698       /* The glue between two quadrangle faces should be applied */
2699       NOT_GLUED
2700     };
2701
2702     /*!
2703      *  \brief Description of Blocks Compound defect: type and incriminated sub-shapes.
2704      */
2705     struct BCError
2706     {
2707       BCErrorType error;
2708       ListOfLong  incriminated;
2709     };
2710
2711     /*!
2712      *  \brief Sequence of all Blocks Compound defects.
2713      */
2714     typedef sequence<BCError> BCErrors;
2715
2716     /*!
2717      *  \brief Check, if the compound of blocks is given.
2718      *
2719      *  To be considered as a compound of blocks, the
2720      *  given shape must satisfy the following conditions:
2721      *  - Each element of the compound should be a Block (6 faces and 12 edges).
2722      *  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
2723      *  - The compound should be connexe.
2724      *  - The glue between two quadrangle faces should be applied.
2725      *    \note Single block is also accepted as a valid compound of blocks.
2726      *  \param theCompound The compound to check.
2727      *  \param theErrors Structure, containing discovered errors and incriminated sub-shapes.
2728      *  \return TRUE, if the given shape is a compound of blocks.
2729      */
2730     boolean CheckCompoundOfBlocks (in GEOM_Object theCompound,
2731                                    out BCErrors   theErrors);
2732
2733     /*!
2734      *  \brief Convert sequence of Blocks Compound errors, returned by
2735      *  <VAR>CheckCompoundOfBlocks()</VAR>, into string.
2736      *  \param theCompound The bad compound.
2737      *  \param theErrors The sequence of \a theCompound errors.
2738      *  \return String, describing all the errors in form, suitable for printing.
2739      */
2740     string PrintBCErrors (in GEOM_Object theCompound,
2741                           in BCErrors    theErrors);
2742
2743     /*!
2744      *  \brief Retrieve all non blocks solids and faces from a shape.
2745      *
2746      *  \param theShape The shape to explore.
2747      *  \param theNonQuads Output parameter. Group of all non quadrangular faces.
2748      *
2749      *  \return Group of all non block solids (= not 6 faces, or with 6
2750      *          faces, but with the presence of non-quadrangular faces).
2751      */
2752     GEOM_Object GetNonBlocks (in GEOM_Object theShape, out GEOM_Object theNonQuads);
2753
2754     /*!
2755      *  \brief Remove all seam and degenerated edges from \a theShape.
2756      *
2757      *  Unite faces and edges, sharing one surface.
2758      *  \param theShape The compound or single solid to remove irregular edges from.
2759      *  \param theOptimumNbFaces If more than zero, unite faces only for those solids,
2760      *         that have more than theOptimumNbFaces faces. If zero, unite faces always,
2761      *         regardsless their quantity in the solid. If negative, do not unite faces at all.
2762      *         For blocks repairing recommended value is 6.
2763      *  \return Improved shape.
2764      */
2765     GEOM_Object RemoveExtraEdges (in GEOM_Object theShape,
2766                                   in long        theOptimumNbFaces);
2767
2768     /*!
2769      *  \brief Performs union faces of \a theShape.
2770      *
2771      *  Unite faces sharing one surface.
2772      *  \param theShape The compound or single solid that contains faces to perform union.
2773      *  \return Improved shape.
2774      */
2775     GEOM_Object UnionFaces (in GEOM_Object theShape);
2776
2777     /*!
2778      *  \brief Check, if the given shape is a blocks compound.
2779      *
2780      *  Fix all detected errors.
2781      *    \note Single block can be also fixed by this method.
2782      *  \param theCompound The compound to check and improve.
2783      *  \return Improved compound.
2784      */
2785     GEOM_Object CheckAndImprove (in GEOM_Object theCompound);
2786
2787     /*!
2788      *  \brief Get all the blocks, contained in the given compound.
2789      *
2790      *  \param theCompound The compound to explode.
2791      *  \param theMinNbFaces If solid has lower number of faces, it is not a block.
2792      *  \param theMaxNbFaces If solid has higher number of faces, it is not a block.
2793      *    \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
2794      *  \return List of GEOM_Object, containing the retrieved blocks.
2795      */
2796     ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound,
2797                                       in long        theMinNbFaces,
2798                                       in long        theMaxNbFaces);
2799
2800     /*!
2801      *  \brief Find block, containing the given point inside its volume or on boundary.
2802      *  \param theCompound Compound, to find block in.
2803      *  \param thePoint Point, close to the desired block. If the point lays on
2804      *         boundary between some blocks, we return block with nearest center.
2805      *  \return New GEOM_Object, containing the found block.
2806      */
2807     GEOM_Object GetBlockNearPoint (in GEOM_Object theCompound,
2808                                    in GEOM_Object thePoint);
2809
2810     /*!
2811      *  \brief Find block, containing all the elements, passed as the parts, or maximum quantity of them.
2812      *  \param theCompound Compound, to find block in.
2813      *  \param theParts List of faces and/or edges and/or vertices to be parts of the found block.
2814      *  \return New GEOM_Object, containing the found block.
2815      */
2816     GEOM_Object GetBlockByParts (in GEOM_Object theCompound,
2817                                  in ListOfGO    theParts);
2818
2819     /*!
2820      *  \brief Return all blocks, containing all the elements, passed as the parts.
2821      *  \param theCompound Compound, to find blocks in.
2822      *  \param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
2823      *  \return List of GEOM_Object, containing the found blocks.
2824      */
2825     ListOfGO GetBlocksByParts (in GEOM_Object theCompound,
2826                                in ListOfGO    theParts);
2827
2828   // #  Operations on blocks with gluing of result
2829
2830     /*!
2831      *  \brief Multi-transformate block and glue the result.
2832      *
2833      *  Transformation is defined so, as to superpose theDirFace1 with theDirFace2.
2834      *  \param theBlock Hexahedral solid to be multi-transformed.
2835      *  \param theDirFace1 First direction face global index.
2836      *  \param theDirFace2 Second direction face global index.
2837      *  \param theNbTimes Quantity of transformations to be done.
2838      *    \note Global index of sub-shape can be obtained, using method
2839      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2840      *  \return New GEOM_Object, containing the result shape.
2841      */
2842     GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock,
2843                                            in long        theDirFace1,
2844                                            in long        theDirFace2,
2845                                            in long        theNbTimes);
2846
2847     /*!
2848      *  \brief Multi-transformate block and glue the result.
2849      *  \param theBlock Hexahedral solid to be multi-transformed.
2850      *  \param theDirFace1U,theDirFace2U Direction faces for the first transformation.
2851      *  \param theDirFace1V,theDirFace2V Direction faces for the second transformation.
2852      *  \param theNbTimesU,theNbTimesV Quantity of transformations to be done.
2853      *  \return New GEOM_Object, containing the result shape.
2854      */
2855     GEOM_Object MakeMultiTransformation2D (in GEOM_Object theBlock,
2856                                            in long        theDirFace1U,
2857                                            in long        theDirFace2U,
2858                                            in long        theNbTimesU,
2859                                            in long        theDirFace1V,
2860                                            in long        theDirFace2V,
2861                                            in long        theNbTimesV);
2862
2863   // # Special operation - propagation
2864    
2865
2866     /*!
2867      *  \brief Build all possible propagation groups.
2868      *
2869      *  Propagation group is a set of all edges, opposite to one (main)
2870      *  edge of this group directly or through other opposite edges.
2871      *  Notion of Opposite Edge make sence only on quadrangle face.
2872      *  \param theShape Shape to build propagation groups on.
2873      *  \return List of GEOM_Object, each of them is a propagation group.
2874      */
2875     ListOfGO Propagate (in GEOM_Object theShape);
2876   };
2877
2878  // # GEOM_IBooleanOperations
2879   /*!
2880    *  \brief Interface for boolean operations (Cut, Fuse, Common)
2881    */
2882   interface GEOM_IBooleanOperations : GEOM_IOperations
2883   {
2884     /*!
2885      *  \brief Perform one of boolean operations on two given shapes.
2886      *  \param theShape1 First argument for boolean operation.
2887      *  \param theShape2 Second argument for boolean operation.
2888      *  \param theOperation Indicates the operation to be done:
2889      *                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
2890      *  \return New GEOM_Object, containing the result shape.
2891      */
2892     GEOM_Object MakeBoolean (in GEOM_Object theShape1,
2893                              in GEOM_Object theShape2,
2894                              in long theOperation);
2895
2896     /*!
2897      *  \brief Perform fusion boolean operation on list of objects.
2898      *  \param theShapes Shapes to be fused.
2899      *  \return New GEOM_Object, containing the result shape.
2900      */
2901     GEOM_Object MakeFuseList (in ListOfGO theShapes);
2902
2903     /*!
2904      *  \brief Perform common boolean operation on list of objects.
2905      *  \param theShapes Shapes for common operation.
2906      *  \return New GEOM_Object, containing the result shape.
2907      */
2908     GEOM_Object MakeCommonList (in ListOfGO theShapes);
2909
2910     /*!
2911      *  \brief Perform cutting of list of objects from theMainShape.
2912      *  \param theMainShape the object for cut operation.
2913      *  \param theShapes Shapes to be cut from theMainShape (tools).
2914      *  \return New GEOM_Object, containing the result shape.
2915      */
2916     GEOM_Object MakeCutList (in GEOM_Object theMainShape,
2917                              in ListOfGO theShapes);
2918
2919     /*!
2920      *  \brief Perform partition operation.
2921      *
2922      *  \param theShapes Shapes to be intersected.
2923      *  \param theTools Shapes to intersect theShapes.
2924      *  \note  Each compound from ListShapes and ListTools will be exploded in order
2925      *         to avoid possible intersection between shapes from this compound.
2926      *  \param theLimit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
2927      *  \param theKeepNonlimitShapes: if this parameter == 0, then only shapes of
2928      *                             target type (equal to Limit) are kept in the result,
2929      *                             else standalone shapes of lower dimension
2930      *                             are kept also (if they exist).
2931      *
2932      *  After implementation new version of PartitionAlgo (October 2006)
2933      *  other parameters are ignored by current functionality. They are kept
2934      *  in this function only for supporting old versions.
2935      *  Ignored parameters:
2936      *  \param theKeepInside Shapes, outside which the results will be deleted.
2937      *         Each shape from theKeepInside must belong to theShapes also.
2938      *  \param theRemoveInside Shapes, inside which the results will be deleted.
2939      *         Each shape from theRemoveInside must belong to theShapes also.
2940      *  \param theRemoveWebs If TRUE, perform Glue 3D algorithm.
2941      *  \param theMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
2942      *
2943      *  \return New GEOM_Object, containing the result shapes.
2944      */
2945     GEOM_Object MakePartition (in ListOfGO   theShapes,
2946                                in ListOfGO   theTools,
2947                                in ListOfGO   theKeepInside,
2948                                in ListOfGO   theRemoveInside,
2949                                in short      theLimit,
2950                                in boolean    theRemoveWebs,
2951                                in ListOfLong theMaterials,
2952                                in short      theKeepNonlimitShapes);
2953
2954     /*!
2955      *  \brief Perform partition operation.
2956      *
2957      *  This method may be usefull if it is needed to make a partition for
2958      *  a compound containing nonintersected shapes. Performance will be better
2959      *  since intersection between shapes from compound is not performed.
2960      *
2961      *  Description of all parameters as in previous method MakePartition()
2962      *
2963      *  \note Passed compounds (via ListShapes or via ListTools)
2964      *        have to consist of nonintersecting shapes.
2965      *
2966      *  \return New GEOM_Object, containing the result shapes.
2967      */
2968     GEOM_Object MakePartitionNonSelfIntersectedShape (in ListOfGO   theShapes,
2969                                                       in ListOfGO   theTools,
2970                                                       in ListOfGO   theKeepInside,
2971                                                       in ListOfGO   theRemoveInside,
2972                                                       in short      theLimit,
2973                                                       in boolean    theRemoveWebs,
2974                                                       in ListOfLong theMaterials,
2975                                                       in short      theKeepNonlimitShapes);
2976
2977     /*!
2978      *  \brief Perform partition of the Shape with the Plane
2979      *  \param theShape Shape to be intersected.
2980      *  \param thePlane Tool shape, to intersect theShape.
2981      *  \return New GEOM_Object, containing the result shape.
2982      */
2983     GEOM_Object MakeHalfPartition (in GEOM_Object theShape,
2984                                    in GEOM_Object thePlane);
2985   };
2986
2987  // # GEOM_ICurvesOperations:
2988   /*!
2989    *  \brief Interface for curves creation.
2990    *
2991    *  Polyline, Circle, Spline (Bezier and Interpolation)
2992    */
2993   interface GEOM_ICurvesOperations : GEOM_IOperations
2994   {
2995     /*!
2996      *  \brief Create a circle with given center, normal vector and radius.
2997      *  \param thePnt Circle center.
2998      *  \param theVec Vector, normal to the plane of the circle.
2999      *  \param theR Circle radius.
3000      *  \return New GEOM_Object, containing the created circle.
3001      */
3002     GEOM_Object MakeCirclePntVecR (in GEOM_Object thePnt,
3003                                    in GEOM_Object theVec,
3004                                    in double theR);
3005     /*!
3006      *  \brief Create a circle, passing through three given points
3007      *  \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
3008      *  \return New GEOM_Object, containing the created circle.
3009      */
3010     GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1,
3011                                     in GEOM_Object thePnt2,
3012                                     in GEOM_Object thePnt3);
3013     /*!
3014      *  \brief Create a circle with given center, with a radius equals the distance from center to Point1
3015      *  and on a plane defined by all of three points.
3016      *  \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
3017      *  \return New GEOM_Object, containing the created circle.
3018      */
3019     GEOM_Object MakeCircleCenter2Pnt (in GEOM_Object thePnt1,
3020                                       in GEOM_Object thePnt2,
3021                                       in GEOM_Object thePnt3);
3022     /*!
3023      *  \brief Create an ellipse with given center, normal vector and radiuses.
3024      *  \param thePnt Ellipse center.
3025      *  \param theVec Vector, normal to the plane of the ellipse.
3026      *  \param theRMajor Major ellipse radius.
3027      *  \param theRMinor Minor ellipse radius.
3028      *  \return New GEOM_Object, containing the created ellipse.
3029      */
3030     GEOM_Object MakeEllipse (in GEOM_Object thePnt,
3031                              in GEOM_Object theVec,
3032                              in double theRMajor,
3033                              in double theRMinor);
3034
3035     /*!
3036      *  \brief Create an ellipse with given center, normal vector, main axis vector and radiuses.
3037      *  \param thePnt Ellipse center.
3038      *  \param theVec Vector, normal to the plane of the ellipse.
3039      *  \param theRMajor Major ellipse radius.
3040      *  \param theRMinor Minor ellipse radius.
3041      *  \param theVecMaj Vector, direction of the ellipse's main axis.
3042      *  \return New GEOM_Object, containing the created ellipse.
3043      */
3044     GEOM_Object MakeEllipseVec (in GEOM_Object thePnt,
3045                                 in GEOM_Object theVec,
3046                                 in double theRMajor,
3047                                 in double theRMinor,
3048                                 in GEOM_Object theVecMaj);
3049
3050     /*!
3051      *  \brief Create an arc of circle, passing through three given points.
3052      *  \param thePnt1 Start point of the arc.
3053      *  \param thePnt2 Middle point of the arc.
3054      *  \param thePnt3 End point of the arc.
3055      *  \return New GEOM_Object, containing the created arc.
3056      */
3057     GEOM_Object MakeArc (in GEOM_Object thePnt1,
3058                          in GEOM_Object thePnt2,
3059                          in GEOM_Object thePnt3);
3060
3061     /*!
3062      *  \brief Create an arc of circle of center C from one point to another
3063      *  \param theCenter Center point of the arc.
3064      *  \param thePnt1 Start point of the arc.
3065      *  \param thePnt2 End point of the arc.
3066      *  \param theSense Orientation of the arc
3067      *  \return New GEOM_Object, containing the created arc.
3068      */
3069     GEOM_Object MakeArcCenter (in GEOM_Object theCenter,
3070                                in GEOM_Object thePnt1,
3071                                in GEOM_Object thePnt2,
3072                                in boolean theSense);
3073
3074     /*!
3075      *  \brief Create an arc of ellipse of center C and two points P1 P2.
3076      *  \param theCenter Center point of the arc.
3077      *  \param thePnt1 Major radius is distance from center to Pnt1.
3078      *  \param thePnt2 define a plane and Minor radius as a shortest
3079      *                 distance from Pnt2 to vector Center->Pnt1.
3080      *  \return New GEOM_Object, containing the created arc.
3081      */
3082     GEOM_Object MakeArcOfEllipse (in GEOM_Object theCenter,
3083                                   in GEOM_Object thePnt1,
3084                                   in GEOM_Object thePnt2);
3085
3086
3087     /*!
3088      *  \brief Create a polyline on the set of points.
3089      *  \param thePoints Sequence of points for the polyline.
3090      *  \param theIsClosed If TRUE, build a closed wire.
3091      *  \return New GEOM_Object, containing the created polyline.
3092      */
3093     GEOM_Object MakePolyline (in ListOfGO thePoints,
3094                               in boolean  theIsClosed);
3095
3096     /*!
3097      *  \brief Create bezier curve on the set of points.
3098      *  \param thePoints Sequence of points for the bezier curve.
3099      *  \param theIsClosed If TRUE, build a closed curve.
3100      *  \return New GEOM_Object, containing the created bezier curve.
3101      */
3102     GEOM_Object MakeSplineBezier (in ListOfGO thePoints,
3103                                   in boolean  theIsClosed);
3104
3105     /*!
3106      *  \brief Create B-Spline curve on the set of points.
3107      *  \param thePoints Sequence of points for the B-Spline curve.
3108      *  \param theIsClosed If TRUE, build a closed curve.
3109      *  \param theDoReordering If TRUE, the algo does not follow the order of
3110      *                         \a thePoints but searches for the closest vertex.
3111      *  \return New GEOM_Object, containing the created B-Spline curve.
3112      */
3113     GEOM_Object MakeSplineInterpolation (in ListOfGO thePoints,
3114                                          in boolean  theIsClosed,
3115                                          in boolean  theDoReordering);
3116
3117     /*!
3118      *  \brief Create B-Spline curve on the set of points.
3119      *  \param thePoints Sequence of points for the B-Spline curve.
3120      *  \param theFirstVec Vector object, defining the curve direction at its first point.
3121      *  \param theLastVec Vector object, defining the curve direction at its last point.
3122      *  \return New GEOM_Object, containing the created B-Spline curve.
3123      */
3124     GEOM_Object MakeSplineInterpolWithTangents (in ListOfGO    thePoints,
3125                                                 in GEOM_Object theFirstVec,
3126                                                 in GEOM_Object theLastVec);
3127
3128     /*!
3129      *  \brief Creates a curve using the parametric definition of the basic points.
3130      *  \param thexExpr parametric equation of the coordinates X.
3131      *  \param theyExpr parametric equation of the coordinates Y.
3132      *  \param thezExpr parametric equation of the coordinates Z.
3133      *  \param theParamMin the minimal value of the parameter.
3134      *  \param theParamMax the maximum value of the parameter.
3135      *  \param theParamStep the step of the parameter.
3136      *  \param theCurveType the type of the curve.
3137      *  \return New GEOM_Object, containing the created curve.
3138      */    
3139     GEOM_Object MakeCurveParametric(in string thexExpr,
3140                                     in string theyExpr,
3141                                     in string thezExpr,
3142                                     in double theParamMin,
3143                                     in double theParamMax,
3144                                     in double theParamStep,
3145                                     in curve_type theCurveType);
3146
3147      /*!
3148      *  \brief Creates a curve using the parametric definition of the basic points.
3149      *  \param thexExpr parametric equation of the coordinates X.
3150      *  \param theyExpr parametric equation of the coordinates Y.
3151      *  \param thezExpr parametric equation of the coordinates Z.
3152      *  \param theParamMin the minimal value of the parameter.
3153      *  \param theParamMax the maximum value of the parameter.
3154      *  \param theParamNbStep the number of steps of the parameter discretization.
3155      *  \param theCurveType the type of the curve.
3156      *  \return New GEOM_Object, containing the created curve.
3157      */    
3158     GEOM_Object MakeCurveParametricNew(in string thexExpr,
3159                     in string theyExpr,
3160                     in string thezExpr,
3161                     in double theParamMin,
3162                     in double theParamMax,
3163                     in long   theParamNbStep,
3164                     in curve_type theCurveType);
3165
3166     /*!
3167      *  \brief Create a sketcher (wire or face), following the textual description,
3168      *         passed through \a theCommand argument.
3169      *
3170      *  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
3171      *  Format of the description string has to be the following:
3172      *
3173      *  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
3174      *
3175      *  Where:
3176      *  - x1, y1 are coordinates of the first sketcher point (zero by default),
3177      *  - CMD is one of
3178      *     - "R angle" : Set the direction by angle
3179      *     - "D dx dy" : Set the direction by DX & DY
3180      *     .
3181      *       \n
3182      *     - "TT x y" : Create segment by point at X & Y
3183      *     - "T dx dy" : Create segment by point with DX & DY
3184      *     - "L length" : Create segment by direction & Length
3185      *     - "IX x" : Create segment by direction & Intersect. X
3186      *     - "IY y" : Create segment by direction & Intersect. Y
3187      *     .
3188      *       \n
3189      *     - "C radius length" : Create arc by direction, radius and length(in degree)
3190      *     .
3191      *       \n
3192      *     - "WW" : Close Wire (to finish)
3193      *     - "WF" : Close Wire and build face (to finish)
3194      *
3195      *  \param theCommand String, defining the sketcher in local
3196      *                    coordinates of the working plane.
3197      *  \param theWorkingPlane Nine double values, defining origin,
3198      *                         OZ and OX directions of the working plane.
3199      *  \return New GEOM_Object, containing the created wire or face.
3200      */
3201     GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane);
3202
3203     /*!
3204      *  \brief Create a sketcher (wire or face), following the textual description,
3205      *         passed through \a theCommand argument. 
3206      *
3207      *  For format of the description string see the previous method.\n
3208      *
3209      *  \param theCommand String, defining the sketcher in local
3210      *                    coordinates of the working plane.
3211      *  \param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
3212      *  \return New GEOM_Object, containing the created wire or face.
3213      */
3214     GEOM_Object MakeSketcherOnPlane (in string theCommand, in GEOM_Object theWorkingPlane);
3215
3216     /*!
3217      *  \brief Create a 3D sketcher, following the textual description,
3218      *         passed through \a theCommand argument. 
3219      *
3220      *  Format of the description string has to be the following:
3221      *
3222      *  "3DSketcher:CMD[:CMD[:CMD...]]"
3223      *
3224      *  Where CMD is one of
3225      *     - "TT x y z" : Create segment by point at X & Y or set the first point
3226      *     - "T dx dy dz" : Create segment by point with DX & DY
3227      *     .
3228      *       \n
3229      *     - "OXY angleX angle2 length" : Create segment by two angles and length
3230      *     - "OYZ angleY angle2 length" : Create segment by two angles and length
3231      *     - "OXZ angleX angle2 length" : Create segment by two angles and length
3232      *     .
3233      *       \n
3234      *     - "WW" : Close Wire (to finish)
3235      *
3236      *  \param theCommand String, defining the sketcher in local
3237      *                    coordinates of the working plane.
3238      *  \return New GEOM_Object, containing the created wire.
3239      */
3240     GEOM_Object Make3DSketcherCommand (in string theCommand);
3241
3242     /*!
3243      *  \brief Create a 3D sketcher, made of a straight segments, joining points
3244      *         with coordinates passed through \a theCoordinates argument. 
3245      *
3246      *  Order of coordinates has to be the following:
3247      *  x1, y1, z1, x2, y2, z2, ..., xN, yN, zN
3248      *
3249      *  \param theCoordinates List of double values.
3250      *  \return New GEOM_Object, containing the created wire.
3251      */
3252     GEOM_Object Make3DSketcher (in ListOfDouble theCoordinates);
3253   };
3254
3255  // # GEOM_ILocalOperations:
3256   /*!
3257    *  \brief Interface for fillet and chamfer creation.
3258    */
3259   interface GEOM_ILocalOperations : GEOM_IOperations
3260   {
3261     /*!
3262      *  \brief Perform a fillet on all edges of the given shape.
3263      *  \param theShape Shape, to perform fillet on.
3264      *  \param theR Fillet radius.
3265      *  \return New GEOM_Object, containing the result shape.
3266      */
3267     GEOM_Object MakeFilletAll (in GEOM_Object theShape,
3268                                in double      theR);
3269
3270     /*!
3271      *  \brief Perform a fillet on the specified edges of the given shape
3272      *  \param theShape Shape, to perform fillet on.
3273      *  \param theR Fillet radius.
3274      *  \param theEdges Global indices of edges to perform fillet on.
3275      *    \note Global index of sub-shape can be obtained, using method
3276      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3277      *  \return New GEOM_Object, containing the result shape.
3278      */
3279     GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
3280                                  in double      theR,
3281                                  in ListOfLong  theEdges);
3282     GEOM_Object MakeFilletEdgesR1R2 (in GEOM_Object theShape,
3283                                      in double      theR1,
3284                                      in double      theR2,
3285                                      in ListOfLong  theEdges);
3286
3287     /*!
3288      *  \brief Perform a fillet on all edges of the specified faces of the given shape.
3289      *  \param theShape Shape, to perform fillet on.
3290      *  \param theR Fillet radius.
3291      *  \param theFaces Global indices of faces to perform fillet on.
3292      *    \note Global index of sub-shape can be obtained, using method
3293      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3294      *  \return New GEOM_Object, containing the result shape.
3295      */
3296     GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
3297                                  in double      theR,
3298                                  in ListOfLong  theFaces);
3299
3300     GEOM_Object MakeFilletFacesR1R2 (in GEOM_Object theShape,
3301                                      in double      theR1,
3302                                      in double      theR2,
3303                                      in ListOfLong  theFaces);
3304
3305     /*!
3306      *  \brief Perform a fillet on a face or a shell at the specified vertexes.
3307      *  \param theShape Shape, to perform fillet on.
3308      *  \param theR Fillet radius.
3309      *  \param theVertexes Global indices of vertexes to perform fillet on.
3310      *    \note Global index of sub-shape can be obtained, using method
3311      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3312      *  \return New GEOM_Object, containing the result shape.
3313      */
3314     GEOM_Object MakeFillet2D (in GEOM_Object theShape,
3315                               in double      theR,
3316                               in ListOfLong  theVertexes);
3317
3318     /*!
3319      *  \brief Perform a fillet on edges of the specified vertexes of the given wire.
3320      *  \param theShape Shape, to perform fillet on.
3321      *  \param theR Fillet radius.
3322      *  \param theVertexes Global indices of vertexes to perform fillet on.
3323      *    \note Global index of sub-shape can be obtained, using method
3324      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3325      *    \note The list of vertices coudl be empty, in this case fillet fill be done
3326      *          at all vertices in given wire
3327      *  \param doIgnoreSecantVertices If FALSE, fillet radius is always limited
3328      *         by the length of the edges, nearest to the fillet vertex.
3329      *         But sometimes the next edge is C1 continuous with the one, nearest to
3330      *         the fillet point, and such two (or more) edges can be united to allow
3331      *         bigger radius. Set this flag to TRUE to allow collinear edges union,
3332      *         thus ignoring the secant vertex (vertices).
3333      *  \return New GEOM_Object, containing the result shape.
3334      */
3335     GEOM_Object MakeFillet1D (in GEOM_Object theShape,
3336                               in double      theR,
3337                               in ListOfLong  theVertexes,
3338                               in boolean     doIgnoreSecantVertices);
3339
3340     /*!
3341      *  \brief Perform a symmetric chamfer on all edges of the given shape.
3342      *  \param theShape Shape, to perform chamfer on.
3343      *  \param theD Chamfer size along each face.
3344      *  \return New GEOM_Object, containing the result shape.
3345      */
3346     GEOM_Object MakeChamferAll (in GEOM_Object theShape,
3347                                 in double      theD);
3348
3349     /*!
3350      *  \brief Perform a chamfer on edges, common to the specified faces.
3351      *  with distance D1 on the Face1
3352      *  \param theShape Shape, to perform chamfer on.
3353      *  \param theD1 Chamfer size along \a theFace1.
3354      *  \param theD2 Chamfer size along \a theFace2.
3355      *  \param theFace1,theFace2 Global indices of two faces of \a theShape.
3356      *    \note Global index of sub-shape can be obtained, using method
3357      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3358      *  \return New GEOM_Object, containing the result shape.
3359      */
3360     GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
3361                                  in double theD1, in double theD2,
3362                                  in long theFace1, in long theFace2);
3363     /*!
3364      *  \brief The Same but with params theD = Chamfer Lenght
3365      *  and theAngle = Chamfer Angle (Angle in radians)
3366      */
3367     GEOM_Object MakeChamferEdgeAD (in GEOM_Object theShape,
3368                                    in double theD, in double theAngle,
3369                                    in long theFace1, in long theFace2);
3370
3371     /*!
3372      *  \brief Perform a chamfer on all edges of the specified faces.
3373      *  with distance D1 on the first specified face (if several for one edge)
3374      *  \param theShape Shape, to perform chamfer on.
3375      *  \param theD1 Chamfer size along face from \a theFaces. If both faces,
3376      *               connected to the edge, are in \a theFaces, \a theD1
3377      *               will be get along face, which is nearer to \a theFaces beginning.
3378      *  \param theD2 Chamfer size along another of two faces, connected to the edge.
3379      *  \param theFaces Sequence of global indices of faces of \a theShape.
3380      *    \note Global index of sub-shape can be obtained, using method
3381      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3382      *  \return New GEOM_Object, containing the result shape.
3383      */
3384     GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
3385                                   in double theD1, in double theD2,
3386                                   in ListOfLong theFaces);
3387     /*!
3388      *  The Same but with params theD = Chamfer Lenght
3389      *  and theAngle = Chamfer Angle (Angle in radians)
3390      */
3391     GEOM_Object MakeChamferFacesAD (in GEOM_Object theShape,
3392                                     in double theD, in double theAngle,
3393                                     in ListOfLong theFaces);
3394
3395    /*!
3396     *  \brief Perform a chamfer on edges,
3397     *  with distance D1 on the first specified face (if several for one edge)
3398     *  \param theShape Shape, to perform chamfer on.
3399     *  \param theD1,theD2 Chamfer size
3400     *  \param theEdges Sequence of edges of \a theShape.
3401     *  \return New GEOM_Object, containing the result shape.
3402     */
3403     GEOM_Object MakeChamferEdges (in GEOM_Object theShape,
3404                                   in double theD1, in double theD2,
3405                                   in ListOfLong theEdges);
3406     /*!
3407      *  The Same but with params theD = Chamfer Lenght
3408      *  and theAngle = Chamfer Angle (Angle in radians)
3409      */
3410     GEOM_Object MakeChamferEdgesAD (in GEOM_Object theShape,
3411                                     in double theD, in double theAngle,
3412                                     in ListOfLong theEdges);
3413
3414     /*!
3415      *  \brief Perform an Archimde operation on the given shape with given parameters.
3416      *                    The object presenting the resulting face is returned
3417      *  \param theShape Shape to be put in water.
3418      *  \param theWeight Weight og the shape.
3419      *  \param theWaterDensity Density of the water.
3420      *  \param theMeshDeflection Deflection od the mesh, using to compute the section.
3421      *  \return New GEOM_Object, containing a section of \a theShape
3422      *          by a plane, corresponding to water level.
3423      */
3424     GEOM_Object MakeArchimede (in GEOM_Object theShape,
3425                                in double theWeight,
3426                                in double theWaterDensity,
3427                                in double theMeshDeflection);
3428
3429     /*!
3430      *  \brief Duplicates <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3431      *
3432      *  Present here only for compatibility.
3433      */
3434     long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape);
3435   };
3436
3437  // #  GEOM_IHealingOperations: 
3438   /*!
3439    *  \brief Interface for shape healing operations
3440    *
3441    *  Shape Processing, SuppressFaces, etc.
3442    */
3443   interface GEOM_IHealingOperations : GEOM_IOperations
3444   {
3445     /*!
3446      *  \brief Apply a sequence of Shape Healing operators to the given object.
3447      *  \param theShapes Shape to be processed.
3448      *  \param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
3449      *  \param theParameters List of names of parameters
3450      *                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
3451      *  \param theValues List of values of parameters, in the same order
3452      *                    as parameters are listed in \a theParameters list.
3453      *  \return New GEOM_Object, containing processed shape.
3454      */
3455     GEOM_Object ProcessShape (in GEOM_Object theShapes,
3456                               in string_array theOperators,
3457                               in string_array theParameters,
3458                               in string_array theValues);
3459
3460     /*!
3461      *  \brief Get default sequence of operators, their parameters and parameters' values
3462      *  of Shape Process operation. 
3463      *
3464      *  In the current implementation the defaults are
3465      *  read from the file pointed by CSF_ShHealingDefaults environmental variable.
3466      *  \param theOperators Output. Default list of names of operators.
3467      *  \param theParameters Output. Default list of names of parameters.
3468      *  \param theValues Output. List of default values of parameters, in the same order
3469      *                           as parameters are listed in \a theParameters list.
3470      */
3471     void GetShapeProcessParameters (out string_array theOperators,
3472                                     out string_array theParameters,
3473                                     out string_array theValues);
3474     /*!
3475      *  \brief Get parameters and parameters' values for the given Shape Process operation.
3476      *
3477      *  In the current implementation the defaults are
3478      *  read from the file pointed by CSF_ShHealingDefaults environmental variable.
3479      *  \param theOperator Input. The operator's name.
3480      *  \param theParameters Output. Default list of names of parameters.
3481      *  \param theValues Output. List of default values of parameters, in the same order
3482      *                           as parameters are listed in \a theParameters list.
3483      */
3484     void GetOperatorParameters (in string theOperator,
3485                                 out string_array theParameters,
3486                                 out string_array theValues);
3487
3488     /*!
3489      *  \brief Remove faces from the given object (shape).
3490      *  \param theObject Shape to be processed.
3491      *  \param theFaces Indices of faces to be removed, if EMPTY then the method
3492      *                  removes ALL faces of the given object.
3493      *  \return New GEOM_Object, containing processed shape.
3494      */
3495     GEOM_Object SuppressFaces (in GEOM_Object theObject, in short_array theFaces);
3496
3497     /*!
3498      *  \brief Close an open wire.
3499      *  \param theObject Shape to be processed.
3500      *  \param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
3501      *                  if -1, then theObject itself is a wire.
3502      *  \param isCommonVertex If TRUE : closure by creation of a common vertex,
3503      *                        If FALS : closure by creation of an edge between ends.
3504      *  \return New GEOM_Object, containing processed shape.
3505      */
3506     GEOM_Object CloseContour (in GEOM_Object theObject, in short_array theWires,
3507                               in boolean isCommonVertex);
3508
3509     /*!
3510      *  \brief Remove internal wires and edges from the given object (face).
3511      *  \param theObject Shape to be processed.
3512      *  \param theWires Indices of wires to be removed, if EMPTY then the method
3513      *                  removes ALL internal wires of the given object.
3514      *  \return New GEOM_Object, containing processed shape.
3515      */
3516     GEOM_Object RemoveIntWires (in GEOM_Object theObject, in short_array theWires);
3517
3518     /*!
3519      *  \brief Remove internal closed contours (holes) from the given object.
3520      *  \param theObject Shape to be processed.
3521      *  \param theWires Indices of wires to be removed, if EMPTY then the method
3522      *                  removes ALL internal holes of the given object
3523      *  \return New GEOM_Object, containing processed shape.
3524      */
3525     GEOM_Object FillHoles (in GEOM_Object theObject, in short_array theWires);
3526
3527     /*!
3528      *  Sewing of the given object.
3529      *  \param theObject Shape to be processed.
3530      *  \param theTolerance Required tolerance value.
3531      *  \return New GEOM_Object, containing processed shape.
3532      */
3533     GEOM_Object Sew (in GEOM_Object theObject, in double theTolerance);
3534
3535     /*!
3536      *  Sewing of the given object. Allows non-manifold sewing.
3537      *  \param theObject Shape to be processed.
3538      *  \param theTolerance Required tolerance value.
3539      *  \return New GEOM_Object, containing processed shape.
3540      */
3541     GEOM_Object SewAllowNonManifold(in GEOM_Object theObject, in double theTolerance);
3542
3543     /*!
3544      *  Rebuild the topology of theCompound of solids by removing
3545      *  of the faces that are shared by several solids.
3546      *  \param theCompound Shape to be processed.
3547      *  \return New GEOM_Object, containing processed shape.
3548      */
3549     GEOM_Object RemoveInternalFaces (in GEOM_Object theCompound);
3550
3551     /*!
3552      *  \brief Addition of a point to a given edge object.
3553      *  \param theObject Shape to be processed.
3554      *  \param theEdgeIndex Index of edge to be divided within theObject's shape,
3555      *                      if -1, then theObject itself is the edge.
3556      *  \param theValue Value of parameter on edge or length parameter,
3557      *                  depending on \a isByParameter.
3558      *  \param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1],
3559      *                       if FALSE : \a theValue is treated as a length parameter [0..1]
3560      *  \return New GEOM_Object, containing processed shape.
3561      */
3562     GEOM_Object DivideEdge (in GEOM_Object theObject, in short theEdgeIndex,
3563                             in double theValue, in boolean isByParameter);
3564
3565     /*!
3566      *  \brief Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
3567      *  \param theWire Wire to minimize the number of C1 continuous edges in.
3568      *  \param theVertices A list of vertices to suppress. If the list
3569      *                     is empty, all vertices in a wire will be assumed.
3570      *  \return New GEOM_Object with modified wire.
3571      */
3572     GEOM_Object FuseCollinearEdgesWithinWire (in GEOM_Object theWire,
3573                                               in ListOfGO theVertices);
3574
3575     /*!
3576      *  \brief Get a list of wires (wrapped in GEOM_Object-s),
3577      *  that constitute a free boundary of the given shape.
3578      *  \param theObject Shape to get free boundary of.
3579      *  \param theClosedWires Output. Closed wires on the free boundary of the given shape.
3580      *  \param theOpenWires Output. Open wires on the free boundary of the given shape.
3581      *  \return FALSE, if an error(s) occured during the method execution.
3582      */
3583     boolean GetFreeBoundary (in GEOM_Object theObject,
3584                              out ListOfGO theClosedWires,
3585                              out ListOfGO theOpenWires);
3586
3587     /*!
3588      *  \brief Change orientation of the given object.
3589      *  \param theObject Shape to be processed.
3590      *  \return New GEOM_Object, containing processed shape.
3591      */
3592     GEOM_Object ChangeOrientation (in GEOM_Object theObject);
3593     GEOM_Object ChangeOrientationCopy (in GEOM_Object theObject);
3594
3595     /*!
3596      *  \brief Try to limit tolerance of the given object by value \a theTolerance.
3597      *  \param theObject Shape to be processed.
3598      *  \param theTolerance Required tolerance value.
3599      *  \return New GEOM_Object, containing processed shape.
3600      */
3601     GEOM_Object LimitTolerance (in GEOM_Object theObject, in double theTolerance);
3602
3603   };
3604
3605  // # GEOM_IInsertOperations:
3606   /*!
3607    *  \brief Interface for shape insert operations (like copy, import).
3608    *
3609    */
3610   interface GEOM_IInsertOperations : GEOM_IOperations
3611   {
3612     /*!
3613      *  \brief Create a copy of the given object
3614      */
3615     GEOM_Object MakeCopy (in GEOM_Object theOriginal);
3616
3617     /*!
3618      *  \brief Export the given shape into a file with given name.
3619      *  \param theObject Shape to be stored in the file.
3620      *  \param theFileName Name of the file to store the given shape in.
3621      *  \param theFormatName Specify format for the shape storage.
3622      *         Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
3623      */
3624     void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName);
3625
3626     /*!
3627      *  \brief Import a shape from the BRep or IGES or STEP file
3628      *  (depends on given format) with given name.
3629      *  \param theFileName The file, containing the shape.
3630      *  \param theFormatName Specify format for the file reading.
3631      *         Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
3632      *         If format 'IGES_SCALE' is used instead of 'IGES' or
3633      *            format 'STEP_SCALE' is used instead of 'STEP',
3634      *            file length unit will be ignored (set to 'meter') and result model will be scaled.
3635      *  \return New GEOM_Object, containing the imported shape.
3636      */
3637     GEOM_Object ImportFile (in string theFileName, in string theFormatName);
3638
3639     /*!
3640      *  \brief Read a value of parameter from a file, containing a shape.
3641      *  \param theFileName The file, containing the shape.
3642      *  \param theFormatName Specify format for the file reading.
3643      *         Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
3644      *  \param theParameterName Specify the parameter. For example, pass "LEN_UNITS"
3645      *                          to obtain length units, in which the file is written.
3646      *  \return Value of requested parameter in form of text string.
3647      */
3648     string ReadValue (in string theFileName, in string theFormatName, in string theParameterName);
3649
3650     /*!
3651      *  \brief Get the supported import formats and corresponding patterns for File dialog.
3652      *  \param theFormats Output. List of formats, available for import.
3653      *  \param thePatterns Output. List of file patterns, corresponding to available formats.
3654      *  \return Returns available formats and patterns through the arguments.
3655      */
3656     void ImportTranslators (out string_array theFormats,
3657                             out string_array thePatterns);
3658
3659     /*!
3660      *  \brief Get the supported export formats and corresponding patterns for File dialog.
3661      *  \param theFormats Output. List of formats, available for export.
3662      *  \param thePatterns Output. List of file patterns, corresponding to available formats.
3663      *  \return Returns available formats and patterns through the arguments.
3664      */
3665     void ExportTranslators (out string_array theFormats,
3666                             out string_array thePatterns);
3667
3668     /*!
3669      *  \brief Read a shape from the binary stream, containing its bounding representation (BRep).
3670      *  \note GEOM_Object::GetShapeStream() method can be used to obtain the shape's BRep stream.
3671      *  \param theStream The BRep binary stream.
3672      *  \return New GEOM_Object, containing the shape, read from theStream.
3673      */
3674     GEOM_Object RestoreShape (in SALOMEDS::TMPFile theStream);
3675
3676     /*!
3677      * \brief Load texture from file
3678      * \param theTextureFile texture file name
3679      * \return unique texture identifier
3680      */
3681     long LoadTexture(in string theTextureFile);
3682
3683     /*!
3684      * \brief Add texture to the study
3685      * \param theWidth texture width in pixels
3686      * \param theHeight texture height in pixels
3687      * \param theTexture texture byte array
3688      * \return unique texture identifier
3689      */
3690     long AddTexture(in long theWidth, in long theHeight, in SALOMEDS::TMPFile theTexture);
3691
3692     /*!
3693      * \brief Get previously loaded texture data
3694      * \param theID texture identifier
3695      * \param theWidth texture width in pixels
3696      * \param theHeight texture height in pixels
3697      * \return texture byte array
3698      */
3699     SALOMEDS::TMPFile GetTexture(in long theID, out long theWidth, out long theHeight);
3700
3701     /*!
3702      * \brief Get list of all avaiable texture IDs
3703      * \return list of all texture IDs avaiable for the current study
3704      */
3705     ListOfLong GetAllTextures();
3706
3707     /*!
3708      *  Export a shape to XAO format
3709      *  \param shape The shape to export
3710      *  \param groups The list of groups to export
3711      *  \param fields The list of fields to export
3712      *  \param author The author of the export
3713      *  \param fileName The name of the file to export
3714      *  \return boolean indicating if export was successful.
3715      */
3716     boolean ExportXAO(in GEOM_Object shape,
3717                       in ListOfGO groups, in ListOfGO fields,
3718                       in string author, in string fileName);
3719     
3720     /*!
3721      *  Import a shape from XAO format
3722      *  \param fileName The name of the file to import
3723      *  \param shape The imported shape
3724      *  \param subShapes The list of imported subShapes
3725      *  \param groups The list of imported groups
3726      *  \param fields The list of imported fields
3727      *  \return boolean indicating if import was successful.
3728      */
3729     boolean ImportXAO(in string fileName, out GEOM_Object shape,
3730                       out ListOfGO subShapes, out ListOfGO groups, out ListOfGO fields);
3731   };
3732
3733  // # GEOM_IKindOfShape:
3734   /*!
3735    *  \brief Interface for shape_kind enumeration.
3736    */
3737   interface GEOM_IKindOfShape
3738   {
3739     enum shape_kind {
3740       NO_SHAPE,
3741       //COMPOSITEs
3742       COMPOUND,
3743       COMPSOLID,
3744       SHELL,
3745       WIRE,
3746       // SOLIDs
3747       /*! full sphere */
3748       SPHERE,
3749       /*! cylinder */
3750       CYLINDER,
3751       /*! box with faces, parallel to global coordinate planes */
3752       BOX,
3753       /*! other box */
3754       ROTATED_BOX, 
3755       /*! full torus */
3756       TORUS,   
3757       /*! cone */  
3758       CONE,   
3759       /*! solid, bounded by polygons */
3760       POLYHEDRON,  
3761       /*! other solid */
3762       SOLID,       
3763       // FACEs
3764       /*! spherical face (closed) */
3765       SPHERE2D,    
3766       /*! cylindrical face with defined height */
3767       CYLINDER2D,
3768       /*! toroidal face (closed) */
3769       TORUS2D,     
3770       /*! conical face with defined height */
3771       CONE2D,
3772       /*! planar, bounded by circle */
3773       DISK_CIRCLE,
3774       /*! planar, bounded by ellipse */
3775       DISK_ELLIPSE,
3776       /*! planar, bounded by segments */
3777       POLYGON,     
3778       /*! infinite planar */
3779       PLANE,        
3780        /*! other planar */
3781       PLANAR,      
3782       /*! other face */
3783       FACE,      
3784       // EDGEs
3785       /*! full circle */
3786       CIRCLE,      
3787       /*! arc of circle */
3788       ARC_CIRCLE, 
3789       /*! full ellipse */
3790       ELLIPSE,    
3791       /*! arc of ellipse */
3792       ARC_ELLIPSE,  
3793       /*! infinite segment */
3794       LINE,         
3795       /*! segment */
3796       SEGMENT,      
3797       /*! other edge */
3798       EDGE,       
3799       // VERTEX
3800       VERTEX,
3801       // ADVANCED shapes
3802       /*! all advanced shapes (temporary implementation) */
3803       ADVANCED    
3804     };
3805   };
3806
3807  // # GEOM_IMeasureOperations:
3808   /*!
3809    *  \brief Interface for measurement (distance, whatis) and
3810    *  properties calculation (like Centre of Mass, Inertia, etc.).
3811    *
3812    */
3813   interface GEOM_IMeasureOperations : GEOM_IOperations
3814   {
3815     /*!
3816      *  \brief Get kind of theShape.
3817      *  \param theShape Shape to get a kind of.
3818      *  \param theIntegers Output. Integer and enumerated shape's parameters
3819      *                     (kind of surface, closed/unclosed, number of edges, etc.)
3820      *  \param theDoubles  Output. Double shape's parameters (coordinates, dimensions, etc.)
3821      *  \note  Concrete meaning of each value, returned via \a theIntegers
3822      *         or \a theDoubles list depends on the kind of the shape.
3823      *  \return Returns a kind of shape in terms of <VAR>GEOM_IKindOfShape.shape_kind</VAR> enumeration.
3824      */
3825     //short KindOfShape (in GEOM_Object   theShape,
3826     GEOM_IKindOfShape::shape_kind KindOfShape (in  GEOM_Object  theShape,
3827                                                out ListOfLong   theIntegers,
3828                                                out ListOfDouble theDoubles);
3829
3830     /*!
3831      *  \brief Get position (LCS) of theShape.
3832      *  \param theShape Shape to calculate position of.
3833      *  \param Ox,Oy,Oz Output. Coordinates of shape's location origin.
3834      *                  Origin of the LCS is situated at the shape's center of mass.
3835      *  \param Zx,Zy,Zz Output. Coordinates of shape's location normal(main) direction.
3836      *  \param Xx,Xy,Xz Output. Coordinates of shape's location X direction.
3837      *                  Axes of the LCS are obtained from shape's location or,
3838      *                  if the shape is a planar face, from position of its plane.
3839      *  \return Returns position of the shape through the last nine arguments.
3840      */
3841     void GetPosition (in GEOM_Object theShape,
3842                       out double Ox, out double Oy, out double Oz,
3843                       out double Zx, out double Zy, out double Zz,
3844                       out double Xx, out double Xy, out double Xz);
3845
3846     /*!
3847      *  \brief Get summarized length of all wires,
3848      *  area of surface and volume of the given shape.
3849      *  \param theShape Shape to define properties of.
3850      *  \param theLength Output. Summarized length of all wires of the given shape.
3851      *  \param theSurfArea Output. Area of surface of the given shape.
3852      *  \param theVolume Output. Volume of the given shape.
3853      *  \return Returns shape properties through the last three arguments.
3854      */
3855     void GetBasicProperties (in GEOM_Object theShape,
3856                              out double theLength,
3857                              out double theSurfArea,
3858                              out double theVolume);
3859
3860     /*!
3861      *  \brief Get a point, situated at the centre of mass of theShape.
3862      *  \param theShape Shape to define centre of mass of.
3863      *  \return New GEOM_Object, containing the created point.
3864      */
3865     GEOM_Object GetCentreOfMass (in GEOM_Object theShape);
3866
3867     /*
3868      *  Get the vertex by index for 1D objects depends the edge/wire orientation
3869      *  \param theShape Shape (wire or edge) to find the vertex on it
3870      *  \param theIndex Index of vertex sub-shape
3871      *  \return New GEOM_Object, vertex.
3872      */
3873     GEOM_Object GetVertexByIndex( in GEOM_Object theShape, in long index );
3874
3875     /*!
3876      *  \brief Get a vector, representing the normal of theFace.
3877      *  If the face is not planar, theOptionalPoint is obligatory.
3878      *  \param theFace Shape (face) to define the normal of.
3879      *  \param theOptionalPoint Shape (point) to define the normal at.
3880      *                          Can be NULL in case of planar face.
3881      *  \return New GEOM_Object, containing the created normal vector.
3882      */
3883     GEOM_Object GetNormal (in GEOM_Object theFace,
3884                            in GEOM_Object theOptionalPoint);
3885
3886     /*!
3887      *  \brief Get inertia matrix and moments of inertia of theShape.
3888      *  \param theShape Shape to calculate inertia of.
3889      *  \param I11,I12,I13,I21,I22,I23,I31,I32,I33 Output. Components of the inertia matrix of the given shape.
3890      *  \param Ix,Iy,Iz Output. Moments of inertia of the given shape.
3891      *  \return Returns inertia through the last twelve arguments.
3892      */
3893     void GetInertia (in GEOM_Object theShape,
3894                      out double I11, out double I12, out double I13,
3895                      out double I21, out double I22, out double I23,
3896                      out double I31, out double I32, out double I33,
3897                      out double Ix , out double Iy , out double Iz);
3898
3899     /*!
3900      *  \brief Get parameters of bounding box of the given shape
3901      *  \param theShape Shape to obtain bounding box of.
3902      *  \param precise TRUE for precise computation; FALSE for fast one.
3903      *  \param Xmin,Xmax Output. Limits of shape along OX axis.
3904      *  \param Ymin,Ymax Output. Limits of shape along OY axis.
3905      *  \param Zmin,Zmax Output. Limits of shape along OZ axis.
3906      *  \return Returns parameters of bounding box through the last six arguments.
3907      */
3908     void GetBoundingBox (in GEOM_Object theShape,
3909                          in boolean precise,
3910                          out double Xmin, out double Xmax,
3911                          out double Ymin, out double Ymax,
3912                          out double Zmin, out double Zmax);
3913
3914     /*!
3915      *  \brief Get bounding box of the given shape
3916      *  \param theShape Shape to obtain bounding box of.
3917      *  \param precise TRUE for precise computation; FALSE for fast one.
3918      *  \return New GEOM_Object, containing the created bounding box.
3919      */
3920     GEOM_Object MakeBoundingBox (in GEOM_Object theShape,
3921                                  in boolean precise);
3922
3923     /*!
3924      *  \brief Get min and max tolerances of sub-shapes of theShape
3925      *  \param theShape Shape, to get tolerances of.
3926      *  \param FaceMin,FaceMax Output. Min and max tolerances of the faces.
3927      *  \param EdgeMin,EdgeMax Output. Min and max tolerances of the edges.
3928      *  \param VertMin,VertMax Output. Min and max tolerances of the vertices.
3929      *  \return Returns shape tolerances through the last six arguments.
3930      */
3931     void GetTolerance (in GEOM_Object theShape,
3932                        out double FaceMin, out double FaceMax,
3933                        out double EdgeMin, out double EdgeMax,
3934                        out double VertMin, out double VertMax);
3935
3936     /*!
3937      *  \brief Check a topology of the given shape.
3938      *  \param theShape Shape to check validity of.
3939      *  \param theDescription Output. Description of problems in the shape, if they are.
3940      *  \return TRUE, if the shape "seems to be valid" from the topological point of view.
3941      */
3942     boolean CheckShape (in GEOM_Object theShape,
3943                         out string     theDescription);
3944
3945     /*!
3946      *  \brief Check a topology and a geometry of the given shape.
3947      *  \param theShape Shape to check validity of.
3948      *  \param theDescription Output. Description of problems in the shape, if they are.
3949      *  \return TRUE, if the shape "seems to be valid".
3950      */
3951     boolean CheckShapeWithGeometry (in GEOM_Object theShape,
3952                                     out string     theDescription);
3953
3954     /*!
3955      *  \brief Check a topology of the given shape on self-intersections presence.
3956      *  \param theShape Shape to check validity of.
3957      *  \param theIntersections Output. List of intersected sub-shapes IDs, it contains pairs of IDs.
3958      *  \return TRUE, if the shape does not have any self-intersections.
3959      */
3960     boolean CheckSelfIntersections (in GEOM_Object theShape,
3961                                     out ListOfLong theIntersections);
3962
3963     /*!
3964      *  \brief Check if the given shape can be an argument for MakeSolid operation
3965      *  \param theShape Shape to be described.
3966      *  \return Empty string if a solid can be made on this shape, error code otherwise.
3967      */
3968     string IsGoodForSolid (in GEOM_Object theShape);
3969
3970     /*!
3971      *  O\brief btain description of the given shape
3972      *  \param theShape Shape to be described.
3973      *  \return Description of the given shape.
3974      */
3975     string WhatIs (in GEOM_Object theShape);
3976
3977     /*!
3978      *  \brief Check if points defined by coords = [x1, y1, z1, x2, y2, z2, ...] are inside or on
3979      *  the shape theShape.
3980      *  \param theShape Shape to check.
3981      *  \param coords list of coordinates.
3982      *  \param tolerance tolerance.
3983      *  \return list of boolean.
3984      */
3985     ListOfBool AreCoordsInside(in GEOM_Object theShape, in ListOfDouble coords, in double tolerance);
3986
3987     /*!
3988      *  \brief Get minimal distance between the given shapes.
3989      *  \param theShape1,theShape2 Shapes to find minimal distance between.
3990      *  \param X1,Y1,Z1 Output. Coordinates of point on theShape1, nearest to theShape2.
3991      *  \param X2,Y2,Z2 Output. Coordinates of point on theShape2, nearest to theShape1.
3992      *  \return Value of the minimal distance between the given shapes.
3993      */
3994     double GetMinDistance (in GEOM_Object theShape1, in GEOM_Object theShape2,
3995                            out double X1, out double Y1, out double Z1,
3996                            out double X2, out double Y2, out double Z2);
3997
3998     /*!
3999      *  \brief Get closest points of the given shapes.
4000      *  \param theShape1,theShape2 Shapes to find closest points of.
4001      *  \param theCoords Output. List of (X, Y, Z) coordinates for all couples of points.
4002      *  \return The number of found solutions (-1 in case of infinite number of solutions).
4003      */
4004     long ClosestPoints (in GEOM_Object theShape1,
4005                         in GEOM_Object theShape2,
4006                         out ListOfDouble theCoords);
4007
4008     /*!
4009      *  \brief Get angle between the given lines or linear edges.
4010      *  \param theShape1,theShape2 Shapes to find angle between. Lines or linear edges.
4011      *  \return Value of the angle between the given shapes.
4012      */
4013     double GetAngle (in GEOM_Object theShape1, in GEOM_Object theShape2);
4014
4015     /*!
4016      *  \brief Get angle between the given vectors.
4017      *  \param theShape1,theShape2 Vectors to find angle between.
4018      *  \return Value of the angle between the given vectors.
4019      */
4020     double GetAngleBtwVectors (in GEOM_Object theShape1, in GEOM_Object theShape2);
4021
4022     /*!
4023      *  \brief Get point coordinates
4024      */
4025     void PointCoordinates (in GEOM_Object theShape, out double X, out double Y, out double Z);
4026
4027     /*!
4028      *  \brief Get radius of curvature of curve in the point determinated by param
4029      *  \param theShape - curve.
4030      *  \param theParam - parameter on curve
4031      *  \return Value of curvature.
4032      */
4033     double CurveCurvatureByParam (in GEOM_Object theShape, in double theParam);
4034
4035     /*!
4036      *  \brief Get radius of curvature of curve in the given point
4037      *  \param theShape - curve.
4038      *  \param thePoint - point
4039      *  \return Value of curvature.
4040      */
4041     double CurveCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
4042
4043     /*!
4044      *  \brief Get max radius of curvature of surface in the point determinated by params
4045      *  \param theShape - surface.
4046      *  \param theUParam - U-parameter on surface
4047      *  \param theVParam - V-parameter on surface
4048      *  \return Value of curvature.
4049      */
4050     double MaxSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
4051                                        in double theVParam);
4052
4053     /*!
4054      *  \brief Get max radius of curvature of surface in the given point
4055      *  \param theShape - surface.
4056      *  \param thePoint - point
4057      *  \return Value of curvature.
4058      */
4059     double MaxSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
4060
4061     /*!
4062      *  \brief Get min radius of curvature of surface in the point determinated by params
4063      *  \param theShape - surface.
4064      *  \param theUParam - U-parameter on surface
4065      *  \param theVParam - V-parameter on surface
4066      *  \return Value of curvature.
4067      */
4068     double MinSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
4069                                        in double theVParam);
4070
4071     /*!
4072      *  \brief Get min radius of curvature of surface in the given point
4073      *  \param theShape - surface.
4074      *  \param thePoint - point
4075      *  \return Value of curvature.
4076      */
4077     double MinSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
4078
4079   };
4080
4081  // # GEOM_IGroupOperations:
4082   /*!
4083    *  \brief Interface for groups creation.
4084    */
4085   interface GEOM_IGroupOperations : GEOM_IOperations
4086   {
4087     /*!
4088      *  \brief Creates a new group which will store  sub-shapes of theMainShape
4089      *  \param theMainShape is a GEOM_Object on which the group is selected
4090      *  \param theShapeType defines a shape type of the group
4091      *  \return a newly created GEOM group
4092      */
4093     GEOM_Object CreateGroup (in GEOM_Object theMainShape, in long theShapeType);
4094
4095     /*!
4096      *  \brief Adds a sub-object with ID theSubShapeId to the group
4097      *  \param theGroup is a GEOM group to which the new sub-shape is added
4098      *  \param theSubShapeId is a sub-shape ID in the main object.
4099      *  \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub-shape
4100      */
4101     void AddObject (in GEOM_Object theGroup, in long theSubShapeId);
4102
4103     /*!
4104      *  \brief Removes a sub-object with ID \a theSubShapeId from the group
4105      *  \param theGroup is a GEOM group from which the sub-shape is removed.
4106      *  \param theSubShapeId is a sub-shape ID in the main object.
4107      *  \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub-shape
4108      */
4109     void RemoveObject (in GEOM_Object theGroup, in long theSubShapeId);
4110
4111     /*!
4112      *  \brief Adds to the group all the given shapes. No errors, if some shapes are alredy included.
4113      *  \param theGroup is a GEOM group to which the new sub-shapes are added.
4114      *  \param theSubShapes is a list of sub-shapes to be added.
4115      */
4116     void UnionList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
4117
4118     /*!
4119      *  \brief Removes from the group all the given shapes. No errors, if some shapes are not included.
4120      *  \param theGroup is a GEOM group from which the sub-shapes are removed.
4121      *  \param theSubShapes is a list of sub-shapes to be removed.
4122      */
4123     void DifferenceList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
4124
4125     /*!
4126      *  \brief Adds to the group all the given shapes. No errors, if some shapes are alredy included.
4127      *  \param theGroup is a GEOM group to which the new sub-shapes are added.
4128      *  \param theSubShapes is a list of IDs of sub-shapes to be added.
4129      */
4130     void UnionIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
4131
4132     /*!
4133      *  \brief Removes from the group all the given shapes. No errors, if some shapes are not included.
4134      *  \param theGroup is a GEOM group from which the sub-shapes are removed.
4135      *  \param theSubShapes is a list of IDs of sub-shapes to be removed.
4136      */
4137     void DifferenceIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
4138
4139     /*!
4140      *  \brief Union of two groups.
4141      *  New group is created. It will contain all entities
4142      *  which are present in groups theGroup1 and theGroup2.
4143      *  \param theGroup1, theGroup2 are the initial GEOM groups
4144      *                              to create the united group from.
4145      *  \return a newly created GEOM group.
4146      */
4147     GEOM_Object UnionGroups (in GEOM_Object theGroup1, in GEOM_Object theGroup2);
4148
4149     /*!
4150      *  \brief Intersection of two groups.
4151      *  New group is created. It will contain only those entities
4152      *  which are present in both groups theGroup1 and theGroup2.
4153      *  \param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
4154      *  \return a newly created GEOM group.
4155      */
4156     GEOM_Object IntersectGroups (in GEOM_Object theGroup1, in GEOM_Object theGroup2);
4157
4158     /*!
4159      *  \brief Cut of two groups.
4160      *  New group is created. It will contain entities which are
4161      *  present in group theGroup1 but are not present in group theGroup2.
4162      *  \param theGroup1 is a GEOM group to include elements of.
4163      *  \param theGroup2 is a GEOM group to exclude elements of.
4164      *  \return a newly created GEOM group.
4165      */
4166     GEOM_Object CutGroups (in GEOM_Object theGroup1, in GEOM_Object theGroup2);
4167
4168     /*!
4169      *  \brief Union of list of groups.
4170      *  New group is created. It will contain all entities that are
4171      *  present in groups listed in theGList.
4172      *  \param theGList is a list of GEOM groups to create the united group from.
4173      *  \return a newly created GEOM group.
4174      */
4175     GEOM_Object UnionListOfGroups (in ListOfGO theGList);
4176
4177     /*!
4178      *  \brief Intersection of list of groups.
4179      *  New group is created. It will contain only entities
4180      *  which are simultaneously present in the groups listed in theGList.
4181      *  \param theGList is a list of GEOM groups to get common part of.
4182      *  \return a newly created GEOM group.
4183      */
4184     GEOM_Object IntersectListOfGroups (in ListOfGO theGList);
4185
4186     /*!
4187      *  \brief Cut of lists of groups.
4188      *  New group is created. It will contain only entities
4189      *  which are present in groups listed in theGList1 but 
4190      *  are not present in groups from theGList2.
4191      *  \param theGList1 is a list of GEOM groups to include elements of.
4192      *  \param theGList2 is a list of GEOM groups to exclude elements of.
4193      *  \return a newly created GEOM group.
4194      */
4195     GEOM_Object CutListOfGroups (in ListOfGO theGList1,
4196                                  in ListOfGO theGList2);
4197
4198     /*!
4199      *  \brief Returns a type of sub-objects stored in the group
4200      *  \param theGroup is a GEOM group which type is returned.
4201      */
4202     long GetType (in GEOM_Object theGroup);
4203
4204     /*!
4205      *  \brief Returns a main shape associated with the group
4206      *  \param theGroup is a GEOM group for which a main shape object is requested
4207      *  \return a GEOM_Object which is a main shape for theGroup
4208      */
4209     GEOM_Object GetMainShape (in GEOM_Object theGroup);
4210
4211     /*!
4212      *  \brief Returns a list of sub-objects ID stored in the group
4213      *  \param theGroup is a GEOM group for which a list of IDs is requested
4214      */
4215     ListOfLong GetObjects (in GEOM_Object theGroup);
4216   };
4217
4218  // # GEOM_IAdvancedOperations:
4219   /*!
4220    *  \brief Interface for advanced modeling functions.
4221    */
4222   interface GEOM_IAdvancedOperations : GEOM_IOperations
4223   {
4224     // T-Shape WITHOUT Thickness reduction
4225
4226     /*!
4227      *  \brief Create a T-shape object with specified caracteristics for the main and
4228      *  the incident pipes (radius, width, half-length).
4229      *
4230      *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
4231      *  \param theR1 Internal radius of main pipe
4232      *  \param theW1 Width of main pipe
4233      *  \param theL1 Half-length of main pipe
4234      *  \param theR2 Internal radius of incident pipe (R2 < R1)
4235      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
4236      *  \param theL2 Half-length of incident pipe
4237      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
4238      *  \return List of GEOM_Object, containing the created shape and propagation groups.
4239      */
4240     ListOfGO MakePipeTShape (in double theR1, in double theW1, in double theL1,
4241                              in double theR2, in double theW2, in double theL2,
4242                              in boolean theHexMesh);
4243     /*!
4244      *  \brief Create a T-shape object with specified caracteristics for the main and
4245      *  the incident pipes (radius, width, half-length).
4246      *
4247      *  The extremities of the main pipe are located on junctions points P1 and P2.
4248      *  The extremity of the incident pipe is located on junction point P3.
4249      *  \param theR1 Internal radius of main pipe
4250      *  \param theW1 Width of main pipe
4251      *  \param theL1 Half-length of main pipe
4252      *  \param theR2 Internal radius of incident pipe (R2 < R1)
4253      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
4254      *  \param theL2 Half-length of incident pipe
4255      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
4256      *  \param theP1 1st junction point of main pipe
4257      *  \param theP2 2nd junction point of main pipe
4258      *  \param theP3 Junction point of incident pipe
4259      *  \return List of GEOM_Object, containing the created shape and propagation groups.
4260      */
4261     ListOfGO MakePipeTShapeWithPosition (in double theR1, in double theW1, in double theL1,
4262                                          in double theR2, in double theW2, in double theL2,
4263                                          in boolean theHexMesh,
4264                                          in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
4265     /*!
4266      *  \brief Create a T-shape object with specified caracteristics for the main and
4267      *  the incident pipes (radius, width, half-length). A chamfer is created
4268      *  on the junction of the pipes.
4269      *  
4270      *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
4271      *  \param theR1 Internal radius of main pipe
4272      *  \param theW1 Width of main pipe
4273      *  \param theL1 Half-length of main pipe
4274      *  \param theR2 Internal radius of incident pipe (R2 < R1)
4275      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
4276      *  \param theL2 Half-length of incident pipe
4277      *  \param theH Height of the chamfer.
4278      *  \param theW Width of the chamfer.
4279      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
4280      *  \return List of GEOM_Object, containing the created shape and propagation groups.
4281      */
4282     ListOfGO MakePipeTShapeChamfer (in double theR1, in double theW1, in double theL1,
4283                                     in double theR2, in double theW2, in double theL2,
4284                                     in double theH, in double theW, in boolean theHexMesh);
4285     /*!
4286      *  \brief Create a T-shape object with specified caracteristics for the main and
4287      *  the incident pipes (radius, width, half-length). 
4288      * 
4289      *  A chamfer is created on the junction of the pipes.
4290      *  The extremities of the main pipe are located on junctions points P1 and P2.
4291      *  The extremity of the incident pipe is located on junction point P3.
4292      *  \param theR1 Internal radius of main pipe
4293      *  \param theW1 Width of main pipe
4294      *  \param theL1 Half-length of main pipe
4295      *  \param theR2 Internal radius of incident pipe (R2 < R1)
4296      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
4297      *  \param theL2 Half-length of incident pipe
4298      *  \param theH Height of the chamfer.
4299      *  \param theW Width of the chamfer.
4300      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
4301      *  \param theP1 1st junction point of main pipe
4302      *  \param theP2 2nd junction point of main pipe
4303      *  \param theP3 Junction point of incident pipe
4304      *  \return List of GEOM_Object, containing the created shape and propagation groups.
4305      */
4306     ListOfGO MakePipeTShapeChamferWithPosition (in double theR1, in double theW1, in double theL1,
4307                                                 in double theR2, in double theW2, in double theL2,
4308                                                 in double theH, in double theW, in boolean theHexMesh,
4309                                                 in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
4310     /*!
4311      *  \brief Create a T-shape object with specified caracteristics for the main and
4312      *  the incident pipes (radius, width, half-length). 
4313      *
4314      *  A fillet is created on the junction of the pipes.
4315      *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
4316      *  \param theR1 Internal radius of main pipe
4317      *  \param theW1 Width of main pipe
4318      *  \param theL1 Half-length of main pipe
4319      *  \param theR2 Internal radius of incident pipe (R2 < R1)
4320      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
4321      *  \param theL2 Half-length of incident pipe
4322      *  \param theRF Radius of curvature of fillet.
4323      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
4324      *  \return List of GEOM_Object, containing the created shape and propagation groups.
4325      */
4326     ListOfGO MakePipeTShapeFillet (in double theR1, in double theW1, in double theL1,
4327                                    in double theR2, in double theW2, in double theL2,
4328                                    in double theRF, in boolean theHexMesh);
4329     /*!
4330      *  \brief Create a T-shape object with specified caracteristics for the main and
4331      *  the incident pipes (radius, width, half-length).
4332      *
4333      *  A fillet is created on the junction of the pipes.
4334      *  The extremities of the main pipe are located on junctions points P1 and P2.
4335      *  The extremity of the incident pipe is located on junction point P3.
4336      *  \param theR1 Internal radius of main pipe
4337      *  \param theW1 Width of main pipe
4338      *  \param theL1 Half-length of main pipe
4339      *  \param theR2 Internal radius of incident pipe (R2 < R1)
4340      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
4341      *  \param theL2 Half-length of incident pipe
4342      *  \param theRF Radius of curvature of fillet.
4343      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
4344      *  \param theP1 1st junction point of main pipe
4345      *  \param theP2 2nd junction point of main pipe
4346      *  \param theP3 Junction point of incident pipe
4347      *  \return List of GEOM_Object, containing the created shape and propagation groups.
4348      */
4349     ListOfGO MakePipeTShapeFilletWithPosition (in double theR1, in double theW1, in double theL1,
4350                                                in double theR2, in double theW2, in double theL2,
4351                                                in double theRF, in boolean theHexMesh,
4352                                                in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
4353
4354     // T-Shape WITH Thickness reduction
4355
4356     /*!
4357      *  \brief Create a T-shape object with specified caracteristics for the main and
4358      *  the incident pipes (radius, width, half-length).
4359      *
4360      *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
4361      *  \param theR1 Internal radius of main pipe
4362      *  \param theW1 Width of main pipe
4363      *  \param theL1 Half-length of main pipe
4364      *  \param theR2 Internal radius of incident pipe (R2 < R1)
4365      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
4366      *  \param theL2 Half-length of incident pipe
4367      *
4368      *  \param theRL Internal radius of left thickness reduction
4369      *  \param theWL Width of left thickness reduction
4370      *  \param theLtransL Length of left transition part
4371      *  \param theLthinL Length of left thin part
4372      *
4373      *  \param theRR Internal radius of right thickness reduction
4374      *  \param theWR Width of right thickness reduction
4375      *  \param theLtransR Length of right transition part
4376      *  \param theLthinR Length of right thin part
4377      *
4378      *  \param theRI Internal radius of incident thickness reduction
4379      *  \param theWI Width of incident thickness reduction
4380      *  \param theLtransI Length of incident transition part
4381      *  \param theLthinI Length of incident thin part
4382      *
4383      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
4384      *  \return List of GEOM_Object, containing the created shape and propagation groups.
4385      */
4386     ListOfGO MakePipeTShapeTR (in double theR1, in double theW1, in double theL1,
4387                                in double theR2, in double theW2, in double theL2,
4388                                in double theRL, in double theWL, in double theLtransL, in double theLthinL,
4389                                in double theRR, in double theWR, in double theLtransR, in double theLthinR,
4390                                in double theRI, in double theWI, in double theLtransI, in double theLthinI,
4391                                in boolean theHexMesh);
4392     /*!
4393      *  \brief Create a T-shape object with specified caracteristics for the main and
4394      *  the incident pipes (radius, width, half-length).
4395      *
4396      *  The extremities of the main pipe are located on junctions points P1 and P2.
4397      *  The extremity of the incident pipe is located on junction point P3.
4398      *  \param theR1 Internal radius of main pipe
4399      *  \param theW1 Width of main pipe
4400      *  \param theL1 Half-length of main pipe
4401      *  \param theR2 Internal radius of incident pipe (R2 < R1)
4402      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
4403      *  \param theL2 Half-length of incident pipe
4404      *
4405      *  \param theRL Internal radius of left thickness reduction
4406      *  \param theWL Width of left thickness reduction
4407      *  \param theLtransL Length of left transition part
4408      *  \param theLthinL Length of left thin part
4409      *
4410      *  \param theRR Internal radius of right thickness reduction
4411      *  \param theWR Width of right thickness reduction
4412      *  \param theLtransR Length of right transition part
4413      *  \param theLthinR Length of right thin part
4414      *
4415      *  \param theRI Internal radius of incident thickness reduction
4416      *  \param theWI Width of incident thickness reduction
4417      *  \param theLtransI Length of incident transition part
4418      *  \param theLthinI Length of incident thin part
4419      *
4420      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
4421      *  \param theP1 1st junction point of main pipe
4422      *  \param theP2 2nd junction point of main pipe
4423      *  \param theP3 Junction point of incident pipe
4424      *  \return List of GEOM_Object, containing the created shape and propagation groups.
4425      */
4426     ListOfGO MakePipeTShapeTRWithPosition
4427                  (in double theR1, in double theW1, in double theL1,
4428                   in double theR2, in double theW2, in double theL2,
4429                   in double theRL, in double theWL, in double theLtransL, in double theLthinL,
4430                   in double theRR, in double theWR, in double theLtransR, in double theLthinR,
4431                   in double theRI, in double theWI, in double theLtransI, in double theLthinI,
4432                   in boolean theHexMesh,
4433                   in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
4434     /*!
4435      *  \brief Create a T-shape object with specified caracteristics for the main and
4436      *  the incident pipes (radius, width, half-length). A chamfer is created
4437      *  on the junction of the pipes.
4438      *  
4439      *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
4440      *  \param theR1 Internal radius of main pipe
4441      *  \param theW1 Width of main pipe
4442      *  \param theL1 Half-length of main pipe
4443      *  \param theR2 Internal radius of incident pipe (R2 < R1)
4444      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
4445      *  \param theL2 Half-length of incident pipe
4446      *
4447      *  \param theRL Internal radius of left thickness reduction
4448      *  \param theWL Width of left thickness reduction
4449      *  \param theLtransL Length of left transition part
4450      *  \param theLthinL Length of left thin part
4451      *
4452      *  \param theRR Internal radius of right thickness reduction
4453      *  \param theWR Width of right thickness reduction
4454      *  \param theLtransR Length of right transition part
4455      *  \param theLthinR Length of right thin part
4456      *
4457      *  \param theRI Internal radius of incident thickness reduction
4458      *  \param theWI Width of incident thickness reduction
4459      *  \param theLtransI Length of incident transition part
4460      *  \param theLthinI Length of incident thin part
4461      *
4462      *  \param theH Height of the chamfer.
4463      *  \param theW Width of the chamfer.
4464      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
4465      *  \return List of GEOM_Object, containing the created shape and propagation groups.
4466      */
4467     ListOfGO MakePipeTShapeTRChamfer
4468                  (in double theR1, in double theW1, in double theL1,
4469                   in double theR2, in double theW2, in double theL2,
4470                   in double theRL, in double theWL, in double theLtransL, in double theLthinL,
4471                   in double theRR, in double theWR, in double theLtransR, in double theLthinR,
4472                   in double theRI, in double theWI, in double theLtransI, in double theLthinI,
4473                   in double theH, in double theW, in boolean theHexMesh);
4474     /*!
4475      *  \brief Create a T-shape object with specified caracteristics for the main and
4476      *  the incident pipes (radius, width, half-length). 
4477      * 
4478      *  A chamfer is created on the junction of the pipes.
4479      *  The extremities of the main pipe are located on junctions points P1 and P2.
4480      *  The extremity of the incident pipe is located on junction point P3.
4481      *  \param theR1 Internal radius of main pipe
4482      *  \param theW1 Width of main pipe
4483      *  \param theL1 Half-length of main pipe
4484      *  \param theR2 Internal radius of incident pipe (R2 < R1)
4485      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
4486      *  \param theL2 Half-length of incident pipe
4487      *
4488      *  \param theRL Internal radius of left thickness reduction
4489      *  \param theWL Width of left thickness reduction
4490      *  \param theLtransL Length of left transition part
4491      *  \param theLthinL Length of left thin part
4492      *
4493      *  \param theRR Internal radius of right thickness reduction
4494      *  \param theWR Width of right thickness reduction
4495      *  \param theLtransR Length of right transition part
4496      *  \param theLthinR Length of right thin part
4497      *
4498      *  \param theRI Internal radius of incident thickness reduction
4499      *  \param theWI Width of incident thickness reduction
4500      *  \param theLtransI Length of incident transition part
4501      *  \param theLthinI Length of incident thin part
4502      *
4503      *  \param theH Height of the chamfer.
4504      *  \param theW Width of the chamfer.
4505      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
4506      *  \param theP1 1st junction point of main pipe
4507      *  \param theP2 2nd junction point of main pipe
4508      *  \param theP3 Junction point of incident pipe
4509      *  \return List of GEOM_Object, containing the created shape and propagation groups.
4510      */
4511     ListOfGO MakePipeTShapeTRChamferWithPosition
4512                  (in double theR1, in double theW1, in double theL1,
4513                   in double theR2, in double theW2, in double theL2,
4514                   in double theRL, in double theWL, in double theLtransL, in double theLthinL,
4515                   in double theRR, in double theWR, in double theLtransR, in double theLthinR,
4516                   in double theRI, in double theWI, in double theLtransI, in double theLthinI,
4517                   in double theH, in double theW, in boolean theHexMesh,
4518                   in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
4519     /*!
4520      *  \brief Create a T-shape object with specified caracteristics for the main and
4521      *  the incident pipes (radius, width, half-length). 
4522      *
4523      *  A fillet is created on the junction of the pipes.
4524      *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
4525      *  \param theR1 Internal radius of main pipe
4526      *  \param theW1 Width of main pipe
4527      *  \param theL1 Half-length of main pipe
4528      *  \param theR2 Internal radius of incident pipe (R2 < R1)
4529      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
4530      *  \param theL2 Half-length of incident pipe
4531      *
4532      *  \param theRL Internal radius of left thickness reduction
4533      *  \param theWL Width of left thickness reduction
4534      *  \param theLtransL Length of left transition part
4535      *  \param theLthinL Length of left thin part
4536      *
4537      *  \param theRR Internal radius of right thickness reduction
4538      *  \param theWR Width of right thickness reduction
4539      *  \param theLtransR Length of right transition part
4540      *  \param theLthinR Length of right thin part
4541      *
4542      *  \param theRI Internal radius of incident thickness reduction
4543      *  \param theWI Width of incident thickness reduction
4544      *  \param theLtransI Length of incident transition part
4545      *  \param theLthinI Length of incident thin part
4546      *
4547      *  \param theRF Radius of curvature of fillet.
4548      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
4549      *  \return List of GEOM_Object, containing the created shape and propagation groups.
4550      */
4551     ListOfGO MakePipeTShapeTRFillet
4552                  (in double theR1, in double theW1, in double theL1,
4553                   in double theR2, in double theW2, in double theL2,
4554                   in double theRL, in double theWL, in double theLtransL, in double theLthinL,
4555                   in double theRR, in double theWR, in double theLtransR, in double theLthinR,
4556                   in double theRI, in double theWI, in double theLtransI, in double theLthinI,
4557                   in double theRF, in boolean theHexMesh);
4558     /*!
4559      *  \brief Create a T-shape object with specified caracteristics for the main and
4560      *  the incident pipes (radius, width, half-length).
4561      *
4562      *  A fillet is created on the junction of the pipes.
4563      *  The extremities of the main pipe are located on junctions points P1 and P2.
4564      *  The extremity of the incident pipe is located on junction point P3.
4565      *  \param theR1 Internal radius of main pipe
4566      *  \param theW1 Width of main pipe
4567      *  \param theL1 Half-length of main pipe
4568      *  \param theR2 Internal radius of incident pipe (R2 < R1)
4569      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
4570      *  \param theL2 Half-length of incident pipe
4571      *
4572      *  \param theRL Internal radius of left thickness reduction
4573      *  \param theWL Width of left thickness reduction
4574      *  \param theLtransL Length of left transition part
4575      *  \param theLthinL Length of left thin part
4576      *
4577      *  \param theRR Internal radius of right thickness reduction
4578      *  \param theWR Width of right thickness reduction
4579      *  \param theLtransR Length of right transition part
4580      *  \param theLthinR Length of right thin part
4581      *
4582      *  \param theRI Internal radius of incident thickness reduction
4583      *  \param theWI Width of incident thickness reduction
4584      *  \param theLtransI Length of incident transition part
4585      *  \param theLthinI Length of incident thin part
4586      *
4587      *  \param theRF Radius of curvature of fillet.
4588      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
4589      *  \param theP1 1st junction point of main pipe
4590      *  \param theP2 2nd junction point of main pipe
4591      *  \param theP3 Junction point of incident pipe
4592      *  \return List of GEOM_Object, containing the created shape and propagation groups.
4593      */
4594     ListOfGO MakePipeTShapeTRFilletWithPosition
4595                  (in double theR1, in double theW1, in double theL1,
4596                   in double theR2, in double theW2, in double theL2,
4597                   in double theRL, in double theWL, in double theLtransL, in double theLthinL,
4598                   in double theRR, in double theWR, in double theLtransR, in double theLthinR,
4599                   in double theRI, in double theWI, in double theLtransI, in double theLthinI,
4600                   in double theRF, in boolean theHexMesh,
4601                   in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
4602
4603     /*!
4604      *  This function allows to create a disk already divided into blocks. It
4605      *  can be use to create divided pipes for later meshing in hexaedra.
4606      *  \param theR Radius of the disk
4607      *  \param theRatio Relative size of the central square diagonal against the disk diameter
4608      *  \param theOrientation Plane on which the disk will be built
4609      *  \param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
4610      *  \return New GEOM_Object, containing the created shape.
4611      */
4612     GEOM_Object MakeDividedDisk (in double theR, 
4613                                  in double theRatio, 
4614                                  in short theOrientation,
4615                                  in pattern thePattern);
4616
4617     /*!
4618      *  \brief Create a Disk prepared for hexa meshing with given center, normal vector and radius.
4619      *  \param thePnt disk center.
4620      *  \param theVec Vector, normal to the plane of the disk.
4621      *  \param theR Disk radius.
4622      *  \param theRatio Relative size of the central square diagonal against the disk diameter
4623      *  \param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
4624      *  \return New GEOM_Object, containing the created disk.
4625      */
4626     GEOM_Object MakeDividedDiskPntVecR ( in GEOM_Object thePnt,
4627                                          in GEOM_Object theVec,
4628                                          in double theR, 
4629                                          in double theRatio,
4630                                          in pattern thePattern);
4631
4632     /*!
4633      *  Builds a cylinder prepared for hexa meshes
4634      *  \param theR Radius of the cylinder
4635      *  \param theH Height of the cylinder
4636      *  \param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
4637      *  \return New GEOM_Object, containing the created shape.
4638      */
4639     GEOM_Object MakeDividedCylinder (in double theR, 
4640                                      in double theH,
4641                                      in pattern thePattern );
4642     /*!
4643      *  
4644      *  Create a smoothing surface from a set of points
4645      *  \param thelPoints list of points
4646      *  \return New GEOM_Object, containing the created shape.
4647      */
4648     GEOM_Object MakeSmoothingSurface (in ListOfGO thelPoints);
4649
4650     /*@@ insert new functions before this line @@ do not remove this line @@*/
4651   };
4652
4653  // # GEOM_IFieldOperations:
4654   /*!
4655    *  \brief Interface for field operation.
4656    */
4657   interface GEOM_IFieldOperations : GEOM_IOperations
4658   {
4659     /*!
4660      *  \brief Creates a field
4661      */
4662     GEOM_Field CreateField(in GEOM_Object     shape, 
4663                            in string          name,
4664                            in field_data_type type,
4665                            in short           dimension,
4666                            in string_array    componentNames);
4667     /*!
4668      *  \brief Returns number of fields on a shape
4669      */
4670     long CountFields(in GEOM_Object shape);
4671
4672     /*!
4673      *  \brief Returns all fields on a shape
4674      */
4675     ListOfFields GetFields(in GEOM_Object shape);
4676
4677     /*!
4678      *  \brief Returns a field on a shape by its name
4679      */
4680     GEOM_Field GetField(in GEOM_Object shape, in string name);
4681
4682     /*!
4683      *  \brief Returns number of sub-shapes of given dimension
4684      */
4685     long GetNbSubShapes(in GEOM_Object shape, in short fieldDim);
4686   };
4687
4688  // # GEOM_Gen:
4689   /*!
4690    *  \brief Interface to access other GEOM interfaces.
4691    *
4692    *  Also contains some methods to access and manage GEOM_Object.
4693    */
4694   interface GEOM_Gen : Engines::EngineComponent,SALOMEDS::Driver
4695   {
4696     /*!
4697      *  \brief Undo/Redo Management
4698      */
4699
4700     void Undo (in long theStudyID);
4701
4702     void Redo (in long theStudyID);
4703
4704     /*!
4705      * \brief Publishing management
4706      *
4707      * Adds in theStudy a object theObject under with a name theName,
4708      * if theFather is not NULL the object is placed under thFather's SObject.
4709      * Returns a SObject where theObject is placed
4710      */
4711     SALOMEDS::SObject AddInStudy (in SALOMEDS::Study theStudy,
4712                                   in GEOM_BaseObject theObject,
4713                                   in string          theName,
4714                                   in GEOM_BaseObject theFather);
4715
4716     /*!
4717      *  \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
4718      *
4719      *  To be used from python scripts out of geompy.addToStudy (non-default usage)
4720      *  \param theStudy  the study, in which theObject is published already,
4721      *                   and in which the arguments will be published
4722      *  \param theObject published GEOM_Object, arguments of which will be published
4723      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
4724      *                   If this list is empty, all operation arguments will be published
4725      *  \param theFindMethod method to search sub-shapes, corresponding to arguments and
4726      *                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
4727      *  \param theInheritFirstArg set properties of the first argument for \a theObject.
4728      *                            Do not publish sub-shapes in place of arguments, but only
4729      *                            in place of sub-shapes of the first argument,
4730      *                            because the whole shape corresponds to the first argument.
4731      *                            Mainly to be used after transformations, but it also can be
4732      *                            usefull after partition with one object shape, and some other
4733      *                            operations, where only the first argument has to be considered.
4734      *                            If theObject has only one argument shape, this flag is automatically
4735      *                            considered as True, not regarding really passed value.
4736      *  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
4737      *                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
4738      *  \return list of published sub-shapes
4739      */
4740     ListOfGO RestoreSubShapesO (in SALOMEDS::Study   theStudy,
4741                                 in GEOM_Object       theObject,
4742                                 in ListOfGO          theArgs,
4743                                 in find_shape_method theFindMethod,
4744                                 in boolean           theInheritFirstArg,
4745                                 in boolean           theAddPrefix);
4746
4747     /*!
4748      *  \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
4749      *
4750      *  To be used from python scripts out of geompy.addToStudy (non-default usage)
4751      *  \param theStudy  the study, in which theObject is published already,
4752      *                   and in which the arguments will be published
4753      *  \param theObject published GEOM_Object, arguments of which will be published
4754      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
4755      *                   If this list is empty, all operation arguments will be published
4756      *  \param theFindMethod method to search sub-shapes, corresponding to arguments and
4757      *                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
4758      *  \param theInheritFirstArg set properties of the first argument for \a theObject.
4759      *                            Do not publish sub-shapes in place of arguments, but only
4760      *                            in place of sub-shapes of the first argument,
4761      *                            because the whole shape corresponds to the first argument.
4762      *                            Mainly to be used after transformations, but it also can be
4763      *                            usefull after partition with one object shape, and some other
4764      *                            operations, where only the first argument has to be considered.
4765      *                            If theObject has only one argument shape, this flag is automatically
4766      *                            considered as True, not regarding really passed value.
4767      *  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
4768      *                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
4769      *  \return list of published sub-shapes
4770      */
4771     ListOfGO RestoreGivenSubShapesO (in SALOMEDS::Study   theStudy,
4772                                      in GEOM_Object       theObject,
4773                                      in ListOfGO          theArgs,
4774                                      in find_shape_method theFindMethod,
4775                                      in boolean           theInheritFirstArg,
4776                                      in boolean           theAddPrefix);
4777
4778     /*!
4779      *  \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
4780      *
4781      *  To be used from GUI and from geompy.addToStudy.
4782      *  Work like the above method, but accepts study object theSObject instead of GEOM_Object.
4783      *  \param theStudy  the study, in which theObject is published already,
4784      *                   and in which the arguments will be published
4785      *  \param theSObject study object, referencing GEOM_Object, arguments of which will be published
4786      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
4787      *                   If this list is empty, all operation arguments will be published
4788      *  \param theFindMethod method to search sub-shapes, corresponding to arguments and
4789      *                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
4790      *  \param theInheritFirstArg set properties of the first argument for \a theObject.
4791      *                            Do not publish sub-shapes in place of arguments, but only
4792      *                            in place of sub-shapes of the first argument,
4793      *                            because the whole shape corresponds to the first argument.
4794      *                            Mainly to be used after transformations, but it also can be
4795      *                            usefull after partition with one object shape, and some other
4796      *                            operations, where only the first argument has to be considered.
4797      *                            If theObject has only one argument shape, this flag is automatically
4798      *                            considered as True, not regarding really passed value.
4799      *  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
4800      *                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
4801      */
4802     ListOfGO RestoreSubShapesSO (in SALOMEDS::Study   theStudy,
4803                                  in SALOMEDS::SObject theSObject,
4804                                  in ListOfGO          theArgs,
4805                                  in find_shape_method theFindMethod,
4806                                  in boolean           theInheritFirstArg,
4807                                  in boolean           theAddPrefix);
4808
4809     // #  Methods to access interfaces for objects creation and transformation
4810
4811     GEOM_IBasicOperations     GetIBasicOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
4812     GEOM_ITransformOperations GetITransformOperations(in long theStudyID) raises (SALOME::SALOME_Exception);
4813     GEOM_I3DPrimOperations    GetI3DPrimOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
4814     GEOM_IShapesOperations    GetIShapesOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
4815     GEOM_IBooleanOperations   GetIBooleanOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
4816     GEOM_ICurvesOperations    GetICurvesOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
4817     GEOM_ILocalOperations     GetILocalOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
4818     GEOM_IHealingOperations   GetIHealingOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
4819     GEOM_IInsertOperations    GetIInsertOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
4820     GEOM_IMeasureOperations   GetIMeasureOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
4821     GEOM_IBlocksOperations    GetIBlocksOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
4822     GEOM_IGroupOperations     GetIGroupOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
4823     GEOM_IFieldOperations     GetIFieldOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
4824
4825     GEOM_IOperations GetPluginOperations (in long   theStudyID,
4826                                           in string theLibName) raises (SALOME::SALOME_Exception);
4827
4828     // # Objects Management
4829
4830
4831     /*!
4832      *  \brief Removes the object from the GEOM component
4833      *  \param theObject is a GEOM_Object to be removed
4834      */
4835     void RemoveObject (in GEOM_BaseObject theObject);
4836
4837     /*!
4838      *  \brief Returns an object defined by the study and its entry in the GEOM component
4839      *  \param theStudyID is a SALOMEDS Study ID
4840      *  \param theEntry is an entry of the requested GEOM_Object in the GEOM component
4841      *  \note if the object has not previously been created a NULL GEOM_Object is returned
4842      */
4843     GEOM_BaseObject GetObject (in long theStudyID, in string theEntry);
4844
4845     /*!
4846      *  \brief Add a sub-shape defined by indices in \a theIndices
4847      *  (contains unique IDs of sub-shapes inside \a theMainShape)
4848      *  \note The sub-shape GEOM_Object can has ONLY ONE function.
4849      *        Don't try to apply modification operations on them.
4850      *  \note Internal method
4851      */
4852     GEOM_Object AddSubShape (in GEOM_Object theMainShape, in ListOfLong theIndices);
4853
4854  // #  GEOM_Objects IOR Management
4855     
4856     /*!
4857      *  \brief Returns a GEOM_Object defined by its IOR
4858      *  \param theIOR a string containg an IOR of the requested GEOM_Object
4859      */
4860     GEOM_Object GetIORFromString (in string theIOR);
4861
4862     /*!
4863      *  \brief Returns a string which contains an IOR of the GEOM_Object
4864      *  \param theObject is a GEOM_Object which IOR is requested
4865      */
4866     string GetStringFromIOR (in GEOM_Object theObject);
4867
4868     /*!
4869      *  \brief Returns a name with which a GEOM_Object was dumped into python script
4870      *  \param theStudyEntry is an entry of the GEOM_Object in the study
4871      */
4872     string GetDumpName (in string theStudyEntry);
4873
4874     /*!
4875      *  \brief Returns all names with which a GEOM_Object was dumped
4876      *  into python script to avoid the same names in SMESH script
4877      */
4878     string_array GetAllDumpNames();
4879
4880     /*!
4881      *  \brief Publishes the named sub-shapes of given object in the study.
4882      *  \param theStudy    The study in which the object is published
4883      *  \param theObject   The object which named sub-shapes are published
4884      */
4885     ListOfGO PublishNamedShapesInStudy(in SALOMEDS::Study theStudy,
4886                                        //in SObject theSObject,
4887                                        in Object theObject);
4888
4889     /*!
4890      * \brief Creates a new folder
4891      *
4892      * Creates a new container (folder) for any GEOM objects.
4893      * Folder will have name theName.
4894      * If theFather is not NULL, the folder is placed under theFather object.
4895      * Otherwise, the folder takes place under root 'Geometry' object.
4896      * 
4897      * \param theName name of the folder
4898      * \param theFather parent object
4899      * \return SObject represented the created folder.
4900      */
4901     SALOMEDS::SObject CreateFolder (in string theName,
4902                                     in SALOMEDS::SObject theFather);
4903
4904     /*!
4905      * \brief Moves object to the specified folder
4906      *
4907      * The moved object should be first published in the study.
4908      * \param theObject GEOM object to move
4909      * \param theFolder target folder
4910      */
4911     void MoveToFolder (in GEOM_Object theObject,
4912                        in SALOMEDS::SObject theFolder);
4913
4914     /*!
4915      * \brief Moves list of objects to the specified folder
4916      *
4917      * The moved objects should be first published in the study.
4918      * \param theListOfGO list of GEOM objects to move
4919      * \param theFolder target folder
4920      */
4921     void MoveListToFolder (in ListOfGO theListOfGO,
4922                            in SALOMEDS::SObject theFolder);
4923
4924     /*!
4925      * \brief Moves objects to the specified position
4926      *
4927      * This function is used in the drag-n-drop functionality.
4928      *
4929      * \param what objects being moved
4930      * \param where parent object where objects are moved to
4931      * \param row position in the parent object's children list at which objects are moved
4932      */
4933     void Move( in object_list what, 
4934                in SALOMEDS::SObject where, 
4935                in long row );
4936   };
4937 };
4938
4939 #endif