This change reduces the number of very short fillet segments created during buffer/offset curve generation.
Specifically, adjacent input segments which are at a very shallow convex (outside) angle would cause a very short single-segment fillet to be created. These were previously pruned if they were extremely short, to avoid robustness issues. It is possible to increase the segment length that is pruned, since it has essentially no effect on the quality of the offset curve. This reduces the number of short segments which appear in the final curve.
Also, this change improves the selection strategy determining which offset vertex to keep.
Example
Input: LineString with 325 vertices and length 0.0611
Buffer distance: 0.01:
Buffer vertex count:
This change reduces the number of very short fillet segments created during buffer/offset curve generation.
Specifically, adjacent input segments which are at a very shallow convex (outside) angle would cause a very short single-segment fillet to be created. These were previously pruned if they were extremely short, to avoid robustness issues. It is possible to increase the segment length that is pruned, since it has essentially no effect on the quality of the offset curve. This reduces the number of short segments which appear in the final curve.
Also, this change improves the selection strategy determining which offset vertex to keep.
Example
Input: LineString with 325 vertices and length 0.0611 Buffer distance: 0.01: Buffer vertex count:
Example of removed fillet segment:
Segment length: 0.00034 Old Code
New Code