Fix for #3069
This commit is contained in:
parent
5b8ed7367a
commit
8e0d458d1d
@ -2,6 +2,7 @@
|
|||||||
#include "ExtrusionEntity.hpp"
|
#include "ExtrusionEntity.hpp"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
@ -400,7 +401,7 @@ GCode::extrude(ExtrusionLoop loop, std::string description, double speed)
|
|||||||
Polygon polygon = loop.polygon();
|
Polygon polygon = loop.polygon();
|
||||||
Point centroid = polygon.centroid();
|
Point centroid = polygon.centroid();
|
||||||
last_pos = Point(polygon.bounding_box().max.x, centroid.y);
|
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);
|
loop.split_at(last_pos);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user