Salome HOME
0020672: EDF 1243 SMESH : Be able to transform mixed mesh
authoreap <eap@opencascade.com>
Tue, 30 Mar 2010 12:33:10 +0000 (12:33 +0000)
committereap <eap@opencascade.com>
Tue, 30 Mar 2010 12:33:10 +0000 (12:33 +0000)
+  virtual int  NbCornerNodes() const;

src/SMDS/SMDS_MeshElement.cxx
src/SMDS/SMDS_MeshElement.hxx

index e2a7f61da19d63405317a9b68b3e4a8830f9b620..9f9b234269f9584c95073c2847a14a9feee9ecb8 100644 (file)
@@ -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
index 8c8d353eb7262ec3f4d5b241e62cdca277933a8c..2609b720c2f05295bb2493da0a365f54daeb6419 100644 (file)
@@ -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);