BUG: handling zero sized cyclics

This commit is contained in:
mattijs
2012-01-13 08:41:49 +00:00
parent b2f40aecf5
commit a5e2edb3fd

View File

@ -419,6 +419,8 @@ void Foam::cyclicPolyPatch::getCentresAndAnchors
<< gAverage(half1Ctrs) << endl; << gAverage(half1Ctrs) << endl;
} }
if (half0Ctrs.size())
{
switch (transform_) switch (transform_)
{ {
case ROTATIONAL: case ROTATIONAL:
@ -557,7 +559,7 @@ void Foam::cyclicPolyPatch::getCentresAndAnchors
break; break;
} }
} }
}
// Calculate typical distance per face // Calculate typical distance per face
tols = matchTolerance()*calcFaceTol(pp1, pp1.points(), half1Ctrs); tols = matchTolerance()*calcFaceTol(pp1, pp1.points(), half1Ctrs);
@ -1270,7 +1272,7 @@ bool Foam::cyclicPolyPatch::order
rotation.setSize(pp.size()); rotation.setSize(pp.size());
rotation = 0; rotation = 0;
if (pp.empty() || transform_ == NOORDERING) if (transform_ == NOORDERING)
{ {
// No faces, nothing to change. // No faces, nothing to change.
return false; return false;