]> SALOME platform Git repositories - modules/smesh.git/blob - src/SMESH_I/SMESH_MeshEditor_i.hxx
Salome HOME
22542: [CEA 1129]Convert to biquadradic creates a node ouside an element if mesh...
[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   // Split/Join faces
208   CORBA::Boolean TriToQuad       (const SMESH::long_array &   IDsOfElements,
209                                   SMESH::NumericalFunctor_ptr Criterion,
210                                   CORBA::Double               MaxAngle)
211     throw (SALOME::SALOME_Exception);
212   CORBA::Boolean TriToQuadObject (SMESH::SMESH_IDSource_ptr   theObject,
213                                   SMESH::NumericalFunctor_ptr Criterion,
214                                   CORBA::Double               MaxAngle)
215     throw (SALOME::SALOME_Exception);
216   CORBA::Boolean QuadToTri       (const SMESH::long_array &   IDsOfElements,
217                                   SMESH::NumericalFunctor_ptr Criterion)
218     throw (SALOME::SALOME_Exception);
219   CORBA::Boolean QuadToTriObject (SMESH::SMESH_IDSource_ptr   theObject,
220                                   SMESH::NumericalFunctor_ptr Criterion)
221     throw (SALOME::SALOME_Exception);
222   void           QuadTo4Tri      (SMESH::SMESH_IDSource_ptr   theObject)
223     throw (SALOME::SALOME_Exception);
224   CORBA::Boolean SplitQuad       (const SMESH::long_array &   IDsOfElements,
225                                   CORBA::Boolean              Diag13)
226     throw (SALOME::SALOME_Exception);
227   CORBA::Boolean SplitQuadObject (SMESH::SMESH_IDSource_ptr   theObject,
228                                   CORBA::Boolean              Diag13)
229     throw (SALOME::SALOME_Exception);
230   CORBA::Long    BestSplit       (CORBA::Long                 IDOfQuad,
231                                   SMESH::NumericalFunctor_ptr Criterion)
232     throw (SALOME::SALOME_Exception);
233   void           SplitVolumesIntoTetra(SMESH::SMESH_IDSource_ptr elems,
234                                        CORBA::Short             methodFlags)
235     throw (SALOME::SALOME_Exception);
236   void           SplitHexahedraIntoPrisms(SMESH::SMESH_IDSource_ptr  elems,
237                                           const SMESH::PointStruct & startHexPoint,
238                                           const SMESH::DirStruct&    facetToSplitNormal,
239                                           CORBA::Short               methodFlags,
240                                           CORBA::Boolean             allDomains)
241     throw (SALOME::SALOME_Exception);
242
243   CORBA::Boolean Smooth(const SMESH::long_array &              IDsOfElements,
244                         const SMESH::long_array &              IDsOfFixedNodes,
245                         CORBA::Long                            MaxNbOfIterations,
246                         CORBA::Double                          MaxAspectRatio,
247                         SMESH::SMESH_MeshEditor::Smooth_Method Method)
248     throw (SALOME::SALOME_Exception);
249   CORBA::Boolean SmoothObject(SMESH::SMESH_IDSource_ptr              theObject,
250                               const SMESH::long_array &              IDsOfFixedNodes,
251                               CORBA::Long                            MaxNbOfIterations,
252                               CORBA::Double                          MaxAspectRatio,
253                               SMESH::SMESH_MeshEditor::Smooth_Method Method)
254     throw (SALOME::SALOME_Exception);
255   CORBA::Boolean SmoothParametric(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 SmoothParametricObject(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 smooth(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                         bool                                   IsParametric)
273     throw (SALOME::SALOME_Exception);
274   CORBA::Boolean smoothObject(SMESH::SMESH_IDSource_ptr              theObject,
275                               const SMESH::long_array &              IDsOfFixedNodes,
276                               CORBA::Long                            MaxNbOfIterations,
277                               CORBA::Double                          MaxAspectRatio,
278                               SMESH::SMESH_MeshEditor::Smooth_Method Method,
279                               bool                                   IsParametric)
280     throw (SALOME::SALOME_Exception);
281
282   CORBA::Boolean ConvertFromQuadratic()
283     throw (SALOME::SALOME_Exception);
284   void           ConvertFromQuadraticObject(SMESH::SMESH_IDSource_ptr theObject)
285     throw (SALOME::SALOME_Exception);
286   void           ConvertToQuadratic(CORBA::Boolean Force3d)
287     throw (SALOME::SALOME_Exception);
288   void           ConvertToQuadraticObject(CORBA::Boolean            theForce3d,
289                                           SMESH::SMESH_IDSource_ptr theObject)
290     throw (SALOME::SALOME_Exception);
291   void           ConvertToBiQuadratic(CORBA::Boolean            theForce3d,
292                                       SMESH::SMESH_IDSource_ptr theObject)
293     throw (SALOME::SALOME_Exception);
294
295   void RenumberNodes() throw (SALOME::SALOME_Exception);
296   void RenumberElements() throw (SALOME::SALOME_Exception);
297
298   void RotationSweep(const SMESH::long_array & IDsOfElements,
299                      const SMESH::AxisStruct & Axis,
300                      CORBA::Double             AngleInRadians,
301                      CORBA::Long               NbOfSteps,
302                      CORBA::Double             Tolerance)
303     throw (SALOME::SALOME_Exception);
304   void RotationSweepObject(SMESH::SMESH_IDSource_ptr theObject,
305                            const SMESH::AxisStruct & Axis,
306                            CORBA::Double             AngleInRadians,
307                            CORBA::Long               NbOfSteps,
308                            CORBA::Double             Tolerance)
309     throw (SALOME::SALOME_Exception);
310   void RotationSweepObject1D(SMESH::SMESH_IDSource_ptr theObject,
311                              const SMESH::AxisStruct & Axis,
312                              CORBA::Double             AngleInRadians,
313                              CORBA::Long               NbOfSteps,
314                              CORBA::Double             Tolerance)
315     throw (SALOME::SALOME_Exception);
316   void RotationSweepObject2D(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
323   void ExtrusionSweep(const SMESH::long_array & IDsOfElements,
324                       const SMESH::DirStruct &  StepVector,
325                       CORBA::Long               NbOfSteps)
326     throw (SALOME::SALOME_Exception);
327   void ExtrusionSweep0D(const SMESH::long_array & IDsOfElements,
328                       const SMESH::DirStruct &  StepVector,
329                       CORBA::Long               NbOfSteps)
330     throw (SALOME::SALOME_Exception);
331
332   void ExtrusionSweepObject(SMESH::SMESH_IDSource_ptr theObject,
333                             const SMESH::DirStruct &  StepVector,
334                             CORBA::Long               NbOfSteps)
335     throw (SALOME::SALOME_Exception);
336
337   void ExtrusionSweepObject0D(SMESH::SMESH_IDSource_ptr theObject,
338                               const SMESH::DirStruct &  StepVector,
339                               CORBA::Long               NbOfSteps)
340     throw (SALOME::SALOME_Exception);
341   void ExtrusionSweepObject1D(SMESH::SMESH_IDSource_ptr theObject,
342                               const SMESH::DirStruct &  StepVector,
343                               CORBA::Long               NbOfSteps)
344     throw (SALOME::SALOME_Exception);
345   void ExtrusionSweepObject2D(SMESH::SMESH_IDSource_ptr theObject,
346                               const SMESH::DirStruct &  StepVector,
347                               CORBA::Long               NbOfSteps)
348     throw (SALOME::SALOME_Exception);
349   void AdvancedExtrusion(const SMESH::long_array & theIDsOfElements,
350                          const SMESH::DirStruct &  theStepVector,
351                          CORBA::Long               theNbOfSteps,
352                          CORBA::Long               theExtrFlags,
353                          CORBA::Double             theSewTolerance)
354     throw (SALOME::SALOME_Exception);
355
356   SMESH::SMESH_MeshEditor::Extrusion_Error
357   ExtrusionAlongPath(const SMESH::long_array &   IDsOfElements,
358                      SMESH::SMESH_Mesh_ptr       PathMesh,
359                      GEOM::GEOM_Object_ptr       PathShape,
360                      CORBA::Long                 NodeStart,
361                      CORBA::Boolean              HasAngles,
362                      const SMESH::double_array & Angles,
363                      CORBA::Boolean              HasRefPoint,
364                      const SMESH::PointStruct &  RefPoint)
365     throw (SALOME::SALOME_Exception);
366
367   SMESH::SMESH_MeshEditor::Extrusion_Error
368   ExtrusionAlongPathObject(SMESH::SMESH_IDSource_ptr   theObject,
369                            SMESH::SMESH_Mesh_ptr       PathMesh,
370                            GEOM::GEOM_Object_ptr       PathShape,
371                            CORBA::Long                 NodeStart,
372                            CORBA::Boolean              HasAngles,
373                            const SMESH::double_array & Angles,
374                            CORBA::Boolean              HasRefPoint,
375                            const SMESH::PointStruct &  RefPoint)
376     throw (SALOME::SALOME_Exception);
377   SMESH::SMESH_MeshEditor::Extrusion_Error
378   ExtrusionAlongPathObject1D(SMESH::SMESH_IDSource_ptr   theObject,
379                              SMESH::SMESH_Mesh_ptr       PathMesh,
380                              GEOM::GEOM_Object_ptr       PathShape,
381                              CORBA::Long                 NodeStart,
382                              CORBA::Boolean              HasAngles,
383                              const SMESH::double_array & Angles,
384                              CORBA::Boolean              HasRefPoint,
385                              const SMESH::PointStruct &  RefPoint)
386     throw (SALOME::SALOME_Exception);
387   SMESH::SMESH_MeshEditor::Extrusion_Error
388   ExtrusionAlongPathObject2D(SMESH::SMESH_IDSource_ptr   theObject,
389                              SMESH::SMESH_Mesh_ptr       PathMesh,
390                              GEOM::GEOM_Object_ptr       PathShape,
391                              CORBA::Long                 NodeStart,
392                              CORBA::Boolean              HasAngles,
393                              const SMESH::double_array & Angles,
394                              CORBA::Boolean              HasRefPoint,
395                              const SMESH::PointStruct &  RefPoint)
396     throw (SALOME::SALOME_Exception);
397
398   SMESH::double_array* LinearAnglesVariation(SMESH::SMESH_Mesh_ptr       PathMesh,
399                                              GEOM::GEOM_Object_ptr       PathShape,
400                                              const SMESH::double_array & Angles);
401
402   void Mirror(const SMESH::long_array &           IDsOfElements,
403               const SMESH::AxisStruct &           Axis,
404               SMESH::SMESH_MeshEditor::MirrorType MirrorType,
405               CORBA::Boolean                      Copy)
406     throw (SALOME::SALOME_Exception);
407   void MirrorObject(SMESH::SMESH_IDSource_ptr           theObject,
408                     const SMESH::AxisStruct &           Axis,
409                     SMESH::SMESH_MeshEditor::MirrorType MirrorType,
410                     CORBA::Boolean                      Copy)
411     throw (SALOME::SALOME_Exception);
412   void Translate(const SMESH::long_array & IDsOfElements,
413                  const SMESH::DirStruct &   Vector,
414                  CORBA::Boolean            Copy)
415     throw (SALOME::SALOME_Exception);
416   void TranslateObject(SMESH::SMESH_IDSource_ptr  theObject,
417                        const SMESH::DirStruct &   Vector,
418                        CORBA::Boolean             Copy)
419     throw (SALOME::SALOME_Exception);
420   void Rotate(const SMESH::long_array & IDsOfElements,
421               const SMESH::AxisStruct &  Axis,
422               CORBA::Double             Angle,
423               CORBA::Boolean            Copy)
424     throw (SALOME::SALOME_Exception);
425   void RotateObject(SMESH::SMESH_IDSource_ptr  theObject,
426                     const SMESH::AxisStruct &  Axis,
427                     CORBA::Double              Angle,
428                     CORBA::Boolean             Copy)
429     throw (SALOME::SALOME_Exception);
430
431   SMESH::ListOfGroups* RotationSweepMakeGroups(const SMESH::long_array& IDsOfElements,
432                                                const SMESH::AxisStruct& Axix,
433                                                CORBA::Double            AngleInRadians,
434                                                CORBA::Long              NbOfSteps,
435                                                CORBA::Double            Tolerance)
436     throw (SALOME::SALOME_Exception);
437   SMESH::ListOfGroups* RotationSweepObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
438                                                      const SMESH::AxisStruct&  Axix,
439                                                      CORBA::Double             AngleInRadians,
440                                                      CORBA::Long               NbOfSteps,
441                                                      CORBA::Double             Tolerance)
442     throw (SALOME::SALOME_Exception);
443   SMESH::ListOfGroups* RotationSweepObject1DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
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* RotationSweepObject2DMakeGroups(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* ExtrusionSweepMakeGroups(const SMESH::long_array& IDsOfElements,
456                                                 const SMESH::DirStruct&  StepVector,
457                                                 CORBA::Long              NbOfSteps)
458     throw (SALOME::SALOME_Exception);
459   SMESH::ListOfGroups* ExtrusionSweepMakeGroups0D(const SMESH::long_array& IDsOfElements,
460                                                 const SMESH::DirStruct&  StepVector,
461                                                 CORBA::Long              NbOfSteps)
462     throw (SALOME::SALOME_Exception);
463
464   SMESH::ListOfGroups* AdvancedExtrusionMakeGroups(const SMESH::long_array& IDsOfElements,
465                                                    const SMESH::DirStruct&  StepVector,
466                                                    CORBA::Long              NbOfSteps,
467                                                    CORBA::Long              ExtrFlags,
468                                                    CORBA::Double            SewTolerance)
469     throw (SALOME::SALOME_Exception);
470   SMESH::ListOfGroups* ExtrusionSweepObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
471                                                       const SMESH::DirStruct&   StepVector,
472                                                       CORBA::Long               NbOfSteps)
473     throw (SALOME::SALOME_Exception);
474   SMESH::ListOfGroups* ExtrusionSweepObject0DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
475                                                         const SMESH::DirStruct&   StepVector,
476                                                         CORBA::Long               NbOfSteps)
477     throw (SALOME::SALOME_Exception);
478   SMESH::ListOfGroups* ExtrusionSweepObject1DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
479                                                         const SMESH::DirStruct&   StepVector,
480                                                         CORBA::Long               NbOfSteps)
481     throw (SALOME::SALOME_Exception);
482   SMESH::ListOfGroups* ExtrusionSweepObject2DMakeGroups(SMESH::SMESH_IDSource_ptr Object,
483                                                         const SMESH::DirStruct&   StepVector,
484                                                         CORBA::Long               NbOfSteps)
485     throw (SALOME::SALOME_Exception);
486   SMESH::ListOfGroups* ExtrusionAlongPathMakeGroups(const SMESH::long_array&   IDsOfElements,
487                                                     SMESH::SMESH_Mesh_ptr      PathMesh,
488                                                     GEOM::GEOM_Object_ptr      PathShape,
489                                                     CORBA::Long                NodeStart,
490                                                     CORBA::Boolean             HasAngles,
491                                                     const SMESH::double_array& Angles,
492                                                     CORBA::Boolean             HasRefPoint,
493                                                     const SMESH::PointStruct&  RefPoint,
494                                                     SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
495     throw (SALOME::SALOME_Exception);
496   SMESH::ListOfGroups* ExtrusionAlongPathObjectMakeGroups(SMESH::SMESH_IDSource_ptr  Object,
497                                                           SMESH::SMESH_Mesh_ptr      PathMesh,
498                                                           GEOM::GEOM_Object_ptr      PathShape,
499                                                           CORBA::Long                NodeStart,
500                                                           CORBA::Boolean             HasAngles,
501                                                           const SMESH::double_array& Angles,
502                                                           CORBA::Boolean             HasRefPoint,
503                                                           const SMESH::PointStruct&  RefPoint,
504                                                           SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
505     throw (SALOME::SALOME_Exception);
506   SMESH::ListOfGroups* ExtrusionAlongPathObject1DMakeGroups(SMESH::SMESH_IDSource_ptr  Object,
507                                                             SMESH::SMESH_Mesh_ptr      PathMesh,
508                                                             GEOM::GEOM_Object_ptr      PathShape,
509                                                             CORBA::Long                NodeStart,
510                                                             CORBA::Boolean             HasAngles,
511                                                             const SMESH::double_array& Angles,
512                                                             CORBA::Boolean             HasRefPoint,
513                                                             const SMESH::PointStruct&  RefPoint,
514                                                             SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
515     throw (SALOME::SALOME_Exception);
516   SMESH::ListOfGroups* ExtrusionAlongPathObject2DMakeGroups(SMESH::SMESH_IDSource_ptr  Object,
517                                                             SMESH::SMESH_Mesh_ptr      PathMesh,
518                                                             GEOM::GEOM_Object_ptr      PathShape,
519                                                             CORBA::Long                NodeStart,
520                                                             CORBA::Boolean             HasAngles,
521                                                             const SMESH::double_array& Angles,
522                                                             CORBA::Boolean             HasRefPoint,
523                                                             const SMESH::PointStruct&  RefPoint,
524                                                             SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
525     throw (SALOME::SALOME_Exception);
526
527   // skl 04.06.2009 
528   SMESH::ListOfGroups* ExtrusionAlongPathObjX(SMESH::SMESH_IDSource_ptr  Object,
529                                               SMESH::SMESH_IDSource_ptr  Path,
530                                               CORBA::Long                NodeStart,
531                                               CORBA::Boolean             HasAngles,
532                                               const SMESH::double_array& Angles,
533                                               CORBA::Boolean             LinearVariation,
534                                               CORBA::Boolean             HasRefPoint,
535                                               const SMESH::PointStruct&  RefPoint,
536                                               CORBA::Boolean             MakeGroups,
537                                               SMESH::ElementType         ElemType,
538                                               SMESH::SMESH_MeshEditor::Extrusion_Error& Error)
539     throw (SALOME::SALOME_Exception);
540   SMESH::ListOfGroups* ExtrusionAlongPathX(const SMESH::long_array&   IDsOfElements,
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
553   SMESH::ListOfGroups* MirrorMakeGroups(const SMESH::long_array&            IDsOfElements,
554                                         const SMESH::AxisStruct&            Mirror,
555                                         SMESH::SMESH_MeshEditor::MirrorType MirrorType)
556     throw (SALOME::SALOME_Exception);
557   SMESH::ListOfGroups* MirrorObjectMakeGroups(SMESH::SMESH_IDSource_ptr           Object,
558                                               const SMESH::AxisStruct&            Mirror,
559                                               SMESH::SMESH_MeshEditor::MirrorType MirrorType)
560     throw (SALOME::SALOME_Exception);
561   SMESH::ListOfGroups* TranslateMakeGroups(const SMESH::long_array& IDsOfElements,
562                                            const SMESH::DirStruct&  Vector)
563     throw (SALOME::SALOME_Exception);
564   SMESH::ListOfGroups* TranslateObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
565                                                  const SMESH::DirStruct&   Vector)
566     throw (SALOME::SALOME_Exception);
567   SMESH::ListOfGroups* RotateMakeGroups(const SMESH::long_array& IDsOfElements,
568                                         const SMESH::AxisStruct& Axis,
569                                         CORBA::Double            AngleInRadians)
570     throw (SALOME::SALOME_Exception);
571   SMESH::ListOfGroups* RotateObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
572                                               const SMESH::AxisStruct&  Axis,
573                                               CORBA::Double             AngleInRadians)
574     throw (SALOME::SALOME_Exception);
575
576   SMESH::SMESH_Mesh_ptr MirrorMakeMesh(const SMESH::long_array&            IDsOfElements,
577                                        const SMESH::AxisStruct&            Mirror,
578                                        SMESH::SMESH_MeshEditor::MirrorType MirrorType,
579                                        CORBA::Boolean                      CopyGroups,
580                                        const char*                         MeshName)
581     throw (SALOME::SALOME_Exception);
582   SMESH::SMESH_Mesh_ptr MirrorObjectMakeMesh(SMESH::SMESH_IDSource_ptr           Object,
583                                              const SMESH::AxisStruct&            Mirror,
584                                              SMESH::SMESH_MeshEditor::MirrorType MirrorType,
585                                              CORBA::Boolean                      CopyGroups,
586                                              const char*                         MeshName)
587     throw (SALOME::SALOME_Exception);
588   SMESH::SMESH_Mesh_ptr TranslateMakeMesh(const SMESH::long_array& IDsOfElements,
589                                           const SMESH::DirStruct&  Vector,
590                                           CORBA::Boolean           CopyGroups,
591                                           const char*              MeshName)
592     throw (SALOME::SALOME_Exception);
593   SMESH::SMESH_Mesh_ptr TranslateObjectMakeMesh(SMESH::SMESH_IDSource_ptr Object,
594                                                 const SMESH::DirStruct&   Vector,
595                                                 CORBA::Boolean            CopyGroups,
596                                                 const char*               MeshName)
597     throw (SALOME::SALOME_Exception);
598   SMESH::SMESH_Mesh_ptr RotateMakeMesh(const SMESH::long_array& IDsOfElements,
599                                        const SMESH::AxisStruct& Axis,
600                                        CORBA::Double            AngleInRadians,
601                                        CORBA::Boolean           CopyGroups,
602                                        const char*              MeshName)
603     throw (SALOME::SALOME_Exception);
604   SMESH::SMESH_Mesh_ptr RotateObjectMakeMesh(SMESH::SMESH_IDSource_ptr Object,
605                                              const SMESH::AxisStruct&  Axis,
606                                              CORBA::Double             AngleInRadians,
607                                              CORBA::Boolean            CopyGroups,
608                                              const char*               MeshName)
609     throw (SALOME::SALOME_Exception);
610
611   void Scale(SMESH::SMESH_IDSource_ptr  theObject,
612              const SMESH::PointStruct&  thePoint,
613              const SMESH::double_array& theScaleFact,
614              CORBA::Boolean             theCopy)
615     throw (SALOME::SALOME_Exception);
616
617   SMESH::ListOfGroups* ScaleMakeGroups(SMESH::SMESH_IDSource_ptr  theObject,
618                                        const SMESH::PointStruct&  thePoint,
619                                        const SMESH::double_array& theScaleFact)
620     throw (SALOME::SALOME_Exception);
621
622   SMESH::SMESH_Mesh_ptr ScaleMakeMesh(SMESH::SMESH_IDSource_ptr Object,
623                                       const SMESH::PointStruct& Point,
624                                       const SMESH::double_array& theScaleFact,
625                                       CORBA::Boolean            CopyGroups,
626                                       const char*               MeshName)
627     throw (SALOME::SALOME_Exception);
628
629   void FindCoincidentNodes (CORBA::Double                  Tolerance,
630                             SMESH::array_of_long_array_out GroupsOfNodes)
631     throw (SALOME::SALOME_Exception);
632   void FindCoincidentNodesOnPart(SMESH::SMESH_IDSource_ptr      Object,
633                                  CORBA::Double                  Tolerance,
634                                  SMESH::array_of_long_array_out GroupsOfNodes)
635     throw (SALOME::SALOME_Exception);
636   void FindCoincidentNodesOnPartBut(SMESH::SMESH_IDSource_ptr      Object,
637                                     CORBA::Double                  Tolerance,
638                                     SMESH::array_of_long_array_out GroupsOfNodes,
639                                     const SMESH::ListOfIDSources&  ExceptSubMeshOrGroups)
640     throw (SALOME::SALOME_Exception);
641   void MergeNodes (const SMESH::array_of_long_array& GroupsOfNodes)
642     throw (SALOME::SALOME_Exception);
643   void FindEqualElements(SMESH::SMESH_IDSource_ptr      Object,
644                          SMESH::array_of_long_array_out GroupsOfElementsID)
645     throw (SALOME::SALOME_Exception);
646   void MergeElements(const SMESH::array_of_long_array& GroupsOfElementsID)
647     throw (SALOME::SALOME_Exception);
648   void MergeEqualElements()
649     throw (SALOME::SALOME_Exception);
650   CORBA::Long MoveClosestNodeToPoint(CORBA::Double x,
651                                      CORBA::Double y,
652                                      CORBA::Double z,
653                                      CORBA::Long   nodeID)
654     throw (SALOME::SALOME_Exception);
655   /*!
656    * \brief Return ID of node closest to a given point
657    */
658   CORBA::Long FindNodeClosestTo(CORBA::Double x,
659                                 CORBA::Double y,
660                                 CORBA::Double z)
661     throw (SALOME::SALOME_Exception);
662   /*!
663    * Return elements of given type where the given point is IN or ON.
664    * 'ALL' type means elements of any type excluding nodes
665    */
666   SMESH::long_array* FindElementsByPoint(CORBA::Double      x,
667                                          CORBA::Double      y,
668                                          CORBA::Double      z,
669                                          SMESH::ElementType type)
670     throw (SALOME::SALOME_Exception);
671   /*!
672    * Searching among the given elements, return elements of given type 
673    * where the given point is IN or ON.
674    * 'ALL' type means elements of any type excluding nodes
675    */
676   SMESH::long_array* FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elements,
677                                               CORBA::Double             x,
678                                               CORBA::Double             y,
679                                               CORBA::Double             z,
680                                               SMESH::ElementType        type)
681     throw (SALOME::SALOME_Exception);
682
683   /*!
684    * Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
685    * TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
686    */
687   CORBA::Short GetPointState(CORBA::Double x, CORBA::Double y, CORBA::Double z)
688     throw (SALOME::SALOME_Exception);
689
690   SMESH::SMESH_MeshEditor::Sew_Error
691   SewFreeBorders(CORBA::Long FirstNodeID1,
692                  CORBA::Long SecondNodeID1,
693                  CORBA::Long LastNodeID1,
694                  CORBA::Long FirstNodeID2,
695                  CORBA::Long SecondNodeID2,
696                  CORBA::Long LastNodeID2,
697                  CORBA::Boolean CreatePolygons,
698                  CORBA::Boolean CreatePolyedrs)
699     throw (SALOME::SALOME_Exception);
700   SMESH::SMESH_MeshEditor::Sew_Error
701   SewConformFreeBorders(CORBA::Long FirstNodeID1,
702                         CORBA::Long SecondNodeID1,
703                         CORBA::Long LastNodeID1,
704                         CORBA::Long FirstNodeID2,
705                         CORBA::Long SecondNodeID2)
706     throw (SALOME::SALOME_Exception);
707   SMESH::SMESH_MeshEditor::Sew_Error
708   SewBorderToSide(CORBA::Long FirstNodeIDOnFreeBorder,
709                   CORBA::Long SecondNodeIDOnFreeBorder,
710                   CORBA::Long LastNodeIDOnFreeBorder,
711                   CORBA::Long FirstNodeIDOnSide,
712                   CORBA::Long LastNodeIDOnSide,
713                   CORBA::Boolean CreatePolygons,
714                   CORBA::Boolean CreatePolyedrs)
715     throw (SALOME::SALOME_Exception);
716   SMESH::SMESH_MeshEditor::Sew_Error
717   SewSideElements(const SMESH::long_array& IDsOfSide1Elements,
718                   const SMESH::long_array& IDsOfSide2Elements,
719                   CORBA::Long NodeID1OfSide1ToMerge,
720                   CORBA::Long NodeID1OfSide2ToMerge,
721                   CORBA::Long NodeID2OfSide1ToMerge,
722                   CORBA::Long NodeID2OfSide2ToMerge)
723     throw (SALOME::SALOME_Exception);
724
725   /*!
726    * Set new nodes for given element.
727    * If number of nodes is not corresponded to type of
728    * element - returns false
729    */
730   CORBA::Boolean ChangeElemNodes(CORBA::Long ide, const SMESH::long_array& newIDs)
731     throw (SALOME::SALOME_Exception);
732
733   SMESH::SMESH_Group_ptr DoubleElements(SMESH::SMESH_IDSource_ptr theElements,
734                                         const char*               theGroupName)
735     throw (SALOME::SALOME_Exception);
736
737   CORBA::Boolean DoubleNodes( const SMESH::long_array& theNodes,
738                               const SMESH::long_array& theModifiedElems )
739     throw (SALOME::SALOME_Exception);
740
741   CORBA::Boolean DoubleNode( CORBA::Long theNodeId,
742                              const SMESH::long_array& theModifiedElems )
743     throw (SALOME::SALOME_Exception);
744
745   CORBA::Boolean DoubleNodeGroup( SMESH::SMESH_GroupBase_ptr theNodes,
746                                   SMESH::SMESH_GroupBase_ptr theModifiedElems )
747     throw (SALOME::SALOME_Exception);
748
749   /*!
750    * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
751    * Works as DoubleNodeGroup(), but returns a new group with newly created nodes.
752    * \param theNodes - group of nodes to be doubled.
753    * \param theModifiedElems - group of elements to be updated.
754    * \return a new group with newly created nodes
755    * \sa DoubleNodeGroup()
756    */
757   SMESH::SMESH_Group_ptr DoubleNodeGroupNew( SMESH::SMESH_GroupBase_ptr theNodes,
758                                              SMESH::SMESH_GroupBase_ptr theModifiedElems )
759     throw (SALOME::SALOME_Exception);
760
761   CORBA::Boolean DoubleNodeGroups( const SMESH::ListOfGroups& theNodes,
762                                    const SMESH::ListOfGroups& theModifiedElems )
763     throw (SALOME::SALOME_Exception);
764
765   SMESH::SMESH_Group_ptr DoubleNodeGroupsNew( const SMESH::ListOfGroups& theNodes,
766                                               const SMESH::ListOfGroups& theModifiedElems )
767     throw (SALOME::SALOME_Exception);
768
769   /*!
770    * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
771    * \param theElems - the list of elements (edges or faces) to be replicated
772    *       The nodes for duplication could be found from these elements
773    * \param theNodesNot - list of nodes to NOT replicate
774    * \param theAffectedElems - the list of elements (cells and edges) to which the 
775    *       replicated nodes should be associated to.
776    * \return TRUE if operation has been completed successfully, FALSE otherwise
777    * \sa DoubleNodeGroup(), DoubleNodeGroups()
778    */
779   CORBA::Boolean DoubleNodeElem( const SMESH::long_array& theElems, 
780                                  const SMESH::long_array& theNodesNot,
781                                  const SMESH::long_array& theAffectedElems )
782     throw (SALOME::SALOME_Exception);
783
784   /*!
785    * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
786    * \param theElems - the list of elements (edges or faces) to be replicated
787    *        The nodes for duplication could be found from these elements
788    * \param theNodesNot - list of nodes to NOT replicate
789    * \param theShape - shape to detect affected elements (element which geometric center
790    *        located on or inside shape).
791    *        The replicated nodes should be associated to affected elements.
792    * \return TRUE if operation has been completed successfully, FALSE otherwise
793    * \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
794    */
795   CORBA::Boolean DoubleNodeElemInRegion( const SMESH::long_array& theElems, 
796                                          const SMESH::long_array& theNodesNot,
797                                          GEOM::GEOM_Object_ptr    theShape )
798     throw (SALOME::SALOME_Exception);
799
800   /*!
801    * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
802    * \param theElems - group of of elements (edges or faces) to be replicated
803    * \param theNodesNot - group of nodes not to replicated
804    * \param theAffectedElems - group of elements to which the replicated nodes
805    *        should be associated to.
806    * \return TRUE if operation has been completed successfully, FALSE otherwise
807    * \sa DoubleNodes(), DoubleNodeGroups(), DoubleNodeElemGroupNew()
808    */
809   CORBA::Boolean DoubleNodeElemGroup( SMESH::SMESH_GroupBase_ptr theElems,
810                                       SMESH::SMESH_GroupBase_ptr theNodesNot,
811                                       SMESH::SMESH_GroupBase_ptr theAffectedElems )
812     throw (SALOME::SALOME_Exception);
813
814   /*!
815    * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
816    * Works as DoubleNodeElemGroup(), but returns a new group with newly created elements.
817    * \param theElems - group of of elements (edges or faces) to be replicated
818    * \param theNodesNot - group of nodes not to replicated
819    * \param theAffectedElems - group of elements to which the replicated nodes
820    *        should be associated to.
821    * \return a new group with newly created elements
822    * \sa DoubleNodeElemGroup()
823    */
824   SMESH::SMESH_Group_ptr DoubleNodeElemGroupNew( SMESH::SMESH_GroupBase_ptr theElems,
825                                                  SMESH::SMESH_GroupBase_ptr theNodesNot,
826                                                  SMESH::SMESH_GroupBase_ptr theAffectedElems )
827     throw (SALOME::SALOME_Exception);
828
829   SMESH::ListOfGroups*   DoubleNodeElemGroup2New(SMESH::SMESH_GroupBase_ptr theElems,
830                                                  SMESH::SMESH_GroupBase_ptr theNodesNot,
831                                                  SMESH::SMESH_GroupBase_ptr theAffectedElems,
832                                                  CORBA::Boolean             theElemGroupNeeded,
833                                                  CORBA::Boolean             theNodeGroupNeeded)
834     throw (SALOME::SALOME_Exception);
835   
836   /*!
837    * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
838    * \param theElems - group of of elements (edges or faces) to be replicated
839    * \param theNodesNot - group of nodes not to replicated
840    * \param theShape - shape to detect affected elements (element which geometric center
841    *        located on or inside shape).
842    *        The replicated nodes should be associated to affected elements.
843    * \return TRUE if operation has been completed successfully, FALSE otherwise
844    * \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
845    */
846   CORBA::Boolean DoubleNodeElemGroupInRegion( SMESH::SMESH_GroupBase_ptr theElems,
847                                               SMESH::SMESH_GroupBase_ptr theNodesNot,
848                                               GEOM::GEOM_Object_ptr      theShape )
849     throw (SALOME::SALOME_Exception);
850
851   /*!
852    * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
853    * This method provided for convenience works as DoubleNodes() described above.
854    * \param theElems - list of groups of elements (edges or faces) to be replicated
855    * \param theNodesNot - list of groups of nodes not to replicated
856    * \param theAffectedElems - group of elements to which the replicated nodes
857    *        should be associated to.
858    * \return TRUE if operation has been completed successfully, FALSE otherwise
859    * \sa DoubleNodeGroup(), DoubleNodes(), DoubleNodeElemGroupsNew()
860    */
861   CORBA::Boolean DoubleNodeElemGroups( const SMESH::ListOfGroups& theElems,
862                                        const SMESH::ListOfGroups& theNodesNot,
863                                        const SMESH::ListOfGroups& theAffectedElems )
864     throw (SALOME::SALOME_Exception);
865
866   /*!
867    * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
868    * Works as DoubleNodeElemGroups(), but returns a new group with newly created elements.
869    * \param theElems - list of groups of elements (edges or faces) to be replicated
870    * \param theNodesNot - list of groups of nodes not to replicated
871    * \param theAffectedElems - group of elements to which the replicated nodes
872    *        should be associated to.
873    * \return a new group with newly created elements
874    * \sa DoubleNodeElemGroups()
875    */
876   SMESH::SMESH_Group_ptr DoubleNodeElemGroupsNew( const SMESH::ListOfGroups& theElems,
877                                                   const SMESH::ListOfGroups& theNodesNot,
878                                                   const SMESH::ListOfGroups& theAffectedElems )
879     throw (SALOME::SALOME_Exception);
880
881   SMESH::ListOfGroups*   DoubleNodeElemGroups2New(const SMESH::ListOfGroups& theElems,
882                                                   const SMESH::ListOfGroups& theNodesNot,
883                                                   const SMESH::ListOfGroups& theAffectedElems,
884                                                   CORBA::Boolean             theElemGroupNeeded,
885                                                   CORBA::Boolean             theNodeGroupNeeded)
886     throw (SALOME::SALOME_Exception);
887
888   /*!
889    * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
890    * This method provided for convenience works as DoubleNodes() described above.
891    * \param theElems - list of groups of elements (edges or faces) to be replicated
892    * \param theNodesNot - list of groups of nodes not to replicated
893    * \param theShape - shape to detect affected elements (element which geometric center
894    *        located on or inside shape).
895    *        The replicated nodes should be associated to affected elements.
896    * \return TRUE if operation has been completed successfully, FALSE otherwise
897    * \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
898    */
899   CORBA::Boolean DoubleNodeElemGroupsInRegion( const SMESH::ListOfGroups& theElems,
900                                                const SMESH::ListOfGroups& theNodesNot,
901                                                GEOM::GEOM_Object_ptr      theShape )
902     throw (SALOME::SALOME_Exception);
903
904   /*!
905    * \brief Identify the elements that will be affected by node duplication (actual duplication is not performed.
906    * This method is the first step of DoubleNodeElemGroupsInRegion.
907    * \param theElems - list of groups of elements (edges or faces) to be replicated
908    * \param theNodesNot - list of groups of nodes not to replicated
909    * \param theShape - shape to detect affected elements (element which geometric center
910    *        located on or inside shape).
911    *        The replicated nodes should be associated to affected elements.
912    * \return groups of affected elements
913    * \sa DoubleNodeElemGroupsInRegion()
914    */
915   SMESH::ListOfGroups* AffectedElemGroupsInRegion( const SMESH::ListOfGroups& theElems,
916                                                    const SMESH::ListOfGroups& theNodesNot,
917                                                    GEOM::GEOM_Object_ptr      theShape )
918     throw (SALOME::SALOME_Exception);
919
920   /*!
921    * \brief Double nodes on shared faces between groups of volumes and create flat elements on demand.
922    * The list of groups must describe a partition of the mesh volumes.
923    * The nodes of the internal faces at the boundaries of the groups are doubled.
924    * In option, the internal faces are replaced by flat elements.
925    * Triangles are transformed in prisms, and quadrangles in hexahedrons.
926    * \param theDomains - list of groups of volumes
927    * \param createJointElems - if TRUE, create the elements
928    * \param onAllBoundaries - if TRUE, the nodes and elements are also create on
929    *        the boundary between \a theDomains and the rest mesh
930    * \return TRUE if operation has been completed successfully, FALSE otherwise
931    */
932   CORBA::Boolean DoubleNodesOnGroupBoundaries( const SMESH::ListOfGroups& theDomains,
933                                                CORBA::Boolean             createJointElems,
934                                                CORBA::Boolean             onAllBoundaries )
935     throw (SALOME::SALOME_Exception);
936   /*!
937    * \brief Double nodes on some external faces and create flat elements.
938    * Flat elements are mainly used by some types of mechanic calculations.
939    *
940    * Each group of the list must be constituted of faces.
941    * Triangles are transformed in prisms, and quadrangles in hexahedrons.
942    * @param theGroupsOfFaces - list of groups of faces
943    * @return TRUE if operation has been completed successfully, FALSE otherwise
944    */
945   CORBA::Boolean CreateFlatElementsOnFacesGroups( const SMESH::ListOfGroups& theGroupsOfFaces )
946     throw (SALOME::SALOME_Exception);
947
948   /*!
949    *  \brief identify all the elements around a geom shape, get the faces delimiting the hole
950    *  Build groups of volume to remove, groups of faces to replace on the skin of the object,
951    *  groups of faces to remove insidethe object, (idem edges).
952    *  Build ordered list of nodes at the border of each group of faces to replace (to be used to build a geom subshape)
953    */
954   void CreateHoleSkin(CORBA::Double radius,
955                       GEOM::GEOM_Object_ptr theShape,
956                       const char* groupName,
957                       const SMESH::double_array& theNodesCoords,
958                       SMESH::array_of_long_array_out GroupsOfNodes)
959   throw (SALOME::SALOME_Exception);
960
961   /*!
962    * \brief Generated skin mesh (containing 2D cells) from 3D mesh
963    * The created 2D mesh elements based on nodes of free faces of boundary volumes
964    * \return TRUE if operation has been completed successfully, FALSE otherwise
965    */
966   CORBA::Boolean Make2DMeshFrom3D()
967     throw (SALOME::SALOME_Exception);
968
969   SMESH::SMESH_Mesh_ptr MakeBoundaryMesh(SMESH::SMESH_IDSource_ptr elements,
970                                          SMESH::Bnd_Dimension      dimension,
971                                          const char*               groupName,
972                                          const char*               meshName,
973                                          CORBA::Boolean            toCopyElements,
974                                          CORBA::Boolean            toCopyMissingBondary,
975                                          SMESH::SMESH_Group_out    group)
976     throw (SALOME::SALOME_Exception);
977
978   CORBA::Long MakeBoundaryElements(SMESH::Bnd_Dimension dimension,
979                                    const char* groupName,
980                                    const char* meshName,
981                                    CORBA::Boolean toCopyAll,
982                                    const SMESH::ListOfIDSources& groups,
983                                    SMESH::SMESH_Mesh_out mesh,
984                                    SMESH::SMESH_Group_out group)
985     throw (SALOME::SALOME_Exception);
986
987 private: //!< private methods
988
989   ::SMESH_MeshEditor& getEditor();
990
991   SMESHDS_Mesh * getMeshDS() { return myMesh->GetMeshDS(); }
992
993   MeshEditor_I::TPreviewMesh * getPreviewMesh( SMDSAbs_ElementType previewType = SMDSAbs_All );
994
995   void declareMeshModified( bool isReComputeSafe );
996
997   /*!
998    * \brief Clear myLastCreated* or myPreviewData
999    */
1000   void initData(bool deleteSearchers=true);
1001
1002   /*!
1003    * \brief Return groups by their IDs
1004    */
1005   SMESH::ListOfGroups* getGroups(const std::list<int>* groupIDs)
1006     throw (SALOME::SALOME_Exception);
1007
1008   SMESH::ListOfGroups* rotationSweep(const SMESH::long_array & IDsOfElements,
1009                                      const SMESH::AxisStruct & Axis,
1010                                      CORBA::Double             AngleInRadians,
1011                                      CORBA::Long               NbOfSteps,
1012                                      CORBA::Double             Tolerance,
1013                                      const bool                MakeGroups,
1014                                      const SMDSAbs_ElementType ElementType=SMDSAbs_All)
1015     throw (SALOME::SALOME_Exception);
1016   SMESH::ListOfGroups* extrusionSweep(const SMESH::long_array & IDsOfElements,
1017                                       const SMESH::DirStruct &  StepVector,
1018                                       CORBA::Long               NbOfSteps,
1019                                       bool                      MakeGroups,
1020                                       const SMDSAbs_ElementType ElementType=SMDSAbs_All)
1021     throw (SALOME::SALOME_Exception);
1022   SMESH::ListOfGroups* advancedExtrusion(const SMESH::long_array & theIDsOfElements,
1023                                          const SMESH::DirStruct &  theStepVector,
1024                                          CORBA::Long               theNbOfSteps,
1025                                          CORBA::Long               theExtrFlags,
1026                                          CORBA::Double             theSewTolerance,
1027                                          const bool                MakeGroups)
1028     throw (SALOME::SALOME_Exception);
1029   SMESH::ListOfGroups* extrusionAlongPath(const SMESH::long_array &   IDsOfElements,
1030                                           SMESH::SMESH_Mesh_ptr       PathMesh,
1031                                           GEOM::GEOM_Object_ptr       PathShape,
1032                                           CORBA::Long                 NodeStart,
1033                                           CORBA::Boolean              HasAngles,
1034                                           const SMESH::double_array & Angles,
1035                                           CORBA::Boolean              HasRefPoint,
1036                                           const SMESH::PointStruct &  RefPoint,
1037                                           const bool                  MakeGroups,
1038                                           SMESH::SMESH_MeshEditor::Extrusion_Error & Error,
1039                                           const SMDSAbs_ElementType   ElementType=SMDSAbs_All)
1040     throw (SALOME::SALOME_Exception);
1041   SMESH::ListOfGroups* extrusionAlongPathX(const SMESH::long_array &  IDsOfElements,
1042                                            SMESH::SMESH_IDSource_ptr  Path,
1043                                            CORBA::Long                NodeStart,
1044                                            CORBA::Boolean             HasAngles,
1045                                            const SMESH::double_array& Angles,
1046                                            CORBA::Boolean             LinearVariation,
1047                                            CORBA::Boolean             HasRefPoint,
1048                                            const SMESH::PointStruct&  RefPoint,
1049                                            bool                       MakeGroups,
1050                                            const SMDSAbs_ElementType  ElementType,
1051                                            SMESH::SMESH_MeshEditor::Extrusion_Error & theError)
1052     throw (SALOME::SALOME_Exception);
1053   SMESH::ListOfGroups* mirror(TIDSortedElemSet &                  IDsOfElements,
1054                               const SMESH::AxisStruct &           Axis,
1055                               SMESH::SMESH_MeshEditor::MirrorType MirrorType,
1056                               CORBA::Boolean                      Copy,
1057                               bool                                MakeGroups,
1058                               ::SMESH_Mesh*                       TargetMesh=0)
1059     throw (SALOME::SALOME_Exception);
1060   SMESH::ListOfGroups* translate(TIDSortedElemSet        & IDsOfElements,
1061                                  const SMESH::DirStruct &  Vector,
1062                                  CORBA::Boolean            Copy,
1063                                  bool                      MakeGroups,
1064                                  ::SMESH_Mesh*             TargetMesh=0)
1065     throw (SALOME::SALOME_Exception);
1066   SMESH::ListOfGroups* rotate(TIDSortedElemSet &           IDsOfElements,
1067                               const SMESH::AxisStruct &  Axis,
1068                               CORBA::Double             Angle,
1069                               CORBA::Boolean            Copy,
1070                               bool                      MakeGroups,
1071                               ::SMESH_Mesh*             TargetMesh=0)
1072     throw (SALOME::SALOME_Exception);
1073
1074   SMESH::ListOfGroups* scale(SMESH::SMESH_IDSource_ptr   theObject,
1075                              const SMESH::PointStruct&   thePoint,
1076                              const SMESH::double_array&  theScaleFact,
1077                              CORBA::Boolean              theCopy,
1078                              bool                        theMakeGroups,
1079                              ::SMESH_Mesh*               theTargetMesh=0)
1080     throw (SALOME::SALOME_Exception);
1081
1082   void convertToQuadratic(CORBA::Boolean            theForce3d,
1083                           CORBA::Boolean            theToBiQuad,
1084                           SMESH::SMESH_IDSource_ptr theObject = SMESH::SMESH_IDSource::_nil())
1085     throw (SALOME::SALOME_Exception);
1086
1087   SMESH::SMESH_Mesh_ptr makeMesh(const char* theMeshName);
1088
1089   void dumpGroupsList(SMESH::TPythonDump & theDumpPython, 
1090                       const SMESH::ListOfGroups * theGroupList);
1091
1092   string generateGroupName(const string& thePrefix);
1093
1094   void prepareIdSource(SMESH::SMESH_IDSource_ptr theObject);
1095
1096 private: //!< fields
1097
1098   SMESH_Mesh_i*                myMesh_i;
1099   SMESH_Mesh *                 myMesh;
1100   ::SMESH_MeshEditor           myEditor;
1101
1102   bool                         myIsPreviewMode;
1103   MeshEditor_I::TPreviewMesh * myPreviewMesh;
1104   ::SMESH_MeshEditor *         myPreviewEditor;
1105   SMESH::MeshPreviewStruct_var myPreviewData;
1106
1107   // temporary IDSources
1108   struct _IDSource;
1109   // std::list< _IDSource* >      myAuxIDSources;
1110   // void                         deleteAuxIDSources();
1111 };
1112
1113 #endif