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