diff --git a/masque/file/dxf.py b/masque/file/dxf.py index da35531..d7bc7e8 100644 --- a/masque/file/dxf.py +++ b/masque/file/dxf.py @@ -304,13 +304,13 @@ def _mrefs_to_drefs( b = rep.b_vector if rep.b_vector is not None else numpy.zeros(2) rotated_a = rotation_matrix_2d(-ref.rotation) @ a rotated_b = rotation_matrix_2d(-ref.rotation) @ b - if rotated_a[1] == 0 and rotated_b[0] == 0: + if numpy.isclose(rotated_a[1], 0) and numpy.isclose(rotated_b[0], 0): attribs['column_count'] = rep.a_count attribs['row_count'] = rep.b_count attribs['column_spacing'] = rotated_a[0] attribs['row_spacing'] = rotated_b[1] block.add_blockref(encoded_name, ref.offset, dxfattribs=attribs) - elif rotated_a[0] == 0 and rotated_b[1] == 0: + elif numpy.isclose(rotated_a[0], 0) and numpy.isclose(rotated_b[1], 0): attribs['column_count'] = rep.b_count attribs['row_count'] = rep.a_count attribs['column_spacing'] = rotated_b[0]