Salome HOME
0022754: [EDF] Surface of a face
[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      *  \brief Resize the input edge with the new Min and Max parameters.
2544      *  The input edge parameters range is [0, 1]. If theMin parameter is
2545      *  negative, the input edge is extended, otherwise it is shrinked by
2546      *  theMin parameter. If theMax is greater than 1, the edge is extended,
2547      *  otherwise it is shrinked by theMax parameter.
2548      *  \param theEdge the input edge to be resized.
2549      *  \param theMin the minimal parameter value.
2550      *  \param theMax the maximal parameter value.
2551      *  \return a newly created edge.
2552      */
2553     GEOM_Object ExtendEdge(in GEOM_Object theEdge,
2554                            in double      theMin,
2555                            in double      theMax);
2556
2557     /*!
2558      *  \brief Resize the input face with the new UMin, UMax, VMin and VMax
2559      *  parameters. The input face U and V parameters range is [0, 1]. If
2560      *  theUMin parameter is negative, the input face is extended, otherwise
2561      *  it is shrinked along U direction by theUMin parameter. If theUMax is
2562      *  greater than 1, the face is extended, otherwise it is shrinked along
2563      *  U direction by theUMax parameter. So as for theVMin, theVMax and
2564      *  V direction of the input face.
2565      *  \param theFace the input face to be resized.
2566      *  \param theUMin the minimal U parameter value.
2567      *  \param theUMax the maximal U parameter value.
2568      *  \param theVMin the minimal V parameter value.
2569      *  \param theVMax the maximal V parameter value.
2570      *  \return a newly created face.
2571      */
2572     GEOM_Object ExtendFace(in GEOM_Object theFace,
2573                            in double      theUMin,
2574                            in double      theUMax,
2575                            in double      theVMin,
2576                            in double      theVMax);
2577
2578     /*!
2579      *  \brief Make a surface from a face. This function takes some face as
2580      *  input parameter and creates new GEOM_Object, i.e. topological shape
2581      *  by extracting underlying surface of the source face and limiting it
2582      *  by the Umin, Umax, Vmin, Vmax parameters of the source face (in the
2583      *  parametrical space).
2584      *  \param theFace the input face.
2585      *  \return a newly created face.
2586      */
2587     GEOM_Object MakeSurfaceFromFace(in GEOM_Object theFace);
2588
2589   };
2590
2591  // # GEOM_IBlocksOperations: 
2592   /*!
2593    *  \brief Interface for Blocks construction
2594    *  Face from points or edges, Block from faces,
2595    *  Blocks multi-translation and multi-rotation
2596    */
2597   interface GEOM_IBlocksOperations : GEOM_IOperations
2598   {
2599    
2600   //  # Creation of blocks
2601
2602     /*!
2603      *  \brief Create a quadrangle face from four edges. Order of Edges is not
2604      *  important. It is  not necessary that edges share the same vertex.
2605      *  \param theEdge1,theEdge2,theEdge3,theEdge4 Edges for the face bound.
2606      *  \return New GEOM_Object, containing the created face.
2607      */
2608     GEOM_Object MakeQuad (in GEOM_Object theEdge1,
2609                           in GEOM_Object theEdge2,
2610                           in GEOM_Object theEdge3,
2611                           in GEOM_Object theEdge4);
2612
2613     /*!
2614      *  \brief Create a quadrangle face on two edges.
2615      *
2616      *  The missing edges will be built by creating the shortest ones.
2617      *  \param theEdge1,theEdge2 Two opposite edges for the face.
2618      *  \return New GEOM_Object, containing the created face.
2619      */
2620     GEOM_Object MakeQuad2Edges (in GEOM_Object theEdge1,
2621                                 in GEOM_Object theEdge2);
2622
2623     /*!
2624      *  \brief Create a quadrangle face with specified corners.
2625      *
2626      *  The missing edges will be built by creating the shortest ones.
2627      *  \param thePnt1,thePnt2,thePnt3,thePnt4 Corner vertices for the face.
2628      *  \return New GEOM_Object, containing the created face.
2629      */
2630     GEOM_Object MakeQuad4Vertices (in GEOM_Object thePnt1,
2631                                    in GEOM_Object thePnt2,
2632                                    in GEOM_Object thePnt3,
2633                                    in GEOM_Object thePnt4);
2634
2635     /*!
2636      *  \brief Create a hexahedral solid, bounded by the six given faces. Order of
2637      *  faces is not important. 
2638      *
2639      *  It is  not necessary that Faces share the same edge.
2640      *  \param theFace1,theFace2,theFace3,theFace4,theFace5,theFace6 Faces for the hexahedral solid.
2641      *  \return New GEOM_Object, containing the created solid.
2642      */
2643     GEOM_Object MakeHexa (in GEOM_Object theFace1,
2644                           in GEOM_Object theFace2,
2645                           in GEOM_Object theFace3,
2646                           in GEOM_Object theFace4,
2647                           in GEOM_Object theFace5,
2648                           in GEOM_Object theFace6);
2649
2650     /*!
2651      *  \brief Create a hexahedral solid between two given faces.
2652      *
2653      *  The missing faces will be built by creating the smallest ones.
2654      *  \param theFace1,theFace2 Two opposite faces for the hexahedral solid.
2655      *  \return New GEOM_Object, containing the created solid.
2656      */
2657     GEOM_Object MakeHexa2Faces (in GEOM_Object theFace1,
2658                                 in GEOM_Object theFace2);
2659
2660     
2661   //  # Extract elements of blocks and blocks compounds
2662      
2663
2664     /*!
2665      *  \brief Get a vertex, found in the given shape by its coordinates.
2666      *  \param theShape Block or a compound of blocks.
2667      *  \param theX,theY,theZ Coordinates of the sought vertex.
2668      *  \param theEpsilon Maximum allowed distance between the resulting
2669      *                    vertex and point with the given coordinates.
2670      *  \return New GEOM_Object, containing the found vertex.
2671      */
2672     GEOM_Object GetPoint (in GEOM_Object theShape,
2673                           in double      theX,
2674                           in double      theY,
2675                           in double      theZ,
2676                           in double      theEpsilon);
2677
2678     /*!
2679      *  \brief Find a vertex of the given shape, which has minimal distance to the given point.
2680      *  \param theShape Any shape.
2681      *  \param thePoint Point, close to the desired vertex.
2682      *  \return New GEOM_Object, containing the found vertex.
2683      */
2684     GEOM_Object GetVertexNearPoint (in GEOM_Object theShape,
2685                                     in GEOM_Object thePoint);
2686
2687     /*!
2688      *  \brief Get an edge, found in the given shape by two given vertices.
2689      *  \param theShape Block or a compound of blocks.
2690      *  \param thePoint1,thePoint2 Points, close to the ends of the desired edge.
2691      *  \return New GEOM_Object, containing the found edge.
2692      */
2693     GEOM_Object GetEdge (in GEOM_Object theShape,
2694                          in GEOM_Object thePoint1,
2695                          in GEOM_Object thePoint2);
2696
2697     /*!
2698      *  \brief Find an edge of the given shape, which has minimal distance to the given point.
2699      *  \param theShape Block or a compound of blocks.
2700      *  \param thePoint Point, close to the desired edge.
2701      *  \return New GEOM_Object, containing the found edge.
2702      */
2703     GEOM_Object GetEdgeNearPoint (in GEOM_Object theShape,
2704                                   in GEOM_Object thePoint);
2705
2706     /*!
2707      *  \brief Returns a face, found in the given shape by four given corner vertices.
2708      *  \param theShape Block or a compound of blocks.
2709      *  \param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
2710      *  \return New GEOM_Object, containing the found face.
2711      */
2712     GEOM_Object GetFaceByPoints (in GEOM_Object theShape,
2713                                  in GEOM_Object thePoint1,
2714                                  in GEOM_Object thePoint2,
2715                                  in GEOM_Object thePoint3,
2716                                  in GEOM_Object thePoint4);
2717
2718     /*!
2719      *  \brief Get a face of block, found in the given shape by two given edges.
2720      *  \param theShape Block or a compound of blocks.
2721      *  \param theEdge1,theEdge2 Edges, close to the edges of the desired face.
2722      *  \return New GEOM_Object, containing the found face.
2723      */
2724     GEOM_Object GetFaceByEdges (in GEOM_Object theShape,
2725                                 in GEOM_Object theEdge1,
2726                                 in GEOM_Object theEdge2);
2727
2728     /*!
2729      *  \brief Find a face, opposite to the given one in the given block.
2730      *  \param theBlock Must be a hexahedral solid.
2731      *  \param theFace Face of \a theBlock, opposite to the desired face.
2732      *  \return New GEOM_Object, containing the found face.
2733      */
2734     GEOM_Object GetOppositeFace (in GEOM_Object theBlock,
2735                                  in GEOM_Object theFace);
2736
2737     /*!
2738      *  \brief Find a face of the given shape, which has minimal distance to the given point.
2739      *  \param theShape Block or a compound of blocks.
2740      *  \param thePoint Point, close to the desired face.
2741      *  \return New GEOM_Object, containing the found face.
2742      */
2743     GEOM_Object GetFaceNearPoint (in GEOM_Object theShape,
2744                                   in GEOM_Object thePoint);
2745
2746     /*!
2747      *  \brief Find a face of block, whose outside normale has minimal angle with the given vector.
2748      *  \param theBlock Block or a compound of blocks.
2749      *  \param theVector Vector, close to the normale of the desired face.
2750      *  \return New GEOM_Object, containing the found face.
2751      */
2752     GEOM_Object GetFaceByNormale (in GEOM_Object theBlock,
2753                                   in GEOM_Object theVector);
2754
2755     /*!
2756      *  \brief Find all sub-shapes of type \a theShapeType of the given shape,
2757      *  which have minimal distance to the given point.
2758      *  \param theShape Any shape.
2759      *  \param thePoint Point, close to the desired shape.
2760      *  \param theShapeType Defines what kind of sub-shapes is searched.
2761      *  \param theTolerance The tolerance for distances comparison. All shapes
2762      *                      with distances to the given point in interval
2763      *                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
2764      *  \return New GEOM_Object, containing a group of all found shapes.
2765      */
2766     GEOM_Object GetShapesNearPoint (in GEOM_Object theShape,
2767                                     in GEOM_Object thePoint,
2768                                     in long        theShapeType,
2769                                     in double      theTolerance);
2770
2771    //  #  Extract blocks from blocks compounds
2772      
2773
2774     /*!
2775      *  \brief Check, if the compound contains only specified blocks.
2776      *  \param theCompound The compound to check.
2777      *  \param theMinNbFaces If solid has lower number of faces, it is not a block.
2778      *  \param theMaxNbFaces If solid has higher number of faces, it is not a block.
2779      *    \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
2780      *  \param theNbBlocks Number of specified blocks in theCompound.
2781      *  \return TRUE, if the given compound contains only blocks.
2782      */
2783     boolean IsCompoundOfBlocks (in GEOM_Object theCompound,
2784                                 in long        theMinNbFaces,
2785                                 in long        theMaxNbFaces,
2786                                 out long       theNbBlocks);
2787
2788     /*!
2789      *  \brief Enumeration of Blocks Compound defects.
2790      */
2791     enum BCErrorType
2792     {
2793       /* Each element of the compound should be a Block */
2794       NOT_BLOCK,
2795
2796       /* An element is a potential block, but has degenerated and/or seam edge(s). */
2797       EXTRA_EDGE,
2798
2799       /* A connection between two Blocks should be an entire face or an entire edge */
2800       INVALID_CONNECTION,
2801
2802       /* The compound should be connexe */
2803       NOT_CONNECTED,
2804
2805       /* The glue between two quadrangle faces should be applied */
2806       NOT_GLUED
2807     };
2808
2809     /*!
2810      *  \brief Description of Blocks Compound defect: type and incriminated sub-shapes.
2811      */
2812     struct BCError
2813     {
2814       BCErrorType error;
2815       ListOfLong  incriminated;
2816     };
2817
2818     /*!
2819      *  \brief Sequence of all Blocks Compound defects.
2820      */
2821     typedef sequence<BCError> BCErrors;
2822
2823     /*!
2824      *  \brief Check, if the compound of blocks is given.
2825      *
2826      *  To be considered as a compound of blocks, the
2827      *  given shape must satisfy the following conditions:
2828      *  - Each element of the compound should be a Block (6 faces and 12 edges).
2829      *  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
2830      *  - The compound should be connexe.
2831      *  - The glue between two quadrangle faces should be applied.
2832      *    \note Single block is also accepted as a valid compound of blocks.
2833      *  \param theCompound The compound to check.
2834      *  \param theErrors Structure, containing discovered errors and incriminated sub-shapes.
2835      *  \return TRUE, if the given shape is a compound of blocks.
2836      */
2837     boolean CheckCompoundOfBlocks (in GEOM_Object theCompound,
2838                                    out BCErrors   theErrors);
2839
2840     /*!
2841      *  \brief Convert sequence of Blocks Compound errors, returned by
2842      *  <VAR>CheckCompoundOfBlocks()</VAR>, into string.
2843      *  \param theCompound The bad compound.
2844      *  \param theErrors The sequence of \a theCompound errors.
2845      *  \return String, describing all the errors in form, suitable for printing.
2846      */
2847     string PrintBCErrors (in GEOM_Object theCompound,
2848                           in BCErrors    theErrors);
2849
2850     /*!
2851      *  \brief Retrieve all non blocks solids and faces from a shape.
2852      *
2853      *  \param theShape The shape to explore.
2854      *  \param theNonQuads Output parameter. Group of all non quadrangular faces.
2855      *
2856      *  \return Group of all non block solids (= not 6 faces, or with 6
2857      *          faces, but with the presence of non-quadrangular faces).
2858      */
2859     GEOM_Object GetNonBlocks (in GEOM_Object theShape, out GEOM_Object theNonQuads);
2860
2861     /*!
2862      *  \brief Remove all seam and degenerated edges from \a theShape.
2863      *
2864      *  Unite faces and edges, sharing one surface.
2865      *  \param theShape The compound or single solid to remove irregular edges from.
2866      *  \param theOptimumNbFaces If more than zero, unite faces only for those solids,
2867      *         that have more than theOptimumNbFaces faces. If zero, unite faces always,
2868      *         regardsless their quantity in the solid. If negative, do not unite faces at all.
2869      *         For blocks repairing recommended value is 6.
2870      *  \return Improved shape.
2871      */
2872     GEOM_Object RemoveExtraEdges (in GEOM_Object theShape,
2873                                   in long        theOptimumNbFaces);
2874
2875     /*!
2876      *  \brief Performs union faces of \a theShape.
2877      *
2878      *  Unite faces sharing one surface.
2879      *  \param theShape The compound or single solid that contains faces to perform union.
2880      *  \return Improved shape.
2881      */
2882     GEOM_Object UnionFaces (in GEOM_Object theShape);
2883
2884     /*!
2885      *  \brief Check, if the given shape is a blocks compound.
2886      *
2887      *  Fix all detected errors.
2888      *    \note Single block can be also fixed by this method.
2889      *  \param theCompound The compound to check and improve.
2890      *  \return Improved compound.
2891      */
2892     GEOM_Object CheckAndImprove (in GEOM_Object theCompound);
2893
2894     /*!
2895      *  \brief Get all the blocks, contained in the given compound.
2896      *
2897      *  \param theCompound The compound to explode.
2898      *  \param theMinNbFaces If solid has lower number of faces, it is not a block.
2899      *  \param theMaxNbFaces If solid has higher number of faces, it is not a block.
2900      *    \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
2901      *  \return List of GEOM_Object, containing the retrieved blocks.
2902      */
2903     ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound,
2904                                       in long        theMinNbFaces,
2905                                       in long        theMaxNbFaces);
2906
2907     /*!
2908      *  \brief Find block, containing the given point inside its volume or on boundary.
2909      *  \param theCompound Compound, to find block in.
2910      *  \param thePoint Point, close to the desired block. If the point lays on
2911      *         boundary between some blocks, we return block with nearest center.
2912      *  \return New GEOM_Object, containing the found block.
2913      */
2914     GEOM_Object GetBlockNearPoint (in GEOM_Object theCompound,
2915                                    in GEOM_Object thePoint);
2916
2917     /*!
2918      *  \brief Find block, containing all the elements, passed as the parts, or maximum quantity of them.
2919      *  \param theCompound Compound, to find block in.
2920      *  \param theParts List of faces and/or edges and/or vertices to be parts of the found block.
2921      *  \return New GEOM_Object, containing the found block.
2922      */
2923     GEOM_Object GetBlockByParts (in GEOM_Object theCompound,
2924                                  in ListOfGO    theParts);
2925
2926     /*!
2927      *  \brief Return all blocks, containing all the elements, passed as the parts.
2928      *  \param theCompound Compound, to find blocks in.
2929      *  \param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
2930      *  \return List of GEOM_Object, containing the found blocks.
2931      */
2932     ListOfGO GetBlocksByParts (in GEOM_Object theCompound,
2933                                in ListOfGO    theParts);
2934
2935   // #  Operations on blocks with gluing of result
2936
2937     /*!
2938      *  \brief Multi-transformate block and glue the result.
2939      *
2940      *  Transformation is defined so, as to superpose theDirFace1 with theDirFace2.
2941      *  \param theBlock Hexahedral solid to be multi-transformed.
2942      *  \param theDirFace1 First direction face global index.
2943      *  \param theDirFace2 Second direction face global index.
2944      *  \param theNbTimes Quantity of transformations to be done.
2945      *    \note Global index of sub-shape can be obtained, using method
2946      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2947      *  \return New GEOM_Object, containing the result shape.
2948      */
2949     GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock,
2950                                            in long        theDirFace1,
2951                                            in long        theDirFace2,
2952                                            in long        theNbTimes);
2953
2954     /*!
2955      *  \brief Multi-transformate block and glue the result.
2956      *  \param theBlock Hexahedral solid to be multi-transformed.
2957      *  \param theDirFace1U,theDirFace2U Direction faces for the first transformation.
2958      *  \param theDirFace1V,theDirFace2V Direction faces for the second transformation.
2959      *  \param theNbTimesU,theNbTimesV Quantity of transformations to be done.
2960      *  \return New GEOM_Object, containing the result shape.
2961      */
2962     GEOM_Object MakeMultiTransformation2D (in GEOM_Object theBlock,
2963                                            in long        theDirFace1U,
2964                                            in long        theDirFace2U,
2965                                            in long        theNbTimesU,
2966                                            in long        theDirFace1V,
2967                                            in long        theDirFace2V,
2968                                            in long        theNbTimesV);
2969
2970   // # Special operation - propagation
2971    
2972
2973     /*!
2974      *  \brief Build all possible propagation groups.
2975      *
2976      *  Propagation group is a set of all edges, opposite to one (main)
2977      *  edge of this group directly or through other opposite edges.
2978      *  Notion of Opposite Edge make sence only on quadrangle face.
2979      *  \param theShape Shape to build propagation groups on.
2980      *  \return List of GEOM_Object, each of them is a propagation group.
2981      */
2982     ListOfGO Propagate (in GEOM_Object theShape);
2983   };
2984
2985  // # GEOM_IBooleanOperations
2986   /*!
2987    *  \brief Interface for boolean operations (Cut, Fuse, Common)
2988    */
2989   interface GEOM_IBooleanOperations : GEOM_IOperations
2990   {
2991     /*!
2992      *  \brief Perform one of boolean operations on two given shapes.
2993      *  \param theShape1 First argument for boolean operation.
2994      *  \param theShape2 Second argument for boolean operation.
2995      *  \param theOperation Indicates the operation to be done:
2996      *                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
2997      *  \param IsCheckSelfInte If TRUE, perform check self intersection
2998      *                         of arguments before an operation.
2999      *  \return New GEOM_Object, containing the result shape.
3000      */
3001     GEOM_Object MakeBoolean (in GEOM_Object theShape1,
3002                              in GEOM_Object theShape2,
3003                              in long        theOperation,
3004                              in boolean     IsCheckSelfInte);
3005     /*!
3006      *  \brief Perform fusion boolean operation on two given shapes.
3007      *  \param theShape1 First argument for fuse operation.
3008      *  \param theShape2 Second argument for fuse operation.
3009      *  \param IsCheckSelfInte If TRUE, perform check self intersection
3010      *                         of arguments before an operation.
3011      *  \param IsRmExtraEdges If TRUE, perform removal of extra edges
3012      *                        during an operation.
3013      *  \return New GEOM_Object, containing the result shape.
3014      */
3015     GEOM_Object MakeFuse (in GEOM_Object theShape1,
3016                           in GEOM_Object theShape2,
3017                           in boolean     IsCheckSelfInte,
3018                           in boolean     IsRmExtraEdges);
3019
3020     /*!
3021      *  \brief Perform fusion boolean operation on list of objects.
3022      *  \param theShapes Shapes to be fused.
3023      *  \param IsCheckSelfInte If TRUE, perform check self intersection
3024      *                         of arguments before an operation.
3025      *  \param IsRmExtraEdges If TRUE, perform removal of extra edges
3026      *                        during an operation.
3027      *  \return New GEOM_Object, containing the result shape.
3028      */
3029     GEOM_Object MakeFuseList (in ListOfGO theShapes,
3030                               in boolean  IsCheckSelfInte,
3031                               in boolean  IsRmExtraEdges);
3032
3033     /*!
3034      *  \brief Perform common boolean operation on list of objects.
3035      *  \param theShapes Shapes for common operation.
3036      *  \param IsCheckSelfInte If TRUE, perform check self intersection
3037      *                         of arguments before an operation.
3038      *  \return New GEOM_Object, containing the result shape.
3039      */
3040     GEOM_Object MakeCommonList (in ListOfGO theShapes,
3041                                 in boolean  IsCheckSelfInte);
3042
3043     /*!
3044      *  \brief Perform cutting of list of objects from theMainShape.
3045      *  \param theMainShape the object for cut operation.
3046      *  \param theShapes Shapes to be cut from theMainShape (tools).
3047      *  \param IsCheckSelfInte If TRUE, perform check self intersection
3048      *                         of arguments before an operation.
3049      *  \return New GEOM_Object, containing the result shape.
3050      */
3051     GEOM_Object MakeCutList (in GEOM_Object theMainShape,
3052                              in ListOfGO theShapes,
3053                              in boolean  IsCheckSelfInte);
3054
3055     /*!
3056      *  \brief Perform partition operation.
3057      *
3058      *  \param theShapes Shapes to be intersected.
3059      *  \param theTools Shapes to intersect theShapes.
3060      *  \note  Each compound from ListShapes and ListTools will be exploded in order
3061      *         to avoid possible intersection between shapes from this compound.
3062      *  \param theLimit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
3063      *  \param theKeepNonlimitShapes: if this parameter == 0, then only shapes of
3064      *                             target type (equal to Limit) are kept in the result,
3065      *                             else standalone shapes of lower dimension
3066      *                             are kept also (if they exist).
3067      *
3068      *  After implementation new version of PartitionAlgo (October 2006)
3069      *  other parameters are ignored by current functionality. They are kept
3070      *  in this function only for supporting old versions.
3071      *  Ignored parameters:
3072      *  \param theKeepInside Shapes, outside which the results will be deleted.
3073      *         Each shape from theKeepInside must belong to theShapes also.
3074      *  \param theRemoveInside Shapes, inside which the results will be deleted.
3075      *         Each shape from theRemoveInside must belong to theShapes also.
3076      *  \param theRemoveWebs If TRUE, perform Glue 3D algorithm.
3077      *  \param theMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
3078      *
3079      *  \return New GEOM_Object, containing the result shapes.
3080      */
3081     GEOM_Object MakePartition (in ListOfGO   theShapes,
3082                                in ListOfGO   theTools,
3083                                in ListOfGO   theKeepInside,
3084                                in ListOfGO   theRemoveInside,
3085                                in short      theLimit,
3086                                in boolean    theRemoveWebs,
3087                                in ListOfLong theMaterials,
3088                                in short      theKeepNonlimitShapes);
3089
3090     /*!
3091      *  \brief Perform partition operation.
3092      *
3093      *  This method may be usefull if it is needed to make a partition for
3094      *  a compound containing nonintersected shapes. Performance will be better
3095      *  since intersection between shapes from compound is not performed.
3096      *
3097      *  Description of all parameters as in previous method MakePartition().
3098      *  One additional parameter is provided:
3099      *  \param IsCheckSelfInte If TRUE, perform check self intersection
3100      *                         of arguments before an operation.
3101      *
3102      *  \note Passed compounds (via ListShapes or via ListTools)
3103      *        have to consist of nonintersecting shapes.
3104      *
3105      *  \return New GEOM_Object, containing the result shapes.
3106      */
3107     GEOM_Object MakePartitionNonSelfIntersectedShape (in ListOfGO   theShapes,
3108                                                       in ListOfGO   theTools,
3109                                                       in ListOfGO   theKeepInside,
3110                                                       in ListOfGO   theRemoveInside,
3111                                                       in short      theLimit,
3112                                                       in boolean    theRemoveWebs,
3113                                                       in ListOfLong theMaterials,
3114                                                       in short      theKeepNonlimitShapes,
3115                                                       in boolean    IsCheckSelfInte);
3116
3117     /*!
3118      *  \brief Perform partition of the Shape with the Plane
3119      *  \param theShape Shape to be intersected.
3120      *  \param thePlane Tool shape, to intersect theShape.
3121      *  \return New GEOM_Object, containing the result shape.
3122      */
3123     GEOM_Object MakeHalfPartition (in GEOM_Object theShape,
3124                                    in GEOM_Object thePlane);
3125   };
3126
3127  // # GEOM_ICurvesOperations:
3128   /*!
3129    *  \brief Interface for curves creation.
3130    *
3131    *  Polyline, Circle, Spline (Bezier and Interpolation)
3132    */
3133   interface GEOM_ICurvesOperations : GEOM_IOperations
3134   {
3135     /*!
3136      *  \brief Create a circle with given center, normal vector and radius.
3137      *  \param thePnt Circle center.
3138      *  \param theVec Vector, normal to the plane of the circle.
3139      *  \param theR Circle radius.
3140      *  \return New GEOM_Object, containing the created circle.
3141      */
3142     GEOM_Object MakeCirclePntVecR (in GEOM_Object thePnt,
3143                                    in GEOM_Object theVec,
3144                                    in double theR);
3145     /*!
3146      *  \brief Create a circle, passing through three given points
3147      *  \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
3148      *  \return New GEOM_Object, containing the created circle.
3149      */
3150     GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1,
3151                                     in GEOM_Object thePnt2,
3152                                     in GEOM_Object thePnt3);
3153     /*!
3154      *  \brief Create a circle with given center, with a radius equals the distance from center to Point1
3155      *  and on a plane defined by all of three points.
3156      *  \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
3157      *  \return New GEOM_Object, containing the created circle.
3158      */
3159     GEOM_Object MakeCircleCenter2Pnt (in GEOM_Object thePnt1,
3160                                       in GEOM_Object thePnt2,
3161                                       in GEOM_Object thePnt3);
3162     /*!
3163      *  \brief Create an ellipse with given center, normal vector and radiuses.
3164      *  \param thePnt Ellipse center.
3165      *  \param theVec Vector, normal to the plane of the ellipse.
3166      *  \param theRMajor Major ellipse radius.
3167      *  \param theRMinor Minor ellipse radius.
3168      *  \return New GEOM_Object, containing the created ellipse.
3169      */
3170     GEOM_Object MakeEllipse (in GEOM_Object thePnt,
3171                              in GEOM_Object theVec,
3172                              in double theRMajor,
3173                              in double theRMinor);
3174
3175     /*!
3176      *  \brief Create an ellipse with given center, normal vector, main axis vector and radiuses.
3177      *  \param thePnt Ellipse center.
3178      *  \param theVec Vector, normal to the plane of the ellipse.
3179      *  \param theRMajor Major ellipse radius.
3180      *  \param theRMinor Minor ellipse radius.
3181      *  \param theVecMaj Vector, direction of the ellipse's main axis.
3182      *  \return New GEOM_Object, containing the created ellipse.
3183      */
3184     GEOM_Object MakeEllipseVec (in GEOM_Object thePnt,
3185                                 in GEOM_Object theVec,
3186                                 in double theRMajor,
3187                                 in double theRMinor,
3188                                 in GEOM_Object theVecMaj);
3189
3190     /*!
3191      *  \brief Create an arc of circle, passing through three given points.
3192      *  \param thePnt1 Start point of the arc.
3193      *  \param thePnt2 Middle point of the arc.
3194      *  \param thePnt3 End point of the arc.
3195      *  \return New GEOM_Object, containing the created arc.
3196      */
3197     GEOM_Object MakeArc (in GEOM_Object thePnt1,
3198                          in GEOM_Object thePnt2,
3199                          in GEOM_Object thePnt3);
3200
3201     /*!
3202      *  \brief Create an arc of circle of center C from one point to another
3203      *  \param theCenter Center point of the arc.
3204      *  \param thePnt1 Start point of the arc.
3205      *  \param thePnt2 End point of the arc.
3206      *  \param theSense Orientation of the arc
3207      *  \return New GEOM_Object, containing the created arc.
3208      */
3209     GEOM_Object MakeArcCenter (in GEOM_Object theCenter,
3210                                in GEOM_Object thePnt1,
3211                                in GEOM_Object thePnt2,
3212                                in boolean theSense);
3213
3214     /*!
3215      *  \brief Create an arc of ellipse of center C and two points P1 P2.
3216      *  \param theCenter Center point of the arc.
3217      *  \param thePnt1 Major radius is distance from center to Pnt1.
3218      *  \param thePnt2 define a plane and Minor radius as a shortest
3219      *                 distance from Pnt2 to vector Center->Pnt1.
3220      *  \return New GEOM_Object, containing the created arc.
3221      */
3222     GEOM_Object MakeArcOfEllipse (in GEOM_Object theCenter,
3223                                   in GEOM_Object thePnt1,
3224                                   in GEOM_Object thePnt2);
3225
3226
3227     /*!
3228      *  \brief Create a polyline on the set of points.
3229      *  \param thePoints Sequence of points for the polyline.
3230      *  \param theIsClosed If TRUE, build a closed wire.
3231      *  \return New GEOM_Object, containing the created polyline.
3232      */
3233     GEOM_Object MakePolyline (in ListOfGO thePoints,
3234                               in boolean  theIsClosed);
3235
3236     /*!
3237      *  \brief Create bezier curve on the set of points.
3238      *  \param thePoints Sequence of points for the bezier curve.
3239      *  \param theIsClosed If TRUE, build a closed curve.
3240      *  \return New GEOM_Object, containing the created bezier curve.
3241      */
3242     GEOM_Object MakeSplineBezier (in ListOfGO thePoints,
3243                                   in boolean  theIsClosed);
3244
3245     /*!
3246      *  \brief Create B-Spline curve on the set of points.
3247      *  \param thePoints Sequence of points for the B-Spline curve.
3248      *  \param theIsClosed If TRUE, build a closed curve.
3249      *  \param theDoReordering If TRUE, the algo does not follow the order of
3250      *                         \a thePoints but searches for the closest vertex.
3251      *  \return New GEOM_Object, containing the created B-Spline curve.
3252      */
3253     GEOM_Object MakeSplineInterpolation (in ListOfGO thePoints,
3254                                          in boolean  theIsClosed,
3255                                          in boolean  theDoReordering);
3256
3257     /*!
3258      *  \brief Create B-Spline curve on the set of points.
3259      *  \param thePoints Sequence of points for the B-Spline curve.
3260      *  \param theFirstVec Vector object, defining the curve direction at its first point.
3261      *  \param theLastVec Vector object, defining the curve direction at its last point.
3262      *  \return New GEOM_Object, containing the created B-Spline curve.
3263      */
3264     GEOM_Object MakeSplineInterpolWithTangents (in ListOfGO    thePoints,
3265                                                 in GEOM_Object theFirstVec,
3266                                                 in GEOM_Object theLastVec);
3267
3268     /*!
3269      *  \brief Creates a curve using the parametric definition of the basic points.
3270      *  \param thexExpr parametric equation of the coordinates X.
3271      *  \param theyExpr parametric equation of the coordinates Y.
3272      *  \param thezExpr parametric equation of the coordinates Z.
3273      *  \param theParamMin the minimal value of the parameter.
3274      *  \param theParamMax the maximum value of the parameter.
3275      *  \param theParamStep the step of the parameter.
3276      *  \param theCurveType the type of the curve.
3277      *  \return New GEOM_Object, containing the created curve.
3278      */    
3279     GEOM_Object MakeCurveParametric(in string thexExpr,
3280                                     in string theyExpr,
3281                                     in string thezExpr,
3282                                     in double theParamMin,
3283                                     in double theParamMax,
3284                                     in double theParamStep,
3285                                     in curve_type theCurveType);
3286
3287      /*!
3288      *  \brief Creates a curve using the parametric definition of the basic points.
3289      *  \param thexExpr parametric equation of the coordinates X.
3290      *  \param theyExpr parametric equation of the coordinates Y.
3291      *  \param thezExpr parametric equation of the coordinates Z.
3292      *  \param theParamMin the minimal value of the parameter.
3293      *  \param theParamMax the maximum value of the parameter.
3294      *  \param theParamNbStep the number of steps of the parameter discretization.
3295      *  \param theCurveType the type of the curve.
3296      *  \return New GEOM_Object, containing the created curve.
3297      */    
3298     GEOM_Object MakeCurveParametricNew(in string thexExpr,
3299                     in string theyExpr,
3300                     in string thezExpr,
3301                     in double theParamMin,
3302                     in double theParamMax,
3303                     in long   theParamNbStep,
3304                     in curve_type theCurveType);
3305
3306      /*!
3307      *  \brief Creates an isoline curve on a face.
3308      *  \param theFace the face for which an isoline is created.
3309      *  \param IsUIsoline True for U-isoline creation; False for V-isoline
3310      *         creation.
3311      *  \param theParameter the U parameter for U-isoline or V parameter
3312      *         for V-isoline.
3313      *  \return New GEOM_Object, containing the created isoline edge or a
3314      *          compound of edges.
3315      */
3316     GEOM_Object MakeIsoline(in GEOM_Object theFace,
3317                             in boolean     IsUIsoline,
3318                             in double      theParameter);
3319
3320     /*!
3321      *  \brief Create a sketcher (wire or face), following the textual description,
3322      *         passed through \a theCommand argument.
3323      *
3324      *  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
3325      *  Format of the description string has to be the following:
3326      *
3327      *  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
3328      *
3329      *  Where:
3330      *  - x1, y1 are coordinates of the first sketcher point (zero by default),
3331      *  - CMD is one of
3332      *     - "R angle" : Set the direction by angle
3333      *     - "D dx dy" : Set the direction by DX & DY
3334      *     .
3335      *       \n
3336      *     - "TT x y" : Create segment by point at X & Y
3337      *     - "T dx dy" : Create segment by point with DX & DY
3338      *     - "L length" : Create segment by direction & Length
3339      *     - "IX x" : Create segment by direction & Intersect. X
3340      *     - "IY y" : Create segment by direction & Intersect. Y
3341      *     .
3342      *       \n
3343      *     - "C radius length" : Create arc by direction, radius and length(in degree)
3344      *     .
3345      *       \n
3346      *     - "WW" : Close Wire (to finish)
3347      *     - "WF" : Close Wire and build face (to finish)
3348      *
3349      *  \param theCommand String, defining the sketcher in local
3350      *                    coordinates of the working plane.
3351      *  \param theWorkingPlane Nine double values, defining origin,
3352      *                         OZ and OX directions of the working plane.
3353      *  \return New GEOM_Object, containing the created wire or face.
3354      */
3355     GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane);
3356
3357     /*!
3358      *  \brief Create a sketcher (wire or face), following the textual description,
3359      *         passed through \a theCommand argument. 
3360      *
3361      *  For format of the description string see the previous method.\n
3362      *
3363      *  \param theCommand String, defining the sketcher in local
3364      *                    coordinates of the working plane.
3365      *  \param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
3366      *  \return New GEOM_Object, containing the created wire or face.
3367      */
3368     GEOM_Object MakeSketcherOnPlane (in string theCommand, in GEOM_Object theWorkingPlane);
3369
3370     /*!
3371      *  \brief Create a 3D sketcher, following the textual description,
3372      *         passed through \a theCommand argument. 
3373      *
3374      *  Format of the description string has to be the following:
3375      *
3376      *  "3DSketcher:CMD[:CMD[:CMD...]]"
3377      *
3378      *  Where CMD is one of
3379      *     - "TT x y z" : Create segment by point at X & Y or set the first point
3380      *     - "T dx dy dz" : Create segment by point with DX & DY
3381      *     .
3382      *       \n
3383      *     - "OXY angleX angle2 length" : Create segment by two angles and length
3384      *     - "OYZ angleY angle2 length" : Create segment by two angles and length
3385      *     - "OXZ angleX angle2 length" : Create segment by two angles and length
3386      *     .
3387      *       \n
3388      *     - "WW" : Close Wire (to finish)
3389      *
3390      *  \param theCommand String, defining the sketcher in local
3391      *                    coordinates of the working plane.
3392      *  \return New GEOM_Object, containing the created wire.
3393      */
3394     GEOM_Object Make3DSketcherCommand (in string theCommand);
3395
3396     /*!
3397      *  \brief Create a 3D sketcher, made of a straight segments, joining points
3398      *         with coordinates passed through \a theCoordinates argument. 
3399      *
3400      *  Order of coordinates has to be the following:
3401      *  x1, y1, z1, x2, y2, z2, ..., xN, yN, zN
3402      *
3403      *  \param theCoordinates List of double values.
3404      *  \return New GEOM_Object, containing the created wire.
3405      */
3406     GEOM_Object Make3DSketcher (in ListOfDouble theCoordinates);
3407
3408     /*!
3409      *  \brief Create a 2D polyline (wire or a compound of wires).
3410      *
3411      *  The polyline can have several sections. Each section represents a set
3412      *  of points in the form of list of coordinates of the following order:
3413      *  x1, y1, x2, y2, ..., xN, yN
3414      *  Each section has its own name, type of curve (can be either
3415      *  GEOM::Polyline or GEOM::Interpolation) and Closed flag.
3416      *  For each section a wire is created. It represents either a polyline or
3417      *  interpolation BSpline either closed or not depending on the Closed flag.
3418      *  The result represents a wire if there is only one section is defined.
3419      *  Otherwise a compound of wires is returned.
3420      *
3421      *  \param theCoordsList the list of coordinates list. theCoordsList[0]
3422      *         is the coordinates list of the first section. theCoordsList[1]
3423      *         is for the second section etc.
3424      *  \param theNamesList the list of names. The order corresponds to
3425      *         theCoordsList.
3426      *  \param theTypesList the list of curve types. The order corresponds to
3427      *         theCoordsList.
3428      *  \param theClosedList the list of Closed flags. The order corresponds to
3429      *         theCoordsList.
3430      *  \param theWorkingPlane 9 double values, defining origin,
3431      *         OZ and OX directions of the working plane.
3432      *  \return New GEOM_Object, containing the created wire or a compound
3433      *          of wires.
3434      */
3435     GEOM_Object MakePolyline2D (in ListOfListOfDouble theCoordsList,
3436                                 in string_array       theNamesList,
3437                                 in short_array        theTypesList,
3438                                 in ListOfBool         theClosedList,
3439                                 in ListOfDouble       theWorkingPlane);
3440
3441     /*!
3442      *  \brief Create a 2D polyline (wire or a compound of wires).
3443      *
3444      *  The polyline can have several sections. Each section represents a set
3445      *  of points in the form of list of coordinates of the following order:
3446      *  x1, y1, x2, y2, ..., xN, yN
3447      *  Each section has its own name, type of curve (can be either
3448      *  GEOM::Polyline or GEOM::Interpolation) and Closed flag.
3449      *  For each section a wire is created. It represents either a polyline or
3450      *  interpolation BSpline either closed or not depending on the Closed flag.
3451      *  The result represents a wire if there is only one section is defined.
3452      *  Otherwise a compound of wires is returned.
3453      *
3454      *  \param theCoordsList the list of coordinates list. theCoordsList[0]
3455      *         is the coordinates list of the first section. theCoordsList[1]
3456      *         is for the second section etc.
3457      *  \param theNamesList the list of names. The order corresponds to
3458      *         theCoordsList.
3459      *  \param theTypesList the list of curve types. The order corresponds to
3460      *         theCoordsList.
3461      *  \param theClosedList the list of Closed flags. The order corresponds to
3462      *         theCoordsList.
3463      *  \param theWorkingPlane planar Face or LCS(Marker) of the working plane.
3464      *  \return New GEOM_Object, containing the created wire or a compound
3465      *          of wires.
3466      */
3467     GEOM_Object MakePolyline2DOnPlane (in ListOfListOfDouble theCoordsList,
3468                                        in string_array       theNamesList,
3469                                        in short_array        theTypesList,
3470                                        in ListOfBool         theClosedList,
3471                                        in GEOM_Object        theWorkingPlane);
3472
3473   };
3474
3475  // # GEOM_ILocalOperations:
3476   /*!
3477    *  \brief Interface for fillet and chamfer creation.
3478    */
3479   interface GEOM_ILocalOperations : GEOM_IOperations
3480   {
3481     /*!
3482      *  \brief Perform a fillet on all edges of the given shape.
3483      *  \param theShape Shape, to perform fillet on.
3484      *  \param theR Fillet radius.
3485      *  \return New GEOM_Object, containing the result shape.
3486      */
3487     GEOM_Object MakeFilletAll (in GEOM_Object theShape,
3488                                in double      theR);
3489
3490     /*!
3491      *  \brief Perform a fillet on the specified edges of the given shape
3492      *  \param theShape Shape, to perform fillet on.
3493      *  \param theR Fillet radius.
3494      *  \param theEdges Global indices of edges to perform fillet on.
3495      *    \note Global index of sub-shape can be obtained, using method
3496      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3497      *  \return New GEOM_Object, containing the result shape.
3498      */
3499     GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
3500                                  in double      theR,
3501                                  in ListOfLong  theEdges);
3502     GEOM_Object MakeFilletEdgesR1R2 (in GEOM_Object theShape,
3503                                      in double      theR1,
3504                                      in double      theR2,
3505                                      in ListOfLong  theEdges);
3506
3507     /*!
3508      *  \brief Perform a fillet on all edges of the specified faces of the given shape.
3509      *  \param theShape Shape, to perform fillet on.
3510      *  \param theR Fillet radius.
3511      *  \param theFaces Global indices of faces to perform fillet on.
3512      *    \note Global index of sub-shape can be obtained, using method
3513      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3514      *  \return New GEOM_Object, containing the result shape.
3515      */
3516     GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
3517                                  in double      theR,
3518                                  in ListOfLong  theFaces);
3519
3520     GEOM_Object MakeFilletFacesR1R2 (in GEOM_Object theShape,
3521                                      in double      theR1,
3522                                      in double      theR2,
3523                                      in ListOfLong  theFaces);
3524
3525     /*!
3526      *  \brief Perform a fillet on a face or a shell at the specified vertexes.
3527      *  \param theShape Shape, to perform fillet on.
3528      *  \param theR Fillet radius.
3529      *  \param theVertexes Global indices of vertexes to perform fillet on.
3530      *    \note Global index of sub-shape can be obtained, using method
3531      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3532      *  \return New GEOM_Object, containing the result shape.
3533      */
3534     GEOM_Object MakeFillet2D (in GEOM_Object theShape,
3535                               in double      theR,
3536                               in ListOfLong  theVertexes);
3537
3538     /*!
3539      *  \brief Perform a fillet on edges of the specified vertexes of the given wire.
3540      *  \param theShape Shape, to perform fillet on.
3541      *  \param theR Fillet radius.
3542      *  \param theVertexes Global indices of vertexes to perform fillet on.
3543      *    \note Global index of sub-shape can be obtained, using method
3544      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3545      *    \note The list of vertices coudl be empty, in this case fillet fill be done
3546      *          at all vertices in given wire
3547      *  \param doIgnoreSecantVertices If FALSE, fillet radius is always limited
3548      *         by the length of the edges, nearest to the fillet vertex.
3549      *         But sometimes the next edge is C1 continuous with the one, nearest to
3550      *         the fillet point, and such two (or more) edges can be united to allow
3551      *         bigger radius. Set this flag to TRUE to allow collinear edges union,
3552      *         thus ignoring the secant vertex (vertices).
3553      *  \return New GEOM_Object, containing the result shape.
3554      */
3555     GEOM_Object MakeFillet1D (in GEOM_Object theShape,
3556                               in double      theR,
3557                               in ListOfLong  theVertexes,
3558                               in boolean     doIgnoreSecantVertices);
3559
3560     /*!
3561      *  \brief Perform a symmetric chamfer on all edges of the given shape.
3562      *  \param theShape Shape, to perform chamfer on.
3563      *  \param theD Chamfer size along each face.
3564      *  \return New GEOM_Object, containing the result shape.
3565      */
3566     GEOM_Object MakeChamferAll (in GEOM_Object theShape,
3567                                 in double      theD);
3568
3569     /*!
3570      *  \brief Perform a chamfer on edges, common to the specified faces.
3571      *  with distance D1 on the Face1
3572      *  \param theShape Shape, to perform chamfer on.
3573      *  \param theD1 Chamfer size along \a theFace1.
3574      *  \param theD2 Chamfer size along \a theFace2.
3575      *  \param theFace1,theFace2 Global indices of two faces of \a theShape.
3576      *    \note Global index of sub-shape can be obtained, using method
3577      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3578      *  \return New GEOM_Object, containing the result shape.
3579      */
3580     GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
3581                                  in double theD1, in double theD2,
3582                                  in long theFace1, in long theFace2);
3583     /*!
3584      *  \brief The Same but with params theD = Chamfer Lenght
3585      *  and theAngle = Chamfer Angle (Angle in radians)
3586      */
3587     GEOM_Object MakeChamferEdgeAD (in GEOM_Object theShape,
3588                                    in double theD, in double theAngle,
3589                                    in long theFace1, in long theFace2);
3590
3591     /*!
3592      *  \brief Perform a chamfer on all edges of the specified faces.
3593      *  with distance D1 on the first specified face (if several for one edge)
3594      *  \param theShape Shape, to perform chamfer on.
3595      *  \param theD1 Chamfer size along face from \a theFaces. If both faces,
3596      *               connected to the edge, are in \a theFaces, \a theD1
3597      *               will be get along face, which is nearer to \a theFaces beginning.
3598      *  \param theD2 Chamfer size along another of two faces, connected to the edge.
3599      *  \param theFaces Sequence of global indices of faces of \a theShape.
3600      *    \note Global index of sub-shape can be obtained, using method
3601      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3602      *  \return New GEOM_Object, containing the result shape.
3603      */
3604     GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
3605                                   in double theD1, in double theD2,
3606                                   in ListOfLong theFaces);
3607     /*!
3608      *  The Same but with params theD = Chamfer Lenght
3609      *  and theAngle = Chamfer Angle (Angle in radians)
3610      */
3611     GEOM_Object MakeChamferFacesAD (in GEOM_Object theShape,
3612                                     in double theD, in double theAngle,
3613                                     in ListOfLong theFaces);
3614
3615    /*!
3616     *  \brief Perform a chamfer on edges,
3617     *  with distance D1 on the first specified face (if several for one edge)
3618     *  \param theShape Shape, to perform chamfer on.
3619     *  \param theD1,theD2 Chamfer size
3620     *  \param theEdges Sequence of edges of \a theShape.
3621     *  \return New GEOM_Object, containing the result shape.
3622     */
3623     GEOM_Object MakeChamferEdges (in GEOM_Object theShape,
3624                                   in double theD1, in double theD2,
3625                                   in ListOfLong theEdges);
3626     /*!
3627      *  The Same but with params theD = Chamfer Lenght
3628      *  and theAngle = Chamfer Angle (Angle in radians)
3629      */
3630     GEOM_Object MakeChamferEdgesAD (in GEOM_Object theShape,
3631                                     in double theD, in double theAngle,
3632                                     in ListOfLong theEdges);
3633
3634     /*!
3635      *  \brief Perform an Archimde operation on the given shape with given parameters.
3636      *                    The object presenting the resulting face is returned
3637      *  \param theShape Shape to be put in water.
3638      *  \param theWeight Weight og the shape.
3639      *  \param theWaterDensity Density of the water.
3640      *  \param theMeshDeflection Deflection od the mesh, using to compute the section.
3641      *  \return New GEOM_Object, containing a section of \a theShape
3642      *          by a plane, corresponding to water level.
3643      */
3644     GEOM_Object MakeArchimede (in GEOM_Object theShape,
3645                                in double theWeight,
3646                                in double theWaterDensity,
3647                                in double theMeshDeflection);
3648
3649     /*!
3650      *  \brief Duplicates <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3651      *
3652      *  Present here only for compatibility.
3653      */
3654     long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape);
3655   };
3656
3657  // #  GEOM_IHealingOperations: 
3658   /*!
3659    *  \brief Interface for shape healing operations
3660    *
3661    *  Shape Processing, SuppressFaces, etc.
3662    */
3663   interface GEOM_IHealingOperations : GEOM_IOperations
3664   {
3665     /*!
3666      *  \brief Apply a sequence of Shape Healing operators to the given object.
3667      *  \param theShapes Shape to be processed.
3668      *  \param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
3669      *  \param theParameters List of names of parameters
3670      *                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
3671      *  \param theValues List of values of parameters, in the same order
3672      *                    as parameters are listed in \a theParameters list.
3673      *  \return New GEOM_Object, containing processed shape.
3674      */
3675     GEOM_Object ProcessShape (in GEOM_Object theShapes,
3676                               in string_array theOperators,
3677                               in string_array theParameters,
3678                               in string_array theValues);
3679
3680     /*!
3681      *  \brief Get default sequence of operators, their parameters and parameters' values
3682      *  of Shape Process operation. 
3683      *
3684      *  In the current implementation the defaults are
3685      *  read from the file pointed by CSF_ShHealingDefaults environmental variable.
3686      *  \param theOperators Output. Default list of names of operators.
3687      *  \param theParameters Output. Default list of names of parameters.
3688      *  \param theValues Output. List of default values of parameters, in the same order
3689      *                           as parameters are listed in \a theParameters list.
3690      */
3691     void GetShapeProcessParameters (out string_array theOperators,
3692                                     out string_array theParameters,
3693                                     out string_array theValues);
3694     /*!
3695      *  \brief Get parameters and parameters' values for the given Shape Process operation.
3696      *
3697      *  In the current implementation the defaults are
3698      *  read from the file pointed by CSF_ShHealingDefaults environmental variable.
3699      *  \param theOperator Input. The operator's name.
3700      *  \param theParameters Output. Default list of names of parameters.
3701      *  \param theValues Output. List of default values of parameters, in the same order
3702      *                           as parameters are listed in \a theParameters list.
3703      */
3704     void GetOperatorParameters (in string theOperator,
3705                                 out string_array theParameters,
3706                                 out string_array theValues);
3707
3708     /*!
3709      *  \brief Remove faces from the given object (shape).
3710      *  \param theObject Shape to be processed.
3711      *  \param theFaces Indices of faces to be removed, if EMPTY then the method
3712      *                  removes ALL faces of the given object.
3713      *  \return New GEOM_Object, containing processed shape.
3714      */
3715     GEOM_Object SuppressFaces (in GEOM_Object theObject, in short_array theFaces);
3716
3717     /*!
3718      *  \brief Close an open wire.
3719      *  \param theObject Shape to be processed.
3720      *  \param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
3721      *                  if -1, then theObject itself is a wire.
3722      *  \param isCommonVertex If TRUE : closure by creation of a common vertex,
3723      *                        If FALS : closure by creation of an edge between ends.
3724      *  \return New GEOM_Object, containing processed shape.
3725      */
3726     GEOM_Object CloseContour (in GEOM_Object theObject, in short_array theWires,
3727                               in boolean isCommonVertex);
3728
3729     /*!
3730      *  \brief Remove internal wires and edges from the given object (face).
3731      *  \param theObject Shape to be processed.
3732      *  \param theWires Indices of wires to be removed, if EMPTY then the method
3733      *                  removes ALL internal wires of the given object.
3734      *  \return New GEOM_Object, containing processed shape.
3735      */
3736     GEOM_Object RemoveIntWires (in GEOM_Object theObject, in short_array theWires);
3737
3738     /*!
3739      *  \brief Remove internal closed contours (holes) from the given object.
3740      *  \param theObject Shape to be processed.
3741      *  \param theWires Indices of wires to be removed, if EMPTY then the method
3742      *                  removes ALL internal holes of the given object
3743      *  \return New GEOM_Object, containing processed shape.
3744      */
3745     GEOM_Object FillHoles (in GEOM_Object theObject, in short_array theWires);
3746
3747     /*!
3748      *  Sewing of the given object.
3749      *  \param theObject Shape to be processed.
3750      *  \param theTolerance Required tolerance value.
3751      *  \return New GEOM_Object, containing processed shape.
3752      */
3753     GEOM_Object Sew (in ListOfGO theObjects, in double theTolerance);
3754
3755     /*!
3756      *  Sewing of the given object. Allows non-manifold sewing.
3757      *  \param theObject Shape to be processed.
3758      *  \param theTolerance Required tolerance value.
3759      *  \return New GEOM_Object, containing processed shape.
3760      */
3761     GEOM_Object SewAllowNonManifold(in ListOfGO theObjects, in double theTolerance);
3762
3763     /*!
3764      *  Rebuild the topology of theSolids by removing
3765      *  the faces that are shared by several solids.
3766      *  \param theSolids A list of shapes containing solids to be processed.
3767      *  \return New GEOM_Object, containing processed shape.
3768      */
3769     GEOM_Object RemoveInternalFaces (in ListOfGO theSolids);
3770
3771     /*!
3772      *  \brief Addition of a point to a given edge of \a theObject.
3773      *  \param theObject Shape to be processed.
3774      *  \param theEdgeIndex Index of edge to be divided within theObject's shape,
3775      *                      if -1, then theObject itself is the edge.
3776      *  \param theValue Value of parameter on edge or length parameter,
3777      *                  depending on \a isByParameter.
3778      *  \param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1],
3779      *                       if FALSE : \a theValue is treated as a length parameter [0..1]
3780      *  \return New GEOM_Object, containing the processed shape.
3781      */
3782     GEOM_Object DivideEdge (in GEOM_Object theObject, in short theEdgeIndex,
3783                             in double theValue, in boolean isByParameter);
3784
3785     /*!
3786      *  \brief Addition of a point to a given edge of \a theObject by projecting
3787      *         another point to the given edge.
3788      *  \param theObject Shape to be processed.
3789      *  \param theEdgeIndex Index of edge to be divided within theObject's shape,
3790      *                      if -1, then theObject itself is the edge.
3791      *  \param thePoint Point to project to theEdgeIndex-th edge.
3792      *  \return New GEOM_Object, containing the processed shape.
3793      */
3794     GEOM_Object DivideEdgeByPoint (in GEOM_Object theObject,
3795                                    in short       theEdgeIndex,
3796                                    in GEOM_Object thePoint);
3797
3798     /*!
3799      *  \brief Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
3800      *  \param theWire Wire to minimize the number of C1 continuous edges in.
3801      *  \param theVertices A list of vertices to suppress. If the list
3802      *                     is empty, all vertices in a wire will be assumed.
3803      *  \return New GEOM_Object with modified wire.
3804      */
3805     GEOM_Object FuseCollinearEdgesWithinWire (in GEOM_Object theWire,
3806                                               in ListOfGO theVertices);
3807
3808     /*!
3809      *  \brief Get a list of wires (wrapped in GEOM_Object-s),
3810      *  that constitute a free boundary of the given shape.
3811      *  \param theObject Shapes to get free boundary of.
3812      *  \param theClosedWires Output. Closed wires on the free boundary of the given shape.
3813      *  \param theOpenWires Output. Open wires on the free boundary of the given shape.
3814      *  \return FALSE, if an error(s) occured during the method execution.
3815      */
3816     boolean GetFreeBoundary (in ListOfGO theObjects,
3817                              out ListOfGO theClosedWires,
3818                              out ListOfGO theOpenWires);
3819
3820     /*!
3821      *  \brief Change orientation of the given object.
3822      *  \param theObject Shape to be processed.
3823      *  \return New GEOM_Object, containing processed shape.
3824      */
3825     GEOM_Object ChangeOrientation (in GEOM_Object theObject);
3826     GEOM_Object ChangeOrientationCopy (in GEOM_Object theObject);
3827
3828     /*!
3829      *  \brief Try to limit tolerance of the given object by value \a theTolerance.
3830      *  \param theObject Shape to be processed.
3831      *  \param theTolerance Required tolerance value.
3832      *  \return New GEOM_Object, containing processed shape.
3833      */
3834     GEOM_Object LimitTolerance (in GEOM_Object theObject, in double theTolerance);
3835
3836   };
3837
3838  // # GEOM_IInsertOperations:
3839   /*!
3840    *  \brief Interface for shape insert operations (like copy, import).
3841    *
3842    */
3843   interface GEOM_IInsertOperations : GEOM_IOperations
3844   {
3845     /*!
3846      *  \brief Create a copy of the given object
3847      */
3848     GEOM_Object MakeCopy (in GEOM_Object theOriginal);
3849
3850     /*!
3851      *  \brief Deprecated method. Use Export<FormatName> (from the
3852      *  corresponding plugin) instead; here <FormatName> is a name of format.
3853      *
3854      *  \brief Export the given shape into a file with given name.
3855      *  \param theObject Shape to be stored in the file.
3856      *  \param theFileName Name of the file to store the given shape in.
3857      *  \param theFormatName Specify format for the shape storage.
3858      */
3859     void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName);
3860
3861     /*!
3862      *  \brief Deprecated method. Use Import<FormatName> (from the
3863      *  corresponding plugin) instead; here <FormatName> is a name of format.
3864      *
3865      *  \brief Import a shape from the STL, BREP, IGES or STEP file
3866      *  (depends on given format) with given name.
3867      *  \param theFileName The file, containing the shape.
3868      *  \param theFormatName Specify format for the file reading.
3869      *         If format 'IGES_SCALE' is used instead of 'IGES' or
3870      *            format 'STEP_SCALE' is used instead of 'STEP',
3871      *            file length unit will be ignored (set to 'meter') and result model will be scaled.
3872      *  \return List of GEOM_Object, containing the created shape and groups of materials.
3873      */
3874     ListOfGBO ImportFile (in string theFileName, in string theFormatName);
3875
3876     /*!
3877      *  \brief Deprecated method. Use ReadValue (from the corresponding plugin) instead.
3878      *
3879      *  \brief Read a value of parameter from a file, containing a shape.
3880      *  \param theFileName The file, containing the shape.
3881      *  \param theFormatName Specify format for the file reading.
3882      *  \param theParameterName Specify the parameter. For example, pass "LEN_UNITS"
3883      *                          to obtain length units, in which the file is written.
3884      *  \return Value of requested parameter in form of text string.
3885      */
3886     string ReadValue (in string theFileName, in string theFormatName, in string theParameterName);
3887
3888     /*!
3889      *  \brief Read a shape from the binary stream, containing its bounding representation (BRep).
3890      *  \note GEOM_Object::GetShapeStream() method can be used to obtain the shape's BRep stream.
3891      *  \param theStream The BRep binary stream.
3892      *  \return New GEOM_Object, containing the shape, read from theStream.
3893      */
3894     GEOM_Object RestoreShape (in SALOMEDS::TMPFile theStream);
3895
3896     /*!
3897      * \brief Load texture from file
3898      * \param theTextureFile texture file name
3899      * \return unique texture identifier
3900      */
3901     long LoadTexture(in string theTextureFile);
3902
3903     /*!
3904      * \brief Add texture to the study
3905      * \param theWidth texture width in pixels
3906      * \param theHeight texture height in pixels
3907      * \param theTexture texture byte array
3908      * \return unique texture identifier
3909      */
3910     long AddTexture(in long theWidth, in long theHeight, in SALOMEDS::TMPFile theTexture);
3911
3912     /*!
3913      * \brief Get previously loaded texture data
3914      * \param theID texture identifier
3915      * \param theWidth texture width in pixels
3916      * \param theHeight texture height in pixels
3917      * \return texture byte array
3918      */
3919     SALOMEDS::TMPFile GetTexture(in long theID, out long theWidth, out long theHeight);
3920
3921     /*!
3922      * \brief Get list of all avaiable texture IDs
3923      * \return list of all texture IDs avaiable for the current study
3924      */
3925     ListOfLong GetAllTextures();
3926     
3927   };
3928
3929  // # GEOM_IKindOfShape:
3930   /*!
3931    *  \brief Interface for shape_kind enumeration.
3932    */
3933   interface GEOM_IKindOfShape
3934   {
3935     enum shape_kind {
3936       NO_SHAPE,
3937       //COMPOSITEs
3938       COMPOUND,
3939       COMPSOLID,
3940       SHELL,
3941       WIRE,
3942       // SOLIDs
3943       /*! full sphere */
3944       SPHERE,
3945       /*! cylinder */
3946       CYLINDER,
3947       /*! box with faces, parallel to global coordinate planes */
3948       BOX,
3949       /*! other box */
3950       ROTATED_BOX, 
3951       /*! full torus */
3952       TORUS,   
3953       /*! cone */  
3954       CONE,   
3955       /*! solid, bounded by polygons */
3956       POLYHEDRON,  
3957       /*! other solid */
3958       SOLID,       
3959       // FACEs
3960       /*! spherical face (closed) */
3961       SPHERE2D,    
3962       /*! cylindrical face with defined height */
3963       CYLINDER2D,
3964       /*! toroidal face (closed) */
3965       TORUS2D,     
3966       /*! conical face with defined height */
3967       CONE2D,
3968       /*! planar, bounded by circle */
3969       DISK_CIRCLE,
3970       /*! planar, bounded by ellipse */
3971       DISK_ELLIPSE,
3972       /*! planar, bounded by segments */
3973       POLYGON,     
3974       /*! infinite planar */
3975       PLANE,        
3976        /*! other planar */
3977       PLANAR,      
3978       /*! other face */
3979       FACE,      
3980       // EDGEs
3981       /*! full circle */
3982       CIRCLE,      
3983       /*! arc of circle */
3984       ARC_CIRCLE, 
3985       /*! full ellipse */
3986       ELLIPSE,    
3987       /*! arc of ellipse */
3988       ARC_ELLIPSE,  
3989       /*! infinite segment */
3990       LINE,         
3991       /*! segment */
3992       SEGMENT,      
3993       /*! other edge */
3994       EDGE,       
3995       // VERTEX
3996       VERTEX,
3997       // ADVANCED shapes
3998       /*! all advanced shapes (temporary implementation) */
3999       ADVANCED    
4000     };
4001   };
4002
4003  // # GEOM_IMeasureOperations:
4004   /*!
4005    *  \brief Interface for measurement (distance, whatis) and
4006    *  properties calculation (like Centre of Mass, Inertia, etc.).
4007    *
4008    */
4009   interface GEOM_IMeasureOperations : GEOM_IOperations
4010   {
4011     /*!
4012      *  \brief Get kind of theShape.
4013      *  \param theShape Shape to get a kind of.
4014      *  \param theIntegers Output. Integer and enumerated shape's parameters
4015      *                     (kind of surface, closed/unclosed, number of edges, etc.)
4016      *  \param theDoubles  Output. Double shape's parameters (coordinates, dimensions, etc.)
4017      *  \note  Concrete meaning of each value, returned via \a theIntegers
4018      *         or \a theDoubles list depends on the kind of the shape.
4019      *  \return Returns a kind of shape in terms of <VAR>GEOM_IKindOfShape.shape_kind</VAR> enumeration.
4020      */
4021     //short KindOfShape (in GEOM_Object   theShape,
4022     GEOM_IKindOfShape::shape_kind KindOfShape (in  GEOM_Object  theShape,
4023                                                out ListOfLong   theIntegers,
4024                                                out ListOfDouble theDoubles);
4025
4026     /*!
4027      *  \brief Get position (LCS) of theShape.
4028      *  \param theShape Shape to calculate position of.
4029      *  \param Ox,Oy,Oz Output. Coordinates of shape's location origin.
4030      *                  Origin of the LCS is situated at the shape's center of mass.
4031      *  \param Zx,Zy,Zz Output. Coordinates of shape's location normal(main) direction.
4032      *  \param Xx,Xy,Xz Output. Coordinates of shape's location X direction.
4033      *                  Axes of the LCS are obtained from shape's location or,
4034      *                  if the shape is a planar face, from position of its plane.
4035      *  \return Returns position of the shape through the last nine arguments.
4036      */
4037     void GetPosition (in GEOM_Object theShape,
4038                       out double Ox, out double Oy, out double Oz,
4039                       out double Zx, out double Zy, out double Zz,
4040                       out double Xx, out double Xy, out double Xz);
4041
4042     /*!
4043      *  \brief Get summarized length of all wires,
4044      *  area of surface and volume of the given shape.
4045      *  \param theShape Shape to define properties of.
4046      *  \param theLength Output. Summarized length of all wires of the given shape.
4047      *  \param theSurfArea Output. Area of surface of the given shape.
4048      *  \param theVolume Output. Volume of the given shape.
4049      *  \return Returns shape properties through the last three arguments.
4050      */
4051     void GetBasicProperties (in GEOM_Object theShape,
4052                              out double theLength,
4053                              out double theSurfArea,
4054                              out double theVolume);
4055
4056     /*!
4057      *  \brief Get a point, situated at the centre of mass of theShape.
4058      *  \param theShape Shape to define centre of mass of.
4059      *  \return New GEOM_Object, containing the created point.
4060      */
4061     GEOM_Object GetCentreOfMass (in GEOM_Object theShape);
4062
4063     /*
4064      *  Get the vertex by index for 1D objects depends the edge/wire orientation
4065      *  \param theShape Shape (wire or edge) to find the vertex on it
4066      *  \param theIndex Index of vertex sub-shape
4067      *  \return New GEOM_Object, vertex.
4068      */
4069     GEOM_Object GetVertexByIndex( in GEOM_Object theShape, in long index );
4070
4071     /*!
4072      *  \brief Get a vector, representing the normal of theFace.
4073      *  If the face is not planar, theOptionalPoint is obligatory.
4074      *  \param theFace Shape (face) to define the normal of.
4075      *  \param theOptionalPoint Shape (point) to define the normal at.
4076      *                          Can be NULL in case of planar face.
4077      *  \return New GEOM_Object, containing the created normal vector.
4078      */
4079     GEOM_Object GetNormal (in GEOM_Object theFace,
4080                            in GEOM_Object theOptionalPoint);
4081
4082     /*!
4083      *  \brief Get inertia matrix and moments of inertia of theShape.
4084      *  \param theShape Shape to calculate inertia of.
4085      *  \param I11,I12,I13,I21,I22,I23,I31,I32,I33 Output. Components of the inertia matrix of the given shape.
4086      *  \param Ix,Iy,Iz Output. Moments of inertia of the given shape.
4087      *  \return Returns inertia through the last twelve arguments.
4088      */
4089     void GetInertia (in GEOM_Object theShape,
4090                      out double I11, out double I12, out double I13,
4091                      out double I21, out double I22, out double I23,
4092                      out double I31, out double I32, out double I33,
4093                      out double Ix , out double Iy , out double Iz);
4094
4095     /*!
4096      *  \brief Get parameters of bounding box of the given shape
4097      *  \param theShape Shape to obtain bounding box of.
4098      *  \param precise TRUE for precise computation; FALSE for fast one.
4099      *  \param Xmin,Xmax Output. Limits of shape along OX axis.
4100      *  \param Ymin,Ymax Output. Limits of shape along OY axis.
4101      *  \param Zmin,Zmax Output. Limits of shape along OZ axis.
4102      *  \return Returns parameters of bounding box through the last six arguments.
4103      */
4104     void GetBoundingBox (in GEOM_Object theShape,
4105                          in boolean precise,
4106                          out double Xmin, out double Xmax,
4107                          out double Ymin, out double Ymax,
4108                          out double Zmin, out double Zmax);
4109
4110     /*!
4111      *  \brief Get bounding box of the given shape
4112      *  \param theShape Shape to obtain bounding box of.
4113      *  \param precise TRUE for precise computation; FALSE for fast one.
4114      *  \return New GEOM_Object, containing the created bounding box.
4115      */
4116     GEOM_Object MakeBoundingBox (in GEOM_Object theShape,
4117                                  in boolean precise);
4118
4119     /*!
4120      *  \brief Get min and max tolerances of sub-shapes of theShape
4121      *  \param theShape Shape, to get tolerances of.
4122      *  \param FaceMin,FaceMax Output. Min and max tolerances of the faces.
4123      *  \param EdgeMin,EdgeMax Output. Min and max tolerances of the edges.
4124      *  \param VertMin,VertMax Output. Min and max tolerances of the vertices.
4125      *  \return Returns shape tolerances through the last six arguments.
4126      */
4127     void GetTolerance (in GEOM_Object theShape,
4128                        out double FaceMin, out double FaceMax,
4129                        out double EdgeMin, out double EdgeMax,
4130                        out double VertMin, out double VertMax);
4131
4132     /*!
4133      *  \brief Enumeration of Shape defects coming from CheckShape algorithms.
4134      */
4135     enum ShapeErrorType
4136     {
4137       /* for vertices */
4138       InvalidPointOnCurve,
4139       InvalidPointOnCurveOnSurface,
4140       InvalidPointOnSurface,
4141
4142       /* for edges */
4143       No3DCurve,
4144       Multiple3DCurve,
4145       Invalid3DCurve,
4146       NoCurveOnSurface,
4147       InvalidCurveOnSurface,
4148       InvalidCurveOnClosedSurface,
4149       InvalidSameRangeFlag,
4150       InvalidSameParameterFlag,
4151       InvalidDegeneratedFlag,
4152
4153       FreeEdge,
4154       InvalidMultiConnexity,
4155       InvalidRange,
4156
4157       /* for wires */
4158       EmptyWire,
4159       RedundantEdge,
4160       SelfIntersectingWire, /* on a face */
4161
4162       /* for faces */
4163       NoSurface,
4164       InvalidWire,
4165       RedundantWire,
4166       IntersectingWires,
4167       InvalidImbricationOfWires,
4168
4169       /* for shells */
4170       EmptyShell,
4171       RedundantFace,
4172
4173       /* for shapes */
4174       UnorientableShape,
4175       NotClosed,
4176       NotConnected,
4177
4178       SubshapeNotInShape,
4179
4180       BadOrientation,
4181       BadOrientationOfSubshape,
4182
4183       InvalidToleranceValue,
4184
4185       /* for exception */
4186       CheckFail
4187     };
4188
4189     /*!
4190      *  \brief Description of a shape defect: type and incriminated sub-shapes.
4191      */
4192     struct ShapeError
4193     {
4194       ShapeErrorType error;
4195       ListOfLong     incriminated;
4196     };
4197
4198     /*!
4199      *  \brief Sequence of all shape defects.
4200      */
4201     typedef sequence<ShapeError> ShapeErrors;
4202
4203     /*!
4204      *  \brief Check a topology of the given shape.
4205      *  \param theShape Shape to check validity of.
4206      *  \param theErrors Structure, containing discovered errors and incriminated sub-shapes.
4207      *  \return TRUE, if the shape "seems to be valid" from the topological point of view.
4208      */
4209     boolean CheckShape (in GEOM_Object  theShape,
4210                         out ShapeErrors theErrors);
4211
4212     /*!
4213      *  \brief Check a topology and a geometry of the given shape.
4214      *  \param theShape Shape to check validity of.
4215      *  \param theErrors Structure, containing discovered errors and incriminated sub-shapes.
4216      *  \return TRUE, if the shape "seems to be valid".
4217      */
4218     boolean CheckShapeWithGeometry (in GEOM_Object  theShape,
4219                                     out ShapeErrors theErrors);
4220
4221     /*!
4222      *  \brief Convert sequence of shape errors, returned by
4223      *  <VAR>CheckShape()</VAR> or <VAR>CheckShapeWithGeometry()</VAR>, into string.
4224      *  \param theShape the invalid shape.
4225      *  \param theErrors The sequence of \a theShape errors.
4226      *  \return String, describing all the errors in form, suitable for printing.
4227      */
4228     string PrintShapeErrors (in GEOM_Object theShape,
4229                              in ShapeErrors theErrors);
4230
4231     /*!
4232      *  \brief Check a topology of the given shape on self-intersections presence.
4233      *  \param theShape Shape to check validity of.
4234      *  \param theCheckLevel the level of self-interference check.
4235      *  \param theIntersections Output. List of intersected sub-shapes IDs, it contains pairs of IDs.
4236      *  \return TRUE, if the shape does not have any self-intersections.
4237      */
4238     boolean CheckSelfIntersections (in GEOM_Object theShape,
4239                                     in long        theCheckLevel,
4240                                     out ListOfLong theIntersections);
4241
4242     /*!
4243      *  \brief Check if the given shape can be an argument for MakeSolid operation
4244      *  \param theShape Shape to be described.
4245      *  \return Empty string if a solid can be made on this shape, error code otherwise.
4246      */
4247     string IsGoodForSolid (in GEOM_Object theShape);
4248
4249     /*!
4250      *  O\brief btain description of the given shape
4251      *  \param theShape Shape to be described.
4252      *  \return Description of the given shape.
4253      */
4254     string WhatIs (in GEOM_Object theShape);
4255
4256     /*!
4257      *  \brief Check if points defined by coords = [x1, y1, z1, x2, y2, z2, ...] are inside or on
4258      *  the shape theShape.
4259      *  \param theShape Shape to check.
4260      *  \param coords list of coordinates.
4261      *  \param tolerance tolerance.
4262      *  \return list of boolean.
4263      */
4264     ListOfBool AreCoordsInside(in GEOM_Object theShape, in ListOfDouble coords, in double tolerance);
4265
4266     /*!
4267      *  \brief Get minimal distance between the given shapes.
4268      *  \param theShape1,theShape2 Shapes to find minimal distance between.
4269      *  \param X1,Y1,Z1 Output. Coordinates of point on theShape1, nearest to theShape2.
4270      *  \param X2,Y2,Z2 Output. Coordinates of point on theShape2, nearest to theShape1.
4271      *  \return Value of the minimal distance between the given shapes.
4272      */
4273     double GetMinDistance (in GEOM_Object theShape1, in GEOM_Object theShape2,
4274                            out double X1, out double Y1, out double Z1,
4275                            out double X2, out double Y2, out double Z2);
4276
4277     /*!
4278      *  \brief Get closest points of the given shapes.
4279      *  \param theShape1,theShape2 Shapes to find closest points of.
4280      *  \param theCoords Output. List of (X, Y, Z) coordinates for all couples of points.
4281      *  \return The number of found solutions (-1 in case of infinite number of solutions).
4282      */
4283     long ClosestPoints (in GEOM_Object theShape1,
4284                         in GEOM_Object theShape2,
4285                         out ListOfDouble theCoords);
4286
4287     /*!
4288      *  \brief Get angle between the given lines or linear edges.
4289      *  \param theShape1,theShape2 Shapes to find angle between. Lines or linear edges.
4290      *  \return Value of the angle between the given shapes.
4291      */
4292     double GetAngle (in GEOM_Object theShape1, in GEOM_Object theShape2);
4293
4294     /*!
4295      *  \brief Get angle between the given vectors.
4296      *  \param theShape1,theShape2 Vectors to find angle between.
4297      *  \return Value of the angle between the given vectors.
4298      */
4299     double GetAngleBtwVectors (in GEOM_Object theShape1, in GEOM_Object theShape2);
4300
4301     /*!
4302      *  \brief Get point coordinates
4303      */
4304     void PointCoordinates (in GEOM_Object theShape, out double X, out double Y, out double Z);
4305
4306     /*!
4307      *  \brief Get radius of curvature of curve in the point determinated by param
4308      *  \param theShape - curve.
4309      *  \param theParam - parameter on curve
4310      *  \return Value of curvature.
4311      */
4312     double CurveCurvatureByParam (in GEOM_Object theShape, in double theParam);
4313
4314     /*!
4315      *  \brief Get radius of curvature of curve in the given point
4316      *  \param theShape - curve.
4317      *  \param thePoint - point
4318      *  \return Value of curvature.
4319      */
4320     double CurveCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
4321
4322     /*!
4323      *  \brief Get max radius of curvature of surface in the point determinated by params
4324      *  \param theShape - surface.
4325      *  \param theUParam - U-parameter on surface
4326      *  \param theVParam - V-parameter on surface
4327      *  \return Value of curvature.
4328      */
4329     double MaxSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
4330                                        in double theVParam);
4331
4332     /*!
4333      *  \brief Get max radius of curvature of surface in the given point
4334      *  \param theShape - surface.
4335      *  \param thePoint - point
4336      *  \return Value of curvature.
4337      */
4338     double MaxSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
4339
4340     /*!
4341      *  \brief Get min radius of curvature of surface in the point determinated by params
4342      *  \param theShape - surface.
4343      *  \param theUParam - U-parameter on surface
4344      *  \param theVParam - V-parameter on surface
4345      *  \return Value of curvature.
4346      */
4347     double MinSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
4348                                        in double theVParam);
4349
4350     /*!
4351      *  \brief Get min radius of curvature of surface in the given point
4352      *  \param theShape - surface.
4353      *  \param thePoint - point
4354      *  \return Value of curvature.
4355      */
4356     double MinSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
4357
4358   };
4359
4360  // # GEOM_IGroupOperations:
4361   /*!
4362    *  \brief Interface for groups creation.
4363    */
4364   interface GEOM_IGroupOperations : GEOM_IOperations
4365   {
4366     /*!
4367      *  \brief Creates a new group which will store  sub-shapes of theMainShape
4368      *  \param theMainShape is a GEOM_Object on which the group is selected
4369      *  \param theShapeType defines a shape type of the group
4370      *  \return a newly created GEOM group
4371      */
4372     GEOM_Object CreateGroup (in GEOM_Object theMainShape, in long theShapeType);
4373
4374     /*!
4375      *  \brief Adds a sub-object with ID theSubShapeId to the group
4376      *  \param theGroup is a GEOM group to which the new sub-shape is added
4377      *  \param theSubShapeId is a sub-shape ID in the main object.
4378      *  \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub-shape
4379      */
4380     void AddObject (in GEOM_Object theGroup, in long theSubShapeId);
4381
4382     /*!
4383      *  \brief Removes a sub-object with ID \a theSubShapeId from the group
4384      *  \param theGroup is a GEOM group from which the sub-shape is removed.
4385      *  \param theSubShapeId is a sub-shape ID in the main object.
4386      *  \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub-shape
4387      */
4388     void RemoveObject (in GEOM_Object theGroup, in long theSubShapeId);
4389
4390     /*!
4391      *  \brief Adds to the group all the given shapes. No errors, if some shapes are alredy included.
4392      *  \param theGroup is a GEOM group to which the new sub-shapes are added.
4393      *  \param theSubShapes is a list of sub-shapes to be added.
4394      */
4395     void UnionList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
4396
4397     /*!
4398      *  \brief Removes from the group all the given shapes. No errors, if some shapes are not included.
4399      *  \param theGroup is a GEOM group from which the sub-shapes are removed.
4400      *  \param theSubShapes is a list of sub-shapes to be removed.
4401      */
4402     void DifferenceList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
4403
4404     /*!
4405      *  \brief Adds to the group all the given shapes. No errors, if some shapes are alredy included.
4406      *  \param theGroup is a GEOM group to which the new sub-shapes are added.
4407      *  \param theSubShapes is a list of IDs of sub-shapes to be added.
4408      */
4409     void UnionIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
4410
4411     /*!
4412      *  \brief Removes from the group all the given shapes. No errors, if some shapes are not included.
4413      *  \param theGroup is a GEOM group from which the sub-shapes are removed.
4414      *  \param theSubShapes is a list of IDs of sub-shapes to be removed.
4415      */
4416     void DifferenceIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
4417
4418     /*!
4419      *  \brief Union of two groups.
4420      *  New group is created. It will contain all entities
4421      *  which are present in groups theGroup1 and theGroup2.
4422      *  \param theGroup1, theGroup2 are the initial GEOM groups
4423      *                              to create the united group from.
4424      *  \return a newly created GEOM group.
4425      */
4426     GEOM_Object UnionGroups (in GEOM_Object theGroup1, in GEOM_Object theGroup2);
4427
4428     /*!
4429      *  \brief Intersection of two groups.
4430      *  New group is created. It will contain only those entities
4431      *  which are present in both groups theGroup1 and theGroup2.
4432      *  \param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
4433      *  \return a newly created GEOM group.
4434      */
4435     GEOM_Object IntersectGroups (in GEOM_Object theGroup1, in GEOM_Object theGroup2);
4436
4437     /*!
4438      *  \brief Cut of two groups.
4439      *  New group is created. It will contain entities which are
4440      *  present in group theGroup1 but are not present in group theGroup2.
4441      *  \param theGroup1 is a GEOM group to include elements of.
4442      *  \param theGroup2 is a GEOM group to exclude elements of.
4443      *  \return a newly created GEOM group.
4444      */
4445     GEOM_Object CutGroups (in GEOM_Object theGroup1, in GEOM_Object theGroup2);
4446
4447     /*!
4448      *  \brief Union of list of groups.
4449      *  New group is created. It will contain all entities that are
4450      *  present in groups listed in theGList.
4451      *  \param theGList is a list of GEOM groups to create the united group from.
4452      *  \return a newly created GEOM group.
4453      */
4454     GEOM_Object UnionListOfGroups (in ListOfGO theGList);
4455
4456     /*!
4457      *  \brief Intersection of list of groups.
4458      *  New group is created. It will contain only entities
4459      *  which are simultaneously present in the groups listed in theGList.
4460      *  \param theGList is a list of GEOM groups to get common part of.
4461      *  \return a newly created GEOM group.
4462      */
4463     GEOM_Object IntersectListOfGroups (in ListOfGO theGList);
4464
4465     /*!
4466      *  \brief Cut of lists of groups.
4467      *  New group is created. It will contain only entities
4468      *  which are present in groups listed in theGList1 but 
4469      *  are not present in groups from theGList2.
4470      *  \param theGList1 is a list of GEOM groups to include elements of.
4471      *  \param theGList2 is a list of GEOM groups to exclude elements of.
4472      *  \return a newly created GEOM group.
4473      */
4474     GEOM_Object CutListOfGroups (in ListOfGO theGList1,
4475                                  in ListOfGO theGList2);
4476
4477     /*!
4478      *  \brief Returns a type of sub-objects stored in the group
4479      *  \param theGroup is a GEOM group which type is returned.
4480      */
4481     long GetType (in GEOM_Object theGroup);
4482
4483     /*!
4484      *  \brief Returns a main shape associated with the group
4485      *  \param theGroup is a GEOM group for which a main shape object is requested
4486      *  \return a GEOM_Object which is a main shape for theGroup
4487      */
4488     GEOM_Object GetMainShape (in GEOM_Object theGroup);
4489
4490     /*!
4491      *  \brief Returns a list of sub-objects ID stored in the group
4492      *  \param theGroup is a GEOM group for which a list of IDs is requested
4493      */
4494     ListOfLong GetObjects (in GEOM_Object theGroup);
4495   };
4496
4497   // # GEOM_IFieldOperations:
4498   /*!
4499    *  \brief Interface for field operation.
4500    */
4501   interface GEOM_IFieldOperations : GEOM_IOperations
4502   {
4503     /*!
4504      *  \brief Creates a field
4505      */
4506     GEOM_Field CreateField(in GEOM_Object     shape, 
4507                            in string          name,
4508                            in field_data_type type,
4509                            in short           dimension,
4510                            in string_array    componentNames);
4511     /*!
4512      *  \brief Returns number of fields on a shape
4513      */
4514     long CountFields(in GEOM_Object shape);
4515
4516     /*!
4517      *  \brief Returns all fields on a shape
4518      */
4519     ListOfFields GetFields(in GEOM_Object shape);
4520
4521     /*!
4522      *  \brief Returns a field on a shape by its name
4523      */
4524     GEOM_Field GetField(in GEOM_Object shape, in string name);
4525
4526     /*!
4527      *  \brief Returns number of sub-shapes of given dimension
4528      */
4529     long GetNbSubShapes(in GEOM_Object shape, in short fieldDim);
4530   };
4531
4532  // # GEOM_Gen:
4533   /*!
4534    *  \brief Interface to access other GEOM interfaces.
4535    *
4536    *  Also contains some methods to access and manage GEOM_Object.
4537    */
4538   interface GEOM_Gen : Engines::EngineComponent,SALOMEDS::Driver
4539   {
4540     /*!
4541      *  \brief Undo/Redo Management
4542      */
4543
4544     void Undo (in long theStudyID);
4545
4546     void Redo (in long theStudyID);
4547
4548     /*!
4549      * \brief Publishing management
4550      *
4551      * Adds in theStudy a object theObject under with a name theName,
4552      * if theFather is not NULL the object is placed under thFather's SObject.
4553      * Returns a SObject where theObject is placed
4554      */
4555     SALOMEDS::SObject AddInStudy (in SALOMEDS::Study theStudy,
4556                                   in GEOM_BaseObject theObject,
4557                                   in string          theName,
4558                                   in GEOM_BaseObject theFather);
4559
4560     /*!
4561      *  \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
4562      *
4563      *  To be used from python scripts out of geompy.addToStudy (non-default usage)
4564      *  \param theStudy  the study, in which theObject is published already,
4565      *                   and in which the arguments will be published
4566      *  \param theObject published GEOM_Object, arguments of which will be published
4567      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
4568      *                   If this list is empty, all operation arguments will be published
4569      *  \param theFindMethod method to search sub-shapes, corresponding to arguments and
4570      *                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
4571      *  \param theInheritFirstArg set properties of the first argument for \a theObject.
4572      *                            Do not publish sub-shapes in place of arguments, but only
4573      *                            in place of sub-shapes of the first argument,
4574      *                            because the whole shape corresponds to the first argument.
4575      *                            Mainly to be used after transformations, but it also can be
4576      *                            usefull after partition with one object shape, and some other
4577      *                            operations, where only the first argument has to be considered.
4578      *                            If theObject has only one argument shape, this flag is automatically
4579      *                            considered as True, not regarding really passed value.
4580      *  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
4581      *                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
4582      *  \return list of published sub-shapes
4583      */
4584     ListOfGO RestoreSubShapesO (in SALOMEDS::Study   theStudy,
4585                                 in GEOM_Object       theObject,
4586                                 in ListOfGO          theArgs,
4587                                 in find_shape_method theFindMethod,
4588                                 in boolean           theInheritFirstArg,
4589                                 in boolean           theAddPrefix);
4590
4591     /*!
4592      *  \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
4593      *
4594      *  To be used from python scripts out of geompy.addToStudy (non-default usage)
4595      *  \param theStudy  the study, in which theObject is published already,
4596      *                   and in which the arguments will be published
4597      *  \param theObject published GEOM_Object, arguments of which will be published
4598      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
4599      *                   If this list is empty, all operation arguments will be published
4600      *  \param theFindMethod method to search sub-shapes, corresponding to arguments and
4601      *                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
4602      *  \param theInheritFirstArg set properties of the first argument for \a theObject.
4603      *                            Do not publish sub-shapes in place of arguments, but only
4604      *                            in place of sub-shapes of the first argument,
4605      *                            because the whole shape corresponds to the first argument.
4606      *                            Mainly to be used after transformations, but it also can be
4607      *                            usefull after partition with one object shape, and some other
4608      *                            operations, where only the first argument has to be considered.
4609      *                            If theObject has only one argument shape, this flag is automatically
4610      *                            considered as True, not regarding really passed value.
4611      *  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
4612      *                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
4613      *  \return list of published sub-shapes
4614      */
4615     ListOfGO RestoreGivenSubShapesO (in SALOMEDS::Study   theStudy,
4616                                      in GEOM_Object       theObject,
4617                                      in ListOfGO          theArgs,
4618                                      in find_shape_method theFindMethod,
4619                                      in boolean           theInheritFirstArg,
4620                                      in boolean           theAddPrefix);
4621
4622     /*!
4623      *  \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
4624      *
4625      *  To be used from GUI and from geompy.addToStudy.
4626      *  Work like the above method, but accepts study object theSObject instead of GEOM_Object.
4627      *  \param theStudy  the study, in which theObject is published already,
4628      *                   and in which the arguments will be published
4629      *  \param theSObject study object, referencing GEOM_Object, arguments of which will be published
4630      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
4631      *                   If this list is empty, all operation arguments will be published
4632      *  \param theFindMethod method to search sub-shapes, corresponding to arguments and
4633      *                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
4634      *  \param theInheritFirstArg set properties of the first argument for \a theObject.
4635      *                            Do not publish sub-shapes in place of arguments, but only
4636      *                            in place of sub-shapes of the first argument,
4637      *                            because the whole shape corresponds to the first argument.
4638      *                            Mainly to be used after transformations, but it also can be
4639      *                            usefull after partition with one object shape, and some other
4640      *                            operations, where only the first argument has to be considered.
4641      *                            If theObject has only one argument shape, this flag is automatically
4642      *                            considered as True, not regarding really passed value.
4643      *  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
4644      *                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
4645      */
4646     ListOfGO RestoreSubShapesSO (in SALOMEDS::Study   theStudy,
4647                                  in SALOMEDS::SObject theSObject,
4648                                  in ListOfGO          theArgs,
4649                                  in find_shape_method theFindMethod,
4650                                  in boolean           theInheritFirstArg,
4651                                  in boolean           theAddPrefix);
4652
4653     // #  Methods to access interfaces for objects creation and transformation
4654
4655     GEOM_IBasicOperations     GetIBasicOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
4656     GEOM_ITransformOperations GetITransformOperations(in long theStudyID) raises (SALOME::SALOME_Exception);
4657     GEOM_I3DPrimOperations    GetI3DPrimOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
4658     GEOM_IShapesOperations    GetIShapesOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
4659     GEOM_IBooleanOperations   GetIBooleanOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
4660     GEOM_ICurvesOperations    GetICurvesOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
4661     GEOM_ILocalOperations     GetILocalOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
4662     GEOM_IHealingOperations   GetIHealingOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
4663     GEOM_IInsertOperations    GetIInsertOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
4664     GEOM_IMeasureOperations   GetIMeasureOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
4665     GEOM_IBlocksOperations    GetIBlocksOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
4666     GEOM_IGroupOperations     GetIGroupOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
4667     GEOM_IFieldOperations     GetIFieldOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
4668
4669     GEOM_IOperations GetPluginOperations (in long   theStudyID,
4670                                           in string theLibName) raises (SALOME::SALOME_Exception);
4671
4672     // # Objects Management
4673
4674
4675     /*!
4676      *  \brief Removes the object from the GEOM component
4677      *  \param theObject is a GEOM_Object to be removed
4678      */
4679     void RemoveObject (in GEOM_BaseObject theObject);
4680
4681     /*!
4682      *  \brief Returns an object defined by the study and its entry in the GEOM component
4683      *  \param theStudyID is a SALOMEDS Study ID
4684      *  \param theEntry is an entry of the requested GEOM_Object in the GEOM component
4685      *  \note if the object has not previously been created a NULL GEOM_Object is returned
4686      */
4687     GEOM_BaseObject GetObject (in long theStudyID, in string theEntry);
4688
4689     /*!
4690      *  \brief Add a sub-shape defined by indices in \a theIndices
4691      *  (contains unique IDs of sub-shapes inside \a theMainShape)
4692      *  \note The sub-shape GEOM_Object can has ONLY ONE function.
4693      *        Don't try to apply modification operations on them.
4694      *  \note Internal method
4695      */
4696     GEOM_Object AddSubShape (in GEOM_Object theMainShape, in ListOfLong theIndices);
4697
4698  // #  GEOM_Objects IOR Management
4699     
4700     /*!
4701      *  \brief Returns a GEOM_Object defined by its IOR
4702      *  \param theIOR a string containg an IOR of the requested GEOM_Object
4703      */
4704     GEOM_Object GetIORFromString (in string theIOR);
4705
4706     /*!
4707      *  \brief Returns a string which contains an IOR of the GEOM_Object
4708      *  \param theObject is a GEOM_Object which IOR is requested
4709      */
4710     string GetStringFromIOR (in GEOM_Object theObject);
4711
4712     /*!
4713      *  \brief Returns a name with which a GEOM_Object was dumped into python script
4714      *  \param theStudyEntry is an entry of the GEOM_Object in the study
4715      */
4716     string GetDumpName (in string theStudyEntry);
4717
4718     /*!
4719      *  \brief Returns all names with which a GEOM_Object was dumped
4720      *  into python script to avoid the same names in SMESH script
4721      */
4722     string_array GetAllDumpNames();
4723
4724     /*!
4725      *  \brief Publishes the named sub-shapes of given object in the study.
4726      *  \param theStudy    The study in which the object is published
4727      *  \param theObject   The object which named sub-shapes are published
4728      */
4729     ListOfGO PublishNamedShapesInStudy(in SALOMEDS::Study theStudy,
4730                                        //in SObject theSObject,
4731                                        in Object theObject);
4732
4733     /*!
4734      * \brief Creates a new folder
4735      *
4736      * Creates a new container (folder) for any GEOM objects.
4737      * Folder will have name theName.
4738      * If theFather is not NULL, the folder is placed under theFather object.
4739      * Otherwise, the folder takes place under root 'Geometry' object.
4740      * 
4741      * \param theName name of the folder
4742      * \param theFather parent object
4743      * \return SObject represented the created folder.
4744      */
4745     SALOMEDS::SObject CreateFolder (in string theName,
4746                                     in SALOMEDS::SObject theFather);
4747
4748     /*!
4749      * \brief Moves object to the specified folder
4750      *
4751      * The moved object should be first published in the study.
4752      * \param theObject GEOM object to move
4753      * \param theFolder target folder
4754      */
4755     void MoveToFolder (in GEOM_Object theObject,
4756                        in SALOMEDS::SObject theFolder);
4757
4758     /*!
4759      * \brief Moves list of objects to the specified folder
4760      *
4761      * The moved objects should be first published in the study.
4762      * \param theListOfGO list of GEOM objects to move
4763      * \param theFolder target folder
4764      */
4765     void MoveListToFolder (in ListOfGO theListOfGO,
4766                            in SALOMEDS::SObject theFolder);
4767
4768     /*!
4769      * \brief Moves objects to the specified position
4770      *
4771      * This function is used in the drag-n-drop functionality.
4772      *
4773      * \param what objects being moved
4774      * \param where parent object where objects are moved to
4775      * \param row position in the parent object's children list at which objects are moved
4776      */
4777     void Move( in object_list what, 
4778                in SALOMEDS::SObject where, 
4779                in long row );
4780
4781     /*!
4782      * \brief Collects dependencies of the given objects from other ones
4783      * \param theStudy The study in which the object is published
4784      * \param theListOfEntries List of GEOM object entries in OCAF tree (not in study)
4785      * \return Struct of dependent entries and its links as a byte array
4786      * \note This method is supposed to be used by GUI only.
4787      */
4788     SALOMEDS::TMPFile GetDependencyTree(in SALOMEDS::Study theStudy,
4789                                         in string_array theListOfEntries);
4790
4791     /*!
4792      * \brief Fills 3 lists that is used to reduce study of redundant objects:
4793      *  - dependencies of the given objects from other ones;
4794      *  - children of the given objects;
4795      *  - all other objects in study.
4796      * \param theStudy The study in which the object was published
4797      * \param theSelectedEntries List of GEOM object entries in OCAF tree
4798      * \param theParentEntries List of GEOM object entries on which the given objects depend
4799      * \param theSubEntries Children entries list of the given objects
4800      * \param theOtherEntries List of GEOM object entries which are in the study, but not in parents and children lists
4801      * \note This method is supposed to be used by GUI only.
4802      */
4803     void GetEntriesToReduceStudy(in SALOMEDS::Study theStudy,
4804                                  inout string_array theSelectedEntries,
4805                                  inout string_array theParentEntries,
4806                                  inout string_array theSubEntries,
4807                                  inout string_array theOtherEntries);
4808
4809   };
4810 };
4811
4812 #endif