Salome HOME
0022664: [CEA 1253] MakePipeWithDifferentSections fails on a elbow pipe
[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. Ignored if IsBySteps is set.
1812      *  \param theWithCorrection - defining that the section is rotated to be
1813      *                                 orthogonal to the spine tangent in
1814      *                          the correspondent point. Ignored if IsBySteps is set.
1815      *  \param IsBySteps - flag that tells if the result should be created
1816      *         step by step or as a whole. If IsBySteps is set no correction
1817      *         of bases is allowed.
1818      *  \param IsGenerateGroups flag that tells if it is necessary to
1819      *         return groups (true) or not (false).
1820      *  \return The list of objects. The first one is a result pipe,
1821      *          the other ones are the created groups. If \a IsGenerateGroups
1822      *          is not set the returned list contains a single object, which
1823      *          is the operation result.
1824      */
1825     ListOfGO MakePipeWithDifferentSections (in ListOfGO theSeqBases,
1826                                             in ListOfGO theLocations,
1827                                             in GEOM_Object thePath,
1828                                             in boolean theWithContact ,
1829                                             in boolean theWithCorrection,
1830                                             in boolean IsBySteps,
1831                                             in boolean IsGenerateGroups);
1832
1833     /*!
1834      *  \brief Create a shape by extrusion of the profile shape along
1835      *  the path shape. 
1836      *
1837      *  The path shape can be a shell or a face.
1838      *  the several profiles can be specified in the several locations of path.
1839      *  \param theSeqBases - list of  Bases shape to be extruded.
1840      *  \param theSeqSubBases - list of corresponding sub-shapes of section shapes.
1841      *  \param theLocations - list of locations on the path corresponding
1842      *                        specified list of the Bases shapes. Number of locations
1843      *                        should be equal to number of bases.
1844      *  \param thePath - Path shape to extrude the base shape along it.
1845      *  \param theWithContact - the mode defining that the section is translated to be in
1846      *                          contact with the spine.
1847      *  \param theWithCorrection - defining that the section is rotated to be
1848      *                                 orthogonal to the spine tangent in the correspondent point
1849      *  \param IsGenerateGroups flag that tells if it is necessary to
1850      *         return groups (true) or not (false).
1851      *  \return The list of objects. The first one is a result pipe,
1852      *          the other ones are the created groups. If \a IsGenerateGroups
1853      *          is not set the returned list contains a single object, which
1854      *          is the operation result.
1855      */
1856     ListOfGO MakePipeWithShellSections (in ListOfGO theSeqBases,
1857                                         in ListOfGO theSeqSubBases,
1858                                         in ListOfGO theLocations,
1859                                         in GEOM_Object thePath,
1860                                         in boolean theWithContact,
1861                                         in boolean theWithCorrection,
1862                                         in boolean IsGenerateGroups);
1863
1864     /*!
1865      *  \brief Create solids between given sections
1866      *  \param theSeqBases - list of sections (shell or face).
1867      *  \param theLocations - list of corresponding vertexes
1868      *  \param IsGenerateGroups flag that tells if it is necessary to
1869      *         return groups (true) or not (false).
1870      *  \return The list of objects. The first one is a result pipe,
1871      *          the other ones are the created groups. If \a IsGenerateGroups
1872      *          is not set the returned list contains a single object, which
1873      *          is the operation result.
1874      */
1875     ListOfGO MakePipeShellsWithoutPath (in ListOfGO theSeqBases,
1876                                         in ListOfGO theLocations,
1877                                         in boolean  IsGenerateGroups);
1878
1879     /*!
1880      *  \brief Create a shape by extrusion of the base shape along
1881      *  the path shape with constant bi-normal direction along the given vector.
1882      *
1883      *  The path shape can be a wire or an edge.
1884      *  \param theBase Base shape to be extruded.
1885      *  \param thePath Path shape to extrude the base shape along it.
1886      *  \param theVec Vector defines a constant binormal direction to keep the
1887      *                same angle beetween the Direction and the sections
1888      *                along the sweep surface.
1889      *  \param IsGenerateGroups flag that tells if it is necessary to
1890      *         return groups (true) or not (false).
1891      *  \return The list of objects. The first one is a result pipe,
1892      *          the other ones are the created groups. If \a IsGenerateGroups
1893      *          is not set the returned list contains a single object, which
1894      *          is the operation result.
1895      */
1896     ListOfGO MakePipeBiNormalAlongVector (in GEOM_Object theBase,
1897                                           in GEOM_Object thePath,
1898                                           in GEOM_Object theVec,
1899                                           in boolean     IsGenerateGroups);
1900
1901
1902      /*!
1903      *  \brief Make a thick solid from a shape.
1904      *
1905      *  If the input is a surface shape (face or shell) the result is
1906      *  a thick solid. If an input shape is a solid the result is a hollowed
1907      *  solid with removed faces.
1908      *  \param theObject face or shell to get thick solid or solid to get
1909      *         hollowed solid.
1910      *  \param theFacesIDs the list of face IDs to be removed from the result.
1911      *          It can be empty.
1912      *  \param theThickness Value of the thickness
1913      *  \param isCopy To make a copy of \a theObject or to modify \a theObject
1914      *  \param isInside If true the thickness is applied towards inside
1915      *  \return New GEOM_Object, containing the created pipe if isCopy = true
1916      *          or the modified object if isCopy = false
1917      */
1918     GEOM_Object MakeThickening (in GEOM_Object theObject,
1919                                 in ListOfLong  theFacesIDs,
1920                                 in double      theThickness,
1921                                 in boolean     isCopy,
1922                                 in boolean     isInside);
1923
1924     
1925     /*!
1926      *  \brief Build a middle path of a pipe-like shape.
1927      *
1928      *  The path shape can be a wire or an edge.
1929      *  \param theShape It can be closed or unclosed pipe-like shell
1930      *                  or a pipe-like solid.
1931      *  \param theBase1, theBase2 Two bases of the supposed pipe. This
1932      *                            should be wires or faces of \a theShape.
1933      *  \note It is not assumed that exact or approximate copy of \a theShape
1934      *        can be obtained by applying existing Pipe operation on the
1935      *        resulting "Path" wire taking \a theBase1 as the base - it is not
1936      *        always possible; though in some particular cases it might work
1937      *        it is not guaranteed. Thus, RestorePath function should not be
1938      *        considered as an exact reverse operation of the Pipe.
1939      *  \return New GEOM_Object, containing an edge or wire that represent
1940      *                           source pipe's "path".
1941      */
1942     GEOM_Object RestorePath (in GEOM_Object theShape,
1943                              in GEOM_Object theBase1,
1944                              in GEOM_Object theBase2);
1945
1946     /*!
1947      *  \brief Build a middle path of a pipe-like shape.
1948      *
1949      *  The path shape can be a wire or an edge.
1950      *  \param theShape It can be closed or unclosed pipe-like shell
1951      *                  or a pipe-like solid.
1952      *  \param theBase1, theBase2 Two bases of the supposed pipe. This
1953      *                            should be lists of edges of \a theShape.
1954      *  \note It is not assumed that exact or approximate copy of \a theShape
1955      *        can be obtained by applying existing Pipe operation on the
1956      *        resulting "Path" wire taking \a theBase1 as the base - it is not
1957      *        always possible; though in some particular cases it might work
1958      *        it is not guaranteed. Thus, RestorePath function should not be
1959      *        considered as an exact reverse operation of the Pipe.
1960      *  \return New GEOM_Object, containing an edge or wire that represent
1961      *                           source pipe's "path".
1962      */
1963     GEOM_Object RestorePathEdges (in GEOM_Object theShape,
1964                                   in ListOfGO theBase1,
1965                                   in ListOfGO theBase2);
1966   };
1967
1968   /*!
1969    *  \brief Interface for Shapes creation:
1970    *
1971    *  Edge from two points, Wire from edges, Face from wire,
1972    *  Shell from faces, Solid from shells, Compound from shapes
1973    */
1974   interface GEOM_IShapesOperations : GEOM_IOperations
1975   {
1976     /*!
1977      *  \brief Create a linear edge with specified ends.
1978      *  \param thePnt1 Point for the first end of edge.
1979      *  \param thePnt2 Point for the second end of edge.
1980      *  \return New GEOM_Object, containing the created edge.
1981      */
1982     GEOM_Object MakeEdge (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
1983
1984     /*!
1985      *  \brief Create an edge on another edge, corresponding to the given length on the given edge.
1986      *  \param theRefCurve The referenced edge.
1987      *  \param theLength Length on the referenced edge. It can be
1988      *                   negative for extrapolation on base curve.
1989      *  \param theStartPoint Any vertex close to one of edge's
1990      *                       ends to select start point among them.
1991      *                       If NULL, fist vertex is used.
1992      *  \return New GEOM_Object, containing the created edge.
1993      */
1994     GEOM_Object MakeEdgeOnCurveByLength (in GEOM_Object theRefCurve,
1995                                          in double      theLength,
1996                                          in GEOM_Object theStartPoint);
1997
1998     /*!
1999      *  \brief Create an edge from specified wire.
2000      *  \param theWire source Wire.
2001      *  \param theLinearTolerance linear tolerance value
2002      *  \param theAngularTolerance angular tolerance value
2003      *  \return New GEOM_Object, containing the created edge.
2004      */
2005     GEOM_Object MakeEdgeWire (in GEOM_Object theWire,
2006                               in double theLinearTolerance,
2007                               in double theAngularTolerance);
2008
2009     /*!
2010      *  \brief Create a wire from the set of edges and wires.
2011      *  \param theEdgesAndWires List of edge and/or wires.
2012      *  \param theTolerance Maximum distance between vertices, that will be merged.
2013      *                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
2014      *  \return New GEOM_Object, containing the created wire.
2015      */
2016     GEOM_Object MakeWire (in ListOfGO theEdgesAndWires,
2017                           in double   theTolerance);
2018
2019     /*!
2020      *  \brief Create a face on the given wire.
2021      *  \param theWire closed Wire or Edge to build the face on.
2022      *  \param isPlanarWanted If TRUE, only planar face will be built.
2023      *                        If impossible, NULL object will be returned.
2024      *  \return New GEOM_Object, containing the created face.
2025      */
2026     GEOM_Object MakeFace (in GEOM_Object theWire, in boolean isPlanarWanted);
2027
2028     /*!
2029      *  \brief Create a face on the given wires set.
2030      *  \param theWires List of closed wires or edges to build the face on.
2031      *  \param isPlanarWanted If TRUE, only planar face will be built.
2032      *                        If impossible, NULL object will be returned.
2033      *  \return New GEOM_Object, containing the created face.
2034      */
2035     GEOM_Object MakeFaceWires (in ListOfGO theWires, in boolean isPlanarWanted);
2036
2037     /**
2038      *  \brief Create a face based on surface of theFace limited by theWire.
2039      *  \param theFace the face whose surface is used to create a new face.
2040      *  \param theWire closed Wire build the face.
2041      *  \return New GEOM_Object, containing the created face.
2042      */
2043     GEOM_Object MakeFaceFromSurface(in GEOM_Object theFace,
2044                                     in GEOM_Object theWire);
2045
2046     /*!
2047      *  \brief Create a face from a set of edges with the given constraints.
2048      *  \param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
2049      *         - edges should form a closed wire;
2050      *         - for each edge, constraint face is optional: if a constraint face is missing
2051      *           for some edge, this means that there no constraint associated with this edge.
2052      *  \return New GEOM_Object, containing the created face.
2053      */
2054     GEOM_Object MakeFaceWithConstraints(in ListOfGO theConstraints);
2055
2056     /*!
2057      *  \brief Create a shell from the set of faces and shells.
2058      *  \param theFacesAndShells List of faces and/or shells.
2059      *  \return New GEOM_Object, containing the created shell.
2060      */
2061     GEOM_Object MakeShell (in ListOfGO theFacesAndShells);
2062
2063     /*!
2064      *  \brief Create a solid, bounded by the given shell.
2065      *  \param theShell Bounding shell.
2066      *  \return New GEOM_Object, containing the created solid.
2067      */
2068     GEOM_Object MakeSolidShell (in GEOM_Object theShell);
2069
2070     /*!
2071      *  \brief Create a solid, bounded by the given shells.
2072      *  \param theShells Bounding shells.
2073      *  \return New GEOM_Object, containing the created solid.
2074      */
2075     GEOM_Object MakeSolidShells (in ListOfGO theShells);
2076
2077     /*!
2078      *  \brief Create a compound of the given shapes.
2079      *  \param theShapes List of shapes to put in compound.
2080      *  \return New GEOM_Object, containing the created compound.
2081      */
2082     GEOM_Object MakeCompound (in ListOfGO theShapes);
2083
2084     /*!
2085      *  \brief Make a solid (or solids) from connected set of faces and/or shells.
2086      *  \param theFacesOrShells List of faces and/or shells.
2087      *  \param isIntersect If TRUE, forces performing intersections between arguments.
2088      *
2089      *  \return New GEOM_Object, containing the created solid (or compound of solids).
2090      */
2091     GEOM_Object MakeSolidFromConnectedFaces (in ListOfGO theFacesOrShells, in boolean isIntersect);
2092     
2093     /*!
2094      *  \brief Replace coincident faces in \a theShapes by one face.
2095      *  \param theShapes Initial shapes.
2096      *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
2097      *  \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
2098      *  \return New GEOM_Object containing copies of theShapes without coincident faces.
2099      */
2100     GEOM_Object MakeGlueFaces (in ListOfGO theShapes, in double theTolerance, in boolean doKeepNonSolids);
2101
2102     /*!
2103      *  Find coincident faces in theShapes for possible gluing.
2104      *  \param theShapes Initial shapes.
2105      *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
2106      *  \return ListOfGO
2107      */
2108     ListOfGO GetGlueFaces (in ListOfGO theShapes, in double theTolerance);
2109
2110     /*!
2111      *  \brief Replace coincident faces in \a theShapes by one face
2112      *         in compliance with given list of faces
2113      *  \param theShapes Initial shapes.
2114      *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
2115      *  \param theFaces List of faces for gluing.
2116      *  \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
2117      *  \param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
2118      *                        will be glued, otherwise only the edges,
2119      *                        belonging to <VAR>theFaces</VAR>.
2120      *  \return New GEOM_Object containing copies of theShapes without coincident faces.
2121      */
2122     GEOM_Object MakeGlueFacesByList (in ListOfGO theShapes, in double theTolerance,
2123                                      in ListOfGO theFaces,  in boolean doKeepNonSolids,
2124                                      in boolean doGlueAllEdges);
2125
2126     /*!
2127      *  \brief Replace coincident edges in \a theShapes by one edge.
2128      *  \param theShapes Initial shapes.
2129      *  \param theTolerance Maximum distance between edges, which can be considered as coincident.
2130      *  \return New GEOM_Object containing copies of theShapes without coincident edges.
2131      */
2132     GEOM_Object MakeGlueEdges (in ListOfGO theShapes, in double theTolerance);
2133
2134     /*!
2135      *  Find coincident edges in \a theShapes for possible gluing.
2136      *  \param theShapes Initial shapes.
2137      *  \param theTolerance Maximum distance between edges, which can be considered as coincident.
2138      *  \return ListOfGO
2139      */
2140     ListOfGO GetGlueEdges (in ListOfGO theShapes, in double theTolerance);
2141
2142     /*!
2143      *  \brief Replace coincident edges in \a theShapes by one edge
2144      *         in compliance with given list of edges
2145      *  \param theShapes Initial shapes.
2146      *  \param theTolerance Maximum distance between edges, which can be considered as coincident.
2147      *  \param theEdges List of edges for gluing.
2148      *  \return New GEOM_Object containing copies of theShapes without some edges.
2149      */
2150     GEOM_Object MakeGlueEdgesByList (in ListOfGO theShapes,
2151                                      in double   theTolerance,
2152                                      in ListOfGO theEdges);
2153
2154     /*!
2155      *  \brief Get all sub-shapes and groups of \a theShape,
2156      *  that were created already by any other methods.
2157      *  \param theShape Any shape.
2158      *  \param theGroupsOnly If this parameter is TRUE, only groups will be
2159      *                       returned, else all found sub-shapes and groups.
2160      *  \return List of existing sub-objects of \a theShape.
2161      */
2162     ListOfGO GetExistingSubObjects (in GEOM_Object theShape,
2163                                     in boolean     theGroupsOnly);
2164
2165     /*!
2166      *  \brief Deprecated method. 
2167      *
2168      *  Use MakeAllSubShapes() instead.
2169      */
2170     ListOfGO MakeExplode (in GEOM_Object theShape,
2171                           in long        theShapeType,
2172                           in boolean     isSorted);
2173
2174     /*!
2175      *  \brief Explode a shape on sub-shapes of a given type. 
2176      *
2177      *  If the shape itself has the given type, it is also returned.
2178      *  \param theShape Shape to be exploded.
2179      *  \param theShapeType Type of sub-shapes to be retrieved.
2180      *  \param isSorted If this parameter is TRUE, sub-shapes will be
2181      *                  sorted by coordinates of their gravity centers.
2182      *  \return List of sub-shapes of type theShapeType, contained in theShape.
2183      */
2184     ListOfGO MakeAllSubShapes (in GEOM_Object theShape,
2185                                in long        theShapeType,
2186                                in boolean     isSorted);
2187
2188     /*!
2189      *  \brief Extract all sub-shapes of the given type from
2190      *  the given shape, excluding the shape itself.
2191      *  \param theShape Shape to be exploded.
2192      *  \param theShapeType Type of sub-shapes to be retrieved.
2193      *  \param isSorted If this parameter is TRUE, sub-shapes will be
2194      *                  sorted by coordinates of their gravity centers.
2195      *  \return List of sub-shapes of type theShapeType, contained in theShape.
2196      */
2197     ListOfGO ExtractSubShapes (in GEOM_Object theShape,
2198                                in long        theShapeType,
2199                                in boolean     isSorted);
2200
2201     /*!
2202      *  \brief Deprecated method. Use GetAllSubShapesIDs() instead.
2203      */
2204     ListOfLong SubShapeAllIDs (in GEOM_Object theShape,
2205                                in long        theShapeType,
2206                                in boolean     isSorted);
2207
2208     /*!
2209      *  \brief Explode a shape on sub-shapes of a given type.
2210      *
2211      *  Does the same, as MakeAllSubShapes, but returns IDs of
2212      *  sub-shapes, not GEOM_Object. It works faster.
2213      *  \param theShape Shape to be exploded.
2214      *  \param theShapeType Type of sub-shapes to be retrieved.
2215      *  \param isSorted If this parameter is TRUE, sub-shapes will be
2216      *                  sorted by coordinates of their gravity centers.
2217      *  \return List of IDs of sub-shapes of type theShapeType, contained in theShape.
2218      */
2219     ListOfLong GetAllSubShapesIDs (in GEOM_Object theShape,
2220                                    in long        theShapeType,
2221                                    in boolean     isSorted);
2222
2223     /*!
2224      *  \brief Get a sub-shape defined by its unique ID inside \a theMainShape
2225      *  \param theMainShape Main shape.
2226      *  \param theID Unique ID of sub-shape inside \a theMainShape.
2227      *  \return GEOM_Object, corresponding to found sub-shape.
2228      *  \note The sub-shape GEOM_Object can has ONLY ONE function.
2229      *        Don't try to apply modification operations (without copy) on them.
2230      */
2231     GEOM_Object GetSubShape (in GEOM_Object theMainShape,
2232                              in long        theID);
2233
2234     /*!
2235      *  \brief Get a set of sub-shapes defined by their unique IDs inside \a theMainShape
2236      *  \param theMainShape Main shape.
2237      *  \param theIndices List of unique IDs of sub-shapes inside \a theMainShape.
2238      *  \return List of GEOM_Object, corresponding to found sub-shapes.
2239      *  \note The sub-shape GEOM_Object can has ONLY ONE function.
2240      *        Don't try to apply modification operations (without copy) on them.
2241      */
2242     ListOfGO MakeSubShapes (in GEOM_Object theMainShape,
2243                             in ListOfLong  theIndices);
2244
2245     /*!
2246      *  Get global index of \a theSubShape in \a theMainShape.
2247      *  \param theMainShape Main shape.
2248      *  \param theSubShape Sub-shape of the main shape.
2249      *  \return global index of \a theSubShape in \a theMainShape.
2250      */
2251     long GetSubShapeIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
2252
2253     /*!
2254      *  Get global indices of \a theSubShapes in \a theMainShape.
2255      *  \param theMainShape Main shape.
2256      *  \param theSubShapes List of sub-shapes of the main shape.
2257      *  \return list of global indices of \a theSubShapes in \a theMainShape.
2258      */
2259     ListOfLong GetSubShapesIndices (in GEOM_Object theMainShape, in ListOfGO theSubShapes);
2260
2261     /*!
2262      *  \brief Get index of \a theSubShape in \a theMainShape, unique among sub-shapes of the same type.
2263      *
2264      *  Together with method <VAR>GetShapeTypeString()</VAR> it can be used
2265      *  to generate automatic names for sub-shapes, when publishing them in a study.
2266      *  \param theMainShape Main shape.
2267      *  \param theSubShape Sub-shape of the main shape.
2268      *  \return index of \a theSubShape in a list of all sub-shapes of \a theMainShape of the same type.
2269      */
2270     long GetTopologyIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
2271
2272     /*!
2273      *  \brief Get name of type of \a theShape.
2274      *
2275      *  Use wide type notation, taking into consideration both topology and geometry of the shape.
2276      *  Together with method <VAR>GetTopologyIndex()</VAR> it can be used
2277      *  to generate automatic names for sub-shapes, when publishing them in a study.
2278      *  \param theShape The shape to get a type of.
2279      *  \return String, containing a type name of \a theShape.
2280      */
2281     string GetShapeTypeString (in GEOM_Object theShape);
2282
2283     /*!
2284      *  \brief Check if the object is a sub-object of another GEOM object.
2285      *
2286      *  \param theSubObject Checked sub-object (or its parent object, in case if
2287      *                      \a theSubObjectIndex is non-zero).
2288      *  \param theSubObjectIndex When non-zero, specifies a sub-shape index that
2289      *                           identifies a sub-object within its parent specified via \a theSubObject.
2290      *  \param theObject An object that is checked for ownership (or its parent object,
2291      *                   in case if \a theObjectIndex is non-zero).
2292      *  \param theObjectIndex When non-zero, specifies a sub-shape index that
2293      *                        identifies an object within its parent specified via \a theObject.
2294      *  \return TRUE, if the given object contains sub-object.
2295      */
2296     boolean IsSubShapeBelongsTo( in GEOM_Object theSubObject,
2297                                  in long        theSubObjectIndex,
2298                                  in GEOM_Object theObject,
2299                                  in long        theObjectIndex);
2300     /*!
2301      *  \brief Count number of faces in the given shape.
2302      *  \param theShape Shape to count faces in.
2303      *  \return Number of faces in the given shape.
2304      */
2305     long NumberOfFaces (in GEOM_Object theShape);
2306
2307     /*!
2308      *  \brief Count number of edges in the given shape.
2309      *  \param theShape Shape to count edges in.
2310      *  \return Number of edges in theShape.
2311      */
2312     long NumberOfEdges (in GEOM_Object theShape);
2313
2314     /*!
2315      *  \brief Count number of sub-shapes of type \a theShapeType in the given shape.
2316      *  \param theShape Shape to count sub-shapes in.
2317      *  \param theShapeType The type of sub-shapes to count.
2318      *  \return Number of sub-shapes of type \a theShapeType in \a theShape.
2319      */
2320     long NumberOfSubShapes (in GEOM_Object theShape,
2321                             in long        theShapeType);
2322
2323     /*!
2324      *  Reverses an orientation the given shape.
2325      *  \param theShape Shape to be reversed.
2326      *  \return The reversed copy of theShape.
2327      */
2328     GEOM_Object ChangeOrientation (in GEOM_Object theShape);
2329
2330     /*!
2331      *  \brief Retrieve all free faces from the given shape.
2332      *
2333      *  Free face is a face, which is not shared between two shells of the shape.
2334      *  \param theShape Shape to find free faces in.
2335      *  \return List of IDs of all free faces, contained in theShape.
2336      */
2337     ListOfLong GetFreeFacesIDs (in GEOM_Object theShape);
2338
2339     /*!
2340      *  \brief Get all sub-shapes of theShape1 of the given type, shared with theShape2.
2341      *  \param theShape1 Shape to find sub-shapes in.
2342      *  \param theShape2 Shape to find shared sub-shapes with.
2343      *  \param theShapeType Type of sub-shapes to be retrieved.
2344      *  \return List of sub-shapes of theShape1, shared with theShape2.
2345      */
2346     ListOfGO GetSharedShapes (in GEOM_Object theShape1,
2347                               in GEOM_Object theShape2,
2348                               in long        theShapeType);
2349
2350     /*!
2351      *  \brief Get sub-shapes, shared by input shapes.
2352      *  \param theShapes Shapes to find common sub-shapes of.
2353      *  \param theShapeType Type of sub-shapes to be retrieved.
2354      *  \param theMultiShare Specifies what type of shares should be checked:
2355      *         - \c TRUE: search sub-shapes from 1st input shape shared with all other input shapes;
2356      *         - \c FALSE: causes to search sub-shapes shared between couples of input shapes.
2357      *  \note If \a theShapes contains single compound, the shares between all possible couples of 
2358      *        its top-level shapes are returned; otherwise, only shares between 1st input shape
2359      *        and all rest input shapes are returned.
2360      *              
2361      *  \return List of all found sub-shapes.
2362      */
2363     ListOfGO GetSharedShapesMulti (in ListOfGO theShapes,
2364                                    in long     theShapeType,
2365                                    in boolean  theMultiShare);
2366
2367     /*!
2368      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2369      *  the specified plane by the certain way, defined through \a theState parameter.
2370      *  \param theShape Shape to find sub-shapes of.
2371      *  \param theShapeType Type of sub-shapes to be retrieved.
2372      *  \param theAx1 Vector (or line, or linear edge), specifying normal
2373      *                direction and location of the plane to find shapes on.
2374      *  \param theState The state of the sub-shapes to find.
2375      *  \return List of all found sub-shapes.
2376      */
2377     ListOfGO GetShapesOnPlane (in GEOM_Object theShape,
2378                                in long        theShapeType,
2379                                in GEOM_Object theAx1,
2380                                in shape_state theState);
2381     /*!
2382      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2383      *  the specified plane by the certain way, defined through \a theState parameter.
2384      *  \param theShape Shape to find sub-shapes of.
2385      *  \param theShapeType Type of sub-shapes to be retrieved.
2386      *  \param theAx1 Vector (or line, or linear edge), specifying normal
2387      *                direction of the plane to find shapes on.
2388      *  \param thePnt Point specifying location of the plane to find shapes on.
2389      *  \param theState The state of the sub-shapes to find.
2390      *  \return List of all found sub-shapes.
2391      */
2392     ListOfGO GetShapesOnPlaneWithLocation (in GEOM_Object theShape,
2393                                            in long        theShapeType,
2394                                            in GEOM_Object theAx1,
2395                                            in GEOM_Object thePnt,
2396                                            in shape_state theState);
2397
2398
2399
2400     /*!
2401      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2402      *  the specified cylinder by the certain way, defined through \a theState parameter.
2403      *  \param theShape Shape to find sub-shapes of.
2404      *  \param theShapeType Type of sub-shapes to be retrieved.
2405      *  \param theAxis Vector (or line, or linear edge), specifying
2406      *                 axis of the cylinder to find shapes on.
2407      *  \param theRadius Radius of the cylinder to find shapes on.
2408      *  \param theState The state of the sub-shapes to find.
2409      *  \return List of all found sub-shapes.
2410      */
2411     ListOfGO GetShapesOnCylinder (in GEOM_Object theShape,
2412                                   in long        theShapeType,
2413                                   in GEOM_Object theAxis,
2414                                   in double      theRadius,
2415                                   in shape_state theState);
2416
2417     /*!
2418      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2419      *  the specified cylinder by the certain way, defined through \a theState parameter.
2420      *  \param theShape Shape to find sub-shapes of.
2421      *  \param theShapeType Type of sub-shapes to be retrieved.
2422      *  \param theAxis Vector (or line, or linear edge), specifying
2423      *                 axis of the cylinder to find shapes on.
2424      *  \param thePnt Point specifying location of the bottom of the cylinder.
2425      *  \param theRadius Radius of the cylinder to find shapes on.
2426      *  \param theState The state of the sub-shapes to find.
2427      *  \return List of all found sub-shapes.
2428      */
2429     ListOfGO GetShapesOnCylinderWithLocation (in GEOM_Object theShape,
2430                                               in long        theShapeType,
2431                                               in GEOM_Object theAxis,
2432                                               in GEOM_Object thePnt,
2433                                               in double      theRadius,
2434                                               in shape_state theState);
2435
2436     /*!
2437      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2438      *  the specified sphere by the certain way, defined through \a theState parameter.
2439      *  \param theShape Shape to find sub-shapes of.
2440      *  \param theShapeType Type of sub-shapes to be retrieved.
2441      *  \param theCenter Point, specifying center of the sphere to find shapes on.
2442      *  \param theRadius Radius of the sphere to find shapes on.
2443      *  \param theState The state of the sub-shapes to find.
2444      *  \return List of all found sub-shapes.
2445      */
2446     ListOfGO GetShapesOnSphere (in GEOM_Object theShape,
2447                                 in long        theShapeType,
2448                                 in GEOM_Object theCenter,
2449                                 in double      theRadius,
2450                                 in shape_state theState);
2451
2452     /*!
2453      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2454      *  the specified quadrangle by the certain way, defined through \a theState parameter.
2455      *  \param theShape Shape to find sub-shapes of.
2456      *  \param theShapeType Type of sub-shapes to be retrieved.
2457      *  \param theTopLeftPoint Top left quadrangle corner
2458      *  \param theTopRigthPoint Top right quadrangle corner
2459      *  \param theBottomLeftPoint Bottom left quadrangle corner
2460      *  \param theBottomRigthPoint Bottom right quadrangle corner
2461      *  \param theState The state of the sub-shapes to find.
2462      *  \return List of all found sub-shapes.
2463      */
2464     ListOfGO GetShapesOnQuadrangle (in GEOM_Object theShape,
2465                                     in long        theShapeType,
2466                                     in GEOM_Object theTopLeftPoint,
2467                                     in GEOM_Object theTopRigthPoint,
2468                                     in GEOM_Object theBottomLeftPoint,
2469                                     in GEOM_Object theBottomRigthPoint,
2470                                     in shape_state theState);
2471
2472     /*!
2473      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2474      *  the specified plane by the certain way, defined through \a theState parameter.
2475      *  \param theShape Shape to find sub-shapes of.
2476      *  \param theShapeType Type of sub-shapes to be retrieved.
2477      *  \param theAx1 Vector (or line, or linear edge), specifying normal
2478      *                direction and location of the plane to find shapes on.
2479      *  \param theState The state of the sub-shapes to find.
2480      *  \return List of IDs of all found sub-shapes.
2481      */
2482     ListOfLong GetShapesOnPlaneIDs (in GEOM_Object theShape,
2483                                     in long        theShapeType,
2484                                     in GEOM_Object theAx1,
2485                                     in shape_state theState);
2486
2487     /*!
2488      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2489      *  the specified plane by the certain way, defined through \a theState parameter.
2490      *  \param theShape Shape to find sub-shapes of.
2491      *  \param theShapeType Type of sub-shapes to be retrieved.
2492      *  \param theAx1 Vector (or line, or linear edge), specifying normal
2493      *                direction of the plane to find shapes on.
2494      *  \param thePnt Point specifying location of the plane to find shapes on.
2495      *  \param theState The state of the sub-shapes to find.
2496      *  \return List of IDs of all found sub-shapes.
2497      */
2498     ListOfLong GetShapesOnPlaneWithLocationIDs (in GEOM_Object theShape,
2499                                                 in long        theShapeType,
2500                                                 in GEOM_Object theAx1,
2501                                                 in GEOM_Object thePnt,
2502                                                 in shape_state theState);
2503
2504     /*!
2505      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2506      *  the specified cylinder by the certain way, defined through \a theState parameter.
2507      *  \param theShape Shape to find sub-shapes of.
2508      *  \param theShapeType Type of sub-shapes to be retrieved.
2509      *  \param theAxis Vector (or line, or linear edge), specifying
2510      *                 axis of the cylinder to find shapes on.
2511      *  \param theRadius Radius of the cylinder to find shapes on.
2512      *  \param theState The state of the sub-shapes to find.
2513      *  \return List of IDs of all found sub-shapes.
2514      */
2515     ListOfLong GetShapesOnCylinderIDs (in GEOM_Object theShape,
2516                                        in long        theShapeType,
2517                                        in GEOM_Object theAxis,
2518                                        in double      theRadius,
2519                                        in shape_state theState);
2520
2521     /*!
2522      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2523      *  the specified cylinder by the certain way, defined through \a theState parameter.
2524      *  \param theShape Shape to find sub-shapes of.
2525      *  \param theShapeType Type of sub-shapes to be retrieved.
2526      *  \param theAxis Vector (or line, or linear edge), specifying
2527      *                 axis of the cylinder to find shapes on.
2528      *  \param thePnt Point specifying location of the bottom of the cylinder.
2529      *  \param theRadius Radius of the cylinder to find shapes on.
2530      *  \param theState The state of the sub-shapes to find.
2531      *  \return List of IDs all found sub-shapes.
2532      */
2533     ListOfLong GetShapesOnCylinderWithLocationIDs (in GEOM_Object theShape,
2534                                                    in long        theShapeType,
2535                                                    in GEOM_Object theAxis,
2536                                                    in GEOM_Object thePnt,
2537                                                    in double      theRadius,
2538                                                    in shape_state theState);
2539
2540     /*!
2541      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2542      *  the specified sphere by the certain way, defined through \a theState parameter.
2543      *  \param theShape Shape to find sub-shapes of.
2544      *  \param theShapeType Type of sub-shapes to be retrieved.
2545      *  \param theCenter Point, specifying center of the sphere to find shapes on.
2546      *  \param theRadius Radius of the sphere to find shapes on.
2547      *  \param theState The state of the sub-shapes to find.
2548      *  \return List of IDs of all found sub-shapes.
2549      */
2550     ListOfLong GetShapesOnSphereIDs (in GEOM_Object theShape,
2551                                      in long        theShapeType,
2552                                      in GEOM_Object theCenter,
2553                                      in double      theRadius,
2554                                      in shape_state theState);
2555
2556     /*!
2557      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2558      *  the specified quadrangle by the certain way, defined through \a theState parameter.
2559      *  \param theShape Shape to find sub-shapes of.
2560      *  \param theShapeType Type of sub-shapes to be retrieved.
2561      *  \param theTopLeftPoint Top left quadrangle corner
2562      *  \param theTopRigthPoint Top right quadrangle corner
2563      *  \param theBottomLeftPoint Bottom left quadrangle corner
2564      *  \param theBottomRigthPoint Bottom right quadrangle corner
2565      *  \param theState The state of the sub-shapes to find.
2566      *  \return List of IDs of all found sub-shapes.
2567      */
2568     ListOfLong GetShapesOnQuadrangleIDs (in GEOM_Object theShape,
2569                                          in long        theShapeType,
2570                                          in GEOM_Object theTopLeftPoint,
2571                                          in GEOM_Object theTopRigthPoint,
2572                                          in GEOM_Object theBottomLeftPoint,
2573                                          in GEOM_Object theBottomRigthPoint,
2574                                          in shape_state theState);
2575
2576     /*!
2577      * \brief Find sub-shapes complying with given status
2578      * \param theBox - the box to check state of sub-shapes against
2579      * \param theShape - the shape to explore
2580      * \param theShapeType - type of sub-shape of theShape
2581      * \param theState - required state
2582      * \return List of IDs of all found sub-shapes.
2583      */
2584     ListOfLong GetShapesOnBoxIDs (in GEOM_Object theBox,
2585                                   in GEOM_Object theShape,
2586                                   in long        theShapeType,
2587                                   in shape_state theState);
2588
2589     /*!
2590      * \brief Find sub-shapes complying with given status
2591      * \param theBox - the box to check state of sub-shapes against
2592      * \param theShape - the shape to explore
2593      * \param theShapeType - type of sub-shape of theShape
2594      * \param theState - required state
2595      * \return List of all found sub-shapes.
2596      */
2597     ListOfGO GetShapesOnBox (in GEOM_Object theBox,
2598                              in GEOM_Object theShape,
2599                              in long        theShapeType,
2600                              in shape_state theState);
2601
2602     /*!
2603      * \brief Find sub-shapes complying with given status
2604      * \param theCheckShape - the shape to check state of sub-shapes against. It must be a solid.
2605      * \param theShape - the shape to explore
2606      * \param theShapeType - type of sub-shape of theShape
2607      * \param theState - required state
2608      * \return List of IDs of all found sub-shapes.
2609      */
2610     ListOfLong GetShapesOnShapeIDs (in GEOM_Object theCheckShape,
2611                                     in GEOM_Object theShape,
2612                                     in short       theShapeType,
2613                                     in shape_state theState);
2614
2615     /*!
2616      * \brief Find sub-shapes complying with given status
2617      * \param theCheckShape - the shape to check state of sub-shapes against. It must be a solid.
2618      * \param theShape - the shape to explore
2619      * \param theShapeType - type of sub-shape of theShape
2620      * \param theState - required state
2621      * \return List of all found sub-shapes.
2622      */
2623     ListOfGO GetShapesOnShape (in GEOM_Object theCheckShape,
2624                                in GEOM_Object theShape,
2625                                in short       theShapeType,
2626                                in shape_state theState);
2627
2628     /*!
2629      * \brief Find sub-shapes complying with given status
2630      * \param theCheckShape - the shape to check state of sub-shapes against. It must be a solid.
2631      * \param theShape - the shape to explore
2632      * \param theShapeType - type of sub-shape of theShape
2633      * \param theState - required state
2634      * \return compound includes all found sub-shapes.
2635      */
2636     GEOM_Object GetShapesOnShapeAsCompound (in GEOM_Object theCheckShape,
2637                                             in GEOM_Object theShape,
2638                                             in short       theShapeType,
2639                                             in shape_state theState);
2640
2641     /*!
2642      *  \brief Get sub-shape(s) of \a theShapeWhere, which are
2643      *  coincident with \a theShapeWhat or could be a part of it.
2644      *  \param theShapeWhere Shape to find sub-shapes of.
2645      *  \param theShapeWhat Shape, specifying what to find.
2646      *  \return Group of all found sub-shapes or a single found sub-shape.
2647      */
2648     GEOM_Object GetInPlace (in GEOM_Object theShapeWhere,
2649                             in GEOM_Object theShapeWhat);
2650
2651     /*!
2652      *  Old implementation of GetInPlace functionality, based on shape properties.
2653      */
2654     GEOM_Object GetInPlaceOld (in GEOM_Object theShapeWhere,
2655                                in GEOM_Object theShapeWhat);
2656
2657     /*!
2658      *  \brief Get sub-shape(s) of \a theShapeWhere, which are
2659      *  coincident with \a theShapeWhat or could be a part of it.
2660      *
2661      *  Implementation of this method is based on a saved history of an operation,
2662      *  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
2663      *  arguments (an argument shape or a sub-shape of an argument shape).
2664      *  The operation could be the Partition or one of boolean operations,
2665      *  performed on simple shapes (not on compounds).
2666      *
2667      *  \param theShapeWhere Shape to find sub-shapes of.
2668      *  \param theShapeWhat Shape, specifying what to find.
2669      *  \return Group of all found sub-shapes or a single found sub-shape.
2670      */
2671     GEOM_Object GetInPlaceByHistory (in GEOM_Object theShapeWhere,
2672                                      in GEOM_Object theShapeWhat);
2673
2674     /*!
2675      *  \brief Get sub-shape of theShapeWhere, which are
2676      *  coincident with \a theShapeWhat that can either SOLID, FACE, EDGE or VERTEX.
2677      *  \param theShapeWhere Shape to find sub-shapes of.
2678      *  \param theShapeWhat Shape, specifying what to find.
2679      *  \return found sub-shape.
2680      */
2681     GEOM_Object GetSame (in GEOM_Object theShapeWhere,
2682                          in GEOM_Object theShapeWhat);
2683
2684     /*!
2685      *  \brief Get sub-shape Ids of theShapeWhere, which are
2686      *   coincident with \a theShapeWhat that can either SOLID, FACE, EDGE or VERTEX.
2687      *  \param theShapeWhere Shape to find sub-shapes of.
2688      *  \param theShapeWhat Shape, specifying what to find.
2689      *  \return found sub-shape Ids.
2690      */
2691     ListOfLong GetSameIDs (in GEOM_Object theShapeWhere,
2692                            in GEOM_Object theShapeWhat);
2693
2694     /*!
2695      *  \brief Resize the input edge with the new Min and Max parameters.
2696      *  The input edge parameters range is [0, 1]. If theMin parameter is
2697      *  negative, the input edge is extended, otherwise it is shrinked by
2698      *  theMin parameter. If theMax is greater than 1, the edge is extended,
2699      *  otherwise it is shrinked by theMax parameter.
2700      *  \param theEdge the input edge to be resized.
2701      *  \param theMin the minimal parameter value.
2702      *  \param theMax the maximal parameter value.
2703      *  \return a newly created edge.
2704      */
2705     GEOM_Object ExtendEdge(in GEOM_Object theEdge,
2706                            in double      theMin,
2707                            in double      theMax);
2708
2709     /*!
2710      *  \brief Resize the input face with the new UMin, UMax, VMin and VMax
2711      *  parameters. The input face U and V parameters range is [0, 1]. If
2712      *  theUMin parameter is negative, the input face is extended, otherwise
2713      *  it is shrinked along U direction by theUMin parameter. If theUMax is
2714      *  greater than 1, the face is extended, otherwise it is shrinked along
2715      *  U direction by theUMax parameter. So as for theVMin, theVMax and
2716      *  V direction of the input face.
2717      *  \param theFace the input face to be resized.
2718      *  \param theUMin the minimal U parameter value.
2719      *  \param theUMax the maximal U parameter value.
2720      *  \param theVMin the minimal V parameter value.
2721      *  \param theVMax the maximal V parameter value.
2722      *  \return a newly created face.
2723      */
2724     GEOM_Object ExtendFace(in GEOM_Object theFace,
2725                            in double      theUMin,
2726                            in double      theUMax,
2727                            in double      theVMin,
2728                            in double      theVMax);
2729
2730     /*!
2731      *  \brief Make a surface from a face. This function takes some face as
2732      *  input parameter and creates new GEOM_Object, i.e. topological shape
2733      *  by extracting underlying surface of the source face and limiting it
2734      *  by the Umin, Umax, Vmin, Vmax parameters of the source face (in the
2735      *  parametrical space).
2736      *  \param theFace the input face.
2737      *  \return a newly created face.
2738      */
2739     GEOM_Object MakeSurfaceFromFace(in GEOM_Object theFace);
2740
2741     /*!
2742      * \brief Explode a shape into edges sorted in a row from a starting point.
2743      * \param theShape - the shape to be exploded on edges.
2744      * \param theStartPoint - the starting point.
2745      * \return Ordered list of edges sorted in a row from a starting point.
2746      */
2747     ListOfGO GetSubShapeEdgeSorted (in GEOM_Object theShape,
2748                                     in GEOM_Object theStartPoint);
2749
2750   };
2751
2752  // # GEOM_IBlocksOperations: 
2753   /*!
2754    *  \brief Interface for Blocks construction
2755    *  Face from points or edges, Block from faces,
2756    *  Blocks multi-translation and multi-rotation
2757    */
2758   interface GEOM_IBlocksOperations : GEOM_IOperations
2759   {
2760    
2761   //  # Creation of blocks
2762
2763     /*!
2764      *  \brief Create a quadrangle face from four edges. Order of Edges is not
2765      *  important. It is  not necessary that edges share the same vertex.
2766      *  \param theEdge1,theEdge2,theEdge3,theEdge4 Edges for the face bound.
2767      *  \return New GEOM_Object, containing the created face.
2768      */
2769     GEOM_Object MakeQuad (in GEOM_Object theEdge1,
2770                           in GEOM_Object theEdge2,
2771                           in GEOM_Object theEdge3,
2772                           in GEOM_Object theEdge4);
2773
2774     /*!
2775      *  \brief Create a quadrangle face on two edges.
2776      *
2777      *  The missing edges will be built by creating the shortest ones.
2778      *  \param theEdge1,theEdge2 Two opposite edges for the face.
2779      *  \return New GEOM_Object, containing the created face.
2780      */
2781     GEOM_Object MakeQuad2Edges (in GEOM_Object theEdge1,
2782                                 in GEOM_Object theEdge2);
2783
2784     /*!
2785      *  \brief Create a quadrangle face with specified corners.
2786      *
2787      *  The missing edges will be built by creating the shortest ones.
2788      *  \param thePnt1,thePnt2,thePnt3,thePnt4 Corner vertices for the face.
2789      *  \return New GEOM_Object, containing the created face.
2790      */
2791     GEOM_Object MakeQuad4Vertices (in GEOM_Object thePnt1,
2792                                    in GEOM_Object thePnt2,
2793                                    in GEOM_Object thePnt3,
2794                                    in GEOM_Object thePnt4);
2795
2796     /*!
2797      *  \brief Create a hexahedral solid, bounded by the six given faces. Order of
2798      *  faces is not important. 
2799      *
2800      *  It is  not necessary that Faces share the same edge.
2801      *  \param theFace1,theFace2,theFace3,theFace4,theFace5,theFace6 Faces for the hexahedral solid.
2802      *  \return New GEOM_Object, containing the created solid.
2803      */
2804     GEOM_Object MakeHexa (in GEOM_Object theFace1,
2805                           in GEOM_Object theFace2,
2806                           in GEOM_Object theFace3,
2807                           in GEOM_Object theFace4,
2808                           in GEOM_Object theFace5,
2809                           in GEOM_Object theFace6);
2810
2811     /*!
2812      *  \brief Create a hexahedral solid between two given faces.
2813      *
2814      *  The missing faces will be built by creating the smallest ones.
2815      *  \param theFace1,theFace2 Two opposite faces for the hexahedral solid.
2816      *  \return New GEOM_Object, containing the created solid.
2817      */
2818     GEOM_Object MakeHexa2Faces (in GEOM_Object theFace1,
2819                                 in GEOM_Object theFace2);
2820
2821     
2822   //  # Extract elements of blocks and blocks compounds
2823      
2824
2825     /*!
2826      *  \brief Get a vertex, found in the given shape by its coordinates.
2827      *  \param theShape Block or a compound of blocks.
2828      *  \param theX,theY,theZ Coordinates of the sought vertex.
2829      *  \param theEpsilon Maximum allowed distance between the resulting
2830      *                    vertex and point with the given coordinates.
2831      *  \return New GEOM_Object, containing the found vertex.
2832      */
2833     GEOM_Object GetPoint (in GEOM_Object theShape,
2834                           in double      theX,
2835                           in double      theY,
2836                           in double      theZ,
2837                           in double      theEpsilon);
2838
2839     /*!
2840      *  \brief Find a vertex of the given shape, which has minimal distance to the given point.
2841      *  \param theShape Any shape.
2842      *  \param thePoint Point, close to the desired vertex.
2843      *  \return New GEOM_Object, containing the found vertex.
2844      */
2845     GEOM_Object GetVertexNearPoint (in GEOM_Object theShape,
2846                                     in GEOM_Object thePoint);
2847
2848     /*!
2849      *  \brief Get an edge, found in the given shape by two given vertices.
2850      *  \param theShape Block or a compound of blocks.
2851      *  \param thePoint1,thePoint2 Points, close to the ends of the desired edge.
2852      *  \return New GEOM_Object, containing the found edge.
2853      */
2854     GEOM_Object GetEdge (in GEOM_Object theShape,
2855                          in GEOM_Object thePoint1,
2856                          in GEOM_Object thePoint2);
2857
2858     /*!
2859      *  \brief Find an edge of the given shape, which has minimal distance to the given point.
2860      *  \param theShape Block or a compound of blocks.
2861      *  \param thePoint Point, close to the desired edge.
2862      *  \return New GEOM_Object, containing the found edge.
2863      */
2864     GEOM_Object GetEdgeNearPoint (in GEOM_Object theShape,
2865                                   in GEOM_Object thePoint);
2866
2867     /*!
2868      *  \brief Returns a face, found in the given shape by four given corner vertices.
2869      *  \param theShape Block or a compound of blocks.
2870      *  \param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
2871      *  \return New GEOM_Object, containing the found face.
2872      */
2873     GEOM_Object GetFaceByPoints (in GEOM_Object theShape,
2874                                  in GEOM_Object thePoint1,
2875                                  in GEOM_Object thePoint2,
2876                                  in GEOM_Object thePoint3,
2877                                  in GEOM_Object thePoint4);
2878
2879     /*!
2880      *  \brief Get a face of block, found in the given shape by two given edges.
2881      *  \param theShape Block or a compound of blocks.
2882      *  \param theEdge1,theEdge2 Edges, close to the edges of the desired face.
2883      *  \return New GEOM_Object, containing the found face.
2884      */
2885     GEOM_Object GetFaceByEdges (in GEOM_Object theShape,
2886                                 in GEOM_Object theEdge1,
2887                                 in GEOM_Object theEdge2);
2888
2889     /*!
2890      *  \brief Find a face, opposite to the given one in the given block.
2891      *  \param theBlock Must be a hexahedral solid.
2892      *  \param theFace Face of \a theBlock, opposite to the desired face.
2893      *  \return New GEOM_Object, containing the found face.
2894      */
2895     GEOM_Object GetOppositeFace (in GEOM_Object theBlock,
2896                                  in GEOM_Object theFace);
2897
2898     /*!
2899      *  \brief Find a face of the given shape, which has minimal distance to the given point.
2900      *  \param theShape Block or a compound of blocks.
2901      *  \param thePoint Point, close to the desired face.
2902      *  \return New GEOM_Object, containing the found face.
2903      */
2904     GEOM_Object GetFaceNearPoint (in GEOM_Object theShape,
2905                                   in GEOM_Object thePoint);
2906
2907     /*!
2908      *  \brief Find a face of block, whose outside normale has minimal angle with the given vector.
2909      *  \param theBlock Block or a compound of blocks.
2910      *  \param theVector Vector, close to the normale of the desired face.
2911      *  \return New GEOM_Object, containing the found face.
2912      */
2913     GEOM_Object GetFaceByNormale (in GEOM_Object theBlock,
2914                                   in GEOM_Object theVector);
2915
2916     /*!
2917      *  \brief Find all sub-shapes of type \a theShapeType of the given shape,
2918      *  which have minimal distance to the given point.
2919      *  \param theShape Any shape.
2920      *  \param thePoint Point, close to the desired shape.
2921      *  \param theShapeType Defines what kind of sub-shapes is searched.
2922      *  \param theTolerance The tolerance for distances comparison. All shapes
2923      *                      with distances to the given point in interval
2924      *                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
2925      *  \return New GEOM_Object, containing a group of all found shapes.
2926      */
2927     GEOM_Object GetShapesNearPoint (in GEOM_Object theShape,
2928                                     in GEOM_Object thePoint,
2929                                     in long        theShapeType,
2930                                     in double      theTolerance);
2931
2932    //  #  Extract blocks from blocks compounds
2933      
2934
2935     /*!
2936      *  \brief Check, if the compound contains only specified blocks.
2937      *  \param theCompound The compound to check.
2938      *  \param theMinNbFaces If solid has lower number of faces, it is not a block.
2939      *  \param theMaxNbFaces If solid has higher number of faces, it is not a block.
2940      *    \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
2941      *  \param theNbBlocks Number of specified blocks in theCompound.
2942      *  \return TRUE, if the given compound contains only blocks.
2943      */
2944     boolean IsCompoundOfBlocks (in GEOM_Object theCompound,
2945                                 in long        theMinNbFaces,
2946                                 in long        theMaxNbFaces,
2947                                 out long       theNbBlocks);
2948
2949     /*!
2950      *  \brief Enumeration of Blocks Compound defects.
2951      */
2952     enum BCErrorType
2953     {
2954       /* Each element of the compound should be a Block */
2955       NOT_BLOCK,
2956
2957       /* An element is a potential block, but has degenerated and/or seam edge(s). */
2958       EXTRA_EDGE,
2959
2960       /* A connection between two Blocks should be an entire face or an entire edge */
2961       INVALID_CONNECTION,
2962
2963       /* The compound should be connexe */
2964       NOT_CONNECTED,
2965
2966       /* The glue between two quadrangle faces should be applied */
2967       NOT_GLUED
2968     };
2969
2970     /*!
2971      *  \brief Description of Blocks Compound defect: type and incriminated sub-shapes.
2972      */
2973     struct BCError
2974     {
2975       BCErrorType error;
2976       ListOfLong  incriminated;
2977     };
2978
2979     /*!
2980      *  \brief Sequence of all Blocks Compound defects.
2981      */
2982     typedef sequence<BCError> BCErrors;
2983
2984     /*!
2985      *  \brief Check, if the compound of blocks is given.
2986      *
2987      *  To be considered as a compound of blocks, the
2988      *  given shape must satisfy the following conditions:
2989      *  - Each element of the compound should be a Block (6 faces and 12 edges).
2990      *  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
2991      *  - The compound should be connexe.
2992      *  - The glue between two quadrangle faces should be applied.
2993      *    \note Single block is also accepted as a valid compound of blocks.
2994      *  \param theCompound The compound to check.
2995      *  \param theToleranceC1 the tolerance to check if two neighbor edges are
2996      *         collinear in the common vertex with this tolerance. Negative
2997      *         value means that C1 criterion is not used (old implementation).
2998      *  \param theErrors Structure, containing discovered errors and incriminated sub-shapes.
2999      *  \return TRUE, if the given shape is a compound of blocks.
3000      */
3001     boolean CheckCompoundOfBlocks (in GEOM_Object theCompound,
3002                                    in double      theToleranceC1,
3003                                    out BCErrors   theErrors);
3004
3005     /*!
3006      *  \brief Convert sequence of Blocks Compound errors, returned by
3007      *  <VAR>CheckCompoundOfBlocks()</VAR>, into string.
3008      *  \param theCompound The bad compound.
3009      *  \param theErrors The sequence of \a theCompound errors.
3010      *  \return String, describing all the errors in form, suitable for printing.
3011      */
3012     string PrintBCErrors (in GEOM_Object theCompound,
3013                           in BCErrors    theErrors);
3014
3015     /*!
3016      *  \brief Retrieve all non blocks solids and faces from a shape.
3017      *
3018      *  \param theShape The shape to explore.
3019      *  \param theToleranceC1 the tolerance to check if two neighbor edges are
3020      *         collinear in the common vertex with this tolerance. Negative
3021      *         value means that C1 criterion is not used (old implementation).
3022      *  \param theNonQuads Output parameter. Group of all non quadrangular faces.
3023      *
3024      *  \return Group of all non block solids (= not 6 faces, or with 6
3025      *          faces, but with the presence of non-quadrangular faces).
3026      */
3027     GEOM_Object GetNonBlocks (in GEOM_Object  theShape,
3028                               in double       theToleranceC1,
3029                               out GEOM_Object theNonQuads);
3030
3031     /*!
3032      *  \brief Remove all seam and degenerated edges from \a theShape.
3033      *
3034      *  Unite faces and edges, sharing one surface.
3035      *  \param theShape The compound or single solid to remove irregular edges from.
3036      *  \param theOptimumNbFaces If more than zero, unite faces only for those solids,
3037      *         that have more than theOptimumNbFaces faces. If zero, unite faces always,
3038      *         regardsless their quantity in the solid. If negative, do not unite faces at all.
3039      *         For blocks repairing recommended value is 6.
3040      *  \return Improved shape.
3041      */
3042     GEOM_Object RemoveExtraEdges (in GEOM_Object theShape,
3043                                   in long        theOptimumNbFaces);
3044
3045     /*!
3046      *  \brief Performs union faces of \a theShape.
3047      *
3048      *  Unite faces sharing one surface.
3049      *  \param theShape The compound or single solid that contains faces to perform union.
3050      *  \return Improved shape.
3051      */
3052     GEOM_Object UnionFaces (in GEOM_Object theShape);
3053
3054     /*!
3055      *  \brief Check, if the given shape is a blocks compound.
3056      *
3057      *  Fix all detected errors.
3058      *    \note Single block can be also fixed by this method.
3059      *  \param theCompound The compound to check and improve.
3060      *  \return Improved compound.
3061      */
3062     GEOM_Object CheckAndImprove (in GEOM_Object theCompound);
3063
3064     /*!
3065      *  \brief Get all the blocks, contained in the given compound.
3066      *
3067      *  \param theCompound The compound to explode.
3068      *  \param theMinNbFaces If solid has lower number of faces, it is not a block.
3069      *  \param theMaxNbFaces If solid has higher number of faces, it is not a block.
3070      *    \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
3071      *  \return List of GEOM_Object, containing the retrieved blocks.
3072      */
3073     ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound,
3074                                       in long        theMinNbFaces,
3075                                       in long        theMaxNbFaces);
3076
3077     /*!
3078      *  \brief Find block, containing the given point inside its volume or on boundary.
3079      *  \param theCompound Compound, to find block in.
3080      *  \param thePoint Point, close to the desired block. If the point lays on
3081      *         boundary between some blocks, we return block with nearest center.
3082      *  \return New GEOM_Object, containing the found block.
3083      */
3084     GEOM_Object GetBlockNearPoint (in GEOM_Object theCompound,
3085                                    in GEOM_Object thePoint);
3086
3087     /*!
3088      *  \brief Find block, containing all the elements, passed as the parts, or maximum quantity of them.
3089      *  \param theCompound Compound, to find block in.
3090      *  \param theParts List of faces and/or edges and/or vertices to be parts of the found block.
3091      *  \return New GEOM_Object, containing the found block.
3092      */
3093     GEOM_Object GetBlockByParts (in GEOM_Object theCompound,
3094                                  in ListOfGO    theParts);
3095
3096     /*!
3097      *  \brief Return all blocks, containing all the elements, passed as the parts.
3098      *  \param theCompound Compound, to find blocks in.
3099      *  \param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
3100      *  \return List of GEOM_Object, containing the found blocks.
3101      */
3102     ListOfGO GetBlocksByParts (in GEOM_Object theCompound,
3103                                in ListOfGO    theParts);
3104
3105   // #  Operations on blocks with gluing of result
3106
3107     /*!
3108      *  \brief Multi-transformate block and glue the result.
3109      *
3110      *  Transformation is defined so, as to superpose theDirFace1 with theDirFace2.
3111      *  \param theBlock Hexahedral solid to be multi-transformed.
3112      *  \param theDirFace1 First direction face global index.
3113      *  \param theDirFace2 Second direction face global index.
3114      *  \param theNbTimes Quantity of transformations to be done.
3115      *    \note Global index of sub-shape can be obtained, using method
3116      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3117      *  \return New GEOM_Object, containing the result shape.
3118      */
3119     GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock,
3120                                            in long        theDirFace1,
3121                                            in long        theDirFace2,
3122                                            in long        theNbTimes);
3123
3124     /*!
3125      *  \brief Multi-transformate block and glue the result.
3126      *  \param theBlock Hexahedral solid to be multi-transformed.
3127      *  \param theDirFace1U,theDirFace2U Direction faces for the first transformation.
3128      *  \param theDirFace1V,theDirFace2V Direction faces for the second transformation.
3129      *  \param theNbTimesU,theNbTimesV Quantity of transformations to be done.
3130      *  \return New GEOM_Object, containing the result shape.
3131      */
3132     GEOM_Object MakeMultiTransformation2D (in GEOM_Object theBlock,
3133                                            in long        theDirFace1U,
3134                                            in long        theDirFace2U,
3135                                            in long        theNbTimesU,
3136                                            in long        theDirFace1V,
3137                                            in long        theDirFace2V,
3138                                            in long        theNbTimesV);
3139
3140   // # Special operation - propagation
3141    
3142
3143     /*!
3144      *  \brief Build all possible propagation groups.
3145      *
3146      *  Propagation group is a set of all edges, opposite to one (main)
3147      *  edge of this group directly or through other opposite edges.
3148      *  Notion of Opposite Edge make sence only on quadrangle face.
3149      *  \param theShape Shape to build propagation groups on.
3150      *  \return List of GEOM_Object, each of them is a propagation group.
3151      */
3152     ListOfGO Propagate (in GEOM_Object theShape);
3153   };
3154
3155  // # GEOM_IBooleanOperations
3156   /*!
3157    *  \brief Interface for boolean operations (Cut, Fuse, Common)
3158    */
3159   interface GEOM_IBooleanOperations : GEOM_IOperations
3160   {
3161     /*!
3162      *  \brief Perform one of boolean operations on two given shapes.
3163      *  \param theShape1 First argument for boolean operation.
3164      *  \param theShape2 Second argument for boolean operation.
3165      *  \param theOperation Indicates the operation to be done:
3166      *                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
3167      *  \param IsCheckSelfInte If TRUE, perform check self intersection
3168      *                         of arguments before an operation.
3169      *  \return New GEOM_Object, containing the result shape.
3170      */
3171     GEOM_Object MakeBoolean (in GEOM_Object theShape1,
3172                              in GEOM_Object theShape2,
3173                              in long        theOperation,
3174                              in boolean     IsCheckSelfInte);
3175     /*!
3176      *  \brief Perform fusion boolean operation on two given shapes.
3177      *  \param theShape1 First argument for fuse operation.
3178      *  \param theShape2 Second argument for fuse operation.
3179      *  \param IsCheckSelfInte If TRUE, perform check self intersection
3180      *                         of arguments before an operation.
3181      *  \param IsRmExtraEdges If TRUE, perform removal of extra edges
3182      *                        during an operation.
3183      *  \return New GEOM_Object, containing the result shape.
3184      */
3185     GEOM_Object MakeFuse (in GEOM_Object theShape1,
3186                           in GEOM_Object theShape2,
3187                           in boolean     IsCheckSelfInte,
3188                           in boolean     IsRmExtraEdges);
3189
3190     /*!
3191      *  \brief Perform fusion boolean operation on list of objects.
3192      *  \param theShapes Shapes to be fused.
3193      *  \param IsCheckSelfInte If TRUE, perform check self intersection
3194      *                         of arguments before an operation.
3195      *  \param IsRmExtraEdges If TRUE, perform removal of extra edges
3196      *                        during an operation.
3197      *  \return New GEOM_Object, containing the result shape.
3198      */
3199     GEOM_Object MakeFuseList (in ListOfGO theShapes,
3200                               in boolean  IsCheckSelfInte,
3201                               in boolean  IsRmExtraEdges);
3202
3203     /*!
3204      *  \brief Perform common boolean operation on list of objects.
3205      *  \param theShapes Shapes for common operation.
3206      *  \param IsCheckSelfInte If TRUE, perform check self intersection
3207      *                         of arguments before an operation.
3208      *  \return New GEOM_Object, containing the result shape.
3209      */
3210     GEOM_Object MakeCommonList (in ListOfGO theShapes,
3211                                 in boolean  IsCheckSelfInte);
3212
3213     /*!
3214      *  \brief Perform cutting of list of objects from theMainShape.
3215      *  \param theMainShape the object for cut operation.
3216      *  \param theShapes Shapes to be cut from theMainShape (tools).
3217      *  \param IsCheckSelfInte If TRUE, perform check self intersection
3218      *                         of arguments before an operation.
3219      *  \return New GEOM_Object, containing the result shape.
3220      */
3221     GEOM_Object MakeCutList (in GEOM_Object theMainShape,
3222                              in ListOfGO theShapes,
3223                              in boolean  IsCheckSelfInte);
3224
3225     /*!
3226      *  \brief Perform partition operation.
3227      *
3228      *  \param theShapes Shapes to be intersected.
3229      *  \param theTools Shapes to intersect theShapes.
3230      *  \note  Each compound from ListShapes and ListTools will be exploded in order
3231      *         to avoid possible intersection between shapes from this compound.
3232      *  \param theLimit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
3233      *  \param theKeepNonlimitShapes: if this parameter == 0, then only shapes of
3234      *                             target type (equal to Limit) are kept in the result,
3235      *                             else standalone shapes of lower dimension
3236      *                             are kept also (if they exist).
3237      *
3238      *  After implementation new version of PartitionAlgo (October 2006)
3239      *  other parameters are ignored by current functionality. They are kept
3240      *  in this function only for supporting old versions.
3241      *  Ignored parameters:
3242      *  \param theKeepInside Shapes, outside which the results will be deleted.
3243      *         Each shape from theKeepInside must belong to theShapes also.
3244      *  \param theRemoveInside Shapes, inside which the results will be deleted.
3245      *         Each shape from theRemoveInside must belong to theShapes also.
3246      *  \param theRemoveWebs If TRUE, perform Glue 3D algorithm.
3247      *  \param theMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
3248      *
3249      *  \return New GEOM_Object, containing the result shapes.
3250      */
3251     GEOM_Object MakePartition (in ListOfGO   theShapes,
3252                                in ListOfGO   theTools,
3253                                in ListOfGO   theKeepInside,
3254                                in ListOfGO   theRemoveInside,
3255                                in short      theLimit,
3256                                in boolean    theRemoveWebs,
3257                                in ListOfLong theMaterials,
3258                                in short      theKeepNonlimitShapes);
3259
3260     /*!
3261      *  \brief Perform partition operation.
3262      *
3263      *  This method may be usefull if it is needed to make a partition for
3264      *  a compound containing nonintersected shapes. Performance will be better
3265      *  since intersection between shapes from compound is not performed.
3266      *
3267      *  Description of all parameters as in previous method MakePartition().
3268      *  One additional parameter is provided:
3269      *  \param IsCheckSelfInte If TRUE, perform check self intersection
3270      *                         of arguments before an operation.
3271      *
3272      *  \note Passed compounds (via ListShapes or via ListTools)
3273      *        have to consist of nonintersecting shapes.
3274      *
3275      *  \return New GEOM_Object, containing the result shapes.
3276      */
3277     GEOM_Object MakePartitionNonSelfIntersectedShape (in ListOfGO   theShapes,
3278                                                       in ListOfGO   theTools,
3279                                                       in ListOfGO   theKeepInside,
3280                                                       in ListOfGO   theRemoveInside,
3281                                                       in short      theLimit,
3282                                                       in boolean    theRemoveWebs,
3283                                                       in ListOfLong theMaterials,
3284                                                       in short      theKeepNonlimitShapes,
3285                                                       in boolean    IsCheckSelfInte);
3286
3287     /*!
3288      *  \brief Perform partition of the Shape with the Plane
3289      *  \param theShape Shape to be intersected.
3290      *  \param thePlane Tool shape, to intersect theShape.
3291      *  \return New GEOM_Object, containing the result shape.
3292      * 
3293      *  \note This operation is a shortcut to the more general \ref MakePartition
3294      *  operation, where \a theShape specifies single "object" (shape being partitioned)
3295      *  and \a thePlane specifies single "tool" (intersector shape). Other parameters of
3296      *  \ref MakePartition operation have default values:
3297      *  - \a theLimit: GEOM::SHAPE (shape limit corresponds to the type of \a theShape)
3298      *  - \a theKeepNonlimitShapes: 0
3299      *  - \a theKeepInside, \a theRemoveInside, \a theRemoveWebs,
3300      *    \a theMaterials (obsolete parameters): empty
3301      *
3302      * \sa MakePartition, MakePartitionNonSelfIntersectedShape
3303      */
3304     GEOM_Object MakeHalfPartition (in GEOM_Object theShape,
3305                                    in GEOM_Object thePlane);
3306   };
3307
3308  // # GEOM_ICurvesOperations:
3309   /*!
3310    *  \brief Interface for curves creation.
3311    *
3312    *  Polyline, Circle, Spline (Bezier and Interpolation)
3313    */
3314   interface GEOM_ICurvesOperations : GEOM_IOperations
3315   {
3316     /*!
3317      *  \brief Create a circle with given center, normal vector and radius.
3318      *  \param thePnt Circle center.
3319      *  \param theVec Vector, normal to the plane of the circle.
3320      *  \param theR Circle radius.
3321      *  \return New GEOM_Object, containing the created circle.
3322      */
3323     GEOM_Object MakeCirclePntVecR (in GEOM_Object thePnt,
3324                                    in GEOM_Object theVec,
3325                                    in double theR);
3326     /*!
3327      *  \brief Create a circle, passing through three given points
3328      *  \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
3329      *  \return New GEOM_Object, containing the created circle.
3330      */
3331     GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1,
3332                                     in GEOM_Object thePnt2,
3333                                     in GEOM_Object thePnt3);
3334     /*!
3335      *  \brief Create a circle with given center, with a radius equals the distance from center to Point1
3336      *  and on a plane defined by all of three points.
3337      *  \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
3338      *  \return New GEOM_Object, containing the created circle.
3339      */
3340     GEOM_Object MakeCircleCenter2Pnt (in GEOM_Object thePnt1,
3341                                       in GEOM_Object thePnt2,
3342                                       in GEOM_Object thePnt3);
3343     /*!
3344      *  \brief Create an ellipse with given center, normal vector and radiuses.
3345      *  \param thePnt Ellipse center.
3346      *  \param theVec Vector, normal to the plane of the ellipse.
3347      *  \param theRMajor Major ellipse radius.
3348      *  \param theRMinor Minor ellipse radius.
3349      *  \return New GEOM_Object, containing the created ellipse.
3350      */
3351     GEOM_Object MakeEllipse (in GEOM_Object thePnt,
3352                              in GEOM_Object theVec,
3353                              in double theRMajor,
3354                              in double theRMinor);
3355
3356     /*!
3357      *  \brief Create an ellipse with given center, normal vector, main axis vector and radiuses.
3358      *  \param thePnt Ellipse center.
3359      *  \param theVec Vector, normal to the plane of the ellipse.
3360      *  \param theRMajor Major ellipse radius.
3361      *  \param theRMinor Minor ellipse radius.
3362      *  \param theVecMaj Vector, direction of the ellipse's main axis.
3363      *  \return New GEOM_Object, containing the created ellipse.
3364      */
3365     GEOM_Object MakeEllipseVec (in GEOM_Object thePnt,
3366                                 in GEOM_Object theVec,
3367                                 in double theRMajor,
3368                                 in double theRMinor,
3369                                 in GEOM_Object theVecMaj);
3370
3371     /*!
3372      *  \brief Create an arc of circle, passing through three given points.
3373      *  \param thePnt1 Start point of the arc.
3374      *  \param thePnt2 Middle point of the arc.
3375      *  \param thePnt3 End point of the arc.
3376      *  \return New GEOM_Object, containing the created arc.
3377      */
3378     GEOM_Object MakeArc (in GEOM_Object thePnt1,
3379                          in GEOM_Object thePnt2,
3380                          in GEOM_Object thePnt3);
3381
3382     /*!
3383      *  \brief Create an arc of circle of center C from one point to another
3384      *  \param theCenter Center point of the arc.
3385      *  \param thePnt1 Start point of the arc.
3386      *  \param thePnt2 End point of the arc.
3387      *  \param theSense Orientation of the arc
3388      *  \return New GEOM_Object, containing the created arc.
3389      */
3390     GEOM_Object MakeArcCenter (in GEOM_Object theCenter,
3391                                in GEOM_Object thePnt1,
3392                                in GEOM_Object thePnt2,
3393                                in boolean theSense);
3394
3395     /*!
3396      *  \brief Create an arc of ellipse of center C and two points P1 P2.
3397      *  \param theCenter Center point of the arc.
3398      *  \param thePnt1 Major radius is distance from center to Pnt1.
3399      *  \param thePnt2 define a plane and Minor radius as a shortest
3400      *                 distance from Pnt2 to vector Center->Pnt1.
3401      *  \return New GEOM_Object, containing the created arc.
3402      */
3403     GEOM_Object MakeArcOfEllipse (in GEOM_Object theCenter,
3404                                   in GEOM_Object thePnt1,
3405                                   in GEOM_Object thePnt2);
3406
3407
3408     /*!
3409      *  \brief Create a polyline on the set of points.
3410      *  \param thePoints Sequence of points for the polyline.
3411      *  \param theIsClosed If TRUE, build a closed wire.
3412      *  \return New GEOM_Object, containing the created polyline.
3413      */
3414     GEOM_Object MakePolyline (in ListOfGO thePoints,
3415                               in boolean  theIsClosed);
3416
3417     /*!
3418      *  \brief Create bezier curve on the set of points.
3419      *  \param thePoints Sequence of points for the bezier curve.
3420      *  \param theIsClosed If TRUE, build a closed curve.
3421      *  \return New GEOM_Object, containing the created bezier curve.
3422      */
3423     GEOM_Object MakeSplineBezier (in ListOfGO thePoints,
3424                                   in boolean  theIsClosed);
3425
3426     /*!
3427      *  \brief Create B-Spline curve on the set of points.
3428      *  \param thePoints Sequence of points for the B-Spline curve.
3429      *  \param theIsClosed If TRUE, build a closed curve.
3430      *  \param theDoReordering If TRUE, the algo does not follow the order of
3431      *                         \a thePoints but searches for the closest vertex.
3432      *  \return New GEOM_Object, containing the created B-Spline curve.
3433      */
3434     GEOM_Object MakeSplineInterpolation (in ListOfGO thePoints,
3435                                          in boolean  theIsClosed,
3436                                          in boolean  theDoReordering);
3437
3438     /*!
3439      *  \brief Create B-Spline curve on the set of points.
3440      *  \param thePoints Sequence of points for the B-Spline curve.
3441      *  \param theFirstVec Vector object, defining the curve direction at its first point.
3442      *  \param theLastVec Vector object, defining the curve direction at its last point.
3443      *  \return New GEOM_Object, containing the created B-Spline curve.
3444      */
3445     GEOM_Object MakeSplineInterpolWithTangents (in ListOfGO    thePoints,
3446                                                 in GEOM_Object theFirstVec,
3447                                                 in GEOM_Object theLastVec);
3448
3449     /*!
3450      *  \brief Creates a curve using the parametric definition of the basic points.
3451      *  \param thexExpr parametric equation of the coordinates X.
3452      *  \param theyExpr parametric equation of the coordinates Y.
3453      *  \param thezExpr parametric equation of the coordinates Z.
3454      *  \param theParamMin the minimal value of the parameter.
3455      *  \param theParamMax the maximum value of the parameter.
3456      *  \param theParamStep the step of the parameter.
3457      *  \param theCurveType the type of the curve.
3458      *  \return New GEOM_Object, containing the created curve.
3459      */    
3460     GEOM_Object MakeCurveParametric(in string thexExpr,
3461                                     in string theyExpr,
3462                                     in string thezExpr,
3463                                     in double theParamMin,
3464                                     in double theParamMax,
3465                                     in double theParamStep,
3466                                     in curve_type theCurveType);
3467
3468      /*!
3469      *  \brief Creates a curve using the parametric definition of the basic points.
3470      *  \param thexExpr parametric equation of the coordinates X.
3471      *  \param theyExpr parametric equation of the coordinates Y.
3472      *  \param thezExpr parametric equation of the coordinates Z.
3473      *  \param theParamMin the minimal value of the parameter.
3474      *  \param theParamMax the maximum value of the parameter.
3475      *  \param theParamNbStep the number of steps of the parameter discretization.
3476      *  \param theCurveType the type of the curve.
3477      *  \return New GEOM_Object, containing the created curve.
3478      */    
3479     GEOM_Object MakeCurveParametricNew(in string thexExpr,
3480                     in string theyExpr,
3481                     in string thezExpr,
3482                     in double theParamMin,
3483                     in double theParamMax,
3484                     in long   theParamNbStep,
3485                     in curve_type theCurveType);
3486
3487      /*!
3488      *  \brief Creates an isoline curve on a face.
3489      *  \param theFace the face for which an isoline is created.
3490      *  \param IsUIsoline True for U-isoline creation; False for V-isoline
3491      *         creation.
3492      *  \param theParameter the U parameter for U-isoline or V parameter
3493      *         for V-isoline.
3494      *  \return New GEOM_Object, containing the created isoline edge or a
3495      *          compound of edges.
3496      */
3497     GEOM_Object MakeIsoline(in GEOM_Object theFace,
3498                             in boolean     IsUIsoline,
3499                             in double      theParameter);
3500
3501     /*!
3502      *  \brief Create a sketcher (wire or face), following the textual description,
3503      *         passed through \a theCommand argument.
3504      *
3505      *  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
3506      *  Format of the description string has to be the following:
3507      *
3508      *  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
3509      *
3510      *  Where:
3511      *  - x1, y1 are coordinates of the first sketcher point (zero by default),
3512      *  - CMD is one of
3513      *     - "R angle" : Set the direction by angle
3514      *     - "D dx dy" : Set the direction by DX & DY
3515      *     .
3516      *       \n
3517      *     - "TT x y" : Create segment by point at X & Y
3518      *     - "T dx dy" : Create segment by point with DX & DY
3519      *     - "L length" : Create segment by direction & Length
3520      *     - "IX x" : Create segment by direction & Intersect. X
3521      *     - "IY y" : Create segment by direction & Intersect. Y
3522      *     .
3523      *       \n
3524      *     - "C radius length" : Create arc by direction, radius and length(in degree)
3525      *     .
3526      *       \n
3527      *     - "WW" : Close Wire (to finish)
3528      *     - "WF" : Close Wire and build face (to finish)
3529      *
3530      *  \param theCommand String, defining the sketcher in local
3531      *                    coordinates of the working plane.
3532      *  \param theWorkingPlane Nine double values, defining origin,
3533      *                         OZ and OX directions of the working plane.
3534      *  \return New GEOM_Object, containing the created wire or face.
3535      */
3536     GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane);
3537
3538     /*!
3539      *  \brief Create a sketcher (wire or face), following the textual description,
3540      *         passed through \a theCommand argument. 
3541      *
3542      *  For format of the description string see the previous method.\n
3543      *
3544      *  \param theCommand String, defining the sketcher in local
3545      *                    coordinates of the working plane.
3546      *  \param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
3547      *  \return New GEOM_Object, containing the created wire or face.
3548      */
3549     GEOM_Object MakeSketcherOnPlane (in string theCommand, in GEOM_Object theWorkingPlane);
3550
3551     /*!
3552      *  \brief Create a 3D sketcher, following the textual description,
3553      *         passed through \a theCommand argument. 
3554      *
3555      *  Format of the description string has to be the following:
3556      *
3557      *  "3DSketcher:CMD[:CMD[:CMD...]]"
3558      *
3559      *  Where CMD is one of
3560      *     - "TT x y z" : Create segment by point at X & Y or set the first point
3561      *     - "T dx dy dz" : Create segment by point with DX & DY
3562      *     .
3563      *       \n
3564      *     - "OXY angleX angle2 length" : Create segment by two angles and length
3565      *     - "OYZ angleY angle2 length" : Create segment by two angles and length
3566      *     - "OXZ angleX angle2 length" : Create segment by two angles and length
3567      *     .
3568      *       \n
3569      *     - "WW" : Close Wire (to finish)
3570      *
3571      *  \param theCommand String, defining the sketcher in local
3572      *                    coordinates of the working plane.
3573      *  \return New GEOM_Object, containing the created wire.
3574      */
3575     GEOM_Object Make3DSketcherCommand (in string theCommand);
3576
3577     /*!
3578      *  \brief Create a 3D sketcher, made of a straight segments, joining points
3579      *         with coordinates passed through \a theCoordinates argument. 
3580      *
3581      *  Order of coordinates has to be the following:
3582      *  x1, y1, z1, x2, y2, z2, ..., xN, yN, zN
3583      *
3584      *  \param theCoordinates List of double values.
3585      *  \return New GEOM_Object, containing the created wire.
3586      */
3587     GEOM_Object Make3DSketcher (in ListOfDouble theCoordinates);
3588
3589     /*!
3590      *  \brief Create a 2D polyline (wire or a compound of wires).
3591      *
3592      *  The polyline can have several sections. Each section represents a set
3593      *  of points in the form of list of coordinates of the following order:
3594      *  x1, y1, x2, y2, ..., xN, yN
3595      *  Each section has its own name, type of curve (can be either
3596      *  GEOM::Polyline or GEOM::Interpolation) and Closed flag.
3597      *  For each section a wire is created. It represents either a polyline or
3598      *  interpolation BSpline either closed or not depending on the Closed flag.
3599      *  The result represents a wire if there is only one section is defined.
3600      *  Otherwise a compound of wires is returned.
3601      *
3602      *  \param theCoordsList the list of coordinates list. theCoordsList[0]
3603      *         is the coordinates list of the first section. theCoordsList[1]
3604      *         is for the second section etc.
3605      *  \param theNamesList the list of names. The order corresponds to
3606      *         theCoordsList.
3607      *  \param theTypesList the list of curve types. The order corresponds to
3608      *         theCoordsList.
3609      *  \param theClosedList the list of Closed flags. The order corresponds to
3610      *         theCoordsList.
3611      *  \param theWorkingPlane 9 double values, defining origin,
3612      *         OZ and OX directions of the working plane.
3613      *  \return New GEOM_Object, containing the created wire or a compound
3614      *          of wires.
3615      */
3616     GEOM_Object MakePolyline2D (in ListOfListOfDouble theCoordsList,
3617                                 in string_array       theNamesList,
3618                                 in short_array        theTypesList,
3619                                 in ListOfBool         theClosedList,
3620                                 in ListOfDouble       theWorkingPlane);
3621
3622     /*!
3623      *  \brief Create a 2D polyline (wire or a compound of wires).
3624      *
3625      *  The polyline can have several sections. Each section represents a set
3626      *  of points in the form of list of coordinates of the following order:
3627      *  x1, y1, x2, y2, ..., xN, yN
3628      *  Each section has its own name, type of curve (can be either
3629      *  GEOM::Polyline or GEOM::Interpolation) and Closed flag.
3630      *  For each section a wire is created. It represents either a polyline or
3631      *  interpolation BSpline either closed or not depending on the Closed flag.
3632      *  The result represents a wire if there is only one section is defined.
3633      *  Otherwise a compound of wires is returned.
3634      *
3635      *  \param theCoordsList the list of coordinates list. theCoordsList[0]
3636      *         is the coordinates list of the first section. theCoordsList[1]
3637      *         is for the second section etc.
3638      *  \param theNamesList the list of names. The order corresponds to
3639      *         theCoordsList.
3640      *  \param theTypesList the list of curve types. The order corresponds to
3641      *         theCoordsList.
3642      *  \param theClosedList the list of Closed flags. The order corresponds to
3643      *         theCoordsList.
3644      *  \param theWorkingPlane planar Face or LCS(Marker) of the working plane.
3645      *  \return New GEOM_Object, containing the created wire or a compound
3646      *          of wires.
3647      */
3648     GEOM_Object MakePolyline2DOnPlane (in ListOfListOfDouble theCoordsList,
3649                                        in string_array       theNamesList,
3650                                        in short_array        theTypesList,
3651                                        in ListOfBool         theClosedList,
3652                                        in GEOM_Object        theWorkingPlane);
3653
3654   };
3655
3656  // # GEOM_ILocalOperations:
3657   /*!
3658    *  \brief Interface for fillet and chamfer creation.
3659    */
3660   interface GEOM_ILocalOperations : GEOM_IOperations
3661   {
3662     /*!
3663      *  \brief Perform a fillet on all edges of the given shape.
3664      *  \param theShape Shape, to perform fillet on.
3665      *  \param theR Fillet radius.
3666      *  \return New GEOM_Object, containing the result shape.
3667      */
3668     GEOM_Object MakeFilletAll (in GEOM_Object theShape,
3669                                in double      theR);
3670
3671     /*!
3672      *  \brief Perform a fillet on the specified edges of the given shape
3673      *  \param theShape Shape, to perform fillet on.
3674      *  \param theR Fillet radius.
3675      *  \param theEdges Global indices of edges to perform fillet on.
3676      *    \note Global index of sub-shape can be obtained, using method
3677      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3678      *  \return New GEOM_Object, containing the result shape.
3679      */
3680     GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
3681                                  in double      theR,
3682                                  in ListOfLong  theEdges);
3683     GEOM_Object MakeFilletEdgesR1R2 (in GEOM_Object theShape,
3684                                      in double      theR1,
3685                                      in double      theR2,
3686                                      in ListOfLong  theEdges);
3687
3688     /*!
3689      *  \brief Perform a fillet on all edges of the specified faces of the given shape.
3690      *  \param theShape Shape, to perform fillet on.
3691      *  \param theR Fillet radius.
3692      *  \param theFaces Global indices of faces to perform fillet on.
3693      *    \note Global index of sub-shape can be obtained, using method
3694      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3695      *  \return New GEOM_Object, containing the result shape.
3696      */
3697     GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
3698                                  in double      theR,
3699                                  in ListOfLong  theFaces);
3700
3701     GEOM_Object MakeFilletFacesR1R2 (in GEOM_Object theShape,
3702                                      in double      theR1,
3703                                      in double      theR2,
3704                                      in ListOfLong  theFaces);
3705
3706     /*!
3707      *  \brief Perform a fillet on a face or a shell at the specified vertexes.
3708      *  \param theShape Shape, to perform fillet on.
3709      *  \param theR Fillet radius.
3710      *  \param theVertexes Global indices of vertexes to perform fillet on.
3711      *    \note Global index of sub-shape can be obtained, using method
3712      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3713      *  \return New GEOM_Object, containing the result shape.
3714      */
3715     GEOM_Object MakeFillet2D (in GEOM_Object theShape,
3716                               in double      theR,
3717                               in ListOfLong  theVertexes);
3718
3719     /*!
3720      *  \brief Perform a fillet on edges of the specified vertexes of the given wire.
3721      *  \param theShape Shape, to perform fillet on.
3722      *  \param theR Fillet radius.
3723      *  \param theVertexes Global indices of vertexes to perform fillet on.
3724      *    \note Global index of sub-shape can be obtained, using method
3725      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3726      *    \note The list of vertices coudl be empty, in this case fillet fill be done
3727      *          at all vertices in given wire
3728      *  \param doIgnoreSecantVertices If FALSE, fillet radius is always limited
3729      *         by the length of the edges, nearest to the fillet vertex.
3730      *         But sometimes the next edge is C1 continuous with the one, nearest to
3731      *         the fillet point, and such two (or more) edges can be united to allow
3732      *         bigger radius. Set this flag to TRUE to allow collinear edges union,
3733      *         thus ignoring the secant vertex (vertices).
3734      *  \return New GEOM_Object, containing the result shape.
3735      */
3736     GEOM_Object MakeFillet1D (in GEOM_Object theShape,
3737                               in double      theR,
3738                               in ListOfLong  theVertexes,
3739                               in boolean     doIgnoreSecantVertices);
3740
3741     /*!
3742      *  \brief Perform a symmetric chamfer on all edges of the given shape.
3743      *  \param theShape Shape, to perform chamfer on.
3744      *  \param theD Chamfer size along each face.
3745      *  \return New GEOM_Object, containing the result shape.
3746      */
3747     GEOM_Object MakeChamferAll (in GEOM_Object theShape,
3748                                 in double      theD);
3749
3750     /*!
3751      *  \brief Perform a chamfer on edges, common to the specified faces.
3752      *  with distance D1 on the Face1
3753      *  \param theShape Shape, to perform chamfer on.
3754      *  \param theD1 Chamfer size along \a theFace1.
3755      *  \param theD2 Chamfer size along \a theFace2.
3756      *  \param theFace1,theFace2 Global indices of two faces of \a theShape.
3757      *    \note Global index of sub-shape can be obtained, using method
3758      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3759      *  \return New GEOM_Object, containing the result shape.
3760      */
3761     GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
3762                                  in double theD1, in double theD2,
3763                                  in long theFace1, in long theFace2);
3764     /*!
3765      *  \brief The Same but with params theD = Chamfer Lenght
3766      *  and theAngle = Chamfer Angle (Angle in radians)
3767      */
3768     GEOM_Object MakeChamferEdgeAD (in GEOM_Object theShape,
3769                                    in double theD, in double theAngle,
3770                                    in long theFace1, in long theFace2);
3771
3772     /*!
3773      *  \brief Perform a chamfer on all edges of the specified faces.
3774      *  with distance D1 on the first specified face (if several for one edge)
3775      *  \param theShape Shape, to perform chamfer on.
3776      *  \param theD1 Chamfer size along face from \a theFaces. If both faces,
3777      *               connected to the edge, are in \a theFaces, \a theD1
3778      *               will be get along face, which is nearer to \a theFaces beginning.
3779      *  \param theD2 Chamfer size along another of two faces, connected to the edge.
3780      *  \param theFaces Sequence of global indices of faces of \a theShape.
3781      *    \note Global index of sub-shape can be obtained, using method
3782      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3783      *  \return New GEOM_Object, containing the result shape.
3784      */
3785     GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
3786                                   in double theD1, in double theD2,
3787                                   in ListOfLong theFaces);
3788     /*!
3789      *  The Same but with params theD = Chamfer Lenght
3790      *  and theAngle = Chamfer Angle (Angle in radians)
3791      */
3792     GEOM_Object MakeChamferFacesAD (in GEOM_Object theShape,
3793                                     in double theD, in double theAngle,
3794                                     in ListOfLong theFaces);
3795
3796    /*!
3797     *  \brief Perform a chamfer on edges,
3798     *  with distance D1 on the first specified face (if several for one edge)
3799     *  \param theShape Shape, to perform chamfer on.
3800     *  \param theD1,theD2 Chamfer size
3801     *  \param theEdges Sequence of edges of \a theShape.
3802     *  \return New GEOM_Object, containing the result shape.
3803     */
3804     GEOM_Object MakeChamferEdges (in GEOM_Object theShape,
3805                                   in double theD1, in double theD2,
3806                                   in ListOfLong theEdges);
3807     /*!
3808      *  The Same but with params theD = Chamfer Lenght
3809      *  and theAngle = Chamfer Angle (Angle in radians)
3810      */
3811     GEOM_Object MakeChamferEdgesAD (in GEOM_Object theShape,
3812                                     in double theD, in double theAngle,
3813                                     in ListOfLong theEdges);
3814
3815     /*!
3816      *  \brief Perform an Archimde operation on the given shape with given parameters.
3817      *                    The object presenting the resulting face is returned
3818      *  \param theShape Shape to be put in water.
3819      *  \param theWeight Weight og the shape.
3820      *  \param theWaterDensity Density of the water.
3821      *  \param theMeshDeflection Deflection od the mesh, using to compute the section.
3822      *  \return New GEOM_Object, containing a section of \a theShape
3823      *          by a plane, corresponding to water level.
3824      */
3825     GEOM_Object MakeArchimede (in GEOM_Object theShape,
3826                                in double theWeight,
3827                                in double theWaterDensity,
3828                                in double theMeshDeflection);
3829
3830     /*!
3831      *  \brief Duplicates <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3832      *
3833      *  Present here only for compatibility.
3834      */
3835     long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape);
3836   };
3837
3838  // #  GEOM_IHealingOperations: 
3839   /*!
3840    *  \brief Interface for shape healing operations
3841    *
3842    *  Shape Processing, SuppressFaces, etc.
3843    */
3844   interface GEOM_IHealingOperations : GEOM_IOperations
3845   {
3846     /*!
3847      *  \brief Apply a sequence of Shape Healing operators to the given object.
3848      *  \param theShapes Shape to be processed.
3849      *  \param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
3850      *  \param theParameters List of names of parameters
3851      *                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
3852      *  \param theValues List of values of parameters, in the same order
3853      *                    as parameters are listed in \a theParameters list.
3854      *  \return New GEOM_Object, containing processed shape.
3855      */
3856     GEOM_Object ProcessShape (in GEOM_Object theShapes,
3857                               in string_array theOperators,
3858                               in string_array theParameters,
3859                               in string_array theValues);
3860
3861     /*!
3862      *  \brief Get default sequence of operators, their parameters and parameters' values
3863      *  of Shape Process operation. 
3864      *
3865      *  In the current implementation the defaults are
3866      *  read from the file pointed by CSF_ShHealingDefaults environmental variable.
3867      *  \param theOperators Output. Default list of names of operators.
3868      *  \param theParameters Output. Default list of names of parameters.
3869      *  \param theValues Output. List of default values of parameters, in the same order
3870      *                           as parameters are listed in \a theParameters list.
3871      */
3872     void GetShapeProcessParameters (out string_array theOperators,
3873                                     out string_array theParameters,
3874                                     out string_array theValues);
3875     /*!
3876      *  \brief Get parameters and parameters' values for the given Shape Process operation.
3877      *
3878      *  In the current implementation the defaults are
3879      *  read from the file pointed by CSF_ShHealingDefaults environmental variable.
3880      *  \param theOperator Input. The operator's name.
3881      *  \param theParameters Output. Default list of names of parameters.
3882      *  \param theValues Output. List of default values of parameters, in the same order
3883      *                           as parameters are listed in \a theParameters list.
3884      */
3885     void GetOperatorParameters (in string theOperator,
3886                                 out string_array theParameters,
3887                                 out string_array theValues);
3888
3889     /*!
3890      *  \brief Remove faces from the given object (shape).
3891      *  \param theObject Shape to be processed.
3892      *  \param theFaces Indices of faces to be removed, if EMPTY then the method
3893      *                  removes ALL faces of the given object.
3894      *  \return New GEOM_Object, containing processed shape.
3895      */
3896     GEOM_Object SuppressFaces (in GEOM_Object theObject, in short_array theFaces);
3897
3898     /*!
3899      *  \brief Close an open wire.
3900      *  \param theObject Shape to be processed.
3901      *  \param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
3902      *                  if -1, then theObject itself is a wire.
3903      *  \param isCommonVertex If TRUE : closure by creation of a common vertex,
3904      *                        If FALS : closure by creation of an edge between ends.
3905      *  \return New GEOM_Object, containing processed shape.
3906      */
3907     GEOM_Object CloseContour (in GEOM_Object theObject, in short_array theWires,
3908                               in boolean isCommonVertex);
3909
3910     /*!
3911      *  \brief Remove internal wires and edges from the given object (face).
3912      *  \param theObject Shape to be processed.
3913      *  \param theWires Indices of wires to be removed, if EMPTY then the method
3914      *                  removes ALL internal wires of the given object.
3915      *  \return New GEOM_Object, containing processed shape.
3916      */
3917     GEOM_Object RemoveIntWires (in GEOM_Object theObject, in short_array theWires);
3918
3919     /*!
3920      *  \brief Remove internal closed contours (holes) from the given object.
3921      *  \param theObject Shape to be processed.
3922      *  \param theWires Indices of wires to be removed, if EMPTY then the method
3923      *                  removes ALL internal holes of the given object
3924      *  \return New GEOM_Object, containing processed shape.
3925      */
3926     GEOM_Object FillHoles (in GEOM_Object theObject, in short_array theWires);
3927
3928     /*!
3929      *  Sewing of the given object.
3930      *  \param theObjects Shapes to be processed.
3931      *  \param theTolerance Required tolerance value.
3932      *  \return New GEOM_Object, containing processed shape.
3933      */
3934     GEOM_Object Sew (in ListOfGO theObjects, in double theTolerance);
3935
3936     /*!
3937      *  Sewing of the given object. Allows non-manifold sewing.
3938      *  \param theObjects Shapes to be processed.
3939      *  \param theTolerance Required tolerance value.
3940      *  \return New GEOM_Object, containing processed shape.
3941      */
3942     GEOM_Object SewAllowNonManifold(in ListOfGO theObjects, in double theTolerance);
3943
3944     /*!
3945      *  Rebuild the topology of theSolids by removing
3946      *  the faces that are shared by several solids.
3947      *  \param theSolids A list of shapes containing solids to be processed.
3948      *  \return New GEOM_Object, containing processed shape.
3949      */
3950     GEOM_Object RemoveInternalFaces (in ListOfGO theSolids);
3951
3952     /*!
3953      *  \brief Addition of a point to a given edge of \a theObject.
3954      *  \param theObject Shape to be processed.
3955      *  \param theEdgeIndex Index of edge to be divided within theObject's shape,
3956      *                      if -1, then theObject itself is the edge.
3957      *  \param theValue Value of parameter on edge or length parameter,
3958      *                  depending on \a isByParameter.
3959      *  \param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1],
3960      *                       if FALSE : \a theValue is treated as a length parameter [0..1]
3961      *  \return New GEOM_Object, containing the processed shape.
3962      */
3963     GEOM_Object DivideEdge (in GEOM_Object theObject, in short theEdgeIndex,
3964                             in double theValue, in boolean isByParameter);
3965
3966     /*!
3967      *  \brief Addition of points to a given edge of \a theObject by projecting
3968      *         other points to the given edge.
3969      *  \param theObject Shape to be processed.
3970      *  \param theEdgeIndex Index of edge to be divided within theObject's shape,
3971      *                      if -1, then theObject itself is the edge.
3972      *  \param thePoints Points to project to theEdgeIndex-th edge.
3973      *  \return New GEOM_Object, containing the processed shape.
3974      */
3975     GEOM_Object DivideEdgeByPoint (in GEOM_Object theObject,
3976                                    in short       theEdgeIndex,
3977                                    in ListOfGO    thePoints);
3978
3979     /*!
3980      *  \brief Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
3981      *  \param theWire Wire to minimize the number of C1 continuous edges in.
3982      *  \param theVertices A list of vertices to suppress. If the list
3983      *                     is empty, all vertices in a wire will be assumed.
3984      *  \return New GEOM_Object with modified wire.
3985      */
3986     GEOM_Object FuseCollinearEdgesWithinWire (in GEOM_Object theWire,
3987                                               in ListOfGO theVertices);
3988
3989     /*!
3990      *  \brief Get a list of wires (wrapped in GEOM_Object-s),
3991      *  that constitute a free boundary of the given shapes.
3992      *  \param theObjects Shapes to get free boundary of.
3993      *  \param theClosedWires Output. Closed wires on the free boundary of the given shape.
3994      *  \param theOpenWires Output. Open wires on the free boundary of the given shape.
3995      *  \return FALSE, if an error(s) occured during the method execution.
3996      */
3997     boolean GetFreeBoundary (in  ListOfGO theObjects,
3998                              out ListOfGO theClosedWires,
3999                              out ListOfGO theOpenWires);
4000
4001     /*!
4002      *  \brief Change orientation of the given object.
4003      *  \param theObject Shape to be processed.
4004      *  \return New GEOM_Object, containing processed shape.
4005      */
4006     GEOM_Object ChangeOrientation (in GEOM_Object theObject);
4007     GEOM_Object ChangeOrientationCopy (in GEOM_Object theObject);
4008
4009     /*!
4010      *  \brief Try to limit tolerance of the given object by value \a theTolerance.
4011      *  \param theObject Shape to be processed.
4012      *  \param theTolerance Required tolerance value.
4013      *  \return New GEOM_Object, containing processed shape.
4014      */
4015     GEOM_Object LimitTolerance (in GEOM_Object theObject, in double theTolerance);
4016
4017
4018     /*!
4019      *  \brief Return information on what has been done by the last called healing method.
4020      *  \return ModifStatistics, information container.
4021      */
4022     ModifStatistics GetStatistics();
4023   };
4024
4025  // # GEOM_IInsertOperations:
4026   /*!
4027    *  \brief Interface for shape insert operations (like copy, import).
4028    *
4029    */
4030   interface GEOM_IInsertOperations : GEOM_IOperations
4031   {
4032     /*!
4033      *  \brief Create a copy of the given object
4034      */
4035     GEOM_Object MakeCopy (in GEOM_Object theOriginal);
4036
4037     /*!
4038      *  \brief Deprecated method. Use Export\<FormatName\> (from the
4039      *  corresponding plugin) instead; here \<FormatName\> is a name of format.
4040      *
4041      *  \brief Export the given shape into a file with given name.
4042      *  \param theObject Shape to be stored in the file.
4043      *  \param theFileName Name of the file to store the given shape in.
4044      *  \param theFormatName Specify format for the shape storage.
4045      */
4046     void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName);
4047
4048     /*!
4049      *  \brief Deprecated method. Use Import\<FormatName\> (from the
4050      *  corresponding plugin) instead; here \<FormatName\> is a name of format.
4051      *
4052      *  \brief Import a shape from the STL, BREP, IGES or STEP file
4053      *  (depends on given format) with given name.
4054      *  \param theFileName The file, containing the shape.
4055      *  \param theFormatName Specify format for the file reading.
4056      *         If format 'IGES_SCALE' is used instead of 'IGES' or
4057      *            format 'STEP_SCALE' is used instead of 'STEP',
4058      *            file length unit will be ignored (set to 'meter') and result model will be scaled.
4059      *  \return List of GEOM_Object, containing the created shape and groups of materials.
4060      */
4061     ListOfGBO ImportFile (in string theFileName, in string theFormatName);
4062
4063     /*!
4064      *  \brief Deprecated method. Use ReadValue (from the corresponding plugin) instead.
4065      *
4066      *  \brief Read a value of parameter from a file, containing a shape.
4067      *  \param theFileName The file, containing the shape.
4068      *  \param theFormatName Specify format for the file reading.
4069      *  \param theParameterName Specify the parameter. For example, pass "LEN_UNITS"
4070      *                          to obtain length units, in which the file is written.
4071      *  \return Value of requested parameter in form of text string.
4072      */
4073     string ReadValue (in string theFileName, in string theFormatName, in string theParameterName);
4074
4075     /*!
4076      *  \brief Read a shape from the binary stream, containing its bounding representation (BRep).
4077      *  \note GEOM_Object::GetShapeStream() method can be used to obtain the shape's BRep stream.
4078      *  \param theStream The BRep binary stream.
4079      *  \return New GEOM_Object, containing the shape, read from theStream.
4080      */
4081     GEOM_Object RestoreShape (in SALOMEDS::TMPFile theStream);
4082
4083     /*!
4084      * \brief Load texture from file
4085      * \param theTextureFile texture file name
4086      * \return unique texture identifier
4087      */
4088     long LoadTexture(in string theTextureFile);
4089
4090     /*!
4091      * \brief Add texture to the study
4092      * \param theWidth texture width in pixels
4093      * \param theHeight texture height in pixels
4094      * \param theTexture texture byte array
4095      * \return unique texture identifier
4096      */
4097     long AddTexture(in long theWidth, in long theHeight, in SALOMEDS::TMPFile theTexture);
4098
4099     /*!
4100      * \brief Get previously loaded texture data
4101      * \param theID texture identifier
4102      * \param theWidth texture width in pixels
4103      * \param theHeight texture height in pixels
4104      * \return texture byte array
4105      */
4106     SALOMEDS::TMPFile GetTexture(in long theID, out long theWidth, out long theHeight);
4107
4108     /*!
4109      * \brief Get list of all avaiable texture IDs
4110      * \return list of all texture IDs avaiable for the current study
4111      */
4112     ListOfLong GetAllTextures();
4113
4114     /*!
4115      *  \brief Non-topological information transfer datum.
4116      */
4117     struct TransferDatum
4118     {
4119       string myName;
4120       long   myNumber;
4121       long   myMaxNumber;
4122     };
4123
4124     /*!
4125      *  \brief Sequence of non-topological information tranfer data.
4126      */
4127     typedef sequence<TransferDatum> ListOfTransferDatum;
4128
4129     /*!
4130      *  \brief Transfer non-topological data from one object to another
4131      *  \param theObjectFrom the source object of non-topological data
4132      *  \param theObjectTo the destination object of non-topological data
4133      *  \param theFindMethod method to search sub-shapes of theObjectFrom
4134      *         in shape theObjectTo. Possible values are: GEOM::FSM_GetInPlace,
4135      *         GEOM::FSM_GetInPlaceByHistory and GEOM::FSM_GetInPlace_Old.
4136      *         Other values of GEOM::find_shape_method are not supported.
4137      *  \param theResult statistics of the operation. Output parameter. It
4138      *         represents a sequence of Transfer Datum. A datum has the type
4139      *         (string code), the total number of items of this type and
4140      *         the number of transfered items.
4141      *  \return true in case of success; otherwise false.
4142      */
4143     boolean TransferData(in  GEOM_Object         theObjectFrom,
4144                          in  GEOM_Object         theObjectTo,
4145                          in  find_shape_method   theFindMethod,
4146                          out ListOfTransferDatum theResult);
4147
4148   };
4149
4150  // # GEOM_IKindOfShape:
4151   /*!
4152    *  \brief Interface for shape_kind enumeration.
4153    */
4154   interface GEOM_IKindOfShape
4155   {
4156     enum shape_kind {
4157       NO_SHAPE,
4158       //COMPOSITEs
4159       COMPOUND,
4160       COMPSOLID,
4161       SHELL,
4162       WIRE,
4163       // SOLIDs
4164       /*! full sphere */
4165       SPHERE,
4166       /*! cylinder */
4167       CYLINDER,
4168       /*! box with faces, parallel to global coordinate planes */
4169       BOX,
4170       /*! other box */
4171       ROTATED_BOX, 
4172       /*! full torus */
4173       TORUS,   
4174       /*! cone */  
4175       CONE,   
4176       /*! solid, bounded by polygons */
4177       POLYHEDRON,  
4178       /*! other solid */
4179       SOLID,       
4180       // FACEs
4181       /*! spherical face (closed) */
4182       SPHERE2D,    
4183       /*! cylindrical face with defined height */
4184       CYLINDER2D,
4185       /*! toroidal face (closed) */
4186       TORUS2D,     
4187       /*! conical face with defined height */
4188       CONE2D,
4189       /*! planar, bounded by circle */
4190       DISK_CIRCLE,
4191       /*! planar, bounded by ellipse */
4192       DISK_ELLIPSE,
4193       /*! planar, bounded by segments */
4194       POLYGON,     
4195       /*! infinite planar */
4196       PLANE,        
4197        /*! other planar */
4198       PLANAR,      
4199       /*! other face */
4200       FACE,      
4201       // EDGEs
4202       /*! full circle */
4203       CIRCLE,      
4204       /*! arc of circle */
4205       ARC_CIRCLE, 
4206       /*! full ellipse */
4207       ELLIPSE,    
4208       /*! arc of ellipse */
4209       ARC_ELLIPSE,  
4210       /*! infinite segment */
4211       LINE,         
4212       /*! segment */
4213       SEGMENT,      
4214       /*! other edge */
4215       EDGE,       
4216       // VERTEX
4217       VERTEX,
4218       // ADVANCED shapes
4219       /*! all advanced shapes (temporary implementation) */
4220       ADVANCED    
4221     };
4222   };
4223
4224  // # GEOM_IMeasureOperations:
4225   /*!
4226    *  \brief Interface for measurement (distance, whatis) and
4227    *  properties calculation (like Centre of Mass, Inertia, etc.).
4228    *
4229    */
4230   interface GEOM_IMeasureOperations : GEOM_IOperations
4231   {
4232     /*!
4233      *  \brief Get kind of theShape.
4234      *  \param theShape Shape to get a kind of.
4235      *  \param theIntegers Output. Integer and enumerated shape's parameters
4236      *                     (kind of surface, closed/unclosed, number of edges, etc.)
4237      *  \param theDoubles  Output. Double shape's parameters (coordinates, dimensions, etc.)
4238      *  \note  Concrete meaning of each value, returned via \a theIntegers
4239      *         or \a theDoubles list depends on the kind of the shape.
4240      *  \return Returns a kind of shape in terms of <VAR>GEOM_IKindOfShape.shape_kind</VAR> enumeration.
4241      */
4242     //short KindOfShape (in GEOM_Object   theShape,
4243     GEOM_IKindOfShape::shape_kind KindOfShape (in  GEOM_Object  theShape,
4244                                                out ListOfLong   theIntegers,
4245                                                out ListOfDouble theDoubles);
4246
4247     /*!
4248      *  \brief Get position (LCS) of theShape.
4249      *  \param theShape Shape to calculate position of.
4250      *  \param Ox,Oy,Oz Output. Coordinates of shape's location origin.
4251      *                  Origin of the LCS is situated at the shape's center of mass.
4252      *  \param Zx,Zy,Zz Output. Coordinates of shape's location normal(main) direction.
4253      *  \param Xx,Xy,Xz Output. Coordinates of shape's location X direction.
4254      *                  Axes of the LCS are obtained from shape's location or,
4255      *                  if the shape is a planar face, from position of its plane.
4256      *  \return Returns position of the shape through the last nine arguments.
4257      */
4258     void GetPosition (in GEOM_Object theShape,
4259                       out double Ox, out double Oy, out double Oz,
4260                       out double Zx, out double Zy, out double Zz,
4261                       out double Xx, out double Xy, out double Xz);
4262
4263     /*!
4264      *  \brief Get summarized length of all wires,
4265      *  area of surface and volume of the given shape.
4266      *  \param theShape Shape to define properties of.
4267      *  \param theLength Output. Summarized length of all wires of the given shape.
4268      *  \param theSurfArea Output. Area of surface of the given shape.
4269      *  \param theVolume Output. Volume of the given shape.
4270      *  \return Returns shape properties through the last three arguments.
4271      */
4272     void GetBasicProperties (in GEOM_Object theShape,
4273                              out double theLength,
4274                              out double theSurfArea,
4275                              out double theVolume);
4276
4277     /*!
4278      *  \brief Get a point, situated at the centre of mass of theShape.
4279      *  \param theShape Shape to define centre of mass of.
4280      *  \return New GEOM_Object, containing the created point.
4281      */
4282     GEOM_Object GetCentreOfMass (in GEOM_Object theShape);
4283
4284     /*
4285      *  Get the vertex by index for 1D objects depends the edge/wire orientation
4286      *  \param theShape Shape (wire or edge) to find the vertex on it
4287      *  \param theIndex Index of vertex sub-shape
4288      *  \return New GEOM_Object, vertex.
4289      */
4290     GEOM_Object GetVertexByIndex( in GEOM_Object theShape, in long index );
4291
4292     /*!
4293      *  \brief Get a vector, representing the normal of theFace.
4294      *  If the face is not planar, theOptionalPoint is obligatory.
4295      *  \param theFace Shape (face) to define the normal of.
4296      *  \param theOptionalPoint Shape (point) to define the normal at.
4297      *                          Can be NULL in case of planar face.
4298      *  \return New GEOM_Object, containing the created normal vector.
4299      */
4300     GEOM_Object GetNormal (in GEOM_Object theFace,
4301                            in GEOM_Object theOptionalPoint);
4302
4303     /*!
4304      *  \brief Get inertia matrix and moments of inertia of theShape.
4305      *  \param theShape Shape to calculate inertia of.
4306      *  \param I11,I12,I13,I21,I22,I23,I31,I32,I33 Output. Components of the inertia matrix of the given shape.
4307      *  \param Ix,Iy,Iz Output. Moments of inertia of the given shape.
4308      *  \return Returns inertia through the last twelve arguments.
4309      */
4310     void GetInertia (in GEOM_Object theShape,
4311                      out double I11, out double I12, out double I13,
4312                      out double I21, out double I22, out double I23,
4313                      out double I31, out double I32, out double I33,
4314                      out double Ix , out double Iy , out double Iz);
4315
4316     /*!
4317      *  \brief Get parameters of bounding box of the given shape
4318      *  \param theShape Shape to obtain bounding box of.
4319      *  \param precise TRUE for precise computation; FALSE for fast one.
4320      *  \param Xmin,Xmax Output. Limits of shape along OX axis.
4321      *  \param Ymin,Ymax Output. Limits of shape along OY axis.
4322      *  \param Zmin,Zmax Output. Limits of shape along OZ axis.
4323      *  \return Returns parameters of bounding box through the last six arguments.
4324      */
4325     void GetBoundingBox (in GEOM_Object theShape,
4326                          in boolean precise,
4327                          out double Xmin, out double Xmax,
4328                          out double Ymin, out double Ymax,
4329                          out double Zmin, out double Zmax);
4330
4331     /*!
4332      *  \brief Get bounding box of the given shape
4333      *  \param theShape Shape to obtain bounding box of.
4334      *  \param precise TRUE for precise computation; FALSE for fast one.
4335      *  \return New GEOM_Object, containing the created bounding box.
4336      */
4337     GEOM_Object MakeBoundingBox (in GEOM_Object theShape,
4338                                  in boolean precise);
4339
4340     /*!
4341      *  \brief Get min and max tolerances of sub-shapes of theShape
4342      *  \param theShape Shape, to get tolerances of.
4343      *  \param FaceMin,FaceMax Output. Min and max tolerances of the faces.
4344      *  \param EdgeMin,EdgeMax Output. Min and max tolerances of the edges.
4345      *  \param VertMin,VertMax Output. Min and max tolerances of the vertices.
4346      *  \return Returns shape tolerances through the last six arguments.
4347      */
4348     void GetTolerance (in GEOM_Object theShape,
4349                        out double FaceMin, out double FaceMax,
4350                        out double EdgeMin, out double EdgeMax,
4351                        out double VertMin, out double VertMax);
4352
4353     /*!
4354      *  \brief Enumeration of Shape defects coming from CheckShape algorithms.
4355      */
4356     enum ShapeErrorType
4357     {
4358       /* for vertices */
4359       InvalidPointOnCurve,
4360       InvalidPointOnCurveOnSurface,
4361       InvalidPointOnSurface,
4362
4363       /* for edges */
4364       No3DCurve,
4365       Multiple3DCurve,
4366       Invalid3DCurve,
4367       NoCurveOnSurface,
4368       InvalidCurveOnSurface,
4369       InvalidCurveOnClosedSurface,
4370       InvalidSameRangeFlag,
4371       InvalidSameParameterFlag,
4372       InvalidDegeneratedFlag,
4373
4374       FreeEdge,
4375       InvalidMultiConnexity,
4376       InvalidRange,
4377
4378       /* for wires */
4379       EmptyWire,
4380       RedundantEdge,
4381       SelfIntersectingWire, /* on a face */
4382
4383       /* for faces */
4384       NoSurface,
4385       InvalidWire,
4386       RedundantWire,
4387       IntersectingWires,
4388       InvalidImbricationOfWires,
4389
4390       /* for shells */
4391       EmptyShell,
4392       RedundantFace,
4393
4394       /* for shapes */
4395       UnorientableShape,
4396       NotClosed,
4397       NotConnected,
4398
4399       SubshapeNotInShape,
4400
4401       BadOrientation,
4402       BadOrientationOfSubshape,
4403
4404       InvalidToleranceValue,
4405
4406       /* for exception */
4407       CheckFail
4408     };
4409
4410     /*!
4411      *  \brief Description of a shape defect: type and incriminated sub-shapes.
4412      */
4413     struct ShapeError
4414     {
4415       ShapeErrorType error;
4416       ListOfLong     incriminated;
4417     };
4418
4419     /*!
4420      *  \brief Sequence of all shape defects.
4421      */
4422     typedef sequence<ShapeError> ShapeErrors;
4423
4424     /*!
4425      *  \brief Check a topology of the given shape.
4426      *  \param theShape Shape to check validity of.
4427      *  \param theErrors Structure, containing discovered errors and incriminated sub-shapes.
4428      *  \return TRUE, if the shape "seems to be valid" from the topological point of view.
4429      */
4430     boolean CheckShape (in GEOM_Object  theShape,
4431                         out ShapeErrors theErrors);
4432
4433     /*!
4434      *  \brief Check a topology and a geometry of the given shape.
4435      *  \param theShape Shape to check validity of.
4436      *  \param theErrors Structure, containing discovered errors and incriminated sub-shapes.
4437      *  \return TRUE, if the shape "seems to be valid".
4438      */
4439     boolean CheckShapeWithGeometry (in GEOM_Object  theShape,
4440                                     out ShapeErrors theErrors);
4441
4442     /*!
4443      *  \brief Convert sequence of shape errors, returned by
4444      *  <VAR>CheckShape()</VAR> or <VAR>CheckShapeWithGeometry()</VAR>, into string.
4445      *  \param theShape the invalid shape.
4446      *  \param theErrors The sequence of \a theShape errors.
4447      *  \return String, describing all the errors in form, suitable for printing.
4448      */
4449     string PrintShapeErrors (in GEOM_Object theShape,
4450                              in ShapeErrors theErrors);
4451
4452     /*!
4453      *  \brief Check a topology of the given shape on self-intersections presence.
4454      *  \param theShape Shape to check validity of.
4455      *  \param theCheckLevel the level of self-interference check.
4456      *  \param theIntersections Output. List of intersected sub-shapes IDs, it contains pairs of IDs.
4457      *  \return TRUE, if the shape does not have any self-intersections.
4458      */
4459     boolean CheckSelfIntersections (in GEOM_Object theShape,
4460                                     in long        theCheckLevel,
4461                                     out ListOfLong theIntersections);
4462
4463     /*!
4464      *  \brief Detect self-intersections of the given shape with algorithm based on mesh intersections.
4465      *  \param theShape Shape to check validity of.
4466      *  \param theDeflection Linear deflection coefficient that specifies quality of tesselation.
4467      *  \param theTolerance Specifies a distance between sub-shapes used for detecting gaps:
4468      *                       - if \a theTolerance <= 0, algorithm detects intersections
4469      *                       - if \a theTolerance > 0, algorithm detects gaps
4470      *  \param theIntersections Output. List of intersected sub-shapes IDs, it contains pairs of IDs.
4471      *  \return TRUE, if the shape does not have any self-intersections.
4472      */
4473     boolean CheckSelfIntersectionsFast (in GEOM_Object theShape,
4474                                         in float       theDeflection,
4475                                         in double      theTolerance,
4476                                         out ListOfLong theIntersections);
4477
4478     /*!
4479      *  \brief Detect intersections of the given shapes with algorithm based on mesh intersections.
4480      *  \param theShape1 First source object
4481      *  \param theShape2 Second source object
4482      *  \param theTolerance Specifies a distance between shapes used for detecting gaps:
4483      *                       - if \a theTolerance <= 0, algorithm detects intersections
4484      *                       - if \a theTolerance > 0, algorithm detects gaps
4485      *  \param theDeflection Linear deflection coefficient that specifies quality of tesselation:
4486      *                       - if \a theDeflection <= 0, default deflection 0.001 is used
4487      *  \param theIntersections1 Output: contains list of sub-shapes IDs from 1st shape that localize intersection
4488      *  \param theIntersections2 Output: contains list of sub-shapes IDs from 2nd shape that localize intersection
4489      *  \return TRUE, if the are intersections (gaps) between source shapes
4490      */
4491     boolean FastIntersect (in GEOM_Object theShape1,
4492                            in GEOM_Object theShape2,
4493                            in double      theTolerance,
4494                            in float       theDeflection,
4495                            out ListOfLong theIntersections1,
4496                            out ListOfLong theIntersections2);
4497
4498     /*!
4499      *  \brief Check if the given shape can be an argument for MakeSolid operation
4500      *  \param theShape Shape to be described.
4501      *  \return Empty string if a solid can be made on this shape, error code otherwise.
4502      */
4503     string IsGoodForSolid (in GEOM_Object theShape);
4504
4505     /*!
4506      *  O\brief btain description of the given shape
4507      *  \param theShape Shape to be described.
4508      *  \return Description of the given shape.
4509      */
4510     string WhatIs (in GEOM_Object theShape);
4511
4512     /*!
4513      *  \brief Check if points defined by coords = [x1, y1, z1, x2, y2, z2, ...] are inside or on
4514      *  the shape theShape.
4515      *  \param theShape Shape to check.
4516      *  \param coords list of coordinates.
4517      *  \param tolerance tolerance.
4518      *  \return list of boolean.
4519      */
4520     ListOfBool AreCoordsInside(in GEOM_Object theShape, in ListOfDouble coords, in double tolerance);
4521
4522     /*!
4523      *  \brief Get minimal distance between the given shapes.
4524      *  \param theShape1,theShape2 Shapes to find minimal distance between.
4525      *  \param X1,Y1,Z1 Output. Coordinates of point on theShape1, nearest to theShape2.
4526      *  \param X2,Y2,Z2 Output. Coordinates of point on theShape2, nearest to theShape1.
4527      *  \return Value of the minimal distance between the given shapes.
4528      */
4529     double GetMinDistance (in GEOM_Object theShape1, in GEOM_Object theShape2,
4530                            out double X1, out double Y1, out double Z1,
4531                            out double X2, out double Y2, out double Z2);
4532
4533     /*!
4534      *  \brief Get closest points of the given shapes.
4535      *  \param theShape1,theShape2 Shapes to find closest points of.
4536      *  \param theCoords Output. List of (X, Y, Z) coordinates for all couples of points.
4537      *  \return The number of found solutions (-1 in case of infinite number of solutions).
4538      */
4539     long ClosestPoints (in GEOM_Object theShape1,
4540                         in GEOM_Object theShape2,
4541                         out ListOfDouble theCoords);
4542
4543     /*!
4544      *  \brief Get angle between the given lines or linear edges.
4545      *  \param theShape1,theShape2 Shapes to find angle between. Lines or linear edges.
4546      *  \return Value of the angle between the given shapes.
4547      */
4548     double GetAngle (in GEOM_Object theShape1, in GEOM_Object theShape2);
4549
4550     /*!
4551      *  \brief Get angle between the given vectors.
4552      *  \param theShape1,theShape2 Vectors to find angle between.
4553      *  \return Value of the angle between the given vectors.
4554      */
4555     double GetAngleBtwVectors (in GEOM_Object theShape1, in GEOM_Object theShape2);
4556
4557     /*!
4558      *  \brief Get point coordinates
4559      */
4560     void PointCoordinates (in GEOM_Object theShape, out double X, out double Y, out double Z);
4561
4562     /*!
4563      *  \brief Get radius of curvature of curve in the point determinated by param
4564      *  \param theShape - curve.
4565      *  \param theParam - parameter on curve
4566      *  \return Value of curvature.
4567      */
4568     double CurveCurvatureByParam (in GEOM_Object theShape, in double theParam);
4569
4570     /*!
4571      *  \brief Get radius of curvature of curve in the given point
4572      *  \param theShape - curve.
4573      *  \param thePoint - point
4574      *  \return Value of curvature.
4575      */
4576     double CurveCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
4577
4578     /*!
4579      *  \brief Get max radius of curvature of surface in the point determinated by params
4580      *  \param theShape - surface.
4581      *  \param theUParam - U-parameter on surface
4582      *  \param theVParam - V-parameter on surface
4583      *  \return Value of curvature.
4584      */
4585     double MaxSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
4586                                        in double theVParam);
4587
4588     /*!
4589      *  \brief Get max radius of curvature of surface in the given point
4590      *  \param theShape - surface.
4591      *  \param thePoint - point
4592      *  \return Value of curvature.
4593      */
4594     double MaxSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
4595
4596     /*!
4597      *  \brief Get min radius of curvature of surface in the point determinated by params
4598      *  \param theShape - surface.
4599      *  \param theUParam - U-parameter on surface
4600      *  \param theVParam - V-parameter on surface
4601      *  \return Value of curvature.
4602      */
4603     double MinSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
4604                                        in double theVParam);
4605
4606     /*!
4607      *  \brief Get min radius of curvature of surface in the given point
4608      *  \param theShape - surface.
4609      *  \param thePoint - point
4610      *  \return Value of curvature.
4611      */
4612     double MinSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
4613
4614   };
4615
4616  // # GEOM_IGroupOperations:
4617   /*!
4618    *  \brief Interface for groups creation.
4619    */
4620   interface GEOM_IGroupOperations : GEOM_IOperations
4621   {
4622     /*!
4623      *  \brief Creates a new group which will store  sub-shapes of theMainShape
4624      *  \param theMainShape is a GEOM_Object on which the group is selected
4625      *  \param theShapeType defines a shape type of the group
4626      *  \return a newly created GEOM group
4627      */
4628     GEOM_Object CreateGroup (in GEOM_Object theMainShape, in long theShapeType);
4629
4630     /*!
4631      *  \brief Adds a sub-object with ID theSubShapeId to the group
4632      *  \param theGroup is a GEOM group to which the new sub-shape is added
4633      *  \param theSubShapeId is a sub-shape ID in the main object.
4634      *  \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub-shape
4635      */
4636     void AddObject (in GEOM_Object theGroup, in long theSubShapeId);
4637
4638     /*!
4639      *  \brief Removes a sub-object with ID \a theSubShapeId from the group
4640      *  \param theGroup is a GEOM group from which the sub-shape is removed.
4641      *  \param theSubShapeId is a sub-shape ID in the main object.
4642      *  \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub-shape
4643      */
4644     void RemoveObject (in GEOM_Object theGroup, in long theSubShapeId);
4645
4646     /*!
4647      *  \brief Adds to the group all the given shapes. No errors, if some shapes are alredy included.
4648      *  \param theGroup is a GEOM group to which the new sub-shapes are added.
4649      *  \param theSubShapes is a list of sub-shapes to be added.
4650      */
4651     void UnionList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
4652
4653     /*!
4654      *  \brief Removes from the group all the given shapes. No errors, if some shapes are not included.
4655      *  \param theGroup is a GEOM group from which the sub-shapes are removed.
4656      *  \param theSubShapes is a list of sub-shapes to be removed.
4657      */
4658     void DifferenceList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
4659
4660     /*!
4661      *  \brief Adds to the group all the given shapes. No errors, if some shapes are alredy included.
4662      *  \param theGroup is a GEOM group to which the new sub-shapes are added.
4663      *  \param theSubShapes is a list of IDs of sub-shapes to be added.
4664      */
4665     void UnionIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
4666
4667     /*!
4668      *  \brief Removes from the group all the given shapes. No errors, if some shapes are not included.
4669      *  \param theGroup is a GEOM group from which the sub-shapes are removed.
4670      *  \param theSubShapes is a list of IDs of sub-shapes to be removed.
4671      */
4672     void DifferenceIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
4673
4674     /*!
4675      *  \brief Union of two groups.
4676      *  New group is created. It will contain all entities
4677      *  which are present in groups theGroup1 and theGroup2.
4678      *  \param theGroup1, theGroup2 are the initial GEOM groups
4679      *                              to create the united group from.
4680      *  \return a newly created GEOM group.
4681      */
4682     GEOM_Object UnionGroups (in GEOM_Object theGroup1, in GEOM_Object theGroup2);
4683
4684     /*!
4685      *  \brief Intersection of two groups.
4686      *  New group is created. It will contain only those entities
4687      *  which are present in both groups theGroup1 and theGroup2.
4688      *  \param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
4689      *  \return a newly created GEOM group.
4690      */
4691     GEOM_Object IntersectGroups (in GEOM_Object theGroup1, in GEOM_Object theGroup2);
4692
4693     /*!
4694      *  \brief Cut of two groups.
4695      *  New group is created. It will contain entities which are
4696      *  present in group theGroup1 but are not present in group theGroup2.
4697      *  \param theGroup1 is a GEOM group to include elements of.
4698      *  \param theGroup2 is a GEOM group to exclude elements of.
4699      *  \return a newly created GEOM group.
4700      */
4701     GEOM_Object CutGroups (in GEOM_Object theGroup1, in GEOM_Object theGroup2);
4702
4703     /*!
4704      *  \brief Union of list of groups.
4705      *  New group is created. It will contain all entities that are
4706      *  present in groups listed in theGList.
4707      *  \param theGList is a list of GEOM groups to create the united group from.
4708      *  \return a newly created GEOM group.
4709      */
4710     GEOM_Object UnionListOfGroups (in ListOfGO theGList);
4711
4712     /*!
4713      *  \brief Intersection of list of groups.
4714      *  New group is created. It will contain only entities
4715      *  which are simultaneously present in the groups listed in theGList.
4716      *  \param theGList is a list of GEOM groups to get common part of.
4717      *  \return a newly created GEOM group.
4718      */
4719     GEOM_Object IntersectListOfGroups (in ListOfGO theGList);
4720
4721     /*!
4722      *  \brief Cut of lists of groups.
4723      *  New group is created. It will contain only entities
4724      *  which are present in groups listed in theGList1 but 
4725      *  are not present in groups from theGList2.
4726      *  \param theGList1 is a list of GEOM groups to include elements of.
4727      *  \param theGList2 is a list of GEOM groups to exclude elements of.
4728      *  \return a newly created GEOM group.
4729      */
4730     GEOM_Object CutListOfGroups (in ListOfGO theGList1,
4731                                  in ListOfGO theGList2);
4732
4733     /*!
4734      *  \brief Returns a type of sub-objects stored in the group
4735      *  \param theGroup is a GEOM group which type is returned.
4736      */
4737     long GetType (in GEOM_Object theGroup);
4738
4739     /*!
4740      *  \brief Returns a main shape associated with the group
4741      *  \param theGroup is a GEOM group for which a main shape object is requested
4742      *  \return a GEOM_Object which is a main shape for theGroup
4743      */
4744     GEOM_Object GetMainShape (in GEOM_Object theGroup);
4745
4746     /*!
4747      *  \brief Returns a list of sub-objects ID stored in the group
4748      *  \param theGroup is a GEOM group for which a list of IDs is requested
4749      */
4750     ListOfLong GetObjects (in GEOM_Object theGroup);
4751   };
4752
4753   // # GEOM_IFieldOperations:
4754   /*!
4755    *  \brief Interface for field operation.
4756    */
4757   interface GEOM_IFieldOperations : GEOM_IOperations
4758   {
4759     /*!
4760      *  \brief Creates a field
4761      */
4762     GEOM_Field CreateField(in GEOM_Object     shape, 
4763                            in string          name,
4764                            in field_data_type type,
4765                            in short           dimension,
4766                            in string_array    componentNames);
4767     /*!
4768      *  \brief Returns number of fields on a shape
4769      */
4770     long CountFields(in GEOM_Object shape);
4771
4772     /*!
4773      *  \brief Returns all fields on a shape
4774      */
4775     ListOfFields GetFields(in GEOM_Object shape);
4776
4777     /*!
4778      *  \brief Returns a field on a shape by its name
4779      */
4780     GEOM_Field GetField(in GEOM_Object shape, in string name);
4781
4782     /*!
4783      *  \brief Returns number of sub-shapes of given dimension
4784      */
4785     long GetNbSubShapes(in GEOM_Object shape, in short fieldDim);
4786   };
4787
4788  // # GEOM_Gen:
4789   /*!
4790    *  \brief Interface to access other GEOM interfaces.
4791    *
4792    *  Also contains some methods to access and manage GEOM_Object.
4793    */
4794   interface GEOM_Gen : Engines::EngineComponent,SALOMEDS::Driver
4795   {
4796     /*!
4797      *  \brief Undo/Redo Management
4798      */
4799
4800     void Undo (in long theStudyID);
4801
4802     void Redo (in long theStudyID);
4803
4804     /*!
4805      * \brief Publishing management
4806      *
4807      * Adds in theStudy a object theObject under with a name theName,
4808      * if theFather is not NULL the object is placed under thFather's SObject.
4809      * Returns a SObject where theObject is placed
4810      */
4811     SALOMEDS::SObject AddInStudy (in SALOMEDS::Study theStudy,
4812                                   in GEOM_BaseObject theObject,
4813                                   in string          theName,
4814                                   in GEOM_BaseObject theFather);
4815
4816     /*!
4817      *  \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
4818      *
4819      *  To be used from python scripts out of geompy.addToStudy (non-default usage)
4820      *  \param theStudy  the study, in which theObject is published already,
4821      *                   and in which the arguments will be published
4822      *  \param theObject published GEOM_Object, arguments of which will be published
4823      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
4824      *                   If this list is empty, all operation arguments will be published
4825      *  \param theFindMethod method to search sub-shapes, corresponding to arguments and
4826      *                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
4827      *  \param theInheritFirstArg set properties of the first argument for \a theObject.
4828      *                            Do not publish sub-shapes in place of arguments, but only
4829      *                            in place of sub-shapes of the first argument,
4830      *                            because the whole shape corresponds to the first argument.
4831      *                            Mainly to be used after transformations, but it also can be
4832      *                            usefull after partition with one object shape, and some other
4833      *                            operations, where only the first argument has to be considered.
4834      *                            If theObject has only one argument shape, this flag is automatically
4835      *                            considered as True, not regarding really passed value.
4836      *  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
4837      *                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
4838      *  \return list of published sub-shapes
4839      */
4840     ListOfGO RestoreSubShapesO (in SALOMEDS::Study   theStudy,
4841                                 in GEOM_Object       theObject,
4842                                 in ListOfGO          theArgs,
4843                                 in find_shape_method theFindMethod,
4844                                 in boolean           theInheritFirstArg,
4845                                 in boolean           theAddPrefix);
4846
4847     /*!
4848      *  \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
4849      *
4850      *  To be used from python scripts out of geompy.addToStudy (non-default usage)
4851      *  \param theStudy  the study, in which theObject is published already,
4852      *                   and in which the arguments will be published
4853      *  \param theObject published GEOM_Object, arguments of which will be published
4854      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
4855      *                   If this list is empty, all operation arguments will be published
4856      *  \param theFindMethod method to search sub-shapes, corresponding to arguments and
4857      *                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
4858      *  \param theInheritFirstArg set properties of the first argument for \a theObject.
4859      *                            Do not publish sub-shapes in place of arguments, but only
4860      *                            in place of sub-shapes of the first argument,
4861      *                            because the whole shape corresponds to the first argument.
4862      *                            Mainly to be used after transformations, but it also can be
4863      *                            usefull after partition with one object shape, and some other
4864      *                            operations, where only the first argument has to be considered.
4865      *                            If theObject has only one argument shape, this flag is automatically
4866      *                            considered as True, not regarding really passed value.
4867      *  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
4868      *                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
4869      *  \return list of published sub-shapes
4870      */
4871     ListOfGO RestoreGivenSubShapesO (in SALOMEDS::Study   theStudy,
4872                                      in GEOM_Object       theObject,
4873                                      in ListOfGO          theArgs,
4874                                      in find_shape_method theFindMethod,
4875                                      in boolean           theInheritFirstArg,
4876                                      in boolean           theAddPrefix);
4877
4878     /*!
4879      *  \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
4880      *
4881      *  To be used from GUI and from geompy.addToStudy.
4882      *  Work like the above method, but accepts study object theSObject instead of GEOM_Object.
4883      *  \param theStudy  the study, in which theObject is published already,
4884      *                   and in which the arguments will be published
4885      *  \param theSObject study object, referencing GEOM_Object, arguments of which will be published
4886      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
4887      *                   If this list is empty, all operation arguments will be published
4888      *  \param theFindMethod method to search sub-shapes, corresponding to arguments and
4889      *                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
4890      *  \param theInheritFirstArg set properties of the first argument for \a theObject.
4891      *                            Do not publish sub-shapes in place of arguments, but only
4892      *                            in place of sub-shapes of the first argument,
4893      *                            because the whole shape corresponds to the first argument.
4894      *                            Mainly to be used after transformations, but it also can be
4895      *                            usefull after partition with one object shape, and some other
4896      *                            operations, where only the first argument has to be considered.
4897      *                            If theObject has only one argument shape, this flag is automatically
4898      *                            considered as True, not regarding really passed value.
4899      *  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
4900      *                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
4901      */
4902     ListOfGO RestoreSubShapesSO (in SALOMEDS::Study   theStudy,
4903                                  in SALOMEDS::SObject theSObject,
4904                                  in ListOfGO          theArgs,
4905                                  in find_shape_method theFindMethod,
4906                                  in boolean           theInheritFirstArg,
4907                                  in boolean           theAddPrefix);
4908
4909     // #  Methods to access interfaces for objects creation and transformation
4910
4911     GEOM_IBasicOperations     GetIBasicOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
4912     GEOM_ITransformOperations GetITransformOperations(in long theStudyID) raises (SALOME::SALOME_Exception);
4913     GEOM_I3DPrimOperations    GetI3DPrimOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
4914     GEOM_IShapesOperations    GetIShapesOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
4915     GEOM_IBooleanOperations   GetIBooleanOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
4916     GEOM_ICurvesOperations    GetICurvesOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
4917     GEOM_ILocalOperations     GetILocalOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
4918     GEOM_IHealingOperations   GetIHealingOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
4919     GEOM_IInsertOperations    GetIInsertOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
4920     GEOM_IMeasureOperations   GetIMeasureOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
4921     GEOM_IBlocksOperations    GetIBlocksOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
4922     GEOM_IGroupOperations     GetIGroupOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
4923     GEOM_IFieldOperations     GetIFieldOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
4924
4925     GEOM_IOperations GetPluginOperations (in long   theStudyID,
4926                                           in string theLibName) raises (SALOME::SALOME_Exception);
4927
4928     // # Objects Management
4929
4930
4931     /*!
4932      *  \brief Removes the object from the GEOM component
4933      *  \param theObject is a GEOM_Object to be removed
4934      */
4935     void RemoveObject (in GEOM_BaseObject theObject);
4936
4937     /*!
4938      *  \brief Returns an object defined by the study and its entry in the GEOM component
4939      *  \param theStudyID is a SALOMEDS Study ID
4940      *  \param theEntry is an entry of the requested GEOM_Object in the GEOM component
4941      *  \note if the object has not previously been created a NULL GEOM_Object is returned
4942      */
4943     GEOM_BaseObject GetObject (in long theStudyID, in string theEntry);
4944
4945     /*!
4946      *  \brief Add a sub-shape defined by indices in \a theIndices
4947      *  (contains unique IDs of sub-shapes inside \a theMainShape)
4948      *  \note The sub-shape GEOM_Object can has ONLY ONE function.
4949      *        Don't try to apply modification operations on them.
4950      *  \note Internal method
4951      */
4952     GEOM_Object AddSubShape (in GEOM_Object theMainShape, in ListOfLong theIndices);
4953
4954  // #  GEOM_Objects IOR Management
4955     
4956     /*!
4957      *  \brief Returns a GEOM_Object defined by its IOR
4958      *  \param theIOR a string containg an IOR of the requested GEOM_Object
4959      */
4960     GEOM_Object GetIORFromString (in string theIOR);
4961
4962     /*!
4963      *  \brief Returns a string which contains an IOR of the GEOM_Object
4964      *  \param theObject is a GEOM_Object which IOR is requested
4965      */
4966     string GetStringFromIOR (in GEOM_Object theObject);
4967
4968     /*!
4969      *  \brief Returns a name with which a GEOM_Object was dumped into python script
4970      *  \param theStudyEntry is an entry of the GEOM_Object in the study
4971      */
4972     string GetDumpName (in string theStudyEntry);
4973
4974     /*!
4975      *  \brief Returns all names with which a GEOM_Object was dumped
4976      *  into python script to avoid the same names in SMESH script
4977      */
4978     string_array GetAllDumpNames();
4979
4980     /*!
4981      *  \brief Publishes the named sub-shapes of given object in the study.
4982      *  \param theStudy    The study in which the object is published
4983      *  \param theObject   The object which named sub-shapes are published
4984      */
4985     ListOfGO PublishNamedShapesInStudy(in SALOMEDS::Study theStudy,
4986                                        //in SObject theSObject,
4987                                        in Object theObject);
4988
4989     /*!
4990      * \brief Creates a new folder
4991      *
4992      * Creates a new container (folder) for any GEOM objects.
4993      * Folder will have name theName.
4994      * If theFather is not NULL, the folder is placed under theFather object.
4995      * Otherwise, the folder takes place under root 'Geometry' object.
4996      * 
4997      * \param theName name of the folder
4998      * \param theFather parent object
4999      * \return SObject represented the created folder.
5000      */
5001     SALOMEDS::SObject CreateFolder (in string theName,
5002                                     in SALOMEDS::SObject theFather);
5003
5004     /*!
5005      * \brief Moves object to the specified folder
5006      *
5007      * The moved object should be first published in the study.
5008      * \param theObject GEOM object to move
5009      * \param theFolder target folder
5010      */
5011     void MoveToFolder (in GEOM_Object theObject,
5012                        in SALOMEDS::SObject theFolder);
5013
5014     /*!
5015      * \brief Moves list of objects to the specified folder
5016      *
5017      * The moved objects should be first published in the study.
5018      * \param theListOfGO list of GEOM objects to move
5019      * \param theFolder target folder
5020      */
5021     void MoveListToFolder (in ListOfGO theListOfGO,
5022                            in SALOMEDS::SObject theFolder);
5023
5024     /*!
5025      * \brief Moves objects to the specified position
5026      *
5027      * This function is used in the drag-n-drop functionality.
5028      *
5029      * \param what objects being moved
5030      * \param where parent object where objects are moved to
5031      * \param row position in the parent object's children list at which objects are moved
5032      */
5033     void Move( in object_list what, 
5034                in SALOMEDS::SObject where, 
5035                in long row );
5036
5037     /*!
5038      * \brief Collects dependencies of the given objects from other ones
5039      * \param theStudy The study in which the object is published
5040      * \param theListOfEntries List of GEOM object entries in OCAF tree (not in study)
5041      * \return Struct of dependent entries and its links as a byte array
5042      * \note This method is supposed to be used by GUI only.
5043      */
5044     SALOMEDS::TMPFile GetDependencyTree(in SALOMEDS::Study theStudy,
5045                                         in string_array theListOfEntries);
5046
5047     /*!
5048      * \brief Fills 3 lists that is used to reduce study of redundant objects:
5049      *  - dependencies of the given objects from other ones;
5050      *  - children of the given objects;
5051      *  - all other objects in study.
5052      * \param theStudy The study in which the object was published
5053      * \param theSelectedEntries List of GEOM object entries in OCAF tree
5054      * \param theParentEntries List of GEOM object entries on which the given objects depend
5055      * \param theSubEntries Children entries list of the given objects
5056      * \param theOtherEntries List of GEOM object entries which are in the study, but not in parents and children lists
5057      * \note This method is supposed to be used by GUI only.
5058      */
5059     void GetEntriesToReduceStudy(in SALOMEDS::Study theStudy,
5060                                  inout string_array theSelectedEntries,
5061                                  inout string_array theParentEntries,
5062                                  inout string_array theSubEntries,
5063                                  inout string_array theOtherEntries);
5064
5065   };
5066 };
5067
5068 #endif