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