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