diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2015-02-27 23:55:02 +0300 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2015-02-27 23:55:02 +0300 |
commit | 1ab8efba7fe54c44bdee6017316f78bd4405020e (patch) | |
tree | 4b016f76cfd53dca7721743ad1ded1e483500792 /xs/src/libslic3r/BridgeDetector.cpp | |
parent | bb3feedc31a7057bbb47a3e4027f41e925d02ee5 (diff) |
Fixed regression causing random failures in bridge direction detection. #2636
Diffstat (limited to 'xs/src/libslic3r/BridgeDetector.cpp')
-rw-r--r-- | xs/src/libslic3r/BridgeDetector.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/xs/src/libslic3r/BridgeDetector.cpp b/xs/src/libslic3r/BridgeDetector.cpp index dfc145422..da59a04d8 100644 --- a/xs/src/libslic3r/BridgeDetector.cpp +++ b/xs/src/libslic3r/BridgeDetector.cpp @@ -37,14 +37,10 @@ BridgeDetector::BridgeDetector(const ExPolygon &_expolygon, const ExPolygonColle Polygons grown; offset((Polygons)this->expolygon, &grown, this->extrusion_width); - // detect what edges lie on lower slices - for (ExPolygons::const_iterator lower = this->lower_slices.expolygons.begin(); - lower != this->lower_slices.expolygons.end(); - ++lower) { - /* turn bridge contour and holes into polylines and then clip them - with each lower slice's contour */ - intersection(grown, lower->contour, &this->_edges); - } + // detect what edges lie on lower slices by turning bridge contour and holes + // into polylines and then clipping them with each lower slice's contour + intersection(grown, this->lower_slices.contours(), &this->_edges); + #ifdef SLIC3R_DEBUG printf(" bridge has %zu support(s)\n", this->_edges.size()); #endif |