mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-23 00:31:11 -06:00
Merge branch 'master' of https://github.com/prusa3d/Slic3r
This commit is contained in:
commit
748c1ab1de
7 changed files with 12 additions and 18 deletions
|
@ -105,10 +105,10 @@ public:
|
|||
// Height of the extrusion, used for visualization purposed.
|
||||
float height;
|
||||
|
||||
ExtrusionPath(ExtrusionRole role) : m_role(role), mm3_per_mm(-1), width(-1), height(-1) {};
|
||||
ExtrusionPath(ExtrusionRole role, double mm3_per_mm, float width, float height) : m_role(role), mm3_per_mm(mm3_per_mm), width(width), height(height) {};
|
||||
ExtrusionPath(const ExtrusionPath &rhs) : m_role(rhs.m_role), mm3_per_mm(rhs.mm3_per_mm), width(rhs.width), height(rhs.height), polyline(rhs.polyline) {}
|
||||
ExtrusionPath(ExtrusionPath &&rhs) : m_role(rhs.m_role), mm3_per_mm(rhs.mm3_per_mm), width(rhs.width), height(rhs.height), polyline(std::move(rhs.polyline)) {}
|
||||
ExtrusionPath(ExtrusionRole role) : mm3_per_mm(-1), width(-1), height(-1), m_role(role) {};
|
||||
ExtrusionPath(ExtrusionRole role, double mm3_per_mm, float width, float height) : mm3_per_mm(mm3_per_mm), width(width), height(height), m_role(role) {};
|
||||
ExtrusionPath(const ExtrusionPath &rhs) : polyline(rhs.polyline), mm3_per_mm(rhs.mm3_per_mm), width(rhs.width), height(rhs.height), m_role(rhs.m_role) {}
|
||||
ExtrusionPath(ExtrusionPath &&rhs) : polyline(std::move(rhs.polyline)), mm3_per_mm(rhs.mm3_per_mm), width(rhs.width), height(rhs.height), m_role(rhs.m_role) {}
|
||||
// ExtrusionPath(ExtrusionRole role, const Flow &flow) : m_role(role), mm3_per_mm(flow.mm3_per_mm()), width(flow.width), height(flow.height) {};
|
||||
|
||||
ExtrusionPath& operator=(const ExtrusionPath &rhs) { this->m_role = rhs.m_role; this->mm3_per_mm = rhs.mm3_per_mm; this->width = rhs.width; this->height = rhs.height; this->polyline = rhs.polyline; return *this; }
|
||||
|
|
|
@ -48,8 +48,8 @@ static inline bool is_ccw(const Polygon &poly)
|
|||
return true;
|
||||
|
||||
// 1) Find the lowest lexicographical point.
|
||||
int imin = 0;
|
||||
for (int i = 1; i < poly.points.size(); ++ i) {
|
||||
unsigned int imin = 0;
|
||||
for (unsigned int i = 1; i < poly.points.size(); ++ i) {
|
||||
const Point &pmin = poly.points[imin];
|
||||
const Point &p = poly.points[i];
|
||||
if (p.x < pmin.x || (p.x == pmin.x && p.y < pmin.y))
|
||||
|
@ -134,7 +134,7 @@ class MedialAxis {
|
|||
double max_width;
|
||||
double min_width;
|
||||
MedialAxis(double _max_width, double _min_width, const ExPolygon* _expolygon = NULL)
|
||||
: max_width(_max_width), min_width(_min_width), expolygon(_expolygon) {};
|
||||
: expolygon(_expolygon), max_width(_max_width), min_width(_min_width) {};
|
||||
void build(ThickPolylines* polylines);
|
||||
void build(Polylines* polylines);
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ class ThickLine : public Line
|
|||
coordf_t a_width, b_width;
|
||||
|
||||
ThickLine() : a_width(0), b_width(0) {};
|
||||
ThickLine(Point _a, Point _b) : a_width(0), b_width(0), Line(_a, _b) {};
|
||||
ThickLine(Point _a, Point _b) : Line(_a, _b), a_width(0), b_width(0) {};
|
||||
};
|
||||
|
||||
class Linef
|
||||
|
|
|
@ -130,7 +130,7 @@ public:
|
|||
void print_info() const;
|
||||
|
||||
private:
|
||||
ModelObject(Model *model) : m_model(model), m_bounding_box_valid(false), layer_height_profile_valid(false) {}
|
||||
ModelObject(Model *model) : layer_height_profile_valid(false), m_model(model), m_bounding_box_valid(false) {}
|
||||
ModelObject(Model *model, const ModelObject &other, bool copy_volumes = true);
|
||||
ModelObject& operator= (ModelObject other);
|
||||
void swap(ModelObject &other);
|
||||
|
|
|
@ -146,7 +146,7 @@ public:
|
|||
BoundingBox bounding_box() const { return BoundingBox(Point(0,0), this->size); }
|
||||
|
||||
// adds region_id, too, if necessary
|
||||
void add_region_volume(int region_id, int volume_id) {
|
||||
void add_region_volume(unsigned int region_id, int volume_id) {
|
||||
if (region_id >= region_volumes.size())
|
||||
region_volumes.resize(region_id + 1);
|
||||
region_volumes[region_id].push_back(volume_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue