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