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