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/ExPolygon.cpp | |
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/ExPolygon.cpp')
-rw-r--r-- | xs/src/libslic3r/ExPolygon.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/xs/src/libslic3r/ExPolygon.cpp b/xs/src/libslic3r/ExPolygon.cpp index 4861a08fd..a9e67b241 100644 --- a/xs/src/libslic3r/ExPolygon.cpp +++ b/xs/src/libslic3r/ExPolygon.cpp @@ -585,4 +585,9 @@ BoundingBox get_extents(const ExPolygons &expolygons) return bbox; } +bool remove_sticks(ExPolygon &poly) +{ + return remove_sticks(poly.contour) || remove_sticks(poly.holes); +} + } // namespace Slic3r |