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