def test_tolerance_outside(self): p1, p2, p3 = self.setup_close(-1e-6) # Safety margin saves ut assert cg.is_ccw_polyline(p1, p2, p3, tol=1e-4, default=True) # Default kills us, even though we're inside safety margin assert not cg.is_ccw_polyline(p1, p2, p3, tol=1e-4, default=False) # Outside safety margin, and not on the ccw side assert not cg.is_ccw_polyline(p1, p2, p3, tol=1e-8, default=False)
def test_is_ccw(self): p1, p2, p3 = self.setup() assert cg.is_ccw_polyline(p1, p2, p3)
def test_not_ccw(self): p1, p2, p3 = self.setup() assert not cg.is_ccw_polyline(p1, p3, p2)
def test_is_ccw(self): p1, p2, p3 = self.setup() self.assertTrue(cg.is_ccw_polyline(p1, p2, p3))