There are two main cases in offset algorithm: when the resulting contour is bigger and when it is smaller.
In first case you just calculate normals and join the points, and it generally works.
Second case is a little bit more complex: the resulting contour can be much smaller than original, so you might need to throw some pieces of contour away and trim others at the points of intersection.
Resolution
There are two main cases in offset algorithm: when the resulting contour is bigger and when it is smaller.
In first case you just calculate normals and join the points, and it generally works.
Second case is a little bit more complex: the resulting contour can be much smaller than original, so you might need to throw some pieces of contour away and trim others at the points of intersection.