diff --git a/xs/src/libslic3r/Config.hpp b/xs/src/libslic3r/Config.hpp index 2d192d235..49a14e221 100644 --- a/xs/src/libslic3r/Config.hpp +++ b/xs/src/libslic3r/Config.hpp @@ -459,6 +459,7 @@ class ConfigOptionEnumGeneric : public ConfigOption }; enum ConfigOptionType { + coNone, coFloat, coFloats, coInt, @@ -500,7 +501,8 @@ class ConfigOptionDef std::vector enum_labels; t_config_enum_values enum_keys_map; - ConfigOptionDef() : multiline(false), full_width(false), readonly(false), + ConfigOptionDef() : type(coNone), + multiline(false), full_width(false), readonly(false), height(-1), width(-1), min(INT_MIN), max(INT_MAX) {}; }; diff --git a/xs/src/libslic3r/Extruder.cpp b/xs/src/libslic3r/Extruder.cpp index 8cbd00b73..e254d6806 100644 --- a/xs/src/libslic3r/Extruder.cpp +++ b/xs/src/libslic3r/Extruder.cpp @@ -2,7 +2,7 @@ namespace Slic3r { -Extruder::Extruder(int id, GCodeConfig *config) +Extruder::Extruder(unsigned int id, GCodeConfig *config) : id(id), config(config) { diff --git a/xs/src/libslic3r/Extruder.hpp b/xs/src/libslic3r/Extruder.hpp index 03ee7c57f..fa91bb42f 100644 --- a/xs/src/libslic3r/Extruder.hpp +++ b/xs/src/libslic3r/Extruder.hpp @@ -10,7 +10,7 @@ namespace Slic3r { class Extruder { public: - int id; + unsigned int id; double E; double absolute_E; double retracted; @@ -18,7 +18,7 @@ class Extruder double e_per_mm3; double retract_speed_mm_min; - Extruder(int id, GCodeConfig *config); + Extruder(unsigned int id, GCodeConfig *config); virtual ~Extruder() {} void reset(); double extrude(double dE); diff --git a/xs/src/libslic3r/ExtrusionEntity.cpp b/xs/src/libslic3r/ExtrusionEntity.cpp index 846269185..be32519f6 100644 --- a/xs/src/libslic3r/ExtrusionEntity.cpp +++ b/xs/src/libslic3r/ExtrusionEntity.cpp @@ -283,7 +283,7 @@ ExtrusionLoop::has_overhang_point(const Point &point) const if (pos != -1) { // point belongs to this path // we consider it overhang only if it's not an endpoint - return (path->is_bridge() && pos > 0 && pos != path->polyline.points.size()-1); + return (path->is_bridge() && pos > 0 && pos != (int)(path->polyline.points.size())-1); } } return false; diff --git a/xs/src/libslic3r/MotionPlanner.cpp b/xs/src/libslic3r/MotionPlanner.cpp index f8e7d1dd9..d35a89ec5 100644 --- a/xs/src/libslic3r/MotionPlanner.cpp +++ b/xs/src/libslic3r/MotionPlanner.cpp @@ -73,7 +73,7 @@ MotionPlanner::initialize() } ExPolygonCollection -MotionPlanner::get_env(size_t island_idx) const +MotionPlanner::get_env(int island_idx) const { if (island_idx == -1) { return ExPolygonCollection(this->outer); diff --git a/xs/src/libslic3r/MotionPlanner.hpp b/xs/src/libslic3r/MotionPlanner.hpp index 608f01681..d49cc8198 100644 --- a/xs/src/libslic3r/MotionPlanner.hpp +++ b/xs/src/libslic3r/MotionPlanner.hpp @@ -33,7 +33,7 @@ class MotionPlanner void initialize(); MotionPlannerGraph* init_graph(int island_idx); - ExPolygonCollection get_env(size_t island_idx) const; + ExPolygonCollection get_env(int island_idx) const; Point nearest_env_point(const ExPolygonCollection &env, const Point &from, const Point &to) const; }; @@ -42,7 +42,7 @@ class MotionPlannerGraph friend class MotionPlanner; private: - typedef size_t node_t; + typedef int node_t; typedef double weight_t; struct neighbor { node_t target; diff --git a/xs/xsp/Extruder.xsp b/xs/xsp/Extruder.xsp index c244e02e4..aac39c413 100644 --- a/xs/xsp/Extruder.xsp +++ b/xs/xsp/Extruder.xsp @@ -6,7 +6,7 @@ %} %name{Slic3r::Extruder} class Extruder { - Extruder(int id, GCodeConfig *config); + Extruder(unsigned int id, GCodeConfig *config); ~Extruder(); void reset(); double extrude(double dE); @@ -16,7 +16,7 @@ double extruded_volume(); double used_filament(); - int id() + unsigned int id() %code%{ RETVAL = THIS->id; %}; double E()