diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 83d25aefb..95e34bd05 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -429,7 +429,8 @@ void PrintObject::generate_support_spots() if (!this->shared_regions()->generated_support_points.has_value()) { PrintTryCancel cancel_func = m_print->make_try_cancel(); SupportSpotsGenerator::Params params{this->print()->m_config.filament_type.values, - float(this->print()->m_config.perimeter_acceleration.getFloat())}; + float(this->print()->m_config.perimeter_acceleration.getFloat()), + this->config().raft_layers.getInt()}; auto [supp_points, partial_objects] = SupportSpotsGenerator::full_search(this, cancel_func, params); this->m_shared_regions->generated_support_points = {this->trafo_centered(), supp_points}; m_print->throw_if_canceled(); @@ -470,7 +471,9 @@ void PrintObject::estimate_curled_extrusions() // Estimate curling of support material and add it to the malformaition lines of each layer float support_flow_width = support_material_flow(this, this->config().layer_height).width(); SupportSpotsGenerator::Params params{this->print()->m_config.filament_type.values, - float(this->print()->config().perimeter_acceleration.getFloat())}; + float(this->print()->config().perimeter_acceleration.getFloat()), + this->config().raft_layers.getInt() + }; SupportSpotsGenerator::estimate_supports_malformations(this->support_layers(), support_flow_width, params); SupportSpotsGenerator::estimate_malformations(this->layers(), params); m_print->throw_if_canceled(); diff --git a/src/libslic3r/SupportSpotsGenerator.hpp b/src/libslic3r/SupportSpotsGenerator.hpp index 498795993..98dda20e2 100644 --- a/src/libslic3r/SupportSpotsGenerator.hpp +++ b/src/libslic3r/SupportSpotsGenerator.hpp @@ -14,7 +14,7 @@ namespace SupportSpotsGenerator { struct Params { - Params(const std::vector &filament_types, float max_acceleration, size_t raft_layers_count) + Params(const std::vector &filament_types, float max_acceleration, int raft_layers_count) : max_acceleration(max_acceleration), raft_layers_count(raft_layers_count) { if (filament_types.size() > 1) { @@ -34,7 +34,7 @@ struct Params const float bridge_distance = 12.0f; // mm const float max_acceleration; // mm/s^2 ; max acceleration of object (bed) in XY (NOTE: The max hit is received by the object in the // jerk phase, so the usual machine limits are too low) - const size_t raft_layers_count; + const int raft_layers_count; std::string filament_type; const std::pair malformation_distance_factors = std::pair { 0.4, 1.2 };