Generates segments which form an offset curve. Supports all end cap and join options provided for buffering. Implements various heuristics to produce smoother, simpler curves which are still within a reasonable tolerance of the true curve.
The intersection test above is vulnerable to robustness errors; i.e. it may be that the offsets should intersect very close to their endpoints, but aren't reported as such due to rounding. To handle this situation appropriately, we use the following test: If the offset points are very close, don't add closing segments but simply use one of the offset points
Add last offset point
Add an end cap around point p1, terminating a line segment coming from p0
Creates a CW circle around a point
Creates a CW square around a point
Tests whether the input has a narrow concave angle (relative to the offset distance). In this case the generated offset curve will contain self-intersections and heuristic closing segments. This is expected behaviour in the case of buffer curves. For pure offset curves, the output needs to be further treated before it can be used.
true if the input has a narrow concave angle.