Salome HOME
PAL16617 (Modification/Transformation operations with copy don't create a new mesh)
[modules/smesh.git] / src / SMESH / SMESH_MeshEditor.hxx
1 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
2 //
3 //  Copyright (C) 2003  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 //
24 // File      : SMESH_MeshEditor.hxx
25 // Created   : Mon Apr 12 14:56:19 2004
26 // Author    : Edward AGAPOV (eap)
27 // Module    : SMESH
28
29
30 #ifndef SMESH_MeshEditor_HeaderFile
31 #define SMESH_MeshEditor_HeaderFile
32
33 #include "SMESH_Mesh.hxx"
34 #include "SMESH_Controls.hxx"
35 #include "SMESH_SequenceOfNode.hxx"
36 #include "SMESH_SequenceOfElemPtr.hxx"
37 #include "TColStd_HSequenceOfReal.hxx"
38 #include "SMESH_MesherHelper.hxx"
39 #include "SMDS_MeshElement.hxx"
40
41 #include <gp_Dir.hxx>
42
43 #include <list>
44 #include <map>
45
46 typedef std::map<const SMDS_MeshElement*,
47                  std::list<const SMDS_MeshElement*> >        TElemOfElemListMap;
48 typedef std::map<const SMDS_MeshNode*, const SMDS_MeshNode*> TNodeNodeMap;
49
50 class SMDS_MeshFace;
51 class SMDS_MeshNode;
52 class gp_Ax1;
53 class gp_Vec;
54 class gp_Pnt;
55
56 // ============================================================
57 /*!
58  * \brief Set of elements sorted by ID, to be used to assure
59  *  predictability of edition
60  */
61 // ============================================================
62
63 template < class TMeshElem = SMDS_MeshElement>
64 struct TIDCompare {
65   bool operator () (const TMeshElem* e1, const TMeshElem* e2) const
66   { return e1->GetID() < e2->GetID(); }
67 };
68 typedef std::set< const SMDS_MeshElement*, TIDCompare< SMDS_MeshElement> > TIDSortedElemSet;
69
70 // ============================================================
71 /*!
72  * \brief Searcher for the node closest to point
73  */
74 // ============================================================
75
76 struct SMESH_NodeSearcher
77 {
78   virtual const SMDS_MeshNode* FindClosestTo( const gp_Pnt& pnt ) = 0;
79 };
80
81 // ============================================================
82 /*!
83  * \brief Editor of a mesh
84  */
85 // ============================================================
86
87 class SMESH_MeshEditor {
88
89 public:
90
91   SMESH_MeshEditor( SMESH_Mesh* theMesh );
92
93   /*!
94    * \brief Add element
95    */
96   SMDS_MeshElement* AddElement(const std::vector<const SMDS_MeshNode*> & nodes,
97                                const SMDSAbs_ElementType                 type,
98                                const bool                                isPoly,
99                                const int                                 ID = 0);
100   /*!
101    * \brief Add element
102    */
103   SMDS_MeshElement* AddElement(const std::vector<int>  & nodeIDs,
104                                const SMDSAbs_ElementType type,
105                                const bool                isPoly,
106                                const int                 ID = 0);
107
108   bool Remove (const std::list< int >& theElemIDs, const bool isNodes);
109   // Remove a node or an element.
110   // Modify a compute state of sub-meshes which become empty
111
112   bool InverseDiag (const SMDS_MeshElement * theTria1,
113                     const SMDS_MeshElement * theTria2 );
114   // Replace two neighbour triangles with ones built on the same 4 nodes
115   // but having other common link.
116   // Return False if args are improper
117
118   bool InverseDiag (const SMDS_MeshNode * theNode1,
119                     const SMDS_MeshNode * theNode2 );
120   // Replace two neighbour triangles sharing theNode1-theNode2 link
121   // with ones built on the same 4 nodes but having other common link.
122   // Return false if proper faces not found
123
124   bool DeleteDiag (const SMDS_MeshNode * theNode1,
125                    const SMDS_MeshNode * theNode2 );
126   // Replace two neighbour triangles sharing theNode1-theNode2 link
127   // with a quadrangle built on the same 4 nodes.
128   // Return false if proper faces not found
129
130   bool Reorient (const SMDS_MeshElement * theElement);
131   // Reverse theElement orientation
132
133
134   /*!
135    * \brief Fuse neighbour triangles into quadrangles.
136    * \param theElems     - The triangles to be fused.
137    * \param theCriterion - Is used to choose a neighbour to fuse with.
138    * \param theMaxAngle  - Is a max angle between element normals at which fusion
139    *                       is still performed; theMaxAngle is mesured in radians.
140    * \retval bool - Success or not.
141    */
142   bool TriToQuad (TIDSortedElemSet &                   theElems,
143                   SMESH::Controls::NumericalFunctorPtr theCriterion,
144                   const double                         theMaxAngle);
145
146   /*!
147    * \brief Split quadrangles into triangles.
148    * \param theElems     - The faces to be splitted.
149    * \param theCriterion - Is used to choose a diagonal for splitting.
150    * \retval bool - Success or not.
151    */
152   bool QuadToTri (TIDSortedElemSet &                   theElems,
153                   SMESH::Controls::NumericalFunctorPtr theCriterion);
154
155   /*!
156    * \brief Split quadrangles into triangles.
157    * \param theElems  - The faces to be splitted.
158    * \param the13Diag - Is used to choose a diagonal for splitting.
159    * \retval bool - Success or not.
160    */
161   bool QuadToTri (TIDSortedElemSet & theElems,
162                   const bool         the13Diag);
163
164   /*!
165    * \brief Find better diagonal for splitting.
166    * \param theQuad      - The face to find better splitting of.
167    * \param theCriterion - Is used to choose a diagonal for splitting.
168    * \retval int - 1 for 1-3 diagonal, 2 for 2-4, -1 - for errors.
169    */
170   int BestSplit (const SMDS_MeshElement*              theQuad,
171                  SMESH::Controls::NumericalFunctorPtr theCriterion);
172
173
174   enum SmoothMethod { LAPLACIAN = 0, CENTROIDAL };
175
176   void Smooth (TIDSortedElemSet &               theElements,
177                std::set<const SMDS_MeshNode*> & theFixedNodes,
178                const SmoothMethod               theSmoothMethod,
179                const int                        theNbIterations,
180                double                           theTgtAspectRatio = 1.0,
181                const bool                       the2D = true);
182   // Smooth theElements using theSmoothMethod during theNbIterations
183   // or until a worst element has aspect ratio <= theTgtAspectRatio.
184   // Aspect Ratio varies in range [1.0, inf].
185   // If theElements is empty, the whole mesh is smoothed.
186   // theFixedNodes contains additionally fixed nodes. Nodes built
187   // on edges and boundary nodes are always fixed.
188   // If the2D, smoothing is performed using UV parameters of nodes
189   // on geometrical faces
190
191   typedef std::auto_ptr< std::list<int> > PGroupIDs;
192
193   PGroupIDs RotationSweep (TIDSortedElemSet & theElements,
194                            const gp_Ax1&      theAxis,
195                            const double       theAngle,
196                            const int          theNbSteps,
197                            const double       theToler,
198                            const bool         theMakeGroups,
199                            const bool         theMakeWalls=true);
200   // Generate new elements by rotation of theElements around theAxis
201   // by theAngle by theNbSteps
202
203   /*!
204    * Auxilary flag for advanced extrusion.
205    * BOUNDARY: create or not boundary for result of extrusion
206    * SEW:      try to use existing nodes or create new nodes in any case
207    */
208   enum ExtrusionFlags {
209     EXTRUSION_FLAG_BOUNDARY = 0x01,
210     EXTRUSION_FLAG_SEW = 0x02
211   };
212   
213   /*!
214    * special structire for control of extrusion functionality
215    */
216   struct ExtrusParam {
217     gp_Dir myDir; // direction of extrusion
218     Handle(TColStd_HSequenceOfReal) mySteps; // magnitudes for each step
219     SMESH_SequenceOfNode myNodes; // nodes for using in sewing
220   };
221
222   /*!
223    * Create new node in the mesh with given coordinates
224    * (auxilary for advanced extrusion)
225    */
226   const SMDS_MeshNode* CreateNode(const double x,
227                                   const double y,
228                                   const double z,
229                                   const double tolnode,
230                                   SMESH_SequenceOfNode& aNodes);
231
232   /*!
233    * Generate new elements by extrusion of theElements
234    * It is a method used in .idl file. All functionality
235    * is implemented in the next method (see below) which
236    * is used in the cuurent method.
237    * param theElems - list of elements for extrusion
238    * param newElemsMap returns history of extrusion
239    * param theFlags set flags for performing extrusion (see description
240    *   of enum ExtrusionFlags for additional information)
241    * param theTolerance - uses for comparing locations of nodes if flag
242    *   EXTRUSION_FLAG_SEW is set
243    */
244   PGroupIDs ExtrusionSweep (TIDSortedElemSet &  theElems,
245                             const gp_Vec&       theStep,
246                             const int           theNbSteps,
247                             TElemOfElemListMap& newElemsMap,
248                             const bool          theMakeGroups,
249                             const int           theFlags = EXTRUSION_FLAG_BOUNDARY,
250                             const double        theTolerance = 1.e-6);
251   
252   /*!
253    * Generate new elements by extrusion of theElements
254    * param theElems - list of elements for extrusion
255    * param newElemsMap returns history of extrusion
256    * param theFlags set flags for performing extrusion (see description
257    *   of enum ExtrusionFlags for additional information)
258    * param theTolerance - uses for comparing locations of nodes if flag
259    *   EXTRUSION_FLAG_SEW is set
260    * param theParams - special structure for manage of extrusion
261    */
262   PGroupIDs ExtrusionSweep (TIDSortedElemSet &  theElems,
263                             ExtrusParam&        theParams,
264                             TElemOfElemListMap& newElemsMap,
265                             const bool          theMakeGroups,
266                             const int           theFlags,
267                             const double        theTolerance);
268
269
270   // Generate new elements by extrusion of theElements 
271   // by theStep by theNbSteps
272
273   enum Extrusion_Error {
274     EXTR_OK,
275     EXTR_NO_ELEMENTS, 
276     EXTR_PATH_NOT_EDGE,
277     EXTR_BAD_PATH_SHAPE,
278     EXTR_BAD_STARTING_NODE,
279     EXTR_BAD_ANGLES_NUMBER,
280     EXTR_CANT_GET_TANGENT
281     };
282   
283   Extrusion_Error ExtrusionAlongTrack (TIDSortedElemSet &   theElements,
284                                        SMESH_subMesh*       theTrackPattern,
285                                        const SMDS_MeshNode* theNodeStart,
286                                        const bool           theHasAngles,
287                                        std::list<double>&   theAngles,
288                                        const bool           theHasRefPoint,
289                                        const gp_Pnt&        theRefPoint,
290                                        const bool           theMakeGroups);
291   // Generate new elements by extrusion of theElements along path given by theTrackPattern,
292   // theHasAngles are the rotation angles, base point can be given by theRefPoint
293
294   PGroupIDs Transform (TIDSortedElemSet & theElements,
295                        const gp_Trsf&     theTrsf,
296                        const bool         theCopy,
297                        const bool         theMakeGroups,
298                        SMESH_Mesh*        theTargetMesh=0);
299   // Move or copy theElements applying theTrsf to their nodes
300
301   typedef std::list< std::list< const SMDS_MeshNode* > > TListOfListOfNodes;
302
303   void FindCoincidentNodes (std::set<const SMDS_MeshNode*> & theNodes,
304                             const double                     theTolerance,
305                             TListOfListOfNodes &             theGroupsOfNodes);
306   // Return list of group of nodes close to each other within theTolerance.
307   // Search among theNodes or in the whole mesh if theNodes is empty.
308
309   /*!
310    * \brief Return SMESH_NodeSearcher
311    */
312   SMESH_NodeSearcher* GetNodeSearcher();
313
314   int SimplifyFace (const vector<const SMDS_MeshNode *> faceNodes,
315                     vector<const SMDS_MeshNode *>&      poly_nodes,
316                     vector<int>&                        quantities) const;
317   // Split face, defined by <faceNodes>, into several faces by repeating nodes.
318   // Is used by MergeNodes()
319
320   void MergeNodes (TListOfListOfNodes & theNodeGroups);
321   // In each group, the cdr of nodes are substituted by the first one
322   // in all elements.
323
324   typedef std::list< std::list< int > > TListOfListOfElementsID;
325
326   void FindEqualElements(std::set<const SMDS_MeshElement*> & theElements,
327                          TListOfListOfElementsID &           theGroupsOfElementsID);
328   // Return list of group of elements build on the same nodes.
329   // Search among theElements or in the whole mesh if theElements is empty.
330
331   void MergeElements(TListOfListOfElementsID & theGroupsOfElementsID);
332   // In each group remove all but first of elements.
333
334   void MergeEqualElements();
335   // Remove all but one of elements built on the same nodes.
336   // Return nb of successfully merged groups.
337
338   static bool CheckFreeBorderNodes(const SMDS_MeshNode* theNode1,
339                                    const SMDS_MeshNode* theNode2,
340                                    const SMDS_MeshNode* theNode3 = 0);
341   // Return true if the three nodes are on a free border
342
343   static bool FindFreeBorder (const SMDS_MeshNode*                  theFirstNode,
344                               const SMDS_MeshNode*                  theSecondNode,
345                               const SMDS_MeshNode*                  theLastNode,
346                               std::list< const SMDS_MeshNode* > &   theNodes,
347                               std::list< const SMDS_MeshElement* >& theFaces);
348   // Return nodes and faces of a free border if found 
349
350   enum Sew_Error {
351     SEW_OK,
352     // for SewFreeBorder()
353     SEW_BORDER1_NOT_FOUND,
354     SEW_BORDER2_NOT_FOUND,
355     SEW_BOTH_BORDERS_NOT_FOUND,
356     SEW_BAD_SIDE_NODES,
357     SEW_VOLUMES_TO_SPLIT,
358     // for SewSideElements()
359     SEW_DIFF_NB_OF_ELEMENTS,
360     SEW_TOPO_DIFF_SETS_OF_ELEMENTS,
361     SEW_BAD_SIDE1_NODES,
362     SEW_BAD_SIDE2_NODES,
363     SEW_INTERNAL_ERROR
364     };
365     
366
367   Sew_Error SewFreeBorder (const SMDS_MeshNode* theBorderFirstNode,
368                            const SMDS_MeshNode* theBorderSecondNode,
369                            const SMDS_MeshNode* theBorderLastNode,
370                            const SMDS_MeshNode* theSide2FirstNode,
371                            const SMDS_MeshNode* theSide2SecondNode,
372                            const SMDS_MeshNode* theSide2ThirdNode = 0,
373                            const bool           theSide2IsFreeBorder = true,
374                            const bool           toCreatePolygons = false,
375                            const bool           toCreatePolyedrs = false);
376   // Sew the free border to the side2 by replacing nodes in
377   // elements on the free border with nodes of the elements
378   // of the side 2. If nb of links in the free border and
379   // between theSide2FirstNode and theSide2LastNode are different,
380   // additional nodes are inserted on a link provided that no
381   // volume elements share the splitted link.
382   // The side 2 is a free border if theSide2IsFreeBorder == true.
383   // Sewing is peformed between the given first, second and last
384   // nodes on the sides.
385   // theBorderFirstNode is merged with theSide2FirstNode.
386   // if (!theSide2IsFreeBorder) then theSide2SecondNode gives
387   // the last node on the side 2, which will be merged with
388   // theBorderLastNode.
389   // if (theSide2IsFreeBorder) then theSide2SecondNode will
390   // be merged with theBorderSecondNode.
391   // if (theSide2IsFreeBorder && theSide2ThirdNode == 0) then
392   // the 2 free borders are sewn link by link and no additional
393   // nodes are inserted.
394   // Return false, if sewing failed.
395
396   Sew_Error SewSideElements (TIDSortedElemSet&    theSide1,
397                              TIDSortedElemSet&    theSide2,
398                              const SMDS_MeshNode* theFirstNode1ToMerge,
399                              const SMDS_MeshNode* theFirstNode2ToMerge,
400                              const SMDS_MeshNode* theSecondNode1ToMerge,
401                              const SMDS_MeshNode* theSecondNode2ToMerge);
402   // Sew two sides of a mesh. Nodes belonging to theSide1 are
403   // merged with nodes of elements of theSide2.
404   // Number of elements in theSide1 and in theSide2 must be
405   // equal and they should have similar node connectivity.
406   // The nodes to merge should belong to side s borders and
407   // the first node should be linked to the second.
408
409   void InsertNodesIntoLink(const SMDS_MeshElement*          theFace,
410                            const SMDS_MeshNode*             theBetweenNode1,
411                            const SMDS_MeshNode*             theBetweenNode2,
412                            std::list<const SMDS_MeshNode*>& theNodesToInsert,
413                            const bool                       toCreatePoly = false);
414   // insert theNodesToInsert into theFace between theBetweenNode1 and theBetweenNode2.
415   // If toCreatePoly is true, replace theFace by polygon, else split theFace.
416
417   void UpdateVolumes (const SMDS_MeshNode*             theBetweenNode1,
418                       const SMDS_MeshNode*             theBetweenNode2,
419                       std::list<const SMDS_MeshNode*>& theNodesToInsert);
420   // insert theNodesToInsert into all volumes, containing link
421   // theBetweenNode1 - theBetweenNode2, between theBetweenNode1 and theBetweenNode2.
422
423   void ConvertToQuadratic(const bool theForce3d);
424   //converts all mesh to quadratic one, deletes old elements, replacing 
425   //them with quadratic ones with the same id.
426
427   bool ConvertFromQuadratic();
428   //converts all mesh from quadratic to ordinary ones, deletes old quadratic elements, replacing 
429   //them with ordinary mesh elements with the same id.
430
431
432 //  static int SortQuadNodes (const SMDS_Mesh * theMesh,
433 //                            int               theNodeIds[] );
434 //  // Set 4 nodes of a quadrangle face in a good order.
435 //  // Swap 1<->2 or 2<->3 nodes and correspondingly return
436 //  // 1 or 2 else 0.
437 //
438 //  static bool SortHexaNodes (const SMDS_Mesh * theMesh,
439 //                             int               theNodeIds[] );
440 //  // Set 8 nodes of a hexahedron in a good order.
441 //  // Return success status
442
443   static void AddToSameGroups (const SMDS_MeshElement* elemToAdd,
444                                const SMDS_MeshElement* elemInGroups,
445                                SMESHDS_Mesh *          aMesh);
446   // Add elemToAdd to the groups the elemInGroups belongs to
447
448   static void RemoveElemFromGroups (const SMDS_MeshElement* removeelem,
449                                     SMESHDS_Mesh *          aMesh);
450   // remove elemToAdd from the groups
451
452   /*!
453    * \brief Return nodes linked to the given one in elements of the type
454    */
455   static void GetLinkedNodes( const SMDS_MeshNode* node,
456                               TIDSortedElemSet &   linkedNodes,
457                               SMDSAbs_ElementType  type = SMDSAbs_All );
458
459   static const SMDS_MeshElement*
460     FindFaceInSet(const SMDS_MeshNode*    n1,
461                   const SMDS_MeshNode*    n2,
462                   const TIDSortedElemSet& elemSet,
463                   const TIDSortedElemSet& avoidSet);
464   // Return a face having linked nodes n1 and n2 and which is
465   // - not in avoidSet,
466   // - in elemSet provided that !elemSet.empty()
467
468   /*!
469    * \brief Find corresponding nodes in two sets of faces 
470     * \param theSide1 - first face set
471     * \param theSide2 - second first face
472     * \param theFirstNode1 - a boundary node of set 1
473     * \param theFirstNode2 - a node of set 2 corresponding to theFirstNode1
474     * \param theSecondNode1 - a boundary node of set 1 linked with theFirstNode1
475     * \param theSecondNode2 - a node of set 2 corresponding to theSecondNode1
476     * \param nReplaceMap - output map of corresponding nodes
477     * \retval Sew_Error  - is a success or not
478    */
479   static Sew_Error FindMatchingNodes(set<const SMDS_MeshElement*>& theSide1,
480                                      set<const SMDS_MeshElement*>& theSide2,
481                                      const SMDS_MeshNode*          theFirstNode1,
482                                      const SMDS_MeshNode*          theFirstNode2,
483                                      const SMDS_MeshNode*          theSecondNode1,
484                                      const SMDS_MeshNode*          theSecondNode2,
485                                      TNodeNodeMap &                nReplaceMap);
486
487   /*!
488    * \brief Returns true if given node is medium
489     * \param n - node to check
490     * \param typeToCheck - type of elements containing the node to ask about node status
491     * \retval bool - check result
492    */
493   static bool IsMedium(const SMDS_MeshNode*      node,
494                        const SMDSAbs_ElementType typeToCheck = SMDSAbs_All);
495
496   int FindShape (const SMDS_MeshElement * theElem);
497   // Return an index of the shape theElem is on
498   // or zero if a shape not found
499
500   SMESH_Mesh * GetMesh() { return myMesh; }
501
502   SMESHDS_Mesh * GetMeshDS() { return myMesh->GetMeshDS(); }
503
504   const SMESH_SequenceOfElemPtr& GetLastCreatedNodes() const { return myLastCreatedNodes; }
505
506   const SMESH_SequenceOfElemPtr& GetLastCreatedElems() const { return myLastCreatedElems; }
507
508 private:
509
510   /*!
511    * \brief Convert elements contained in a submesh to quadratic
512     * \retval int - nb of checked elements
513    */
514   int convertElemToQuadratic(SMESHDS_SubMesh *   theSm,
515                              SMESH_MesherHelper& theHelper,
516                              const bool          theForce3d);
517
518   /*!
519    * \brief Convert quadratic elements to linear ones and remove quadratic nodes
520     * \retval int - nb of checked elements
521    */
522   int removeQuadElem( SMESHDS_SubMesh *    theSm,
523                       SMDS_ElemIteratorPtr theItr,
524                       const int            theShapeID);
525   /*!
526    * \brief Create groups of elements made during transformation
527    * \param nodeGens - nodes making corresponding myLastCreatedNodes
528    * \param elemGens - elements making corresponding myLastCreatedElems
529    * \param postfix - to append to names of new groups
530    */
531   PGroupIDs generateGroups(const SMESH_SequenceOfElemPtr& nodeGens,
532                            const SMESH_SequenceOfElemPtr& elemGens,
533                            const std::string&             postfix,
534                            SMESH_Mesh*                    targetMesh=0);
535
536
537   typedef std::map<const SMDS_MeshNode*, std::list<const SMDS_MeshNode*> > TNodeOfNodeListMap;
538   typedef TNodeOfNodeListMap::iterator                                     TNodeOfNodeListMapItr;
539   typedef std::vector<TNodeOfNodeListMapItr>                               TVecOfNnlmiMap;
540   typedef std::map<const SMDS_MeshElement*, TVecOfNnlmiMap >               TElemOfVecOfNnlmiMap;
541
542   /*!
543    * \brief Create elements by sweeping an element
544     * \param elem - element to sweep
545     * \param newNodesItVec - nodes generated from each node of the element
546     * \param newElems - generated elements
547     * \param nbSteps - number of sweeping steps
548     * \param srcElements - to append elem for each generated element
549    */
550   void sweepElement(const SMDS_MeshElement*                    elem,
551                     const std::vector<TNodeOfNodeListMapItr> & newNodesItVec,
552                     std::list<const SMDS_MeshElement*>&        newElems,
553                     const int                                  nbSteps,
554                     SMESH_SequenceOfElemPtr&                   srcElements);
555
556   /*!
557    * \brief Create 1D and 2D elements around swept elements
558     * \param mapNewNodes - source nodes and ones generated from them
559     * \param newElemsMap - source elements and ones generated from them
560     * \param elemNewNodesMap - nodes generated from each node of each element
561     * \param elemSet - all swept elements
562     * \param nbSteps - number of sweeping steps
563     * \param srcElements - to append elem for each generated element
564    */
565   void makeWalls (TNodeOfNodeListMap &     mapNewNodes,
566                   TElemOfElemListMap &     newElemsMap,
567                   TElemOfVecOfNnlmiMap &   elemNewNodesMap,
568                   TIDSortedElemSet&        elemSet,
569                   const int                nbSteps,
570                   SMESH_SequenceOfElemPtr& srcElements);
571 private:
572
573   SMESH_Mesh * myMesh;
574
575   /*!
576    * Sequence for keeping nodes created during last operation
577    */
578   SMESH_SequenceOfElemPtr myLastCreatedNodes;
579
580   /*!
581    * Sequence for keeping elements created during last operation
582    */
583   SMESH_SequenceOfElemPtr myLastCreatedElems;
584
585 };
586
587 #endif