Merge pull request #3120 from Vicious-one/patch-1

Fix for #3069
This commit is contained in:
Joseph Lenox 2016-05-18 23:01:19 -05:00
commit b068616366

View File

@ -2,6 +2,7 @@
#include "ExtrusionEntity.hpp"
#include <algorithm>
#include <cstdlib>
#include <math.h>
namespace Slic3r {
@ -390,7 +391,7 @@ GCode::extrude(ExtrusionLoop loop, std::string description, double speed)
Polygon polygon = loop.polygon();
Point centroid = polygon.centroid();
last_pos = Point(polygon.bounding_box().max.x, centroid.y);
last_pos.rotate(rand() % 2*PI, centroid);
last_pos.rotate(fmod((float)rand()/16.0, 2.0*PI), centroid);
}
loop.split_at(last_pos);
}