mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 18:30:35 +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
|
* \param nbNodes - total nb of nodes
|
||||||
* \retval int - valid node index
|
* \retval int - valid node index
|
||||||
*/
|
*/
|
||||||
static int WrapIndex(const int ind, const int nbNodes) {
|
static inline int WrapIndex(int ind, const int nbNodes) {
|
||||||
if ( ind < 0 ) return nbNodes + ind % nbNodes;
|
return (( ind %= nbNodes ) < 0 ) ? ind + nbNodes : ind;
|
||||||
if ( ind >= nbNodes ) return ind % nbNodes;
|
|
||||||
return ind;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Loading…
Reference in New Issue
Block a user