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