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