Mon, 24 Jun 2019 10:16:36 +0300
fixed the collinear test for polygons with identical vertices
from testsuite import problem_type, report_problem import linetypes from librarystandards import library_standards @problem_type('mirrored-studs', severity = 'warning', message = lambda primitive: str.format( '"{primitive}" should not be mirrored', primitive = primitive, ) ) def mirrored_studs_test(model): for subfile_reference in model.subfile_references: # Test whether any stud subfile is mirrored. # A subfile is mirrored if its determinant is negative. if subfile_reference.subfile_path.startswith('stu') \ and subfile_reference.subfile_path != 'stud4.dat' \ and subfile_reference.matrix.determinant() < 0: yield report_problem( 'mirrored-studs', bad_object = subfile_reference, primitive = subfile_reference.subfile_path, ) manifest = {'tests': [mirrored_studs_test]}