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