Salome HOME
cf515dfba0566992d3684e5c80759bcdbf893238
[modules/smesh.git] / src / SMESH / SMESH_MesherHelper.hxx
1 // Copyright (C) 2007-2012  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 // File:      SMESH_MesherHelper.hxx
24 // Created:   15.02.06 14:48:09
25 // Author:    Sergey KUUL
26 //
27 #ifndef SMESH_MesherHelper_HeaderFile
28 #define SMESH_MesherHelper_HeaderFile
29
30 #include "SMESH_SMESH.hxx"
31
32 #include "SMESH_MeshEditor.hxx" // needed for many meshers
33 #include <SMDS_MeshNode.hxx>
34 #include <SMDS_QuadraticEdge.hxx>
35
36 #include <Geom_Surface.hxx>
37 #include <TopoDS_Face.hxx>
38 #include <TopoDS_Shape.hxx>
39 #include <gp_Pnt2d.hxx>
40
41 #include <map>
42 #include <vector>
43
44 class GeomAPI_ProjectPointOnSurf;
45 class GeomAPI_ProjectPointOnCurve;
46 class SMESH_ProxyMesh;
47
48 typedef std::map<SMESH_TLink, const SMDS_MeshNode*>           TLinkNodeMap;
49 typedef std::map<SMESH_TLink, const SMDS_MeshNode*>::iterator ItTLinkNode;
50
51 typedef SMDS_Iterator<const TopoDS_Shape*>  PShapeIterator;
52 typedef boost::shared_ptr< PShapeIterator > PShapeIteratorPtr;
53   
54 typedef std::vector<const SMDS_MeshNode* > TNodeColumn;
55 typedef std::map< double, TNodeColumn >    TParam2ColumnMap;
56
57 typedef gp_XY (*xyFunPtr)(const gp_XY& uv1, const gp_XY& uv2);
58
59 //=======================================================================
60 /*!
61  * \brief It helps meshers to add elements and provides other utilities
62  *
63  * - It allows meshers not to care about creation of medium nodes
64  * when filling a quadratic mesh. Helper does it itself.
65  * It defines order of elements to create when IsQuadraticSubMesh()
66  * is called.
67  * - It provides information on a shape it is initialized with:
68  * periodicity, presence of singularities etc.
69  * - ...
70  */
71 //=======================================================================
72
73 class SMESH_EXPORT SMESH_MesherHelper
74 {
75 public:
76   // ---------- PUBLIC UTILITIES ----------
77   
78   /*!
79    * \brief Returns true if all elements of a sub-mesh are of same shape
80     * \param smDS - sub-mesh to check elements of
81     * \param shape - expected shape of elements
82     * \param nullSubMeshRes - result value for the case of smDS == NULL
83     * \retval bool - check result
84    */
85   static bool IsSameElemGeometry(const SMESHDS_SubMesh* smDS,
86                                  SMDSAbs_GeometryType   shape,
87                                  const bool             nullSubMeshRes = true);
88
89   /*!
90    * \brief Load nodes bound to face into a map of node columns
91     * \param theParam2ColumnMap - map of node columns to fill
92     * \param theFace - the face on which nodes are searched for
93     * \param theBaseSide - the edges holding nodes on which columns' bases
94     * \param theMesh - the mesh containing nodes
95     * \retval bool - false if something is wrong
96    * 
97    * The key of the map is a normalized parameter of each
98    * base node on theBaseSide. Edges in theBaseSide must be sequenced.
99    * This method works in supposition that nodes on the face
100    * forms a rectangular grid and elements can be quardrangles or triangles
101    */
102   static bool LoadNodeColumns(TParam2ColumnMap &            theParam2ColumnMap,
103                               const TopoDS_Face&            theFace,
104                               const std::list<TopoDS_Edge>& theBaseSide,
105                               SMESHDS_Mesh*                 theMesh,
106                               SMESH_ProxyMesh*              theProxyMesh=0);
107   /*!
108    * \brief Variant of LoadNodeColumns() above with theBaseSide given by one edge
109    */
110   static bool LoadNodeColumns(TParam2ColumnMap & theParam2ColumnMap,
111                               const TopoDS_Face& theFace,
112                               const TopoDS_Edge& theBaseEdge,
113                               SMESHDS_Mesh*      theMesh,
114                               SMESH_ProxyMesh*   theProxyMesh=0);
115   /*!
116    * \brief Return true if 2D mesh on FACE is structured
117    */
118   static bool IsStructured( SMESH_subMesh* faceSM );
119
120   /*!
121    * \brief Returns true if given node is medium
122     * \param n - node to check
123     * \param typeToCheck - type of elements containing the node to ask about node status
124     * \retval bool - check result
125    */
126   static bool IsMedium(const SMDS_MeshNode*      node,
127                        const SMDSAbs_ElementType typeToCheck = SMDSAbs_All);
128   /*!
129    * \brief Return support shape of a node
130    * \param node - the node
131    * \param meshDS - mesh DS
132    * \retval TopoDS_Shape - found support shape
133    */
134   static TopoDS_Shape GetSubShapeByNode(const SMDS_MeshNode* node,
135                                         const SMESHDS_Mesh*  meshDS);
136
137   /*!
138    * \brief Return a valid node index, fixing the given one if necessary
139     * \param ind - node index
140     * \param nbNodes - total nb of nodes
141     * \retval int - valid node index
142    */
143   static int WrapIndex(const int ind, const int nbNodes) {
144     if ( ind < 0 ) return nbNodes + ind % nbNodes;
145     if ( ind >= nbNodes ) return ind % nbNodes;
146     return ind;
147   }
148
149   /*!
150    * \brief Count nb of sub-shapes
151     * \param shape - the shape
152     * \param type - the type of sub-shapes to count
153     * \param ignoreSame - if true, use map not to count same shapes, esle use explorer
154     * \retval int - the calculated number
155    */
156   static int Count(const TopoDS_Shape&    shape,
157                    const TopAbs_ShapeEnum type,
158                    const bool             ignoreSame);
159
160   /*!
161    * \brief Return number of unique ancestors of the shape
162    */
163   static int NbAncestors(const TopoDS_Shape& shape,
164                          const SMESH_Mesh&   mesh,
165                          TopAbs_ShapeEnum    ancestorType=TopAbs_SHAPE);
166   /*!
167    * \brief Return iterator on ancestors of the given type
168    */
169   static PShapeIteratorPtr GetAncestors(const TopoDS_Shape& shape,
170                                         const SMESH_Mesh&   mesh,
171                                         TopAbs_ShapeEnum    ancestorType);
172   /*!
173    * \brief Find a common ancestor, of the given type, of two shapes
174    */
175   static TopoDS_Shape GetCommonAncestor(const TopoDS_Shape& shape1,
176                                         const TopoDS_Shape& shape2,
177                                         const SMESH_Mesh&   mesh,
178                                         TopAbs_ShapeEnum    ancestorType);
179   /*!
180    * \brief Return orientation of sub-shape in the main shape
181    */
182   static TopAbs_Orientation GetSubShapeOri(const TopoDS_Shape& shape,
183                                            const TopoDS_Shape& subShape);
184
185   static bool IsSubShape( const TopoDS_Shape& shape, const TopoDS_Shape& mainShape );
186
187   static bool IsSubShape( const TopoDS_Shape& shape, SMESH_Mesh* aMesh );
188
189   static double MaxTolerance( const TopoDS_Shape& shape );
190
191   static bool IsClosedEdge( const TopoDS_Edge& anEdge );
192
193   static TopoDS_Vertex IthVertex( const bool is2nd, TopoDS_Edge anEdge, const bool CumOri=true );
194
195   static TopAbs_ShapeEnum GetGroupType(const TopoDS_Shape& group,
196                                        const bool          avoidCompound=false);
197
198
199 public:
200   // ---------- PUBLIC INSTANCE METHODS ----------
201
202   // constructor
203   SMESH_MesherHelper(SMESH_Mesh& theMesh);
204
205   SMESH_Mesh* GetMesh() const { return myMesh; }
206     
207   SMESHDS_Mesh* GetMeshDS() const { return GetMesh()->GetMeshDS(); }
208     
209   /*!
210    * Check submesh for given shape: if all elements on this shape are quadratic,
211    * quadratic elements will be created. Also fill myTLinkNodeMap
212    */
213   bool IsQuadraticSubMesh(const TopoDS_Shape& theShape);
214   /*!
215    * \brief Set order of elements to create without calling IsQuadraticSubMesh()
216    */
217   void SetIsQuadratic(const bool theBuildQuadratic)
218   { myCreateQuadratic = theBuildQuadratic; }
219   /*!
220    * \brief Return myCreateQuadratic flag
221    */
222   bool GetIsQuadratic() const { return myCreateQuadratic; }
223
224   /*
225    * \brief Find out elements orientation on a geometrical face
226    */
227   bool IsReversedSubMesh (const TopoDS_Face& theFace);
228
229   /*!
230    * \brief Move medium nodes of faces and volumes to fix distorted elements
231    * \param error - container of fixed distorted elements
232    * \param volumeOnly - fix nodes on geom faces or not if the shape is solid
233    */
234   void FixQuadraticElements(SMESH_ComputeErrorPtr& error, bool volumeOnly=true);
235
236   /*!
237    * \brief To set created elements on the shape set by IsQuadraticSubMesh()
238    *        or the next methods. By defaul elements are set on the shape if
239    *        a mesh has no shape to be meshed
240    */
241   bool SetElementsOnShape(bool toSet)
242   { bool res = mySetElemOnShape; mySetElemOnShape = toSet; return res; }
243
244   /*!
245    * \brief Set shape to make elements on without calling IsQuadraticSubMesh()
246    */
247   void SetSubShape(const int           subShapeID);//!==SMESHDS_Mesh::ShapeToIndex(shape)
248   void SetSubShape(const TopoDS_Shape& subShape);
249   /*!
250    * \brief Return ID of the shape set by IsQuadraticSubMesh() or SetSubShape() 
251     * \retval int - shape index in SMESHDS
252    */
253   int GetSubShapeID() const { return myShapeID; }
254   /*!
255    * \brief Return the shape set by IsQuadraticSubMesh() or SetSubShape() 
256    */
257   const TopoDS_Shape& GetSubShape() const  { return myShape; }
258
259   /*!
260    * Creates a node
261    */
262   SMDS_MeshNode* AddNode(double x, double y, double z, int ID = 0, double u=0., double v=0.);
263   /*!
264    * Creates quadratic or linear edge
265    */
266   SMDS_MeshEdge* AddEdge(const SMDS_MeshNode* n1,
267                          const SMDS_MeshNode* n2,
268                          const int id = 0, 
269                          const bool force3d = true);
270   /*!
271    * Creates quadratic or linear triangle
272    */
273   SMDS_MeshFace* AddFace(const SMDS_MeshNode* n1,
274                          const SMDS_MeshNode* n2,
275                          const SMDS_MeshNode* n3,
276                          const int id=0, 
277                          const bool force3d = false);
278   /*!
279    * Creates quadratic or linear quadrangle
280    */
281   SMDS_MeshFace* AddFace(const SMDS_MeshNode* n1,
282                          const SMDS_MeshNode* n2,
283                          const SMDS_MeshNode* n3,
284                          const SMDS_MeshNode* n4,
285                          const int id = 0,
286                          const bool force3d = false);
287
288   /*!
289    * Creates polygon, with additional nodes in quadratic mesh
290    */
291   SMDS_MeshFace* AddPolygonalFace (const std::vector<const SMDS_MeshNode*>& nodes,
292                                    const int id = 0,
293                                    const bool force3d = false);
294   /*!
295    * Creates quadratic or linear tetrahedron
296    */
297   SMDS_MeshVolume* AddVolume(const SMDS_MeshNode* n1,
298                              const SMDS_MeshNode* n2,
299                              const SMDS_MeshNode* n3,
300                              const SMDS_MeshNode* n4,
301                              const int id = 0,
302                              const bool force3d = true);
303   /*!
304    * Creates quadratic or linear pyramid
305    */
306   SMDS_MeshVolume* AddVolume(const SMDS_MeshNode* n1,
307                              const SMDS_MeshNode* n2,
308                              const SMDS_MeshNode* n3,
309                              const SMDS_MeshNode* n4,
310                              const SMDS_MeshNode* n5,
311                              const int id = 0,
312                              const bool force3d = true);
313   /*!
314    * Creates quadratic or linear pentahedron
315    */
316   SMDS_MeshVolume* AddVolume(const SMDS_MeshNode* n1,
317                              const SMDS_MeshNode* n2,
318                              const SMDS_MeshNode* n3,
319                              const SMDS_MeshNode* n4,
320                              const SMDS_MeshNode* n5,
321                              const SMDS_MeshNode* n6,
322                              const int id = 0, 
323                              const bool force3d = true);
324   /*!
325    * Creates quadratic or linear hexahedron
326    */
327   SMDS_MeshVolume* AddVolume(const SMDS_MeshNode* n1,
328                              const SMDS_MeshNode* n2,
329                              const SMDS_MeshNode* n3,
330                              const SMDS_MeshNode* n4,
331                              const SMDS_MeshNode* n5,
332                              const SMDS_MeshNode* n6,
333                              const SMDS_MeshNode* n7,
334                              const SMDS_MeshNode* n8,
335                              const int id = 0, 
336                              bool force3d = true);
337
338   /*!
339    * Creates LINEAR!!!!!!!!! octahedron
340    */
341   SMDS_MeshVolume* AddVolume(const SMDS_MeshNode* n1,
342                              const SMDS_MeshNode* n2,
343                              const SMDS_MeshNode* n3,
344                              const SMDS_MeshNode* n4,
345                              const SMDS_MeshNode* n5,
346                              const SMDS_MeshNode* n6,
347                              const SMDS_MeshNode* n7,
348                              const SMDS_MeshNode* n8,
349                              const SMDS_MeshNode* n9,
350                              const SMDS_MeshNode* n10,
351                              const SMDS_MeshNode* n11,
352                              const SMDS_MeshNode* n12,
353                              const int id = 0, 
354                              bool force3d = true);
355
356   /*!
357    * Creates polyhedron. In quadratic mesh, adds medium nodes
358    */
359   SMDS_MeshVolume* AddPolyhedralVolume (const std::vector<const SMDS_MeshNode*>& nodes,
360                                         const std::vector<int>&                  quantities,
361                                         const int                                ID=0,
362                                         const bool                               force3d = true);
363   /*!
364    * \brief Enables fixing node parameters on EDGEs and FACEs by
365    * GetNodeU(...,check=true), GetNodeUV(...,check=true), CheckNodeUV() and
366    * CheckNodeU() in case if a node lies on a shape set via SetSubShape().
367    * Default is False
368    */
369   void ToFixNodeParameters(bool toFix);
370
371   /*!
372    * \brief Return U of the given node on the edge
373    */
374   double GetNodeU(const TopoDS_Edge&   theEdge,
375                   const SMDS_MeshNode* theNode,
376                   const SMDS_MeshNode* inEdgeNode=0,
377                   bool*                check=0);
378   /*!
379    * \brief Return node UV on face
380    *  \param inFaceNode - a node of element being created located inside a face
381    *  \param check - if provided, returns result of UV check that it enforces
382    */
383   gp_XY GetNodeUV(const TopoDS_Face&   F,
384                   const SMDS_MeshNode* n,
385                   const SMDS_MeshNode* inFaceNode=0,
386                   bool*                check=0) const;
387   /*!
388    * \brief Check and fix node UV on a face
389    *  \param force - check even if checks of other nodes on this face passed OK
390    *  \param distXYZ - returns result distance and point coordinates
391    *  \retval bool - false if UV is bad and could not be fixed
392    */
393   bool CheckNodeUV(const TopoDS_Face&   F,
394                    const SMDS_MeshNode* n,
395                    gp_XY&               uv,
396                    const double         tol,
397                    const bool           force=false,
398                    double               distXYZ[4]=0) const;
399   /*!
400    * \brief Check and fix node U on an edge
401    *  \param force - check even if checks of other nodes on this edge passed OK
402    *  \param distXYZ - returns result distance and point coordinates
403    *  \retval bool - false if U is bad and could not be fixed
404    */
405   bool CheckNodeU(const TopoDS_Edge&   E,
406                   const SMDS_MeshNode* n,
407                   double&              u,
408                   const double         tol,
409                   const bool           force=false,
410                   double               distXYZ[4]=0) const;
411   /*!
412    * \brief Return middle UV taking in account surface period
413    */
414   static gp_XY GetMiddleUV(const Handle(Geom_Surface)& surface,
415                            const gp_XY&                uv1,
416                            const gp_XY&                uv2);
417   /*!
418    * \brief Define a pointer to wrapper over a function of gp_XY class,
419    *       suitable to pass as xyFunPtr to applyIn2D().
420    *       For exaple gp_XY_FunPtr(Added) defines pointer gp_XY_Added to function
421    *       calling gp_XY::Added(gp_XY), which is to be used like following
422    *       applyIn2D(surf, uv1, uv2, gp_XY_Added)
423    */
424 #define gp_XY_FunPtr(meth) \
425   static gp_XY __gpXY_##meth (const gp_XY& uv1, const gp_XY& uv2) { return uv1.meth( uv2 ); } \
426   static xyFunPtr gp_XY_##meth = & __gpXY_##meth
427
428   /*!
429    * \brief Perform given operation on two 2d points in parameric space of given surface.
430    *        It takes into account period of the surface. Use gp_XY_FunPtr macro
431    *        to easily define pointer to function of gp_XY class.
432    */
433   static gp_XY applyIn2D(const Handle(Geom_Surface)& surface,
434                          const gp_XY&                uv1,
435                          const gp_XY&                uv2,
436                          xyFunPtr                    fun,
437                          const bool                  resultInPeriod=true);
438                           
439   /*!
440    * \brief Check if inFaceNode argument is necessary for call GetNodeUV(F,..)
441     * \retval bool - return true if the face is periodic
442     *
443     * If F is Null, answer about subshape set through IsQuadraticSubMesh() or
444     * SetSubShape()
445    */
446   bool GetNodeUVneedInFaceNode(const TopoDS_Face& F = TopoDS_Face()) const;
447
448   /*!
449    * \brief Return projector intitialized by given face without location, which is returned
450    */
451   GeomAPI_ProjectPointOnSurf& GetProjector(const TopoDS_Face& F,
452                                            TopLoc_Location&   loc,
453                                            double             tol=0 ) const; 
454
455   /*!
456    * \brief Check if shape is a degenerated edge or it's vertex
457     * \param subShape - edge or vertex index in SMESHDS
458     * \retval bool - true if subShape is a degenerated shape
459     *
460     * It works only if IsQuadraticSubMesh() or SetSubShape() has been called
461    */
462   bool IsDegenShape(const int subShape) const
463   { return myDegenShapeIds.find( subShape ) != myDegenShapeIds.end(); }
464   /*!
465    * \brief Check if the shape set through IsQuadraticSubMesh() or SetSubShape()
466    *        has a degenerated edges
467     * \retval bool - true if it has
468    */
469   bool HasDegeneratedEdges() const { return !myDegenShapeIds.empty(); }
470
471   /*!
472    * \brief Check if shape is a seam edge or it's vertex
473     * \param subShape - edge or vertex index in SMESHDS
474     * \retval bool - true if subShape is a seam shape
475     *
476     * It works only if IsQuadraticSubMesh() or SetSubShape() has been called.
477     * Seam shape has two 2D alternative represenations on the face
478    */
479   bool IsSeamShape(const int subShape) const
480   { return mySeamShapeIds.find( subShape ) != mySeamShapeIds.end(); }
481   /*!
482    * \brief Check if shape is a seam edge or it's vertex
483     * \param subShape - edge or vertex
484     * \retval bool - true if subShape is a seam shape
485     *
486     * It works only if IsQuadraticSubMesh() or SetSubShape() has been called.
487     * Seam shape has two 2D alternative represenations on the face
488    */
489   bool IsSeamShape(const TopoDS_Shape& subShape) const
490   { return IsSeamShape( GetMeshDS()->ShapeToIndex( subShape )); }
491   /*!
492    * \brief Return true if an edge or a vertex encounters twice in face wire
493    *  \param subShape - Id of edge or vertex
494    */
495   bool IsRealSeam(const int subShape) const
496   { return mySeamShapeIds.find( -subShape ) != mySeamShapeIds.end(); }
497   /*!
498    * \brief Return true if an edge or a vertex encounters twice in face wire
499    *  \param subShape - edge or vertex
500    */
501   bool IsRealSeam(const TopoDS_Shape& subShape) const
502   { return IsRealSeam( GetMeshDS()->ShapeToIndex( subShape)); }
503   /*!
504    * \brief Check if the shape set through IsQuadraticSubMesh() or SetSubShape()
505    *        has a seam edge
506     * \retval bool - true if it has
507    */
508   bool HasSeam() const { return !mySeamShapeIds.empty(); }
509   /*!
510    * \brief Return index of periodic parametric direction of a closed face
511     * \retval int - 1 for U, 2 for V direction
512    */
513   int GetPeriodicIndex() const { return myParIndex; }
514   /*!
515    * \brief Return an alternative parameter for a node on seam
516    */
517   double GetOtherParam(const double param) const;
518
519   /*!
520    * \brief Return existing or create new medium nodes between given ones
521    *  \param force3d - true means node creation at the middle between the
522    *                   two given nodes, else node position is found on its
523    *                   supporting geometrical shape, if any.
524    */
525   const SMDS_MeshNode* GetMediumNode(const SMDS_MeshNode* n1,
526                                      const SMDS_MeshNode* n2,
527                                      const bool force3d);
528   /*!
529    * \brief Return index and type of the shape (EDGE or FACE only) to set a medium node on
530    */
531   std::pair<int, TopAbs_ShapeEnum> GetMediumPos(const SMDS_MeshNode* n1,
532                                                 const SMDS_MeshNode* n2);
533   /*!
534    * \brief Add a link in my data structure
535    */
536   void AddTLinkNode(const SMDS_MeshNode* n1,
537                     const SMDS_MeshNode* n2,
538                     const SMDS_MeshNode* n12);
539   /*!
540    * \brief Add many links in my data structure
541    */
542   void AddTLinkNodeMap(const TLinkNodeMap& aMap)
543     { myTLinkNodeMap.insert(aMap.begin(), aMap.end()); }
544
545   void AddTLinks(const SMDS_MeshEdge*   edge);
546   void AddTLinks(const SMDS_MeshFace*   face);
547   void AddTLinks(const SMDS_MeshVolume* vol);
548
549   /**
550    * Returns myTLinkNodeMap
551    */
552   const TLinkNodeMap& GetTLinkNodeMap() const { return myTLinkNodeMap; }
553
554   /**
555    * Check mesh without geometry for: if all elements on this shape are quadratic,
556    * quadratic elements will be created.
557    * Used then generated 3D mesh without geometry.
558    */
559   enum MType{ LINEAR, QUADRATIC, COMP };
560   MType IsQuadraticMesh();
561   
562   virtual ~SMESH_MesherHelper();
563
564 protected:
565
566   /*!
567    * \brief Select UV on either of 2 pcurves of a seam edge, closest to the given UV
568     * \param uv1 - UV on the seam
569     * \param uv2 - UV within a face
570     * \retval gp_Pnt2d - selected UV
571    */
572   gp_Pnt2d GetUVOnSeam( const gp_Pnt2d& uv1, const gp_Pnt2d& uv2 ) const;
573
574   const SMDS_MeshNode* getMediumNodeOnComposedWire(const SMDS_MeshNode* n1,
575                                                    const SMDS_MeshNode* n2,
576                                                    bool                 force3d);
577  private:
578
579   // Forbiden copy constructor
580   SMESH_MesherHelper (const SMESH_MesherHelper& theOther) {};
581
582   // special map for using during creation of quadratic elements
583   TLinkNodeMap    myTLinkNodeMap;
584
585   std::set< int > myDegenShapeIds;
586   std::set< int > mySeamShapeIds;
587   double          myPar1[2], myPar2[2]; // U and V bounds of a closed periodic surface
588   int             myParIndex;     // bounds' index (1-U, 2-V, 3-both)
589
590   typedef std::map< int, GeomAPI_ProjectPointOnSurf* > TID2ProjectorOnSurf;
591   TID2ProjectorOnSurf myFace2Projector;
592   typedef std::map< int, GeomAPI_ProjectPointOnCurve* > TID2ProjectorOnCurve;
593   TID2ProjectorOnCurve myEdge2Projector;
594
595   TopoDS_Shape    myShape;
596   SMESH_Mesh*     myMesh;
597   int             myShapeID;
598
599   bool            myCreateQuadratic;
600   bool            mySetElemOnShape;
601   bool            myFixNodeParameters;
602
603   std::map< int,bool > myNodePosShapesValidity;
604   bool toCheckPosOnShape(int shapeID ) const;
605   void setPosOnShapeValidity(int shapeID, bool ok ) const;
606
607 };
608
609
610 #endif