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