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