Salome HOME
864a84c3c5608c7f285dcdc585a9581ea4f9e32d
[modules/geom.git] / idl / GEOM_Gen.idl
1 // Copyright (C) 2007-2023  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  File   : GEOM_Gen.idl
23 //  Author : Sergey RUIN
24
25 #ifndef __GEOM_GEN__
26 #define __GEOM_GEN__
27
28 #include "SALOME_Exception.idl"
29 #include "SALOME_Component.idl"
30 #include "SALOMEDS.idl"
31 #include "SALOMEDS_Attributes.idl"
32
33 #include "SALOME_GenericObj.idl"
34
35 module GEOM
36 {
37   /*!
38    *  \brief Topological types of shapes (like Open Cascade types)
39    */
40   enum shape_type 
41   { 
42     /*! A collection of arbitrary shapes */
43     COMPOUND,
44     /*! A collection of solids */ 
45     COMPSOLID, 
46     /*! A part of 3D space bound by a shell */
47     SOLID, 
48     /*! A collection of faces connected by some edges of their wire boundaries */
49     SHELL,
50     /*! Part of a plane (in 2D geometry) or a surface (in 3D geometry) bounded by a closed wire */
51     FACE, 
52     /*! A sequence of edges connected by their vertices */
53     WIRE, 
54     /*! Edge, a shape corresponding to a curve, and bound by a vertex at each extremity */
55     EDGE, 
56     /*! A zero-dimensional shape corresponding to a point in geometry */
57     VERTEX,
58     /*! Arbitrary shape in a Compound (used for processing of Compounds in some operations) */ 
59     SHAPE,
60     /*! Flat (top-level) contents of a Compound (used for processing of Compounds in some operations) */
61     FLAT
62     };
63
64   /*!
65    * \brief Marker type
66    */
67   enum marker_type { MT_NONE, MT_POINT, MT_PLUS, MT_STAR, MT_X, MT_O, MT_O_POINT, MT_O_PLUS,
68                      MT_O_STAR, MT_O_X, MT_RING1, MT_RING2, MT_RING3, MT_BALL, MT_USER };
69
70   /*!
71    * /brief Marker size
72    */
73   enum marker_size { MS_NONE, MS_10, MS_15, MS_20, MS_25, MS_30, MS_35,
74                      MS_40, MS_45, MS_50, MS_55, MS_60, MS_65, MS_70 };
75
76   /*!
77    *  \brief State of shape relatively geometrical surface like plane, sphere or cylinder.
78    *
79    *  Is used in functions GEOM_IShapesOperations.GetShapesOn<xxx>()
80    */
81   enum shape_state
82   {
83     /*! Shape is on surface */
84     ST_ON,
85
86     /*!
87      *  Shape is in the direction defined by the normal and not on surface.
88      *  For plane it means above the plane,
89      *  For sphere and cylinder it means outside of volume, bounded by the surface.
90      */
91     ST_OUT,
92     
93     /*!
94      *  Shape is in the direction defined by the normal and on surface.
95      *  ONOUT = ON || OUT
96      */
97     ST_ONOUT,
98
99     /*!
100      *  Complementary to ONOUT.
101      *  For plane it means below the plane,
102      *  For sphere and cylinder it means inside the volume, bounded by the surface
103      *  (beyond axis and surface for cylinder and beyond cented and surface for sphere).
104      */
105     ST_IN,
106
107     /*!
108      *  Complementary to OUT.
109      *  ONIN = ON || IN
110      */
111     ST_ONIN
112   };
113
114   /*!
115    *  \brief Kind of method to find inside one main shape some sub-shapes,
116    *  corresponding to other given shape (its argument)
117    *
118    *  Is used in functions GEOM_Gen.RestoreSubShapesO(), GEOM_Gen.RestoreSubShapesSO(),
119    *  TransferNames()
120    */
121   enum find_shape_method
122   {
123     /*! Use GetInPlace functionality. Suits all cases, except transformations */
124     FSM_GetInPlace,
125
126     /*! To be used only for transformation result, to find sub-shapes of argument.
127      *  Only this method can be used after transformation.
128      */
129     FSM_Transformed,
130
131     /*! To find only shared sub-shapes, not modified by the operation */
132     FSM_GetSame,
133
134     /*! Use GetShapesOnShape method (can work only on solids) */
135     FSM_GetShapesOnShape,
136
137     /*! Use GetInPlaceByHistory method (can work only after Partition) */
138     FSM_GetInPlaceByHistory,
139
140     /*! To be used only for multi-transformation result.
141      *  Only this method can be used after multi-transformation.
142      */
143     FSM_MultiTransformed,
144
145     /*! Use old GetInPlace functionality. */
146     FSM_GetInPlace_Old
147   };
148
149   /*!
150    *  \brief Kind of method to perform filling operation
151    *
152    *  Is used in functions GEOM_I3DPrimOperations.MakeFilling()
153    */
154   enum filling_oper_method
155   {
156     /*! Default (standard behaviour) */
157     FOM_Default,
158
159     /*! Use edges orientation  - orientation of edges is used: if the edge is 
160      * reversed, the curve from this edge is reversed before using it in 
161      *  the filling algorithm.
162      */
163     FOM_UseOri,
164
165     /*! Auto-correct edges orientation - changes the orientation of the curves 
166      *  using minimization of sum of distances between the end points of the edges.
167      */
168     FOM_AutoCorrect
169   };
170
171   /*!
172    * \brief Kind of the curves.
173    *
174    * Used in the functions GEOM_ICurvesOperations.MakeCurveParametric(), GEOM_ICurvesOperations.MakeCurveParametricNew(),
175    * GEOM_ICurvesOperations.MakePolyline2D, GEOM_ICurvesOperations.MakePolyline2DOnPlane.
176    */
177   enum curve_type {
178     /*! Polyline curve */
179     Polyline,
180     
181     /*! Bezier curve */
182     Bezier,
183
184     /*! Interpolation, curve */
185     Interpolation
186   };
187
188  /*!
189    * \brief Type of field data
190    */
191   enum field_data_type {
192     FDT_Bool,
193     FDT_Int,
194     FDT_Double,
195     FDT_String
196   };
197
198   /**
199    * This enumeration represents the level of checking shape on
200    * self-interference. It defines which interferferences will be checked.
201    */
202   enum si_check_level
203   {
204     SI_V_V,     // only V/V interferences
205     SI_V_E,     // V/V and V/E interferences
206     SI_E_E,     // V/V, V/E and E/E interferences
207     SI_V_F,     // V/V, V/E, E/E and V/F interferences
208     SI_E_F,     // V/V, V/E, E/E, V/F and E/F interferences
209     SI_ALL      // all interferences
210   };
211
212   /**
213    * This enumeration represents comparison conditions.
214    */
215   enum comparison_condition
216   {
217     CC_GT, ///< Greater then
218     CC_GE, ///< Greater then or equal to
219     CC_LT, ///< Less then
220     CC_LE  ///< Less then or equal to
221   };
222
223   /*!
224    * \brief Object creation parameters
225    *
226    * Is returned by GEOM_Object::GetCreationInformation()
227    */
228   struct Parameter
229   {
230     string name;
231     string value;
232   };
233   typedef sequence<Parameter> Parameters;
234
235   struct CreationInformation
236   {
237     string     operationName;
238     Parameters params;
239   };
240   typedef sequence<CreationInformation> CreationInformationSeq;
241
242   /*!
243    * \brief Reporting on shape healing
244    */
245   struct ModifInfo
246   {
247     string name;  // what changed
248     long   count; // how many times
249   };
250   typedef sequence<ModifInfo> ModifStatistics;
251
252
253   typedef sequence<string>       string_array;
254   typedef sequence<short>        short_array;
255   typedef sequence<boolean>      ListOfBool;
256   typedef sequence<long>         ListOfLong;
257   typedef sequence<double>       ListOfDouble;
258   typedef sequence<ListOfDouble> ListOfListOfDouble;
259   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 a face from a set of edges with the given constraints.
2071      *  \param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
2072      *         - edges should form a closed wire;
2073      *         - for each edge, constraint face is optional: if a constraint face is missing
2074      *           for some edge, this means that there no constraint associated with this edge.
2075      *  \return New GEOM_Object, containing the created face.
2076      */
2077     GEOM_Object MakeFaceWithConstraints(in ListOfGO theConstraints);
2078
2079     /*!
2080      *  \brief Create a shell from the set of faces and shells.
2081      *  \param theFacesAndShells List of faces and/or shells.
2082      *  \return New GEOM_Object, containing the created shell.
2083      */
2084     GEOM_Object MakeShell (in ListOfGO theFacesAndShells);
2085
2086     /*!
2087      *  \brief Create a solid, bounded by the given shell.
2088      *  \param theShell Bounding shell.
2089      *  \return New GEOM_Object, containing the created solid.
2090      */
2091     GEOM_Object MakeSolidShell (in GEOM_Object theShell);
2092
2093     /*!
2094      *  \brief Create a solid, bounded by the given shells.
2095      *  \param theShells Bounding shells.
2096      *  \return New GEOM_Object, containing the created solid.
2097      */
2098     GEOM_Object MakeSolidShells (in ListOfGO theShells);
2099
2100     /*!
2101      *  \brief Create a compound of the given shapes.
2102      *  \param theShapes List of shapes to put in compound.
2103      *  \return New GEOM_Object, containing the created compound.
2104      */
2105     GEOM_Object MakeCompound (in ListOfGO theShapes);
2106
2107     /*!
2108      *  \brief Make a solid (or solids) from connected set of faces and/or shells.
2109      *  \param theFacesOrShells List of faces and/or shells.
2110      *  \param isIntersect If TRUE, forces performing intersections between arguments.
2111      *
2112      *  \return New GEOM_Object, containing the created solid (or compound of solids).
2113      */
2114     GEOM_Object MakeSolidFromConnectedFaces (in ListOfGO theFacesOrShells, in boolean isIntersect);
2115     
2116     /*!
2117      *  \brief Replace coincident faces in \a theShapes by one face.
2118      *  \param theShapes Initial shapes.
2119      *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
2120      *  \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
2121      *  \return New GEOM_Object containing copies of theShapes without coincident faces.
2122      */
2123     GEOM_Object MakeGlueFaces (in ListOfGO theShapes, in double theTolerance, in boolean doKeepNonSolids);
2124
2125     /*!
2126      *  Find coincident faces in theShapes for possible gluing.
2127      *  \param theShapes Initial shapes.
2128      *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
2129      *  \return ListOfGO
2130      */
2131     ListOfGO GetGlueFaces (in ListOfGO theShapes, in double theTolerance);
2132
2133     /*!
2134      *  \brief Replace coincident faces in \a theShapes by one face
2135      *         in compliance with given list of faces
2136      *  \param theShapes Initial shapes.
2137      *  \param theTolerance Maximum distance between faces, which can be considered as coincident.
2138      *  \param theFaces List of faces for gluing.
2139      *  \param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
2140      *  \param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
2141      *                        will be glued, otherwise only the edges,
2142      *                        belonging to <VAR>theFaces</VAR>.
2143      *  \return New GEOM_Object containing copies of theShapes without coincident faces.
2144      */
2145     GEOM_Object MakeGlueFacesByList (in ListOfGO theShapes, in double theTolerance,
2146                                      in ListOfGO theFaces,  in boolean doKeepNonSolids,
2147                                      in boolean doGlueAllEdges);
2148
2149     /*!
2150      *  \brief Replace coincident edges in \a theShapes by one edge.
2151      *  \param theShapes Initial shapes.
2152      *  \param theTolerance Maximum distance between edges, which can be considered as coincident.
2153      *  \return New GEOM_Object containing copies of theShapes without coincident edges.
2154      */
2155     GEOM_Object MakeGlueEdges (in ListOfGO theShapes, in double theTolerance);
2156
2157     /*!
2158      *  Find coincident edges in \a theShapes for possible gluing.
2159      *  \param theShapes Initial shapes.
2160      *  \param theTolerance Maximum distance between edges, which can be considered as coincident.
2161      *  \return ListOfGO
2162      */
2163     ListOfGO GetGlueEdges (in ListOfGO theShapes, in double theTolerance);
2164
2165     /*!
2166      *  \brief Replace coincident edges in \a theShapes by one edge
2167      *         in compliance with given list of edges
2168      *  \param theShapes Initial shapes.
2169      *  \param theTolerance Maximum distance between edges, which can be considered as coincident.
2170      *  \param theEdges List of edges for gluing.
2171      *  \return New GEOM_Object containing copies of theShapes without some edges.
2172      */
2173     GEOM_Object MakeGlueEdgesByList (in ListOfGO theShapes,
2174                                      in double   theTolerance,
2175                                      in ListOfGO theEdges);
2176
2177     /*!
2178      *  \brief Get all sub-shapes and groups of \a theShape,
2179      *  that were created already by any other methods.
2180      *  \param theShape Any shape.
2181      *  \param theGroupsOnly If this parameter is TRUE, only groups will be
2182      *                       returned, else all found sub-shapes and groups.
2183      *  \return List of existing sub-objects of \a theShape.
2184      */
2185     ListOfGO GetExistingSubObjects (in GEOM_Object theShape,
2186                                     in boolean     theGroupsOnly);
2187
2188     /*!
2189      *  \brief Deprecated method. 
2190      *
2191      *  Use MakeAllSubShapes() instead.
2192      */
2193     ListOfGO MakeExplode (in GEOM_Object theShape,
2194                           in long        theShapeType,
2195                           in boolean     isSorted);
2196
2197     /*!
2198      *  \brief Explode a shape on sub-shapes of a given type. 
2199      *
2200      *  If the shape itself has the given type, it is also returned.
2201      *  \param theShape Shape to be exploded.
2202      *  \param theShapeType Type of sub-shapes to be retrieved.
2203      *  \param isSorted If this parameter is TRUE, sub-shapes will be
2204      *                  sorted by coordinates of their gravity centers.
2205      *  \return List of sub-shapes of type theShapeType, contained in theShape.
2206      */
2207     ListOfGO MakeAllSubShapes (in GEOM_Object theShape,
2208                                in long        theShapeType,
2209                                in boolean     isSorted);
2210
2211     /*!
2212      *  \brief Extract all sub-shapes of the given type from
2213      *  the given shape, excluding the shape itself.
2214      *  \param theShape Shape to be exploded.
2215      *  \param theShapeType Type of sub-shapes to be retrieved.
2216      *  \param isSorted If this parameter is TRUE, sub-shapes will be
2217      *                  sorted by coordinates of their gravity centers.
2218      *  \return List of sub-shapes of type theShapeType, contained in theShape.
2219      */
2220     ListOfGO ExtractSubShapes (in GEOM_Object theShape,
2221                                in long        theShapeType,
2222                                in boolean     isSorted);
2223
2224     /*!
2225      *  \brief Deprecated method. Use GetAllSubShapesIDs() instead.
2226      */
2227     ListOfLong SubShapeAllIDs (in GEOM_Object theShape,
2228                                in long        theShapeType,
2229                                in boolean     isSorted);
2230
2231     /*!
2232      *  \brief Explode a shape on sub-shapes of a given type.
2233      *
2234      *  Does the same, as MakeAllSubShapes, but returns IDs of
2235      *  sub-shapes, not GEOM_Object. It works faster.
2236      *  \param theShape Shape to be exploded.
2237      *  \param theShapeType Type of sub-shapes to be retrieved.
2238      *  \param isSorted If this parameter is TRUE, sub-shapes will be
2239      *                  sorted by coordinates of their gravity centers.
2240      *  \return List of IDs of sub-shapes of type theShapeType, contained in theShape.
2241      */
2242     ListOfLong GetAllSubShapesIDs (in GEOM_Object theShape,
2243                                    in long        theShapeType,
2244                                    in boolean     isSorted);
2245
2246     /*!
2247      *  \brief Get a sub-shape defined by its unique ID inside \a theMainShape
2248      *  \param theMainShape Main shape.
2249      *  \param theID Unique ID of sub-shape inside \a theMainShape.
2250      *  \return GEOM_Object, corresponding to found sub-shape.
2251      *  \note The sub-shape GEOM_Object can has ONLY ONE function.
2252      *        Don't try to apply modification operations (without copy) on them.
2253      */
2254     GEOM_Object GetSubShape (in GEOM_Object theMainShape,
2255                              in long        theID);
2256
2257     /*!
2258      *  \brief Get a set of sub-shapes defined by their unique IDs inside \a theMainShape
2259      *  \param theMainShape Main shape.
2260      *  \param theIndices List of unique IDs of sub-shapes inside \a theMainShape.
2261      *  \return List of GEOM_Object, corresponding to found sub-shapes.
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     ListOfGO MakeSubShapes (in GEOM_Object theMainShape,
2266                             in ListOfLong  theIndices);
2267
2268     /*!
2269      *  Get global index of \a theSubShape in \a theMainShape.
2270      *  \param theMainShape Main shape.
2271      *  \param theSubShape Sub-shape of the main shape.
2272      *  \return global index of \a theSubShape in \a theMainShape.
2273      */
2274     long GetSubShapeIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
2275
2276     /*!
2277      *  Get global indices of \a theSubShapes in \a theMainShape.
2278      *  \param theMainShape Main shape.
2279      *  \param theSubShapes List of sub-shapes of the main shape.
2280      *  \return list of global indices of \a theSubShapes in \a theMainShape.
2281      */
2282     ListOfLong GetSubShapesIndices (in GEOM_Object theMainShape, in ListOfGO theSubShapes);
2283
2284     /*!
2285      *  \brief Get index of \a theSubShape in \a theMainShape, unique among sub-shapes of the same type.
2286      *
2287      *  Together with method <VAR>GetShapeTypeString()</VAR> it can be used
2288      *  to generate automatic names for sub-shapes, when publishing them in a study.
2289      *  \param theMainShape Main shape.
2290      *  \param theSubShape Sub-shape of the main shape.
2291      *  \return index of \a theSubShape in a list of all sub-shapes of \a theMainShape of the same type.
2292      */
2293     long GetTopologyIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
2294
2295     /*!
2296      *  \brief Get name of type of \a theShape.
2297      *
2298      *  Use wide type notation, taking into consideration both topology and geometry of the shape.
2299      *  Together with method <VAR>GetTopologyIndex()</VAR> it can be used
2300      *  to generate automatic names for sub-shapes, when publishing them in a study.
2301      *  \param theShape The shape to get a type of.
2302      *  \return String, containing a type name of \a theShape.
2303      */
2304     string GetShapeTypeString (in GEOM_Object theShape);
2305
2306     /*!
2307      *  \brief Check if the object is a sub-object of another GEOM object.
2308      *
2309      *  \param theSubObject Checked sub-object (or its parent object, in case if
2310      *                      \a theSubObjectIndex is non-zero).
2311      *  \param theSubObjectIndex When non-zero, specifies a sub-shape index that
2312      *                           identifies a sub-object within its parent specified via \a theSubObject.
2313      *  \param theObject An object that is checked for ownership (or its parent object,
2314      *                   in case if \a theObjectIndex is non-zero).
2315      *  \param theObjectIndex When non-zero, specifies a sub-shape index that
2316      *                        identifies an object within its parent specified via \a theObject.
2317      *  \return TRUE, if the given object contains sub-object.
2318      */
2319     boolean IsSubShapeBelongsTo( in GEOM_Object theSubObject,
2320                                  in long        theSubObjectIndex,
2321                                  in GEOM_Object theObject,
2322                                  in long        theObjectIndex);
2323     /*!
2324      *  \brief Count number of faces in the given shape.
2325      *  \param theShape Shape to count faces in.
2326      *  \return Number of faces in the given shape.
2327      */
2328     long NumberOfFaces (in GEOM_Object theShape);
2329
2330     /*!
2331      *  \brief Count number of edges in the given shape.
2332      *  \param theShape Shape to count edges in.
2333      *  \return Number of edges in theShape.
2334      */
2335     long NumberOfEdges (in GEOM_Object theShape);
2336
2337     /*!
2338      *  \brief Count number of sub-shapes of type \a theShapeType in the given shape.
2339      *  \param theShape Shape to count sub-shapes in.
2340      *  \param theShapeType The type of sub-shapes to count.
2341      *  \return Number of sub-shapes of type \a theShapeType in \a theShape.
2342      */
2343     long NumberOfSubShapes (in GEOM_Object theShape,
2344                             in long        theShapeType);
2345
2346     /*!
2347      *  Reverses an orientation the given shape.
2348      *  \param theShape Shape to be reversed.
2349      *  \return The reversed copy of theShape.
2350      */
2351     GEOM_Object ChangeOrientation (in GEOM_Object theShape);
2352
2353     /*!
2354      *  \brief Retrieve all free faces from the given shape.
2355      *
2356      *  Free face is a face, which is not shared between two shells of the shape.
2357      *  \param theShape Shape to find free faces in.
2358      *  \return List of IDs of all free faces, contained in theShape.
2359      */
2360     ListOfLong GetFreeFacesIDs (in GEOM_Object theShape);
2361
2362     /*!
2363      *  \brief Get all sub-shapes of theShape1 of the given type, shared with theShape2.
2364      *  \param theShape1 Shape to find sub-shapes in.
2365      *  \param theShape2 Shape to find shared sub-shapes with.
2366      *  \param theShapeType Type of sub-shapes to be retrieved.
2367      *  \return List of sub-shapes of theShape1, shared with theShape2.
2368      */
2369     ListOfGO GetSharedShapes (in GEOM_Object theShape1,
2370                               in GEOM_Object theShape2,
2371                               in long        theShapeType);
2372
2373     /*!
2374      *  \brief Get sub-shapes, shared by input shapes.
2375      *  \param theShapes Shapes to find common sub-shapes of.
2376      *  \param theShapeType Type of sub-shapes to be retrieved.
2377      *  \param theMultiShare Specifies what type of shares should be checked:
2378      *         - \c TRUE: search sub-shapes from 1st input shape shared with all other input shapes;
2379      *         - \c FALSE: causes to search sub-shapes shared between couples of input shapes.
2380      *  \note If \a theShapes contains single compound, the shares between all possible couples of 
2381      *        its top-level shapes are returned; otherwise, only shares between 1st input shape
2382      *        and all rest input shapes are returned.
2383      *              
2384      *  \return List of all found sub-shapes.
2385      */
2386     ListOfGO GetSharedShapesMulti (in ListOfGO theShapes,
2387                                    in long     theShapeType,
2388                                    in boolean  theMultiShare);
2389
2390     /*!
2391      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2392      *  the specified plane by the certain way, defined through \a theState parameter.
2393      *  \param theShape Shape to find sub-shapes of.
2394      *  \param theShapeType Type of sub-shapes to be retrieved.
2395      *  \param theAx1 Vector (or line, or linear edge), specifying normal
2396      *                direction and location of the plane to find shapes on.
2397      *  \param theState The state of the sub-shapes to find.
2398      *  \return List of all found sub-shapes.
2399      */
2400     ListOfGO GetShapesOnPlane (in GEOM_Object theShape,
2401                                in long        theShapeType,
2402                                in GEOM_Object theAx1,
2403                                in shape_state theState);
2404     /*!
2405      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2406      *  the specified plane by the certain way, defined through \a theState parameter.
2407      *  \param theShape Shape to find sub-shapes of.
2408      *  \param theShapeType Type of sub-shapes to be retrieved.
2409      *  \param theAx1 Vector (or line, or linear edge), specifying normal
2410      *                direction of the plane to find shapes on.
2411      *  \param thePnt Point specifying location of the plane to find shapes on.
2412      *  \param theState The state of the sub-shapes to find.
2413      *  \return List of all found sub-shapes.
2414      */
2415     ListOfGO GetShapesOnPlaneWithLocation (in GEOM_Object theShape,
2416                                            in long        theShapeType,
2417                                            in GEOM_Object theAx1,
2418                                            in GEOM_Object thePnt,
2419                                            in shape_state theState);
2420
2421
2422
2423     /*!
2424      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2425      *  the specified cylinder by the certain way, defined through \a theState parameter.
2426      *  \param theShape Shape to find sub-shapes of.
2427      *  \param theShapeType Type of sub-shapes to be retrieved.
2428      *  \param theAxis Vector (or line, or linear edge), specifying
2429      *                 axis of the cylinder to find shapes on.
2430      *  \param theRadius Radius of the cylinder to find shapes on.
2431      *  \param theState The state of the sub-shapes to find.
2432      *  \return List of all found sub-shapes.
2433      */
2434     ListOfGO GetShapesOnCylinder (in GEOM_Object theShape,
2435                                   in long        theShapeType,
2436                                   in GEOM_Object theAxis,
2437                                   in double      theRadius,
2438                                   in shape_state theState);
2439
2440     /*!
2441      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2442      *  the specified cylinder by the certain way, defined through \a theState parameter.
2443      *  \param theShape Shape to find sub-shapes of.
2444      *  \param theShapeType Type of sub-shapes to be retrieved.
2445      *  \param theAxis Vector (or line, or linear edge), specifying
2446      *                 axis of the cylinder to find shapes on.
2447      *  \param thePnt Point specifying location of the bottom of the cylinder.
2448      *  \param theRadius Radius of the cylinder to find shapes on.
2449      *  \param theState The state of the sub-shapes to find.
2450      *  \return List of all found sub-shapes.
2451      */
2452     ListOfGO GetShapesOnCylinderWithLocation (in GEOM_Object theShape,
2453                                               in long        theShapeType,
2454                                               in GEOM_Object theAxis,
2455                                               in GEOM_Object thePnt,
2456                                               in double      theRadius,
2457                                               in shape_state theState);
2458
2459     /*!
2460      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2461      *  the specified sphere by the certain way, defined through \a theState parameter.
2462      *  \param theShape Shape to find sub-shapes of.
2463      *  \param theShapeType Type of sub-shapes to be retrieved.
2464      *  \param theCenter Point, specifying center of the sphere to find shapes on.
2465      *  \param theRadius Radius of the sphere to find shapes on.
2466      *  \param theState The state of the sub-shapes to find.
2467      *  \return List of all found sub-shapes.
2468      */
2469     ListOfGO GetShapesOnSphere (in GEOM_Object theShape,
2470                                 in long        theShapeType,
2471                                 in GEOM_Object theCenter,
2472                                 in double      theRadius,
2473                                 in shape_state theState);
2474
2475     /*!
2476      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2477      *  the specified quadrangle by the certain way, defined through \a theState parameter.
2478      *  \param theShape Shape to find sub-shapes of.
2479      *  \param theShapeType Type of sub-shapes to be retrieved.
2480      *  \param theTopLeftPoint Top left quadrangle corner
2481      *  \param theTopRightPoint Top right quadrangle corner
2482      *  \param theBottomLeftPoint Bottom left quadrangle corner
2483      *  \param theBottomRightPoint Bottom right quadrangle corner
2484      *  \param theState The state of the sub-shapes to find.
2485      *  \return List of all found sub-shapes.
2486      */
2487     ListOfGO GetShapesOnQuadrangle (in GEOM_Object theShape,
2488                                     in long        theShapeType,
2489                                     in GEOM_Object theTopLeftPoint,
2490                                     in GEOM_Object theTopRightPoint,
2491                                     in GEOM_Object theBottomLeftPoint,
2492                                     in GEOM_Object theBottomRightPoint,
2493                                     in shape_state theState);
2494
2495     /*!
2496      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2497      *  the specified plane by the certain way, defined through \a theState parameter.
2498      *  \param theShape Shape to find sub-shapes of.
2499      *  \param theShapeType Type of sub-shapes to be retrieved.
2500      *  \param theAx1 Vector (or line, or linear edge), specifying normal
2501      *                direction and location of the plane to find shapes on.
2502      *  \param theState The state of the sub-shapes to find.
2503      *  \return List of IDs of all found sub-shapes.
2504      */
2505     ListOfLong GetShapesOnPlaneIDs (in GEOM_Object theShape,
2506                                     in long        theShapeType,
2507                                     in GEOM_Object theAx1,
2508                                     in shape_state theState);
2509
2510     /*!
2511      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2512      *  the specified plane by the certain way, defined through \a theState parameter.
2513      *  \param theShape Shape to find sub-shapes of.
2514      *  \param theShapeType Type of sub-shapes to be retrieved.
2515      *  \param theAx1 Vector (or line, or linear edge), specifying normal
2516      *                direction of the plane to find shapes on.
2517      *  \param thePnt Point specifying location of the plane to find shapes on.
2518      *  \param theState The state of the sub-shapes to find.
2519      *  \return List of IDs of all found sub-shapes.
2520      */
2521     ListOfLong GetShapesOnPlaneWithLocationIDs (in GEOM_Object theShape,
2522                                                 in long        theShapeType,
2523                                                 in GEOM_Object theAx1,
2524                                                 in GEOM_Object thePnt,
2525                                                 in shape_state theState);
2526
2527     /*!
2528      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2529      *  the specified cylinder by the certain way, defined through \a theState parameter.
2530      *  \param theShape Shape to find sub-shapes of.
2531      *  \param theShapeType Type of sub-shapes to be retrieved.
2532      *  \param theAxis Vector (or line, or linear edge), specifying
2533      *                 axis of the cylinder to find shapes on.
2534      *  \param theRadius Radius of the cylinder to find shapes on.
2535      *  \param theState The state of the sub-shapes to find.
2536      *  \return List of IDs of all found sub-shapes.
2537      */
2538     ListOfLong GetShapesOnCylinderIDs (in GEOM_Object theShape,
2539                                        in long        theShapeType,
2540                                        in GEOM_Object theAxis,
2541                                        in double      theRadius,
2542                                        in shape_state theState);
2543
2544     /*!
2545      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2546      *  the specified cylinder by the certain way, defined through \a theState parameter.
2547      *  \param theShape Shape to find sub-shapes of.
2548      *  \param theShapeType Type of sub-shapes to be retrieved.
2549      *  \param theAxis Vector (or line, or linear edge), specifying
2550      *                 axis of the cylinder to find shapes on.
2551      *  \param thePnt Point specifying location of the bottom of the cylinder.
2552      *  \param theRadius Radius of the cylinder to find shapes on.
2553      *  \param theState The state of the sub-shapes to find.
2554      *  \return List of IDs all found sub-shapes.
2555      */
2556     ListOfLong GetShapesOnCylinderWithLocationIDs (in GEOM_Object theShape,
2557                                                    in long        theShapeType,
2558                                                    in GEOM_Object theAxis,
2559                                                    in GEOM_Object thePnt,
2560                                                    in double      theRadius,
2561                                                    in shape_state theState);
2562
2563     /*!
2564      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2565      *  the specified sphere by the certain way, defined through \a theState parameter.
2566      *  \param theShape Shape to find sub-shapes of.
2567      *  \param theShapeType Type of sub-shapes to be retrieved.
2568      *  \param theCenter Point, specifying center of the sphere to find shapes on.
2569      *  \param theRadius Radius of the sphere to find shapes on.
2570      *  \param theState The state of the sub-shapes to find.
2571      *  \return List of IDs of all found sub-shapes.
2572      */
2573     ListOfLong GetShapesOnSphereIDs (in GEOM_Object theShape,
2574                                      in long        theShapeType,
2575                                      in GEOM_Object theCenter,
2576                                      in double      theRadius,
2577                                      in shape_state theState);
2578
2579     /*!
2580      *  \brief Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
2581      *  the specified quadrangle by the certain way, defined through \a theState parameter.
2582      *  \param theShape Shape to find sub-shapes of.
2583      *  \param theShapeType Type of sub-shapes to be retrieved.
2584      *  \param theTopLeftPoint Top left quadrangle corner
2585      *  \param theTopRightPoint Top right quadrangle corner
2586      *  \param theBottomLeftPoint Bottom left quadrangle corner
2587      *  \param theBottomRightPoint Bottom right quadrangle corner
2588      *  \param theState The state of the sub-shapes to find.
2589      *  \return List of IDs of all found sub-shapes.
2590      */
2591     ListOfLong GetShapesOnQuadrangleIDs (in GEOM_Object theShape,
2592                                          in long        theShapeType,
2593                                          in GEOM_Object theTopLeftPoint,
2594                                          in GEOM_Object theTopRightPoint,
2595                                          in GEOM_Object theBottomLeftPoint,
2596                                          in GEOM_Object theBottomRightPoint,
2597                                          in shape_state theState);
2598
2599     /*!
2600      * \brief Find sub-shapes complying with given status
2601      * \param theBox - the box to check state of sub-shapes against
2602      * \param theShape - the shape to explore
2603      * \param theShapeType - type of sub-shape of theShape
2604      * \param theState - required state
2605      * \return List of IDs of all found sub-shapes.
2606      */
2607     ListOfLong GetShapesOnBoxIDs (in GEOM_Object theBox,
2608                                   in GEOM_Object theShape,
2609                                   in long        theShapeType,
2610                                   in shape_state theState);
2611
2612     /*!
2613      * \brief Find sub-shapes complying with given status
2614      * \param theBox - the box to check state of sub-shapes against
2615      * \param theShape - the shape to explore
2616      * \param theShapeType - type of sub-shape of theShape
2617      * \param theState - required state
2618      * \return List of all found sub-shapes.
2619      */
2620     ListOfGO GetShapesOnBox (in GEOM_Object theBox,
2621                              in GEOM_Object theShape,
2622                              in long        theShapeType,
2623                              in shape_state theState);
2624
2625     /*!
2626      * \brief Find sub-shapes complying with given status
2627      * \param theCheckShape - the shape to check state of sub-shapes against. It must be a solid.
2628      * \param theShape - the shape to explore
2629      * \param theShapeType - type of sub-shape of theShape
2630      * \param theState - required state
2631      * \return List of IDs of all found sub-shapes.
2632      */
2633     ListOfLong GetShapesOnShapeIDs (in GEOM_Object theCheckShape,
2634                                     in GEOM_Object theShape,
2635                                     in short       theShapeType,
2636                                     in shape_state theState);
2637
2638     /*!
2639      * \brief Find sub-shapes complying with given status
2640      * \param theCheckShape - the shape to check state of sub-shapes against. It must be a solid.
2641      * \param theShape - the shape to explore
2642      * \param theShapeType - type of sub-shape of theShape
2643      * \param theState - required state
2644      * \return List of all found sub-shapes.
2645      */
2646     ListOfGO GetShapesOnShape (in GEOM_Object theCheckShape,
2647                                in GEOM_Object theShape,
2648                                in short       theShapeType,
2649                                in shape_state theState);
2650
2651     /*!
2652      * \brief Find sub-shapes complying with given status
2653      * \param theCheckShape - the shape to check state of sub-shapes against. It must be a solid.
2654      * \param theShape - the shape to explore
2655      * \param theShapeType - type of sub-shape of theShape
2656      * \param theState - required state
2657      * \return compound includes all found sub-shapes.
2658      */
2659     GEOM_Object GetShapesOnShapeAsCompound (in GEOM_Object theCheckShape,
2660                                             in GEOM_Object theShape,
2661                                             in short       theShapeType,
2662                                             in shape_state theState);
2663
2664     /*!
2665      *  \brief Get sub-shape(s) of \a theShapeWhere, which are
2666      *  coincident with \a theShapeWhat or could be a part of it.
2667      *  \param theShapeWhere Shape to find sub-shapes of.
2668      *  \param theShapeWhat Shape, specifying what to find.
2669      *  \return Compound which includes all found sub-shapes if they have different types; 
2670      *          or group of all found shapes of the equal type; or a single found sub-shape.
2671      */
2672     GEOM_Object GetInPlace (in GEOM_Object theShapeWhere,
2673                             in GEOM_Object theShapeWhat);
2674
2675     /*!
2676      *  Old implementation of GetInPlace functionality, based on shape properties.
2677      */
2678     GEOM_Object GetInPlaceOld (in GEOM_Object theShapeWhere,
2679                                in GEOM_Object theShapeWhat);
2680
2681     /*!
2682      *  \brief Get sub-shape(s) of \a theShapeWhere, which are
2683      *  coincident with \a theShapeWhat or could be a part of it.
2684      *
2685      *  Implementation of this method is based on a saved history of an operation,
2686      *  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
2687      *  arguments (an argument shape or a sub-shape of an argument shape).
2688      *  The operation could be the Partition or one of boolean operations,
2689      *  performed on simple shapes (not on compounds).
2690      *
2691      *  \param theShapeWhere Shape to find sub-shapes of.
2692      *  \param theShapeWhat Shape, specifying what to find.
2693      *  \return Compound which includes all found sub-shapes if they have different types; 
2694      *          or group of all found shapes of the equal type; or a single found sub-shape.
2695      */
2696     GEOM_Object GetInPlaceByHistory (in GEOM_Object theShapeWhere,
2697                                      in GEOM_Object theShapeWhat);
2698
2699     /*!
2700      *  \brief A sort of GetInPlace functionality, returning for each sub-shape ID of 
2701      *  \a theShapeWhat a list of corresponding sub-shape IDs of \a theShapeWhere.
2702      *  For example, if theShapeWhat is a box and theShapeWhere is this box cut into 
2703      *  two parts by a plane, then the result can be as this: 
2704      *    len( result_list ) = 35,
2705      *    result_list[ 1 ] = [ 2, 36 ], which means that the box turned into two solids
2706      *  with IDs 2 and 36 within theShapeWhere
2707      */
2708     ListOfListOfLong GetInPlaceMap (in GEOM_Object theShapeWhere,
2709                                     in GEOM_Object theShapeWhat);
2710
2711     /*!
2712      *  \brief Get sub-shape of theShapeWhere, which are
2713      *  coincident with \a theShapeWhat that can either SOLID, FACE, EDGE or VERTEX.
2714      *  \param theShapeWhere Shape to find sub-shapes of.
2715      *  \param theShapeWhat Shape, specifying what to find.
2716      *  \return found sub-shape.
2717      */
2718     GEOM_Object GetSame (in GEOM_Object theShapeWhere,
2719                          in GEOM_Object theShapeWhat);
2720
2721     /*!
2722      *  \brief Get sub-shape Ids of theShapeWhere, which are
2723      *   coincident with \a theShapeWhat that can either SOLID, FACE, EDGE or VERTEX.
2724      *  \param theShapeWhere Shape to find sub-shapes of.
2725      *  \param theShapeWhat Shape, specifying what to find.
2726      *  \return found sub-shape Ids.
2727      */
2728     ListOfLong GetSameIDs (in GEOM_Object theShapeWhere,
2729                            in GEOM_Object theShapeWhat);
2730
2731     /*!
2732      *  \brief Resize the input edge with the new Min and Max parameters.
2733      *  The input edge parameters range is [0, 1]. If theMin parameter is
2734      *  negative, the input edge is extended, otherwise it is shrinked by
2735      *  theMin parameter. If theMax is greater than 1, the edge is extended,
2736      *  otherwise it is shrinked by theMax parameter.
2737      *  \param theEdge the input edge to be resized.
2738      *  \param theMin the minimal parameter value.
2739      *  \param theMax the maximal parameter value.
2740      *  \return a newly created edge.
2741      */
2742     GEOM_Object ExtendEdge(in GEOM_Object theEdge,
2743                            in double      theMin,
2744                            in double      theMax);
2745
2746     /*!
2747      *  \brief Resize the input face with the new UMin, UMax, VMin and VMax
2748      *  parameters. The input face U and V parameters range is [0, 1]. If
2749      *  theUMin parameter is negative, the input face is extended, otherwise
2750      *  it is shrinked along U direction by theUMin parameter. If theUMax is
2751      *  greater than 1, the face is extended, otherwise it is shrinked along
2752      *  U direction by theUMax parameter. So as for theVMin, theVMax and
2753      *  V direction of the input face.
2754      *  \param theFace the input face to be resized.
2755      *  \param theUMin the minimal U parameter value.
2756      *  \param theUMax the maximal U parameter value.
2757      *  \param theVMin the minimal V parameter value.
2758      *  \param theVMax the maximal V parameter value.
2759      *  \return a newly created face.
2760      */
2761     GEOM_Object ExtendFace(in GEOM_Object theFace,
2762                            in double      theUMin,
2763                            in double      theUMax,
2764                            in double      theVMin,
2765                            in double      theVMax);
2766
2767     /*!
2768      *  \brief Make a surface from a face. This function takes some face as
2769      *  input parameter and creates new GEOM_Object, i.e. topological shape
2770      *  by extracting underlying surface of the source face and limiting it
2771      *  by the Umin, Umax, Vmin, Vmax parameters of the source face (in the
2772      *  parametrical space).
2773      *  \param theFace the input face.
2774      *  \return a newly created face.
2775      */
2776     GEOM_Object MakeSurfaceFromFace(in GEOM_Object theFace);
2777
2778     /*!
2779      * \brief Explode a shape into edges sorted in a row from a starting point.
2780      * \param theShape - the shape to be exploded on edges.
2781      * \param theStartPoint - the starting point.
2782      * \return Ordered list of edges sorted in a row from a starting point.
2783      */
2784     ListOfGO GetSubShapeEdgeSorted (in GEOM_Object theShape,
2785                                     in GEOM_Object theStartPoint);
2786
2787     /*!
2788      * \brief Return the list of subshapes that satisfies a certain tolerance
2789      * criterion. The user defines the type of shapes to be returned, the
2790      * condition and the tolerance value. The operation is defined for
2791      * faces, edges and vertices only. E.g. for theShapeType FACE, theCondition
2792      * CC_GT and theTolerance 1.e-7 this method returns all faces of theShape
2793      * that have tolerances greater then 1.e7.
2794      *
2795      * \param theShape the shape to be exploded
2796      * \param theShapeType the type of shapes to be returned. Can have the
2797      *        values FACE, EDGE and VERTEX only.
2798      * \param theCondition the condition type.
2799      * \param theTolerance the tolerance filter.
2800      * \return the list of shapes that satisfy the conditions.
2801      */
2802     ListOfGO GetSubShapesWithTolerance(in GEOM_Object          theShape,
2803                                        in short                theShapeType,
2804                                        in comparison_condition theCondition,
2805                                        in double               theTolerance);
2806
2807     /**
2808      * This enumeration represents an extraction statistics type. It is used in
2809      * the interface GEOM_IShapesOperations::MakeExtraction.
2810      */
2811     enum ExtractionStatType
2812     {
2813       EST_Removed,  ///< Removed sub-shapes
2814       EST_Modified, ///< Modified sub-shapes
2815       EST_Added     ///< Newly created sub-shapes
2816     };
2817
2818     /*!
2819      * This structure defines a format of extraction statistics. It is used in
2820      * the interface GEOM_IShapesOperations::MakeExtraction.
2821      */
2822     struct ExtractionStat
2823     {
2824       ExtractionStatType type;    ///< Type of extraction statistics.
2825       ListOfLong         indices; ///< Shape indices touched by this type of modification.
2826     };
2827
2828     typedef sequence<ExtractionStat> ExtractionStats;
2829
2830     /*!
2831      * \brief Return the shape that is constructed from theShape without
2832      * extracted sub-shapes from the input list.
2833      *
2834      * \param theShape the original shape.
2835      * \param theSubShapeIDs the list of sub-shape IDs to be extracted from
2836      *        the original shape.
2837      * \param theStats the operation statistics. Output parameter.
2838      * \return the shape without extracted sub-shapes.
2839      */
2840     GEOM_Object MakeExtraction(in GEOM_Object      theShape,
2841                                in ListOfLong       theSubShapeIDs,
2842                                out ExtractionStats theStats);
2843
2844   };
2845
2846  // # GEOM_IBlocksOperations: 
2847   /*!
2848    *  \brief Interface for Blocks construction
2849    *  Face from points or edges, Block from faces,
2850    *  Blocks multi-translation and multi-rotation
2851    */
2852   interface GEOM_IBlocksOperations : GEOM_IOperations
2853   {
2854    
2855   //  # Creation of blocks
2856
2857     /*!
2858      *  \brief Create a quadrangle face from four edges. Order of Edges is not
2859      *  important. It is not necessary that edges share the same vertex.
2860      *  \param theEdge1,theEdge2,theEdge3,theEdge4 Edges for the face bound.
2861      *  \return New GEOM_Object, containing the created face.
2862      */
2863     GEOM_Object MakeQuad (in GEOM_Object theEdge1,
2864                           in GEOM_Object theEdge2,
2865                           in GEOM_Object theEdge3,
2866                           in GEOM_Object theEdge4);
2867
2868     /*!
2869      *  \brief Create a quadrangle face on two edges.
2870      *
2871      *  The missing edges will be built by creating the shortest ones.
2872      *  \param theEdge1,theEdge2 Two opposite edges for the face.
2873      *  \return New GEOM_Object, containing the created face.
2874      */
2875     GEOM_Object MakeQuad2Edges (in GEOM_Object theEdge1,
2876                                 in GEOM_Object theEdge2);
2877
2878     /*!
2879      *  \brief Create a quadrangle face with specified corners.
2880      *
2881      *  The missing edges will be built by creating the shortest ones.
2882      *  \param thePnt1,thePnt2,thePnt3,thePnt4 Corner vertices for the face.
2883      *  \return New GEOM_Object, containing the created face.
2884      */
2885     GEOM_Object MakeQuad4Vertices (in GEOM_Object thePnt1,
2886                                    in GEOM_Object thePnt2,
2887                                    in GEOM_Object thePnt3,
2888                                    in GEOM_Object thePnt4);
2889
2890     /*!
2891      *  \brief Create a hexahedral solid, bounded by the six given faces. Order of
2892      *  faces is not important. 
2893      *
2894      *  It is not necessary that Faces share the same edge.
2895      *  \param theFace1,theFace2,theFace3,theFace4,theFace5,theFace6 Faces for the hexahedral solid.
2896      *  \return New GEOM_Object, containing the created solid.
2897      */
2898     GEOM_Object MakeHexa (in GEOM_Object theFace1,
2899                           in GEOM_Object theFace2,
2900                           in GEOM_Object theFace3,
2901                           in GEOM_Object theFace4,
2902                           in GEOM_Object theFace5,
2903                           in GEOM_Object theFace6);
2904
2905     /*!
2906      *  \brief Create a hexahedral solid between two given faces.
2907      *
2908      *  The missing faces will be built by creating the smallest ones.
2909      *  \param theFace1,theFace2 Two opposite faces for the hexahedral solid.
2910      *  \return New GEOM_Object, containing the created solid.
2911      */
2912     GEOM_Object MakeHexa2Faces (in GEOM_Object theFace1,
2913                                 in GEOM_Object theFace2);
2914
2915     
2916   //  # Extract elements of blocks and blocks compounds
2917      
2918
2919     /*!
2920      *  \brief Get a vertex, found in the given shape by its coordinates.
2921      *  \param theShape Block or a compound of blocks.
2922      *  \param theX,theY,theZ Coordinates of the sought vertex.
2923      *  \param theEpsilon Maximum allowed distance between the resulting
2924      *                    vertex and point with the given coordinates.
2925      *  \return New GEOM_Object, containing the found vertex.
2926      */
2927     GEOM_Object GetPoint (in GEOM_Object theShape,
2928                           in double      theX,
2929                           in double      theY,
2930                           in double      theZ,
2931                           in double      theEpsilon);
2932
2933     /*!
2934      *  \brief Find a vertex of the given shape, which has minimal distance to the given point.
2935      *  \param theShape Any shape.
2936      *  \param thePoint Point, close to the desired vertex.
2937      *  \return New GEOM_Object, containing the found vertex.
2938      */
2939     GEOM_Object GetVertexNearPoint (in GEOM_Object theShape,
2940                                     in GEOM_Object thePoint);
2941
2942     /*!
2943      *  \brief Get an edge, found in the given shape by two given vertices.
2944      *  \param theShape Block or a compound of blocks.
2945      *  \param thePoint1,thePoint2 Points, close to the ends of the desired edge.
2946      *  \return New GEOM_Object, containing the found edge.
2947      */
2948     GEOM_Object GetEdge (in GEOM_Object theShape,
2949                          in GEOM_Object thePoint1,
2950                          in GEOM_Object thePoint2);
2951
2952     /*!
2953      *  \brief Find an edge of the given shape, which has minimal distance to the given point.
2954      *  \param theShape Block or a compound of blocks.
2955      *  \param thePoint Point, close to the desired edge.
2956      *  \return New GEOM_Object, containing the found edge.
2957      */
2958     GEOM_Object GetEdgeNearPoint (in GEOM_Object theShape,
2959                                   in GEOM_Object thePoint);
2960
2961     /*!
2962      *  \brief Returns a face, found in the given shape by four given corner vertices.
2963      *  \param theShape Block or a compound of blocks.
2964      *  \param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
2965      *  \return New GEOM_Object, containing the found face.
2966      */
2967     GEOM_Object GetFaceByPoints (in GEOM_Object theShape,
2968                                  in GEOM_Object thePoint1,
2969                                  in GEOM_Object thePoint2,
2970                                  in GEOM_Object thePoint3,
2971                                  in GEOM_Object thePoint4);
2972
2973     /*!
2974      *  \brief Get a face of block, found in the given shape by two given edges.
2975      *  \param theShape Block or a compound of blocks.
2976      *  \param theEdge1,theEdge2 Edges, close to the edges of the desired face.
2977      *  \return New GEOM_Object, containing the found face.
2978      */
2979     GEOM_Object GetFaceByEdges (in GEOM_Object theShape,
2980                                 in GEOM_Object theEdge1,
2981                                 in GEOM_Object theEdge2);
2982
2983     /*!
2984      *  \brief Find a face, opposite to the given one in the given block.
2985      *  \param theBlock Must be a hexahedral solid.
2986      *  \param theFace Face of \a theBlock, opposite to the desired face.
2987      *  \return New GEOM_Object, containing the found face.
2988      */
2989     GEOM_Object GetOppositeFace (in GEOM_Object theBlock,
2990                                  in GEOM_Object theFace);
2991
2992     /*!
2993      *  \brief Find a face of the given shape, which has minimal distance to the given point.
2994      *  \param theShape Block or a compound of blocks.
2995      *  \param thePoint Point, close to the desired face.
2996      *  \return New GEOM_Object, containing the found face.
2997      */
2998     GEOM_Object GetFaceNearPoint (in GEOM_Object theShape,
2999                                   in GEOM_Object thePoint);
3000
3001     /*!
3002      *  \brief Find a face of block, whose outside normale has minimal angle with the given vector.
3003      *  \param theBlock Block or a compound of blocks.
3004      *  \param theVector Vector, close to the normale of the desired face.
3005      *  \return New GEOM_Object, containing the found face.
3006      */
3007     GEOM_Object GetFaceByNormale (in GEOM_Object theBlock,
3008                                   in GEOM_Object theVector);
3009
3010     /*!
3011      *  \brief Find all sub-shapes of type \a theShapeType of the given shape,
3012      *  which have minimal distance to the given point.
3013      *  \param theShape Any shape.
3014      *  \param thePoint Point, close to the desired shape.
3015      *  \param theShapeType Defines what kind of sub-shapes is searched.
3016      *  \param theTolerance The tolerance for distances comparison. All shapes
3017      *                      with distances to the given point in interval
3018      *                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
3019      *  \return New GEOM_Object, containing a group of all found shapes.
3020      */
3021     GEOM_Object GetShapesNearPoint (in GEOM_Object theShape,
3022                                     in GEOM_Object thePoint,
3023                                     in long        theShapeType,
3024                                     in double      theTolerance);
3025
3026    //  #  Extract blocks from blocks compounds
3027      
3028
3029     /*!
3030      *  \brief Check, if the compound contains only specified blocks.
3031      *  \param theCompound The compound to check.
3032      *  \param theMinNbFaces If solid has lower number of faces, it is not a block.
3033      *  \param theMaxNbFaces If solid has higher number of faces, it is not a block.
3034      *    \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
3035      *  \param theNbBlocks Number of specified blocks in theCompound.
3036      *  \return TRUE, if the given compound contains only blocks.
3037      */
3038     boolean IsCompoundOfBlocks (in GEOM_Object theCompound,
3039                                 in long        theMinNbFaces,
3040                                 in long        theMaxNbFaces,
3041                                 out long       theNbBlocks);
3042
3043     /*!
3044      *  \brief Enumeration of Blocks Compound defects.
3045      */
3046     enum BCErrorType
3047     {
3048       /* Each element of the compound should be a Block */
3049       NOT_BLOCK,
3050
3051       /* An element is a potential block, but has degenerated and/or seam edge(s). */
3052       EXTRA_EDGE,
3053
3054       /* A connection between two Blocks should be an entire face or an entire edge */
3055       INVALID_CONNECTION,
3056
3057       /* The compound should be connexe */
3058       NOT_CONNECTED,
3059
3060       /* The glue between two quadrangle faces should be applied */
3061       NOT_GLUED
3062     };
3063
3064     /*!
3065      *  \brief Description of Blocks Compound defect: type and incriminated sub-shapes.
3066      */
3067     struct BCError
3068     {
3069       BCErrorType error;
3070       ListOfLong  incriminated;
3071     };
3072
3073     /*!
3074      *  \brief Sequence of all Blocks Compound defects.
3075      */
3076     typedef sequence<BCError> BCErrors;
3077
3078     /*!
3079      *  \brief Check, if the compound of blocks is given.
3080      *
3081      *  To be considered as a compound of blocks, the
3082      *  given shape must satisfy the following conditions:
3083      *  - Each element of the compound should be a Block (6 faces and 12 edges).
3084      *  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
3085      *  - The compound should be connexe.
3086      *  - The glue between two quadrangle faces should be applied.
3087      *    \note Single block is also accepted as a valid compound of blocks.
3088      *  \param theCompound The compound to check.
3089      *  \param theToleranceC1 the tolerance to check if two neighbor edges are
3090      *         collinear in the common vertex with this tolerance. Negative
3091      *         value means that C1 criterion is not used (old implementation).
3092      *  \param theErrors Structure, containing discovered errors and incriminated sub-shapes.
3093      *  \return TRUE, if the given shape is a compound of blocks.
3094      */
3095     boolean CheckCompoundOfBlocks (in GEOM_Object theCompound,
3096                                    in double      theToleranceC1,
3097                                    out BCErrors   theErrors);
3098
3099     /*!
3100      *  \brief Convert sequence of Blocks Compound errors, returned by
3101      *  <VAR>CheckCompoundOfBlocks()</VAR>, into string.
3102      *  \param theCompound The bad compound.
3103      *  \param theErrors The sequence of \a theCompound errors.
3104      *  \return String, describing all the errors in form, suitable for printing.
3105      */
3106     string PrintBCErrors (in GEOM_Object theCompound,
3107                           in BCErrors    theErrors);
3108
3109     /*!
3110      *  \brief Retrieve all non blocks solids and faces from a shape.
3111      *
3112      *  \param theShape The shape to explore.
3113      *  \param theToleranceC1 the tolerance to check if two neighbor edges are
3114      *         collinear in the common vertex with this tolerance. Negative
3115      *         value means that C1 criterion is not used (old implementation).
3116      *  \param theNonQuads Output parameter. Group of all non quadrangular faces.
3117      *
3118      *  \return Group of all non block solids (= not 6 faces, or with 6
3119      *          faces, but with the presence of non-quadrangular faces).
3120      */
3121     GEOM_Object GetNonBlocks (in GEOM_Object  theShape,
3122                               in double       theToleranceC1,
3123                               out GEOM_Object theNonQuads);
3124
3125     /*!
3126      *  \brief Remove all seam and degenerated edges from \a theShape.
3127      *
3128      *  Unite faces and edges, sharing one surface.
3129      *  \param theShape The compound or single solid to remove irregular edges from.
3130      *  \param theOptimumNbFaces If more than zero, unite faces only for those solids,
3131      *         that have more than theOptimumNbFaces faces. If zero, unite faces always,
3132      *         regardsless their quantity in the solid. If negative, do not unite faces at all.
3133      *         For blocks repairing recommended value is 6.
3134      *  \return Improved shape.
3135      */
3136     GEOM_Object RemoveExtraEdges (in GEOM_Object theShape,
3137                                   in long        theOptimumNbFaces);
3138
3139     /*!
3140      *  \brief Performs union faces of \a theShape.
3141      *
3142      *  Unite faces sharing one surface.
3143      *  \param theShape The compound or single solid that contains faces to perform union.
3144      *  \return Improved shape.
3145      */
3146     GEOM_Object UnionFaces (in GEOM_Object theShape);
3147
3148     /*!
3149      *  \brief Check, if the given shape is a blocks compound.
3150      *
3151      *  Fix all detected errors.
3152      *    \note Single block can be also fixed by this method.
3153      *  \param theCompound The compound to check and improve.
3154      *  \return Improved compound.
3155      */
3156     GEOM_Object CheckAndImprove (in GEOM_Object theCompound);
3157
3158     /*!
3159      *  \brief Get all the blocks, contained in the given compound.
3160      *
3161      *  \param theCompound The compound to explode.
3162      *  \param theMinNbFaces If solid has lower number of faces, it is not a block.
3163      *  \param theMaxNbFaces If solid has higher number of faces, it is not a block.
3164      *    \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
3165      *  \return List of GEOM_Object, containing the retrieved blocks.
3166      */
3167     ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound,
3168                                       in long        theMinNbFaces,
3169                                       in long        theMaxNbFaces);
3170
3171     /*!
3172      *  \brief Find block, containing the given point inside its volume or on boundary.
3173      *  \param theCompound Compound, to find block in.
3174      *  \param thePoint Point, close to the desired block. If the point lays on
3175      *         boundary between some blocks, we return block with nearest center.
3176      *  \return New GEOM_Object, containing the found block.
3177      */
3178     GEOM_Object GetBlockNearPoint (in GEOM_Object theCompound,
3179                                    in GEOM_Object thePoint);
3180
3181     /*!
3182      *  \brief Find block, containing all the elements, passed as the parts, or maximum quantity of them.
3183      *  \param theCompound Compound, to find block in.
3184      *  \param theParts List of faces and/or edges and/or vertices to be parts of the found block.
3185      *  \return New GEOM_Object, containing the found block.
3186      */
3187     GEOM_Object GetBlockByParts (in GEOM_Object theCompound,
3188                                  in ListOfGO    theParts);
3189
3190     /*!
3191      *  \brief Return all blocks, containing all the elements, passed as the parts.
3192      *  \param theCompound Compound, to find blocks in.
3193      *  \param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
3194      *  \return List of GEOM_Object, containing the found blocks.
3195      */
3196     ListOfGO GetBlocksByParts (in GEOM_Object theCompound,
3197                                in ListOfGO    theParts);
3198
3199   // #  Operations on blocks with gluing of result
3200
3201     /*!
3202      *  \brief Multi-transformate block and glue the result.
3203      *
3204      *  Transformation is defined so, as to superpose theDirFace1 with theDirFace2.
3205      *  \param theBlock Hexahedral solid to be multi-transformed.
3206      *  \param theDirFace1 First direction face global index.
3207      *  \param theDirFace2 Second direction face global index.
3208      *  \param theNbTimes Quantity of transformations to be done.
3209      *    \note Global index of sub-shape can be obtained, using method
3210      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3211      *  \return New GEOM_Object, containing the result shape.
3212      */
3213     GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock,
3214                                            in long        theDirFace1,
3215                                            in long        theDirFace2,
3216                                            in long        theNbTimes);
3217
3218     /*!
3219      *  \brief Multi-transformate block and glue the result.
3220      *  \param theBlock Hexahedral solid to be multi-transformed.
3221      *  \param theDirFace1U,theDirFace2U Direction faces for the first transformation.
3222      *  \param theDirFace1V,theDirFace2V Direction faces for the second transformation.
3223      *  \param theNbTimesU,theNbTimesV Quantity of transformations to be done.
3224      *  \return New GEOM_Object, containing the result shape.
3225      */
3226     GEOM_Object MakeMultiTransformation2D (in GEOM_Object theBlock,
3227                                            in long        theDirFace1U,
3228                                            in long        theDirFace2U,
3229                                            in long        theNbTimesU,
3230                                            in long        theDirFace1V,
3231                                            in long        theDirFace2V,
3232                                            in long        theNbTimesV);
3233
3234   // # Special operation - propagation
3235    
3236
3237     /*!
3238      *  \brief Build all possible propagation groups.
3239      *
3240      *  Propagation group is a set of all edges, opposite to one (main)
3241      *  edge of this group directly or through other opposite edges.
3242      *  Notion of Opposite Edge make sense only on quadrangle face.
3243      *  \param theShape Shape to build propagation groups on.
3244      *  \return List of GEOM_Object, each of them is a propagation group.
3245      */
3246     ListOfGO Propagate (in GEOM_Object theShape);
3247   };
3248
3249  // # GEOM_IBooleanOperations
3250   /*!
3251    *  \brief Interface for boolean operations (Cut, Fuse, Common)
3252    */
3253   interface GEOM_IBooleanOperations : GEOM_IOperations
3254   {
3255     /*!
3256      *  \brief Perform one of boolean operations on two given shapes.
3257      *  \param theShape1 First argument for boolean operation.
3258      *  \param theShape2 Second argument for boolean operation.
3259      *  \param theOperation Indicates the operation to be done:
3260      *                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
3261      *  \param IsCheckSelfInte If TRUE, perform check self intersection
3262      *                         of arguments before an operation.
3263      *  \return New GEOM_Object, containing the result shape.
3264      */
3265     GEOM_Object MakeBoolean (in GEOM_Object theShape1,
3266                              in GEOM_Object theShape2,
3267                              in long        theOperation,
3268                              in boolean     IsCheckSelfInte);
3269     /*!
3270      *  \brief Perform fusion boolean operation on two given shapes.
3271      *  \param theShape1 First argument for fuse operation.
3272      *  \param theShape2 Second argument for fuse operation.
3273      *  \param IsCheckSelfInte If TRUE, perform check self intersection
3274      *                         of arguments before an operation.
3275      *  \param IsRmExtraEdges If TRUE, perform removal of extra edges
3276      *                        during an operation.
3277      *  \return New GEOM_Object, containing the result shape.
3278      */
3279     GEOM_Object MakeFuse (in GEOM_Object theShape1,
3280                           in GEOM_Object theShape2,
3281                           in boolean     IsCheckSelfInte,
3282                           in boolean     IsRmExtraEdges);
3283
3284     /*!
3285      *  \brief Perform fusion boolean operation on list of objects.
3286      *  \param theShapes Shapes to be fused.
3287      *  \param IsCheckSelfInte If TRUE, perform check self intersection
3288      *                         of arguments before an operation.
3289      *  \param IsRmExtraEdges If TRUE, perform removal of extra edges
3290      *                        during an operation.
3291      *  \return New GEOM_Object, containing the result shape.
3292      */
3293     GEOM_Object MakeFuseList (in ListOfGO theShapes,
3294                               in boolean  IsCheckSelfInte,
3295                               in boolean  IsRmExtraEdges);
3296
3297     /*!
3298      *  \brief Perform common boolean operation on list of objects.
3299      *  \param theShapes Shapes for common operation.
3300      *  \param IsCheckSelfInte If TRUE, perform check self intersection
3301      *                         of arguments before an operation.
3302      *  \return New GEOM_Object, containing the result shape.
3303      */
3304     GEOM_Object MakeCommonList (in ListOfGO theShapes,
3305                                 in boolean  IsCheckSelfInte);
3306
3307     /*!
3308      *  \brief Perform cutting of list of objects from theMainShape.
3309      *  \param theMainShape the object for cut operation.
3310      *  \param theShapes Shapes to be cut from theMainShape (tools).
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 MakeCutList (in GEOM_Object theMainShape,
3316                              in ListOfGO theShapes,
3317                              in boolean  IsCheckSelfInte);
3318
3319     /*!
3320      *  \brief Perform partition operation.
3321      *
3322      *  \param theShapes Shapes to be intersected.
3323      *  \param theTools Shapes to intersect theShapes.
3324      *  \note  Each compound from ListShapes and ListTools will be exploded in order
3325      *         to avoid possible intersection between shapes from this compound.
3326      *  \param theLimit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
3327      *  \param theKeepNonlimitShapes: if this parameter == 0, then only shapes of
3328      *                             target type (equal to Limit) are kept in the result,
3329      *                             else standalone shapes of lower dimension
3330      *                             are kept also (if they exist).
3331      *
3332      *  After implementation new version of PartitionAlgo (October 2006)
3333      *  other parameters are ignored by current functionality. They are kept
3334      *  in this function only for supporting old versions.
3335      *  Ignored parameters:
3336      *  \param theKeepInside Shapes, outside which the results will be deleted.
3337      *         Each shape from theKeepInside must belong to theShapes also.
3338      *  \param theRemoveInside Shapes, inside which the results will be deleted.
3339      *         Each shape from theRemoveInside must belong to theShapes also.
3340      *  \param theRemoveWebs If TRUE, perform Glue 3D algorithm.
3341      *  \param theMaterials Material indices for each shape. Make sense, only if theRemoveWebs is TRUE.
3342      *
3343      *  \return New GEOM_Object, containing the result shapes.
3344      */
3345     GEOM_Object MakePartition (in ListOfGO   theShapes,
3346                                in ListOfGO   theTools,
3347                                in ListOfGO   theKeepInside,
3348                                in ListOfGO   theRemoveInside,
3349                                in short      theLimit,
3350                                in boolean    theRemoveWebs,
3351                                in ListOfLong theMaterials,
3352                                in short      theKeepNonlimitShapes);
3353
3354     /*!
3355      *  \brief Perform partition operation.
3356      *
3357      *  This method may be useful if it is needed to make a partition for
3358      *  a compound containing nonintersected shapes. Performance will be better
3359      *  since intersection between shapes from compound is not performed.
3360      *
3361      *  Description of all parameters as in previous method MakePartition().
3362      *  One additional parameter is provided:
3363      *  \param IsCheckSelfInte If TRUE, perform check self intersection
3364      *                         of arguments before an operation.
3365      *
3366      *  \note Passed compounds (via ListShapes or via ListTools)
3367      *        have to consist of nonintersecting shapes.
3368      *
3369      *  \return New GEOM_Object, containing the result shapes.
3370      */
3371     GEOM_Object MakePartitionNonSelfIntersectedShape (in ListOfGO   theShapes,
3372                                                       in ListOfGO   theTools,
3373                                                       in ListOfGO   theKeepInside,
3374                                                       in ListOfGO   theRemoveInside,
3375                                                       in short      theLimit,
3376                                                       in boolean    theRemoveWebs,
3377                                                       in ListOfLong theMaterials,
3378                                                       in short      theKeepNonlimitShapes,
3379                                                       in boolean    IsCheckSelfInte);
3380
3381     /*!
3382      *  \brief Perform partition of the Shape with the Plane
3383      *  \param theShape Shape to be intersected.
3384      *  \param thePlane Tool shape, to intersect theShape.
3385      *  \return New GEOM_Object, containing the result shape.
3386      * 
3387      *  \note This operation is a shortcut to the more general \ref MakePartition
3388      *  operation, where \a theShape specifies single "object" (shape being partitioned)
3389      *  and \a thePlane specifies single "tool" (intersector shape). Other parameters of
3390      *  \ref MakePartition operation have default values:
3391      *  - \a theLimit: GEOM::SHAPE (shape limit corresponds to the type of \a theShape)
3392      *  - \a theKeepNonlimitShapes: 0
3393      *  - \a theKeepInside, \a theRemoveInside, \a theRemoveWebs,
3394      *    \a theMaterials (obsolete parameters): empty
3395      *
3396      * \sa MakePartition, MakePartitionNonSelfIntersectedShape
3397      */
3398     GEOM_Object MakeHalfPartition (in GEOM_Object theShape,
3399                                    in GEOM_Object thePlane);
3400   };
3401
3402  // # GEOM_ICurvesOperations:
3403   /*!
3404    *  \brief Interface for curves creation.
3405    *
3406    *  Polyline, Circle, Spline (Bezier and Interpolation)
3407    */
3408   interface GEOM_ICurvesOperations : GEOM_IOperations
3409   {
3410     /*!
3411      *  \brief Create a circle with given center, normal vector and radius.
3412      *  \param thePnt Circle center.
3413      *  \param theVec Vector, normal to the plane of the circle.
3414      *  \param theR Circle radius.
3415      *  \return New GEOM_Object, containing the created circle.
3416      */
3417     GEOM_Object MakeCirclePntVecR (in GEOM_Object thePnt,
3418                                    in GEOM_Object theVec,
3419                                    in double theR);
3420     /*!
3421      *  \brief Create a circle, passing through three given points
3422      *  \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
3423      *  \return New GEOM_Object, containing the created circle.
3424      */
3425     GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1,
3426                                     in GEOM_Object thePnt2,
3427                                     in GEOM_Object thePnt3);
3428     /*!
3429      *  \brief Create a circle with given center, with a radius equals the distance from center to Point1
3430      *  and on a plane defined by all of three points.
3431      *  \param thePnt1,thePnt2,thePnt3 Points, defining the circle.
3432      *  \return New GEOM_Object, containing the created circle.
3433      */
3434     GEOM_Object MakeCircleCenter2Pnt (in GEOM_Object thePnt1,
3435                                       in GEOM_Object thePnt2,
3436                                       in GEOM_Object thePnt3);
3437     /*!
3438      *  \brief Create an ellipse with given center, normal vector and radiuses.
3439      *  \param thePnt Ellipse center.
3440      *  \param theVec Vector, normal to the plane of the ellipse.
3441      *  \param theRMajor Major ellipse radius.
3442      *  \param theRMinor Minor ellipse radius.
3443      *  \return New GEOM_Object, containing the created ellipse.
3444      */
3445     GEOM_Object MakeEllipse (in GEOM_Object thePnt,
3446                              in GEOM_Object theVec,
3447                              in double theRMajor,
3448                              in double theRMinor);
3449
3450     /*!
3451      *  \brief Create an ellipse with given center, normal vector, main axis vector and radiuses.
3452      *  \param thePnt Ellipse center.
3453      *  \param theVec Vector, normal to the plane of the ellipse.
3454      *  \param theRMajor Major ellipse radius.
3455      *  \param theRMinor Minor ellipse radius.
3456      *  \param theVecMaj Vector, direction of the ellipse's main axis.
3457      *  \return New GEOM_Object, containing the created ellipse.
3458      */
3459     GEOM_Object MakeEllipseVec (in GEOM_Object thePnt,
3460                                 in GEOM_Object theVec,
3461                                 in double theRMajor,
3462                                 in double theRMinor,
3463                                 in GEOM_Object theVecMaj);
3464
3465     /*!
3466      *  \brief Create an arc of circle, passing through three given points.
3467      *  \param thePnt1 Start point of the arc.
3468      *  \param thePnt2 Middle point of the arc.
3469      *  \param thePnt3 End point of the arc.
3470      *  \return New GEOM_Object, containing the created arc.
3471      */
3472     GEOM_Object MakeArc (in GEOM_Object thePnt1,
3473                          in GEOM_Object thePnt2,
3474                          in GEOM_Object thePnt3);
3475
3476     /*!
3477      *  \brief Create an arc of circle of center C from one point to another
3478      *  \param theCenter Center point of the arc.
3479      *  \param thePnt1 Start point of the arc.
3480      *  \param thePnt2 End point of the arc.
3481      *  \param theSense Orientation of the arc
3482      *  \return New GEOM_Object, containing the created arc.
3483      */
3484     GEOM_Object MakeArcCenter (in GEOM_Object theCenter,
3485                                in GEOM_Object thePnt1,
3486                                in GEOM_Object thePnt2,
3487                                in boolean theSense);
3488
3489     /*!
3490      *  \brief Create an arc of ellipse of center C and two points P1 P2.
3491      *  \param theCenter Center point of the arc.
3492      *  \param thePnt1 Major radius is distance from center to Pnt1.
3493      *  \param thePnt2 define a plane and Minor radius as a shortest
3494      *                 distance from Pnt2 to vector Center->Pnt1.
3495      *  \return New GEOM_Object, containing the created arc.
3496      */
3497     GEOM_Object MakeArcOfEllipse (in GEOM_Object theCenter,
3498                                   in GEOM_Object thePnt1,
3499                                   in GEOM_Object thePnt2);
3500
3501
3502     /*!
3503      *  \brief Create a polyline on the set of points.
3504      *  \param thePoints Sequence of points for the polyline.
3505      *  \param theIsClosed If TRUE, build a closed wire.
3506      *  \return New GEOM_Object, containing the created polyline.
3507      */
3508     GEOM_Object MakePolyline (in ListOfGO thePoints,
3509                               in boolean  theIsClosed);
3510
3511     /*!
3512      *  \brief Create bezier curve on the set of points.
3513      *  \param thePoints Sequence of points for the bezier curve.
3514      *  \param theIsClosed If TRUE, build a closed curve.
3515      *  \return New GEOM_Object, containing the created bezier curve.
3516      */
3517     GEOM_Object MakeSplineBezier (in ListOfGO thePoints,
3518                                   in boolean  theIsClosed);
3519
3520     /*!
3521      *  \brief Create B-Spline curve on the set of points.
3522      *  \param thePoints Sequence of points for the B-Spline curve.
3523      *  \param theIsClosed If TRUE, build a closed curve.
3524      *  \param theDoReordering If TRUE, the algo does not follow the order of
3525      *                         \a thePoints but searches for the closest vertex.
3526      *  \return New GEOM_Object, containing the created B-Spline curve.
3527      */
3528     GEOM_Object MakeSplineInterpolation (in ListOfGO thePoints,
3529                                          in boolean  theIsClosed,
3530                                          in boolean  theDoReordering);
3531
3532     /*!
3533      *  \brief Create B-Spline curve on the set of points.
3534      *  \param thePoints Sequence of points for the B-Spline curve.
3535      *  \param theFirstVec Vector object, defining the curve direction at its first point.
3536      *  \param theLastVec Vector object, defining the curve direction at its last point.
3537      *  \return New GEOM_Object, containing the created B-Spline curve.
3538      */
3539     GEOM_Object MakeSplineInterpolWithTangents (in ListOfGO    thePoints,
3540                                                 in GEOM_Object theFirstVec,
3541                                                 in GEOM_Object theLastVec);
3542
3543     /*!
3544      *  \brief Creates a curve using the parametric definition of the basic points.
3545      *  \param thexExpr parametric equation of the coordinates X.
3546      *  \param theyExpr parametric equation of the coordinates Y.
3547      *  \param thezExpr parametric equation of the coordinates Z.
3548      *  \param theParamMin the minimal value of the parameter.
3549      *  \param theParamMax the maximum value of the parameter.
3550      *  \param theParamStep the step of the parameter.
3551      *  \param theCurveType the type of the curve.
3552      *  \return New GEOM_Object, containing the created curve.
3553      */    
3554     GEOM_Object MakeCurveParametric(in string thexExpr,
3555                                     in string theyExpr,
3556                                     in string thezExpr,
3557                                     in double theParamMin,
3558                                     in double theParamMax,
3559                                     in double theParamStep,
3560                                     in curve_type theCurveType);
3561
3562      /*!
3563      *  \brief Creates a curve using the parametric definition of the basic points.
3564      *  \param thexExpr parametric equation of the coordinates X.
3565      *  \param theyExpr parametric equation of the coordinates Y.
3566      *  \param thezExpr parametric equation of the coordinates Z.
3567      *  \param theParamMin the minimal value of the parameter.
3568      *  \param theParamMax the maximum value of the parameter.
3569      *  \param theParamNbStep the number of steps of the parameter discretization.
3570      *  \param theCurveType the type of the curve.
3571      *  \return New GEOM_Object, containing the created curve.
3572      */    
3573     GEOM_Object MakeCurveParametricNew(in string thexExpr,
3574                     in string theyExpr,
3575                     in string thezExpr,
3576                     in double theParamMin,
3577                     in double theParamMax,
3578                     in long   theParamNbStep,
3579                     in curve_type theCurveType);
3580
3581      /*!
3582      *  \brief Creates an isoline curve on a face.
3583      *  \param theFace the face for which an isoline is created.
3584      *  \param IsUIsoline True for U-isoline creation; False for V-isoline
3585      *         creation.
3586      *  \param theParameter the U parameter for U-isoline or V parameter
3587      *         for V-isoline.
3588      *  \return New GEOM_Object, containing the created isoline edge or a
3589      *          compound of edges.
3590      */
3591     GEOM_Object MakeIsoline(in GEOM_Object theFace,
3592                             in boolean     IsUIsoline,
3593                             in double      theParameter);
3594
3595     /*!
3596      *  \brief Create a sketcher (wire or face), following the textual description,
3597      *         passed through \a theCommand argument.
3598      *
3599      *  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
3600      *  Format of the description string has to be the following:
3601      *
3602      *  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
3603      *
3604      *  Where:
3605      *  - x1, y1 are coordinates of the first sketcher point (zero by default),
3606      *  - CMD is one of
3607      *     - "R angle" : Set the direction by angle
3608      *     - "D dx dy" : Set the direction by DX & DY
3609      *     .
3610      *       \n
3611      *     - "TT x y" : Create segment by point at X & Y
3612      *     - "T dx dy" : Create segment by point with DX & DY
3613      *     - "L length" : Create segment by direction & Length
3614      *     - "IX x" : Create segment by direction & Intersect. X
3615      *     - "IY y" : Create segment by direction & Intersect. Y
3616      *     .
3617      *       \n
3618      *     - "C radius length" : Create arc by direction, radius and length(in degree)
3619      *     .
3620      *       \n
3621      *     - "WW" : Close Wire (to finish)
3622      *     - "WF" : Close Wire and build face (to finish)
3623      *
3624      *  \param theCommand String, defining the sketcher in local
3625      *                    coordinates of the working plane.
3626      *  \param theWorkingPlane Nine double values, defining origin,
3627      *                         OZ and OX directions of the working plane.
3628      *  \return New GEOM_Object, containing the created wire or face.
3629      */
3630     GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane);
3631
3632     /*!
3633      *  \brief Create a sketcher (wire or face), following the textual description,
3634      *         passed through \a theCommand argument. 
3635      *
3636      *  For format of the description string see the previous method.\n
3637      *
3638      *  \param theCommand String, defining the sketcher in local
3639      *                    coordinates of the working plane.
3640      *  \param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
3641      *  \return New GEOM_Object, containing the created wire or face.
3642      */
3643     GEOM_Object MakeSketcherOnPlane (in string theCommand, in GEOM_Object theWorkingPlane);
3644
3645     /*!
3646      *  \brief Create a 3D sketcher, following the textual description,
3647      *         passed through \a theCommand argument. 
3648      *
3649      *  Format of the description string has to be the following:
3650      *
3651      *  "3DSketcher:CMD[:CMD[:CMD...]]"
3652      *
3653      *  Where CMD is one of
3654      *     - "TT x y z" : Create segment by point at X & Y or set the first point
3655      *     - "T dx dy dz" : Create segment by point with DX & DY
3656      *     .
3657      *       \n
3658      *     - "OXY angleX angle2 length" : Create segment by two angles and length
3659      *     - "OYZ angleY angle2 length" : Create segment by two angles and length
3660      *     - "OXZ angleX angle2 length" : Create segment by two angles and length
3661      *     .
3662      *       \n
3663      *     - "WW" : Close Wire (to finish)
3664      *
3665      *  \param theCommand String, defining the sketcher in local
3666      *                    coordinates of the working plane.
3667      *  \return New GEOM_Object, containing the created wire.
3668      */
3669     GEOM_Object Make3DSketcherCommand (in string theCommand);
3670
3671     /*!
3672      *  \brief Create a 3D sketcher, made of a straight segments, joining points
3673      *         with coordinates passed through \a theCoordinates argument. 
3674      *
3675      *  Order of coordinates has to be the following:
3676      *  x1, y1, z1, x2, y2, z2, ..., xN, yN, zN
3677      *
3678      *  \param theCoordinates List of double values.
3679      *  \return New GEOM_Object, containing the created wire.
3680      */
3681     GEOM_Object Make3DSketcher (in ListOfDouble theCoordinates);
3682
3683     /*!
3684      *  \brief Create a 2D polyline (wire or a compound of wires).
3685      *
3686      *  The polyline can have several sections. Each section represents a set
3687      *  of points in the form of list of coordinates of the following order:
3688      *  x1, y1, x2, y2, ..., xN, yN
3689      *  Each section has its own name, type of curve (can be either
3690      *  GEOM::Polyline or GEOM::Interpolation) and Closed flag.
3691      *  For each section a wire is created. It represents either a polyline or
3692      *  interpolation BSpline either closed or not depending on the Closed flag.
3693      *  The result represents a wire if there is only one section is defined.
3694      *  Otherwise a compound of wires is returned.
3695      *
3696      *  \param theCoordsList the list of coordinates list. theCoordsList[0]
3697      *         is the coordinates list of the first section. theCoordsList[1]
3698      *         is for the second section etc.
3699      *  \param theNamesList the list of names. The order corresponds to
3700      *         theCoordsList.
3701      *  \param theTypesList the list of curve types. The order corresponds to
3702      *         theCoordsList.
3703      *  \param theClosedList the list of Closed flags. The order corresponds to
3704      *         theCoordsList.
3705      *  \param theWorkingPlane 9 double values, defining origin,
3706      *         OZ and OX directions of the working plane.
3707      *  \return New GEOM_Object, containing the created wire or a compound
3708      *          of wires.
3709      */
3710     GEOM_Object MakePolyline2D (in ListOfListOfDouble theCoordsList,
3711                                 in string_array       theNamesList,
3712                                 in short_array        theTypesList,
3713                                 in ListOfBool         theClosedList,
3714                                 in ListOfDouble       theWorkingPlane);
3715
3716     /*!
3717      *  \brief Create a 2D polyline (wire or a compound of wires).
3718      *
3719      *  The polyline can have several sections. Each section represents a set
3720      *  of points in the form of list of coordinates of the following order:
3721      *  x1, y1, x2, y2, ..., xN, yN
3722      *  Each section has its own name, type of curve (can be either
3723      *  GEOM::Polyline or GEOM::Interpolation) and Closed flag.
3724      *  For each section a wire is created. It represents either a polyline or
3725      *  interpolation BSpline either closed or not depending on the Closed flag.
3726      *  The result represents a wire if there is only one section is defined.
3727      *  Otherwise a compound of wires is returned.
3728      *
3729      *  \param theCoordsList the list of coordinates list. theCoordsList[0]
3730      *         is the coordinates list of the first section. theCoordsList[1]
3731      *         is for the second section etc.
3732      *  \param theNamesList the list of names. The order corresponds to
3733      *         theCoordsList.
3734      *  \param theTypesList the list of curve types. The order corresponds to
3735      *         theCoordsList.
3736      *  \param theClosedList the list of Closed flags. The order corresponds to
3737      *         theCoordsList.
3738      *  \param theWorkingPlane planar Face or LCS(Marker) of the working plane.
3739      *  \return New GEOM_Object, containing the created wire or a compound
3740      *          of wires.
3741      */
3742     GEOM_Object MakePolyline2DOnPlane (in ListOfListOfDouble theCoordsList,
3743                                        in string_array       theNamesList,
3744                                        in short_array        theTypesList,
3745                                        in ListOfBool         theClosedList,
3746                                        in GEOM_Object        theWorkingPlane);
3747
3748   };
3749
3750  // # GEOM_ILocalOperations:
3751   /*!
3752    *  \brief Interface for fillet and chamfer creation.
3753    */
3754   interface GEOM_ILocalOperations : GEOM_IOperations
3755   {
3756     /*!
3757      *  \brief Perform a fillet on all edges of the given shape.
3758      *  \param theShape Shape, to perform fillet on.
3759      *  \param theR Fillet radius.
3760      *  \return New GEOM_Object, containing the result shape.
3761      */
3762     GEOM_Object MakeFilletAll (in GEOM_Object theShape,
3763                                in double      theR);
3764
3765     /*!
3766      *  \brief Perform a fillet on the specified edges of the given shape
3767      *  \param theShape Shape, to perform fillet on.
3768      *  \param theR Fillet radius.
3769      *  \param theEdges Global indices of edges to perform fillet on.
3770      *    \note Global index of sub-shape can be obtained, using method
3771      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3772      *  \return New GEOM_Object, containing the result shape.
3773      */
3774     GEOM_Object MakeFilletEdges (in GEOM_Object theShape,
3775                                  in double      theR,
3776                                  in ListOfLong  theEdges);
3777     GEOM_Object MakeFilletEdgesR1R2 (in GEOM_Object theShape,
3778                                      in double      theR1,
3779                                      in double      theR2,
3780                                      in ListOfLong  theEdges);
3781
3782     /*!
3783      *  \brief Perform a fillet on all edges of the specified faces of the given shape.
3784      *  \param theShape Shape, to perform fillet on.
3785      *  \param theR Fillet radius.
3786      *  \param theFaces Global indices of faces to perform fillet on.
3787      *    \note Global index of sub-shape can be obtained, using method
3788      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3789      *  \return New GEOM_Object, containing the result shape.
3790      */
3791     GEOM_Object MakeFilletFaces (in GEOM_Object theShape,
3792                                  in double      theR,
3793                                  in ListOfLong  theFaces);
3794
3795     GEOM_Object MakeFilletFacesR1R2 (in GEOM_Object theShape,
3796                                      in double      theR1,
3797                                      in double      theR2,
3798                                      in ListOfLong  theFaces);
3799
3800     /*!
3801      *  \brief Perform a fillet on a face or a shell at the specified vertexes.
3802      *  \param theShape Shape, to perform fillet on.
3803      *  \param theR Fillet radius.
3804      *  \param theVertexes Global indices of vertexes to perform fillet on.
3805      *    \note Global index of sub-shape can be obtained, using method
3806      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3807      *  \return New GEOM_Object, containing the result shape.
3808      */
3809     GEOM_Object MakeFillet2D (in GEOM_Object theShape,
3810                               in double      theR,
3811                               in ListOfLong  theVertexes);
3812
3813     /*!
3814      *  \brief Perform a fillet on edges of the specified vertexes of the given wire.
3815      *  \param theShape Shape, to perform fillet on.
3816      *  \param theR Fillet radius.
3817      *  \param theVertexes Global indices of vertexes to perform fillet on.
3818      *    \note Global index of sub-shape can be obtained, using method
3819      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3820      *    \note The list of vertices could be empty, in this case fillet fill be done
3821      *          at all vertices in given wire
3822      *  \param doIgnoreSecantVertices If FALSE, fillet radius is always limited
3823      *         by the length of the edges, nearest to the fillet vertex.
3824      *         But sometimes the next edge is C1 continuous with the one, nearest to
3825      *         the fillet point, and such two (or more) edges can be united to allow
3826      *         bigger radius. Set this flag to TRUE to allow collinear edges union,
3827      *         thus ignoring the secant vertex (vertices).
3828      *  \return New GEOM_Object, containing the result shape.
3829      */
3830     GEOM_Object MakeFillet1D (in GEOM_Object theShape,
3831                               in double      theR,
3832                               in ListOfLong  theVertexes,
3833                               in boolean     doIgnoreSecantVertices);
3834
3835     /*!
3836      *  \brief Perform a symmetric chamfer on all edges of the given shape.
3837      *  \param theShape Shape, to perform chamfer on.
3838      *  \param theD Chamfer size along each face.
3839      *  \return New GEOM_Object, containing the result shape.
3840      */
3841     GEOM_Object MakeChamferAll (in GEOM_Object theShape,
3842                                 in double      theD);
3843
3844     /*!
3845      *  \brief Perform a chamfer on edges, common to the specified faces.
3846      *  with distance D1 on the Face1
3847      *  \param theShape Shape, to perform chamfer on.
3848      *  \param theD1 Chamfer size along \a theFace1.
3849      *  \param theD2 Chamfer size along \a theFace2.
3850      *  \param theFace1,theFace2 Global indices of two faces of \a theShape.
3851      *    \note Global index of sub-shape can be obtained, using method
3852      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3853      *  \return New GEOM_Object, containing the result shape.
3854      */
3855     GEOM_Object MakeChamferEdge (in GEOM_Object theShape,
3856                                  in double theD1, in double theD2,
3857                                  in long theFace1, in long theFace2);
3858     /*!
3859      *  \brief The Same but with params theD = Chamfer Length
3860      *  and theAngle = Chamfer Angle (Angle in radians)
3861      */
3862     GEOM_Object MakeChamferEdgeAD (in GEOM_Object theShape,
3863                                    in double theD, in double theAngle,
3864                                    in long theFace1, in long theFace2);
3865
3866     /*!
3867      *  \brief Perform a chamfer on all edges of the specified faces.
3868      *  with distance D1 on the first specified face (if several for one edge)
3869      *  \param theShape Shape, to perform chamfer on.
3870      *  \param theD1 Chamfer size along face from \a theFaces. If both faces,
3871      *               connected to the edge, are in \a theFaces, \a theD1
3872      *               will be get along face, which is nearer to \a theFaces beginning.
3873      *  \param theD2 Chamfer size along another of two faces, connected to the edge.
3874      *  \param theFaces Sequence of global indices of faces of \a theShape.
3875      *    \note Global index of sub-shape can be obtained, using method
3876      *          <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3877      *  \return New GEOM_Object, containing the result shape.
3878      */
3879     GEOM_Object MakeChamferFaces (in GEOM_Object theShape,
3880                                   in double theD1, in double theD2,
3881                                   in ListOfLong theFaces);
3882     /*!
3883      *  The Same but with params theD = Chamfer Length
3884      *  and theAngle = Chamfer Angle (Angle in radians)
3885      */
3886     GEOM_Object MakeChamferFacesAD (in GEOM_Object theShape,
3887                                     in double theD, in double theAngle,
3888                                     in ListOfLong theFaces);
3889
3890    /*!
3891     *  \brief Perform a chamfer on edges,
3892     *  with distance D1 on the first specified face (if several for one edge)
3893     *  \param theShape Shape, to perform chamfer on.
3894     *  \param theD1,theD2 Chamfer size
3895     *  \param theEdges Sequence of edges of \a theShape.
3896     *  \return New GEOM_Object, containing the result shape.
3897     */
3898     GEOM_Object MakeChamferEdges (in GEOM_Object theShape,
3899                                   in double theD1, in double theD2,
3900                                   in ListOfLong theEdges);
3901     /*!
3902      *  The Same but with params theD = Chamfer Length
3903      *  and theAngle = Chamfer Angle (Angle in radians)
3904      */
3905     GEOM_Object MakeChamferEdgesAD (in GEOM_Object theShape,
3906                                     in double theD, in double theAngle,
3907                                     in ListOfLong theEdges);
3908
3909     /*!
3910      *  \brief Perform an Archimde operation on the given shape with given parameters.
3911      *                    The object presenting the resulting face is returned
3912      *  \param theShape Shape to be put in water.
3913      *  \param theWeight Weight og the shape.
3914      *  \param theWaterDensity Density of the water.
3915      *  \param theMeshDeflection Deflection od the mesh, using to compute the section.
3916      *  \return New GEOM_Object, containing a section of \a theShape
3917      *          by a plane, corresponding to water level.
3918      */
3919     GEOM_Object MakeArchimede (in GEOM_Object theShape,
3920                                in double theWeight,
3921                                in double theWaterDensity,
3922                                in double theMeshDeflection);
3923
3924     /*!
3925      *  \brief Duplicates <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR>.
3926      *
3927      *  Present here only for compatibility.
3928      */
3929     long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape);
3930   };
3931
3932  // #  GEOM_IHealingOperations: 
3933   /*!
3934    *  \brief Interface for shape healing operations
3935    *
3936    *  Shape Processing, SuppressFaces, etc.
3937    */
3938   interface GEOM_IHealingOperations : GEOM_IOperations
3939   {
3940     /*!
3941      *  \brief Apply a sequence of Shape Healing operators to the given object.
3942      *  \param theShapes Shape to be processed.
3943      *  \param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
3944      *  \param theParameters List of names of parameters
3945      *                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
3946      *  \param theValues List of values of parameters, in the same order
3947      *                    as parameters are listed in \a theParameters list.
3948      *  \return New GEOM_Object, containing processed shape.
3949      */
3950     GEOM_Object ProcessShape (in GEOM_Object theShapes,
3951                               in string_array theOperators,
3952                               in string_array theParameters,
3953                               in string_array theValues);
3954
3955     /*!
3956      *  \brief Get default sequence of operators, their parameters and parameters' values
3957      *  of Shape Process operation. 
3958      *
3959      *  In the current implementation the defaults are
3960      *  read from the file pointed by CSF_ShHealingDefaults environmental variable.
3961      *  \param theOperators Output. Default list of names of operators.
3962      *  \param theParameters Output. Default list of names of parameters.
3963      *  \param theValues Output. List of default values of parameters, in the same order
3964      *                           as parameters are listed in \a theParameters list.
3965      */
3966     void GetShapeProcessParameters (out string_array theOperators,
3967                                     out string_array theParameters,
3968                                     out string_array theValues);
3969     /*!
3970      *  \brief Get parameters and parameters' values for the given Shape Process operation.
3971      *
3972      *  In the current implementation the defaults are
3973      *  read from the file pointed by CSF_ShHealingDefaults environmental variable.
3974      *  \param theOperator Input. The operator's name.
3975      *  \param theParameters Output. Default list of names of parameters.
3976      *  \param theValues Output. List of default values of parameters, in the same order
3977      *                           as parameters are listed in \a theParameters list.
3978      */
3979     void GetOperatorParameters (in string theOperator,
3980                                 out string_array theParameters,
3981                                 out string_array theValues);
3982
3983     /*!
3984      *  \brief Remove faces from the given object (shape).
3985      *  \param theObject Shape to be processed.
3986      *  \param theFaces Indices of faces to be removed, if EMPTY then the method
3987      *                  removes ALL faces of the given object.
3988      *  \return New GEOM_Object, containing processed shape.
3989      */
3990     GEOM_Object SuppressFaces (in GEOM_Object theObject, in short_array theFaces);
3991
3992     /*!
3993      *  \brief Close an open wire.
3994      *  \param theObject Shape to be processed.
3995      *  \param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
3996      *                  if -1, then theObject itself is a wire.
3997      *  \param isCommonVertex If TRUE : closure by creation of a common vertex,
3998      *                        If FALS : closure by creation of an edge between ends.
3999      *  \return New GEOM_Object, containing processed shape.
4000      */
4001     GEOM_Object CloseContour (in GEOM_Object theObject, in short_array theWires,
4002                               in boolean isCommonVertex);
4003
4004     /*!
4005      *  \brief Remove internal wires and edges from the given object (face).
4006      *  \param theObject Shape to be processed.
4007      *  \param theWires Indices of wires to be removed, if EMPTY then the method
4008      *                  removes ALL internal wires of the given object.
4009      *  \return New GEOM_Object, containing processed shape.
4010      */
4011     GEOM_Object RemoveIntWires (in GEOM_Object theObject, in short_array theWires);
4012
4013     /*!
4014      *  \brief Remove internal closed contours (holes) from the given object.
4015      *  \param theObject Shape to be processed.
4016      *  \param theWires Indices of wires to be removed, if EMPTY then the method
4017      *                  removes ALL internal holes of the given object
4018      *  \return New GEOM_Object, containing processed shape.
4019      */
4020     GEOM_Object FillHoles (in GEOM_Object theObject, in short_array theWires);
4021
4022     /*!
4023      *  Sewing of the given object.
4024      *  \param theObjects Shapes to be processed.
4025      *  \param theTolerance Required tolerance value.
4026      *  \return New GEOM_Object, containing processed shape.
4027      */
4028     GEOM_Object Sew (in ListOfGO theObjects, in double theTolerance);
4029
4030     /*!
4031      *  Sewing of the given object. Allows non-manifold sewing.
4032      *  \param theObjects Shapes to be processed.
4033      *  \param theTolerance Required tolerance value.
4034      *  \return New GEOM_Object, containing processed shape.
4035      */
4036     GEOM_Object SewAllowNonManifold(in ListOfGO theObjects, in double theTolerance);
4037
4038     /*!
4039      *  Rebuild the topology of theSolids by removing
4040      *  the faces that are shared by several solids.
4041      *  \param theSolids A list of shapes containing solids to be processed.
4042      *  \return New GEOM_Object, containing processed shape.
4043      */
4044     GEOM_Object RemoveInternalFaces (in ListOfGO theSolids);
4045
4046     /*!
4047      *  \brief Addition of a point to a given edge of \a theObject.
4048      *  \param theObject Shape to be processed.
4049      *  \param theEdgeIndex Index of edge to be divided within theObject's shape,
4050      *                      if -1, then theObject itself is the edge.
4051      *  \param theValue Value of parameter on edge or length parameter,
4052      *                  depending on \a isByParameter.
4053      *  \param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1],
4054      *                       if FALSE : \a theValue is treated as a length parameter [0..1]
4055      *  \return New GEOM_Object, containing the processed shape.
4056      */
4057     GEOM_Object DivideEdge (in GEOM_Object theObject, in short theEdgeIndex,
4058                             in double theValue, in boolean isByParameter);
4059
4060     /*!
4061      *  \brief Addition of points to a given edge of \a theObject by projecting
4062      *         other points to the given edge.
4063      *  \param theObject Shape to be processed.
4064      *  \param theEdgeIndex Index of edge to be divided within theObject's shape,
4065      *                      if -1, then theObject itself is the edge.
4066      *  \param thePoints Points to project to theEdgeIndex-th edge.
4067      *  \return New GEOM_Object, containing the processed shape.
4068      */
4069     GEOM_Object DivideEdgeByPoint (in GEOM_Object theObject,
4070                                    in short       theEdgeIndex,
4071                                    in ListOfGO    thePoints);
4072
4073     /*!
4074      *  \brief Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
4075      *  \param theWire Wire to minimize the number of C1 continuous edges in.
4076      *  \param theVertices A list of vertices to suppress. If the list
4077      *                     is empty, all vertices in a wire will be assumed.
4078      *  \return New GEOM_Object with modified wire.
4079      */
4080     GEOM_Object FuseCollinearEdgesWithinWire (in GEOM_Object theWire,
4081                                               in ListOfGO theVertices);
4082
4083     /*!
4084      *  \brief Get a list of wires (wrapped in GEOM_Object-s),
4085      *  that constitute a free boundary of the given shapes.
4086      *  \param theObjects Shapes to get free boundary of.
4087      *  \param theClosedWires Output. Closed wires on the free boundary of the given shape.
4088      *  \param theOpenWires Output. Open wires on the free boundary of the given shape.
4089      *  \return FALSE, if an error(s) occurred during the method execution.
4090      */
4091     boolean GetFreeBoundary (in  ListOfGO theObjects,
4092                              out ListOfGO theClosedWires,
4093                              out ListOfGO theOpenWires);
4094
4095     /*!
4096      *  \brief Change orientation of the given object.
4097      *  \param theObject Shape to be processed.
4098      *  \return New GEOM_Object, containing processed shape.
4099      */
4100     GEOM_Object ChangeOrientation (in GEOM_Object theObject);
4101     GEOM_Object ChangeOrientationCopy (in GEOM_Object theObject);
4102
4103     /*!
4104      *  \brief Try to limit tolerance of the given object by value \a theTolerance.
4105      *  \param theObject Shape to be processed.
4106      *  \param theTolerance Required tolerance value.
4107      *  \return New GEOM_Object, containing processed shape.
4108      */
4109     GEOM_Object LimitTolerance (in GEOM_Object theObject, in double theTolerance);
4110
4111
4112     /*!
4113      *  \brief Return information on what has been done by the last called healing method.
4114      *  \return ModifStatistics, information container.
4115      */
4116     ModifStatistics GetStatistics();
4117   };
4118
4119  // # GEOM_IInsertOperations:
4120   /*!
4121    *  \brief Interface for shape insert operations (like copy, import).
4122    *
4123    */
4124   interface GEOM_IInsertOperations : GEOM_IOperations
4125   {
4126     /*!
4127      *  \brief Create a copy of the given object
4128      */
4129     GEOM_Object MakeCopy (in GEOM_Object theOriginal);
4130
4131     /*!
4132      *  \brief Deprecated method. Use Export\<FormatName\> (from the
4133      *  corresponding plugin) instead; here \<FormatName\> is a name of format.
4134      *
4135      *  \brief Export the given shape into a file with given name.
4136      *  \param theObject Shape to be stored in the file.
4137      *  \param theFileName Name of the file to store the given shape in.
4138      *  \param theFormatName Specify format for the shape storage.
4139      */
4140     void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName);
4141
4142     /*!
4143      *  \brief Deprecated method. Use Import\<FormatName\> (from the
4144      *  corresponding plugin) instead; here \<FormatName\> is a name of format.
4145      *
4146      *  \brief Import a shape from the STL, BREP, IGES or STEP file
4147      *  (depends on given format) with given name.
4148      *  \param theFileName The file, containing the shape.
4149      *  \param theFormatName Specify format for the file reading.
4150      *         If format 'IGES_SCALE' is used instead of 'IGES' or
4151      *            format 'STEP_SCALE' is used instead of 'STEP',
4152      *            file length unit will be ignored (set to 'meter') and result model will be scaled.
4153      *  \return List of GEOM_Object, containing the created shape and groups of materials.
4154      */
4155     ListOfGBO ImportFile (in string theFileName, in string theFormatName);
4156
4157     /*!
4158      *  \brief Deprecated method. Use ReadValue (from the corresponding plugin) instead.
4159      *
4160      *  \brief Read a value of parameter from a file, containing a shape.
4161      *  \param theFileName The file, containing the shape.
4162      *  \param theFormatName Specify format for the file reading.
4163      *  \param theParameterName Specify the parameter. For example, pass "LEN_UNITS"
4164      *                          to obtain length units, in which the file is written.
4165      *  \return Value of requested parameter in form of text string.
4166      */
4167     string ReadValue (in string theFileName, in string theFormatName, in string theParameterName);
4168
4169     /*!
4170      *  \brief Read a shape from the binary stream, containing its bounding representation (BRep).
4171      *  \note GEOM_Object::GetShapeStream() method can be used to obtain the shape's BRep stream.
4172      *  \param theStream The BRep binary stream.
4173      *  \return New GEOM_Object, containing the shape, read from theStream.
4174      */
4175     GEOM_Object RestoreShape (in SALOMEDS::TMPFile theStream);
4176
4177     /*!
4178      * \brief Load texture from file
4179      * \param theTextureFile texture file name
4180      * \return unique texture identifier
4181      */
4182     long LoadTexture(in string theTextureFile);
4183
4184     /*!
4185      * \brief Add texture to the study
4186      * \param theWidth texture width in pixels
4187      * \param theHeight texture height in pixels
4188      * \param theTexture texture byte array
4189      * \return unique texture identifier
4190      */
4191     long AddTexture(in long theWidth, in long theHeight, in SALOMEDS::TMPFile theTexture);
4192
4193     /*!
4194      * \brief Get previously loaded texture data
4195      * \param theID texture identifier
4196      * \param theWidth texture width in pixels
4197      * \param theHeight texture height in pixels
4198      * \return texture byte array
4199      */
4200     SALOMEDS::TMPFile GetTexture(in long theID, out long theWidth, out long theHeight);
4201
4202     /*!
4203      * \brief Get list of all available texture IDs
4204      * \return list of all texture IDs available for the current study
4205      */
4206     ListOfLong GetAllTextures();
4207
4208     /*!
4209      *  \brief Non-topological information transfer datum.
4210      */
4211     struct TransferDatum
4212     {
4213       string myName;
4214       long   myNumber;
4215       long   myMaxNumber;
4216     };
4217
4218     /*!
4219      *  \brief Sequence of non-topological information transfer data.
4220      */
4221     typedef sequence<TransferDatum> ListOfTransferDatum;
4222
4223     /*!
4224      *  \brief Transfer non-topological data from one object to another
4225      *  \param theObjectFrom the source object of non-topological data
4226      *  \param theObjectTo the destination object of non-topological data
4227      *  \param theFindMethod method to search sub-shapes of theObjectFrom
4228      *         in shape theObjectTo. Possible values are: GEOM::FSM_GetInPlace,
4229      *         GEOM::FSM_GetInPlaceByHistory and GEOM::FSM_GetInPlace_Old.
4230      *         Other values of GEOM::find_shape_method are not supported.
4231      *  \param theResult statistics of the operation. Output parameter. It
4232      *         represents a sequence of Transfer Datum. A datum has the type
4233      *         (string code), the total number of items of this type and
4234      *         the number of transferred items.
4235      *  \return true in case of success; otherwise false.
4236      */
4237     boolean TransferData(in  GEOM_Object         theObjectFrom,
4238                          in  GEOM_Object         theObjectTo,
4239                          in  find_shape_method   theFindMethod,
4240                          out ListOfTransferDatum theResult);
4241
4242   };
4243
4244  // # GEOM_IKindOfShape:
4245   /*!
4246    *  \brief Interface for shape_kind enumeration.
4247    */
4248   interface GEOM_IKindOfShape
4249   {
4250     enum shape_kind {
4251       NO_SHAPE,
4252       //COMPOSITEs
4253       COMPOUND,
4254       COMPSOLID,
4255       SHELL,
4256       WIRE,
4257       // SOLIDs
4258       /*! full sphere */
4259       SPHERE,
4260       /*! cylinder */
4261       CYLINDER,
4262       /*! box with faces, parallel to global coordinate planes */
4263       BOX,
4264       /*! other box */
4265       ROTATED_BOX, 
4266       /*! full torus */
4267       TORUS,   
4268       /*! cone */  
4269       CONE,   
4270       /*! solid, bounded by polygons */
4271       POLYHEDRON,  
4272       /*! other solid */
4273       SOLID,       
4274       // FACEs
4275       /*! spherical face (closed) */
4276       SPHERE2D,    
4277       /*! cylindrical face with defined height */
4278       CYLINDER2D,
4279       /*! toroidal face (closed) */
4280       TORUS2D,     
4281       /*! conical face with defined height */
4282       CONE2D,
4283       /*! planar, bounded by circle */
4284       DISK_CIRCLE,
4285       /*! planar, bounded by ellipse */
4286       DISK_ELLIPSE,
4287       /*! planar, bounded by segments */
4288       POLYGON,     
4289       /*! infinite planar */
4290       PLANE,        
4291        /*! other planar */
4292       PLANAR,      
4293       /*! other face */
4294       FACE,      
4295       // EDGEs
4296       /*! full circle */
4297       CIRCLE,      
4298       /*! arc of circle */
4299       ARC_CIRCLE, 
4300       /*! full ellipse */
4301       ELLIPSE,    
4302       /*! arc of ellipse */
4303       ARC_ELLIPSE,  
4304       /*! infinite segment */
4305       LINE,         
4306       /*! segment */
4307       SEGMENT,      
4308       /*! other edge */
4309       EDGE,       
4310       // VERTEX
4311       VERTEX,
4312       // ADVANCED shapes
4313       LCS,
4314       /*! all advanced shapes (temporary implementation) */
4315       ADVANCED    
4316     };
4317   };
4318
4319  // # GEOM_IMeasureOperations:
4320   /*!
4321    *  \brief Interface for measurement (distance, whatis) and
4322    *  properties calculation (like Centre of Mass, Inertia, etc.).
4323    *
4324    */
4325   interface GEOM_IMeasureOperations : GEOM_IOperations
4326   {
4327     /*!
4328      *  \brief Get kind of theShape.
4329      *  \param theShape Shape to get a kind of.
4330      *  \param theIntegers Output. Integer and enumerated shape's parameters
4331      *                     (kind of surface, closed/unclosed, number of edges, etc.)
4332      *  \param theDoubles  Output. Double shape's parameters (coordinates, dimensions, etc.)
4333      *  \note  Concrete meaning of each value, returned via \a theIntegers
4334      *         or \a theDoubles list depends on the kind of the shape.
4335      *  \return Returns a kind of shape in terms of <VAR>GEOM_IKindOfShape.shape_kind</VAR> enumeration.
4336      */
4337     //short KindOfShape (in GEOM_Object   theShape,
4338     GEOM_IKindOfShape::shape_kind KindOfShape (in  GEOM_Object  theShape,
4339                                                out ListOfLong   theIntegers,
4340                                                out ListOfDouble theDoubles);
4341
4342     /*!
4343      *  \brief Get position (LCS) of theShape.
4344      *  \param theShape Shape to calculate position of.
4345      *  \param Ox,Oy,Oz Output. Coordinates of shape's location origin.
4346      *                  Origin of the LCS is situated at the shape's center of mass.
4347      *  \param Zx,Zy,Zz Output. Coordinates of shape's location normal(main) direction.
4348      *  \param Xx,Xy,Xz Output. Coordinates of shape's location X direction.
4349      *                  Axes of the LCS are obtained from shape's location or,
4350      *                  if the shape is a planar face, from position of its plane.
4351      *  \return Returns position of the shape through the last nine arguments.
4352      */
4353     void GetPosition (in GEOM_Object theShape,
4354                       out double Ox, out double Oy, out double Oz,
4355                       out double Zx, out double Zy, out double Zz,
4356                       out double Xx, out double Xy, out double Xz);
4357
4358     /*!
4359      *  \brief Get summarized length of all wires,
4360      *  area of surface and volume of the given shape.
4361      *  \param theShape Shape to define properties of.
4362      *  \param theTolerance maximal relative error of area and volume computation.
4363      *  \param theLength Output. Summarized length of all wires of the given shape.
4364      *  \param theSurfArea Output. Area of surface of the given shape.
4365      *  \param theVolume Output. Volume of the given shape.
4366      *  \return Returns shape properties through the last three arguments.
4367      */
4368     void GetBasicProperties (in GEOM_Object theShape,
4369                              in double theTolerance,
4370                              out double theLength,
4371                              out double theSurfArea,
4372                              out double theVolume);
4373
4374     /*!
4375      *  \brief Get a point, situated at the centre of mass of theShape.
4376      *  \param theShape Shape to define centre of mass of.
4377      *  \return New GEOM_Object, containing the created point.
4378      */
4379     GEOM_Object GetCentreOfMass (in GEOM_Object theShape);
4380
4381     /*
4382      *  Get the vertex by index for 1D objects
4383      *  \param theShape Shape (wire or edge) to find the vertex on it
4384      *  \param theIndex Index of vertex sub-shape
4385      *  \param theUseOri To consider edge/wire orientation or not
4386      *  \return New GEOM_Object, vertex.
4387      */
4388     GEOM_Object GetVertexByIndex( in GEOM_Object theShape, in long theIndex, in boolean theUseOri );
4389
4390     /*!
4391      *  \brief Get a vector, representing the normal of theFace.
4392      *  If the face is not planar, theOptionalPoint is obligatory.
4393      *  \param theFace Shape (face) to define the normal of.
4394      *  \param theOptionalPoint Shape (point) to define the normal at.
4395      *                          Can be NULL in case of planar face.
4396      *  \return New GEOM_Object, containing the created normal vector.
4397      */
4398     GEOM_Object GetNormal (in GEOM_Object theFace,
4399                            in GEOM_Object theOptionalPoint);
4400
4401     /*!
4402      *  \brief Get inertia matrix and moments of inertia of theShape.
4403      *  \param theShape Shape to calculate inertia of.
4404      *  \param I11,I12,I13,I21,I22,I23,I31,I32,I33 Output. Components of the inertia matrix of the given shape.
4405      *  \param Ix,Iy,Iz Output. Moments of inertia of the given shape.
4406      *  \return Returns inertia through the last twelve arguments.
4407      */
4408     void GetInertia (in GEOM_Object theShape,
4409                      out double I11, out double I12, out double I13,
4410                      out double I21, out double I22, out double I23,
4411                      out double I31, out double I32, out double I33,
4412                      out double Ix , out double Iy , out double Iz);
4413
4414     /*!
4415      *  \brief Get parameters of bounding box of the given shape
4416      *  \param theShape Shape to obtain bounding box of.
4417      *  \param precise TRUE for precise computation; FALSE for fast one.
4418      *  \param Xmin,Xmax Output. Limits of shape along OX axis.
4419      *  \param Ymin,Ymax Output. Limits of shape along OY axis.
4420      *  \param Zmin,Zmax Output. Limits of shape along OZ axis.
4421      *  \return Returns parameters of bounding box through the last six arguments.
4422      */
4423     void GetBoundingBox (in GEOM_Object theShape,
4424                          in boolean precise,
4425                          out double Xmin, out double Xmax,
4426                          out double Ymin, out double Ymax,
4427                          out double Zmin, out double Zmax);
4428
4429     /*!
4430      *  \brief Get bounding box of the given shape
4431      *  \param theShape Shape to obtain bounding box of.
4432      *  \param precise TRUE for precise computation; FALSE for fast one.
4433      *  \return New GEOM_Object, containing the created bounding box.
4434      */
4435     GEOM_Object MakeBoundingBox (in GEOM_Object theShape,
4436                                  in boolean precise);
4437
4438     /*!
4439      *  \brief Get min and max tolerances of sub-shapes of theShape
4440      *  \param theShape Shape, to get tolerances of.
4441      *  \param FaceMin,FaceMax Output. Min and max tolerances of the faces.
4442      *  \param EdgeMin,EdgeMax Output. Min and max tolerances of the edges.
4443      *  \param VertMin,VertMax Output. Min and max tolerances of the vertices.
4444      *  \return Returns shape tolerances through the last six arguments.
4445      */
4446     void GetTolerance (in GEOM_Object theShape,
4447                        out double FaceMin, out double FaceMax,
4448                        out double EdgeMin, out double EdgeMax,
4449                        out double VertMin, out double VertMax);
4450
4451     /*!
4452      *  \brief Enumeration of Shape defects coming from CheckShape algorithms.
4453      */
4454     enum ShapeErrorType
4455     {
4456       /* for vertices */
4457       InvalidPointOnCurve,
4458       InvalidPointOnCurveOnSurface,
4459       InvalidPointOnSurface,
4460
4461       /* for edges */
4462       No3DCurve,
4463       Multiple3DCurve,
4464       Invalid3DCurve,
4465       NoCurveOnSurface,
4466       InvalidCurveOnSurface,
4467       InvalidCurveOnClosedSurface,
4468       InvalidSameRangeFlag,
4469       InvalidSameParameterFlag,
4470       InvalidDegeneratedFlag,
4471
4472       FreeEdge,
4473       InvalidMultiConnexity,
4474       InvalidRange,
4475
4476       /* for wires */
4477       EmptyWire,
4478       RedundantEdge,
4479       SelfIntersectingWire, /* on a face */
4480
4481       /* for faces */
4482       NoSurface,
4483       InvalidWire,
4484       RedundantWire,
4485       IntersectingWires,
4486       InvalidImbricationOfWires,
4487
4488       /* for shells */
4489       EmptyShell,
4490       RedundantFace,
4491
4492       /* for shapes */
4493       UnorientableShape,
4494       NotClosed,
4495       NotConnected,
4496
4497       SubshapeNotInShape,
4498
4499       BadOrientation,
4500       BadOrientationOfSubshape,
4501
4502       InvalidToleranceValue,
4503
4504       /* for exception */
4505       CheckFail
4506     };
4507
4508     /*!
4509      *  \brief Description of a shape defect: type and incriminated sub-shapes.
4510      */
4511     struct ShapeError
4512     {
4513       ShapeErrorType error;
4514       ListOfLong     incriminated;
4515     };
4516
4517     /*!
4518      *  \brief Sequence of all shape defects.
4519      */
4520     typedef sequence<ShapeError> ShapeErrors;
4521
4522     /*!
4523      *  \brief Check a topology of the given shape.
4524      *  \param theShape Shape to check validity of.
4525      *  \param theErrors Structure, containing discovered errors and incriminated sub-shapes.
4526      *  \return TRUE, if the shape "seems to be valid" from the topological point of view.
4527      */
4528     boolean CheckShape (in GEOM_Object  theShape,
4529                         out ShapeErrors theErrors);
4530
4531     /*!
4532      *  \brief Check a topology and a geometry of the given shape.
4533      *  \param theShape Shape to check validity of.
4534      *  \param theErrors Structure, containing discovered errors and incriminated sub-shapes.
4535      *  \return TRUE, if the shape "seems to be valid".
4536      */
4537     boolean CheckShapeWithGeometry (in GEOM_Object  theShape,
4538                                     out ShapeErrors theErrors);
4539
4540     /*!
4541      *  \brief Convert sequence of shape errors, returned by
4542      *  <VAR>CheckShape()</VAR> or <VAR>CheckShapeWithGeometry()</VAR>, into string.
4543      *  \param theShape the invalid shape.
4544      *  \param theErrors The sequence of \a theShape errors.
4545      *  \return String, describing all the errors in form, suitable for printing.
4546      */
4547     string PrintShapeErrors (in GEOM_Object theShape,
4548                              in ShapeErrors theErrors);
4549
4550     /*!
4551      *  \brief Check a topology of the given shape on self-intersections presence.
4552      *  \param theShape Shape to check validity of.
4553      *  \param theCheckLevel the level of self-interference check.
4554      *  \param theIntersections Output. List of intersected sub-shapes IDs, it contains pairs of IDs.
4555      *  \return TRUE, if the shape does not have any self-intersections.
4556      */
4557     boolean CheckSelfIntersections (in GEOM_Object theShape,
4558                                     in long        theCheckLevel,
4559                                     out ListOfLong theIntersections);
4560
4561     /*!
4562      *  \brief Detect self-intersections of the given shape with algorithm based on mesh intersections.
4563      *  \param theShape Shape to check validity of.
4564      *  \param theDeflection Linear deflection coefficient that specifies quality of tessellation.
4565      *  \param theTolerance Specifies a distance between sub-shapes used for detecting gaps:
4566      *                       - if \a theTolerance <= 0, algorithm detects intersections
4567      *                       - if \a theTolerance > 0, algorithm detects gaps
4568      *  \param theIntersections Output. List of intersected sub-shapes IDs, it contains pairs of IDs.
4569      *  \return TRUE, if the shape does not have any self-intersections.
4570      */
4571     boolean CheckSelfIntersectionsFast (in GEOM_Object theShape,
4572                                         in float       theDeflection,
4573                                         in double      theTolerance,
4574                                         out ListOfLong theIntersections);
4575
4576     /*!
4577      *  \brief Check boolean and partition operations arguments.
4578      *  \param theShape the argument of an operation to be checked.
4579      *  \return TRUE if the argument is valid for a boolean or partition
4580      *          operation; FALSE otherwise.
4581      */
4582     boolean CheckBOPArguments (in GEOM_Object theShape);
4583
4584     /*!
4585      *  \brief Detect intersections of the given shapes with algorithm based on mesh intersections.
4586      *  \param theShape1 First source object
4587      *  \param theShape2 Second source object
4588      *  \param theTolerance Specifies a distance between shapes used for detecting gaps:
4589      *                       - if \a theTolerance <= 0, algorithm detects intersections
4590      *                       - if \a theTolerance > 0, algorithm detects gaps
4591      *  \param theDeflection Linear deflection coefficient that specifies quality of tessellation:
4592      *                       - if \a theDeflection <= 0, default deflection 0.001 is used
4593      *  \param theIntersections1 Output: contains list of sub-shapes IDs from 1st shape that localize intersection
4594      *  \param theIntersections2 Output: contains list of sub-shapes IDs from 2nd shape that localize intersection
4595      *  \return TRUE, if the are intersections (gaps) between source shapes
4596      */
4597     boolean FastIntersect (in GEOM_Object theShape1,
4598                            in GEOM_Object theShape2,
4599                            in double      theTolerance,
4600                            in float       theDeflection,
4601                            out ListOfLong theIntersections1,
4602                            out ListOfLong theIntersections2);
4603
4604     /*!
4605      *  \brief Check if the given shape can be an argument for MakeSolid operation
4606      *  \param theShape Shape to be described.
4607      *  \return Empty string if a solid can be made on this shape, error code otherwise.
4608      */
4609     string IsGoodForSolid (in GEOM_Object theShape);
4610
4611     /*!
4612      *  O\brief btain description of the given shape
4613      *  \param theShape Shape to be described.
4614      *  \return Description of the given shape.
4615      */
4616     string WhatIs (in GEOM_Object theShape);
4617
4618     /*!
4619      *  \brief Check if points defined by coords = [x1, y1, z1, x2, y2, z2, ...] are inside or on
4620      *  the shape theShape.
4621      *  \param theShape Shape to check.
4622      *  \param coords list of coordinates.
4623      *  \param tolerance tolerance.
4624      *  \return list of boolean.
4625      */
4626     ListOfBool AreCoordsInside(in GEOM_Object theShape, in ListOfDouble coords, in double tolerance);
4627
4628     /*!
4629      *  \brief Get minimal distance between the given shapes.
4630      *  \param theShape1,theShape2 Shapes to find minimal distance between.
4631      *  \param X1,Y1,Z1 Output. Coordinates of point on theShape1, nearest to theShape2.
4632      *  \param X2,Y2,Z2 Output. Coordinates of point on theShape2, nearest to theShape1.
4633      *  \return Value of the minimal distance between the given shapes.
4634      */
4635     double GetMinDistance (in GEOM_Object theShape1, in GEOM_Object theShape2,
4636                            out double X1, out double Y1, out double Z1,
4637                            out double X2, out double Y2, out double Z2);
4638
4639     /*!
4640      *  \brief Get closest points of the given shapes.
4641      *  \param theShape1,theShape2 Shapes to find closest points of.
4642      *  \param theCoords Output. List of (X, Y, Z) coordinates for all couples of points.
4643      *  \return The number of found solutions (-1 in case of infinite number of solutions).
4644      */
4645     long ClosestPoints (in GEOM_Object theShape1,
4646                         in GEOM_Object theShape2,
4647                         out ListOfDouble theCoords);
4648
4649     /*!
4650      *  \brief Get angle between the given lines or linear edges.
4651      *  \param theShape1,theShape2 Shapes to find angle between. Lines or linear edges.
4652      *  \return Value of the angle between the given shapes.
4653      */
4654     double GetAngle (in GEOM_Object theShape1, in GEOM_Object theShape2);
4655
4656     /*!
4657      *  \brief Get angle between the given vectors.
4658      *  \param theShape1,theShape2 Vectors to find angle between.
4659      *  \return Value of the angle between the given vectors.
4660      */
4661     double GetAngleBtwVectors (in GEOM_Object theShape1, in GEOM_Object theShape2);
4662
4663     /*!
4664      *  \brief The function takes a single face with holes and returns a list of faces,
4665      *  first of them is the original face without holes, and the other faces are placed
4666      *  on the same surface as the original face but bounded by each hole wire.
4667      *  If the original face has no holes, it will be returned as an output
4668      *  \param theShape face, to perform operation.
4669      *  \return ListOfGO, containing the result original face and faces from holes.
4670      */
4671     ListOfGO PatchFace(in GEOM_Object theShape);
4672
4673     /*!
4674      *  \brief Get point coordinates
4675      */
4676     void PointCoordinates (in GEOM_Object theShape, out double X, out double Y, out double Z);
4677
4678     /*!
4679      *  \brief Get radius of curvature of curve in the point determinated by param
4680      *  \param theShape - curve.
4681      *  \param theParam - parameter on curve
4682      *  \return Value of curvature.
4683      */
4684     double CurveCurvatureByParam (in GEOM_Object theShape, in double theParam);
4685
4686     /*!
4687      *  \brief Get radius of curvature of curve in the given point
4688      *  \param theShape - curve.
4689      *  \param thePoint - point
4690      *  \return Value of curvature.
4691      */
4692     double CurveCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
4693
4694     /*!
4695      *  \brief Get max radius of curvature of surface in the point determinated by params
4696      *  \param theShape - surface.
4697      *  \param theUParam - U-parameter on surface
4698      *  \param theVParam - V-parameter on surface
4699      *  \return Value of curvature.
4700      */
4701     double MaxSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
4702                                        in double theVParam);
4703
4704     /*!
4705      *  \brief Get max radius of curvature of surface in the given point
4706      *  \param theShape - surface.
4707      *  \param thePoint - point
4708      *  \return Value of curvature.
4709      */
4710     double MaxSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
4711
4712     /*!
4713      *  \brief Get min radius of curvature of surface in the point determinated by params
4714      *  \param theShape - surface.
4715      *  \param theUParam - U-parameter on surface
4716      *  \param theVParam - V-parameter on surface
4717      *  \return Value of curvature.
4718      */
4719     double MinSurfaceCurvatureByParam (in GEOM_Object theShape, in double theUParam,
4720                                        in double theVParam);
4721
4722     /*!
4723      *  \brief Get min radius of curvature of surface in the given point
4724      *  \param theShape - surface.
4725      *  \param thePoint - point
4726      *  \return Value of curvature.
4727      */
4728     double MinSurfaceCurvatureByPoint (in GEOM_Object theShape, in GEOM_Object thePoint);
4729
4730     /*!
4731      *  \brief Get vector of curvature of surface in the given point along the given direction.
4732      *  \param theShape - face.
4733      *  \param thePoint - point.
4734      *  \param theDirection - direction.
4735      *  \note  Before the calculation of curvature, the point and the direction
4736      *         are projected to the face, if the point does not lay on it or
4737      *         the direction is not tangent to it initially.
4738      *  \return Vector of curvature. The returned vector is codirectional with
4739      *          the normal to the face in the given point in case of positive
4740      *          curvature value and opposite to the normal in case of negative
4741      *          curvature. The normal of the returned vector is equal to the
4742      *          absolute value of the curvature.
4743      */
4744     GEOM_Object SurfaceCurvatureByPointAndDirection (in GEOM_Object theShape,
4745                                                      in GEOM_Object thePoint,
4746                                                      in GEOM_Object theDirection);
4747
4748     /*!
4749      *  \brief Convert X,Y,Z points coordinates to UV parameters on the given surface.
4750         \param theSurf the given face. It can be also a shell or a compound with one face.
4751         \param theXYZlist float list of size 3*N where N is the number of points
4752                           for which we want their U,V coordinates.
4753                           If the user enters a list of size not divisible by 3
4754                           an exception will be thrown.
4755         \param theIsNormalized if True, the returned parameters will be in range [0, 1].
4756         \return list of float of size 2*N.
4757      */
4758     ListOfDouble XYZtoUV(in GEOM_Object  theSurf,
4759                          in ListOfDouble theXYZlist,
4760                          in boolean      theIsNormalized);
4761
4762     /*!
4763      *  \brief Convert UV parameters on the given surface to 3D points coordinates.
4764         \param theSurf the given face. It can be also a shell or a compound with one face.
4765         \param theUVlist float list of size 2*N where N is the number of points
4766                          for which we want their X,Y,Z coordinates.
4767                          If the user enters a list of non-even size
4768                          an exception will be thrown.
4769         \param theIsNormalized if True, the input parameters are expected to be in range [0, 1].
4770         \return list of float of size 3*N.
4771      */
4772     ListOfDouble UVtoXYZ(in GEOM_Object  theSurf,
4773                          in ListOfDouble theUVlist,
4774                          in boolean      theIsNormalized);
4775
4776     //! Methods and structure for implement CheckConformity tool
4777
4778     /*!
4779     *  \brief Structure for store shapes from failed checks.
4780     *         If failed check on small edges, then second shape is null
4781     */
4782     struct PairOfShape
4783     {
4784       GEOM_Object first;
4785       GEOM_Object second;
4786     };
4787
4788     /*!
4789     *  \brief Structure for store result of check
4790     *  store type of check as number and failed shapes
4791     */
4792     struct CheckResult
4793     {
4794       long  type;
4795       PairOfShape failedShapes;
4796     };
4797
4798     typedef sequence<PairOfShape> SequenceOfPairOfShape;
4799     typedef sequence<CheckResult> CheckResults;
4800
4801     /*!
4802     *  \brief Perform analyse of shape and return all failed checks.
4803     *
4804     *  \param theShape Shape for check.
4805     */
4806     CheckResults CheckConformityShape(in GEOM_Object theShape);
4807
4808     /*!
4809     *  \brief Find all self-intersected 2D curves.
4810     *
4811     *  \param theResults result of check - list of failed checks and sub-shapes.
4812     */
4813     SequenceOfPairOfShape SelfIntersected2D(in CheckResults theResults);
4814
4815     /*!
4816     *  \brief Find pairs of interfering sub-shapes, by default all pairs of interfering shapes are returned.
4817     *         Avaliable types:
4818     *         - vertices touched by tolerance;
4819     *         - vertex touching an edge in the inner point;
4820     *         - vertex lying on the inner point of a face;
4821     *         - edges intersecting by inner points;
4822     *         - edge touching/intersecting face in the inner point;
4823     *         - faces intersection by inner point
4824     * 
4825     *  \param theResults result of check - list of failed checks and sub-shapes.
4826     *  \param theShapeType1 Type of shape.
4827     *  \param theShapeType2 Type of shape.
4828     */
4829     SequenceOfPairOfShape InterferingSubshapes(in CheckResults theResults,
4830                                                in long theShapeType1,
4831                                                in long theShapeType2);
4832
4833     /*!
4834     *  \brief Find edges, which are fully covered by tolerances of vertices.
4835     *
4836     *  \param theResults result of check - list of failed checks and sub-shapes.
4837     */
4838     ListOfGO SmallEdges(in CheckResults theResults);
4839
4840     /*!
4841     *  \brief find remote objects (sub-shape on a shape).
4842     *         Avaliable types:
4843     *         - vertex far from edge;
4844     *         - vertex far from face;
4845     *         - edge far from face
4846     *
4847     *  \param theResults result of check - list of failed checks and sub-shapes.
4848     *  \param theShapeType Type of shape.
4849     *  \param theSubShapeType Type of sub-shape.
4850     *  \param theTolerance tolerance, by default used tolerance of sub-shape.
4851     */
4852     SequenceOfPairOfShape DistantShapes(in CheckResults theResults,
4853                                         in long theShapeType,
4854                                         in long theSubShapeType,
4855                                         in double theTolerance);
4856
4857     /*!
4858     *  \brief Compute possible tolerance for the shape, minimize tolerance of shape as well
4859     *         as tolerance of sub-shapes as much as possible
4860     *
4861     *  \param theShape Shape for update.
4862     */
4863     double UpdateTolerance(in GEOM_Object theShape);
4864
4865     /*!
4866      *  \brief Get the calculator for the proximity value between the given shapes.
4867      *  \param theShape1,theShape2 Shapes to find proximity.
4868      *  \return The calculator object.
4869      */
4870     GEOM_Object ShapeProximityCalculator(in GEOM_Object theShape1, in GEOM_Object theShape2);
4871
4872     /*!
4873      *  \brief Set number sample points to compute the coarse proximity.
4874      *  \param theCalculator Proximity calculator.
4875      *  \param theShape      Shape to be samples.
4876      *  \param theNbSamples  Number of samples points.
4877      */
4878     void SetShapeSampling(in GEOM_Object theCalculator,
4879                           in GEOM_Object theShape,
4880                           in long theNbSamples);
4881
4882     /*!
4883      *  \brief Compute coarse value of the proximity basing on the polygonal representation of shapes.
4884      *  \param theCalculator Proximity calculator.
4885      *  \return Proximity value.
4886      */
4887     double GetCoarseProximity(in GEOM_Object theCalculator);
4888
4889     /*!
4890      *  \brief Compute precise value of the proximity basing on the exact shapes.
4891      *  \param theCalculator Proximity calculator.
4892      *  \return Proximity value.
4893      */
4894     double GetPreciseProximity(in GEOM_Object theCalculator);
4895
4896   };
4897
4898  // # GEOM_IGroupOperations:
4899   /*!
4900    *  \brief Interface for groups creation.
4901    */
4902   interface GEOM_IGroupOperations : GEOM_IOperations
4903   {
4904     /*!
4905      *  \brief Creates a new group which will store sub-shapes of theMainShape
4906      *  \param theMainShape is a GEOM_Object on which the group is selected
4907      *  \param theShapeType defines a shape type of the group
4908      *  \return a newly created GEOM group
4909      */
4910     GEOM_Object CreateGroup (in GEOM_Object theMainShape, in long theShapeType);
4911
4912     /*!
4913      *  \brief Adds a sub-object with ID theSubShapeId to the group
4914      *  \param theGroup is a GEOM group to which the new sub-shape is added
4915      *  \param theSubShapeId is a sub-shape ID in the main object.
4916      *  \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub-shape
4917      */
4918     void AddObject (in GEOM_Object theGroup, in long theSubShapeId);
4919
4920     /*!
4921      *  \brief Removes a sub-object with ID \a theSubShapeId from the group
4922      *  \param theGroup is a GEOM group from which the sub-shape is removed.
4923      *  \param theSubShapeId is a sub-shape ID in the main object.
4924      *  \note Use method <VAR>GEOM_IShapesOperations.GetSubShapeIndex()</VAR> to get an ID by the sub-shape
4925      */
4926     void RemoveObject (in GEOM_Object theGroup, in long theSubShapeId);
4927
4928     /*!
4929      *  \brief Adds to the group all the given shapes. No errors, if some shapes are already included.
4930      *  \param theGroup is a GEOM group to which the new sub-shapes are added.
4931      *  \param theSubShapes is a list of sub-shapes to be added.
4932      */
4933     void UnionList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
4934
4935     /*!
4936      *  \brief Removes from the group all the given shapes. No errors, if some shapes are not included.
4937      *  \param theGroup is a GEOM group from which the sub-shapes are removed.
4938      *  \param theSubShapes is a list of sub-shapes to be removed.
4939      */
4940     void DifferenceList (in GEOM_Object theGroup, in ListOfGO theSubShapes);
4941
4942     /*!
4943      *  \brief Adds to the group all the given shapes. No errors, if some shapes are already included.
4944      *  \param theGroup is a GEOM group to which the new sub-shapes are added.
4945      *  \param theSubShapes is a list of IDs of sub-shapes to be added.
4946      */
4947     void UnionIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
4948
4949     /*!
4950      *  \brief Removes from the group all the given shapes. No errors, if some shapes are not included.
4951      *  \param theGroup is a GEOM group from which the sub-shapes are removed.
4952      *  \param theSubShapes is a list of IDs of sub-shapes to be removed.
4953      */
4954     void DifferenceIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes);
4955
4956     /*!
4957      *  \brief Union of two groups.
4958      *  New group is created. It will contain all entities
4959      *  which are present in groups theGroup1 and theGroup2.
4960      *  \param theGroup1, theGroup2 are the initial GEOM groups
4961      *                              to create the united group from.
4962      *  \return a newly created GEOM group.
4963      */
4964     GEOM_Object UnionGroups (in GEOM_Object theGroup1, in GEOM_Object theGroup2);
4965
4966     /*!
4967      *  \brief Intersection of two groups.
4968      *  New group is created. It will contain only those entities
4969      *  which are present in both groups theGroup1 and theGroup2.
4970      *  \param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
4971      *  \return a newly created GEOM group.
4972      */
4973     GEOM_Object IntersectGroups (in GEOM_Object theGroup1, in GEOM_Object theGroup2);
4974
4975     /*!
4976      *  \brief Cut of two groups.
4977      *  New group is created. It will contain entities which are
4978      *  present in group theGroup1 but are not present in group theGroup2.
4979      *  \param theGroup1 is a GEOM group to include elements of.
4980      *  \param theGroup2 is a GEOM group to exclude elements of.
4981      *  \return a newly created GEOM group.
4982      */
4983     GEOM_Object CutGroups (in GEOM_Object theGroup1, in GEOM_Object theGroup2);
4984
4985     /*!
4986      *  \brief Union of list of groups.
4987      *  New group is created. It will contain all entities that are
4988      *  present in groups listed in theGList.
4989      *  \param theGList is a list of GEOM groups to create the united group from.
4990      *  \return a newly created GEOM group.
4991      */
4992     GEOM_Object UnionListOfGroups (in ListOfGO theGList);
4993
4994     /*!
4995      *  \brief Intersection of list of groups.
4996      *  New group is created. It will contain only entities
4997      *  which are simultaneously present in the groups listed in theGList.
4998      *  \param theGList is a list of GEOM groups to get common part of.
4999      *  \return a newly created GEOM group.
5000      */
5001     GEOM_Object IntersectListOfGroups (in ListOfGO theGList);
5002
5003     /*!
5004      *  \brief Cut of lists of groups.
5005      *  New group is created. It will contain only entities
5006      *  which are present in groups listed in theGList1 but 
5007      *  are not present in groups from theGList2.
5008      *  \param theGList1 is a list of GEOM groups to include elements of.
5009      *  \param theGList2 is a list of GEOM groups to exclude elements of.
5010      *  \return a newly created GEOM group.
5011      */
5012     GEOM_Object CutListOfGroups (in ListOfGO theGList1,
5013                                  in ListOfGO theGList2);
5014
5015     /*!
5016      *  \brief Returns a type of sub-objects stored in the group
5017      *  \param theGroup is a GEOM group which type is returned.
5018      */
5019     long GetType (in GEOM_Object theGroup);
5020
5021     /*!
5022      *  \brief Returns a main shape associated with the group
5023      *  \param theGroup is a GEOM group for which a main shape object is requested
5024      *  \return a GEOM_Object which is a main shape for theGroup
5025      */
5026     GEOM_Object GetMainShape (in GEOM_Object theGroup);
5027
5028     /*!
5029      *  \brief Returns a list of sub-objects ID stored in the group
5030      *  \param theGroup is a GEOM group for which a list of IDs is requested
5031      */
5032     ListOfLong GetObjects (in GEOM_Object theGroup);
5033   };
5034
5035   // # GEOM_IFieldOperations:
5036   /*!
5037    *  \brief Interface for field operation.
5038    */
5039   interface GEOM_IFieldOperations : GEOM_IOperations
5040   {
5041     /*!
5042      *  \brief Creates a field
5043      */
5044     GEOM_Field CreateField(in GEOM_Object     shape, 
5045                            in string          name,
5046                            in field_data_type type,
5047                            in short           dimension,
5048                            in string_array    componentNames);
5049     /*!
5050      *  \brief Returns number of fields on a shape
5051      */
5052     long CountFields(in GEOM_Object shape);
5053
5054     /*!
5055      *  \brief Returns all fields on a shape
5056      */
5057     ListOfFields GetFields(in GEOM_Object shape);
5058
5059     /*!
5060      *  \brief Returns a field on a shape by its name
5061      */
5062     GEOM_Field GetField(in GEOM_Object shape, in string name);
5063
5064     /*!
5065      *  \brief Returns number of sub-shapes of given dimension
5066      */
5067     long GetNbSubShapes(in GEOM_Object shape, in short fieldDim);
5068   };
5069
5070   // # GEOM_ITestOperations:
5071   /*!
5072    *  \brief Interface for testing operations.
5073    */
5074   interface GEOM_ITestOperations : GEOM_IOperations
5075   {
5076     /*!
5077      *  \brief Build a mesh on the given shape.
5078      *  \param shape is a source object
5079      *  \param linearDeflection is a linear deflection
5080      *  \param isRelative says if given value of deflection is relative to shape's bounding box
5081      *  \param angularDeflection is an angular deflection for edges in radians
5082      *  \return true in case of success; otherwise false.
5083      */
5084     boolean Tesselate(in GEOM_Object shape, in double linearDeflection,
5085                       in boolean isRelative, in double angularDeflection);
5086   };
5087
5088   // # GEOM_ICanonicalRecognition:
5089   /*!
5090    *  \brief Interface for canonical recognition operations.
5091    */
5092   interface GEOM_ICanonicalRecognition : GEOM_IOperations
5093   {
5094     /*!
5095      * check if the shape is planar
5096      */
5097     boolean isPlane(in GEOM_Object shape, in double tolerance, inout ListOfDouble normal, inout ListOfDouble origin);
5098
5099     /*!
5100      * check if shape is spherical
5101      */
5102     boolean isSphere(in GEOM_Object shape, in double tolerance, inout ListOfDouble origin, inout double radius);
5103
5104     /*!
5105      * check if shape is conical
5106      */
5107     boolean isCone(in GEOM_Object shape, in double tolerance, inout ListOfDouble axis, inout ListOfDouble apex, inout double halfAngle);
5108
5109     /*!
5110      * check if shape is cylinder
5111      */
5112     boolean isCylinder(in GEOM_Object shape, in double tolerance, inout ListOfDouble axis, inout ListOfDouble origin, inout double radius);
5113
5114     /*!
5115      * check if edge / wire is line
5116      */
5117     boolean isLine(in GEOM_Object edge, in double tolerance, inout ListOfDouble direction, inout ListOfDouble origin);
5118
5119     /*!
5120      * check if edge / wire is circle
5121      */
5122     boolean isCircle(in GEOM_Object edge, in double tolerance, inout ListOfDouble normal, inout ListOfDouble origin, inout double radius);
5123
5124     /*!
5125      * check if edge / wire is ellipse
5126      */
5127     boolean isEllipse(in GEOM_Object edge, in double tolerance, inout ListOfDouble normal, inout ListOfDouble dirX, inout ListOfDouble origin, inout double majorRadius, inout double minorRadius);
5128   };
5129
5130   // # GEOM_Gen:
5131   /*!
5132    *  \brief Interface to access other GEOM interfaces.
5133    *
5134    *  Also contains some methods to access and manage GEOM_Object.
5135    */
5136   interface GEOM_Gen : Engines::EngineComponent,SALOMEDS::Driver
5137   {
5138     /*!
5139      *  \brief Undo/Redo Management
5140      */
5141
5142     void Undo ();
5143
5144     void Redo ();
5145
5146     /*!
5147      * \brief Publishing management
5148      *
5149      * Adds in theStudy a object theObject under with a name theName,
5150      * if theFather is not NULL the object is placed under thFather's SObject.
5151      * Returns a SObject where theObject is placed
5152      */
5153     SALOMEDS::SObject AddInStudy (in GEOM_BaseObject theObject,
5154                                   in string          theName,
5155                                   in GEOM_BaseObject theFather);
5156
5157     /*!
5158      *  \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
5159      *
5160      *  To be used from python scripts out of geompy.addToStudy (non-default usage)
5161      *  \param theObject published GEOM_Object, arguments of which will be published
5162      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
5163      *                   If this list is empty, all operation arguments will be published
5164      *  \param theFindMethod method to search sub-shapes, corresponding to arguments and
5165      *                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
5166      *  \param theInheritFirstArg set properties of the first argument for \a theObject.
5167      *                            Do not publish sub-shapes in place of arguments, but only
5168      *                            in place of sub-shapes of the first argument,
5169      *                            because the whole shape corresponds to the first argument.
5170      *                            Mainly to be used after transformations, but it also can be
5171      *                            useful after partition with one object shape, and some other
5172      *                            operations, where only the first argument has to be considered.
5173      *                            If theObject has only one argument shape, this flag is automatically
5174      *                            considered as True, not regarding really passed value.
5175      *  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
5176      *                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
5177      *  \return list of published sub-shapes
5178      */
5179     ListOfGO RestoreSubShapesO (in GEOM_Object       theObject,
5180                                 in ListOfGO          theArgs,
5181                                 in find_shape_method theFindMethod,
5182                                 in boolean           theInheritFirstArg,
5183                                 in boolean           theAddPrefix);
5184
5185     /*!
5186      *  \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
5187      *
5188      *  To be used from python scripts out of geompy.addToStudy (non-default usage)
5189      *  \param theObject published GEOM_Object, arguments of which will be published
5190      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
5191      *                   If this list is empty, all operation arguments will be published
5192      *  \param theFindMethod method to search sub-shapes, corresponding to arguments and
5193      *                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
5194      *  \param theInheritFirstArg set properties of the first argument for \a theObject.
5195      *                            Do not publish sub-shapes in place of arguments, but only
5196      *                            in place of sub-shapes of the first argument,
5197      *                            because the whole shape corresponds to the first argument.
5198      *                            Mainly to be used after transformations, but it also can be
5199      *                            useful after partition with one object shape, and some other
5200      *                            operations, where only the first argument has to be considered.
5201      *                            If theObject has only one argument shape, this flag is automatically
5202      *                            considered as True, not regarding really passed value.
5203      *  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
5204      *                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
5205      *  \return list of published sub-shapes
5206      */
5207     ListOfGO RestoreGivenSubShapesO (in GEOM_Object       theObject,
5208                                      in ListOfGO          theArgs,
5209                                      in find_shape_method theFindMethod,
5210                                      in boolean           theInheritFirstArg,
5211                                      in boolean           theAddPrefix);
5212
5213     /*!
5214      *  \brief Publish sub-shapes, standing for arguments and sub-shapes of arguments
5215      *
5216      *  To be used from GUI and from geompy.addToStudy.
5217      *  Work like the above method, but accepts study object theSObject instead of GEOM_Object.
5218      *  \param theSObject study object, referencing GEOM_Object, arguments of which will be published
5219      *  \param theArgs   list of GEOM_Object, operation arguments to be published.
5220      *                   If this list is empty, all operation arguments will be published
5221      *  \param theFindMethod method to search sub-shapes, corresponding to arguments and
5222      *                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
5223      *  \param theInheritFirstArg set properties of the first argument for \a theObject.
5224      *                            Do not publish sub-shapes in place of arguments, but only
5225      *                            in place of sub-shapes of the first argument,
5226      *                            because the whole shape corresponds to the first argument.
5227      *                            Mainly to be used after transformations, but it also can be
5228      *                            useful after partition with one object shape, and some other
5229      *                            operations, where only the first argument has to be considered.
5230      *                            If theObject has only one argument shape, this flag is automatically
5231      *                            considered as True, not regarding really passed value.
5232      *  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
5233      *                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
5234      */
5235     ListOfGO RestoreSubShapesSO (in SALOMEDS::SObject theSObject,
5236                                  in ListOfGO          theArgs,
5237                                  in find_shape_method theFindMethod,
5238                                  in boolean           theInheritFirstArg,
5239                                  in boolean           theAddPrefix);
5240
5241     // #  Methods to access interfaces for objects creation and transformation
5242
5243     GEOM_IBasicOperations      GetIBasicOperations     () raises (SALOME::SALOME_Exception);
5244     GEOM_ITransformOperations  GetITransformOperations () raises (SALOME::SALOME_Exception);
5245     GEOM_I3DPrimOperations     GetI3DPrimOperations    () raises (SALOME::SALOME_Exception);
5246     GEOM_IShapesOperations     GetIShapesOperations    () raises (SALOME::SALOME_Exception);
5247     GEOM_IBooleanOperations    GetIBooleanOperations   () raises (SALOME::SALOME_Exception);
5248     GEOM_ICurvesOperations     GetICurvesOperations    () raises (SALOME::SALOME_Exception);
5249     GEOM_ILocalOperations      GetILocalOperations     () raises (SALOME::SALOME_Exception);
5250     GEOM_IHealingOperations    GetIHealingOperations   () raises (SALOME::SALOME_Exception);
5251     GEOM_IInsertOperations     GetIInsertOperations    () raises (SALOME::SALOME_Exception);
5252     GEOM_IMeasureOperations    GetIMeasureOperations   () raises (SALOME::SALOME_Exception);
5253     GEOM_IBlocksOperations     GetIBlocksOperations    () raises (SALOME::SALOME_Exception);
5254     GEOM_IGroupOperations      GetIGroupOperations     () raises (SALOME::SALOME_Exception);
5255     GEOM_IFieldOperations      GetIFieldOperations     () raises (SALOME::SALOME_Exception);
5256     GEOM_ITestOperations       GetITestOperations      () raises (SALOME::SALOME_Exception);
5257     GEOM_ICanonicalRecognition GetICanonicalRecognition() raises (SALOME::SALOME_Exception);
5258
5259     GEOM_IOperations GetPluginOperations (in string theLibName) raises (SALOME::SALOME_Exception);
5260
5261     // # Objects Management
5262
5263
5264     /*!
5265      *  \brief Removes the object from the GEOM component
5266      *  \param theObject is a GEOM_Object to be removed
5267      */
5268     void RemoveObject (in GEOM_BaseObject theObject);
5269
5270     /*!
5271      *  \brief Returns an object defined by the study and its entry in the GEOM component
5272      *  \param theEntry is an entry of the requested GEOM_Object in the GEOM component
5273      *  \note if the object has not previously been created a NULL GEOM_Object is returned
5274      */
5275     GEOM_BaseObject GetObject (in string theEntry);
5276
5277     /*!
5278      *  \brief Add a sub-shape defined by indices in \a theIndices
5279      *  (contains unique IDs of sub-shapes inside \a theMainShape)
5280      *  \note The sub-shape GEOM_Object can has ONLY ONE function.
5281      *        Don't try to apply modification operations on them.
5282      *  \note Internal method
5283      */
5284     GEOM_Object AddSubShape (in GEOM_Object theMainShape, in ListOfLong theIndices);
5285
5286  // #  GEOM_Objects IOR Management
5287     
5288     /*!
5289      *  \brief Returns a GEOM_Object defined by its IOR
5290      *  \param theIOR a string containing an IOR of the requested GEOM_Object
5291      */
5292     GEOM_Object GetIORFromString (in string theIOR);
5293
5294     /*!
5295      *  \brief Returns a string which contains an IOR of the GEOM_Object
5296      *  \param theObject is a GEOM_Object which IOR is requested
5297      */
5298     string GetStringFromIOR (in GEOM_Object theObject);
5299
5300     /*!
5301      *  \brief Returns a name with which a GEOM_Object was dumped into python script
5302      *  \param theStudyEntry is an entry of the GEOM_Object in the study
5303      */
5304     string GetDumpName (in string theStudyEntry);
5305
5306     /*!
5307      *  \brief Returns all names with which a GEOM_Object was dumped
5308      *  into python script to avoid the same names in SMESH script
5309      */
5310     string_array GetAllDumpNames();
5311
5312     /*!
5313      *  \brief Publishes the named sub-shapes of given object in the study.
5314      *  \param theObject   The object which named sub-shapes are published
5315      */
5316     ListOfGO PublishNamedShapesInStudy(//in SObject theSObject,
5317                                        in Object theObject);
5318
5319     /*!
5320      * \brief Creates a new folder
5321      *
5322      * Creates a new container (folder) for any GEOM objects.
5323      * Folder will have name theName.
5324      * If theFather is not NULL, the folder is placed under theFather object.
5325      * Otherwise, the folder takes place under root 'Geometry' object.
5326      * 
5327      * \param theName name of the folder
5328      * \param theFather parent object
5329      * \return SObject represented the created folder.
5330      */
5331     SALOMEDS::SObject CreateFolder (in string theName,
5332                                     in SALOMEDS::SObject theFather);
5333
5334     /*!
5335      * \brief Moves object to the specified folder
5336      *
5337      * The moved object should be first published in the study.
5338      * \param theObject GEOM object to move
5339      * \param theFolder target folder
5340      */
5341     void MoveToFolder (in GEOM_Object theObject,
5342                        in SALOMEDS::SObject theFolder);
5343
5344     /*!
5345      * \brief Moves list of objects to the specified folder
5346      *
5347      * The moved objects should be first published in the study.
5348      * \param theListOfGO list of GEOM objects to move
5349      * \param theFolder target folder
5350      */
5351     void MoveListToFolder (in ListOfGO theListOfGO,
5352                            in SALOMEDS::SObject theFolder);
5353
5354     /*!
5355      * \brief Moves objects to the specified position
5356      *
5357      * This function is used in the drag-n-drop functionality.
5358      *
5359      * \param what objects being moved
5360      * \param where parent object where objects are moved to
5361      * \param row position in the parent object's children list at which objects are moved
5362      */
5363     void Move( in object_list what, 
5364                in SALOMEDS::SObject where, 
5365                in long row );
5366
5367     /*!
5368      * \brief Collects dependencies of the given objects from other ones
5369      * \param theListOfEntries List of GEOM object entries in OCAF tree (not in study)
5370      * \return Struct of dependent entries and its links as a byte array
5371      * \note This method is supposed to be used by GUI only.
5372      */
5373     SALOMEDS::TMPFile GetDependencyTree(in string_array theListOfEntries);
5374
5375     /*!
5376      * \brief Fills 3 lists that is used to reduce study of redundant objects:
5377      *  - dependencies of the given objects from other ones;
5378      *  - children of the given objects;
5379      *  - all other objects in study.
5380      * \param theSelectedEntries List of GEOM object entries in OCAF tree
5381      * \param theParentEntries List of GEOM object entries on which the given objects depend
5382      * \param theSubEntries Children entries list of the given objects
5383      * \param theOtherEntries List of GEOM object entries which are in the study, but not in parents and children lists
5384      * \note This method is supposed to be used by GUI only.
5385      */
5386     void GetEntriesToReduceStudy(inout string_array theSelectedEntries,
5387                                                  inout string_array theParentEntries,
5388                                                  inout string_array theSubEntries,
5389                                                  inout string_array theOtherEntries);
5390
5391
5392     /*
5393     * \brief Breaks links to parametrical mode for parametrical shape
5394     */
5395     void BreakLink(in string theEntry);
5396   };
5397 };
5398
5399 #endif