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