Ejemplo n.º 1
0
 def testLowerRight(self):
     B = BBox( ( (5, 10),(15, 25) ) )
     C = BBox( ( (12, 5),(25, 15) ) )
     self.failIf(B.Inside(C) )
Ejemplo n.º 2
0
 def testLowerLeft(self):
     B = BBox(((5, 10), (15, 25)))
     C = BBox(((-10, 5), (8.5, 15)))
     self.failUnless(B.Overlaps(C))
Ejemplo n.º 3
0
 def testAbove(self):
     B = BBox(((5, 10), (15, 25)))
     C = BBox(((-10, 25.001), (8.5, 32)))
     self.failIf(B.Overlaps(C))
Ejemplo n.º 4
0
 def testUpperLeft(self):
     B = BBox( ( (5, 10),(15, 25) ) )
     C = BBox( ( (0, 12),(10, 32.0) ) )
     self.failUnless(B.Overlaps(C) )
Ejemplo n.º 5
0
 def testCreates(self):
     B = BBox(((0, 0), (5, 5)))
     self.failUnless(isinstance(B, BBox))
Ejemplo n.º 6
0
 def testMinMax2(self):
     # OK to have a zero-sized BB
     B = BBox(((10.0,-34),(10.0,-34.0)))
     self.failUnless(isinstance(B, BBox))
Ejemplo n.º 7
0
 def testPassThrough(self):
     B = BBox(((0,0),(5,5)))
     C = asBBox(B)
     self.failUnless(B is C)
Ejemplo n.º 8
0
 def testLowerLeft(self):
     B = BBox( ( (5, 10),(15, 25) ) )
     P = (-10, 5)
     self.failIf(B.PointInside(P))
Ejemplo n.º 9
0
 def testBelow(self):
     B = BBox( ( (5, 10),(15, 25) ) )
     P = (10, 5)
     self.failIf(B.PointInside(P))
Ejemplo n.º 10
0
 def testPointIn(self):
     B = BBox( ( (1.0, 2.0), (5.0, 10.0) ) )
     P = (3.0, 4.0)
     self.failUnless(B.PointInside(P))
Ejemplo n.º 11
0
 def testLowerRight(self):
     B = BBox( ( (5, 10),(15, 25) ) )
     P = (16, 4)
     self.failIf(B.PointInside(P))
Ejemplo n.º 12
0
 def testRight(self):
     B = BBox( ( (5, 10),(15, 25) ) )
     C = BBox( ( (17.1, 8),(17.95, 32) ) )
     self.failIf(B.Inside(C) )
Ejemplo n.º 13
0
 def testLeft(self):
     B = BBox( ( (5, 10),(15, 25) ) )
     C = BBox( ( (4, 8),(4.95, 32) ) )
     self.failIf(B.Inside(C) )
Ejemplo n.º 14
0
 def testLowerLeft(self):
     B = BBox( ( (5, 10),(15, 25) ) )
     C = BBox( ( (-10, 5),(8.5, 15) ) )
     self.failIf(B.Inside(C) )
Ejemplo n.º 15
0
 def testPointOnBottomRight(self):
     B = BBox( ( (-10.0, -10.0), (-1.0, -1.0) ) )
     P = (-1, -10.0)
     self.failUnless(B.PointInside(P))
Ejemplo n.º 16
0
 def testAbove(self):
     B = BBox( ( (5, 10),(15, 25) ) )
     P  = ( 10, 25.001)
     self.failIf(B.PointInside(P))
Ejemplo n.º 17
0
 def testMinMax(self):
     # OK to have a zero-sized BB
     B = BBox(((0,0),(0,5)))
     self.failUnless(isinstance(B, BBox))
Ejemplo n.º 18
0
 def testLeft(self):
     B = BBox( ( (5, 10),(15, 25) ) )
     P = (4, 12)
     self.failIf(B.PointInside(P))
Ejemplo n.º 19
0
 def testMinMax3(self):
     # OK to have a tiny BB
     B = BBox(((0,0),(1e-20,5)))
     self.failUnless(isinstance(B, BBox))
Ejemplo n.º 20
0
 def testRight(self):
     B = BBox( ( (5, 10),(15, 25) ) )
     P = (17.1, 12.3)
     self.failIf(B.PointInside(P))
Ejemplo n.º 21
0
 def testSame(self):
     B = BBox(((-23.5, 456),(56, 532.0)))
     C = BBox(((-23.5, 456),(56, 532.0)))
     self.failUnless(B.Overlaps(C) )
Ejemplo n.º 22
0
 def testArrayConstruction(self):
     A = N.array(((4,5),(10,12)), N.float_)
     B = BBox(A)
     self.failUnless(isinstance(B, BBox))
Ejemplo n.º 23
0
 def testUpperRight(self):
     B = BBox( ( (5, 10),(15, 25) ) )
     C = BBox( ( (12, 12),(25, 32.0) ) )
     self.failUnless(B.Overlaps(C) )
Ejemplo n.º 24
0
 def testPointLeftTopLine(self):
     B = BBox( ( (1.0, 2.0), (5.0, 10.0) ) )
     P = (-3.0, 10.0)
     self.failIf(B.PointInside(P))
Ejemplo n.º 25
0
 def testLowerRight(self):
     B = BBox(((5, 10), (15, 25)))
     C = BBox(((12, 5), (25, 15)))
     self.failUnless(B.Overlaps(C))
Ejemplo n.º 26
0
 def testPointOnBottomLine(self):
     B = BBox( ( (1.0, 2.0), (5.0, 10.0) ) )
     P = (3.0, 5.0)
     self.failUnless(B.PointInside(P))
Ejemplo n.º 27
0
 def testBelow(self):
     B = BBox(((5, 10), (15, 25)))
     C = BBox(((-10, 5), (8.5, 9.2)))
     self.failIf(B.Overlaps(C))
Ejemplo n.º 28
0
 def testPointOnLeft(self):
     B = BBox( ( (-10.0, -10.0), (-1.0, -1.0) ) )
     P = (-10, -5.0)
     self.failUnless(B.PointInside(P))
Ejemplo n.º 29
0
 def testLeft(self):
     B = BBox(((5, 10), (15, 25)))
     C = BBox(((4, 8), (4.95, 32)))
     self.failIf(B.Overlaps(C))
Ejemplo n.º 30
0
 def testUpperRight(self):
     B = BBox( ( (5, 10),(15, 25) ) )
     C = BBox( ( (12, 12),(25, 32.0) ) )
     self.failIf(B.Inside(C) )