From: eap Date: Tue, 30 Mar 2010 12:33:10 +0000 (+0000) Subject: 0020672: EDF 1243 SMESH : Be able to transform mixed mesh X-Git-Tag: V5_1_4a1~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0e2bac7865cac1ddf3466cc90c8c43a01188c44f;p=modules%2Fsmesh.git 0020672: EDF 1243 SMESH : Be able to transform mixed mesh + virtual int NbCornerNodes() const; --- diff --git a/src/SMDS/SMDS_MeshElement.cxx b/src/SMDS/SMDS_MeshElement.cxx index e2a7f61da..9f9b23426 100644 --- a/src/SMDS/SMDS_MeshElement.cxx +++ b/src/SMDS/SMDS_MeshElement.cxx @@ -222,6 +222,17 @@ bool SMDS_MeshElement::IsMediumNode(const SMDS_MeshNode* node) const return false; } +//================================================================================ +/*! + * \brief Return number of nodes excluding medium ones + */ +//================================================================================ + +int SMDS_MeshElement::NbCornerNodes() const +{ + return IsQuadratic() ? NbNodes() - NbEdges() : NbNodes(); +} + //================================================================================ /*! * \brief Check if a node belongs to the element diff --git a/src/SMDS/SMDS_MeshElement.hxx b/src/SMDS/SMDS_MeshElement.hxx index 8c8d353eb..2609b720c 100644 --- a/src/SMDS/SMDS_MeshElement.hxx +++ b/src/SMDS/SMDS_MeshElement.hxx @@ -74,6 +74,7 @@ public: virtual SMDSAbs_EntityType GetEntityType() const = 0; virtual bool IsMediumNode(const SMDS_MeshNode* node) const; + virtual int NbCornerNodes() const; friend SMDS_EXPORT std::ostream & operator <<(std::ostream & OS, const SMDS_MeshElement *); friend SMDS_EXPORT bool SMDS_MeshElementIDFactory::BindID(int ID,SMDS_MeshElement*elem);