diff options
Diffstat (limited to 'src/libslic3r/VoronoiOffset.hpp')
-rw-r--r-- | src/libslic3r/VoronoiOffset.hpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/libslic3r/VoronoiOffset.hpp b/src/libslic3r/VoronoiOffset.hpp new file mode 100644 index 000000000..a21b44f93 --- /dev/null +++ b/src/libslic3r/VoronoiOffset.hpp @@ -0,0 +1,25 @@ +// Polygon offsetting using Voronoi diagram prodiced by boost::polygon. + +#ifndef slic3r_VoronoiOffset_hpp_ +#define slic3r_VoronoiOffset_hpp_ + +#include "libslic3r.h" + +#include "Geometry.hpp" + +namespace Slic3r { + +// Offset a polygon or a set of polygons possibly with holes by traversing a Voronoi diagram. +// The input polygons are stored in lines and lines are referenced by vd. +// Outer curve will be extracted for a positive offset_distance, +// inner curve will be extracted for a negative offset_distance. +// Circular arches will be discretized to achieve discretization_error. +Polygons voronoi_offset( + const Geometry::VoronoiDiagram &vd, + const Lines &lines, + double offset_distance, + double discretization_error); + +} // namespace Slic3r + +#endif // slic3r_VoronoiOffset_hpp_ |