diff --git a/src/triSurface/triSurface/stitchTriangles.C b/src/triSurface/triSurface/stitchTriangles.C index 7ef6ad719b..463eb41ba9 100644 --- a/src/triSurface/triSurface/stitchTriangles.C +++ b/src/triSurface/triSurface/stitchTriangles.C @@ -46,6 +46,11 @@ bool triSurface::stitchTriangles pointField newPoints; bool hasMerged = mergePoints(rawPoints, tol, verbose, pointMap, newPoints); + pointField& ps = storedPoints(); + + // Set the coordinates to the merged ones + ps = newPoints; + if (hasMerged) { if (verbose) @@ -54,11 +59,6 @@ bool triSurface::stitchTriangles << " points down to " << newPoints.size() << endl; } - pointField& ps = storedPoints(); - - // Set the coordinates to the merged ones - ps = newPoints; - // Reset the triangle point labels to the unique points array label newTriangleI = 0; forAll(*this, i)