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