Example #1
0
def test_remove_loops6():
    polya=Polygon(vvector([
        Vertex(15,15),Vertex(15,10),Vertex(0,10),Vertex(0,0),Vertex(10,0),Vertex(10,15)]))
    polyb=polya.remove_loops()
    print polyb
    assert polyb==Polygon(vvector([
        Vertex(10,10),Vertex(10,15),Vertex(15,15),Vertex(15,10)]))
Example #2
0
def test_remove_loops5():
    polya=Polygon(vvector([
        Vertex(0,0),Vertex(80,0),Vertex(100,0),Vertex(80,0),Vertex(0,2)]))
    polyb=polya.remove_loops()
    assert polyb==Polygon(vvector([
        Vertex(0,0),Vertex(60,0),Vertex(0,2)]))