mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 02:37:51 -06:00
FillAdaptive:
1) More accurate trimming of an anchor with another infill line or by another anchor line. 2) Trimming of very short infill lines, which are not anchored, by another infill lines.
This commit is contained in:
parent
26836db629
commit
4d102ac8ca
3 changed files with 83 additions and 81 deletions
|
@ -54,7 +54,8 @@ public:
|
|||
Line(const Point& _a, const Point& _b) : a(_a), b(_b) {}
|
||||
explicit operator Lines() const { Lines lines; lines.emplace_back(*this); return lines; }
|
||||
void scale(double factor) { this->a *= factor; this->b *= factor; }
|
||||
void translate(double x, double y) { Vector v(x, y); this->a += v; this->b += v; }
|
||||
void translate(const Point &v) { this->a += v; this->b += v; }
|
||||
void translate(double x, double y) { this->translate(Point(x, y)); }
|
||||
void rotate(double angle, const Point ¢er) { this->a.rotate(angle, center); this->b.rotate(angle, center); }
|
||||
void reverse() { std::swap(this->a, this->b); }
|
||||
double length() const { return (b - a).cast<double>().norm(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue