compilation fix

This commit is contained in:
PavelMikus 2023-01-23 16:59:45 +01:00 committed by Pavel Mikuš
parent 41f1b83ae4
commit fb4c1bf612
2 changed files with 7 additions and 4 deletions

View File

@ -429,7 +429,8 @@ void PrintObject::generate_support_spots()
if (!this->shared_regions()->generated_support_points.has_value()) { if (!this->shared_regions()->generated_support_points.has_value()) {
PrintTryCancel cancel_func = m_print->make_try_cancel(); PrintTryCancel cancel_func = m_print->make_try_cancel();
SupportSpotsGenerator::Params params{this->print()->m_config.filament_type.values, 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); auto [supp_points, partial_objects] = SupportSpotsGenerator::full_search(this, cancel_func, params);
this->m_shared_regions->generated_support_points = {this->trafo_centered(), supp_points}; this->m_shared_regions->generated_support_points = {this->trafo_centered(), supp_points};
m_print->throw_if_canceled(); 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 // 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(); float support_flow_width = support_material_flow(this, this->config().layer_height).width();
SupportSpotsGenerator::Params params{this->print()->m_config.filament_type.values, 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_supports_malformations(this->support_layers(), support_flow_width, params);
SupportSpotsGenerator::estimate_malformations(this->layers(), params); SupportSpotsGenerator::estimate_malformations(this->layers(), params);
m_print->throw_if_canceled(); m_print->throw_if_canceled();

View File

@ -14,7 +14,7 @@ namespace SupportSpotsGenerator {
struct Params struct Params
{ {
Params(const std::vector<std::string> &filament_types, float max_acceleration, size_t raft_layers_count) Params(const std::vector<std::string> &filament_types, float max_acceleration, int raft_layers_count)
: max_acceleration(max_acceleration), raft_layers_count(raft_layers_count) : max_acceleration(max_acceleration), raft_layers_count(raft_layers_count)
{ {
if (filament_types.size() > 1) { if (filament_types.size() > 1) {
@ -34,7 +34,7 @@ struct Params
const float bridge_distance = 12.0f; // mm 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 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) // 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; std::string filament_type;
const std::pair<float,float> malformation_distance_factors = std::pair<float, float> { 0.4, 1.2 }; const std::pair<float,float> malformation_distance_factors = std::pair<float, float> { 0.4, 1.2 };