Salome HOME
Update copyright
[modules/geom.git] / idl / GEOM_Gen.idl
1 // Copyright (C) 2007-2011  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.
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    *  Topological types of shapes (like Open Cascade types)
39    */
40   enum shape_type { COMPOUND, COMPSOLID, SOLID, SHELL,
41                     FACE, WIRE, EDGE, VERTEX, SHAPE };
42
43   /*!
44    * Marker type
45    */
46   enum marker_type { MT_NONE, MT_POINT, MT_PLUS, MT_STAR, MT_O, MT_X, MT_O_POINT, MT_O_PLUS,
47                      MT_O_STAR, MT_O_X, MT_BALL, MT_RING1, MT_RING2, MT_RING3, MT_USER };
48
49   /*!
50    * Marker size
51    */
52   enum marker_size { MS_NONE, MS_10, MS_15, MS_20, MS_25, MS_30, MS_35,
53                      MS_40, MS_45, MS_50, MS_55, MS_60, MS_65, MS_70 };
54
55   /*!
56    *  State of shape relatively geometrical surface like plane, sphere or cylinder.
57    *  Is used in functions GEOM_IShapesOperations.GetShapesOn<xxx>()
58    */
59   enum shape_state
60   {
61     /*! Shape is on surface */
62     ST_ON,
63
64     /*!
65      *  Shape is in the direction defined by the normal and not on surface.
66      *  For plane it means above the plane,
67      *  For sphere and cylinder it means outside of volume, bounded by the surface.
68      */
69     ST_OUT,
70
71     /*!
72      *  Shape is in the direction defined by the normal and on surface.
73      *  ONOUT = ON || OUT
74      */
75     ST_ONOUT,
76
77     /*!
78      *  Complementary to ONOUT.
79      *  For plane it means below the plane,
80      *  For sphere and cylinder it means inside the volume, bounded by the surface
81      *  (beyond axis and surface for cylinder and beyond cented and surface for sphere).
82      */
83     ST_IN,
84
85     /*!
86      *  Complementary to OUT.
87      *  ONIN = ON || IN
88      */
89     ST_ONIN
90   };
91
92   /*!
93    *  Kind of method to find inside one main shape some subshapes,
94    *  corresponding to other given shape (its argument)
95    *  Is used in functions GEOM_Gen.RestoreSubShapes<xxx>()
96    */
97   enum find_shape_method
98   {
99     /*! Use GetInPlace functionality. Suits all cases, except transformations */
100     FSM_GetInPlace,
101
102     /*! To be used only for transformation result, to find subshapes of argument.
103      *  Only this method can be used after transformation.
104      */
105     FSM_Transformed,
106
107     /*! To find only shared subshapes, not modified by the operation */
108     FSM_GetSame,
109
110     /*! Use GetShapesOnShape method (can work only on solids) */
111     FSM_GetShapesOnShape,
112
113     /*! Use GetInPlaceByHistory method (can work only after Partition) */
114     FSM_GetInPlaceByHistory,
115
116     /*! To be used only for multi-transformation result.
117      *  Only this method can be used after multi-transformation.
118      */
119     FSM_MultiTransformed
120   };
121
122   /*!
123    *  Kind of method to perform filling operation
124    *  Is used in functions GEOM_Gen.MakeFilling<xxx>()
125    */
126   enum filling_oper_method
127   {
128     /*! Default (standard behaviour) */
129     FOM_Default,
130
131     /*! Use edges orientation */
132     FOM_UseOri,
133
134     /*! Auto-correct edges orientation */
135     FOM_AutoCorrect
136   };
137
138   /*!
139    * Kind of the curves.
140    * Used in the function GEOM_Gen.MakeCurveParametric()
141    */
142   enum curve_type {
143     /*! Polyline curve */
144     Polyline,
145     
146     /*! Bezier curve */
147     Bezier,
148
149     /*! Interpolation, curve */
150     Interpolation
151   };
152
153
154   typedef sequence<string>      string_array;
155   typedef sequence<short>       short_array;
156   typedef sequence<boolean>     ListOfBool;
157   typedef sequence<long>        ListOfLong;
158   typedef sequence<double>      ListOfDouble;
159
160   interface GEOM_Object;
161
162   typedef sequence<GEOM_Object> ListOfGO;
163
164   /*!
165    *  GEOM_Object: interface of geometric object
166    */
167   interface GEOM_Object : SALOME::GenericObj
168   {
169
170     /*!
171      *  Get an entry of the object in GEOM component.
172      */
173     string GetEntry();
174
175     /*!
176      *  Get ID of study, where the object is created.
177      */
178     long GetStudyID();
179
180     /*!
181      *  Get internal type of the object (POINT, BOX, CYLINDER, EXTRUSION...).
182      */
183     long GetType();
184
185     /*!
186      *  Get a <VAR>shape_type</VAR> of the object value.
187      */
188     shape_type GetShapeType();
189
190     /*!
191      *  Get the topology type of the object value.
192      *  In contrast to the shape type, this function returns type of the most
193      *  top-level sub-shape of the COMPOUND or COMPSOLID, if there is only one
194      *  sub-shape there.
195      *  \sa GetShapeType()
196      */
197     shape_type GetTopologyType();
198
199     /*!
200      *  Get a minimal type of the top-level shapes contained in the object.
201      *  This function is useful for the compounds only; for simple shapes it
202      *  exactly the same value as GetShapeType().
203      *  Note, that compounds are procesed recursively.
204      *  \sa GetShapeType(), GetTopologyType(), GetMaxShapeType()
205      */
206     shape_type GetMinShapeType();
207
208     /*!
209      *  Get a maximal type of the top-level shapes contained in the object.
210      *  This function is useful for the compounds only; for simple shapes it
211      *  exactly the same value as GetShapeType().
212      *  Note, that compounds are procesed recursively.
213      *  \sa GetShapeType(), GetTopologyType(), GetMinShapeType()
214      */
215     shape_type GetMaxShapeType();
216
217     /*!
218      *  Set name of the object.
219      *  \param theName is a name which will be associated with this object.
220      */
221     void SetName (in string theName);
222
223     /*!
224      *  Get name of the object associated with this object.
225      */
226     string GetName();
227
228     /*!
229      *  Set color of the object.
230      *  \param theColor is a color of the object.
231      */
232     void SetColor(in SALOMEDS::Color theColor);
233
234     /*!
235      *  Get color of the object.
236      */
237     SALOMEDS::Color GetColor();
238
239     /*!
240      *  Toggle auto color mode on the object.
241      *  \param theAtoColor is a flag which toggles auto color mode.
242      */
243     void SetAutoColor(in boolean theAutoColor);
244
245     /*!
246      *  Get flag of object's auto color mode.
247      */
248     boolean GetAutoColor();
249
250     /*!
251      * Set standard point marker for the object
252      * \param theType standard marker type
253      * \param theSize marker relative size
254      */
255     void SetMarkerStd(in marker_type theType, in marker_size theSize );
256
257     /*!
258      * Set custom point marker for the object. The texture can be added
259      * by LoadTexture() or AddTexture() functions.
260      * \param theTextureId texture ID
261      */
262     void SetMarkerTexture(in long theTextureId);
263
264     /*!
265      * Get type of the point marker assigned to the object
266      * \return current marker type (MT_NONE if no marker is set)
267      */
268     marker_type GetMarkerType();
269
270     /*!
271      * Get size of the point marker assigned to the object
272      * \return current marker relative size (MS_NONE if no marker is set)
273      */
274     marker_size GetMarkerSize();
275
276     /*!
277      * Get texture idenifier of the point marker assigned to the object
278      * \return marker texture ID (0 if no marker set)
279      */
280     long GetMarkerTexture();
281
282     /*!
283      *  Set a Study entry where this object was published.
284      */
285     void SetStudyEntry (in string theEntry);
286
287     /*!
288      *  Get a Study entry where this object was published.
289      */
290     string GetStudyEntry();
291
292     /*!
293      *  Get a list of all GEOM objects on which were the arguments
294      *  when this object was constructed and modified.
295      *  \note This method is supposed to be used by GUI only.
296      */
297     ListOfGO GetDependency();
298
299     /*!
300      *  Get a list of GEOM objects on which the last function that created or modified the object depends.
301      *  \note This method is supposed to be used by GUI only.
302      */
303     ListOfGO GetLastDependency();
304
305     /*!
306      *  Get the TopoDS_Shape, for colocated case only.
307      */
308     long long getShape();
309
310     /*!
311      ######################################################################
312      *  Internal methods (For sub shape identification)
313      ######################################################################
314      */
315
316     /*!
317      *  Get geometric shape of the object as a byte stream
318      */
319     SALOMEDS::TMPFile GetShapeStream();
320
321     /*
322      *  Returns True if this object is not a sub shape of another object.
323      */
324     boolean IsMainShape();
325
326     /*
327      *  Get a list of ID's of sub shapes in the main shape.
328      *  \note Internal method, suppopsed to be used only by GEOM_Client
329      */
330     ListOfLong GetSubShapeIndices();
331
332     /*
333      *  Get a main shape object to which this object is a sub shape
334      *  \note Internal method, suppopsed to be used only by GEOM_Client
335      */
336     GEOM_Object GetMainShape();
337
338     /*
339      *  Return true if geom object representes a shape.
340      *  For example, method return false for GEOM_MARKER
341      */
342      boolean IsShape();
343
344     /*
345      *  Return true if passed object is identical to this object
346      *  \param other object being compared with this one
347      */
348     boolean IsSame(in GEOM_Object other);
349
350      /*!
351      *  Set list of parameters
352      *  \param theParameters is a string containing the notebook variables separated by ":" symbol,
353      *         used for object creation
354      */
355     void SetParameters (in string theParameters);
356
357     /*!
358      *  Return list of notebook variables used for object creation separated by ":" symbol
359      */
360     string GetParameters();
361   };
362
363
364   /*!
365    *  GEOM_IOperations: basic methods of all geometric operations
366    */
367   interface GEOM_IOperations : SALOME::GenericObj
368   {
369     /*!
370      *  To know, if the operation was successfully performed
371      */
372     boolean IsDone();
373
374     /*!
375      *  Set the operation error code
376      *  \param theErrorID is a string describing the error occured
377      *  \note This method is supposed to be used only by interfaces inheriting from IOperations.
378      */
379     void SetErrorCode (in string theErrorID);
380
381     /*!
382      *  Get the operation error code
383      */
384     string GetErrorCode();
385
386     /*!
387      *  Get ID of study, where the operation is defined
388      */
389     long GetStudyID();
390
391     /*!
392      *  Opens a new transaction
393      */
394     void StartOperation();
395
396     /*!
397      *  Closes the previously opened trasaction
398      */
399     void FinishOperation();
400
401     /*!
402      *  Aborts the previously opened transaction
403      */
404     void AbortOperation();
405   };
406
407   /*!
408    *  GEOM_IBasicOperations: interface for basic geometry creation
409    *  (Point, Vector, Plane, Marker)
410    */
411   interface GEOM_IBasicOperations : GEOM_IOperations
412   {
413     /*!
414      *  Create point by three coordinates.
415      *  \param theX The X coordinate of the point.
416      *  \param theY The Y coordinate of the point.
417      *  \param theZ The Z coordinate of the point.
418      *  \return New GEOM_Object, containing the created point.
419      */
420     GEOM_Object MakePointXYZ (in double theX, in double theY, in double theZ);
421
422     /*!
423      *  Create a point, distant from the referenced point
424      *  on the given distances along the coordinate axes.
425      *  \param theReference The referenced point.
426      *  \param theX Displacement from the referenced point along OX axis.
427      *  \param theY Displacement from the referenced point along OY axis.
428      *  \param theZ Displacement from the referenced point along OZ axis.
429      *  \return New GEOM_Object, containing the created point.
430      */
431     GEOM_Object MakePointWithReference (in GEOM_Object theReference,
432                                         in double theX, in double theY, in double theZ);
433
434     /*!
435      *  Create a point, corresponding to the given parameter on the given curve.
436      *  \param theRefCurve The referenced curve.
437      *  \param theParameter Value of parameter on the referenced curve.
438      *  \return New GEOM_Object, containing the created point.
439      */
440     GEOM_Object MakePointOnCurve (in GEOM_Object theRefCurve,
441                                   in double theParameter);
442
443     /*!
444      *  Create a point, corresponding to the given length on the given curve.
445      *  \param theRefCurve The referenced curve.
446      *  \param theLength Length on the referenced curve. It can be negative.
447      *  \param theStartPoint Any vertex close to one of edge's
448      *                       ends to select start point among them.
449      *                       If NULL, fist vertex is used.
450      *  \return New GEOM_Object, containing the created point.
451      */
452     GEOM_Object MakePointOnCurveByLength (in GEOM_Object theRefCurve,
453                                           in double      theLength,
454                                           in GEOM_Object theStartPoint);
455
456     /*!
457      *  Create a point on the given curve, projecting given point
458      *  \param theRefCurve The referenced curve.
459      *  \param theXParameter X co-ordinate of point to project on curve
460      *  \param theYParameter Y co-ordinate of point to project on curve
461      *  \param theZParameter Z co-ordinate of point to project on curve
462      *  \return New GEOM_Object, containing the created point.
463      */
464     GEOM_Object MakePointOnCurveByCoord (in GEOM_Object theRefCurve,
465                                          in double theXParameter,
466                                          in double theYarameter,
467                                          in double theZPameter);
468
469     /*!
470      *  Create a point, corresponding to the given parameters on the
471      *    given surface.
472      *  \param theRefSurf The referenced surface.
473      *  \param theUParameter Value of U-parameter on the referenced surface.
474      *  \param theVParameter Value of V-parameter on the referenced surface.
475      *  \return New GEOM_Object, containing the created point.
476      */
477     GEOM_Object MakePointOnSurface (in GEOM_Object theRefSurf,
478                                     in double theUParameter,
479                                     in double theVParameter);
480
481     /*!
482      *  Create a point on the given surface, projecting given point
483      *  \param theRefSurf The referenced surface.
484      *  \param theXParameter X co-ordinate of point to project on curve
485      *  \param theYParameter Y co-ordinate of point to project on curve
486      *  \param theZParameter Z co-ordinate of point to project on curve
487      *  \return New GEOM_Object, containing the created point.
488      */
489     GEOM_Object MakePointOnSurfaceByCoord (in GEOM_Object theRefSurf,
490                                            in double theXParameter,
491                                            in double theYarameter,
492                                            in double theZPameter);
493
494
495     /*!
496      *  Create a point, on two lines intersection.
497      *  \param theRefLine1, theRefLine2 The referenced lines.
498      *  \return New GEOM_Object, containing the created point.
499      */
500     GEOM_Object MakePointOnLinesIntersection (in GEOM_Object theRefLine1,
501                                               in GEOM_Object theRefLine2);
502
503      /*!
504      *  Create a vector, corresponding to tangent to the given parameter on the given curve.
505      *  \param theRefCurve The referenced curve.
506      *  \param theParameter Value of parameter on the referenced curve.This value should be have value
507      *  \between 0. and 1.. Value of 0. corresponds first parameter of curve value 1. corresponds
508      *  \last parameter of curve.
509      *  \return New GEOM_Object, containing the created point.
510      */
511      GEOM_Object MakeTangentOnCurve (in GEOM_Object theRefCurve,
512                                      in double theParameter);
513
514     /*!
515      *  Create a vector with the given components.
516      *  \param theDX X component of the vector.
517      *  \param theDY Y component of the vector.
518      *  \param theDZ Z component of the vector.
519      *  \return New GEOM_Object, containing the created vector.
520      */
521     GEOM_Object MakeVectorDXDYDZ (in double theDX,
522                                   in double theDY,
523                                   in double theDZ);
524
525     /*!
526      *  Create a vector between two points.
527      *  \param thePnt1 Start point for the vector.
528      *  \param thePnt2 End point for the vector.
529      *  \return New GEOM_Object, containing the created vector.
530      */
531     GEOM_Object MakeVectorTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
532
533     /*!
534      *  Create a line, passing through the given point
535      *  and parrallel to the given direction
536      *  \param thePnt Point. The resulting line will pass through it.
537      *  \param theDir Direction. The resulting line will be parallel to it.
538      *  \return New GEOM_Object, containing the created line.
539      */
540     GEOM_Object MakeLine (in GEOM_Object thePnt, in GEOM_Object theDir);
541
542     /*!
543      *  Create a line, passing through the given points
544      *  \param thePnt1 First of two points, defining the line.
545      *  \param thePnt2 Second of two points, defining the line.
546      *  \return New GEOM_Object, containing the created line.
547      */
548     GEOM_Object MakeLineTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
549
550     /*!
551      *  Create a line, given by two faces intersection.
552      *  \param theFace1 First of two faces, defining the line.
553      *  \param theFace2 Second of two faces, defining the line.
554      *  \return New GEOM_Object, containing the created line.
555      */
556     GEOM_Object MakeLineTwoFaces (in GEOM_Object theFace1, in GEOM_Object theFace2);
557
558     /*!
559      *  Create a plane, passing through the three given points
560      *  \param thePnt1 First of three points, defining the plane.
561      *  \param thePnt2 Second of three points, defining the plane.
562      *  \param thePnt3 Fird of three points, defining the plane.
563      *  \param theTrimSize Half size of a side of quadrangle face, representing the plane.
564      *  \return New GEOM_Object, containing the created plane.
565      */
566     GEOM_Object MakePlaneThreePnt (in GEOM_Object thePnt1,
567                                    in GEOM_Object thePnt2,
568                                    in GEOM_Object thePnt3,
569                                    in double theTrimSize);
570
571     /*!
572      *  Create a plane, passing through the given point
573      *  and normal to the given vector.
574      *  \param thePnt Point, the plane has to pass through.
575      *  \param theVec Vector, defining the plane normal direction.
576      *  \param theTrimSize Half size of a side of quadrangle face, representing the plane.
577      *  \return New GEOM_Object, containing the created plane.
578      */
579     GEOM_Object MakePlanePntVec (in GEOM_Object thePnt,
580                                  in GEOM_Object theVec,
581                                  in double theTrimSize);
582
583     /*!
584      *  Create a plane, similar to the existing one, but with another size of representing face.
585      *  \param theFace Referenced plane or LCS(Marker).
586      *  \param theTrimSize New half size of a side of quadrangle face, representing the plane.
587      *  \return New GEOM_Object, containing the created plane.
588      */
589     GEOM_Object MakePlaneFace (in GEOM_Object theFace,
590                                in double theTrimSize);
591
592     /*!
593      *  Create a plane, by two vectors.
594      *  \param theVec1 Vector1, the plane has to pass through first point of this vector.
595      *  \param theVec Vector2, defining the plane normal direction.
596      *  \param theTrimSize Half size of a side of quadrangle face, representing the plane.
597      *  \return New GEOM_Object, containing the created plane.
598      */
599     GEOM_Object MakePlane2Vec (in GEOM_Object theVec1,
600                                in GEOM_Object theVec2,
601                                in double theTrimSize);
602
603     /*!
604      *  Create a plane, defined by local coordinate system.
605      *  \param theLCS Referenced LCS(Marker).
606      *  \param theTrimSize Half size of a side of quadrangle face, representing the plane.
607      *  \param theOrientation OXY, OYZ or OZX orientation = (1, 2 or 3).
608      *  \return New GEOM_Object, containing the created plane.
609      */
610     GEOM_Object MakePlaneLCS (in GEOM_Object theLCS,
611                               in double theTrimSize,
612                               in double theOrientation);
613
614     /*!
615      *  Create a local coordinate system.
616      *  \param theOX,theOY,theOZ Three coordinates of coordinate system origin.
617      *  \param theXDX,theXDY,theXDZ Three components of OX direction
618      *  \param theYDX,theYDY,theYDZ Three components of OY direction
619      *  \return New GEOM_Object, containing the created coordinate system.
620      */
621     GEOM_Object MakeMarker (in double theOX , in double theOY , in double theOZ,
622                             in double theXDX, in double theXDY, in double theXDZ,
623                             in double theYDX, in double theYDY, in double theYDZ);
624
625     /*!
626      *  Create a local coordinate system from shape.
627      *  \param theShape The initial shape to detect the coordinate system.
628      *  \return New GEOM_Object, containing the created coordinate system.
629      */
630     GEOM_Object MakeMarkerFromShape (in GEOM_Object theShape);
631
632     /*!
633      *  Create a local coordinate system from point and two vectors (DX, DY).
634      *  \param theOrigin Point of coordinate system origin.
635      *  \param theXVec Vector of X direction.
636      *  \param theYVec Vector of Y direction.
637      *  \return New GEOM_Object, containing the created coordinate system.
638      */
639     GEOM_Object MakeMarkerPntTwoVec (in GEOM_Object theOrigin,
640                                      in GEOM_Object theXVec, in GEOM_Object theYVec);
641
642     /*!
643      *  Create a tangent plane to specified face in the point with specified parameters.
644      *  Values of parameters should be between 0. and 1.0
645      *  \param theFace - face for which tangent plane shuold be built.
646      *  \param theParameterU - value of parameter by U
647      *  \param theParameterV - value of parameter Vthe
648      *  \param theTrimSize - defines sizes of created face
649      *  \return New GEOM_Object, containing the face built on tangent plane.
650      */
651     GEOM_Object MakeTangentPlaneOnFace(in GEOM_Object theFace,
652                                        in double theParameterU,
653                                        in double theParameterV,
654                                        in double theTrimSize);
655   };
656
657   interface GEOM_ITransformOperations : GEOM_IOperations
658   {
659     /*!
660      *  Translate the given object along the vector, specified by its end points.
661      *  \param theObject The object to be translated.
662      *  \param thePoint1 Start point of translation vector.
663      *  \param thePoint2 End point of translation vector.
664      *  \return theObject.
665      */
666     GEOM_Object TranslateTwoPoints (in GEOM_Object theObject,
667                                     in GEOM_Object thePoint1,
668                                     in GEOM_Object thePoint2);
669
670     /*!
671      *  Translate the given object along the vector, specified
672      *  by its end points, creating its copy before the translation.
673      *  \param theObject The object to be translated.
674      *  \param thePoint1 Start point of translation vector.
675      *  \param thePoint2 End point of translation vector.
676      *  \return New GEOM_Object, containing the translated object.
677      */
678     GEOM_Object TranslateTwoPointsCopy (in GEOM_Object theObject,
679                                         in GEOM_Object thePoint1,
680                                         in GEOM_Object thePoint2);
681
682     /*!
683      *  Translate the given object along the vector, specified by its components.
684      *  \param theObject The object to be translated.
685      *  \param theDX,theDY,theDZ Components of translation vector.
686      *  \return theObject.
687      */
688     GEOM_Object TranslateDXDYDZ (in GEOM_Object theObject,
689                                  in double theDX, in double theDY, in double theDZ);
690
691     /*!
692      *  Translate the given object along the vector, specified
693      *  by its components, creating its copy before the translation.
694      *  \param theObject The object to be translated.
695      *  \param theDX,theDY,theDZ Components of translation vector.
696      *  \return New GEOM_Object, containing the translated object.
697      */
698     GEOM_Object TranslateDXDYDZCopy (in GEOM_Object theObject,
699                                      in double theDX, in double theDY, in double theDZ);
700
701
702     /*!
703      *  Translate the given object along the given vector.
704      *  \param theObject The object to be translated.
705      *  \param theVector Translation vector, giving both direction and distance.
706      *  \return theObject.
707      */
708     GEOM_Object TranslateVector (in GEOM_Object theObject,
709                                  in GEOM_Object theVector);
710
711     /*!
712      *  Translate the given object along the given vector,
713      *  creating its copy before the translation.
714      *  \param theObject The object to be translated.
715      *  \param theVector Translation vector, giving both direction and distance.
716      *  \return New GEOM_Object, containing the translated object.
717      */
718     GEOM_Object TranslateVectorCopy (in GEOM_Object theObject,
719                                      in GEOM_Object theVector);
720
721     /*!
722      *  Translate the given object along the given vector on given distance,
723      *  creating its copy before the translation.
724      *  \param theObject The object to be translated.
725      *  \param theVector Translation vector, giving a direction.
726      *  \param theDistance Translation distance, giving a distance.
727      *  \param theCope Translation copy, creating its copy if true.
728      *  \return New GEOM_Object, containing the translated object.
729      */
730     GEOM_Object TranslateVectorDistance (in GEOM_Object theObject,
731                                          in GEOM_Object theVector,
732                                          in double      theDistance,
733                                          in boolean     theCopy);
734
735     /*!
736      *  Translate the given object along the given vector a given number times
737      *  \param theObject The object to be translated.
738      *  \param theVector Direction of the translation.
739      *  \param theStep Distance to translate on.
740      *  \param theNbTimes Quantity of translations to be done.
741      *  \return New GEOM_Object, containing compound of all
742      *          the shapes, obtained after each translation.
743      */
744     GEOM_Object MultiTranslate1D (in GEOM_Object theObject,
745                                   in GEOM_Object theVector,
746                                   in double theStep,
747                                   in long theNbTimes);
748
749     /*!
750      *  Conseqently apply two specified translations to theObject specified number of times.
751      *  \param theObject The object to be translated.
752      *  \param theVector1 Direction of the first translation.
753      *  \param theStep1 Step of the first translation.
754      *  \param theNbTimes1 Quantity of translations to be done along theVector1.
755      *  \param theVector2 Direction of the second translation.
756      *  \param theStep2 Step of the second translation.
757      *  \param theNbTimes2 Quantity of translations to be done along theVector2.
758      *  \return New GEOM_Object, containing compound of all
759      *          the shapes, obtained after each translation.
760      */
761     GEOM_Object MultiTranslate2D (in GEOM_Object theObject,
762                                   in GEOM_Object theVector1,
763                                   in double theStep1,
764                                   in long theNbTimes1,
765                                   in GEOM_Object theVector2,
766                                   in double theStep2,
767                                   in long theNbTimes2);
768
769     /*!
770      *  Rotate given object around vector perpendicular to plane containing three points.
771      *  \param theObject The object to be rotated.
772      *  \param theCentPoint central point - the axis is the vector perpendicular to the plane
773      *  containing the three points.
774      *  \param thePoint1 and thePoint2 - in a perpendicular plan of the axis.
775      *  \return theObject.
776      */
777     GEOM_Object RotateThreePoints (in GEOM_Object theObject,
778                                    in GEOM_Object theCentPoint,
779                                    in GEOM_Object thePoint1,
780                                    in GEOM_Object thePoint2);
781
782
783     /*!
784      *  Rotate given object around vector perpendicular to plane containing three points.
785      *  Creating its copy before the rotatation.
786      *  \param theObject The object to be rotated.
787      *  \param theCentPoint central point - the axis is the vector perpendicular to the plane
788      *  containing the three points.
789      *  \param thePoint1 and thePoint2 - in a perpendicular plan of the axis.
790      *  \return New GEOM_Object, containing the rotated object.
791      */
792     GEOM_Object RotateThreePointsCopy (in GEOM_Object theObject,
793                                        in GEOM_Object theCentPoint,
794                                        in GEOM_Object thePoint1,
795                                        in GEOM_Object thePoint2);
796
797     /*!
798      *  Rotate the given object around the given axis on the given angle.
799      *  \param theObject The object to be rotated.
800      *  \param theAxis Rotation axis.
801      *  \param theAngle Rotation angle in radians.
802      *  \return theObject.
803      */
804     GEOM_Object Rotate (in GEOM_Object theObject,
805                         in GEOM_Object theAxis,
806                         in double theAngle);
807
808
809     /*!
810      *  Rotate the given object around the given axis
811      *  on the given angle, creating its copy before the rotatation.
812      *  \param theObject The object to be rotated.
813      *  \param theAxis Rotation axis.
814      *  \param theAngle Rotation angle in radians.
815      *  \return New GEOM_Object, containing the rotated object.
816      */
817     GEOM_Object RotateCopy (in GEOM_Object theObject,
818                             in GEOM_Object theAxis,
819                             in double theAngle);
820
821
822     /*!
823      *  Rotate the given object around the given axis a given number times.
824      *  Rotation angle will be 2*PI/theNbTimes.
825      *  \param theObject The object to be rotated.
826      *  \param theAxis The rotation axis.
827      *  \param theNbTimes Quantity of rotations to be done.
828      *  \return New GEOM_Object, containing compound of all the
829      *          shapes, obtained after each rotation.
830      */
831     GEOM_Object MultiRotate1D (in GEOM_Object theObject,
832                                in GEOM_Object theAxis,
833                                in long theNbTimes);
834
835     /*!
836      *  Rotate the given object around the
837      *  given axis on the given angle a given number
838      *  times and multi-translate each rotation result.
839      *  Translation direction passes through center of gravity
840      *  of rotated shape and its projection on the rotation axis.
841      *  \param theObject The object to be rotated.
842      *  \param theAxis Rotation axis.
843      *  \param theAngle Rotation angle in graduces.
844      *  \param theNbTimes1 Quantity of rotations to be done.
845      *  \param theStep Translation distance.
846      *  \param theNbTimes2 Quantity of translations to be done.
847      *  \return New GEOM_Object, containing compound of all the
848      *          shapes, obtained after each transformation.
849      */
850     GEOM_Object MultiRotate2D (in GEOM_Object theObject,
851                                in GEOM_Object theAxis,
852                                in double theAngle,
853                                in long theNbTimes1,
854                                in double theStep,
855                                in long theNbTimes2);
856
857     /*!
858      *  Replace the given object by an object,
859      *  symmetrical to it relatively the given plane.
860      *  \param theObject The object to be mirrored.
861      *  \param thePlane Plane of symmetry.
862      */
863     GEOM_Object MirrorPlane (in GEOM_Object theObject, in GEOM_Object thePlane);
864
865     /*!
866      *  Create an object, symmetrical
867      *  to the given one relatively the given plane.
868      *  \param theObject The object to be mirrored.
869      *  \param thePlane Plane of symmetry.
870      *  \return New GEOM_Object, containing the mirrored shape.
871      */
872     GEOM_Object MirrorPlaneCopy (in GEOM_Object theObject, in GEOM_Object thePlane);
873
874     /*!
875      *  Replace the given object by an object,
876      *  symmetrical to it relatively the given axis.
877      *  \param theObject The object to be mirrored.
878      *  \param theAxis Axis of symmetry.
879      *  \return theObject.
880      */
881     GEOM_Object MirrorAxis (in GEOM_Object theObject, in GEOM_Object theAxis);
882
883     /*!
884      *  Create an object, symmetrical
885      *  to the given one relatively the given axis.
886      *  \param theObject The object to be mirrored.
887      *  \param theAxis Axis of symmetry.
888      *  \return New GEOM_Object, containing the mirrored object.
889      */
890     GEOM_Object MirrorAxisCopy (in GEOM_Object theObject, in GEOM_Object theAxis);
891
892     /*!
893      *  Replace the given object by an object, symmetrical to it relatively the given point.
894      *  \param theObject The object to be mirrored.
895      *  \param thePoint Point of symmetry.
896      *  \return theObject.
897      */
898     GEOM_Object MirrorPoint (in GEOM_Object theObject, in GEOM_Object thePoint);
899
900     /*!
901      *  Create an object, symmetrical to the given one relatively the given point.
902      *  \param theObject The object to be mirrored.
903      *  \param thePoint Point of symmetry.
904      *  \return New GEOM_Object, containing the mirrored object.
905      */
906     GEOM_Object MirrorPointCopy (in GEOM_Object theObject, in GEOM_Object thePoint);
907
908     /*!
909      *  Replace the given object by its offset.
910      *  \param theObject The base object for the offset.
911      *  \param theOffset Offset value.
912      *  \return theObject.
913      */
914     GEOM_Object OffsetShape (in GEOM_Object theObject, in double theOffset);
915
916     /*!
917      *  Create new object as offset of the given one.
918      *  \param theObject The base object for the offset.
919      *  \param theOffset Offset value.
920      *  \return New GEOM_Object, containing the offset object.
921      */
922     GEOM_Object OffsetShapeCopy (in GEOM_Object theObject, in double theOffset);
923
924     /*!
925      *  Create new object as projection of the given one on a 2D surface.
926      *  \param theSource The source object for the projection. It can be a point, edge or wire.
927      *  \param theTarget The target object. It can be planar or cylindrical face.
928      *  \return New GEOM_Object, containing the projection.
929      */
930     GEOM_Object ProjectShapeCopy (in GEOM_Object theSource, in GEOM_Object theTarget);
931
932     /*!
933      *  Scale the given object by the factor.
934      *  \param theObject The object to be scaled.
935      *  \param thePoint Center point for scaling.
936      *  \param theFactor Scaling factor value.
937      *  \return theObject.
938      */
939     GEOM_Object ScaleShape (in GEOM_Object theObject, in GEOM_Object thePoint,
940                             in double theFactor);
941
942     /*!
943      *  Scale the given object by the factor, creating its copy before the scaling.
944      *  \param theObject The object to be scaled.
945      *  \param thePoint Center point for scaling.
946      *  \param theFactor Scaling factor value.
947      *  \return New GEOM_Object, containing the scaled shape.
948      */
949     GEOM_Object ScaleShapeCopy (in GEOM_Object theObject, in GEOM_Object thePoint,
950                                 in double theFactor);
951
952     /*!
953      *  Scale the given object by different factors along coordinate axes.
954      *  \param theObject The object to be scaled.
955      *  \param thePoint Center point for scaling.
956      *  \param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
957      *  \return theObject.
958      */
959     GEOM_Object ScaleShapeAlongAxes (in GEOM_Object theObject,
960                                      in GEOM_Object thePoint,
961                                      in double theFactorX,
962                                      in double theFactorY,
963                                      in double theFactorZ);
964
965     /*!
966      *  Scale the given object by different factors along coordinate axes,
967      *  creating its copy before the scaling.
968      *  \param theObject The object to be scaled.
969      *  \param thePoint Center point for scaling.
970      *  \param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
971      *  \return New GEOM_Object, containing the scaled shape.
972      */
973     GEOM_Object ScaleShapeAlongAxesCopy (in GEOM_Object theObject,
974                                          in GEOM_Object thePoint,
975                                          in double theFactorX,
976                                          in double theFactorY,
977                                          in double theFactorZ);
978
979     /*!
980      *  Modify the Location of the given object by LCS.
981      *  \param theObject The object to be displaced.
982      *  \param theStartLCS Coordinate system to perform displacement from it.
983      *                     If \a theStartLCS is NULL, displacement
984      *                     will be performed from global CS.
985      *                     If \a theObject itself is used as \a theStartLCS,
986      *                     its location will be changed to \a theEndLCS.
987      *  \param theEndLCS Coordinate system to perform displacement to it.
988      *  \return theObject.
989      */
990     GEOM_Object PositionShape (in GEOM_Object theObject,
991                                in GEOM_Object theStartLCS,
992                                in GEOM_Object theEndLCS);
993
994     /*!
995      *  Modify the Location of the given object by LCS,
996      *  creating its copy before the setting.
997      *  \param theObject The object to be displaced.
998      *  \param theStartLCS Coordinate system to perform displacement from it.
999      *                     If \a theStartLCS is NULL, displacement
1000      *                     will be performed from global CS.
1001      *                     If \a theObject itself is used as \a theStartLCS,
1002      *                     its location will be changed to \a theEndLCS.
1003      *  \param theEndLCS Coordinate system to perform displacement to it.
1004      *  \return New GEOM_Object, containing the displaced shape.
1005      */
1006     GEOM_Object PositionShapeCopy (in GEOM_Object theObject,
1007                                    in GEOM_Object theStartLCS,
1008                                    in GEOM_Object theEndLCS);
1009
1010     /*!
1011      *  Modify the Location of the given object by Path,
1012      *  \param  theObject The object to be displaced.
1013      *  \param  thePath Wire or Edge along that the object will be translated.
1014      *  \param  theDistance progress of Path (0 = actual location, 1 = end of path location).
1015      *  \param  theCopy is a true or false parameter. true is to create a copy, false to move the object.
1016      *  \param  theCopy is a true or false parameter. true is to reverse direction, false is to move normal direction.
1017      *  \return New GEOM_Object, containing the displaced shape.
1018      */
1019     GEOM_Object PositionAlongPath (in GEOM_Object theObject,
1020                                    in GEOM_Object thePath,
1021                                    in double theDistance,
1022                                    in boolean theCopy,
1023                                    in boolean theReverse);
1024
1025     /*!
1026      *  Transform the shape in the same way what was used for the sample shape creation.
1027      *  \param theObject The object to be transformed.
1028      *  \param theSample The object containing information about required transformation.
1029      *  \note Implementation of this method is limited by multi-transformations now.
1030      *  \note Internal method.
1031      *  \return New GEOM_Object, containing the transformed shape.
1032      */
1033     GEOM_Object TransformLikeOtherCopy (in GEOM_Object theObject,
1034                                         in GEOM_Object theSample);
1035
1036     /*!
1037      *  Recompute the shape from its arguments.
1038      *  \param theObject The object to be recomputed.
1039      *  \return theObject.
1040      */
1041     GEOM_Object RecomputeObject (in GEOM_Object theObject);
1042   };
1043
1044   /*!
1045    *  GEOM_I3DPrimOperations: Interface for 3D primitives creation
1046    *  Box, Cylinder, Cone, Sphere, Prism (extrusion),
1047    *  Pipe (extrusion along contour), Revolution, Solid (from shell).
1048    */
1049   interface GEOM_I3DPrimOperations : GEOM_IOperations
1050   {
1051     /*!
1052      *  Create a box with specified dimensions along the coordinate axes
1053      *  and with edges, parallel to the coordinate axes.
1054      *  Center of the box will be at point (DX/2, DY/2, DZ/2).
1055      *  \param theDX Length of Box edges, parallel to OX axis.
1056      *  \param theDY Length of Box edges, parallel to OY axis.
1057      *  \param theDZ Length of Box edges, parallel to OZ axis.
1058      *  \return New GEOM_Object, containing the created box.
1059      */
1060     GEOM_Object MakeBoxDXDYDZ (in double theDX, in double theDY, in double theDZ);
1061
1062     /*!
1063      *  Create a box with two specified opposite vertices,
1064      *  and with edges, parallel to the coordinate axes
1065      *  \param thePnt1 First of two opposite vertices.
1066      *  \param thePnt2 Second of two opposite vertices.
1067      *  \return New GEOM_Object, containing the created box.
1068      */
1069     GEOM_Object MakeBoxTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
1070
1071     /*!
1072      *  Create a face specified dimensions along OX-OY coordinate axes,
1073      *  with edges parallel to the coordinate axes.
1074      *  Center of the face will be at point (0, 0, 0).
1075      *  \param theH Height of the Face.
1076      *  \param theW Width of the Face.
1077      *  \param theOrientation Orientation belong axis OXY OYZ OZX
1078      *  \return New GEOM_Object, containing the created face.
1079      */
1080     GEOM_Object MakeFaceHW (in double theH, in double theW, in short theOrientation);
1081     /*!
1082      *  Create a face by normale vector or edge and two specified sizes,
1083      *  vertical (H) and horisontal (W).
1084      *  \param theVec defines plane.
1085      *  \param theH vertical size (height).
1086      *  \param theW horisontal size (width).
1087      *  \return New GEOM_Object, containing the created face.
1088      */
1089     GEOM_Object MakeFaceObjHW (in GEOM_Object theObj, in double theH, in double theW);
1090     /*!
1091      *  Create a Disk (circular face) with given center, normal vector and radius.
1092      *  \param thePnt disk center.
1093      *  \param theVec Vector, normal to the plane of the disk.
1094      *  \param theR Disk radius.
1095      *  \return New GEOM_Object, containing the created disk.
1096      */
1097     GEOM_Object MakeDiskPntVecR (in GEOM_Object thePnt,
1098                                  in GEOM_Object theVec,
1099                                  in double theR);
1100     /*!
1101      *  Create a disk (circular face), passing through three given points
1102      *  \param thePnt1, thePnt2, thePnt3 Points, defining the disk.
1103      *  \return New GEOM_Object, containing the created disk.
1104      */
1105     GEOM_Object MakeDiskThreePnt (in GEOM_Object thePnt1,
1106                                   in GEOM_Object thePnt2,
1107                                   in GEOM_Object thePnt3);
1108
1109     /*!
1110      *  Create a disk specified dimensions along OX-OY coordinate axes,
1111      *  Center of the disk at point (0, 0, 0).
1112      *  \param theR of the Disk.
1113      *  \param theOrientation Orientation belong axis OXY OYZ OZX
1114      *  \return New GEOM_Object, containing the created disk.
1115      */
1116     GEOM_Object MakeDiskR (in double theR, in short theOrientation);
1117
1118     /*!
1119      *  Create a cylinder with given radius and height at
1120      *  the origin of coordinate system. Axis of the cylinder
1121      *  will be collinear to the OZ axis of the coordinate system.
1122      *  \param theR Cylinder radius.
1123      *  \param theH Cylinder height.
1124      *  \return New GEOM_Object, containing the created cylinder.
1125      */
1126     GEOM_Object MakeCylinderRH (in double theR, in double theH);
1127
1128     /*!
1129      *  Create a cylinder with given base point, axis, radius and height.
1130      *  \param thePnt Central point of cylinder base.
1131      *  \param theAxis Cylinder axis.
1132      *  \param theR Cylinder radius.
1133      *  \param theH Cylinder height.
1134      *  \return New GEOM_Object, containing the created cylinder.
1135      */
1136     GEOM_Object MakeCylinderPntVecRH (in GEOM_Object thePnt,
1137                                       in GEOM_Object theAxis,
1138                                       in double      theR,
1139                                       in double      theH);
1140
1141     /*!
1142      *  Create a cone with given height and radiuses at
1143      *  the origin of coordinate system. Axis of the cone will
1144      *  be collinear to the OZ axis of the coordinate system.
1145      *  \param theR1 Radius of the first cone base.
1146      *  \param theR2 Radius of the second cone base.
1147      *    \note If both radiuses are non-zero, the cone will be truncated.
1148      *    \note If the radiuses are equal, a cylinder will be created instead.
1149      *  \param theH Cone height.
1150      *  \return New GEOM_Object, containing the created cone.
1151      */
1152     GEOM_Object MakeConeR1R2H (in double theR1, in double theR2, in double theH);
1153
1154     /*!
1155      *  Create a cone with given base point, axis, height and radiuses.
1156      *  \param thePnt Central point of the first cone base.
1157      *  \param theAxis Cone axis.
1158      *  \param theR1 Radius of the first cone base.
1159      *  \param theR2 Radius of the second cone base.
1160      *    \note If both radiuses are non-zero, the cone will be truncated.
1161      *    \note If the radiuses are equal, a cylinder will be created instead.
1162      *  \param theH Cone height.
1163      *  \return New GEOM_Object, containing the created cone.
1164      */
1165     GEOM_Object MakeConePntVecR1R2H (in GEOM_Object thePnt,
1166                                      in GEOM_Object theAxis,
1167                                      in double      theR1,
1168                                      in double      theR2,
1169                                      in double      theH);
1170
1171     /*!
1172      *  Create a torus with given radiuses at the origin of coordinate system.
1173      *  \param theRMajor Torus major radius.
1174      *  \param theRMinor Torus minor radius.
1175      *  \return New GEOM_Object, containing the created torus.
1176      */
1177     GEOM_Object MakeTorusRR (in double theRMajor,
1178                              in double theRMinor);
1179
1180     /*!
1181      *  Create a torus with given center, normal vector and radiuses.
1182      *  \param thePnt Torus central point.
1183      *  \param theVec Torus axis of symmetry.
1184      *  \param theRMajor Torus major radius.
1185      *  \param theRMinor Torus minor radius.
1186      *  \return New GEOM_Object, containing the created torus.
1187      */
1188     GEOM_Object MakeTorusPntVecRR (in GEOM_Object thePnt,
1189                                    in GEOM_Object theVec,
1190                                    in double theRMajor,
1191                                    in double theRMinor);
1192
1193     /*!
1194      *  Create a sphere with given radius at the origin of coordinate system.
1195      *  \param theR Sphere radius.
1196      *  \return New GEOM_Object, containing the created sphere.
1197      */
1198     GEOM_Object MakeSphereR (in double theR);
1199
1200     /*!
1201      *  Create a sphere with given center and radius.
1202      *  \param thePnt Sphere center.
1203      *  \param theR Sphere radius.
1204      *  \return New GEOM_Object, containing the created .
1205      */
1206     GEOM_Object MakeSpherePntR (in GEOM_Object thePnt, in double theR);
1207
1208     /*!
1209      *  Create a shape by extrusion of the base shape along the vector,
1210      *  i.e. all the space, transfixed by the base shape during its translation
1211      *  along the vector on the given distance.
1212      *  \param theBase Base shape to be extruded.
1213      *  \param theVec Direction of extrusion.
1214      *  \param theH Prism dimension along theVec.
1215      *  \return New GEOM_Object, containing the created prism.
1216      */
1217     GEOM_Object MakePrismVecH (in GEOM_Object theBase,
1218                                in GEOM_Object theVec,
1219                                in double      theH);
1220     /*  The Same Prism but in 2 directions (forward&backward) */
1221     GEOM_Object MakePrismVecH2Ways (in GEOM_Object theBase,
1222                                     in GEOM_Object theVec,
1223                                     in double      theH);
1224     /*  The Same as MakePrismVecH but with scaling */
1225     GEOM_Object MakePrismVecHWithScaling (in GEOM_Object theBase,
1226                                           in GEOM_Object theVec,
1227                                           in double      theH,
1228                                           in double      theScaleFactor);
1229
1230     /*!
1231      *  Create a shape by extrusion of the base shape along a vector, defined by two points.
1232      *  \param theBase Base shape to be extruded.
1233      *  \param thePoint1 First end of extrusion vector.
1234      *  \param thePoint2 Second end of extrusion vector.
1235      *  \return New GEOM_Object, containing the created prism.
1236      */
1237     GEOM_Object MakePrismTwoPnt (in GEOM_Object theBase,
1238                                  in GEOM_Object thePoint1,
1239                                  in GEOM_Object thePoint2);
1240     /*  The same prism but in two directions forward&backward */
1241     GEOM_Object MakePrismTwoPnt2Ways (in GEOM_Object theBase,
1242                                       in GEOM_Object thePoint1,
1243                                       in GEOM_Object thePoint2);
1244     /*  The Same as MakePrismTwoPnt but with scaling */
1245     GEOM_Object MakePrismTwoPntWithScaling (in GEOM_Object theBase,
1246                                             in GEOM_Object thePoint1,
1247                                             in GEOM_Object thePoint2,
1248                                             in double      theScaleFactor);
1249
1250     /*!
1251      *  Create a shape by extrusion of the base shape along a vector, defined by DX DY DZ.
1252      *  \param theBase Base shape to be extruded.
1253      *  \param DX, DY, DZ end of extrusion vector.
1254      *  \return New GEOM_Object, containing the created prism.
1255      */
1256     GEOM_Object MakePrismDXDYDZ (in GEOM_Object theBase,
1257                                    in double theDX, in double theDY, in double theDZ);
1258     /*  The same prism but in two directions forward&backward */
1259     GEOM_Object MakePrismDXDYDZ2Ways (in GEOM_Object theBase,
1260                                       in double theDX, in double theDY, in double theDZ);
1261     /*  The Same as MakePrismDXDYDZ but with scaling */
1262     GEOM_Object MakePrismDXDYDZWithScaling (in GEOM_Object theBase,
1263                                             in double theDX, in double theDY, in double theDZ,
1264                                             in double theScaleFactor);
1265
1266     /*!
1267      *  Create a shape by extrusion of the base shape along
1268      *  the path shape. The path shape can be a wire or an edge.
1269      *  \param theBase Base shape to be extruded.
1270      *  \param thePath Path shape to extrude the base shape along it.
1271      *  \return New GEOM_Object, containing the created pipe.
1272      */
1273     GEOM_Object MakePipe (in GEOM_Object theBase, in GEOM_Object thePath);
1274
1275     /*!
1276      *  Create a shape by revolution of the base shape around the axis
1277      *  on the given angle, i.e. all the space, transfixed by the base
1278      *  shape during its rotation around the axis on the given angle.
1279      *  \param theBase Base shape to be rotated.
1280      *  \param theAxis Rotation axis.
1281      *  \param theAngle Rotation angle in radians.
1282      *  \return New GEOM_Object, containing the created revolution.
1283      */
1284     GEOM_Object MakeRevolutionAxisAngle (in GEOM_Object theBase,
1285                                          in GEOM_Object theAxis,
1286                                          in double theAngle);
1287     /*  The Same Revolution but in both ways forward&backward */
1288     GEOM_Object MakeRevolutionAxisAngle2Ways (in GEOM_Object theBase,
1289                                               in GEOM_Object theAxis,
1290                                               in double theAngle);
1291
1292     /*!
1293      *  Create a filling from the given compound of contours.
1294      *  \param theMinDeg a minimal degree of BSpline surface to create
1295      *  \param theMaxDeg a maximal degree of BSpline surface to create
1296      *  \param theTol2D a 2d tolerance to be reached
1297      *  \param theTol3D a 3d tolerance to be reached
1298      *  \param theNbIter a number of iteration of approximation algorithm
1299      *  \param theMethod Kind of method to perform filling operation.
1300      *  \return New GEOM_Object, containing the created filling surface.
1301      */
1302     GEOM_Object MakeFilling (in GEOM_Object theShape,
1303                              in long theMinDeg, in long theMaxDeg,
1304                              in double theTol2D, in double theTol3D,
1305                              in long theNbIter,
1306                              in filling_oper_method theMethod,
1307                              in boolean theApprox);
1308
1309     /*!
1310      *  Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
1311      *  \param theSeqSections - set of specified sections.
1312      *  \param theModeSolid - mode defining building solid or shell
1313      *  \param thePreci - precision 3D used for smoothing by default 1.e-6
1314      *  \param theRuled - mode defining type of the result surfaces (ruled or smoothed).
1315      *  \return New GEOM_Object, containing the created shell or solid.
1316      */
1317     GEOM_Object MakeThruSections(in ListOfGO theSeqSections,
1318                                  in boolean theModeSolid,
1319                                  in double thePreci,
1320                                  in boolean theRuled);
1321
1322       /*!
1323      *  Create a shape by extrusion of the profile shape along
1324      *  the path shape. The path shape can be a wire or an edge.
1325      *  the several profiles can be specified in the several locations of path.
1326      *  \param theSeqBases - list of  Bases shape to be extruded.
1327      *  \param theLocations - list of locations on the path corresponding
1328      *                        specified list of the Bases shapes. Number of locations
1329      *                        should be equal to number of bases or list of locations can be empty.
1330      *  \param thePath - Path shape to extrude the base shape along it.
1331      *  \param theWithContact - the mode defining that the section is translated to be in
1332      *                          contact with the spine.
1333      *  \param - WithCorrection - defining that the section is rotated to be
1334      *                                 orthogonal to the spine tangent in the correspondent point
1335      *  \return New GEOM_Object, containing the created pipe.
1336      */
1337     GEOM_Object MakePipeWithDifferentSections (in ListOfGO theSeqBases,
1338                                                in ListOfGO theLocations,
1339                                                in GEOM_Object thePath,
1340                                                in boolean theWithContact ,
1341                                                in boolean theWithCorrection );
1342
1343     /*!
1344      *  Create a shape by extrusion of the profile shape along
1345      *  the path shape. The path shape can be a shell or a face.
1346      *  the several profiles can be specified in the several locations of path.
1347      *  \param theSeqBases - list of  Bases shape to be extruded.
1348      *  \param theSeqSubBases - list of corresponding subshapes of section shapes.
1349      *  \param theLocations - list of locations on the path corresponding
1350      *                        specified list of the Bases shapes. Number of locations
1351      *                        should be equal to number of bases.
1352      *  \param thePath - Path shape to extrude the base shape along it.
1353      *  \param theWithContact - the mode defining that the section is translated to be in
1354      *                          contact with the spine.
1355      *  \param - WithCorrection - defining that the section is rotated to be
1356      *                                 orthogonal to the spine tangent in the correspondent point
1357      *  \return New GEOM_Object, containing the created pipe.
1358      */
1359     GEOM_Object MakePipeWithShellSections (in ListOfGO theSeqBases,
1360                                            in ListOfGO theSeqSubBases,
1361                                            in ListOfGO theLocations,
1362                                            in GEOM_Object thePath,
1363                                            in boolean theWithContact ,
1364                                            in boolean theWithCorrection );
1365
1366     /*!
1367      * Create solids between given sections
1368      *  \param theSeqBases - list of sections (shell or face).
1369      *  \param theLocations - list of corresponding vertexes
1370      *  \return New GEOM_Object, containing the created solids.
1371      */
1372     GEOM_Object MakePipeShellsWithoutPath (in ListOfGO theSeqBases,
1373                                            in ListOfGO theLocations);
1374
1375     /*!
1376      *  Create a shape by extrusion of the base shape along
1377      *  the path shape with constant bi-normal direction along the given vector.
1378      *  The path shape can be a wire or an edge.
1379      *  \param theBase Base shape to be extruded.
1380      *  \param thePath Path shape to extrude the base shape along it.
1381      *  \param theVec Vector defines a constant binormal direction to keep the
1382      *                same angle beetween the Direction and the sections
1383      *                along the sweep surface.
1384      *  \return New GEOM_Object, containing the created pipe.
1385      */
1386     GEOM_Object MakePipeBiNormalAlongVector (in GEOM_Object theBase,
1387                                              in GEOM_Object thePath,
1388                                              in GEOM_Object theVec);
1389
1390   };
1391
1392   /*!
1393    *  GEOM_IShapesOperations: Interface for Shapes creation:
1394    *  Edge from two points, Wire from edges, Face from wire,
1395    *  Shell from faces, Solid from shells, Compound from shapes
1396    */
1397   interface GEOM_IShapesOperations : GEOM_IOperations
1398   {
1399     /*!
1400      *  Create a linear edge with specified ends.
1401      *  \param thePnt1 Point for the first end of edge.
1402      *  \param thePnt2 Point for the second end of edge.
1403      *  \return New GEOM_Object, containing the created edge.
1404      */
1405     GEOM_Object MakeEdge (in GEOM_Object thePnt1, in GEOM_Object thePnt2);
1406
1407     /*!
1408      *  Create an edge on another edge, corresponding to the given length on the given edge.
1409      *  \param theRefCurve The referenced edge.
1410      *  \param theLength Length on the referenced edge. It can be
1411      *                   negative for extrapolation on base curve.
1412      *  \param theStartPoint Any vertex close to one of edge's
1413      *                       ends to select start point among them.
1414      *                       If NULL, fist vertex is used.
1415      *  \return New GEOM_Object, containing the created edge.
1416      */
1417     GEOM_Object MakeEdgeOnCurveByLength (in GEOM_Object theRefCurve,
1418                                          in double      theLength,
1419                                          in GEOM_Object theStartPoint);
1420
1421     /*!
1422      *  Create an edge from specified wire.
1423      *  \param theWire source Wire.
1424      *  \param theLinearTolerance linear tolerance value
1425      *  \param theAngularTolerance angular tolerance value
1426      *  \return New GEOM_Object, containing the created edge.
1427      */
1428     GEOM_Object MakeEdgeWire (in GEOM_Object theWire,
1429                               in double theLinearTolerance,
1430                               in double theAngularTolerance);
1431
1432     /*!
1433      *  Create a wire from the set of edges and wires.
1434      *  \param theEdgesAndWires List of edge and/or wires.
1435      *  \param theTolerance Maximum distance between vertices, that will be merged.
1436      *                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
1437      *  \return New GEOM_Object, containing the created wire.
1438      */
1439     GEOM_Object MakeWire (in ListOfGO theEdgesAndWires,
1440                           in double   theTolerance);
1441
1442     /*!
1443      *  Create a face on the given wire.
1444      *  \param theWire closed Wire or Edge to build the face on.
1445      *  \param isPlanarWanted If TRUE, only planar face will be built.
1446      *                        If impossible, NULL object will be returned.
1447      *  \return New GEOM_Object, containing the created face.
1448      */
1449     GEOM_Object MakeFace (in GEOM_Object theWire, in boolean isPlanarWanted);
1450
1451     /*!
1452      *  Create a face on the given wires set.
1453      *  \param theWires List of closed wires or edges to build the face on.
1454      *  \param isPlanarWanted If TRUE, only planar face will be built.
1455      *                        If impossible, NULL object will be returned.
1456      *  \return New GEOM_Object, containing the created face.
1457      */
1458     GEOM_Object MakeFaceWires (in ListOfGO theWires, in boolean isPlanarWanted);
1459
1460     /*!
1461      *  Create a shell from the set of faces and shells.
1462      *  \param theFacesAndShells List of faces and/or shells.
1463      *  \return New GEOM_Object, containing the created shell.
1464      */
1465     GEOM_Object MakeShell (in ListOfGO theFacesAndShells);
1466
1467     /*!
1468      *  Create a solid, bounded by the given shell.
1469      *  \param theShell Bounding shell.
1470      *  \return New GEOM_Object, containing the created solid.
1471      */
1472     GEOM_Object MakeSolidShell (in GEOM_Object theShell);
1473
1474     /*!
1475      *  Create a solid, bounded by the given shells.
1476      *  \param theShells Bounding shells.
1477      *  \return New GEOM_Object, containing the created solid.
1478      */
1479     GEOM_Object MakeSolidShells (in ListOfGO theShells);
1480
1481     /*!
1482      *  Create a compound of the given shapes.
1483      *  \param theShapes List of shapes to put in compound.
1484      *  \return New GEOM_Object, containing the created compound.
1485      */
1486     GEOM_Object MakeCompound (in ListOfGO theShapes);
1487
1488     /*!
1489      *  Replace coincident faces in theShape by one face.
1490      *  \param theShape Initial shape.
1491      *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
1492      *  \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
1493      *  \return New GEOM_Object, containing a copy of theShape without coincident faces.
1494      */
1495     GEOM_Object MakeGlueFaces (in GEOM_Object theShape, in double theTolerance, in boolean doKeepNonSolids);
1496
1497     /*!
1498      *  Find coincident faces in theShape for possible gluing.
1499      *  \param theShape Initial shape.
1500      *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
1501      *  \return ListOfGO
1502      */
1503     ListOfGO GetGlueFaces (in GEOM_Object theShape, in double theTolerance);
1504
1505     /*!
1506      *  Replace coincident faces in theShape by one face
1507      *  in compliance with given list of faces
1508      *  \param theShape Initial shape.
1509      *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
1510      *  \param theFaces List of faces for gluing.
1511      *  \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
1512      *  \param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
1513      *                        will be glued, otherwise only the edges,
1514      *                        belonging to <VAR>theFaces</VAR>.
1515      *  \return New GEOM_Object, containing a copy of theShape without some faces.
1516      */
1517     GEOM_Object MakeGlueFacesByList (in GEOM_Object theShape, in double theTolerance,
1518                                      in ListOfGO theFaces, in boolean doKeepNonSolids,
1519                                      in boolean doGlueAllEdges);
1520
1521     /*!
1522      *  Replace coincident edges in theShape by one edge.
1523      *  \param theShape Initial shape.
1524      *  \param theTolerance Maximum distance between edges, which can be considered as coincident.
1525      *  \return New GEOM_Object, containing a copy of theShape without coincident edges.
1526      */
1527     GEOM_Object MakeGlueEdges (in GEOM_Object theShape, in double theTolerance);
1528
1529     /*!
1530      *  Find coincident edges in theShape for possible gluing.
1531      *  \param theShape Initial shape.
1532      *  \param theTolerance Maximum distance between edges, which can be considered as coincident.
1533      *  \return ListOfGO
1534      */
1535     ListOfGO GetGlueEdges (in GEOM_Object theShape, in double theTolerance);
1536
1537     /*!
1538      *  Replace coincident edges in theShape by one edge
1539      *  in compliance with given list of edges
1540      *  \param theShape Initial shape.
1541      *  \param theTolerance Maximum distance between edges, which can be considered as coincident.
1542      *  \param theFaces List of edges for gluing.
1543      *  \return New GEOM_Object, containing a copy of theShape without some edges.
1544      */
1545     GEOM_Object MakeGlueEdgesByList (in GEOM_Object theShape,
1546                                      in double theTolerance,
1547                                      in ListOfGO theEdges);
1548
1549     /*!
1550      *  Get all sub-shapes and groups of \a theShape,
1551      *  that were created already by any other methods.
1552      *  \param theShape Any shape.
1553      *  \param theGroupsOnly If this parameter is TRUE, only groups will be
1554      *                       returned, else all found sub-shapes and groups.
1555      *  \return List of existing sub-objects of \a theShape.
1556      */
1557     ListOfGO GetExistingSubObjects (in GEOM_Object theShape,
1558                                     in boolean     theGroupsOnly);
1559
1560     /*!
1561      *  Deprecated method. Use MakeAllSubShapes() instead.
1562      */
1563     ListOfGO MakeExplode (in GEOM_Object theShape,
1564                           in long        theShapeType,
1565                           in boolean     isSorted);
1566
1567     /*!
1568      *  Explode a shape on subshapes of a given type. If the
1569      *  shape itself has the given type, it is also returned.
1570      *  \param theShape Shape to be exploded.
1571      *  \param theShapeType Type of sub-shapes to be retrieved.
1572      *  \param isSorted If this parameter is TRUE, sub-shapes will be
1573      *                  sorted by coordinates of their gravity centers.
1574      *  \return List of sub-shapes of type theShapeType, contained in theShape.
1575      */
1576     ListOfGO MakeAllSubShapes (in GEOM_Object theShape,
1577                                in long        theShapeType,
1578                                in boolean     isSorted);
1579
1580     /*!
1581      *  Extract all subshapes of the given type from
1582      *  the given shape, excluding the shape itself.
1583      *  \param theShape Shape to be exploded.
1584      *  \param theShapeType Type of sub-shapes to be retrieved.
1585      *  \param isSorted If this parameter is TRUE, sub-shapes will be
1586      *                  sorted by coordinates of their gravity centers.
1587      *  \return List of sub-shapes of type theShapeType, contained in theShape.
1588      */
1589     ListOfGO ExtractSubShapes (in GEOM_Object theShape,
1590                                in long        theShapeType,
1591                                in boolean     isSorted);
1592
1593     /*!
1594      *  Deprecated method. Use GetAllSubShapesIDs() instead.
1595      */
1596     ListOfLong SubShapeAllIDs (in GEOM_Object theShape,
1597                                in long        theShapeType,
1598                                in boolean     isSorted);
1599
1600     /*!
1601      *  Explode a shape on subshapes of a given type.
1602      *  Does the same, as MakeAllSubShapes, but returns IDs of
1603      *  sub-shapes, not GEOM_Objects. It works faster.
1604      *  \param theShape Shape to be exploded.
1605      *  \param theShapeType Type of sub-shapes to be retrieved.
1606      *  \param isSorted If this parameter is TRUE, sub-shapes will be
1607      *                  sorted by coordinates of their gravity centers.
1608      *  \return List of IDs of sub-shapes of type theShapeType, contained in theShape.
1609      */
1610     ListOfLong GetAllSubShapesIDs (in GEOM_Object theShape,
1611                                    in long        theShapeType,
1612                                    in boolean     isSorted);
1613
1614     /*!
1615      *  Get a sub shape defined by its unique ID inside \a theMainShape
1616      *  \param theMainShape Main shape.
1617      *  \param theID Unique ID of sub shape inside \a theMainShape.
1618      *  \return GEOM_Object, corresponding to found sub shape.
1619      *  \note The sub shape GEOM_Objects can has ONLY ONE function.
1620      *        Don't try to apply modification operations (without copy) on them.
1621      */
1622     GEOM_Object GetSubShape (in GEOM_Object theMainShape,
1623                              in long        theID);
1624
1625     /*!
1626      *  Get a set of sub shapes defined by their unique IDs inside \a theMainShape
1627      *  \param theMainShape Main shape.
1628      *  \param theIndices List of unique IDs of sub shapes inside \a theMainShape.
1629      *  \return List of GEOM_Objects, corresponding to found sub shapes.
1630      *  \note The sub shape GEOM_Objects can has ONLY ONE function.
1631      *        Don't try to apply modification operations (without copy) on them.
1632      */
1633     ListOfGO MakeSubShapes (in GEOM_Object theMainShape,
1634                             in ListOfLong  theIndices);
1635
1636     /*!
1637      *  Get global index of \a theSubShape in \a theMainShape.
1638      *  \param theMainShape Main shape.
1639      *  \param theSubShape Sub-shape of the main shape.
1640      *  \return global index of \a theSubShape in \a theMainShape.
1641      */
1642     long GetSubShapeIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
1643
1644     /*!
1645      *  Get index of \a theSubShape in \a theMainShape, unique among sub-shapes of the same type.
1646      *  Together with method <VAR>GetShapeTypeString()</VAR> it can be used
1647      *  to generate automatic names for sub-shapes, when publishing them in a study.
1648      *  \param theMainShape Main shape.
1649      *  \param theSubShape Sub-shape of the main shape.
1650      *  \return index of \a theSubShape in a list of all sub-shapes of \a theMainShape of the same type.
1651      */
1652     long GetTopologyIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
1653
1654     /*!
1655      *  \brief Get name of type of \a theShape.
1656      *
1657      *  Use wide type notation, taking into consideration both topology and geometry of the shape.
1658      *  Together with method <VAR>GetTopologyIndex()</VAR> it can be used
1659      *  to generate automatic names for sub-shapes, when publishing them in a study.
1660      *  \param theShape The shape to get a type of.
1661      *  \return String, containing a type name of \a theShape.
1662      */
1663     string GetShapeTypeString (in GEOM_Object theShape);
1664
1665     /*!
1666      *  Count number of faces in the given shape.
1667      *  \param theShape Shape to count faces in.
1668      *  \return Number of faces in the given shape.
1669      */
1670     long NumberOfFaces (in GEOM_Object theShape);
1671
1672     /*!
1673      *  Count number of edges in the given shape.
1674      *  \param theShape Shape to count edges in.
1675      *  \return Number of edges in theShape.
1676      */
1677     long NumberOfEdges (in GEOM_Object theShape);
1678
1679     /*!
1680      *  Count number of subshapes of type \a theShapeType in the given shape.
1681      *  \param theShape Shape to count subshapes in.
1682      *  \param theShapeType The type of subshapes to count.
1683      *  \return Number of subshapes of type \a theShapeType in \a theShape.
1684      */
1685     long NumberOfSubShapes (in GEOM_Object theShape,
1686                             in long        theShapeType);
1687
1688     /*!
1689      *  Reverses an orientation the given shape.
1690      *  \param theShape Shape to be reversed.
1691      *  \return The reversed copy of theShape.
1692      */
1693     GEOM_Object ChangeOrientation (in GEOM_Object theShape);
1694
1695     /*!
1696      *  Retrieve all free faces from the given shape.
1697      *  Free face is a face, which is not shared between two shells of the shape.
1698      *  \param theShape Shape to find free faces in.
1699      *  \return List of IDs of all free faces, contained in theShape.
1700      */
1701     ListOfLong GetFreeFacesIDs (in GEOM_Object theShape);
1702
1703     /*!
1704      *  Get all sub-shapes of theShape1 of the given type, shared with theShape2.
1705      *  \param theShape1 Shape to find sub-shapes in.
1706      *  \param theShape2 Shape to find shared sub-shapes with.
1707      *  \param theShapeType Type of sub-shapes to be retrieved.
1708      *  \return List of sub-shapes of theShape1, shared with theShape2.
1709      */
1710     ListOfGO GetSharedShapes (in GEOM_Object theShape1,
1711                               in GEOM_Object theShape2,
1712                               in long        theShapeType);
1713
1714     /*!
1715      *  Get all sub-shapes, shared by all shapes in the list \a theShapes.
1716      *  \param theShapes Shapes to find common sub-shapes of.
1717      *  \param theShapeType Type of sub-shapes to be retrieved.
1718      *  \return List of objects, that are sub-shapes of all given shapes.
1719      */
1720     ListOfGO GetSharedShapesMulti (in ListOfGO theShapes,
1721                                    in long     theShapeType);
1722
1723     /*!
1724      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1725      *  the specified plane by the certain way, defined through \a theState parameter.
1726      *  \param theShape Shape to find sub-shapes of.
1727      *  \param theShapeType Type of sub-shapes to be retrieved.
1728      *  \param theAx1 Vector (or line, or linear edge), specifying normal
1729      *                direction and location of the plane to find shapes on.
1730      *  \param theState The state of the subshapes to find.
1731      *  \return List of all found sub-shapes.
1732      */
1733     ListOfGO GetShapesOnPlane (in GEOM_Object theShape,
1734                                in long        theShapeType,
1735                                in GEOM_Object theAx1,
1736                                in shape_state theState);
1737     /*!
1738      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1739      *  the specified plane by the certain way, defined through \a theState parameter.
1740      *  \param theShape Shape to find sub-shapes of.
1741      *  \param theShapeType Type of sub-shapes to be retrieved.
1742      *  \param theAx1 Vector (or line, or linear edge), specifying normal
1743      *                direction of the plane to find shapes on.
1744      *  \param thePnt Point specifying location of the plane to find shapes on.
1745      *  \param theState The state of the subshapes to find.
1746      *  \return List of all found sub-shapes.
1747      */
1748     ListOfGO GetShapesOnPlaneWithLocation (in GEOM_Object theShape,
1749                                            in long        theShapeType,
1750                                            in GEOM_Object theAx1,
1751                                            in GEOM_Object thePnt,
1752                                            in shape_state theState);
1753
1754
1755
1756     /*!
1757      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1758      *  the specified cylinder by the certain way, defined through \a theState parameter.
1759      *  \param theShape Shape to find sub-shapes of.
1760      *  \param theShapeType Type of sub-shapes to be retrieved.
1761      *  \param theAxis Vector (or line, or linear edge), specifying
1762      *                 axis of the cylinder to find shapes on.
1763      *  \param theRadius Radius of the cylinder to find shapes on.
1764      *  \param theState The state of the subshapes to find.
1765      *  \return List of all found sub-shapes.
1766      */
1767     ListOfGO GetShapesOnCylinder (in GEOM_Object theShape,
1768                                   in long        theShapeType,
1769                                   in GEOM_Object theAxis,
1770                                   in double      theRadius,
1771                                   in shape_state theState);
1772
1773     /*!
1774      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1775      *  the specified cylinder by the certain way, defined through \a theState parameter.
1776      *  \param theShape Shape to find sub-shapes of.
1777      *  \param theShapeType Type of sub-shapes to be retrieved.
1778      *  \param theAxis Vector (or line, or linear edge), specifying
1779      *                 axis of the cylinder to find shapes on.
1780      *  \param thePnt Point specifying location of the bottom of the cylinder.
1781      *  \param theRadius Radius of the cylinder to find shapes on.
1782      *  \param theState The state of the subshapes to find.
1783      *  \return List of all found sub-shapes.
1784      */
1785     ListOfGO GetShapesOnCylinderWithLocation (in GEOM_Object theShape,
1786                                               in long        theShapeType,
1787                                               in GEOM_Object theAxis,
1788                                               in GEOM_Object thePnt,
1789                                               in double      theRadius,
1790                                               in shape_state theState);
1791
1792     /*!
1793      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1794      *  the specified sphere by the certain way, defined through \a theState parameter.
1795      *  \param theShape Shape to find sub-shapes of.
1796      *  \param theShapeType Type of sub-shapes to be retrieved.
1797      *  \param theCenter Point, specifying center of the sphere to find shapes on.
1798      *  \param theRadius Radius of the sphere to find shapes on.
1799      *  \param theState The state of the subshapes to find.
1800      *  \return List of all found sub-shapes.
1801      */
1802     ListOfGO GetShapesOnSphere (in GEOM_Object theShape,
1803                                 in long        theShapeType,
1804                                 in GEOM_Object theCenter,
1805                                 in double      theRadius,
1806                                 in shape_state theState);
1807
1808     /*!
1809      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1810      *  the specified quadrangle by the certain way, defined through \a theState parameter.
1811      *  \param theShape Shape to find sub-shapes of.
1812      *  \param theShapeType Type of sub-shapes to be retrieved.
1813      *  \param theTopLeftPoint Top left quadrangle corner
1814      *  \param theTopRigthPoint Top right quadrangle corner
1815      *  \param theBottomLeftPoint Bottom left quadrangle corner
1816      *  \param theBottomRigthPoint Bottom right quadrangle corner
1817      *  \param theState The state of the subshapes to find.
1818      *  \return List of all found sub-shapes.
1819      */
1820     ListOfGO GetShapesOnQuadrangle (in GEOM_Object theShape,
1821                                     in long        theShapeType,
1822                                     in GEOM_Object theTopLeftPoint,
1823                                     in GEOM_Object theTopRigthPoint,
1824                                     in GEOM_Object theBottomLeftPoint,
1825                                     in GEOM_Object theBottomRigthPoint,
1826                                     in shape_state theState);
1827
1828     /*!
1829      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1830      *  the specified plane by the certain way, defined through \a theState parameter.
1831      *  \param theShape Shape to find sub-shapes of.
1832      *  \param theShapeType Type of sub-shapes to be retrieved.
1833      *  \param theAx1 Vector (or line, or linear edge), specifying normal
1834      *                direction and location of the plane to find shapes on.
1835      *  \param theState The state of the subshapes to find.
1836      *  \return List of IDs of all found sub-shapes.
1837      */
1838     ListOfLong GetShapesOnPlaneIDs (in GEOM_Object theShape,
1839                                     in long        theShapeType,
1840                                     in GEOM_Object theAx1,
1841                                     in shape_state theState);
1842
1843     /*!
1844      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1845      *  the specified plane by the certain way, defined through \a theState parameter.
1846      *  \param theShape Shape to find sub-shapes of.
1847      *  \param theShapeType Type of sub-shapes to be retrieved.
1848      *  \param theAx1 Vector (or line, or linear edge), specifying normal
1849      *                direction of the plane to find shapes on.
1850      *  \param thePnt Point specifying location of the plane to find shapes on.
1851      *  \param theState The state of the subshapes to find.
1852      *  \return List of IDs of all found sub-shapes.
1853      */
1854     ListOfLong GetShapesOnPlaneWithLocationIDs (in GEOM_Object theShape,
1855                                                 in long        theShapeType,
1856                                                 in GEOM_Object theAx1,
1857                                                 in GEOM_Object thePnt,
1858                                                 in shape_state theState);
1859
1860     /*!
1861      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1862      *  the specified cylinder by the certain way, defined through \a theState parameter.
1863      *  \param theShape Shape to find sub-shapes of.
1864      *  \param theShapeType Type of sub-shapes to be retrieved.
1865      *  \param theAxis Vector (or line, or linear edge), specifying
1866      *                 axis of the cylinder to find shapes on.
1867      *  \param theRadius Radius of the cylinder to find shapes on.
1868      *  \param theState The state of the subshapes to find.
1869      *  \return List of IDs of all found sub-shapes.
1870      */
1871     ListOfLong GetShapesOnCylinderIDs (in GEOM_Object theShape,
1872                                        in long        theShapeType,
1873                                        in GEOM_Object theAxis,
1874                                        in double      theRadius,
1875                                        in shape_state theState);
1876
1877     /*!
1878      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1879      *  the specified cylinder by the certain way, defined through \a theState parameter.
1880      *  \param theShape Shape to find sub-shapes of.
1881      *  \param theShapeType Type of sub-shapes to be retrieved.
1882      *  \param theAxis Vector (or line, or linear edge), specifying
1883      *                 axis of the cylinder to find shapes on.
1884      *  \param thePnt Point specifying location of the bottom of the cylinder.
1885      *  \param theRadius Radius of the cylinder to find shapes on.
1886      *  \param theState The state of the subshapes to find.
1887      *  \return List of IDs all found sub-shapes.
1888      */
1889     ListOfLong GetShapesOnCylinderWithLocationIDs (in GEOM_Object theShape,
1890                                                    in long        theShapeType,
1891                                                    in GEOM_Object theAxis,
1892                                                    in GEOM_Object thePnt,
1893                                                    in double      theRadius,
1894                                                    in shape_state theState);
1895
1896     /*!
1897      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1898      *  the specified sphere by the certain way, defined through \a theState parameter.
1899      *  \param theShape Shape to find sub-shapes of.
1900      *  \param theShapeType Type of sub-shapes to be retrieved.
1901      *  \param theCenter Point, specifying center of the sphere to find shapes on.
1902      *  \param theRadius Radius of the sphere to find shapes on.
1903      *  \param theState The state of the subshapes to find.
1904      *  \return List of IDs of all found sub-shapes.
1905      */
1906     ListOfLong GetShapesOnSphereIDs (in GEOM_Object theShape,
1907                                      in long        theShapeType,
1908                                      in GEOM_Object theCenter,
1909                                      in double      theRadius,
1910                                      in shape_state theState);
1911
1912     /*!
1913      *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1914      *  the specified quadrangle by the certain way, defined through \a theState parameter.
1915      *  \param theShape Shape to find sub-shapes of.
1916      *  \param theShapeType Type of sub-shapes to be retrieved.
1917      *  \param theTopLeftPoint Top left quadrangle corner
1918      *  \param theTopRigthPoint Top right quadrangle corner
1919      *  \param theBottomLeftPoint Bottom left quadrangle corner
1920      *  \param theBottomRigthPoint Bottom right quadrangle corner
1921      *  \param theState The state of the subshapes to find.
1922      *  \return List of IDs of all found sub-shapes.
1923      */
1924     ListOfLong GetShapesOnQuadrangleIDs (in GEOM_Object theShape,
1925                                          in long        theShapeType,
1926                                          in GEOM_Object theTopLeftPoint,
1927                                          in GEOM_Object theTopRigthPoint,
1928                                          in GEOM_Object theBottomLeftPoint,
1929                                          in GEOM_Object theBottomRigthPoint,
1930                                          in shape_state theState);
1931
1932     /*!
1933      * \brief Find subshapes complying with given status
1934      * \param theBox - the box to check state of subshapes against
1935      * \param theShape - the shape to explore
1936      * \param theShapeType - type of subshape of theShape
1937      * \param theState - required state
1938      * \return List of IDs of all found sub-shapes.
1939      */
1940     ListOfLong GetShapesOnBoxIDs (in GEOM_Object theBox,
1941                                   in GEOM_Object theShape,
1942                                   in long        theShapeType,
1943                                   in shape_state theState);
1944
1945     /*!
1946      * \brief Find subshapes complying with given status
1947      * \param theBox - the box to check state of subshapes against
1948      * \param theShape - the shape to explore
1949      * \param theShapeType - type of subshape of theShape
1950      * \param theState - required state
1951      * \return List of all found sub-shapes.
1952      */
1953     ListOfGO GetShapesOnBox (in GEOM_Object theBox,
1954                              in GEOM_Object theShape,
1955                              in long        theShapeType,
1956                              in shape_state theState);
1957
1958     /*!
1959      * \brief Find subshapes complying with given status
1960      * \param theCheckShape - the shape to check state of subshapes against. It must be a solid.
1961      * \param theShape - the shape to explore
1962      * \param theShapeType - type of subshape of theShape
1963      * \param theState - required state
1964      * \return List of IDs of all found sub-shapes.
1965      */
1966     ListOfLong GetShapesOnShapeIDs (in GEOM_Object theCheckShape,
1967                                     in GEOM_Object theShape,
1968                                     in short       theShapeType,
1969                                     in shape_state theState);
1970
1971     /*!
1972      * \brief Find subshapes complying with given status
1973      * \param theCheckShape - the shape to check state of subshapes against. It must be a solid.
1974      * \param theShape - the shape to explore
1975      * \param theShapeType - type of subshape of theShape
1976      * \param theState - required state
1977      * \return List of all found sub-shapes.
1978      */
1979     ListOfGO GetShapesOnShape (in GEOM_Object theCheckShape,
1980                                in GEOM_Object theShape,
1981                                in short       theShapeType,
1982                                in shape_state theState);
1983
1984     /*!
1985      * \brief Find subshapes complying with given status
1986      * \param theCheckShape - the shape to check state of subshapes against. It must be a solid.
1987      * \param theShape - the shape to explore
1988      * \param theShapeType - type of subshape of theShape
1989      * \param theState - required state
1990      * \return compound includes all found sub-shapes.
1991      */
1992     GEOM_Object GetShapesOnShapeAsCompound (in GEOM_Object theCheckShape,
1993                                             in GEOM_Object theShape,
1994                                             in short       theShapeType,
1995                                             in shape_state theState);
1996
1997     /*!
1998      *  Get sub-shape(s) of \a theShapeWhere, which are
1999      *  coincident with \a theShapeWhat or could be a part of it.
2000      *  \param theShapeWhere Shape to find sub-shapes of.
2001      *  \param theShapeWhat Shape, specifying what to find.
2002      *  \return Group of all found sub-shapes or a single found sub-shape.
2003      */
2004     GEOM_Object GetInPlace (in GEOM_Object theShapeWhere,
2005                             in GEOM_Object theShapeWhat);
2006
2007     /*!
2008      *  Get sub-shape(s) of \a theShapeWhere, which are
2009      *  coincident with \a theShapeWhat or could be a part of it.
2010      *
2011      *  Implementation of this method is based on a saved history of an operation,
2012      *  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
2013      *  arguments (an argument shape or a sub-shape of an argument shape).
2014      *  The operation could be the Partition or one of boolean operations,
2015      *  performed on simple shapes (not on compounds).
2016      *
2017      *  \param theShapeWhere Shape to find sub-shapes of.
2018      *  \param theShapeWhat Shape, specifying what to find.
2019      *  \return Group of all found sub-shapes or a single found sub-shape.
2020      */
2021     GEOM_Object GetInPlaceByHistory (in GEOM_Object theShapeWhere,
2022                                      in GEOM_Object theShapeWhat);
2023
2024     /*!
2025      *  Get sub-shape of theShapeWhere, which are
2026      *  coincident with \a theShapeWhat that can either SOLID, FACE, EDGE or VERTEX.
2027      *  \param theShapeWhere Shape to find sub-shapes of.
2028      *  \param theShapeWhat Shape, specifying what to find.
2029      *  \return found sub-shape.
2030      */
2031     GEOM_Object GetSame (in GEOM_Object theShapeWhere,
2032                                 in GEOM_Object theShapeWhat);
2033   };
2034
2035   /*!
2036    *  GEOM_IBlocksOperations: Interface for Blocks construction
2037    *  Face from points or edges, Block from faces,
2038    *  Blocks multi-translation and multi-rotation
2039    */
2040   interface GEOM_IBlocksOperations : GEOM_IOperations
2041   {
2042     /*!
2043      *  Creation of blocks
2044      */
2045
2046     /*!
2047      *  Create a quadrangle face from four edges. Order of Edges is not
2048      *  important. It is  not necessary that edges share the same vertex.
2049      *  \param theEdge1,theEdge2,theEdge3,theEdge4 Edges for the face bound.
2050      *  \return New GEOM_Object, containing the created face.
2051      */
2052     GEOM_Object MakeQuad (in GEOM_Object theEdge1,
2053                           in GEOM_Object theEdge2,
2054                           in GEOM_Object theEdge3,
2055                           in GEOM_Object theEdge4);
2056
2057     /*!
2058      *  Create a quadrangle face on two edges.
2059      *  The missing edges will be built by creating the shortest ones.
2060      *  \param theEdge1,theEdge2 Two opposite edges for the face.
2061      *  \return New GEOM_Object, containing the created face.
2062      */
2063     GEOM_Object MakeQuad2Edges (in GEOM_Object theEdge1,
2064                                 in GEOM_Object theEdge2);
2065
2066     /*!
2067      *  Create a quadrangle face with specified corners.
2068      *  The missing edges will be built by creating the shortest ones.
2069      *  \param thePnt1,thePnt2,thePnt3,thePnt4 Corner vertices for the face.
2070      *  \return New GEOM_Object, containing the created face.
2071      */
2072     GEOM_Object MakeQuad4Vertices (in GEOM_Object thePnt1,
2073                                    in GEOM_Object thePnt2,
2074                                    in GEOM_Object thePnt3,
2075                                    in GEOM_Object thePnt4);
2076
2077     /*!
2078      *  Create a hexahedral solid, bounded by the six given faces. Order of
2079      *  faces is not important. It is  not necessary that Faces share the same edge.
2080      *  \param theFace1-theFace6 Faces for the hexahedral solid.
2081      *  \return New GEOM_Object, containing the created solid.
2082      */
2083     GEOM_Object MakeHexa (in GEOM_Object theFace1,
2084                           in GEOM_Object theFace2,
2085                           in GEOM_Object theFace3,
2086                           in GEOM_Object theFace4,
2087                           in GEOM_Object theFace5,
2088                           in GEOM_Object theFace6);
2089
2090     /*!
2091      *  Create a hexahedral solid between two given faces.
2092      *  The missing faces will be built by creating the smallest ones.
2093      *  \param theFace1,theFace2 Two opposite faces for the hexahedral solid.
2094      *  \return New GEOM_Object, containing the created solid.
2095      */
2096     GEOM_Object MakeHexa2Faces (in GEOM_Object theFace1,
2097                                 in GEOM_Object theFace2);
2098
2099     /*!
2100      *  Extract elements of blocks and blocks compounds
2101      */
2102
2103     /*!
2104      *  Get a vertex, found in the given shape by its coordinates.
2105      *  \param theShape Block or a compound of blocks.
2106      *  \param theX,theY,theZ Coordinates of the sought vertex.
2107      *  \param theEpsilon Maximum allowed distance between the resulting
2108      *                    vertex and point with the given coordinates.
2109      *  \return New GEOM_Object, containing the found vertex.
2110      */
2111     GEOM_Object GetPoint (in GEOM_Object theShape,
2112                           in double      theX,
2113                           in double      theY,
2114                           in double      theZ,
2115                           in double      theEpsilon);
2116
2117     /*!
2118      *  Find a vertex of the given shape, which has minimal distance to the given point.
2119      *  \param theShape Any shape.
2120      *  \param thePoint Point, close to the desired vertex.
2121      *  \return New GEOM_Object, containing the found vertex.
2122      */
2123     GEOM_Object GetVertexNearPoint (in GEOM_Object theShape,
2124                                     in GEOM_Object thePoint);
2125
2126     /*!
2127      *  Get an edge, found in the given shape by two given vertices.
2128      *  \param theShape Block or a compound of blocks.
2129      *  \param thePoint1,thePoint2 Points, close to the ends of the desired edge.
2130      *  \return New GEOM_Object, containing the found edge.
2131      */
2132     GEOM_Object GetEdge (in GEOM_Object theShape,
2133                          in GEOM_Object thePoint1,
2134                          in GEOM_Object thePoint2);
2135
2136     /*!
2137      *  Find an edge of the given shape, which has minimal distance to the given point.
2138      *  \param theShape Block or a compound of blocks.
2139      *  \param thePoint Point, close to the desired edge.
2140      *  \return New GEOM_Object, containing the found edge.
2141      */
2142     GEOM_Object GetEdgeNearPoint (in GEOM_Object theShape,
2143                                   in GEOM_Object thePoint);
2144
2145     /*!
2146      *  Returns a face, found in the given shape by four given corner vertices.
2147      *  \param theShape Block or a compound of blocks.
2148      *  \param thePoint1-thePoint4 Points, close to the corners of the desired face.
2149      *  \return New GEOM_Object, containing the found face.
2150      */
2151     GEOM_Object GetFaceByPoints (in GEOM_Object theShape,
2152                                  in GEOM_Object thePoint1,
2153                                  in GEOM_Object thePoint2,
2154                                  in GEOM_Object thePoint3,
2155                                  in GEOM_Object thePoint4);
2156
2157     /*!
2158      *  Get a face of block, found in the given shape by two given edges.
2159      *  \param theShape Block or a compound of blocks.
2160      *  \param theEdge1,theEdge2 Edges, close to the edges of the desired face.
2161      *  \return New GEOM_Object, containing the found face.
2162      */
2163     GEOM_Object GetFaceByEdges (in GEOM_Object theShape,
2164                                 in GEOM_Object theEdge1,
2165                                 in GEOM_Object theEdge2);
2166
2167     /*!
2168      *  Find a face, opposite to the given one in the given block.
2169      *  \param theBlock Must be a hexahedral solid.
2170      *  \param theFace Face of \a theBlock, opposite to the desired face.
2171      *  \return New GEOM_Object, containing the found face.
2172      */
2173     GEOM_Object GetOppositeFace (in GEOM_Object theBlock,
2174                                  in GEOM_Object theFace);
2175
2176     /*!
2177      *  Find a face of the given shape, which has minimal distance to the given point.
2178      *  \param theShape Block or a compound of blocks.
2179      *  \param thePoint Point, close to the desired face.
2180      *  \return New GEOM_Object, containing the found face.
2181      */
2182     GEOM_Object GetFaceNearPoint (in GEOM_Object theShape,
2183                                   in GEOM_Object thePoint);
2184
2185     /*!
2186      *  Find a face of block, whose outside normale has minimal angle with the given vector.
2187      *  \param theShape Block or a compound of blocks.
2188      *  \param theVector Vector, close to the normale of the desired face.
2189      *  \return New GEOM_Object, containing the found face.
2190      */
2191     GEOM_Object GetFaceByNormale (in GEOM_Object theBlock,
2192                                   in GEOM_Object theVector);
2193
2194     /*!
2195      *  Find all subshapes of type \a theShapeType of the given shape,
2196      *  which have minimal distance to the given point.
2197      *  \param theShape Any shape.
2198      *  \param thePoint Point, close to the desired shape.
2199      *  \param theShapeType Defines what kind of subshapes is searched.
2200      *  \param theTolerance The tolerance for distances comparison. All shapes
2201      *                      with distances to the given point in interval
2202      *                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
2203      *  \return New GEOM_Object, containing a group of all found shapes.
2204      */
2205     GEOM_Object GetShapesNearPoint (in GEOM_Object theShape,
2206                                     in GEOM_Object thePoint,
2207                                     in long        theShapeType,
2208                                     in double      theTolerance);
2209
2210     /*!
2211      *  Extract blocks from blocks compounds
2212      */
2213
2214     /*!
2215      *  Check, if the compound contains only specified blocks.
2216      *  \param theCompound The compound to check.
2217      *  \param theMinNbFaces If solid has lower number of faces, it is not a block.
2218      *  \param theMaxNbFaces If solid has higher number of faces, it is not a block.
2219      *    \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
2220      *  \return TRUE, if the given compound contains only blocks.
2221      *  \return theNbBlocks Number of specified blocks in theCompound.
2222      */
2223     boolean IsCompoundOfBlocks (in GEOM_Object theCompound,
2224                                 in long        theMinNbFaces,
2225                                 in long        theMaxNbFaces,
2226                                 out long       theNbBlocks);
2227
2228     /*!
2229      *  Enumeration of Blocks Compound defects.
2230      */
2231     enum BCErrorType
2232     {
2233       /* Each element of the compound should be a Block */
2234       NOT_BLOCK,
2235
2236       /* An element is a potential block, but has degenerated and/or seam edge(s). */
2237       EXTRA_EDGE,
2238
2239       /* A connection between two Blocks should be an entire face or an entire edge */
2240       INVALID_CONNECTION,
2241
2242       /* The compound should be connexe */
2243       NOT_CONNECTED,
2244
2245       /* The glue between two quadrangle faces should be applied */
2246       NOT_GLUED
2247     };
2248
2249     /*!
2250      *  Description of Blocks Compound defect: type and incriminated sub-shapes.
2251      */
2252     struct BCError
2253     {
2254       BCErrorType error;
2255       ListOfLong  incriminated;
2256     };
2257
2258     /*!
2259      *  Sequence of all Blocks Compound defects.
2260      */
2261     typedef sequence<BCError> BCErrors;
2262
2263     /*!
2264      *  Check, if the compound of blocks is given.
2265      *  To be considered as a compound of blocks, the
2266      *  given shape must satisfy the following conditions:
2267      *  - Each element of the compound should be a Block (6 faces and 12 edges).
2268      *  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
2269      *  - The compound should be connexe.
2270      *  - The glue between two quadrangle faces should be applied.
2271      *    \note Single block is also accepted as a valid compound of blocks.
2272      *  \param theCompound The compound to check.
2273      *  \return TRUE, if the given shape is a compound of blocks.
2274      *  \return theErrors Structure, containing discovered errors and incriminated sub-shapes.
2275      */
2276     boolean CheckCompoundOfBlocks (in GEOM_Object theCompound,
2277                                    out BCErrors   theErrors);
2278
2279     /*!
2280      *  Convert sequence of Blocks Compound errors, returned by
2281      *  <VAR>CheckCompoundOfBlocks()</VAR>, into string.
2282      *  \param theCompound The bad compound.
2283      *  \param theErrors The sequence of \a theCompound errors.
2284      *  \return String, describing all the errors in form, suitable for printing.
2285      */
2286     string PrintBCErrors (in GEOM_Object theCompound,
2287                           in BCErrors    theErrors);
2288
2289     /*!
2290      *  Remove all seam and degenerated edges from \a theShape.
2291      *  Unite faces and edges, sharing one surface.
2292      *  \param theShape The compound or single solid to remove irregular edges from.
2293      *  \param theOptimumNbFaces If more than zero, unite faces only for those solids,
2294      *         that have more than theOptimumNbFaces faces. If zero, unite faces always,
2295      *         regardsless their quantity in the solid. If negative, do not unite faces at all.
2296      *         For blocks repairing recommended value is 6.
2297      *  \return Improved shape.
2298      */
2299     GEOM_Object RemoveExtraEdges (in GEOM_Object theShape,
2300                                   in long        theOptimumNbFaces);
2301
2302     /*!
2303      *  Check, if the given shape is a blocks compound.
2304      *  Fix all detected errors.
2305      *    \note Single block can be also fixed by this method.
2306      *  \param theCompound The compound to check and improve.
2307      *  \return Improved compound.
2308      */
2309     GEOM_Object CheckAndImprove (in GEOM_Object theCompound);
2310
2311     /*!
2312      *  Get all the blocks, contained in the given compound.
2313      *  \param theCompound The compound to explode.
2314      *  \param theMinNbFaces If solid has lower number of faces, it is not a block.
2315      *  \param theMaxNbFaces If solid has higher number of faces, it is not a block.
2316      *    \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
2317      *  \return List of GEOM_Objects, containing the retrieved blocks.
2318      */
2319     ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound,
2320                                       in long        theMinNbFaces,
2321                                       in long        theMaxNbFaces);
2322
2323     /*!
2324      *  Find block, containing the given point inside its volume or on boundary.
2325      *  \param theCompound Compound, to find block in.
2326      *  \param thePoint Point, close to the desired block. If the point lays on
2327      *         boundary between some blocks, we return block with nearest center.
2328      *  \return New GEOM_Object, containing the found block.
2329      */
2330     GEOM_Object GetBlockNearPoint (in GEOM_Object theCompound,
2331                                    in GEOM_Object thePoint);
2332
2333     /*!
2334      *  Find block, containing all the elements, passed as the parts, or maximum quantity of them.
2335      *  \param theCompound Compound, to find block in.
2336      *  \param theParts List of faces and/or edges and/or vertices to be parts of the found block.
2337      *  \return New GEOM_Object, containing the found block.
2338      */
2339     GEOM_Object GetBlockByParts (in GEOM_Object theCompound,
2340                                  in ListOfGO    theParts);
2341
2342     /*!
2343      *  Return all blocks, containing all the elements, passed as the parts.
2344      *  \param theCompound Compound, to find blocks in.
2345      *  \param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
2346      *  \return List of GEOM_Objects, containing the found blocks.
2347      */
2348     ListOfGO GetBlocksByParts (in GEOM_Object theCompound,
2349                                in ListOfGO    theParts);
2350
2351     /*!
2352      *  Operations on blocks with gluing of result
2353      */
2354
2355     /*!
2356      *  Multi-transformate block and glue the result.
2357      *  Transformation is defined so, as to superpose theDirFace1 with theDirFace2.
2358      *  \param theBlock Hexahedral solid to be multi-transformed.
2359      *  \param theDirFace1 First direction face global index.
2360      *  \param theDirFace2 Second direction face global index.
2361      *  \param theNbTimes Quantity of transformations to be done.
2362      *    \note Global index of sub-shape can be obtained, using method
2363      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2364      *  \return New GEOM_Object, containing the result shape.
2365      */
2366     GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock,
2367                                            in long        theDirFace1,
2368                                            in long        theDirFace2,
2369                                            in long        theNbTimes);
2370
2371     /*!
2372      *  Multi-transformate block and glue the result.
2373      *  \param theBlock Hexahedral solid to be multi-transformed.
2374      *  \param theDirFace1U,theDirFace2U Direction faces for the first transformation.
2375      *  \param theDirFace1V,theDirFace2V Direction faces for the second transformation.
2376      *  \param theNbTimesU,theNbTimesV Quantity of transformations to be done.
2377      *  \return New GEOM_Object, containing the result shape.
2378      */
2379     GEOM_Object MakeMultiTransformation2D (in GEOM_Object theBlock,
2380                                            in long        theDirFace1U,
2381                                            in long        theDirFace2U,
2382                                            in long        theNbTimesU,
2383                                            in long        theDirFace1V,
2384                                            in long        theDirFace2V,
2385                                            in long        theNbTimesV);
2386
2387     /*!
2388      *  Special operation - propagation
2389      */
2390
2391     /*!
2392      *  Build all possible propagation groups.
2393      *  Propagation group is a set of all edges, opposite to one (main)
2394      *  edge of this group directly or through other opposite edges.
2395      *  Notion of Opposite Edge make sence only on quadrangle face.
2396      *  \param theShape Shape to build propagation groups on.
2397      *  \return List of GEOM_Objects, each of them is a propagation group.
2398      */
2399     ListOfGO Propagate (in GEOM_Object theShape);
2400   };
2401
2402   /*!
2403    *  GEOM_IBooleanOperations: Interface for boolean operations (Cut, Fuse, Common)
2404    */
2405   interface GEOM_IBooleanOperations : GEOM_IOperations
2406   {
2407     /*!
2408      *  Perform one of boolean operations on two given shapes.
2409      *  \param theShape1 First argument for boolean operation.
2410      *  \param theShape2 Second argument for boolean operation.
2411      *  \param theOperation Indicates the operation to be done:
2412      *                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
2413      *  \return New GEOM_Object, containing the result shape.
2414      */
2415     GEOM_Object MakeBoolean (in GEOM_Object theShape1,
2416                              in GEOM_Object theShape2,
2417                              in long theOperation);
2418
2419     /*!
2420      *  Perform partition operation.
2421      *  \param theShapes Shapes to be intersected.
2422      *  \param theTools Shapes to intersect theShapes.
2423      *  \note  Each compound from ListShapes and ListTools will be exploded in order
2424      *         to avoid possible intersection between shapes from this compound.
2425      *  \param theLimit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
2426      *  \param KeepNonlimitShapes: if this parameter == 0, then only shapes of
2427      *                             target type (equal to Limit) are kept in the result,
2428      *                             else standalone shapes of lower dimension
2429      *                             are kept also (if they exist).
2430      *
2431      *  After implementation new version of PartitionAlgo (October 2006)
2432      *  other parameters are ignored by current functionality. They are kept
2433      *  in this function only for supporting old versions.
2434      *  Ignored parameters:
2435      *  \param theKeepInside Shapes, outside which the results will be deleted.
2436      *         Each shape from theKeepInside must belong to theShapes also.
2437      *  \param theRemoveInside Shapes, inside which the results will be deleted.
2438      *         Each shape from theRemoveInside must belong to theShapes also.
2439      *  \param theRemoveWebs If TRUE, perform Glue 3D algorithm.
2440      *  \param theMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
2441      *
2442      *  \return New GEOM_Object, containing the result shapes.
2443      */
2444     GEOM_Object MakePartition (in ListOfGO   theShapes,
2445                                in ListOfGO   theTools,
2446                                in ListOfGO   theKeepInside,
2447                                in ListOfGO   theRemoveInside,
2448                                in short      theLimit,
2449                                in boolean    theRemoveWebs,
2450                                in ListOfLong theMaterials,
2451                                in short      theKeepNonlimitShapes);
2452
2453     /*!
2454      *  Perform partition operation.
2455      *  This method may be usefull if it is needed to make a partition for
2456      *  a compound containing nonintersected shapes. Performance will be better
2457      *  since intersection between shapes from compound is not performed.
2458      *
2459      *  Description of all parameters as in previous method MakePartition()
2460      *
2461      *  \note Passed compounds (via ListShapes or via ListTools)
2462      *        have to consist of nonintersecting shapes.
2463      *
2464      *  \return New GEOM_Object, containing the result shapes.
2465      */
2466     GEOM_Object MakePartitionNonSelfIntersectedShape (in ListOfGO   theShapes,
2467                                                       in ListOfGO   theTools,
2468                                                       in ListOfGO   theKeepInside,
2469                                                       in ListOfGO   theRemoveInside,
2470                                                       in short      theLimit,
2471                                                       in boolean    theRemoveWebs,
2472                                                       in ListOfLong theMaterials,
2473                                                       in short      theKeepNonlimitShapes);
2474
2475     /*!
2476      *  Perform partition of the Shape with the Plane
2477      *  \param theShape Shape to be intersected.
2478      *  \param thePlane Tool shape, to intersect theShape.
2479      *  \return New GEOM_Object, containing the result shape.
2480      */
2481     GEOM_Object MakeHalfPartition (in GEOM_Object theShape,
2482                                    in GEOM_Object thePlane);
2483   };
2484
2485   /*!
2486    *  GEOM_ICurvesOperations: Interface for curves creation.
2487    *  Polyline, Circle, Spline (Bezier and Interpolation)
2488    */
2489   interface GEOM_ICurvesOperations : GEOM_IOperations
2490   {
2491     /*!
2492      *  Create a circle with given center, normal vector and radius.
2493      *  \param thePnt Circle center.
2494      *  \param theVec Vector, normal to the plane of the circle.
2495      *  \param theR Circle radius.
2496      *  \return New GEOM_Object, containing the created circle.
2497      */
2498     GEOM_Object MakeCirclePntVecR (in GEOM_Object thePnt,
2499                                    in GEOM_Object theVec,
2500                                    in double theR);
2501     /*!
2502      *  Create a circle, passing through three given points
2503      *  \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2504      *  \return New GEOM_Object, containing the created circle.
2505      */
2506     GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1,
2507                                     in GEOM_Object thePnt2,
2508                                     in GEOM_Object thePnt3);
2509     /*!
2510      *  Create a circle with given center, with a radius equals the distance from center to Point1
2511      *  and on a plane defined by all of three points.
2512      *  \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2513      *  \return New GEOM_Object, containing the created circle.
2514      */
2515     GEOM_Object MakeCircleCenter2Pnt (in GEOM_Object thePnt1,
2516                                       in GEOM_Object thePnt2,
2517                                       in GEOM_Object thePnt3);
2518     /*!
2519      *  Create an ellipse with given center, normal vector and radiuses.
2520      *  \param thePnt Ellipse center.
2521      *  \param theVec Vector, normal to the plane of the ellipse.
2522      *  \param theRMajor Major ellipse radius.
2523      *  \param theRMinor Minor ellipse radius.
2524      *  \return New GEOM_Object, containing the created ellipse.
2525      */
2526     GEOM_Object MakeEllipse (in GEOM_Object thePnt,
2527                              in GEOM_Object theVec,
2528                              in double theRMajor,
2529                              in double theRMinor);
2530
2531     /*!
2532      *  Create an ellipse with given center, normal vector, main axis vector and radiuses.
2533      *  \param thePnt Ellipse center.
2534      *  \param theVec Vector, normal to the plane of the ellipse.
2535      *  \param theRMajor Major ellipse radius.
2536      *  \param theRMinor Minor ellipse radius.
2537      *  \param theVecMaj Vector, direction of the ellipse's main axis.
2538      *  \return New GEOM_Object, containing the created ellipse.
2539      */
2540     GEOM_Object MakeEllipseVec (in GEOM_Object thePnt,
2541                                 in GEOM_Object theVec,
2542                                 in double theRMajor,
2543                                 in double theRMinor,
2544                                 in GEOM_Object theVecMaj);
2545
2546     /*!
2547      *  Create an arc of circle, passing through three given points.
2548      *  \param thePnt1 Start point of the arc.
2549      *  \param thePnt2 Middle point of the arc.
2550      *  \param thePnt3 End point of the arc.
2551      *  \return New GEOM_Object, containing the created arc.
2552      */
2553     GEOM_Object MakeArc (in GEOM_Object thePnt1,
2554                          in GEOM_Object thePnt2,
2555                          in GEOM_Object thePnt3);
2556
2557     /*!
2558      *  Create an arc of circle of center C from one point to another
2559      *  \param theCenter Center point of the arc.
2560      *  \param thePnt1 Start point of the arc.
2561      *  \param thePnt2 End point of the arc.
2562      *  \param theSense Orientation of the arc
2563      *  \return New GEOM_Object, containing the created arc.
2564      */
2565     GEOM_Object MakeArcCenter (in GEOM_Object theCenter,
2566                                in GEOM_Object thePnt1,
2567                                in GEOM_Object thePnt2,
2568                                in boolean theSense);
2569
2570     /*!
2571      *  Create an arc of ellipse of center C and two points P1 P2.
2572      *  \param theCenter Center point of the arc.
2573      *  \param thePnt1 Major radius is distance from center to Pnt1.
2574      *  \param thePnt2 define a plane and Minor radius as a shortest
2575      *                 distance from Pnt2 to vector Center->Pnt1.
2576      *  \return New GEOM_Object, containing the created arc.
2577      */
2578     GEOM_Object MakeArcOfEllipse (in GEOM_Object theCenter,
2579                                   in GEOM_Object thePnt1,
2580                                   in GEOM_Object thePnt2);
2581
2582
2583     /*!
2584      *  Create a polyline on the set of points.
2585      *  \param thePoints Sequence of points for the polyline.
2586      *  \param theIsClosed If TRUE, build a closed wire.
2587      *  \return New GEOM_Object, containing the created polyline.
2588      */
2589     GEOM_Object MakePolyline (in ListOfGO thePoints,
2590                               in boolean  theIsClosed);
2591
2592     /*!
2593      *  Create bezier curve on the set of points.
2594      *  \param thePoints Sequence of points for the bezier curve.
2595      *  \param theIsClosed If TRUE, build a closed curve.
2596      *  \return New GEOM_Object, containing the created bezier curve.
2597      */
2598     GEOM_Object MakeSplineBezier (in ListOfGO thePoints,
2599                                   in boolean  theIsClosed);
2600
2601     /*!
2602      *  Create B-Spline curve on the set of points.
2603      *  \param thePoints Sequence of points for the B-Spline curve.
2604      *  \param theIsClosed If TRUE, build a closed curve.
2605      *  \param theDoReordering If TRUE, the algo does not follow the order of
2606      *                         \a thePoints but searches for the closest vertex.
2607      *  \return New GEOM_Object, containing the created B-Spline curve.
2608      */
2609     GEOM_Object MakeSplineInterpolation (in ListOfGO thePoints,
2610                                          in boolean  theIsClosed,
2611                                          in boolean  theDoReordering);
2612
2613     /*!
2614      *  Creates a curve using the parametric definition of the basic points.
2615      *  \param thexExpr parametric equation of the coordinates X.
2616      *  \param theyExpr parametric equation of the coordinates Y.
2617      *  \param thezExpr parametric equation of the coordinates Z.
2618      *  \param theParamMin the minimal value of the parameter.
2619      *  \param theParamMax the maximum value of the parameter.
2620      *  \param theParamStep the step of the parameter.
2621      *  \param theCurveType the type of the curve.
2622      *  \return New GEOM_Object, containing the created curve.
2623      */    
2624     GEOM_Object MakeCurveParametric(in string thexExpr,
2625                                     in string theyExpr,
2626                                     in string thezExpr,
2627                                     in double theParamMin,
2628                                     in double theParamMax,
2629                                     in double theParamStep,
2630                                     in curve_type theCurveType);
2631
2632     /*!
2633      *  Create a sketcher (wire or face), following the textual description,
2634      *  passed through \a theCommand argument. \n
2635      *  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2636      *  Format of the description string have to be the following:
2637      *
2638      *  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2639      *
2640      *  Where:
2641      *  - x1, y1 are coordinates of the first sketcher point (zero by default),
2642      *  - CMD is one of
2643      *     - "R angle" : Set the direction by angle
2644      *     - "D dx dy" : Set the direction by DX & DY
2645      *     .
2646      *       \n
2647      *     - "TT x y" : Create segment by point at X & Y
2648      *     - "T dx dy" : Create segment by point with DX & DY
2649      *     - "L length" : Create segment by direction & Length
2650      *     - "IX x" : Create segment by direction & Intersect. X
2651      *     - "IY y" : Create segment by direction & Intersect. Y
2652      *     .
2653      *       \n
2654      *     - "C radius length" : Create arc by direction, radius and length(in degree)
2655      *     .
2656      *       \n
2657      *     - "WW" : Close Wire (to finish)
2658      *     - "WF" : Close Wire and build face (to finish)
2659      *
2660      *  \param theCommand String, defining the sketcher in local
2661      *                    coordinates of the working plane.
2662      *  \param theWorkingPlane Nine double values, defining origin,
2663      *                         OZ and OX directions of the working plane.
2664      *  \return New GEOM_Object, containing the created wire.
2665      */
2666     GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane);
2667
2668     /*!
2669      *  Create a 3D sketcher, following the numerical description,
2670      *  passed through points created by \a theCoordinates argument. \n
2671      *  Format of the description string have to be the following:
2672      *
2673      *  "Make3DSketcher[x1, y1, z1, x2, y2, z2, ..., xN, yN, zN]"
2674      */
2675
2676     GEOM_Object Make3DSketcher (in ListOfDouble theCoordinates);
2677
2678       /*!
2679      *  Create a sketcher (wire or face), following the textual description,
2680      *  passed through \a theCommand argument. \n
2681      *  For format of the description string see the previous method.\n
2682      *  \param theCommand String, defining the sketcher in local
2683      *                    coordinates of the working plane.
2684      *  \param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2685      *  \return New GEOM_Object, containing the created wire.
2686      */
2687     GEOM_Object MakeSketcherOnPlane (in string theCommand, in GEOM_Object theWorkingPlane);
2688   };
2689
2690   /*!
2691    *  GEOM_ILocalOperations: Interface for fillet and chamfer creation.
2692    */
2693   interface GEOM_ILocalOperations : GEOM_IOperations
2694   {
2695     /*!
2696      *  Perform a fillet on all edges of the given shape.
2697      *  \param theShape Shape, to perform fillet on.
2698      *  \param theR Fillet radius.
2699      *  \return New GEOM_Object, containing the result shape.
2700      */
2701     GEOM_Object MakeFilletAll (in GEOM_Object theShape,
2702                                in double      theR);
2703
2704     /*!
2705      *  Perform a fillet on the specified edges of the given shape
2706      *  \param theShape Shape, to perform fillet on.
2707      *  \param theR Fillet radius.
2708      *  \param theEdges Global indices of edges to perform fillet on.
2709      *    \note Global index of sub-shape can be obtained, using method
2710      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2711      *  \return New GEOM_Object, containing the result shape.
2712      */
2713     GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
2714                                  in double      theR,
2715                                  in ListOfLong  theEdges);
2716     GEOM_Object MakeFilletEdgesR1R2 (in GEOM_Object theShape,
2717                                      in double      theR1,
2718                                      in double      theR2,
2719                                      in ListOfLong  theEdges);
2720
2721     /*!
2722      *  Perform a fillet on all edges of the specified faces of the given shape.
2723      *  \param theShape Shape, to perform fillet on.
2724      *  \param theR Fillet radius.
2725      *  \param theFaces Global indices of faces to perform fillet on.
2726      *    \note Global index of sub-shape can be obtained, using method
2727      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2728      *  \return New GEOM_Object, containing the result shape.
2729      */
2730     GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
2731                                  in double      theR,
2732                                  in ListOfLong  theFaces);
2733
2734     GEOM_Object MakeFilletFacesR1R2 (in GEOM_Object theShape,
2735                                      in double      theR1,
2736                                      in double      theR2,
2737                                      in ListOfLong  theFaces);
2738
2739     /*!
2740      *  Perform a fillet on face of the specified vertexes of the given shape.
2741      *  \param theShape Shape, to perform fillet on.
2742      *  \param theR Fillet radius.
2743      *  \param theVertexes Global indices of vertexes to perform fillet on.
2744      *    \note Global index of sub-shape can be obtained, using method
2745      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2746      *  \return New GEOM_Object, containing the result shape.
2747      */
2748     GEOM_Object MakeFillet2D (in GEOM_Object theShape,
2749                               in double      theR,
2750                               in ListOfLong  theVertexes);
2751
2752     /*!
2753      *  Perform a fillet on edges of the specified vertexes of the given wire.
2754      *  \param theShape Shape, to perform fillet on.
2755      *  \param theR Fillet radius.
2756      *  \param theVertexes Global indices of vertexes to perform fillet on.
2757      *    \note Global index of sub-shape can be obtained, using method
2758      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2759      *    \note The list of vertices coudl be empty, in this case fillet fill be done
2760      *          at all vertices in given wire
2761      *  \return New GEOM_Object, containing the result shape.
2762      */
2763     GEOM_Object MakeFillet1D (in GEOM_Object theShape,
2764                               in double      theR,
2765                               in ListOfLong  theVertexes);
2766
2767     /*!
2768      *  Perform a symmetric chamfer on all edges of the given shape.
2769      *  \param theShape Shape, to perform chamfer on.
2770      *  \param theD Chamfer size along each face.
2771      *  \return New GEOM_Object, containing the result shape.
2772      */
2773     GEOM_Object MakeChamferAll (in GEOM_Object theShape,
2774                                 in double      theD);
2775
2776     /*!
2777      *  Perform a chamfer on edges, common to the specified faces.
2778      *  with distance D1 on the Face1
2779      *  \param theShape Shape, to perform chamfer on.
2780      *  \param theD1 Chamfer size along \a theFace1.
2781      *  \param theD2 Chamfer size along \a theFace2.
2782      *  \param theFace1,theFace2 Global indices of two faces of \a theShape.
2783      *    \note Global index of sub-shape can be obtained, using method
2784      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2785      *  \return New GEOM_Object, containing the result shape.
2786      */
2787     GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
2788                                  in double theD1, in double theD2,
2789                                  in long theFace1, in long theFace2);
2790     /*!
2791      *  The Same but with params theD = Chamfer Lenght
2792      *  and theAngle = Chamfer Angle (Angle in radians)
2793      */
2794     GEOM_Object MakeChamferEdgeAD (in GEOM_Object theShape,
2795                                    in double theD, in double theAngle,
2796                                    in long theFace1, in long theFace2);
2797
2798     /*!
2799      *  Perform a chamfer on all edges of the specified faces.
2800      *  with distance D1 on the first specified face (if several for one edge)
2801      *  \param theShape Shape, to perform chamfer on.
2802      *  \param theD1 Chamfer size along face from \a theFaces. If both faces,
2803      *               connected to the edge, are in \a theFaces, \a theD1
2804      *               will be get along face, which is nearer to \a theFaces beginning.
2805      *  \param theD2 Chamfer size along another of two faces, connected to the edge.
2806      *  \param theFaces Sequence of global indices of faces of \a theShape.
2807      *    \note Global index of sub-shape can be obtained, using method
2808      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2809      *  \return New GEOM_Object, containing the result shape.
2810      */
2811     GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
2812                                   in double theD1, in double theD2,
2813                                   in ListOfLong theFaces);
2814     /*!
2815      *  The Same but with params theD = Chamfer Lenght
2816      *  and theAngle = Chamfer Angle (Angle in radians)
2817      */
2818     GEOM_Object MakeChamferFacesAD (in GEOM_Object theShape,
2819                                     in double theD, in double theAngle,
2820                                     in ListOfLong theFaces);
2821
2822    /*!
2823     *  Perform a chamfer on edges,
2824     *  with distance D1 on the first specified face (if several for one edge)
2825     *  \param theShape Shape, to perform chamfer on.
2826     *  \param theD1 theD2 Chamfer size
2827     *  \param theEdges Sequence of edges of \a theShape.
2828     *  \return New GEOM_Object, containing the result shape.
2829     */
2830     GEOM_Object MakeChamferEdges (in GEOM_Object theShape,
2831                                   in double theD1, in double theD2,
2832                                   in ListOfLong theEdges);
2833     /*!
2834      *  The Same but with params theD = Chamfer Lenght
2835      *  and theAngle = Chamfer Angle (Angle in radians)
2836      */
2837     GEOM_Object MakeChamferEdgesAD (in GEOM_Object theShape,
2838                                     in double theD, in double theAngle,
2839                                     in ListOfLong theEdges);
2840
2841     /*!
2842      *  Perform an Archimde operation on the given shape with given parameters.
2843      *                    The object presenting the resulting face is returned
2844      *  \param theShape Shape to be put in water.
2845      *  \param theWeight Weight og the shape.
2846      *  \param theWaterDensity Density of the water.
2847      *  \param theMeshDeflection Deflection od the mesh, using to compute the section.
2848      *  \return New GEOM_Object, containing a section of \a theShape
2849      *          by a plane, corresponding to water level.
2850      */
2851     GEOM_Object MakeArchimede (in GEOM_Object theShape,
2852                                in double theWeight,
2853                                in double theWaterDensity,
2854                                in double theMeshDeflection);
2855
2856     /*!
2857      *  Duplicates <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
2858      *  Present here only for compatibility.
2859      */
2860     long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape);
2861   };
2862
2863   /*!
2864    *  GEOM_IHealingOperations: Interface for shape healing operations.
2865    *  Shape Processing, SuppressFaces, etc.
2866    */
2867   interface GEOM_IHealingOperations : GEOM_IOperations
2868   {
2869     /*!
2870      *  Apply a sequence of Shape Healing operators to the given object.
2871      *  \param theShapes Shape to be processed.
2872      *  \param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
2873      *  \param theParameters List of names of parameters
2874      *                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
2875      *  \param theValues List of values of parameters, in the same order
2876      *                    as parameters are listed in \a theParameters list.
2877      *  \return New GEOM_Object, containing processed shape.
2878      */
2879     GEOM_Object ProcessShape (in GEOM_Object theShapes,
2880                               in string_array theOperators,
2881                               in string_array theParameters,
2882                               in string_array theValues);
2883
2884     /*!
2885      *  Get default sequence of operators, their parameters and parameters' values
2886      *  of Shape Process operation. In the current implementation the defaults are
2887      *  read from the file pointed by CSF_ShHealingDefaults environmental variable.
2888      *  \param theOperators Output. Default list of names of operators.
2889      *  \param theParameters Output. Default list of names of parameters.
2890      *  \param theValues Output. List of default values of parameters, in the same order
2891      *                           as parameters are listed in \a theParameters list.
2892      */
2893     void GetShapeProcessParameters (out string_array theOperators,
2894                                     out string_array theParameters,
2895                                     out string_array theValues);
2896     /*!
2897      *  Get parameters and parameters' values for the given Shape Process operation.
2898      *  In the current implementation the defaults are
2899      *  read from the file pointed by CSF_ShHealingDefaults environmental variable.
2900      *  \param theOperator Input. The operator's name.
2901      *  \param theParameters Output. Default list of names of parameters.
2902      *  \param theValues Output. List of default values of parameters, in the same order
2903      *                           as parameters are listed in \a theParameters list.
2904      */
2905     void GetOperatorParameters (in string theOperator,
2906                                 out string_array theParameters,
2907                                 out string_array theValues);
2908
2909     /*!
2910      *  Remove faces from the given object (shape).
2911      *  \param theObject Shape to be processed.
2912      *  \param theFaces Indices of faces to be removed, if EMPTY then the method
2913      *                  removes ALL faces of the given object.
2914      *  \return New GEOM_Object, containing processed shape.
2915      */
2916     GEOM_Object SuppressFaces (in GEOM_Object theObject, in short_array theFaces);
2917
2918     /*!
2919      *  Close an open wire.
2920      *  \param theObject Shape to be processed.
2921      *  \param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
2922      *                  if -1, then theObject itself is a wire.
2923      *  \param isCommonVertex If TRUE : closure by creation of a common vertex,
2924      *                        If FALS : closure by creation of an edge between ends.
2925      *  \return New GEOM_Object, containing processed shape.
2926      */
2927     GEOM_Object CloseContour (in GEOM_Object theObject, in short_array theWires,
2928                               in boolean isCommonVertex);
2929
2930     /*!
2931      *  Remove internal wires and edges from the given object (face).
2932      *  \param theObject Shape to be processed.
2933      *  \param theWires Indices of wires to be removed, if EMPTY then the method
2934      *                  removes ALL internal wires of the given object.
2935      *  \return New GEOM_Object, containing processed shape.
2936      */
2937     GEOM_Object RemoveIntWires (in GEOM_Object theObject, in short_array theWires);
2938
2939     /*!
2940      *  Remove internal closed contours (holes) from the given object.
2941      *  \param theObject Shape to be processed.
2942      *  \param theWires Indices of wires to be removed, if EMPTY then the method
2943      *                  removes ALL internal holes of the given object
2944      *  \return New GEOM_Object, containing processed shape.
2945      */
2946     GEOM_Object FillHoles (in GEOM_Object theObject, in short_array theWires);
2947
2948     /*!
2949      *  Sewing of the given object.
2950      *  \param theObject Shape to be processed.
2951      *  \param theTolerance Required tolerance value.
2952      *  \return New GEOM_Object, containing processed shape.
2953      */
2954     GEOM_Object Sew (in GEOM_Object theObject, in double theTolerance);
2955
2956     /*!
2957      *  Addition of a point to a given edge object.
2958      *  \param theObject Shape to be processed.
2959      *  \param theEdgeIndex Index of edge to be divided within theObject's shape,
2960      *                      if -1, then theObject itself is the edge.
2961      *  \param theValue Value of parameter on edge or length parameter,
2962      *                  depending on \a isByParameter.
2963      *  \param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1],
2964      *                       if FALSE : \a theValue is treated as a length parameter [0..1]
2965      *  \return New GEOM_Object, containing processed shape.
2966      */
2967     GEOM_Object DivideEdge (in GEOM_Object theObject, in short theEdgeIndex,
2968                             in double theValue, in boolean isByParameter);
2969
2970     /*!
2971      *  Get a list of wires (wrapped in GEOM_Object-s),
2972      *  that constitute a free boundary of the given shape.
2973      *  \param theObject Shape to get free boundary of.
2974      *  \param theClosedWires Output. Closed wires on the free boundary of the given shape.
2975      *  \param theOpenWires Output. Open wires on the free boundary of the given shape.
2976      *  \return FALSE, if an error(s) occured during the method execution.
2977      */
2978     boolean GetFreeBoundary (in GEOM_Object theObject,
2979                              out ListOfGO theClosedWires,
2980                              out ListOfGO theOpenWires);
2981
2982     /*!
2983      *  Change orientation of the given object.
2984      *  \param theObject Shape to be processed.
2985      *  \return New GEOM_Object, containing processed shape.
2986      */
2987     GEOM_Object ChangeOrientation (in GEOM_Object theObject);
2988     GEOM_Object ChangeOrientationCopy (in GEOM_Object theObject);
2989
2990     /*!
2991      *  Try to limit tolerance of the given object by value \a theTolerance.
2992      *  \param theObject Shape to be processed.
2993      *  \param theTolerance Required tolerance value.
2994      *  \return New GEOM_Object, containing processed shape.
2995      */
2996     GEOM_Object LimitTolerance (in GEOM_Object theObject, in double theTolerance);
2997
2998   };
2999
3000   /*!
3001    *  GEOM_IInsertOperations: Interface for shape insert operations (like copy, import).
3002    *
3003    */
3004   interface GEOM_IInsertOperations : GEOM_IOperations
3005   {
3006     /*!
3007      *  Create a copy of the given object
3008      */
3009     GEOM_Object MakeCopy (in GEOM_Object theOriginal);
3010
3011     /*!
3012      *  Export the given shape into a file with given name.
3013      *  \param theObject Shape to be stored in the file.
3014      *  \param theFileName Name of the file to store the given shape in.
3015      *  \param theFormatName Specify format for the shape storage.
3016      *         Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
3017      */
3018     void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName);
3019
3020     /*!
3021      *  Import a shape from the BRep or IGES or STEP file
3022      *  (depends on given format) with given name.
3023      *  \param theFileName The file, containing the shape.
3024      *  \param theFormatName Specify format for the file reading.
3025      *         Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
3026      *         If format 'IGES_SCALE' is used instead 'IGES' length unit will be
3027      *         set to 'meter' and result model will be scaled.
3028      *  \return New GEOM_Object, containing the imported shape.
3029      */
3030     GEOM_Object ImportFile (in string theFileName, in string theFormatName);
3031
3032     /*!
3033      *  Get the supported import formats and corresponding patterns for File dialog.
3034      *  \param theFormats Output. List of formats, available for import.
3035      *  \param thePatterns Output. List of file patterns, corresponding to available formats.
3036      *  \return Returns available formats and patterns through the arguments.
3037      */
3038     void ImportTranslators (out string_array theFormats,
3039                             out string_array thePatterns);
3040
3041     /*!
3042      *  Get the supported export formats and corresponding patterns for File dialog.
3043      *  \param theFormats Output. List of formats, available for export.
3044      *  \param thePatterns Output. List of file patterns, corresponding to available formats.
3045      *  \return Returns available formats and patterns through the arguments.
3046      */
3047     void ExportTranslators (out string_array theFormats,
3048                             out string_array thePatterns);
3049
3050     /*!
3051      * Load texture from file
3052      * \param theTextureFile texture file name
3053      * \return unique texture identifier
3054      */
3055     long LoadTexture(in string theTextureFile);
3056
3057     /*!
3058      * Add texture to the study
3059      * \param theWidth texture width in pixels
3060      * \param theHeight texture height in pixels
3061      * \param theTexture texture byte array
3062      * \return unique texture identifier
3063      */
3064     long AddTexture(in long theWidth, in long theHeight, in SALOMEDS::TMPFile theTexture);
3065
3066     /*!
3067      * Get previously loaded texture data
3068      * \param theID texture identifier
3069      * \param theWidth texture width in pixels
3070      * \param theHeight texture height in pixels
3071      * \return texture byte array
3072      */
3073     SALOMEDS::TMPFile GetTexture(in long theID, out long theWidth, out long theHeight);
3074
3075     /*!
3076      * Get list of all avaiable texture IDs
3077      * \return list of all texture IDs avaiable for the current study
3078      */
3079     ListOfLong GetAllTextures();
3080   };
3081
3082   /*!
3083    *  GEOM_IKindOfShape: namespace for shape_kind enumeration.
3084    */
3085   interface GEOM_IKindOfShape
3086   {
3087     enum shape_kind {
3088       NO_SHAPE,
3089       // COMPOSITEs
3090       COMPOUND,
3091       COMPSOLID,
3092       SHELL,
3093       WIRE,
3094       // SOLIDs
3095       SPHERE,       // full sphere
3096       CYLINDER,     // cylinder
3097       BOX,          // box with faces, parallel to global coordinate planes
3098       ROTATED_BOX,  // other box
3099       TORUS,        // full torus
3100       CONE,         // cone
3101       POLYHEDRON,   // solid, bounded by polygons
3102       SOLID,        // other solid
3103       // FACEs
3104       SPHERE2D,     // spherical face (closed)
3105       CYLINDER2D,   // cylindrical face with defined height
3106       TORUS2D,      // toroidal face (closed)
3107       CONE2D,       // conical face with defined height
3108       DISK_CIRCLE,  // planar, bounded by circle
3109       DISK_ELLIPSE, // planar, bounded by ellipse
3110       POLYGON,      // planar, bounded by segments
3111       PLANE,        // infinite planar
3112       PLANAR,       // other planar
3113       FACE,         // other face
3114       // EDGEs
3115       CIRCLE,       // full circle
3116       ARC_CIRCLE,   // arc of circle
3117       ELLIPSE,      // full ellipse
3118       ARC_ELLIPSE,  // arc of ellipse
3119       LINE,         // infinite segment
3120       SEGMENT,      // segment
3121       EDGE,         // other edge
3122       // VERTEX
3123       VERTEX,
3124       // ADVANCED shapes
3125       ADVANCED      // all advanced shapes (temporary implementation)
3126     };
3127   };
3128
3129
3130   /*!
3131    *  GEOM_IMeasureOperations: Interface for measurement (distance, whatis) and
3132    *  properties calculation (like Centre of Mass, Inertia, etc.).
3133    *
3134    */
3135   interface GEOM_IMeasureOperations : GEOM_IOperations
3136   {
3137     /*!
3138      *  Get kind of theShape.
3139      *  \param theShape Shape to get a kind of.
3140      *  \param theIntegers Output. Integer and enumerated shape's parameters
3141      *                     (kind of surface, closed/unclosed, number of edges, etc.)
3142      *  \param theDoubles  Output. Double shape's parameters (coordinates, dimensions, etc.)
3143      *  \note  Concrete meaning of each value, returned via \a theIntegers
3144      *         or \a theDoubles list depends on the kind of the shape.
3145      *  \return Returns a kind of shape in terms of <VAR>GEOM_IKindOfShape.shape_kind</VAR> enumeration.
3146      */
3147     //short KindOfShape (in GEOM_Object   theShape,
3148     GEOM_IKindOfShape::shape_kind KindOfShape (in  GEOM_Object  theShape,
3149                                                out ListOfLong   theIntegers,
3150                                                out ListOfDouble theDoubles);
3151
3152     /*!
3153      *  Get position (LCS) of theShape.
3154      *  \param theShape Shape to calculate position of.
3155      *  \param Ox,Oy,Oz Output. Coordinates of shape's location origin.
3156      *                  Origin of the LCS is situated at the shape's center of mass.
3157      *  \param Zx,Zy,Zz Output. Coordinates of shape's location normal(main) direction.
3158      *  \param Xx,Xy,Xz Output. Coordinates of shape's location X direction.
3159      *                  Axes of the LCS are obtained from shape's location or,
3160      *                  if the shape is a planar face, from position of its plane.
3161      *  \return Returns position of the shape through the last nine arguments.
3162      */
3163     void GetPosition (in GEOM_Object theShape,
3164                       out double Ox, out double Oy, out double Oz,
3165                       out double Zx, out double Zy, out double Zz,
3166                       out double Xx, out double Xy, out double Xz);
3167
3168     /*!
3169      *  Get summarized length of all wires,
3170      *  area of surface and volume of the given shape.
3171      *  \param theShape Shape to define properties of.
3172      *  \param theLength Output. Summarized length of all wires of the given shape.
3173      *  \param theSurfArea Output. Area of surface of the given shape.
3174      *  \param theVolume Output. Volume of the given shape.
3175      *  \return Returns shape properties through the last three arguments.
3176      */
3177     void GetBasicProperties (in GEOM_Object theShape,
3178                              out double theLength,
3179                              out double theSurfArea,
3180                              out double theVolume);
3181
3182     /*!
3183      *  Get a point, situated at the centre of mass of theShape.
3184      *  \param theShape Shape to define centre of mass of.
3185      *  \return New GEOM_Object, containing the created point.
3186      */
3187     GEOM_Object GetCentreOfMass (in GEOM_Object theShape);
3188
3189     /*
3190      *  Get the vertex by index for 1D objects depends the edge/wire orientation
3191      *  \param theShape Shape (wire or edge) to find the vertex on it
3192      *  \param theIndex Index of vertex subshape
3193      *  \return New GEOM_Object, vertex.
3194      */
3195     GEOM_Object GetVertexByIndex( in GEOM_Object theShape, in long index );
3196
3197     /*!
3198      *  Get a vector, representing the normal of theFace.
3199      *  If the face is not planar, theOptionalPoint is obligatory.
3200      *  \param theFace Shape (face) to define the normal of.
3201      *  \param theOptionalPoint Shape (point) to define the normal at.
3202      *                          Can be NULL in case of planar face.
3203      *  \return New GEOM_Object, containing the created normal vector.
3204      */
3205     GEOM_Object GetNormal (in GEOM_Object theFace,
3206                            in GEOM_Object theOptionalPoint);
3207
3208     /*!
3209      *  Get inertia matrix and moments of inertia of theShape.
3210      *  \param theShape Shape to calculate inertia of.
3211      *  \param I(1-3)(1-3) Output. Components of the inertia matrix of the given shape.
3212      *  \param Ix,Iy,Iz Output. Moments of inertia of the given shape.
3213      *  \return Returns inertia through the last twelve arguments.
3214      */
3215     void GetInertia (in GEOM_Object theShape,
3216                      out double I11, out double I12, out double I13,
3217                      out double I21, out double I22, out double I23,
3218                      out double I31, out double I32, out double I33,
3219                      out double Ix , out double Iy , out double Iz);
3220
3221     /*!
3222      *  Get parameters of bounding box of the given shape
3223      *  \param theShape Shape to obtain bounding box of.
3224      *  \param Xmin,Xmax Output. Limits of shape along OX axis.
3225      *  \param Ymin,Ymax Output. Limits of shape along OY axis.
3226      *  \param Zmin,Zmax Output. Limits of shape along OZ axis.
3227      *  \return Returns parameters of bounding box through the last six arguments.
3228      */
3229     void GetBoundingBox (in GEOM_Object theShape,
3230                          out double Xmin, out double Xmax,
3231                          out double Ymin, out double Ymax,
3232                          out double Zmin, out double Zmax);
3233
3234     /*!
3235      *  Get min and max tolerances of sub-shapes of theShape
3236      *  \param theShape Shape, to get tolerances of.
3237      *  \param FaceMin,FaceMax Output. Min and max tolerances of the faces.
3238      *  \param EdgeMin,EdgeMax Output. Min and max tolerances of the edges.
3239      *  \param VertMin,VertMax Output. Min and max tolerances of the vertices.
3240      *  \return Returns shape tolerances through the last six arguments.
3241      */
3242     void GetTolerance (in GEOM_Object theShape,
3243                        out double FaceMin, out double FaceMax,
3244                        out double EdgeMin, out double EdgeMax,
3245                        out double VertMin, out double VertMax);
3246
3247     /*!
3248      *  Check a topology of the given shape.
3249      *  \param theShape Shape to check validity of.
3250      *  \param theDescription Output. Description of problems in the shape, if they are.
3251      *  \return TRUE, if the shape "seems to be valid" from the topological point of view.
3252      */
3253     boolean CheckShape (in GEOM_Object theShape,
3254                         out string     theDescription);
3255
3256     /*!
3257      *  Check a topology and a geometry of the given shape.
3258      *  \param theShape Shape to check validity of.
3259      *  \param theDescription Output. Description of problems in the shape, if they are.
3260      *  \return TRUE, if the shape "seems to be valid".
3261      */
3262     boolean CheckShapeWithGeometry (in GEOM_Object theShape,
3263                                     out string     theDescription);
3264
3265     /*!
3266      *  Check if the given shape can be an argument for MakeSolid operation
3267      *  \param theShape Shape to be described.
3268      *  \return Empty string if a solid can be made on this shape, error code otherwise.
3269      */
3270     string IsGoodForSolid (in GEOM_Object theShape);
3271
3272     /*!
3273      *  Obtain description of the given shape
3274      *  \param theShape Shape to be described.
3275      *  \return Description of the given shape.
3276      */
3277     string WhatIs (in GEOM_Object theShape);
3278
3279     /*!
3280      *  Check if points defined by coords = [x1, y1, z1, x2, y2, z2, ...] are inside or on
3281      *  the shape theShape.
3282      *  \param theShape Shape to check.
3283      *  \param coords list of coordinates.
3284      *  \param tolerance tolerance.
3285      *  \return list of boolean.
3286      */
3287     ListOfBool AreCoordsInside(in GEOM_Object theShape, in ListOfDouble coords, in double tolerance);
3288
3289     /*!
3290      *  Get minimal distance between the given shapes.
3291      *  \param theShape1,theShape2 Shapes to find minimal distance between.
3292      *  \param X1,Y1,Z1 Output. Coordinates of point on theShape1, nearest to theShape2.
3293      *  \param X2,Y2,Z2 Output. Coordinates of point on theShape2, nearest to theShape1.
3294      *  \return Value of the minimal distance between the given shapes.
3295      */
3296     double GetMinDistance (in GEOM_Object theShape1, in GEOM_Object theShape2,
3297                            out double X1, out double Y1, out double Z1,
3298                            out double X2, out double Y2, out double Z2);
3299
3300     /*!
3301      *  Get angle between the given lines or linear edges.
3302      *  \param theShape1,theShape2 Shapes to find angle between. Lines or linear edges.
3303      *  \return Value of the angle between the given shapes.
3304      */
3305     double GetAngle (in GEOM_Object theShape1, in GEOM_Object theShape2);
3306
3307     /*!
3308      *  Get angle between the given vectors.
3309      *  \param theShape1,theShape2 Vectors to find angle between.
3310      *  \return Value of the angle between the given vectors.
3311      */
3312     double GetAngleBtwVectors (in GEOM_Object theShape1, in GEOM_Object theShape2);
3313
3314     /*!
3315      *  Get point coordinates
3316      */
3317     void PointCoordinates (in GEOM_Object theShape, out double X, out double Y, out double Z);
3318
3319     /*!
3320      *  Get radius of curvature of curve in the point determinated by param
3321      *  \param theShape - curve.
3322      *  \param theParam - parameter on curve
3323      *  \return Value of curvature.
3324      */
3325     double CurveCurvatureByParam (in GEOM_Object theShape, in double theParam);
3326
3327     /*!
3328      *  Get radius of curvature of curve in the given point
3329      *  \param theShape - curve.
3330      *  \param thePoint - point
3331      *  \return Value of curvature.
3332      */
3333     double CurveCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
3334
3335     /*!
3336      *  Get max radius of curvature of surface in the point determinated by params
3337      *  \param theShape - surface.
3338      *  \param theUParam - U-parameter on surface
3339      *  \param theVParam - V-parameter on surface
3340      *  \return Value of curvature.
3341      */
3342     double MaxSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
3343                                        in double theVParam);
3344
3345     /*!
3346      *  Get max radius of curvature of surface in the given point
3347      *  \param theShape - surface.
3348      *  \param thePoint - point
3349      *  \return Value of curvature.
3350      */
3351     double MaxSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
3352
3353     /*!
3354      *  Get min radius of curvature of surface in the point determinated by params
3355      *  \param theShape - surface.
3356      *  \param theUParam - U-parameter on surface
3357      *  \param theVParam - V-parameter on surface
3358      *  \return Value of curvature.
3359      */
3360     double MinSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
3361                                        in double theVParam);
3362
3363     /*!
3364      *  Get min radius of curvature of surface in the given point
3365      *  \param theShape - surface.
3366      *  \param thePoint - point
3367      *  \return Value of curvature.
3368      */
3369     double MinSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
3370
3371   };
3372
3373
3374   /*!
3375    *  GEOM_IGroupOperations: Interface for groups creation.
3376    */
3377   interface GEOM_IGroupOperations : GEOM_IOperations
3378   {
3379     /*!
3380      *  Creates a new group which will store  sub shapes of theMainShape
3381      *  \param theMainShape is a GEOM object on which the group is selected
3382      *  \param theShapeType defines a shape type of the group
3383      *  \return a newly created GEOM group
3384      */
3385     GEOM_Object CreateGroup (in GEOM_Object theMainShape, in long theShapeType);
3386
3387     /*!
3388      *  Adds a sub object with ID theSubShapeId to the group
3389      *  \param theGroup is a GEOM group to which the new sub shape is added
3390      *  \param theSubShapeId is a sub shape ID in the main object.
3391      *  \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub shape
3392      */
3393     void AddObject (in GEOM_Object theGroup, in long theSubShapeId);
3394
3395     /*!
3396      *  Removes a sub object with ID \a theSubShapeId from the group
3397      *  \param theGroup is a GEOM group from which the sub shape is removed.
3398      *  \param theSubShapeId is a sub shape ID in the main object.
3399      *  \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub shape
3400      */
3401     void RemoveObject (in GEOM_Object theGroup, in long theSubShapeId);
3402
3403     /*!
3404      *  Adds to the group all the given shapes. No errors, if some shapes are alredy included.
3405      *  \param theGroup is a GEOM group to which the new sub shapes are added.
3406      *  \param theSubShapes is a list of sub shapes to be added.
3407      */
3408     void UnionList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
3409
3410     /*!
3411      *  Removes from the group all the given shapes. No errors, if some shapes are not included.
3412      *  \param theGroup is a GEOM group from which the sub-shapes are removed.
3413      *  \param theSubShapes is a list of sub-shapes to be removed.
3414      */
3415     void DifferenceList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
3416
3417     /*!
3418      *  Adds to the group all the given shapes. No errors, if some shapes are alredy included.
3419      *  \param theGroup is a GEOM group to which the new sub shapes are added.
3420      *  \param theSubShapes is a list of IDs of sub shapes to be added.
3421      */
3422     void UnionIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
3423
3424     /*!
3425      *  Removes from the group all the given shapes. No errors, if some shapes are not included.
3426      *  \param theGroup is a GEOM group from which the sub-shapes are removed.
3427      *  \param theSubShapes is a list of IDs of sub-shapes to be removed.
3428      */
3429     void DifferenceIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
3430
3431     /*!
3432      *  Returns a type of sub objects stored in the group
3433      *  \param theGroup is a GEOM group which type is returned.
3434      */
3435     long GetType (in GEOM_Object theGroup);
3436
3437     /*!
3438      *  Returns a main shape associated with the group
3439      *  \param theGroup is a GEOM group for which a main shape object is requested
3440      *  \return a GEOM object which is a main shape for theGroup
3441      */
3442     GEOM_Object GetMainShape (in GEOM_Object theGroup);
3443
3444     /*!
3445      *  Returns a list of sub objects ID stored in the group
3446      *  \param theGroup is a GEOM group for which a list of IDs is requested
3447      */
3448     ListOfLong GetObjects (in GEOM_Object theGroup);
3449   };
3450
3451
3452   /*!
3453    *  GEOM_IAdvancedOperations: Interface for advanced modeling functions.
3454    */
3455   interface GEOM_IAdvancedOperations : GEOM_IOperations
3456   {
3457     /*!
3458      *  Create a T-shape object with specified caracteristics for the main and
3459      *  the incident pipes (radius, width, half-length).
3460      *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
3461      *  \param theR1 Internal radius of main pipe
3462      *  \param theW1 Width of main pipe
3463      *  \param theL1 Half-length of main pipe
3464      *  \param theR2 Internal radius of incident pipe (R2 < R1)
3465      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
3466      *  \param theL2 Half-length of incident pipe
3467      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
3468      *  \return List of GEOM_Objects, containing the created shape and propagation groups.
3469      */
3470     ListOfGO MakePipeTShape (in double theR1, in double theW1, in double theL1,
3471                              in double theR2, in double theW2, in double theL2,
3472                              in boolean theHexMesh);
3473     /*!
3474      *  Create a T-shape object with specified caracteristics for the main and
3475      *  the incident pipes (radius, width, half-length).
3476      *  The extremities of the main pipe are located on junctions points P1 and P2.
3477      *  The extremity of the incident pipe is located on junction point P3.
3478      *  \param theR1 Internal radius of main pipe
3479      *  \param theW1 Width of main pipe
3480      *  \param theL1 Half-length of main pipe
3481      *  \param theR2 Internal radius of incident pipe (R2 < R1)
3482      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
3483      *  \param theL2 Half-length of incident pipe
3484      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
3485      *  \param theP1 1st junction point of main pipe
3486      *  \param theP2 2nd junction point of main pipe
3487      *  \param theP3 Junction point of incident pipe
3488      *  \return List of GEOM_Objects, containing the created shape and propagation groups.
3489      */
3490     ListOfGO MakePipeTShapeWithPosition (in double theR1, in double theW1, in double theL1,
3491                                          in double theR2, in double theW2, in double theL2,
3492                                          in boolean theHexMesh,
3493                                          in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
3494     /*!
3495      *  Create a T-shape object with specified caracteristics for the main and
3496      *  the incident pipes (radius, width, half-length). A chamfer is created
3497      *  on the junction of the pipes.
3498      *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
3499      *  \param theR1 Internal radius of main pipe
3500      *  \param theW1 Width of main pipe
3501      *  \param theL1 Half-length of main pipe
3502      *  \param theR2 Internal radius of incident pipe (R2 < R1)
3503      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
3504      *  \param theL2 Half-length of incident pipe
3505      *  \param theH Height of the chamfer.
3506      *  \param theW Width of the chamfer.
3507      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
3508      *  \return List of GEOM_Objects, containing the created shape and propagation groups.
3509      */
3510     ListOfGO MakePipeTShapeChamfer (in double theR1, in double theW1, in double theL1,
3511                                     in double theR2, in double theW2, in double theL2,
3512                                     in double theH, in double theW, in boolean theHexMesh);
3513     /*!
3514      *  Create a T-shape object with specified caracteristics for the main and
3515      *  the incident pipes (radius, width, half-length). A chamfer is created
3516      *  on the junction of the pipes.
3517      *  The extremities of the main pipe are located on junctions points P1 and P2.
3518      *  The extremity of the incident pipe is located on junction point P3.
3519      *  \param theR1 Internal radius of main pipe
3520      *  \param theW1 Width of main pipe
3521      *  \param theL1 Half-length of main pipe
3522      *  \param theR2 Internal radius of incident pipe (R2 < R1)
3523      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
3524      *  \param theL2 Half-length of incident pipe
3525      *  \param theH Height of the chamfer.
3526      *  \param theW Width of the chamfer.
3527      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
3528      *  \param theP1 1st junction point of main pipe
3529      *  \param theP2 2nd junction point of main pipe
3530      *  \param theP3 Junction point of incident pipe
3531      *  \return List of GEOM_Objects, containing the created shape and propagation groups.
3532      */
3533     ListOfGO MakePipeTShapeChamferWithPosition (in double theR1, in double theW1, in double theL1,
3534                                                 in double theR2, in double theW2, in double theL2,
3535                                                 in double theH, in double theW, in boolean theHexMesh,
3536                                                 in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
3537     /*!
3538      *  Create a T-shape object with specified caracteristics for the main and
3539      *  the incident pipes (radius, width, half-length). A fillet is created
3540      *  on the junction of the pipes.
3541      *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
3542      *  \param theR1 Internal radius of main pipe
3543      *  \param theW1 Width of main pipe
3544      *  \param theL1 Half-length of main pipe
3545      *  \param theR2 Internal radius of incident pipe (R2 < R1)
3546      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
3547      *  \param theL2 Half-length of incident pipe
3548      *  \param theRF Radius of curvature of fillet.
3549      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
3550      *  \return List of GEOM_Objects, containing the created shape and propagation groups.
3551      */
3552     ListOfGO MakePipeTShapeFillet (in double theR1, in double theW1, in double theL1,
3553                                    in double theR2, in double theW2, in double theL2,
3554                                    in double theRF, in boolean theHexMesh);
3555     /*!
3556      *  Create a T-shape object with specified caracteristics for the main and
3557      *  the incident pipes (radius, width, half-length). A fillet is created
3558      *  on the junction of the pipes.
3559      *  The extremities of the main pipe are located on junctions points P1 and P2.
3560      *  The extremity of the incident pipe is located on junction point P3.
3561      *  \param theR1 Internal radius of main pipe
3562      *  \param theW1 Width of main pipe
3563      *  \param theL1 Half-length of main pipe
3564      *  \param theR2 Internal radius of incident pipe (R2 < R1)
3565      *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
3566      *  \param theL2 Half-length of incident pipe
3567      *  \param theRF Radius of curvature of fillet.
3568      *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
3569      *  \param theP1 1st junction point of main pipe
3570      *  \param theP2 2nd junction point of main pipe
3571      *  \param theP3 Junction point of incident pipe
3572      *  \return List of GEOM_Objects, containing the created shape and propagation groups.
3573      */
3574     ListOfGO MakePipeTShapeFilletWithPosition (in double theR1, in double theW1, in double theL1,
3575                                                in double theR2, in double theW2, in double theL2,
3576                                                in double theRF, in boolean theHexMesh,
3577                                                in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
3578     /*@@ insert new functions before this line @@ do not remove this line @@*/
3579   };
3580
3581   /*!
3582    *  GEOM_Gen: Interface to access other GEOM interfaces.
3583    *  Also contains some methods to access and manage GEOM objects.
3584    */
3585   interface GEOM_Gen : Engines::EngineComponent,SALOMEDS::Driver
3586   {
3587     /*!
3588      *  Undo/Redo Management
3589      */
3590
3591     void Undo (in long theStudyID);
3592
3593     void Redo (in long theStudyID);
3594
3595     /*!
3596      * Publishing management
3597      * Adds in theStudy a object theObject under with a name theName,
3598      * if theFather is not NULL the object is placed under thFather's SObject.
3599      * Returns a SObject where theObject is placed
3600      */
3601     SALOMEDS::SObject AddInStudy (in SALOMEDS::Study theStudy,
3602                                   in GEOM_Object theObject,
3603                                   in string theName,
3604                                   in GEOM_Object theFather);
3605
3606     /*!
3607      *  Publish sub-shapes, standing for arguments and sub-shapes of arguments
3608      *  To be used from python scripts out of geompy.addToStudy (non-default usage)
3609      *  \param theStudy  the study, in which theObject is published already,
3610      *                   and in which the arguments will be published
3611      *  \param theObject published GEOM object, arguments of which will be published
3612      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
3613      *                   If this list is empty, all operation arguments will be published
3614      *  \param theFindMethod method to search subshapes, corresponding to arguments and
3615      *                       their subshapes. Value from enumeration GEOM::find_shape_method.
3616      *  \param theInheritFirstArg set properties of the first argument for \a theObject.
3617      *                            Do not publish subshapes in place of arguments, but only
3618      *                            in place of subshapes of the first argument,
3619      *                            because the whole shape corresponds to the first argument.
3620      *                            Mainly to be used after transformations, but it also can be
3621      *                            usefull after partition with one object shape, and some other
3622      *                            operations, where only the first argument has to be considered.
3623      *                            If theObject has only one argument shape, this flag is automatically
3624      *                            considered as True, not regarding really passed value.
3625      *  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
3626      *                      and prefix "from_subshapes_of_" to names of partially restored subshapes.
3627      *  \return list of published sub-shapes
3628      */
3629     ListOfGO RestoreSubShapesO (in SALOMEDS::Study   theStudy,
3630                                 in GEOM_Object       theObject,
3631                                 in ListOfGO          theArgs,
3632                                 in find_shape_method theFindMethod,
3633                                 in boolean           theInheritFirstArg,
3634                                 in boolean           theAddPrefix);
3635
3636     /*!
3637      *  Publish sub-shapes, standing for arguments and sub-shapes of arguments
3638      *  To be used from python scripts out of geompy.addToStudy (non-default usage)
3639      *  \param theStudy  the study, in which theObject is published already,
3640      *                   and in which the arguments will be published
3641      *  \param theObject published GEOM object, arguments of which will be published
3642      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
3643      *                   If this list is empty, all operation arguments will be published
3644      *  \param theFindMethod method to search subshapes, corresponding to arguments and
3645      *                       their subshapes. Value from enumeration GEOM::find_shape_method.
3646      *  \param theInheritFirstArg set properties of the first argument for \a theObject.
3647      *                            Do not publish subshapes in place of arguments, but only
3648      *                            in place of subshapes of the first argument,
3649      *                            because the whole shape corresponds to the first argument.
3650      *                            Mainly to be used after transformations, but it also can be
3651      *                            usefull after partition with one object shape, and some other
3652      *                            operations, where only the first argument has to be considered.
3653      *                            If theObject has only one argument shape, this flag is automatically
3654      *                            considered as True, not regarding really passed value.
3655      *  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
3656      *                      and prefix "from_subshapes_of_" to names of partially restored subshapes.
3657      *  \return list of published sub-shapes
3658      */
3659     ListOfGO RestoreGivenSubShapesO (in SALOMEDS::Study   theStudy,
3660                                      in GEOM_Object       theObject,
3661                                      in ListOfGO          theArgs,
3662                                      in find_shape_method theFindMethod,
3663                                      in boolean           theInheritFirstArg,
3664                                      in boolean           theAddPrefix);
3665
3666     /*!
3667      *  Publish sub-shapes, standing for arguments and sub-shapes of arguments
3668      *  To be used from GUI and from geompy.addToStudy.
3669      *  Work like the above method, but accepts study object theSObject instead of GEOM_Object.
3670      *  \param theSObject study object, referencing GEOM object, arguments of which will be published
3671      */
3672     ListOfGO RestoreSubShapesSO (in SALOMEDS::Study   theStudy,
3673                                  in SALOMEDS::SObject theSObject,
3674                                  in ListOfGO          theArgs,
3675                                  in find_shape_method theFindMethod,
3676                                  in boolean           theInheritFirstArg,
3677                                  in boolean           theAddPrefix);
3678
3679     /*!
3680      *  Methods to access interfaces for objects creation and transformation
3681      */
3682     GEOM_IBasicOperations     GetIBasicOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
3683     GEOM_ITransformOperations GetITransformOperations(in long theStudyID) raises (SALOME::SALOME_Exception);
3684     GEOM_I3DPrimOperations    GetI3DPrimOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
3685     GEOM_IShapesOperations    GetIShapesOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
3686     GEOM_IBooleanOperations   GetIBooleanOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
3687     GEOM_ICurvesOperations    GetICurvesOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
3688     GEOM_ILocalOperations     GetILocalOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
3689     GEOM_IHealingOperations   GetIHealingOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
3690     GEOM_IInsertOperations    GetIInsertOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
3691     GEOM_IMeasureOperations   GetIMeasureOperations  (in long theStudyID) raises (SALOME::SALOME_Exception);
3692     GEOM_IBlocksOperations    GetIBlocksOperations   (in long theStudyID) raises (SALOME::SALOME_Exception);
3693     GEOM_IGroupOperations     GetIGroupOperations    (in long theStudyID) raises (SALOME::SALOME_Exception);
3694     GEOM_IAdvancedOperations  GetIAdvancedOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
3695
3696     /*!
3697      *  Objects Management
3698      */
3699
3700     /*!
3701      *  Removes the object from the GEOM component
3702      *  \param theObject is a GEOM object to be removed
3703      */
3704     void RemoveObject (in GEOM_Object theObject);
3705
3706     /*!
3707      *  Returns an object defined by the study and its entry in the GEOM component
3708      *  \param theStudyID is a SALOMEDS Study ID
3709      *  \param theEntry is an entry of the requested GEOM object in the GEOM component
3710      *  \note if the object has not previously been created a NULL GEOM object is returned
3711      */
3712     GEOM_Object GetObject (in long theStudyID, in string theEntry);
3713
3714     /*!
3715      *  Add a sub shape defined by indices in \a theIndices
3716      *  (contains unique IDs of sub shapes inside \a theMainShape)
3717      *  \note The sub shape GEOM_Objects can has ONLY ONE function.
3718      *        Don't try to apply modification operations on them.
3719      *  \note Internal method
3720      */
3721     GEOM_Object AddSubShape (in GEOM_Object theMainShape, in ListOfLong theIndices);
3722
3723     /*!
3724      *  GEOM object's IOR Management
3725      */
3726
3727     /*!
3728      *  Returns a GEOM Object defined by its IOR
3729      *  \param theIOR a string containg an IOR of the requested GEOM object
3730      */
3731     GEOM_Object GetIORFromString (in string theIOR);
3732
3733     /*!
3734      *  Returns a string which contains an IOR of the GEOM object
3735      *  \param theObject is a GEOM object which IOR is requested
3736      */
3737     string GetStringFromIOR (in GEOM_Object theObject);
3738
3739     /*!
3740      *  Returns a name with which a GEOM object was dumped into python script
3741      *  \param theStudyEntry is an entry of the GEOM object in the study
3742      */
3743     string GetDumpName (in string theStudyEntry);
3744
3745     /*!
3746      *  Returns all names with which a GEOM objects was dumped
3747      *  into python script to avoid the same names in SMESH script
3748      */
3749     string_array GetAllDumpNames();
3750
3751     /*!
3752      *  Publishes the named subshapes of given object in the study.
3753      *  \param theStudy    The study in which the object is published
3754      *  \param theObject   The object which named subshapes are published
3755      */
3756     ListOfGO PublishNamedShapesInStudy(in SALOMEDS::Study theStudy,
3757                                        //in SObject theSObject,
3758                                        in Object theObject);
3759   };
3760 };
3761
3762 #endif