mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 01:40:33 +05:00
Fix regression of smesh/2D_mesh_Polygons_00/A2
This commit is contained in:
parent
90e0893c89
commit
b54f78cc79
@ -104,7 +104,7 @@ namespace {
|
|||||||
gp_Vec v1( P1 - P2 ), v2( P3 - P2 );
|
gp_Vec v1( P1 - P2 ), v2( P3 - P2 );
|
||||||
double dot = v1 * v2, len1 = v1.SquareMagnitude(), len2 = v2.SquareMagnitude();
|
double dot = v1 * v2, len1 = v1.SquareMagnitude(), len2 = v2.SquareMagnitude();
|
||||||
|
|
||||||
return ( len1 < gp::Resolution() || len2 < gp::Resolution() ? -1 :
|
return ( dot < 0 || len1 < gp::Resolution() || len2 < gp::Resolution() ? -1 :
|
||||||
dot * dot / len1 / len2 );
|
dot * dot / len1 / len2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -736,7 +736,7 @@ double MinimumAngle::GetValue( const TSequenceOfXYZ& P )
|
|||||||
double A0 = getCos2( P( i-1 ), P( i ), P( i+1 ) );
|
double A0 = getCos2( P( i-1 ), P( i ), P( i+1 ) );
|
||||||
aMaxCos2 = Max( aMaxCos2, A0 );
|
aMaxCos2 = Max( aMaxCos2, A0 );
|
||||||
}
|
}
|
||||||
if ( aMaxCos2 <= 0 )
|
if ( aMaxCos2 < 0 )
|
||||||
return 0; // all nodes coincide
|
return 0; // all nodes coincide
|
||||||
|
|
||||||
double cos = sqrt( aMaxCos2 );
|
double cos = sqrt( aMaxCos2 );
|
||||||
|
Loading…
Reference in New Issue
Block a user