Bugfix: a typo caused wrong loop splitting, thus wrong ordering of perimeters having bridging parts. Includes regression test. #2258

This commit is contained in:
Alessandro Ranellucci 2014-12-24 00:11:29 +01:00
parent c63d5da5c2
commit 91bc4d8157
2 changed files with 28 additions and 6 deletions

View file

@ -244,9 +244,6 @@ ExtrusionLoop::split_at_vertex(const Point &point)
path->polyline.points.insert(path->polyline.points.end(), path->polyline.points.begin() + 1, path->polyline.points.begin() + idx + 1);
path->polyline.points.erase(path->polyline.points.begin(), path->polyline.points.begin() + idx);
} else {
// if we have multiple paths we assume they have different types, so no need to
// check for continuity as we do for the single path case above
// new paths list starts with the second half of current path
ExtrusionPaths new_paths;
{
@ -256,10 +253,10 @@ ExtrusionLoop::split_at_vertex(const Point &point)
}
// then we add all paths until the end of current path list
new_paths.insert(new_paths.end(), this->paths.begin(), path); // not including this path
new_paths.insert(new_paths.end(), path+1, this->paths.end()); // not including this path
// then we add all paths since the beginning of current list up to the previous one
new_paths.insert(new_paths.end(), path+1, this->paths.end()); // not including this path
new_paths.insert(new_paths.end(), this->paths.begin(), path); // not including this path
// finally we add the first half of current path
{