Salome HOME
022484: EDF 2304 SMESH: Reorient a group of faces regarding to a volume
[modules/smesh.git] / src / SMESH_I / SMESH_MeshEditor_i.hxx
1 // Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
24 //  File   : SMESH_MeshEditor_i.hxx
25 //  Author : Nicolas REJNERI
26 //  Module : SMESH
27 //
28 #ifndef _SMESH_MESHEDITOR_I_HXX_
29 #define _SMESH_MESHEDIOTR_I_HXX_
30
31 #include "SMESH.hxx"
32
33 #include <SALOMEconfig.h>
34 #include CORBA_SERVER_HEADER(SMESH_MeshEditor)
35
36 #include "SMESH_Mesh.hxx"
37 #include "SMESH_PythonDump.hxx"
38 #include "SMESH_MeshEditor.hxx"
39 #include <list>
40
41 class SMESH_Mesh_i;
42
43 namespace MeshEditor_I {
44   struct TPreviewMesh;
45 }
46
47 class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
48 {
49 public:
50   SMESH_MeshEditor_i(SMESH_Mesh_i * theMesh, bool isPreview);
51
52   virtual ~ SMESH_MeshEditor_i();
53   /*!
54    * \brief Return edited mesh ID
55    * \retval int - mesh ID
56    */
57   int GetMeshId() const { return myMesh->GetId(); }
58
59   // --- CORBA
60
61   /*!
62    * Return data of mesh edition preview
63    */
64   SMESH::MeshPreviewStruct* GetPreviewData() throw (SALOME::SALOME_Exception);
65   /*!
66    * If during last operation of MeshEditor some nodes were
67    * created this method returns list of their IDs, if new nodes
68    * not created - returns an empty list
69    */
70   SMESH::long_array* GetLastCreatedNodes() throw (SALOME::SALOME_Exception);
71   /*!
72    * If during last operation of MeshEditor some elements were
73    * created this method returns list of their IDs, if new elements
74    * not created - returns an empty list
75    */
76   SMESH::long_array* GetLastCreatedElems() throw (SALOME::SALOME_Exception);
77   /*!
78    * \brief Clears sequences of last created elements and nodes 
79    */
80   void ClearLastCreated() throw (SALOME::SALOME_Exception);
81   /*!
82    * \brief Returns description of an error/warning occured during the last operation
83    */
84   SMESH::ComputeError* GetLastError() throw (SALOME::SALOME_Exception);
85
86   /*!
87    * \brief Wrap a sequence of ids in a SMESH_IDSource
88    */
89   SMESH::SMESH_IDSource_ptr MakeIDSource(const SMESH::long_array& IDsOfElements,
90                                          SMESH::ElementType       type);
91   static bool               IsTemporaryIDSource( SMESH::SMESH_IDSource_ptr& idSource );
92   static CORBA::Long*       GetTemporaryIDs( SMESH::SMESH_IDSource_ptr& idSource, int& nbIds );
93
94   CORBA::Boolean RemoveElements(const SMESH::long_array & IDsOfElements)
95     throw (SALOME::SALOME_Exception);
96   CORBA::Boolean RemoveNodes   (const SMESH::long_array & IDsOfNodes)
97     throw (SALOME::SALOME_Exception);
98   CORBA::Long    RemoveOrphanNodes()
99     throw (SALOME::SALOME_Exception);
100
101   /*!
102    * Methods for creation new elements.
103    * Returns ID of created element or 0 if element not created
104    */
105   CORBA::Long AddNode(CORBA::Double x, CORBA::Double y, CORBA::Double z)
106     throw (SALOME::SALOME_Exception);
107   CORBA::Long Add0DElement(CORBA::Long IDOfNode)
108     throw (SALOME::SALOME_Exception);
109   CORBA::Long AddBall(CORBA::Long IDOfNodem, CORBA::Double diameter)
110     throw (SALOME::SALOME_Exception);
111   CORBA::Long AddEdge(const SMESH::long_array & IDsOfNodes)
112     throw (SALOME::SALOME_Exception);
113   CORBA::Long AddFace(const SMESH::long_array & IDsOfNodes)
114     throw (SALOME::SALOME_Exception);
115   CORBA::Long AddPolygonalFace(const SMESH::long_array & IDsOfNodes)
116     throw (SALOME::SALOME_Exception);
117   CORBA::Long AddVolume(const SMESH::long_array & IDsOfNodes)
118     throw (SALOME::SALOME_Exception);
119   CORBA::Long AddPolyhedralVolume(const SMESH::long_array & IDsOfNodes,
120                                   const SMESH::long_array & Quantities)
121     throw (SALOME::SALOME_Exception);
122   CORBA::Long AddPolyhedralVolumeByFaces(const SMESH::long_array & IdsOfFaces)
123     throw (SALOME::SALOME_Exception);
124
125   /*!
126    * \brief Create 0D elements on all nodes of the given object except those 
127    *        nodes on which a 0D element already exists.
128    *  \param theObject object on whose nodes 0D elements will be created.
129    *  \param theGroupName optional name of a group to add 0D elements created
130    *         and/or found on nodes of \a theObject.
131    *  \return an object (a new group or a temporary SMESH_IDSource) holding
132    *          ids of new and/or found 0D elements.
133    */
134   SMESH::SMESH_IDSource_ptr Create0DElementsOnAllNodes(SMESH::SMESH_IDSource_ptr theObject,
135                                                        const char*               theGroupName)
136     throw (SALOME::SALOME_Exception);
137
138   /*!
139    * \brief Bind a node to a vertex
140    * \param NodeID - node ID
141    * \param VertexID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
142    */
143   void SetNodeOnVertex(CORBA::Long NodeID, CORBA::Long VertexID)
144     throw (SALOME::SALOME_Exception);
145   /*!
146    * \brief Store node position on an edge
147    * \param NodeID - node ID
148    * \param EdgeID - edge ID available through GEOM_Object.GetSubShapeIndices()[0]
149    * \param paramOnEdge - parameter on edge where the node is located
150    */
151   void SetNodeOnEdge(CORBA::Long NodeID, CORBA::Long EdgeID,
152                      CORBA::Double paramOnEdge)
153     throw (SALOME::SALOME_Exception);
154   /*!
155    * \brief Store node position on a face
156    * \param NodeID - node ID
157    * \param FaceID - face ID available through GEOM_Object.GetSubShapeIndices()[0]
158    * \param u - U parameter on face where the node is located
159    * \param v - V parameter on face where the node is located
160    */
161   void SetNodeOnFace(CORBA::Long NodeID, CORBA::Long FaceID,
162                      CORBA::Double u, CORBA::Double v)
163     throw (SALOME::SALOME_Exception);
164   /*!
165    * \brief Bind a node to a solid
166    * \param NodeID - node ID
167    * \param SolidID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
168    */
169   void SetNodeInVolume(CORBA::Long NodeID, CORBA::Long SolidID)
170     throw (SALOME::SALOME_Exception);
171   /*!
172    * \brief Bind an element to a shape
173    * \param ElementID - element ID
174    * \param ShapeID - shape ID available through GEOM_Object.GetSubShapeIndices()[0]
175    */
176   void SetMeshElementOnShape(CORBA::Long ElementID, CORBA::Long ShapeID)
177     throw (SALOME::SALOME_Exception);
178
179
180   CORBA::Boolean MoveNode(CORBA::Long NodeID,
181                           CORBA::Double x, CORBA::Double y, CORBA::Double z)
182     throw (SALOME::SALOME_Exception);
183
184   CORBA::Boolean InverseDiag(CORBA::Long NodeID1, CORBA::Long NodeID2)
185     throw (SALOME::SALOME_Exception);
186   CORBA::Boolean DeleteDiag(CORBA::Long NodeID1, CORBA::Long NodeID2)
187     throw (SALOME::SALOME_Exception);
188   CORBA::Boolean Reorient(const SMESH::long_array & IDsOfElements)
189     throw (SALOME::SALOME_Exception);
190   CORBA::Boolean ReorientObject(SMESH::SMESH_IDSource_ptr theObject)
191     throw (SALOME::SALOME_Exception);
192
193   /*!
194    * \brief Reorient faces contained in \a the2Dgroup.
195    * \param the2Dgroup - the mesh or its part to reorient
196    * \param theDirection - desired direction of normal of \a theFace
197    * \param theFace - ID of face whose orientation is checked.
198    *        It can be < 1 then \a thePoint is used to find a face.
199    * \param thePoint - is used to find a face if \a theFace < 1.
200    * \return number of reoriented elements.
201    */
202   CORBA::Long Reorient2D(SMESH::SMESH_IDSource_ptr the2Dgroup,
203                          const SMESH::DirStruct&   theDirection,
204                          CORBA::Long               theFace,
205                          const SMESH::PointStruct& thePoint) throw (SALOME::SALOME_Exception);
206   /*!
207    * \brief Reorient faces basing on orientation of adjacent volumes.
208    * \param faces - a list of objects containing face to reorient
209    * \param volumes - an object containing volumes.
210    * \param outsideNormal - to orient faces to have their normal
211    *        pointing either \a outside or \a inside the adjacent volumes.
212    * \return number of reoriented faces.
213    */
214   CORBA::Long Reorient2DBy3D(const SMESH::ListOfIDSources & faces,
215                              SMESH::SMESH_IDSource_ptr      volumes,
216                              CORBA::Boolean                 outsideNormal)
217     throw (SALOME::SALOME_Exception);
218
219   // Split/Join faces
220   CORBA::Boolean TriToQuad       (const SMESH::long_array &   IDsOfElements,
221                                   SMESH::NumericalFunctor_ptr Criterion,
222                                   CORBA::Double               MaxAngle)
223     throw (SALOME::SALOME_Exception);
224   CORBA::Boolean TriToQuadObject (SMESH::SMESH_IDSource_ptr   theObject,
225                                   SMESH::NumericalFunctor_ptr Criterion,
226                                   CORBA::Double               MaxAngle)
227     throw (SALOME::SALOME_Exception);
228   CORBA::Boolean QuadToTri       (const SMESH::long_array &   IDsOfElements,
229                                   SMESH::NumericalFunctor_ptr Criterion)
230     throw (SALOME::SALOME_Exception);
231   CORBA::Boolean QuadToTriObject (SMESH::SMESH_IDSource_ptr   theObject,
232                                   SMESH::NumericalFunctor_ptr Criterion)
233     throw (SALOME::SALOME_Exception);
234   void           QuadTo4Tri      (SMESH::SMESH_IDSource_ptr   theObject)
235     throw (SALOME::SALOME_Exception);
236   CORBA::Boolean SplitQuad       (const SMESH::long_array &   IDsOfElements,
237                                   CORBA::Boolean              Diag13)
238     throw (SALOME::SALOME_Exception);
239   CORBA::Boolean SplitQuadObject (SMESH::SMESH_IDSource_ptr   theObject,
240                                   CORBA::Boolean              Diag13)
241     throw (SALOME::SALOME_Exception);
242   CORBA::Long    BestSplit       (CORBA::Long                 IDOfQuad,
243                                   SMESH::NumericalFunctor_ptr Criterion)
244     throw (SALOME::SALOME_Exception);
245   void           SplitVolumesIntoTetra(SMESH::SMESH_IDSource_ptr elems,
246                                        CORBA::Short             methodFlags)
247     throw (SALOME::SALOME_Exception);
248   void           SplitHexahedraIntoPrisms(SMESH::SMESH_IDSource_ptr  elems,
249                                           const SMESH::PointStruct & startHexPoint,
250                                           const SMESH::DirStruct&    facetToSplitNormal,
251                                           CORBA::Short               methodFlags,
252                                           CORBA::Boolean             allDomains)
253     throw (SALOME::SALOME_Exception);
254
255   CORBA::Boolean Smooth(const SMESH::long_array &              IDsOfElements,
256                         const SMESH::long_array &              IDsOfFixedNodes,
257                         CORBA::Long                            MaxNbOfIterations,
258                         CORBA::Double                          MaxAspectRatio,
259                         SMESH::SMESH_MeshEditor::Smooth_Method Method)
260     throw (SALOME::SALOME_Exception);
261   CORBA::Boolean SmoothObject(SMESH::SMESH_IDSource_ptr              theObject,
262                               const SMESH::long_array &              IDsOfFixedNodes,
263                               CORBA::Long                            MaxNbOfIterations,
264                               CORBA::Double                          MaxAspectRatio,
265                               SMESH::SMESH_MeshEditor::Smooth_Method Method)
266     throw (SALOME::SALOME_Exception);
267   CORBA::Boolean SmoothParametric(const SMESH::long_array &              IDsOfElements,
268                                   const SMESH::long_array &              IDsOfFixedNodes,
269                                   CORBA::Long                            MaxNbOfIterations,
270                                   CORBA::Double                          MaxAspectRatio,
271                                   SMESH::SMESH_MeshEditor::Smooth_Method Method)
272     throw (SALOME::SALOME_Exception);
273   CORBA::Boolean SmoothParametricObject(SMESH::SMESH_IDSource_ptr              theObject,
274                                         const SMESH::long_array &              IDsOfFixedNodes,
275                                         CORBA::Long                            MaxNbOfIterations,
276                                         CORBA::Double                          MaxAspectRatio,
277                                         SMESH::SMESH_MeshEditor::Smooth_Method Method)
278     throw (SALOME::SALOME_Exception);
279   CORBA::Boolean smooth(const SMESH::long_array &              IDsOfElements,
280                         const SMESH::long_array &              IDsOfFixedNodes,
281                         CORBA::Long                            MaxNbOfIterations,
282                         CORBA::Double                          MaxAspectRatio,
283                         SMESH::SMESH_MeshEditor::Smooth_Method Method,
284                         bool                                   IsParametric)
285     throw (SALOME::SALOME_Exception);
286   CORBA::Boolean smoothObject(SMESH::SMESH_IDSource_ptr              theObject,
287                               const SMESH::long_array &              IDsOfFixedNodes,
288                               CORBA::Long                            MaxNbOfIterations,
289                               CORBA::Double                          MaxAspectRatio,
290                               SMESH::SMESH_MeshEditor::Smooth_Method Method,
291                               bool                                   IsParametric)
292     throw (SALOME::SALOME_Exception);
293
294   CORBA::Boolean ConvertFromQuadratic()
295     throw (SALOME::SALOME_Exception);
296   void           ConvertFromQuadraticObject(SMESH::SMESH_IDSource_ptr theObject)
297     throw (SALOME::SALOME_Exception);
298   void           ConvertToQuadratic(CORBA::Boolean Force3d)
299     throw (SALOME::SALOME_Exception);
300   void           ConvertToQuadraticObject(CORBA::Boolean            theForce3d,
301                                           SMESH::SMESH_IDSource_ptr theObject)
302     throw (SALOME::SALOME_Exception);
303   void           ConvertToBiQuadratic(CORBA::Boolean            theForce3d,
304                                       SMESH::SMESH_IDSource_ptr theObject)
305     throw (SALOME::SALOME_Exception);
306
307   void RenumberNodes() throw (SALOME::SALOME_Exception);
308   void RenumberElements() throw (SALOME::SALOME_Exception);
309
310   void RotationSweep(const SMESH::long_array & IDsOfElements,
311                      const SMESH::AxisStruct & Axis,
312                      CORBA::Double             AngleInRadians,
313                      CORBA::Long               NbOfSteps,
314                      CORBA::Double             Tolerance)
315     throw (SALOME::SALOME_Exception);
316   void RotationSweepObject(SMESH::SMESH_IDSource_ptr theObject,
317                            const SMESH::AxisStruct & Axis,
318                            CORBA::Double             AngleInRadians,
319                            CORBA::Long               NbOfSteps,
320                            CORBA::Double             Tolerance)
321     throw (SALOME::SALOME_Exception);
322   void RotationSweepObject1D(SMESH::SMESH_IDSource_ptr theObject,
323                              const SMESH::AxisStruct & Axis,
324                              CORBA::Double             AngleInRadians,
325                              CORBA::Long               NbOfSteps,
326                              CORBA::Double             Tolerance)
327     throw (SALOME::SALOME_Exception);
328   void RotationSweepObject2D(SMESH::SMESH_IDSource_ptr theObject,
329                              const SMESH::AxisStruct & Axis,
330                              CORBA::Double             AngleInRadians,
331                              CORBA::Long               NbOfSteps,
332                              CORBA::Double             Tolerance)
333     throw (SALOME::SALOME_Exception);
334
335   void ExtrusionSweep(const SMESH::long_array & IDsOfElements,
336                       const SMESH::DirStruct &  StepVector,
337                       CORBA::Long               NbOfSteps)
338     throw (SALOME::SALOME_Exception);
339   void ExtrusionSweep0D(const SMESH::long_array & IDsOfElements,
340                       const SMESH::DirStruct &  StepVector,
341                       CORBA::Long               NbOfSteps)
342     throw (SALOME::SALOME_Exception);
343
344   void ExtrusionSweepObject(SMESH::SMESH_IDSource_ptr theObject,
345                             const SMESH::DirStruct &  StepVector,
346                             CORBA::Long               NbOfSteps)
347     throw (SALOME::SALOME_Exception);
348
349   void ExtrusionSweepObject0D(SMESH::SMESH_IDSource_ptr theObject,
350                               const SMESH::DirStruct &  StepVector,
351                               CORBA::Long               NbOfSteps)
352     throw (SALOME::SALOME_Exception);
353   void ExtrusionSweepObject1D(SMESH::SMESH_IDSource_ptr theObject,
354                               const SMESH::DirStruct &  StepVector,
355                               CORBA::Long               NbOfSteps)
356     throw (SALOME::SALOME_Exception);
357   void ExtrusionSweepObject2D(SMESH::SMESH_IDSource_ptr theObject,
358                               const SMESH::DirStruct &  StepVector,
359                               CORBA::Long               NbOfSteps)
360     throw (SALOME::SALOME_Exception);
361   void AdvancedExtrusion(const SMESH::long_array & theIDsOfElements,
362                          const SMESH::DirStruct &  theStepVector,
363                          CORBA::Long               theNbOfSteps,
364                          CORBA::Long               theExtrFlags,
365                          CORBA::Double             theSewTolerance)
366     throw (SALOME::SALOME_Exception);
367
368   SMESH::SMESH_MeshEditor::Extrusion_Error
369   ExtrusionAlongPath(const SMESH::long_array &   IDsOfElements,
370                      SMESH::SMESH_Mesh_ptr       PathMesh,
371                      GEOM::GEOM_Object_ptr       PathShape,
372                      CORBA::Long                 NodeStart,
373                      CORBA::Boolean              HasAngles,
374                      const SMESH::double_array & Angles,
375                      CORBA::Boolean              HasRefPoint,
376                      const SMESH::PointStruct &  RefPoint)
377     throw (SALOME::SALOME_Exception);
378
379   SMESH::SMESH_MeshEditor::Extrusion_Error
380   ExtrusionAlongPathObject(SMESH::SMESH_IDSource_ptr   theObject,
381                            SMESH::SMESH_Mesh_ptr       PathMesh,
382                            GEOM::GEOM_Object_ptr       PathShape,
383                            CORBA::Long                 NodeStart,
384                            CORBA::Boolean              HasAngles,
385                            const SMESH::double_array & Angles,
386                            CORBA::Boolean              HasRefPoint,
387                            const SMESH::PointStruct &  RefPoint)
388     throw (SALOME::SALOME_Exception);
389   SMESH::SMESH_MeshEditor::Extrusion_Error
390   ExtrusionAlongPathObject1D(SMESH::SMESH_IDSource_ptr   theObject,
391                              SMESH::SMESH_Mesh_ptr       PathMesh,
392                              GEOM::GEOM_Object_ptr       PathShape,
393                              CORBA::Long                 NodeStart,
394                              CORBA::Boolean              HasAngles,
395                              const SMESH::double_array & Angles,
396                              CORBA::Boolean              HasRefPoint,
397                              const SMESH::PointStruct &  RefPoint)
398     throw (SALOME::SALOME_Exception);
399   SMESH::SMESH_MeshEditor::Extrusion_Error
400   ExtrusionAlongPathObject2D(SMESH::SMESH_IDSource_ptr   theObject,
401                              SMESH::SMESH_Mesh_ptr       PathMesh,
402                              GEOM::GEOM_Object_ptr       PathShape,
403                              CORBA::Long                 NodeStart,
404                              CORBA::Boolean              HasAngles,
405                              const SMESH::double_array & Angles,
406                              CORBA::Boolean              HasRefPoint,
407                              const SMESH::PointStruct &  RefPoint)
408     throw (SALOME::SALOME_Exception);
409
410   SMESH::double_array* LinearAnglesVariation(SMESH::SMESH_Mesh_ptr       PathMesh,
411                                              GEOM::GEOM_Object_ptr       PathShape,
412                                              const SMESH::double_array & Angles);
413
414   void Mirror(const SMESH::long_array &           IDsOfElements,
415               const SMESH::AxisStruct &           Axis,
416               SMESH::SMESH_MeshEditor::MirrorType MirrorType,
417               CORBA::Boolean                      Copy)
418     throw (SALOME::SALOME_Exception);
419   void MirrorObject(SMESH::SMESH_IDSource_ptr           theObject,
420                     const SMESH::AxisStruct &           Axis,
421                     SMESH::SMESH_MeshEditor::MirrorType MirrorType,
422                     CORBA::Boolean                      Copy)
423     throw (SALOME::SALOME_Exception);
424   void Translate(const SMESH::long_array & IDsOfElements,
425                  const SMESH::DirStruct &   Vector,
426                  CORBA::Boolean            Copy)
427     throw (SALOME::SALOME_Exception);
428   void TranslateObject(SMESH::SMESH_IDSource_ptr  theObject,
429                        const SMESH::DirStruct &   Vector,
430                        CORBA::Boolean             Copy)
431     throw (SALOME::SALOME_Exception);
432   void Rotate(const SMESH::long_array & IDsOfElements,
433               const SMESH::AxisStruct &  Axis,
434               CORBA::Double             Angle,
435               CORBA::Boolean            Copy)
436     throw (SALOME::SALOME_Exception);
437   void RotateObject(SMESH::SMESH_IDSource_ptr  theObject,
438                     const SMESH::AxisStruct &  Axis,
439                     CORBA::Double              Angle,
440                     CORBA::Boolean             Copy)
441     throw (SALOME::SALOME_Exception);
442
443   SMESH::ListOfGroups* RotationSweepMakeGroups(const SMESH::long_array& IDsOfElements,
444                                                const SMESH::AxisStruct& Axix,
445                                                CORBA::Double            AngleInRadians,
446                                                CORBA::Long              NbOfSteps,
447                                                CORBA::Double            Tolerance)
448     throw (SALOME::SALOME_Exception);
449   SMESH::ListOfGroups* RotationSweepObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
450                                                      const SMESH::AxisStruct&  Axix,
451                                                      CORBA::Double             AngleInRadians,
452                                                      CORBA::Long               NbOfSteps,
453                                                      CORBA::Double             Tolerance)
454     throw (SALOME::SALOME_Exception);
455   SMESH::ListOfGroups* RotationSweepObject1DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
456                                                        const SMESH::AxisStruct&  Axix,
457                                                        CORBA::Double             AngleInRadians,
458                                                        CORBA::Long               NbOfSteps,
459                                                        CORBA::Double             Tolerance)
460     throw (SALOME::SALOME_Exception);
461   SMESH::ListOfGroups* RotationSweepObject2DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
462                                                        const SMESH::AxisStruct&  Axix,
463                                                        CORBA::Double             AngleInRadians,
464                                                        CORBA::Long               NbOfSteps,
465                                                        CORBA::Double             Tolerance)
466     throw (SALOME::SALOME_Exception);
467   SMESH::ListOfGroups* ExtrusionSweepMakeGroups(const SMESH::long_array& IDsOfElements,
468                                                 const SMESH::DirStruct&  StepVector,
469                                                 CORBA::Long              NbOfSteps)
470     throw (SALOME::SALOME_Exception);
471   SMESH::ListOfGroups* ExtrusionSweepMakeGroups0D(const SMESH::long_array& IDsOfElements,
472                                                 const SMESH::DirStruct&  StepVector,
473                                                 CORBA::Long              NbOfSteps)
474     throw (SALOME::SALOME_Exception);
475
476   SMESH::ListOfGroups* AdvancedExtrusionMakeGroups(const SMESH::long_array& IDsOfElements,
477                                                    const SMESH::DirStruct&  StepVector,
478                                                    CORBA::Long              NbOfSteps,
479                                                    CORBA::Long              ExtrFlags,
480                                                    CORBA::Double            SewTolerance)
481     throw (SALOME::SALOME_Exception);
482   SMESH::ListOfGroups* ExtrusionSweepObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
483                                                       const SMESH::DirStruct&   StepVector,
484                                                       CORBA::Long               NbOfSteps)
485     throw (SALOME::SALOME_Exception);
486   SMESH::ListOfGroups* ExtrusionSweepObject0DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
487                                                         const SMESH::DirStruct&   StepVector,
488                                                         CORBA::Long               NbOfSteps)
489     throw (SALOME::SALOME_Exception);
490   SMESH::ListOfGroups* ExtrusionSweepObject1DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
491                                                         const SMESH::DirStruct&   StepVector,
492                                                         CORBA::Long               NbOfSteps)
493     throw (SALOME::SALOME_Exception);
494   SMESH::ListOfGroups* ExtrusionSweepObject2DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
495                                                         const SMESH::DirStruct&   StepVector,
496                                                         CORBA::Long               NbOfSteps)
497     throw (SALOME::SALOME_Exception);
498   SMESH::ListOfGroups* ExtrusionAlongPathMakeGroups(const SMESH::long_array&   IDsOfElements,
499                                                     SMESH::SMESH_Mesh_ptr      PathMesh,
500                                                     GEOM::GEOM_Object_ptr      PathShape,
501                                                     CORBA::Long                NodeStart,
502                                                     CORBA::Boolean             HasAngles,
503                                                     const SMESH::double_array& Angles,
504                                                     CORBA::Boolean             HasRefPoint,
505                                                     const SMESH::PointStruct&  RefPoint,
506                                                     SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
507     throw (SALOME::SALOME_Exception);
508   SMESH::ListOfGroups* ExtrusionAlongPathObjectMakeGroups(SMESH::SMESH_IDSource_ptr  Object,
509                                                           SMESH::SMESH_Mesh_ptr      PathMesh,
510                                                           GEOM::GEOM_Object_ptr      PathShape,
511                                                           CORBA::Long                NodeStart,
512                                                           CORBA::Boolean             HasAngles,
513                                                           const SMESH::double_array& Angles,
514                                                           CORBA::Boolean             HasRefPoint,
515                                                           const SMESH::PointStruct&  RefPoint,
516                                                           SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
517     throw (SALOME::SALOME_Exception);
518   SMESH::ListOfGroups* ExtrusionAlongPathObject1DMakeGroups(SMESH::SMESH_IDSource_ptr  Object,
519                                                             SMESH::SMESH_Mesh_ptr      PathMesh,
520                                                             GEOM::GEOM_Object_ptr      PathShape,
521                                                             CORBA::Long                NodeStart,
522                                                             CORBA::Boolean             HasAngles,
523                                                             const SMESH::double_array& Angles,
524                                                             CORBA::Boolean             HasRefPoint,
525                                                             const SMESH::PointStruct&  RefPoint,
526                                                             SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
527     throw (SALOME::SALOME_Exception);
528   SMESH::ListOfGroups* ExtrusionAlongPathObject2DMakeGroups(SMESH::SMESH_IDSource_ptr  Object,
529                                                             SMESH::SMESH_Mesh_ptr      PathMesh,
530                                                             GEOM::GEOM_Object_ptr      PathShape,
531                                                             CORBA::Long                NodeStart,
532                                                             CORBA::Boolean             HasAngles,
533                                                             const SMESH::double_array& Angles,
534                                                             CORBA::Boolean             HasRefPoint,
535                                                             const SMESH::PointStruct&  RefPoint,
536                                                             SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
537     throw (SALOME::SALOME_Exception);
538
539   // skl 04.06.2009 
540   SMESH::ListOfGroups* ExtrusionAlongPathObjX(SMESH::SMESH_IDSource_ptr  Object,
541                                               SMESH::SMESH_IDSource_ptr  Path,
542                                               CORBA::Long                NodeStart,
543                                               CORBA::Boolean             HasAngles,
544                                               const SMESH::double_array& Angles,
545                                               CORBA::Boolean             LinearVariation,
546                                               CORBA::Boolean             HasRefPoint,
547                                               const SMESH::PointStruct&  RefPoint,
548                                               CORBA::Boolean             MakeGroups,
549                                               SMESH::ElementType         ElemType,
550                                               SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
551     throw (SALOME::SALOME_Exception);
552   SMESH::ListOfGroups* ExtrusionAlongPathX(const SMESH::long_array&   IDsOfElements,
553                                            SMESH::SMESH_IDSource_ptr  Path,
554                                            CORBA::Long                NodeStart,
555                                            CORBA::Boolean             HasAngles,
556                                            const SMESH::double_array& Angles,
557                                            CORBA::Boolean             LinearVariation,
558                                            CORBA::Boolean             HasRefPoint,
559                                            const SMESH::PointStruct&  RefPoint,
560                                            CORBA::Boolean             MakeGroups,
561                                            SMESH::ElementType         ElemType,
562                                            SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
563     throw (SALOME::SALOME_Exception);
564
565   SMESH::ListOfGroups* MirrorMakeGroups(const SMESH::long_array&            IDsOfElements,
566                                         const SMESH::AxisStruct&            Mirror,
567                                         SMESH::SMESH_MeshEditor::MirrorType MirrorType)
568     throw (SALOME::SALOME_Exception);
569   SMESH::ListOfGroups* MirrorObjectMakeGroups(SMESH::SMESH_IDSource_ptr           Object,
570                                               const SMESH::AxisStruct&            Mirror,
571                                               SMESH::SMESH_MeshEditor::MirrorType MirrorType)
572     throw (SALOME::SALOME_Exception);
573   SMESH::ListOfGroups* TranslateMakeGroups(const SMESH::long_array& IDsOfElements,
574                                            const SMESH::DirStruct&  Vector)
575     throw (SALOME::SALOME_Exception);
576   SMESH::ListOfGroups* TranslateObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
577                                                  const SMESH::DirStruct&   Vector)
578     throw (SALOME::SALOME_Exception);
579   SMESH::ListOfGroups* RotateMakeGroups(const SMESH::long_array& IDsOfElements,
580                                         const SMESH::AxisStruct& Axis,
581                                         CORBA::Double            AngleInRadians)
582     throw (SALOME::SALOME_Exception);
583   SMESH::ListOfGroups* RotateObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
584                                               const SMESH::AxisStruct&  Axis,
585                                               CORBA::Double             AngleInRadians)
586     throw (SALOME::SALOME_Exception);
587
588   SMESH::SMESH_Mesh_ptr MirrorMakeMesh(const SMESH::long_array&            IDsOfElements,
589                                        const SMESH::AxisStruct&            Mirror,
590                                        SMESH::SMESH_MeshEditor::MirrorType MirrorType,
591                                        CORBA::Boolean                      CopyGroups,
592                                        const char*                         MeshName)
593     throw (SALOME::SALOME_Exception);
594   SMESH::SMESH_Mesh_ptr MirrorObjectMakeMesh(SMESH::SMESH_IDSource_ptr           Object,
595                                              const SMESH::AxisStruct&            Mirror,
596                                              SMESH::SMESH_MeshEditor::MirrorType MirrorType,
597                                              CORBA::Boolean                      CopyGroups,
598                                              const char*                         MeshName)
599     throw (SALOME::SALOME_Exception);
600   SMESH::SMESH_Mesh_ptr TranslateMakeMesh(const SMESH::long_array& IDsOfElements,
601                                           const SMESH::DirStruct&  Vector,
602                                           CORBA::Boolean           CopyGroups,
603                                           const char*              MeshName)
604     throw (SALOME::SALOME_Exception);
605   SMESH::SMESH_Mesh_ptr TranslateObjectMakeMesh(SMESH::SMESH_IDSource_ptr Object,
606                                                 const SMESH::DirStruct&   Vector,
607                                                 CORBA::Boolean            CopyGroups,
608                                                 const char*               MeshName)
609     throw (SALOME::SALOME_Exception);
610   SMESH::SMESH_Mesh_ptr RotateMakeMesh(const SMESH::long_array& IDsOfElements,
611                                        const SMESH::AxisStruct& Axis,
612                                        CORBA::Double            AngleInRadians,
613                                        CORBA::Boolean           CopyGroups,
614                                        const char*              MeshName)
615     throw (SALOME::SALOME_Exception);
616   SMESH::SMESH_Mesh_ptr RotateObjectMakeMesh(SMESH::SMESH_IDSource_ptr Object,
617                                              const SMESH::AxisStruct&  Axis,
618                                              CORBA::Double             AngleInRadians,
619                                              CORBA::Boolean            CopyGroups,
620                                              const char*               MeshName)
621     throw (SALOME::SALOME_Exception);
622
623   void Scale(SMESH::SMESH_IDSource_ptr  theObject,
624              const SMESH::PointStruct&  thePoint,
625              const SMESH::double_array& theScaleFact,
626              CORBA::Boolean             theCopy)
627     throw (SALOME::SALOME_Exception);
628
629   SMESH::ListOfGroups* ScaleMakeGroups(SMESH::SMESH_IDSource_ptr  theObject,
630                                        const SMESH::PointStruct&  thePoint,
631                                        const SMESH::double_array& theScaleFact)
632     throw (SALOME::SALOME_Exception);
633
634   SMESH::SMESH_Mesh_ptr ScaleMakeMesh(SMESH::SMESH_IDSource_ptr Object,
635                                       const SMESH::PointStruct& Point,
636                                       const SMESH::double_array& theScaleFact,
637                                       CORBA::Boolean            CopyGroups,
638                                       const char*               MeshName)
639     throw (SALOME::SALOME_Exception);
640
641   void FindCoincidentNodes (CORBA::Double                  Tolerance,
642                             SMESH::array_of_long_array_out GroupsOfNodes)
643     throw (SALOME::SALOME_Exception);
644   void FindCoincidentNodesOnPart(SMESH::SMESH_IDSource_ptr      Object,
645                                  CORBA::Double                  Tolerance,
646                                  SMESH::array_of_long_array_out GroupsOfNodes)
647     throw (SALOME::SALOME_Exception);
648   void FindCoincidentNodesOnPartBut(SMESH::SMESH_IDSource_ptr      Object,
649                                     CORBA::Double                  Tolerance,
650                                     SMESH::array_of_long_array_out GroupsOfNodes,
651                                     const SMESH::ListOfIDSources&  ExceptSubMeshOrGroups)
652     throw (SALOME::SALOME_Exception);
653   void MergeNodes (const SMESH::array_of_long_array& GroupsOfNodes)
654     throw (SALOME::SALOME_Exception);
655   void FindEqualElements(SMESH::SMESH_IDSource_ptr      Object,
656                          SMESH::array_of_long_array_out GroupsOfElementsID)
657     throw (SALOME::SALOME_Exception);
658   void MergeElements(const SMESH::array_of_long_array& GroupsOfElementsID)
659     throw (SALOME::SALOME_Exception);
660   void MergeEqualElements()
661     throw (SALOME::SALOME_Exception);
662   CORBA::Long MoveClosestNodeToPoint(CORBA::Double x,
663                                      CORBA::Double y,
664                                      CORBA::Double z,
665                                      CORBA::Long   nodeID)
666     throw (SALOME::SALOME_Exception);
667   /*!
668    * \brief Return ID of node closest to a given point
669    */
670   CORBA::Long FindNodeClosestTo(CORBA::Double x,
671                                 CORBA::Double y,
672                                 CORBA::Double z)
673     throw (SALOME::SALOME_Exception);
674   /*!
675    * Return elements of given type where the given point is IN or ON.
676    * 'ALL' type means elements of any type excluding nodes
677    */
678   SMESH::long_array* FindElementsByPoint(CORBA::Double      x,
679                                          CORBA::Double      y,
680                                          CORBA::Double      z,
681                                          SMESH::ElementType type)
682     throw (SALOME::SALOME_Exception);
683   /*!
684    * Searching among the given elements, return elements of given type 
685    * where the given point is IN or ON.
686    * 'ALL' type means elements of any type excluding nodes
687    */
688   SMESH::long_array* FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elements,
689                                               CORBA::Double             x,
690                                               CORBA::Double             y,
691                                               CORBA::Double             z,
692                                               SMESH::ElementType        type)
693     throw (SALOME::SALOME_Exception);
694
695   /*!
696    * Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
697    * TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
698    */
699   CORBA::Short GetPointState(CORBA::Double x, CORBA::Double y, CORBA::Double z)
700     throw (SALOME::SALOME_Exception);
701
702   SMESH::SMESH_MeshEditor::Sew_Error
703   SewFreeBorders(CORBA::Long FirstNodeID1,
704                  CORBA::Long SecondNodeID1,
705                  CORBA::Long LastNodeID1,
706                  CORBA::Long FirstNodeID2,
707                  CORBA::Long SecondNodeID2,
708                  CORBA::Long LastNodeID2,
709                  CORBA::Boolean CreatePolygons,
710                  CORBA::Boolean CreatePolyedrs)
711     throw (SALOME::SALOME_Exception);
712   SMESH::SMESH_MeshEditor::Sew_Error
713   SewConformFreeBorders(CORBA::Long FirstNodeID1,
714                         CORBA::Long SecondNodeID1,
715                         CORBA::Long LastNodeID1,
716                         CORBA::Long FirstNodeID2,
717                         CORBA::Long SecondNodeID2)
718     throw (SALOME::SALOME_Exception);
719   SMESH::SMESH_MeshEditor::Sew_Error
720   SewBorderToSide(CORBA::Long FirstNodeIDOnFreeBorder,
721                   CORBA::Long SecondNodeIDOnFreeBorder,
722                   CORBA::Long LastNodeIDOnFreeBorder,
723                   CORBA::Long FirstNodeIDOnSide,
724                   CORBA::Long LastNodeIDOnSide,
725                   CORBA::Boolean CreatePolygons,
726                   CORBA::Boolean CreatePolyedrs)
727     throw (SALOME::SALOME_Exception);
728   SMESH::SMESH_MeshEditor::Sew_Error
729   SewSideElements(const SMESH::long_array& IDsOfSide1Elements,
730                   const SMESH::long_array& IDsOfSide2Elements,
731                   CORBA::Long NodeID1OfSide1ToMerge,
732                   CORBA::Long NodeID1OfSide2ToMerge,
733                   CORBA::Long NodeID2OfSide1ToMerge,
734                   CORBA::Long NodeID2OfSide2ToMerge)
735     throw (SALOME::SALOME_Exception);
736
737   /*!
738    * Set new nodes for given element.
739    * If number of nodes is not corresponded to type of
740    * element - returns false
741    */
742   CORBA::Boolean ChangeElemNodes(CORBA::Long ide, const SMESH::long_array& newIDs)
743     throw (SALOME::SALOME_Exception);
744
745   SMESH::SMESH_Group_ptr DoubleElements(SMESH::SMESH_IDSource_ptr theElements,
746                                         const char*               theGroupName)
747     throw (SALOME::SALOME_Exception);
748
749   CORBA::Boolean DoubleNodes( const SMESH::long_array& theNodes,
750                               const SMESH::long_array& theModifiedElems )
751     throw (SALOME::SALOME_Exception);
752
753   CORBA::Boolean DoubleNode( CORBA::Long theNodeId,
754                              const SMESH::long_array& theModifiedElems )
755     throw (SALOME::SALOME_Exception);
756
757   CORBA::Boolean DoubleNodeGroup( SMESH::SMESH_GroupBase_ptr theNodes,
758                                   SMESH::SMESH_GroupBase_ptr theModifiedElems )
759     throw (SALOME::SALOME_Exception);
760
761   /*!
762    * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
763    * Works as DoubleNodeGroup(), but returns a new group with newly created nodes.
764    * \param theNodes - group of nodes to be doubled.
765    * \param theModifiedElems - group of elements to be updated.
766    * \return a new group with newly created nodes
767    * \sa DoubleNodeGroup()
768    */
769   SMESH::SMESH_Group_ptr DoubleNodeGroupNew( SMESH::SMESH_GroupBase_ptr theNodes,
770                                              SMESH::SMESH_GroupBase_ptr theModifiedElems )
771     throw (SALOME::SALOME_Exception);
772
773   CORBA::Boolean DoubleNodeGroups( const SMESH::ListOfGroups& theNodes,
774                                    const SMESH::ListOfGroups& theModifiedElems )
775     throw (SALOME::SALOME_Exception);
776
777   SMESH::SMESH_Group_ptr DoubleNodeGroupsNew( const SMESH::ListOfGroups& theNodes,
778                                               const SMESH::ListOfGroups& theModifiedElems )
779     throw (SALOME::SALOME_Exception);
780
781   /*!
782    * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
783    * \param theElems - the list of elements (edges or faces) to be replicated
784    *       The nodes for duplication could be found from these elements
785    * \param theNodesNot - list of nodes to NOT replicate
786    * \param theAffectedElems - the list of elements (cells and edges) to which the 
787    *       replicated nodes should be associated to.
788    * \return TRUE if operation has been completed successfully, FALSE otherwise
789    * \sa DoubleNodeGroup(), DoubleNodeGroups()
790    */
791   CORBA::Boolean DoubleNodeElem( const SMESH::long_array& theElems, 
792                                  const SMESH::long_array& theNodesNot,
793                                  const SMESH::long_array& theAffectedElems )
794     throw (SALOME::SALOME_Exception);
795
796   /*!
797    * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
798    * \param theElems - the list of elements (edges or faces) to be replicated
799    *        The nodes for duplication could be found from these elements
800    * \param theNodesNot - list of nodes to NOT replicate
801    * \param theShape - shape to detect affected elements (element which geometric center
802    *        located on or inside shape).
803    *        The replicated nodes should be associated to affected elements.
804    * \return TRUE if operation has been completed successfully, FALSE otherwise
805    * \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
806    */
807   CORBA::Boolean DoubleNodeElemInRegion( const SMESH::long_array& theElems, 
808                                          const SMESH::long_array& theNodesNot,
809                                          GEOM::GEOM_Object_ptr    theShape )
810     throw (SALOME::SALOME_Exception);
811
812   /*!
813    * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
814    * \param theElems - group of of elements (edges or faces) to be replicated
815    * \param theNodesNot - group of nodes not to replicated
816    * \param theAffectedElems - group of elements to which the replicated nodes
817    *        should be associated to.
818    * \return TRUE if operation has been completed successfully, FALSE otherwise
819    * \sa DoubleNodes(), DoubleNodeGroups(), DoubleNodeElemGroupNew()
820    */
821   CORBA::Boolean DoubleNodeElemGroup( SMESH::SMESH_GroupBase_ptr theElems,
822                                       SMESH::SMESH_GroupBase_ptr theNodesNot,
823                                       SMESH::SMESH_GroupBase_ptr theAffectedElems )
824     throw (SALOME::SALOME_Exception);
825
826   /*!
827    * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
828    * Works as DoubleNodeElemGroup(), but returns a new group with newly created elements.
829    * \param theElems - group of of elements (edges or faces) to be replicated
830    * \param theNodesNot - group of nodes not to replicated
831    * \param theAffectedElems - group of elements to which the replicated nodes
832    *        should be associated to.
833    * \return a new group with newly created elements
834    * \sa DoubleNodeElemGroup()
835    */
836   SMESH::SMESH_Group_ptr DoubleNodeElemGroupNew( SMESH::SMESH_GroupBase_ptr theElems,
837                                                  SMESH::SMESH_GroupBase_ptr theNodesNot,
838                                                  SMESH::SMESH_GroupBase_ptr theAffectedElems )
839     throw (SALOME::SALOME_Exception);
840
841   SMESH::ListOfGroups*   DoubleNodeElemGroup2New(SMESH::SMESH_GroupBase_ptr theElems,
842                                                  SMESH::SMESH_GroupBase_ptr theNodesNot,
843                                                  SMESH::SMESH_GroupBase_ptr theAffectedElems,
844                                                  CORBA::Boolean             theElemGroupNeeded,
845                                                  CORBA::Boolean             theNodeGroupNeeded)
846     throw (SALOME::SALOME_Exception);
847   
848   /*!
849    * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
850    * \param theElems - group of of elements (edges or faces) to be replicated
851    * \param theNodesNot - group of nodes not to replicated
852    * \param theShape - shape to detect affected elements (element which geometric center
853    *        located on or inside shape).
854    *        The replicated nodes should be associated to affected elements.
855    * \return TRUE if operation has been completed successfully, FALSE otherwise
856    * \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
857    */
858   CORBA::Boolean DoubleNodeElemGroupInRegion( SMESH::SMESH_GroupBase_ptr theElems,
859                                               SMESH::SMESH_GroupBase_ptr theNodesNot,
860                                               GEOM::GEOM_Object_ptr      theShape )
861     throw (SALOME::SALOME_Exception);
862
863   /*!
864    * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
865    * This method provided for convenience works as DoubleNodes() described above.
866    * \param theElems - list of groups of elements (edges or faces) to be replicated
867    * \param theNodesNot - list of groups of nodes not to replicated
868    * \param theAffectedElems - group of elements to which the replicated nodes
869    *        should be associated to.
870    * \return TRUE if operation has been completed successfully, FALSE otherwise
871    * \sa DoubleNodeGroup(), DoubleNodes(), DoubleNodeElemGroupsNew()
872    */
873   CORBA::Boolean DoubleNodeElemGroups( const SMESH::ListOfGroups& theElems,
874                                        const SMESH::ListOfGroups& theNodesNot,
875                                        const SMESH::ListOfGroups& theAffectedElems )
876     throw (SALOME::SALOME_Exception);
877
878   /*!
879    * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
880    * Works as DoubleNodeElemGroups(), but returns a new group with newly created elements.
881    * \param theElems - list of groups of elements (edges or faces) to be replicated
882    * \param theNodesNot - list of groups of nodes not to replicated
883    * \param theAffectedElems - group of elements to which the replicated nodes
884    *        should be associated to.
885    * \return a new group with newly created elements
886    * \sa DoubleNodeElemGroups()
887    */
888   SMESH::SMESH_Group_ptr DoubleNodeElemGroupsNew( const SMESH::ListOfGroups& theElems,
889                                                   const SMESH::ListOfGroups& theNodesNot,
890                                                   const SMESH::ListOfGroups& theAffectedElems )
891     throw (SALOME::SALOME_Exception);
892
893   SMESH::ListOfGroups*   DoubleNodeElemGroups2New(const SMESH::ListOfGroups& theElems,
894                                                   const SMESH::ListOfGroups& theNodesNot,
895                                                   const SMESH::ListOfGroups& theAffectedElems,
896                                                   CORBA::Boolean             theElemGroupNeeded,
897                                                   CORBA::Boolean             theNodeGroupNeeded)
898     throw (SALOME::SALOME_Exception);
899
900   /*!
901    * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
902    * This method provided for convenience works as DoubleNodes() described above.
903    * \param theElems - list of groups of elements (edges or faces) to be replicated
904    * \param theNodesNot - list of groups of nodes not to replicated
905    * \param theShape - shape to detect affected elements (element which geometric center
906    *        located on or inside shape).
907    *        The replicated nodes should be associated to affected elements.
908    * \return TRUE if operation has been completed successfully, FALSE otherwise
909    * \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
910    */
911   CORBA::Boolean DoubleNodeElemGroupsInRegion( const SMESH::ListOfGroups& theElems,
912                                                const SMESH::ListOfGroups& theNodesNot,
913                                                GEOM::GEOM_Object_ptr      theShape )
914     throw (SALOME::SALOME_Exception);
915
916   /*!
917    * \brief Identify the elements that will be affected by node duplication (actual duplication is not performed.
918    * This method is the first step of DoubleNodeElemGroupsInRegion.
919    * \param theElems - list of groups of elements (edges or faces) to be replicated
920    * \param theNodesNot - list of groups of nodes not to replicated
921    * \param theShape - shape to detect affected elements (element which geometric center
922    *        located on or inside shape).
923    *        The replicated nodes should be associated to affected elements.
924    * \return groups of affected elements
925    * \sa DoubleNodeElemGroupsInRegion()
926    */
927   SMESH::ListOfGroups* AffectedElemGroupsInRegion( const SMESH::ListOfGroups& theElems,
928                                                    const SMESH::ListOfGroups& theNodesNot,
929                                                    GEOM::GEOM_Object_ptr      theShape )
930     throw (SALOME::SALOME_Exception);
931
932   /*!
933    * \brief Double nodes on shared faces between groups of volumes and create flat elements on demand.
934    * The list of groups must describe a partition of the mesh volumes.
935    * The nodes of the internal faces at the boundaries of the groups are doubled.
936    * In option, the internal faces are replaced by flat elements.
937    * Triangles are transformed in prisms, and quadrangles in hexahedrons.
938    * \param theDomains - list of groups of volumes
939    * \param createJointElems - if TRUE, create the elements
940    * \param onAllBoundaries - if TRUE, the nodes and elements are also create on
941    *        the boundary between \a theDomains and the rest mesh
942    * \return TRUE if operation has been completed successfully, FALSE otherwise
943    */
944   CORBA::Boolean DoubleNodesOnGroupBoundaries( const SMESH::ListOfGroups& theDomains,
945                                                CORBA::Boolean             createJointElems,
946                                                CORBA::Boolean             onAllBoundaries )
947     throw (SALOME::SALOME_Exception);
948   /*!
949    * \brief Double nodes on some external faces and create flat elements.
950    * Flat elements are mainly used by some types of mechanic calculations.
951    *
952    * Each group of the list must be constituted of faces.
953    * Triangles are transformed in prisms, and quadrangles in hexahedrons.
954    * @param theGroupsOfFaces - list of groups of faces
955    * @return TRUE if operation has been completed successfully, FALSE otherwise
956    */
957   CORBA::Boolean CreateFlatElementsOnFacesGroups( const SMESH::ListOfGroups& theGroupsOfFaces )
958     throw (SALOME::SALOME_Exception);
959
960   /*!
961    *  \brief identify all the elements around a geom shape, get the faces delimiting the hole
962    *  Build groups of volume to remove, groups of faces to replace on the skin of the object,
963    *  groups of faces to remove insidethe object, (idem edges).
964    *  Build ordered list of nodes at the border of each group of faces to replace (to be used to build a geom subshape)
965    */
966   void CreateHoleSkin(CORBA::Double radius,
967                       GEOM::GEOM_Object_ptr theShape,
968                       const char* groupName,
969                       const SMESH::double_array& theNodesCoords,
970                       SMESH::array_of_long_array_out GroupsOfNodes)
971   throw (SALOME::SALOME_Exception);
972
973   /*!
974    * \brief Generated skin mesh (containing 2D cells) from 3D mesh
975    * The created 2D mesh elements based on nodes of free faces of boundary volumes
976    * \return TRUE if operation has been completed successfully, FALSE otherwise
977    */
978   CORBA::Boolean Make2DMeshFrom3D()
979     throw (SALOME::SALOME_Exception);
980
981   SMESH::SMESH_Mesh_ptr MakeBoundaryMesh(SMESH::SMESH_IDSource_ptr elements,
982                                          SMESH::Bnd_Dimension      dimension,
983                                          const char*               groupName,
984                                          const char*               meshName,
985                                          CORBA::Boolean            toCopyElements,
986                                          CORBA::Boolean            toCopyMissingBondary,
987                                          SMESH::SMESH_Group_out    group)
988     throw (SALOME::SALOME_Exception);
989
990   CORBA::Long MakeBoundaryElements(SMESH::Bnd_Dimension dimension,
991                                    const char* groupName,
992                                    const char* meshName,
993                                    CORBA::Boolean toCopyAll,
994                                    const SMESH::ListOfIDSources& groups,
995                                    SMESH::SMESH_Mesh_out mesh,
996                                    SMESH::SMESH_Group_out group)
997     throw (SALOME::SALOME_Exception);
998
999 private: //!< private methods
1000
1001   ::SMESH_MeshEditor& getEditor();
1002
1003   SMESHDS_Mesh * getMeshDS() { return myMesh->GetMeshDS(); }
1004
1005   MeshEditor_I::TPreviewMesh * getPreviewMesh( SMDSAbs_ElementType previewType = SMDSAbs_All );
1006
1007   void declareMeshModified( bool isReComputeSafe );
1008
1009   /*!
1010    * \brief Clear myLastCreated* or myPreviewData
1011    */
1012   void initData(bool deleteSearchers=true);
1013
1014   /*!
1015    * \brief Return groups by their IDs
1016    */
1017   SMESH::ListOfGroups* getGroups(const std::list<int>* groupIDs)
1018     throw (SALOME::SALOME_Exception);
1019
1020   SMESH::ListOfGroups* rotationSweep(const SMESH::long_array & IDsOfElements,
1021                                      const SMESH::AxisStruct & Axis,
1022                                      CORBA::Double             AngleInRadians,
1023                                      CORBA::Long               NbOfSteps,
1024                                      CORBA::Double             Tolerance,
1025                                      const bool                MakeGroups,
1026                                      const SMDSAbs_ElementType ElementType=SMDSAbs_All)
1027     throw (SALOME::SALOME_Exception);
1028   SMESH::ListOfGroups* extrusionSweep(const SMESH::long_array & IDsOfElements,
1029                                       const SMESH::DirStruct &  StepVector,
1030                                       CORBA::Long               NbOfSteps,
1031                                       bool                      MakeGroups,
1032                                       const SMDSAbs_ElementType ElementType=SMDSAbs_All)
1033     throw (SALOME::SALOME_Exception);
1034   SMESH::ListOfGroups* advancedExtrusion(const SMESH::long_array & theIDsOfElements,
1035                                          const SMESH::DirStruct &  theStepVector,
1036                                          CORBA::Long               theNbOfSteps,
1037                                          CORBA::Long               theExtrFlags,
1038                                          CORBA::Double             theSewTolerance,
1039                                          const bool                MakeGroups)
1040     throw (SALOME::SALOME_Exception);
1041   SMESH::ListOfGroups* extrusionAlongPath(const SMESH::long_array &   IDsOfElements,
1042                                           SMESH::SMESH_Mesh_ptr       PathMesh,
1043                                           GEOM::GEOM_Object_ptr       PathShape,
1044                                           CORBA::Long                 NodeStart,
1045                                           CORBA::Boolean              HasAngles,
1046                                           const SMESH::double_array & Angles,
1047                                           CORBA::Boolean              HasRefPoint,
1048                                           const SMESH::PointStruct &  RefPoint,
1049                                           const bool                  MakeGroups,
1050                                           SMESH::SMESH_MeshEditor::Extrusion_Error & Error,
1051                                           const SMDSAbs_ElementType   ElementType=SMDSAbs_All)
1052     throw (SALOME::SALOME_Exception);
1053   SMESH::ListOfGroups* extrusionAlongPathX(const SMESH::long_array &  IDsOfElements,
1054                                            SMESH::SMESH_IDSource_ptr  Path,
1055                                            CORBA::Long                NodeStart,
1056                                            CORBA::Boolean             HasAngles,
1057                                            const SMESH::double_array& Angles,
1058                                            CORBA::Boolean             LinearVariation,
1059                                            CORBA::Boolean             HasRefPoint,
1060                                            const SMESH::PointStruct&  RefPoint,
1061                                            bool                       MakeGroups,
1062                                            const SMDSAbs_ElementType  ElementType,
1063                                            SMESH::SMESH_MeshEditor::Extrusion_Error & theError)
1064     throw (SALOME::SALOME_Exception);
1065   SMESH::ListOfGroups* mirror(TIDSortedElemSet &                  IDsOfElements,
1066                               const SMESH::AxisStruct &           Axis,
1067                               SMESH::SMESH_MeshEditor::MirrorType MirrorType,
1068                               CORBA::Boolean                      Copy,
1069                               bool                                MakeGroups,
1070                               ::SMESH_Mesh*                       TargetMesh=0)
1071     throw (SALOME::SALOME_Exception);
1072   SMESH::ListOfGroups* translate(TIDSortedElemSet        & IDsOfElements,
1073                                  const SMESH::DirStruct &  Vector,
1074                                  CORBA::Boolean            Copy,
1075                                  bool                      MakeGroups,
1076                                  ::SMESH_Mesh*             TargetMesh=0)
1077     throw (SALOME::SALOME_Exception);
1078   SMESH::ListOfGroups* rotate(TIDSortedElemSet &           IDsOfElements,
1079                               const SMESH::AxisStruct &  Axis,
1080                               CORBA::Double             Angle,
1081                               CORBA::Boolean            Copy,
1082                               bool                      MakeGroups,
1083                               ::SMESH_Mesh*             TargetMesh=0)
1084     throw (SALOME::SALOME_Exception);
1085
1086   SMESH::ListOfGroups* scale(SMESH::SMESH_IDSource_ptr   theObject,
1087                              const SMESH::PointStruct&   thePoint,
1088                              const SMESH::double_array&  theScaleFact,
1089                              CORBA::Boolean              theCopy,
1090                              bool                        theMakeGroups,
1091                              ::SMESH_Mesh*               theTargetMesh=0)
1092     throw (SALOME::SALOME_Exception);
1093
1094   void convertToQuadratic(CORBA::Boolean            theForce3d,
1095                           CORBA::Boolean            theToBiQuad,
1096                           SMESH::SMESH_IDSource_ptr theObject = SMESH::SMESH_IDSource::_nil())
1097     throw (SALOME::SALOME_Exception);
1098
1099   SMESH::SMESH_Mesh_ptr makeMesh(const char* theMeshName);
1100
1101   void dumpGroupsList(SMESH::TPythonDump & theDumpPython, 
1102                       const SMESH::ListOfGroups * theGroupList);
1103
1104   string generateGroupName(const string& thePrefix);
1105
1106   void prepareIdSource(SMESH::SMESH_IDSource_ptr theObject);
1107
1108 private: //!< fields
1109
1110   SMESH_Mesh_i*                myMesh_i;
1111   SMESH_Mesh *                 myMesh;
1112   ::SMESH_MeshEditor           myEditor;
1113
1114   bool                         myIsPreviewMode;
1115   MeshEditor_I::TPreviewMesh * myPreviewMesh;
1116   ::SMESH_MeshEditor *         myPreviewEditor;
1117   SMESH::MeshPreviewStruct_var myPreviewData;
1118
1119   // temporary IDSources
1120   struct _IDSource;
1121   // std::list< _IDSource* >      myAuxIDSources;
1122   // void                         deleteAuxIDSources();
1123 };
1124
1125 #endif