Fix of the new gyroid infill path planning. Fixes #3226

This commit is contained in:
bubnikv 2019-11-22 18:22:44 +01:00
parent 232f324999
commit 9c4dc80057
4 changed files with 94 additions and 2 deletions

View file

@ -6,6 +6,7 @@
namespace Slic3r {
class BoundingBox;
class Line;
class Line3;
class Linef3;
@ -43,6 +44,8 @@ public:
Vector normal() const { return Vector((this->b(1) - this->a(1)), -(this->b(0) - this->a(0))); }
bool intersection(const Line& line, Point* intersection) const;
double ccw(const Point& point) const { return point.ccw(*this); }
// Clip a line with a bounding box. Returns false if the line is completely outside of the bounding box.
bool clip_with_bbox(const BoundingBox &bbox);
static double distance_to_squared(const Point &point, const Point &a, const Point &b);
static double distance_to(const Point &point, const Point &a, const Point &b) { return sqrt(distance_to_squared(point, a, b)); }