Raise error in unknown curve degrees

This commit is contained in:
Simon Cozens 2021-02-18 11:39:01 +00:00
parent 6a223e5f93
commit 80a3227f44

View File

@ -993,6 +993,7 @@ def _curve_bounds(c):
return calcQuadraticBounds(*c) return calcQuadraticBounds(*c)
elif len(c) == 4: elif len(c) == 4:
return calcCubicBounds(*c) return calcCubicBounds(*c)
raise ValueError("Unknown curve degree")
def _split_segment_at_t(c, t): def _split_segment_at_t(c, t):
@ -1004,6 +1005,7 @@ def _split_segment_at_t(c, t):
return splitQuadraticAtT(*c, t) return splitQuadraticAtT(*c, t)
elif len(c) == 4: elif len(c) == 4:
return splitCubicAtT(*c, t) return splitCubicAtT(*c, t)
raise ValueError("Unknown curve degree")
def _curve_curve_intersections_t( def _curve_curve_intersections_t(