Commit 100f9c25 authored by mattijs's avatar mattijs
Browse files

stitching points if no points have been merged

parent d7e88028
......@@ -46,10 +46,7 @@ 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)
{
......@@ -59,6 +56,11 @@ 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)
......
......@@ -814,7 +814,7 @@ void Foam::triSurface::scalePoints(const scalar scaleFactor)
void Foam::triSurface::cleanup(const bool verbose)
{
// Merge points (already done for STL, TRI)
stitchTriangles(pointField(points()), SMALL, verbose);
stitchTriangles(points(), SMALL, verbose);
// Merging points might have changed geometric factors
clearOut();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment