def test_arc(self):
     pt = Point((2,1))
     root = Arc(point = pt)
     root.left = Arc(point = Point ((1,0)))
     root.right = Arc(point = Point ((3, 0)))
     
     x = root.getLargestLeftDescendant()
     y = root.getSmallestRightDescendant()
     self.assertEquals ((1,0), (x.site.x, x.site.y))
     self.assertEquals ((3,0), (y.site.x, y.site.y))
Esempio n. 2
0
    def test_arc(self):
        pt = Point((2, 1))
        root = Arc(point=pt)
        root.left = Arc(point=Point((1, 0)))
        root.right = Arc(point=Point((3, 0)))

        x = root.getLargestLeftDescendant()
        y = root.getSmallestRightDescendant()
        self.assertEquals((1, 0), (x.site.x, x.site.y))
        self.assertEquals((3, 0), (y.site.x, y.site.y))
Esempio n. 3
0
 def test_bisectorIntersection(self):
     pt = Point((2, 1))
     arc = Arc(point=pt)
     y = arc.pointOnBisectionLine(5, 0)
     self.assertEquals(Point((5, 5.0)), y)
 def test_bisectorIntersection(self):
     pt = Point((2,1))
     arc = Arc(point = pt)
     y = arc.pointOnBisectionLine(5,0)
     self.assertEquals (Point((5, 5.0)), y)