Salome HOME
5c4d11b7c289d0464a5f0ab40591024dd0eaa6ff
[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   // Move or copy theElements applying theTrsf to their nodes
301
302   typedef std::list< std::list< const SMDS_MeshNode* > > TListOfListOfNodes;
303
304   void FindCoincidentNodes (std::set<const SMDS_MeshNode*> & theNodes,
305                             const double                     theTolerance,
306                             TListOfListOfNodes &             theGroupsOfNodes);
307   // Return list of group of nodes close to each other within theTolerance.
308   // Search among theNodes or in the whole mesh if theNodes is empty.
309
310   /*!
311    * \brief Return SMESH_NodeSearcher
312    */
313   SMESH_NodeSearcher* GetNodeSearcher();
314
315   int SimplifyFace (const vector<const SMDS_MeshNode *> faceNodes,
316                     vector<const SMDS_MeshNode *>&      poly_nodes,
317                     vector<int>&                        quantities) const;
318   // Split face, defined by <faceNodes>, into several faces by repeating nodes.
319   // Is used by MergeNodes()
320
321   void MergeNodes (TListOfListOfNodes & theNodeGroups);
322   // In each group, the cdr of nodes are substituted by the first one
323   // in all elements.
324
325   typedef std::list< std::list< int > > TListOfListOfElementsID;
326
327   void FindEqualElements(std::set<const SMDS_MeshElement*> & theElements,
328                          TListOfListOfElementsID &           theGroupsOfElementsID);
329   // Return list of group of elements build on the same nodes.
330   // Search among theElements or in the whole mesh if theElements is empty.
331
332   void MergeElements(TListOfListOfElementsID & theGroupsOfElementsID);
333   // In each group remove all but first of elements.
334
335   void MergeEqualElements();
336   // Remove all but one of elements built on the same nodes.
337   // Return nb of successfully merged groups.
338
339   static bool CheckFreeBorderNodes(const SMDS_MeshNode* theNode1,
340                                    const SMDS_MeshNode* theNode2,
341                                    const SMDS_MeshNode* theNode3 = 0);
342   // Return true if the three nodes are on a free border
343
344   static bool FindFreeBorder (const SMDS_MeshNode*                  theFirstNode,
345                               const SMDS_MeshNode*                  theSecondNode,
346                               const SMDS_MeshNode*                  theLastNode,
347                               std::list< const SMDS_MeshNode* > &   theNodes,
348                               std::list< const SMDS_MeshElement* >& theFaces);
349   // Return nodes and faces of a free border if found 
350
351   enum Sew_Error {
352     SEW_OK,
353     // for SewFreeBorder()
354     SEW_BORDER1_NOT_FOUND,
355     SEW_BORDER2_NOT_FOUND,
356     SEW_BOTH_BORDERS_NOT_FOUND,
357     SEW_BAD_SIDE_NODES,
358     SEW_VOLUMES_TO_SPLIT,
359     // for SewSideElements()
360     SEW_DIFF_NB_OF_ELEMENTS,
361     SEW_TOPO_DIFF_SETS_OF_ELEMENTS,
362     SEW_BAD_SIDE1_NODES,
363     SEW_BAD_SIDE2_NODES,
364     SEW_INTERNAL_ERROR
365     };
366     
367
368   Sew_Error SewFreeBorder (const SMDS_MeshNode* theBorderFirstNode,
369                            const SMDS_MeshNode* theBorderSecondNode,
370                            const SMDS_MeshNode* theBorderLastNode,
371                            const SMDS_MeshNode* theSide2FirstNode,
372                            const SMDS_MeshNode* theSide2SecondNode,
373                            const SMDS_MeshNode* theSide2ThirdNode = 0,
374                            const bool           theSide2IsFreeBorder = true,
375                            const bool           toCreatePolygons = false,
376                            const bool           toCreatePolyedrs = false);
377   // Sew the free border to the side2 by replacing nodes in
378   // elements on the free border with nodes of the elements
379   // of the side 2. If nb of links in the free border and
380   // between theSide2FirstNode and theSide2LastNode are different,
381   // additional nodes are inserted on a link provided that no
382   // volume elements share the splitted link.
383   // The side 2 is a free border if theSide2IsFreeBorder == true.
384   // Sewing is peformed between the given first, second and last
385   // nodes on the sides.
386   // theBorderFirstNode is merged with theSide2FirstNode.
387   // if (!theSide2IsFreeBorder) then theSide2SecondNode gives
388   // the last node on the side 2, which will be merged with
389   // theBorderLastNode.
390   // if (theSide2IsFreeBorder) then theSide2SecondNode will
391   // be merged with theBorderSecondNode.
392   // if (theSide2IsFreeBorder && theSide2ThirdNode == 0) then
393   // the 2 free borders are sewn link by link and no additional
394   // nodes are inserted.
395   // Return false, if sewing failed.
396
397   Sew_Error SewSideElements (TIDSortedElemSet&    theSide1,
398                              TIDSortedElemSet&    theSide2,
399                              const SMDS_MeshNode* theFirstNode1ToMerge,
400                              const SMDS_MeshNode* theFirstNode2ToMerge,
401                              const SMDS_MeshNode* theSecondNode1ToMerge,
402                              const SMDS_MeshNode* theSecondNode2ToMerge);
403   // Sew two sides of a mesh. Nodes belonging to theSide1 are
404   // merged with nodes of elements of theSide2.
405   // Number of elements in theSide1 and in theSide2 must be
406   // equal and they should have similar node connectivity.
407   // The nodes to merge should belong to side s borders and
408   // the first node should be linked to the second.
409
410   void InsertNodesIntoLink(const SMDS_MeshElement*          theFace,
411                            const SMDS_MeshNode*             theBetweenNode1,
412                            const SMDS_MeshNode*             theBetweenNode2,
413                            std::list<const SMDS_MeshNode*>& theNodesToInsert,
414                            const bool                       toCreatePoly = false);
415   // insert theNodesToInsert into theFace between theBetweenNode1 and theBetweenNode2.
416   // If toCreatePoly is true, replace theFace by polygon, else split theFace.
417
418   void UpdateVolumes (const SMDS_MeshNode*             theBetweenNode1,
419                       const SMDS_MeshNode*             theBetweenNode2,
420                       std::list<const SMDS_MeshNode*>& theNodesToInsert);
421   // insert theNodesToInsert into all volumes, containing link
422   // theBetweenNode1 - theBetweenNode2, between theBetweenNode1 and theBetweenNode2.
423
424   void ConvertToQuadratic(const bool theForce3d);
425   //converts all mesh to quadratic one, deletes old elements, replacing 
426   //them with quadratic ones with the same id.
427
428   bool ConvertFromQuadratic();
429   //converts all mesh from quadratic to ordinary ones, deletes old quadratic elements, replacing 
430   //them with ordinary mesh elements with the same id.
431
432
433 //  static int SortQuadNodes (const SMDS_Mesh * theMesh,
434 //                            int               theNodeIds[] );
435 //  // Set 4 nodes of a quadrangle face in a good order.
436 //  // Swap 1<->2 or 2<->3 nodes and correspondingly return
437 //  // 1 or 2 else 0.
438 //
439 //  static bool SortHexaNodes (const SMDS_Mesh * theMesh,
440 //                             int               theNodeIds[] );
441 //  // Set 8 nodes of a hexahedron in a good order.
442 //  // Return success status
443
444   static void AddToSameGroups (const SMDS_MeshElement* elemToAdd,
445                                const SMDS_MeshElement* elemInGroups,
446                                SMESHDS_Mesh *          aMesh);
447   // Add elemToAdd to the groups the elemInGroups belongs to
448
449   static void RemoveElemFromGroups (const SMDS_MeshElement* removeelem,
450                                     SMESHDS_Mesh *          aMesh);
451   // remove elemToAdd from the groups
452
453   /*!
454    * \brief Return nodes linked to the given one in elements of the type
455    */
456   static void GetLinkedNodes( const SMDS_MeshNode* node,
457                               TIDSortedElemSet &   linkedNodes,
458                               SMDSAbs_ElementType  type = SMDSAbs_All );
459
460   static const SMDS_MeshElement*
461     FindFaceInSet(const SMDS_MeshNode*    n1,
462                   const SMDS_MeshNode*    n2,
463                   const TIDSortedElemSet& elemSet,
464                   const TIDSortedElemSet& avoidSet);
465   // Return a face having linked nodes n1 and n2 and which is
466   // - not in avoidSet,
467   // - in elemSet provided that !elemSet.empty()
468
469   /*!
470    * \brief Find corresponding nodes in two sets of faces 
471     * \param theSide1 - first face set
472     * \param theSide2 - second first face
473     * \param theFirstNode1 - a boundary node of set 1
474     * \param theFirstNode2 - a node of set 2 corresponding to theFirstNode1
475     * \param theSecondNode1 - a boundary node of set 1 linked with theFirstNode1
476     * \param theSecondNode2 - a node of set 2 corresponding to theSecondNode1
477     * \param nReplaceMap - output map of corresponding nodes
478     * \retval Sew_Error  - is a success or not
479    */
480   static Sew_Error FindMatchingNodes(set<const SMDS_MeshElement*>& theSide1,
481                                      set<const SMDS_MeshElement*>& theSide2,
482                                      const SMDS_MeshNode*          theFirstNode1,
483                                      const SMDS_MeshNode*          theFirstNode2,
484                                      const SMDS_MeshNode*          theSecondNode1,
485                                      const SMDS_MeshNode*          theSecondNode2,
486                                      TNodeNodeMap &                nReplaceMap);
487
488   /*!
489    * \brief Returns true if given node is medium
490     * \param n - node to check
491     * \param typeToCheck - type of elements containing the node to ask about node status
492     * \retval bool - check result
493    */
494   static bool IsMedium(const SMDS_MeshNode*      node,
495                        const SMDSAbs_ElementType typeToCheck = SMDSAbs_All);
496
497   int FindShape (const SMDS_MeshElement * theElem);
498   // Return an index of the shape theElem is on
499   // or zero if a shape not found
500
501   SMESH_Mesh * GetMesh() { return myMesh; }
502
503   SMESHDS_Mesh * GetMeshDS() { return myMesh->GetMeshDS(); }
504
505   const SMESH_SequenceOfElemPtr& GetLastCreatedNodes() const { return myLastCreatedNodes; }
506
507   const SMESH_SequenceOfElemPtr& GetLastCreatedElems() const { return myLastCreatedElems; }
508
509 private:
510
511   /*!
512    * \brief Convert elements contained in a submesh to quadratic
513     * \retval int - nb of checked elements
514    */
515   int convertElemToQuadratic(SMESHDS_SubMesh *   theSm,
516                              SMESH_MesherHelper& theHelper,
517                              const bool          theForce3d);
518
519   /*!
520    * \brief Convert quadratic elements to linear ones and remove quadratic nodes
521     * \retval int - nb of checked elements
522    */
523   int removeQuadElem( SMESHDS_SubMesh *    theSm,
524                       SMDS_ElemIteratorPtr theItr,
525                       const int            theShapeID);
526   /*!
527    * \brief Create groups of elements made during transformation
528    * \param nodeGens - nodes making corresponding myLastCreatedNodes
529    * \param elemGens - elements making corresponding myLastCreatedElems
530    * \param postfix - to append to names of new groups
531    */
532   PGroupIDs generateGroups(const SMESH_SequenceOfElemPtr& nodeGens,
533                            const SMESH_SequenceOfElemPtr& elemGens,
534                            const std::string&             postfix);
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