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