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