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