mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 07:34:03 -06:00
Ported PrintObject::prepare_infill & combine_infill from Perl to C++.
This commit is contained in:
parent
933d5b261a
commit
777023c7a8
10 changed files with 526 additions and 591 deletions
|
@ -35,9 +35,7 @@ public:
|
|||
Point(int _x, int _y): x(_x), y(_y) {};
|
||||
Point(long long _x, long long _y): x(coord_t(_x)), y(coord_t(_y)) {}; // for Clipper
|
||||
Point(double x, double y);
|
||||
static Point new_scale(coordf_t x, coordf_t y) {
|
||||
return Point(scale_(x), scale_(y));
|
||||
};
|
||||
static Point new_scale(coordf_t x, coordf_t y) { return Point(coord_t(scale_(x)), coord_t(scale_(y))); }
|
||||
|
||||
bool operator==(const Point& rhs) const { return this->x == rhs.x && this->y == rhs.y; }
|
||||
bool operator!=(const Point& rhs) const { return ! (*this == rhs); }
|
||||
|
@ -182,9 +180,10 @@ private:
|
|||
|
||||
class Point3 : public Point
|
||||
{
|
||||
public:
|
||||
public:
|
||||
coord_t z;
|
||||
explicit Point3(coord_t _x = 0, coord_t _y = 0, coord_t _z = 0): Point(_x, _y), z(_z) {};
|
||||
static Point3 new_scale(coordf_t x, coordf_t y, coordf_t z) { return Point3(coord_t(scale_(x)), coord_t(scale_(y)), coord_t(scale_(z))); }
|
||||
};
|
||||
|
||||
std::ostream& operator<<(std::ostream &stm, const Pointf &pointf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue