diff --git a/src/libslic3r/PlaceholderParser.cpp b/src/libslic3r/PlaceholderParser.cpp index 530d849072..0cfd974152 100644 --- a/src/libslic3r/PlaceholderParser.cpp +++ b/src/libslic3r/PlaceholderParser.cpp @@ -108,7 +108,6 @@ static inline bool opts_equal(const DynamicConfig &config_old, const DynamicConf std::vector PlaceholderParser::config_diff(const DynamicPrintConfig &rhs) { - const ConfigDef *def = rhs.def(); std::vector diff_keys; for (const t_config_option_key &opt_key : rhs.keys()) if (! opts_equal(m_config, rhs, opt_key)) @@ -124,7 +123,6 @@ std::vector PlaceholderParser::config_diff(const DynamicPrintConfig // a current extruder ID is used. bool PlaceholderParser::apply_config(const DynamicPrintConfig &rhs) { - const ConfigDef *def = rhs.def(); bool modified = false; for (const t_config_option_key &opt_key : rhs.keys()) { if (! opts_equal(m_config, rhs, opt_key)) { diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 5236e4e049..ae7241d054 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -2049,7 +2049,7 @@ void PrintConfigDef::init_fff_params() { int threads = (unsigned int)boost::thread::hardware_concurrency(); def->set_default_value(new ConfigOptionInt(threads > 0 ? threads : 2)); - def->cli == ConfigOptionDef::nocli; + def->cli = ConfigOptionDef::nocli; } def = this->add("toolchange_gcode", coString); diff --git a/src/libslic3r/PrintRegion.cpp b/src/libslic3r/PrintRegion.cpp index fc2bdfa7d1..3b57709938 100644 --- a/src/libslic3r/PrintRegion.cpp +++ b/src/libslic3r/PrintRegion.cpp @@ -79,12 +79,14 @@ void PrintRegion::collect_object_printing_extruders(const PrintConfig &print_con void PrintRegion::collect_object_printing_extruders(std::vector &object_extruders) const { - auto num_extruders = (int)print()->config().nozzle_diameter.size(); // PrintRegion, if used by some PrintObject, shall have all the extruders set to an existing printer extruder. // If not, then there must be something wrong with the Print::apply() function. +#ifndef NDEBUG + auto num_extruders = (int)print()->config().nozzle_diameter.size(); assert(this->config().perimeter_extruder <= num_extruders); assert(this->config().infill_extruder <= num_extruders); assert(this->config().solid_infill_extruder <= num_extruders); +#endif collect_object_printing_extruders(print()->config(), this->config(), object_extruders); } diff --git a/src/libslic3r/SLA/SLAAutoSupports.hpp b/src/libslic3r/SLA/SLAAutoSupports.hpp index 3b696212ea..38f21e6cff 100644 --- a/src/libslic3r/SLA/SLAAutoSupports.hpp +++ b/src/libslic3r/SLA/SLAAutoSupports.hpp @@ -185,8 +185,6 @@ private: SLAAutoSupports::Config m_config; - float m_supports_force_total = 0.f; - void process(const std::vector& slices, const std::vector& heights); void uniformly_cover(const ExPolygons& islands, Structure& structure, PointGrid3D &grid3d, bool is_new_island = false, bool just_one = false); void project_onto_mesh(std::vector& points) const; diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp index 2811a19da9..0a5c21cce4 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp @@ -308,7 +308,7 @@ void GLGizmoSlaSupports::render_points(const Selection& selection, bool picking) } else { render_color[3] = 1.f; - if ((m_hover_id == i && m_editing_mode)) { // ignore hover state unless editing mode is active + if ((size_t(m_hover_id) == i && m_editing_mode)) { // ignore hover state unless editing mode is active render_color[0] = 0.f; render_color[1] = 1.0f; render_color[2] = 1.0f; @@ -330,7 +330,7 @@ void GLGizmoSlaSupports::render_points(const Selection& selection, bool picking) // Inverse matrix of the instance scaling is applied so that the mark does not scale with the object. glsafe(::glPushMatrix()); - glsafe(::glTranslated(support_point.pos(0), support_point.pos(1), support_point.pos(2))); + glsafe(::glTranslatef(support_point.pos(0), support_point.pos(1), support_point.pos(2))); glsafe(::glMultMatrixd(instance_scaling_matrix_inverse.data())); if (vol->is_left_handed()) @@ -347,16 +347,16 @@ void GLGizmoSlaSupports::render_points(const Selection& selection, bool picking) Eigen::AngleAxisd aa(q); glsafe(::glRotated(aa.angle() * (180. / M_PI), aa.axis()(0), aa.axis()(1), aa.axis()(2))); - const float cone_radius = 0.25f; // mm - const float cone_height = 0.75f; + const double cone_radius = 0.25; // mm + const double cone_height = 0.75; glsafe(::glPushMatrix()); glsafe(::glTranslatef(0.f, 0.f, support_point.head_front_radius * RenderPointScale)); - ::gluCylinder(m_quadric, 0.f, cone_radius, cone_height, 24, 1); + ::gluCylinder(m_quadric, 0., cone_radius, cone_height, 24, 1); glsafe(::glTranslatef(0.f, 0.f, cone_height)); ::gluDisk(m_quadric, 0.0, cone_radius, 24, 1); glsafe(::glPopMatrix()); } - ::gluSphere(m_quadric, support_point.head_front_radius * RenderPointScale, 24, 12); + ::gluSphere(m_quadric, (double)support_point.head_front_radius * RenderPointScale, 24, 12); if (vol->is_left_handed()) glFrontFace(GL_CCW); @@ -777,7 +777,7 @@ std::vector GLGizmoSlaSupports::get_config_options(const st } -void GLGizmoSlaSupports::update_cache_entry_normal(unsigned int i) const +void GLGizmoSlaSupports::update_cache_entry_normal(size_t i) const { int idx = 0; Eigen::Matrix pp = m_editing_cache[i].support_point.pos; diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.hpp b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.hpp index 787d220da0..d2451f64eb 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.hpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.hpp @@ -30,7 +30,7 @@ private: ObjectID m_model_object_id = 0; int m_active_instance = -1; float m_active_instance_bb_radius; // to cache the bb - mutable float m_z_shift = 0.f; + mutable double m_z_shift = 0.f; bool unproject_on_mesh(const Vec2d& mouse_pos, std::pair& pos_and_normal); const float RenderPointScale = 1.f; @@ -99,11 +99,9 @@ private: void render_clipping_plane(const Selection& selection) const; bool is_mesh_update_necessary() const; void update_mesh(); - void update_cache_entry_normal(unsigned int i) const; + void update_cache_entry_normal(size_t i) const; bool unsaved_changes() const; - EState m_no_hover_state = Off; - EState m_no_hover_old_state = Off; bool m_lock_unique_islands = false; bool m_editing_mode = false; // Is editing mode active? bool m_old_editing_state = false; // To keep track of whether the user toggled between the modes (needed for imgui refreshes).