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