snegovick / bcam

CAM system for hobbyists and shapeokers
GNU General Public License v3.0
22 stars 4 forks source link

Implement better algorithm for contour offsetting #107

Open snegovick opened 9 years ago

snegovick commented 9 years ago

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.