Tue, 23 Jan 2018 12:29:30 +0200
Changed threshold skew test, added warning for slightly skew quads
tests/quadrilaterals.py | file | annotate | diff | comparison | revisions |
--- a/tests/quadrilaterals.py Mon Jan 22 21:21:53 2018 +0200 +++ b/tests/quadrilaterals.py Tue Jan 23 12:29:30 2018 +0200 @@ -24,11 +24,16 @@ plane_1 = triangle_plane_normal(triangles[0]) plane_2 = triangle_plane_normal(triangles[1]) skew_angle = vector_angle(plane_1, plane_2, normalized = True) - if skew_angle > radians(0.1): + if skew_angle > radians(3.0): yield error(quadrilateral, 'skew-error', skew_angle = skew_angle, ) break + elif skew_angle > radians(1.0): + yield warning(quadrilateral, 'skew-warning', + skew_angle = skew_angle, + ) + break manifest = { 'tests': { @@ -40,6 +45,10 @@ str.format('skew quadrilateral (plane angle {})', degree_rep(skew_angle), ), + 'skew-warning': lambda skew_angle: + str.format('slightly skew quadrilateral (plane angle {})', + degree_rep(skew_angle), + ), 'concave-error': 'concave quadrilateral', }, }