From: eap Date: Wed, 6 Dec 2006 14:50:39 +0000 (+0000) Subject: PAL13473 (Build repetitive mesh) X-Git-Tag: V3_2_4pre1~35 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7e07caff334125101c9a06bcfe7988bf41038a87;p=modules%2Fsmesh.git PAL13473 (Build repetitive mesh) Add static int NbCornerNodes(VolumeType type) --- diff --git a/src/SMDS/SMDS_VolumeTool.cxx b/src/SMDS/SMDS_VolumeTool.cxx index 7ee1f81f2..d2cf317a7 100644 --- a/src/SMDS/SMDS_VolumeTool.cxx +++ b/src/SMDS/SMDS_VolumeTool.cxx @@ -1518,6 +1518,31 @@ int SMDS_VolumeTool::NbFaces( VolumeType type ) } } +//================================================================================ +/*! + * \brief Useful to know nb of corner nodes of a quadratic volume + * \param type - volume type + * \retval int - nb of corner nodes + */ +//================================================================================ + +int SMDS_VolumeTool::NbCornerNodes(VolumeType type) +{ + switch ( type ) { + case TETRA : + case QUAD_TETRA: return 4; + case PYRAM : + case QUAD_PYRAM: return 5; + case PENTA : + case QUAD_PENTA: return 6; + case HEXA : + case QUAD_HEXA : return 8; + default: return 0; + } + return 0; +} + // + //======================================================================= //function : GetFaceNodesIndices //purpose : Return the array of face nodes indices diff --git a/src/SMDS/SMDS_VolumeTool.hxx b/src/SMDS/SMDS_VolumeTool.hxx index 4c0e1a911..24c7397af 100644 --- a/src/SMDS/SMDS_VolumeTool.hxx +++ b/src/SMDS/SMDS_VolumeTool.hxx @@ -193,7 +193,10 @@ class SMDS_WNT_EXPORT SMDS_VolumeTool int faceIndex ); // Return number of nodes in the array of face nodes - private: + static int NbCornerNodes(VolumeType type); + // Useful to know nb of corner nodes of a quadratic volume + +private: bool setFace( int faceIndex );