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