For a case of a FACE with only concave corners.
// find a right angle VERTEX
int iVertex;
- double maxAngle = 0;
+ double maxAngle = -1e100;
for ( int i = 0; i < wire->NbEdges(); ++i )
{
int iPrev = myHelper->WrapIndex( i-1, wire->NbEdges() );
iVertex = i;
}
}
- if ( maxAngle == 0 ) return isOK;
+ if ( maxAngle < -2*M_PI ) return isOK;
// get a sign of 2D area of a corner face
}
okSign = v2 ^ v1;
+
+ if ( maxAngle < 0 )
+ okSign *= -1;
}
// Look for incorrectly oriented faces