Commit c7827342 authored by mattijs's avatar mattijs
Browse files

extend, never shrink patch info

parent 4d7cd473
......@@ -459,6 +459,7 @@ bool triSurface::readSTLASCII(const fileName& STLfileName)
patches_[iter()].name() = iter.key();
}
// Fill in the missing information in the patches
setDefaultPatches();
return true;
......
......@@ -631,15 +631,16 @@ surfacePatchList triSurface::calcPatches(labelList& faceMap) const
faceMap = sortedRegion.indices();
// Compact regions
// Get last region
//label maxRegion = 0; // for compacted regions
// Extend regions
label maxRegion = patches_.size()-1; // for non-compacted regions
if (faceMap.size() > 0)
{
maxRegion = operator[](faceMap[faceMap.size() - 1]).region();
maxRegion = max
(
maxRegion,
operator[](faceMap[faceMap.size() - 1]).region()
);
}
// Get new region list
......
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