def test_write_correct_polyline_path_tag_order(entity): entity = Hatch.from_text(HATCH) entity.paths.add_polyline_path( [(0, 0), (1, 0), (1, 1)], is_closed=True, ) result = TagCollector.dxftags(entity) tags = list(result.pop_tags([92, 72, 73])) # 92 = path type 3: external polyline path # 72 = has_bulge # 73 = is_closed # The group codes 72 and 73 are swapped in comparison to MPOLYGON assert tags == [(92, 3), (72, 0), (73, 1)]
def hatch_pattern(): return Hatch.from_text(HATCH_PATTERN)
def spline_edge_hatch(): return Hatch.from_text(EDGE_HATCH_WITH_SPLINE)
def edge_hatch(): return Hatch.from_text(EDGE_HATCH)
def path_hatch(): return Hatch.from_text(PATH_HATCH)
def test_write_dxf(): entity = Hatch.from_text(HATCH) result = TagCollector.dxftags(entity) expected = basic_tags_from_text(HATCH) assert result == expected
def entity(): return Hatch.from_text(HATCH)