Beispiel #1
0
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)]
Beispiel #2
0
def hatch_pattern():
    return Hatch.from_text(HATCH_PATTERN)
Beispiel #3
0
def spline_edge_hatch():
    return Hatch.from_text(EDGE_HATCH_WITH_SPLINE)
Beispiel #4
0
def edge_hatch():
    return Hatch.from_text(EDGE_HATCH)
Beispiel #5
0
def path_hatch():
    return Hatch.from_text(PATH_HATCH)
Beispiel #6
0
def test_write_dxf():
    entity = Hatch.from_text(HATCH)
    result = TagCollector.dxftags(entity)
    expected = basic_tags_from_text(HATCH)
    assert result == expected
Beispiel #7
0
def entity():
    return Hatch.from_text(HATCH)