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