def test_overlapping_crossing_boxes(self):
        box1 = ConstructionBox()
        # overlapping boxes with corners inside of each other
        box2 = ConstructionBox(width=0.1, height=3)
        assert box1.is_any_corner_inside(box2) is False
        assert box2.is_any_corner_inside(box1) is False
        assert box1.is_overlapping(box2) is True
        assert box2.is_overlapping(box1) is True

        # center2 outside of box1
        box2 = ConstructionBox(center=(0.3, 0.708), width=0.18, height=2.88)
        assert box1.is_overlapping(box2) is True
        assert box2.is_overlapping(box1) is True

        # center2 outside of box1, no overlapping
        box2 = ConstructionBox(center=(0.6427, 0.6563),
                               width=0.18,
                               height=2.88)
        assert box1.is_overlapping(box2) is False
        assert box2.is_overlapping(box1) is False

        # cutting corner of box1
        box2 = ConstructionBox(center=(0.2639, 0.5721),
                               width=0.18,
                               height=2.88,
                               angle=45)
        assert box1.is_overlapping(box2) is True
        assert box2.is_overlapping(box1) is True
    def test_any_corner_inside(self):
        box1 = ConstructionBox()

        # one touching corner
        box2 = ConstructionBox(center=(1, 1))
        assert box1.is_any_corner_inside(box2) is True
        assert box2.is_any_corner_inside(box1) is True

        # no overlapping
        box2 = ConstructionBox(center=(1.01, 1.01))
        assert box1.is_any_corner_inside(box2) is False
        assert box2.is_any_corner_inside(box1) is False

        # one point of box2 inside of box1
        box2 = ConstructionBox(center=(0.5404, 0.5404), angle=45)
        assert box1.is_any_corner_inside(box2) is False
        assert box2.is_any_corner_inside(box1) is True

        # one point of box2 inside of box1
        box2 = ConstructionBox(center=(1.177, 0.5152), angle=45)
        assert box2.is_any_corner_inside(box1) is True

        # no overlapping
        box2 = ConstructionBox(center=(1.2091, 0.4669), angle=45)
        assert box2.is_any_corner_inside(box1) is False