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