diff options
author | bubnikv <bubnikv@gmail.com> | 2016-10-20 14:04:23 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2016-10-20 14:04:23 +0300 |
commit | f788f50b5a7e1457cadf7a2cde82d93cf085652d (patch) | |
tree | e0fc2f70266a94ce33581ff3fbeb8a9214b99e2d /xs/src/libslic3r/Polygon.hpp | |
parent | 53907a9cfee63abf99940bbffe5f1785d151e843 (diff) |
Disabled asserts in the release build (-DNDEBUG).
Added a safe variant of offset(const Slic3r::ExPolygon...), which offsets each loop separately.
New functions "remove_sticks" to remove zero area parts of polygons.
New functions "remove_small" and "remove_degenerate" for polygon clean up.
Extended the C++ supports, those are not finalized yet though.
Diffstat (limited to 'xs/src/libslic3r/Polygon.hpp')
-rw-r--r-- | xs/src/libslic3r/Polygon.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xs/src/libslic3r/Polygon.hpp b/xs/src/libslic3r/Polygon.hpp index 9f0bc6028..4466d2d23 100644 --- a/xs/src/libslic3r/Polygon.hpp +++ b/xs/src/libslic3r/Polygon.hpp @@ -51,6 +51,13 @@ class Polygon : public MultiPoint { extern BoundingBox get_extents(const Polygon &poly); extern BoundingBox get_extents(const Polygons &polygons); +// Remove sticks (tentacles with zero area) from the polygon. +extern bool remove_sticks(Polygon &poly); +extern bool remove_sticks(Polygons &polys); + +// Remove polygons with less than 3 edges. +extern bool remove_degenerate(Polygons &polys); +extern bool remove_small(Polygons &polys, double min_area); } // start Boost |