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