Beispiel #1
0
    def test_vertical_intersecting_negative_slanted3(self):
        # Assume
        vt = Tarp(Point(10, 10), Point(10, 11))
        t = Tarp(Point(25, 5), Point(0, 15))

        # Action
        intersect = t.intersect(vt)

        # Assert
        self.assertTrue(intersect)
Beispiel #2
0
    def test_vertical_non_intersecting_slanted2(self):
        # Assume
        vt = Tarp(Point(4, 3), Point(4, 4))
        t = Tarp(Point(1, 2), Point(4, 4))

        # Action
        intersect = t.intersect(vt)

        # Assert
        self.assertFalse(intersect)
Beispiel #3
0
    def test_intersecting_perpendicular(self):
        # Assume
        vt = Tarp(Point(0, 0), Point(1, 1))
        t = Tarp(Point(1, 0), Point(0, 1))

        # Action
        intersect = t.intersect(vt)

        # Assert
        self.assertTrue(intersect)
Beispiel #4
0
    def test_vertical_non_intersecting_negative_slanted2(self):
        # Assume
        vt = Tarp(Point(10, 11), Point(10, 12))
        t = Tarp(Point(25, 5), Point(0, 15))

        # Action
        intersect = t.intersect(vt)

        # Assert
        self.assertFalse(intersect)
Beispiel #5
0
    def test_vertical_intersecting_negative_slanted(self):
        # Assume
        vt = Tarp(Point(3, 2), Point(3, 3))
        t = Tarp(Point(5, 1), Point(2, 3))

        # Action
        intersect = t.intersect(vt)

        # Assert
        self.assertTrue(intersect)
Beispiel #6
0
    def test_vertical_intersecting_slanted(self):
        # Assume
        vt = Tarp(Point(3, 3), Point(3, 4))
        t = Tarp(Point(1, 2), Point(4, 4))

        # Action
        intersect = t.intersect(vt)

        # Assert
        self.assertTrue(intersect)
Beispiel #7
0
    def test_non_intersecting_parallel(self):
        # Assume
        vt = Tarp(Point(0, 0), Point(1, 1))
        t = Tarp(Point(1, 0), Point(2, 1))

        # Action
        intersect = t.intersect(vt)

        # Assert
        self.assertFalse(intersect)