`offset` fatalError when all control points of segments are the same
As in tittle... sometimes happens, bcps are on points, points have same coordinates.
Example project: on github
Hello. Thanks for the example. It looks like this is a problem in BezierCurve.outline(distance:). I'll fix that.
As a workaround I'd suggest checking if all the points in the curve are equal and if so doing some special handling like using a circular path with the proper radius, for example.
Hello! For now i just tested if points are the same and if so, moved one of them by 0.001. :)
Btw. I could not found some .cgPath() function to convert BezierCurve to CGPath. Is it exist?
@typoland the BezierCurve type doesn't have a cgPath property but Path does, so you can do Path(curve: ...).cgPath instead.