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