Beispiel #1
0
def test_malformed_ellipse():
    ellipse = Ellipse.from_text(MALFORMED_ELLIPSE)
    assert ellipse.dxf.layer == "LY_EZDXF"
    assert ellipse.dxf.linetype == "LT_EZDXF"
    assert ellipse.dxf.color == 7
    assert ellipse.dxf.center.isclose((1, 2, 3))
    assert ellipse.dxf.major_axis.isclose((1, 0, 0))
    assert ellipse.dxf.ratio == 1
    assert ellipse.dxf.start_param == 0
    assert ellipse.dxf.end_param == math.pi * 2
Beispiel #2
0
def test_write_dxf():
    entity = Ellipse.from_text(ELLIPSE)
    result = TagCollector.dxftags(entity)
    expected = basic_tags_from_text(ELLIPSE)
    assert result == expected
Beispiel #3
0
def entity():
    return Ellipse.from_text(ELLIPSE)