mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
22361: EDF SMESH: Quadrangle (mapping) algorithm: faces with more than 4 edges
Fix "int WrapIndex(const int ind, const int nbNodes)" for ind=-4 and nbNodes=4
This commit is contained in:
parent
3ad5d5a2d3
commit
0280d2e6a7
@ -140,10 +140,8 @@ class SMESH_EXPORT SMESH_MesherHelper
|
||||
* \param nbNodes - total nb of nodes
|
||||
* \retval int - valid node index
|
||||
*/
|
||||
static int WrapIndex(const int ind, const int nbNodes) {
|
||||
if ( ind < 0 ) return nbNodes + ind % nbNodes;
|
||||
if ( ind >= nbNodes ) return ind % nbNodes;
|
||||
return ind;
|
||||
static inline int WrapIndex(int ind, const int nbNodes) {
|
||||
return (( ind %= nbNodes ) < 0 ) ? ind + nbNodes : ind;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
Loading…
Reference in New Issue
Block a user