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