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