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