diff --git a/Cassiopee/Connector/Connector/connector.h b/Cassiopee/Connector/Connector/connector.h index 2d5aa3c41..a11a4333e 100644 --- a/Cassiopee/Connector/Connector/connector.h +++ b/Cassiopee/Connector/Connector/connector.h @@ -608,7 +608,7 @@ namespace K_CONNECTOR /* Functions used for gatherMatching functions */ void compIncrement(E_Int indwA1, E_Int imw1, E_Float* oppositeWins, E_Float* oppositePts, - E_Int& inci, E_Int& incj, E_Int& inciopp, E_Int& incjopp); + E_Int dimPb, E_Int& inci, E_Int& incj, E_Int& inciopp, E_Int& incjopp); void compTrirac(E_Int im1, E_Int jm1, E_Int im2, E_Int jm2, E_Int typewin1, E_Int inc1, E_Int inc2, diff --git a/Cassiopee/Connector/Connector/gatherMatching.cpp b/Cassiopee/Connector/Connector/gatherMatching.cpp index ddcf2f77a..864331ba1 100644 --- a/Cassiopee/Connector/Connector/gatherMatching.cpp +++ b/Cassiopee/Connector/Connector/gatherMatching.cpp @@ -423,7 +423,8 @@ PyObject* K_CONNECTOR::gatherMatching(PyObject* self, PyObject* args) inciopp = 1; incjopp = imw2; } // Build subwindows - compIncrement(inds1, imcw1, oppositeWins, oppositePts, incci, inccj, incciopp, inccjopp); + compIncrement(inds1, imcw1, oppositeWins, oppositePts, dimPb, + incci, inccj, incciopp, inccjopp); jsw1 = inds1/imcw1; isw1 = inds1-jsw1*imcw1; iew1 = imcw1; jew1 = jsw1; deltaw2 = 0; iwmax1 = imcw1; @@ -847,13 +848,14 @@ E_Int K_CONNECTOR::signature(E_Int r1, E_Int r2, E_Int r3, E_Int var) //============================================================================= /* IN: indA1: index of first matching point of win now1 IN: imw1: size of win now1 - IN: oppositeWins, oppositePts: infos for opposite matching pts: win number and index + IN: oppositeWins, oppositePts: infos for opposite matching pts: win number and index + IN: dimPb: problem dimension OUT: inci, incj: valid increments for matching points in now1 OUT: inciopp, incjopp: valid increments for matching opposite points in now2 If no valid increment in one direction, set to 0 */ //============================================================================== void K_CONNECTOR::compIncrement( - E_Int indA1, E_Int imw1, E_Float* oppositeWins, E_Float* oppositePts, + E_Int indA1, E_Int imw1, E_Float* oppositeWins, E_Float* oppositePts, E_Int dimPb, E_Int& inci, E_Int& incj, E_Int& inciopp, E_Int& incjopp) { E_Int indB1 = indA1+1; @@ -865,7 +867,8 @@ void K_CONNECTOR::compIncrement( inci = 1; inciopp = E_Int(oppositePts[indB1])-E_Int(oppositePts[indA1]); } - if (oppositeWins[indD1] == oppositeWins[indA1]) + + if (dimPb == 3 && oppositeWins[indD1] == oppositeWins[indA1]) { incj = imw1; incjopp = E_Int(oppositePts[indD1])-E_Int(oppositePts[indA1]); diff --git a/Cassiopee/Connector/Connector/gatherMatchingNM.cpp b/Cassiopee/Connector/Connector/gatherMatchingNM.cpp index 171518d72..015a8a12b 100644 --- a/Cassiopee/Connector/Connector/gatherMatchingNM.cpp +++ b/Cassiopee/Connector/Connector/gatherMatchingNM.cpp @@ -414,7 +414,7 @@ PyObject* K_CONNECTOR::gatherMatchingNM(PyObject* self, PyObject* args) if ( nmatch==4) {incjopp = indTab2[noOpp[2]]-indTab2[noOpp[0]];} // Build subwindows - compIncrement(inds1, imcw1, oppositeWins, oppositePts, incci, inccj, incciopp, inccjopp); + compIncrement(inds1, imcw1, oppositeWins, oppositePts, dimPb, incci, inccj, incciopp, inccjopp); jsw1 = inds1/imcw1; isw1 = inds1-jsw1*imcw1; iew1 = imcw1; jew1 = jsw1; deltaw2=0; iwmax1 = imcw1;