+ GeomAPI_ProjectPointOnSurf& GetProjector(const TopoDS_Face& F,
+ TopLoc_Location& loc,
+ double tol=0 ) const;
+
+ /*!
+ * \brief Check if shape is a degenerated edge or it's vertex
+ * \param subShape - edge or vertex index in SMESHDS
+ * \retval bool - true if subShape is a degenerated shape
+ *
+ * It works only if IsQuadraticSubMesh() or SetSubShape() has been called
+ */
+ bool IsDegenShape(const int subShape) const
+ { return myDegenShapeIds.find( subShape ) != myDegenShapeIds.end(); }
+ /*!
+ * \brief Check if the shape set through IsQuadraticSubMesh() or SetSubShape()
+ * has a degenerated edges
+ * \retval bool - true if it has
+ */
+ bool HasDegeneratedEdges() const { return !myDegenShapeIds.empty(); }
+
+ /*!
+ * \brief Check if shape is a seam edge or it's vertex
+ * \param subShape - edge or vertex index in SMESHDS
+ * \retval bool - true if subShape is a seam shape
+ *
+ * It works only if IsQuadraticSubMesh() or SetSubShape() has been called.
+ * Seam shape has two 2D alternative represenations on the face
+ */
+ bool IsSeamShape(const int subShape) const
+ { return mySeamShapeIds.find( subShape ) != mySeamShapeIds.end(); }
+ /*!
+ * \brief Check if shape is a seam edge or it's vertex
+ * \param subShape - edge or vertex
+ * \retval bool - true if subShape is a seam shape
+ *
+ * It works only if IsQuadraticSubMesh() or SetSubShape() has been called.
+ * Seam shape has two 2D alternative represenations on the face
+ */
+ bool IsSeamShape(const TopoDS_Shape& subShape) const
+ { return IsSeamShape( GetMeshDS()->ShapeToIndex( subShape )); }
+ /*!
+ * \brief Return true if an edge or a vertex encounters twice in face wire
+ * \param subShape - Id of edge or vertex
+ */
+ bool IsRealSeam(const int subShape) const
+ { return mySeamShapeIds.find( -subShape ) != mySeamShapeIds.end(); }
+ /*!
+ * \brief Return true if an edge or a vertex encounters twice in face wire
+ * \param subShape - edge or vertex
+ */
+ bool IsRealSeam(const TopoDS_Shape& subShape) const
+ { return IsRealSeam( GetMeshDS()->ShapeToIndex( subShape)); }
+ /*!
+ * \brief Check if the shape set through IsQuadraticSubMesh() or SetSubShape()
+ * has a seam edge, i.e. an edge that has two parametric representations
+ * on a surface
+ * \retval bool - true if it has
+ */
+ bool HasSeam() const { return !mySeamShapeIds.empty(); }
+ /*!
+ * \brief Check if the shape set through IsQuadraticSubMesh() or SetSubShape()
+ * has a seam edge that encounters twice in a wire
+ * \retval bool - true if it has
+ */
+ bool HasRealSeam() const { return HasSeam() && ( *mySeamShapeIds.begin() < 0 ); }
+ /*!
+ * \brief Return index of periodic parametric direction of a closed face
+ * \retval int - 1 for U, 2 for V direction
+ */
+ int GetPeriodicIndex() const { return myParIndex; }
+ /*!
+ * \brief Return an alternative parameter for a node on seam
+ */
+ double GetOtherParam(const double param) const;
+
+ /*!
+ * \brief Return existing or create new medium nodes between given ones
+ * \param force3d - true means node creation at the middle between the
+ * two given nodes, else node position is found on its
+ * supporting geometrical shape, if any.
+ * \param expectedSupport - shape type corresponding to element being created
+ * , e.g TopAbs_EDGE if SMDSAbs_Edge is created
+ * basing on \a n1 and \a n2
+ */
+ const SMDS_MeshNode* GetMediumNode(const SMDS_MeshNode* n1,
+ const SMDS_MeshNode* n2,
+ const bool force3d,
+ TopAbs_ShapeEnum expectedSupport=TopAbs_SHAPE);
+ /*!
+ * \brief Return existing or create a new central node for a quardilateral
+ * quadratic face given its 8 nodes.
+ * \param force3d - true means node creation in between the given nodes,
+ * else node position is found on a geometrical face if any.
+ */
+ const SMDS_MeshNode* GetCentralNode(const SMDS_MeshNode* n1,
+ const SMDS_MeshNode* n2,
+ const SMDS_MeshNode* n3,
+ const SMDS_MeshNode* n4,
+ const SMDS_MeshNode* n12,
+ const SMDS_MeshNode* n23,
+ const SMDS_MeshNode* n34,
+ const SMDS_MeshNode* n41,
+ bool force3d);
+ /*!
+ * \brief Return existing or create a new central node for a
+ * quadratic triangle given its 6 nodes.
+ * \param force3d - true means node creation in between the given nodes,
+ * else node position is found on a geometrical face if any.
+ */
+ const SMDS_MeshNode* GetCentralNode(const SMDS_MeshNode* n1,
+ const SMDS_MeshNode* n2,
+ const SMDS_MeshNode* n3,
+ const SMDS_MeshNode* n12,
+ const SMDS_MeshNode* n23,
+ const SMDS_MeshNode* n31,
+ bool force3d);
+ /*!
+ * \brief Return index and type of the shape (EDGE or FACE only) to set a medium node on
+ */
+ std::pair<int, TopAbs_ShapeEnum> GetMediumPos(const SMDS_MeshNode* n1,
+ const SMDS_MeshNode* n2,
+ const bool useCurSubShape=false,
+ TopAbs_ShapeEnum expectedSupport=TopAbs_SHAPE);
+ /*!
+ * \brief Add a link in my data structure
+ */
+ void AddTLinkNode(const SMDS_MeshNode* n1,
+ const SMDS_MeshNode* n2,
+ const SMDS_MeshNode* n12);
+ /*!
+ * \brief Add many links in my data structure
+ */
+ void AddTLinkNodeMap(const TLinkNodeMap& aMap)
+ { myTLinkNodeMap.insert(aMap.begin(), aMap.end()); }
+
+ bool AddTLinks(const SMDS_MeshEdge* edge);
+ bool AddTLinks(const SMDS_MeshFace* face);
+ bool AddTLinks(const SMDS_MeshVolume* vol);
+
+ /**
+ * Returns myTLinkNodeMap
+ */
+ const TLinkNodeMap& GetTLinkNodeMap() const { return myTLinkNodeMap; }
+
+ /**
+ * Check mesh without geometry for: if all elements on this shape are quadratic,
+ * quadratic elements will be created.
+ * Used then generated 3D mesh without geometry.
+ */
+ enum MType{ LINEAR, QUADRATIC, COMP };
+ MType IsQuadraticMesh();
+
+ virtual ~SMESH_MesherHelper();