From a154fd34eef23353ced21643b2de43a360c037e2 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Mon, 16 Apr 2018 14:26:57 +0200 Subject: [PATCH 001/198] Added parameter extra_loading_move, prevented high feedrate moves during loading --- xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp | 19 ++++++++++++++----- xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp | 6 ++++-- xs/src/libslic3r/Print.cpp | 4 +++- xs/src/libslic3r/PrintConfig.cpp | 9 +++++++++ xs/src/libslic3r/PrintConfig.hpp | 2 ++ xs/src/slic3r/GUI/Preset.cpp | 2 +- xs/src/slic3r/GUI/Tab.cpp | 1 + 7 files changed, 34 insertions(+), 9 deletions(-) diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp index ad7d91c50..bdafdfa23 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp @@ -792,9 +792,17 @@ void WipeTowerPrusaMM::toolchange_Unload( float xdist = std::abs(oldx-turning_point); float edist = -(m_cooling_tube_retraction+m_cooling_tube_length/2.f-42); writer.suppress_preview() - .load_move_x(turning_point,-15 , 60.f * std::hypot(xdist,15)/15 * 83 ) // fixed speed after ramming - .load_move_x(oldx ,edist , 60.f * std::hypot(xdist,edist)/std::abs(edist) * m_filpar[m_current_tool].unloading_speed ) - .load_move_x(turning_point,-15 , 60.f * std::hypot(xdist,15)/15 * m_filpar[m_current_tool].unloading_speed*0.55f ) + .load_move_x(turning_point,-15 , 60.f * std::hypot(xdist,15)/15 * 83 ); // fixed speed after ramming + + // now an ugly hack: unload the filament with a check that the x speed is 50 mm/s + const float speed = m_filpar[m_current_tool].unloading_speed; + xdist = std::min(xdist, std::abs( 50 * edist / speed )); + const float feedrate = std::abs( std::hypot(edist, xdist) / ((edist / speed) / 60.f)); + writer.load_move_x(writer.x() + (m_left_to_right ? -1.f : 1.f) * xdist ,edist, feedrate ); + xdist = std::abs(oldx-turning_point); // recover old value of xdist + + + writer.load_move_x(turning_point,-15 , 60.f * std::hypot(xdist,15)/15 * m_filpar[m_current_tool].unloading_speed*0.55f ) .load_move_x(oldx ,-12 , 60.f * std::hypot(xdist,12)/12 * m_filpar[m_current_tool].unloading_speed*0.35f ) .resume_preview(); @@ -876,11 +884,12 @@ void WipeTowerPrusaMM::toolchange_Load( float loading_speed = m_filpar[m_current_tool].loading_speed; // mm/s in e axis float turning_point = ( oldx-xl < xr-oldx ? xr : xl ); float dist = std::abs(oldx-turning_point); - float edist = m_parking_pos_retraction-50-2; // loading is 2mm shorter that previous retraction, 50mm reserved for acceleration/deceleration + //float edist = m_parking_pos_retraction-50-2; // loading is 2mm shorter that previous retraction, 50mm reserved for acceleration/deceleration + float edist = m_parking_pos_retraction-50+m_extra_loading_move; // 50mm reserved for acceleration/deceleration writer.append("; CP TOOLCHANGE LOAD\n") .suppress_preview() .load_move_x(turning_point, 20, 60*std::hypot(dist,20.f)/20.f * loading_speed*0.3f) // Acceleration - .load_move_x(oldx,edist,60*std::hypot(dist,edist)/edist * loading_speed) // Fast phase + .load_move_x(oldx,edist,std::abs( 60*std::hypot(dist,edist)/edist * loading_speed) ) // Fast phase .load_move_x(turning_point, 20, 60*std::hypot(dist,20.f)/20.f * loading_speed*0.3f) // Slowing down .load_move_x(oldx, 10, 60*std::hypot(dist,10.f)/10.f * loading_speed*0.1f) // Super slow .resume_preview(); diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp index 175de0276..daaabdfc0 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp @@ -43,8 +43,8 @@ public: // width -- width of wipe tower in mm ( default 60 mm - leave as it is ) // wipe_area -- space available for one toolchange in mm WipeTowerPrusaMM(float x, float y, float width, float rotation_angle, float cooling_tube_retraction, - float cooling_tube_length, float parking_pos_retraction, float bridging, const std::vector& wiping_matrix, - unsigned int initial_tool) : + float cooling_tube_length, float parking_pos_retraction, float extra_loading_move, float bridging, + const std::vector& wiping_matrix, unsigned int initial_tool) : m_wipe_tower_pos(x, y), m_wipe_tower_width(width), m_wipe_tower_rotation_angle(rotation_angle), @@ -54,6 +54,7 @@ public: m_cooling_tube_retraction(cooling_tube_retraction), m_cooling_tube_length(cooling_tube_length), m_parking_pos_retraction(parking_pos_retraction), + m_extra_loading_move(extra_loading_move), m_bridging(bridging), m_current_tool(initial_tool) { @@ -197,6 +198,7 @@ private: float m_cooling_tube_retraction = 0.f; float m_cooling_tube_length = 0.f; float m_parking_pos_retraction = 0.f; + float m_extra_loading_move = 0.f; float m_bridging = 0.f; bool m_adhesion = true; diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index c19c97fae..c12cb64cd 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -202,6 +202,7 @@ bool Print::invalidate_state_by_config_options(const std::vectorconfig.wipe_tower_width.value), float(this->config.wipe_tower_rotation_angle.value), float(this->config.cooling_tube_retraction.value), float(this->config.cooling_tube_length.value), float(this->config.parking_pos_retraction.value), - float(this->config.wipe_tower_bridging), wiping_volumes, m_tool_ordering.first_extruder()); + float(this->config.extra_loading_move.value), float(this->config.wipe_tower_bridging), wiping_volumes, + m_tool_ordering.first_extruder()); //wipe_tower.set_retract(); //wipe_tower.set_zhop(); diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 1e7e0bacc..75129f4fd 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -1045,6 +1045,15 @@ PrintConfigDef::PrintConfigDef() def->min = 0; def->default_value = new ConfigOptionFloat(92.f); + def = this->add("extra_loading_move", coFloat); + def->label = L("Extra loading distance"); + def->tooltip = L("When set to zero, the distance the filament is moved from parking position during load " + "is exactly the same as it was moved back during unload. When positive, it is loaded further, " + " if negative, the loading move is shorter than unloading. "); + def->sidetext = L("mm"); + def->cli = "extra_loading_move=f"; + def->default_value = new ConfigOptionFloat(-2.f); + def = this->add("perimeter_acceleration", coFloat); def->label = L("Perimeters"); def->tooltip = L("This is the acceleration your printer will use for perimeters. " diff --git a/xs/src/libslic3r/PrintConfig.hpp b/xs/src/libslic3r/PrintConfig.hpp index 967a87310..62d8c7101 100644 --- a/xs/src/libslic3r/PrintConfig.hpp +++ b/xs/src/libslic3r/PrintConfig.hpp @@ -506,6 +506,7 @@ public: ConfigOptionFloat cooling_tube_retraction; ConfigOptionFloat cooling_tube_length; ConfigOptionFloat parking_pos_retraction; + ConfigOptionFloat extra_loading_move; std::string get_extrusion_axis() const @@ -564,6 +565,7 @@ protected: OPT_PTR(cooling_tube_retraction); OPT_PTR(cooling_tube_length); OPT_PTR(parking_pos_retraction); + OPT_PTR(extra_loading_move); } }; diff --git a/xs/src/slic3r/GUI/Preset.cpp b/xs/src/slic3r/GUI/Preset.cpp index d48c9bf8f..e4a4b2093 100644 --- a/xs/src/slic3r/GUI/Preset.cpp +++ b/xs/src/slic3r/GUI/Preset.cpp @@ -226,7 +226,7 @@ const std::vector& Preset::printer_options() "octoprint_host", "octoprint_apikey", "octoprint_cafile", "use_firmware_retraction", "use_volumetric_e", "variable_layer_height", "single_extruder_multi_material", "start_gcode", "end_gcode", "before_layer_gcode", "layer_gcode", "toolchange_gcode", "between_objects_gcode", "printer_vendor", "printer_model", "printer_variant", "printer_notes", "cooling_tube_retraction", - "cooling_tube_length", "parking_pos_retraction", "max_print_height", "default_print_profile", "inherits", + "cooling_tube_length", "parking_pos_retraction", "extra_loading_move", "max_print_height", "default_print_profile", "inherits", }; s_opts.insert(s_opts.end(), Preset::nozzle_options().begin(), Preset::nozzle_options().end()); } diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index cc4b18c7c..8ffe27351 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -1743,6 +1743,7 @@ void TabPrinter::build_extruder_pages(){ optgroup->append_single_option_line("cooling_tube_retraction"); optgroup->append_single_option_line("cooling_tube_length"); optgroup->append_single_option_line("parking_pos_retraction"); + optgroup->append_single_option_line("extra_loading_move"); m_pages.insert(m_pages.begin()+1,page); } } From 8c77b9645c698dd850703f3f4dbfe51dc441b82c Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Tue, 24 Apr 2018 13:02:08 +0200 Subject: [PATCH 002/198] Loading, unloading and cooling reworked, new filament parameters regarding cooling were added --- xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp | 101 ++++++++++---------- xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp | 11 ++- xs/src/libslic3r/Print.cpp | 8 +- xs/src/libslic3r/PrintConfig.cpp | 32 +++++-- xs/src/libslic3r/PrintConfig.hpp | 8 +- xs/src/slic3r/GUI/Preset.cpp | 8 +- xs/src/slic3r/GUI/Tab.cpp | 4 +- 7 files changed, 99 insertions(+), 73 deletions(-) diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp index bdafdfa23..db6e93362 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp @@ -219,6 +219,17 @@ public: Writer& retract(float e, float f = 0.f) { return load(-e, f); } +// Loads filament while also moving towards given points in x-axis (x feedrate is limited by cutting the distance short if necessary) + Writer& load_move_x_advanced(float farthest_x, float loading_dist, float loading_speed, float max_x_speed = 50.f) + { + float time = std::abs(loading_dist / loading_speed); + float x_speed = std::min(max_x_speed, std::abs(farthest_x - x()) / time); + float feedrate = 60.f * std::hypot(x_speed, loading_speed); + + float end_point = x() + (farthest_x > x() ? 1.f : -1.f) * x_speed * time; + return extrude_explicit(end_point, y(), loading_dist, feedrate); + } + // Elevate the extruder head above the current print_z position. Writer& z_hop(float hop, float f = 0.f) { @@ -786,58 +797,43 @@ void WipeTowerPrusaMM::toolchange_Unload( } WipeTower::xy end_of_ramming(writer.x(),writer.y()); - // Pull the filament end to the BEGINNING of the cooling tube while still moving the print head - float oldx = writer.x(); - float turning_point = (!m_left_to_right ? std::max(xl,oldx-15.f) : std::min(xr,oldx+15.f) ); // so it's not too far - float xdist = std::abs(oldx-turning_point); - float edist = -(m_cooling_tube_retraction+m_cooling_tube_length/2.f-42); + + // Retraction: + float old_x = writer.x(); + float turning_point = (!m_left_to_right ? xl : xr ); + float total_retraction_distance = m_cooling_tube_retraction + m_cooling_tube_length/2.f - 15.f; // the 15mm is reserved for the first part after ramming writer.suppress_preview() - .load_move_x(turning_point,-15 , 60.f * std::hypot(xdist,15)/15 * 83 ); // fixed speed after ramming - - // now an ugly hack: unload the filament with a check that the x speed is 50 mm/s - const float speed = m_filpar[m_current_tool].unloading_speed; - xdist = std::min(xdist, std::abs( 50 * edist / speed )); - const float feedrate = std::abs( std::hypot(edist, xdist) / ((edist / speed) / 60.f)); - writer.load_move_x(writer.x() + (m_left_to_right ? -1.f : 1.f) * xdist ,edist, feedrate ); - xdist = std::abs(oldx-turning_point); // recover old value of xdist - - - writer.load_move_x(turning_point,-15 , 60.f * std::hypot(xdist,15)/15 * m_filpar[m_current_tool].unloading_speed*0.55f ) - .load_move_x(oldx ,-12 , 60.f * std::hypot(xdist,12)/12 * m_filpar[m_current_tool].unloading_speed*0.35f ) + .load_move_x_advanced(turning_point, -15.f, 83.f, 50.f) // this is done at fixed speed + .load_move_x_advanced(old_x, -0.70f * total_retraction_distance, 1.0f * m_filpar[m_current_tool].unloading_speed) + .load_move_x_advanced(turning_point, -0.20f * total_retraction_distance, 0.5f * m_filpar[m_current_tool].unloading_speed) + .load_move_x_advanced(old_x, -0.10f * total_retraction_distance, 0.3f * m_filpar[m_current_tool].unloading_speed) + .travel(old_x, writer.y()) // in case previous move was shortened to limit feedrate .resume_preview(); - if (new_temperature != 0) // Set the extruder temperature, but don't wait. + if (new_temperature != 0) // Set the extruder temperature, but don't wait. writer.set_extruder_temp(new_temperature, false); -// cooling: - writer.suppress_preview(); - writer.travel(writer.x(), writer.y() + y_step); - const float start_x = writer.x(); - turning_point = ( xr-start_x > start_x-xl ? xr : xl ); - const float max_x_dist = 2*std::abs(start_x-turning_point); - const unsigned int N = 4 + std::max(0.f, (m_filpar[m_current_tool].cooling_time-14)/3); - float time = m_filpar[m_current_tool].cooling_time / float(N); + // Cooling: + const unsigned number_of_moves = 3; + if (number_of_moves > 0) { + const float initial_speed = 2.2f; // mm/s + const float final_speed = 3.4f; - i = 0; - while (i old_x-xl ? xr : xl; + for (unsigned i=0; i ramming_speed; diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index c12cb64cd..ec91691a1 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -186,7 +186,9 @@ bool Print::invalidate_state_by_config_options(const std::vectorconfig.filament_loading_speed.get_at(i), this->config.filament_unloading_speed.get_at(i), this->config.filament_toolchange_delay.get_at(i), - this->config.filament_cooling_time.get_at(i), + this->config.filament_cooling_moves.get_at(i), + this->config.filament_cooling_initial_speed.get_at(i), + this->config.filament_cooling_final_speed.get_at(i), this->config.filament_ramming_parameters.get_at(i), this->config.nozzle_diameter.get_at(i)); diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 75129f4fd..55a1b84e3 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -481,15 +481,31 @@ PrintConfigDef::PrintConfigDef() def->cli = "filament-toolchange-delay=f@"; def->min = 0; def->default_value = new ConfigOptionFloats { 0. }; - - def = this->add("filament_cooling_time", coFloats); - def->label = L("Cooling time"); - def->tooltip = L("The filament is slowly moved back and forth after retraction into the cooling tube " - "for this amount of time."); - def->cli = "filament_cooling_time=i@"; - def->sidetext = L("s"); + + def = this->add("filament_cooling_moves", coInts); + def->label = L("Number of cooling moves"); + def->tooltip = L("Filament is cooled by being moved back and forth in the " + "cooling tubes. Specify desired number of these moves "); + def->cli = "filament-cooling-moves=i@"; + def->max = 0; + def->max = 20; + def->default_value = new ConfigOptionInts { 6 }; + + def = this->add("filament_cooling_initial_speed", coFloats); + def->label = L("Speed of the first cooling move"); + def->tooltip = L("Cooling moves are gradually accelerating beginning at this speed. "); + def->cli = "filament-cooling-initial-speed=i@"; + def->sidetext = L("mm/s"); def->min = 0; - def->default_value = new ConfigOptionFloats { 14.f }; + def->default_value = new ConfigOptionFloats { 2.2f }; + + def = this->add("filament_cooling_final_speed", coFloats); + def->label = L("Speed of the last cooling move"); + def->tooltip = L("Cooling moves are gradually accelerating towards this speed. "); + def->cli = "filament-cooling-final-speed=i@"; + def->sidetext = L("mm/s"); + def->min = 0; + def->default_value = new ConfigOptionFloats { 3.4f }; def = this->add("filament_ramming_parameters", coStrings); def->label = L("Ramming parameters"); diff --git a/xs/src/libslic3r/PrintConfig.hpp b/xs/src/libslic3r/PrintConfig.hpp index 62d8c7101..a36e5def9 100644 --- a/xs/src/libslic3r/PrintConfig.hpp +++ b/xs/src/libslic3r/PrintConfig.hpp @@ -476,7 +476,9 @@ public: ConfigOptionFloats filament_loading_speed; ConfigOptionFloats filament_unloading_speed; ConfigOptionFloats filament_toolchange_delay; - ConfigOptionFloats filament_cooling_time; + ConfigOptionInts filament_cooling_moves; + ConfigOptionFloats filament_cooling_initial_speed; + ConfigOptionFloats filament_cooling_final_speed; ConfigOptionStrings filament_ramming_parameters; ConfigOptionBool gcode_comments; ConfigOptionEnum gcode_flavor; @@ -535,7 +537,9 @@ protected: OPT_PTR(filament_loading_speed); OPT_PTR(filament_unloading_speed); OPT_PTR(filament_toolchange_delay); - OPT_PTR(filament_cooling_time); + OPT_PTR(filament_cooling_moves); + OPT_PTR(filament_cooling_initial_speed); + OPT_PTR(filament_cooling_final_speed); OPT_PTR(filament_ramming_parameters); OPT_PTR(gcode_comments); OPT_PTR(gcode_flavor); diff --git a/xs/src/slic3r/GUI/Preset.cpp b/xs/src/slic3r/GUI/Preset.cpp index e4a4b2093..db2fdfc17 100644 --- a/xs/src/slic3r/GUI/Preset.cpp +++ b/xs/src/slic3r/GUI/Preset.cpp @@ -209,10 +209,10 @@ const std::vector& Preset::filament_options() static std::vector s_opts { "filament_colour", "filament_diameter", "filament_type", "filament_soluble", "filament_notes", "filament_max_volumetric_speed", "extrusion_multiplier", "filament_density", "filament_cost", "filament_loading_speed", "filament_unloading_speed", "filament_toolchange_delay", - "filament_cooling_time", "filament_ramming_parameters", "temperature", "first_layer_temperature", "bed_temperature", - "first_layer_bed_temperature", "fan_always_on", "cooling", "min_fan_speed", "max_fan_speed", "bridge_fan_speed", "disable_fan_first_layers", - "fan_below_layer_time", "slowdown_below_layer_time", "min_print_speed", "start_filament_gcode", "end_filament_gcode","compatible_printers", - "compatible_printers_condition", "inherits" + "filament_cooling_moves", "filament_cooling_initial_speed", "filament_cooling_final_speed", "filament_ramming_parameters", "temperature", + "first_layer_temperature", "bed_temperature", "first_layer_bed_temperature", "fan_always_on", "cooling", "min_fan_speed", "max_fan_speed", + "bridge_fan_speed", "disable_fan_first_layers", "fan_below_layer_time", "slowdown_below_layer_time", "min_print_speed", + "start_filament_gcode", "end_filament_gcode","compatible_printers", "compatible_printers_condition", "inherits" }; return s_opts; } diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 8ffe27351..da5b1b064 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -1287,7 +1287,9 @@ void TabFilament::build() optgroup->append_single_option_line("filament_loading_speed"); optgroup->append_single_option_line("filament_unloading_speed"); optgroup->append_single_option_line("filament_toolchange_delay"); - optgroup->append_single_option_line("filament_cooling_time"); + optgroup->append_single_option_line("filament_cooling_moves"); + optgroup->append_single_option_line("filament_cooling_initial_speed"); + optgroup->append_single_option_line("filament_cooling_final_speed"); line = { _(L("Ramming")), "" }; line.widget = [this](wxWindow* parent){ auto ramming_dialog_btn = new wxButton(parent, wxID_ANY, _(L("Ramming settings"))+"\u2026", wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT); From 650489dd8a99e662d4f029c1ff82e6c29bba01c2 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Tue, 24 Apr 2018 13:43:39 +0200 Subject: [PATCH 003/198] New parameters actually connected to the wipe tower generator --- xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp | 8 ++++---- xs/src/libslic3r/PrintConfig.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp index db6e93362..80d4fdf07 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp @@ -814,10 +814,10 @@ void WipeTowerPrusaMM::toolchange_Unload( writer.set_extruder_temp(new_temperature, false); // Cooling: - const unsigned number_of_moves = 3; + const int& number_of_moves = m_filpar[m_current_tool].cooling_moves; if (number_of_moves > 0) { - const float initial_speed = 2.2f; // mm/s - const float final_speed = 3.4f; + const float& initial_speed = m_filpar[m_current_tool].cooling_initial_speed; + const float& final_speed = m_filpar[m_current_tool].cooling_final_speed; float speed_inc = (final_speed - initial_speed) / (2.f * number_of_moves - 1.f); @@ -825,7 +825,7 @@ void WipeTowerPrusaMM::toolchange_Unload( .travel(writer.x(), writer.y() + y_step); old_x = writer.x(); turning_point = xr-old_x > old_x-xl ? xr : xl; - for (unsigned i=0; icli = "filament-cooling-moves=i@"; def->max = 0; def->max = 20; - def->default_value = new ConfigOptionInts { 6 }; + def->default_value = new ConfigOptionInts { 4 }; def = this->add("filament_cooling_initial_speed", coFloats); def->label = L("Speed of the first cooling move"); From 24dc4c0f236d53d48d81bca11b1ef6d0de3fa511 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Thu, 26 Apr 2018 11:19:51 +0200 Subject: [PATCH 004/198] Yet another attempt to fix the layer height profile validation --- xs/src/libslic3r/Print.cpp | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index ec91691a1..38a41370b 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -602,10 +602,10 @@ std::string Print::validate() const return "The Wipe Tower is currently only supported with the relative extruder addressing (use_relative_e_distances=1)."; SlicingParameters slicing_params0 = this->objects.front()->slicing_parameters(); - const PrintObject* most_layered_object = this->objects.front(); // object with highest layer_height_profile.size() encountered so far + const PrintObject* tallest_object = this->objects.front(); // let's find the tallest object for (const auto* object : objects) - if (object->layer_height_profile.size() > most_layered_object->layer_height_profile.size()) - most_layered_object = object; + if (*(object->layer_height_profile.end()-2) > *(tallest_object->layer_height_profile.end()-2) ) + tallest_object = object; for (PrintObject *object : this->objects) { SlicingParameters slicing_params = object->slicing_parameters(); @@ -622,17 +622,26 @@ std::string Print::validate() const object->update_layer_height_profile(); object->layer_height_profile_valid = was_layer_height_profile_valid; - if ( this->config.variable_layer_height ) { - int i = 0; - while ( i < object->layer_height_profile.size() ) { - if (std::abs(most_layered_object->layer_height_profile[i] - object->layer_height_profile[i]) > EPSILON) - return "The Wipe tower is only supported if all objects have the same layer height profile"; - ++i; - if (i == object->layer_height_profile.size()-2) // this element contains the objects max z, if the other object is taller, - // it does not have to match - we will step over it - if (most_layered_object->layer_height_profile[i] > object->layer_height_profile[i]) - ++i; + if ( this->config.variable_layer_height ) { // comparing layer height profiles + bool failed = false; + if (tallest_object->layer_height_profile.size() >= object->layer_height_profile.size() ) { + int i = 0; + while ( i < object->layer_height_profile.size() && i < tallest_object->layer_height_profile.size()) { + if (std::abs(tallest_object->layer_height_profile[i] - object->layer_height_profile[i])) { + failed = true; + break; + } + ++i; + if (i == object->layer_height_profile.size()-2) // this element contains this objects max z + if (tallest_object->layer_height_profile[i] > object->layer_height_profile[i]) // the difference does not matter in this case + ++i; + } } + else + failed = true; + + if (failed) + return "The Wipe tower is only supported if all objects have the same layer height profile"; } /*for (size_t i = 5; i < object->layer_height_profile.size(); i += 2) From 71b43370360ddef5a0dcded7358e0dcf13268bef Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Wed, 2 May 2018 10:52:17 +0200 Subject: [PATCH 005/198] Label in filament settings changed --- xs/src/slic3r/GUI/Tab.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 8d449b7f0..2f3a8f00e 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -1283,7 +1283,7 @@ void TabFilament::build() }; optgroup->append_line(line); - optgroup = page->new_optgroup(_(L("Toolchange behaviour"))); + optgroup = page->new_optgroup(_(L("Toolchange parameters with single extruder MM printers"))); optgroup->append_single_option_line("filament_loading_speed"); optgroup->append_single_option_line("filament_unloading_speed"); optgroup->append_single_option_line("filament_toolchange_delay"); From b6db3767a2dfca86cbf275e543da6ce00d035f91 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Fri, 11 May 2018 17:35:42 +0200 Subject: [PATCH 006/198] Bugfix: extruder temperature only changes when the temperature differs from the one last set (wipe tower) --- xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp | 17 +++++++---------- xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp | 1 + 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp index 80d4fdf07..f328d839f 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp @@ -275,12 +275,9 @@ public: // Set extruder temperature, don't wait by default. Writer& set_extruder_temp(int temperature, bool wait = false) { - if (temperature != current_temp) { - char buf[128]; - sprintf(buf, "M%d S%d\n", wait ? 109 : 104, temperature); - m_gcode += buf; - current_temp = temperature; - } + char buf[128]; + sprintf(buf, "M%d S%d\n", wait ? 109 : 104, temperature); + m_gcode += buf; return *this; }; @@ -395,10 +392,8 @@ private: float m_wipe_tower_width = 0.f; float m_wipe_tower_depth = 0.f; float m_last_fan_speed = 0.f; - int current_temp = -1; - std::string - set_format_X(float x) + std::string set_format_X(float x) { char buf[64]; sprintf(buf, " X%.3f", x); @@ -810,8 +805,10 @@ void WipeTowerPrusaMM::toolchange_Unload( .travel(old_x, writer.y()) // in case previous move was shortened to limit feedrate .resume_preview(); - if (new_temperature != 0) // Set the extruder temperature, but don't wait. + if (new_temperature != 0 && new_temperature != m_old_temperature ) { // Set the extruder temperature, but don't wait. writer.set_extruder_temp(new_temperature, false); + m_old_temperature = new_temperature; + } // Cooling: const int& number_of_moves = m_filpar[m_current_tool].cooling_moves; diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp index 6744aa917..ea1c1f631 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp @@ -196,6 +196,7 @@ private: float m_layer_height = 0.f; // Current layer height. size_t m_max_color_changes = 0; // Maximum number of color changes per layer. bool m_is_first_layer = false;// Is this the 1st layer of the print? If so, print the brim around the waste tower. + int m_old_temperature = -1; // To keep track of what was the last temp that we set (so we don't issue the command when not neccessary) // G-code generator parameters. float m_cooling_tube_retraction = 0.f; From fd829580e9c9c1f92e4a2338bcee35a5b319030a Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Thu, 17 May 2018 10:37:26 +0200 Subject: [PATCH 007/198] Working arrange_objects with DJD selection heuristic and a bottom-left placement strategy. --- CMakeLists.txt | 3 +- xs/CMakeLists.txt | 29 + xs/src/libnest2d/CMakeLists.txt | 81 ++ xs/src/libnest2d/LICENSE.txt | 661 +++++++++++++++ xs/src/libnest2d/README.md | 36 + .../DownloadProject.CMakeLists.cmake.in | 17 + .../cmake_modules/DownloadProject.cmake | 182 ++++ .../libnest2d/cmake_modules/FindClipper.cmake | 46 + xs/src/libnest2d/libnest2d.h | 37 + xs/src/libnest2d/libnest2d/boost_alg.hpp | 431 ++++++++++ .../libnest2d/clipper_backend/CMakeLists.txt | 48 ++ .../clipper_backend/clipper_backend.cpp | 77 ++ .../clipper_backend/clipper_backend.hpp | 240 ++++++ xs/src/libnest2d/libnest2d/common.hpp | 94 ++ xs/src/libnest2d/libnest2d/geometries_io.hpp | 18 + xs/src/libnest2d/libnest2d/geometries_nfp.hpp | 125 +++ .../libnest2d/libnest2d/geometry_traits.hpp | 501 +++++++++++ xs/src/libnest2d/libnest2d/libnest2d.hpp | 802 ++++++++++++++++++ .../libnest2d/placers/bottomleftplacer.hpp | 391 +++++++++ .../libnest2d/libnest2d/placers/nfpplacer.hpp | 31 + .../libnest2d/placers/placer_boilerplate.hpp | 102 +++ .../libnest2d/selections/djd_heuristic.hpp | 514 +++++++++++ .../libnest2d/libnest2d/selections/filler.hpp | 71 ++ .../libnest2d/selections/firstfit.hpp | 77 ++ .../selections/selection_boilerplate.hpp | 36 + xs/src/libnest2d/tests/CMakeLists.txt | 48 ++ xs/src/libnest2d/tests/benchmark.h | 58 ++ xs/src/libnest2d/tests/main.cpp | 260 ++++++ xs/src/libnest2d/tests/printer_parts.cpp | 339 ++++++++ xs/src/libnest2d/tests/printer_parts.h | 9 + xs/src/libnest2d/tests/test.cpp | 474 +++++++++++ xs/src/libslic3r/Fill/FillRectilinear3.cpp | 10 +- xs/src/libslic3r/Int128.hpp | 17 - xs/src/libslic3r/Model.cpp | 239 +++++- xs/src/libslic3r/Point.cpp | 17 + xs/src/libslic3r/Point.hpp | 11 + 36 files changed, 6087 insertions(+), 45 deletions(-) create mode 100644 xs/src/libnest2d/CMakeLists.txt create mode 100644 xs/src/libnest2d/LICENSE.txt create mode 100644 xs/src/libnest2d/README.md create mode 100644 xs/src/libnest2d/cmake_modules/DownloadProject.CMakeLists.cmake.in create mode 100644 xs/src/libnest2d/cmake_modules/DownloadProject.cmake create mode 100644 xs/src/libnest2d/cmake_modules/FindClipper.cmake create mode 100644 xs/src/libnest2d/libnest2d.h create mode 100644 xs/src/libnest2d/libnest2d/boost_alg.hpp create mode 100644 xs/src/libnest2d/libnest2d/clipper_backend/CMakeLists.txt create mode 100644 xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.cpp create mode 100644 xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp create mode 100644 xs/src/libnest2d/libnest2d/common.hpp create mode 100644 xs/src/libnest2d/libnest2d/geometries_io.hpp create mode 100644 xs/src/libnest2d/libnest2d/geometries_nfp.hpp create mode 100644 xs/src/libnest2d/libnest2d/geometry_traits.hpp create mode 100644 xs/src/libnest2d/libnest2d/libnest2d.hpp create mode 100644 xs/src/libnest2d/libnest2d/placers/bottomleftplacer.hpp create mode 100644 xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp create mode 100644 xs/src/libnest2d/libnest2d/placers/placer_boilerplate.hpp create mode 100644 xs/src/libnest2d/libnest2d/selections/djd_heuristic.hpp create mode 100644 xs/src/libnest2d/libnest2d/selections/filler.hpp create mode 100644 xs/src/libnest2d/libnest2d/selections/firstfit.hpp create mode 100644 xs/src/libnest2d/libnest2d/selections/selection_boilerplate.hpp create mode 100644 xs/src/libnest2d/tests/CMakeLists.txt create mode 100644 xs/src/libnest2d/tests/benchmark.h create mode 100644 xs/src/libnest2d/tests/main.cpp create mode 100644 xs/src/libnest2d/tests/printer_parts.cpp create mode 100644 xs/src/libnest2d/tests/printer_parts.h create mode 100644 xs/src/libnest2d/tests/test.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index e8b2a6faa..db8c052fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,6 +49,8 @@ if(NOT DEFINED CMAKE_PREFIX_PATH) endif() endif() +enable_testing () + add_subdirectory(xs) get_filename_component(PERL_BIN_PATH "${PERL_EXECUTABLE}" DIRECTORY) @@ -63,7 +65,6 @@ else () set(PERL_PROVE "${PERL_BIN_PATH}/prove") endif () -enable_testing () add_test (NAME xs COMMAND "${PERL_EXECUTABLE}" ${PERL_PROVE} -I ${PROJECT_SOURCE_DIR}/local-lib/lib/perl5 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/xs) add_test (NAME integration COMMAND "${PERL_EXECUTABLE}" ${PERL_PROVE} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) diff --git a/xs/CMakeLists.txt b/xs/CMakeLists.txt index 4f44fc7bf..fc8dab883 100644 --- a/xs/CMakeLists.txt +++ b/xs/CMakeLists.txt @@ -679,6 +679,35 @@ add_custom_target(pot COMMENT "Generate pot file from strings in the source tree" ) +# ############################################################################## +# Adding libnest2d project for bin packing... +# ############################################################################## + +set(LIBNEST2D_UNITTESTS ON CACHE BOOL "Force generating unittests for libnest2d") + +if(LIBNEST2D_UNITTESTS) + # If we want the libnest2d unit tests we need to build and executable with + # all the libslic3r dependencies. This is needed because the clipper library + # in the slic3r project is hacked so that it depends on the slic3r sources. + # Unfortunately, this implies that the test executable is also dependent on + # the libslic3r target. + +# add_library(libslic3r_standalone STATIC ${LIBDIR}/libslic3r/utils.cpp) +# set(LIBNEST2D_TEST_LIBRARIES +# libslic3r libslic3r_standalone nowide libslic3r_gui admesh miniz +# ${Boost_LIBRARIES} clipper ${EXPAT_LIBRARIES} ${GLEW_LIBRARIES} +# polypartition poly2tri ${TBB_LIBRARIES} ${wxWidgets_LIBRARIES} +# ${CURL_LIBRARIES} +# ) +endif() + +add_subdirectory(${LIBDIR}/libnest2d) +target_include_directories(libslic3r PUBLIC BEFORE ${LIBNEST2D_INCLUDES}) + +# Add the binpack2d main sources and link them to libslic3r +target_link_libraries(libslic3r libnest2d) +# ############################################################################## + # Installation install(TARGETS XS DESTINATION ${PERL_VENDORARCH}/auto/Slic3r/XS) install(FILES lib/Slic3r/XS.pm DESTINATION ${PERL_VENDORLIB}/Slic3r) diff --git a/xs/src/libnest2d/CMakeLists.txt b/xs/src/libnest2d/CMakeLists.txt new file mode 100644 index 000000000..568d1a5a9 --- /dev/null +++ b/xs/src/libnest2d/CMakeLists.txt @@ -0,0 +1,81 @@ +cmake_minimum_required(VERSION 2.8) + +project(Libnest2D) + +enable_testing() + +if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) + # Update if necessary +# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -pedantic") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long ") +endif() + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED) + +# Add our own cmake module path. +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/) + +option(LIBNEST2D_UNITTESTS "If enabled, googletest framework will be downloaded + and the provided unit tests will be included in the build." OFF) + +#set(LIBNEST2D_GEOMETRIES_TARGET "" CACHE STRING +# "Build libnest2d with geometry classes implemented by the chosen target.") + +#set(libnest2D_TEST_LIBRARIES "" CACHE STRING +# "Libraries needed to compile the test executable for libnest2d.") + + +set(LIBNEST2D_SRCFILES + libnest2d/libnest2d.hpp # Templates only + libnest2d.h # Exports ready made types using template arguments + libnest2d/geometry_traits.hpp + libnest2d/geometries_io.hpp + libnest2d/common.hpp + libnest2d/placers/placer_boilerplate.hpp + libnest2d/placers/bottomleftplacer.hpp + libnest2d/placers/nfpplacer.hpp + libnest2d/geometries_nfp.hpp + libnest2d/selections/selection_boilerplate.hpp + libnest2d/selections/filler.hpp + libnest2d/selections/firstfit.hpp + libnest2d/selections/djd_heuristic.hpp + ) + +if((NOT LIBNEST2D_GEOMETRIES_TARGET) OR (LIBNEST2D_GEOMETRIES_TARGET STREQUAL "")) + message(STATUS "libnest2D backend is default") + + if(NOT Boost_INCLUDE_DIRS_FOUND) + find_package(Boost REQUIRED) + # TODO automatic download of boost geometry headers + endif() + + add_subdirectory(libnest2d/clipper_backend) + + set(LIBNEST2D_GEOMETRIES_TARGET ${CLIPPER_LIBRARIES}) + + include_directories(BEFORE ${CLIPPER_INCLUDE_DIRS}) + include_directories(${Boost_INCLUDE_DIRS}) + + list(APPEND LIBNEST2D_SRCFILES libnest2d/clipper_backend/clipper_backend.cpp + libnest2d/clipper_backend/clipper_backend.hpp + libnest2d/boost_alg.hpp) + +else() + message(STATUS "Libnest2D backend is: ${LIBNEST2D_GEOMETRIES_TARGET}") +endif() + +add_library(libnest2d STATIC ${LIBNEST2D_SRCFILES} ) +target_link_libraries(libnest2d ${LIBNEST2D_GEOMETRIES_TARGET}) +target_include_directories(libnest2d PUBLIC ${CMAKE_SOURCE_DIR}) + +set(LIBNEST2D_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}) + +get_directory_property(hasParent PARENT_DIRECTORY) +if(hasParent) + set(LIBNEST2D_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE) +endif() + +if(LIBNEST2D_UNITTESTS) + add_subdirectory(tests) +endif() diff --git a/xs/src/libnest2d/LICENSE.txt b/xs/src/libnest2d/LICENSE.txt new file mode 100644 index 000000000..dba13ed2d --- /dev/null +++ b/xs/src/libnest2d/LICENSE.txt @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/xs/src/libnest2d/README.md b/xs/src/libnest2d/README.md new file mode 100644 index 000000000..f2182d649 --- /dev/null +++ b/xs/src/libnest2d/README.md @@ -0,0 +1,36 @@ +# Introduction + +Libnest2D is a library and framework for the 2D bin packaging problem. +Inspired from the [SVGNest](svgnest.com) Javascript library the project is is +built from scratch in C++11. The library is written with a policy that it should +be usable out of the box with a very simple interface but has to be customizable +to the very core as well. This has led to a design where the algorithms are +defined in a header only fashion with template only geometry types. These +geometries can have custom or already existing implementation to avoid copying +or having unnecessary dependencies. + +A default backend is provided if a user just wants to use the library out of the +box without implementing the interface of these geometry types. The default +backend is built on top of boost geometry and the +[polyclipping](http://www.angusj.com/delphi/clipper.php) library and implies the +dependency on these packages as well as the compilation of the backend (although +I may find a solution in the future to make the backend header only as well). + +This software is currently under heavy construction and lacks a throughout +documentation and some essential algorithms as well. At this point a fairly +untested version of the DJD selection heuristic is working with a bottom-left +placing strategy which may produce usable arrangements in most cases. + +The no-fit polygon based placement strategy will be implemented in the very near +future which should produce high quality results for convex and non convex +polygons with holes as well. + +# References +- [SVGNest](https://github.com/Jack000/SVGnest) +- [An effective heuristic for the two-dimensional irregular +bin packing problem](http://www.cs.stir.ac.uk/~goc/papers/EffectiveHueristic2DAOR2013.pdf) +- [Complete and robust no-fit polygon generation for the irregular stock cutting problem](https://www.sciencedirect.com/science/article/abs/pii/S0377221706001639) +- [Applying Meta-Heuristic Algorithms to the Nesting +Problem Utilising the No Fit Polygon](http://www.graham-kendall.com/papers/k2001.pdf) +- [A comprehensive and robust procedure for obtaining the nofit polygon +using Minkowski sums](https://www.sciencedirect.com/science/article/pii/S0305054806000669) \ No newline at end of file diff --git a/xs/src/libnest2d/cmake_modules/DownloadProject.CMakeLists.cmake.in b/xs/src/libnest2d/cmake_modules/DownloadProject.CMakeLists.cmake.in new file mode 100644 index 000000000..d5cf3c1d9 --- /dev/null +++ b/xs/src/libnest2d/cmake_modules/DownloadProject.CMakeLists.cmake.in @@ -0,0 +1,17 @@ +# Distributed under the OSI-approved MIT License. See accompanying +# file LICENSE or https://github.com/Crascit/DownloadProject for details. + +cmake_minimum_required(VERSION 2.8.2) + +project(${DL_ARGS_PROJ}-download NONE) + +include(ExternalProject) +ExternalProject_Add(${DL_ARGS_PROJ}-download + ${DL_ARGS_UNPARSED_ARGUMENTS} + SOURCE_DIR "${DL_ARGS_SOURCE_DIR}" + BINARY_DIR "${DL_ARGS_BINARY_DIR}" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" +) \ No newline at end of file diff --git a/xs/src/libnest2d/cmake_modules/DownloadProject.cmake b/xs/src/libnest2d/cmake_modules/DownloadProject.cmake new file mode 100644 index 000000000..1709e09ad --- /dev/null +++ b/xs/src/libnest2d/cmake_modules/DownloadProject.cmake @@ -0,0 +1,182 @@ +# Distributed under the OSI-approved MIT License. See accompanying +# file LICENSE or https://github.com/Crascit/DownloadProject for details. +# +# MODULE: DownloadProject +# +# PROVIDES: +# download_project( PROJ projectName +# [PREFIX prefixDir] +# [DOWNLOAD_DIR downloadDir] +# [SOURCE_DIR srcDir] +# [BINARY_DIR binDir] +# [QUIET] +# ... +# ) +# +# Provides the ability to download and unpack a tarball, zip file, git repository, +# etc. at configure time (i.e. when the cmake command is run). How the downloaded +# and unpacked contents are used is up to the caller, but the motivating case is +# to download source code which can then be included directly in the build with +# add_subdirectory() after the call to download_project(). Source and build +# directories are set up with this in mind. +# +# The PROJ argument is required. The projectName value will be used to construct +# the following variables upon exit (obviously replace projectName with its actual +# value): +# +# projectName_SOURCE_DIR +# projectName_BINARY_DIR +# +# The SOURCE_DIR and BINARY_DIR arguments are optional and would not typically +# need to be provided. They can be specified if you want the downloaded source +# and build directories to be located in a specific place. The contents of +# projectName_SOURCE_DIR and projectName_BINARY_DIR will be populated with the +# locations used whether you provide SOURCE_DIR/BINARY_DIR or not. +# +# The DOWNLOAD_DIR argument does not normally need to be set. It controls the +# location of the temporary CMake build used to perform the download. +# +# The PREFIX argument can be provided to change the base location of the default +# values of DOWNLOAD_DIR, SOURCE_DIR and BINARY_DIR. If all of those three arguments +# are provided, then PREFIX will have no effect. The default value for PREFIX is +# CMAKE_BINARY_DIR. +# +# The QUIET option can be given if you do not want to show the output associated +# with downloading the specified project. +# +# In addition to the above, any other options are passed through unmodified to +# ExternalProject_Add() to perform the actual download, patch and update steps. +# The following ExternalProject_Add() options are explicitly prohibited (they +# are reserved for use by the download_project() command): +# +# CONFIGURE_COMMAND +# BUILD_COMMAND +# INSTALL_COMMAND +# TEST_COMMAND +# +# Only those ExternalProject_Add() arguments which relate to downloading, patching +# and updating of the project sources are intended to be used. Also note that at +# least one set of download-related arguments are required. +# +# If using CMake 3.2 or later, the UPDATE_DISCONNECTED option can be used to +# prevent a check at the remote end for changes every time CMake is run +# after the first successful download. See the documentation of the ExternalProject +# module for more information. It is likely you will want to use this option if it +# is available to you. Note, however, that the ExternalProject implementation contains +# bugs which result in incorrect handling of the UPDATE_DISCONNECTED option when +# using the URL download method or when specifying a SOURCE_DIR with no download +# method. Fixes for these have been created, the last of which is scheduled for +# inclusion in CMake 3.8.0. Details can be found here: +# +# https://gitlab.kitware.com/cmake/cmake/commit/bdca68388bd57f8302d3c1d83d691034b7ffa70c +# https://gitlab.kitware.com/cmake/cmake/issues/16428 +# +# If you experience build errors related to the update step, consider avoiding +# the use of UPDATE_DISCONNECTED. +# +# EXAMPLE USAGE: +# +# include(DownloadProject) +# download_project(PROJ googletest +# GIT_REPOSITORY https://github.com/google/googletest.git +# GIT_TAG master +# UPDATE_DISCONNECTED 1 +# QUIET +# ) +# +# add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR}) +# +#======================================================================================== + + +set(_DownloadProjectDir "${CMAKE_CURRENT_LIST_DIR}") + +include(CMakeParseArguments) + +function(download_project) + + set(options QUIET) + set(oneValueArgs + PROJ + PREFIX + DOWNLOAD_DIR + SOURCE_DIR + BINARY_DIR + # Prevent the following from being passed through + CONFIGURE_COMMAND + BUILD_COMMAND + INSTALL_COMMAND + TEST_COMMAND + ) + set(multiValueArgs "") + + cmake_parse_arguments(DL_ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + # Hide output if requested + if (DL_ARGS_QUIET) + set(OUTPUT_QUIET "OUTPUT_QUIET") + else() + unset(OUTPUT_QUIET) + message(STATUS "Downloading/updating ${DL_ARGS_PROJ}") + endif() + + # Set up where we will put our temporary CMakeLists.txt file and also + # the base point below which the default source and binary dirs will be. + # The prefix must always be an absolute path. + if (NOT DL_ARGS_PREFIX) + set(DL_ARGS_PREFIX "${CMAKE_BINARY_DIR}") + else() + get_filename_component(DL_ARGS_PREFIX "${DL_ARGS_PREFIX}" ABSOLUTE + BASE_DIR "${CMAKE_CURRENT_BINARY_DIR}") + endif() + if (NOT DL_ARGS_DOWNLOAD_DIR) + set(DL_ARGS_DOWNLOAD_DIR "${DL_ARGS_PREFIX}/${DL_ARGS_PROJ}-download") + endif() + + # Ensure the caller can know where to find the source and build directories + if (NOT DL_ARGS_SOURCE_DIR) + set(DL_ARGS_SOURCE_DIR "${DL_ARGS_PREFIX}/${DL_ARGS_PROJ}-src") + endif() + if (NOT DL_ARGS_BINARY_DIR) + set(DL_ARGS_BINARY_DIR "${DL_ARGS_PREFIX}/${DL_ARGS_PROJ}-build") + endif() + set(${DL_ARGS_PROJ}_SOURCE_DIR "${DL_ARGS_SOURCE_DIR}" PARENT_SCOPE) + set(${DL_ARGS_PROJ}_BINARY_DIR "${DL_ARGS_BINARY_DIR}" PARENT_SCOPE) + + # The way that CLion manages multiple configurations, it causes a copy of + # the CMakeCache.txt to be copied across due to it not expecting there to + # be a project within a project. This causes the hard-coded paths in the + # cache to be copied and builds to fail. To mitigate this, we simply + # remove the cache if it exists before we configure the new project. It + # is safe to do so because it will be re-generated. Since this is only + # executed at the configure step, it should not cause additional builds or + # downloads. + file(REMOVE "${DL_ARGS_DOWNLOAD_DIR}/CMakeCache.txt") + + # Create and build a separate CMake project to carry out the download. + # If we've already previously done these steps, they will not cause + # anything to be updated, so extra rebuilds of the project won't occur. + # Make sure to pass through CMAKE_MAKE_PROGRAM in case the main project + # has this set to something not findable on the PATH. + configure_file("${_DownloadProjectDir}/DownloadProject.CMakeLists.cmake.in" + "${DL_ARGS_DOWNLOAD_DIR}/CMakeLists.txt") + execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" + -D "CMAKE_MAKE_PROGRAM:FILE=${CMAKE_MAKE_PROGRAM}" + . + RESULT_VARIABLE result + ${OUTPUT_QUIET} + WORKING_DIRECTORY "${DL_ARGS_DOWNLOAD_DIR}" + ) + if(result) + message(FATAL_ERROR "CMake step for ${DL_ARGS_PROJ} failed: ${result}") + endif() + execute_process(COMMAND ${CMAKE_COMMAND} --build . + RESULT_VARIABLE result + ${OUTPUT_QUIET} + WORKING_DIRECTORY "${DL_ARGS_DOWNLOAD_DIR}" + ) + if(result) + message(FATAL_ERROR "Build step for ${DL_ARGS_PROJ} failed: ${result}") + endif() + +endfunction() \ No newline at end of file diff --git a/xs/src/libnest2d/cmake_modules/FindClipper.cmake b/xs/src/libnest2d/cmake_modules/FindClipper.cmake new file mode 100644 index 000000000..ad4460c35 --- /dev/null +++ b/xs/src/libnest2d/cmake_modules/FindClipper.cmake @@ -0,0 +1,46 @@ +# Find Clipper library (http://www.angusj.com/delphi/clipper.php). +# The following variables are set +# +# CLIPPER_FOUND +# CLIPPER_INCLUDE_DIRS +# CLIPPER_LIBRARIES +# +# It searches the environment variable $CLIPPER_PATH automatically. + +FIND_PATH(CLIPPER_INCLUDE_DIRS clipper.hpp + $ENV{CLIPPER_PATH} + $ENV{CLIPPER_PATH}/cpp/ + $ENV{CLIPPER_PATH}/include/ + $ENV{CLIPPER_PATH}/include/polyclipping/ + ${PROJECT_SOURCE_DIR}/python/pymesh/third_party/include/ + ${PROJECT_SOURCE_DIR}/python/pymesh/third_party/include/polyclipping/ + /opt/local/include/ + /opt/local/include/polyclipping/ + /usr/local/include/ + /usr/local/include/polyclipping/ + /usr/include + /usr/include/polyclipping/) + +FIND_LIBRARY(CLIPPER_LIBRARIES polyclipping + $ENV{CLIPPER_PATH} + $ENV{CLIPPER_PATH}/cpp/ + $ENV{CLIPPER_PATH}/cpp/build/ + $ENV{CLIPPER_PATH}/lib/ + $ENV{CLIPPER_PATH}/lib/polyclipping/ + ${PROJECT_SOURCE_DIR}/python/pymesh/third_party/lib/ + ${PROJECT_SOURCE_DIR}/python/pymesh/third_party/lib/polyclipping/ + /opt/local/lib/ + /opt/local/lib/polyclipping/ + /usr/local/lib/ + /usr/local/lib/polyclipping/ + /usr/lib/polyclipping) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Clipper + "Clipper library cannot be found. Consider set CLIPPER_PATH environment variable" + CLIPPER_INCLUDE_DIRS + CLIPPER_LIBRARIES) + +MARK_AS_ADVANCED( + CLIPPER_INCLUDE_DIRS + CLIPPER_LIBRARIES) \ No newline at end of file diff --git a/xs/src/libnest2d/libnest2d.h b/xs/src/libnest2d/libnest2d.h new file mode 100644 index 000000000..dcdb812dc --- /dev/null +++ b/xs/src/libnest2d/libnest2d.h @@ -0,0 +1,37 @@ +#ifndef LIBNEST2D_H +#define LIBNEST2D_H + +// The type of backend should be set conditionally by the cmake configuriation +// for now we set it statically to clipper backend +#include + +#include +#include +#include +#include +#include +#include + +namespace libnest2d { + +using Point = PointImpl; +using Coord = TCoord; +using Box = _Box; +using Segment = _Segment; + +using Item = _Item; +using Rectangle = _Rectangle; + +using PackGroup = _PackGroup; +using IndexedPackGroup = _IndexedPackGroup; + +using FillerSelection = strategies::_FillerSelection; +using FirstFitSelection = strategies::_FirstFitSelection; +using DJDHeuristic = strategies::_DJDHeuristic; + +using BottomLeftPlacer = strategies::_BottomLeftPlacer; +using NofitPolyPlacer = strategies::_NofitPolyPlacer; + +} + +#endif // LIBNEST2D_H diff --git a/xs/src/libnest2d/libnest2d/boost_alg.hpp b/xs/src/libnest2d/libnest2d/boost_alg.hpp new file mode 100644 index 000000000..5f1c2806f --- /dev/null +++ b/xs/src/libnest2d/libnest2d/boost_alg.hpp @@ -0,0 +1,431 @@ +#ifndef BOOST_ALG_HPP +#define BOOST_ALG_HPP + +#ifndef DISABLE_BOOST_SERIALIZE + #include +#endif + +#include + +// this should be removed to not confuse the compiler +// #include + +namespace bp2d { + +using libnest2d::TCoord; +using libnest2d::PointImpl; +using Coord = TCoord; +using libnest2d::PolygonImpl; +using libnest2d::PathImpl; +using libnest2d::Orientation; +using libnest2d::OrientationType; +using libnest2d::getX; +using libnest2d::getY; +using libnest2d::setX; +using libnest2d::setY; +using Box = libnest2d::_Box; +using Segment = libnest2d::_Segment; + +} + +/** + * We have to make all the binpack2d geometry types available to boost. The real + * models of the geometries remain the same if a conforming model for binpack2d + * was defined by the library client. Boost is used only as an optional + * implementer of some algorithms that can be implemented by the model itself + * if a faster alternative exists. + * + * However, boost has its own type traits and we have to define the needed + * specializations to be able to use boost::geometry. This can be done with the + * already provided model. + */ +namespace boost { +namespace geometry { +namespace traits { + +/* ************************************************************************** */ +/* Point concept adaptaion ************************************************** */ +/* ************************************************************************** */ + +template<> struct tag { + using type = point_tag; +}; + +template<> struct coordinate_type { + using type = bp2d::Coord; +}; + +template<> struct coordinate_system { + using type = cs::cartesian; +}; + +template<> struct dimension: boost::mpl::int_<2> {}; + +template<> +struct access { + static inline bp2d::Coord get(bp2d::PointImpl const& a) { + return libnest2d::getX(a); + } + + static inline void set(bp2d::PointImpl& a, + bp2d::Coord const& value) { + libnest2d::setX(a, value); + } +}; + +template<> +struct access { + static inline bp2d::Coord get(bp2d::PointImpl const& a) { + return libnest2d::getY(a); + } + + static inline void set(bp2d::PointImpl& a, + bp2d::Coord const& value) { + libnest2d::setY(a, value); + } +}; + + +/* ************************************************************************** */ +/* Box concept adaptaion **************************************************** */ +/* ************************************************************************** */ + +template<> struct tag { + using type = box_tag; +}; + +template<> struct point_type { + using type = bp2d::PointImpl; +}; + +template<> struct indexed_access { + static inline bp2d::Coord get(bp2d::Box const& box) { + return bp2d::getX(box.minCorner()); + } + static inline void set(bp2d::Box &box, bp2d::Coord const& coord) { + bp2d::setX(box.minCorner(), coord); + } +}; + +template<> struct indexed_access { + static inline bp2d::Coord get(bp2d::Box const& box) { + return bp2d::getY(box.minCorner()); + } + static inline void set(bp2d::Box &box, bp2d::Coord const& coord) { + bp2d::setY(box.minCorner(), coord); + } +}; + +template<> struct indexed_access { + static inline bp2d::Coord get(bp2d::Box const& box) { + return bp2d::getX(box.maxCorner()); + } + static inline void set(bp2d::Box &box, bp2d::Coord const& coord) { + bp2d::setX(box.maxCorner(), coord); + } +}; + +template<> struct indexed_access { + static inline bp2d::Coord get(bp2d::Box const& box) { + return bp2d::getY(box.maxCorner()); + } + static inline void set(bp2d::Box &box, bp2d::Coord const& coord) { + bp2d::setY(box.maxCorner(), coord); + } +}; + +/* ************************************************************************** */ +/* Segement concept adaptaion *********************************************** */ +/* ************************************************************************** */ + +template<> struct tag { + using type = segment_tag; +}; + +template<> struct point_type { + using type = bp2d::PointImpl; +}; + +template<> struct indexed_access { + static inline bp2d::Coord get(bp2d::Segment const& seg) { + return bp2d::getX(seg.first()); + } + static inline void set(bp2d::Segment &seg, bp2d::Coord const& coord) { + bp2d::setX(seg.first(), coord); + } +}; + +template<> struct indexed_access { + static inline bp2d::Coord get(bp2d::Segment const& seg) { + return bp2d::getY(seg.first()); + } + static inline void set(bp2d::Segment &seg, bp2d::Coord const& coord) { + bp2d::setY(seg.first(), coord); + } +}; + +template<> struct indexed_access { + static inline bp2d::Coord get(bp2d::Segment const& seg) { + return bp2d::getX(seg.second()); + } + static inline void set(bp2d::Segment &seg, bp2d::Coord const& coord) { + bp2d::setX(seg.second(), coord); + } +}; + +template<> struct indexed_access { + static inline bp2d::Coord get(bp2d::Segment const& seg) { + return bp2d::getY(seg.second()); + } + static inline void set(bp2d::Segment &seg, bp2d::Coord const& coord) { + bp2d::setY(seg.second(), coord); + } +}; + + +/* ************************************************************************** */ +/* Polygon concept adaptaion ************************************************ */ +/* ************************************************************************** */ + +// Connversion between binpack2d::Orientation and order_selector /////////////// + +template struct ToBoostOrienation {}; + +template<> +struct ToBoostOrienation { + static const order_selector Value = clockwise; +}; + +template<> +struct ToBoostOrienation { + static const order_selector Value = counterclockwise; +}; + +static const bp2d::Orientation RealOrientation = + bp2d::OrientationType::Value; + +// Ring implementation ///////////////////////////////////////////////////////// + +// Boost would refer to ClipperLib::Path (alias bp2d::PolygonImpl) as a ring +template<> struct tag { + using type = ring_tag; +}; + +template<> struct point_order { + static const order_selector value = + ToBoostOrienation::Value; +}; + +// All our Paths should be closed for the bin packing application +template<> struct closure { + static const closure_selector value = closed; +}; + +// Polygon implementation ////////////////////////////////////////////////////// + +template<> struct tag { + using type = polygon_tag; +}; + +template<> struct exterior_ring { + static inline bp2d::PathImpl& get(bp2d::PolygonImpl& p) { + return libnest2d::ShapeLike::getContour(p); + } + + static inline bp2d::PathImpl const& get(bp2d::PolygonImpl const& p) { + return libnest2d::ShapeLike::getContour(p); + } +}; + +template<> struct ring_const_type { + using type = const bp2d::PathImpl&; +}; + +template<> struct ring_mutable_type { + using type = bp2d::PathImpl&; +}; + +template<> struct interior_const_type { + using type = const libnest2d::THolesContainer&; +}; + +template<> struct interior_mutable_type { + using type = libnest2d::THolesContainer&; +}; + +template<> +struct interior_rings { + + static inline libnest2d::THolesContainer& get( + bp2d::PolygonImpl& p) + { + return libnest2d::ShapeLike::holes(p); + } + + static inline const libnest2d::THolesContainer& get( + bp2d::PolygonImpl const& p) + { + return libnest2d::ShapeLike::holes(p); + } +}; + +} // traits +} // geometry + +// This is an addition to the ring implementation +template<> +struct range_value { + using type = bp2d::PointImpl; +}; + +} // boost + +namespace libnest2d { // Now the algorithms that boost can provide... + +template<> +inline double PointLike::distance(const PointImpl& p1, + const PointImpl& p2 ) +{ + return boost::geometry::distance(p1, p2); +} + +template<> +inline double PointLike::distance(const PointImpl& p, + const bp2d::Segment& seg ) +{ + return boost::geometry::distance(p, seg); +} + +// Tell binpack2d how to make string out of a ClipperPolygon object +template<> +inline bool ShapeLike::intersects(const PathImpl& sh1, + const PathImpl& sh2) +{ + return boost::geometry::intersects(sh1, sh2); +} + +// Tell binpack2d how to make string out of a ClipperPolygon object +template<> +inline bool ShapeLike::intersects(const PolygonImpl& sh1, + const PolygonImpl& sh2) { + return boost::geometry::intersects(sh1, sh2); +} + +// Tell binpack2d how to make string out of a ClipperPolygon object +template<> +inline bool ShapeLike::intersects(const bp2d::Segment& s1, + const bp2d::Segment& s2) { + return boost::geometry::intersects(s1, s2); +} + +#ifndef DISABLE_BOOST_AREA +template<> +inline double ShapeLike::area(const PolygonImpl& shape) { + return boost::geometry::area(shape); +} +#endif + +template<> +inline bool ShapeLike::isInside(const PointImpl& point, + const PolygonImpl& shape) +{ + return boost::geometry::within(point, shape); +} + +template<> +inline bool ShapeLike::isInside(const PolygonImpl& sh1, + const PolygonImpl& sh2) +{ + return boost::geometry::within(sh1, sh2); +} + +template<> +inline bool ShapeLike::touches( const PolygonImpl& sh1, + const PolygonImpl& sh2) +{ + return boost::geometry::touches(sh1, sh2); +} + +template<> +inline bp2d::Box ShapeLike::boundingBox(const PolygonImpl& sh) { + bp2d::Box b; + boost::geometry::envelope(sh, b); + return b; +} + +template<> +inline void ShapeLike::rotate(PolygonImpl& sh, const Radians& rads) { + namespace trans = boost::geometry::strategy::transform; + + PolygonImpl cpy = sh; + + trans::rotate_transformer + rotate(rads); + boost::geometry::transform(cpy, sh, rotate); +} + +template<> +inline void ShapeLike::translate(PolygonImpl& sh, const PointImpl& offs) { + namespace trans = boost::geometry::strategy::transform; + + PolygonImpl cpy = sh; + trans::translate_transformer translate( + bp2d::getX(offs), bp2d::getY(offs)); + + boost::geometry::transform(cpy, sh, translate); +} + +#ifndef DISABLE_BOOST_OFFSET +template<> +inline void ShapeLike::offset(PolygonImpl& sh, bp2d::Coord distance) { + PolygonImpl cpy = sh; + boost::geometry::buffer(cpy, sh, distance); +} +#endif + +#ifndef DISABLE_BOOST_MINKOWSKI_ADD +template<> +inline PolygonImpl& Nfp::minkowskiAdd(PolygonImpl& sh, + const PolygonImpl& /*other*/) { + return sh; +} +#endif + +#ifndef DISABLE_BOOST_SERIALIZE +template<> +inline std::string ShapeLike::serialize( + const PolygonImpl& sh) +{ + + std::stringstream ss; + std::string style = "fill: orange; stroke: black; stroke-width: 1px;"; + auto svg_data = boost::geometry::svg(sh, style); + + ss << svg_data << std::endl; + + return ss.str(); +} +#endif + +#ifndef DISABLE_BOOST_UNSERIALIZE +template<> +inline void ShapeLike::unserialize( + PolygonImpl& sh, + const std::string& str) +{ +} +#endif + +template<> inline std::pair +ShapeLike::isValid(const PolygonImpl& sh) { + std::string message; + bool ret = boost::geometry::is_valid(sh, message); + + return {ret, message}; +} + +} + + + +#endif // BOOST_ALG_HPP diff --git a/xs/src/libnest2d/libnest2d/clipper_backend/CMakeLists.txt b/xs/src/libnest2d/libnest2d/clipper_backend/CMakeLists.txt new file mode 100644 index 000000000..9e6a48cf6 --- /dev/null +++ b/xs/src/libnest2d/libnest2d/clipper_backend/CMakeLists.txt @@ -0,0 +1,48 @@ +if(NOT TARGET clipper) # If there is a clipper target in the parent project we are good to go. + + find_package(Clipper QUIET) + + if(NOT CLIPPER_FOUND) + find_package(Subversion QUIET) + if(Subversion_FOUND) + message(STATUS "Clipper not found so it will be downloaded.") + # Silently download and build the library in the build dir + + if (CMAKE_VERSION VERSION_LESS 3.2) + set(UPDATE_DISCONNECTED_IF_AVAILABLE "") + else() + set(UPDATE_DISCONNECTED_IF_AVAILABLE "UPDATE_DISCONNECTED 1") + endif() + + include(DownloadProject) + download_project( PROJ clipper_library + SVN_REPOSITORY https://svn.code.sf.net/p/polyclipping/code/trunk/cpp + SVN_REVISION -r540 + #SOURCE_SUBDIR cpp + INSTALL_COMMAND "" + CONFIGURE_COMMAND "" # Not working, I will just add the source files + ${UPDATE_DISCONNECTED_IF_AVAILABLE} + ) + + # This is not working and I dont have time to fix it + # add_subdirectory(${clipper_library_SOURCE_DIR}/cpp + # ${clipper_library_BINARY_DIR} + # ) + + add_library(clipper_lib STATIC + ${clipper_library_SOURCE_DIR}/clipper.cpp + ${clipper_library_SOURCE_DIR}/clipper.hpp) + + set(CLIPPER_INCLUDE_DIRS ${clipper_library_SOURCE_DIR} + PARENT_SCOPE) + + set(CLIPPER_LIBRARIES clipper_lib PARENT_SCOPE) + + else() + message(FATAL_ERROR "Can't find clipper library and no SVN client found to download. + You can download the clipper sources and define a clipper target in your project, that will work for libnest2d.") + endif() + endif() +else() + set(CLIPPER_LIBRARIES clipper PARENT_SCOPE) +endif() diff --git a/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.cpp b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.cpp new file mode 100644 index 000000000..08b095087 --- /dev/null +++ b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.cpp @@ -0,0 +1,77 @@ +#include "clipper_backend.hpp" + +namespace libnest2d { + +namespace { +class HoleCache { + friend struct libnest2d::ShapeLike; + + std::unordered_map< const PolygonImpl*, ClipperLib::Paths> map; + + ClipperLib::Paths& _getHoles(const PolygonImpl* p) { + ClipperLib::Paths& paths = map[p]; + + if(paths.size() != p->Childs.size()) { + paths.reserve(p->Childs.size()); + + for(auto np : p->Childs) { + paths.emplace_back(np->Contour); + } + } + + return paths; + } + + ClipperLib::Paths& getHoles(PolygonImpl& p) { + return _getHoles(&p); + } + + const ClipperLib::Paths& getHoles(const PolygonImpl& p) { + return _getHoles(&p); + } +}; +} + +HoleCache holeCache; + +template<> +std::string ShapeLike::toString(const PolygonImpl& sh) +{ + std::stringstream ss; + + for(auto p : sh.Contour) { + ss << p.X << " " << p.Y << "\n"; + } + + return ss.str(); +} + +template<> PolygonImpl ShapeLike::create( std::initializer_list< PointImpl > il) +{ + PolygonImpl p; + p.Contour = il; + + // Expecting that the coordinate system Y axis is positive in upwards + // direction + if(ClipperLib::Orientation(p.Contour)) { + // Not clockwise then reverse the b*tch + ClipperLib::ReversePath(p.Contour); + } + + return p; +} + +template<> +const THolesContainer& ShapeLike::holes( + const PolygonImpl& sh) +{ + return holeCache.getHoles(sh); +} + +template<> +THolesContainer& ShapeLike::holes(PolygonImpl& sh) { + return holeCache.getHoles(sh); +} + +} + diff --git a/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp new file mode 100644 index 000000000..92a806727 --- /dev/null +++ b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp @@ -0,0 +1,240 @@ +#ifndef CLIPPER_BACKEND_HPP +#define CLIPPER_BACKEND_HPP + +#include +#include +#include + +#include + +#include "../geometry_traits.hpp" +#include "../geometries_nfp.hpp" + +#include + +namespace libnest2d { + +// Aliases for convinience +using PointImpl = ClipperLib::IntPoint; +using PolygonImpl = ClipperLib::PolyNode; +using PathImpl = ClipperLib::Path; + +inline PointImpl& operator +=(PointImpl& p, const PointImpl& pa ) { + p.X += pa.X; + p.Y += pa.Y; + return p; +} + +inline PointImpl operator+(const PointImpl& p1, const PointImpl& p2) { + PointImpl ret = p1; + ret += p2; + return ret; +} + +inline PointImpl& operator -=(PointImpl& p, const PointImpl& pa ) { + p.X -= pa.X; + p.Y -= pa.Y; + return p; +} + +inline PointImpl operator-(const PointImpl& p1, const PointImpl& p2) { + PointImpl ret = p1; + ret -= p2; + return ret; +} + +//extern HoleCache holeCache; + +// Type of coordinate units used by Clipper +template<> struct CoordType { + using Type = ClipperLib::cInt; +}; + +// Type of point used by Clipper +template<> struct PointType { + using Type = PointImpl; +}; + +// Type of vertex iterator used by Clipper +template<> struct VertexIteratorType { + using Type = ClipperLib::Path::iterator; +}; + +// Type of vertex iterator used by Clipper +template<> struct VertexConstIteratorType { + using Type = ClipperLib::Path::const_iterator; +}; + +template<> struct CountourType { + using Type = PathImpl; +}; + +// Tell binpack2d how to extract the X coord from a ClipperPoint object +template<> inline TCoord PointLike::x(const PointImpl& p) +{ + return p.X; +} + +// Tell binpack2d how to extract the Y coord from a ClipperPoint object +template<> inline TCoord PointLike::y(const PointImpl& p) +{ + return p.Y; +} + +// Tell binpack2d how to extract the X coord from a ClipperPoint object +template<> inline TCoord& PointLike::x(PointImpl& p) +{ + return p.X; +} + +// Tell binpack2d how to extract the Y coord from a ClipperPoint object +template<> +inline TCoord& PointLike::y(PointImpl& p) +{ + return p.Y; +} + +template<> +inline void ShapeLike::reserve(PolygonImpl& sh, unsigned long vertex_capacity) +{ + return sh.Contour.reserve(vertex_capacity); +} + +// Tell binpack2d how to make string out of a ClipperPolygon object +template<> +inline double ShapeLike::area(const PolygonImpl& sh) { + #define DISABLE_BOOST_AREA + double ret = ClipperLib::Area(sh.Contour); +// if(OrientationType::Value == Orientation::COUNTER_CLOCKWISE) +// ret = -ret; + return ret; +} + +template<> +inline void ShapeLike::offset(PolygonImpl& sh, TCoord distance) { + #define DISABLE_BOOST_OFFSET + + using ClipperLib::ClipperOffset; + using ClipperLib::jtMiter; + using ClipperLib::etClosedPolygon; + using ClipperLib::Paths; + + ClipperOffset offs; + Paths result; + offs.AddPath(sh.Contour, jtMiter, etClosedPolygon); + offs.Execute(result, static_cast(distance)); + + // I dont know why does the offsetting revert the orientation and + // it removes the last vertex as well so boost will not have a closed + // polygon + + assert(result.size() == 1); + sh.Contour = result.front(); + + // recreate closed polygon + sh.Contour.push_back(sh.Contour.front()); + + if(ClipperLib::Orientation(sh.Contour)) { + // Not clockwise then reverse the b*tch + ClipperLib::ReversePath(sh.Contour); + } + +} + +template<> +inline PolygonImpl& Nfp::minkowskiAdd(PolygonImpl& sh, + const PolygonImpl& other) +{ + #define DISABLE_BOOST_MINKOWSKI_ADD + + ClipperLib::Paths solution; + + ClipperLib::MinkowskiSum(sh.Contour, other.Contour, solution, true); + + assert(solution.size() == 1); + + sh.Contour = solution.front(); + + return sh; +} + +// Tell binpack2d how to make string out of a ClipperPolygon object +template<> std::string ShapeLike::toString(const PolygonImpl& sh); + +template<> +inline TVertexIterator ShapeLike::begin(PolygonImpl& sh) +{ + return sh.Contour.begin(); +} + +template<> +inline TVertexIterator ShapeLike::end(PolygonImpl& sh) +{ + return sh.Contour.end(); +} + +template<> +inline TVertexConstIterator ShapeLike::cbegin( + const PolygonImpl& sh) +{ + return sh.Contour.cbegin(); +} + +template<> +inline TVertexConstIterator ShapeLike::cend( + const PolygonImpl& sh) +{ + return sh.Contour.cend(); +} + +template<> struct HolesContainer { + using Type = ClipperLib::Paths; +}; + +template<> +PolygonImpl ShapeLike::create( std::initializer_list< PointImpl > il); + +template<> +const THolesContainer& ShapeLike::holes( + const PolygonImpl& sh); + +template<> +THolesContainer& ShapeLike::holes(PolygonImpl& sh); + +template<> +inline TCountour& ShapeLike::getHole(PolygonImpl& sh, + unsigned long idx) +{ + return sh.Childs[idx]->Contour; +} + +template<> +inline const TCountour& ShapeLike::getHole(const PolygonImpl& sh, + unsigned long idx) { + return sh.Childs[idx]->Contour; +} + +template<> +inline size_t ShapeLike::holeCount(const PolygonImpl& sh) { + return sh.Childs.size(); +} + +template<> +inline PathImpl& ShapeLike::getContour(PolygonImpl& sh) { + return sh.Contour; +} + +template<> +inline const PathImpl& ShapeLike::getContour(const PolygonImpl& sh) { + return sh.Contour; +} + +} + +//#define DISABLE_BOOST_SERIALIZE +//#define DISABLE_BOOST_UNSERIALIZE + +// All other operators and algorithms are implemented with boost +#include "../boost_alg.hpp" + +#endif // CLIPPER_BACKEND_HPP diff --git a/xs/src/libnest2d/libnest2d/common.hpp b/xs/src/libnest2d/libnest2d/common.hpp new file mode 100644 index 000000000..6e6174352 --- /dev/null +++ b/xs/src/libnest2d/libnest2d/common.hpp @@ -0,0 +1,94 @@ +#ifndef LIBNEST2D_CONFIG_HPP +#define LIBNEST2D_CONFIG_HPP + +#if defined(_MSC_VER) && _MSC_VER <= 1800 || __cplusplus < 201103L + #define BP2D_NOEXCEPT + #define BP2D_CONSTEXPR +#elif __cplusplus >= 201103L + #define BP2D_NOEXCEPT noexcept + #define BP2D_CONSTEXPR constexpr +#endif + +#include +#include +#include + +namespace libnest2d { + +template< class T > +struct remove_cvref { + using type = typename std::remove_cv< + typename std::remove_reference::type>::type; +}; + +template< class T > +using remove_cvref_t = typename remove_cvref::type; + +template +using enable_if_t = typename std::enable_if::type; + +/** + * A useful little tool for triggering static_assert error messages e.g. when + * a mandatory template specialization (implementation) is missing. + * + * \tparam T A template argument that may come from and outer template method. + */ +template struct always_false { enum { value = false }; }; + +const auto BP2D_CONSTEXPR Pi = 3.141592653589793238463; // 2*std::acos(0); + +/** + * @brief Only for the Radian and Degrees classes to behave as doubles. + */ +class Double { + double val_; +public: + Double(): val_(double{}) { } + Double(double d) : val_(d) { } + + operator double() const BP2D_NOEXCEPT { return val_; } + operator double&() BP2D_NOEXCEPT { return val_; } +}; + +class Degrees; + +/** + * @brief Data type representing radians. It supports conversion to degrees. + */ +class Radians: public Double { +public: + Radians(double rads = Double() ): Double(rads) {} + inline Radians(const Degrees& degs); + + inline operator Degrees(); + inline double toDegrees(); +}; + +/** + * @brief Data type representing degrees. It supports conversion to radians. + */ +class Degrees: public Double { +public: + Degrees(double deg = Double()): Double(deg) {} + Degrees(const Radians& rads): Double( rads * 180/Pi ) {} + inline double toRadians() { return Radians(*this);} +}; + +inline bool operator==(const Degrees& deg, const Radians& rads) { + Degrees deg2 = rads; + auto diff = std::abs(deg - deg2); + return diff < 0.0001; +} + +inline bool operator==(const Radians& rads, const Degrees& deg) { + return deg == rads; +} + +inline Radians::operator Degrees() { return *this * 180/Pi; } + +inline Radians::Radians(const Degrees °s): Double( degs * Pi/180) {} + +inline double Radians::toDegrees() { return operator Degrees(); } + +} +#endif // LIBNEST2D_CONFIG_HPP diff --git a/xs/src/libnest2d/libnest2d/geometries_io.hpp b/xs/src/libnest2d/libnest2d/geometries_io.hpp new file mode 100644 index 000000000..dbcae5256 --- /dev/null +++ b/xs/src/libnest2d/libnest2d/geometries_io.hpp @@ -0,0 +1,18 @@ +#ifndef GEOMETRIES_IO_HPP +#define GEOMETRIES_IO_HPP + +#include "libnest2d.hpp" + +#include + +namespace libnest2d { + +template +std::ostream& operator<<(std::ostream& stream, const _Item& sh) { + stream << sh.toString() << "\n"; + return stream; +} + +} + +#endif // GEOMETRIES_IO_HPP diff --git a/xs/src/libnest2d/libnest2d/geometries_nfp.hpp b/xs/src/libnest2d/libnest2d/geometries_nfp.hpp new file mode 100644 index 000000000..219c4b565 --- /dev/null +++ b/xs/src/libnest2d/libnest2d/geometries_nfp.hpp @@ -0,0 +1,125 @@ +#ifndef GEOMETRIES_NOFITPOLYGON_HPP +#define GEOMETRIES_NOFITPOLYGON_HPP + +#include "geometry_traits.hpp" +#include + +namespace libnest2d { + +struct Nfp { + +template +static RawShape& minkowskiAdd(RawShape& sh, const RawShape& /*other*/) { + static_assert(always_false::value, + "ShapeLike::minkowskiAdd() unimplemented!"); + return sh; +} + +template +static RawShape noFitPolygon(const RawShape& sh, const RawShape& other) { + auto isConvex = [](const RawShape& sh) { + + return true; + }; + + using Vertex = TPoint; + using Edge = _Segment; + + auto nfpConvexConvex = [] ( + const RawShape& sh, + const RawShape& cother) + { + RawShape other = cother; + + // Make it counter-clockwise + for(auto shit = ShapeLike::begin(other); + shit != ShapeLike::end(other); ++shit ) { + auto& v = *shit; + setX(v, -getX(v)); + setY(v, -getY(v)); + } + + RawShape rsh; + std::vector edgelist; + + size_t cap = ShapeLike::contourVertexCount(sh) + + ShapeLike::contourVertexCount(other); + + edgelist.reserve(cap); + ShapeLike::reserve(rsh, cap); + + { + auto first = ShapeLike::cbegin(sh); + auto next = first + 1; + auto endit = ShapeLike::cend(sh); + + while(next != endit) edgelist.emplace_back(*(first++), *(next++)); + } + + { + auto first = ShapeLike::cbegin(other); + auto next = first + 1; + auto endit = ShapeLike::cend(other); + + while(next != endit) edgelist.emplace_back(*(first++), *(next++)); + } + + std::sort(edgelist.begin(), edgelist.end(), + [](const Edge& e1, const Edge& e2) + { + return e1.angleToXaxis() > e2.angleToXaxis(); + }); + + ShapeLike::addVertex(rsh, edgelist.front().first()); + ShapeLike::addVertex(rsh, edgelist.front().second()); + + auto tmp = std::next(ShapeLike::begin(rsh)); + + // Construct final nfp + for(auto eit = std::next(edgelist.begin()); + eit != edgelist.end(); + ++eit) { + + auto dx = getX(*tmp) - getX(eit->first()); + auto dy = getY(*tmp) - getY(eit->first()); + + ShapeLike::addVertex(rsh, getX(eit->second())+dx, + getY(eit->second())+dy ); + + tmp = std::next(tmp); + } + + return rsh; + }; + + RawShape rsh; + + enum e_dispatch { + CONVEX_CONVEX, + CONCAVE_CONVEX, + CONVEX_CONCAVE, + CONCAVE_CONCAVE + }; + + int sel = isConvex(sh) ? CONVEX_CONVEX : CONCAVE_CONVEX; + sel += isConvex(other) ? CONVEX_CONVEX : CONVEX_CONCAVE; + + switch(sel) { + case CONVEX_CONVEX: + rsh = nfpConvexConvex(sh, other); break; + case CONCAVE_CONVEX: + break; + case CONVEX_CONCAVE: + break; + case CONCAVE_CONCAVE: + break; + } + + return rsh; +} + +}; + +} + +#endif // GEOMETRIES_NOFITPOLYGON_HPP diff --git a/xs/src/libnest2d/libnest2d/geometry_traits.hpp b/xs/src/libnest2d/libnest2d/geometry_traits.hpp new file mode 100644 index 000000000..2ab2d1c49 --- /dev/null +++ b/xs/src/libnest2d/libnest2d/geometry_traits.hpp @@ -0,0 +1,501 @@ +#ifndef GEOMETRY_TRAITS_HPP +#define GEOMETRY_TRAITS_HPP + +#include +#include +#include +#include +#include + +#include "common.hpp" + +namespace libnest2d { + +/// Getting the coordinate data type for a geometry class. +template struct CoordType { using Type = long; }; + +/// TCoord as shorthand for typename `CoordType::Type`. +template +using TCoord = typename CoordType>::Type; + +/// Getting the type of point structure used by a shape. +template struct PointType { using Type = void; }; + +/// TPoint as shorthand for `typename PointType::Type`. +template +using TPoint = typename PointType>::Type; + +/// Getting the VertexIterator type of a shape class. +template struct VertexIteratorType { using Type = void; }; + +/// Getting the const vertex iterator for a shape class. +template struct VertexConstIteratorType { using Type = void; }; + +/** + * TVertexIterator as shorthand for + * `typename VertexIteratorType::Type` + */ +template +using TVertexIterator = +typename VertexIteratorType>::Type; + +/** + * \brief TVertexConstIterator as shorthand for + * `typename VertexConstIteratorType::Type` + */ +template +using TVertexConstIterator = +typename VertexConstIteratorType>::Type; + +/** + * \brief A point pair base class for other point pairs (segment, box, ...). + * \tparam RawPoint The actual point type to use. + */ +template +struct PointPair { + RawPoint p1; + RawPoint p2; +}; + +/** + * \brief An abstraction of a box; + */ +template +class _Box: PointPair { + using PointPair::p1; + using PointPair::p2; +public: + + inline _Box() {} + inline _Box(const RawPoint& p, const RawPoint& pp): + PointPair({p, pp}) {} + + inline _Box(TCoord width, TCoord height): + _Box(RawPoint{0, 0}, RawPoint{width, height}) {} + + inline const RawPoint& minCorner() const BP2D_NOEXCEPT { return p1; } + inline const RawPoint& maxCorner() const BP2D_NOEXCEPT { return p2; } + + inline RawPoint& minCorner() BP2D_NOEXCEPT { return p1; } + inline RawPoint& maxCorner() BP2D_NOEXCEPT { return p2; } + + inline TCoord width() const BP2D_NOEXCEPT; + inline TCoord height() const BP2D_NOEXCEPT; +}; + +template +class _Segment: PointPair { + using PointPair::p1; + using PointPair::p2; +public: + + inline _Segment() {} + inline _Segment(const RawPoint& p, const RawPoint& pp): + PointPair({p, pp}) {} + + inline const RawPoint& first() const BP2D_NOEXCEPT { return p1; } + inline const RawPoint& second() const BP2D_NOEXCEPT { return p2; } + + inline RawPoint& first() BP2D_NOEXCEPT { return p1; } + inline RawPoint& second() BP2D_NOEXCEPT { return p2; } + + inline Radians angleToXaxis() const; +}; + +class PointLike { +public: + + template + static TCoord x(const RawPoint& p) + { + return p.x(); + } + + template + static TCoord y(const RawPoint& p) + { + return p.y(); + } + + template + static TCoord& x(RawPoint& p) + { + return p.x(); + } + + template + static TCoord& y(RawPoint& p) + { + return p.y(); + } + + template + static double distance(const RawPoint& /*p1*/, const RawPoint& /*p2*/) + { + static_assert(always_false::value, + "PointLike::distance(point, point) unimplemented"); + return 0; + } + + template + static double distance(const RawPoint& /*p1*/, + const _Segment& /*s*/) + { + static_assert(always_false::value, + "PointLike::distance(point, segment) unimplemented"); + return 0; + } + + template + static std::pair, bool> horizontalDistance( + const RawPoint& p, const _Segment& s) + { + using Unit = TCoord; + auto x = PointLike::x(p), y = PointLike::y(p); + auto x1 = PointLike::x(s.first()), y1 = PointLike::y(s.first()); + auto x2 = PointLike::x(s.second()), y2 = PointLike::y(s.second()); + + TCoord ret; + + if( (y < y1 && y < y2) || (y > y1 && y > y2) ) + return {0, false}; + else if ((y == y1 && y == y2) && (x > x1 && x > x2)) + ret = std::min( x-x1, x -x2); + else if( (y == y1 && y == y2) && (x < x1 && x < x2)) + ret = -std::min(x1 - x, x2 - x); + else if(std::abs(y - y1) <= std::numeric_limits::epsilon() && + std::abs(y - y2) <= std::numeric_limits::epsilon()) + ret = 0; + else + ret = x - x1 + (x1 - x2)*(y1 - y)/(y1 - y2); + + return {ret, true}; + } + + template + static std::pair, bool> verticalDistance( + const RawPoint& p, const _Segment& s) + { + using Unit = TCoord; + auto x = PointLike::x(p), y = PointLike::y(p); + auto x1 = PointLike::x(s.first()), y1 = PointLike::y(s.first()); + auto x2 = PointLike::x(s.second()), y2 = PointLike::y(s.second()); + + TCoord ret; + + if( (x < x1 && x < x2) || (x > x1 && x > x2) ) + return {0, false}; + else if ((x == x1 && x == x2) && (y > y1 && y > y2)) + ret = std::min( y-y1, y -y2); + else if( (x == x1 && x == x2) && (y < y1 && y < y2)) + ret = -std::min(y1 - y, y2 - y); + else if(std::abs(x - x1) <= std::numeric_limits::epsilon() && + std::abs(x - x2) <= std::numeric_limits::epsilon()) + ret = 0; + else + ret = y - y1 + (y1 - y2)*(x1 - x)/(x1 - x2); + + return {ret, true}; + } +}; + +template +TCoord _Box::width() const BP2D_NOEXCEPT { + return PointLike::x(maxCorner()) - PointLike::x(minCorner()); +} + + +template +TCoord _Box::height() const BP2D_NOEXCEPT { + return PointLike::y(maxCorner()) - PointLike::y(minCorner()); +} + +template +TCoord getX(const RawPoint& p) { return PointLike::x(p); } + +template +TCoord getY(const RawPoint& p) { return PointLike::y(p); } + +template +void setX(RawPoint& p, const TCoord& val) { + PointLike::x(p) = val; +} + +template +void setY(RawPoint& p, const TCoord& val) { + PointLike::y(p) = val; +} + +template +inline Radians _Segment::angleToXaxis() const +{ + TCoord dx = getX(second()) - getX(first()); + TCoord dy = getY(second()) - getY(first()); + + if(dx == 0 && dy >= 0) return Pi/2; + if(dx == 0 && dy < 0) return 3*Pi/2; + if(dy == 0 && dx >= 0) return 0; + if(dy == 0 && dx < 0) return Pi; + + double ddx = static_cast(dx); + auto s = std::signbit(ddx); + double a = std::atan(ddx/dy); + if(s) a += Pi; + return a; +} + +template +struct HolesContainer { + using Type = std::vector; +}; + +template +using THolesContainer = typename HolesContainer>::Type; + +template +struct CountourType { + using Type = RawShape; +}; + +template +using TCountour = typename CountourType>::Type; + +enum class Orientation { + CLOCKWISE, + COUNTER_CLOCKWISE +}; + +template +struct OrientationType { + + // Default Polygon orientation that the library expects + static const Orientation Value = Orientation::CLOCKWISE; +}; + +enum class Formats { + WKT, + SVG +}; + +struct ShapeLike { + + template + static RawShape create( std::initializer_list< TPoint > il) + { + return RawShape(il); + } + + // Optional, does nothing by default + template + static void reserve(RawShape& /*sh*/, unsigned long /*vertex_capacity*/) {} + + template + static void addVertex(RawShape& sh, Args...args) + { + return getContour(sh).emplace_back(std::forward(args)...); + } + + template + static TVertexIterator begin(RawShape& sh) + { + return sh.begin(); + } + + template + static TVertexIterator end(RawShape& sh) + { + return sh.end(); + } + + template + static TVertexConstIterator cbegin(const RawShape& sh) + { + return sh.cbegin(); + } + + template + static TVertexConstIterator cend(const RawShape& sh) + { + return sh.cend(); + } + + template + static TPoint& vertex(RawShape& sh, unsigned long idx) + { + return *(begin(sh) + idx); + } + + template + static const TPoint& vertex(const RawShape& sh, + unsigned long idx) + { + return *(cbegin(sh) + idx); + } + + template + static size_t contourVertexCount(const RawShape& sh) + { + return cend(sh) - cbegin(sh); + } + + template + static std::string toString(const RawShape& /*sh*/) + { + return ""; + } + + template + static std::string serialize(const RawShape& /*sh*/) + { + static_assert(always_false::value, + "ShapeLike::serialize() unimplemented"); + return ""; + } + + template + static void unserialize(RawShape& /*sh*/, const std::string& /*str*/) + { + static_assert(always_false::value, + "ShapeLike::unserialize() unimplemented"); + } + + template + static double area(const RawShape& /*sh*/) + { + static_assert(always_false::value, + "ShapeLike::area() unimplemented"); + return 0; + } + + template + static double area(const _Box>& box) + { + return box.width() * box.height(); + return 0; + } + + template + static bool intersects(const RawShape& /*sh*/, const RawShape& /*sh*/) + { + static_assert(always_false::value, + "ShapeLike::intersects() unimplemented"); + return false; + } + + template + static bool isInside(const TPoint& /*point*/, + const RawShape& /*shape*/) + { + static_assert(always_false::value, + "ShapeLike::isInside(point, shape) unimplemented"); + return false; + } + + template + static bool isInside(const RawShape& /*shape*/, + const RawShape& /*shape*/) + { + static_assert(always_false::value, + "ShapeLike::isInside(shape, shape) unimplemented"); + return false; + } + + template + static bool touches( const RawShape& /*shape*/, + const RawShape& /*shape*/) + { + static_assert(always_false::value, + "ShapeLike::touches(shape, shape) unimplemented"); + return false; + } + + template + static _Box> boundingBox(const RawShape& /*sh*/) + { + static_assert(always_false::value, + "ShapeLike::boundingBox(shape) unimplemented"); + } + + template + static _Box> boundingBox(const _Box>& box) + { + return box; + } + + template + static THolesContainer& holes(RawShape& /*sh*/) + { + static THolesContainer empty; + return empty; + } + + template + static const THolesContainer& holes(const RawShape& /*sh*/) + { + static THolesContainer empty; + return empty; + } + + template + static TCountour& getHole(RawShape& sh, unsigned long idx) + { + return holes(sh)[idx]; + } + + template + static const TCountour& getHole(const RawShape& sh, + unsigned long idx) + { + return holes(sh)[idx]; + } + + template + static size_t holeCount(const RawShape& sh) + { + return holes(sh).size(); + } + + template + static TCountour& getContour(RawShape& sh) + { + return sh; + } + + template + static const TCountour& getContour(const RawShape& sh) + { + return sh; + } + + template + static void rotate(RawShape& /*sh*/, const Radians& /*rads*/) + { + static_assert(always_false::value, + "ShapeLike::rotate() unimplemented"); + } + + template + static void translate(RawShape& /*sh*/, const RawPoint& /*offs*/) + { + static_assert(always_false::value, + "ShapeLike::translate() unimplemented"); + } + + template + static void offset(RawShape& /*sh*/, TCoord> /*distance*/) + { + static_assert(always_false::value, + "ShapeLike::offset() unimplemented!"); + } + + template + static std::pair isValid(const RawShape& /*sh*/) { + return {false, "ShapeLike::isValid() unimplemented"}; + } + +}; + + +} + +#endif // GEOMETRY_TRAITS_HPP diff --git a/xs/src/libnest2d/libnest2d/libnest2d.hpp b/xs/src/libnest2d/libnest2d/libnest2d.hpp new file mode 100644 index 000000000..e57e49779 --- /dev/null +++ b/xs/src/libnest2d/libnest2d/libnest2d.hpp @@ -0,0 +1,802 @@ +#ifndef LIBNEST2D_HPP +#define LIBNEST2D_HPP + +#include +#include +#include +#include +#include +#include + +#include "geometry_traits.hpp" + +namespace libnest2d { + +/** + * \brief An item to be placed on a bin. + * + * It holds a copy of the original shape object but supports move construction + * from the shape objects if its an rvalue reference. This way we can construct + * the items without the cost of copying a potentially large amount of input. + * + * The results of some calculations are cached for maintaining fast run times. + * For this reason, memory demands are much higher but this should pay off. + */ +template +class _Item { + using Coord = TCoord>; + using Vertex = TPoint; + using Box = _Box; + + // The original shape that gets encapsulated. + RawShape sh_; + + // Transformation data + Vertex translation_; + Radians rotation_; + Coord offset_distance_; + + // Info about whether the tranformations will have to take place + // This is needed because if floating point is used, it is hard to say + // that a zero angle is not a rotation because of testing for equality. + bool has_rotation_ = false, has_translation_ = false, has_offset_ = false; + + // For caching the calculations as they can get pretty expensive. + mutable RawShape tr_cache_; + mutable bool tr_cache_valid_ = false; + mutable double area_cache_ = 0; + mutable bool area_cache_valid_ = false; + mutable RawShape offset_cache_; + mutable bool offset_cache_valid_ = false; +public: + + /// The type of the shape which was handed over as the template argument. + using ShapeType = RawShape; + + /** + * \brief Iterator type for the outer vertices. + * + * Only const iterators can be used. The _Item type is not intended to + * modify the carried shapes from the outside. The main purpose of this type + * is to cache the calculation results from the various operators it + * supports. Giving out a non const iterator would make it impossible to + * perform correct cache invalidation. + */ + using Iterator = TVertexConstIterator; + + /** + * @brief Get the orientation of the polygon. + * + * The orientation have to be specified as a specialization of the + * OrientationType struct which has a Value constant. + * + * @return The orientation type identifier for the _Item type. + */ + static BP2D_CONSTEXPR Orientation orientation() { + return OrientationType::Value; + } + + /** + * @brief Constructing an _Item form an existing raw shape. The shape will + * be copied into the _Item object. + * @param sh The original shape object. + */ + explicit inline _Item(const RawShape& sh): sh_(sh) {} + + /** + * @brief Construction of an item by moving the content of the raw shape, + * assuming that it supports move semantics. + * @param sh The original shape object. + */ + explicit inline _Item(RawShape&& sh): sh_(std::move(sh)) {} + + /** + * @brief Create an item from an initilizer list. + * @param il The initializer list of vertices. + */ + inline _Item(const std::initializer_list< Vertex >& il): + sh_(ShapeLike::create(il)) {} + + /** + * @brief Convert the polygon to string representation. The format depends + * on the implementation of the polygon. + * @return + */ + inline std::string toString() const + { + return ShapeLike::toString(sh_); + } + + /// Iterator tho the first vertex in the polygon. + inline Iterator begin() const + { + return ShapeLike::cbegin(sh_); + } + + /// Alias to begin() + inline Iterator cbegin() const + { + return ShapeLike::cbegin(sh_); + } + + /// Iterator to the last element. + inline Iterator end() const + { + return ShapeLike::cend(sh_); + } + + /// Alias to end() + inline Iterator cend() const + { + return ShapeLike::cend(sh_); + } + + /** + * @brief Get a copy of an outer vertex whithin the carried shape. + * + * Note that the vertex considered here is taken from the original shape + * that this item is constructed from. This means that no transformation is + * applied to the shape in this call. + * + * @param idx The index of the requested vertex. + * @return A copy of the requested vertex. + */ + inline Vertex vertex(unsigned long idx) const + { + return ShapeLike::vertex(sh_, idx); + } + + /** + * @brief Modify a vertex. + * + * Note that this method will invalidate every cached calculation result + * including polygon offset and transformations. + * + * @param idx The index of the requested vertex. + * @param v The new vertex data. + */ + inline void setVertex(unsigned long idx, + const Vertex& v ) + { + invalidateCache(); + ShapeLike::vertex(sh_, idx) = v; + } + + /** + * @brief Calculate the shape area. + * + * The method returns absolute value and does not reflect polygon + * orientation. The result is cached, subsequent calls will have very little + * cost. + * @return The shape area in floating point double precision. + */ + inline double area() const { + double ret ; + if(area_cache_valid_) ret = area_cache_; + else { + ret = std::abs(ShapeLike::area(offsettedShape())); + area_cache_ = ret; + area_cache_valid_ = true; + } + return ret; + } + + /// The number of the outer ring vertices. + inline unsigned long vertexCount() const { + return ShapeLike::contourVertexCount(sh_); + } + + /** + * @brief isPointInside + * @param p + * @return + */ + inline bool isPointInside(const Vertex& p) + { + return ShapeLike::isInside(p, sh_); + } + + inline bool isInside(const _Item& sh) const + { + return ShapeLike::isInside(transformedShape(), sh.transformedShape()); + } + + inline void translate(const Vertex& d) BP2D_NOEXCEPT + { + translation_ += d; has_translation_ = true; + tr_cache_valid_ = false; + } + + inline void rotate(const Radians& rads) BP2D_NOEXCEPT + { + rotation_ += rads; + has_rotation_ = true; + tr_cache_valid_ = false; + } + + inline void addOffset(Coord distance) BP2D_NOEXCEPT + { + offset_distance_ = distance; + has_offset_ = true; + offset_cache_valid_ = false; + } + + inline void removeOffset() BP2D_NOEXCEPT { + has_offset_ = false; + invalidateCache(); + } + + inline Radians rotation() const BP2D_NOEXCEPT + { + return rotation_; + } + + inline TPoint translation() const BP2D_NOEXCEPT + { + return translation_; + } + + inline void rotation(Radians rot) BP2D_NOEXCEPT + { + if(rotation_ != rot) { + rotation_ = rot; has_rotation_ = true; tr_cache_valid_ = false; + } + } + + inline void translation(const TPoint& tr) BP2D_NOEXCEPT + { + if(translation_ != tr) { + translation_ = tr; has_translation_ = true; tr_cache_valid_ = false; + } + } + + inline RawShape transformedShape() const + { + if(tr_cache_valid_) return tr_cache_; + + RawShape cpy = offsettedShape(); + if(has_rotation_) ShapeLike::rotate(cpy, rotation_); + if(has_translation_) ShapeLike::translate(cpy, translation_); + tr_cache_ = cpy; tr_cache_valid_ = true; + + return cpy; + } + + inline operator RawShape() const + { + return transformedShape(); + } + + inline const RawShape& rawShape() const BP2D_NOEXCEPT + { + return sh_; + } + + inline void resetTransformation() BP2D_NOEXCEPT + { + has_translation_ = false; has_rotation_ = false; has_offset_ = false; + } + + inline Box boundingBox() const { + return ShapeLike::boundingBox(transformedShape()); + } + + //Static methods: + + inline static bool intersects(const _Item& sh1, const _Item& sh2) + { + return ShapeLike::intersects(sh1.transformedShape(), + sh2.transformedShape()); + } + + inline static bool touches(const _Item& sh1, const _Item& sh2) + { + return ShapeLike::touches(sh1.transformedShape(), + sh2.transformedShape()); + } + +private: + + inline const RawShape& offsettedShape() const { + if(has_offset_ ) { + if(offset_cache_valid_) return offset_cache_; + else { + offset_cache_ = sh_; + ShapeLike::offset(offset_cache_, offset_distance_); + offset_cache_valid_ = true; + return offset_cache_; + } + } + return sh_; + } + + inline void invalidateCache() const BP2D_NOEXCEPT + { + tr_cache_valid_ = false; + area_cache_valid_ = false; + offset_cache_valid_ = false; + } +}; + +/** + * \brief Subclass of _Item for regular rectangle items. + */ +template +class _Rectangle: public _Item { + RawShape sh_; + using _Item::vertex; + using TO = Orientation; +public: + + using Unit = TCoord; + + template::Value> + inline _Rectangle(Unit width, Unit height, + // disable this ctor if o != CLOCKWISE + enable_if_t< o == TO::CLOCKWISE, int> = 0 ): + _Item( ShapeLike::create( { + {0, 0}, + {0, height}, + {width, height}, + {width, 0}, + {0, 0} + } )) + { + } + + template::Value> + inline _Rectangle(Unit width, Unit height, + // disable this ctor if o != COUNTER_CLOCKWISE + enable_if_t< o == TO::COUNTER_CLOCKWISE, int> = 0 ): + _Item( ShapeLike::create( { + {0, 0}, + {width, 0}, + {width, height}, + {0, height}, + {0, 0} + } )) + { + } + + inline Unit width() const BP2D_NOEXCEPT { + return getX(vertex(2)); + } + + inline Unit height() const BP2D_NOEXCEPT { + return getY(vertex(2)); + } +}; + +/** + * \brief A wrapper interface (trait) class for any placement strategy provider. + * + * If a client want's to use its own placement algorithm, all it has to do is to + * specialize this class template and define all the ten methods it has. It can + * use the strategies::PlacerBoilerplace class for creating a new placement + * strategy where only the constructor and the trypack method has to be provided + * and it will work out of the box. + */ +template +class PlacementStrategyLike { + PlacementStrategy impl_; +public: + + /// The item type that the placer works with. + using Item = typename PlacementStrategy::Item; + + /// The placer's config type. Should be a simple struct but can be anything. + using Config = typename PlacementStrategy::Config; + + /** + * \brief The type of the bin that the placer works with. + * + * Can be a box or an arbitrary shape or just a width or height without a + * second dimension if an infinite bin is considered. + */ + using BinType = typename PlacementStrategy::BinType; + + /** + * \brief Pack result that can be used to accept or discard it. See trypack + * method. + */ + using PackResult = typename PlacementStrategy::PackResult; + + using ItemRef = std::reference_wrapper; + using ItemGroup = std::vector; + + /** + * @brief Constructor taking the bin and an optional configuration. + * @param bin The bin object whose type is defined by the placement strategy. + * @param config The configuration for the particular placer. + */ + explicit PlacementStrategyLike(const BinType& bin, + const Config& config = Config()): + impl_(bin) + { + configure(config); + } + + /** + * @brief Provide a different configuration for the placer. + * + * Note that it depends on the particular placer implementation how it + * reacts to config changes in the middle of a calculation. + * + * @param config The configuration object defined by the placement startegy. + */ + inline void configure(const Config& config) { impl_.configure(config); } + + /** + * @brief A method that tries to pack an item and returns an object + * describing the pack result. + * + * The result can be casted to bool and used as an argument to the accept + * method to accept a succesfully packed item. This way the next packing + * will consider the accepted item as well. The PackResult should carry the + * transformation info so that if the tried item is later modified or tried + * multiple times, the result object should set it to the originally + * determied position. An implementation can be found in the + * strategies::PlacerBoilerplate::PackResult class. + * + * @param item Ithe item to be packed. + * @return The PackResult object that can be implicitly casted to bool. + */ + inline PackResult trypack(Item& item) { return impl_.trypack(item); } + + /** + * @brief A method to accept a previously tried item. + * + * If the pack result is a failure the method should ignore it. + * @param r The result of a previous trypack call. + */ + inline void accept(PackResult& r) { impl_.accept(r); } + + /** + * @brief pack Try to pack an item and immediately accept it on success. + * + * A default implementation would be to call + * { auto&& r = trypack(item); accept(r); return r; } but we should let the + * implementor of the placement strategy to harvest any optimizations from + * the absence of an intermadiate step. The above version can still be used + * in the implementation. + * + * @param item The item to pack. + * @return Returns true if the item was packed or false if it could not be + * packed. + */ + inline bool pack(Item& item) { return impl_.pack(item); } + + /// Unpack the last element (remove it from the list of packed items). + inline void unpackLast() { impl_.unpackLast(); } + + /// Get the bin object. + inline const BinType& bin() const { return impl_.bin(); } + + /// Set a new bin object. + inline void bin(const BinType& bin) { impl_.bin(bin); } + + /// Get the packed items. + inline ItemGroup getItems() { return impl_.getItems(); } + + /// Clear the packed items so a new session can be started. + inline void clearItems() { impl_.clearItems(); } + +}; + +/** + * A wrapper interface (trait) class for any selections strategy provider. + */ +template +class SelectionStrategyLike { + SelectionStrategy impl_; +public: + using Item = typename SelectionStrategy::Item; + using Config = typename SelectionStrategy::Config; + + using ItemRef = std::reference_wrapper; + using ItemGroup = std::vector; + + /** + * @brief Provide a different configuration for the selection strategy. + * + * Note that it depends on the particular placer implementation how it + * reacts to config changes in the middle of a calculation. + * + * @param config The configuration object defined by the selection startegy. + */ + inline void configure(const Config& config) { + impl_.configure(config); + } + + /** + * \brief A method to start the calculation on the input sequence. + * + * \tparam TPlacer The only mandatory template parameter is the type of + * placer compatible with the PlacementStrategyLike interface. + * + * \param first, last The first and last iterator if the input sequence. It + * can be only an iterator of a type converitible to Item. + * \param bin. The shape of the bin. It has to be supported by the placement + * strategy. + * \param An optional config object for the placer. + */ + template::BinType, + class PConfig = typename PlacementStrategyLike::Config> + inline void packItems( + TIterator first, + TIterator last, + TBin&& bin, + PConfig&& config = PConfig() ) + { + impl_.template packItems(first, last, + std::forward(bin), + std::forward(config)); + } + + /** + * \brief Get the number of bins opened by the selection algorithm. + * + * Initially it is zero and after the call to packItems it will return + * the number of bins opened by the packing procedure. + * + * \return The number of bins opened. + */ + inline size_t binCount() const { return impl_.binCount(); } + + /** + * @brief Get the items for a particular bin. + * @param binIndex The index of the requested bin. + * @return Returns a list of allitems packed into the requested bin. + */ + inline ItemGroup itemsForBin(size_t binIndex) { + return impl_.itemsForBin(binIndex); + } + + /// Same as itemsForBin but for a const context. + inline const ItemGroup itemsForBin(size_t binIndex) const { + return impl_.itemsForBin(binIndex); + } +}; + + +/** + * \brief A list of packed item vectors. Each vector represents a bin. + */ +template +using _PackGroup = std::vector< + std::vector< + std::reference_wrapper<_Item> + > + >; + +/** + * \brief A list of packed (index, item) pair vectors. Each vector represents a + * bin. + * + * The index is points to the position of the item in the original input + * sequence. This way the caller can use the items as a transformation data + * carrier and transform the original objects manually. + */ +template +using _IndexedPackGroup = std::vector< + std::vector< + std::pair< + unsigned, + std::reference_wrapper<_Item> + > + > + >; + +/** + * The Arranger is the frontend class for the binpack2d library. It takes the + * input items and outputs the items with the proper transformations to be + * inside the provided bin. + */ +template +class Arranger { + using TSel = SelectionStrategyLike; + TSel selector_; + +public: + using Item = typename PlacementStrategy::Item; + using ItemRef = std::reference_wrapper; + using TPlacer = PlacementStrategyLike; + using BinType = typename TPlacer::BinType; + using PlacementConfig = typename TPlacer::Config; + using SelectionConfig = typename TSel::Config; + + using Unit = TCoord>; + + using IndexedPackGroup = _IndexedPackGroup; + using PackGroup = _PackGroup; + +private: + BinType bin_; + PlacementConfig pconfig_; + TCoord min_obj_distance_; + + using SItem = typename SelectionStrategy::Item; + using TPItem = remove_cvref_t; + using TSItem = remove_cvref_t; + + std::vector item_cache_; + +public: + + /** + * \brief Constructor taking the bin as the only mandatory parameter. + * + * \param bin The bin shape that will be used by the placers. The type + * of the bin should be one that is supported by the placer type. + */ + template + Arranger( TBinType&& bin, + Unit min_obj_distance = 0, + PConf&& pconfig = PConf(), + SConf&& sconfig = SConf()): + bin_(std::forward(bin)), + pconfig_(std::forward(pconfig)), + min_obj_distance_(min_obj_distance) + { + static_assert( std::is_same::value, + "Incompatible placement and selection strategy!"); + + selector_.configure(std::forward(sconfig)); + } + + /** + * \brief Arrange an input sequence and return a PackGroup object with + * the packed groups corresponding to the bins. + * + * The number of groups in the pack group is the number of bins opened by + * the selection algorithm. + */ + template + inline PackGroup arrange(TIterator from, TIterator to) + { + return _arrange(from, to); + } + + /** + * A version of the arrange method returning an IndexedPackGroup with + * the item indexes into the original input sequence. + * + * Takes a little longer to collect the indices. Scales linearly with the + * input sequence size. + */ + template + inline IndexedPackGroup arrangeIndexed(TIterator from, TIterator to) + { + return _arrangeIndexed(from, to); + } + + /// Shorthand to normal arrange method. + template + inline PackGroup operator() (TIterator from, TIterator to) + { + return _arrange(from, to); + } + +private: + + template, + + // This funtion will be used only if the iterators are pointing to + // a type compatible with the binpack2d::_Item template. + // This way we can use references to input elements as they will + // have to exist for the lifetime of this call. + class T = enable_if_t< std::is_convertible::value, IT> + > + inline PackGroup _arrange(TIterator from, TIterator to, bool = false) + { + __arrange(from, to); + + PackGroup ret; + for(size_t i = 0; i < selector_.binCount(); i++) { + auto items = selector_.itemsForBin(i); + ret.push_back(items); + } + + return ret; + } + + template, + class T = enable_if_t::value, IT> + > + inline PackGroup _arrange(TIterator from, TIterator to, int = false) + { + item_cache_ = {from, to}; + + __arrange(item_cache_.begin(), item_cache_.end()); + + PackGroup ret; + for(size_t i = 0; i < selector_.binCount(); i++) { + auto items = selector_.itemsForBin(i); + ret.push_back(items); + } + + return ret; + } + + template, + + // This funtion will be used only if the iterators are pointing to + // a type compatible with the binpack2d::_Item template. + // This way we can use references to input elements as they will + // have to exist for the lifetime of this call. + class T = enable_if_t< std::is_convertible::value, IT> + > + inline IndexedPackGroup _arrangeIndexed(TIterator from, + TIterator to, + bool = false) + { + __arrange(from, to); + return createIndexedPackGroup(from, to, selector_); + } + + template, + class T = enable_if_t::value, IT> + > + inline IndexedPackGroup _arrangeIndexed(TIterator from, + TIterator to, + int = false) + { + item_cache_ = {from, to}; + __arrange(item_cache_.begin(), item_cache_.end()); + return createIndexedPackGroup(from, to, selector_); + } + + template + static IndexedPackGroup createIndexedPackGroup(TIterator from, + TIterator to, + TSel& selector) + { + IndexedPackGroup pg; + pg.reserve(selector.binCount()); + + for(size_t i = 0; i < selector.binCount(); i++) { + auto items = selector.itemsForBin(i); + pg.push_back({}); + pg[i].reserve(items.size()); + + for(Item& itemA : items) { + auto it = from; + unsigned idx = 0; + while(it != to) { + Item& itemB = *it; + if(&itemB == &itemA) break; + it++; idx++; + } + pg[i].emplace_back(idx, itemA); + } + } + + return pg; + } + + template inline void __arrange(TIter from, TIter to) + { + if(min_obj_distance_ > 0) std::for_each(from, to, [this](Item& item) { + item.addOffset(std::ceil(min_obj_distance_/2.0)); + }); + + selector_.template packItems( + from, to, bin_, pconfig_); + + if(min_obj_distance_ > 0) std::for_each(from, to, [this](Item& item) { + item.removeOffset(); + }); + + } +}; + +} + +#endif // LIBNEST2D_HPP diff --git a/xs/src/libnest2d/libnest2d/placers/bottomleftplacer.hpp b/xs/src/libnest2d/libnest2d/placers/bottomleftplacer.hpp new file mode 100644 index 000000000..d34301205 --- /dev/null +++ b/xs/src/libnest2d/libnest2d/placers/bottomleftplacer.hpp @@ -0,0 +1,391 @@ +#ifndef BOTTOMLEFT_HPP +#define BOTTOMLEFT_HPP + +#include + +#include "placer_boilerplate.hpp" + +namespace libnest2d { namespace strategies { + +template +struct BLConfig { + TCoord> min_obj_distance = 0; + bool allow_rotations = false; +}; + +template +class _BottomLeftPlacer: public PlacerBoilerplate< + _BottomLeftPlacer, + RawShape, _Box>, + BLConfig > +{ + using Base = PlacerBoilerplate<_BottomLeftPlacer, RawShape, + _Box>, BLConfig>; + DECLARE_PLACER(Base) + +public: + + explicit _BottomLeftPlacer(const BinType& bin): Base(bin) {} + + PackResult trypack(Item& item) { + auto r = _trypack(item); + if(!r && Base::config_.allow_rotations) { + item.rotate(Degrees(90)); + r =_trypack(item); + } + return r; + } + + enum class Dir { + LEFT, + DOWN + }; + + inline RawShape leftPoly(const Item& item) const { + return toWallPoly(item, Dir::LEFT); + } + + inline RawShape downPoly(const Item& item) const { + return toWallPoly(item, Dir::DOWN); + } + + inline Unit availableSpaceLeft(const Item& item) { + return availableSpace(item, Dir::LEFT); + } + + inline Unit availableSpaceDown(const Item& item) { + return availableSpace(item, Dir::DOWN); + } + +protected: + + PackResult _trypack(Item& item) { + + // Get initial position for item in the top right corner + setInitialPosition(item); + + Unit d = availableSpaceDown(item); + bool can_move = d > 1 /*std::numeric_limits::epsilon()*/; + bool can_be_packed = can_move; + bool left = true; + + while(can_move) { + if(left) { // write previous down move and go down + item.translate({0, -d+1}); + d = availableSpaceLeft(item); + can_move = d > 1/*std::numeric_limits::epsilon()*/; + left = false; + } else { // write previous left move and go down + item.translate({-d+1, 0}); + d = availableSpaceDown(item); + can_move = d > 1/*std::numeric_limits::epsilon()*/; + left = true; + } + } + + if(can_be_packed) { + Item trsh(item.transformedShape()); + for(auto& v : trsh) can_be_packed = can_be_packed && + getX(v) < bin_.width() && + getY(v) < bin_.height(); + } + + return can_be_packed? PackResult(item) : PackResult(); + } + + void setInitialPosition(Item& item) { + auto bb = item.boundingBox(); + + Vertex v = { getX(bb.maxCorner()), getY(bb.minCorner()) }; + + + Coord dx = getX(bin_.maxCorner()) - getX(v); + Coord dy = getY(bin_.maxCorner()) - getY(v); + + item.translate({dx, dy}); + } + + template + static enable_if_t::value, bool> + isInTheWayOf( const Item& item, + const Item& other, + const RawShape& scanpoly) + { + auto tsh = other.transformedShape(); + return ( ShapeLike::intersects(tsh, scanpoly) || + ShapeLike::isInside(tsh, scanpoly) ) && + ( !ShapeLike::intersects(tsh, item.rawShape()) && + !ShapeLike::isInside(tsh, item.rawShape()) ); + } + + template + static enable_if_t::value, bool> + isInTheWayOf( const Item& item, + const Item& other, + const RawShape& scanpoly) + { + auto tsh = other.transformedShape(); + + bool inters_scanpoly = ShapeLike::intersects(tsh, scanpoly) && + !ShapeLike::touches(tsh, scanpoly); + bool inters_item = ShapeLike::intersects(tsh, item.rawShape()) && + !ShapeLike::touches(tsh, item.rawShape()); + + return ( inters_scanpoly || + ShapeLike::isInside(tsh, scanpoly)) && + ( !inters_item && + !ShapeLike::isInside(tsh, item.rawShape()) + ); + } + + Container itemsInTheWayOf(const Item& item, const Dir dir) { + // Get the left or down polygon, that has the same area as the shadow + // of input item reflected to the left or downwards + auto&& scanpoly = dir == Dir::LEFT? leftPoly(item) : + downPoly(item); + + Container ret; // packed items 'in the way' of item + ret.reserve(items_.size()); + + // Predicate to find items that are 'in the way' for left (down) move + auto predicate = [&scanpoly, &item](const Item& it) { + return isInTheWayOf(item, it, scanpoly); + }; + + // Get the items that are in the way for the left (or down) movement + std::copy_if(items_.begin(), items_.end(), + std::back_inserter(ret), predicate); + + return ret; + } + + Unit availableSpace(const Item& _item, const Dir dir) { + + Item item (_item.transformedShape()); + + + std::function getCoord; + std::function< std::pair(const Segment&, const Vertex&) > + availableDistanceSV; + + std::function< std::pair(const Vertex&, const Segment&) > + availableDistance; + + if(dir == Dir::LEFT) { + getCoord = [](const Vertex& v) { return getX(v); }; + availableDistance = PointLike::horizontalDistance; + availableDistanceSV = [](const Segment& s, const Vertex& v) { + auto ret = PointLike::horizontalDistance(v, s); + if(ret.second) ret.first = -ret.first; + return ret; + }; + } + else { + getCoord = [](const Vertex& v) { return getY(v); }; + availableDistance = PointLike::verticalDistance; + availableDistanceSV = [](const Segment& s, const Vertex& v) { + auto ret = PointLike::verticalDistance(v, s); + if(ret.second) ret.first = -ret.first; + return ret; + }; + } + + auto&& items_in_the_way = itemsInTheWayOf(item, dir); + + // Comparison function for finding min vertex + auto cmp = [&getCoord](const Vertex& v1, const Vertex& v2) { + return getCoord(v1) < getCoord(v2); + }; + + // find minimum left or down coordinate of item + auto minvertex_it = std::min_element(item.begin(), + item.end(), + cmp); + + // Get the initial distance in floating point + Unit m = getCoord(*minvertex_it); + + // Check available distance for every vertex of item to the objects + // in the way for the nearest intersection + if(!items_in_the_way.empty()) { // This is crazy, should be optimized... + for(Item& pleft : items_in_the_way) { + // For all segments in items_to_left + + assert(pleft.vertexCount() > 0); + + auto trpleft = pleft.transformedShape(); + auto first = ShapeLike::begin(trpleft); + auto next = first + 1; + auto endit = ShapeLike::end(trpleft); + + while(next != endit) { + Segment seg(*(first++), *(next++)); + for(auto& v : item) { // For all vertices in item + + auto d = availableDistance(v, seg); + + if(d.second && d.first < m) m = d.first; + } + } + } + + auto first = item.begin(); + auto next = first + 1; + auto endit = item.end(); + + // For all edges in item: + while(next != endit) { + Segment seg(*(first++), *(next++)); + + // for all shapes in items_to_left + for(Item& sh : items_in_the_way) { + assert(sh.vertexCount() > 0); + + Item tsh(sh.transformedShape()); + for(auto& v : tsh) { // For all vertices in item + + auto d = availableDistanceSV(seg, v); + + if(d.second && d.first < m) m = d.first; + } + } + } + } + + return m; + } + + /** + * Implementation of the left (and down) polygon as described by + * [López-Camacho et al. 2013]\ + * (http://www.cs.stir.ac.uk/~goc/papers/EffectiveHueristic2DAOR2013.pdf) + * see algorithm 8 for details... + */ + RawShape toWallPoly(const Item& _item, const Dir dir) const { + // The variable names reflect the case of left polygon calculation. + // + // We will iterate through the item's vertices and search for the top + // and bottom vertices (or right and left if dir==Dir::DOWN). + // Save the relevant vertices and their indices into `bottom` and + // `top` vectors. In case of left polygon construction these will + // contain the top and bottom polygons which have the same vertical + // coordinates (in case there is more of them). + // + // We get the leftmost (or downmost) vertex from the `bottom` and `top` + // vectors and construct the final polygon. + + Item item (_item.transformedShape()); + + auto getCoord = [dir](const Vertex& v) { + return dir == Dir::LEFT? getY(v) : getX(v); + }; + + Coord max_y = std::numeric_limits::min(); + Coord min_y = std::numeric_limits::max(); + + using El = std::pair>; + + std::function cmp; + + if(dir == Dir::LEFT) + cmp = [](const El& e1, const El& e2) { + return getX(e1.second.get()) < getX(e2.second.get()); + }; + else + cmp = [](const El& e1, const El& e2) { + return getY(e1.second.get()) < getY(e2.second.get()); + }; + + std::vector< El > top; + std::vector< El > bottom; + + size_t idx = 0; + for(auto& v : item) { // Find the bottom and top vertices and save them + auto vref = std::cref(v); + auto vy = getCoord(v); + + if( vy > max_y ) { + max_y = vy; + top.clear(); + top.emplace_back(idx, vref); + } + else if(vy == max_y) { top.emplace_back(idx, vref); } + + if(vy < min_y) { + min_y = vy; + bottom.clear(); + bottom.emplace_back(idx, vref); + } + else if(vy == min_y) { bottom.emplace_back(idx, vref); } + + idx++; + } + + // Get the top and bottom leftmost vertices, or the right and left + // downmost vertices (if dir == Dir::DOWN) + auto topleft_it = std::min_element(top.begin(), top.end(), cmp); + auto bottomleft_it = + std::min_element(bottom.begin(), bottom.end(), cmp); + + auto& topleft_vertex = topleft_it->second.get(); + auto& bottomleft_vertex = bottomleft_it->second.get(); + + // Start and finish positions for the vertices that will be part of the + // new polygon + auto start = std::min(topleft_it->first, bottomleft_it->first); + auto finish = std::max(topleft_it->first, bottomleft_it->first); + + // the return shape + RawShape rsh; + + // reserve for all vertices plus 2 for the left horizontal wall, 2 for + // the additional vertices for maintaning min object distance + ShapeLike::reserve(rsh, finish-start+4); + + /*auto addOthers = [&rsh, finish, start, &item](){ + for(size_t i = start+1; i < finish; i++) + ShapeLike::addVertex(rsh, item.vertex(i)); + };*/ + + auto reverseAddOthers = [&rsh, finish, start, &item](){ + for(size_t i = finish-1; i > start; i--) + ShapeLike::addVertex(rsh, item.vertex(i)); + }; + + // Final polygon construction... + + static_assert(OrientationType::Value == + Orientation::CLOCKWISE, + "Counter clockwise toWallPoly() Unimplemented!"); + + // Clockwise polygon construction + + ShapeLike::addVertex(rsh, topleft_vertex); + + if(dir == Dir::LEFT) reverseAddOthers(); + else { + ShapeLike::addVertex(rsh, getX(topleft_vertex), 0); + ShapeLike::addVertex(rsh, getX(bottomleft_vertex), 0); + } + + ShapeLike::addVertex(rsh, bottomleft_vertex); + + if(dir == Dir::LEFT) { + ShapeLike::addVertex(rsh, 0, getY(bottomleft_vertex)); + ShapeLike::addVertex(rsh, 0, getY(topleft_vertex)); + } + else reverseAddOthers(); + + + // Close the polygon + ShapeLike::addVertex(rsh, topleft_vertex); + + return rsh; + } + +}; + +} +} + +#endif //BOTTOMLEFT_HPP diff --git a/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp b/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp new file mode 100644 index 000000000..b9d6741d0 --- /dev/null +++ b/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp @@ -0,0 +1,31 @@ +#ifndef NOFITPOLY_HPP +#define NOFITPOLY_HPP + +#include "placer_boilerplate.hpp" + +namespace libnest2d { namespace strategies { + +template +class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer, + RawShape, _Box>> { + + using Base = PlacerBoilerplate<_NofitPolyPlacer, + RawShape, _Box>>; + + DECLARE_PLACER(Base) + +public: + + inline explicit _NofitPolyPlacer(const BinType& bin): Base(bin) {} + + PackResult trypack(Item& item) { + + return PackResult(); + } + +}; + +} +} + +#endif // NOFITPOLY_H diff --git a/xs/src/libnest2d/libnest2d/placers/placer_boilerplate.hpp b/xs/src/libnest2d/libnest2d/placers/placer_boilerplate.hpp new file mode 100644 index 000000000..1d82a5e66 --- /dev/null +++ b/xs/src/libnest2d/libnest2d/placers/placer_boilerplate.hpp @@ -0,0 +1,102 @@ +#ifndef PLACER_BOILERPLATE_HPP +#define PLACER_BOILERPLATE_HPP + +#include "../libnest2d.hpp" + +namespace libnest2d { namespace strategies { + +struct EmptyConfig {}; + +template>> + > +class PlacerBoilerplate { +public: + using Item = _Item; + using Vertex = TPoint; + using Segment = _Segment; + using BinType = TBin; + using Coord = TCoord; + using Unit = Coord; + using Config = Cfg; + using Container = Store; + + class PackResult { + Item *item_ptr_; + Vertex move_; + Radians rot_; + friend class PlacerBoilerplate; + friend Subclass; + PackResult(Item& item): + item_ptr_(&item), + move_(item.translation()), + rot_(item.rotation()) {} + PackResult(): item_ptr_(nullptr) {} + public: + operator bool() { return item_ptr_ != nullptr; } + }; + + using ItemGroup = const Container&; + + inline PlacerBoilerplate(const BinType& bin): bin_(bin) {} + + inline const BinType& bin() const BP2D_NOEXCEPT { return bin_; } + + template inline void bin(TB&& b) { + bin_ = std::forward(b); + } + + inline void configure(const Config& config) BP2D_NOEXCEPT { + config_ = config; + } + + bool pack(Item& item) { + auto&& r = static_cast(this)->trypack(item); + if(r) items_.push_back(*(r.item_ptr_)); + return r; + } + + void accept(PackResult& r) { + if(r) { + r.item_ptr_->translation(r.move_); + r.item_ptr_->rotation(r.rot_); + items_.push_back(*(r.item_ptr_)); + } + } + + void unpackLast() { items_.pop_back(); } + + inline ItemGroup getItems() { return items_; } + + inline void clearItems() { items_.clear(); } + +protected: + + BinType bin_; + Container items_; + Cfg config_; + +}; + + +#define DECLARE_PLACER(Base) \ +using Base::bin_; \ +using Base::items_; \ +using Base::config_; \ +public: \ +using typename Base::Item; \ +using typename Base::BinType; \ +using typename Base::Config; \ +using typename Base::Vertex; \ +using typename Base::Segment; \ +using typename Base::PackResult; \ +using typename Base::Coord; \ +using typename Base::Unit; \ +using typename Base::Container; \ +private: + +} +} + +#endif // PLACER_BOILERPLATE_HPP diff --git a/xs/src/libnest2d/libnest2d/selections/djd_heuristic.hpp b/xs/src/libnest2d/libnest2d/selections/djd_heuristic.hpp new file mode 100644 index 000000000..8ae77bbb3 --- /dev/null +++ b/xs/src/libnest2d/libnest2d/selections/djd_heuristic.hpp @@ -0,0 +1,514 @@ +#ifndef DJD_HEURISTIC_HPP +#define DJD_HEURISTIC_HPP + +#include +#include "selection_boilerplate.hpp" + +namespace libnest2d { namespace strategies { + +/** + * Selection heuristic based on [López-Camacho]\ + * (http://www.cs.stir.ac.uk/~goc/papers/EffectiveHueristic2DAOR2013.pdf) + */ +template +class _DJDHeuristic: public SelectionBoilerplate { + using Base = SelectionBoilerplate; +public: + using typename Base::Item; + using typename Base::ItemRef; + + /** + * @brief The Config for DJD heuristic. + */ + struct Config { + /// Max number of bins. + unsigned max_bins = 0; + + /** + * If true, the algorithm will try to place pair and driplets in all + * possible order. + */ + bool try_reverse_order = true; + }; + +private: + using Base::packed_bins_; + using ItemGroup = typename Base::ItemGroup; + + using Container = ItemGroup;//typename std::vector; + Container store_; + Config config_; + + // The initial fill proportion of the bin area that will be filled before + // trying items one by one, or pairs or triplets. + static const double INITIAL_FILL_PROPORTION; + +public: + + inline void configure(const Config& config) { + config_ = config; + } + + template::BinType, + class PConfig = typename PlacementStrategyLike::Config> + void packItems( TIterator first, + TIterator last, + const TBin& bin, + PConfig&& pconfig = PConfig() ) + { + using Placer = PlacementStrategyLike; + using ItemList = std::list; + + const double bin_area = ShapeLike::area(bin); + const double w = bin_area * 0.1; + const double INITIAL_FILL_AREA = bin_area*INITIAL_FILL_PROPORTION; + + store_.clear(); + store_.reserve(last-first); + packed_bins_.clear(); + + std::copy(first, last, std::back_inserter(store_)); + + std::sort(store_.begin(), store_.end(), [](Item& i1, Item& i2) { + return i1.area() > i2.area(); + }); + + ItemList not_packed(store_.begin(), store_.end()); + + std::vector placers; + + double free_area = 0; + double filled_area = 0; + double waste = 0; + bool try_reverse = config_.try_reverse_order; + + // Will use a subroutine to add a new bin + auto addBin = [&placers, &free_area, &filled_area, &bin, &pconfig]() + { + placers.emplace_back(bin); + placers.back().configure(pconfig); + free_area = ShapeLike::area(bin); + filled_area = 0; + }; + + // Types for pairs and triplets + using TPair = std::tuple; + using TTriplet = std::tuple; + + + // Method for checking a pair whether it was a pack failure. + auto check_pair = [](const std::vector& wrong_pairs, + ItemRef i1, ItemRef i2) + { + return std::any_of(wrong_pairs.begin(), wrong_pairs.end(), + [&i1, &i2](const TPair& pair) + { + Item& pi1 = std::get<0>(pair), pi2 = std::get<1>(pair); + Item& ri1 = i1, ri2 = i2; + return (&pi1 == &ri1 && &pi2 == &ri2) || + (&pi1 == &ri2 && &pi2 == &ri1); + }); + }; + + // Method for checking if a triplet was a pack failure + auto check_triplet = []( + const std::vector& wrong_triplets, + ItemRef i1, + ItemRef i2, + ItemRef i3) + { + return std::any_of(wrong_triplets.begin(), + wrong_triplets.end(), + [&i1, &i2, &i3](const TTriplet& tripl) + { + Item& pi1 = std::get<0>(tripl); + Item& pi2 = std::get<1>(tripl); + Item& pi3 = std::get<2>(tripl); + Item& ri1 = i1, ri2 = i2, ri3 = i3; + return (&pi1 == &ri1 && &pi2 == &ri2 && &pi3 == &ri3) || + (&pi1 == &ri1 && &pi2 == &ri3 && &pi3 == &ri2) || + (&pi1 == &ri2 && &pi2 == &ri1 && &pi3 == &ri3) || + (&pi1 == &ri3 && &pi2 == &ri2 && &pi3 == &ri1); + }); + }; + + auto tryOneByOne = // Subroutine to try adding items one by one. + [¬_packed, &bin_area, &free_area, &filled_area] + (Placer& placer, double waste) + { + double item_area = 0; + bool ret = false; + auto it = not_packed.begin(); + + while(it != not_packed.end() && !ret && + free_area - (item_area = it->get().area()) <= waste) + { + if(item_area <= free_area && placer.pack(*it) ) { + free_area -= item_area; + filled_area = bin_area - free_area; + ret = true; + } else + it++; + } + + if(ret) not_packed.erase(it); + + return ret; + }; + + auto tryGroupsOfTwo = // Try adding groups of two items into the bin. + [¬_packed, &bin_area, &free_area, &filled_area, &check_pair, + try_reverse] + (Placer& placer, double waste) + { + double item_area = 0, largest_area = 0, smallest_area = 0; + double second_largest = 0, second_smallest = 0; + + const auto endit = not_packed.end(); + + if(not_packed.size() < 2) + return false; // No group of two items + else { + largest_area = not_packed.front().get().area(); + auto itmp = not_packed.begin(); itmp++; + second_largest = itmp->get().area(); + if( free_area - second_largest - largest_area > waste) + return false; // If even the largest two items do not fill + // the bin to the desired waste than we can end here. + + smallest_area = not_packed.back().get().area(); + itmp = endit; std::advance(itmp, -2); + second_smallest = itmp->get().area(); + } + + bool ret = false; + auto it = not_packed.begin(); + auto it2 = it; + + std::vector wrong_pairs; + + double largest = second_largest; + double smallest= smallest_area; + while(it != endit && !ret && free_area - + (item_area = it->get().area()) - largest <= waste ) + { + // if this is the last element, the next smallest is the + // previous item + auto itmp = it; std::advance(itmp, 1); + if(itmp == endit) smallest = second_smallest; + + if(item_area + smallest > free_area ) { it++; continue; } + + auto pr = placer.trypack(*it); + + // First would fit + it2 = not_packed.begin(); + double item2_area = 0; + while(it2 != endit && pr && !ret && free_area - + (item2_area = it2->get().area()) - item_area <= waste) + { + double area_sum = item_area + item2_area; + + if(it == it2 || area_sum > free_area || + check_pair(wrong_pairs, *it, *it2)) { + it2++; continue; + } + + placer.accept(pr); + auto pr2 = placer.trypack(*it2); + if(!pr2) { + placer.unpackLast(); // remove first + if(try_reverse) { + pr2 = placer.trypack(*it2); + if(pr2) { + placer.accept(pr2); + auto pr12 = placer.trypack(*it); + if(pr12) { + placer.accept(pr12); + ret = true; + } else { + placer.unpackLast(); + } + } + } + } else { + placer.accept(pr2); ret = true; + } + + if(ret) + { // Second fits as well + free_area -= area_sum; + filled_area = bin_area - free_area; + } else { + wrong_pairs.emplace_back(*it, *it2); + it2++; + } + } + + if(!ret) it++; + + largest = largest_area; + } + + if(ret) { not_packed.erase(it); not_packed.erase(it2); } + + return ret; + }; + + auto tryGroupsOfThree = // Try adding groups of three items. + [¬_packed, &bin_area, &free_area, &filled_area, + &check_pair, &check_triplet, try_reverse] + (Placer& placer, double waste) + { + + if(not_packed.size() < 3) return false; + + auto it = not_packed.begin(); // from + const auto endit = not_packed.end(); // to + auto it2 = it, it3 = it; + + // Containers for pairs and triplets that were tried before and + // do not work. + std::vector wrong_pairs; + std::vector wrong_triplets; + + // Will be true if a succesfull pack can be made. + bool ret = false; + + while (it != endit && !ret) { // drill down 1st level + + // We need to determine in each iteration the largest, second + // largest, smallest and second smallest item in terms of area. + + auto first = not_packed.begin(); + Item& largest = it == first? *std::next(it) : *first; + + auto second = std::next(first); + Item& second_largest = it == second ? *std::next(it) : *second; + + double area_of_two_largest = + largest.area() + second_largest.area(); + + // Check if there is enough free area for the item and the two + // largest item + if(free_area - it->get().area() - area_of_two_largest > waste) + break; + + // Determine the area of the two smallest item. + auto last = std::prev(endit); + Item& smallest = it == last? *std::prev(it) : *last; + auto second_last = std::prev(last); + Item& second_smallest = it == second_last? *std::prev(it) : + *second_last; + + // Check if there is enough free area for the item and the two + // smallest item. + double area_of_two_smallest = + smallest.area() + second_smallest.area(); + + auto pr = placer.trypack(*it); + + // Check for free area and try to pack the 1st item... + if(!pr || it->get().area() + area_of_two_smallest > free_area) { + it++; continue; + } + + it2 = not_packed.begin(); + double rem2_area = free_area - largest.area(); + double a2_sum = it->get().area() + it2->get().area(); + + while(it2 != endit && !ret && + rem2_area - a2_sum <= waste) { // Drill down level 2 + + if(it == it2 || check_pair(wrong_pairs, *it, *it2)) { + it2++; continue; + } + + a2_sum = it->get().area() + it2->get().area(); + if(a2_sum + smallest.area() > free_area) { + it2++; continue; + } + + bool can_pack2 = false; + + placer.accept(pr); + auto pr2 = placer.trypack(*it2); + auto pr12 = pr; + if(!pr2) { + placer.unpackLast(); // remove first + if(try_reverse) { + pr2 = placer.trypack(*it2); + if(pr2) { + placer.accept(pr2); + pr12 = placer.trypack(*it); + if(pr12) can_pack2 = true; + placer.unpackLast(); + } + } + } else { + placer.unpackLast(); + can_pack2 = true; + } + + if(!can_pack2) { + wrong_pairs.emplace_back(*it, *it2); + it2++; + continue; + } + + // Now we have packed a group of 2 items. + // The 'smallest' variable now could be identical with + // it2 but we don't bother with that + + if(!can_pack2) { it2++; continue; } + + it3 = not_packed.begin(); + + double a3_sum = a2_sum + it3->get().area(); + + while(it3 != endit && !ret && + free_area - a3_sum <= waste) { // 3rd level + + if(it3 == it || it3 == it2 || + check_triplet(wrong_triplets, *it, *it2, *it3)) + { it3++; continue; } + + placer.accept(pr12); placer.accept(pr2); + bool can_pack3 = placer.pack(*it3); + + if(!can_pack3) { + placer.unpackLast(); + placer.unpackLast(); + } + + if(!can_pack3 && try_reverse) { + + std::array indices = {0, 1, 2}; + std::array + candidates = {*it, *it2, *it3}; + + auto tryPack = [&placer, &candidates]( + const decltype(indices)& idx) + { + std::array packed = {false}; + + for(auto id : idx) packed[id] = + placer.pack(candidates[id]); + + bool check = + std::all_of(packed.begin(), + packed.end(), + [](bool b) { return b; }); + + if(!check) for(bool b : packed) if(b) + placer.unpackLast(); + + return check; + }; + + while (!can_pack3 && std::next_permutation( + indices.begin(), + indices.end())){ + can_pack3 = tryPack(indices); + }; + } + + if(can_pack3) { + // finishit + free_area -= a3_sum; + filled_area = bin_area - free_area; + ret = true; + } else { + wrong_triplets.emplace_back(*it, *it2, *it3); + it3++; + } + + } // 3rd while + + if(!ret) it2++; + + } // Second while + + if(!ret) it++; + + } // First while + + if(ret) { // If we eventually succeeded, remove all the packed ones. + not_packed.erase(it); + not_packed.erase(it2); + not_packed.erase(it3); + } + + return ret; + }; + + addBin(); + + // Safety test: try to pack each item into an empty bin. If it fails + // then it should be removed from the not_packed list + { auto it = not_packed.begin(); + while (it != not_packed.end()) { + Placer p(bin); + if(!p.pack(*it)) { + auto itmp = it++; + not_packed.erase(itmp); + } else it++; + } + } + + while(!not_packed.empty()) { + + auto& placer = placers.back(); + + {// Fill the bin up to INITIAL_FILL_PROPORTION of its capacity + auto it = not_packed.begin(); + + while(it != not_packed.end() && + filled_area < INITIAL_FILL_AREA) + { + if(placer.pack(*it)) { + filled_area += it->get().area(); + free_area = bin_area - filled_area; + auto itmp = it++; + not_packed.erase(itmp); + } else it++; + } + } + + // try pieses one by one + while(tryOneByOne(placer, waste)) + waste = 0; + + // try groups of 2 pieses + while(tryGroupsOfTwo(placer, waste)) + waste = 0; + + // try groups of 3 pieses + while(tryGroupsOfThree(placer, waste)) + waste = 0; + + if(waste < free_area) waste += w; + else if(!not_packed.empty()) addBin(); + } + + std::for_each(placers.begin(), placers.end(), + [this](Placer& placer){ + packed_bins_.push_back(placer.getItems()); + }); + } +}; + +/* + * The initial fill proportion suggested by + * [López-Camacho]\ + * (http://www.cs.stir.ac.uk/~goc/papers/EffectiveHueristic2DAOR2013.pdf) + * is one third of the area of bin. + */ +template +const double _DJDHeuristic::INITIAL_FILL_PROPORTION = 1.0/3.0; + +} +} + +#endif // DJD_HEURISTIC_HPP diff --git a/xs/src/libnest2d/libnest2d/selections/filler.hpp b/xs/src/libnest2d/libnest2d/selections/filler.hpp new file mode 100644 index 000000000..96c5da4a1 --- /dev/null +++ b/xs/src/libnest2d/libnest2d/selections/filler.hpp @@ -0,0 +1,71 @@ +#ifndef FILLER_HPP +#define FILLER_HPP + +#include "selection_boilerplate.hpp" + +namespace libnest2d { namespace strategies { + +template +class _FillerSelection: public SelectionBoilerplate { + using Base = SelectionBoilerplate; +public: + using typename Base::Item; + using Config = int; //dummy + +private: + using Base::packed_bins_; + using typename Base::ItemGroup; + using Container = ItemGroup; + Container store_; + +public: + + void configure(const Config& /*config*/) { } + + template::BinType, + class PConfig = typename PlacementStrategyLike::Config> + void packItems(TIterator first, + TIterator last, + TBin&& bin, + PConfig&& pconfig = PConfig()) + { + + store_.clear(); + store_.reserve(last-first); + packed_bins_.clear(); + + std::copy(first, last, std::back_inserter(store_)); + + auto sortfunc = [](Item& i1, Item& i2) { + return i1.area() > i2.area(); + }; + + std::sort(store_.begin(), store_.end(), sortfunc); + +// Container a = {store_[0], store_[1], store_[4], store_[5] }; +//// a.insert(a.end(), store_.end()-10, store_.end()); +// store_ = a; + + PlacementStrategyLike placer(bin); + placer.configure(pconfig); + + bool was_packed = false; + for(auto& item : store_ ) { + if(!placer.pack(item)) { + packed_bins_.push_back(placer.getItems()); + placer.clearItems(); + was_packed = placer.pack(item); + } else was_packed = true; + } + + if(was_packed) { + packed_bins_.push_back(placer.getItems()); + } + } +}; + +} +} + +#endif //BOTTOMLEFT_HPP diff --git a/xs/src/libnest2d/libnest2d/selections/firstfit.hpp b/xs/src/libnest2d/libnest2d/selections/firstfit.hpp new file mode 100644 index 000000000..cf8f6da0b --- /dev/null +++ b/xs/src/libnest2d/libnest2d/selections/firstfit.hpp @@ -0,0 +1,77 @@ +#ifndef FIRSTFIT_HPP +#define FIRSTFIT_HPP + +#include "../libnest2d.hpp" +#include "selection_boilerplate.hpp" + +namespace libnest2d { namespace strategies { + +template +class _FirstFitSelection: public SelectionBoilerplate { + using Base = SelectionBoilerplate; +public: + using typename Base::Item; + using Config = int; //dummy + +private: + using Base::packed_bins_; + using typename Base::ItemGroup; + using Container = ItemGroup;//typename std::vector<_Item>; + + Container store_; + +public: + + void configure(const Config& /*config*/) { } + + template::BinType, + class PConfig = typename PlacementStrategyLike::Config> + void packItems(TIterator first, + TIterator last, + TBin&& bin, + PConfig&& pconfig = PConfig()) + { + + using Placer = PlacementStrategyLike; + + store_.clear(); + store_.reserve(last-first); + packed_bins_.clear(); + + std::vector placers; + + std::copy(first, last, std::back_inserter(store_)); + + auto sortfunc = [](Item& i1, Item& i2) { + return i1.area() > i2.area(); + }; + + std::sort(store_.begin(), store_.end(), sortfunc); + + for(auto& item : store_ ) { + bool was_packed = false; + while(!was_packed) { + + for(size_t j = 0; j < placers.size() && !was_packed; j++) + was_packed = placers[j].pack(item); + + if(!was_packed) { + placers.emplace_back(bin); + placers.back().configure(pconfig); + } + } + } + + std::for_each(placers.begin(), placers.end(), + [this](Placer& placer){ + packed_bins_.push_back(placer.getItems()); + }); + } + +}; + +} +} + +#endif // FIRSTFIT_HPP diff --git a/xs/src/libnest2d/libnest2d/selections/selection_boilerplate.hpp b/xs/src/libnest2d/libnest2d/selections/selection_boilerplate.hpp new file mode 100644 index 000000000..8af489a30 --- /dev/null +++ b/xs/src/libnest2d/libnest2d/selections/selection_boilerplate.hpp @@ -0,0 +1,36 @@ +#ifndef SELECTION_BOILERPLATE_HPP +#define SELECTION_BOILERPLATE_HPP + +#include "../libnest2d.hpp" + +namespace libnest2d { +namespace strategies { + +template +class SelectionBoilerplate { +public: + using Item = _Item; + using ItemRef = std::reference_wrapper; + using ItemGroup = std::vector; + using PackGroup = std::vector; + + size_t binCount() const { return packed_bins_.size(); } + + ItemGroup itemsForBin(size_t binIndex) { + assert(binIndex < packed_bins_.size()); + return packed_bins_[binIndex]; + } + + inline const ItemGroup itemsForBin(size_t binIndex) const { + assert(binIndex < packed_bins_.size()); + return packed_bins_[binIndex]; + } + +protected: + PackGroup packed_bins_; +}; + +} +} + +#endif // SELECTION_BOILERPLATE_HPP diff --git a/xs/src/libnest2d/tests/CMakeLists.txt b/xs/src/libnest2d/tests/CMakeLists.txt new file mode 100644 index 000000000..bfe32bfeb --- /dev/null +++ b/xs/src/libnest2d/tests/CMakeLists.txt @@ -0,0 +1,48 @@ + +# Try to find existing GTest installation +find_package(GTest QUIET) + +if(NOT GTEST_FOUND) + # Go and download google test framework, integrate it with the build + set(GTEST_LIBRARIES gtest gmock) + + if (CMAKE_VERSION VERSION_LESS 3.2) + set(UPDATE_DISCONNECTED_IF_AVAILABLE "") + else() + set(UPDATE_DISCONNECTED_IF_AVAILABLE "UPDATE_DISCONNECTED 1") + endif() + + include(DownloadProject) + download_project(PROJ googletest + GIT_REPOSITORY https://github.com/google/googletest.git + GIT_TAG release-1.8.0 + ${UPDATE_DISCONNECTED_IF_AVAILABLE} + ) + + # Prevent GoogleTest from overriding our compiler/linker options + # when building with Visual Studio + set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) + + add_subdirectory(${googletest_SOURCE_DIR} + ${googletest_BINARY_DIR} + ) + +else() + include_directories(${GTEST_INCLUDE_DIRS} ) +endif() + +include_directories(BEFORE ${LIBNEST2D_HEADERS}) +add_executable(bp2d_tests test.cpp printer_parts.h printer_parts.cpp) +target_link_libraries(bp2d_tests libnest2d + ${GTEST_LIBRARIES} +) + +if(DEFINED LIBNEST2D_TEST_LIBRARIES) + target_link_libraries(bp2d_tests ${LIBNEST2D_TEST_LIBRARIES}) +endif() + +add_test(gtests bp2d_tests) + +add_executable(main EXCLUDE_FROM_ALL main.cpp printer_parts.cpp printer_parts.h) +target_link_libraries(main libnest2d) +target_include_directories(main PUBLIC ${CMAKE_SOURCE_DIR}) diff --git a/xs/src/libnest2d/tests/benchmark.h b/xs/src/libnest2d/tests/benchmark.h new file mode 100644 index 000000000..19870b37b --- /dev/null +++ b/xs/src/libnest2d/tests/benchmark.h @@ -0,0 +1,58 @@ +/* + * Copyright (C) Tamás Mészáros + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +#ifndef INCLUDE_BENCHMARK_H_ +#define INCLUDE_BENCHMARK_H_ + +#include +#include + +/** + * A class for doing benchmarks. + */ +class Benchmark { + typedef std::chrono::high_resolution_clock Clock; + typedef Clock::duration Duration; + typedef Clock::time_point TimePoint; + + TimePoint t1, t2; + Duration d; + + inline double to_sec(Duration d) { + return d.count() * double(Duration::period::num) / Duration::period::den; + } + +public: + + /** + * Measure time from the moment of this call. + */ + void start() { t1 = Clock::now(); } + + /** + * Measure time to the moment of this call. + */ + void stop() { t2 = Clock::now(); } + + /** + * Get the time elapsed between a start() end a stop() call. + * @return Returns the elapsed time in seconds. + */ + double getElapsedSec() { d = t2 - t1; return to_sec(d); } +}; + + +#endif /* INCLUDE_BENCHMARK_H_ */ diff --git a/xs/src/libnest2d/tests/main.cpp b/xs/src/libnest2d/tests/main.cpp new file mode 100644 index 000000000..3d5baca76 --- /dev/null +++ b/xs/src/libnest2d/tests/main.cpp @@ -0,0 +1,260 @@ +#include +#include +#include + +#include +#include + +#include "printer_parts.h" +#include "benchmark.h" + +namespace { +using namespace libnest2d; +using ItemGroup = std::vector>; +//using PackGroup = std::vector; + +template +void exportSVG(PackGroup& result, const Bin& bin) { + + std::string loc = "out"; + + static std::string svg_header = +R"raw( + + +)raw"; + + int i = 0; + for(auto r : result) { + std::fstream out(loc + std::to_string(i) + ".svg", std::fstream::out); + if(out.is_open()) { + out << svg_header; + Item rbin( Rectangle(bin.width(), bin.height()) ); + for(unsigned i = 0; i < rbin.vertexCount(); i++) { + auto v = rbin.vertex(i); + setY(v, -getY(v)/SCALE + 500 ); + setX(v, getX(v)/SCALE); + rbin.setVertex(i, v); + } + out << ShapeLike::serialize(rbin.rawShape()) << std::endl; + for(Item& sh : r) { + Item tsh(sh.transformedShape()); + for(unsigned i = 0; i < tsh.vertexCount(); i++) { + auto v = tsh.vertex(i); + setY(v, -getY(v)/SCALE + 500); + setX(v, getX(v)/SCALE); + tsh.setVertex(i, v); + } + out << ShapeLike::serialize(tsh.rawShape()) << std::endl; + } + out << "\n" << std::endl; + } + out.close(); + + i++; + } +} + +template< int SCALE, class Bin> +void exportSVG(ItemGroup& result, const Bin& bin, int idx) { + + std::string loc = "out"; + + static std::string svg_header = +R"raw( + + +)raw"; + + int i = idx; + auto r = result; +// for(auto r : result) { + std::fstream out(loc + std::to_string(i) + ".svg", std::fstream::out); + if(out.is_open()) { + out << svg_header; + Item rbin( Rectangle(bin.width(), bin.height()) ); + for(unsigned i = 0; i < rbin.vertexCount(); i++) { + auto v = rbin.vertex(i); + setY(v, -getY(v)/SCALE + 500 ); + setX(v, getX(v)/SCALE); + rbin.setVertex(i, v); + } + out << ShapeLike::serialize(rbin.rawShape()) << std::endl; + for(Item& sh : r) { + Item tsh(sh.transformedShape()); + for(unsigned i = 0; i < tsh.vertexCount(); i++) { + auto v = tsh.vertex(i); + setY(v, -getY(v)/SCALE + 500); + setX(v, getX(v)/SCALE); + tsh.setVertex(i, v); + } + out << ShapeLike::serialize(tsh.rawShape()) << std::endl; + } + out << "\n" << std::endl; + } + out.close(); + +// i++; +// } +} +} + + +void findDegenerateCase() { + using namespace libnest2d; + + auto input = PRINTER_PART_POLYGONS; + + auto scaler = [](Item& item) { + for(unsigned i = 0; i < item.vertexCount(); i++) { + auto v = item.vertex(i); + setX(v, 100*getX(v)); setY(v, 100*getY(v)); + item.setVertex(i, v); + } + }; + + auto cmp = [](const Item& t1, const Item& t2) { + return t1.area() > t2.area(); + }; + + std::for_each(input.begin(), input.end(), scaler); + + std::sort(input.begin(), input.end(), cmp); + + Box bin(210*100, 250*100); + BottomLeftPlacer placer(bin); + + auto it = input.begin(); + auto next = it; + int i = 0; + while(it != input.end() && ++next != input.end()) { + placer.pack(*it); + placer.pack(*next); + + auto result = placer.getItems(); + bool valid = true; + + if(result.size() == 2) { + Item& r1 = result[0]; + Item& r2 = result[1]; + valid = !Item::intersects(r1, r2) || Item::touches(r1, r2); + valid = (valid && !r1.isInside(r2) && !r2.isInside(r1)); + if(!valid) { + std::cout << "error index: " << i << std::endl; + exportSVG<100>(result, bin, i); + } + } else { + std::cout << "something went terribly wrong!" << std::endl; + } + + + placer.clearItems(); + it++; + i++; + } +} + +void arrangeRectangles() { + using namespace libnest2d; + + +// std::vector input = { +// {80, 80}, +// {110, 10}, +// {200, 5}, +// {80, 30}, +// {60, 90}, +// {70, 30}, +// {80, 60}, +// {60, 60}, +// {60, 40}, +// {40, 40}, +// {10, 10}, +// {10, 10}, +// {10, 10}, +// {10, 10}, +// {10, 10}, +// {5, 5}, +// {5, 5}, +// {5, 5}, +// {5, 5}, +// {5, 5}, +// {5, 5}, +// {5, 5}, +// {20, 20}, +// {80, 80}, +// {110, 10}, +// {200, 5}, +// {80, 30}, +// {60, 90}, +// {70, 30}, +// {80, 60}, +// {60, 60}, +// {60, 40}, +// {40, 40}, +// {10, 10}, +// {10, 10}, +// {10, 10}, +// {10, 10}, +// {10, 10}, +// {5, 5}, +// {5, 5}, +// {5, 5}, +// {5, 5}, +// {5, 5}, +// {5, 5}, +// {5, 5}, +// {20, 20} +// }; + + auto input = PRINTER_PART_POLYGONS; + + const int SCALE = 1000000; +// const int SCALE = 1; + + Box bin(210*SCALE, 250*SCALE); + + auto scaler = [&SCALE, &bin](Item& item) { +// double max_area = 0; + for(unsigned i = 0; i < item.vertexCount(); i++) { + auto v = item.vertex(i); + setX(v, SCALE*getX(v)); setY(v, SCALE*getY(v)); + item.setVertex(i, v); +// double area = item.area(); +// if(max_area < area) { +// max_area = area; +// bin = item.boundingBox(); +// } + } + }; + + Coord min_obj_distance = 2*SCALE; + + std::for_each(input.begin(), input.end(), scaler); + + Arranger arrange(bin, min_obj_distance); + + Benchmark bench; + + bench.start(); + auto result = arrange(input.begin(), + input.end()); + + bench.stop(); + + std::cout << bench.getElapsedSec() << std::endl; + + for(auto& it : input) { + auto ret = ShapeLike::isValid(it.transformedShape()); + std::cout << ret.second << std::endl; + } + + exportSVG(result, bin); + +} + +int main(void /*int argc, char **argv*/) { + arrangeRectangles(); +// findDegenerateCase(); + return EXIT_SUCCESS; +} diff --git a/xs/src/libnest2d/tests/printer_parts.cpp b/xs/src/libnest2d/tests/printer_parts.cpp new file mode 100644 index 000000000..02ea6bb7f --- /dev/null +++ b/xs/src/libnest2d/tests/printer_parts.cpp @@ -0,0 +1,339 @@ +#include "printer_parts.h" + +const std::vector PRINTER_PART_POLYGONS = { +{ + {120, 114}, + {130, 114}, + {130, 103}, + {128, 96}, + {122, 96}, + {120, 103}, + {120, 114} +}, +{ + {61, 97}, + {70, 151}, + {176, 151}, + {189, 138}, + {189, 59}, + {70, 59}, + {61, 77}, + {61, 97} +}, +{ + {72, 147}, + {94, 151}, + {178, 151}, + {178, 59}, + {72, 59}, + {72, 147} +}, +{ + {121, 119}, + {123, 119}, + {129, 109}, + {129, 107}, + {128, 100}, + {127, 98}, + {123, 91}, + {121, 91}, + {121, 119}, +}, +{ + {93, 104}, + {100, 146}, + {107, 152}, + {136, 152}, + {142, 146}, + {157, 68}, + {157, 61}, + {154, 58}, + {104, 58}, + {93, 101}, + {93, 104}, +}, +{ + {90, 91}, + {114, 130}, + {158, 130}, + {163, 126}, + {163, 123}, + {152, 80}, + {116, 80}, + {90, 81}, + {87, 86}, + {90, 91}, +}, +{ + {111, 114}, + {114, 122}, + {139, 122}, + {139, 88}, + {114, 88}, + {111, 97}, + {111, 114}, +}, +{ + {120, 107}, + {125, 110}, + {130, 110}, + {130, 100}, + {120, 100}, + {120, 107}, +}, +{ + {113, 123}, + {137, 123}, + {137, 87}, + {113, 87}, + {113, 123}, +}, +{ + {107, 104}, + {110, 127}, + {114, 131}, + {136, 131}, + {140, 127}, + {143, 104}, + {143, 79}, + {107, 79}, + {107, 104}, +}, +{ + {48, 135}, + {50, 138}, + {52, 140}, + {198, 140}, + {202, 135}, + {202, 72}, + {200, 70}, + {50, 70}, + {48, 72}, + {48, 135}, +}, +{ + {115, 104}, + {116, 106}, + {123, 119}, + {127, 119}, + {134, 106}, + {135, 104}, + {135, 98}, + {134, 96}, + {132, 93}, + {128, 91}, + {122, 91}, + {118, 93}, + {116, 96}, + {115, 98}, + {115, 104}, +}, +{ + {91, 100}, + {94, 144}, + {117, 153}, + {118, 153}, + {159, 112}, + {159, 110}, + {156, 66}, + {133, 57}, + {132, 57}, + {91, 98}, + {91, 100}, +}, +{ + {101, 90}, + {103, 98}, + {107, 113}, + {114, 125}, + {115, 126}, + {135, 126}, + {136, 125}, + {144, 114}, + {149, 90}, + {149, 89}, + {148, 87}, + {145, 84}, + {105, 84}, + {102, 87}, + {101, 89}, + {101, 90}, +}, +{ + {93, 116}, + {94, 118}, + {141, 121}, + {151, 121}, + {156, 118}, + {157, 116}, + {157, 91}, + {156, 89}, + {94, 89}, + {93, 91}, + {93, 116}, +}, +{ + {89, 60}, + {91, 66}, + {134, 185}, + {139, 198}, + {140, 200}, + {141, 201}, + {159, 201}, + {161, 199}, + {161, 195}, + {157, 179}, + {114, 26}, + {110, 12}, + {108, 10}, + {106, 9}, + {92, 9}, + {89, 50}, + {89, 60}, +}, +{ + {99, 130}, + {101, 133}, + {118, 150}, + {142, 150}, + {145, 148}, + {151, 142}, + {151, 80}, + {142, 62}, + {139, 60}, + {111, 60}, + {108, 62}, + {102, 80}, + {99, 95}, + {99, 130}, +}, +{ + {99, 122}, + {108, 140}, + {110, 142}, + {139, 142}, + {151, 122}, + {151, 102}, + {142, 70}, + {139, 68}, + {111, 68}, + {108, 70}, + {99, 102}, + {99, 122}, +}, +{ + {107, 124}, + {128, 125}, + {133, 125}, + {136, 124}, + {140, 121}, + {142, 119}, + {143, 116}, + {143, 109}, + {141, 93}, + {139, 89}, + {136, 86}, + {134, 85}, + {108, 85}, + {107, 86}, + {107, 124}, +}, +{ + {107, 146}, + {124, 146}, + {141, 96}, + {143, 79}, + {143, 73}, + {142, 70}, + {140, 68}, + {136, 65}, + {134, 64}, + {127, 64}, + {107, 65}, + {107, 146}, +}, +{ + {113, 118}, + {115, 120}, + {129, 129}, + {137, 129}, + {137, 81}, + {129, 81}, + {115, 90}, + {113, 92}, + {113, 118}, +}, +{ + {112, 122}, + {138, 122}, + {138, 88}, + {112, 88}, + {112, 122}, +}, +{ + {102, 116}, + {111, 126}, + {114, 126}, + {144, 106}, + {148, 100}, + {148, 85}, + {147, 84}, + {102, 84}, + {102, 116}, +}, +{ + {112, 110}, + {121, 112}, + {129, 112}, + {138, 110}, + {138, 106}, + {134, 98}, + {117, 98}, + {114, 102}, + {112, 106}, + {112, 110}, +}, +{ + {100, 156}, + {102, 158}, + {104, 159}, + {143, 159}, + {150, 152}, + {150, 58}, + {143, 51}, + {104, 51}, + {102, 52}, + {100, 54}, + {100, 156} +}, +{ + {106, 151}, + {108, 151}, + {139, 139}, + {144, 134}, + {144, 76}, + {139, 71}, + {108, 59}, + {106, 59}, + {106, 151} +}, +{ + {117, 107}, + {118, 109}, + {120, 112}, + {122, 113}, + {128, 113}, + {130, 112}, + {132, 109}, + {133, 107}, + {133, 103}, + {132, 101}, + {130, 98}, + {128, 97}, + {122, 97}, + {120, 98}, + {118, 101}, + {117, 103}, + {117, 107} +} +}; diff --git a/xs/src/libnest2d/tests/printer_parts.h b/xs/src/libnest2d/tests/printer_parts.h new file mode 100644 index 000000000..3d101810e --- /dev/null +++ b/xs/src/libnest2d/tests/printer_parts.h @@ -0,0 +1,9 @@ +#ifndef PRINTER_PARTS_H +#define PRINTER_PARTS_H + +#include +#include + +extern const std::vector PRINTER_PART_POLYGONS; + +#endif // PRINTER_PARTS_H diff --git a/xs/src/libnest2d/tests/test.cpp b/xs/src/libnest2d/tests/test.cpp new file mode 100644 index 000000000..c7fef3246 --- /dev/null +++ b/xs/src/libnest2d/tests/test.cpp @@ -0,0 +1,474 @@ +#include "gtest/gtest.h" +#include "gmock/gmock.h" +#include + +#include +#include "printer_parts.h" +#include +#include + +TEST(BasicFunctionality, Angles) +{ + + using namespace libnest2d; + + Degrees deg(180); + Radians rad(deg); + Degrees deg2(rad); + + ASSERT_DOUBLE_EQ(rad, Pi); + ASSERT_DOUBLE_EQ(deg, 180); + ASSERT_DOUBLE_EQ(deg2, 180); + ASSERT_DOUBLE_EQ(rad, (Radians) deg); + ASSERT_DOUBLE_EQ( (Degrees) rad, deg); + + ASSERT_TRUE(rad == deg); + +} + +// Simple test, does not use gmock +TEST(BasicFunctionality, creationAndDestruction) +{ + using namespace libnest2d; + + Item sh = { {0, 0}, {1, 0}, {1, 1}, {0, 1} }; + + ASSERT_EQ(sh.vertexCount(), 4); + + Item sh2 ({ {0, 0}, {1, 0}, {1, 1}, {0, 1} }); + + ASSERT_EQ(sh2.vertexCount(), 4); + + // copy + Item sh3 = sh2; + + ASSERT_EQ(sh3.vertexCount(), 4); + + sh2 = {}; + + ASSERT_EQ(sh2.vertexCount(), 0); + ASSERT_EQ(sh3.vertexCount(), 4); + +} + +TEST(GeometryAlgorithms, Distance) { + using namespace libnest2d; + + Point p1 = {0, 0}; + + Point p2 = {10, 0}; + Point p3 = {10, 10}; + + ASSERT_DOUBLE_EQ(PointLike::distance(p1, p2), 10); + ASSERT_DOUBLE_EQ(PointLike::distance(p1, p3), sqrt(200)); + + Segment seg(p1, p3); + + ASSERT_DOUBLE_EQ(PointLike::distance(p2, seg), 7.0710678118654755); + + auto result = PointLike::horizontalDistance(p2, seg); + + auto check = [](Coord val, Coord expected) { + if(std::is_floating_point::value) + ASSERT_DOUBLE_EQ(static_cast(val), expected); + else + ASSERT_EQ(val, expected); + }; + + ASSERT_TRUE(result.second); + check(result.first, 10); + + result = PointLike::verticalDistance(p2, seg); + ASSERT_TRUE(result.second); + check(result.first, -10); + + result = PointLike::verticalDistance(Point{10, 20}, seg); + ASSERT_TRUE(result.second); + check(result.first, 10); + + + Point p4 = {80, 0}; + Segment seg2 = { {0, 0}, {0, 40} }; + + result = PointLike::horizontalDistance(p4, seg2); + + ASSERT_TRUE(result.second); + check(result.first, 80); + + result = PointLike::verticalDistance(p4, seg2); + // Point should not be related to the segment + ASSERT_FALSE(result.second); + +} + +TEST(GeometryAlgorithms, Area) { + using namespace libnest2d; + + Rectangle rect(10, 10); + + ASSERT_EQ(rect.area(), 100); + + Rectangle rect2 = {100, 100}; + + ASSERT_EQ(rect2.area(), 10000); + +} + +TEST(GeometryAlgorithms, IsPointInsidePolygon) { + using namespace libnest2d; + + Rectangle rect(10, 10); + + Point p = {1, 1}; + + ASSERT_TRUE(rect.isPointInside(p)); + + p = {11, 11}; + + ASSERT_FALSE(rect.isPointInside(p)); + + + p = {11, 12}; + + ASSERT_FALSE(rect.isPointInside(p)); + + + p = {3, 3}; + + ASSERT_TRUE(rect.isPointInside(p)); + +} + +//TEST(GeometryAlgorithms, Intersections) { +// using namespace binpack2d; + +// Rectangle rect(70, 30); + +// rect.translate({80, 60}); + +// Rectangle rect2(80, 60); +// rect2.translate({80, 0}); + +//// ASSERT_FALSE(Item::intersects(rect, rect2)); + +// Segment s1({0, 0}, {10, 10}); +// Segment s2({1, 1}, {11, 11}); +// ASSERT_FALSE(ShapeLike::intersects(s1, s1)); +// ASSERT_FALSE(ShapeLike::intersects(s1, s2)); +//} + +// Simple test, does not use gmock +TEST(GeometryAlgorithms, LeftAndDownPolygon) +{ + using namespace libnest2d; + using namespace libnest2d; + + Box bin(100, 100); + BottomLeftPlacer placer(bin); + + Item item = {{70, 75}, {88, 60}, {65, 50}, {60, 30}, {80, 20}, {42, 20}, + {35, 35}, {35, 55}, {40, 75}, {70, 75}}; + + Item leftControl = { {40, 75}, + {35, 55}, + {35, 35}, + {42, 20}, + {0, 20}, + {0, 75}, + {40, 75}}; + + Item downControl = {{88, 60}, + {88, 0}, + {35, 0}, + {35, 35}, + {42, 20}, + {80, 20}, + {60, 30}, + {65, 50}, + {88, 60}}; + + Item leftp(placer.leftPoly(item)); + + ASSERT_TRUE(ShapeLike::isValid(leftp.rawShape()).first); + ASSERT_EQ(leftp.vertexCount(), leftControl.vertexCount()); + + for(size_t i = 0; i < leftControl.vertexCount(); i++) { + ASSERT_EQ(getX(leftp.vertex(i)), getX(leftControl.vertex(i))); + ASSERT_EQ(getY(leftp.vertex(i)), getY(leftControl.vertex(i))); + } + + Item downp(placer.downPoly(item)); + + ASSERT_TRUE(ShapeLike::isValid(downp.rawShape()).first); + ASSERT_EQ(downp.vertexCount(), downControl.vertexCount()); + + for(size_t i = 0; i < downControl.vertexCount(); i++) { + ASSERT_EQ(getX(downp.vertex(i)), getX(downControl.vertex(i))); + ASSERT_EQ(getY(downp.vertex(i)), getY(downControl.vertex(i))); + } +} + +// Simple test, does not use gmock +TEST(GeometryAlgorithms, ArrangeRectanglesTight) +{ + using namespace libnest2d; + + std::vector rects = { + {80, 80}, + {60, 90}, + {70, 30}, + {80, 60}, + {60, 60}, + {60, 40}, + {40, 40}, + {10, 10}, + {10, 10}, + {10, 10}, + {10, 10}, + {10, 10}, + {5, 5}, + {5, 5}, + {5, 5}, + {5, 5}, + {5, 5}, + {5, 5}, + {5, 5}, + {20, 20} }; + + + Arranger arrange(Box(210, 250)); + + auto groups = arrange(rects.begin(), rects.end()); + + ASSERT_EQ(groups.size(), 1); + ASSERT_EQ(groups[0].size(), rects.size()); + + // check for no intersections, no containment: + + for(auto result : groups) { + bool valid = true; + for(Item& r1 : result) { + for(Item& r2 : result) { + if(&r1 != &r2 ) { + valid = !Item::intersects(r1, r2) || Item::touches(r1, r2); + valid = (valid && !r1.isInside(r2) && !r2.isInside(r1)); + ASSERT_TRUE(valid); + } + } + } + } + +} + +TEST(GeometryAlgorithms, ArrangeRectanglesLoose) +{ + using namespace libnest2d; + +// std::vector rects = { {40, 40}, {10, 10}, {20, 20} }; + std::vector rects = { + {80, 80}, + {60, 90}, + {70, 30}, + {80, 60}, + {60, 60}, + {60, 40}, + {40, 40}, + {10, 10}, + {10, 10}, + {10, 10}, + {10, 10}, + {10, 10}, + {5, 5}, + {5, 5}, + {5, 5}, + {5, 5}, + {5, 5}, + {5, 5}, + {5, 5}, + {20, 20} }; + + Coord min_obj_distance = 5; + + Arranger arrange(Box(210, 250), + min_obj_distance); + + auto groups = arrange(rects.begin(), rects.end()); + + ASSERT_EQ(groups.size(), 1); + ASSERT_EQ(groups[0].size(), rects.size()); + + // check for no intersections, no containment: + auto result = groups[0]; + bool valid = true; + for(Item& r1 : result) { + for(Item& r2 : result) { + if(&r1 != &r2 ) { + valid = !Item::intersects(r1, r2); + valid = (valid && !r1.isInside(r2) && !r2.isInside(r1)); + ASSERT_TRUE(valid); + } + } + } + +} + +namespace { +using namespace libnest2d; + +template +void exportSVG(std::vector>& result, const Bin& bin, int idx = 0) { + + + std::string loc = "out"; + + static std::string svg_header = +R"raw( + + +)raw"; + + int i = idx; + auto r = result; +// for(auto r : result) { + std::fstream out(loc + std::to_string(i) + ".svg", std::fstream::out); + if(out.is_open()) { + out << svg_header; + Item rbin( Rectangle(bin.width(), bin.height()) ); + for(unsigned i = 0; i < rbin.vertexCount(); i++) { + auto v = rbin.vertex(i); + setY(v, -getY(v)/SCALE + 500 ); + setX(v, getX(v)/SCALE); + rbin.setVertex(i, v); + } + out << ShapeLike::serialize(rbin.rawShape()) << std::endl; + for(Item& sh : r) { + Item tsh(sh.transformedShape()); + for(unsigned i = 0; i < tsh.vertexCount(); i++) { + auto v = tsh.vertex(i); + setY(v, -getY(v)/SCALE + 500); + setX(v, getX(v)/SCALE); + tsh.setVertex(i, v); + } + out << ShapeLike::serialize(tsh.rawShape()) << std::endl; + } + out << "\n" << std::endl; + } + out.close(); + +// i++; +// } +} +} + +TEST(GeometryAlgorithms, BottomLeftStressTest) { + using namespace libnest2d; + + auto input = PRINTER_PART_POLYGONS; + + Box bin(210, 250); + BottomLeftPlacer placer(bin); + + auto it = input.begin(); + auto next = it; + int i = 0; + while(it != input.end() && ++next != input.end()) { + placer.pack(*it); + placer.pack(*next); + + auto result = placer.getItems(); + bool valid = true; + + if(result.size() == 2) { + Item& r1 = result[0]; + Item& r2 = result[1]; + valid = !Item::intersects(r1, r2) || Item::touches(r1, r2); + valid = (valid && !r1.isInside(r2) && !r2.isInside(r1)); + if(!valid) { + std::cout << "error index: " << i << std::endl; + exportSVG(result, bin, i); + } +// ASSERT_TRUE(valid); + } else { + std::cout << "something went terribly wrong!" << std::endl; + } + + + placer.clearItems(); + it++; + i++; + } +} + +TEST(GeometryAlgorithms, nfpConvexConvex) { + using namespace libnest2d; + + const unsigned long SCALE = 1; + + Box bin(210*SCALE, 250*SCALE); + + Item stationary = { + {120, 114}, + {130, 114}, + {130, 103}, + {128, 96}, + {122, 96}, + {120, 103}, + {120, 114} + }; + + Item orbiter = { + {72, 147}, + {94, 151}, + {178, 151}, + {178, 59}, + {72, 59}, + {72, 147} + }; + + orbiter.translate({210*SCALE, 0}); + + auto&& nfp = Nfp::noFitPolygon(stationary.rawShape(), + orbiter.transformedShape()); + + auto v = ShapeLike::isValid(nfp); + + if(!v.first) { + std::cout << v.second << std::endl; + } + + ASSERT_TRUE(v.first); + + Item infp(nfp); + + int i = 0; + auto rorbiter = orbiter.transformedShape(); + auto vo = *(ShapeLike::begin(rorbiter)); + for(auto v : infp) { + auto dx = getX(v) - getX(vo); + auto dy = getY(v) - getY(vo); + + Item tmp = orbiter; + + tmp.translate({dx, dy}); + + bool notinside = !tmp.isInside(stationary); + bool notintersecting = !Item::intersects(tmp, stationary); + + if(!(notinside && notintersecting)) { + std::vector> inp = { + std::ref(stationary), std::ref(tmp), std::ref(infp) + }; + + exportSVG(inp, bin, i++); + } + + //ASSERT_TRUE(notintersecting); + ASSERT_TRUE(notinside); + } + +} + +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/xs/src/libslic3r/Fill/FillRectilinear3.cpp b/xs/src/libslic3r/Fill/FillRectilinear3.cpp index 1e7e3a1cd..cccea3030 100644 --- a/xs/src/libslic3r/Fill/FillRectilinear3.cpp +++ b/xs/src/libslic3r/Fill/FillRectilinear3.cpp @@ -470,9 +470,9 @@ static bool prepare_infill_hatching_segments( int ir = std::min(int(out.segs.size()) - 1, (r - x0) / line_spacing); // The previous tests were done with floating point arithmetics over an epsilon-extended interval. // Now do the same tests with exact arithmetics over the exact interval. - while (il <= ir && Int128::orient(out.segs[il].pos, out.segs[il].pos + out.direction, *pl) < 0) + while (il <= ir && int128::orient(out.segs[il].pos, out.segs[il].pos + out.direction, *pl) < 0) ++ il; - while (il <= ir && Int128::orient(out.segs[ir].pos, out.segs[ir].pos + out.direction, *pr) > 0) + while (il <= ir && int128::orient(out.segs[ir].pos, out.segs[ir].pos + out.direction, *pr) > 0) -- ir; // Here it is ensured, that // 1) out.seg is not parallel to (pl, pr) @@ -489,8 +489,8 @@ static bool prepare_infill_hatching_segments( is.iSegment = iSegment; // Test whether the calculated intersection point falls into the bounding box of the input segment. // +-1 to take rounding into account. - assert(Int128::orient(out.segs[i].pos, out.segs[i].pos + out.direction, *pl) >= 0); - assert(Int128::orient(out.segs[i].pos, out.segs[i].pos + out.direction, *pr) <= 0); + assert(int128::orient(out.segs[i].pos, out.segs[i].pos + out.direction, *pl) >= 0); + assert(int128::orient(out.segs[i].pos, out.segs[i].pos + out.direction, *pr) <= 0); assert(is.pos().x + 1 >= std::min(pl->x, pr->x)); assert(is.pos().y + 1 >= std::min(pl->y, pr->y)); assert(is.pos().x <= std::max(pl->x, pr->x) + 1); @@ -527,7 +527,7 @@ static bool prepare_infill_hatching_segments( const Points &contour = poly_with_offset.contour(iContour).points; size_t iSegment = sil.intersections[i].iSegment; size_t iPrev = ((iSegment == 0) ? contour.size() : iSegment) - 1; - int dir = Int128::cross(contour[iSegment] - contour[iPrev], sil.dir); + int dir = int128::cross(contour[iSegment] - contour[iPrev], sil.dir); bool low = dir > 0; sil.intersections[i].type = poly_with_offset.is_contour_outer(iContour) ? (low ? SegmentIntersection::OUTER_LOW : SegmentIntersection::OUTER_HIGH) : diff --git a/xs/src/libslic3r/Int128.hpp b/xs/src/libslic3r/Int128.hpp index 7bf0c87b4..d54b75342 100644 --- a/xs/src/libslic3r/Int128.hpp +++ b/xs/src/libslic3r/Int128.hpp @@ -48,7 +48,6 @@ #endif #include -#include "Point.hpp" #if ! defined(_MSC_VER) && defined(__SIZEOF_INT128__) #define HAS_INTRINSIC_128_TYPE @@ -288,20 +287,4 @@ public: } return sign_determinant_2x2(p1, q1, p2, q2) * invert; } - - // Exact orientation predicate, - // returns +1: CCW, 0: collinear, -1: CW. - static int orient(const Slic3r::Point &p1, const Slic3r::Point &p2, const Slic3r::Point &p3) - { - Slic3r::Vector v1(p2 - p1); - Slic3r::Vector v2(p3 - p1); - return sign_determinant_2x2_filtered(v1.x, v1.y, v2.x, v2.y); - } - - // Exact orientation predicate, - // returns +1: CCW, 0: collinear, -1: CW. - static int cross(const Slic3r::Point &v1, const Slic3r::Point &v2) - { - return sign_determinant_2x2_filtered(v1.x, v1.y, v2.x, v2.y); - } }; diff --git a/xs/src/libslic3r/Model.cpp b/xs/src/libslic3r/Model.cpp index 755941144..e9a385eaf 100644 --- a/xs/src/libslic3r/Model.cpp +++ b/xs/src/libslic3r/Model.cpp @@ -7,6 +7,12 @@ #include "Format/STL.hpp" #include "Format/3mf.hpp" +#include +#include +#include +#include +#include "slic3r/GUI/GUI.hpp" + #include #include @@ -296,35 +302,224 @@ static bool _arrange(const Pointfs &sizes, coordf_t dist, const BoundingBoxf* bb return result; } +namespace arr { + +using namespace libnest2d; + +// A container which stores a pointer to the 3D object and its projected +// 2D shape from top view. +using ShapeData2D = + std::vector>; + +ShapeData2D projectModelFromTop(const Slic3r::Model &model) { + ShapeData2D ret; + + auto s = std::accumulate(model.objects.begin(), model.objects.end(), 0, + [](size_t s, ModelObject* o){ + return s + o->instances.size(); + }); + + ret.reserve(s); + + for(auto objptr : model.objects) { + if(objptr) { + + auto rmesh = objptr->raw_mesh(); + + for(auto objinst : objptr->instances) { + if(objinst) { + Slic3r::TriangleMesh tmpmesh = rmesh; + objinst->transform_mesh(&tmpmesh); + ClipperLib::PolyNode pn; + auto p = tmpmesh.convex_hull(); + p.make_clockwise(); + p.append(p.first_point()); + pn.Contour = Slic3rMultiPoint_to_ClipperPath( p ); + + ret.emplace_back(objinst, Item(std::move(pn))); + } + } + } + } + + return ret; +} + +/** + * \brief Arranges the model objects on the screen. + * + * The arrangement considers multiple bins (aka. print beds) for placing all + * the items provided in the model argument. If the items don't fit on one + * print bed, the remaining will be placed onto newly created print beds. + * The first_bin_only parameter, if set to true, disables this behaviour and + * makes sure that only one print bed is filled and the remaining items will be + * untouched. When set to false, the items which could not fit onto the + * print bed will be placed next to the print bed so the user should see a + * pile of items on the print bed and some other piles outside the print + * area that can be dragged later onto the print bed as a group. + * + * \param model The model object with the 3D content. + * \param dist The minimum distance which is allowed for any pair of items + * on the print bed in any direction. + * \param bb The bounding box of the print bed. It corresponds to the 'bin' + * for bin packing. + * \param first_bin_only This parameter controls whether to place the + * remaining items which do not fit onto the print area next to the print + * bed or leave them untouched (let the user arrange them by hand or remove + * them). + */ +bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, + bool first_bin_only) +{ + using ArrangeResult = _IndexedPackGroup; + + bool ret = true; + + // Create the arranger config + auto min_obj_distance = static_cast(dist/SCALING_FACTOR); + + // Get the 2D projected shapes with their 3D model instance pointers + auto shapemap = arr::projectModelFromTop(model); + + double area = 0; + double area_max = 0; + Item *biggest = nullptr; + + // Copy the references for the shapes only as the arranger expects a + // sequence of objects convertible to Item or ClipperPolygon + std::vector> shapes; + shapes.reserve(shapemap.size()); + std::for_each(shapemap.begin(), shapemap.end(), + [&shapes, &area, min_obj_distance, &area_max, &biggest] + (ShapeData2D::value_type& it) + { + Item& item = it.second; + item.addOffset(min_obj_distance); + auto b = ShapeLike::boundingBox(item.transformedShape()); + auto a = b.width()*b.height(); + if(area_max < a) { + area_max = static_cast(a); + biggest = &item; + } + area += b.width()*b.height(); + shapes.push_back(std::ref(it.second)); + }); + + Box bin; + + if(bb != nullptr && bb->defined) { + // Scale up the bounding box to clipper scale. + BoundingBoxf bbb = *bb; + bbb.scale(1.0/SCALING_FACTOR); + + bin = Box({ + static_cast(bbb.min.x), + static_cast(bbb.min.y) + }, + { + static_cast(bbb.max.x), + static_cast(bbb.max.y) + }); + } else { + // Just take the biggest item as bin... ? + bin = ShapeLike::boundingBox(biggest->transformedShape()); + } + + // Will use the DJD selection heuristic with the BottomLeft placement + // strategy + using Arranger = Arranger; + + Arranger arranger(bin, min_obj_distance); + + // Arrange and return the items with their respective indices within the + // input sequence. + ArrangeResult result = + arranger.arrangeIndexed(shapes.begin(), shapes.end()); + + + auto applyResult = [&shapemap](ArrangeResult::value_type& group, + Coord batch_offset) + { + for(auto& r : group) { + auto idx = r.first; // get the original item index + Item& item = r.second; // get the item itself + + // Get the model instance from the shapemap using the index + ModelInstance *inst_ptr = shapemap[idx].first; + + // Get the tranformation data from the item object and scale it + // appropriately + Radians rot = item.rotation(); + auto off = item.translation(); + Pointf foff(off.X*SCALING_FACTOR + batch_offset, + off.Y*SCALING_FACTOR); + + // write the tranformation data into the model instance + inst_ptr->rotation += rot; + inst_ptr->offset += foff; + + // Debug + /*std::cout << "item " << idx << ": \n" << "\toffset_x: " + * << foff.x << "\n\toffset_y: " << foff.y << std::endl;*/ + } + }; + + if(first_bin_only) { + applyResult(result.front(), 0); + } else { + Coord batch_offset = 0; + for(auto& group : result) { + applyResult(group, batch_offset); + + // Only the first pack group can be placed onto the print bed. The + // other objects which could not fit will be placed next to the + // print bed + batch_offset += static_cast(2*bin.width()*SCALING_FACTOR); + } + } + + for(auto objptr : model.objects) objptr->invalidate_bounding_box(); + + return ret && result.size() == 1; +} +} + /* arrange objects preserving their instance count but altering their instance positions */ bool Model::arrange_objects(coordf_t dist, const BoundingBoxf* bb) { - // get the (transformed) size of each instance so that we take - // into account their different transformations when packing - Pointfs instance_sizes; - Pointfs instance_centers; - for (const ModelObject *o : this->objects) - for (size_t i = 0; i < o->instances.size(); ++ i) { - // an accurate snug bounding box around the transformed mesh. - BoundingBoxf3 bbox(o->instance_bounding_box(i, true)); - instance_sizes.push_back(bbox.size()); - instance_centers.push_back(bbox.center()); - } + bool ret = false; + if(bb != nullptr && bb->defined) { + const bool FIRST_BIN_ONLY = true; + ret = arr::arrange(*this, dist, bb, FIRST_BIN_ONLY); + } else { + // get the (transformed) size of each instance so that we take + // into account their different transformations when packing + Pointfs instance_sizes; + Pointfs instance_centers; + for (const ModelObject *o : this->objects) + for (size_t i = 0; i < o->instances.size(); ++ i) { + // an accurate snug bounding box around the transformed mesh. + BoundingBoxf3 bbox(o->instance_bounding_box(i, true)); + instance_sizes.push_back(bbox.size()); + instance_centers.push_back(bbox.center()); + } - Pointfs positions; - if (! _arrange(instance_sizes, dist, bb, positions)) - return false; - - size_t idx = 0; - for (ModelObject *o : this->objects) { - for (ModelInstance *i : o->instances) { - i->offset = positions[idx] - instance_centers[idx]; - ++ idx; + Pointfs positions; + if (! _arrange(instance_sizes, dist, bb, positions)) + return false; + + size_t idx = 0; + for (ModelObject *o : this->objects) { + for (ModelInstance *i : o->instances) { + i->offset = positions[idx] - instance_centers[idx]; + ++ idx; + } + o->invalidate_bounding_box(); } - o->invalidate_bounding_box(); } - return true; + + return ret; } // Duplicate the entire model preserving instance relative positions. diff --git a/xs/src/libslic3r/Point.cpp b/xs/src/libslic3r/Point.cpp index 7c1dc91f5..2abcd26af 100644 --- a/xs/src/libslic3r/Point.cpp +++ b/xs/src/libslic3r/Point.cpp @@ -1,6 +1,7 @@ #include "Point.hpp" #include "Line.hpp" #include "MultiPoint.hpp" +#include "Int128.hpp" #include #include @@ -375,4 +376,20 @@ Pointf3::vector_to(const Pointf3 &point) const return Vectorf3(point.x - this->x, point.y - this->y, point.z - this->z); } +namespace int128 { + +int orient(const Point &p1, const Point &p2, const Point &p3) +{ + Slic3r::Vector v1(p2 - p1); + Slic3r::Vector v2(p3 - p1); + return Int128::sign_determinant_2x2_filtered(v1.x, v1.y, v2.x, v2.y); +} + +int cross(const Point &v1, const Point &v2) +{ + return Int128::sign_determinant_2x2_filtered(v1.x, v1.y, v2.x, v2.y); +} + +} + } diff --git a/xs/src/libslic3r/Point.hpp b/xs/src/libslic3r/Point.hpp index 6c9096a3d..a7569a006 100644 --- a/xs/src/libslic3r/Point.hpp +++ b/xs/src/libslic3r/Point.hpp @@ -81,6 +81,17 @@ inline Point operator*(double scalar, const Point& point2) { return Point(scalar inline int64_t cross(const Point &v1, const Point &v2) { return int64_t(v1.x) * int64_t(v2.y) - int64_t(v1.y) * int64_t(v2.x); } inline int64_t dot(const Point &v1, const Point &v2) { return int64_t(v1.x) * int64_t(v2.x) + int64_t(v1.y) * int64_t(v2.y); } +namespace int128 { + +// Exact orientation predicate, +// returns +1: CCW, 0: collinear, -1: CW. +int orient(const Point &p1, const Point &p2, const Point &p3); + +// Exact orientation predicate, +// returns +1: CCW, 0: collinear, -1: CW. +int cross(const Point &v1, const Slic3r::Point &v2); +} + // To be used by std::unordered_map, std::unordered_multimap and friends. struct PointHash { size_t operator()(const Point &pt) const { From 95795f249afc63da16a1cb901876e758259f4e09 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Thu, 24 May 2018 14:05:51 +0200 Subject: [PATCH 008/198] First steps in reorganizing infill order (to use infill instead of the wipe tower) --- xs/src/libslic3r/ExtrusionEntity.hpp | 4 +++ .../libslic3r/ExtrusionEntityCollection.cpp | 1 + .../libslic3r/ExtrusionEntityCollection.hpp | 16 +++++++++ xs/src/libslic3r/GCode.cpp | 36 ++++++++++++++++--- xs/src/libslic3r/Print.cpp | 20 +++++++++++ 5 files changed, 73 insertions(+), 4 deletions(-) diff --git a/xs/src/libslic3r/ExtrusionEntity.hpp b/xs/src/libslic3r/ExtrusionEntity.hpp index 16ef51c1f..15363e8ed 100644 --- a/xs/src/libslic3r/ExtrusionEntity.hpp +++ b/xs/src/libslic3r/ExtrusionEntity.hpp @@ -92,6 +92,7 @@ public: virtual double min_mm3_per_mm() const = 0; virtual Polyline as_polyline() const = 0; virtual double length() const = 0; + virtual double total_volume() const = 0; }; typedef std::vector ExtrusionEntitiesPtr; @@ -148,6 +149,7 @@ public: // Minimum volumetric velocity of this extrusion entity. Used by the constant nozzle pressure algorithm. double min_mm3_per_mm() const { return this->mm3_per_mm; } Polyline as_polyline() const { return this->polyline; } + virtual double total_volume() const { return mm3_per_mm * unscale(length()); } private: void _inflate_collection(const Polylines &polylines, ExtrusionEntityCollection* collection) const; @@ -194,6 +196,7 @@ public: // Minimum volumetric velocity of this extrusion entity. Used by the constant nozzle pressure algorithm. double min_mm3_per_mm() const; Polyline as_polyline() const; + virtual double total_volume() const { double volume =0.; for (const auto& path : paths) volume += path.total_volume(); return volume; } }; // Single continuous extrusion loop, possibly with varying extrusion thickness, extrusion height or bridging / non bridging. @@ -241,6 +244,7 @@ public: // Minimum volumetric velocity of this extrusion entity. Used by the constant nozzle pressure algorithm. double min_mm3_per_mm() const; Polyline as_polyline() const { return this->polygon().split_at_first_point(); } + virtual double total_volume() const { double volume =0.; for (const auto& path : paths) volume += path.total_volume(); return volume; } private: ExtrusionLoopRole m_loop_role; diff --git a/xs/src/libslic3r/ExtrusionEntityCollection.cpp b/xs/src/libslic3r/ExtrusionEntityCollection.cpp index 4513139e2..7a086bcbf 100644 --- a/xs/src/libslic3r/ExtrusionEntityCollection.cpp +++ b/xs/src/libslic3r/ExtrusionEntityCollection.cpp @@ -125,6 +125,7 @@ void ExtrusionEntityCollection::chained_path_from(Point start_near, ExtrusionEnt continue; } } + ExtrusionEntity* entity = (*it)->clone(); my_paths.push_back(entity); if (orig_indices != NULL) indices_map[entity] = it - this->entities.begin(); diff --git a/xs/src/libslic3r/ExtrusionEntityCollection.hpp b/xs/src/libslic3r/ExtrusionEntityCollection.hpp index 03bd2ba97..d292248fc 100644 --- a/xs/src/libslic3r/ExtrusionEntityCollection.hpp +++ b/xs/src/libslic3r/ExtrusionEntityCollection.hpp @@ -79,6 +79,7 @@ public: void flatten(ExtrusionEntityCollection* retval) const; ExtrusionEntityCollection flatten() const; double min_mm3_per_mm() const; + virtual double total_volume() const {double volume=0.; for (const auto& ent : entities) volume+=ent->total_volume(); return volume; } // Following methods shall never be called on an ExtrusionEntityCollection. Polyline as_polyline() const { @@ -89,6 +90,21 @@ public: CONFESS("Calling length() on a ExtrusionEntityCollection"); return 0.; } + + void set_extruder_override(int extruder) { + extruder_override = extruder; + for (auto& member : entities) { + if (member->is_collection()) + dynamic_cast(member)->set_extruder_override(extruder); + } + } + int get_extruder_override() const { return extruder_override; } + bool is_extruder_overridden() const { return extruder_override != -1; } + + +private: + // Set this variable to explicitly state you want to use specific extruder for thie EEC (used for MM infill wiping) + int extruder_override = -1; }; } diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index b581b3e76..3536c0c9c 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1249,7 +1249,7 @@ void GCode::process_layer( break; } } - + // process infill // layerm->fills is a collection of Slic3r::ExtrusionPath::Collection objects (C++ class ExtrusionEntityCollection), // each one containing the ExtrusionPath objects of a certain infill "group" (also called "surface" @@ -1261,6 +1261,10 @@ void GCode::process_layer( if (fill->entities.empty()) // This shouldn't happen but first_point() would fail. continue; + + if (fill->is_extruder_overridden()) + continue; + // init by_extruder item only if we actually use the extruder int extruder_id = std::max(0, (is_solid_infill(fill->entities.front()->role()) ? region.config.solid_infill_extruder : region.config.infill_extruder) - 1); // Init by_extruder item only if we actually use the extruder. @@ -1334,15 +1338,37 @@ void GCode::process_layer( m_avoid_crossing_perimeters.disable_once = true; } + for (const auto& layer_to_print : layers) { // iterate through all objects + if (layer_to_print.object_layer == nullptr) + continue; + std::vector overridden; + for (size_t region_id = 0; region_id < print.regions.size(); ++ region_id) { + ObjectByExtruder::Island::Region new_region; + overridden.push_back(new_region); + for (ExtrusionEntity *ee : (*layer_to_print.object_layer).regions[region_id]->fills.entities) { + auto *fill = dynamic_cast(ee); + if (fill->get_extruder_override() == extruder_id) { + overridden.back().infills.append(*fill); + fill->set_extruder_override(-1); + } + } + m_config.apply((layer_to_print.object_layer)->object()->config, true); + Point copy = (layer_to_print.object_layer)->object()->_shifted_copies.front(); + this->set_origin(unscale(copy.x), unscale(copy.y)); + gcode += this->extrude_infill(print, overridden); + } + } + + auto objects_by_extruder_it = by_extruder.find(extruder_id); if (objects_by_extruder_it == by_extruder.end()) continue; for (const ObjectByExtruder &object_by_extruder : objects_by_extruder_it->second) { const size_t layer_id = &object_by_extruder - objects_by_extruder_it->second.data(); const PrintObject *print_object = layers[layer_id].object(); - if (print_object == nullptr) - // This layer is empty for this particular object, it has neither object extrusions nor support extrusions at this print_z. - continue; + if (print_object == nullptr) + // This layer is empty for this particular object, it has neither object extrusions nor support extrusions at this print_z. + continue; m_config.apply(print_object->config, true); m_layer = layers[layer_id].layer(); @@ -1355,6 +1381,7 @@ void GCode::process_layer( copies.push_back(print_object->_shifted_copies[single_object_idx]); // Sort the copies by the closest point starting with the current print position. + for (const Point © : copies) { // When starting a new object, use the external motion planner for the first travel move. std::pair this_object_copy(print_object, copy); @@ -2004,6 +2031,7 @@ std::string GCode::extrude_perimeters(const Print &print, const std::vector &by_region) { std::string gcode; diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index 643ab3f31..82f513d70 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -1037,6 +1037,26 @@ void Print::_make_wipe_tower() if (! this->has_wipe_tower()) return; + + int wiping_extruder = 0; + + for (size_t i = 0; i < objects.size(); ++ i) { + for (Layer* lay : objects[i]->layers) { + for (LayerRegion* reg : lay->regions) { + ExtrusionEntityCollection& eec = reg->fills; + for (ExtrusionEntity* ee : eec.entities) { + auto* fill = dynamic_cast(ee); + /*if (fill->total_volume() > 1.)*/ { + fill->set_extruder_override(wiping_extruder); + if (++wiping_extruder > 3) + wiping_extruder = 0; + } + } + } + } + } + + // Let the ToolOrdering class know there will be initial priming extrusions at the start of the print. m_tool_ordering = ToolOrdering(*this, (unsigned int)-1, true); if (! m_tool_ordering.has_wipe_tower()) From 132a67edb21ca0bb5deb77e32de4af0cf92da3a0 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Thu, 24 May 2018 17:24:37 +0200 Subject: [PATCH 009/198] Wipe tower changes to reduce wiping volumes where appropriate --- xs/src/libslic3r/GCode/ToolOrdering.cpp | 2 + xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp | 11 +- xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp | 22 ++-- xs/src/libslic3r/Print.cpp | 114 +++++++------------- 4 files changed, 57 insertions(+), 92 deletions(-) diff --git a/xs/src/libslic3r/GCode/ToolOrdering.cpp b/xs/src/libslic3r/GCode/ToolOrdering.cpp index 271b75ef3..671dadc5a 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.cpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.cpp @@ -217,6 +217,8 @@ void ToolOrdering::reorder_extruders(unsigned int last_extruder_id) } } + + void ToolOrdering::fill_wipe_tower_partitions(const PrintConfig &config, coordf_t object_bottom_z) { if (m_layer_tools.empty()) diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp index 731dcbbd9..46fa0fc6d 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp @@ -557,7 +557,7 @@ WipeTower::ToolChangeResult WipeTowerPrusaMM::tool_change(unsigned int tool, boo { for (const auto &b : m_layer_info->tool_changes) if ( b.new_tool == tool ) { - wipe_volume = wipe_volumes[b.old_tool][b.new_tool]; + wipe_volume = b.wipe_volume; if (tool == m_layer_info->tool_changes.back().new_tool) last_change_in_layer = true; wipe_area = b.required_depth * m_layer_info->extra_spacing; @@ -1051,7 +1051,7 @@ WipeTower::ToolChangeResult WipeTowerPrusaMM::finish_layer() } // Appends a toolchange into m_plan and calculates neccessary depth of the corresponding box -void WipeTowerPrusaMM::plan_toolchange(float z_par, float layer_height_par, unsigned int old_tool, unsigned int new_tool,bool brim) +void WipeTowerPrusaMM::plan_toolchange(float z_par, float layer_height_par, unsigned int old_tool, unsigned int new_tool, bool brim, float wiping_volume_reduction) { assert(m_plan.back().z <= z_par + WT_EPSILON ); // refuses to add a layer below the last one @@ -1076,13 +1076,14 @@ void WipeTowerPrusaMM::plan_toolchange(float z_par, float layer_height_par, unsi float ramming_depth = depth; length_to_extrude = width*((length_to_extrude / width)-int(length_to_extrude / width)) - width; float first_wipe_line = -length_to_extrude; - length_to_extrude += volume_to_length(wipe_volumes[old_tool][new_tool], m_perimeter_width, layer_height_par); + float wipe_volume = wipe_volumes[old_tool][new_tool] - wiping_volume_reduction; + length_to_extrude += volume_to_length(wipe_volume, m_perimeter_width, layer_height_par); length_to_extrude = std::max(length_to_extrude,0.f); depth += (int(length_to_extrude / width) + 1) * m_perimeter_width; depth *= m_extra_spacing; - m_plan.back().tool_changes.push_back(WipeTowerInfo::ToolChange(old_tool, new_tool, depth, ramming_depth,first_wipe_line)); + m_plan.back().tool_changes.push_back(WipeTowerInfo::ToolChange(old_tool, new_tool, depth, ramming_depth, first_wipe_line, wipe_volume)); } @@ -1122,7 +1123,7 @@ void WipeTowerPrusaMM::save_on_last_wipe() float width = m_wipe_tower_width - 3*m_perimeter_width; // width we draw into float length_to_save = 2*(m_wipe_tower_width+m_wipe_tower_depth) + (!layer_finished() ? finish_layer().total_extrusion_length_in_plane() : 0.f); - float length_to_wipe = volume_to_length(wipe_volumes[m_layer_info->tool_changes.back().old_tool][m_layer_info->tool_changes.back().new_tool], + float length_to_wipe = volume_to_length(m_layer_info->tool_changes.back().wipe_volume, m_perimeter_width,m_layer_info->height) - m_layer_info->tool_changes.back().first_wipe_line - length_to_save; length_to_wipe = std::max(length_to_wipe,0.f); diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp index ea1c1f631..04ae81e6d 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp @@ -44,7 +44,7 @@ public: // wipe_area -- space available for one toolchange in mm WipeTowerPrusaMM(float x, float y, float width, float rotation_angle, float cooling_tube_retraction, float cooling_tube_length, float parking_pos_retraction, float extra_loading_move, float bridging, - const std::vector& wiping_matrix, unsigned int initial_tool) : + const std::vector>& wiping_matrix, unsigned int initial_tool) : m_wipe_tower_pos(x, y), m_wipe_tower_width(width), m_wipe_tower_rotation_angle(rotation_angle), @@ -56,12 +56,9 @@ public: m_parking_pos_retraction(parking_pos_retraction), m_extra_loading_move(extra_loading_move), m_bridging(bridging), - m_current_tool(initial_tool) - { - unsigned int number_of_extruders = (unsigned int)(sqrt(wiping_matrix.size())+WT_EPSILON); - for (unsigned int i = 0; i(wiping_matrix.begin()+i*number_of_extruders,wiping_matrix.begin()+(i+1)*number_of_extruders)); - } + m_current_tool(initial_tool), + wipe_volumes(wiping_matrix) + {} virtual ~WipeTowerPrusaMM() {} @@ -99,7 +96,7 @@ public: // Appends into internal structure m_plan containing info about the future wipe tower // to be used before building begins. The entries must be added ordered in z. - void plan_toolchange(float z_par, float layer_height_par, unsigned int old_tool, unsigned int new_tool, bool brim); + void plan_toolchange(float z_par, float layer_height_par, unsigned int old_tool, unsigned int new_tool, bool brim, float wiping_volume_reduction = 0.f); // Iterates through prepared m_plan, generates ToolChangeResults and appends them to "result" void generate(std::vector> &result); @@ -238,7 +235,7 @@ private: // A fill-in direction (positive Y, negative Y) alternates with each layer. wipe_shape m_current_shape = SHAPE_NORMAL; unsigned int m_current_tool = 0; - std::vector> wipe_volumes; + const std::vector> wipe_volumes; float m_depth_traversed = 0.f; // Current y position at the wipe tower. bool m_left_to_right = true; @@ -255,7 +252,7 @@ private: // Calculates length of extrusion line to extrude given volume float volume_to_length(float volume, float line_width, float layer_height) const { - return volume / (layer_height * (line_width - layer_height * (1. - M_PI / 4.))); + return std::max(0., volume / (layer_height * (line_width - layer_height * (1. - M_PI / 4.)))); } // Calculates depth for all layers and propagates them downwards @@ -308,8 +305,9 @@ private: float required_depth; float ramming_depth; float first_wipe_line; - ToolChange(unsigned int old,unsigned int newtool,float depth=0.f,float ramming_depth=0.f,float fwl=0.f) - : old_tool{old}, new_tool{newtool}, required_depth{depth}, ramming_depth{ramming_depth},first_wipe_line{fwl} {} + float wipe_volume; + ToolChange(unsigned int old, unsigned int newtool, float depth=0.f, float ramming_depth=0.f, float fwl=0.f, float wv=0.f) + : old_tool{old}, new_tool{newtool}, required_depth{depth}, ramming_depth{ramming_depth}, first_wipe_line{fwl}, wipe_volume{wv} {} }; float z; // z position of the layer float height; // layer height diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index 82f513d70..64bfb45ca 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -1037,25 +1037,13 @@ void Print::_make_wipe_tower() if (! this->has_wipe_tower()) return; - - int wiping_extruder = 0; - - for (size_t i = 0; i < objects.size(); ++ i) { - for (Layer* lay : objects[i]->layers) { - for (LayerRegion* reg : lay->regions) { - ExtrusionEntityCollection& eec = reg->fills; - for (ExtrusionEntity* ee : eec.entities) { - auto* fill = dynamic_cast(ee); - /*if (fill->total_volume() > 1.)*/ { - fill->set_extruder_override(wiping_extruder); - if (++wiping_extruder > 3) - wiping_extruder = 0; - } - } - } - } - } - + // Get wiping matrix to get number of extruders and convert vector to vector: + std::vector wiping_matrix((this->config.wiping_volumes_matrix.values).begin(),(this->config.wiping_volumes_matrix.values).end()); + // Extract purging volumes for each extruder pair: + std::vector> wipe_volumes; + const unsigned int number_of_extruders = (unsigned int)(sqrt(wiping_matrix.size())+EPSILON); + for (unsigned int i = 0; i(wiping_matrix.begin()+i*number_of_extruders, wiping_matrix.begin()+(i+1)*number_of_extruders)); // Let the ToolOrdering class know there will be initial priming extrusions at the start of the print. m_tool_ordering = ToolOrdering(*this, (unsigned int)-1, true); @@ -1101,23 +1089,20 @@ void Print::_make_wipe_tower() } } - // Get wiping matrix to get number of extruders and convert vector to vector: - std::vector wiping_volumes((this->config.wiping_volumes_matrix.values).begin(),(this->config.wiping_volumes_matrix.values).end()); - // Initialize the wipe tower. WipeTowerPrusaMM wipe_tower( float(this->config.wipe_tower_x.value), float(this->config.wipe_tower_y.value), float(this->config.wipe_tower_width.value), float(this->config.wipe_tower_rotation_angle.value), float(this->config.cooling_tube_retraction.value), float(this->config.cooling_tube_length.value), float(this->config.parking_pos_retraction.value), - float(this->config.extra_loading_move.value), float(this->config.wipe_tower_bridging), wiping_volumes, + float(this->config.extra_loading_move.value), float(this->config.wipe_tower_bridging), wipe_volumes, m_tool_ordering.first_extruder()); //wipe_tower.set_retract(); //wipe_tower.set_zhop(); // Set the extruder & material properties at the wipe tower object. - for (size_t i = 0; i < (int)(sqrt(wiping_volumes.size())+EPSILON); ++ i) + for (size_t i = 0; i < number_of_extruders; ++ i) wipe_tower.set_extruder( i, WipeTowerPrusaMM::parse_material(this->config.filament_type.get_at(i).c_str()), @@ -1151,7 +1136,36 @@ void Print::_make_wipe_tower() wipe_tower.plan_toolchange(layer_tools.print_z, layer_tools.wipe_tower_layer_height, current_extruder_id, current_extruder_id,false); for (const auto extruder_id : layer_tools.extruders) { if ((first_layer && extruder_id == m_tool_ordering.all_extruders().back()) || extruder_id != current_extruder_id) { - wipe_tower.plan_toolchange(layer_tools.print_z, layer_tools.wipe_tower_layer_height, current_extruder_id, extruder_id, first_layer && extruder_id == m_tool_ordering.all_extruders().back()); + + // Toolchange from old_extruder to new_extruder. + // Check how much volume needs to be wiped and keep marking infills until + // we run out of the volume (or infills) + const float min_infill_volume = 0.f; + + if (config.filament_soluble.get_at(extruder_id)) // soluble filament cannot be wiped in a random infill + continue; + + float volume_to_wipe = wipe_volumes[current_extruder_id][extruder_id]; + + for (size_t i = 0; i < objects.size(); ++ i) { // Let's iterate through all objects... + for (Layer* lay : objects[i]->layers) { + for (LayerRegion* reg : lay->regions) { // and all regions + ExtrusionEntityCollection& eec = reg->fills; + for (ExtrusionEntity* ee : eec.entities) { // and all infill Collections + auto* fill = dynamic_cast(ee); + if (volume_to_wipe > 0.f && !fill->is_extruder_overridden() && fill->total_volume() > min_infill_volume) { // this infill will be used to wipe this extruder + fill->set_extruder_override(extruder_id); + volume_to_wipe -= fill->total_volume(); + } + } + } + } + } + + float saved_material = wipe_volumes[current_extruder_id][extruder_id] - std::max(0.f, volume_to_wipe); + std::cout << volume_to_wipe << "\t(saved " << saved_material << ")" << std::endl; + + wipe_tower.plan_toolchange(layer_tools.print_z, layer_tools.wipe_tower_layer_height, current_extruder_id, extruder_id, first_layer && extruder_id == m_tool_ordering.all_extruders().back(), saved_material); current_extruder_id = extruder_id; } } @@ -1160,60 +1174,10 @@ void Print::_make_wipe_tower() } } - - // Generate the wipe tower layers. m_wipe_tower_tool_changes.reserve(m_tool_ordering.layer_tools().size()); wipe_tower.generate(m_wipe_tower_tool_changes); - // Set current_extruder_id to the last extruder primed. - /*unsigned int current_extruder_id = m_tool_ordering.all_extruders().back(); - - for (const ToolOrdering::LayerTools &layer_tools : m_tool_ordering.layer_tools()) { - if (! layer_tools.has_wipe_tower) - // This is a support only layer, or the wipe tower does not reach to this height. - continue; - bool first_layer = &layer_tools == &m_tool_ordering.front(); - bool last_layer = &layer_tools == &m_tool_ordering.back() || (&layer_tools + 1)->wipe_tower_partitions == 0; - wipe_tower.set_layer( - float(layer_tools.print_z), - float(layer_tools.wipe_tower_layer_height), - layer_tools.wipe_tower_partitions, - first_layer, - last_layer); - std::vector tool_changes; - for (unsigned int extruder_id : layer_tools.extruders) - // Call the wipe_tower.tool_change() at the first layer for the initial extruder - // to extrude the wipe tower brim, - if ((first_layer && extruder_id == m_tool_ordering.all_extruders().back()) || - // or when an extruder shall be switched. - extruder_id != current_extruder_id) { - tool_changes.emplace_back(wipe_tower.tool_change(extruder_id, extruder_id == layer_tools.extruders.back(), WipeTower::PURPOSE_EXTRUDE)); - current_extruder_id = extruder_id; - } - if (! wipe_tower.layer_finished()) { - tool_changes.emplace_back(wipe_tower.finish_layer(WipeTower::PURPOSE_EXTRUDE)); - if (tool_changes.size() > 1) { - // Merge the two last tool changes into one. - WipeTower::ToolChangeResult &tc1 = tool_changes[tool_changes.size() - 2]; - WipeTower::ToolChangeResult &tc2 = tool_changes.back(); - if (tc1.end_pos != tc2.start_pos) { - // Add a travel move from tc1.end_pos to tc2.start_pos. - char buf[2048]; - sprintf(buf, "G1 X%.3f Y%.3f F7200\n", tc2.start_pos.x, tc2.start_pos.y); - tc1.gcode += buf; - } - tc1.gcode += tc2.gcode; - append(tc1.extrusions, tc2.extrusions); - tc1.end_pos = tc2.end_pos; - tool_changes.pop_back(); - } - } - m_wipe_tower_tool_changes.emplace_back(std::move(tool_changes)); - if (last_layer) - break; - }*/ - // Unload the current filament over the purge tower. coordf_t layer_height = this->objects.front()->config.layer_height.value; if (m_tool_ordering.back().wipe_tower_partitions > 0) { From bfe4350a89bea904c39e640b8779542a0a9642d1 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Fri, 25 May 2018 16:11:55 +0200 Subject: [PATCH 010/198] Calculation of wipe tower reduction corrected, new config option (wipe into infill) --- xs/src/libslic3r/GCode.cpp | 41 ++++++++++++++++++-------------- xs/src/libslic3r/Print.cpp | 33 +++++++++++++------------ xs/src/libslic3r/PrintConfig.cpp | 10 +++++++- xs/src/libslic3r/PrintConfig.hpp | 2 ++ xs/src/slic3r/GUI/Preset.cpp | 3 ++- xs/src/slic3r/GUI/Tab.cpp | 3 ++- 6 files changed, 56 insertions(+), 36 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 3536c0c9c..0ccc4384e 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1338,26 +1338,31 @@ void GCode::process_layer( m_avoid_crossing_perimeters.disable_once = true; } - for (const auto& layer_to_print : layers) { // iterate through all objects - if (layer_to_print.object_layer == nullptr) - continue; - std::vector overridden; - for (size_t region_id = 0; region_id < print.regions.size(); ++ region_id) { - ObjectByExtruder::Island::Region new_region; - overridden.push_back(new_region); - for (ExtrusionEntity *ee : (*layer_to_print.object_layer).regions[region_id]->fills.entities) { - auto *fill = dynamic_cast(ee); - if (fill->get_extruder_override() == extruder_id) { - overridden.back().infills.append(*fill); - fill->set_extruder_override(-1); - } - } - m_config.apply((layer_to_print.object_layer)->object()->config, true); - Point copy = (layer_to_print.object_layer)->object()->_shifted_copies.front(); - this->set_origin(unscale(copy.x), unscale(copy.y)); - gcode += this->extrude_infill(print, overridden); + gcode += "; INFILL WIPING STARTS\n"; + + if (extruder_id != layer_tools.extruders.front()) { // if this is the first extruder on this layer, there was no toolchange + for (const auto& layer_to_print : layers) { // iterate through all objects + if (layer_to_print.object_layer == nullptr) + continue; + std::vector overridden; + for (size_t region_id = 0; region_id < print.regions.size(); ++ region_id) { + ObjectByExtruder::Island::Region new_region; + overridden.push_back(new_region); + for (ExtrusionEntity *ee : (*layer_to_print.object_layer).regions[region_id]->fills.entities) { + auto *fill = dynamic_cast(ee); + if (fill->get_extruder_override() == extruder_id) { + overridden.back().infills.append(*fill); + fill->set_extruder_override(-1); + } + } + m_config.apply((layer_to_print.object_layer)->object()->config, true); + Point copy = (layer_to_print.object_layer)->object()->_shifted_copies.front(); + this->set_origin(unscale(copy.x), unscale(copy.y)); + gcode += this->extrude_infill(print, overridden); + } } } + gcode += "; WIPING FINISHED\n"; auto objects_by_extruder_it = by_extruder.find(extruder_id); diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index 64bfb45ca..e09cafa56 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -1142,28 +1142,31 @@ void Print::_make_wipe_tower() // we run out of the volume (or infills) const float min_infill_volume = 0.f; - if (config.filament_soluble.get_at(extruder_id)) // soluble filament cannot be wiped in a random infill - continue; - float volume_to_wipe = wipe_volumes[current_extruder_id][extruder_id]; + float saved_material = 0.f; - for (size_t i = 0; i < objects.size(); ++ i) { // Let's iterate through all objects... - for (Layer* lay : objects[i]->layers) { - for (LayerRegion* reg : lay->regions) { // and all regions - ExtrusionEntityCollection& eec = reg->fills; - for (ExtrusionEntity* ee : eec.entities) { // and all infill Collections - auto* fill = dynamic_cast(ee); - if (volume_to_wipe > 0.f && !fill->is_extruder_overridden() && fill->total_volume() > min_infill_volume) { // this infill will be used to wipe this extruder - fill->set_extruder_override(extruder_id); - volume_to_wipe -= fill->total_volume(); - } + // soluble filament cannot be wiped in a random infill, first layer is potentionally visible too + if (!first_layer && !config.filament_soluble.get_at(extruder_id)) { + for (size_t i = 0; i < objects.size(); ++ i) { // Let's iterate through all objects... + for (Layer* lay : objects[i]->layers) { + if (std::abs(layer_tools.print_z - lay->print_z) > EPSILON) continue; + for (LayerRegion* reg : lay->regions) { // and all regions + ExtrusionEntityCollection& eec = reg->fills; + for (ExtrusionEntity* ee : eec.entities) { // and all infill Collections + auto* fill = dynamic_cast(ee); + if (fill->role() == erTopSolidInfill) continue; + if (volume_to_wipe > 0.f && !fill->is_extruder_overridden() && fill->total_volume() > min_infill_volume) { // this infill will be used to wipe this extruder + fill->set_extruder_override(extruder_id); + volume_to_wipe -= fill->total_volume(); + } + } } } } } - float saved_material = wipe_volumes[current_extruder_id][extruder_id] - std::max(0.f, volume_to_wipe); - std::cout << volume_to_wipe << "\t(saved " << saved_material << ")" << std::endl; + saved_material = wipe_volumes[current_extruder_id][extruder_id] - std::max(0.f, volume_to_wipe); + std::cout << layer_tools.print_z << "\t" << extruder_id << "\t" << wipe_volumes[current_extruder_id][extruder_id] - volume_to_wipe << "\n"; wipe_tower.plan_toolchange(layer_tools.print_z, layer_tools.wipe_tower_layer_height, current_extruder_id, extruder_id, first_layer && extruder_id == m_tool_ordering.all_extruders().back(), saved_material); current_extruder_id = extruder_id; diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index e3cbf5243..bf9421f9d 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -1884,7 +1884,15 @@ PrintConfigDef::PrintConfigDef() def->sidetext = L("degrees"); def->cli = "wipe-tower-rotation-angle=f"; def->default_value = new ConfigOptionFloat(0.); - + + def = this->add("wipe_into_infill", coBool); + def->label = L("Wiping into infill"); + def->tooltip = L("Wiping after toolchange will be preferentially done inside infills. " + "This lowers the amount of waste but may result in longer print time " + " due to additional travel moves."); + def->cli = "wipe-into-infill!"; + def->default_value = new ConfigOptionBool(true); + def = this->add("wipe_tower_bridging", coFloat); def->label = L("Maximal bridging distance"); def->tooltip = L("Maximal distance between supports on sparse infill sections. "); diff --git a/xs/src/libslic3r/PrintConfig.hpp b/xs/src/libslic3r/PrintConfig.hpp index a36e5def9..1b73c31b3 100644 --- a/xs/src/libslic3r/PrintConfig.hpp +++ b/xs/src/libslic3r/PrintConfig.hpp @@ -642,6 +642,7 @@ public: ConfigOptionFloat wipe_tower_per_color_wipe; ConfigOptionFloat wipe_tower_rotation_angle; ConfigOptionFloat wipe_tower_bridging; + ConfigOptionBool wipe_into_infill; ConfigOptionFloats wiping_volumes_matrix; ConfigOptionFloats wiping_volumes_extruders; ConfigOptionFloat z_offset; @@ -710,6 +711,7 @@ protected: OPT_PTR(wipe_tower_width); OPT_PTR(wipe_tower_per_color_wipe); OPT_PTR(wipe_tower_rotation_angle); + OPT_PTR(wipe_into_infill); OPT_PTR(wipe_tower_bridging); OPT_PTR(wiping_volumes_matrix); OPT_PTR(wiping_volumes_extruders); diff --git a/xs/src/slic3r/GUI/Preset.cpp b/xs/src/slic3r/GUI/Preset.cpp index ce6918406..e483381ac 100644 --- a/xs/src/slic3r/GUI/Preset.cpp +++ b/xs/src/slic3r/GUI/Preset.cpp @@ -298,7 +298,8 @@ const std::vector& Preset::print_options() "perimeter_extrusion_width", "external_perimeter_extrusion_width", "infill_extrusion_width", "solid_infill_extrusion_width", "top_infill_extrusion_width", "support_material_extrusion_width", "infill_overlap", "bridge_flow_ratio", "clip_multipart_objects", "elefant_foot_compensation", "xy_size_compensation", "threads", "resolution", "wipe_tower", "wipe_tower_x", "wipe_tower_y", - "wipe_tower_width", "wipe_tower_rotation_angle", "wipe_tower_bridging", "compatible_printers", "compatible_printers_condition","inherits" + "wipe_tower_width", "wipe_tower_rotation_angle", "wipe_tower_bridging", "wipe_into_infill", "compatible_printers", + "compatible_printers_condition","inherits" }; return s_opts; } diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index b3e737f6e..c94307aa4 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -945,6 +945,7 @@ void TabPrint::build() optgroup->append_single_option_line("wipe_tower_width"); optgroup->append_single_option_line("wipe_tower_rotation_angle"); optgroup->append_single_option_line("wipe_tower_bridging"); + optgroup->append_single_option_line("wipe_into_infill"); optgroup = page->new_optgroup(_(L("Advanced"))); optgroup->append_single_option_line("interface_shells"); @@ -1233,7 +1234,7 @@ void TabPrint::update() get_field("standby_temperature_delta")->toggle(have_ooze_prevention); bool have_wipe_tower = m_config->opt_bool("wipe_tower"); - for (auto el : { "wipe_tower_x", "wipe_tower_y", "wipe_tower_width", "wipe_tower_rotation_angle", "wipe_tower_bridging"}) + for (auto el : { "wipe_tower_x", "wipe_tower_y", "wipe_tower_width", "wipe_tower_rotation_angle", "wipe_into_infill", "wipe_tower_bridging"}) get_field(el)->toggle(have_wipe_tower); m_recommended_thin_wall_thickness_description_line->SetText( From c72ecb382d2308588a8ddc46c5a68982df47f371 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Mon, 28 May 2018 15:33:19 +0200 Subject: [PATCH 011/198] Reduction is now correctly calculated for each region, soluble filament excluded from infill wiping --- xs/src/libslic3r/GCode.cpp | 42 ++++++++++++++++++++++---------------- xs/src/libslic3r/Print.cpp | 22 ++++++++++++-------- 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 0ccc4384e..1ce181517 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1338,31 +1338,37 @@ void GCode::process_layer( m_avoid_crossing_perimeters.disable_once = true; } - gcode += "; INFILL WIPING STARTS\n"; - - if (extruder_id != layer_tools.extruders.front()) { // if this is the first extruder on this layer, there was no toolchange - for (const auto& layer_to_print : layers) { // iterate through all objects - if (layer_to_print.object_layer == nullptr) - continue; - std::vector overridden; - for (size_t region_id = 0; region_id < print.regions.size(); ++ region_id) { - ObjectByExtruder::Island::Region new_region; - overridden.push_back(new_region); - for (ExtrusionEntity *ee : (*layer_to_print.object_layer).regions[region_id]->fills.entities) { - auto *fill = dynamic_cast(ee); - if (fill->get_extruder_override() == extruder_id) { - overridden.back().infills.append(*fill); - fill->set_extruder_override(-1); - } - } + if (print.config.wipe_into_infill.value) { + gcode += "; INFILL WIPING STARTS\n"; + if (extruder_id != layer_tools.extruders.front()) { // if this is the first extruder on this layer, there was no toolchange + for (const auto& layer_to_print : layers) { // iterate through all objects + gcode+="objekt\n"; + if (layer_to_print.object_layer == nullptr) + continue; + std::vector overridden; + for (size_t region_id = 0; region_id < print.regions.size(); ++ region_id) { + gcode+="region\n"; + ObjectByExtruder::Island::Region new_region; + overridden.push_back(new_region); + for (ExtrusionEntity *ee : (*layer_to_print.object_layer).regions[region_id]->fills.entities) { + gcode+="entity\n"; + auto *fill = dynamic_cast(ee); + if (fill->get_extruder_override() == extruder_id) { + gcode+="*\n"; + overridden.back().infills.append(*fill); + fill->set_extruder_override(-1); + } + } + } m_config.apply((layer_to_print.object_layer)->object()->config, true); Point copy = (layer_to_print.object_layer)->object()->_shifted_copies.front(); this->set_origin(unscale(copy.x), unscale(copy.y)); gcode += this->extrude_infill(print, overridden); } } + gcode += "; WIPING FINISHED\n"; } - gcode += "; WIPING FINISHED\n"; + auto objects_by_extruder_it = by_extruder.find(extruder_id); diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index e09cafa56..92c2715fb 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -1145,16 +1145,20 @@ void Print::_make_wipe_tower() float volume_to_wipe = wipe_volumes[current_extruder_id][extruder_id]; float saved_material = 0.f; - // soluble filament cannot be wiped in a random infill, first layer is potentionally visible too - if (!first_layer && !config.filament_soluble.get_at(extruder_id)) { - for (size_t i = 0; i < objects.size(); ++ i) { // Let's iterate through all objects... - for (Layer* lay : objects[i]->layers) { - if (std::abs(layer_tools.print_z - lay->print_z) > EPSILON) continue; - for (LayerRegion* reg : lay->regions) { // and all regions - ExtrusionEntityCollection& eec = reg->fills; - for (ExtrusionEntity* ee : eec.entities) { // and all infill Collections + + if (!first_layer && !config.filament_soluble.get_at(extruder_id)) { // soluble filament cannot be wiped in a random infill, first layer is potentionally visible too + for (size_t i = 0; i < objects.size(); ++ i) { // Let's iterate through all objects... + for (Layer* lay : objects[i]->layers) { // Find this layer + if (std::abs(layer_tools.print_z - lay->print_z) > EPSILON) + continue; + for (size_t region_id = 0; region_id < objects[i]->print()->regions.size(); ++ region_id) { + unsigned int region_extruder = objects[i]->print()->regions[region_id]->config.infill_extruder - 1; // config value is 1-based + if (config.filament_soluble.get_at(region_extruder)) // if this infill is meant to be soluble, keep it that way + continue; + ExtrusionEntityCollection& eec = lay->regions[region_id]->fills; + for (ExtrusionEntity* ee : eec.entities) { // and all infill Collections auto* fill = dynamic_cast(ee); - if (fill->role() == erTopSolidInfill) continue; + if (fill->role() == erTopSolidInfill) continue; // color of TopSolidInfill cannot be changed - it is visible if (volume_to_wipe > 0.f && !fill->is_extruder_overridden() && fill->total_volume() > min_infill_volume) { // this infill will be used to wipe this extruder fill->set_extruder_override(extruder_id); volume_to_wipe -= fill->total_volume(); From 549351bbb4e17685c99af9d07b6555d0bf8fad55 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Tue, 29 May 2018 12:32:04 +0200 Subject: [PATCH 012/198] Analyzer tags for the wipe tower also generate layer height and line width (so the priming lines+brim are visible and ramming lines are correct width) --- xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp | 55 ++++++++++++--------- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp index 46fa0fc6d..9695cc7a8 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp @@ -42,14 +42,31 @@ namespace PrusaMultiMaterial { class Writer { public: - Writer() : + Writer(float layer_height, float line_width) : m_current_pos(std::numeric_limits::max(), std::numeric_limits::max()), m_current_z(0.f), m_current_feedrate(0.f), - m_layer_height(0.f), + m_layer_height(layer_height), m_extrusion_flow(0.f), m_preview_suppressed(false), - m_elapsed_time(0.f) {} + m_elapsed_time(0.f), + m_default_analyzer_line_width(line_width) + { + // adds tag for analyzer: + char buf[64]; + sprintf(buf, ";%s%f\n", GCodeAnalyzer::Height_Tag.c_str(), m_layer_height); // don't rely on GCodeAnalyzer knowing the layer height - it knows nothing at priming + m_gcode += buf; + sprintf(buf, ";%s%d\n", GCodeAnalyzer::Extrusion_Role_Tag.c_str(), erWipeTower); + m_gcode += buf; + change_analyzer_line_width(line_width); + } + + Writer& change_analyzer_line_width(float line_width) { + // adds tag for analyzer: + char buf[64]; + sprintf(buf, ";%s%f\n", GCodeAnalyzer::Width_Tag.c_str(), line_width); + m_gcode += buf; + } Writer& set_initial_position(const WipeTower::xy &pos) { m_start_pos = WipeTower::xy(pos,0.f,m_y_shift).rotate(m_wipe_tower_pos, m_wipe_tower_width, m_wipe_tower_depth, m_angle_deg); @@ -62,9 +79,6 @@ public: Writer& set_z(float z) { m_current_z = z; return *this; } - Writer& set_layer_height(float layer_height) - { m_layer_height = layer_height; return *this; } - Writer& set_extrusion_flow(float flow) { m_extrusion_flow = flow; return *this; } @@ -80,8 +94,8 @@ public: // Suppress / resume G-code preview in Slic3r. Slic3r will have difficulty to differentiate the various // filament loading and cooling moves from normal extrusion moves. Therefore the writer // is asked to suppres output of some lines, which look like extrusions. - Writer& suppress_preview() { m_preview_suppressed = true; return *this; } - Writer& resume_preview() { m_preview_suppressed = false; return *this; } + Writer& suppress_preview() { change_analyzer_line_width(0.f); m_preview_suppressed = true; return *this; } + Writer& resume_preview() { change_analyzer_line_width(m_default_analyzer_line_width); m_preview_suppressed = false; return *this; } Writer& feedrate(float f) { @@ -126,11 +140,6 @@ public: m_extrusions.emplace_back(WipeTower::Extrusion(WipeTower::xy(rot.x, rot.y), width, m_current_tool)); } - // adds tag for analyzer - char buf[64]; - sprintf(buf, ";%s%d\n", GCodeAnalyzer::Extrusion_Role_Tag.c_str(), erWipeTower); - m_gcode += buf; - m_gcode += "G1"; if (rot.x != rotated_current_pos.x) { m_gcode += set_format_X(rot.x); // Transform current position back to wipe tower coordinates (was updated by set_format_X) @@ -397,6 +406,7 @@ private: float m_wipe_tower_width = 0.f; float m_wipe_tower_depth = 0.f; float m_last_fan_speed = 0.f; + const float m_default_analyzer_line_width; std::string set_format_X(float x) { @@ -485,10 +495,9 @@ WipeTower::ToolChangeResult WipeTowerPrusaMM::prime( const float prime_section_width = std::min(240.f / tools.size(), 60.f); box_coordinates cleaning_box(xy(5.f, 0.f), prime_section_width, 100.f); - PrusaMultiMaterial::Writer writer; + PrusaMultiMaterial::Writer writer(m_layer_height, m_perimeter_width); writer.set_extrusion_flow(m_extrusion_flow) .set_z(m_z_pos) - .set_layer_height(m_layer_height) .set_initial_tool(m_current_tool) .append(";--------------------\n" "; CP PRIMING START\n") @@ -574,10 +583,9 @@ WipeTower::ToolChangeResult WipeTowerPrusaMM::tool_change(unsigned int tool, boo (tool != (unsigned int)(-1) ? /*m_layer_info->depth*/wipe_area+m_depth_traversed-0.5*m_perimeter_width : m_wipe_tower_depth-m_perimeter_width)); - PrusaMultiMaterial::Writer writer; + PrusaMultiMaterial::Writer writer(m_layer_height, m_perimeter_width); writer.set_extrusion_flow(m_extrusion_flow) .set_z(m_z_pos) - .set_layer_height(m_layer_height) .set_initial_tool(m_current_tool) .set_rotation(m_wipe_tower_pos, m_wipe_tower_width, m_wipe_tower_depth, m_wipe_tower_rotation_angle) .set_y_shift(m_y_shift + (tool!=(unsigned int)(-1) && (m_current_shape == SHAPE_REVERSED && !m_peters_wipe_tower) ? m_layer_info->depth - m_layer_info->toolchanges_depth(): 0.f)) @@ -646,10 +654,9 @@ WipeTower::ToolChangeResult WipeTowerPrusaMM::toolchange_Brim(bool sideOnly, flo m_wipe_tower_width, m_wipe_tower_depth); - PrusaMultiMaterial::Writer writer; + PrusaMultiMaterial::Writer writer(m_layer_height, m_perimeter_width); writer.set_extrusion_flow(m_extrusion_flow * 1.1f) .set_z(m_z_pos) // Let the writer know the current Z position as a base for Z-hop. - .set_layer_height(m_layer_height) .set_initial_tool(m_current_tool) .set_rotation(m_wipe_tower_pos, m_wipe_tower_width, m_wipe_tower_depth, m_wipe_tower_rotation_angle) .append(";-------------------------------------\n" @@ -703,11 +710,12 @@ void WipeTowerPrusaMM::toolchange_Unload( float xl = cleaning_box.ld.x + 1.f * m_perimeter_width; float xr = cleaning_box.rd.x - 1.f * m_perimeter_width; - writer.append("; CP TOOLCHANGE UNLOAD\n"); - const float line_width = m_perimeter_width * m_filpar[m_current_tool].ramming_line_width_multiplicator; // desired ramming line thickness const float y_step = line_width * m_filpar[m_current_tool].ramming_step_multiplicator * m_extra_spacing; // spacing between lines in mm + writer.append("; CP TOOLCHANGE UNLOAD\n") + .change_analyzer_line_width(line_width); + unsigned i = 0; // iterates through ramming_speed m_left_to_right = true; // current direction of ramming float remaining = xr - xl ; // keeps track of distance to the next turnaround @@ -781,7 +789,7 @@ void WipeTowerPrusaMM::toolchange_Unload( } } WipeTower::xy end_of_ramming(writer.x(),writer.y()); - + writer.change_analyzer_line_width(m_perimeter_width); // so the next lines are not affected by ramming_line_width_multiplier // Retraction: float old_x = writer.x(); @@ -960,10 +968,9 @@ WipeTower::ToolChangeResult WipeTowerPrusaMM::finish_layer() // Otherwise the caller would likely travel to the wipe tower in vain. assert(! this->layer_finished()); - PrusaMultiMaterial::Writer writer; + PrusaMultiMaterial::Writer writer(m_layer_height, m_perimeter_width); writer.set_extrusion_flow(m_extrusion_flow) .set_z(m_z_pos) - .set_layer_height(m_layer_height) .set_initial_tool(m_current_tool) .set_rotation(m_wipe_tower_pos, m_wipe_tower_width, m_wipe_tower_depth, m_wipe_tower_rotation_angle) .set_y_shift(m_y_shift - (m_current_shape == SHAPE_REVERSED && !m_peters_wipe_tower ? m_layer_info->toolchanges_depth() : 0.f)) From 8bdbe4150574f9607be28a8005c94448ec951dd1 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Wed, 30 May 2018 11:56:30 +0200 Subject: [PATCH 013/198] Wiping into infill should respect infill_first setting, marking moved to separate function --- xs/src/libslic3r/GCode/ToolOrdering.cpp | 1 + xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp | 14 ++-- xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp | 2 +- xs/src/libslic3r/Print.cpp | 85 ++++++++++++--------- xs/src/libslic3r/Print.hpp | 7 +- 5 files changed, 64 insertions(+), 45 deletions(-) diff --git a/xs/src/libslic3r/GCode/ToolOrdering.cpp b/xs/src/libslic3r/GCode/ToolOrdering.cpp index 671dadc5a..e0aa2b1c5 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.cpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.cpp @@ -76,6 +76,7 @@ ToolOrdering::ToolOrdering(const Print &print, unsigned int first_extruder, bool this->collect_extruder_statistics(prime_multi_material); } + ToolOrdering::LayerTools& ToolOrdering::tools_for_layer(coordf_t print_z) { auto it_layer_tools = std::lower_bound(m_layer_tools.begin(), m_layer_tools.end(), ToolOrdering::LayerTools(print_z - EPSILON)); diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp index 9695cc7a8..45d28e839 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp @@ -66,6 +66,7 @@ public: char buf[64]; sprintf(buf, ";%s%f\n", GCodeAnalyzer::Width_Tag.c_str(), line_width); m_gcode += buf; + return *this; } Writer& set_initial_position(const WipeTower::xy &pos) { @@ -137,7 +138,7 @@ public: width += m_layer_height * float(1. - M_PI / 4.); if (m_extrusions.empty() || m_extrusions.back().pos != rotated_current_pos) m_extrusions.emplace_back(WipeTower::Extrusion(rotated_current_pos, 0, m_current_tool)); - m_extrusions.emplace_back(WipeTower::Extrusion(WipeTower::xy(rot.x, rot.y), width, m_current_tool)); + m_extrusions.emplace_back(WipeTower::Extrusion(WipeTower::xy(rot.x, rot.y), width, m_current_tool)); } m_gcode += "G1"; @@ -483,7 +484,6 @@ WipeTower::ToolChangeResult WipeTowerPrusaMM::prime( // If false, the last priming are will be large enough to wipe the last extruder sufficiently. bool last_wipe_inside_wipe_tower) { - this->set_layer(first_layer_height, first_layer_height, tools.size(), true, false); this->m_current_tool = tools.front(); @@ -1058,7 +1058,7 @@ WipeTower::ToolChangeResult WipeTowerPrusaMM::finish_layer() } // Appends a toolchange into m_plan and calculates neccessary depth of the corresponding box -void WipeTowerPrusaMM::plan_toolchange(float z_par, float layer_height_par, unsigned int old_tool, unsigned int new_tool, bool brim, float wiping_volume_reduction) +void WipeTowerPrusaMM::plan_toolchange(float z_par, float layer_height_par, unsigned int old_tool, unsigned int new_tool, bool brim, float wipe_volume) { assert(m_plan.back().z <= z_par + WT_EPSILON ); // refuses to add a layer below the last one @@ -1083,7 +1083,6 @@ void WipeTowerPrusaMM::plan_toolchange(float z_par, float layer_height_par, unsi float ramming_depth = depth; length_to_extrude = width*((length_to_extrude / width)-int(length_to_extrude / width)) - width; float first_wipe_line = -length_to_extrude; - float wipe_volume = wipe_volumes[old_tool][new_tool] - wiping_volume_reduction; length_to_extrude += volume_to_length(wipe_volume, m_perimeter_width, layer_height_par); length_to_extrude = std::max(length_to_extrude,0.f); @@ -1146,7 +1145,8 @@ void WipeTowerPrusaMM::save_on_last_wipe() // Resulting ToolChangeResults are appended into vector "result" void WipeTowerPrusaMM::generate(std::vector> &result) { - if (m_plan.empty()) return; + if (m_plan.empty()) + return; m_extra_spacing = 1.f; @@ -1161,12 +1161,10 @@ void WipeTowerPrusaMM::generate(std::vector layer_result; + std::vector layer_result; for (auto layer : m_plan) { set_layer(layer.z,layer.height,0,layer.z == m_plan.front().z,layer.z == m_plan.back().z); - - if (m_peters_wipe_tower) m_wipe_tower_rotation_angle += 90.f; else diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp index 04ae81e6d..54cb51658 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp @@ -96,7 +96,7 @@ public: // Appends into internal structure m_plan containing info about the future wipe tower // to be used before building begins. The entries must be added ordered in z. - void plan_toolchange(float z_par, float layer_height_par, unsigned int old_tool, unsigned int new_tool, bool brim, float wiping_volume_reduction = 0.f); + void plan_toolchange(float z_par, float layer_height_par, unsigned int old_tool, unsigned int new_tool, bool brim, float wipe_volume = 0.f); // Iterates through prepared m_plan, generates ToolChangeResults and appends them to "result" void generate(std::vector> &result); diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index 92c2715fb..7e5ac0812 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -1136,43 +1136,12 @@ void Print::_make_wipe_tower() wipe_tower.plan_toolchange(layer_tools.print_z, layer_tools.wipe_tower_layer_height, current_extruder_id, current_extruder_id,false); for (const auto extruder_id : layer_tools.extruders) { if ((first_layer && extruder_id == m_tool_ordering.all_extruders().back()) || extruder_id != current_extruder_id) { + float volume_to_wipe = wipe_volumes[current_extruder_id][extruder_id]; // total volume to wipe after this toolchange - // Toolchange from old_extruder to new_extruder. - // Check how much volume needs to be wiped and keep marking infills until - // we run out of the volume (or infills) - const float min_infill_volume = 0.f; + if (config.wipe_into_infill && !first_layer) + volume_to_wipe = mark_wiping_infill(layer_tools, extruder_id, wipe_volumes[current_extruder_id][extruder_id]); - float volume_to_wipe = wipe_volumes[current_extruder_id][extruder_id]; - float saved_material = 0.f; - - - if (!first_layer && !config.filament_soluble.get_at(extruder_id)) { // soluble filament cannot be wiped in a random infill, first layer is potentionally visible too - for (size_t i = 0; i < objects.size(); ++ i) { // Let's iterate through all objects... - for (Layer* lay : objects[i]->layers) { // Find this layer - if (std::abs(layer_tools.print_z - lay->print_z) > EPSILON) - continue; - for (size_t region_id = 0; region_id < objects[i]->print()->regions.size(); ++ region_id) { - unsigned int region_extruder = objects[i]->print()->regions[region_id]->config.infill_extruder - 1; // config value is 1-based - if (config.filament_soluble.get_at(region_extruder)) // if this infill is meant to be soluble, keep it that way - continue; - ExtrusionEntityCollection& eec = lay->regions[region_id]->fills; - for (ExtrusionEntity* ee : eec.entities) { // and all infill Collections - auto* fill = dynamic_cast(ee); - if (fill->role() == erTopSolidInfill) continue; // color of TopSolidInfill cannot be changed - it is visible - if (volume_to_wipe > 0.f && !fill->is_extruder_overridden() && fill->total_volume() > min_infill_volume) { // this infill will be used to wipe this extruder - fill->set_extruder_override(extruder_id); - volume_to_wipe -= fill->total_volume(); - } - } - } - } - } - } - - saved_material = wipe_volumes[current_extruder_id][extruder_id] - std::max(0.f, volume_to_wipe); - std::cout << layer_tools.print_z << "\t" << extruder_id << "\t" << wipe_volumes[current_extruder_id][extruder_id] - volume_to_wipe << "\n"; - - wipe_tower.plan_toolchange(layer_tools.print_z, layer_tools.wipe_tower_layer_height, current_extruder_id, extruder_id, first_layer && extruder_id == m_tool_ordering.all_extruders().back(), saved_material); + wipe_tower.plan_toolchange(layer_tools.print_z, layer_tools.wipe_tower_layer_height, current_extruder_id, extruder_id, first_layer && extruder_id == m_tool_ordering.all_extruders().back(), volume_to_wipe); current_extruder_id = extruder_id; } } @@ -1205,6 +1174,52 @@ void Print::_make_wipe_tower() wipe_tower.tool_change((unsigned int)-1, false)); } + + +float Print::mark_wiping_infill(const ToolOrdering::LayerTools& layer_tools, unsigned int new_extruder, float volume_to_wipe) +{ + const float min_infill_volume = 0.f; // ignore infill with smaller volume than this + + if (!config.filament_soluble.get_at(new_extruder)) { // Soluble filament cannot be wiped in a random infill + for (size_t i = 0; i < objects.size(); ++ i) { // Let's iterate through all objects... + Layer* this_layer = nullptr; + for (unsigned int a = 0; a < objects[i]->layers.size(); this_layer = objects[i]->layers[++a]) // Finds this layer + if (std::abs(layer_tools.print_z - objects[i]->layers[a]->print_z) < EPSILON) + break; + + for (size_t region_id = 0; region_id < objects[i]->print()->regions.size(); ++ region_id) { + unsigned int region_extruder = objects[i]->print()->regions[region_id]->config.infill_extruder - 1; // config value is 1-based + if (config.filament_soluble.get_at(region_extruder)) // if this infill is meant to be soluble, keep it that way + continue; + + if (!config.infill_first) { // in this case we must verify that region_extruder was already used at this layer (and perimeters of the infill are therefore extruded) + bool unused_yet = false; + for (unsigned i = 0; i < layer_tools.extruders.size(); ++i) { + if (layer_tools.extruders[i] == new_extruder) + unused_yet = true; + if (layer_tools.extruders[i] == region_extruder) + break; + } + if (unused_yet) + continue; + } + + ExtrusionEntityCollection& eec = this_layer->regions[region_id]->fills; + for (ExtrusionEntity* ee : eec.entities) { // iterate through all infill Collections + auto* fill = dynamic_cast(ee); + if (fill->role() == erTopSolidInfill) continue; // color of TopSolidInfill cannot be changed - it is visible + if (volume_to_wipe > 0.f && !fill->is_extruder_overridden() && fill->total_volume() > min_infill_volume) { // this infill will be used to wipe this extruder + fill->set_extruder_override(new_extruder); + volume_to_wipe -= fill->total_volume(); + } + } + } + } + } + return std::max(0.f, volume_to_wipe); +} + + std::string Print::output_filename() { this->placeholder_parser.update_timestamp(); diff --git a/xs/src/libslic3r/Print.hpp b/xs/src/libslic3r/Print.hpp index c56e64c6c..77b47fb83 100644 --- a/xs/src/libslic3r/Print.hpp +++ b/xs/src/libslic3r/Print.hpp @@ -309,11 +309,16 @@ public: void restart() { m_canceled = false; } // Has the calculation been canceled? bool canceled() { return m_canceled; } - + + private: bool invalidate_state_by_config_options(const std::vector &opt_keys); PrintRegionConfig _region_config_from_model_volume(const ModelVolume &volume); + // This function goes through all infill entities, decides which ones will be used for wiping and + // marks them by the extruder id. Returns volume that remains to be wiped on the wipe tower: + float mark_wiping_infill(const ToolOrdering::LayerTools& layer_tools, unsigned int new_extruder, float volume_to_wipe); + // Has the calculation been canceled? tbb::atomic m_canceled; }; From 5a8d1ffdbaed72a2f4b9ee79316f93be070fc1e0 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Wed, 30 May 2018 12:08:03 +0200 Subject: [PATCH 014/198] Prototype for exporting estimated remaining time into gcode for default and silent mode --- lib/Slic3r/GUI/Plater.pm | 6 +- xs/src/libslic3r/GCode.cpp | 36 ++- xs/src/libslic3r/GCode.hpp | 7 +- xs/src/libslic3r/GCodeTimeEstimator.cpp | 397 ++++++++++++++++++------ xs/src/libslic3r/GCodeTimeEstimator.hpp | 48 ++- xs/src/libslic3r/Print.hpp | 3 +- xs/xsp/Print.xsp | 6 +- 7 files changed, 377 insertions(+), 126 deletions(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 8d4a1a269..911c07cbf 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -472,7 +472,8 @@ sub new { fil_mm3 => L("Used Filament (mm³)"), fil_g => L("Used Filament (g)"), cost => L("Cost"), - time => L("Estimated printing time"), + default_time => L("Estimated printing time (default mode)"), + silent_time => L("Estimated printing time (silent mode)"), ); while (my $field = shift @info) { my $label = shift @info; @@ -1542,7 +1543,8 @@ sub on_export_completed { $self->{"print_info_cost"}->SetLabel(sprintf("%.2f" , $self->{print}->total_cost)); $self->{"print_info_fil_g"}->SetLabel(sprintf("%.2f" , $self->{print}->total_weight)); $self->{"print_info_fil_mm3"}->SetLabel(sprintf("%.2f" , $self->{print}->total_extruded_volume)); - $self->{"print_info_time"}->SetLabel($self->{print}->estimated_print_time); + $self->{"print_info_default_time"}->SetLabel($self->{print}->estimated_default_print_time); + $self->{"print_info_silent_time"}->SetLabel($self->{print}->estimated_silent_print_time); $self->{"print_info_fil_m"}->SetLabel(sprintf("%.2f" , $self->{print}->total_used_filament / 1000)); $self->{"print_info_box_show"}->(1); diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index b581b3e76..28c15e2fd 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -374,6 +374,9 @@ void GCode::do_export(Print *print, const char *path, GCodePreviewData *preview_ throw std::runtime_error(std::string("G-code export to ") + path + " failed\nIs the disk full?\n"); } fclose(file); + + GCodeTimeEstimator::post_process_elapsed_times(path_tmp, m_default_time_estimator.get_time(), m_silent_time_estimator.get_time()); + if (! this->m_placeholder_parser_failed_templates.empty()) { // G-code export proceeded, but some of the PlaceholderParser substitutions failed. std::string msg = std::string("G-code export to ") + path + " failed due to invalid custom G-code sections:\n\n"; @@ -403,9 +406,11 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) { PROFILE_FUNC(); - // resets time estimator - m_time_estimator.reset(); - m_time_estimator.set_dialect(print.config.gcode_flavor); + // resets time estimators + m_default_time_estimator.reset(); + m_default_time_estimator.set_dialect(print.config.gcode_flavor); + m_silent_time_estimator.reset(); + m_silent_time_estimator.set_dialect(print.config.gcode_flavor); // resets analyzer m_analyzer.reset(); @@ -596,6 +601,10 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) _writeln(file, buf); } + // before start gcode time estimation + _write(file, m_default_time_estimator.get_elapsed_time_string().c_str()); + _write(file, m_silent_time_estimator.get_elapsed_time_string().c_str()); + // Write the custom start G-code _writeln(file, start_gcode); // Process filament-specific gcode in extruder order. @@ -800,13 +809,17 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) for (const std::string &end_gcode : print.config.end_filament_gcode.values) _writeln(file, this->placeholder_parser_process("end_filament_gcode", end_gcode, (unsigned int)(&end_gcode - &print.config.end_filament_gcode.values.front()), &config)); } + // before end gcode time estimation + _write(file, m_default_time_estimator.get_elapsed_time_string().c_str()); + _write(file, m_silent_time_estimator.get_elapsed_time_string().c_str()); _writeln(file, this->placeholder_parser_process("end_gcode", print.config.end_gcode, m_writer.extruder()->id(), &config)); } _write(file, m_writer.update_progress(m_layer_count, m_layer_count, true)); // 100% _write(file, m_writer.postamble()); // calculates estimated printing time - m_time_estimator.calculate_time(); + m_default_time_estimator.calculate_time(); + m_silent_time_estimator.calculate_time(); // Get filament stats. print.filament_stats.clear(); @@ -814,7 +827,8 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) print.total_extruded_volume = 0.; print.total_weight = 0.; print.total_cost = 0.; - print.estimated_print_time = m_time_estimator.get_time_hms(); + print.estimated_default_print_time = m_default_time_estimator.get_time_dhms(); + print.estimated_silent_print_time = m_silent_time_estimator.get_time_dhms(); for (const Extruder &extruder : m_writer.extruders()) { double used_filament = extruder.used_filament(); double extruded_volume = extruder.extruded_volume(); @@ -834,7 +848,8 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) print.total_extruded_volume = print.total_extruded_volume + extruded_volume; } _write_format(file, "; total filament cost = %.1lf\n", print.total_cost); - _write_format(file, "; estimated printing time = %s\n", m_time_estimator.get_time_hms().c_str()); + _write_format(file, "; estimated printing time (default mode) = %s\n", m_default_time_estimator.get_time_dhms().c_str()); + _write_format(file, "; estimated printing time (silent mode) = %s\n", m_silent_time_estimator.get_time_dhms().c_str()); // Append full config. _write(file, "\n"); @@ -1399,8 +1414,12 @@ void GCode::process_layer( if (m_pressure_equalizer) gcode = m_pressure_equalizer->process(gcode.c_str(), false); // printf("G-code after filter:\n%s\n", out.c_str()); - + _write(file, gcode); + + // after layer time estimation + _write(file, m_default_time_estimator.get_elapsed_time_string().c_str()); + _write(file, m_silent_time_estimator.get_elapsed_time_string().c_str()); } void GCode::apply_print_config(const PrintConfig &print_config) @@ -2059,7 +2078,8 @@ void GCode::_write(FILE* file, const char *what) // writes string to file fwrite(gcode, 1, ::strlen(gcode), file); // updates time estimator and gcode lines vector - m_time_estimator.add_gcode_block(gcode); + m_default_time_estimator.add_gcode_block(gcode); + m_silent_time_estimator.add_gcode_block(gcode); } } diff --git a/xs/src/libslic3r/GCode.hpp b/xs/src/libslic3r/GCode.hpp index d028e90aa..b938604ef 100644 --- a/xs/src/libslic3r/GCode.hpp +++ b/xs/src/libslic3r/GCode.hpp @@ -133,6 +133,8 @@ public: m_last_height(GCodeAnalyzer::Default_Height), m_brim_done(false), m_second_layer_things_done(false), + m_default_time_estimator(GCodeTimeEstimator::Default), + m_silent_time_estimator(GCodeTimeEstimator::Silent), m_last_obj_copy(nullptr, Point(std::numeric_limits::max(), std::numeric_limits::max())) {} ~GCode() {} @@ -289,8 +291,9 @@ protected: // Index of a last object copy extruded. std::pair m_last_obj_copy; - // Time estimator - GCodeTimeEstimator m_time_estimator; + // Time estimators + GCodeTimeEstimator m_default_time_estimator; + GCodeTimeEstimator m_silent_time_estimator; // Analyzer GCodeAnalyzer m_analyzer; diff --git a/xs/src/libslic3r/GCodeTimeEstimator.cpp b/xs/src/libslic3r/GCodeTimeEstimator.cpp index 176159ff5..553ddba08 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.cpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.cpp @@ -4,9 +4,14 @@ #include +#include +#include +#include + static const float MMMIN_TO_MMSEC = 1.0f / 60.0f; static const float MILLISEC_TO_SEC = 0.001f; static const float INCHES_TO_MM = 25.4f; + static const float DEFAULT_FEEDRATE = 1500.0f; // from Prusa Firmware (Marlin_main.cpp) static const float DEFAULT_ACCELERATION = 1500.0f; // Prusa Firmware 1_75mm_MK2 static const float DEFAULT_RETRACT_ACCELERATION = 1500.0f; // Prusa Firmware 1_75mm_MK2 @@ -17,8 +22,31 @@ static const float DEFAULT_MINIMUM_FEEDRATE = 0.0f; // from Prusa Firmware (Conf static const float DEFAULT_MINIMUM_TRAVEL_FEEDRATE = 0.0f; // from Prusa Firmware (Configuration_adv.h) static const float DEFAULT_EXTRUDE_FACTOR_OVERRIDE_PERCENTAGE = 1.0f; // 100 percent +static const float SILENT_FEEDRATE = 1500.0f; // from Prusa Firmware (Marlin_main.cpp) +static const float SILENT_ACCELERATION = 1250.0f; // Prusa Firmware 1_75mm_MK25-RAMBo13a-E3Dv6full +static const float SILENT_RETRACT_ACCELERATION = 1250.0f; // Prusa Firmware 1_75mm_MK25-RAMBo13a-E3Dv6full +static const float SILENT_AXIS_MAX_FEEDRATE[] = { 200.0f, 200.0f, 12.0f, 120.0f }; // Prusa Firmware 1_75mm_MK25-RAMBo13a-E3Dv6full +static const float SILENT_AXIS_MAX_ACCELERATION[] = { 1000.0f, 1000.0f, 200.0f, 5000.0f }; // Prusa Firmware 1_75mm_MK25-RAMBo13a-E3Dv6full +static const float SILENT_AXIS_MAX_JERK[] = { 10.0f, 10.0f, 0.4f, 2.5f }; // from Prusa Firmware (Configuration.h) +static const float SILENT_MINIMUM_FEEDRATE = 0.0f; // from Prusa Firmware (Configuration_adv.h) +static const float SILENT_MINIMUM_TRAVEL_FEEDRATE = 0.0f; // from Prusa Firmware (Configuration_adv.h) +static const float SILENT_EXTRUDE_FACTOR_OVERRIDE_PERCENTAGE = 1.0f; // 100 percent + static const float PREVIOUS_FEEDRATE_THRESHOLD = 0.0001f; +static const std::string ELAPSED_TIME_TAG_DEFAULT = ";_ELAPSED_TIME_DEFAULT: "; +static const std::string ELAPSED_TIME_TAG_SILENT = ";_ELAPSED_TIME_SILENT: "; + +#define REMAINING_TIME_USE_SINGLE_GCODE_COMMAND 1 +#if REMAINING_TIME_USE_SINGLE_GCODE_COMMAND +static const std::string REMAINING_TIME_CMD = "M998"; +#else +static const std::string REMAINING_TIME_CMD_DEFAULT = "M998"; +static const std::string REMAINING_TIME_CMD_SILENT = "M999"; +#endif // REMAINING_TIME_USE_SINGLE_GCODE_COMMAND + +static const std::string REMAINING_TIME_COMMENT = " ; estimated remaining time"; + #if ENABLE_MOVE_STATS static const std::string MOVE_TYPE_STR[Slic3r::GCodeTimeEstimator::Block::Num_Types] = { @@ -73,6 +101,11 @@ namespace Slic3r { return ::sqrt(value); } + GCodeTimeEstimator::Block::Block() + : st_synchronized(false) + { + } + float GCodeTimeEstimator::Block::move_length() const { float length = ::sqrt(sqr(delta_pos[X]) + sqr(delta_pos[Y]) + sqr(delta_pos[Z])); @@ -159,63 +192,13 @@ namespace Slic3r { } #endif // ENABLE_MOVE_STATS - GCodeTimeEstimator::GCodeTimeEstimator() + GCodeTimeEstimator::GCodeTimeEstimator(EMode mode) + : _mode(mode) { reset(); set_default(); } - void GCodeTimeEstimator::calculate_time_from_text(const std::string& gcode) - { - reset(); - - _parser.parse_buffer(gcode, - [this](GCodeReader &reader, const GCodeReader::GCodeLine &line) - { this->_process_gcode_line(reader, line); }); - - _calculate_time(); - -#if ENABLE_MOVE_STATS - _log_moves_stats(); -#endif // ENABLE_MOVE_STATS - - _reset_blocks(); - _reset(); - } - - void GCodeTimeEstimator::calculate_time_from_file(const std::string& file) - { - reset(); - - _parser.parse_file(file, boost::bind(&GCodeTimeEstimator::_process_gcode_line, this, _1, _2)); - _calculate_time(); - -#if ENABLE_MOVE_STATS - _log_moves_stats(); -#endif // ENABLE_MOVE_STATS - - _reset_blocks(); - _reset(); - } - - void GCodeTimeEstimator::calculate_time_from_lines(const std::vector& gcode_lines) - { - reset(); - - auto action = [this](GCodeReader &reader, const GCodeReader::GCodeLine &line) - { this->_process_gcode_line(reader, line); }; - for (const std::string& line : gcode_lines) - _parser.parse_line(line, action); - _calculate_time(); - -#if ENABLE_MOVE_STATS - _log_moves_stats(); -#endif // ENABLE_MOVE_STATS - - _reset_blocks(); - _reset(); - } - void GCodeTimeEstimator::add_gcode_line(const std::string& gcode_line) { PROFILE_FUNC(); @@ -239,14 +222,157 @@ namespace Slic3r { void GCodeTimeEstimator::calculate_time() { PROFILE_FUNC(); + _reset_time(); + _set_blocks_st_synchronize(false); _calculate_time(); #if ENABLE_MOVE_STATS _log_moves_stats(); #endif // ENABLE_MOVE_STATS + } - _reset_blocks(); - _reset(); + void GCodeTimeEstimator::calculate_time_from_text(const std::string& gcode) + { + reset(); + + _parser.parse_buffer(gcode, + [this](GCodeReader &reader, const GCodeReader::GCodeLine &line) + { this->_process_gcode_line(reader, line); }); + + _calculate_time(); + +#if ENABLE_MOVE_STATS + _log_moves_stats(); +#endif // ENABLE_MOVE_STATS + } + + void GCodeTimeEstimator::calculate_time_from_file(const std::string& file) + { + reset(); + + _parser.parse_file(file, boost::bind(&GCodeTimeEstimator::_process_gcode_line, this, _1, _2)); + _calculate_time(); + +#if ENABLE_MOVE_STATS + _log_moves_stats(); +#endif // ENABLE_MOVE_STATS + } + + void GCodeTimeEstimator::calculate_time_from_lines(const std::vector& gcode_lines) + { + reset(); + + auto action = [this](GCodeReader &reader, const GCodeReader::GCodeLine &line) + { this->_process_gcode_line(reader, line); }; + for (const std::string& line : gcode_lines) + _parser.parse_line(line, action); + _calculate_time(); + +#if ENABLE_MOVE_STATS + _log_moves_stats(); +#endif // ENABLE_MOVE_STATS + } + + std::string GCodeTimeEstimator::get_elapsed_time_string() + { + calculate_time(); + switch (_mode) + { + default: + case Default: + return ELAPSED_TIME_TAG_DEFAULT + std::to_string(get_time()) + "\n"; + case Silent: + return ELAPSED_TIME_TAG_SILENT + std::to_string(get_time()) + "\n"; + } + } + + bool GCodeTimeEstimator::post_process_elapsed_times(const std::string& filename, float default_time, float silent_time) + { + boost::nowide::ifstream in(filename); + if (!in.good()) + throw std::runtime_error(std::string("Remaining times estimation failed.\nCannot open file for reading.\n")); + + std::string path_tmp = filename + ".times"; + + FILE* out = boost::nowide::fopen(path_tmp.c_str(), "wb"); + if (out == nullptr) + throw std::runtime_error(std::string("Remaining times estimation failed.\nCannot open file for writing.\n")); + + std::string line; + while (std::getline(in, line)) + { + if (!in.good()) + { + fclose(out); + throw std::runtime_error(std::string("Remaining times estimation failed.\nError while reading from file.\n")); + } + +#if REMAINING_TIME_USE_SINGLE_GCODE_COMMAND + // this function expects elapsed time for default and silent mode to be into two consecutive lines inside the gcode + if (boost::contains(line, ELAPSED_TIME_TAG_DEFAULT)) + { + std::string default_elapsed_time_str = line.substr(ELAPSED_TIME_TAG_DEFAULT.length()); + line = REMAINING_TIME_CMD + " D:" + _get_time_dhms(default_time - (float)atof(default_elapsed_time_str.c_str())); + + std::string next_line; + std::getline(in, next_line); + if (!in.good()) + { + fclose(out); + throw std::runtime_error(std::string("Remaining times estimation failed.\nError while reading from file.\n")); + } + + if (boost::contains(next_line, ELAPSED_TIME_TAG_SILENT)) + { + std::string silent_elapsed_time_str = next_line.substr(ELAPSED_TIME_TAG_SILENT.length()); + line += " S:" + _get_time_dhms(silent_time - (float)atof(silent_elapsed_time_str.c_str())) + REMAINING_TIME_COMMENT; + } + else + // found horphaned default elapsed time, skip the remaining time line output + line = next_line; + } + else if (boost::contains(line, ELAPSED_TIME_TAG_SILENT)) + // found horphaned silent elapsed time, skip the remaining time line output + continue; +#else + bool processed = false; + if (boost::contains(line, ELAPSED_TIME_TAG_DEFAULT)) + { + std::string elapsed_time_str = line.substr(ELAPSED_TIME_TAG_DEFAULT.length()); + line = REMAINING_TIME_CMD_DEFAULT + " " + _get_time_dhms(default_time - (float)atof(elapsed_time_str.c_str())); + processed = true; + } + else if (boost::contains(line, ELAPSED_TIME_TAG_SILENT)) + { + std::string elapsed_time_str = line.substr(ELAPSED_TIME_TAG_SILENT.length()); + line = REMAINING_TIME_CMD_SILENT + " " + _get_time_dhms(silent_time - (float)atof(elapsed_time_str.c_str())); + processed = true; + } + + if (processed) + line += REMAINING_TIME_COMMENT; +#endif // REMAINING_TIME_USE_SINGLE_GCODE_COMMAND + + line += "\n"; + fwrite((const void*)line.c_str(), 1, line.length(), out); + if (ferror(out)) + { + in.close(); + fclose(out); + boost::nowide::remove(path_tmp.c_str()); + throw std::runtime_error(std::string("Remaining times estimation failed.\nIs the disk full?\n")); + } + } + + fclose(out); + in.close(); + + boost::nowide::remove(filename.c_str()); + if (boost::nowide::rename(path_tmp.c_str(), filename.c_str()) != 0) + throw std::runtime_error(std::string("Failed to rename the output G-code file from ") + path_tmp + " to " + filename + '\n' + + "Is " + path_tmp + " locked?" + '\n'); + + return true; } void GCodeTimeEstimator::set_axis_position(EAxis axis, float position) @@ -411,6 +537,66 @@ namespace Slic3r { set_global_positioning_type(Absolute); set_e_local_positioning_type(Absolute); + switch (_mode) + { + default: + case Default: + { + _set_default_as_default(); + break; + } + case Silent: + { + _set_default_as_silent(); + break; + } + } + } + + void GCodeTimeEstimator::reset() + { + _reset_time(); +#if ENABLE_MOVE_STATS + _moves_stats.clear(); +#endif // ENABLE_MOVE_STATS + _reset_blocks(); + _reset(); + } + + float GCodeTimeEstimator::get_time() const + { + return _time; + } + + std::string GCodeTimeEstimator::get_time_dhms() const + { + return _get_time_dhms(get_time()); + } + + void GCodeTimeEstimator::_reset() + { + _curr.reset(); + _prev.reset(); + + set_axis_position(X, 0.0f); + set_axis_position(Y, 0.0f); + set_axis_position(Z, 0.0f); + + set_additional_time(0.0f); + } + + void GCodeTimeEstimator::_reset_time() + { + _time = 0.0f; + } + + void GCodeTimeEstimator::_reset_blocks() + { + _blocks.clear(); + } + + void GCodeTimeEstimator::_set_default_as_default() + { set_feedrate(DEFAULT_FEEDRATE); set_acceleration(DEFAULT_ACCELERATION); set_retract_acceleration(DEFAULT_RETRACT_ACCELERATION); @@ -427,55 +613,30 @@ namespace Slic3r { } } - void GCodeTimeEstimator::reset() + void GCodeTimeEstimator::_set_default_as_silent() { - _time = 0.0f; -#if ENABLE_MOVE_STATS - _moves_stats.clear(); -#endif // ENABLE_MOVE_STATS - _reset_blocks(); - _reset(); + set_feedrate(SILENT_FEEDRATE); + set_acceleration(SILENT_ACCELERATION); + set_retract_acceleration(SILENT_RETRACT_ACCELERATION); + set_minimum_feedrate(SILENT_MINIMUM_FEEDRATE); + set_minimum_travel_feedrate(SILENT_MINIMUM_TRAVEL_FEEDRATE); + set_extrude_factor_override_percentage(SILENT_EXTRUDE_FACTOR_OVERRIDE_PERCENTAGE); + + for (unsigned char a = X; a < Num_Axis; ++a) + { + EAxis axis = (EAxis)a; + set_axis_max_feedrate(axis, SILENT_AXIS_MAX_FEEDRATE[a]); + set_axis_max_acceleration(axis, SILENT_AXIS_MAX_ACCELERATION[a]); + set_axis_max_jerk(axis, SILENT_AXIS_MAX_JERK[a]); + } } - float GCodeTimeEstimator::get_time() const + void GCodeTimeEstimator::_set_blocks_st_synchronize(bool state) { - return _time; - } - - std::string GCodeTimeEstimator::get_time_hms() const - { - float timeinsecs = get_time(); - int hours = (int)(timeinsecs / 3600.0f); - timeinsecs -= (float)hours * 3600.0f; - int minutes = (int)(timeinsecs / 60.0f); - timeinsecs -= (float)minutes * 60.0f; - - char buffer[64]; - if (hours > 0) - ::sprintf(buffer, "%dh %dm %ds", hours, minutes, (int)timeinsecs); - else if (minutes > 0) - ::sprintf(buffer, "%dm %ds", minutes, (int)timeinsecs); - else - ::sprintf(buffer, "%ds", (int)timeinsecs); - - return buffer; - } - - void GCodeTimeEstimator::_reset() - { - _curr.reset(); - _prev.reset(); - - set_axis_position(X, 0.0f); - set_axis_position(Y, 0.0f); - set_axis_position(Z, 0.0f); - - set_additional_time(0.0f); - } - - void GCodeTimeEstimator::_reset_blocks() - { - _blocks.clear(); + for (Block& block : _blocks) + { + block.st_synchronized = state; + } } void GCodeTimeEstimator::_calculate_time() @@ -488,6 +649,9 @@ namespace Slic3r { for (const Block& block : _blocks) { + if (block.st_synchronized) + continue; + #if ENABLE_MOVE_STATS float block_time = 0.0f; block_time += block.acceleration_time(); @@ -1043,7 +1207,7 @@ namespace Slic3r { void GCodeTimeEstimator::_simulate_st_synchronize() { _calculate_time(); - _reset_blocks(); + _set_blocks_st_synchronize(true); } void GCodeTimeEstimator::_forward_pass() @@ -1051,7 +1215,10 @@ namespace Slic3r { if (_blocks.size() > 1) { for (unsigned int i = 0; i < (unsigned int)_blocks.size() - 1; ++i) - { + { + if (_blocks[i].st_synchronized || _blocks[i + 1].st_synchronized) + continue; + _planner_forward_pass_kernel(_blocks[i], _blocks[i + 1]); } } @@ -1063,6 +1230,9 @@ namespace Slic3r { { for (int i = (int)_blocks.size() - 1; i >= 1; --i) { + if (_blocks[i - 1].st_synchronized || _blocks[i].st_synchronized) + continue; + _planner_reverse_pass_kernel(_blocks[i - 1], _blocks[i]); } } @@ -1115,6 +1285,9 @@ namespace Slic3r { for (Block& b : _blocks) { + if (b.st_synchronized) + continue; + curr = next; next = &b; @@ -1144,6 +1317,28 @@ namespace Slic3r { } } + std::string GCodeTimeEstimator::_get_time_dhms(float time_in_secs) + { + int days = (int)(time_in_secs / 86400.0f); + time_in_secs -= (float)days * 86400.0f; + int hours = (int)(time_in_secs / 3600.0f); + time_in_secs -= (float)hours * 3600.0f; + int minutes = (int)(time_in_secs / 60.0f); + time_in_secs -= (float)minutes * 60.0f; + + char buffer[64]; + if (days > 0) + ::sprintf(buffer, "%dd %dh %dm %ds", days, hours, minutes, (int)time_in_secs); + else if (hours > 0) + ::sprintf(buffer, "%dh %dm %ds", hours, minutes, (int)time_in_secs); + else if (minutes > 0) + ::sprintf(buffer, "%dm %ds", minutes, (int)time_in_secs); + else + ::sprintf(buffer, "%ds", (int)time_in_secs); + + return buffer; + } + #if ENABLE_MOVE_STATS void GCodeTimeEstimator::_log_moves_stats() const { diff --git a/xs/src/libslic3r/GCodeTimeEstimator.hpp b/xs/src/libslic3r/GCodeTimeEstimator.hpp index 8f948abd1..c3fe0f04c 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.hpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.hpp @@ -17,6 +17,12 @@ namespace Slic3r { class GCodeTimeEstimator { public: + enum EMode : unsigned char + { + Default, + Silent + }; + enum EUnits : unsigned char { Millimeters, @@ -135,6 +141,10 @@ namespace Slic3r { FeedrateProfile feedrate; Trapezoid trapezoid; + bool st_synchronized; + + Block(); + // Returns the length of the move covered by this block, in mm float move_length() const; @@ -188,18 +198,29 @@ namespace Slic3r { #endif // ENABLE_MOVE_STATS private: + EMode _mode; GCodeReader _parser; State _state; Feedrates _curr; Feedrates _prev; BlocksList _blocks; float _time; // s + #if ENABLE_MOVE_STATS MovesStatsMap _moves_stats; #endif // ENABLE_MOVE_STATS public: - GCodeTimeEstimator(); + explicit GCodeTimeEstimator(EMode mode); + + // Adds the given gcode line + void add_gcode_line(const std::string& gcode_line); + + void add_gcode_block(const char *ptr); + void add_gcode_block(const std::string &str) { this->add_gcode_block(str.c_str()); } + + // Calculates the time estimate from the gcode lines added using add_gcode_line() or add_gcode_block() + void calculate_time(); // Calculates the time estimate from the given gcode in string format void calculate_time_from_text(const std::string& gcode); @@ -210,14 +231,12 @@ namespace Slic3r { // Calculates the time estimate from the gcode contained in given list of gcode lines void calculate_time_from_lines(const std::vector& gcode_lines); - // Adds the given gcode line - void add_gcode_line(const std::string& gcode_line); + // Calculates the time estimate from the gcode lines added using add_gcode_line() or add_gcode_block() + // and returns it in a formatted string + std::string get_elapsed_time_string(); - void add_gcode_block(const char *ptr); - void add_gcode_block(const std::string &str) { this->add_gcode_block(str.c_str()); } - - // Calculates the time estimate from the gcode lines added using add_gcode_line() - void calculate_time(); + // Converts elapsed time lines, contained in the gcode saved with the given filename, into remaining time commands + static bool post_process_elapsed_times(const std::string& filename, float default_time, float silent_time); // Set current position on the given axis with the given value void set_axis_position(EAxis axis, float position); @@ -275,13 +294,19 @@ namespace Slic3r { // Returns the estimated time, in seconds float get_time() const; - // Returns the estimated time, in format HHh MMm SSs - std::string get_time_hms() const; + // Returns the estimated time, in format DDd HHh MMm SSs + std::string get_time_dhms() const; private: void _reset(); + void _reset_time(); void _reset_blocks(); + void _set_default_as_default(); + void _set_default_as_silent(); + + void _set_blocks_st_synchronize(bool state); + // Calculates the time estimate void _calculate_time(); @@ -353,6 +378,9 @@ namespace Slic3r { void _recalculate_trapezoids(); + // Returns the given time is seconds in format DDd HHh MMm SSs + static std::string _get_time_dhms(float time_in_secs); + #if ENABLE_MOVE_STATS void _log_moves_stats() const; #endif // ENABLE_MOVE_STATS diff --git a/xs/src/libslic3r/Print.hpp b/xs/src/libslic3r/Print.hpp index c56e64c6c..c5b0edbdd 100644 --- a/xs/src/libslic3r/Print.hpp +++ b/xs/src/libslic3r/Print.hpp @@ -233,7 +233,8 @@ public: PrintRegionPtrs regions; PlaceholderParser placeholder_parser; // TODO: status_cb - std::string estimated_print_time; + std::string estimated_default_print_time; + std::string estimated_silent_print_time; double total_used_filament, total_extruded_volume, total_cost, total_weight; std::map filament_stats; PrintState state; diff --git a/xs/xsp/Print.xsp b/xs/xsp/Print.xsp index ef9c5345f..7ccbe0111 100644 --- a/xs/xsp/Print.xsp +++ b/xs/xsp/Print.xsp @@ -152,8 +152,10 @@ _constant() %code%{ RETVAL = &THIS->skirt; %}; Ref brim() %code%{ RETVAL = &THIS->brim; %}; - std::string estimated_print_time() - %code%{ RETVAL = THIS->estimated_print_time; %}; + std::string estimated_default_print_time() + %code%{ RETVAL = THIS->estimated_default_print_time; %}; + std::string estimated_silent_print_time() + %code%{ RETVAL = THIS->estimated_silent_print_time; %}; PrintObjectPtrs* objects() %code%{ RETVAL = &THIS->objects; %}; From 2d24bf5f73ac722cc83bc8f279631572d6ed6426 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Thu, 31 May 2018 16:21:10 +0200 Subject: [PATCH 015/198] Wipe into infill - copies of one object are properly processed --- xs/src/libslic3r/ExtrusionEntity.hpp | 13 ++++ .../libslic3r/ExtrusionEntityCollection.hpp | 18 ++---- xs/src/libslic3r/GCode.cpp | 63 ++++++++++++------- xs/src/libslic3r/GCode.hpp | 3 + xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp | 1 - xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp | 1 + xs/src/libslic3r/Print.cpp | 56 +++++++++-------- 7 files changed, 92 insertions(+), 63 deletions(-) diff --git a/xs/src/libslic3r/ExtrusionEntity.hpp b/xs/src/libslic3r/ExtrusionEntity.hpp index 15363e8ed..c0f681de5 100644 --- a/xs/src/libslic3r/ExtrusionEntity.hpp +++ b/xs/src/libslic3r/ExtrusionEntity.hpp @@ -93,6 +93,19 @@ public: virtual Polyline as_polyline() const = 0; virtual double length() const = 0; virtual double total_volume() const = 0; + + void set_entity_extruder_override(unsigned int copy, int extruder) { + if (copy+1 > extruder_override.size()) + extruder_override.resize(copy+1, -1); // copy is zero-based index + extruder_override[copy] = extruder; + } + virtual int get_extruder_override(unsigned int copy) const { try { return extruder_override.at(copy); } catch (...) { return -1; } } + virtual bool is_extruder_overridden(unsigned int copy) const { try { return extruder_override.at(copy) != -1; } catch (...) { return false; } } + +private: + // Set this variable to explicitly state you want to use specific extruder for thie EE (used for MM infill wiping) + // Each member of the vector corresponds to the respective copy of the object + std::vector extruder_override; }; typedef std::vector ExtrusionEntitiesPtr; diff --git a/xs/src/libslic3r/ExtrusionEntityCollection.hpp b/xs/src/libslic3r/ExtrusionEntityCollection.hpp index d292248fc..ee4b75f38 100644 --- a/xs/src/libslic3r/ExtrusionEntityCollection.hpp +++ b/xs/src/libslic3r/ExtrusionEntityCollection.hpp @@ -91,20 +91,12 @@ public: return 0.; } - void set_extruder_override(int extruder) { - extruder_override = extruder; - for (auto& member : entities) { - if (member->is_collection()) - dynamic_cast(member)->set_extruder_override(extruder); - } + void set_extruder_override(unsigned int copy, int extruder) { + for (ExtrusionEntity* member : entities) + member->set_entity_extruder_override(copy, extruder); } - int get_extruder_override() const { return extruder_override; } - bool is_extruder_overridden() const { return extruder_override != -1; } - - -private: - // Set this variable to explicitly state you want to use specific extruder for thie EEC (used for MM infill wiping) - int extruder_override = -1; + virtual int get_extruder_override(unsigned int copy) const { return entities.front()->get_extruder_override(copy); } + virtual bool is_extruder_overridden(unsigned int copy) const { return entities.front()->is_extruder_overridden(copy); } }; } diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 1ce181517..bbca523e3 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1262,8 +1262,8 @@ void GCode::process_layer( // This shouldn't happen but first_point() would fail. continue; - if (fill->is_extruder_overridden()) - continue; + /*if (fill->is_extruder_overridden()) + continue;*/ // init by_extruder item only if we actually use the extruder int extruder_id = std::max(0, (is_solid_infill(fill->entities.front()->role()) ? region.config.solid_infill_extruder : region.config.infill_extruder) - 1); @@ -1342,28 +1342,27 @@ void GCode::process_layer( gcode += "; INFILL WIPING STARTS\n"; if (extruder_id != layer_tools.extruders.front()) { // if this is the first extruder on this layer, there was no toolchange for (const auto& layer_to_print : layers) { // iterate through all objects - gcode+="objekt\n"; if (layer_to_print.object_layer == nullptr) continue; - std::vector overridden; - for (size_t region_id = 0; region_id < print.regions.size(); ++ region_id) { - gcode+="region\n"; - ObjectByExtruder::Island::Region new_region; - overridden.push_back(new_region); - for (ExtrusionEntity *ee : (*layer_to_print.object_layer).regions[region_id]->fills.entities) { - gcode+="entity\n"; - auto *fill = dynamic_cast(ee); - if (fill->get_extruder_override() == extruder_id) { - gcode+="*\n"; - overridden.back().infills.append(*fill); - fill->set_extruder_override(-1); - } - } - } + m_config.apply((layer_to_print.object_layer)->object()->config, true); - Point copy = (layer_to_print.object_layer)->object()->_shifted_copies.front(); - this->set_origin(unscale(copy.x), unscale(copy.y)); - gcode += this->extrude_infill(print, overridden); + + for (unsigned copy_id = 0; copy_id < layer_to_print.object()->copies().size(); ++copy_id) { + std::vector overridden; + for (size_t region_id = 0; region_id < print.regions.size(); ++ region_id) { + ObjectByExtruder::Island::Region new_region; + overridden.push_back(new_region); + for (ExtrusionEntity *ee : (*layer_to_print.object_layer).regions[region_id]->fills.entities) { + auto *fill = dynamic_cast(ee); + if (fill->get_extruder_override(copy_id) == extruder_id) + overridden.back().infills.append(*fill); + } + } + + Point copy = (layer_to_print.object_layer)->object()->_shifted_copies[copy_id]; + this->set_origin(unscale(copy.x), unscale(copy.y)); + gcode += this->extrude_infill(print, overridden); + } } } gcode += "; WIPING FINISHED\n"; @@ -1393,6 +1392,7 @@ void GCode::process_layer( // Sort the copies by the closest point starting with the current print position. + unsigned int copy_id = 0; for (const Point © : copies) { // When starting a new object, use the external motion planner for the first travel move. std::pair this_object_copy(print_object, copy); @@ -1409,13 +1409,14 @@ void GCode::process_layer( } for (const ObjectByExtruder::Island &island : object_by_extruder.islands) { if (print.config.infill_first) { - gcode += this->extrude_infill(print, island.by_region); + gcode += this->extrude_infill(print, island.by_region_special(copy_id)); gcode += this->extrude_perimeters(print, island.by_region, lower_layer_edge_grids[layer_id]); } else { gcode += this->extrude_perimeters(print, island.by_region, lower_layer_edge_grids[layer_id]); - gcode += this->extrude_infill(print, island.by_region); + gcode += this->extrude_infill(print, island.by_region_special(copy_id)); } } + ++copy_id; } } } @@ -2042,7 +2043,6 @@ std::string GCode::extrude_perimeters(const Print &print, const std::vector &by_region) { std::string gcode; @@ -2477,4 +2477,19 @@ Point GCode::gcode_to_point(const Pointf &point) const scale_(point.y - m_origin.y + extruder_offset.y)); } + +std::vector GCode::ObjectByExtruder::Island::by_region_special(unsigned int copy) const +{ + std::vector out; + for (const auto& reg : by_region) { + out.push_back(ObjectByExtruder::Island::Region()); + out.back().perimeters.append(reg.perimeters); + + for (const auto& ee : reg.infills.entities) + if (ee->get_extruder_override(copy) == -1) + out.back().infills.append(*ee); + } + return out; } + +} // namespace Slic3r diff --git a/xs/src/libslic3r/GCode.hpp b/xs/src/libslic3r/GCode.hpp index d028e90aa..7716de8b8 100644 --- a/xs/src/libslic3r/GCode.hpp +++ b/xs/src/libslic3r/GCode.hpp @@ -217,9 +217,12 @@ protected: ExtrusionEntityCollection infills; }; std::vector by_region; + std::vector by_region_special(unsigned int copy) const; }; std::vector islands; }; + + std::string extrude_perimeters(const Print &print, const std::vector &by_region, std::unique_ptr &lower_layer_edge_grid); std::string extrude_infill(const Print &print, const std::vector &by_region); std::string extrude_support(const ExtrusionEntityCollection &support_fills); diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp index 45d28e839..4da100768 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp @@ -21,7 +21,6 @@ TODO LIST #include #include #include -#include #include "Analyzer.hpp" diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp index 54cb51658..a821b2024 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp @@ -5,6 +5,7 @@ #include #include #include +#include #include "WipeTower.hpp" diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index 7e5ac0812..6a079b7d9 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -1183,34 +1183,40 @@ float Print::mark_wiping_infill(const ToolOrdering::LayerTools& layer_tools, uns if (!config.filament_soluble.get_at(new_extruder)) { // Soluble filament cannot be wiped in a random infill for (size_t i = 0; i < objects.size(); ++ i) { // Let's iterate through all objects... Layer* this_layer = nullptr; - for (unsigned int a = 0; a < objects[i]->layers.size(); this_layer = objects[i]->layers[++a]) // Finds this layer - if (std::abs(layer_tools.print_z - objects[i]->layers[a]->print_z) < EPSILON) + for (unsigned int a = 0; a < objects[i]->layers.size(); ++a) // Finds this layer + if (std::abs(layer_tools.print_z - objects[i]->layers[a]->print_z) < EPSILON) { + this_layer = objects[i]->layers[a]; break; - - for (size_t region_id = 0; region_id < objects[i]->print()->regions.size(); ++ region_id) { - unsigned int region_extruder = objects[i]->print()->regions[region_id]->config.infill_extruder - 1; // config value is 1-based - if (config.filament_soluble.get_at(region_extruder)) // if this infill is meant to be soluble, keep it that way - continue; - - if (!config.infill_first) { // in this case we must verify that region_extruder was already used at this layer (and perimeters of the infill are therefore extruded) - bool unused_yet = false; - for (unsigned i = 0; i < layer_tools.extruders.size(); ++i) { - if (layer_tools.extruders[i] == new_extruder) - unused_yet = true; - if (layer_tools.extruders[i] == region_extruder) - break; - } - if (unused_yet) - continue; } + if (this_layer == nullptr) + continue; - ExtrusionEntityCollection& eec = this_layer->regions[region_id]->fills; - for (ExtrusionEntity* ee : eec.entities) { // iterate through all infill Collections - auto* fill = dynamic_cast(ee); - if (fill->role() == erTopSolidInfill) continue; // color of TopSolidInfill cannot be changed - it is visible - if (volume_to_wipe > 0.f && !fill->is_extruder_overridden() && fill->total_volume() > min_infill_volume) { // this infill will be used to wipe this extruder - fill->set_extruder_override(new_extruder); - volume_to_wipe -= fill->total_volume(); + for (unsigned int copy = 0; copy < objects[i]->copies().size(); ++copy) { // iterate through copies first, so that we mark neighbouring infills + for (size_t region_id = 0; region_id < objects[i]->print()->regions.size(); ++ region_id) { + + unsigned int region_extruder = objects[i]->print()->regions[region_id]->config.infill_extruder - 1; // config value is 1-based + if (config.filament_soluble.get_at(region_extruder)) // if this infill is meant to be soluble, keep it that way + continue; + + if (!config.infill_first) { // in this case we must verify that region_extruder was already used at this layer (and perimeters of the infill are therefore extruded) + bool unused_yet = false; + for (unsigned i = 0; i < layer_tools.extruders.size(); ++i) { + if (layer_tools.extruders[i] == new_extruder) + unused_yet = true; + if (layer_tools.extruders[i] == region_extruder) + break; + } + if (unused_yet) + continue; + } + ExtrusionEntityCollection& eec = this_layer->regions[region_id]->fills; + for (ExtrusionEntity* ee : eec.entities) { // iterate through all infill Collections + auto* fill = dynamic_cast(ee); + if (fill->role() == erTopSolidInfill || fill->role() == erGapFill) continue; // these cannot be changed - it is / may be visible + if (volume_to_wipe > 0.f && !fill->is_extruder_overridden(copy) && fill->total_volume() > min_infill_volume) { // this infill will be used to wipe this extruder + fill->set_extruder_override(copy, new_extruder); + volume_to_wipe -= fill->total_volume(); + } } } } From a6c3acdf0209ed8e0c877d4b8e267bcafd72d6d4 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Fri, 1 Jun 2018 15:38:49 +0200 Subject: [PATCH 016/198] Wiping into infill - no infills are now inadvertedly printed twice (hopefully) --- xs/src/libslic3r/GCode.cpp | 30 ++++++++++++++++++++++-------- xs/src/libslic3r/GCode.hpp | 3 ++- xs/src/libslic3r/Print.cpp | 1 + 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index bbca523e3..572f55adc 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1281,6 +1281,17 @@ void GCode::process_layer( if (islands[i].by_region.empty()) islands[i].by_region.assign(print.regions.size(), ObjectByExtruder::Island::Region()); islands[i].by_region[region_id].infills.append(fill->entities); + + // We just added fill->entities.size() entities, if they are not to be printed before the main object (during infill wiping), + // we will note their indices (for each copy separately): + unsigned int last_added_entity_index = islands[i].by_region[region_id].infills.entities.size()-1; + for (unsigned copy_id = 0; copy_id < layer_to_print.object()->copies().size(); ++copy_id) { + if (islands[i].by_region[region_id].infills_per_copy_ids.size() < copy_id + 1) // if this copy isn't in the list yet + islands[i].by_region[region_id].infills_per_copy_ids.push_back(std::vector()); + if (!fill->is_extruder_overridden(copy_id)) + for (int j=0; jentities.size(); ++j) + islands[i].by_region[region_id].infills_per_copy_ids.back().push_back(last_added_entity_index - j); + } break; } } @@ -1409,11 +1420,11 @@ void GCode::process_layer( } for (const ObjectByExtruder::Island &island : object_by_extruder.islands) { if (print.config.infill_first) { - gcode += this->extrude_infill(print, island.by_region_special(copy_id)); + gcode += this->extrude_infill(print, island.by_region_per_copy(copy_id)); gcode += this->extrude_perimeters(print, island.by_region, lower_layer_edge_grids[layer_id]); } else { gcode += this->extrude_perimeters(print, island.by_region, lower_layer_edge_grids[layer_id]); - gcode += this->extrude_infill(print, island.by_region_special(copy_id)); + gcode += this->extrude_infill(print, island.by_region_per_copy(copy_id)); } } ++copy_id; @@ -2478,16 +2489,19 @@ Point GCode::gcode_to_point(const Pointf &point) const } -std::vector GCode::ObjectByExtruder::Island::by_region_special(unsigned int copy) const +// Goes through by_region std::vector and returns only a subvector of entities to be printed in usual time +// i.e. not when it's going to be done during infill wiping +std::vector GCode::ObjectByExtruder::Island::by_region_per_copy(unsigned int copy) const { std::vector out; - for (const auto& reg : by_region) { + for (auto& reg : by_region) { out.push_back(ObjectByExtruder::Island::Region()); - out.back().perimeters.append(reg.perimeters); + out.back().perimeters.append(reg.perimeters); // we will print all perimeters there are - for (const auto& ee : reg.infills.entities) - if (ee->get_extruder_override(copy) == -1) - out.back().infills.append(*ee); + if (!reg.infills_per_copy_ids.empty()) { + for (unsigned int i=0; i> infills_per_copy_ids; // each member of the struct denotes first and one-past-last element to actually print }; std::vector by_region; - std::vector by_region_special(unsigned int copy) const; + std::vector by_region_per_copy(unsigned int copy) const; // returns only extrusions that are NOT printed during wiping into infill for this copy }; std::vector islands; }; diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index 6a079b7d9..cdb51999b 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -1222,6 +1222,7 @@ float Print::mark_wiping_infill(const ToolOrdering::LayerTools& layer_tools, uns } } } + return std::max(0.f, volume_to_wipe); } From bdaa1cbdfd1c92742b351bc772d63a740deae387 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Fri, 1 Jun 2018 15:38:49 +0200 Subject: [PATCH 017/198] Wiping into infill - no infills are now inadvertedly printed twice (hopefully) --- xs/src/libslic3r/GCode.cpp | 30 ++++++++++++++++++++++-------- xs/src/libslic3r/GCode.hpp | 3 ++- xs/src/libslic3r/Print.cpp | 1 + 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index bbca523e3..572f55adc 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1281,6 +1281,17 @@ void GCode::process_layer( if (islands[i].by_region.empty()) islands[i].by_region.assign(print.regions.size(), ObjectByExtruder::Island::Region()); islands[i].by_region[region_id].infills.append(fill->entities); + + // We just added fill->entities.size() entities, if they are not to be printed before the main object (during infill wiping), + // we will note their indices (for each copy separately): + unsigned int last_added_entity_index = islands[i].by_region[region_id].infills.entities.size()-1; + for (unsigned copy_id = 0; copy_id < layer_to_print.object()->copies().size(); ++copy_id) { + if (islands[i].by_region[region_id].infills_per_copy_ids.size() < copy_id + 1) // if this copy isn't in the list yet + islands[i].by_region[region_id].infills_per_copy_ids.push_back(std::vector()); + if (!fill->is_extruder_overridden(copy_id)) + for (int j=0; jentities.size(); ++j) + islands[i].by_region[region_id].infills_per_copy_ids.back().push_back(last_added_entity_index - j); + } break; } } @@ -1409,11 +1420,11 @@ void GCode::process_layer( } for (const ObjectByExtruder::Island &island : object_by_extruder.islands) { if (print.config.infill_first) { - gcode += this->extrude_infill(print, island.by_region_special(copy_id)); + gcode += this->extrude_infill(print, island.by_region_per_copy(copy_id)); gcode += this->extrude_perimeters(print, island.by_region, lower_layer_edge_grids[layer_id]); } else { gcode += this->extrude_perimeters(print, island.by_region, lower_layer_edge_grids[layer_id]); - gcode += this->extrude_infill(print, island.by_region_special(copy_id)); + gcode += this->extrude_infill(print, island.by_region_per_copy(copy_id)); } } ++copy_id; @@ -2478,16 +2489,19 @@ Point GCode::gcode_to_point(const Pointf &point) const } -std::vector GCode::ObjectByExtruder::Island::by_region_special(unsigned int copy) const +// Goes through by_region std::vector and returns only a subvector of entities to be printed in usual time +// i.e. not when it's going to be done during infill wiping +std::vector GCode::ObjectByExtruder::Island::by_region_per_copy(unsigned int copy) const { std::vector out; - for (const auto& reg : by_region) { + for (auto& reg : by_region) { out.push_back(ObjectByExtruder::Island::Region()); - out.back().perimeters.append(reg.perimeters); + out.back().perimeters.append(reg.perimeters); // we will print all perimeters there are - for (const auto& ee : reg.infills.entities) - if (ee->get_extruder_override(copy) == -1) - out.back().infills.append(*ee); + if (!reg.infills_per_copy_ids.empty()) { + for (unsigned int i=0; i> infills_per_copy_ids; // indices of infill.entities that are not part of infill wiping (an element for each object copy) }; std::vector by_region; - std::vector by_region_special(unsigned int copy) const; + std::vector by_region_per_copy(unsigned int copy) const; // returns only extrusions that are NOT printed during wiping into infill for this copy }; std::vector islands; }; diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index 6a079b7d9..cdb51999b 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -1222,6 +1222,7 @@ float Print::mark_wiping_infill(const ToolOrdering::LayerTools& layer_tools, uns } } } + return std::max(0.f, volume_to_wipe); } From 7c9d594ff60090337b8661bcbb6337b94841ec99 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Mon, 4 Jun 2018 12:15:59 +0200 Subject: [PATCH 018/198] Fixed behaviour of infill wiping for multiple copies of an object --- xs/src/libslic3r/GCode.cpp | 8 ++------ xs/src/libslic3r/Print.cpp | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 572f55adc..7d4ecf0b4 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1262,9 +1262,6 @@ void GCode::process_layer( // This shouldn't happen but first_point() would fail. continue; - /*if (fill->is_extruder_overridden()) - continue;*/ - // init by_extruder item only if we actually use the extruder int extruder_id = std::max(0, (is_solid_infill(fill->entities.front()->role()) ? region.config.solid_infill_extruder : region.config.infill_extruder) - 1); // Init by_extruder item only if we actually use the extruder. @@ -1285,12 +1282,12 @@ void GCode::process_layer( // We just added fill->entities.size() entities, if they are not to be printed before the main object (during infill wiping), // we will note their indices (for each copy separately): unsigned int last_added_entity_index = islands[i].by_region[region_id].infills.entities.size()-1; - for (unsigned copy_id = 0; copy_id < layer_to_print.object()->copies().size(); ++copy_id) { + for (unsigned copy_id = 0; copy_id < layer_to_print.object()->_shifted_copies.size(); ++copy_id) { if (islands[i].by_region[region_id].infills_per_copy_ids.size() < copy_id + 1) // if this copy isn't in the list yet islands[i].by_region[region_id].infills_per_copy_ids.push_back(std::vector()); if (!fill->is_extruder_overridden(copy_id)) for (int j=0; jentities.size(); ++j) - islands[i].by_region[region_id].infills_per_copy_ids.back().push_back(last_added_entity_index - j); + islands[i].by_region[region_id].infills_per_copy_ids[copy_id].push_back(last_added_entity_index - j); } break; } @@ -1401,7 +1398,6 @@ void GCode::process_layer( else copies.push_back(print_object->_shifted_copies[single_object_idx]); // Sort the copies by the closest point starting with the current print position. - unsigned int copy_id = 0; for (const Point © : copies) { diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index cdb51999b..e5a4f5dc7 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -1191,7 +1191,7 @@ float Print::mark_wiping_infill(const ToolOrdering::LayerTools& layer_tools, uns if (this_layer == nullptr) continue; - for (unsigned int copy = 0; copy < objects[i]->copies().size(); ++copy) { // iterate through copies first, so that we mark neighbouring infills + for (unsigned int copy = 0; copy < objects[i]->_shifted_copies.size(); ++copy) { // iterate through copies first, so that we mark neighbouring infills for (size_t region_id = 0; region_id < objects[i]->print()->regions.size(); ++ region_id) { unsigned int region_extruder = objects[i]->print()->regions[region_id]->config.infill_extruder - 1; // config value is 1-based From 34c850fa9da216070e07b7276fb1ba99c8dbe32b Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Tue, 5 Jun 2018 12:02:45 +0200 Subject: [PATCH 019/198] initial NFP method with convex polygons working. --- xs/CMakeLists.txt | 3 +- xs/src/benchmark.h | 58 + xs/src/libnest2d/CMakeLists.txt | 30 +- .../libnest2d/cmake_modules/FindClipper.cmake | 4 + xs/src/libnest2d/libnest2d.h | 1 + xs/src/libnest2d/libnest2d/boost_alg.hpp | 109 +- .../libnest2d/clipper_backend/CMakeLists.txt | 2 +- .../clipper_backend/clipper_backend.cpp | 19 +- .../clipper_backend/clipper_backend.hpp | 115 +- xs/src/libnest2d/libnest2d/geometries_nfp.hpp | 135 +- .../libnest2d/libnest2d/geometry_traits.hpp | 227 +- xs/src/libnest2d/libnest2d/libnest2d.hpp | 73 +- .../libnest2d/libnest2d/placers/nfpplacer.hpp | 172 +- .../libnest2d/placers/placer_boilerplate.hpp | 7 +- .../libnest2d/selections/djd_heuristic.hpp | 35 +- .../selections/selection_boilerplate.hpp | 6 + xs/src/libnest2d/tests/CMakeLists.txt | 27 +- xs/src/libnest2d/tests/main.cpp | 242 +- xs/src/libnest2d/tests/printer_parts.cpp | 2858 +++++++++++++++-- xs/src/libnest2d/tests/printer_parts.h | 7 +- xs/src/libnest2d/tests/svgtools.hpp | 112 + xs/src/libnest2d/tests/test.cpp | 352 +- xs/src/libslic3r/Model.cpp | 45 +- 23 files changed, 3865 insertions(+), 774 deletions(-) create mode 100644 xs/src/benchmark.h create mode 100644 xs/src/libnest2d/tests/svgtools.hpp diff --git a/xs/CMakeLists.txt b/xs/CMakeLists.txt index fc8dab883..8b9f67cec 100644 --- a/xs/CMakeLists.txt +++ b/xs/CMakeLists.txt @@ -684,6 +684,7 @@ add_custom_target(pot # ############################################################################## set(LIBNEST2D_UNITTESTS ON CACHE BOOL "Force generating unittests for libnest2d") +set(LIBNEST2D_BUILD_SHARED_LIB OFF CACHE BOOL "Disable build of shared lib.") if(LIBNEST2D_UNITTESTS) # If we want the libnest2d unit tests we need to build and executable with @@ -705,7 +706,7 @@ add_subdirectory(${LIBDIR}/libnest2d) target_include_directories(libslic3r PUBLIC BEFORE ${LIBNEST2D_INCLUDES}) # Add the binpack2d main sources and link them to libslic3r -target_link_libraries(libslic3r libnest2d) +target_link_libraries(libslic3r libnest2d_static) # ############################################################################## # Installation diff --git a/xs/src/benchmark.h b/xs/src/benchmark.h new file mode 100644 index 000000000..19870b37b --- /dev/null +++ b/xs/src/benchmark.h @@ -0,0 +1,58 @@ +/* + * Copyright (C) Tamás Mészáros + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +#ifndef INCLUDE_BENCHMARK_H_ +#define INCLUDE_BENCHMARK_H_ + +#include +#include + +/** + * A class for doing benchmarks. + */ +class Benchmark { + typedef std::chrono::high_resolution_clock Clock; + typedef Clock::duration Duration; + typedef Clock::time_point TimePoint; + + TimePoint t1, t2; + Duration d; + + inline double to_sec(Duration d) { + return d.count() * double(Duration::period::num) / Duration::period::den; + } + +public: + + /** + * Measure time from the moment of this call. + */ + void start() { t1 = Clock::now(); } + + /** + * Measure time to the moment of this call. + */ + void stop() { t2 = Clock::now(); } + + /** + * Get the time elapsed between a start() end a stop() call. + * @return Returns the elapsed time in seconds. + */ + double getElapsedSec() { d = t2 - t1; return to_sec(d); } +}; + + +#endif /* INCLUDE_BENCHMARK_H_ */ diff --git a/xs/src/libnest2d/CMakeLists.txt b/xs/src/libnest2d/CMakeLists.txt index 568d1a5a9..ac9530a63 100644 --- a/xs/src/libnest2d/CMakeLists.txt +++ b/xs/src/libnest2d/CMakeLists.txt @@ -19,6 +19,9 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/) option(LIBNEST2D_UNITTESTS "If enabled, googletest framework will be downloaded and the provided unit tests will be included in the build." OFF) +option(LIBNEST2D_BUILD_EXAMPLES "If enabled, examples will be built." OFF) +option(LIBNEST2D_BUILD_SHARED_LIB "Build shared library." ON) + #set(LIBNEST2D_GEOMETRIES_TARGET "" CACHE STRING # "Build libnest2d with geometry classes implemented by the chosen target.") @@ -46,7 +49,7 @@ if((NOT LIBNEST2D_GEOMETRIES_TARGET) OR (LIBNEST2D_GEOMETRIES_TARGET STREQUAL "" message(STATUS "libnest2D backend is default") if(NOT Boost_INCLUDE_DIRS_FOUND) - find_package(Boost REQUIRED) + find_package(Boost 1.58 REQUIRED) # TODO automatic download of boost geometry headers endif() @@ -65,9 +68,19 @@ else() message(STATUS "Libnest2D backend is: ${LIBNEST2D_GEOMETRIES_TARGET}") endif() -add_library(libnest2d STATIC ${LIBNEST2D_SRCFILES} ) -target_link_libraries(libnest2d ${LIBNEST2D_GEOMETRIES_TARGET}) -target_include_directories(libnest2d PUBLIC ${CMAKE_SOURCE_DIR}) +message(STATUS "clipper lib is: ${LIBNEST2D_GEOMETRIES_TARGET}") + +add_library(libnest2d_static STATIC ${LIBNEST2D_SRCFILES} ) +target_link_libraries(libnest2d_static PRIVATE ${LIBNEST2D_GEOMETRIES_TARGET}) +target_include_directories(libnest2d_static PUBLIC ${CMAKE_SOURCE_DIR}) +set_target_properties(libnest2d_static PROPERTIES PREFIX "") + +if(LIBNEST2D_BUILD_SHARED_LIB) + add_library(libnest2d SHARED ${LIBNEST2D_SRCFILES} ) + target_link_libraries(libnest2d PRIVATE ${LIBNEST2D_GEOMETRIES_TARGET}) + target_include_directories(libnest2d PUBLIC ${CMAKE_SOURCE_DIR}) + set_target_properties(libnest2d PROPERTIES PREFIX "") +endif() set(LIBNEST2D_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}) @@ -79,3 +92,12 @@ endif() if(LIBNEST2D_UNITTESTS) add_subdirectory(tests) endif() + +if(LIBNEST2D_BUILD_EXAMPLES) + add_executable(example tests/main.cpp + tests/svgtools.hpp + tests/printer_parts.cpp + tests/printer_parts.h) + target_link_libraries(example libnest2d_static) + target_include_directories(example PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +endif() diff --git a/xs/src/libnest2d/cmake_modules/FindClipper.cmake b/xs/src/libnest2d/cmake_modules/FindClipper.cmake index ad4460c35..f6b973440 100644 --- a/xs/src/libnest2d/cmake_modules/FindClipper.cmake +++ b/xs/src/libnest2d/cmake_modules/FindClipper.cmake @@ -14,6 +14,8 @@ FIND_PATH(CLIPPER_INCLUDE_DIRS clipper.hpp $ENV{CLIPPER_PATH}/include/polyclipping/ ${PROJECT_SOURCE_DIR}/python/pymesh/third_party/include/ ${PROJECT_SOURCE_DIR}/python/pymesh/third_party/include/polyclipping/ + ${CMAKE_PREFIX_PATH}/include/polyclipping + ${CMAKE_PREFIX_PATH}/include/ /opt/local/include/ /opt/local/include/polyclipping/ /usr/local/include/ @@ -29,6 +31,8 @@ FIND_LIBRARY(CLIPPER_LIBRARIES polyclipping $ENV{CLIPPER_PATH}/lib/polyclipping/ ${PROJECT_SOURCE_DIR}/python/pymesh/third_party/lib/ ${PROJECT_SOURCE_DIR}/python/pymesh/third_party/lib/polyclipping/ + ${CMAKE_PREFIX_PATH}/lib/ + ${CMAKE_PREFIX_PATH}/lib/polyclipping/ /opt/local/lib/ /opt/local/lib/polyclipping/ /usr/local/lib/ diff --git a/xs/src/libnest2d/libnest2d.h b/xs/src/libnest2d/libnest2d.h index dcdb812dc..dff7009ee 100644 --- a/xs/src/libnest2d/libnest2d.h +++ b/xs/src/libnest2d/libnest2d.h @@ -29,6 +29,7 @@ using FillerSelection = strategies::_FillerSelection; using FirstFitSelection = strategies::_FirstFitSelection; using DJDHeuristic = strategies::_DJDHeuristic; +using NfpPlacer = strategies::_NofitPolyPlacer; using BottomLeftPlacer = strategies::_BottomLeftPlacer; using NofitPolyPlacer = strategies::_NofitPolyPlacer; diff --git a/xs/src/libnest2d/libnest2d/boost_alg.hpp b/xs/src/libnest2d/libnest2d/boost_alg.hpp index 5f1c2806f..fb43c2125 100644 --- a/xs/src/libnest2d/libnest2d/boost_alg.hpp +++ b/xs/src/libnest2d/libnest2d/boost_alg.hpp @@ -25,12 +25,13 @@ using libnest2d::setX; using libnest2d::setY; using Box = libnest2d::_Box; using Segment = libnest2d::_Segment; +using Shapes = libnest2d::Nfp::Shapes; } /** - * We have to make all the binpack2d geometry types available to boost. The real - * models of the geometries remain the same if a conforming model for binpack2d + * We have to make all the libnest2d geometry types available to boost. The real + * models of the geometries remain the same if a conforming model for libnest2d * was defined by the library client. Boost is used only as an optional * implementer of some algorithms that can be implemented by the model itself * if a faster alternative exists. @@ -184,10 +185,10 @@ template<> struct indexed_access { /* ************************************************************************** */ -/* Polygon concept adaptaion ************************************************ */ +/* Polygon concept adaptation *********************************************** */ /* ************************************************************************** */ -// Connversion between binpack2d::Orientation and order_selector /////////////// +// Connversion between libnest2d::Orientation and order_selector /////////////// template struct ToBoostOrienation {}; @@ -269,17 +270,34 @@ struct interior_rings { } }; +/* ************************************************************************** */ +/* MultiPolygon concept adaptation ****************************************** */ +/* ************************************************************************** */ + +template<> struct tag { + using type = multi_polygon_tag; +}; + } // traits } // geometry -// This is an addition to the ring implementation +// This is an addition to the ring implementation of Polygon concept template<> struct range_value { using type = bp2d::PointImpl; }; +template<> +struct range_value { + using type = bp2d::PolygonImpl; +}; + } // boost +/* ************************************************************************** */ +/* Algorithms *************************************************************** */ +/* ************************************************************************** */ + namespace libnest2d { // Now the algorithms that boost can provide... template<> @@ -296,7 +314,7 @@ inline double PointLike::distance(const PointImpl& p, return boost::geometry::distance(p, seg); } -// Tell binpack2d how to make string out of a ClipperPolygon object +// Tell libnest2d how to make string out of a ClipperPolygon object template<> inline bool ShapeLike::intersects(const PathImpl& sh1, const PathImpl& sh2) @@ -304,14 +322,14 @@ inline bool ShapeLike::intersects(const PathImpl& sh1, return boost::geometry::intersects(sh1, sh2); } -// Tell binpack2d how to make string out of a ClipperPolygon object +// Tell libnest2d how to make string out of a ClipperPolygon object template<> inline bool ShapeLike::intersects(const PolygonImpl& sh1, const PolygonImpl& sh2) { return boost::geometry::intersects(sh1, sh2); } -// Tell binpack2d how to make string out of a ClipperPolygon object +// Tell libnest2d how to make string out of a ClipperPolygon object template<> inline bool ShapeLike::intersects(const bp2d::Segment& s1, const bp2d::Segment& s2) { @@ -346,6 +364,7 @@ inline bool ShapeLike::touches( const PolygonImpl& sh1, return boost::geometry::touches(sh1, sh2); } +#ifndef DISABLE_BOOST_BOUNDING_BOX template<> inline bp2d::Box ShapeLike::boundingBox(const PolygonImpl& sh) { bp2d::Box b; @@ -354,7 +373,34 @@ inline bp2d::Box ShapeLike::boundingBox(const PolygonImpl& sh) { } template<> -inline void ShapeLike::rotate(PolygonImpl& sh, const Radians& rads) { +inline bp2d::Box ShapeLike::boundingBox(const bp2d::Shapes& shapes) { + bp2d::Box b; + boost::geometry::envelope(shapes, b); + return b; +} +#endif + +#ifndef DISABLE_BOOST_CONVEX_HULL +template<> +inline PolygonImpl ShapeLike::convexHull(const PolygonImpl& sh) +{ + PolygonImpl ret; + boost::geometry::convex_hull(sh, ret); + return ret; +} + +template<> +inline PolygonImpl ShapeLike::convexHull(const bp2d::Shapes& shapes) +{ + PolygonImpl ret; + boost::geometry::convex_hull(shapes, ret); + return ret; +} +#endif + +template<> +inline void ShapeLike::rotate(PolygonImpl& sh, const Radians& rads) +{ namespace trans = boost::geometry::strategy::transform; PolygonImpl cpy = sh; @@ -364,8 +410,10 @@ inline void ShapeLike::rotate(PolygonImpl& sh, const Radians& rads) { boost::geometry::transform(cpy, sh, rotate); } +#ifndef DISABLE_BOOST_TRANSLATE template<> -inline void ShapeLike::translate(PolygonImpl& sh, const PointImpl& offs) { +inline void ShapeLike::translate(PolygonImpl& sh, const PointImpl& offs) +{ namespace trans = boost::geometry::strategy::transform; PolygonImpl cpy = sh; @@ -374,19 +422,33 @@ inline void ShapeLike::translate(PolygonImpl& sh, const PointImpl& offs) { boost::geometry::transform(cpy, sh, translate); } +#endif #ifndef DISABLE_BOOST_OFFSET template<> -inline void ShapeLike::offset(PolygonImpl& sh, bp2d::Coord distance) { +inline void ShapeLike::offset(PolygonImpl& sh, bp2d::Coord distance) +{ PolygonImpl cpy = sh; boost::geometry::buffer(cpy, sh, distance); } #endif +#ifndef DISABLE_BOOST_NFP_MERGE +template<> +inline bp2d::Shapes Nfp::merge(const bp2d::Shapes& shapes, + const PolygonImpl& sh) +{ + bp2d::Shapes retv; + boost::geometry::union_(shapes, sh, retv); + return retv; +} +#endif + #ifndef DISABLE_BOOST_MINKOWSKI_ADD template<> inline PolygonImpl& Nfp::minkowskiAdd(PolygonImpl& sh, - const PolygonImpl& /*other*/) { + const PolygonImpl& /*other*/) +{ return sh; } #endif @@ -394,12 +456,26 @@ inline PolygonImpl& Nfp::minkowskiAdd(PolygonImpl& sh, #ifndef DISABLE_BOOST_SERIALIZE template<> inline std::string ShapeLike::serialize( - const PolygonImpl& sh) + const PolygonImpl& sh, double scale) { std::stringstream ss; - std::string style = "fill: orange; stroke: black; stroke-width: 1px;"; - auto svg_data = boost::geometry::svg(sh, style); + std::string style = "fill: none; stroke: black; stroke-width: 1px;"; + + using namespace boost::geometry; + using Pointf = model::point; + using Polygonf = model::polygon; + + Polygonf::ring_type ring; + ring.reserve(ShapeLike::contourVertexCount(sh)); + + for(auto it = ShapeLike::cbegin(sh); it != ShapeLike::cend(sh); it++) { + auto& v = *it; + ring.emplace_back(getX(v)*scale, getY(v)*scale); + }; + Polygonf poly; + poly.outer() = ring; + auto svg_data = boost::geometry::svg(poly, style); ss << svg_data << std::endl; @@ -417,7 +493,8 @@ inline void ShapeLike::unserialize( #endif template<> inline std::pair -ShapeLike::isValid(const PolygonImpl& sh) { +ShapeLike::isValid(const PolygonImpl& sh) +{ std::string message; bool ret = boost::geometry::is_valid(sh, message); diff --git a/xs/src/libnest2d/libnest2d/clipper_backend/CMakeLists.txt b/xs/src/libnest2d/libnest2d/clipper_backend/CMakeLists.txt index 9e6a48cf6..b6f2de439 100644 --- a/xs/src/libnest2d/libnest2d/clipper_backend/CMakeLists.txt +++ b/xs/src/libnest2d/libnest2d/clipper_backend/CMakeLists.txt @@ -1,6 +1,6 @@ if(NOT TARGET clipper) # If there is a clipper target in the parent project we are good to go. - find_package(Clipper QUIET) + find_package(Clipper 6.1) if(NOT CLIPPER_FOUND) find_package(Subversion QUIET) diff --git a/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.cpp b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.cpp index 08b095087..6bd7bf99f 100644 --- a/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.cpp +++ b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.cpp @@ -46,10 +46,25 @@ std::string ShapeLike::toString(const PolygonImpl& sh) return ss.str(); } -template<> PolygonImpl ShapeLike::create( std::initializer_list< PointImpl > il) +template<> PolygonImpl ShapeLike::create( const PathImpl& path ) { PolygonImpl p; - p.Contour = il; + p.Contour = path; + + // Expecting that the coordinate system Y axis is positive in upwards + // direction + if(ClipperLib::Orientation(p.Contour)) { + // Not clockwise then reverse the b*tch + ClipperLib::ReversePath(p.Contour); + } + + return p; +} + +template<> PolygonImpl ShapeLike::create( PathImpl&& path ) +{ + PolygonImpl p; + p.Contour.swap(path); // Expecting that the coordinate system Y axis is positive in upwards // direction diff --git a/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp index 92a806727..6621d7085 100644 --- a/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp +++ b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp @@ -20,6 +20,7 @@ using PolygonImpl = ClipperLib::PolyNode; using PathImpl = ClipperLib::Path; inline PointImpl& operator +=(PointImpl& p, const PointImpl& pa ) { + // This could be done with SIMD p.X += pa.X; p.Y += pa.Y; return p; @@ -37,6 +38,13 @@ inline PointImpl& operator -=(PointImpl& p, const PointImpl& pa ) { return p; } +inline PointImpl operator -(PointImpl& p ) { + PointImpl ret = p; + ret.X = -ret.X; + ret.Y = -ret.Y; + return ret; +} + inline PointImpl operator-(const PointImpl& p1, const PointImpl& p2) { PointImpl ret = p1; ret -= p2; @@ -100,14 +108,29 @@ inline void ShapeLike::reserve(PolygonImpl& sh, unsigned long vertex_capacity) return sh.Contour.reserve(vertex_capacity); } +#define DISABLE_BOOST_AREA + +namespace _smartarea { +template +inline double area(const PolygonImpl& sh) { + return std::nan(""); +} + +template<> +inline double area(const PolygonImpl& sh) { + return -ClipperLib::Area(sh.Contour); +} + +template<> +inline double area(const PolygonImpl& sh) { + return ClipperLib::Area(sh.Contour); +} +} + // Tell binpack2d how to make string out of a ClipperPolygon object template<> inline double ShapeLike::area(const PolygonImpl& sh) { - #define DISABLE_BOOST_AREA - double ret = ClipperLib::Area(sh.Contour); -// if(OrientationType::Value == Orientation::COUNTER_CLOCKWISE) -// ret = -ret; - return ret; + return _smartarea::area::Value>(sh); } template<> @@ -191,8 +214,9 @@ template<> struct HolesContainer { using Type = ClipperLib::Paths; }; -template<> -PolygonImpl ShapeLike::create( std::initializer_list< PointImpl > il); +template<> PolygonImpl ShapeLike::create( const PathImpl& path); + +template<> PolygonImpl ShapeLike::create( PathImpl&& path); template<> const THolesContainer& ShapeLike::holes( @@ -202,33 +226,94 @@ template<> THolesContainer& ShapeLike::holes(PolygonImpl& sh); template<> -inline TCountour& ShapeLike::getHole(PolygonImpl& sh, +inline TContour& ShapeLike::getHole(PolygonImpl& sh, unsigned long idx) { return sh.Childs[idx]->Contour; } template<> -inline const TCountour& ShapeLike::getHole(const PolygonImpl& sh, - unsigned long idx) { +inline const TContour& ShapeLike::getHole(const PolygonImpl& sh, + unsigned long idx) +{ return sh.Childs[idx]->Contour; } -template<> -inline size_t ShapeLike::holeCount(const PolygonImpl& sh) { +template<> inline size_t ShapeLike::holeCount(const PolygonImpl& sh) +{ return sh.Childs.size(); } -template<> -inline PathImpl& ShapeLike::getContour(PolygonImpl& sh) { +template<> inline PathImpl& ShapeLike::getContour(PolygonImpl& sh) +{ return sh.Contour; } template<> -inline const PathImpl& ShapeLike::getContour(const PolygonImpl& sh) { +inline const PathImpl& ShapeLike::getContour(const PolygonImpl& sh) +{ return sh.Contour; } +#define DISABLE_BOOST_TRANSLATE +template<> +inline void ShapeLike::translate(PolygonImpl& sh, const PointImpl& offs) +{ + for(auto& p : sh.Contour) { p += offs; } + for(auto& hole : sh.Childs) for(auto& p : hole->Contour) { p += offs; } +} + +#define DISABLE_BOOST_NFP_MERGE + +template<> inline +Nfp::Shapes Nfp::merge(const Nfp::Shapes& shapes, + const PolygonImpl& sh) +{ + Nfp::Shapes retv; + + ClipperLib::Clipper clipper; + + bool closed = true; + +#ifndef NDEBUG +#define _valid() valid = + bool valid = false; +#else +#define _valid() +#endif + + _valid() clipper.AddPath(sh.Contour, ClipperLib::ptSubject, closed); + + for(auto& hole : sh.Childs) { + _valid() clipper.AddPath(hole->Contour, ClipperLib::ptSubject, closed); + assert(valid); + } + + for(auto& path : shapes) { + _valid() clipper.AddPath(path.Contour, ClipperLib::ptSubject, closed); + assert(valid); + for(auto& hole : path.Childs) { + _valid() clipper.AddPath(hole->Contour, ClipperLib::ptSubject, closed); + assert(valid); + } + } + + ClipperLib::Paths rret; + clipper.Execute(ClipperLib::ctUnion, rret, ClipperLib::pftNonZero); + retv.reserve(rret.size()); + for(auto& p : rret) { + if(ClipperLib::Orientation(p)) { + // Not clockwise then reverse the b*tch + ClipperLib::ReversePath(p); + } + retv.emplace_back(); + retv.back().Contour = p; + retv.back().Contour.emplace_back(p.front()); + } + + return retv; +} + } //#define DISABLE_BOOST_SERIALIZE diff --git a/xs/src/libnest2d/libnest2d/geometries_nfp.hpp b/xs/src/libnest2d/libnest2d/geometries_nfp.hpp index 219c4b565..9f8bd6031 100644 --- a/xs/src/libnest2d/libnest2d/geometries_nfp.hpp +++ b/xs/src/libnest2d/libnest2d/geometries_nfp.hpp @@ -3,18 +3,56 @@ #include "geometry_traits.hpp" #include +#include namespace libnest2d { struct Nfp { template -static RawShape& minkowskiAdd(RawShape& sh, const RawShape& /*other*/) { +using Shapes = typename ShapeLike::Shapes; + +template +static RawShape& minkowskiAdd(RawShape& sh, const RawShape& /*other*/) +{ static_assert(always_false::value, - "ShapeLike::minkowskiAdd() unimplemented!"); + "Nfp::minkowskiAdd() unimplemented!"); return sh; } +template +static Shapes merge(const Shapes& shc, const RawShape& sh) +{ + static_assert(always_false::value, + "Nfp::merge(shapes, shape) unimplemented!"); +} + +template +inline static TPoint referenceVertex(const RawShape& sh) +{ + return rightmostUpVertex(sh); +} + +template +static TPoint leftmostDownVertex(const RawShape& sh) { + + // find min x and min y vertex + auto it = std::min_element(ShapeLike::cbegin(sh), ShapeLike::cend(sh), + _vsort); + + return *it; +} + +template +static TPoint rightmostUpVertex(const RawShape& sh) { + + // find min x and min y vertex + auto it = std::max_element(ShapeLike::cbegin(sh), ShapeLike::cend(sh), + _vsort); + + return *it; +} + template static RawShape noFitPolygon(const RawShape& sh, const RawShape& other) { auto isConvex = [](const RawShape& sh) { @@ -31,24 +69,20 @@ static RawShape noFitPolygon(const RawShape& sh, const RawShape& other) { { RawShape other = cother; - // Make it counter-clockwise - for(auto shit = ShapeLike::begin(other); - shit != ShapeLike::end(other); ++shit ) { - auto& v = *shit; - setX(v, -getX(v)); - setY(v, -getY(v)); - } + // Make the other polygon counter-clockwise + std::reverse(ShapeLike::begin(other), ShapeLike::end(other)); - RawShape rsh; + RawShape rsh; // Final nfp placeholder std::vector edgelist; size_t cap = ShapeLike::contourVertexCount(sh) + ShapeLike::contourVertexCount(other); + // Reserve the needed memory edgelist.reserve(cap); ShapeLike::reserve(rsh, cap); - { + { // place all edges from sh into edgelist auto first = ShapeLike::cbegin(sh); auto next = first + 1; auto endit = ShapeLike::cend(sh); @@ -56,7 +90,7 @@ static RawShape noFitPolygon(const RawShape& sh, const RawShape& other) { while(next != endit) edgelist.emplace_back(*(first++), *(next++)); } - { + { // place all edges from other into edgelist auto first = ShapeLike::cbegin(other); auto next = first + 1; auto endit = ShapeLike::cend(other); @@ -64,31 +98,64 @@ static RawShape noFitPolygon(const RawShape& sh, const RawShape& other) { while(next != endit) edgelist.emplace_back(*(first++), *(next++)); } + // Sort the edges by angle to X axis. std::sort(edgelist.begin(), edgelist.end(), [](const Edge& e1, const Edge& e2) { return e1.angleToXaxis() > e2.angleToXaxis(); }); + // Add the two vertices from the first edge into the final polygon. ShapeLike::addVertex(rsh, edgelist.front().first()); ShapeLike::addVertex(rsh, edgelist.front().second()); auto tmp = std::next(ShapeLike::begin(rsh)); - // Construct final nfp + // Construct final nfp by placing each edge to the end of the previous for(auto eit = std::next(edgelist.begin()); eit != edgelist.end(); - ++eit) { + ++eit) + { + auto d = *tmp - eit->first(); + auto p = eit->second() + d; - auto dx = getX(*tmp) - getX(eit->first()); - auto dy = getY(*tmp) - getY(eit->first()); - - ShapeLike::addVertex(rsh, getX(eit->second())+dx, - getY(eit->second())+dy ); + ShapeLike::addVertex(rsh, p); tmp = std::next(tmp); } + // Now we have an nfp somewhere in the dark. We need to get it + // to the right position around the stationary shape. + // This is done by choosing the leftmost lowest vertex of the + // orbiting polygon to be touched with the rightmost upper + // vertex of the stationary polygon. In this configuration, the + // reference vertex of the orbiting polygon (which can be dragged around + // the nfp) will be its rightmost upper vertex that coincides with the + // rightmost upper vertex of the nfp. No proof provided other than Jonas + // Lindmark's reasoning about the reference vertex of nfp in his thesis + // ("No fit polygon problem" - section 2.1.9) + + auto csh = sh; // Copy sh, we will sort the verices in the copy + auto& cmp = _vsort; + std::sort(ShapeLike::begin(csh), ShapeLike::end(csh), cmp); + std::sort(ShapeLike::begin(other), ShapeLike::end(other), cmp); + + // leftmost lower vertex of the stationary polygon + auto& touch_sh = *(std::prev(ShapeLike::end(csh))); + // rightmost upper vertex of the orbiting polygon + auto& touch_other = *(ShapeLike::begin(other)); + + // Calculate the difference and move the orbiter to the touch position. + auto dtouch = touch_sh - touch_other; + auto top_other = *(std::prev(ShapeLike::end(other))) + dtouch; + + // Get the righmost upper vertex of the nfp and move it to the RMU of + // the orbiter because they should coincide. + auto&& top_nfp = rightmostUpVertex(rsh); + auto dnfp = top_other - top_nfp; + std::for_each(ShapeLike::begin(rsh), ShapeLike::end(rsh), + [&dnfp](Vertex& v) { v+= dnfp; } ); + return rsh; }; @@ -118,6 +185,36 @@ static RawShape noFitPolygon(const RawShape& sh, const RawShape& other) { return rsh; } +template +static inline Shapes noFitPolygon(const Shapes& shapes, + const RawShape& other) +{ + assert(shapes.size() >= 1); + auto shit = shapes.begin(); + + Shapes ret; + ret.emplace_back(noFitPolygon(*shit, other)); + + while(++shit != shapes.end()) ret = merge(ret, noFitPolygon(*shit, other)); + + return ret; +} + +private: + +// Do not specialize this... +template +static inline bool _vsort(const TPoint& v1, + const TPoint& v2) +{ + using Coord = TCoord>; + auto diff = getY(v1) - getY(v2); + if(std::abs(diff) <= std::numeric_limits::epsilon()) + return getX(v1) < getX(v2); + + return diff < 0; +} + }; } diff --git a/xs/src/libnest2d/libnest2d/geometry_traits.hpp b/xs/src/libnest2d/libnest2d/geometry_traits.hpp index 2ab2d1c49..b1353b457 100644 --- a/xs/src/libnest2d/libnest2d/geometry_traits.hpp +++ b/xs/src/libnest2d/libnest2d/geometry_traits.hpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include "common.hpp" @@ -81,6 +82,8 @@ public: inline TCoord width() const BP2D_NOEXCEPT; inline TCoord height() const BP2D_NOEXCEPT; + + inline RawPoint center() const BP2D_NOEXCEPT; }; template @@ -102,8 +105,9 @@ public: inline Radians angleToXaxis() const; }; -class PointLike { -public: +// This struct serves as a namespace. The only difference is that is can be +// used in friend declarations. +struct PointLike { template static TCoord x(const RawPoint& p) @@ -133,7 +137,7 @@ public: static double distance(const RawPoint& /*p1*/, const RawPoint& /*p2*/) { static_assert(always_false::value, - "PointLike::distance(point, point) unimplemented"); + "PointLike::distance(point, point) unimplemented!"); return 0; } @@ -142,7 +146,7 @@ public: const _Segment& /*s*/) { static_assert(always_false::value, - "PointLike::distance(point, segment) unimplemented"); + "PointLike::distance(point, segment) unimplemented!"); return 0; } @@ -229,21 +233,38 @@ void setY(RawPoint& p, const TCoord& val) { template inline Radians _Segment::angleToXaxis() const { + static const double Pi_2 = 2*Pi; TCoord dx = getX(second()) - getX(first()); TCoord dy = getY(second()) - getY(first()); - if(dx == 0 && dy >= 0) return Pi/2; - if(dx == 0 && dy < 0) return 3*Pi/2; - if(dy == 0 && dx >= 0) return 0; - if(dy == 0 && dx < 0) return Pi; + double a = std::atan2(dy, dx); +// if(dx == 0 && dy >= 0) return Pi/2; +// if(dx == 0 && dy < 0) return 3*Pi/2; +// if(dy == 0 && dx >= 0) return 0; +// if(dy == 0 && dx < 0) return Pi; - double ddx = static_cast(dx); - auto s = std::signbit(ddx); - double a = std::atan(ddx/dy); - if(s) a += Pi; +// double ddx = static_cast(dx); + auto s = std::signbit(a); +// double a = std::atan(ddx/dy); + if(s) a += Pi_2; return a; } +template +inline RawPoint _Box::center() const BP2D_NOEXCEPT { + auto& minc = minCorner(); + auto& maxc = maxCorner(); + + using Coord = TCoord; + + RawPoint ret = { + static_cast( std::round((getX(minc) + getX(maxc))/2.0) ), + static_cast( std::round((getY(minc) + getY(maxc))/2.0) ) + }; + + return ret; +} + template struct HolesContainer { using Type = std::vector; @@ -258,7 +279,7 @@ struct CountourType { }; template -using TCountour = typename CountourType>::Type; +using TContour = typename CountourType>::Type; enum class Orientation { CLOCKWISE, @@ -277,12 +298,23 @@ enum class Formats { SVG }; +// This struct serves as a namespace. The only difference is that is can be +// used in friend declarations. struct ShapeLike { template - static RawShape create( std::initializer_list< TPoint > il) + using Shapes = std::vector; + + template + static RawShape create(const TContour& contour) { - return RawShape(il); + return RawShape(contour); + } + + template + static RawShape create(TContour&& contour) + { + return RawShape(contour); } // Optional, does nothing by default @@ -319,25 +351,6 @@ struct ShapeLike { return sh.cend(); } - template - static TPoint& vertex(RawShape& sh, unsigned long idx) - { - return *(begin(sh) + idx); - } - - template - static const TPoint& vertex(const RawShape& sh, - unsigned long idx) - { - return *(cbegin(sh) + idx); - } - - template - static size_t contourVertexCount(const RawShape& sh) - { - return cend(sh) - cbegin(sh); - } - template static std::string toString(const RawShape& /*sh*/) { @@ -345,10 +358,10 @@ struct ShapeLike { } template - static std::string serialize(const RawShape& /*sh*/) + static std::string serialize(const RawShape& /*sh*/, double scale=1) { static_assert(always_false::value, - "ShapeLike::serialize() unimplemented"); + "ShapeLike::serialize() unimplemented!"); return ""; } @@ -356,21 +369,14 @@ struct ShapeLike { static void unserialize(RawShape& /*sh*/, const std::string& /*str*/) { static_assert(always_false::value, - "ShapeLike::unserialize() unimplemented"); + "ShapeLike::unserialize() unimplemented!"); } template static double area(const RawShape& /*sh*/) { static_assert(always_false::value, - "ShapeLike::area() unimplemented"); - return 0; - } - - template - static double area(const _Box>& box) - { - return box.width() * box.height(); + "ShapeLike::area() unimplemented!"); return 0; } @@ -378,7 +384,7 @@ struct ShapeLike { static bool intersects(const RawShape& /*sh*/, const RawShape& /*sh*/) { static_assert(always_false::value, - "ShapeLike::intersects() unimplemented"); + "ShapeLike::intersects() unimplemented!"); return false; } @@ -387,7 +393,7 @@ struct ShapeLike { const RawShape& /*shape*/) { static_assert(always_false::value, - "ShapeLike::isInside(point, shape) unimplemented"); + "ShapeLike::isInside(point, shape) unimplemented!"); return false; } @@ -396,7 +402,7 @@ struct ShapeLike { const RawShape& /*shape*/) { static_assert(always_false::value, - "ShapeLike::isInside(shape, shape) unimplemented"); + "ShapeLike::isInside(shape, shape) unimplemented!"); return false; } @@ -405,7 +411,7 @@ struct ShapeLike { const RawShape& /*shape*/) { static_assert(always_false::value, - "ShapeLike::touches(shape, shape) unimplemented"); + "ShapeLike::touches(shape, shape) unimplemented!"); return false; } @@ -413,13 +419,30 @@ struct ShapeLike { static _Box> boundingBox(const RawShape& /*sh*/) { static_assert(always_false::value, - "ShapeLike::boundingBox(shape) unimplemented"); + "ShapeLike::boundingBox(shape) unimplemented!"); } template - static _Box> boundingBox(const _Box>& box) + static _Box> boundingBox(const Shapes& /*sh*/) { - return box; + static_assert(always_false::value, + "ShapeLike::boundingBox(shapes) unimplemented!"); + } + + template + static RawShape convexHull(const RawShape& /*sh*/) + { + static_assert(always_false::value, + "ShapeLike::convexHull(shape) unimplemented!"); + return RawShape(); + } + + template + static RawShape convexHull(const Shapes& /*sh*/) + { + static_assert(always_false::value, + "ShapeLike::convexHull(shapes) unimplemented!"); + return RawShape(); } template @@ -437,13 +460,13 @@ struct ShapeLike { } template - static TCountour& getHole(RawShape& sh, unsigned long idx) + static TContour& getHole(RawShape& sh, unsigned long idx) { return holes(sh)[idx]; } template - static const TCountour& getHole(const RawShape& sh, + static const TContour& getHole(const RawShape& sh, unsigned long idx) { return holes(sh)[idx]; @@ -456,13 +479,13 @@ struct ShapeLike { } template - static TCountour& getContour(RawShape& sh) + static TContour& getContour(RawShape& sh) { return sh; } template - static const TCountour& getContour(const RawShape& sh) + static const TContour& getContour(const RawShape& sh) { return sh; } @@ -471,14 +494,14 @@ struct ShapeLike { static void rotate(RawShape& /*sh*/, const Radians& /*rads*/) { static_assert(always_false::value, - "ShapeLike::rotate() unimplemented"); + "ShapeLike::rotate() unimplemented!"); } template static void translate(RawShape& /*sh*/, const RawPoint& /*offs*/) { static_assert(always_false::value, - "ShapeLike::translate() unimplemented"); + "ShapeLike::translate() unimplemented!"); } template @@ -490,12 +513,96 @@ struct ShapeLike { template static std::pair isValid(const RawShape& /*sh*/) { - return {false, "ShapeLike::isValid() unimplemented"}; + return {false, "ShapeLike::isValid() unimplemented!"}; + } + + // ************************************************************************* + // No need to implement these + // ************************************************************************* + + template + static inline _Box> boundingBox( + const _Box>& box) + { + return box; + } + + template + static inline double area(const _Box>& box) + { + return static_cast(box.width() * box.height()); + } + + template + static double area(const Shapes& shapes) + { + double ret = 0; + std::accumulate(shapes.first(), shapes.end(), + [](const RawShape& a, const RawShape& b) { + return area(a) + area(b); + }); + return ret; + } + + template // Potential O(1) implementation may exist + static inline TPoint& vertex(RawShape& sh, unsigned long idx) + { + return *(begin(sh) + idx); + } + + template // Potential O(1) implementation may exist + static inline const TPoint& vertex(const RawShape& sh, + unsigned long idx) + { + return *(cbegin(sh) + idx); + } + + template + static inline size_t contourVertexCount(const RawShape& sh) + { + return cend(sh) - cbegin(sh); + } + + template + static inline void foreachContourVertex(RawShape& sh, Fn fn) { + for(auto it = begin(sh); it != end(sh); ++it) fn(*it); + } + + template + static inline void foreachHoleVertex(RawShape& sh, Fn fn) { + for(int i = 0; i < holeCount(sh); ++i) { + auto& h = getHole(sh, i); + for(auto it = begin(h); it != end(h); ++it) fn(*it); + } + } + + template + static inline void foreachContourVertex(const RawShape& sh, Fn fn) { + for(auto it = cbegin(sh); it != cend(sh); ++it) fn(*it); + } + + template + static inline void foreachHoleVertex(const RawShape& sh, Fn fn) { + for(int i = 0; i < holeCount(sh); ++i) { + auto& h = getHole(sh, i); + for(auto it = cbegin(h); it != cend(h); ++it) fn(*it); + } + } + + template + static inline void foreachVertex(RawShape& sh, Fn fn) { + foreachContourVertex(sh, fn); + foreachHoleVertex(sh, fn); + } + + template + static inline void foreachVertex(const RawShape& sh, Fn fn) { + foreachContourVertex(sh, fn); + foreachHoleVertex(sh, fn); } }; - } #endif // GEOMETRY_TRAITS_HPP diff --git a/xs/src/libnest2d/libnest2d/libnest2d.hpp b/xs/src/libnest2d/libnest2d/libnest2d.hpp index e57e49779..76df1829b 100644 --- a/xs/src/libnest2d/libnest2d/libnest2d.hpp +++ b/xs/src/libnest2d/libnest2d/libnest2d.hpp @@ -97,6 +97,12 @@ public: inline _Item(const std::initializer_list< Vertex >& il): sh_(ShapeLike::create(il)) {} + inline _Item(const TContour& contour): + sh_(ShapeLike::create(contour)) {} + + inline _Item(TContour&& contour): + sh_(ShapeLike::create(std::move(contour))) {} + /** * @brief Convert the polygon to string representation. The format depends * on the implementation of the polygon. @@ -174,7 +180,7 @@ public: double ret ; if(area_cache_valid_) ret = area_cache_; else { - ret = std::abs(ShapeLike::area(offsettedShape())); + ret = ShapeLike::area(offsettedShape()); area_cache_ = ret; area_cache_valid_ = true; } @@ -201,6 +207,8 @@ public: return ShapeLike::isInside(transformedShape(), sh.transformedShape()); } + inline bool isInside(const _Box>& box); + inline void translate(const Vertex& d) BP2D_NOEXCEPT { translation_ += d; has_translation_ = true; @@ -328,7 +336,7 @@ class _Rectangle: public _Item { using TO = Orientation; public: - using Unit = TCoord; + using Unit = TCoord>; template::Value> inline _Rectangle(Unit width, Unit height, @@ -367,6 +375,12 @@ public: } }; +template +inline bool _Item::isInside(const _Box>& box) { + _Rectangle rect(box.width(), box.height()); + return _Item::isInside(rect); +} + /** * \brief A wrapper interface (trait) class for any placement strategy provider. * @@ -481,8 +495,18 @@ public: /// Clear the packed items so a new session can be started. inline void clearItems() { impl_.clearItems(); } +#ifndef NDEBUG + inline auto getDebugItems() -> decltype(impl_.debug_items_)& + { + return impl_.debug_items_; + } +#endif + }; +// The progress function will be called with the number of placed items +using ProgressFunction = std::function; + /** * A wrapper interface (trait) class for any selections strategy provider. */ @@ -508,6 +532,14 @@ public: impl_.configure(config); } + /** + * @brief A function callback which should be called whenewer an item or + * a group of items where succesfully packed. + * @param fn A function callback object taking one unsigned integer as the + * number of the remaining items to pack. + */ + void progressIndicator(ProgressFunction fn) { impl_.progressIndicator(fn); } + /** * \brief A method to start the calculation on the input sequence. * @@ -614,7 +646,7 @@ public: private: BinType bin_; PlacementConfig pconfig_; - TCoord min_obj_distance_; + Unit min_obj_distance_; using SItem = typename SelectionStrategy::Item; using TPItem = remove_cvref_t; @@ -680,6 +712,21 @@ public: return _arrange(from, to); } + /// Set a progress indicatior function object for the selector. + inline void progressIndicator(ProgressFunction func) + { + selector_.progressIndicator(func); + } + + inline PackGroup lastResult() { + PackGroup ret; + for(size_t i = 0; i < selector_.binCount(); i++) { + auto items = selector_.itemsForBin(i); + ret.push_back(items); + } + return ret; + } + private: template inline void __arrange(TIter from, TIter to) { if(min_obj_distance_ > 0) std::for_each(from, to, [this](Item& item) { - item.addOffset(std::ceil(min_obj_distance_/2.0)); + item.addOffset(static_cast(std::ceil(min_obj_distance_/2.0))); }); selector_.template packItems( diff --git a/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp b/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp index b9d6741d0..f5701b904 100644 --- a/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp +++ b/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp @@ -2,29 +2,195 @@ #define NOFITPOLY_HPP #include "placer_boilerplate.hpp" +#include "../geometries_nfp.hpp" namespace libnest2d { namespace strategies { +template +struct NfpPConfig { + + enum class Alignment { + CENTER, + BOTTOM_LEFT, + BOTTOM_RIGHT, + TOP_LEFT, + TOP_RIGHT, + }; + + bool allow_rotations = false; + Alignment alignment; +}; + template class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer, - RawShape, _Box>> { + RawShape, _Box>, NfpPConfig> { using Base = PlacerBoilerplate<_NofitPolyPlacer, - RawShape, _Box>>; + RawShape, _Box>, NfpPConfig>; DECLARE_PLACER(Base) + using Box = _Box>; + public: inline explicit _NofitPolyPlacer(const BinType& bin): Base(bin) {} PackResult trypack(Item& item) { - return PackResult(); + PackResult ret; + + bool can_pack = false; + + if(items_.empty()) { + setInitialPosition(item); + can_pack = item.isInside(bin_); + } else { + + // place the new item outside of the print bed to make sure it is + // disjuct from the current merged pile + placeOutsideOfBin(item); + + auto trsh = item.transformedShape(); + Nfp::Shapes nfps; + +#ifndef NDEBUG +#ifdef DEBUG_EXPORT_NFP + Base::debug_items_.clear(); +#endif + auto v = ShapeLike::isValid(trsh); + assert(v.first); +#endif + for(Item& sh : items_) { + auto subnfp = Nfp::noFitPolygon(sh.transformedShape(), + trsh); +#ifndef NDEBUG +#ifdef DEBUG_EXPORT_NFP + Base::debug_items_.emplace_back(subnfp); +#endif + auto vv = ShapeLike::isValid(sh.transformedShape()); + assert(vv.first); + + auto vnfp = ShapeLike::isValid(subnfp); + assert(vnfp.first); +#endif + nfps = Nfp::merge(nfps, subnfp); + } + + double min_area = std::numeric_limits::max(); + Vertex tr = {0, 0}; + + auto iv = Nfp::referenceVertex(trsh); + + // place item on each the edge of this nfp + for(auto& nfp : nfps) + ShapeLike::foreachContourVertex(nfp, [&] + (Vertex& v) + { + Coord dx = getX(v) - getX(iv); + Coord dy = getY(v) - getY(iv); + + Item placeditem(trsh); + placeditem.translate(Vertex(dx, dy)); + + if( placeditem.isInside(bin_) ) { + Nfp::Shapes m; + m.reserve(items_.size()); + + for(Item& pi : items_) + m.emplace_back(pi.transformedShape()); + + m.emplace_back(placeditem.transformedShape()); + +// auto b = ShapeLike::boundingBox(m); + +// auto a = static_cast(std::max(b.height(), +// b.width())); + + auto b = ShapeLike::convexHull(m); + auto a = ShapeLike::area(b); + + if(a < min_area) { + can_pack = true; + min_area = a; + tr = {dx, dy}; + } + } + }); + +#ifndef NDEBUG + for(auto&nfp : nfps) { + auto val = ShapeLike::isValid(nfp); + if(!val.first) std::cout << val.second << std::endl; +#ifdef DEBUG_EXPORT_NFP + Base::debug_items_.emplace_back(nfp); +#endif + } +#endif + + item.translate(tr); + } + + if(can_pack) { + ret = PackResult(item); + } + + return ret; + } + +private: + + void setInitialPosition(Item& item) { + Box&& bb = item.boundingBox(); + Vertex ci, cb; + + switch(config_.alignment) { + case Config::Alignment::CENTER: { + ci = bb.center(); + cb = bin_.center(); + break; + } + case Config::Alignment::BOTTOM_LEFT: { + ci = bb.minCorner(); + cb = bin_.minCorner(); + break; + } + case Config::Alignment::BOTTOM_RIGHT: { + ci = {getX(bb.maxCorner()), getY(bb.minCorner())}; + cb = {getX(bin_.maxCorner()), getY(bin_.minCorner())}; + break; + } + case Config::Alignment::TOP_LEFT: { + ci = {getX(bb.minCorner()), getY(bb.maxCorner())}; + cb = {getX(bin_.minCorner()), getY(bin_.maxCorner())}; + break; + } + case Config::Alignment::TOP_RIGHT: { + ci = bb.maxCorner(); + cb = bin_.maxCorner(); + break; + } + } + + auto d = cb - ci; + item.translate(d); + } + + void placeOutsideOfBin(Item& item) { + auto bb = item.boundingBox(); + Box binbb = ShapeLike::boundingBox(bin_); + + Vertex v = { getX(bb.maxCorner()), getY(bb.minCorner()) }; + + Coord dx = getX(binbb.maxCorner()) - getX(v); + Coord dy = getY(binbb.maxCorner()) - getY(v); + + item.translate({dx, dy}); } }; + } } diff --git a/xs/src/libnest2d/libnest2d/placers/placer_boilerplate.hpp b/xs/src/libnest2d/libnest2d/placers/placer_boilerplate.hpp index 1d82a5e66..338667432 100644 --- a/xs/src/libnest2d/libnest2d/placers/placer_boilerplate.hpp +++ b/xs/src/libnest2d/libnest2d/placers/placer_boilerplate.hpp @@ -67,16 +67,19 @@ public: void unpackLast() { items_.pop_back(); } - inline ItemGroup getItems() { return items_; } + inline ItemGroup getItems() const { return items_; } inline void clearItems() { items_.clear(); } +#ifndef NDEBUG + std::vector debug_items_; +#endif + protected: BinType bin_; Container items_; Cfg config_; - }; diff --git a/xs/src/libnest2d/libnest2d/selections/djd_heuristic.hpp b/xs/src/libnest2d/libnest2d/selections/djd_heuristic.hpp index 8ae77bbb3..305b3403a 100644 --- a/xs/src/libnest2d/libnest2d/selections/djd_heuristic.hpp +++ b/xs/src/libnest2d/libnest2d/selections/djd_heuristic.hpp @@ -84,9 +84,11 @@ public: bool try_reverse = config_.try_reverse_order; // Will use a subroutine to add a new bin - auto addBin = [&placers, &free_area, &filled_area, &bin, &pconfig]() + auto addBin = [this, &placers, &free_area, + &filled_area, &bin, &pconfig]() { placers.emplace_back(bin); + packed_bins_.emplace_back(); placers.back().configure(pconfig); free_area = ShapeLike::area(bin); filled_area = 0; @@ -457,6 +459,16 @@ public: } } + auto makeProgress = [this, ¬_packed](Placer& placer) { + packed_bins_.back() = placer.getItems(); +#ifndef NDEBUG + packed_bins_.back().insert(packed_bins_.back().end(), + placer.getDebugItems().begin(), + placer.getDebugItems().end()); +#endif + this->progress_(not_packed.size()); + }; + while(!not_packed.empty()) { auto& placer = placers.back(); @@ -472,30 +484,37 @@ public: free_area = bin_area - filled_area; auto itmp = it++; not_packed.erase(itmp); + makeProgress(placer); } else it++; } } // try pieses one by one - while(tryOneByOne(placer, waste)) + while(tryOneByOne(placer, waste)) { waste = 0; + makeProgress(placer); + } // try groups of 2 pieses - while(tryGroupsOfTwo(placer, waste)) + while(tryGroupsOfTwo(placer, waste)) { waste = 0; + makeProgress(placer); + } // try groups of 3 pieses - while(tryGroupsOfThree(placer, waste)) + while(tryGroupsOfThree(placer, waste)) { waste = 0; + makeProgress(placer); + } if(waste < free_area) waste += w; else if(!not_packed.empty()) addBin(); } - std::for_each(placers.begin(), placers.end(), - [this](Placer& placer){ - packed_bins_.push_back(placer.getItems()); - }); +// std::for_each(placers.begin(), placers.end(), +// [this](Placer& placer){ +// packed_bins_.push_back(placer.getItems()); +// }); } }; diff --git a/xs/src/libnest2d/libnest2d/selections/selection_boilerplate.hpp b/xs/src/libnest2d/libnest2d/selections/selection_boilerplate.hpp index 8af489a30..59ef5cb23 100644 --- a/xs/src/libnest2d/libnest2d/selections/selection_boilerplate.hpp +++ b/xs/src/libnest2d/libnest2d/selections/selection_boilerplate.hpp @@ -26,8 +26,14 @@ public: return packed_bins_[binIndex]; } + inline void progressIndicator(ProgressFunction fn) { + progress_ = fn; + } + protected: + PackGroup packed_bins_; + ProgressFunction progress_ = [](unsigned){}; }; } diff --git a/xs/src/libnest2d/tests/CMakeLists.txt b/xs/src/libnest2d/tests/CMakeLists.txt index bfe32bfeb..3af5e6f70 100644 --- a/xs/src/libnest2d/tests/CMakeLists.txt +++ b/xs/src/libnest2d/tests/CMakeLists.txt @@ -1,10 +1,11 @@ # Try to find existing GTest installation -find_package(GTest QUIET) +find_package(GTest 1.7) if(NOT GTEST_FOUND) + message(STATUS "GTest not found so downloading...") # Go and download google test framework, integrate it with the build - set(GTEST_LIBRARIES gtest gmock) + set(GTEST_LIBS_TO_LINK gtest gtest_main) if (CMAKE_VERSION VERSION_LESS 3.2) set(UPDATE_DISCONNECTED_IF_AVAILABLE "") @@ -15,7 +16,7 @@ if(NOT GTEST_FOUND) include(DownloadProject) download_project(PROJ googletest GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG release-1.8.0 + GIT_TAG release-1.7.0 ${UPDATE_DISCONNECTED_IF_AVAILABLE} ) @@ -27,22 +28,20 @@ if(NOT GTEST_FOUND) ${googletest_BINARY_DIR} ) + set(GTEST_INCLUDE_DIRS ${googletest_SOURCE_DIR}/include) + else() - include_directories(${GTEST_INCLUDE_DIRS} ) + find_package(Threads REQUIRED) + set(GTEST_LIBS_TO_LINK ${GTEST_BOTH_LIBRARIES} Threads::Threads) endif() -include_directories(BEFORE ${LIBNEST2D_HEADERS}) -add_executable(bp2d_tests test.cpp printer_parts.h printer_parts.cpp) -target_link_libraries(bp2d_tests libnest2d - ${GTEST_LIBRARIES} -) +add_executable(bp2d_tests test.cpp svgtools.hpp printer_parts.h printer_parts.cpp) +target_link_libraries(bp2d_tests libnest2d_static ${GTEST_LIBS_TO_LINK} ) +target_include_directories(bp2d_tests PRIVATE BEFORE ${LIBNEST2D_HEADERS} + ${GTEST_INCLUDE_DIRS}) if(DEFINED LIBNEST2D_TEST_LIBRARIES) target_link_libraries(bp2d_tests ${LIBNEST2D_TEST_LIBRARIES}) endif() -add_test(gtests bp2d_tests) - -add_executable(main EXCLUDE_FROM_ALL main.cpp printer_parts.cpp printer_parts.h) -target_link_libraries(main libnest2d) -target_include_directories(main PUBLIC ${CMAKE_SOURCE_DIR}) +add_test(libnest2d_tests bp2d_tests) diff --git a/xs/src/libnest2d/tests/main.cpp b/xs/src/libnest2d/tests/main.cpp index 3d5baca76..633fe0c97 100644 --- a/xs/src/libnest2d/tests/main.cpp +++ b/xs/src/libnest2d/tests/main.cpp @@ -7,232 +7,56 @@ #include "printer_parts.h" #include "benchmark.h" +#include "svgtools.hpp" -namespace { using namespace libnest2d; using ItemGroup = std::vector>; -//using PackGroup = std::vector; -template -void exportSVG(PackGroup& result, const Bin& bin) { - - std::string loc = "out"; - - static std::string svg_header = -R"raw( - - -)raw"; - - int i = 0; - for(auto r : result) { - std::fstream out(loc + std::to_string(i) + ".svg", std::fstream::out); - if(out.is_open()) { - out << svg_header; - Item rbin( Rectangle(bin.width(), bin.height()) ); - for(unsigned i = 0; i < rbin.vertexCount(); i++) { - auto v = rbin.vertex(i); - setY(v, -getY(v)/SCALE + 500 ); - setX(v, getX(v)/SCALE); - rbin.setVertex(i, v); - } - out << ShapeLike::serialize(rbin.rawShape()) << std::endl; - for(Item& sh : r) { - Item tsh(sh.transformedShape()); - for(unsigned i = 0; i < tsh.vertexCount(); i++) { - auto v = tsh.vertex(i); - setY(v, -getY(v)/SCALE + 500); - setX(v, getX(v)/SCALE); - tsh.setVertex(i, v); - } - out << ShapeLike::serialize(tsh.rawShape()) << std::endl; - } - out << "\n" << std::endl; - } - out.close(); - - i++; +std::vector& _parts(std::vector& ret, const TestData& data) +{ + if(ret.empty()) { + ret.reserve(data.size()); + for(auto& inp : data) + ret.emplace_back(inp); } + + return ret; } -template< int SCALE, class Bin> -void exportSVG(ItemGroup& result, const Bin& bin, int idx) { - - std::string loc = "out"; - - static std::string svg_header = -R"raw( - - -)raw"; - - int i = idx; - auto r = result; -// for(auto r : result) { - std::fstream out(loc + std::to_string(i) + ".svg", std::fstream::out); - if(out.is_open()) { - out << svg_header; - Item rbin( Rectangle(bin.width(), bin.height()) ); - for(unsigned i = 0; i < rbin.vertexCount(); i++) { - auto v = rbin.vertex(i); - setY(v, -getY(v)/SCALE + 500 ); - setX(v, getX(v)/SCALE); - rbin.setVertex(i, v); - } - out << ShapeLike::serialize(rbin.rawShape()) << std::endl; - for(Item& sh : r) { - Item tsh(sh.transformedShape()); - for(unsigned i = 0; i < tsh.vertexCount(); i++) { - auto v = tsh.vertex(i); - setY(v, -getY(v)/SCALE + 500); - setX(v, getX(v)/SCALE); - tsh.setVertex(i, v); - } - out << ShapeLike::serialize(tsh.rawShape()) << std::endl; - } - out << "\n" << std::endl; - } - out.close(); - -// i++; -// } -} +std::vector& prusaParts() { + static std::vector ret; + return _parts(ret, PRINTER_PART_POLYGONS); } - -void findDegenerateCase() { - using namespace libnest2d; - - auto input = PRINTER_PART_POLYGONS; - - auto scaler = [](Item& item) { - for(unsigned i = 0; i < item.vertexCount(); i++) { - auto v = item.vertex(i); - setX(v, 100*getX(v)); setY(v, 100*getY(v)); - item.setVertex(i, v); - } - }; - - auto cmp = [](const Item& t1, const Item& t2) { - return t1.area() > t2.area(); - }; - - std::for_each(input.begin(), input.end(), scaler); - - std::sort(input.begin(), input.end(), cmp); - - Box bin(210*100, 250*100); - BottomLeftPlacer placer(bin); - - auto it = input.begin(); - auto next = it; - int i = 0; - while(it != input.end() && ++next != input.end()) { - placer.pack(*it); - placer.pack(*next); - - auto result = placer.getItems(); - bool valid = true; - - if(result.size() == 2) { - Item& r1 = result[0]; - Item& r2 = result[1]; - valid = !Item::intersects(r1, r2) || Item::touches(r1, r2); - valid = (valid && !r1.isInside(r2) && !r2.isInside(r1)); - if(!valid) { - std::cout << "error index: " << i << std::endl; - exportSVG<100>(result, bin, i); - } - } else { - std::cout << "something went terribly wrong!" << std::endl; - } - - - placer.clearItems(); - it++; - i++; - } +std::vector& stegoParts() { + static std::vector ret; + return _parts(ret, STEGOSAUR_POLYGONS); } void arrangeRectangles() { using namespace libnest2d; - -// std::vector input = { -// {80, 80}, -// {110, 10}, -// {200, 5}, -// {80, 30}, -// {60, 90}, -// {70, 30}, -// {80, 60}, -// {60, 60}, -// {60, 40}, -// {40, 40}, -// {10, 10}, -// {10, 10}, -// {10, 10}, -// {10, 10}, -// {10, 10}, -// {5, 5}, -// {5, 5}, -// {5, 5}, -// {5, 5}, -// {5, 5}, -// {5, 5}, -// {5, 5}, -// {20, 20}, -// {80, 80}, -// {110, 10}, -// {200, 5}, -// {80, 30}, -// {60, 90}, -// {70, 30}, -// {80, 60}, -// {60, 60}, -// {60, 40}, -// {40, 40}, -// {10, 10}, -// {10, 10}, -// {10, 10}, -// {10, 10}, -// {10, 10}, -// {5, 5}, -// {5, 5}, -// {5, 5}, -// {5, 5}, -// {5, 5}, -// {5, 5}, -// {5, 5}, -// {20, 20} -// }; - - auto input = PRINTER_PART_POLYGONS; + auto input = stegoParts(); const int SCALE = 1000000; -// const int SCALE = 1; Box bin(210*SCALE, 250*SCALE); - auto scaler = [&SCALE, &bin](Item& item) { -// double max_area = 0; - for(unsigned i = 0; i < item.vertexCount(); i++) { - auto v = item.vertex(i); - setX(v, SCALE*getX(v)); setY(v, SCALE*getY(v)); - item.setVertex(i, v); -// double area = item.area(); -// if(max_area < area) { -// max_area = area; -// bin = item.boundingBox(); -// } - } - }; + Coord min_obj_distance = 0; //6*SCALE; - Coord min_obj_distance = 2*SCALE; + NfpPlacer::Config pconf; + pconf.alignment = NfpPlacer::Config::Alignment::TOP_LEFT; + Arranger arrange(bin, min_obj_distance, pconf); - std::for_each(input.begin(), input.end(), scaler); - - Arranger arrange(bin, min_obj_distance); +// arrange.progressIndicator([&arrange, &bin](unsigned r){ +// svg::SVGWriter::Config conf; +// conf.mm_in_coord_units = SCALE; +// svg::SVGWriter svgw(conf); +// svgw.setSize(bin); +// svgw.writePackGroup(arrange.lastResult()); +// svgw.save("out"); +// std::cout << "Remaining items: " << r << std::endl; +// }); Benchmark bench; @@ -249,8 +73,12 @@ void arrangeRectangles() { std::cout << ret.second << std::endl; } - exportSVG(result, bin); - + svg::SVGWriter::Config conf; + conf.mm_in_coord_units = SCALE; + svg::SVGWriter svgw(conf); + svgw.setSize(bin); + svgw.writePackGroup(result); + svgw.save("out"); } int main(void /*int argc, char **argv*/) { diff --git a/xs/src/libnest2d/tests/printer_parts.cpp b/xs/src/libnest2d/tests/printer_parts.cpp index 02ea6bb7f..13bc627ad 100644 --- a/xs/src/libnest2d/tests/printer_parts.cpp +++ b/xs/src/libnest2d/tests/printer_parts.cpp @@ -1,339 +1,2527 @@ #include "printer_parts.h" -const std::vector PRINTER_PART_POLYGONS = { +const TestData PRINTER_PART_POLYGONS = { - {120, 114}, - {130, 114}, - {130, 103}, - {128, 96}, - {122, 96}, - {120, 103}, - {120, 114} -}, -{ - {61, 97}, - {70, 151}, - {176, 151}, - {189, 138}, - {189, 59}, - {70, 59}, - {61, 77}, - {61, 97} -}, -{ - {72, 147}, - {94, 151}, - {178, 151}, - {178, 59}, - {72, 59}, - {72, 147} -}, -{ - {121, 119}, - {123, 119}, - {129, 109}, - {129, 107}, - {128, 100}, - {127, 98}, - {123, 91}, - {121, 91}, - {121, 119}, -}, -{ - {93, 104}, - {100, 146}, - {107, 152}, - {136, 152}, - {142, 146}, - {157, 68}, - {157, 61}, - {154, 58}, - {104, 58}, - {93, 101}, - {93, 104}, -}, -{ - {90, 91}, - {114, 130}, - {158, 130}, - {163, 126}, - {163, 123}, - {152, 80}, - {116, 80}, - {90, 81}, - {87, 86}, - {90, 91}, -}, -{ - {111, 114}, - {114, 122}, - {139, 122}, - {139, 88}, - {114, 88}, - {111, 97}, - {111, 114}, -}, -{ - {120, 107}, - {125, 110}, - {130, 110}, - {130, 100}, - {120, 100}, - {120, 107}, -}, -{ - {113, 123}, - {137, 123}, - {137, 87}, - {113, 87}, - {113, 123}, -}, -{ - {107, 104}, - {110, 127}, - {114, 131}, - {136, 131}, - {140, 127}, - {143, 104}, - {143, 79}, - {107, 79}, - {107, 104}, -}, -{ - {48, 135}, - {50, 138}, - {52, 140}, - {198, 140}, - {202, 135}, - {202, 72}, - {200, 70}, - {50, 70}, - {48, 72}, - {48, 135}, -}, -{ - {115, 104}, - {116, 106}, - {123, 119}, - {127, 119}, - {134, 106}, - {135, 104}, - {135, 98}, - {134, 96}, - {132, 93}, - {128, 91}, - {122, 91}, - {118, 93}, - {116, 96}, - {115, 98}, - {115, 104}, -}, -{ - {91, 100}, - {94, 144}, - {117, 153}, - {118, 153}, - {159, 112}, - {159, 110}, - {156, 66}, - {133, 57}, - {132, 57}, - {91, 98}, - {91, 100}, -}, -{ - {101, 90}, - {103, 98}, - {107, 113}, - {114, 125}, - {115, 126}, - {135, 126}, - {136, 125}, - {144, 114}, - {149, 90}, - {149, 89}, - {148, 87}, - {145, 84}, - {105, 84}, - {102, 87}, - {101, 89}, - {101, 90}, -}, -{ - {93, 116}, - {94, 118}, - {141, 121}, - {151, 121}, - {156, 118}, - {157, 116}, - {157, 91}, - {156, 89}, - {94, 89}, - {93, 91}, - {93, 116}, -}, -{ - {89, 60}, - {91, 66}, - {134, 185}, - {139, 198}, - {140, 200}, - {141, 201}, - {159, 201}, - {161, 199}, - {161, 195}, - {157, 179}, - {114, 26}, - {110, 12}, - {108, 10}, - {106, 9}, - {92, 9}, - {89, 50}, - {89, 60}, -}, -{ - {99, 130}, - {101, 133}, - {118, 150}, - {142, 150}, - {145, 148}, - {151, 142}, - {151, 80}, - {142, 62}, - {139, 60}, - {111, 60}, - {108, 62}, - {102, 80}, - {99, 95}, - {99, 130}, -}, -{ - {99, 122}, - {108, 140}, - {110, 142}, - {139, 142}, - {151, 122}, - {151, 102}, - {142, 70}, - {139, 68}, - {111, 68}, - {108, 70}, - {99, 102}, - {99, 122}, -}, -{ - {107, 124}, - {128, 125}, - {133, 125}, - {136, 124}, - {140, 121}, - {142, 119}, - {143, 116}, - {143, 109}, - {141, 93}, - {139, 89}, - {136, 86}, - {134, 85}, - {108, 85}, - {107, 86}, - {107, 124}, -}, -{ - {107, 146}, - {124, 146}, - {141, 96}, - {143, 79}, - {143, 73}, - {142, 70}, - {140, 68}, - {136, 65}, - {134, 64}, - {127, 64}, - {107, 65}, - {107, 146}, -}, -{ - {113, 118}, - {115, 120}, - {129, 129}, - {137, 129}, - {137, 81}, - {129, 81}, - {115, 90}, - {113, 92}, - {113, 118}, -}, -{ - {112, 122}, - {138, 122}, - {138, 88}, - {112, 88}, - {112, 122}, -}, -{ - {102, 116}, - {111, 126}, - {114, 126}, - {144, 106}, - {148, 100}, - {148, 85}, - {147, 84}, - {102, 84}, - {102, 116}, -}, -{ - {112, 110}, - {121, 112}, - {129, 112}, - {138, 110}, - {138, 106}, - {134, 98}, - {117, 98}, - {114, 102}, - {112, 106}, - {112, 110}, -}, -{ - {100, 156}, - {102, 158}, - {104, 159}, - {143, 159}, - {150, 152}, - {150, 58}, - {143, 51}, - {104, 51}, - {102, 52}, - {100, 54}, - {100, 156} -}, -{ - {106, 151}, - {108, 151}, - {139, 139}, - {144, 134}, - {144, 76}, - {139, 71}, - {108, 59}, - {106, 59}, - {106, 151} -}, -{ - {117, 107}, - {118, 109}, - {120, 112}, - {122, 113}, - {128, 113}, - {130, 112}, - {132, 109}, - {133, 107}, - {133, 103}, - {132, 101}, - {130, 98}, - {128, 97}, - {122, 97}, - {120, 98}, - {118, 101}, - {117, 103}, - {117, 107} -} + { + {120000000, 113954048}, + {130000000, 113954048}, + {130000000, 104954048}, + {129972610, 104431449}, + {128500000, 96045951}, + {121500000, 96045951}, + {120027389, 104431449}, + {120000000, 104954048}, + {120000000, 113954048}, + }, + { + {61250000, 97000000}, + {70250000, 151000000}, + {175750000, 151000000}, + {188750000, 138000000}, + {188750000, 59000000}, + {70250000, 59000000}, + {61250000, 77000000}, + {61250000, 97000000}, + }, + { + {72250000, 146512344}, + {93750000, 150987655}, + {177750000, 150987655}, + {177750000, 59012348}, + {72250000, 59012348}, + {72250000, 146512344}, + }, + { + {121099998, 119000000}, + {122832046, 119000000}, + {126016967, 113483596}, + {126721450, 112263397}, + {128828536, 108613792}, + {128838806, 108582153}, + {128871566, 108270568}, + {128899993, 108000000}, + {128500000, 102000000}, + {128447555, 101501014}, + {128292510, 101023834}, + {128100006, 100487052}, + {126030128, 96901916}, + {122622650, 91000000}, + {121099998, 91000000}, + {121099998, 119000000}, + }, + { + {93250000, 104000000}, + {99750000, 145500000}, + {106750000, 152500000}, + {135750000, 152500000}, + {141750000, 146500000}, + {156750000, 68000000}, + {156750000, 61142101}, + {156659606, 61051700}, + {153107894, 57500000}, + {143392105, 57500000}, + {104250000, 58500000}, + {93250000, 101000000}, + {93250000, 104000000}, + }, + { + {90375000, 90734603}, + {114074996, 129875000}, + {158324996, 129875000}, + {162574996, 125625000}, + {162574996, 122625000}, + {151574996, 80125000}, + {116074996, 80125000}, + {90375000, 80515396}, + {87425003, 85625000}, + {90375000, 90734603}, + }, + { + {111000000, 114000000}, + {114000000, 122000000}, + {139000000, 122000000}, + {139000000, 88000000}, + {114000000, 88000000}, + {111000000, 97000000}, + {111000000, 114000000}, + }, + { + {119699996, 107227401}, + {124762199, 110150001}, + {130300003, 110150001}, + {130300003, 105650001}, + {129699996, 99850006}, + {119699996, 99850006}, + {119699996, 107227401}, + }, + { + {113000000, 123000000}, + {137000000, 123000000}, + {137000000, 87000000}, + {113000000, 87000000}, + {113000000, 123000000}, + }, + { + {107000000, 104000000}, + {110000000, 127000000}, + {114000000, 131000000}, + {136000000, 131000000}, + {140000000, 127000000}, + {143000000, 104000000}, + {143000000, 79000000}, + {107000000, 79000000}, + {107000000, 104000000}, + }, + { + {47500000, 135000000}, + {52500000, 140000000}, + {197500000, 140000000}, + {202500000, 135000000}, + {202500000, 72071098}, + {200428894, 70000000}, + {49571098, 70000000}, + {48570396, 71000701}, + {47500000, 72071098}, + {47500000, 135000000}, + }, + { + {115054779, 101934379}, + {115218521, 102968223}, + {115489440, 103979270}, + {115864547, 104956466}, + {122900001, 119110900}, + {127099998, 119110900}, + {134135452, 104956466}, + {134510559, 103979270}, + {134781478, 102968223}, + {134945220, 101934379}, + {135000000, 100889099}, + {134945220, 99843818}, + {134781478, 98809982}, + {134510559, 97798927}, + {134135452, 96821731}, + {133660247, 95889099}, + {133090164, 95011245}, + {132431457, 94197792}, + {131691314, 93457649}, + {130877853, 92798927}, + {130000000, 92228851}, + {129067367, 91753646}, + {128090164, 91378540}, + {127079116, 91107620}, + {126045280, 90943878}, + {125000000, 90889099}, + {123954719, 90943878}, + {122920883, 91107620}, + {121909828, 91378540}, + {120932632, 91753646}, + {120000000, 92228851}, + {119122146, 92798927}, + {118308692, 93457649}, + {117568550, 94197792}, + {116909828, 95011245}, + {116339752, 95889099}, + {115864547, 96821731}, + {115489440, 97798927}, + {115218521, 98809982}, + {115054779, 99843818}, + {115000000, 100889099}, + {115054779, 101934379}, + }, + { + {90807601, 99807609}, + {93500000, 144000000}, + {116816207, 152669006}, + {118230407, 152669006}, + {120351806, 150547698}, + {159192398, 111707107}, + {159192398, 110192390}, + {156500000, 66000000}, + {133183807, 57331001}, + {131769607, 57331001}, + {129648208, 59452301}, + {92525100, 96575378}, + {90807601, 98292892}, + {90807601, 99807609}, + }, + { + {101524497, 93089904}, + {107000000, 113217697}, + {113860298, 125099998}, + {114728599, 125900001}, + {134532012, 125900001}, + {136199996, 125099998}, + {143500000, 113599998}, + {148475494, 93089904}, + {148800003, 90099998}, + {148706604, 89211097}, + {148668899, 88852500}, + {148281295, 87659599}, + {147654098, 86573303}, + {146814804, 85641098}, + {145800003, 84903800}, + {144654098, 84393699}, + {143427200, 84132904}, + {142800003, 84099998}, + {107199996, 84099998}, + {106572799, 84132904}, + {105345901, 84393699}, + {104199996, 84903800}, + {103185195, 85641098}, + {102345901, 86573303}, + {101718704, 87659599}, + {101331100, 88852500}, + {101199996, 90099998}, + {101524497, 93089904}, + }, + { + {93000000, 115000000}, + {93065559, 115623733}, + {93259361, 116220207}, + {93572952, 116763359}, + {93992614, 117229431}, + {94500000, 117598083}, + {95072952, 117853172}, + {95686416, 117983566}, + {141000000, 121000000}, + {151000000, 121000000}, + {156007400, 117229431}, + {156427093, 116763359}, + {156740600, 116220207}, + {156934402, 115623733}, + {157000000, 115000000}, + {157000000, 92000000}, + {156934402, 91376296}, + {156740600, 90779800}, + {156427093, 90236602}, + {156007400, 89770599}, + {155500000, 89401901}, + {154927093, 89146797}, + {154313598, 89016403}, + {154000000, 89000000}, + {97000000, 89000000}, + {95686416, 89016403}, + {95072952, 89146797}, + {94500000, 89401901}, + {93992614, 89770599}, + {93572952, 90236602}, + {93259361, 90779800}, + {93065559, 91376296}, + {93000000, 92000000}, + {93000000, 115000000}, + }, + { + {88866210, 58568977}, + {88959899, 58828182}, + {89147277, 59346588}, + {127200073, 164616485}, + {137112792, 192039184}, + {139274505, 198019332}, + {139382049, 198291641}, + {139508483, 198563430}, + {139573425, 198688369}, + {139654052, 198832443}, + {139818634, 199096328}, + {139982757, 199327621}, + {140001708, 199352630}, + {140202392, 199598999}, + {140419342, 199833160}, + {140497497, 199910552}, + {140650848, 200053039}, + {140894866, 200256866}, + {141104309, 200412185}, + {141149047, 200443206}, + {141410888, 200611038}, + {141677795, 200759750}, + {141782348, 200812332}, + {141947143, 200889144}, + {142216400, 200999465}, + {142483123, 201091293}, + {142505554, 201098251}, + {142745178, 201165542}, + {143000671, 201223373}, + {143245880, 201265884}, + {143484039, 201295257}, + {143976715, 201319580}, + {156135131, 201319580}, + {156697082, 201287902}, + {156746368, 201282104}, + {157263000, 201190719}, + {157338623, 201172576}, + {157821411, 201026641}, + {157906188, 200995391}, + {158360565, 200797012}, + {158443420, 200754882}, + {158869171, 200505874}, + {158900756, 200485122}, + {159136413, 200318618}, + {159337127, 200159790}, + {159377288, 200125930}, + {159619628, 199905410}, + {159756286, 199767364}, + {159859008, 199656143}, + {160090606, 199378067}, + {160120849, 199338546}, + {160309295, 199072113}, + {160434875, 198871475}, + {160510070, 198740310}, + {160688232, 198385772}, + {160699096, 198361679}, + {160839782, 198012557}, + {160905487, 197817459}, + {160961578, 197625488}, + {161048004, 197249023}, + {161051574, 197229934}, + {161108856, 196831405}, + {161122985, 196667816}, + {161133789, 196435317}, + {161129669, 196085830}, + {161127685, 196046661}, + {161092742, 195669830}, + {161069946, 195514739}, + {161031829, 195308425}, + {160948211, 194965225}, + {159482635, 189756820}, + {152911407, 166403976}, + {145631286, 140531890}, + {119127441, 46342559}, + {110756378, 16593490}, + {110423187, 15409400}, + {109578002, 12405799}, + {109342315, 11568267}, + {108961059, 11279479}, + {108579803, 10990692}, + {107817291, 10413124}, + {106165161, 9161727}, + {105529724, 8680419}, + {103631866, 8680419}, + {102236145, 8680465}, + {95257537, 8680725}, + {92466064, 8680831}, + {88866210, 50380981}, + {88866210, 58568977}, + }, + { + {99000000, 130500000}, + {101070701, 132570709}, + {118500000, 150000000}, + {142500000, 150000000}, + {151000000, 141500000}, + {151000000, 86000000}, + {150949996, 80500000}, + {142000000, 62785301}, + {139300003, 60000000}, + {110699996, 60000000}, + {107500000, 63285301}, + {101599998, 80500000}, + {99000000, 94535995}, + {99000000, 130500000}, + }, + { + {99000000, 121636100}, + {99927795, 123777801}, + {108500000, 140300003}, + {109949996, 141750000}, + {138550003, 141750000}, + {140000000, 140300003}, + {151000000, 121045196}, + {151000000, 102250000}, + {141500000, 70492095}, + {139257904, 68250000}, + {110742095, 68250000}, + {108500000, 70492095}, + {99000000, 102250000}, + {99000000, 121636100}, + }, + { + {106937652, 123950103}, + {129644943, 125049896}, + {131230361, 125049896}, + {132803283, 124851196}, + {134338897, 124456901}, + {135812988, 123873298}, + {137202316, 123109497}, + {138484954, 122177597}, + {139640670, 121092300}, + {140651245, 119870697}, + {141500747, 118532104}, + {142175842, 117097595}, + {142665756, 115589698}, + {142962844, 114032402}, + {143062347, 112450103}, + {142962844, 110867797}, + {140810745, 93992263}, + {140683746, 93272232}, + {140506851, 92562797}, + {140280929, 91867439}, + {140007034, 91189529}, + {139686523, 90532394}, + {139320953, 89899200}, + {138912094, 89293052}, + {138461959, 88716903}, + {137972732, 88173553}, + {137446792, 87665664}, + {136886703, 87195693}, + {136295196, 86765930}, + {135675155, 86378479}, + {135029586, 86035232}, + {134361648, 85737854}, + {133674606, 85487777}, + {132971786, 85286300}, + {132256607, 85134201}, + {131532592, 85032501}, + {130803222, 84981498}, + {130437652, 84975097}, + {123937652, 84950103}, + {108437652, 84950103}, + {106937652, 86450103}, + {106937652, 123950103}, + }, + { + {106937652, 146299896}, + {123937652, 146299896}, + {140280929, 96882560}, + {140506851, 96187202}, + {140683746, 95477767}, + {140810745, 94757736}, + {142962844, 77882202}, + {143062347, 76299896}, + {142962844, 74717597}, + {142665756, 73160301}, + {142175842, 71652404}, + {141500747, 70217895}, + {140651245, 68879302}, + {139640670, 67657699}, + {138484954, 66572402}, + {137202316, 65640502}, + {135812988, 64876701}, + {134338897, 64293098}, + {132803283, 63898799}, + {131230361, 63700099}, + {129644943, 63700099}, + {106937652, 64799896}, + {106937652, 146299896}, + }, + { + {113250000, 118057899}, + {115192138, 120000000}, + {129392135, 129000000}, + {136750000, 129000000}, + {136750000, 81000000}, + {129392135, 81000000}, + {115192138, 90000000}, + {113250000, 91942100}, + {113250000, 118057899}, + }, + { + {112500000, 122500000}, + {137500000, 122500000}, + {137500000, 87500000}, + {112500000, 87500000}, + {112500000, 122500000}, + }, + { + {101500000, 116500000}, + {111142143, 126000000}, + {114000000, 126000000}, + {143500000, 105500000}, + {148500000, 100500000}, + {148500000, 85500000}, + {147000000, 84000000}, + {101500000, 84000000}, + {101500000, 116500000}, + }, + { + {112000000, 110250000}, + {121000000, 111750000}, + {129000000, 111750000}, + {138000000, 110250000}, + {138000000, 105838462}, + {136376296, 103026062}, + {135350906, 101250000}, + {133618804, 98250000}, + {116501708, 98250000}, + {112000000, 106047180}, + {112000000, 110250000}, + }, + { + {100000000, 155500000}, + {103500000, 159000000}, + {143286804, 159000000}, + {150000000, 152286804}, + {150000000, 57713199}, + {143397705, 51110900}, + {143286804, 51000000}, + {103500000, 51000000}, + {100000000, 54500000}, + {100000000, 155500000}, + }, + { + {106000000, 151000000}, + {108199996, 151000000}, + {139000000, 139000000}, + {144000000, 134000000}, + {144000000, 76000000}, + {139000000, 71000000}, + {108199996, 59000000}, + {106000000, 59000000}, + {106000000, 151000000}, + }, + { + {117043830, 105836227}, + {117174819, 106663291}, + {117232467, 106914527}, + {117391548, 107472137}, + {117691642, 108253890}, + {117916351, 108717781}, + {118071800, 109000000}, + {118527862, 109702278}, + {119011909, 110304977}, + {119054840, 110353042}, + {119646957, 110945159}, + {120297721, 111472137}, + {120455482, 111583869}, + {121000000, 111928199}, + {121746109, 112308357}, + {122163162, 112480133}, + {122527862, 112608451}, + {123336708, 112825180}, + {124035705, 112941673}, + {124163772, 112956169}, + {125000000, 113000000}, + {125836227, 112956169}, + {125964294, 112941673}, + {126663291, 112825180}, + {127472137, 112608451}, + {127836837, 112480133}, + {128253890, 112308357}, + {129000000, 111928199}, + {129544525, 111583869}, + {129702285, 111472137}, + {130353042, 110945159}, + {130945159, 110353042}, + {130988082, 110304977}, + {131472137, 109702278}, + {131928192, 109000000}, + {132083648, 108717781}, + {132308364, 108253890}, + {132608444, 107472137}, + {132767532, 106914527}, + {132825180, 106663291}, + {132956176, 105836227}, + {133000000, 105000000}, + {132956176, 104163772}, + {132825180, 103336708}, + {132767532, 103085472}, + {132608444, 102527862}, + {132308364, 101746109}, + {132083648, 101282218}, + {131928192, 101000000}, + {131472137, 100297721}, + {130988082, 99695022}, + {130945159, 99646957}, + {130353042, 99054840}, + {129702285, 98527862}, + {129544525, 98416130}, + {129000000, 98071800}, + {128253890, 97691642}, + {127836837, 97519866}, + {127472137, 97391548}, + {126663291, 97174819}, + {125964294, 97058326}, + {125836227, 97043830}, + {125000000, 97000000}, + {124163772, 97043830}, + {124035705, 97058326}, + {123336708, 97174819}, + {122527862, 97391548}, + {122163162, 97519866}, + {121746109, 97691642}, + {121000000, 98071800}, + {120455482, 98416130}, + {120297721, 98527862}, + {119646957, 99054840}, + {119054840, 99646957}, + {119011909, 99695022}, + {118527862, 100297721}, + {118071800, 101000000}, + {117916351, 101282218}, + {117691642, 101746109}, + {117391548, 102527862}, + {117232467, 103085472}, + {117174819, 103336708}, + {117043830, 104163772}, + {117000000, 105000000}, + {117043830, 105836227}, + }, +}; + +const TestData STEGOSAUR_POLYGONS = +{ + { + {113210205, 107034095}, + {113561798, 109153793}, + {113750099, 109914001}, + {114396499, 111040199}, + {114599197, 111321998}, + {115570404, 112657096}, + {116920097, 114166595}, + {117630599, 114609390}, + {119703704, 115583900}, + {120559494, 115811996}, + {121045410, 115754493}, + {122698097, 115526496}, + {123373001, 115370193}, + {123482406, 115315689}, + {125664199, 114129798}, + {125920303, 113968193}, + {128551208, 111866195}, + {129075592, 111443199}, + {135044692, 106572608}, + {135254898, 106347694}, + {135415100, 106102897}, + {136121704, 103779891}, + {136325103, 103086303}, + {136690093, 101284896}, + {136798309, 97568496}, + {136798309, 97470397}, + {136787399, 97375297}, + {136753295, 97272102}, + {136687988, 97158699}, + {136539794, 96946899}, + {135526702, 95550994}, + {135388488, 95382293}, + {135272491, 95279098}, + {135214904, 95250595}, + {135122894, 95218002}, + {134966705, 95165191}, + {131753997, 94380798}, + {131226806, 94331001}, + {129603393, 94193893}, + {129224197, 94188003}, + {127874107, 94215103}, + {126812797, 94690200}, + {126558197, 94813896}, + {118361801, 99824195}, + {116550796, 101078796}, + {116189704, 101380493}, + {114634002, 103027999}, + {114118103, 103820297}, + {113399200, 105568000}, + {113201705, 106093597}, + {113210205, 107034095}, + }, + { + {77917999, 130563003}, + {77926300, 131300903}, + {77990196, 132392700}, + {78144195, 133328002}, + {78170593, 133427093}, + {78235900, 133657592}, + {78799598, 135466705}, + {78933296, 135832397}, + {79112899, 136247604}, + {79336303, 136670898}, + {79585197, 137080596}, + {79726303, 137309005}, + {79820297, 137431900}, + {79942199, 137549407}, + {90329193, 145990203}, + {90460197, 146094390}, + {90606399, 146184509}, + {90715194, 146230010}, + {90919601, 146267211}, + {142335296, 153077697}, + {143460296, 153153594}, + {143976593, 153182189}, + {145403991, 153148605}, + {145562301, 153131195}, + {145705993, 153102905}, + {145938796, 153053192}, + {146134094, 153010101}, + {146483184, 152920196}, + {146904693, 152806396}, + {147180099, 152670196}, + {147357788, 152581695}, + {147615295, 152423095}, + {147782287, 152294708}, + {149281799, 150908386}, + {149405303, 150784912}, + {166569305, 126952499}, + {166784301, 126638099}, + {166938491, 126393699}, + {167030899, 126245101}, + {167173004, 126015899}, + {167415298, 125607200}, + {167468292, 125504699}, + {167553100, 125320899}, + {167584594, 125250694}, + {167684997, 125004394}, + {167807098, 124672401}, + {167938995, 124255203}, + {168052307, 123694000}, + {170094100, 112846900}, + {170118408, 112684204}, + {172079101, 88437797}, + {172082000, 88294403}, + {171916290, 82827606}, + {171911590, 82705703}, + {171874893, 82641906}, + {169867004, 79529907}, + {155996795, 58147998}, + {155904998, 58066299}, + {155864791, 58054199}, + {134315704, 56830902}, + {134086486, 56817901}, + {98200096, 56817798}, + {97838195, 56818599}, + {79401695, 56865097}, + {79291297, 56865501}, + {79180694, 56869499}, + {79058799, 56885097}, + {78937301, 56965301}, + {78324691, 57374599}, + {77932998, 57638401}, + {77917999, 57764297}, + {77917999, 130563003}, + }, + { + {75566848, 109289947}, + {75592651, 109421951}, + {75644248, 109534446}, + {95210548, 141223846}, + {95262649, 141307449}, + {95487854, 141401443}, + {95910850, 141511642}, + {96105651, 141550338}, + {106015045, 142803451}, + {106142852, 142815155}, + {166897460, 139500244}, + {167019348, 139484741}, + {168008239, 138823043}, + {168137542, 138735153}, + {168156250, 138616851}, + {173160751, 98882049}, + {174381546, 87916046}, + {174412246, 87579048}, + {174429443, 86988746}, + {174436141, 86297348}, + {174438949, 84912048}, + {174262939, 80999145}, + {174172546, 80477546}, + {173847549, 79140846}, + {173623840, 78294349}, + {173120239, 76485046}, + {173067138, 76300544}, + {173017852, 76137542}, + {172941543, 75903045}, + {172892547, 75753143}, + {172813537, 75533348}, + {172758453, 75387046}, + {172307556, 74196746}, + {171926544, 73192848}, + {171891448, 73100448}, + {171672546, 72524147}, + {171502441, 72085144}, + {171414459, 71859146}, + {171294250, 71552352}, + {171080139, 71019744}, + {171039245, 70928146}, + {170970550, 70813346}, + {170904235, 70704040}, + {170786254, 70524353}, + {168063247, 67259048}, + {167989547, 67184844}, + {83427947, 67184844}, + {78360847, 67201248}, + {78238845, 67220550}, + {78151550, 67350547}, + {77574554, 68220550}, + {77494949, 68342651}, + {77479949, 68464546}, + {75648345, 106513351}, + {75561050, 109165740}, + {75566848, 109289947}, + }, + { + {75619415, 108041595}, + {83609863, 134885772}, + {83806945, 135450820}, + {83943908, 135727371}, + {84799934, 137289794}, + {86547897, 140033782}, + {86674118, 140192962}, + {86810661, 140364715}, + {87045211, 140619918}, + {88187042, 141853240}, + {93924575, 147393783}, + {94058013, 147454803}, + {111640083, 153754562}, + {111762550, 153787933}, + {111975250, 153835311}, + {112127426, 153842803}, + {116797996, 154005157}, + {116969688, 154010681}, + {117141731, 154005935}, + {117333145, 153988037}, + {118007507, 153919952}, + {118159675, 153902130}, + {118931480, 153771942}, + {120878150, 153379089}, + {121172164, 153319259}, + {122074508, 153034362}, + {122260681, 152970367}, + {122313438, 152949584}, + {130755096, 149423736}, + {130996063, 149316818}, + {138893524, 144469665}, + {138896423, 144466918}, + {169883666, 97686134}, + {170115036, 96518981}, + {170144317, 96365257}, + {174395645, 67672065}, + {174396560, 67664222}, + {174288452, 66839241}, + {174170364, 66096923}, + {174112731, 65952033}, + {174021377, 65823486}, + {173948608, 65743225}, + {173863830, 65654769}, + {170408340, 63627494}, + {170004867, 63394714}, + {169585632, 63194389}, + {169441162, 63137046}, + {168944274, 62952133}, + {160605072, 60214218}, + {160331573, 60126396}, + {159674743, 59916877}, + {150337249, 56943778}, + {150267730, 56922073}, + {150080139, 56864868}, + {149435333, 56676422}, + {149310241, 56640579}, + {148055419, 56285041}, + {147828796, 56230949}, + {147598205, 56181800}, + {147149963, 56093917}, + {146834457, 56044700}, + {146727966, 56028717}, + {146519729, 56004882}, + {146328521, 55989326}, + {146170684, 55990036}, + {146151321, 55990745}, + {145800170, 56003616}, + {145639526, 56017753}, + {145599426, 56022491}, + {145481338, 56039184}, + {145389556, 56052757}, + {145325134, 56062591}, + {145176574, 56086135}, + {145017272, 56113922}, + {107163085, 63504539}, + {101013870, 65454101}, + {100921798, 65535285}, + {95362182, 74174079}, + {75652366, 107803443}, + {75635391, 107834983}, + {75628814, 107853294}, + {75603431, 107933692}, + {75619415, 108041595}, + }, + { + {83617141, 120264900}, + {84617370, 126416427}, + {84648635, 126601341}, + {84693695, 126816085}, + {84762496, 127082641}, + {84772140, 127117034}, + {84860748, 127391693}, + {84927398, 127550239}, + {85072967, 127789642}, + {85155151, 127908851}, + {86745422, 130042907}, + {86982666, 130317489}, + {89975143, 133230743}, + {90091384, 133338500}, + {96260833, 138719818}, + {96713928, 139103668}, + {98139297, 140307388}, + {102104766, 143511505}, + {102142089, 143536468}, + {102457626, 143735107}, + {103386764, 144312988}, + {103845001, 144579177}, + {104139175, 144737136}, + {104551254, 144932250}, + {104690155, 144985778}, + {104844238, 145010009}, + {105020034, 145010375}, + {128999633, 144082305}, + {129096542, 144076141}, + {133932327, 143370178}, + {134130615, 143326751}, + {134281250, 143289520}, + {135247116, 142993438}, + {150774948, 137828704}, + {150893478, 137786178}, + {151350921, 137608901}, + {159797760, 134318115}, + {159979827, 134244384}, + {159988128, 134240997}, + {160035186, 134221633}, + {160054962, 134211486}, + {160168762, 134132736}, + {160181228, 134121047}, + {160336425, 133961502}, + {160689147, 133564331}, + {161446258, 132710739}, + {163306427, 130611648}, + {164845474, 128873855}, + {165270233, 128393600}, + {165281478, 128380706}, + {165300598, 128358673}, + {165303497, 128355194}, + {166411590, 122772674}, + {166423767, 122708648}, + {164745605, 66237312}, + {164740341, 66193061}, + {164721755, 66082092}, + {164721160, 66078750}, + {164688476, 65914146}, + {164668426, 65859436}, + {164563110, 65765937}, + {164431152, 65715034}, + {163997619, 65550788}, + {163946426, 65531440}, + {162998107, 65173629}, + {162664978, 65049140}, + {162482696, 64991668}, + {162464660, 64989639}, + {148029083, 66896141}, + {147862396, 66932853}, + {130087829, 73341102}, + {129791564, 73469726}, + {100590927, 90307685}, + {100483535, 90373847}, + {100364990, 90458930}, + {96447448, 93276664}, + {95179656, 94189010}, + {93692718, 95260208}, + {87904327, 99430885}, + {87663711, 99606147}, + {87576202, 99683990}, + {87498199, 99801719}, + {85740264, 104173728}, + {85538925, 104710494}, + {84786132, 107265830}, + {84635955, 107801383}, + {84619506, 107868064}, + {84518463, 108287200}, + {84456848, 108613471}, + {84419158, 108826194}, + {84375244, 109093818}, + {84329818, 109435180}, + {84249862, 110179664}, + {84218429, 110572166}, + {83630020, 117995208}, + {83595535, 118787673}, + {83576217, 119290679}, + {83617141, 120264900}, + }, + { + {91735549, 117640846}, + {91748252, 117958145}, + {91823547, 118515449}, + {92088752, 119477249}, + {97995346, 140538452}, + {98031051, 140660446}, + {98154449, 141060241}, + {98179855, 141133758}, + {98217056, 141232849}, + {98217147, 141233047}, + {98269256, 141337051}, + {98298950, 141387954}, + {98337753, 141445755}, + {99455047, 142984451}, + {99656250, 143247344}, + {102567855, 146783752}, + {102685150, 146906845}, + {102828948, 147031250}, + {102972457, 147120452}, + {103676147, 147539642}, + {103758956, 147586151}, + {103956756, 147682144}, + {104479949, 147931457}, + {104744453, 148044143}, + {104994750, 148123443}, + {105375648, 148158645}, + {109266250, 148178253}, + {109447753, 148169052}, + {109693649, 148129150}, + {113729949, 147337448}, + {113884552, 147303054}, + {115155349, 146956146}, + {117637145, 146174346}, + {154694046, 134048049}, + {156979949, 133128555}, + {157076843, 133059356}, + {157125045, 133001449}, + {157561340, 132300750}, + {157865753, 131795959}, + {157923156, 131667358}, + {158007049, 131297653}, + {158112747, 130777053}, + {158116653, 130640853}, + {158268951, 119981643}, + {158260040, 119824752}, + {158229949, 119563751}, + {149914047, 73458648}, + {149877548, 73331748}, + {144460754, 66413558}, + {144230545, 66153152}, + {144128051, 66075057}, + {143974853, 65973152}, + {142812744, 65353149}, + {141810943, 64837249}, + {141683349, 64805152}, + {141505157, 64784652}, + {108214355, 61896251}, + {107826354, 61866352}, + {107072151, 61821750}, + {106938850, 61873550}, + {106584251, 62055152}, + {106419952, 62147548}, + {100459152, 65546951}, + {100343849, 65615150}, + {100198852, 65716949}, + {99825149, 65979751}, + {94619247, 70330352}, + {94492355, 70480850}, + {94445846, 70547355}, + {94425354, 70588752}, + {94379753, 70687652}, + {94110252, 71443450}, + {94095252, 71569053}, + {91737251, 117308746}, + {91731048, 117430946}, + {91735549, 117640846}, + }, + { + {108231399, 111763748}, + {108335403, 111927955}, + {108865203, 112754745}, + {109206703, 113283851}, + {127117500, 125545951}, + {127212097, 125560951}, + {127358497, 125563652}, + {131348007, 125551147}, + {131412002, 125550849}, + {131509506, 125535446}, + {131579391, 125431343}, + {132041000, 124735656}, + {132104690, 124637847}, + {144108505, 100950546}, + {144120605, 100853042}, + {144123291, 100764648}, + {144122695, 100475143}, + {144086898, 85637748}, + {144083602, 85549346}, + {144071105, 85451843}, + {144007003, 85354545}, + {143679595, 84864547}, + {143468597, 84551048}, + {143367889, 84539146}, + {109847702, 84436347}, + {109684700, 84458953}, + {105946502, 89406143}, + {105915901, 91160446}, + {105880905, 93187744}, + {105876701, 93441345}, + {108231399, 111763748}, + }, + { + {102614700, 117684249}, + {102675102, 118074157}, + {102888999, 118743148}, + {103199707, 119517555}, + {103446800, 120099655}, + {103488204, 120193450}, + {104063903, 121373947}, + {104535499, 122192245}, + {104595802, 122295249}, + {104663002, 122402854}, + {104945701, 122854858}, + {105740501, 124038848}, + {106809700, 125479354}, + {107564399, 126380050}, + {108116203, 126975646}, + {123724700, 142516540}, + {124938400, 143705444}, + {127919601, 146599243}, + {128150894, 146821456}, + {128251602, 146917251}, + {128383605, 147041839}, + {128527709, 147176147}, + {128685699, 147321456}, + {128861007, 147481246}, + {132825103, 151046661}, + {133005493, 151205657}, + {133389007, 151488143}, + {133896499, 151858062}, + {134172302, 151991546}, + {134375000, 152063140}, + {135316101, 152300949}, + {136056304, 152220947}, + {136242706, 152186843}, + {136622207, 152016448}, + {136805404, 151908355}, + {147099594, 145766845}, + {147246704, 144900756}, + {147387603, 144048461}, + {144353698, 99345855}, + {144333801, 99232254}, + {144244598, 98812850}, + {144228698, 98757858}, + {144174606, 98616455}, + {133010101, 72396743}, + {132018905, 70280853}, + {130667404, 67536949}, + {129167297, 64854446}, + {128569198, 64098350}, + {124458503, 59135948}, + {124260597, 58946949}, + {123908706, 58658851}, + {123460098, 58327850}, + {122674499, 57840648}, + {122041801, 57712150}, + {121613403, 57699047}, + {121359901, 57749351}, + {121123199, 57826450}, + {120953498, 57882247}, + {120431701, 58198547}, + {120099205, 58599349}, + {119892303, 58903049}, + {102835296, 115179351}, + {102686599, 115817245}, + {102612396, 116540557}, + {102614700, 117684249}, + }, + { + {98163757, 71203430}, + {98212463, 73314544}, + {98326538, 74432693}, + {98402908, 75169799}, + {98524154, 76328353}, + {99088806, 79911361}, + {99304885, 80947769}, + {100106689, 84244186}, + {100358123, 85080337}, + {101715545, 89252807}, + {101969528, 89987213}, + {107989440, 106391418}, + {126299575, 140277343}, + {127061813, 141486663}, + {127405746, 141872253}, + {127846908, 142318450}, + {130818496, 145301574}, + {134366424, 148100921}, + {135308380, 148798828}, + {135745666, 149117523}, + {136033020, 149251800}, + {136500579, 149387725}, + {136662719, 149418395}, + {136973922, 149474822}, + {137184890, 149484375}, + {137623748, 149434356}, + {137830810, 149355072}, + {138681732, 148971343}, + {139374465, 148463409}, + {139589187, 148264312}, + {139809707, 148010711}, + {139985610, 147685028}, + {140196029, 147284973}, + {140355834, 146978668}, + {142079666, 142575622}, + {146702194, 129469726}, + {151285888, 113275238}, + {151543731, 112046264}, + {151701629, 110884704}, + {151837020, 108986206}, + {151837097, 107724029}, + {151760101, 106529205}, + {151581970, 105441925}, + {151577301, 105413757}, + {151495269, 105014709}, + {151393142, 104551513}, + {151058502, 103296112}, + {150705520, 102477264}, + {150137725, 101686370}, + {149427032, 100938537}, + {102979965, 60772064}, + {101930953, 60515609}, + {101276748, 60634414}, + {100717803, 60918136}, + {100125732, 61584625}, + {99618148, 62413436}, + {99457214, 62709442}, + {99368347, 62914794}, + {99166992, 63728332}, + {98313827, 69634780}, + {98176910, 70615707}, + {98162902, 70798233}, + {98163757, 71203430}, + }, + { + {79090698, 116426399}, + {80959800, 137087692}, + {81030303, 137762298}, + {81190704, 138903503}, + {81253700, 139084197}, + {81479301, 139544998}, + {81952003, 140118896}, + {82319900, 140523895}, + {82967803, 140993896}, + {83022903, 141032104}, + {83777900, 141493606}, + {84722099, 141849899}, + {84944396, 141887207}, + {86144699, 141915893}, + {87643997, 141938095}, + {88277503, 141887695}, + {88582099, 141840606}, + {89395401, 141712203}, + {90531204, 141528396}, + {91014801, 141438400}, + {92097595, 141190093}, + {123348297, 132876998}, + {123399505, 132860000}, + {123452804, 132841506}, + {123515502, 132818908}, + {123543800, 132806198}, + {124299598, 132437393}, + {124975502, 132042098}, + {125047500, 131992202}, + {125119506, 131930603}, + {166848800, 86317703}, + {168976409, 83524902}, + {169359603, 82932701}, + {169852600, 81917800}, + {170686904, 79771202}, + {170829406, 79245597}, + {170885498, 78796295}, + {170909301, 78531898}, + {170899703, 78238700}, + {170842803, 77553199}, + {170701293, 76723495}, + {170302307, 75753898}, + {169924301, 75067398}, + {169359802, 74578796}, + {168148605, 73757499}, + {163261596, 71124702}, + {162986007, 70977798}, + {162248703, 70599098}, + {158193405, 68923995}, + {157514297, 68667495}, + {156892700, 68495201}, + {156607299, 68432998}, + {154301895, 68061904}, + {93440299, 68061904}, + {88732002, 68255996}, + {88627304, 68298500}, + {88111396, 68541900}, + {86393898, 69555404}, + {86138298, 69706695}, + {85871704, 69913200}, + {85387199, 70393402}, + {79854499, 76783203}, + {79209701, 77649398}, + {79108505, 78072502}, + {79090698, 78472198}, + {79090698, 116426399}, + }, + { + {90956314, 84639938}, + {91073814, 85141891}, + {91185752, 85505371}, + {109815368, 137196487}, + {110342590, 138349899}, + {110388549, 138447540}, + {110652862, 138971343}, + {110918045, 139341140}, + {114380859, 143159042}, + {114446723, 143220352}, + {114652198, 143392166}, + {114712196, 143437301}, + {114782165, 143476028}, + {114873054, 143514923}, + {115217086, 143660934}, + {115306060, 143695526}, + {115344009, 143707580}, + {115444541, 143737747}, + {115589378, 143779937}, + {115751358, 143823989}, + {115802780, 143825820}, + {116872810, 143753616}, + {116927055, 143744644}, + {154690734, 133504180}, + {155009704, 133371856}, + {155029907, 133360061}, + {155089141, 133323181}, + {155342315, 133163360}, + {155602294, 132941406}, + {155669158, 132880294}, + {155821624, 132737884}, + {155898986, 132656890}, + {155934936, 132608932}, + {155968627, 132562713}, + {156062896, 132431808}, + {156111694, 132363174}, + {156148147, 132297180}, + {158738342, 127281066}, + {159026672, 126378631}, + {159073699, 125806335}, + {159048522, 125299743}, + {159040313, 125192901}, + {158898300, 123934677}, + {149829376, 70241508}, + {149763031, 69910629}, + {149684692, 69628723}, + {149557800, 69206214}, + {149366485, 68864326}, + {149137390, 68578514}, + {148637466, 68048767}, + {147027725, 66632934}, + {146228607, 66257507}, + {146061309, 66184646}, + {146017929, 66174186}, + {145236465, 66269500}, + {144802490, 66345039}, + {144673995, 66376220}, + {93732284, 79649864}, + {93345336, 79785865}, + {93208084, 79840286}, + {92814521, 79997779}, + {92591087, 80098968}, + {92567016, 80110511}, + {92032684, 80860725}, + {91988853, 80930152}, + {91471725, 82210029}, + {91142349, 83076683}, + {90969284, 83653182}, + {90929664, 84043212}, + {90926315, 84325256}, + {90956314, 84639938}, + }, + { + {114758499, 88719909}, + {114771591, 88860549}, + {115515533, 94195907}, + {115559539, 94383651}, + {119882980, 109502059}, + {120660522, 111909683}, + {126147735, 124949630}, + {127127212, 127107215}, + {129976379, 132117279}, + {130754470, 133257080}, + {130820968, 133340835}, + {130889312, 133423858}, + {131094787, 133652832}, + {131257629, 133828247}, + {131678619, 134164276}, + {131791107, 134248901}, + {131969482, 134335189}, + {132054107, 134373718}, + {132927368, 134701141}, + {133077072, 134749313}, + {133196075, 134785705}, + {133345230, 134804351}, + {133498809, 134809051}, + {133611541, 134797607}, + {134621170, 134565322}, + {134741165, 134527511}, + {134892089, 134465240}, + {135071212, 134353820}, + {135252029, 134185821}, + {135384979, 134003631}, + {135615585, 133576675}, + {135793029, 132859008}, + {135890228, 131382904}, + {135880828, 131261657}, + {135837570, 130787963}, + {135380661, 127428909}, + {132830596, 109495368}, + {132815826, 109411666}, + {132765869, 109199302}, + {132724380, 109068161}, + {127490066, 93353515}, + {125330810, 87852828}, + {125248336, 87647026}, + {125002182, 87088424}, + {124894592, 86872482}, + {121007278, 80019584}, + {120962829, 79941261}, + {120886489, 79833923}, + {120154983, 78949615}, + {119366561, 78111709}, + {119014755, 77776794}, + {116728790, 75636238}, + {116660522, 75593933}, + {116428192, 75458541}, + {116355255, 75416870}, + {116264663, 75372528}, + {115952728, 75233367}, + {115865554, 75205482}, + {115756835, 75190956}, + {115564163, 75197830}, + {115481170, 75202087}, + {115417144, 75230400}, + {115226959, 75337806}, + {115203842, 75351448}, + {114722015, 75746932}, + {114672103, 75795661}, + {114594619, 75891891}, + {114565811, 75973831}, + {114478256, 76240814}, + {114178039, 77252197}, + {114137664, 77769668}, + {114109771, 78154464}, + {114758499, 88719909}, + }, + { + {108135070, 109828002}, + {108200347, 110091529}, + {108319419, 110298500}, + {108439025, 110488388}, + {108663574, 110766731}, + {108812957, 110935768}, + {109321914, 111398925}, + {109368087, 111430320}, + {109421295, 111466331}, + {110058998, 111849746}, + {127160308, 120588981}, + {127350692, 120683456}, + {128052749, 120997207}, + {128326919, 121113449}, + {131669586, 122213058}, + {131754745, 122240592}, + {131854583, 122264770}, + {132662048, 122449813}, + {132782669, 122449897}, + {132909118, 122443687}, + {133013442, 122436058}, + {140561035, 121609939}, + {140786346, 121583320}, + {140876144, 121570228}, + {140962356, 121547996}, + {141052612, 121517837}, + {141231292, 121442184}, + {141309371, 121390007}, + {141370132, 121327003}, + {141456008, 121219932}, + {141591598, 121045005}, + {141905761, 120634796}, + {141894607, 120305725}, + {141881881, 120110855}, + {141840881, 119885009}, + {141685043, 119238922}, + {141617416, 118962882}, + {141570434, 118858856}, + {131617462, 100598548}, + {131542846, 100487213}, + {131229385, 100089019}, + {131091476, 99928108}, + {119824127, 90297180}, + {119636337, 90142387}, + {119507492, 90037765}, + {119436744, 89983657}, + {119423942, 89974159}, + {119207366, 89822471}, + {119117149, 89767097}, + {119039489, 89726867}, + {116322929, 88522857}, + {114817031, 87882110}, + {114683975, 87826751}, + {114306411, 87728507}, + {113876434, 87646003}, + {113792106, 87629974}, + {113658988, 87615974}, + {113574333, 87609275}, + {112813575, 87550102}, + {112578567, 87560157}, + {112439880, 87571647}, + {112306922, 87599395}, + {112225082, 87622535}, + {112132568, 87667175}, + {112103477, 87682830}, + {110795242, 88511634}, + {110373565, 88847793}, + {110286537, 88934989}, + {109730873, 89531501}, + {109648735, 89628883}, + {109552581, 89768859}, + {109514228, 89838470}, + {109501640, 89877586}, + {109480964, 89941864}, + {109461761, 90032417}, + {109457778, 90055458}, + {108105194, 109452575}, + {108094238, 109620979}, + {108135070, 109828002}, + }, + { + {108764694, 108910400}, + {108965499, 112306495}, + {109598602, 120388298}, + {110573898, 128289596}, + {110597801, 128427795}, + {113786201, 137983795}, + {113840301, 138134704}, + {113937202, 138326904}, + {114046005, 138520401}, + {114150802, 138696792}, + {114164703, 138717895}, + {114381896, 139021194}, + {114701004, 139425292}, + {114997398, 139747497}, + {115065597, 139805191}, + {115134498, 139850891}, + {115167098, 139871704}, + {115473396, 139992797}, + {115537498, 139995101}, + {116762596, 139832000}, + {116897499, 139808593}, + {118401802, 139225585}, + {118437500, 139209594}, + {118488204, 139182189}, + {118740097, 139033996}, + {118815795, 138967285}, + {134401000, 116395492}, + {134451507, 116309997}, + {135488098, 113593597}, + {137738006, 106775695}, + {140936492, 97033889}, + {140960006, 96948997}, + {141026504, 96660995}, + {141067291, 96467094}, + {141124893, 95771896}, + {141511795, 90171600}, + {141499801, 90026000}, + {141479598, 89907798}, + {141276794, 88844596}, + {141243804, 88707397}, + {140778305, 87031593}, + {140733306, 86871696}, + {140697204, 86789993}, + {140619796, 86708190}, + {140398391, 86487396}, + {125798797, 72806198}, + {125415802, 72454498}, + {123150398, 70566093}, + {123038803, 70503997}, + {122681198, 70305397}, + {121919204, 70104797}, + {121533699, 70008094}, + {121273696, 70004898}, + {121130599, 70020797}, + {121045097, 70033294}, + {120847099, 70082298}, + {120481895, 70278999}, + {120367004, 70379692}, + {120272796, 70475097}, + {119862098, 71004791}, + {119745101, 71167297}, + {119447799, 71726997}, + {119396499, 71825798}, + {119348701, 71944496}, + {109508796, 98298797}, + {109368598, 98700897}, + {109298400, 98926391}, + {108506301, 102750991}, + {108488197, 102879898}, + {108764694, 108910400}, + }, + { + {106666252, 87231246}, + {106673248, 87358055}, + {107734146, 101975646}, + {107762649, 102357955}, + {108702445, 111208351}, + {108749450, 111345153}, + {108848350, 111542648}, + {110270645, 114264358}, + {110389648, 114445144}, + {138794845, 143461151}, + {139048355, 143648956}, + {139376144, 143885345}, + {139594451, 144022644}, + {139754043, 144110046}, + {139923950, 144185852}, + {140058242, 144234451}, + {140185653, 144259552}, + {140427551, 144292648}, + {141130950, 144281448}, + {141157653, 144278152}, + {141214355, 144266555}, + {141347457, 144223449}, + {141625350, 144098953}, + {141755142, 144040145}, + {141878143, 143971557}, + {142011444, 143858154}, + {142076843, 143796356}, + {142160644, 143691055}, + {142224456, 143560852}, + {142925842, 142090850}, + {142935653, 142065353}, + {142995956, 141899154}, + {143042556, 141719757}, + {143102951, 141436157}, + {143129257, 141230453}, + {143316055, 139447250}, + {143342544, 133704650}, + {143307556, 130890960}, + {142461257, 124025558}, + {141916046, 120671051}, + {141890457, 120526153}, + {140002349, 113455749}, + {139909149, 113144149}, + {139853454, 112974456}, + {137303756, 105228057}, + {134700546, 98161254}, + {134617950, 97961547}, + {133823547, 96118057}, + {133688751, 95837356}, + {133481353, 95448059}, + {133205444, 94948150}, + {131178955, 91529853}, + {131144744, 91482055}, + {113942047, 67481246}, + {113837051, 67360549}, + {113048950, 66601745}, + {112305549, 66002746}, + {112030853, 65790351}, + {111970649, 65767547}, + {111912445, 65755249}, + {111854248, 65743453}, + {111657447, 65716354}, + {111576950, 65707351}, + {111509750, 65708549}, + {111443550, 65718551}, + {111397247, 65737449}, + {111338546, 65764648}, + {111129547, 65863349}, + {111112449, 65871551}, + {110995254, 65927856}, + {110968849, 65946151}, + {110941444, 65966751}, + {110836448, 66057853}, + {110490447, 66445449}, + {110404144, 66576751}, + {106802055, 73202148}, + {106741950, 73384948}, + {106715454, 73469650}, + {106678054, 73627151}, + {106657455, 75433448}, + {106666252, 87231246}, + }, + { + {101852752, 106261352}, + {101868949, 106406051}, + {102347549, 108974250}, + {112286750, 152027954}, + {112305648, 152106536}, + {112325752, 152175857}, + {112391448, 152290863}, + {113558250, 154187454}, + {113592048, 154226745}, + {113694351, 154313156}, + {113736549, 154335647}, + {113818145, 154367462}, + {114284454, 154490951}, + {114415847, 154504547}, + {114520751, 154489151}, + {114571350, 154478057}, + {114594551, 154472854}, + {114630546, 154463958}, + {114715148, 154429443}, + {146873657, 136143051}, + {146941741, 136074249}, + {147190155, 135763549}, + {147262649, 135654937}, + {147309951, 135557159}, + {147702255, 133903945}, + {147934143, 131616348}, + {147967041, 131273864}, + {148185852, 127892250}, + {148195648, 127669754}, + {148179656, 126409851}, + {148119552, 126182151}, + {147874053, 125334152}, + {147818954, 125150352}, + {146958557, 122656646}, + {139070251, 101025955}, + {139002655, 100879051}, + {119028450, 63067649}, + {118846649, 62740753}, + {115676048, 57814651}, + {115550453, 57629852}, + {115330352, 57319751}, + {115094749, 56998352}, + {114978347, 56847454}, + {114853050, 56740550}, + {114695053, 56609550}, + {114582252, 56528148}, + {114210449, 56375953}, + {113636245, 56214950}, + {113470352, 56171649}, + {109580749, 55503551}, + {109491645, 55495452}, + {109238754, 55511550}, + {109080352, 55534049}, + {108027748, 55687351}, + {107839950, 55732349}, + {107614456, 55834953}, + {107488143, 55925952}, + {107302551, 56062553}, + {107218353, 56145751}, + {107199447, 56167251}, + {107052749, 56354850}, + {106978652, 56476348}, + {106869644, 56710754}, + {104541351, 62448753}, + {104454551, 62672554}, + {104441253, 62707351}, + {104231750, 63366348}, + {104222648, 63419952}, + {104155746, 63922649}, + {104127349, 64147552}, + {104110847, 64299957}, + {102235450, 92366752}, + {101804351, 102877655}, + {101852752, 106261352}, + }, + { + {106808700, 120885696}, + {106818695, 120923103}, + {106873901, 121057098}, + {115123603, 133614700}, + {115128799, 133619598}, + {115182197, 133661804}, + {115330101, 133740707}, + {115455398, 133799407}, + {115595001, 133836807}, + {115651000, 133851806}, + {116413604, 134055206}, + {116654495, 134097900}, + {116887603, 134075210}, + {117071098, 134040405}, + {117458801, 133904891}, + {118057998, 133572601}, + {118546997, 133261001}, + {118578498, 133239395}, + {118818603, 133011596}, + {121109695, 130501495}, + {122661598, 128760101}, + {142458190, 102765197}, + {142789001, 102099601}, + {143105010, 101386505}, + {143154800, 101239700}, + {143193908, 100825500}, + {143160507, 100282501}, + {143133499, 100083602}, + {143092697, 99880500}, + {143050689, 99766700}, + {142657501, 98974502}, + {142580307, 98855201}, + {122267196, 76269897}, + {122036399, 76105003}, + {121832000, 76028305}, + {121688796, 75983108}, + {121591598, 75955001}, + {121119697, 75902099}, + {120789596, 75953498}, + {120487495, 76041900}, + {120042701, 76365798}, + {119886695, 76507301}, + {119774200, 76635299}, + {119739097, 76686904}, + {119685195, 76798202}, + {119456199, 77320098}, + {106877601, 119561401}, + {106854797, 119645103}, + {106849098, 119668807}, + {106847099, 119699005}, + {106840400, 119801406}, + {106807800, 120719299}, + {106806098, 120862808}, + {106808700, 120885696}, + }, + { + {99663352, 105328948}, + {99690048, 105797050}, + {99714050, 105921447}, + {99867248, 106439949}, + {100111557, 107256546}, + {104924850, 120873649}, + {105106155, 121284049}, + {105519149, 122184753}, + {105586051, 122292655}, + {105665054, 122400154}, + {106064147, 122838455}, + {106755355, 123453453}, + {106929054, 123577651}, + {107230346, 123771949}, + {107760650, 123930648}, + {108875854, 124205154}, + {108978752, 124228050}, + {131962051, 123738754}, + {135636047, 123513954}, + {135837249, 123500747}, + {136357345, 123442749}, + {136577346, 123394454}, + {136686645, 123367752}, + {137399353, 123185050}, + {137733947, 123063156}, + {137895355, 122997154}, + {138275650, 122829154}, + {138394256, 122767753}, + {138516845, 122670150}, + {139987045, 121111251}, + {149171646, 108517349}, + {149274353, 108372848}, + {149314758, 108314247}, + {149428848, 108140846}, + {149648651, 107650550}, + {149779541, 107290252}, + {149833343, 107115249}, + {149891357, 106920051}, + {150246353, 105630249}, + {150285842, 105423454}, + {150320953, 105233749}, + {150336639, 104981552}, + {150298049, 104374053}, + {150287948, 104271850}, + {150026153, 103481147}, + {149945449, 103301651}, + {149888946, 103213455}, + {149800949, 103103851}, + {149781143, 103079650}, + {149714141, 103005447}, + {149589950, 102914146}, + {149206054, 102698951}, + {128843856, 91378150}, + {128641754, 91283050}, + {119699851, 87248046}, + {117503555, 86311950}, + {117145851, 86178054}, + {116323654, 85925048}, + {115982551, 85834045}, + {115853050, 85819252}, + {115222549, 85771949}, + {107169357, 85771949}, + {107122650, 85776451}, + {106637145, 85831550}, + {105095046, 86423950}, + {104507850, 86703750}, + {104384155, 86763153}, + {104332351, 86790145}, + {104198257, 86882644}, + {103913757, 87109451}, + {103592346, 87388450}, + {103272651, 87666748}, + {103198051, 87779052}, + {101698654, 90600952}, + {101523551, 90958450}, + {101360054, 91347450}, + {101295349, 91542144}, + {99774551, 98278152}, + {99746749, 98417755}, + {99704055, 98675453}, + {99663352, 99022949}, + {99663352, 105328948}, + }, + { + {95036499, 101778106}, + {95479103, 102521301}, + {95587295, 102700103}, + {98306503, 106984901}, + {98573303, 107377700}, + {100622406, 110221702}, + {101252304, 111089599}, + {104669502, 115750198}, + {121838500, 131804107}, + {122000503, 131943695}, + {122176803, 132023406}, + {122474105, 132025390}, + {122703804, 132023101}, + {123278808, 131878112}, + {124072998, 131509109}, + {124466506, 131102508}, + {152779296, 101350906}, + {153016510, 101090606}, + {153269699, 100809097}, + {153731994, 100214096}, + {153927902, 99939796}, + {154641098, 98858100}, + {154864303, 98517601}, + {155056594, 97816604}, + {155083511, 97645599}, + {155084899, 97462097}, + {154682601, 94386100}, + {154376007, 92992599}, + {154198593, 92432403}, + {153830505, 91861701}, + {153686904, 91678695}, + {151907104, 90314605}, + {151368896, 89957603}, + {146983306, 87632202}, + {139082397, 84273605}, + {128947692, 80411399}, + {121179000, 78631301}, + {120264701, 78458198}, + {119279510, 78304603}, + {116913101, 77994102}, + {116151504, 77974601}, + {115435104, 78171401}, + {113544105, 78709106}, + {113231002, 78879898}, + {112726303, 79163604}, + {112310501, 79411102}, + {96169998, 97040802}, + {95196304, 98364402}, + {95167800, 98409599}, + {95083503, 98570701}, + {94986999, 99022201}, + {94915100, 100413299}, + {95036499, 101778106}, + }, + { + {82601348, 96004745}, + {83443847, 128861953}, + {84173248, 136147354}, + {104268249, 141388839}, + {104373649, 141395355}, + {105686950, 141389541}, + {149002243, 140435653}, + {159095748, 133388244}, + {159488143, 133112655}, + {159661849, 132894653}, + {163034149, 128290847}, + {164801849, 124684249}, + {167405746, 72553245}, + {167330444, 71960746}, + {167255050, 71791847}, + {167147155, 71572044}, + {166999557, 71341545}, + {166723937, 70961448}, + {166238250, 70611541}, + {165782348, 70359649}, + {165649444, 70286849}, + {165332946, 70122344}, + {165164154, 70062248}, + {164879150, 69967544}, + {164744949, 69928947}, + {164691452, 69915245}, + {164669448, 69910247}, + {159249938, 68738952}, + {158528259, 68704742}, + {147564254, 68604644}, + {116196655, 68982742}, + {115364944, 69005050}, + {115193145, 69013549}, + {101701248, 70984146}, + {93918449, 72233047}, + {93789749, 72285247}, + {93777046, 72292648}, + {93586044, 72444046}, + {93366348, 72662345}, + {93301147, 72745452}, + {93260345, 72816345}, + {83523948, 92593849}, + {83430145, 92810241}, + {82815048, 94665542}, + {82755554, 94858551}, + {82722953, 95014350}, + {82594253, 95682350}, + {82601348, 96004745}, + }, + { + {110371345, 125796493}, + {110411544, 126159599}, + {110445251, 126362899}, + {111201950, 127863800}, + {112030052, 129270492}, + {112367050, 129799301}, + {113088348, 130525604}, + {113418144, 130853698}, + {117363449, 134705505}, + {118131149, 135444793}, + {118307449, 135607299}, + {119102546, 136297195}, + {119385047, 136531906}, + {120080848, 137094390}, + {120794845, 137645401}, + {121150344, 137896392}, + {121528945, 138162506}, + {121644546, 138242095}, + {122142349, 138506408}, + {127540847, 141363006}, + {127933448, 141516204}, + {128728256, 141766799}, + {129877151, 141989898}, + {130626052, 142113891}, + {130912246, 142135192}, + {131246841, 142109100}, + {131496047, 142027404}, + {131596252, 141957794}, + {131696350, 141873504}, + {131741043, 141803405}, + {138788452, 128037704}, + {139628646, 125946197}, + {138319351, 112395401}, + {130035354, 78066703}, + {124174049, 69908798}, + {123970649, 69676895}, + {123874252, 69571899}, + {123246643, 68961303}, + {123193954, 68924400}, + {121952049, 68110000}, + {121787345, 68021896}, + {121661544, 67970306}, + {121313446, 67877502}, + {121010650, 67864799}, + {120995346, 67869705}, + {120583747, 68122207}, + {120509750, 68170600}, + {120485847, 68189102}, + {112160148, 77252403}, + {111128646, 78690704}, + {110969650, 78939407}, + {110512550, 79663406}, + {110397247, 79958206}, + {110371345, 80038299}, + {110371345, 125796493}, + }, + { + {112163948, 137752700}, + {112171150, 137837997}, + {112203048, 137955993}, + {112240150, 138008209}, + {112343246, 138111099}, + {112556243, 138223205}, + {112937149, 138307998}, + {113318748, 138331909}, + {126076446, 138428298}, + {126165245, 138428695}, + {126312446, 138417907}, + {134075546, 136054504}, + {134322753, 135949401}, + {134649948, 135791198}, + {135234954, 135493408}, + {135290145, 135464691}, + {135326248, 135443695}, + {135920043, 135032592}, + {135993850, 134975799}, + {136244247, 134761199}, + {136649444, 134378692}, + {137067153, 133964294}, + {137188156, 133839096}, + {137298049, 133704498}, + {137318954, 133677795}, + {137413543, 133522201}, + {137687347, 133043792}, + {137816055, 132660705}, + {137836044, 131747695}, + {137807144, 131318603}, + {136279342, 119078704}, + {136249053, 118945800}, + {127306152, 81348602}, + {127114852, 81065505}, + {127034248, 80951400}, + {126971649, 80893707}, + {125093551, 79178001}, + {124935745, 79036003}, + {115573745, 71767601}, + {115411148, 71701805}, + {115191947, 71621002}, + {115017051, 71571304}, + {114870147, 71572898}, + {113869552, 71653900}, + {112863349, 72976104}, + {112756347, 73223899}, + {112498947, 73832206}, + {112429351, 73998504}, + {112366050, 74168098}, + {112273246, 74487098}, + {112239250, 74605400}, + {112195549, 74899902}, + {112163948, 75280700}, + {112163948, 137752700}, + }, + { + {78562347, 141451843}, + {79335624, 142828186}, + {79610343, 143188140}, + {79845077, 143445724}, + {81379173, 145126678}, + {81826751, 145577178}, + {82519126, 146209472}, + {83964973, 147280502}, + {85471343, 148377868}, + {86115539, 148760803}, + {88839988, 150281188}, + {89021247, 150382217}, + {90775917, 151320526}, + {91711380, 151767288}, + {92757591, 152134277}, + {93241058, 152201766}, + {113402145, 153091995}, + {122065994, 146802825}, + {164111053, 91685104}, + {164812759, 90470565}, + {165640182, 89037384}, + {171027435, 66211853}, + {171450805, 64406951}, + {171463150, 64349624}, + {171469787, 64317184}, + {171475585, 64282028}, + {171479812, 64253036}, + {171483596, 64210433}, + {171484405, 64153488}, + {171483001, 64140785}, + {171481719, 64132751}, + {171478668, 64115478}, + {171472702, 64092437}, + {171462768, 64075408}, + {171448089, 64061347}, + {171060333, 63854789}, + {169640502, 63197738}, + {169342147, 63086711}, + {166413101, 62215766}, + {151881774, 58826736}, + {146010574, 57613151}, + {141776962, 56908004}, + {140982940, 57030628}, + {139246154, 57540817}, + {139209609, 57566974}, + {127545310, 66015594}, + {127476654, 66104812}, + {105799087, 98784980}, + {85531921, 129338897}, + {79319717, 138704513}, + {78548156, 140188079}, + {78530448, 140530456}, + {78515594, 141299987}, + {78562347, 141451843}, + }, + { + {77755004, 128712387}, + {78073547, 130552612}, + {78433593, 132017822}, + {79752693, 136839645}, + {80479461, 138929260}, + {80903221, 140119674}, + {81789848, 141978454}, + {82447387, 143105575}, + {83288436, 144264328}, + {84593582, 145846542}, + {84971939, 146242813}, + {86905578, 147321304}, + {87874191, 147594131}, + {89249092, 147245132}, + {89541542, 147169052}, + {98759140, 144071609}, + {98894233, 144024261}, + {113607818, 137992843}, + {128324356, 131649307}, + {139610076, 126210189}, + {146999572, 122112884}, + {147119415, 122036041}, + {148717330, 120934616}, + {149114776, 120652725}, + {171640289, 92086624}, + {171677917, 92036224}, + {171721191, 91973869}, + {171851608, 91721557}, + {171927795, 91507644}, + {172398696, 89846351}, + {172436752, 89559959}, + {169361663, 64753852}, + {169349029, 64687164}, + {169115127, 63616458}, + {168965728, 63218254}, + {168911788, 63121219}, + {168901611, 63106807}, + {168896896, 63100486}, + {168890686, 63092460}, + {168876586, 63081058}, + {168855529, 63067909}, + {168808746, 63046024}, + {167251068, 62405864}, + {164291717, 63716899}, + {152661651, 69910156}, + {142312393, 75421356}, + {78778053, 111143295}, + {77887222, 113905914}, + {77591979, 124378433}, + {77563247, 126586669}, + {77755004, 128712387}, + }, + { + {105954101, 131182754}, + {105959197, 131275848}, + {105972801, 131473556}, + {105981498, 131571044}, + {106077903, 132298553}, + {106134094, 132715255}, + {106155700, 132832351}, + {106180099, 132942657}, + {106326797, 133590347}, + {106375099, 133719345}, + {106417602, 133829345}, + {106471000, 133930343}, + {106707901, 134308654}, + {106728401, 134340545}, + {106778198, 134417556}, + {106832397, 134491851}, + {106891296, 134562957}, + {106981300, 134667358}, + {107044204, 134736557}, + {107111000, 134802658}, + {107180999, 134865661}, + {107291099, 134961349}, + {107362998, 135020355}, + {107485397, 135112854}, + {107558998, 135166946}, + {107690399, 135256256}, + {107765098, 135305252}, + {107903594, 135390548}, + {108183898, 135561843}, + {108459503, 135727951}, + {108532501, 135771850}, + {108796096, 135920059}, + {108944099, 135972549}, + {109102401, 136010757}, + {109660598, 136071044}, + {109971595, 136100250}, + {110209594, 136116851}, + {110752799, 136122344}, + {111059906, 136105758}, + {111152900, 136100357}, + {111237197, 136091354}, + {111316101, 136075057}, + {111402000, 136050949}, + {111475296, 136026657}, + {143546600, 123535949}, + {143899002, 122454353}, + {143917404, 122394348}, + {143929199, 122354652}, + {143944793, 122295753}, + {143956207, 122250953}, + {143969497, 122192253}, + {143980102, 122143249}, + {143991302, 122083053}, + {144000396, 122031753}, + {144009796, 121970954}, + {144017303, 121917655}, + {144025405, 121850250}, + {144030609, 121801452}, + {144036804, 121727455}, + {144040008, 121683456}, + {144043502, 121600952}, + {144044708, 121565048}, + {144045700, 121470352}, + {144045898, 121446952}, + {144041503, 121108657}, + {144037506, 121023452}, + {143733795, 118731750}, + {140461395, 95238647}, + {140461105, 95236755}, + {140433807, 95115249}, + {140392608, 95011650}, + {134840805, 84668952}, + {134824996, 84642456}, + {134781494, 84572952}, + {134716796, 84480850}, + {127473899, 74425453}, + {127467002, 74417152}, + {127431701, 74381652}, + {127402603, 74357147}, + {127375503, 74334457}, + {127294906, 74276649}, + {127181900, 74207649}, + {127177597, 74205451}, + {127123901, 74178451}, + {127078903, 74155853}, + {127028999, 74133148}, + {126870803, 74070953}, + {126442901, 73917648}, + {126432403, 73914955}, + {126326004, 73889846}, + {126262405, 73880645}, + {126128097, 73878456}, + {125998199, 73877655}, + {108701095, 74516647}, + {108644599, 74519348}, + {108495201, 74528953}, + {108311302, 74556457}, + {108252799, 74569458}, + {108079002, 74612152}, + {107981399, 74638954}, + {107921295, 74657951}, + {107862197, 74685951}, + {107601303, 74828948}, + {107546997, 74863449}, + {107192794, 75098846}, + {107131202, 75151153}, + {106260002, 76066146}, + {106195098, 76221145}, + {106168502, 76328453}, + {106144699, 76437454}, + {106124496, 76538452}, + {106103698, 76649650}, + {106084197, 76761650}, + {106066299, 76874450}, + {106049903, 76987457}, + {106034797, 77101150}, + {106020904, 77214950}, + {106008201, 77328948}, + {105996902, 77443145}, + {105986099, 77565849}, + {105977005, 77679649}, + {105969299, 77793151}, + {105963096, 77906349}, + {105958297, 78019149}, + {105955299, 78131454}, + {105954101, 78242950}, + {105954101, 131182754}, + }, + { + {91355499, 77889205}, + {114834197, 120804504}, + {114840301, 120815200}, + {124701507, 132324798}, + {124798805, 132436706}, + {124901504, 132548309}, + {125126602, 132788909}, + {125235000, 132901901}, + {125337707, 133005401}, + {125546302, 133184707}, + {125751602, 133358703}, + {126133300, 133673004}, + {126263900, 133775604}, + {126367401, 133855499}, + {126471908, 133935104}, + {126596008, 134027496}, + {127119308, 134397094}, + {127135101, 134408203}, + {127433609, 134614303}, + {127554107, 134695709}, + {128155395, 135070907}, + {128274505, 135141799}, + {129132003, 135573211}, + {129438003, 135713195}, + {129556106, 135767196}, + {131512695, 136648498}, + {132294509, 136966598}, + {132798400, 137158798}, + {133203796, 137294494}, + {133377410, 137350799}, + {133522399, 137396606}, + {133804397, 137480697}, + {134017807, 137542205}, + {134288696, 137618408}, + {134564208, 137680099}, + {134844696, 137740097}, + {135202606, 137807098}, + {135489105, 137849807}, + {135626800, 137864898}, + {135766906, 137878692}, + {135972808, 137895797}, + {136110107, 137905502}, + {136235000, 137913101}, + {136485809, 137907196}, + {139194305, 136979202}, + {140318298, 136536209}, + {140380004, 136505004}, + {140668197, 136340499}, + {140724304, 136298904}, + {140808197, 136228210}, + {140861801, 136180603}, + {140917404, 136129104}, + {140979202, 136045104}, + {141022903, 135984207}, + {147591094, 126486999}, + {147661315, 126356101}, + {147706100, 126261901}, + {147749099, 126166000}, + {147817108, 126007507}, + {147859100, 125908599}, + {153693206, 111901100}, + {153731109, 111807800}, + {153760894, 111698806}, + {158641998, 92419303}, + {158644500, 92263702}, + {158539703, 92013504}, + {158499603, 91918899}, + {158335510, 91626800}, + {158264007, 91516304}, + {158216308, 91449203}, + {158178314, 91397506}, + {158094299, 91283203}, + {157396408, 90368202}, + {157285491, 90224700}, + {157169906, 90079200}, + {157050003, 89931304}, + {156290603, 89006805}, + {156221099, 88922897}, + {156087707, 88771003}, + {155947906, 88620498}, + {155348602, 88004203}, + {155113204, 87772796}, + {154947296, 87609703}, + {154776306, 87448204}, + {154588806, 87284301}, + {153886306, 86716400}, + {153682403, 86560501}, + {152966705, 86032402}, + {152687805, 85828704}, + {152484313, 85683204}, + {152278808, 85539001}, + {150878204, 84561401}, + {150683013, 84426498}, + {150599395, 84372703}, + {150395599, 84243202}, + {149988906, 83989395}, + {149782897, 83864501}, + {149568908, 83739799}, + {148872100, 83365303}, + {148625396, 83242202}, + {128079010, 73079605}, + {127980506, 73031005}, + {126701103, 72407104}, + {126501701, 72312202}, + {126431503, 72280601}, + {126311706, 72230606}, + {126260101, 72210899}, + {126191902, 72187599}, + {126140106, 72170303}, + {126088203, 72155303}, + {126036102, 72142700}, + {125965904, 72126899}, + {125913009, 72116600}, + {125859603, 72108505}, + {125788101, 72100296}, + {125733505, 72094398}, + {125678100, 72090400}, + {125621398, 72088302}, + {125548805, 72087303}, + {125490707, 72086898}, + {125430908, 72088203}, + {125369804, 72091094}, + {125306900, 72095306}, + {125233505, 72100997}, + {125168609, 72106506}, + {125102203, 72113601}, + {125034103, 72122207}, + {124964309, 72132095}, + {124890701, 72143707}, + {124819305, 72155105}, + {91355499, 77889099}, + {91355499, 77889205}, + }, + { + {84531845, 127391708}, + {84916946, 130417510}, + {86133247, 131166900}, + {86338447, 131292892}, + {86748847, 131544799}, + {102193946, 136599502}, + {103090942, 136796798}, + {103247146, 136822509}, + {104083549, 136911499}, + {106119346, 137109802}, + {106265853, 137122207}, + {106480247, 137139205}, + {110257850, 137133605}, + {116917747, 136131408}, + {117054946, 136106704}, + {119043945, 135244293}, + {119249046, 135154708}, + {136220947, 126833007}, + {165896347, 91517105}, + {166032546, 91314697}, + {166055435, 91204902}, + {166056152, 91176803}, + {166047256, 91100006}, + {166039733, 91063705}, + {165814849, 90080802}, + {165736450, 89837707}, + {165677246, 89732101}, + {165676956, 89731803}, + {165560241, 89629302}, + {154419952, 82608505}, + {153822143, 82239700}, + {137942749, 74046104}, + {137095245, 73845504}, + {135751342, 73537704}, + {134225952, 73208602}, + {132484344, 72860801}, + {124730346, 73902000}, + {120736549, 74464401}, + {100401245, 78685401}, + {90574645, 90625701}, + {90475944, 90748809}, + {90430747, 90808700}, + {90321548, 90958305}, + {90254852, 91077903}, + {90165641, 91244003}, + {90134941, 91302398}, + {84474647, 103745697}, + {84328048, 104137901}, + {84288543, 104327606}, + {84038047, 106164604}, + {84013351, 106368698}, + {83943847, 110643203}, + {84531845, 127391708}, + }, }; diff --git a/xs/src/libnest2d/tests/printer_parts.h b/xs/src/libnest2d/tests/printer_parts.h index 3d101810e..41791a189 100644 --- a/xs/src/libnest2d/tests/printer_parts.h +++ b/xs/src/libnest2d/tests/printer_parts.h @@ -2,8 +2,11 @@ #define PRINTER_PARTS_H #include -#include +#include -extern const std::vector PRINTER_PART_POLYGONS; +using TestData = std::vector; + +extern const TestData PRINTER_PART_POLYGONS; +extern const TestData STEGOSAUR_POLYGONS; #endif // PRINTER_PARTS_H diff --git a/xs/src/libnest2d/tests/svgtools.hpp b/xs/src/libnest2d/tests/svgtools.hpp new file mode 100644 index 000000000..5ede726f3 --- /dev/null +++ b/xs/src/libnest2d/tests/svgtools.hpp @@ -0,0 +1,112 @@ +#ifndef SVGTOOLS_HPP +#define SVGTOOLS_HPP + +#include +#include +#include + +#include +#include + +namespace libnest2d { namespace svg { + +class SVGWriter { +public: + + enum OrigoLocation { + TOPLEFT, + BOTTOMLEFT + }; + + struct Config { + OrigoLocation origo_location; + Coord mm_in_coord_units; + double width, height; + Config(): + origo_location(BOTTOMLEFT), mm_in_coord_units(1000000), + width(500), height(500) {} + + }; + +private: + Config conf_; + std::vector svg_layers_; + bool finished_ = false; +public: + + SVGWriter(const Config& conf = Config()): + conf_(conf) {} + + void setSize(const Box& box) { + conf_.height = static_cast(box.height()) / + conf_.mm_in_coord_units; + conf_.width = static_cast(box.width()) / + conf_.mm_in_coord_units; + } + + void writeItem(const Item& item) { + if(svg_layers_.empty()) addLayer(); + Item tsh(item.transformedShape()); + if(conf_.origo_location == BOTTOMLEFT) + for(unsigned i = 0; i < tsh.vertexCount(); i++) { + auto v = tsh.vertex(i); + setY(v, -getY(v) + conf_.height*conf_.mm_in_coord_units); + tsh.setVertex(i, v); + } + currentLayer() += ShapeLike::serialize(tsh.rawShape(), + 1.0/conf_.mm_in_coord_units) + "\n"; + } + + void writePackGroup(const PackGroup& result) { + for(auto r : result) { + addLayer(); + for(Item& sh : r) { + writeItem(sh); + } + finishLayer(); + } + } + + void addLayer() { + svg_layers_.emplace_back(header()); + finished_ = false; + } + + void finishLayer() { + currentLayer() += "\n\n"; + finished_ = true; + } + + void save(const std::string& filepath) { + unsigned lyrc = svg_layers_.size() > 1? 1 : 0; + unsigned last = svg_layers_.size() > 1? svg_layers_.size() : 0; + + for(auto& lyr : svg_layers_) { + std::fstream out(filepath + (lyrc > 0? std::to_string(lyrc) : "") + + ".svg", std::fstream::out); + if(out.is_open()) out << lyr; + if(lyrc == last && !finished_) out << "\n\n"; + out.flush(); out.close(); lyrc++; + }; + } + +private: + + std::string& currentLayer() { return svg_layers_.back(); } + + const std::string header() const { + std::string svg_header = +R"raw( + +)raw"; + return svg_header; + } + +}; + +} +} + +#endif // SVGTOOLS_HPP diff --git a/xs/src/libnest2d/tests/test.cpp b/xs/src/libnest2d/tests/test.cpp index c7fef3246..7ed7aa419 100644 --- a/xs/src/libnest2d/tests/test.cpp +++ b/xs/src/libnest2d/tests/test.cpp @@ -1,5 +1,4 @@ -#include "gtest/gtest.h" -#include "gmock/gmock.h" +#include #include #include @@ -7,6 +6,17 @@ #include #include +std::vector& prusaParts() { + static std::vector ret; + + if(ret.empty()) { + ret.reserve(PRINTER_PART_POLYGONS.size()); + for(auto& inp : PRINTER_PART_POLYGONS) ret.emplace_back(inp); + } + + return ret; +} + TEST(BasicFunctionality, Angles) { @@ -24,6 +34,44 @@ TEST(BasicFunctionality, Angles) ASSERT_TRUE(rad == deg); + Segment seg = {{0, 0}, {12, -10}}; + + ASSERT_TRUE(Degrees(seg.angleToXaxis()) > 270 && + Degrees(seg.angleToXaxis()) < 360); + + seg = {{0, 0}, {12, 10}}; + + ASSERT_TRUE(Degrees(seg.angleToXaxis()) > 0 && + Degrees(seg.angleToXaxis()) < 90); + + seg = {{0, 0}, {-12, 10}}; + + ASSERT_TRUE(Degrees(seg.angleToXaxis()) > 90 && + Degrees(seg.angleToXaxis()) < 180); + + seg = {{0, 0}, {-12, -10}}; + + ASSERT_TRUE(Degrees(seg.angleToXaxis()) > 180 && + Degrees(seg.angleToXaxis()) < 270); + + seg = {{0, 0}, {1, 0}}; + + ASSERT_DOUBLE_EQ(Degrees(seg.angleToXaxis()), 0); + + seg = {{0, 0}, {0, 1}}; + + ASSERT_DOUBLE_EQ(Degrees(seg.angleToXaxis()), 90); + + + seg = {{0, 0}, {-1, 0}}; + + ASSERT_DOUBLE_EQ(Degrees(seg.angleToXaxis()), 180); + + + seg = {{0, 0}, {0, -1}}; + + ASSERT_DOUBLE_EQ(Degrees(seg.angleToXaxis()), 270); + } // Simple test, does not use gmock @@ -33,21 +81,21 @@ TEST(BasicFunctionality, creationAndDestruction) Item sh = { {0, 0}, {1, 0}, {1, 1}, {0, 1} }; - ASSERT_EQ(sh.vertexCount(), 4); + ASSERT_EQ(sh.vertexCount(), 4u); Item sh2 ({ {0, 0}, {1, 0}, {1, 1}, {0, 1} }); - ASSERT_EQ(sh2.vertexCount(), 4); + ASSERT_EQ(sh2.vertexCount(), 4u); // copy Item sh3 = sh2; - ASSERT_EQ(sh3.vertexCount(), 4); + ASSERT_EQ(sh3.vertexCount(), 4u); sh2 = {}; - ASSERT_EQ(sh2.vertexCount(), 0); - ASSERT_EQ(sh3.vertexCount(), 4); + ASSERT_EQ(sh2.vertexCount(), 0u); + ASSERT_EQ(sh3.vertexCount(), 4u); } @@ -70,7 +118,8 @@ TEST(GeometryAlgorithms, Distance) { auto check = [](Coord val, Coord expected) { if(std::is_floating_point::value) - ASSERT_DOUBLE_EQ(static_cast(val), expected); + ASSERT_DOUBLE_EQ(static_cast(val), + static_cast(expected)); else ASSERT_EQ(val, expected); }; @@ -112,6 +161,18 @@ TEST(GeometryAlgorithms, Area) { ASSERT_EQ(rect2.area(), 10000); + Item item = { + {61, 97}, + {70, 151}, + {176, 151}, + {189, 138}, + {189, 59}, + {70, 59}, + {61, 77}, + {61, 97} + }; + + ASSERT_TRUE(ShapeLike::area(item.transformedShape()) > 0 ); } TEST(GeometryAlgorithms, IsPointInsidePolygon) { @@ -240,7 +301,7 @@ TEST(GeometryAlgorithms, ArrangeRectanglesTight) auto groups = arrange(rects.begin(), rects.end()); - ASSERT_EQ(groups.size(), 1); + ASSERT_EQ(groups.size(), 1u); ASSERT_EQ(groups[0].size(), rects.size()); // check for no intersections, no containment: @@ -294,7 +355,7 @@ TEST(GeometryAlgorithms, ArrangeRectanglesLoose) auto groups = arrange(rects.begin(), rects.end()); - ASSERT_EQ(groups.size(), 1); + ASSERT_EQ(groups.size(), 1u); ASSERT_EQ(groups[0].size(), rects.size()); // check for no intersections, no containment: @@ -363,7 +424,7 @@ R"raw( TEST(GeometryAlgorithms, BottomLeftStressTest) { using namespace libnest2d; - auto input = PRINTER_PART_POLYGONS; + auto& input = prusaParts(); Box bin(210, 250); BottomLeftPlacer placer(bin); @@ -399,73 +460,240 @@ TEST(GeometryAlgorithms, BottomLeftStressTest) { } } +namespace { + +struct ItemPair { + Item orbiter; + Item stationary; +}; + +std::vector nfp_testdata = { + { + { + {80, 50}, + {100, 70}, + {120, 50}, + {80, 50} + }, + { + {10, 10}, + {10, 40}, + {40, 40}, + {40, 10}, + {10, 10} + } + }, + { + { + {80, 50}, + {60, 70}, + {80, 90}, + {120, 90}, + {140, 70}, + {120, 50}, + {80, 50} + }, + { + {10, 10}, + {10, 40}, + {40, 40}, + {40, 10}, + {10, 10} + } + }, + { + { + {40, 10}, + {30, 10}, + {20, 20}, + {20, 30}, + {30, 40}, + {40, 40}, + {50, 30}, + {50, 20}, + {40, 10} + }, + { + {80, 0}, + {80, 30}, + {110, 30}, + {110, 0}, + {80, 0} + } + }, + { + { + {117, 107}, + {118, 109}, + {120, 112}, + {122, 113}, + {128, 113}, + {130, 112}, + {132, 109}, + {133, 107}, + {133, 103}, + {132, 101}, + {130, 98}, + {128, 97}, + {122, 97}, + {120, 98}, + {118, 101}, + {117, 103}, + {117, 107} + }, + { + {102, 116}, + {111, 126}, + {114, 126}, + {144, 106}, + {148, 100}, + {148, 85}, + {147, 84}, + {102, 84}, + {102, 116}, + } + }, + { + { + {99, 122}, + {108, 140}, + {110, 142}, + {139, 142}, + {151, 122}, + {151, 102}, + {142, 70}, + {139, 68}, + {111, 68}, + {108, 70}, + {99, 102}, + {99, 122}, + }, + { + {107, 124}, + {128, 125}, + {133, 125}, + {136, 124}, + {140, 121}, + {142, 119}, + {143, 116}, + {143, 109}, + {141, 93}, + {139, 89}, + {136, 86}, + {134, 85}, + {108, 85}, + {107, 86}, + {107, 124}, + } + }, + { + { + {91, 100}, + {94, 144}, + {117, 153}, + {118, 153}, + {159, 112}, + {159, 110}, + {156, 66}, + {133, 57}, + {132, 57}, + {91, 98}, + {91, 100}, + }, + { + {101, 90}, + {103, 98}, + {107, 113}, + {114, 125}, + {115, 126}, + {135, 126}, + {136, 125}, + {144, 114}, + {149, 90}, + {149, 89}, + {148, 87}, + {145, 84}, + {105, 84}, + {102, 87}, + {101, 89}, + {101, 90}, + } + } +}; + +} + TEST(GeometryAlgorithms, nfpConvexConvex) { using namespace libnest2d; - const unsigned long SCALE = 1; + const Coord SCALE = 1000000; Box bin(210*SCALE, 250*SCALE); - Item stationary = { - {120, 114}, - {130, 114}, - {130, 103}, - {128, 96}, - {122, 96}, - {120, 103}, - {120, 114} - }; + int testcase = 0; - Item orbiter = { - {72, 147}, - {94, 151}, - {178, 151}, - {178, 59}, - {72, 59}, - {72, 147} - }; + auto& exportfun = exportSVG<1, Box>; - orbiter.translate({210*SCALE, 0}); + auto onetest = [&](Item& orbiter, Item& stationary){ + testcase++; - auto&& nfp = Nfp::noFitPolygon(stationary.rawShape(), - orbiter.transformedShape()); + orbiter.translate({210*SCALE, 0}); - auto v = ShapeLike::isValid(nfp); + auto&& nfp = Nfp::noFitPolygon(stationary.rawShape(), + orbiter.transformedShape()); - if(!v.first) { - std::cout << v.second << std::endl; - } + auto v = ShapeLike::isValid(nfp); - ASSERT_TRUE(v.first); - - Item infp(nfp); - - int i = 0; - auto rorbiter = orbiter.transformedShape(); - auto vo = *(ShapeLike::begin(rorbiter)); - for(auto v : infp) { - auto dx = getX(v) - getX(vo); - auto dy = getY(v) - getY(vo); - - Item tmp = orbiter; - - tmp.translate({dx, dy}); - - bool notinside = !tmp.isInside(stationary); - bool notintersecting = !Item::intersects(tmp, stationary); - - if(!(notinside && notintersecting)) { - std::vector> inp = { - std::ref(stationary), std::ref(tmp), std::ref(infp) - }; - - exportSVG(inp, bin, i++); + if(!v.first) { + std::cout << v.second << std::endl; } - //ASSERT_TRUE(notintersecting); - ASSERT_TRUE(notinside); + ASSERT_TRUE(v.first); + + Item infp(nfp); + + int i = 0; + auto rorbiter = orbiter.transformedShape(); + auto vo = Nfp::referenceVertex(rorbiter); + + ASSERT_TRUE(stationary.isInside(infp)); + + for(auto v : infp) { + auto dx = getX(v) - getX(vo); + auto dy = getY(v) - getY(vo); + + Item tmp = orbiter; + + tmp.translate({dx, dy}); + + bool notinside = !tmp.isInside(stationary); + bool notintersecting = !Item::intersects(tmp, stationary) || + Item::touches(tmp, stationary); + + if(!(notinside && notintersecting)) { + std::vector> inp = { + std::ref(stationary), std::ref(tmp), std::ref(infp) + }; + + exportfun(inp, bin, testcase*i++); + } + + ASSERT_TRUE(notintersecting); + ASSERT_TRUE(notinside); + } + }; + + for(auto& td : nfp_testdata) { + auto orbiter = td.orbiter; + auto stationary = td.stationary; + onetest(orbiter, stationary); } + for(auto& td : nfp_testdata) { + auto orbiter = td.stationary; + auto stationary = td.orbiter; + onetest(orbiter, stationary); + } } int main(int argc, char **argv) { diff --git a/xs/src/libslic3r/Model.cpp b/xs/src/libslic3r/Model.cpp index e9a385eaf..70a8dc830 100644 --- a/xs/src/libslic3r/Model.cpp +++ b/xs/src/libslic3r/Model.cpp @@ -20,6 +20,8 @@ #include #include +#include + namespace Slic3r { unsigned int Model::s_auto_extruder_id = 1; @@ -378,8 +380,32 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, // Create the arranger config auto min_obj_distance = static_cast(dist/SCALING_FACTOR); + Benchmark bench; + + std::cout << "Creating model siluett..." << std::endl; + + bench.start(); // Get the 2D projected shapes with their 3D model instance pointers auto shapemap = arr::projectModelFromTop(model); + bench.stop(); + + std::cout << "Model siluett created in " << bench.getElapsedSec() + << " seconds. " << "Min object distance = " << min_obj_distance << std::endl; + +// std::cout << "{" << std::endl; +// std::for_each(shapemap.begin(), shapemap.end(), +// [] (ShapeData2D::value_type& it) +// { +// std::cout << "\t{" << std::endl; +// Item& item = it.second; +// for(auto& v : item) { +// std::cout << "\t\t" << "{" << getX(v) +// << ", " << getY(v) << "},\n"; +// } +// std::cout << "\t}," << std::endl; +// }); +// std::cout << "}" << std::endl; +// return true; double area = 0; double area_max = 0; @@ -427,15 +453,23 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, // Will use the DJD selection heuristic with the BottomLeft placement // strategy - using Arranger = Arranger; + using Arranger = Arranger; - Arranger arranger(bin, min_obj_distance); + Arranger::PlacementConfig pcfg; + pcfg.alignment = Arranger::PlacementConfig::Alignment::BOTTOM_LEFT; + Arranger arranger(bin, min_obj_distance, pcfg); + std::cout << "Arranging model..." << std::endl; + bench.start(); // Arrange and return the items with their respective indices within the // input sequence. ArrangeResult result = arranger.arrangeIndexed(shapes.begin(), shapes.end()); + bench.stop(); + std::cout << "Model arranged in " << bench.getElapsedSec() + << " seconds." << std::endl; + auto applyResult = [&shapemap](ArrangeResult::value_type& group, Coord batch_offset) @@ -464,6 +498,8 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, } }; + std::cout << "Applying result..." << std::endl; + bench.start(); if(first_bin_only) { applyResult(result.front(), 0); } else { @@ -477,6 +513,9 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, batch_offset += static_cast(2*bin.width()*SCALING_FACTOR); } } + bench.stop(); + std::cout << "Result applied in " << bench.getElapsedSec() + << " seconds." << std::endl; for(auto objptr : model.objects) objptr->invalidate_bounding_box(); @@ -490,7 +529,7 @@ bool Model::arrange_objects(coordf_t dist, const BoundingBoxf* bb) { bool ret = false; if(bb != nullptr && bb->defined) { - const bool FIRST_BIN_ONLY = true; + const bool FIRST_BIN_ONLY = false; ret = arr::arrange(*this, dist, bb, FIRST_BIN_ONLY); } else { // get the (transformed) size of each instance so that we take From 4830593cacbe5d81ee499eda9581d616df5f0898 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Tue, 5 Jun 2018 12:50:34 +0200 Subject: [PATCH 020/198] Started to work on the 'wipe into dedicated object feature' --- xs/src/libslic3r/GCode.cpp | 40 ++++++++++++++++++++++++++++++++------ xs/src/libslic3r/GCode.hpp | 3 ++- xs/src/libslic3r/Print.cpp | 20 ++++++++++++++++++- 3 files changed, 55 insertions(+), 8 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 7d4ecf0b4..28a8d2e52 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1224,7 +1224,7 @@ void GCode::process_layer( if (layerm == nullptr) continue; const PrintRegion ®ion = *print.regions[region_id]; - + // process perimeters for (const ExtrusionEntity *ee : layerm->perimeters.entities) { // perimeter_coll represents perimeter extrusions of a single island. @@ -1246,6 +1246,17 @@ void GCode::process_layer( if (islands[i].by_region.empty()) islands[i].by_region.assign(print.regions.size(), ObjectByExtruder::Island::Region()); islands[i].by_region[region_id].perimeters.append(perimeter_coll->entities); + + // We just added perimeter_coll->entities.size() entities, if they are not to be printed before the main object (during infill wiping), + // we will note their indices (for each copy separately): + unsigned int last_added_entity_index = islands[i].by_region[region_id].perimeters.entities.size()-1; + for (unsigned copy_id = 0; copy_id < layer_to_print.object()->_shifted_copies.size(); ++copy_id) { + if (islands[i].by_region[region_id].perimeters_per_copy_ids.size() < copy_id + 1) // if this copy isn't in the list yet + islands[i].by_region[region_id].perimeters_per_copy_ids.push_back(std::vector()); + if (!perimeter_coll->is_extruder_overridden(copy_id)) + for (int j=0; jentities.size(); ++j) + islands[i].by_region[region_id].perimeters_per_copy_ids[copy_id].push_back(last_added_entity_index - j); + } break; } } @@ -1362,14 +1373,29 @@ void GCode::process_layer( overridden.push_back(new_region); for (ExtrusionEntity *ee : (*layer_to_print.object_layer).regions[region_id]->fills.entities) { auto *fill = dynamic_cast(ee); - if (fill->get_extruder_override(copy_id) == extruder_id) + if (fill->get_extruder_override(copy_id) == (unsigned int)extruder_id) overridden.back().infills.append(*fill); } + for (ExtrusionEntity *ee : (*layer_to_print.object_layer).regions[region_id]->perimeters.entities) { + auto *fill = dynamic_cast(ee); + if (fill->get_extruder_override(copy_id) == (unsigned int)extruder_id) + overridden.back().perimeters.append((*fill).entities); + } } Point copy = (layer_to_print.object_layer)->object()->_shifted_copies[copy_id]; this->set_origin(unscale(copy.x), unscale(copy.y)); - gcode += this->extrude_infill(print, overridden); + + + std::unique_ptr u; + if (print.config.infill_first) { + gcode += this->extrude_infill(print, overridden); + gcode += this->extrude_perimeters(print, overridden, u); + } + else { + gcode += this->extrude_perimeters(print, overridden, u); + gcode += this->extrude_infill(print, overridden); + } } } } @@ -1417,9 +1443,9 @@ void GCode::process_layer( for (const ObjectByExtruder::Island &island : object_by_extruder.islands) { if (print.config.infill_first) { gcode += this->extrude_infill(print, island.by_region_per_copy(copy_id)); - gcode += this->extrude_perimeters(print, island.by_region, lower_layer_edge_grids[layer_id]); + gcode += this->extrude_perimeters(print, island.by_region_per_copy(copy_id), lower_layer_edge_grids[layer_id]); } else { - gcode += this->extrude_perimeters(print, island.by_region, lower_layer_edge_grids[layer_id]); + gcode += this->extrude_perimeters(print, island.by_region_per_copy(copy_id), lower_layer_edge_grids[layer_id]); gcode += this->extrude_infill(print, island.by_region_per_copy(copy_id)); } } @@ -2492,11 +2518,13 @@ std::vector GCode::ObjectByExtruder::Is std::vector out; for (auto& reg : by_region) { out.push_back(ObjectByExtruder::Island::Region()); - out.back().perimeters.append(reg.perimeters); // we will print all perimeters there are + //out.back().perimeters.append(reg.perimeters); // we will print all perimeters there are if (!reg.infills_per_copy_ids.empty()) { for (unsigned int i=0; i> infills_per_copy_ids; // indices of infill.entities that are not part of infill wiping (an element for each object copy) + std::vector> infills_per_copy_ids; // indices of infill.entities that are not part of infill wiping (an element for each object copy) + std::vector> perimeters_per_copy_ids; // indices of infill.entities that are not part of infill wiping (an element for each object copy) }; std::vector by_region; std::vector by_region_per_copy(unsigned int copy) const; // returns only extrusions that are NOT printed during wiping into infill for this copy diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index e5a4f5dc7..4b52e2507 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -1209,11 +1209,29 @@ float Print::mark_wiping_infill(const ToolOrdering::LayerTools& layer_tools, uns if (unused_yet) continue; } + + //if (object.wipe_into_perimeters) + { + ExtrusionEntityCollection& eec = this_layer->regions[region_id]->perimeters; + for (ExtrusionEntity* ee : eec.entities) { // iterate through all perimeter Collections + auto* fill = dynamic_cast(ee); + if (volume_to_wipe <= 0.f) + break; + if (!fill->is_extruder_overridden(copy) && fill->total_volume() > min_infill_volume) { + fill->set_extruder_override(copy, new_extruder); + volume_to_wipe -= fill->total_volume(); + } + } + } + + ExtrusionEntityCollection& eec = this_layer->regions[region_id]->fills; for (ExtrusionEntity* ee : eec.entities) { // iterate through all infill Collections auto* fill = dynamic_cast(ee); if (fill->role() == erTopSolidInfill || fill->role() == erGapFill) continue; // these cannot be changed - it is / may be visible - if (volume_to_wipe > 0.f && !fill->is_extruder_overridden(copy) && fill->total_volume() > min_infill_volume) { // this infill will be used to wipe this extruder + if (volume_to_wipe <= 0.f) + break; + if (!fill->is_extruder_overridden(copy) && fill->total_volume() > min_infill_volume) { // this infill will be used to wipe this extruder fill->set_extruder_override(copy, new_extruder); volume_to_wipe -= fill->total_volume(); } From 4009fdcc1850ce8db5090f401db40a079fe81946 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Wed, 6 Jun 2018 11:00:36 +0200 Subject: [PATCH 021/198] Finalized format for gcode line containing remaining printing time --- xs/src/libslic3r/GCodeTimeEstimator.cpp | 49 ++++++++++--------------- xs/src/libslic3r/GCodeTimeEstimator.hpp | 6 +++ 2 files changed, 25 insertions(+), 30 deletions(-) diff --git a/xs/src/libslic3r/GCodeTimeEstimator.cpp b/xs/src/libslic3r/GCodeTimeEstimator.cpp index 553ddba08..ad82c6820 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.cpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.cpp @@ -37,15 +37,7 @@ static const float PREVIOUS_FEEDRATE_THRESHOLD = 0.0001f; static const std::string ELAPSED_TIME_TAG_DEFAULT = ";_ELAPSED_TIME_DEFAULT: "; static const std::string ELAPSED_TIME_TAG_SILENT = ";_ELAPSED_TIME_SILENT: "; -#define REMAINING_TIME_USE_SINGLE_GCODE_COMMAND 1 -#if REMAINING_TIME_USE_SINGLE_GCODE_COMMAND -static const std::string REMAINING_TIME_CMD = "M998"; -#else -static const std::string REMAINING_TIME_CMD_DEFAULT = "M998"; -static const std::string REMAINING_TIME_CMD_SILENT = "M999"; -#endif // REMAINING_TIME_USE_SINGLE_GCODE_COMMAND - -static const std::string REMAINING_TIME_COMMENT = " ; estimated remaining time"; +static const std::string REMAINING_TIME_CMD = "M73"; #if ENABLE_MOVE_STATS static const std::string MOVE_TYPE_STR[Slic3r::GCodeTimeEstimator::Block::Num_Types] = @@ -307,12 +299,14 @@ namespace Slic3r { throw std::runtime_error(std::string("Remaining times estimation failed.\nError while reading from file.\n")); } -#if REMAINING_TIME_USE_SINGLE_GCODE_COMMAND // this function expects elapsed time for default and silent mode to be into two consecutive lines inside the gcode if (boost::contains(line, ELAPSED_TIME_TAG_DEFAULT)) { std::string default_elapsed_time_str = line.substr(ELAPSED_TIME_TAG_DEFAULT.length()); - line = REMAINING_TIME_CMD + " D:" + _get_time_dhms(default_time - (float)atof(default_elapsed_time_str.c_str())); + float elapsed_time = (float)atof(default_elapsed_time_str.c_str()); + float remaining_time = default_time - elapsed_time; + line = REMAINING_TIME_CMD + " P" + std::to_string((int)(100.0f * elapsed_time / default_time)); + line += " R" + _get_time_minutes(remaining_time); std::string next_line; std::getline(in, next_line); @@ -325,7 +319,10 @@ namespace Slic3r { if (boost::contains(next_line, ELAPSED_TIME_TAG_SILENT)) { std::string silent_elapsed_time_str = next_line.substr(ELAPSED_TIME_TAG_SILENT.length()); - line += " S:" + _get_time_dhms(silent_time - (float)atof(silent_elapsed_time_str.c_str())) + REMAINING_TIME_COMMENT; + float elapsed_time = (float)atof(silent_elapsed_time_str.c_str()); + float remaining_time = silent_time - elapsed_time; + line += " Q" + std::to_string((int)(100.0f * elapsed_time / silent_time)); + line += " S" + _get_time_minutes(remaining_time); } else // found horphaned default elapsed time, skip the remaining time line output @@ -334,24 +331,6 @@ namespace Slic3r { else if (boost::contains(line, ELAPSED_TIME_TAG_SILENT)) // found horphaned silent elapsed time, skip the remaining time line output continue; -#else - bool processed = false; - if (boost::contains(line, ELAPSED_TIME_TAG_DEFAULT)) - { - std::string elapsed_time_str = line.substr(ELAPSED_TIME_TAG_DEFAULT.length()); - line = REMAINING_TIME_CMD_DEFAULT + " " + _get_time_dhms(default_time - (float)atof(elapsed_time_str.c_str())); - processed = true; - } - else if (boost::contains(line, ELAPSED_TIME_TAG_SILENT)) - { - std::string elapsed_time_str = line.substr(ELAPSED_TIME_TAG_SILENT.length()); - line = REMAINING_TIME_CMD_SILENT + " " + _get_time_dhms(silent_time - (float)atof(elapsed_time_str.c_str())); - processed = true; - } - - if (processed) - line += REMAINING_TIME_COMMENT; -#endif // REMAINING_TIME_USE_SINGLE_GCODE_COMMAND line += "\n"; fwrite((const void*)line.c_str(), 1, line.length(), out); @@ -573,6 +552,11 @@ namespace Slic3r { return _get_time_dhms(get_time()); } + std::string GCodeTimeEstimator::get_time_minutes() const + { + return _get_time_minutes(get_time()); + } + void GCodeTimeEstimator::_reset() { _curr.reset(); @@ -1339,6 +1323,11 @@ namespace Slic3r { return buffer; } + std::string GCodeTimeEstimator::_get_time_minutes(float time_in_secs) + { + return std::to_string((int)(::roundf(time_in_secs / 60.0f))); + } + #if ENABLE_MOVE_STATS void GCodeTimeEstimator::_log_moves_stats() const { diff --git a/xs/src/libslic3r/GCodeTimeEstimator.hpp b/xs/src/libslic3r/GCodeTimeEstimator.hpp index c3fe0f04c..14ff1efea 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.hpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.hpp @@ -297,6 +297,9 @@ namespace Slic3r { // Returns the estimated time, in format DDd HHh MMm SSs std::string get_time_dhms() const; + // Returns the estimated time, in minutes (integer) + std::string get_time_minutes() const; + private: void _reset(); void _reset_time(); @@ -381,6 +384,9 @@ namespace Slic3r { // Returns the given time is seconds in format DDd HHh MMm SSs static std::string _get_time_dhms(float time_in_secs); + // Returns the given, in minutes (integer) + static std::string _get_time_minutes(float time_in_secs); + #if ENABLE_MOVE_STATS void _log_moves_stats() const; #endif // ENABLE_MOVE_STATS From 71d750c1b86f1759a44e9bb4525fff41a259f13a Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Wed, 6 Jun 2018 12:21:24 +0200 Subject: [PATCH 022/198] Remaining time gcode line exported only for Marlin firmware --- xs/src/libslic3r/GCode.cpp | 42 ++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 28c15e2fd..c3af90232 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -375,7 +375,8 @@ void GCode::do_export(Print *print, const char *path, GCodePreviewData *preview_ } fclose(file); - GCodeTimeEstimator::post_process_elapsed_times(path_tmp, m_default_time_estimator.get_time(), m_silent_time_estimator.get_time()); + if (m_default_time_estimator.get_dialect() == gcfMarlin) + GCodeTimeEstimator::post_process_elapsed_times(path_tmp, m_default_time_estimator.get_time(), m_silent_time_estimator.get_time()); if (! this->m_placeholder_parser_failed_templates.empty()) { // G-code export proceeded, but some of the PlaceholderParser substitutions failed. @@ -409,8 +410,11 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) // resets time estimators m_default_time_estimator.reset(); m_default_time_estimator.set_dialect(print.config.gcode_flavor); - m_silent_time_estimator.reset(); - m_silent_time_estimator.set_dialect(print.config.gcode_flavor); + if (print.config.gcode_flavor == gcfMarlin) + { + m_silent_time_estimator.reset(); + m_silent_time_estimator.set_dialect(print.config.gcode_flavor); + } // resets analyzer m_analyzer.reset(); @@ -602,8 +606,11 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) } // before start gcode time estimation - _write(file, m_default_time_estimator.get_elapsed_time_string().c_str()); - _write(file, m_silent_time_estimator.get_elapsed_time_string().c_str()); + if (m_default_time_estimator.get_dialect() == gcfMarlin) + { + _write(file, m_default_time_estimator.get_elapsed_time_string().c_str()); + _write(file, m_silent_time_estimator.get_elapsed_time_string().c_str()); + } // Write the custom start G-code _writeln(file, start_gcode); @@ -810,8 +817,11 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) _writeln(file, this->placeholder_parser_process("end_filament_gcode", end_gcode, (unsigned int)(&end_gcode - &print.config.end_filament_gcode.values.front()), &config)); } // before end gcode time estimation - _write(file, m_default_time_estimator.get_elapsed_time_string().c_str()); - _write(file, m_silent_time_estimator.get_elapsed_time_string().c_str()); + if (m_default_time_estimator.get_dialect() == gcfMarlin) + { + _write(file, m_default_time_estimator.get_elapsed_time_string().c_str()); + _write(file, m_silent_time_estimator.get_elapsed_time_string().c_str()); + } _writeln(file, this->placeholder_parser_process("end_gcode", print.config.end_gcode, m_writer.extruder()->id(), &config)); } _write(file, m_writer.update_progress(m_layer_count, m_layer_count, true)); // 100% @@ -819,7 +829,8 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) // calculates estimated printing time m_default_time_estimator.calculate_time(); - m_silent_time_estimator.calculate_time(); + if (m_default_time_estimator.get_dialect() == gcfMarlin) + m_silent_time_estimator.calculate_time(); // Get filament stats. print.filament_stats.clear(); @@ -828,7 +839,7 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) print.total_weight = 0.; print.total_cost = 0.; print.estimated_default_print_time = m_default_time_estimator.get_time_dhms(); - print.estimated_silent_print_time = m_silent_time_estimator.get_time_dhms(); + print.estimated_silent_print_time = (m_default_time_estimator.get_dialect() == gcfMarlin) ? m_silent_time_estimator.get_time_dhms() : "N/A"; for (const Extruder &extruder : m_writer.extruders()) { double used_filament = extruder.used_filament(); double extruded_volume = extruder.extruded_volume(); @@ -849,7 +860,8 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) } _write_format(file, "; total filament cost = %.1lf\n", print.total_cost); _write_format(file, "; estimated printing time (default mode) = %s\n", m_default_time_estimator.get_time_dhms().c_str()); - _write_format(file, "; estimated printing time (silent mode) = %s\n", m_silent_time_estimator.get_time_dhms().c_str()); + if (m_default_time_estimator.get_dialect() == gcfMarlin) + _write_format(file, "; estimated printing time (silent mode) = %s\n", m_silent_time_estimator.get_time_dhms().c_str()); // Append full config. _write(file, "\n"); @@ -1418,8 +1430,11 @@ void GCode::process_layer( _write(file, gcode); // after layer time estimation - _write(file, m_default_time_estimator.get_elapsed_time_string().c_str()); - _write(file, m_silent_time_estimator.get_elapsed_time_string().c_str()); + if (m_default_time_estimator.get_dialect() == gcfMarlin) + { + _write(file, m_default_time_estimator.get_elapsed_time_string().c_str()); + _write(file, m_silent_time_estimator.get_elapsed_time_string().c_str()); + } } void GCode::apply_print_config(const PrintConfig &print_config) @@ -2079,7 +2094,8 @@ void GCode::_write(FILE* file, const char *what) fwrite(gcode, 1, ::strlen(gcode), file); // updates time estimator and gcode lines vector m_default_time_estimator.add_gcode_block(gcode); - m_silent_time_estimator.add_gcode_block(gcode); + if (m_default_time_estimator.get_dialect() == gcfMarlin) + m_silent_time_estimator.add_gcode_block(gcode); } } From 73452fd79db41286e6c04658edf6b0e15ce8f008 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Wed, 6 Jun 2018 18:24:42 +0200 Subject: [PATCH 023/198] More progress on 'wipe into dedicated object' feature (e.g. new value in object settings) --- xs/src/libslic3r/GCode.cpp | 27 +++++++++++++++++---------- xs/src/libslic3r/GCode.hpp | 8 ++++++-- xs/src/libslic3r/Print.cpp | 27 +++++++++++++-------------- xs/src/libslic3r/PrintConfig.cpp | 10 ++++++++++ xs/src/libslic3r/PrintConfig.hpp | 6 ++++-- xs/src/slic3r/GUI/Preset.cpp | 2 +- xs/src/slic3r/GUI/Tab.cpp | 1 + 7 files changed, 52 insertions(+), 29 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 28a8d2e52..92898c820 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1407,7 +1407,7 @@ void GCode::process_layer( auto objects_by_extruder_it = by_extruder.find(extruder_id); if (objects_by_extruder_it == by_extruder.end()) continue; - for (const ObjectByExtruder &object_by_extruder : objects_by_extruder_it->second) { + for (ObjectByExtruder &object_by_extruder : objects_by_extruder_it->second) { const size_t layer_id = &object_by_extruder - objects_by_extruder_it->second.data(); const PrintObject *print_object = layers[layer_id].object(); if (print_object == nullptr) @@ -1440,7 +1440,7 @@ void GCode::process_layer( object_by_extruder.support->chained_path_from(m_last_pos, false, object_by_extruder.support_extrusion_role)); m_layer = layers[layer_id].layer(); } - for (const ObjectByExtruder::Island &island : object_by_extruder.islands) { + for (ObjectByExtruder::Island &island : object_by_extruder.islands) { if (print.config.infill_first) { gcode += this->extrude_infill(print, island.by_region_per_copy(copy_id)); gcode += this->extrude_perimeters(print, island.by_region_per_copy(copy_id), lower_layer_edge_grids[layer_id]); @@ -2511,23 +2511,30 @@ Point GCode::gcode_to_point(const Pointf &point) const } -// Goes through by_region std::vector and returns only a subvector of entities to be printed in usual time +// Goes through by_region std::vector and returns ref a subvector of entities to be printed in usual time // i.e. not when it's going to be done during infill wiping -std::vector GCode::ObjectByExtruder::Island::by_region_per_copy(unsigned int copy) const +const std::vector& GCode::ObjectByExtruder::Island::by_region_per_copy(unsigned int copy) { - std::vector out; - for (auto& reg : by_region) { - out.push_back(ObjectByExtruder::Island::Region()); + if (copy == last_copy) + return by_region_per_copy_cache; + else { + by_region_per_copy_cache.clear(); + last_copy = copy; + } + + //std::vector out; + for (const auto& reg : by_region) { + by_region_per_copy_cache.push_back(ObjectByExtruder::Island::Region()); //out.back().perimeters.append(reg.perimeters); // we will print all perimeters there are if (!reg.infills_per_copy_ids.empty()) { for (unsigned int i=0; i> infills_per_copy_ids; // indices of infill.entities that are not part of infill wiping (an element for each object copy) std::vector> perimeters_per_copy_ids; // indices of infill.entities that are not part of infill wiping (an element for each object copy) }; - std::vector by_region; - std::vector by_region_per_copy(unsigned int copy) const; // returns only extrusions that are NOT printed during wiping into infill for this copy + std::vector by_region; // all extrusions for this island, grouped by regions + const std::vector& by_region_per_copy(unsigned int copy); // returns reference to subvector of by_region (only extrusions that are NOT printed during wiping into infill for this copy) + + private: + std::vector by_region_per_copy_cache; // caches vector generated by function above to avoid copying and recalculating + unsigned int last_copy = (unsigned int)(-1); // index of last copy that by_region_per_copy was called for }; std::vector islands; }; diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index 4b52e2507..940bdc2a2 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -1210,7 +1210,19 @@ float Print::mark_wiping_infill(const ToolOrdering::LayerTools& layer_tools, uns continue; } - //if (object.wipe_into_perimeters) + ExtrusionEntityCollection& eec = this_layer->regions[region_id]->fills; + for (ExtrusionEntity* ee : eec.entities) { // iterate through all infill Collections + auto* fill = dynamic_cast(ee); + if (fill->role() == erTopSolidInfill || fill->role() == erGapFill) continue; // these cannot be changed - it is / may be visible + if (volume_to_wipe <= 0.f) + break; + if (!fill->is_extruder_overridden(copy) && fill->total_volume() > min_infill_volume) { // this infill will be used to wipe this extruder + fill->set_extruder_override(copy, new_extruder); + volume_to_wipe -= fill->total_volume(); + } + } + + if (objects[i]->config.wipe_into_objects) { ExtrusionEntityCollection& eec = this_layer->regions[region_id]->perimeters; for (ExtrusionEntity* ee : eec.entities) { // iterate through all perimeter Collections @@ -1223,19 +1235,6 @@ float Print::mark_wiping_infill(const ToolOrdering::LayerTools& layer_tools, uns } } } - - - ExtrusionEntityCollection& eec = this_layer->regions[region_id]->fills; - for (ExtrusionEntity* ee : eec.entities) { // iterate through all infill Collections - auto* fill = dynamic_cast(ee); - if (fill->role() == erTopSolidInfill || fill->role() == erGapFill) continue; // these cannot be changed - it is / may be visible - if (volume_to_wipe <= 0.f) - break; - if (!fill->is_extruder_overridden(copy) && fill->total_volume() > min_infill_volume) { // this infill will be used to wipe this extruder - fill->set_extruder_override(copy, new_extruder); - volume_to_wipe -= fill->total_volume(); - } - } } } } diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index bf9421f9d..98b111a4d 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -1893,6 +1893,16 @@ PrintConfigDef::PrintConfigDef() def->cli = "wipe-into-infill!"; def->default_value = new ConfigOptionBool(true); + def = this->add("wipe_into_objects", coBool); + def->category = L("Extruders"); + def->label = L("Wiping into objects"); + def->tooltip = L("Objects will be used to wipe the nozzle after a toolchange to save material " + "that would otherwise end up in the wipe tower and decrease print time. " + "Colours of the objects will be mixed as a result. (This setting is usually " + "used on per-object basis.)"); + def->cli = "wipe-into-objects!"; + def->default_value = new ConfigOptionBool(false); + def = this->add("wipe_tower_bridging", coFloat); def->label = L("Maximal bridging distance"); def->tooltip = L("Maximal distance between supports on sparse infill sections. "); diff --git a/xs/src/libslic3r/PrintConfig.hpp b/xs/src/libslic3r/PrintConfig.hpp index 1b73c31b3..f638a7674 100644 --- a/xs/src/libslic3r/PrintConfig.hpp +++ b/xs/src/libslic3r/PrintConfig.hpp @@ -336,7 +336,8 @@ public: ConfigOptionBool support_material_with_sheath; ConfigOptionFloatOrPercent support_material_xy_spacing; ConfigOptionFloat xy_size_compensation; - + ConfigOptionBool wipe_into_objects; + protected: void initialize(StaticCacheBase &cache, const char *base_ptr) { @@ -372,6 +373,7 @@ protected: OPT_PTR(support_material_threshold); OPT_PTR(support_material_with_sheath); OPT_PTR(xy_size_compensation); + OPT_PTR(wipe_into_objects); } }; @@ -414,7 +416,7 @@ public: ConfigOptionFloatOrPercent top_infill_extrusion_width; ConfigOptionInt top_solid_layers; ConfigOptionFloatOrPercent top_solid_infill_speed; - + protected: void initialize(StaticCacheBase &cache, const char *base_ptr) { diff --git a/xs/src/slic3r/GUI/Preset.cpp b/xs/src/slic3r/GUI/Preset.cpp index e483381ac..84f685533 100644 --- a/xs/src/slic3r/GUI/Preset.cpp +++ b/xs/src/slic3r/GUI/Preset.cpp @@ -298,7 +298,7 @@ const std::vector& Preset::print_options() "perimeter_extrusion_width", "external_perimeter_extrusion_width", "infill_extrusion_width", "solid_infill_extrusion_width", "top_infill_extrusion_width", "support_material_extrusion_width", "infill_overlap", "bridge_flow_ratio", "clip_multipart_objects", "elefant_foot_compensation", "xy_size_compensation", "threads", "resolution", "wipe_tower", "wipe_tower_x", "wipe_tower_y", - "wipe_tower_width", "wipe_tower_rotation_angle", "wipe_tower_bridging", "wipe_into_infill", "compatible_printers", + "wipe_tower_width", "wipe_tower_rotation_angle", "wipe_tower_bridging", "wipe_into_infill", "wipe_into_objects", "compatible_printers", "compatible_printers_condition","inherits" }; return s_opts; diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index c94307aa4..4974e9377 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -946,6 +946,7 @@ void TabPrint::build() optgroup->append_single_option_line("wipe_tower_rotation_angle"); optgroup->append_single_option_line("wipe_tower_bridging"); optgroup->append_single_option_line("wipe_into_infill"); + optgroup->append_single_option_line("wipe_into_objects"); optgroup = page->new_optgroup(_(L("Advanced"))); optgroup->append_single_option_line("interface_shells"); From b6455b66bd7894b8d575ba91524aa93dc306888d Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Thu, 7 Jun 2018 16:19:57 +0200 Subject: [PATCH 024/198] Wiping into infill/objects - invalidation of the wipe tower, bugfixes --- xs/src/libslic3r/GCode.cpp | 11 ++++--- xs/src/libslic3r/Print.cpp | 56 +++++++++++++++++++++++--------- xs/src/libslic3r/Print.hpp | 5 ++- xs/src/libslic3r/PrintConfig.cpp | 1 + xs/src/libslic3r/PrintConfig.hpp | 4 +-- xs/src/libslic3r/PrintObject.cpp | 7 +++- 6 files changed, 60 insertions(+), 24 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 92898c820..ce63a374c 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1357,7 +1357,7 @@ void GCode::process_layer( m_avoid_crossing_perimeters.disable_once = true; } - if (print.config.wipe_into_infill.value) { + { gcode += "; INFILL WIPING STARTS\n"; if (extruder_id != layer_tools.extruders.front()) { // if this is the first extruder on this layer, there was no toolchange for (const auto& layer_to_print : layers) { // iterate through all objects @@ -1373,12 +1373,12 @@ void GCode::process_layer( overridden.push_back(new_region); for (ExtrusionEntity *ee : (*layer_to_print.object_layer).regions[region_id]->fills.entities) { auto *fill = dynamic_cast(ee); - if (fill->get_extruder_override(copy_id) == (unsigned int)extruder_id) + if (fill->get_extruder_override(copy_id) == (int)extruder_id) overridden.back().infills.append(*fill); } for (ExtrusionEntity *ee : (*layer_to_print.object_layer).regions[region_id]->perimeters.entities) { auto *fill = dynamic_cast(ee); - if (fill->get_extruder_override(copy_id) == (unsigned int)extruder_id) + if (fill->get_extruder_override(copy_id) == (int)extruder_id) overridden.back().perimeters.append((*fill).entities); } } @@ -2527,12 +2527,13 @@ const std::vector& GCode::ObjectByExtru by_region_per_copy_cache.push_back(ObjectByExtruder::Island::Region()); //out.back().perimeters.append(reg.perimeters); // we will print all perimeters there are - if (!reg.infills_per_copy_ids.empty()) { + if (!reg.infills_per_copy_ids.empty()) for (unsigned int i=0; i steps; std::vector osteps; bool invalidated = false; + + // Always invalidate the wipe tower. This is probably necessary because of the wipe_into_infill / wipe_into_objects + // features - nearly anything can influence what should (and could) be wiped into. + steps.emplace_back(psWipeTower); + for (const t_config_option_key &opt_key : opt_keys) { if (steps_ignore.find(opt_key) != steps_ignore.end()) { // These options only affect G-code export or they are just notes without influence on the generated G-code, @@ -201,7 +206,7 @@ bool Print::invalidate_state_by_config_options(const std::vector( wipe_tower.prime(this->skirt_first_layer_height(), m_tool_ordering.all_extruders(), ! last_priming_wipe_full)); + reset_wiping_extrusions(); // if this is not the first time the wipe tower is generated, some extrusions might remember their last wiping status // Lets go through the wipe tower layers and determine pairs of extruder changes for each // to pass to wipe_tower (so that it can use it for planning the layout of the tower) @@ -1138,8 +1143,8 @@ void Print::_make_wipe_tower() if ((first_layer && extruder_id == m_tool_ordering.all_extruders().back()) || extruder_id != current_extruder_id) { float volume_to_wipe = wipe_volumes[current_extruder_id][extruder_id]; // total volume to wipe after this toolchange - if (config.wipe_into_infill && !first_layer) - volume_to_wipe = mark_wiping_infill(layer_tools, extruder_id, wipe_volumes[current_extruder_id][extruder_id]); + if (!first_layer) // unless we're on the first layer, try to assign some infills/objects for the wiping: + volume_to_wipe = mark_wiping_extrusions(layer_tools, extruder_id, wipe_volumes[current_extruder_id][extruder_id]); wipe_tower.plan_toolchange(layer_tools.print_z, layer_tools.wipe_tower_layer_height, current_extruder_id, extruder_id, first_layer && extruder_id == m_tool_ordering.all_extruders().back(), volume_to_wipe); current_extruder_id = extruder_id; @@ -1176,12 +1181,31 @@ void Print::_make_wipe_tower() -float Print::mark_wiping_infill(const ToolOrdering::LayerTools& layer_tools, unsigned int new_extruder, float volume_to_wipe) +void Print::reset_wiping_extrusions() { + for (size_t i = 0; i < objects.size(); ++ i) { + for (auto& this_layer : objects[i]->layers) { + for (size_t region_id = 0; region_id < objects[i]->print()->regions.size(); ++ region_id) { + for (unsigned int copy = 0; copy < objects[i]->_shifted_copies.size(); ++copy) { + this_layer->regions[region_id]->fills.set_extruder_override(copy, -1); + this_layer->regions[region_id]->perimeters.set_extruder_override(copy, -1); + } + } + } + } +} + + + +float Print::mark_wiping_extrusions(const ToolOrdering::LayerTools& layer_tools, unsigned int new_extruder, float volume_to_wipe) { const float min_infill_volume = 0.f; // ignore infill with smaller volume than this if (!config.filament_soluble.get_at(new_extruder)) { // Soluble filament cannot be wiped in a random infill for (size_t i = 0; i < objects.size(); ++ i) { // Let's iterate through all objects... + + if (!objects[i]->config.wipe_into_infill && !objects[i]->config.wipe_into_objects) + continue; + Layer* this_layer = nullptr; for (unsigned int a = 0; a < objects[i]->layers.size(); ++a) // Finds this layer if (std::abs(layer_tools.print_z - objects[i]->layers[a]->print_z) < EPSILON) { @@ -1210,16 +1234,18 @@ float Print::mark_wiping_infill(const ToolOrdering::LayerTools& layer_tools, uns continue; } - ExtrusionEntityCollection& eec = this_layer->regions[region_id]->fills; - for (ExtrusionEntity* ee : eec.entities) { // iterate through all infill Collections - auto* fill = dynamic_cast(ee); - if (fill->role() == erTopSolidInfill || fill->role() == erGapFill) continue; // these cannot be changed - it is / may be visible - if (volume_to_wipe <= 0.f) - break; - if (!fill->is_extruder_overridden(copy) && fill->total_volume() > min_infill_volume) { // this infill will be used to wipe this extruder - fill->set_extruder_override(copy, new_extruder); - volume_to_wipe -= fill->total_volume(); - } + if (objects[i]->config.wipe_into_infill) { + ExtrusionEntityCollection& eec = this_layer->regions[region_id]->fills; + for (ExtrusionEntity* ee : eec.entities) { // iterate through all infill Collections + auto* fill = dynamic_cast(ee); + if (fill->role() == erTopSolidInfill || fill->role() == erGapFill) continue; // these cannot be changed - it is / may be visible + if (volume_to_wipe <= 0.f) + break; + if (!fill->is_extruder_overridden(copy) && fill->total_volume() > min_infill_volume) { // this infill will be used to wipe this extruder + fill->set_extruder_override(copy, new_extruder); + volume_to_wipe -= fill->total_volume(); + } + } } if (objects[i]->config.wipe_into_objects) diff --git a/xs/src/libslic3r/Print.hpp b/xs/src/libslic3r/Print.hpp index 77b47fb83..77787063e 100644 --- a/xs/src/libslic3r/Print.hpp +++ b/xs/src/libslic3r/Print.hpp @@ -317,7 +317,10 @@ private: // This function goes through all infill entities, decides which ones will be used for wiping and // marks them by the extruder id. Returns volume that remains to be wiped on the wipe tower: - float mark_wiping_infill(const ToolOrdering::LayerTools& layer_tools, unsigned int new_extruder, float volume_to_wipe); + float mark_wiping_extrusions(const ToolOrdering::LayerTools& layer_tools, unsigned int new_extruder, float volume_to_wipe); + + // A function to go through all entities and unsets their extruder_override flag + void reset_wiping_extrusions(); // Has the calculation been canceled? tbb::atomic m_canceled; diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 98b111a4d..d00f7974e 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -1886,6 +1886,7 @@ PrintConfigDef::PrintConfigDef() def->default_value = new ConfigOptionFloat(0.); def = this->add("wipe_into_infill", coBool); + def->category = L("Extruders"); def->label = L("Wiping into infill"); def->tooltip = L("Wiping after toolchange will be preferentially done inside infills. " "This lowers the amount of waste but may result in longer print time " diff --git a/xs/src/libslic3r/PrintConfig.hpp b/xs/src/libslic3r/PrintConfig.hpp index f638a7674..92ead2927 100644 --- a/xs/src/libslic3r/PrintConfig.hpp +++ b/xs/src/libslic3r/PrintConfig.hpp @@ -337,6 +337,7 @@ public: ConfigOptionFloatOrPercent support_material_xy_spacing; ConfigOptionFloat xy_size_compensation; ConfigOptionBool wipe_into_objects; + ConfigOptionBool wipe_into_infill; protected: void initialize(StaticCacheBase &cache, const char *base_ptr) @@ -374,6 +375,7 @@ protected: OPT_PTR(support_material_with_sheath); OPT_PTR(xy_size_compensation); OPT_PTR(wipe_into_objects); + OPT_PTR(wipe_into_infill); } }; @@ -644,7 +646,6 @@ public: ConfigOptionFloat wipe_tower_per_color_wipe; ConfigOptionFloat wipe_tower_rotation_angle; ConfigOptionFloat wipe_tower_bridging; - ConfigOptionBool wipe_into_infill; ConfigOptionFloats wiping_volumes_matrix; ConfigOptionFloats wiping_volumes_extruders; ConfigOptionFloat z_offset; @@ -713,7 +714,6 @@ protected: OPT_PTR(wipe_tower_width); OPT_PTR(wipe_tower_per_color_wipe); OPT_PTR(wipe_tower_rotation_angle); - OPT_PTR(wipe_into_infill); OPT_PTR(wipe_tower_bridging); OPT_PTR(wiping_volumes_matrix); OPT_PTR(wiping_volumes_extruders); diff --git a/xs/src/libslic3r/PrintObject.cpp b/xs/src/libslic3r/PrintObject.cpp index b0341db16..1c403acdb 100644 --- a/xs/src/libslic3r/PrintObject.cpp +++ b/xs/src/libslic3r/PrintObject.cpp @@ -231,7 +231,10 @@ bool PrintObject::invalidate_state_by_config_options(const std::vector_print->invalidate_step(psWipeTower); return invalidated; } From 29dd305aaa4b738eaef91bd2de82e667a17d89fa Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Wed, 13 Jun 2018 11:48:43 +0200 Subject: [PATCH 025/198] Wiping into perimeters - bugfix (wrong order of perimeters and infills) --- xs/src/libslic3r/GCode.cpp | 17 ++++++++--------- xs/src/libslic3r/Print.cpp | 21 ++++++++++++++++++++- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index ce63a374c..809745da2 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1249,13 +1249,13 @@ void GCode::process_layer( // We just added perimeter_coll->entities.size() entities, if they are not to be printed before the main object (during infill wiping), // we will note their indices (for each copy separately): - unsigned int last_added_entity_index = islands[i].by_region[region_id].perimeters.entities.size()-1; + unsigned int first_added_entity_index = islands[i].by_region[region_id].perimeters.entities.size() - perimeter_coll->entities.size(); for (unsigned copy_id = 0; copy_id < layer_to_print.object()->_shifted_copies.size(); ++copy_id) { if (islands[i].by_region[region_id].perimeters_per_copy_ids.size() < copy_id + 1) // if this copy isn't in the list yet islands[i].by_region[region_id].perimeters_per_copy_ids.push_back(std::vector()); if (!perimeter_coll->is_extruder_overridden(copy_id)) - for (int j=0; jentities.size(); ++j) - islands[i].by_region[region_id].perimeters_per_copy_ids[copy_id].push_back(last_added_entity_index - j); + for (int j=first_added_entity_index; jentities.size() entities, if they are not to be printed before the main object (during infill wiping), // we will note their indices (for each copy separately): - unsigned int last_added_entity_index = islands[i].by_region[region_id].infills.entities.size()-1; + unsigned int first_added_entity_index = islands[i].by_region[region_id].infills.entities.size() - fill->entities.size(); for (unsigned copy_id = 0; copy_id < layer_to_print.object()->_shifted_copies.size(); ++copy_id) { if (islands[i].by_region[region_id].infills_per_copy_ids.size() < copy_id + 1) // if this copy isn't in the list yet islands[i].by_region[region_id].infills_per_copy_ids.push_back(std::vector()); if (!fill->is_extruder_overridden(copy_id)) - for (int j=0; jentities.size(); ++j) - islands[i].by_region[region_id].infills_per_copy_ids[copy_id].push_back(last_added_entity_index - j); + for (int j=first_added_entity_index; j& GCode::ObjectByExtruder::Island::by_region_per_copy(unsigned int copy) { @@ -2522,10 +2523,8 @@ const std::vector& GCode::ObjectByExtru last_copy = copy; } - //std::vector out; for (const auto& reg : by_region) { by_region_per_copy_cache.push_back(ObjectByExtruder::Island::Region()); - //out.back().perimeters.append(reg.perimeters); // we will print all perimeters there are if (!reg.infills_per_copy_ids.empty()) for (unsigned int i=0; i Date: Tue, 19 Jun 2018 09:46:26 +0200 Subject: [PATCH 026/198] Object updated by rotate gizmo --- lib/Slic3r/GUI/Plater.pm | 20 +++- xs/src/slic3r/GUI/3DScene.cpp | 10 ++ xs/src/slic3r/GUI/3DScene.hpp | 2 + xs/src/slic3r/GUI/GLCanvas3D.cpp | 119 ++++++++++++++++++------ xs/src/slic3r/GUI/GLCanvas3D.hpp | 13 ++- xs/src/slic3r/GUI/GLCanvas3DManager.cpp | 14 +++ xs/src/slic3r/GUI/GLCanvas3DManager.hpp | 2 + xs/src/slic3r/GUI/GLGizmo.cpp | 18 +++- xs/src/slic3r/GUI/GLGizmo.hpp | 5 +- xs/xsp/GUI_3DScene.xsp | 13 +++ 10 files changed, 180 insertions(+), 36 deletions(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index d1ccf07d5..0185749a3 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -14,6 +14,7 @@ use Wx qw(:button :colour :cursor :dialog :filedialog :keycode :icon :font :id : use Wx::Event qw(EVT_BUTTON EVT_TOGGLEBUTTON EVT_COMMAND EVT_KEY_DOWN EVT_LIST_ITEM_ACTIVATED EVT_LIST_ITEM_DESELECTED EVT_LIST_ITEM_SELECTED EVT_LEFT_DOWN EVT_MOUSE_EVENTS EVT_PAINT EVT_TOOL EVT_CHOICE EVT_COMBOBOX EVT_TIMER EVT_NOTEBOOK_PAGE_CHANGED); +use Slic3r::Geometry qw(PI); use base 'Wx::Panel'; use constant TB_ADD => &Wx::NewId; @@ -134,6 +135,12 @@ sub new { $self->schedule_background_process; }; + # callback to react to gizmo rotate + my $on_gizmo_rotate = sub { + my ($angle_z) = @_; + $self->rotate(rad2deg($angle_z), Z, 'absolute'); + }; + # Initialize 3D plater if ($Slic3r::GUI::have_OpenGL) { $self->{canvas3D} = Slic3r::GUI::Plater::3D->new($self->{preview_notebook}, $self->{objects}, $self->{model}, $self->{print}, $self->{config}); @@ -151,6 +158,7 @@ sub new { Slic3r::GUI::_3DScene::register_on_instance_moved_callback($self->{canvas3D}, $on_instances_moved); Slic3r::GUI::_3DScene::register_on_enable_action_buttons_callback($self->{canvas3D}, $enable_action_buttons); Slic3r::GUI::_3DScene::register_on_gizmo_scale_uniformly_callback($self->{canvas3D}, $on_gizmo_scale_uniformly); + Slic3r::GUI::_3DScene::register_on_gizmo_rotate_callback($self->{canvas3D}, $on_gizmo_rotate); Slic3r::GUI::_3DScene::enable_gizmos($self->{canvas3D}, 1); Slic3r::GUI::_3DScene::enable_shader($self->{canvas3D}, 1); Slic3r::GUI::_3DScene::enable_force_zoom_to_bed($self->{canvas3D}, 1); @@ -1060,7 +1068,17 @@ sub rotate { if ($axis == Z) { my $new_angle = deg2rad($angle); - $_->set_rotation(($relative ? $_->rotation : 0.) + $new_angle) for @{ $model_object->instances }; + foreach my $inst (@{ $model_object->instances }) { + my $rotation = ($relative ? $inst->rotation : 0.) + $new_angle; + while ($rotation > 2.0 * PI) { + $rotation -= 2.0 * PI; + } + while ($rotation < 0.0) { + $rotation += 2.0 * PI; + } + $inst->set_rotation($rotation); + Slic3r::GUI::_3DScene::update_gizmos_data($self->{canvas3D}) if ($self->{canvas3D}); + } $object->transform_thumbnail($self->{model}, $obj_idx); } else { # rotation around X and Y needs to be performed on mesh diff --git a/xs/src/slic3r/GUI/3DScene.cpp b/xs/src/slic3r/GUI/3DScene.cpp index 1879b3082..352738c7c 100644 --- a/xs/src/slic3r/GUI/3DScene.cpp +++ b/xs/src/slic3r/GUI/3DScene.cpp @@ -1948,6 +1948,11 @@ void _3DScene::update_volumes_colors_by_extruder(wxGLCanvas* canvas) s_canvas_mgr.update_volumes_colors_by_extruder(canvas); } +void _3DScene::update_gizmos_data(wxGLCanvas* canvas) +{ + s_canvas_mgr.update_gizmos_data(canvas); +} + void _3DScene::render(wxGLCanvas* canvas) { s_canvas_mgr.render(canvas); @@ -2043,6 +2048,11 @@ void _3DScene::register_on_gizmo_scale_uniformly_callback(wxGLCanvas* canvas, vo s_canvas_mgr.register_on_gizmo_scale_uniformly_callback(canvas, callback); } +void _3DScene::register_on_gizmo_rotate_callback(wxGLCanvas* canvas, void* callback) +{ + s_canvas_mgr.register_on_gizmo_rotate_callback(canvas, callback); +} + static inline int hex_digit_to_int(const char c) { return diff --git a/xs/src/slic3r/GUI/3DScene.hpp b/xs/src/slic3r/GUI/3DScene.hpp index c6a166397..e7d43aee2 100644 --- a/xs/src/slic3r/GUI/3DScene.hpp +++ b/xs/src/slic3r/GUI/3DScene.hpp @@ -568,6 +568,7 @@ public: static void set_viewport_from_scene(wxGLCanvas* canvas, wxGLCanvas* other); static void update_volumes_colors_by_extruder(wxGLCanvas* canvas); + static void update_gizmos_data(wxGLCanvas* canvas); static void render(wxGLCanvas* canvas); @@ -590,6 +591,7 @@ public: static void register_on_wipe_tower_moved_callback(wxGLCanvas* canvas, void* callback); static void register_on_enable_action_buttons_callback(wxGLCanvas* canvas, void* callback); static void register_on_gizmo_scale_uniformly_callback(wxGLCanvas* canvas, void* callback); + static void register_on_gizmo_rotate_callback(wxGLCanvas* canvas, void* callback); static std::vector load_object(wxGLCanvas* canvas, const ModelObject* model_object, int obj_idx, std::vector instance_idxs); static std::vector load_object(wxGLCanvas* canvas, const Model* model, int obj_idx); diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index f9c10017e..b9a6ad218 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -1263,14 +1263,9 @@ void GLCanvas3D::Gizmos::update(const Pointf& mouse_pos) curr->update(mouse_pos); } -void GLCanvas3D::Gizmos::update_data(float scale) +GLCanvas3D::Gizmos::EType GLCanvas3D::Gizmos::get_current_type() const { - if (!m_enabled) - return; - - GizmosMap::const_iterator it = m_gizmos.find(Scale); - if (it != m_gizmos.end()) - reinterpret_cast(it->second)->set_scale(scale); + return m_current; } bool GLCanvas3D::Gizmos::is_running() const @@ -1309,6 +1304,35 @@ float GLCanvas3D::Gizmos::get_scale() const return (it != m_gizmos.end()) ? reinterpret_cast(it->second)->get_scale() : 1.0f; } +void GLCanvas3D::Gizmos::set_scale(float scale) +{ + if (!m_enabled) + return; + + GizmosMap::const_iterator it = m_gizmos.find(Scale); + if (it != m_gizmos.end()) + reinterpret_cast(it->second)->set_scale(scale); +} + +float GLCanvas3D::Gizmos::get_angle_z() const +{ + if (!m_enabled) + return 0.0f; + + GizmosMap::const_iterator it = m_gizmos.find(Rotate); + return (it != m_gizmos.end()) ? reinterpret_cast(it->second)->get_angle_z() : 0.0f; +} + +void GLCanvas3D::Gizmos::set_angle_z(float angle_z) +{ + if (!m_enabled) + return; + + GizmosMap::const_iterator it = m_gizmos.find(Rotate); + if (it != m_gizmos.end()) + reinterpret_cast(it->second)->set_angle_z(angle_z); +} + void GLCanvas3D::Gizmos::render(const GLCanvas3D& canvas, const BoundingBoxf3& box) const { if (!m_enabled) @@ -1823,6 +1847,38 @@ void GLCanvas3D::update_volumes_colors_by_extruder() m_volumes.update_colors_by_extruder(m_config); } +void GLCanvas3D::update_gizmos_data() +{ + if (!m_gizmos.is_running()) + return; + + int id = _get_first_selected_object_id(); + if ((id != -1) && (m_model != nullptr)) + { + ModelObject* model_object = m_model->objects[id]; + if (model_object != nullptr) + { + ModelInstance* model_instance = model_object->instances[0]; + if (model_instance != nullptr) + { + switch (m_gizmos.get_current_type()) + { + case Gizmos::Scale: + { + m_gizmos.set_scale(model_instance->scaling_factor); + break; + } + case Gizmos::Rotate: + { + m_gizmos.set_angle_z(model_instance->rotation); + break; + } + } + } + } + } +} + void GLCanvas3D::render() { if (m_canvas == nullptr) @@ -1930,6 +1986,7 @@ void GLCanvas3D::reload_scene(bool force) m_objects_volumes_idxs.push_back(load_object(*m_model, obj_idx)); } + update_gizmos_data(); update_volumes_selection(m_objects_selections); if (m_config->has("nozzle_diameter")) @@ -2477,6 +2534,12 @@ void GLCanvas3D::register_on_gizmo_scale_uniformly_callback(void* callback) m_on_gizmo_scale_uniformly_callback.register_callback(callback); } +void GLCanvas3D::register_on_gizmo_rotate_callback(void* callback) +{ + if (callback != nullptr) + m_on_gizmo_rotate_callback.register_callback(callback); +} + void GLCanvas3D::bind_event_handlers() { if (m_canvas != nullptr) @@ -2694,13 +2757,13 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) } else if ((selected_object_idx != -1) && gizmos_overlay_contains_mouse) { + update_gizmos_data(); m_gizmos.update_on_off_state(*this, m_mouse.position); - _update_gizmos_data(); m_dirty = true; } else if ((selected_object_idx != -1) && m_gizmos.grabber_contains_mouse()) - { - _update_gizmos_data(); + { + update_gizmos_data(); m_gizmos.start_dragging(); m_dirty = true; } @@ -2726,9 +2789,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) } } - if (m_gizmos.is_running()) - _update_gizmos_data(); - + update_gizmos_data(); m_dirty = true; } } @@ -2821,7 +2882,21 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) const Pointf3& cur_pos = _mouse_to_bed_3d(pos); m_gizmos.update(Pointf(cur_pos.x, cur_pos.y)); - m_on_gizmo_scale_uniformly_callback.call((double)m_gizmos.get_scale()); + switch (m_gizmos.get_current_type()) + { + case Gizmos::Scale: + { + m_on_gizmo_scale_uniformly_callback.call((double)m_gizmos.get_scale()); + break; + } + case Gizmos::Rotate: + { + m_on_gizmo_rotate_callback.call((double)m_gizmos.get_angle_z()); + break; + } + default: + break; + } m_dirty = true; } else if (evt.Dragging() && !gizmos_overlay_contains_mouse) @@ -3164,6 +3239,7 @@ void GLCanvas3D::_deregister_callbacks() m_on_wipe_tower_moved_callback.deregister_callback(); m_on_enable_action_buttons_callback.deregister_callback(); m_on_gizmo_scale_uniformly_callback.deregister_callback(); + m_on_gizmo_rotate_callback.deregister_callback(); } void GLCanvas3D::_mark_volumes_for_layer_height() const @@ -4264,21 +4340,6 @@ void GLCanvas3D::_on_select(int volume_idx) m_on_select_object_callback.call(id); } -void GLCanvas3D::_update_gizmos_data() -{ - int id = _get_first_selected_object_id(); - if ((id != -1) && (m_model != nullptr)) - { - ModelObject* model_object = m_model->objects[id]; - if (model_object != nullptr) - { - ModelInstance* model_instance = model_object->instances[0]; - if (model_instance != nullptr) - m_gizmos.update_data(model_instance->scaling_factor); - } - } -} - std::vector GLCanvas3D::_parse_colors(const std::vector& colors) { static const float INV_255 = 1.0f / 255.0f; diff --git a/xs/src/slic3r/GUI/GLCanvas3D.hpp b/xs/src/slic3r/GUI/GLCanvas3D.hpp index c503d1845..ba4d4d106 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.hpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.hpp @@ -360,14 +360,20 @@ public: bool overlay_contains_mouse(const GLCanvas3D& canvas, const Pointf& mouse_pos) const; bool grabber_contains_mouse() const; void update(const Pointf& mouse_pos); - void update_data(float scale); + + EType get_current_type() const; bool is_running() const; + bool is_dragging() const; void start_dragging(); void stop_dragging(); float get_scale() const; + void set_scale(float scale); + + float get_angle_z() const; + void set_angle_z(float angle_z); void render(const GLCanvas3D& canvas, const BoundingBoxf3& box) const; void render_current_gizmo_for_picking_pass(const BoundingBoxf3& box) const; @@ -442,6 +448,7 @@ private: PerlCallback m_on_wipe_tower_moved_callback; PerlCallback m_on_enable_action_buttons_callback; PerlCallback m_on_gizmo_scale_uniformly_callback; + PerlCallback m_on_gizmo_rotate_callback; public: GLCanvas3D(wxGLCanvas* canvas, wxGLContext* context); @@ -510,6 +517,7 @@ public: void set_viewport_from_scene(const GLCanvas3D& other); void update_volumes_colors_by_extruder(); + void update_gizmos_data(); void render(); @@ -548,6 +556,7 @@ public: void register_on_wipe_tower_moved_callback(void* callback); void register_on_enable_action_buttons_callback(void* callback); void register_on_gizmo_scale_uniformly_callback(void* callback); + void register_on_gizmo_rotate_callback(void* callback); void bind_event_handlers(); void unbind_event_handlers(); @@ -628,8 +637,6 @@ private: void _on_move(const std::vector& volume_idxs); void _on_select(int volume_idx); - void _update_gizmos_data(); - static std::vector _parse_colors(const std::vector& colors); }; diff --git a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp index f288ee456..8785c7a9d 100644 --- a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp @@ -494,6 +494,13 @@ void GLCanvas3DManager::update_volumes_colors_by_extruder(wxGLCanvas* canvas) it->second->update_volumes_colors_by_extruder(); } +void GLCanvas3DManager::update_gizmos_data(wxGLCanvas* canvas) +{ + CanvasesMap::const_iterator it = _get_canvas(canvas); + if (it != m_canvases.end()) + it->second->update_gizmos_data(); +} + void GLCanvas3DManager::render(wxGLCanvas* canvas) const { CanvasesMap::const_iterator it = _get_canvas(canvas); @@ -685,6 +692,13 @@ void GLCanvas3DManager::register_on_gizmo_scale_uniformly_callback(wxGLCanvas* c it->second->register_on_gizmo_scale_uniformly_callback(callback); } +void GLCanvas3DManager::register_on_gizmo_rotate_callback(wxGLCanvas* canvas, void* callback) +{ + CanvasesMap::iterator it = _get_canvas(canvas); + if (it != m_canvases.end()) + it->second->register_on_gizmo_rotate_callback(callback); +} + GLCanvas3DManager::CanvasesMap::iterator GLCanvas3DManager::_get_canvas(wxGLCanvas* canvas) { return (canvas == nullptr) ? m_canvases.end() : m_canvases.find(canvas); diff --git a/xs/src/slic3r/GUI/GLCanvas3DManager.hpp b/xs/src/slic3r/GUI/GLCanvas3DManager.hpp index 6989da791..518341f0d 100644 --- a/xs/src/slic3r/GUI/GLCanvas3DManager.hpp +++ b/xs/src/slic3r/GUI/GLCanvas3DManager.hpp @@ -121,6 +121,7 @@ public: void set_viewport_from_scene(wxGLCanvas* canvas, wxGLCanvas* other); void update_volumes_colors_by_extruder(wxGLCanvas* canvas); + void update_gizmos_data(wxGLCanvas* canvas); void render(wxGLCanvas* canvas) const; @@ -153,6 +154,7 @@ public: void register_on_wipe_tower_moved_callback(wxGLCanvas* canvas, void* callback); void register_on_enable_action_buttons_callback(wxGLCanvas* canvas, void* callback); void register_on_gizmo_scale_uniformly_callback(wxGLCanvas* canvas, void* callback); + void register_on_gizmo_rotate_callback(wxGLCanvas* canvas, void* callback); private: CanvasesMap::iterator _get_canvas(wxGLCanvas* canvas); diff --git a/xs/src/slic3r/GUI/GLGizmo.cpp b/xs/src/slic3r/GUI/GLGizmo.cpp index d3aae33e8..0b5f4b3b7 100644 --- a/xs/src/slic3r/GUI/GLGizmo.cpp +++ b/xs/src/slic3r/GUI/GLGizmo.cpp @@ -140,7 +140,7 @@ void GLGizmoBase::on_start_dragging() void GLGizmoBase::render_grabbers() const { - for (unsigned int i = 0; i < (unsigned int)m_grabbers.size(); ++i) + for (int i = 0; i < (int)m_grabbers.size(); ++i) { m_grabbers[i].render(m_hover_id == i); } @@ -165,6 +165,19 @@ GLGizmoRotate::GLGizmoRotate() { } +float GLGizmoRotate::get_angle_z() const +{ + return m_angle_z; +} + +void GLGizmoRotate::set_angle_z(float angle_z) +{ + if (std::abs(angle_z - 2.0f * PI) < EPSILON) + angle_z = 0.0f; + + m_angle_z = angle_z; +} + bool GLGizmoRotate::on_init() { std::string path = resources_dir() + "/icons/overlay/"; @@ -194,6 +207,7 @@ void GLGizmoRotate::on_update(const Pointf& mouse_pos) if (cross(orig_dir, new_dir) < 0.0) theta = 2.0 * (coordf_t)PI - theta; + // snap if (length(m_center.vector_to(mouse_pos)) < 2.0 * (double)m_radius / 3.0) { coordf_t step = 2.0 * (coordf_t)PI / (coordf_t)SnapRegionsCount; @@ -202,7 +216,7 @@ void GLGizmoRotate::on_update(const Pointf& mouse_pos) if (theta == 2.0 * (coordf_t)PI) theta = 0.0; - + m_angle_z = (float)theta; } diff --git a/xs/src/slic3r/GUI/GLGizmo.hpp b/xs/src/slic3r/GUI/GLGizmo.hpp index 2baec8f9b..d8a5517c1 100644 --- a/xs/src/slic3r/GUI/GLGizmo.hpp +++ b/xs/src/slic3r/GUI/GLGizmo.hpp @@ -100,6 +100,9 @@ class GLGizmoRotate : public GLGizmoBase public: GLGizmoRotate(); + float get_angle_z() const; + void set_angle_z(float angle_z); + protected: virtual bool on_init(); virtual void on_update(const Pointf& mouse_pos); @@ -120,9 +123,9 @@ class GLGizmoScale : public GLGizmoBase static const float Offset; float m_scale; + float m_starting_scale; Pointf m_starting_drag_position; - float m_starting_scale; public: GLGizmoScale(); diff --git a/xs/xsp/GUI_3DScene.xsp b/xs/xsp/GUI_3DScene.xsp index 29f35293b..f9c1f9f0f 100644 --- a/xs/xsp/GUI_3DScene.xsp +++ b/xs/xsp/GUI_3DScene.xsp @@ -470,6 +470,12 @@ update_volumes_colors_by_extruder(canvas) CODE: _3DScene::update_volumes_colors_by_extruder((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas")); +void +update_gizmos_data(canvas) + SV *canvas; + CODE: + _3DScene::update_gizmos_data((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas")); + void render(canvas) SV *canvas; @@ -605,6 +611,13 @@ register_on_gizmo_scale_uniformly_callback(canvas, callback) CODE: _3DScene::register_on_gizmo_scale_uniformly_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); +void +register_on_gizmo_rotate_callback(canvas, callback) + SV *canvas; + SV *callback; + CODE: + _3DScene::register_on_gizmo_rotate_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); + unsigned int finalize_legend_texture() CODE: From 8a47852be22b3be0d02d36dd6a50d7674ed465fe Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Wed, 20 Jun 2018 12:52:00 +0200 Subject: [PATCH 027/198] Refactoring of perimeters/infills wiping (ToolOrdering::WipingExtrusions now takes care of the agenda) Squashed commit of the following: commit 931eb2684103e8571b4a2e9804765fef268361c3 Author: Lukas Matena Date: Wed Jun 20 12:50:27 2018 +0200 ToolOrdering::WipingExtrusions now holds all information necessary for infill/perimeter wiping commit cc8becfbdd771f7e279434c8bd6be147e4b321ee Author: Lukas Matena Date: Tue Jun 19 10:52:03 2018 +0200 Wiping is now done as normal print would be (less extra code in process_layer) commit 1b120754b0691cce46ee5e10f3840480c559ac1f Author: Lukas Matena Date: Fri Jun 15 15:55:15 2018 +0200 Refactoring: ObjectByExtruder changed so that it is aware of the wiping extrusions commit 1641e326bb5e0a0c69d6bfc6efa23153dc2e4543 Author: Lukas Matena Date: Thu Jun 14 12:22:18 2018 +0200 Refactoring: new class WipingExtrusion in ToolOrdering.hpp --- xs/src/libslic3r/ExtrusionEntity.hpp | 13 - .../libslic3r/ExtrusionEntityCollection.hpp | 7 - xs/src/libslic3r/GCode.cpp | 321 ++++++++---------- xs/src/libslic3r/GCode.hpp | 13 +- xs/src/libslic3r/GCode/ToolOrdering.cpp | 38 +++ xs/src/libslic3r/GCode/ToolOrdering.hpp | 37 +- xs/src/libslic3r/Print.cpp | 170 +++++----- xs/src/libslic3r/Print.hpp | 5 +- 8 files changed, 301 insertions(+), 303 deletions(-) diff --git a/xs/src/libslic3r/ExtrusionEntity.hpp b/xs/src/libslic3r/ExtrusionEntity.hpp index c0f681de5..15363e8ed 100644 --- a/xs/src/libslic3r/ExtrusionEntity.hpp +++ b/xs/src/libslic3r/ExtrusionEntity.hpp @@ -93,19 +93,6 @@ public: virtual Polyline as_polyline() const = 0; virtual double length() const = 0; virtual double total_volume() const = 0; - - void set_entity_extruder_override(unsigned int copy, int extruder) { - if (copy+1 > extruder_override.size()) - extruder_override.resize(copy+1, -1); // copy is zero-based index - extruder_override[copy] = extruder; - } - virtual int get_extruder_override(unsigned int copy) const { try { return extruder_override.at(copy); } catch (...) { return -1; } } - virtual bool is_extruder_overridden(unsigned int copy) const { try { return extruder_override.at(copy) != -1; } catch (...) { return false; } } - -private: - // Set this variable to explicitly state you want to use specific extruder for thie EE (used for MM infill wiping) - // Each member of the vector corresponds to the respective copy of the object - std::vector extruder_override; }; typedef std::vector ExtrusionEntitiesPtr; diff --git a/xs/src/libslic3r/ExtrusionEntityCollection.hpp b/xs/src/libslic3r/ExtrusionEntityCollection.hpp index ee4b75f38..382455fe3 100644 --- a/xs/src/libslic3r/ExtrusionEntityCollection.hpp +++ b/xs/src/libslic3r/ExtrusionEntityCollection.hpp @@ -90,13 +90,6 @@ public: CONFESS("Calling length() on a ExtrusionEntityCollection"); return 0.; } - - void set_extruder_override(unsigned int copy, int extruder) { - for (ExtrusionEntity* member : entities) - member->set_entity_extruder_override(copy, extruder); - } - virtual int get_extruder_override(unsigned int copy) const { return entities.front()->get_extruder_override(copy); } - virtual bool is_extruder_overridden(unsigned int copy) const { return entities.front()->is_extruder_overridden(copy); } }; } diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 809745da2..cd27e3edd 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1147,7 +1147,6 @@ void GCode::process_layer( // Group extrusions by an extruder, then by an object, an island and a region. std::map> by_extruder; - for (const LayerToPrint &layer_to_print : layers) { if (layer_to_print.support_layer != nullptr) { const SupportLayer &support_layer = *layer_to_print.support_layer; @@ -1225,92 +1224,63 @@ void GCode::process_layer( continue; const PrintRegion ®ion = *print.regions[region_id]; - // process perimeters - for (const ExtrusionEntity *ee : layerm->perimeters.entities) { - // perimeter_coll represents perimeter extrusions of a single island. - const auto *perimeter_coll = dynamic_cast(ee); - if (perimeter_coll->entities.empty()) - // This shouldn't happen but first_point() would fail. - continue; - // Init by_extruder item only if we actually use the extruder. - std::vector &islands = object_islands_by_extruder( - by_extruder, - std::max(region.config.perimeter_extruder.value - 1, 0), - &layer_to_print - layers.data(), - layers.size(), n_slices+1); - for (size_t i = 0; i <= n_slices; ++ i) - if (// perimeter_coll->first_point does not fit inside any slice - i == n_slices || - // perimeter_coll->first_point fits inside ith slice - point_inside_surface(i, perimeter_coll->first_point())) { - if (islands[i].by_region.empty()) - islands[i].by_region.assign(print.regions.size(), ObjectByExtruder::Island::Region()); - islands[i].by_region[region_id].perimeters.append(perimeter_coll->entities); - // We just added perimeter_coll->entities.size() entities, if they are not to be printed before the main object (during infill wiping), - // we will note their indices (for each copy separately): - unsigned int first_added_entity_index = islands[i].by_region[region_id].perimeters.entities.size() - perimeter_coll->entities.size(); - for (unsigned copy_id = 0; copy_id < layer_to_print.object()->_shifted_copies.size(); ++copy_id) { - if (islands[i].by_region[region_id].perimeters_per_copy_ids.size() < copy_id + 1) // if this copy isn't in the list yet - islands[i].by_region[region_id].perimeters_per_copy_ids.push_back(std::vector()); - if (!perimeter_coll->is_extruder_overridden(copy_id)) - for (int j=first_added_entity_index; jfills.entities : layerm->perimeters.entities; + + for (const ExtrusionEntity *ee : source_entities) { + // fill represents infill extrusions of a single island. + const auto *fill = dynamic_cast(ee); + if (fill->entities.empty()) // This shouldn't happen but first_point() would fail. + continue; + + // This extrusion is part of certain Region, which tells us which extruder should be used for it: + int correct_extruder_id = entity_type=="infills" ? std::max(0, (is_solid_infill(fill->entities.front()->role()) ? region.config.solid_infill_extruder : region.config.infill_extruder) - 1) : + std::max(region.config.perimeter_extruder.value - 1, 0); + + // Let's recover vector of extruder overrides: + const ExtruderPerCopy* entity_overrides = const_cast(layer_tools).wiping_extrusions.get_extruder_overrides(fill, correct_extruder_id, layer_to_print.object()->_shifted_copies.size()); + + // Now we must add this extrusion into the by_extruder map, once for each extruder that will print it: + for (unsigned int extruder : layer_tools.extruders) + { + // Init by_extruder item only if we actually use the extruder: + if (std::find(entity_overrides->begin(), entity_overrides->end(), extruder) != entity_overrides->end() || // at least one copy is overridden to use this extruder + std::find(entity_overrides->begin(), entity_overrides->end(), -extruder-1) != entity_overrides->end()) // at least one copy would normally be printed with this extruder (see get_extruder_overrides function for explanation) + { + std::vector &islands = object_islands_by_extruder( + by_extruder, + extruder, + &layer_to_print - layers.data(), + layers.size(), n_slices+1); + for (size_t i = 0; i <= n_slices; ++i) + if (// fill->first_point does not fit inside any slice + i == n_slices || + // fill->first_point fits inside ith slice + point_inside_surface(i, fill->first_point())) { + if (islands[i].by_region.empty()) + islands[i].by_region.assign(print.regions.size(), ObjectByExtruder::Island::Region()); + islands[i].by_region[region_id].append(entity_type, fill, entity_overrides, layer_to_print.object()->_shifted_copies.size()); + break; + } } - break; - } - } - - // process infill - // layerm->fills is a collection of Slic3r::ExtrusionPath::Collection objects (C++ class ExtrusionEntityCollection), - // each one containing the ExtrusionPath objects of a certain infill "group" (also called "surface" - // throughout the code). We can redefine the order of such Collections but we have to - // do each one completely at once. - for (const ExtrusionEntity *ee : layerm->fills.entities) { - // fill represents infill extrusions of a single island. - const auto *fill = dynamic_cast(ee); - if (fill->entities.empty()) - // This shouldn't happen but first_point() would fail. - continue; - - // init by_extruder item only if we actually use the extruder - int extruder_id = std::max(0, (is_solid_infill(fill->entities.front()->role()) ? region.config.solid_infill_extruder : region.config.infill_extruder) - 1); - // Init by_extruder item only if we actually use the extruder. - std::vector &islands = object_islands_by_extruder( - by_extruder, - extruder_id, - &layer_to_print - layers.data(), - layers.size(), n_slices+1); - for (size_t i = 0; i <= n_slices; ++i) - if (// fill->first_point does not fit inside any slice - i == n_slices || - // fill->first_point fits inside ith slice - point_inside_surface(i, fill->first_point())) { - if (islands[i].by_region.empty()) - islands[i].by_region.assign(print.regions.size(), ObjectByExtruder::Island::Region()); - islands[i].by_region[region_id].infills.append(fill->entities); - - // We just added fill->entities.size() entities, if they are not to be printed before the main object (during infill wiping), - // we will note their indices (for each copy separately): - unsigned int first_added_entity_index = islands[i].by_region[region_id].infills.entities.size() - fill->entities.size(); - for (unsigned copy_id = 0; copy_id < layer_to_print.object()->_shifted_copies.size(); ++copy_id) { - if (islands[i].by_region[region_id].infills_per_copy_ids.size() < copy_id + 1) // if this copy isn't in the list yet - islands[i].by_region[region_id].infills_per_copy_ids.push_back(std::vector()); - if (!fill->is_extruder_overridden(copy_id)) - for (int j=first_added_entity_index; j> lower_layer_edge_grids(layers.size()); for (unsigned int extruder_id : layer_tools.extruders) - { + { gcode += (layer_tools.has_wipe_tower && m_wipe_tower) ? m_wipe_tower->tool_change(*this, extruder_id, extruder_id == layer_tools.extruders.back()) : this->set_extruder(extruder_id); @@ -1335,7 +1305,7 @@ void GCode::process_layer( for (ExtrusionPath &path : loop.paths) { path.height = (float)layer.height; path.mm3_per_mm = mm3_per_mm; - } + } gcode += this->extrude_loop(loop, "skirt", m_config.support_material_speed.value); } m_avoid_crossing_perimeters.use_external_mp = false; @@ -1344,7 +1314,7 @@ void GCode::process_layer( m_avoid_crossing_perimeters.disable_once = true; } } - + // Extrude brim with the extruder of the 1st region. if (! m_brim_done) { this->set_origin(0., 0.); @@ -1357,100 +1327,59 @@ void GCode::process_layer( m_avoid_crossing_perimeters.disable_once = true; } - if (layer_tools.has_wipe_tower) // the infill/perimeter wiping to save the material on the wipe tower - { - gcode += "; INFILL WIPING STARTS\n"; - if (extruder_id != layer_tools.extruders.front()) { // if this is the first extruder on this layer, there was no toolchange - for (const auto& layer_to_print : layers) { // iterate through all objects - if (layer_to_print.object_layer == nullptr) - continue; - - m_config.apply((layer_to_print.object_layer)->object()->config, true); - - for (unsigned copy_id = 0; copy_id < layer_to_print.object()->copies().size(); ++copy_id) { - std::vector overridden; - for (size_t region_id = 0; region_id < print.regions.size(); ++ region_id) { - ObjectByExtruder::Island::Region new_region; - overridden.push_back(new_region); - for (ExtrusionEntity *ee : (*layer_to_print.object_layer).regions[region_id]->fills.entities) { - auto *fill = dynamic_cast(ee); - if (fill->get_extruder_override(copy_id) == (int)extruder_id) - overridden.back().infills.append(*fill); - } - for (ExtrusionEntity *ee : (*layer_to_print.object_layer).regions[region_id]->perimeters.entities) { - auto *fill = dynamic_cast(ee); - if (fill->get_extruder_override(copy_id) == (int)extruder_id) - overridden.back().perimeters.append((*fill).entities); - } - } - - Point copy = (layer_to_print.object_layer)->object()->_shifted_copies[copy_id]; - this->set_origin(unscale(copy.x), unscale(copy.y)); - - - std::unique_ptr u; - if (print.config.infill_first) { - gcode += this->extrude_infill(print, overridden); - gcode += this->extrude_perimeters(print, overridden, u); - } - else { - gcode += this->extrude_perimeters(print, overridden, u); - gcode += this->extrude_infill(print, overridden); - } - } - } - } - gcode += "; WIPING FINISHED\n"; - } - - auto objects_by_extruder_it = by_extruder.find(extruder_id); if (objects_by_extruder_it == by_extruder.end()) continue; - for (ObjectByExtruder &object_by_extruder : objects_by_extruder_it->second) { - const size_t layer_id = &object_by_extruder - objects_by_extruder_it->second.data(); - const PrintObject *print_object = layers[layer_id].object(); - if (print_object == nullptr) - // This layer is empty for this particular object, it has neither object extrusions nor support extrusions at this print_z. - continue; - m_config.apply(print_object->config, true); - m_layer = layers[layer_id].layer(); - if (m_config.avoid_crossing_perimeters) - m_avoid_crossing_perimeters.init_layer_mp(union_ex(m_layer->slices, true)); - Points copies; - if (single_object_idx == size_t(-1)) - copies = print_object->_shifted_copies; - else - copies.push_back(print_object->_shifted_copies[single_object_idx]); - // Sort the copies by the closest point starting with the current print position. + // We are almost ready to print. However, we must go through all the object twice and only print the overridden extrusions first (infill/primeter wiping feature): + for (int print_wipe_extrusions=layer_tools.wiping_extrusions.is_anything_overridden(); print_wipe_extrusions>=0; --print_wipe_extrusions) { + for (ObjectByExtruder &object_by_extruder : objects_by_extruder_it->second) { + const size_t layer_id = &object_by_extruder - objects_by_extruder_it->second.data(); + const PrintObject *print_object = layers[layer_id].object(); + if (print_object == nullptr) + // This layer is empty for this particular object, it has neither object extrusions nor support extrusions at this print_z. + continue; - unsigned int copy_id = 0; - for (const Point © : copies) { - // When starting a new object, use the external motion planner for the first travel move. - std::pair this_object_copy(print_object, copy); - if (m_last_obj_copy != this_object_copy) - m_avoid_crossing_perimeters.use_external_mp_once = true; - m_last_obj_copy = this_object_copy; - this->set_origin(unscale(copy.x), unscale(copy.y)); - if (object_by_extruder.support != nullptr) { - m_layer = layers[layer_id].support_layer; - gcode += this->extrude_support( - // support_extrusion_role is erSupportMaterial, erSupportMaterialInterface or erMixed for all extrusion paths. - object_by_extruder.support->chained_path_from(m_last_pos, false, object_by_extruder.support_extrusion_role)); - m_layer = layers[layer_id].layer(); - } - for (ObjectByExtruder::Island &island : object_by_extruder.islands) { - if (print.config.infill_first) { - gcode += this->extrude_infill(print, island.by_region_per_copy(copy_id)); - gcode += this->extrude_perimeters(print, island.by_region_per_copy(copy_id), lower_layer_edge_grids[layer_id]); - } else { - gcode += this->extrude_perimeters(print, island.by_region_per_copy(copy_id), lower_layer_edge_grids[layer_id]); - gcode += this->extrude_infill(print, island.by_region_per_copy(copy_id)); + m_config.apply(print_object->config, true); + m_layer = layers[layer_id].layer(); + if (m_config.avoid_crossing_perimeters) + m_avoid_crossing_perimeters.init_layer_mp(union_ex(m_layer->slices, true)); + Points copies; + if (single_object_idx == size_t(-1)) + copies = print_object->_shifted_copies; + else + copies.push_back(print_object->_shifted_copies[single_object_idx]); + // Sort the copies by the closest point starting with the current print position. + + unsigned int copy_id = 0; + for (const Point © : copies) { + // When starting a new object, use the external motion planner for the first travel move. + std::pair this_object_copy(print_object, copy); + if (m_last_obj_copy != this_object_copy) + m_avoid_crossing_perimeters.use_external_mp_once = true; + m_last_obj_copy = this_object_copy; + this->set_origin(unscale(copy.x), unscale(copy.y)); + if (object_by_extruder.support != nullptr) { + m_layer = layers[layer_id].support_layer; + gcode += this->extrude_support( + // support_extrusion_role is erSupportMaterial, erSupportMaterialInterface or erMixed for all extrusion paths. + object_by_extruder.support->chained_path_from(m_last_pos, false, object_by_extruder.support_extrusion_role)); + m_layer = layers[layer_id].layer(); } + for (ObjectByExtruder::Island &island : object_by_extruder.islands) { + const auto& by_region_specific = layer_tools.wiping_extrusions.is_anything_overridden() ? island.by_region_per_copy(copy_id, extruder_id, print_wipe_extrusions) : island.by_region; + + if (print.config.infill_first) { + gcode += this->extrude_infill(print, by_region_specific); + gcode += this->extrude_perimeters(print, by_region_specific, lower_layer_edge_grids[layer_id]); + } else { + gcode += this->extrude_perimeters(print, by_region_specific, lower_layer_edge_grids[layer_id]); + gcode += this->extrude_infill(print,by_region_specific); + } + } + ++copy_id; } - ++copy_id; } } } @@ -2512,29 +2441,61 @@ Point GCode::gcode_to_point(const Pointf &point) const } -// Goes through by_region std::vector and returns reference to a subvector of entities to be printed in usual time -// i.e. not when it's going to be done during infill wiping -const std::vector& GCode::ObjectByExtruder::Island::by_region_per_copy(unsigned int copy) +// Goes through by_region std::vector and returns reference to a subvector of entities, that are to be printed +// during infill/perimeter wiping, or normally (depends on wiping_entities parameter) +// Returns a reference to member to avoid copying. +const std::vector& GCode::ObjectByExtruder::Island::by_region_per_copy(unsigned int copy, int extruder, bool wiping_entities) { - if (copy == last_copy) - return by_region_per_copy_cache; - else { - by_region_per_copy_cache.clear(); - last_copy = copy; - } + by_region_per_copy_cache.clear(); for (const auto& reg : by_region) { - by_region_per_copy_cache.push_back(ObjectByExtruder::Island::Region()); + by_region_per_copy_cache.push_back(ObjectByExtruder::Island::Region()); // creates a region in the newly created Island - if (!reg.infills_per_copy_ids.empty()) - for (unsigned int i=0; i& overrides = (iter ? reg.infills_overrides : reg.perimeters_overrides); - if (!reg.perimeters_per_copy_ids.empty()) - for (unsigned int i=0; iat(copy) == this_extruder_mark) // this copy should be printed with this extruder + target_eec.append((*entities[i])); + } } return by_region_per_copy_cache; } + + +// This function takes the eec and appends its entities to either perimeters or infills of this Region (depending on the first parameter) +// It also saves pointer to ExtruderPerCopy struct (for each entity), that holds information about which extruders should be used for which copy. +void GCode::ObjectByExtruder::Island::Region::append(const std::string& type, const ExtrusionEntityCollection* eec, const ExtruderPerCopy* copies_extruder, unsigned int object_copies_num) +{ + // We are going to manipulate either perimeters or infills, exactly in the same way. Let's create pointers to the proper structure to not repeat ourselves: + ExtrusionEntityCollection* perimeters_or_infills = &infills; + std::vector* perimeters_or_infills_overrides = &infills_overrides; + + if (type == "perimeters") { + perimeters_or_infills = &perimeters; + perimeters_or_infills_overrides = &perimeters_overrides; + } + else + if (type != "infills") { + CONFESS("Unknown parameter!"); + return; + } + + + // First we append the entities, there are eec->entities.size() of them: + perimeters_or_infills->append(eec->entities); + + for (unsigned int i=0;ientities.size();++i) + perimeters_or_infills_overrides->push_back(copies_extruder); +} + } // namespace Slic3r diff --git a/xs/src/libslic3r/GCode.hpp b/xs/src/libslic3r/GCode.hpp index 35f80b578..ad3f1e26b 100644 --- a/xs/src/libslic3r/GCode.hpp +++ b/xs/src/libslic3r/GCode.hpp @@ -200,6 +200,7 @@ protected: std::string extrude_multi_path(ExtrusionMultiPath multipath, std::string description = "", double speed = -1.); std::string extrude_path(ExtrusionPath path, std::string description = "", double speed = -1.); + typedef std::vector ExtruderPerCopy; // Extruding multiple objects with soluble / non-soluble / combined supports // on a multi-material printer, trying to minimize tool switches. // Following structures sort extrusions by the extruder ID, by an order of objects and object islands. @@ -215,15 +216,19 @@ protected: struct Region { ExtrusionEntityCollection perimeters; ExtrusionEntityCollection infills; - std::vector> infills_per_copy_ids; // indices of infill.entities that are not part of infill wiping (an element for each object copy) - std::vector> perimeters_per_copy_ids; // indices of infill.entities that are not part of infill wiping (an element for each object copy) + + std::vector infills_overrides; + std::vector perimeters_overrides; + + // Appends perimeter/infill entities and writes don't indices of those that are not to be extruder as part of perimeter/infill wiping + void append(const std::string& type, const ExtrusionEntityCollection* eec, const ExtruderPerCopy* copy_extruders, unsigned int object_copies_num); }; + std::vector by_region; // all extrusions for this island, grouped by regions - const std::vector& by_region_per_copy(unsigned int copy); // returns reference to subvector of by_region (only extrusions that are NOT printed during wiping into infill for this copy) + const std::vector& by_region_per_copy(unsigned int copy, int extruder, bool wiping_entities = false); // returns reference to subvector of by_region private: std::vector by_region_per_copy_cache; // caches vector generated by function above to avoid copying and recalculating - unsigned int last_copy = (unsigned int)(-1); // index of last copy that by_region_per_copy was called for }; std::vector islands; }; diff --git a/xs/src/libslic3r/GCode/ToolOrdering.cpp b/xs/src/libslic3r/GCode/ToolOrdering.cpp index e0aa2b1c5..d2532d72d 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.cpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.cpp @@ -330,4 +330,42 @@ void ToolOrdering::collect_extruder_statistics(bool prime_multi_material) } } + // This function is called from Print::mark_wiping_extrusions and sets extruder that it should be printed with (-1 .. as usual) + void WipingExtrusions::set_extruder_override(const ExtrusionEntity* entity, unsigned int copy_id, int extruder, unsigned int num_of_copies) { + something_overridden = true; + + auto entity_map_it = (entity_map.insert(std::make_pair(entity, std::vector()))).first; // (add and) return iterator + auto& copies_vector = entity_map_it->second; + if (copies_vector.size() < num_of_copies) + copies_vector.resize(num_of_copies, -1); + + if (copies_vector[copy_id] != -1) + std::cout << "ERROR: Entity extruder overriden multiple times!!!\n"; // A debugging message - this must never happen. + + copies_vector[copy_id] = extruder; + } + + + + // Following function is called from process_layer and returns pointer to vector with information about which extruders should be used for given copy of this entity. + // It first makes sure the pointer is valid (creates the vector if it does not exist) and contains a record for each copy + // It also modifies the vector in place and changes all -1 to correct_extruder_id (at the time the overrides were created, correct extruders were not known, + // so -1 was used as "print as usual". + // The resulting vector has to keep track of which extrusions are the ones that were overridden and which were not. In the extruder is used as overridden, + // its number is saved as it is (zero-based index). Usual extrusions are saved as -number-1 (unfortunately there is no negative zero). + const std::vector* WipingExtrusions::get_extruder_overrides(const ExtrusionEntity* entity, int correct_extruder_id, int num_of_copies) { + auto entity_map_it = entity_map.find(entity); + if (entity_map_it == entity_map.end()) + entity_map_it = (entity_map.insert(std::make_pair(entity, std::vector()))).first; + + // Now the entity_map_it should be valid, let's make sure the vector is long enough: + entity_map_it->second.resize(num_of_copies, -1); + + // Each -1 now means "print as usual" - we will replace it with actual extruder id (shifted it so we don't lose that information): + std::replace(entity_map_it->second.begin(), entity_map_it->second.end(), -1, -correct_extruder_id-1); + + return &(entity_map_it->second); + } + + } // namespace Slic3r diff --git a/xs/src/libslic3r/GCode/ToolOrdering.hpp b/xs/src/libslic3r/GCode/ToolOrdering.hpp index c92806b19..6dbb9715c 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.hpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.hpp @@ -10,6 +10,36 @@ namespace Slic3r { class Print; class PrintObject; + + +// Object of this class holds information about whether an extrusion is printed immediately +// after a toolchange (as part of infill/perimeter wiping) or not. One extrusion can be a part +// of several copies - this has to be taken into account. +class WipingExtrusions +{ + public: + bool is_anything_overridden() const { // if there are no overrides, all the agenda can be skipped - this function can tell us if that's the case + return something_overridden; + } + + // Returns true in case that entity is not printed with its usual extruder for a given copy: + bool is_entity_overridden(const ExtrusionEntity* entity, int copy_id) const { + return (entity_map.find(entity) == entity_map.end() ? false : entity_map.at(entity).at(copy_id) != -1); + } + + // This function is called from Print::mark_wiping_extrusions and sets extruder that it should be printed with (-1 .. as usual) + void set_extruder_override(const ExtrusionEntity* entity, unsigned int copy_id, int extruder, unsigned int num_of_copies); + + // This is called from GCode::process_layer - see implementation for further comments: + const std::vector* get_extruder_overrides(const ExtrusionEntity* entity, int correct_extruder_id, int num_of_copies); + +private: + std::map> entity_map; // to keep track of who prints what + bool something_overridden = false; +}; + + + class ToolOrdering { public: @@ -39,6 +69,11 @@ public: // and to support the wipe tower partitions above this one. size_t wipe_tower_partitions; coordf_t wipe_tower_layer_height; + + + // This holds list of extrusion that will be used for extruder wiping + WipingExtrusions wiping_extrusions; + }; ToolOrdering() {} @@ -72,7 +107,7 @@ public: std::vector::const_iterator begin() const { return m_layer_tools.begin(); } std::vector::const_iterator end() const { return m_layer_tools.end(); } bool empty() const { return m_layer_tools.empty(); } - const std::vector& layer_tools() const { return m_layer_tools; } + std::vector& layer_tools() { return m_layer_tools; } bool has_wipe_tower() const { return ! m_layer_tools.empty() && m_first_printing_extruder != (unsigned int)-1 && m_layer_tools.front().wipe_tower_partitions > 0; } private: diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index d448ab2f3..1b0627f78 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -1121,21 +1121,14 @@ void Print::_make_wipe_tower() this->config.filament_ramming_parameters.get_at(i), this->config.nozzle_diameter.get_at(i)); - // When printing the first layer's wipe tower, the first extruder is expected to be active and primed. - // Therefore the number of wipe sections at the wipe tower will be (m_tool_ordering.front().extruders-1) at the 1st layer. - // The following variable is true if the last priming section cannot be squeezed inside the wipe tower. - bool last_priming_wipe_full = m_tool_ordering.front().extruders.size() > m_tool_ordering.front().wipe_tower_partitions; - m_wipe_tower_priming = Slic3r::make_unique( - wipe_tower.prime(this->skirt_first_layer_height(), m_tool_ordering.all_extruders(), ! last_priming_wipe_full)); - - reset_wiping_extrusions(); // if this is not the first time the wipe tower is generated, some extrusions might remember their last wiping status + wipe_tower.prime(this->skirt_first_layer_height(), m_tool_ordering.all_extruders(), false)); // Lets go through the wipe tower layers and determine pairs of extruder changes for each // to pass to wipe_tower (so that it can use it for planning the layout of the tower) { unsigned int current_extruder_id = m_tool_ordering.all_extruders().back(); - for (const auto &layer_tools : m_tool_ordering.layer_tools()) { // for all layers + for (auto &layer_tools : m_tool_ordering.layer_tools()) { // for all layers if (!layer_tools.has_wipe_tower) continue; bool first_layer = &layer_tools == &m_tool_ordering.front(); wipe_tower.plan_toolchange(layer_tools.print_z, layer_tools.wipe_tower_layer_height, current_extruder_id, current_extruder_id,false); @@ -1180,111 +1173,100 @@ void Print::_make_wipe_tower() } - -void Print::reset_wiping_extrusions() { - for (size_t i = 0; i < objects.size(); ++ i) { - for (auto& this_layer : objects[i]->layers) { - for (size_t region_id = 0; region_id < objects[i]->print()->regions.size(); ++ region_id) { - for (unsigned int copy = 0; copy < objects[i]->_shifted_copies.size(); ++copy) { - this_layer->regions[region_id]->fills.set_extruder_override(copy, -1); - this_layer->regions[region_id]->perimeters.set_extruder_override(copy, -1); - } - } - } - } -} - - - -// Strategy for wiping (TODO): -// if !infill_first -// start with dedicated objects -// print a perimeter and its corresponding infill immediately after -// repeat until there are no dedicated objects left -// if there are some left and this is the last toolchange on the layer, mark all remaining extrusions of the object (so we don't have to travel back to it later) -// move to normal objects -// start with one object and start assigning its infill, if their perimeters ARE ALREADY EXTRUDED -// never touch perimeters -// -// if infill first -// start with dedicated objects -// print an infill and its corresponding perimeter immediately after -// repeat until you run out of infills -// move to normal objects -// start assigning infills (one copy after another) -// repeat until you run out of infills, leave perimeters be - - -float Print::mark_wiping_extrusions(const ToolOrdering::LayerTools& layer_tools, unsigned int new_extruder, float volume_to_wipe) +// Following function iterates through all extrusions on the layer, remembers those that could be used for wiping after toolchange +// and returns volume that is left to be wiped on the wipe tower. +float Print::mark_wiping_extrusions(ToolOrdering::LayerTools& layer_tools, unsigned int new_extruder, float volume_to_wipe) { + // Strategy for wiping (TODO): + // if !infill_first + // start with dedicated objects + // print a perimeter and its corresponding infill immediately after + // repeat until there are no dedicated objects left + // if there are some left and this is the last toolchange on the layer, mark all remaining extrusions of the object (so we don't have to travel back to it later) + // move to normal objects + // start with one object and start assigning its infill, if their perimeters ARE ALREADY EXTRUDED + // never touch perimeters + // + // if infill first + // start with dedicated objects + // print an infill and its corresponding perimeter immediately after + // repeat until you run out of infills + // move to normal objects + // start assigning infills (one copy after another) + // repeat until you run out of infills, leave perimeters be + const float min_infill_volume = 0.f; // ignore infill with smaller volume than this - if (!config.filament_soluble.get_at(new_extruder)) { // Soluble filament cannot be wiped in a random infill - for (size_t i = 0; i < objects.size(); ++ i) { // Let's iterate through all objects... + if (config.filament_soluble.get_at(new_extruder)) + return volume_to_wipe; // Soluble filament cannot be wiped in a random infill - if (!objects[i]->config.wipe_into_infill && !objects[i]->config.wipe_into_objects) - continue; - Layer* this_layer = nullptr; - for (unsigned int a = 0; a < objects[i]->layers.size(); ++a) // Finds this layer - if (std::abs(layer_tools.print_z - objects[i]->layers[a]->print_z) < EPSILON) { - this_layer = objects[i]->layers[a]; - break; - } - if (this_layer == nullptr) - continue; - for (unsigned int copy = 0; copy < objects[i]->_shifted_copies.size(); ++copy) { // iterate through copies first, so that we mark neighbouring infills - for (size_t region_id = 0; region_id < objects[i]->print()->regions.size(); ++ region_id) { + for (size_t i = 0; i < objects.size(); ++ i) { // Let's iterate through all objects... + if (!objects[i]->config.wipe_into_infill && !objects[i]->config.wipe_into_objects) + continue; - unsigned int region_extruder = objects[i]->print()->regions[region_id]->config.infill_extruder - 1; // config value is 1-based - if (config.filament_soluble.get_at(region_extruder)) // if this infill is meant to be soluble, keep it that way + Layer* this_layer = nullptr; + for (unsigned int a = 0; a < objects[i]->layers.size(); ++a) // Finds this layer + if (std::abs(layer_tools.print_z - objects[i]->layers[a]->print_z) < EPSILON) { + this_layer = objects[i]->layers[a]; + break; + } + if (this_layer == nullptr) + continue; + + unsigned int num_of_copies = objects[i]->_shifted_copies.size(); + + for (unsigned int copy = 0; copy < num_of_copies; ++copy) { // iterate through copies first, so that we mark neighbouring infills to minimize travel moves + + for (size_t region_id = 0; region_id < objects[i]->print()->regions.size(); ++ region_id) { + unsigned int region_extruder = objects[i]->print()->regions[region_id]->config.infill_extruder - 1; // config value is 1-based + if (config.filament_soluble.get_at(region_extruder)) // if this entity is meant to be soluble, keep it that way + continue; + + if (!config.infill_first) { // in this case we must verify that region_extruder was already used at this layer (and perimeters of the infill are therefore extruded) + bool unused_yet = false; + for (unsigned i = 0; i < layer_tools.extruders.size(); ++i) { + if (layer_tools.extruders[i] == new_extruder) + unused_yet = true; + if (layer_tools.extruders[i] == region_extruder) + break; + } + if (unused_yet) continue; + } - if (!config.infill_first) { // in this case we must verify that region_extruder was already used at this layer (and perimeters of the infill are therefore extruded) - bool unused_yet = false; - for (unsigned i = 0; i < layer_tools.extruders.size(); ++i) { - if (layer_tools.extruders[i] == new_extruder) - unused_yet = true; - if (layer_tools.extruders[i] == region_extruder) + if (objects[i]->config.wipe_into_infill) { + ExtrusionEntityCollection& eec = this_layer->regions[region_id]->fills; + for (ExtrusionEntity* ee : eec.entities) { // iterate through all infill Collections + if (volume_to_wipe <= 0.f) break; - } - if (unused_yet) + auto* fill = dynamic_cast(ee); + if (fill->role() == erTopSolidInfill || fill->role() == erGapFill) // these cannot be changed - such infill is / may be visible continue; - } - - if (objects[i]->config.wipe_into_infill) { - ExtrusionEntityCollection& eec = this_layer->regions[region_id]->fills; - for (ExtrusionEntity* ee : eec.entities) { // iterate through all infill Collections - auto* fill = dynamic_cast(ee); - if (fill->role() == erTopSolidInfill || fill->role() == erGapFill) continue; // these cannot be changed - it is / may be visible - if (volume_to_wipe <= 0.f) - break; - if (!fill->is_extruder_overridden(copy) && fill->total_volume() > min_infill_volume) { // this infill will be used to wipe this extruder - fill->set_extruder_override(copy, new_extruder); - volume_to_wipe -= fill->total_volume(); - } + if (/*!fill->is_extruder_overridden(copy)*/ !layer_tools.wiping_extrusions.is_entity_overridden(fill, copy) && fill->total_volume() > min_infill_volume) { // this infill will be used to wipe this extruder + layer_tools.wiping_extrusions.set_extruder_override(fill, copy, new_extruder, num_of_copies); + volume_to_wipe -= fill->total_volume(); } } + } - if (objects[i]->config.wipe_into_objects) - { - ExtrusionEntityCollection& eec = this_layer->regions[region_id]->perimeters; - for (ExtrusionEntity* ee : eec.entities) { // iterate through all perimeter Collections - auto* fill = dynamic_cast(ee); - if (volume_to_wipe <= 0.f) - break; - if (!fill->is_extruder_overridden(copy) && fill->total_volume() > min_infill_volume) { - fill->set_extruder_override(copy, new_extruder); - volume_to_wipe -= fill->total_volume(); - } + if (objects[i]->config.wipe_into_objects) + { + ExtrusionEntityCollection& eec = this_layer->regions[region_id]->perimeters; + for (ExtrusionEntity* ee : eec.entities) { // iterate through all perimeter Collections + if (volume_to_wipe <= 0.f) + break; + auto* fill = dynamic_cast(ee); + if (/*!fill->is_extruder_overridden(copy)*/ !layer_tools.wiping_extrusions.is_entity_overridden(fill, copy) && fill->total_volume() > min_infill_volume) { + layer_tools.wiping_extrusions.set_extruder_override(fill, copy, new_extruder, num_of_copies); + volume_to_wipe -= fill->total_volume(); } } } } } } - return std::max(0.f, volume_to_wipe); } diff --git a/xs/src/libslic3r/Print.hpp b/xs/src/libslic3r/Print.hpp index 77787063e..57b1f4015 100644 --- a/xs/src/libslic3r/Print.hpp +++ b/xs/src/libslic3r/Print.hpp @@ -317,10 +317,7 @@ private: // This function goes through all infill entities, decides which ones will be used for wiping and // marks them by the extruder id. Returns volume that remains to be wiped on the wipe tower: - float mark_wiping_extrusions(const ToolOrdering::LayerTools& layer_tools, unsigned int new_extruder, float volume_to_wipe); - - // A function to go through all entities and unsets their extruder_override flag - void reset_wiping_extrusions(); + float mark_wiping_extrusions(ToolOrdering::LayerTools& layer_tools, unsigned int new_extruder, float volume_to_wipe); // Has the calculation been canceled? tbb::atomic m_canceled; From 6b2b970b9ae1f00b6c1fd4bcbb4e01c15860918e Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 20 Jun 2018 13:57:37 +0200 Subject: [PATCH 028/198] Added machine evelope configuration parameters (the MachineEnvelopeConfig class). Added localization support for libslic3r through a callback (the callback is not registered yet, so the localization does nothing). Localized the Print::validate() error messages. --- xs/src/libslic3r/Config.hpp | 2 + xs/src/libslic3r/GCode.cpp | 2 +- xs/src/libslic3r/I18N.hpp | 16 ++++++ xs/src/libslic3r/Print.cpp | 57 ++++++++++----------- xs/src/libslic3r/PrintConfig.cpp | 85 +++++++++++++++++++++++++++++++- xs/src/libslic3r/PrintConfig.hpp | 53 +++++++++++++++++++- xs/src/libslic3r/utils.cpp | 4 ++ xs/xsp/Config.xsp | 6 +-- xs/xsp/Print.xsp | 2 +- 9 files changed, 189 insertions(+), 38 deletions(-) create mode 100644 xs/src/libslic3r/I18N.hpp diff --git a/xs/src/libslic3r/Config.hpp b/xs/src/libslic3r/Config.hpp index bde1eb651..377bdbea4 100644 --- a/xs/src/libslic3r/Config.hpp +++ b/xs/src/libslic3r/Config.hpp @@ -291,6 +291,8 @@ public: ConfigOptionFloats() : ConfigOptionVector() {} explicit ConfigOptionFloats(size_t n, double value) : ConfigOptionVector(n, value) {} explicit ConfigOptionFloats(std::initializer_list il) : ConfigOptionVector(std::move(il)) {} + explicit ConfigOptionFloats(const std::vector &vec) : ConfigOptionVector(vec) {} + explicit ConfigOptionFloats(std::vector &&vec) : ConfigOptionVector(std::move(vec)) {} static ConfigOptionType static_type() { return coFloats; } ConfigOptionType type() const override { return static_type(); } diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index b581b3e76..479af7abe 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1411,7 +1411,7 @@ void GCode::apply_print_config(const PrintConfig &print_config) void GCode::append_full_config(const Print& print, std::string& str) { - const StaticPrintConfig *configs[] = { &print.config, &print.default_object_config, &print.default_region_config }; + const StaticPrintConfig *configs[] = { static_cast(&print.config), &print.default_object_config, &print.default_region_config }; for (size_t i = 0; i < sizeof(configs) / sizeof(configs[0]); ++i) { const StaticPrintConfig *cfg = configs[i]; for (const std::string &key : cfg->keys()) diff --git a/xs/src/libslic3r/I18N.hpp b/xs/src/libslic3r/I18N.hpp new file mode 100644 index 000000000..bc9345f11 --- /dev/null +++ b/xs/src/libslic3r/I18N.hpp @@ -0,0 +1,16 @@ +#ifndef slic3r_I18N_hpp_ +#define slic3r_I18N_hpp_ + +#include + +namespace Slic3r { + +typedef std::string (*translate_fn_type)(const char*); +extern translate_fn_type translate_fn; +inline void set_translate_callback(translate_fn_type fn) { translate_fn = fn; } +inline std::string translate(const std::string &s) { return (translate_fn == nullptr) ? s : (*translate_fn)(s.c_str()); } +inline std::string translate(const char *ptr) { return (translate_fn == nullptr) ? std::string(ptr) : (*translate_fn)(ptr); } + +} // namespace Slic3r + +#endif /* slic3r_I18N_hpp_ */ diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index 08802139d..c8d3ccde1 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -4,6 +4,7 @@ #include "Extruder.hpp" #include "Flow.hpp" #include "Geometry.hpp" +#include "I18N.hpp" #include "SupportMaterial.hpp" #include "GCode/WipeTowerPrusaMM.hpp" #include @@ -11,6 +12,10 @@ #include #include +//! macro used to mark string used at localization, +//! return same string +#define L(s) translate(s) + namespace Slic3r { template class PrintState; @@ -523,7 +528,7 @@ std::string Print::validate() const print_volume.min.z = -1e10; for (PrintObject *po : this->objects) { if (!print_volume.contains(po->model_object()->tight_bounding_box(false))) - return "Some objects are outside of the print volume."; + return L("Some objects are outside of the print volume."); } if (this->config.complete_objects) { @@ -550,7 +555,7 @@ std::string Print::validate() const Polygon p = convex_hull; p.translate(copy); if (! intersection(convex_hulls_other, p).empty()) - return "Some objects are too close; your extruder will collide with them."; + return L("Some objects are too close; your extruder will collide with them."); polygons_append(convex_hulls_other, p); } } @@ -565,7 +570,7 @@ std::string Print::validate() const // it will be printed as last one so its height doesn't matter. object_height.pop_back(); if (! object_height.empty() && object_height.back() > scale_(this->config.extruder_clearance_height.value)) - return "Some objects are too tall and cannot be printed without extruder collisions."; + return L("Some objects are too tall and cannot be printed without extruder collisions."); } } // end if (this->config.complete_objects) @@ -575,27 +580,22 @@ std::string Print::validate() const total_copies_count += object->copies().size(); // #4043 if (total_copies_count > 1 && ! this->config.complete_objects.value) - return "The Spiral Vase option can only be used when printing a single object."; + return L("The Spiral Vase option can only be used when printing a single object."); if (this->regions.size() > 1) - return "The Spiral Vase option can only be used when printing single material objects."; + return L("The Spiral Vase option can only be used when printing single material objects."); } if (this->config.single_extruder_multi_material) { for (size_t i=1; iconfig.nozzle_diameter.values.size(); ++i) if (this->config.nozzle_diameter.values[i] != this->config.nozzle_diameter.values[i-1]) - return "All extruders must have the same diameter for single extruder multimaterial printer."; + return L("All extruders must have the same diameter for single extruder multimaterial printer."); } if (this->has_wipe_tower() && ! this->objects.empty()) { - #if 0 - for (auto dmr : this->config.nozzle_diameter.values) - if (std::abs(dmr - 0.4) > EPSILON) - return "The Wipe Tower is currently only supported for the 0.4mm nozzle diameter."; - #endif if (this->config.gcode_flavor != gcfRepRap && this->config.gcode_flavor != gcfMarlin) - return "The Wipe Tower is currently only supported for the Marlin and RepRap/Sprinter G-code flavors."; + return L("The Wipe Tower is currently only supported for the Marlin and RepRap/Sprinter G-code flavors."); if (! this->config.use_relative_e_distances) - return "The Wipe Tower is currently only supported with the relative extruder addressing (use_relative_e_distances=1)."; + return L("The Wipe Tower is currently only supported with the relative extruder addressing (use_relative_e_distances=1)."); SlicingParameters slicing_params0 = this->objects.front()->slicing_parameters(); const PrintObject* tallest_object = this->objects.front(); // let's find the tallest object @@ -607,13 +607,13 @@ std::string Print::validate() const SlicingParameters slicing_params = object->slicing_parameters(); if (std::abs(slicing_params.first_print_layer_height - slicing_params0.first_print_layer_height) > EPSILON || std::abs(slicing_params.layer_height - slicing_params0.layer_height ) > EPSILON) - return "The Wipe Tower is only supported for multiple objects if they have equal layer heigths"; + return L("The Wipe Tower is only supported for multiple objects if they have equal layer heigths"); if (slicing_params.raft_layers() != slicing_params0.raft_layers()) - return "The Wipe Tower is only supported for multiple objects if they are printed over an equal number of raft layers"; + return L("The Wipe Tower is only supported for multiple objects if they are printed over an equal number of raft layers"); if (object->config.support_material_contact_distance != this->objects.front()->config.support_material_contact_distance) - return "The Wipe Tower is only supported for multiple objects if they are printed with the same support_material_contact_distance"; + return L("The Wipe Tower is only supported for multiple objects if they are printed with the same support_material_contact_distance"); if (! equal_layering(slicing_params, slicing_params0)) - return "The Wipe Tower is only supported for multiple objects if they are sliced equally."; + return L("The Wipe Tower is only supported for multiple objects if they are sliced equally."); bool was_layer_height_profile_valid = object->layer_height_profile_valid; object->update_layer_height_profile(); object->layer_height_profile_valid = was_layer_height_profile_valid; @@ -637,13 +637,8 @@ std::string Print::validate() const failed = true; if (failed) - return "The Wipe tower is only supported if all objects have the same layer height profile"; + return L("The Wipe tower is only supported if all objects have the same layer height profile"); } - - /*for (size_t i = 5; i < object->layer_height_profile.size(); i += 2) - if (object->layer_height_profile[i-1] > slicing_params.object_print_z_min + EPSILON && - std::abs(object->layer_height_profile[i] - object->config.layer_height) > EPSILON) - return "The Wipe Tower is currently only supported with constant Z layer spacing. Layer editing is not allowed.";*/ } } @@ -651,7 +646,7 @@ std::string Print::validate() const // find the smallest nozzle diameter std::vector extruders = this->extruders(); if (extruders.empty()) - return "The supplied settings will cause an empty print."; + return L("The supplied settings will cause an empty print."); std::vector nozzle_diameters; for (unsigned int extruder_id : extruders) @@ -661,7 +656,7 @@ std::string Print::validate() const unsigned int total_extruders_count = this->config.nozzle_diameter.size(); for (const auto& extruder_idx : extruders) if ( extruder_idx >= total_extruders_count ) - return "One or more object were assigned an extruder that the printer does not have."; + return L("One or more object were assigned an extruder that the printer does not have."); for (PrintObject *object : this->objects) { if ((object->config.support_material_extruder == -1 || object->config.support_material_interface_extruder == -1) && @@ -670,13 +665,13 @@ std::string Print::validate() const // will be printed with the current tool without a forced tool change. Play safe, assert that all object nozzles // are of the same diameter. if (nozzle_diameters.size() > 1) - return "Printing with multiple extruders of differing nozzle diameters. " + return L("Printing with multiple extruders of differing nozzle diameters. " "If support is to be printed with the current extruder (support_material_extruder == 0 or support_material_interface_extruder == 0), " - "all nozzles have to be of the same diameter."; + "all nozzles have to be of the same diameter."); } // validate first_layer_height - double first_layer_height = object->config.get_abs_value("first_layer_height"); + double first_layer_height = object->config.get_abs_value(L("first_layer_height")); double first_layer_min_nozzle_diameter; if (object->config.raft_layers > 0) { // if we have raft layers, only support material extruder is used on first layer @@ -691,11 +686,11 @@ std::string Print::validate() const first_layer_min_nozzle_diameter = min_nozzle_diameter; } if (first_layer_height > first_layer_min_nozzle_diameter) - return "First layer height can't be greater than nozzle diameter"; + return L("First layer height can't be greater than nozzle diameter"); // validate layer_height if (object->config.layer_height.value > min_nozzle_diameter) - return "Layer height can't be greater than nozzle diameter"; + return L("Layer height can't be greater than nozzle diameter"); } } @@ -1212,7 +1207,7 @@ std::string Print::output_filename() try { return this->placeholder_parser.process(this->config.output_filename_format.value, 0); } catch (std::runtime_error &err) { - throw std::runtime_error(std::string("Failed processing of the output_filename_format template.\n") + err.what()); + throw std::runtime_error(L("Failed processing of the output_filename_format template.") + "\n" + err.what()); } } diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index b77a3a76e..c5e520b4f 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -1,7 +1,10 @@ #include "PrintConfig.hpp" +#include "I18N.hpp" #include #include +#include +#include #include #include @@ -11,7 +14,7 @@ namespace Slic3r { //! macro used to mark string used at localization, //! return same string -#define L(s) s +#define L(s) translate(s) PrintConfigDef::PrintConfigDef() { @@ -853,6 +856,85 @@ PrintConfigDef::PrintConfigDef() def->min = 0; def->default_value = new ConfigOptionFloat(0.3); + { + struct AxisDefault { + std::string name; + std::vector max_feedrate; + std::vector max_acceleration; + std::vector max_jerk; + }; + std::vector axes { + // name, max_feedrate, max_acceleration, max_jerk + { "x", { 200., 200. }, { 1000., 1000. }, { 10., 10. } }, + { "y", { 200., 200. }, { 1000., 1000. }, { 10., 10. } }, + { "z", { 12., 12. }, { 200., 200. }, { 0.4, 0.4 } }, + { "e", { 120., 120. }, { 5000., 5000. }, { 2.5, 2.5 } } + }; + for (const AxisDefault &axis : axes) { + std::string axis_upper = boost::to_upper_copy(axis.name); + // Add the machine feedrate limits for XYZE axes. (M203) + def = this->add("machine_max_feedrate_" + axis.name, coFloats); + def->label = (boost::format(L("Maximum feedrate %1%")) % axis_upper).str(); + def->category = L("Machine limits"); + def->tooltip = (boost::format(L("Maximum feedrate of the %1% axis")) % axis_upper).str(); + def->sidetext = L("mm/s"); + def->min = 0; + def->default_value = new ConfigOptionFloats(axis.max_feedrate); + // Add the machine acceleration limits for XYZE axes (M201) + def = this->add("machine_max_acceleration_" + axis.name, coFloats); + def->label = (boost::format(L("Maximum acceleration %1%")) % axis_upper).str(); + def->category = L("Machine limits"); + def->tooltip = (boost::format(L("Maximum acceleration of the %1% axis")) % axis_upper).str(); + def->sidetext = L("mm/s²"); + def->min = 0; + def->default_value = new ConfigOptionFloats(axis.max_acceleration); + // Add the machine jerk limits for XYZE axes (M205) + def = this->add("machine_max_jerk_" + axis.name, coFloats); + def->label = (boost::format(L("Maximum jerk %1%")) % axis_upper).str(); + def->category = L("Machine limits"); + def->tooltip = (boost::format(L("Maximum jerk of the %1% axis")) % axis_upper).str(); + def->sidetext = L("mm/s"); + def->min = 0; + def->default_value = new ConfigOptionFloats(axis.max_jerk); + } + } + + // M205 S... [mm/sec] + def = this->add("machine_min_extruding_rate", coFloats); + def->label = L("Minimum feedrate when extruding"); + def->category = L("Machine limits"); + def->tooltip = L("Minimum feedrate when extruding") + " (M205 S)"; + def->sidetext = L("mm/s"); + def->min = 0; + def->default_value = new ConfigOptionFloats(0., 0.); + + // M205 T... [mm/sec] + def = this->add("machine_min_travel_rate", coFloats); + def->label = L("Minimum travel feedrate"); + def->category = L("Machine limits"); + def->tooltip = L("Minimum travel feedrate") + " (M205 T)"; + def->sidetext = L("mm/s"); + def->min = 0; + def->default_value = new ConfigOptionFloats(0., 0.); + + // M204 S... [mm/sec^2] + def = this->add("machine_max_acceleration_extruding", coFloats); + def->label = L("Maximum acceleration when extruding"); + def->category = L("Machine limits"); + def->tooltip = L("Maximum acceleration when extruding") + " (M204 S)"; + def->sidetext = L("mm/s²"); + def->min = 0; + def->default_value = new ConfigOptionFloats(1250., 1250.); + + // M204 T... [mm/sec^2] + def = this->add("machine_max_acceleration_retracting", coFloats); + def->label = L("Maximum acceleration when retracting"); + def->category = L("Machine limits"); + def->tooltip = L("Maximum acceleration when retracting") + " (M204 T)"; + def->sidetext = L("mm/s²"); + def->min = 0; + def->default_value = new ConfigOptionFloats(1250., 1250.); + def = this->add("max_fan_speed", coInts); def->label = L("Max"); def->tooltip = L("This setting represents the maximum speed of your fan."); @@ -2198,6 +2280,7 @@ std::string FullPrintConfig::validate() // Declare the static caches for each StaticPrintConfig derived class. StaticPrintConfig::StaticCache PrintObjectConfig::s_cache_PrintObjectConfig; StaticPrintConfig::StaticCache PrintRegionConfig::s_cache_PrintRegionConfig; +StaticPrintConfig::StaticCache MachineEnvelopeConfig::s_cache_MachineEnvelopeConfig; StaticPrintConfig::StaticCache GCodeConfig::s_cache_GCodeConfig; StaticPrintConfig::StaticCache PrintConfig::s_cache_PrintConfig; StaticPrintConfig::StaticCache HostConfig::s_cache_HostConfig; diff --git a/xs/src/libslic3r/PrintConfig.hpp b/xs/src/libslic3r/PrintConfig.hpp index 2e36ca665..f3be03c2a 100644 --- a/xs/src/libslic3r/PrintConfig.hpp +++ b/xs/src/libslic3r/PrintConfig.hpp @@ -455,6 +455,56 @@ protected: } }; +class MachineEnvelopeConfig : public StaticPrintConfig +{ + STATIC_PRINT_CONFIG_CACHE(MachineEnvelopeConfig) +public: + // M201 X... Y... Z... E... [mm/sec^2] + ConfigOptionFloats machine_max_acceleration_x; + ConfigOptionFloats machine_max_acceleration_y; + ConfigOptionFloats machine_max_acceleration_z; + ConfigOptionFloats machine_max_acceleration_e; + // M203 X... Y... Z... E... [mm/sec] + ConfigOptionFloats machine_max_feedrate_x; + ConfigOptionFloats machine_max_feedrate_y; + ConfigOptionFloats machine_max_feedrate_z; + ConfigOptionFloats machine_max_feedrate_e; + // M204 S... [mm/sec^2] + ConfigOptionFloats machine_max_acceleration_extruding; + // M204 T... [mm/sec^2] + ConfigOptionFloats machine_max_acceleration_retracting; + // M205 X... Y... Z... E... [mm/sec] + ConfigOptionFloats machine_max_jerk_x; + ConfigOptionFloats machine_max_jerk_y; + ConfigOptionFloats machine_max_jerk_z; + ConfigOptionFloats machine_max_jerk_e; + // M205 T... [mm/sec] + ConfigOptionFloats machine_min_travel_rate; + // M205 S... [mm/sec] + ConfigOptionFloats machine_min_extruding_rate; + +protected: + void initialize(StaticCacheBase &cache, const char *base_ptr) + { + OPT_PTR(machine_max_acceleration_x); + OPT_PTR(machine_max_acceleration_y); + OPT_PTR(machine_max_acceleration_z); + OPT_PTR(machine_max_acceleration_e); + OPT_PTR(machine_max_feedrate_x); + OPT_PTR(machine_max_feedrate_y); + OPT_PTR(machine_max_feedrate_z); + OPT_PTR(machine_max_feedrate_e); + OPT_PTR(machine_max_acceleration_extruding); + OPT_PTR(machine_max_acceleration_retracting); + OPT_PTR(machine_max_jerk_x); + OPT_PTR(machine_max_jerk_y); + OPT_PTR(machine_max_jerk_z); + OPT_PTR(machine_max_jerk_e); + OPT_PTR(machine_min_travel_rate); + OPT_PTR(machine_min_extruding_rate); + } +}; + // This object is mapped to Perl as Slic3r::Config::GCode. class GCodeConfig : public StaticPrintConfig { @@ -566,7 +616,7 @@ protected: }; // This object is mapped to Perl as Slic3r::Config::Print. -class PrintConfig : public GCodeConfig +class PrintConfig : public MachineEnvelopeConfig, public GCodeConfig { STATIC_PRINT_CONFIG_CACHE_DERIVED(PrintConfig) PrintConfig() : GCodeConfig(0) { initialize_cache(); *this = s_cache_PrintConfig.defaults(); } @@ -642,6 +692,7 @@ protected: PrintConfig(int) : GCodeConfig(1) {} void initialize(StaticCacheBase &cache, const char *base_ptr) { + this->MachineEnvelopeConfig::initialize(cache, base_ptr); this->GCodeConfig::initialize(cache, base_ptr); OPT_PTR(avoid_crossing_perimeters); OPT_PTR(bed_shape); diff --git a/xs/src/libslic3r/utils.cpp b/xs/src/libslic3r/utils.cpp index 745d07fcd..2d177da3c 100644 --- a/xs/src/libslic3r/utils.cpp +++ b/xs/src/libslic3r/utils.cpp @@ -1,4 +1,5 @@ #include "Utils.hpp" +#include "I18N.hpp" #include #include @@ -123,6 +124,9 @@ const std::string& localization_dir() return g_local_dir; } +// Translate function callback, to call wxWidgets translate function to convert non-localized UTF8 string to a localized one. +translate_fn_type translate_fn = nullptr; + static std::string g_data_dir; void set_data_dir(const std::string &dir) diff --git a/xs/xsp/Config.xsp b/xs/xsp/Config.xsp index 6adfc49a2..b8ad84ba4 100644 --- a/xs/xsp/Config.xsp +++ b/xs/xsp/Config.xsp @@ -74,13 +74,13 @@ static StaticPrintConfig* new_GCodeConfig() %code{% RETVAL = new GCodeConfig(); %}; static StaticPrintConfig* new_PrintConfig() - %code{% RETVAL = new PrintConfig(); %}; + %code{% RETVAL = static_cast(new PrintConfig()); %}; static StaticPrintConfig* new_PrintObjectConfig() %code{% RETVAL = new PrintObjectConfig(); %}; static StaticPrintConfig* new_PrintRegionConfig() %code{% RETVAL = new PrintRegionConfig(); %}; static StaticPrintConfig* new_FullPrintConfig() - %code{% RETVAL = static_cast(new FullPrintConfig()); %}; + %code{% RETVAL = static_cast(new FullPrintConfig()); %}; ~StaticPrintConfig(); bool has(t_config_option_key opt_key); SV* as_hash() @@ -119,7 +119,7 @@ auto config = new FullPrintConfig(); try { config->load(path); - RETVAL = static_cast(config); + RETVAL = static_cast(config); } catch (std::exception& e) { delete config; croak("Error extracting configuration from %s:\n%s\n", path, e.what()); diff --git a/xs/xsp/Print.xsp b/xs/xsp/Print.xsp index b53b5e82d..e336131d0 100644 --- a/xs/xsp/Print.xsp +++ b/xs/xsp/Print.xsp @@ -133,7 +133,7 @@ _constant() ~Print(); Ref config() - %code%{ RETVAL = &THIS->config; %}; + %code%{ RETVAL = static_cast(&THIS->config); %}; Ref default_object_config() %code%{ RETVAL = &THIS->default_object_config; %}; Ref default_region_config() From fd4feb689ea1b21380c492264d305bc91b4cc5b2 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Wed, 20 Jun 2018 14:20:48 +0200 Subject: [PATCH 029/198] Added prototype for "Kinematics" Page + Added enum_labels to localizations + Added bold font for the name of Options Groups --- xs/src/libslic3r/PrintConfig.cpp | 61 +++++++++++++++------------- xs/src/slic3r/GUI/GUI.cpp | 22 ++++++++++ xs/src/slic3r/GUI/GUI.hpp | 5 ++- xs/src/slic3r/GUI/OptionsGroup.hpp | 4 +- xs/src/slic3r/GUI/Preset.cpp | 3 +- xs/src/slic3r/GUI/Tab.cpp | 64 +++++++++++++++++++++++++++++- xs/src/slic3r/GUI/Tab.hpp | 1 + 7 files changed, 129 insertions(+), 31 deletions(-) diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index b77a3a76e..6a859096f 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -283,11 +283,11 @@ PrintConfigDef::PrintConfigDef() def->enum_values.push_back("hilbertcurve"); def->enum_values.push_back("archimedeanchords"); def->enum_values.push_back("octagramspiral"); - def->enum_labels.push_back("Rectilinear"); - def->enum_labels.push_back("Concentric"); - def->enum_labels.push_back("Hilbert Curve"); - def->enum_labels.push_back("Archimedean Chords"); - def->enum_labels.push_back("Octagram Spiral"); + def->enum_labels.push_back(L("Rectilinear")); + def->enum_labels.push_back(L("Concentric")); + def->enum_labels.push_back(L("Hilbert Curve")); + def->enum_labels.push_back(L("Archimedean Chords")); + def->enum_labels.push_back(L("Octagram Spiral")); // solid_fill_pattern is an obsolete equivalent to external_fill_pattern. def->aliases.push_back("solid_fill_pattern"); def->default_value = new ConfigOptionEnum(ipRectilinear); @@ -617,19 +617,19 @@ PrintConfigDef::PrintConfigDef() def->enum_values.push_back("hilbertcurve"); def->enum_values.push_back("archimedeanchords"); def->enum_values.push_back("octagramspiral"); - def->enum_labels.push_back("Rectilinear"); - def->enum_labels.push_back("Grid"); - def->enum_labels.push_back("Triangles"); - def->enum_labels.push_back("Stars"); - def->enum_labels.push_back("Cubic"); - def->enum_labels.push_back("Line"); - def->enum_labels.push_back("Concentric"); - def->enum_labels.push_back("Honeycomb"); - def->enum_labels.push_back("3D Honeycomb"); - def->enum_labels.push_back("Gyroid"); - def->enum_labels.push_back("Hilbert Curve"); - def->enum_labels.push_back("Archimedean Chords"); - def->enum_labels.push_back("Octagram Spiral"); + def->enum_labels.push_back(L("Rectilinear")); + def->enum_labels.push_back(L("Grid")); + def->enum_labels.push_back(L("Triangles")); + def->enum_labels.push_back(L("Stars")); + def->enum_labels.push_back(L("Cubic")); + def->enum_labels.push_back(L("Line")); + def->enum_labels.push_back(L("Concentric")); + def->enum_labels.push_back(L("Honeycomb")); + def->enum_labels.push_back(L("3D Honeycomb")); + def->enum_labels.push_back(L("Gyroid")); + def->enum_labels.push_back(L("Hilbert Curve")); + def->enum_labels.push_back(L("Archimedean Chords")); + def->enum_labels.push_back(L("Octagram Spiral")); def->default_value = new ConfigOptionEnum(ipStars); def = this->add("first_layer_acceleration", coFloat); @@ -737,7 +737,7 @@ PrintConfigDef::PrintConfigDef() def->enum_labels.push_back("Mach3/LinuxCNC"); def->enum_labels.push_back("Machinekit"); def->enum_labels.push_back("Smoothie"); - def->enum_labels.push_back("No extrusion"); + def->enum_labels.push_back(L("No extrusion")); def->default_value = new ConfigOptionEnum(gcfMarlin); def = this->add("infill_acceleration", coFloat); @@ -1265,10 +1265,10 @@ PrintConfigDef::PrintConfigDef() def->enum_values.push_back("nearest"); def->enum_values.push_back("aligned"); def->enum_values.push_back("rear"); - def->enum_labels.push_back("Random"); - def->enum_labels.push_back("Nearest"); - def->enum_labels.push_back("Aligned"); - def->enum_labels.push_back("Rear"); + def->enum_labels.push_back(L("Random")); + def->enum_labels.push_back(L("Nearest")); + def->enum_labels.push_back(L("Aligned")); + def->enum_labels.push_back(L("Rear")); def->default_value = new ConfigOptionEnum(spAligned); #if 0 @@ -1481,7 +1481,14 @@ PrintConfigDef::PrintConfigDef() def->label = L("Single Extruder Multi Material"); def->tooltip = L("The printer multiplexes filaments into a single hot end."); def->cli = "single-extruder-multi-material!"; - def->default_value = new ConfigOptionBool(false); + def->default_value = new ConfigOptionBool(false); + + // -- ! Kinematics options + def = this->add("silent_mode", coBool); + def->label = L("Silent mode"); + def->tooltip = L("Set silent mode for the G-code flavor"); + def->default_value = new ConfigOptionBool(true); + // -- ! def = this->add("support_material", coBool); def->label = L("Generate support material"); @@ -1621,9 +1628,9 @@ PrintConfigDef::PrintConfigDef() def->enum_values.push_back("rectilinear"); def->enum_values.push_back("rectilinear-grid"); def->enum_values.push_back("honeycomb"); - def->enum_labels.push_back("rectilinear"); - def->enum_labels.push_back("rectilinear grid"); - def->enum_labels.push_back("honeycomb"); + def->enum_labels.push_back(L("Rectilinear")); + def->enum_labels.push_back(L("Rectilinear grid")); + def->enum_labels.push_back(L("Honeycomb")); def->default_value = new ConfigOptionEnum(smpRectilinear); def = this->add("support_material_spacing", coFloat); diff --git a/xs/src/slic3r/GUI/GUI.cpp b/xs/src/slic3r/GUI/GUI.cpp index e2f3925fc..1751f4548 100644 --- a/xs/src/slic3r/GUI/GUI.cpp +++ b/xs/src/slic3r/GUI/GUI.cpp @@ -117,6 +117,9 @@ std::vector g_tabs_list; wxLocale* g_wxLocale; +wxFont g_small_font; +wxFont g_bold_font; + std::shared_ptr m_optgroup; double m_brim_width = 0.0; wxButton* g_wiping_dialog_button = nullptr; @@ -149,10 +152,21 @@ void update_label_colours_from_appconfig() } } +static void init_fonts() +{ + g_small_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + g_bold_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).Bold(); +#ifdef __WXMAC__ + g_small_font.SetPointSize(11); + g_bold_font.SetPointSize(13); +#endif /*__WXMAC__*/ +} + void set_wxapp(wxApp *app) { g_wxApp = app; init_label_colours(); + init_fonts(); } void set_main_frame(wxFrame *main_frame) @@ -668,6 +682,14 @@ void set_label_clr_sys(const wxColour& clr) { g_AppConfig->save(); } +const wxFont& small_font(){ + return g_small_font; +} + +const wxFont& bold_font(){ + return g_bold_font; +} + const wxColour& get_label_clr_default() { return g_color_label_default; } diff --git a/xs/src/slic3r/GUI/GUI.hpp b/xs/src/slic3r/GUI/GUI.hpp index 285354446..663815f68 100644 --- a/xs/src/slic3r/GUI/GUI.hpp +++ b/xs/src/slic3r/GUI/GUI.hpp @@ -11,7 +11,7 @@ class wxApp; class wxWindow; class wxFrame; -class wxWindow; +class wxFont; class wxMenuBar; class wxNotebook; class wxComboCtrl; @@ -99,6 +99,9 @@ unsigned get_colour_approx_luma(const wxColour &colour); void set_label_clr_modified(const wxColour& clr); void set_label_clr_sys(const wxColour& clr); +const wxFont& small_font(); +const wxFont& bold_font(); + extern void add_menus(wxMenuBar *menu, int event_preferences_changed, int event_language_change); // This is called when closing the application, when loading a config file or when starting the config wizard diff --git a/xs/src/slic3r/GUI/OptionsGroup.hpp b/xs/src/slic3r/GUI/OptionsGroup.hpp index 83b5b1233..f35147642 100644 --- a/xs/src/slic3r/GUI/OptionsGroup.hpp +++ b/xs/src/slic3r/GUI/OptionsGroup.hpp @@ -129,7 +129,9 @@ public: OptionsGroup(wxWindow* _parent, const wxString& title, bool is_tab_opt=false) : m_parent(_parent), title(title), m_is_tab_opt(is_tab_opt), staticbox(title!="") { - sizer = (staticbox ? new wxStaticBoxSizer(new wxStaticBox(_parent, wxID_ANY, title), wxVERTICAL) : new wxBoxSizer(wxVERTICAL)); + auto stb = new wxStaticBox(_parent, wxID_ANY, title); + stb->SetFont(bold_font()); + sizer = (staticbox ? new wxStaticBoxSizer(stb/*new wxStaticBox(_parent, wxID_ANY, title)*/, wxVERTICAL) : new wxBoxSizer(wxVERTICAL)); auto num_columns = 1U; if (label_width != 0) num_columns++; if (extra_column != nullptr) num_columns++; diff --git a/xs/src/slic3r/GUI/Preset.cpp b/xs/src/slic3r/GUI/Preset.cpp index 68982185b..fa29b0fb5 100644 --- a/xs/src/slic3r/GUI/Preset.cpp +++ b/xs/src/slic3r/GUI/Preset.cpp @@ -325,7 +325,8 @@ const std::vector& Preset::printer_options() "octoprint_host", "octoprint_apikey", "octoprint_cafile", "use_firmware_retraction", "use_volumetric_e", "variable_layer_height", "single_extruder_multi_material", "start_gcode", "end_gcode", "before_layer_gcode", "layer_gcode", "toolchange_gcode", "between_objects_gcode", "printer_vendor", "printer_model", "printer_variant", "printer_notes", "cooling_tube_retraction", - "cooling_tube_length", "parking_pos_retraction", "max_print_height", "default_print_profile", "inherits", + "cooling_tube_length", "parking_pos_retraction", "max_print_height", "default_print_profile", "inherits", + "silent_mode" }; s_opts.insert(s_opts.end(), Preset::nozzle_options().begin(), Preset::nozzle_options().end()); } diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 6eabc2f47..574de9afb 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -1627,6 +1627,16 @@ void TabPrinter::build() optgroup = page->new_optgroup(_(L("Firmware"))); optgroup->append_single_option_line("gcode_flavor"); + optgroup->append_single_option_line("silent_mode"); + + optgroup->m_on_change = [this, optgroup](t_config_option_key opt_key, boost::any value){ + wxTheApp->CallAfter([this, opt_key, value](){ + if (opt_key.compare("gcode_flavor") == 0) + build_extruder_pages(); + update_dirty(); + on_value_change(opt_key, value); + }); + }; optgroup = page->new_optgroup(_(L("Advanced"))); optgroup->append_single_option_line("use_relative_e_distances"); @@ -1708,8 +1718,57 @@ void TabPrinter::extruders_count_changed(size_t extruders_count){ on_value_change("extruders_count", extruders_count); } -void TabPrinter::build_extruder_pages(){ +PageShp TabPrinter::create_kinematics_page() +{ + auto page = add_options_page(_(L("Kinematics")), "cog.png", true); + auto optgroup = page->new_optgroup(_(L("Maximum accelerations"))); +// optgroup->append_single_option_line("max_acceleration_x"); +// optgroup->append_single_option_line("max_acceleration_y"); +// optgroup->append_single_option_line("max_acceleration_z"); + + optgroup = page->new_optgroup(_(L("Maximum feedrates"))); +// optgroup->append_single_option_line("max_feedrate_x"); +// optgroup->append_single_option_line("max_feedrate_y"); +// optgroup->append_single_option_line("max_feedrate_z"); + + optgroup = page->new_optgroup(_(L("Starting Acceleration"))); +// optgroup->append_single_option_line("start_acceleration"); +// optgroup->append_single_option_line("start_retract_acceleration"); + + optgroup = page->new_optgroup(_(L("Advanced"))); +// optgroup->append_single_option_line("min_feedrate_for_print_moves"); +// optgroup->append_single_option_line("min_feedrate_for_travel_moves"); +// optgroup->append_single_option_line("max_jerk_x"); +// optgroup->append_single_option_line("max_jerk_y"); +// optgroup->append_single_option_line("max_jerk_z"); + + return page; +} + + +void TabPrinter::build_extruder_pages() +{ size_t n_before_extruders = 2; // Count of pages before Extruder pages + bool is_marlin_flavor = m_config->option>("gcode_flavor")->value == gcfMarlin; + + // Add/delete Kinematics page according to is_marlin_flavor + size_t existed_page = 0; + for (int i = n_before_extruders; i < m_pages.size(); ++i) // first make sure it's not there already + if (m_pages[i]->title().find(_(L("Kinematics"))) != std::string::npos) { + if (!is_marlin_flavor) + m_pages.erase(m_pages.begin() + i); + else + existed_page = i; + break; + } + + if (existed_page < n_before_extruders && is_marlin_flavor){ + auto page = create_kinematics_page(); + m_pages.insert(m_pages.begin() + n_before_extruders, page); + } + + if (is_marlin_flavor) + n_before_extruders++; size_t n_after_single_extruder_MM = 2; // Count of pages after single_extruder_multi_material page if (m_extruders_count_old == m_extruders_count || @@ -1818,6 +1877,9 @@ void TabPrinter::update(){ get_field("toolchange_gcode")->toggle(have_multiple_extruders); get_field("single_extruder_multi_material")->toggle(have_multiple_extruders); + bool is_marlin_flavor = m_config->option>("gcode_flavor")->value == gcfMarlin; + get_field("silent_mode")->toggle(is_marlin_flavor); + for (size_t i = 0; i < m_extruders_count; ++i) { bool have_retract_length = m_config->opt_float("retract_length", i) > 0; diff --git a/xs/src/slic3r/GUI/Tab.hpp b/xs/src/slic3r/GUI/Tab.hpp index d6bf2cf43..ab63bcc78 100644 --- a/xs/src/slic3r/GUI/Tab.hpp +++ b/xs/src/slic3r/GUI/Tab.hpp @@ -330,6 +330,7 @@ public: void update() override; void update_serial_ports(); void extruders_count_changed(size_t extruders_count); + PageShp create_kinematics_page(); void build_extruder_pages(); void on_preset_loaded() override; void init_options_list() override; From b6ebbdb94a1201479f08f2ab901d4cd74c48119e Mon Sep 17 00:00:00 2001 From: YuSanka Date: Wed, 20 Jun 2018 16:30:55 +0200 Subject: [PATCH 030/198] Updated "Machine limits"(Kinematics) page according to the new config --- xs/src/libslic3r/PrintConfig.cpp | 8 ++-- xs/src/slic3r/GUI/Preset.cpp | 6 ++- xs/src/slic3r/GUI/Tab.cpp | 74 +++++++++++++++++++++++++------- 3 files changed, 68 insertions(+), 20 deletions(-) diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 9e384898c..54aa3b424 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -906,7 +906,7 @@ PrintConfigDef::PrintConfigDef() def->tooltip = L("Minimum feedrate when extruding") + " (M205 S)"; def->sidetext = L("mm/s"); def->min = 0; - def->default_value = new ConfigOptionFloats(0., 0.); + def->default_value = new ConfigOptionFloats{ 0., 0. }; // M205 T... [mm/sec] def = this->add("machine_min_travel_rate", coFloats); @@ -915,7 +915,7 @@ PrintConfigDef::PrintConfigDef() def->tooltip = L("Minimum travel feedrate") + " (M205 T)"; def->sidetext = L("mm/s"); def->min = 0; - def->default_value = new ConfigOptionFloats(0., 0.); + def->default_value = new ConfigOptionFloats{ 0., 0. }; // M204 S... [mm/sec^2] def = this->add("machine_max_acceleration_extruding", coFloats); @@ -1620,8 +1620,8 @@ PrintConfigDef::PrintConfigDef() def->min = 0; def->enum_values.push_back("0"); def->enum_values.push_back("0.2"); - def->enum_labels.push_back("0 (soluble)"); - def->enum_labels.push_back("0.2 (detachable)"); + def->enum_labels.push_back((boost::format("0 (%1%)") % L("soluble")).str()); + def->enum_labels.push_back((boost::format("0.2 (%1%)") % L("detachable")).str()); def->default_value = new ConfigOptionFloat(0.2); def = this->add("support_material_enforce_layers", coInt); diff --git a/xs/src/slic3r/GUI/Preset.cpp b/xs/src/slic3r/GUI/Preset.cpp index fa29b0fb5..98c5914e2 100644 --- a/xs/src/slic3r/GUI/Preset.cpp +++ b/xs/src/slic3r/GUI/Preset.cpp @@ -326,7 +326,11 @@ const std::vector& Preset::printer_options() "single_extruder_multi_material", "start_gcode", "end_gcode", "before_layer_gcode", "layer_gcode", "toolchange_gcode", "between_objects_gcode", "printer_vendor", "printer_model", "printer_variant", "printer_notes", "cooling_tube_retraction", "cooling_tube_length", "parking_pos_retraction", "max_print_height", "default_print_profile", "inherits", - "silent_mode" + "silent_mode","machine_max_acceleration_extruding", "machine_max_acceleration_retracting", + "machine_max_acceleration_x", "machine_max_acceleration_y", "machine_max_acceleration_z", "machine_max_acceleration_e", + "machine_max_feedrate_x", "machine_max_feedrate_y", "machine_max_feedrate_z", "machine_max_feedrate_e", + "machine_min_extruding_rate", "machine_min_travel_rate", + "machine_max_jerk_x", "machine_max_jerk_y", "machine_max_jerk_z", "machine_max_jerk_e" }; s_opts.insert(s_opts.end(), Preset::nozzle_options().begin(), Preset::nozzle_options().end()); } diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 574de9afb..33636c709 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -1720,27 +1720,71 @@ void TabPrinter::extruders_count_changed(size_t extruders_count){ PageShp TabPrinter::create_kinematics_page() { - auto page = add_options_page(_(L("Kinematics")), "cog.png", true); + auto page = add_options_page(_(L("Machine limits")), "cog.png", true); auto optgroup = page->new_optgroup(_(L("Maximum accelerations"))); -// optgroup->append_single_option_line("max_acceleration_x"); -// optgroup->append_single_option_line("max_acceleration_y"); -// optgroup->append_single_option_line("max_acceleration_z"); + auto line = Line{ _(L("Standard/Silent mode")), "" }; + line.append_option(optgroup->get_option("machine_max_acceleration_x", 0)); + line.append_option(optgroup->get_option("machine_max_acceleration_x", 1)); + optgroup->append_line(line); + line = Line{ "", "" }; + line.append_option(optgroup->get_option("machine_max_acceleration_y", 0)); + line.append_option(optgroup->get_option("machine_max_acceleration_y", 1)); + optgroup->append_line(line); + line = Line{ _(L("Standard/Silent mode")), "" }; + line.append_option(optgroup->get_option("machine_max_acceleration_z", 0)); + line.append_option(optgroup->get_option("machine_max_acceleration_z", 1)); + optgroup->append_line(line); + line = Line{ _(L("Standard/Silent mode")), "" }; + line.append_option(optgroup->get_option("machine_max_acceleration_e", 0)); + line.append_option(optgroup->get_option("machine_max_acceleration_e", 1)); + optgroup->append_line(line); +// optgroup->append_single_option_line("machine_max_acceleration_x", 0); +// optgroup->append_single_option_line("machine_max_acceleration_y", 0); +// optgroup->append_single_option_line("machine_max_acceleration_z", 0); +// optgroup->append_single_option_line("machine_max_acceleration_e", 0); optgroup = page->new_optgroup(_(L("Maximum feedrates"))); -// optgroup->append_single_option_line("max_feedrate_x"); -// optgroup->append_single_option_line("max_feedrate_y"); -// optgroup->append_single_option_line("max_feedrate_z"); + optgroup->append_single_option_line("machine_max_feedrate_x", 0); + optgroup->append_single_option_line("machine_max_feedrate_y", 0); + optgroup->append_single_option_line("machine_max_feedrate_z", 0); + optgroup->append_single_option_line("machine_max_feedrate_e", 0); optgroup = page->new_optgroup(_(L("Starting Acceleration"))); -// optgroup->append_single_option_line("start_acceleration"); -// optgroup->append_single_option_line("start_retract_acceleration"); + optgroup->append_single_option_line("machine_max_acceleration_extruding", 0); + optgroup->append_single_option_line("machine_max_acceleration_retracting", 0); optgroup = page->new_optgroup(_(L("Advanced"))); -// optgroup->append_single_option_line("min_feedrate_for_print_moves"); -// optgroup->append_single_option_line("min_feedrate_for_travel_moves"); -// optgroup->append_single_option_line("max_jerk_x"); -// optgroup->append_single_option_line("max_jerk_y"); -// optgroup->append_single_option_line("max_jerk_z"); + optgroup->append_single_option_line("machine_min_extruding_rate", 0); + optgroup->append_single_option_line("machine_min_travel_rate", 0); + optgroup->append_single_option_line("machine_max_jerk_x", 0); + optgroup->append_single_option_line("machine_max_jerk_y", 0); + optgroup->append_single_option_line("machine_max_jerk_z", 0); + optgroup->append_single_option_line("machine_max_jerk_e", 0); + + //for silent mode +// optgroup = page->new_optgroup(_(L("Maximum accelerations"))); +// optgroup->append_single_option_line("machine_max_acceleration_x", 1); +// optgroup->append_single_option_line("machine_max_acceleration_y", 1); +// optgroup->append_single_option_line("machine_max_acceleration_z", 1); +// optgroup->append_single_option_line("machine_max_acceleration_e", 1); + + optgroup = page->new_optgroup(_(L("Maximum feedrates (Silent mode)"))); + optgroup->append_single_option_line("machine_max_feedrate_x", 1); + optgroup->append_single_option_line("machine_max_feedrate_y", 1); + optgroup->append_single_option_line("machine_max_feedrate_z", 1); + optgroup->append_single_option_line("machine_max_feedrate_e", 1); + + optgroup = page->new_optgroup(_(L("Starting Acceleration (Silent mode)"))); + optgroup->append_single_option_line("machine_max_acceleration_extruding", 1); + optgroup->append_single_option_line("machine_max_acceleration_retracting", 1); + + optgroup = page->new_optgroup(_(L("Advanced (Silent mode)"))); + optgroup->append_single_option_line("machine_min_extruding_rate", 1); + optgroup->append_single_option_line("machine_min_travel_rate", 1); + optgroup->append_single_option_line("machine_max_jerk_x", 1); + optgroup->append_single_option_line("machine_max_jerk_y", 1); + optgroup->append_single_option_line("machine_max_jerk_z", 1); + optgroup->append_single_option_line("machine_max_jerk_e", 1); return page; } @@ -1754,7 +1798,7 @@ void TabPrinter::build_extruder_pages() // Add/delete Kinematics page according to is_marlin_flavor size_t existed_page = 0; for (int i = n_before_extruders; i < m_pages.size(); ++i) // first make sure it's not there already - if (m_pages[i]->title().find(_(L("Kinematics"))) != std::string::npos) { + if (m_pages[i]->title().find(_(L("Machine limits"))) != std::string::npos) { if (!is_marlin_flavor) m_pages.erase(m_pages.begin() + i); else From 02d4f3e14d0347e9bddd8d7c6d8ffaa7ad19010e Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 20 Jun 2018 18:33:46 +0200 Subject: [PATCH 031/198] Provide a callback to libslic3r to translate texts. Moved the "translate" functions to namespaces to avoid clashes between the code in libslic3r and Slic3r GUI projects. --- resources/localization/list.txt | 1 + xs/src/libslic3r/I18N.hpp | 12 +++++++----- xs/src/libslic3r/PrintConfig.cpp | 2 +- xs/src/libslic3r/utils.cpp | 2 +- xs/src/slic3r/GUI/GUI.cpp | 6 +++++- xs/src/slic3r/GUI/GUI.hpp | 13 ++++++++----- 6 files changed, 23 insertions(+), 13 deletions(-) diff --git a/resources/localization/list.txt b/resources/localization/list.txt index 0fd528994..bc545b1bf 100644 --- a/resources/localization/list.txt +++ b/resources/localization/list.txt @@ -21,6 +21,7 @@ xs/src/slic3r/GUI/UpdateDialogs.cpp xs/src/slic3r/GUI/WipeTowerDialog.cpp xs/src/slic3r/Utils/OctoPrint.cpp xs/src/slic3r/Utils/PresetUpdater.cpp +xs/src/libslic3r/Print.cpp xs/src/libslic3r/PrintConfig.cpp xs/src/libslic3r/GCode/PreviewData.cpp lib/Slic3r/GUI.pm diff --git a/xs/src/libslic3r/I18N.hpp b/xs/src/libslic3r/I18N.hpp index bc9345f11..db4fd22df 100644 --- a/xs/src/libslic3r/I18N.hpp +++ b/xs/src/libslic3r/I18N.hpp @@ -5,11 +5,13 @@ namespace Slic3r { -typedef std::string (*translate_fn_type)(const char*); -extern translate_fn_type translate_fn; -inline void set_translate_callback(translate_fn_type fn) { translate_fn = fn; } -inline std::string translate(const std::string &s) { return (translate_fn == nullptr) ? s : (*translate_fn)(s.c_str()); } -inline std::string translate(const char *ptr) { return (translate_fn == nullptr) ? std::string(ptr) : (*translate_fn)(ptr); } +namespace I18N { + typedef std::string (*translate_fn_type)(const char*); + extern translate_fn_type translate_fn; + inline void set_translate_callback(translate_fn_type fn) { translate_fn = fn; } + inline std::string translate(const std::string &s) { return (translate_fn == nullptr) ? s : (*translate_fn)(s.c_str()); } + inline std::string translate(const char *ptr) { return (translate_fn == nullptr) ? std::string(ptr) : (*translate_fn)(ptr); } +} // namespace I18N } // namespace Slic3r diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index c5e520b4f..486e6fe18 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -14,7 +14,7 @@ namespace Slic3r { //! macro used to mark string used at localization, //! return same string -#define L(s) translate(s) +#define L(s) Slic3r::I18N::translate(s) PrintConfigDef::PrintConfigDef() { diff --git a/xs/src/libslic3r/utils.cpp b/xs/src/libslic3r/utils.cpp index 2d177da3c..991118c14 100644 --- a/xs/src/libslic3r/utils.cpp +++ b/xs/src/libslic3r/utils.cpp @@ -125,7 +125,7 @@ const std::string& localization_dir() } // Translate function callback, to call wxWidgets translate function to convert non-localized UTF8 string to a localized one. -translate_fn_type translate_fn = nullptr; +Slic3r::I18N::translate_fn_type Slic3r::I18N::translate_fn = nullptr; static std::string g_data_dir; diff --git a/xs/src/slic3r/GUI/GUI.cpp b/xs/src/slic3r/GUI/GUI.cpp index e2f3925fc..825c37dce 100644 --- a/xs/src/slic3r/GUI/GUI.cpp +++ b/xs/src/slic3r/GUI/GUI.cpp @@ -56,7 +56,7 @@ #include "../Utils/PresetUpdater.hpp" #include "../Config/Snapshot.hpp" - +#include "libslic3r/I18N.hpp" namespace Slic3r { namespace GUI { @@ -149,9 +149,13 @@ void update_label_colours_from_appconfig() } } +static std::string libslic3r_translate_callback(const char *s) { return wxGetTranslation(wxString(s, wxConvUTF8)); } + void set_wxapp(wxApp *app) { g_wxApp = app; + // Let the libslic3r know the callback, which will translate messages on demand. + Slic3r::I18N::set_translate_callback(libslic3r_translate_callback); init_label_colours(); } diff --git a/xs/src/slic3r/GUI/GUI.hpp b/xs/src/slic3r/GUI/GUI.hpp index 285354446..83052cb6e 100644 --- a/xs/src/slic3r/GUI/GUI.hpp +++ b/xs/src/slic3r/GUI/GUI.hpp @@ -33,11 +33,14 @@ class PresetUpdater; class DynamicPrintConfig; class TabIface; -#define _(s) Slic3r::translate((s)) -inline wxString translate(const char *s) { return wxGetTranslation(wxString(s, wxConvUTF8)); } -inline wxString translate(const wchar_t *s) { return wxGetTranslation(s); } -inline wxString translate(const std::string &s) { return wxGetTranslation(wxString(s.c_str(), wxConvUTF8)); } -inline wxString translate(const std::wstring &s) { return wxGetTranslation(s.c_str()); } +#define _(s) Slic3r::GUI::I18N::translate((s)) + +namespace GUI { namespace I18N { + inline wxString translate(const char *s) { return wxGetTranslation(wxString(s, wxConvUTF8)); } + inline wxString translate(const wchar_t *s) { return wxGetTranslation(s); } + inline wxString translate(const std::string &s) { return wxGetTranslation(wxString(s.c_str(), wxConvUTF8)); } + inline wxString translate(const std::wstring &s) { return wxGetTranslation(s.c_str()); } +} } // !!! If you needed to translate some wxString, // !!! please use _(L(string)) From ac011aec6dd2793b1e5590e4dccafa618f378c2d Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 20 Jun 2018 18:55:31 +0200 Subject: [PATCH 032/198] Removed dependencies of libslic3r on Slic3r GUI library. --- xs/src/libslic3r/GCode/PreviewData.cpp | 15 ++++++++------- xs/src/libslic3r/Print.cpp | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/xs/src/libslic3r/GCode/PreviewData.cpp b/xs/src/libslic3r/GCode/PreviewData.cpp index 40f0747b2..3833bca06 100644 --- a/xs/src/libslic3r/GCode/PreviewData.cpp +++ b/xs/src/libslic3r/GCode/PreviewData.cpp @@ -2,7 +2,12 @@ #include "PreviewData.hpp" #include #include -#include "slic3r/GUI/GUI.hpp" +#include + +#include + +//! macro used to mark string used at localization, +#define L(s) (s) namespace Slic3r { @@ -405,7 +410,7 @@ GCodePreviewData::LegendItemsList GCodePreviewData::get_legend_items(const std:: items.reserve(last_valid - first_valid + 1); for (unsigned int i = (unsigned int)first_valid; i <= (unsigned int)last_valid; ++i) { - items.emplace_back(_CHB(extrusion.role_names[i].c_str()).data(), extrusion.role_colors[i]); + items.emplace_back(Slic3r::I18N::translate(extrusion.role_names[i]), extrusion.role_colors[i]); } break; @@ -436,13 +441,9 @@ GCodePreviewData::LegendItemsList GCodePreviewData::get_legend_items(const std:: items.reserve(tools_colors_count); for (unsigned int i = 0; i < tools_colors_count; ++i) { - char buf[MIN_BUF_LENGTH_FOR_L]; - sprintf(buf, _CHB(L("Extruder %d")), i + 1); - GCodePreviewData::Color color; ::memcpy((void*)color.rgba, (const void*)(tool_colors.data() + i * 4), 4 * sizeof(float)); - - items.emplace_back(buf, color); + items.emplace_back((boost::format(Slic3r::I18N::translate(L("Extruder %d"))) % (i + 1)).str(), color); } break; diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index c8d3ccde1..5dc84cc72 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -14,7 +14,7 @@ //! macro used to mark string used at localization, //! return same string -#define L(s) translate(s) +#define L(s) Slic3r::I18N::translate(s) namespace Slic3r { From 3a2b501012419b636b525b341e2c7613c97162e3 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 20 Jun 2018 19:07:55 +0200 Subject: [PATCH 033/198] Fixed compilation on OSX --- xs/src/slic3r/GUI/GUI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/src/slic3r/GUI/GUI.cpp b/xs/src/slic3r/GUI/GUI.cpp index 825c37dce..642866606 100644 --- a/xs/src/slic3r/GUI/GUI.cpp +++ b/xs/src/slic3r/GUI/GUI.cpp @@ -149,7 +149,7 @@ void update_label_colours_from_appconfig() } } -static std::string libslic3r_translate_callback(const char *s) { return wxGetTranslation(wxString(s, wxConvUTF8)); } +static std::string libslic3r_translate_callback(const char *s) { return wxGetTranslation(wxString(s, wxConvUTF8)).utf8_str(); } void set_wxapp(wxApp *app) { From 8abe1b3633b9fe6f304eeac2feb7aeeeae0bf8e8 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 20 Jun 2018 19:26:19 +0200 Subject: [PATCH 034/198] Yet another fix for the OSX. --- xs/src/slic3r/GUI/GUI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/src/slic3r/GUI/GUI.cpp b/xs/src/slic3r/GUI/GUI.cpp index 642866606..0360d73d0 100644 --- a/xs/src/slic3r/GUI/GUI.cpp +++ b/xs/src/slic3r/GUI/GUI.cpp @@ -149,7 +149,7 @@ void update_label_colours_from_appconfig() } } -static std::string libslic3r_translate_callback(const char *s) { return wxGetTranslation(wxString(s, wxConvUTF8)).utf8_str(); } +static std::string libslic3r_translate_callback(const char *s) { return wxGetTranslation(wxString(s, wxConvUTF8)).utf8_str().data(); } void set_wxapp(wxApp *app) { From bc5bd1b42b019d9ff526efaf199dd30034591c44 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Thu, 21 Jun 2018 10:16:52 +0200 Subject: [PATCH 035/198] Assigning of wiping extrusions improved --- xs/src/libslic3r/GCode.cpp | 2 +- xs/src/libslic3r/GCode/ToolOrdering.cpp | 56 +++++++------ xs/src/libslic3r/GCode/ToolOrdering.hpp | 1 - xs/src/libslic3r/Print.cpp | 106 +++++++++++++----------- xs/src/libslic3r/Print.hpp | 10 +++ xs/src/libslic3r/PrintConfig.hpp | 4 +- 6 files changed, 101 insertions(+), 78 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index cd27e3edd..b06232a92 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1239,7 +1239,7 @@ void GCode::process_layer( continue; // This extrusion is part of certain Region, which tells us which extruder should be used for it: - int correct_extruder_id = entity_type=="infills" ? std::max(0, (is_solid_infill(fill->entities.front()->role()) ? region.config.solid_infill_extruder : region.config.infill_extruder) - 1) : + int correct_extruder_id = get_extruder(fill, region); entity_type=="infills" ? std::max(0, (is_solid_infill(fill->entities.front()->role()) ? region.config.solid_infill_extruder : region.config.infill_extruder) - 1) : std::max(region.config.perimeter_extruder.value - 1, 0); // Let's recover vector of extruder overrides: diff --git a/xs/src/libslic3r/GCode/ToolOrdering.cpp b/xs/src/libslic3r/GCode/ToolOrdering.cpp index d2532d72d..719f7a97a 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.cpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.cpp @@ -330,42 +330,44 @@ void ToolOrdering::collect_extruder_statistics(bool prime_multi_material) } } - // This function is called from Print::mark_wiping_extrusions and sets extruder that it should be printed with (-1 .. as usual) - void WipingExtrusions::set_extruder_override(const ExtrusionEntity* entity, unsigned int copy_id, int extruder, unsigned int num_of_copies) { - something_overridden = true; - auto entity_map_it = (entity_map.insert(std::make_pair(entity, std::vector()))).first; // (add and) return iterator - auto& copies_vector = entity_map_it->second; - if (copies_vector.size() < num_of_copies) - copies_vector.resize(num_of_copies, -1); - if (copies_vector[copy_id] != -1) - std::cout << "ERROR: Entity extruder overriden multiple times!!!\n"; // A debugging message - this must never happen. +// This function is called from Print::mark_wiping_extrusions and sets extruder this entity should be printed with (-1 .. as usual) +void WipingExtrusions::set_extruder_override(const ExtrusionEntity* entity, unsigned int copy_id, int extruder, unsigned int num_of_copies) { + something_overridden = true; - copies_vector[copy_id] = extruder; - } + auto entity_map_it = (entity_map.insert(std::make_pair(entity, std::vector()))).first; // (add and) return iterator + auto& copies_vector = entity_map_it->second; + if (copies_vector.size() < num_of_copies) + copies_vector.resize(num_of_copies, -1); + + if (copies_vector[copy_id] != -1) + std::cout << "ERROR: Entity extruder overriden multiple times!!!\n"; // A debugging message - this must never happen. + + copies_vector[copy_id] = extruder; +} - // Following function is called from process_layer and returns pointer to vector with information about which extruders should be used for given copy of this entity. - // It first makes sure the pointer is valid (creates the vector if it does not exist) and contains a record for each copy - // It also modifies the vector in place and changes all -1 to correct_extruder_id (at the time the overrides were created, correct extruders were not known, - // so -1 was used as "print as usual". - // The resulting vector has to keep track of which extrusions are the ones that were overridden and which were not. In the extruder is used as overridden, - // its number is saved as it is (zero-based index). Usual extrusions are saved as -number-1 (unfortunately there is no negative zero). - const std::vector* WipingExtrusions::get_extruder_overrides(const ExtrusionEntity* entity, int correct_extruder_id, int num_of_copies) { - auto entity_map_it = entity_map.find(entity); - if (entity_map_it == entity_map.end()) - entity_map_it = (entity_map.insert(std::make_pair(entity, std::vector()))).first; +// Following function is called from process_layer and returns pointer to vector with information about which extruders should be used for given copy of this entity. +// It first makes sure the pointer is valid (creates the vector if it does not exist) and contains a record for each copy +// It also modifies the vector in place and changes all -1 to correct_extruder_id (at the time the overrides were created, correct extruders were not known, +// so -1 was used as "print as usual". +// The resulting vector has to keep track of which extrusions are the ones that were overridden and which were not. In the extruder is used as overridden, +// its number is saved as it is (zero-based index). Usual extrusions are saved as -number-1 (unfortunately there is no negative zero). +const std::vector* WipingExtrusions::get_extruder_overrides(const ExtrusionEntity* entity, int correct_extruder_id, int num_of_copies) { + auto entity_map_it = entity_map.find(entity); + if (entity_map_it == entity_map.end()) + entity_map_it = (entity_map.insert(std::make_pair(entity, std::vector()))).first; - // Now the entity_map_it should be valid, let's make sure the vector is long enough: - entity_map_it->second.resize(num_of_copies, -1); + // Now the entity_map_it should be valid, let's make sure the vector is long enough: + entity_map_it->second.resize(num_of_copies, -1); - // Each -1 now means "print as usual" - we will replace it with actual extruder id (shifted it so we don't lose that information): - std::replace(entity_map_it->second.begin(), entity_map_it->second.end(), -1, -correct_extruder_id-1); + // Each -1 now means "print as usual" - we will replace it with actual extruder id (shifted it so we don't lose that information): + std::replace(entity_map_it->second.begin(), entity_map_it->second.end(), -1, -correct_extruder_id-1); - return &(entity_map_it->second); - } + return &(entity_map_it->second); +} } // namespace Slic3r diff --git a/xs/src/libslic3r/GCode/ToolOrdering.hpp b/xs/src/libslic3r/GCode/ToolOrdering.hpp index 6dbb9715c..241567a75 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.hpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.hpp @@ -11,7 +11,6 @@ class Print; class PrintObject; - // Object of this class holds information about whether an extrusion is printed immediately // after a toolchange (as part of infill/perimeter wiping) or not. One extrusion can be a part // of several copies - this has to be taken into account. diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index 1b0627f78..6749babf8 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -1177,66 +1177,50 @@ void Print::_make_wipe_tower() // and returns volume that is left to be wiped on the wipe tower. float Print::mark_wiping_extrusions(ToolOrdering::LayerTools& layer_tools, unsigned int new_extruder, float volume_to_wipe) { - // Strategy for wiping (TODO): - // if !infill_first - // start with dedicated objects - // print a perimeter and its corresponding infill immediately after - // repeat until there are no dedicated objects left - // if there are some left and this is the last toolchange on the layer, mark all remaining extrusions of the object (so we don't have to travel back to it later) - // move to normal objects - // start with one object and start assigning its infill, if their perimeters ARE ALREADY EXTRUDED - // never touch perimeters - // - // if infill first - // start with dedicated objects - // print an infill and its corresponding perimeter immediately after - // repeat until you run out of infills - // move to normal objects - // start assigning infills (one copy after another) - // repeat until you run out of infills, leave perimeters be - const float min_infill_volume = 0.f; // ignore infill with smaller volume than this if (config.filament_soluble.get_at(new_extruder)) return volume_to_wipe; // Soluble filament cannot be wiped in a random infill + PrintObjectPtrs object_list = objects; + + // sort objects so that dedicated for wiping are at the beginning: + std::sort(object_list.begin(), object_list.end(), [](const PrintObject* a, const PrintObject* b) { return a->config.wipe_into_objects; }); - for (size_t i = 0; i < objects.size(); ++ i) { // Let's iterate through all objects... - if (!objects[i]->config.wipe_into_infill && !objects[i]->config.wipe_into_objects) + // We will now iterate through objects + // - first through the dedicated ones to mark perimeters or infills (depending on infill_first) + // - second through the dedicated ones again to mark infills or perimeters (depending on infill_first) + // - then for the others to mark infills + // this is controlled by the following variable: + bool perimeters_done = false; + + for (int i=0 ; i<(int)object_list.size() ; ++i) { // Let's iterate through all objects... + const auto& object = object_list[i]; + + if (!perimeters_done && (i+1==objects.size() || !objects[i+1]->config.wipe_into_objects)) { // last dedicated object in list + perimeters_done = true; + i=-1; // let's go from the start again continue; + } - Layer* this_layer = nullptr; - for (unsigned int a = 0; a < objects[i]->layers.size(); ++a) // Finds this layer - if (std::abs(layer_tools.print_z - objects[i]->layers[a]->print_z) < EPSILON) { - this_layer = objects[i]->layers[a]; - break; - } - if (this_layer == nullptr) + // Finds this layer: + auto this_layer_it = std::find_if(object->layers.begin(), object->layers.end(), [&layer_tools](const Layer* lay) { return std::abs(layer_tools.print_z - lay->print_z)layers.end()) continue; - - unsigned int num_of_copies = objects[i]->_shifted_copies.size(); + const Layer* this_layer = *this_layer_it; + unsigned int num_of_copies = object->_shifted_copies.size(); for (unsigned int copy = 0; copy < num_of_copies; ++copy) { // iterate through copies first, so that we mark neighbouring infills to minimize travel moves - for (size_t region_id = 0; region_id < objects[i]->print()->regions.size(); ++ region_id) { - unsigned int region_extruder = objects[i]->print()->regions[region_id]->config.infill_extruder - 1; // config value is 1-based - if (config.filament_soluble.get_at(region_extruder)) // if this entity is meant to be soluble, keep it that way + for (size_t region_id = 0; region_id < object->print()->regions.size(); ++ region_id) { + const auto& region = *object->print()->regions[region_id]; + + if (!region.config.wipe_into_infill && !object->config.wipe_into_objects) continue; - if (!config.infill_first) { // in this case we must verify that region_extruder was already used at this layer (and perimeters of the infill are therefore extruded) - bool unused_yet = false; - for (unsigned i = 0; i < layer_tools.extruders.size(); ++i) { - if (layer_tools.extruders[i] == new_extruder) - unused_yet = true; - if (layer_tools.extruders[i] == region_extruder) - break; - } - if (unused_yet) - continue; - } - if (objects[i]->config.wipe_into_infill) { + if (((!config.infill_first ? perimeters_done : !perimeters_done) || !object->config.wipe_into_objects) && region.config.wipe_into_infill) { ExtrusionEntityCollection& eec = this_layer->regions[region_id]->fills; for (ExtrusionEntity* ee : eec.entities) { // iterate through all infill Collections if (volume_to_wipe <= 0.f) @@ -1244,21 +1228,49 @@ float Print::mark_wiping_extrusions(ToolOrdering::LayerTools& layer_tools, unsig auto* fill = dynamic_cast(ee); if (fill->role() == erTopSolidInfill || fill->role() == erGapFill) // these cannot be changed - such infill is / may be visible continue; - if (/*!fill->is_extruder_overridden(copy)*/ !layer_tools.wiping_extrusions.is_entity_overridden(fill, copy) && fill->total_volume() > min_infill_volume) { // this infill will be used to wipe this extruder + + // What extruder would this normally be printed with? + unsigned int correct_extruder = get_extruder(fill, region); + if (config.filament_soluble.get_at(correct_extruder)) // if this entity is meant to be soluble, keep it that way + continue; + + if (!object->config.wipe_into_objects && !config.infill_first) { + // In this case we must check that the original extruder is used on this layer before the one we are overridding + // (and the perimeters will be finished before the infill is printed): + if (!config.infill_first && region.config.wipe_into_infill) { + bool unused_yet = false; + for (unsigned i = 0; i < layer_tools.extruders.size(); ++i) { + if (layer_tools.extruders[i] == new_extruder) + unused_yet = true; + if (layer_tools.extruders[i] == correct_extruder) + break; + } + if (unused_yet) + continue; + } + } + + if (!layer_tools.wiping_extrusions.is_entity_overridden(fill, copy) && fill->total_volume() > min_infill_volume) { // this infill will be used to wipe this extruder layer_tools.wiping_extrusions.set_extruder_override(fill, copy, new_extruder, num_of_copies); volume_to_wipe -= fill->total_volume(); } } } - if (objects[i]->config.wipe_into_objects) + + if ((config.infill_first ? perimeters_done : !perimeters_done) && object->config.wipe_into_objects) { ExtrusionEntityCollection& eec = this_layer->regions[region_id]->perimeters; for (ExtrusionEntity* ee : eec.entities) { // iterate through all perimeter Collections if (volume_to_wipe <= 0.f) break; auto* fill = dynamic_cast(ee); - if (/*!fill->is_extruder_overridden(copy)*/ !layer_tools.wiping_extrusions.is_entity_overridden(fill, copy) && fill->total_volume() > min_infill_volume) { + // What extruder would this normally be printed with? + unsigned int correct_extruder = get_extruder(fill, region); + if (config.filament_soluble.get_at(correct_extruder)) // if this entity is meant to be soluble, keep it that way + continue; + + if (!layer_tools.wiping_extrusions.is_entity_overridden(fill, copy) && fill->total_volume() > min_infill_volume) { layer_tools.wiping_extrusions.set_extruder_override(fill, copy, new_extruder, num_of_copies); volume_to_wipe -= fill->total_volume(); } diff --git a/xs/src/libslic3r/Print.hpp b/xs/src/libslic3r/Print.hpp index 57b1f4015..8d5e07970 100644 --- a/xs/src/libslic3r/Print.hpp +++ b/xs/src/libslic3r/Print.hpp @@ -24,6 +24,7 @@ class Print; class PrintObject; class ModelObject; + // Print step IDs for keeping track of the print state. enum PrintStep { psSkirt, psBrim, psWipeTower, psCount, @@ -323,6 +324,15 @@ private: tbb::atomic m_canceled; }; + +// Returns extruder this eec should be printed with, according to PrintRegion config +static int get_extruder(const ExtrusionEntityCollection* fill, const PrintRegion ®ion) { + return is_infill(fill->role()) ? std::max(0, (is_solid_infill(fill->entities.front()->role()) ? region.config.solid_infill_extruder : region.config.infill_extruder) - 1) : + std::max(region.config.perimeter_extruder.value - 1, 0); +} + + + #define FOREACH_BASE(type, container, iterator) for (type::const_iterator iterator = (container).begin(); iterator != (container).end(); ++iterator) #define FOREACH_REGION(print, region) FOREACH_BASE(PrintRegionPtrs, (print)->regions, region) #define FOREACH_OBJECT(print, object) FOREACH_BASE(PrintObjectPtrs, (print)->objects, object) diff --git a/xs/src/libslic3r/PrintConfig.hpp b/xs/src/libslic3r/PrintConfig.hpp index 92ead2927..37d9357b2 100644 --- a/xs/src/libslic3r/PrintConfig.hpp +++ b/xs/src/libslic3r/PrintConfig.hpp @@ -337,7 +337,6 @@ public: ConfigOptionFloatOrPercent support_material_xy_spacing; ConfigOptionFloat xy_size_compensation; ConfigOptionBool wipe_into_objects; - ConfigOptionBool wipe_into_infill; protected: void initialize(StaticCacheBase &cache, const char *base_ptr) @@ -375,7 +374,6 @@ protected: OPT_PTR(support_material_with_sheath); OPT_PTR(xy_size_compensation); OPT_PTR(wipe_into_objects); - OPT_PTR(wipe_into_infill); } }; @@ -418,6 +416,7 @@ public: ConfigOptionFloatOrPercent top_infill_extrusion_width; ConfigOptionInt top_solid_layers; ConfigOptionFloatOrPercent top_solid_infill_speed; + ConfigOptionBool wipe_into_infill; protected: void initialize(StaticCacheBase &cache, const char *base_ptr) @@ -456,6 +455,7 @@ protected: OPT_PTR(top_infill_extrusion_width); OPT_PTR(top_solid_infill_speed); OPT_PTR(top_solid_layers); + OPT_PTR(wipe_into_infill); } }; From 8c40a962fb987b019cab8ead874764844d0e0b38 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 21 Jun 2018 11:14:17 +0200 Subject: [PATCH 036/198] Shift key to move selected instances together --- xs/src/slic3r/GUI/GLCanvas3D.cpp | 18 ++++++++++-------- xs/src/slic3r/GUI/GLCanvas3D.hpp | 2 +- xs/src/slic3r/GUI/GLTexture.cpp | 4 ++-- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index 128eb214c..4f816b2d8 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -498,7 +498,7 @@ void GLCanvas3D::Bed::_render_prusa(float theta) const ::glEnable(GL_BLEND); ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - ::glEnable(GL_TEXTURE_2D); +// ::glEnable(GL_TEXTURE_2D); ::glEnableClientState(GL_VERTEX_ARRAY); ::glEnableClientState(GL_TEXTURE_COORD_ARRAY); @@ -519,7 +519,7 @@ void GLCanvas3D::Bed::_render_prusa(float theta) const ::glDisableClientState(GL_TEXTURE_COORD_ARRAY); ::glDisableClientState(GL_VERTEX_ARRAY); - ::glDisable(GL_TEXTURE_2D); +// ::glDisable(GL_TEXTURE_2D); ::glDisable(GL_BLEND); } @@ -1067,7 +1067,7 @@ const Pointf3 GLCanvas3D::Mouse::Drag::Invalid_3D_Point(DBL_MAX, DBL_MAX, DBL_MA GLCanvas3D::Mouse::Drag::Drag() : start_position_2D(Invalid_2D_Point) , start_position_3D(Invalid_3D_Point) - , move_with_ctrl(false) + , move_with_shift(false) , move_volume_idx(-1) , gizmo_volume_idx(-1) { @@ -1555,6 +1555,8 @@ bool GLCanvas3D::init(bool useVBOs, bool use_legacy_opengl) if (m_gizmos.is_enabled() && !m_gizmos.init()) return false; + ::glEnable(GL_TEXTURE_2D); + m_initialized = true; return true; @@ -2840,7 +2842,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) if (volume_bbox.contains(pos3d)) { // The dragging operation is initiated. - m_mouse.drag.move_with_ctrl = evt.ControlDown(); + m_mouse.drag.move_with_shift = evt.ShiftDown(); m_mouse.drag.move_volume_idx = volume_idx; m_mouse.drag.start_position_3D = pos3d; // Remember the shift to to the object center.The object center will later be used @@ -2883,7 +2885,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) GLVolume* volume = m_volumes.volumes[m_mouse.drag.move_volume_idx]; // Get all volumes belonging to the same group, if any. std::vector volumes; - int group_id = m_mouse.drag.move_with_ctrl ? volume->select_group_id : volume->drag_group_id; + int group_id = m_mouse.drag.move_with_shift ? volume->select_group_id : volume->drag_group_id; if (group_id == -1) volumes.push_back(volume); else @@ -2892,7 +2894,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) { if (v != nullptr) { - if ((m_mouse.drag.move_with_ctrl && (v->select_group_id == group_id)) || (v->drag_group_id == group_id)) + if ((m_mouse.drag.move_with_shift && (v->select_group_id == group_id)) || (v->drag_group_id == group_id)) volumes.push_back(v); } } @@ -3021,14 +3023,14 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) // get all volumes belonging to the same group, if any std::vector volume_idxs; int vol_id = m_mouse.drag.move_volume_idx; - int group_id = m_mouse.drag.move_with_ctrl ? m_volumes.volumes[vol_id]->select_group_id : m_volumes.volumes[vol_id]->drag_group_id; + int group_id = m_mouse.drag.move_with_shift ? m_volumes.volumes[vol_id]->select_group_id : m_volumes.volumes[vol_id]->drag_group_id; if (group_id == -1) volume_idxs.push_back(vol_id); else { for (int i = 0; i < (int)m_volumes.volumes.size(); ++i) { - if ((m_mouse.drag.move_with_ctrl && (m_volumes.volumes[i]->select_group_id == group_id)) || (m_volumes.volumes[i]->drag_group_id == group_id)) + if ((m_mouse.drag.move_with_shift && (m_volumes.volumes[i]->select_group_id == group_id)) || (m_volumes.volumes[i]->drag_group_id == group_id)) volume_idxs.push_back(i); } } diff --git a/xs/src/slic3r/GUI/GLCanvas3D.hpp b/xs/src/slic3r/GUI/GLCanvas3D.hpp index 77d3c5c54..2cda7214e 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.hpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.hpp @@ -304,7 +304,7 @@ public: Pointf3 start_position_3D; Vectorf3 volume_center_offset; - bool move_with_ctrl; + bool move_with_shift; int move_volume_idx; int gizmo_volume_idx; diff --git a/xs/src/slic3r/GUI/GLTexture.cpp b/xs/src/slic3r/GUI/GLTexture.cpp index 924920bd8..d1059a400 100644 --- a/xs/src/slic3r/GUI/GLTexture.cpp +++ b/xs/src/slic3r/GUI/GLTexture.cpp @@ -132,7 +132,7 @@ void GLTexture::render_texture(unsigned int tex_id, float left, float right, flo ::glDisable(GL_LIGHTING); ::glEnable(GL_BLEND); ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - ::glEnable(GL_TEXTURE_2D); +// ::glEnable(GL_TEXTURE_2D); ::glBindTexture(GL_TEXTURE_2D, (GLuint)tex_id); @@ -145,7 +145,7 @@ void GLTexture::render_texture(unsigned int tex_id, float left, float right, flo ::glBindTexture(GL_TEXTURE_2D, 0); - ::glDisable(GL_TEXTURE_2D); +// ::glDisable(GL_TEXTURE_2D); ::glDisable(GL_BLEND); ::glEnable(GL_LIGHTING); } From 4fcbb7314119f57a04210dcac5a6c1af2e40f558 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 21 Jun 2018 12:21:51 +0200 Subject: [PATCH 037/198] Cleanup of perl code --- lib/Slic3r/GUI/3DScene.pm | 2163 +---------------------------------- lib/Slic3r/GUI/Plater/3D.pm | 257 ----- 2 files changed, 1 insertion(+), 2419 deletions(-) diff --git a/lib/Slic3r/GUI/3DScene.pm b/lib/Slic3r/GUI/3DScene.pm index 157e7229c..23decaa37 100644 --- a/lib/Slic3r/GUI/3DScene.pm +++ b/lib/Slic3r/GUI/3DScene.pm @@ -16,102 +16,10 @@ use strict; use warnings; use Wx qw(wxTheApp :timer :bitmap :icon :dialog); -#============================================================================================================================== -#use Wx::Event qw(EVT_PAINT EVT_SIZE EVT_ERASE_BACKGROUND EVT_IDLE EVT_MOUSEWHEEL EVT_MOUSE_EVENTS EVT_CHAR EVT_TIMER); # must load OpenGL *before* Wx::GLCanvas use OpenGL qw(:glconstants :glfunctions :glufunctions :gluconstants); use base qw(Wx::GLCanvas Class::Accessor); -#============================================================================================================================== -#use Math::Trig qw(asin tan); -#use List::Util qw(reduce min max first); -#use Slic3r::Geometry qw(X Y normalize scale unscale scaled_epsilon); -#use Slic3r::Geometry::Clipper qw(offset_ex intersection_pl JT_ROUND); -#============================================================================================================================== use Wx::GLCanvas qw(:all); -#============================================================================================================================== -#use Slic3r::Geometry qw(PI); -#============================================================================================================================== - -# volumes: reference to vector of Slic3r::GUI::3DScene::Volume. -#============================================================================================================================== -#__PACKAGE__->mk_accessors( qw(_quat _dirty init -# enable_picking -# enable_moving -# use_plain_shader -# on_viewport_changed -# on_hover -# on_select -# on_double_click -# on_right_click -# on_move -# on_model_update -# volumes -# _sphi _stheta -# cutting_plane_z -# cut_lines_vertices -# bed_shape -# bed_triangles -# bed_grid_lines -# bed_polygon -# background -# origin -# _mouse_pos -# _hover_volume_idx -# -# _drag_volume_idx -# _drag_start_pos -# _drag_volume_center_offset -# _drag_start_xy -# _dragged -# -# _layer_height_edited -# -# _camera_type -# _camera_target -# _camera_distance -# _zoom -# -# _legend_enabled -# _warning_enabled -# _apply_zoom_to_volumes_filter -# _mouse_dragging -# -# ) ); -# -#use constant TRACKBALLSIZE => 0.8; -#use constant TURNTABLE_MODE => 1; -#use constant GROUND_Z => -0.02; -## For mesh selection: Not selected - bright yellow. -#use constant DEFAULT_COLOR => [1,1,0]; -## For mesh selection: Selected - bright green. -#use constant SELECTED_COLOR => [0,1,0,1]; -## For mesh selection: Mouse hovers over the object, but object not selected yet - dark green. -#use constant HOVER_COLOR => [0.4,0.9,0,1]; -# -## phi / theta angles to orient the camera. -#use constant VIEW_DEFAULT => [45.0,45.0]; -#use constant VIEW_LEFT => [90.0,90.0]; -#use constant VIEW_RIGHT => [-90.0,90.0]; -#use constant VIEW_TOP => [0.0,0.0]; -#use constant VIEW_BOTTOM => [0.0,180.0]; -#use constant VIEW_FRONT => [0.0,90.0]; -#use constant VIEW_REAR => [180.0,90.0]; -# -#use constant MANIPULATION_IDLE => 0; -#use constant MANIPULATION_DRAGGING => 1; -#use constant MANIPULATION_LAYER_HEIGHT => 2; -# -#use constant GIMBALL_LOCK_THETA_MAX => 180; -# -#use constant VARIABLE_LAYER_THICKNESS_BAR_WIDTH => 70; -#use constant VARIABLE_LAYER_THICKNESS_RESET_BUTTON_HEIGHT => 22; -# -## make OpenGL::Array thread-safe -#{ -# no warnings 'redefine'; -# *OpenGL::Array::CLONE_SKIP = sub { 1 }; -#} -#============================================================================================================================== sub new { my ($class, $parent) = @_; @@ -135,2097 +43,28 @@ sub new { # we request a depth buffer explicitely because it looks like it's not created by # default on Linux, causing transparency issues my $self = $class->SUPER::new($parent, -1, Wx::wxDefaultPosition, Wx::wxDefaultSize, 0, "", $attrib); -#============================================================================================================================== -# if (Wx::wxVERSION >= 3.000003) { -# # Wx 3.0.3 contains an ugly hack to support some advanced OpenGL attributes through the attribute list. -# # The attribute list is transferred between the wxGLCanvas and wxGLContext constructors using a single static array s_wglContextAttribs. -# # Immediatelly force creation of the OpenGL context to consume the static variable s_wglContextAttribs. -# $self->GetContext(); -# } -#============================================================================================================================== -#============================================================================================================================== Slic3r::GUI::_3DScene::add_canvas($self); Slic3r::GUI::_3DScene::allow_multisample($self, $can_multisample); -# my $context = $self->GetContext; -# $self->SetCurrent($context); -# Slic3r::GUI::_3DScene::add_canvas($self, $context); -# -# $self->{can_multisample} = $can_multisample; -# $self->background(1); -# $self->_quat((0, 0, 0, 1)); -# $self->_stheta(45); -# $self->_sphi(45); -# $self->_zoom(1); -# $self->_legend_enabled(0); -# $self->_warning_enabled(0); -# $self->use_plain_shader(0); -# $self->_apply_zoom_to_volumes_filter(0); -# $self->_mouse_dragging(0); -# -# # Collection of GLVolume objects -# $self->volumes(Slic3r::GUI::_3DScene::GLVolume::Collection->new); -# -# # 3D point in model space -# $self->_camera_type('ortho'); -## $self->_camera_type('perspective'); -# $self->_camera_target(Slic3r::Pointf3->new(0,0,0)); -# $self->_camera_distance(0.); -# $self->layer_editing_enabled(0); -# $self->{layer_height_edit_band_width} = 2.; -# $self->{layer_height_edit_strength} = 0.005; -# $self->{layer_height_edit_last_object_id} = -1; -# $self->{layer_height_edit_last_z} = 0.; -# $self->{layer_height_edit_last_action} = 0; -# -# $self->reset_objects; -# -# EVT_PAINT($self, sub { -# my $dc = Wx::PaintDC->new($self); -# $self->Render($dc); -# }); -# EVT_SIZE($self, sub { $self->_dirty(1) }); -# EVT_IDLE($self, sub { -# return unless $self->_dirty; -# return if !$self->IsShownOnScreen; -# $self->Resize( $self->GetSizeWH ); -# $self->Refresh; -# }); -# EVT_MOUSEWHEEL($self, \&mouse_wheel_event); -# EVT_MOUSE_EVENTS($self, \&mouse_event); -## EVT_KEY_DOWN($self, sub { -# EVT_CHAR($self, sub { -# my ($s, $event) = @_; -# if ($event->HasModifiers) { -# $event->Skip; -# } else { -# my $key = $event->GetKeyCode; -# if ($key == ord('0')) { -# $self->select_view('iso'); -# } elsif ($key == ord('1')) { -# $self->select_view('top'); -# } elsif ($key == ord('2')) { -# $self->select_view('bottom'); -# } elsif ($key == ord('3')) { -# $self->select_view('front'); -# } elsif ($key == ord('4')) { -# $self->select_view('rear'); -# } elsif ($key == ord('5')) { -# $self->select_view('left'); -# } elsif ($key == ord('6')) { -# $self->select_view('right'); -# } elsif ($key == ord('z')) { -# $self->zoom_to_volumes; -# } elsif ($key == ord('b')) { -# $self->zoom_to_bed; -# } else { -# $event->Skip; -# } -# } -# }); -# -# $self->{layer_height_edit_timer_id} = &Wx::NewId(); -# $self->{layer_height_edit_timer} = Wx::Timer->new($self, $self->{layer_height_edit_timer_id}); -# EVT_TIMER($self, $self->{layer_height_edit_timer_id}, sub { -# my ($self, $event) = @_; -# return if $self->_layer_height_edited != 1; -# $self->_variable_layer_thickness_action(undef); -# }); -#============================================================================================================================== return $self; } -#============================================================================================================================== -#sub set_legend_enabled { -# my ($self, $value) = @_; -# $self->_legend_enabled($value); -#} -# -#sub set_warning_enabled { -# my ($self, $value) = @_; -# $self->_warning_enabled($value); -#} -#============================================================================================================================== - sub Destroy { my ($self) = @_; -#============================================================================================================================== Slic3r::GUI::_3DScene::remove_canvas($self); -# $self->{layer_height_edit_timer}->Stop; -# $self->DestroyGL; -#============================================================================================================================== return $self->SUPER::Destroy; } -#============================================================================================================================== -#sub layer_editing_enabled { -# my ($self, $value) = @_; -# if (@_ == 2) { -# $self->{layer_editing_enabled} = $value; -# if ($value) { -# if (! $self->{layer_editing_initialized}) { -# # Enabling the layer editing for the first time. This triggers compilation of the necessary OpenGL shaders. -# # If compilation fails, a message box is shown with the error codes. -# $self->SetCurrent($self->GetContext); -# my $shader = new Slic3r::GUI::_3DScene::GLShader; -# my $error_message; -# if (! $shader->load_from_text($self->_fragment_shader_variable_layer_height, $self->_vertex_shader_variable_layer_height)) { -# # Compilation or linking of the shaders failed. -# $error_message = "Cannot compile an OpenGL Shader, therefore the Variable Layer Editing will be disabled.\n\n" -# . $shader->last_error; -# $shader = undef; -# } else { -# $self->{layer_height_edit_shader} = $shader; -# ($self->{layer_preview_z_texture_id}) = glGenTextures_p(1); -# glBindTexture(GL_TEXTURE_2D, $self->{layer_preview_z_texture_id}); -# glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); -# glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); -# glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -# glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); -# glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1); -# glBindTexture(GL_TEXTURE_2D, 0); -# } -# if (defined($error_message)) { -# # Don't enable the layer editing tool. -# $self->{layer_editing_enabled} = 0; -# # 2 means failed -# $self->{layer_editing_initialized} = 2; -# # Show the error message. -# Wx::MessageBox($error_message, "Slic3r Error", wxOK | wxICON_EXCLAMATION, $self); -# } else { -# $self->{layer_editing_initialized} = 1; -# } -# } elsif ($self->{layer_editing_initialized} == 2) { -# # Initilization failed before. Don't try to initialize and disable layer editing. -# $self->{layer_editing_enabled} = 0; -# } -# } -# } -# return $self->{layer_editing_enabled}; -#} -# -#sub layer_editing_allowed { -# my ($self) = @_; -# # Allow layer editing if either the shaders were not initialized yet and we don't know -# # whether it will be possible to initialize them, -# # or if the initialization was done already and it failed. -# return ! (defined($self->{layer_editing_initialized}) && $self->{layer_editing_initialized} == 2); -#} -# -#sub _first_selected_object_id_for_variable_layer_height_editing { -# my ($self) = @_; -# for my $i (0..$#{$self->volumes}) { -# if ($self->volumes->[$i]->selected) { -# my $object_id = int($self->volumes->[$i]->select_group_id / 1000000); -# # Objects with object_id >= 1000 have a specific meaning, for example the wipe tower proxy. -# return ($object_id >= $self->{print}->object_count) ? -1 : $object_id -# if $object_id < 10000; -# } -# } -# return -1; -#} -# -## Returns an array with (left, top, right, bottom) of the variable layer thickness bar on the screen. -#sub _variable_layer_thickness_bar_rect_screen { -# my ($self) = @_; -# my ($cw, $ch) = $self->GetSizeWH; -# return ($cw - VARIABLE_LAYER_THICKNESS_BAR_WIDTH, 0, $cw, $ch - VARIABLE_LAYER_THICKNESS_RESET_BUTTON_HEIGHT); -#} -# -#sub _variable_layer_thickness_bar_rect_viewport { -# my ($self) = @_; -# my ($cw, $ch) = $self->GetSizeWH; -# return ((0.5*$cw-VARIABLE_LAYER_THICKNESS_BAR_WIDTH)/$self->_zoom, (-0.5*$ch+VARIABLE_LAYER_THICKNESS_RESET_BUTTON_HEIGHT)/$self->_zoom, $cw/(2*$self->_zoom), $ch/(2*$self->_zoom)); -#} -# -## Returns an array with (left, top, right, bottom) of the variable layer thickness bar on the screen. -#sub _variable_layer_thickness_reset_rect_screen { -# my ($self) = @_; -# my ($cw, $ch) = $self->GetSizeWH; -# return ($cw - VARIABLE_LAYER_THICKNESS_BAR_WIDTH, $ch - VARIABLE_LAYER_THICKNESS_RESET_BUTTON_HEIGHT, $cw, $ch); -#} -# -#sub _variable_layer_thickness_reset_rect_viewport { -# my ($self) = @_; -# my ($cw, $ch) = $self->GetSizeWH; -# return ((0.5*$cw-VARIABLE_LAYER_THICKNESS_BAR_WIDTH)/$self->_zoom, -$ch/(2*$self->_zoom), $cw/(2*$self->_zoom), (-0.5*$ch+VARIABLE_LAYER_THICKNESS_RESET_BUTTON_HEIGHT)/$self->_zoom); -#} -# -#sub _variable_layer_thickness_bar_rect_mouse_inside { -# my ($self, $mouse_evt) = @_; -# my ($bar_left, $bar_top, $bar_right, $bar_bottom) = $self->_variable_layer_thickness_bar_rect_screen; -# return $mouse_evt->GetX >= $bar_left && $mouse_evt->GetX <= $bar_right && $mouse_evt->GetY >= $bar_top && $mouse_evt->GetY <= $bar_bottom; -#} -# -#sub _variable_layer_thickness_reset_rect_mouse_inside { -# my ($self, $mouse_evt) = @_; -# my ($bar_left, $bar_top, $bar_right, $bar_bottom) = $self->_variable_layer_thickness_reset_rect_screen; -# return $mouse_evt->GetX >= $bar_left && $mouse_evt->GetX <= $bar_right && $mouse_evt->GetY >= $bar_top && $mouse_evt->GetY <= $bar_bottom; -#} -# -#sub _variable_layer_thickness_bar_mouse_cursor_z_relative { -# my ($self) = @_; -# my $mouse_pos = $self->ScreenToClientPoint(Wx::GetMousePosition()); -# my ($bar_left, $bar_top, $bar_right, $bar_bottom) = $self->_variable_layer_thickness_bar_rect_screen; -# return ($mouse_pos->x >= $bar_left && $mouse_pos->x <= $bar_right && $mouse_pos->y >= $bar_top && $mouse_pos->y <= $bar_bottom) ? -# # Inside the bar. -# ($bar_bottom - $mouse_pos->y - 1.) / ($bar_bottom - $bar_top - 1) : -# # Outside the bar. -# -1000.; -#} -# -#sub _variable_layer_thickness_action { -# my ($self, $mouse_event, $do_modification) = @_; -# # A volume is selected. Test, whether hovering over a layer thickness bar. -# return if $self->{layer_height_edit_last_object_id} == -1; -# if (defined($mouse_event)) { -# my ($bar_left, $bar_top, $bar_right, $bar_bottom) = $self->_variable_layer_thickness_bar_rect_screen; -# $self->{layer_height_edit_last_z} = unscale($self->{print}->get_object($self->{layer_height_edit_last_object_id})->size->z) -# * ($bar_bottom - $mouse_event->GetY - 1.) / ($bar_bottom - $bar_top); -# $self->{layer_height_edit_last_action} = $mouse_event->ShiftDown ? ($mouse_event->RightIsDown ? 3 : 2) : ($mouse_event->RightIsDown ? 0 : 1); -# } -# # Mark the volume as modified, so Print will pick its layer height profile? Where to mark it? -# # Start a timer to refresh the print? schedule_background_process() ? -# # The PrintObject::adjust_layer_height_profile() call adjusts the profile of its associated ModelObject, it does not modify the profile of the PrintObject itself. -# $self->{print}->get_object($self->{layer_height_edit_last_object_id})->adjust_layer_height_profile( -# $self->{layer_height_edit_last_z}, -# $self->{layer_height_edit_strength}, -# $self->{layer_height_edit_band_width}, -# $self->{layer_height_edit_last_action}); -# -# $self->volumes->[$self->{layer_height_edit_last_object_id}]->generate_layer_height_texture( -# $self->{print}->get_object($self->{layer_height_edit_last_object_id}), 1); -# $self->Refresh; -# # Automatic action on mouse down with the same coordinate. -# $self->{layer_height_edit_timer}->Start(100, wxTIMER_CONTINUOUS); -#} -# -#sub mouse_event { -# my ($self, $e) = @_; -# -# my $pos = Slic3r::Pointf->new($e->GetPositionXY); -# my $object_idx_selected = $self->{layer_height_edit_last_object_id} = ($self->layer_editing_enabled && $self->{print}) ? $self->_first_selected_object_id_for_variable_layer_height_editing : -1; -# -# $self->_mouse_dragging($e->Dragging); -# -# if ($e->Entering && (&Wx::wxMSW || $^O eq 'linux')) { -# # wxMSW needs focus in order to catch mouse wheel events -# $self->SetFocus; -# $self->_drag_start_xy(undef); -# } elsif ($e->LeftDClick) { -# if ($object_idx_selected != -1 && $self->_variable_layer_thickness_bar_rect_mouse_inside($e)) { -# } elsif ($self->on_double_click) { -# $self->on_double_click->(); -# } -# } elsif ($e->LeftDown || $e->RightDown) { -# # If user pressed left or right button we first check whether this happened -# # on a volume or not. -# my $volume_idx = $self->_hover_volume_idx // -1; -# $self->_layer_height_edited(0); -# if ($object_idx_selected != -1 && $self->_variable_layer_thickness_bar_rect_mouse_inside($e)) { -# # A volume is selected and the mouse is hovering over a layer thickness bar. -# # Start editing the layer height. -# $self->_layer_height_edited(1); -# $self->_variable_layer_thickness_action($e); -# } elsif ($object_idx_selected != -1 && $self->_variable_layer_thickness_reset_rect_mouse_inside($e)) { -# $self->{print}->get_object($object_idx_selected)->reset_layer_height_profile; -# # Index 2 means no editing, just wait for mouse up event. -# $self->_layer_height_edited(2); -# $self->Refresh; -# $self->Update; -# } else { -# # The mouse_to_3d gets the Z coordinate from the Z buffer at the screen coordinate $pos->x,y, -# # an converts the screen space coordinate to unscaled object space. -# my $pos3d = ($volume_idx == -1) ? undef : $self->mouse_to_3d(@$pos); -# -# # Select volume in this 3D canvas. -# # Don't deselect a volume if layer editing is enabled. We want the object to stay selected -# # during the scene manipulation. -# -# if ($self->enable_picking && ($volume_idx != -1 || ! $self->layer_editing_enabled)) { -# $self->deselect_volumes; -# $self->select_volume($volume_idx); -# -# if ($volume_idx != -1) { -# my $group_id = $self->volumes->[$volume_idx]->select_group_id; -# my @volumes; -# if ($group_id != -1) { -# $self->select_volume($_) -# for grep $self->volumes->[$_]->select_group_id == $group_id, -# 0..$#{$self->volumes}; -# } -# } -# -# $self->Refresh; -# $self->Update; -# } -# -# # propagate event through callback -# $self->on_select->($volume_idx) -# if $self->on_select; -# -# if ($volume_idx != -1) { -# if ($e->LeftDown && $self->enable_moving) { -# # Only accept the initial position, if it is inside the volume bounding box. -# my $volume_bbox = $self->volumes->[$volume_idx]->transformed_bounding_box; -# $volume_bbox->offset(1.); -# if ($volume_bbox->contains_point($pos3d)) { -# # The dragging operation is initiated. -# $self->_drag_volume_idx($volume_idx); -# $self->_drag_start_pos($pos3d); -# # Remember the shift to to the object center. The object center will later be used -# # to limit the object placement close to the bed. -# $self->_drag_volume_center_offset($pos3d->vector_to($volume_bbox->center)); -# } -# } elsif ($e->RightDown) { -# # if right clicking on volume, propagate event through callback -# $self->on_right_click->($e->GetPosition) -# if $self->on_right_click; -# } -# } -# } -# } elsif ($e->Dragging && $e->LeftIsDown && ! $self->_layer_height_edited && defined($self->_drag_volume_idx)) { -# # Get new position at the same Z of the initial click point. -# my $cur_pos = Slic3r::Linef3->new( -# $self->mouse_to_3d($e->GetX, $e->GetY, 0), -# $self->mouse_to_3d($e->GetX, $e->GetY, 1)) -# ->intersect_plane($self->_drag_start_pos->z); -# -# # Clip the new position, so the object center remains close to the bed. -# { -# $cur_pos->translate(@{$self->_drag_volume_center_offset}); -# my $cur_pos2 = Slic3r::Point->new(scale($cur_pos->x), scale($cur_pos->y)); -# if (! $self->bed_polygon->contains_point($cur_pos2)) { -# my $ip = $self->bed_polygon->point_projection($cur_pos2); -# $cur_pos->set_x(unscale($ip->x)); -# $cur_pos->set_y(unscale($ip->y)); -# } -# $cur_pos->translate(@{$self->_drag_volume_center_offset->negative}); -# } -# # Calculate the translation vector. -# my $vector = $self->_drag_start_pos->vector_to($cur_pos); -# # Get the volume being dragged. -# my $volume = $self->volumes->[$self->_drag_volume_idx]; -# # Get all volumes belonging to the same group, if any. -# my @volumes = ($volume->drag_group_id == -1) ? -# ($volume) : -# grep $_->drag_group_id == $volume->drag_group_id, @{$self->volumes}; -# # Apply new temporary volume origin and ignore Z. -# $_->translate($vector->x, $vector->y, 0) for @volumes; -# $self->_drag_start_pos($cur_pos); -# $self->_dragged(1); -# $self->Refresh; -# $self->Update; -# } elsif ($e->Dragging) { -# if ($self->_layer_height_edited && $object_idx_selected != -1) { -# $self->_variable_layer_thickness_action($e) if ($self->_layer_height_edited == 1); -# } elsif ($e->LeftIsDown) { -# # if dragging over blank area with left button, rotate -# if (defined $self->_drag_start_pos) { -# my $orig = $self->_drag_start_pos; -# if (TURNTABLE_MODE) { -# # Turntable mode is enabled by default. -# $self->_sphi($self->_sphi + ($pos->x - $orig->x) * TRACKBALLSIZE); -# $self->_stheta($self->_stheta - ($pos->y - $orig->y) * TRACKBALLSIZE); #- -# $self->_stheta(GIMBALL_LOCK_THETA_MAX) if $self->_stheta > GIMBALL_LOCK_THETA_MAX; -# $self->_stheta(0) if $self->_stheta < 0; -# } else { -# my $size = $self->GetClientSize; -# my @quat = trackball( -# $orig->x / ($size->width / 2) - 1, -# 1 - $orig->y / ($size->height / 2), #/ -# $pos->x / ($size->width / 2) - 1, -# 1 - $pos->y / ($size->height / 2), #/ -# ); -# $self->_quat(mulquats($self->_quat, \@quat)); -# } -# $self->on_viewport_changed->() if $self->on_viewport_changed; -# $self->Refresh; -# $self->Update; -# } -# $self->_drag_start_pos($pos); -# } elsif ($e->MiddleIsDown || $e->RightIsDown) { -# # If dragging over blank area with right button, pan. -# if (defined $self->_drag_start_xy) { -# # get point in model space at Z = 0 -# my $cur_pos = $self->mouse_to_3d($e->GetX, $e->GetY, 0); -# my $orig = $self->mouse_to_3d($self->_drag_start_xy->x, $self->_drag_start_xy->y, 0); -# $self->_camera_target->translate(@{$orig->vector_to($cur_pos)->negative}); -# $self->on_viewport_changed->() if $self->on_viewport_changed; -# $self->Refresh; -# $self->Update; -# } -# $self->_drag_start_xy($pos); -# } -# } elsif ($e->LeftUp || $e->MiddleUp || $e->RightUp) { -# if ($self->_layer_height_edited) { -# $self->_layer_height_edited(undef); -# $self->{layer_height_edit_timer}->Stop; -# $self->on_model_update->() -# if ($object_idx_selected != -1 && $self->on_model_update); -# } elsif ($self->on_move && defined($self->_drag_volume_idx) && $self->_dragged) { -# # get all volumes belonging to the same group, if any -# my @volume_idxs; -# my $group_id = $self->volumes->[$self->_drag_volume_idx]->drag_group_id; -# if ($group_id == -1) { -# @volume_idxs = ($self->_drag_volume_idx); -# } else { -# @volume_idxs = grep $self->volumes->[$_]->drag_group_id == $group_id, -# 0..$#{$self->volumes}; -# } -# $self->on_move->(@volume_idxs); -# } -# $self->_drag_volume_idx(undef); -# $self->_drag_start_pos(undef); -# $self->_drag_start_xy(undef); -# $self->_dragged(undef); -# } elsif ($e->Moving) { -# $self->_mouse_pos($pos); -# # Only refresh if picking is enabled, in that case the objects may get highlighted if the mouse cursor -# # hovers over. -# if ($self->enable_picking) { -# $self->Update; -# $self->Refresh; -# } -# } else { -# $e->Skip(); -# } -#} -# -#sub mouse_wheel_event { -# my ($self, $e) = @_; -# -# if ($e->MiddleIsDown) { -# # Ignore the wheel events if the middle button is pressed. -# return; -# } -# if ($self->layer_editing_enabled && $self->{print}) { -# my $object_idx_selected = $self->_first_selected_object_id_for_variable_layer_height_editing; -# if ($object_idx_selected != -1) { -# # A volume is selected. Test, whether hovering over a layer thickness bar. -# if ($self->_variable_layer_thickness_bar_rect_mouse_inside($e)) { -# # Adjust the width of the selection. -# $self->{layer_height_edit_band_width} = max(min($self->{layer_height_edit_band_width} * (1 + 0.1 * $e->GetWheelRotation() / $e->GetWheelDelta()), 10.), 1.5); -# $self->Refresh; -# return; -# } -# } -# } -# -# # Calculate the zoom delta and apply it to the current zoom factor -# my $zoom = $e->GetWheelRotation() / $e->GetWheelDelta(); -# $zoom = max(min($zoom, 4), -4); -# $zoom /= 10; -# $zoom = $self->_zoom / (1-$zoom); -# # Don't allow to zoom too far outside the scene. -# my $zoom_min = $self->get_zoom_to_bounding_box_factor($self->max_bounding_box); -# $zoom_min *= 0.4 if defined $zoom_min; -# $zoom = $zoom_min if defined $zoom_min && $zoom < $zoom_min; -# $self->_zoom($zoom); -# -## # In order to zoom around the mouse point we need to translate -## # the camera target -## my $size = Slic3r::Pointf->new($self->GetSizeWH); -## my $pos = Slic3r::Pointf->new($e->GetX, $size->y - $e->GetY); #- -## $self->_camera_target->translate( -## # ($pos - $size/2) represents the vector from the viewport center -## # to the mouse point. By multiplying it by $zoom we get the new, -## # transformed, length of such vector. -## # Since we want that point to stay fixed, we move our camera target -## # in the opposite direction by the delta of the length of such vector -## # ($zoom - 1). We then scale everything by 1/$self->_zoom since -## # $self->_camera_target is expressed in terms of model units. -## -($pos->x - $size->x/2) * ($zoom) / $self->_zoom, -## -($pos->y - $size->y/2) * ($zoom) / $self->_zoom, -## 0, -## ) if 0; -# -# $self->on_viewport_changed->() if $self->on_viewport_changed; -# $self->Resize($self->GetSizeWH) if $self->IsShownOnScreen; -# $self->Refresh; -#} -# -## Reset selection. -#sub reset_objects { -# my ($self) = @_; -# if ($self->GetContext) { -# $self->SetCurrent($self->GetContext); -# $self->volumes->release_geometry; -# } -# $self->volumes->erase; -# $self->_dirty(1); -#} -# -## Setup camera to view all objects. -#sub set_viewport_from_scene { -# my ($self, $scene) = @_; -# -# $self->_sphi($scene->_sphi); -# $self->_stheta($scene->_stheta); -# $self->_camera_target($scene->_camera_target); -# $self->_zoom($scene->_zoom); -# $self->_quat($scene->_quat); -# $self->_dirty(1); -#} -# -## Set the camera to a default orientation, -## zoom to volumes. -#sub select_view { -# my ($self, $direction) = @_; -# -# my $dirvec; -# if (ref($direction)) { -# $dirvec = $direction; -# } else { -# if ($direction eq 'iso') { -# $dirvec = VIEW_DEFAULT; -# } elsif ($direction eq 'left') { -# $dirvec = VIEW_LEFT; -# } elsif ($direction eq 'right') { -# $dirvec = VIEW_RIGHT; -# } elsif ($direction eq 'top') { -# $dirvec = VIEW_TOP; -# } elsif ($direction eq 'bottom') { -# $dirvec = VIEW_BOTTOM; -# } elsif ($direction eq 'front') { -# $dirvec = VIEW_FRONT; -# } elsif ($direction eq 'rear') { -# $dirvec = VIEW_REAR; -# } -# } -# my $bb = $self->volumes_bounding_box; -# if (! $bb->empty) { -# $self->_sphi($dirvec->[0]); -# $self->_stheta($dirvec->[1]); -# # Avoid gimball lock. -# $self->_stheta(GIMBALL_LOCK_THETA_MAX) if $self->_stheta > GIMBALL_LOCK_THETA_MAX; -# $self->_stheta(0) if $self->_stheta < 0; -# $self->on_viewport_changed->() if $self->on_viewport_changed; -# $self->Refresh; -# } -#} -# -#sub get_zoom_to_bounding_box_factor { -# my ($self, $bb) = @_; -# my $max_bb_size = max(@{ $bb->size }); -# return undef if ($max_bb_size == 0); -# -# # project the bbox vertices on a plane perpendicular to the camera forward axis -# # then calculates the vertices coordinate on this plane along the camera xy axes -# -# # we need the view matrix, we let opengl calculate it (same as done in render sub) -# glMatrixMode(GL_MODELVIEW); -# glLoadIdentity(); -# -# if (!TURNTABLE_MODE) { -# # Shift the perspective camera. -# my $camera_pos = Slic3r::Pointf3->new(0,0,-$self->_camera_distance); -# glTranslatef(@$camera_pos); -# } -# -# if (TURNTABLE_MODE) { -# # Turntable mode is enabled by default. -# glRotatef(-$self->_stheta, 1, 0, 0); # pitch -# glRotatef($self->_sphi, 0, 0, 1); # yaw -# } else { -# # Shift the perspective camera. -# my $camera_pos = Slic3r::Pointf3->new(0,0,-$self->_camera_distance); -# glTranslatef(@$camera_pos); -# my @rotmat = quat_to_rotmatrix($self->quat); -# glMultMatrixd_p(@rotmat[0..15]); -# } -# glTranslatef(@{ $self->_camera_target->negative }); -# -# # get the view matrix back from opengl -# my @matrix = glGetFloatv_p(GL_MODELVIEW_MATRIX); -# -# # camera axes -# my $right = Slic3r::Pointf3->new($matrix[0], $matrix[4], $matrix[8]); -# my $up = Slic3r::Pointf3->new($matrix[1], $matrix[5], $matrix[9]); -# my $forward = Slic3r::Pointf3->new($matrix[2], $matrix[6], $matrix[10]); -# -# my $bb_min = $bb->min_point(); -# my $bb_max = $bb->max_point(); -# my $bb_center = $bb->center(); -# -# # bbox vertices in world space -# my @vertices = (); -# push(@vertices, $bb_min); -# push(@vertices, Slic3r::Pointf3->new($bb_max->x(), $bb_min->y(), $bb_min->z())); -# push(@vertices, Slic3r::Pointf3->new($bb_max->x(), $bb_max->y(), $bb_min->z())); -# push(@vertices, Slic3r::Pointf3->new($bb_min->x(), $bb_max->y(), $bb_min->z())); -# push(@vertices, Slic3r::Pointf3->new($bb_min->x(), $bb_min->y(), $bb_max->z())); -# push(@vertices, Slic3r::Pointf3->new($bb_max->x(), $bb_min->y(), $bb_max->z())); -# push(@vertices, $bb_max); -# push(@vertices, Slic3r::Pointf3->new($bb_min->x(), $bb_max->y(), $bb_max->z())); -# -# my $max_x = 0.0; -# my $max_y = 0.0; -# -# # margin factor to give some empty space around the bbox -# my $margin_factor = 1.25; -# -# foreach my $v (@vertices) { -# # project vertex on the plane perpendicular to camera forward axis -# my $pos = Slic3r::Pointf3->new($v->x() - $bb_center->x(), $v->y() - $bb_center->y(), $v->z() - $bb_center->z()); -# my $proj_on_normal = $pos->x() * $forward->x() + $pos->y() * $forward->y() + $pos->z() * $forward->z(); -# my $proj_on_plane = Slic3r::Pointf3->new($pos->x() - $proj_on_normal * $forward->x(), $pos->y() - $proj_on_normal * $forward->y(), $pos->z() - $proj_on_normal * $forward->z()); -# -# # calculates vertex coordinate along camera xy axes -# my $x_on_plane = $proj_on_plane->x() * $right->x() + $proj_on_plane->y() * $right->y() + $proj_on_plane->z() * $right->z(); -# my $y_on_plane = $proj_on_plane->x() * $up->x() + $proj_on_plane->y() * $up->y() + $proj_on_plane->z() * $up->z(); -# -# $max_x = max($max_x, $margin_factor * 2 * abs($x_on_plane)); -# $max_y = max($max_y, $margin_factor * 2 * abs($y_on_plane)); -# } -# -# return undef if (($max_x == 0) || ($max_y == 0)); -# -# my ($cw, $ch) = $self->GetSizeWH; -# my $min_ratio = min($cw / $max_x, $ch / $max_y); -# -# return $min_ratio; -#} -# -#sub zoom_to_bounding_box { -# my ($self, $bb) = @_; -# # Calculate the zoom factor needed to adjust viewport to bounding box. -# my $zoom = $self->get_zoom_to_bounding_box_factor($bb); -# if (defined $zoom) { -# $self->_zoom($zoom); -# # center view around bounding box center -# $self->_camera_target($bb->center); -# $self->on_viewport_changed->() if $self->on_viewport_changed; -# $self->Resize($self->GetSizeWH) if $self->IsShownOnScreen; -# $self->Refresh; -# } -#} -# -#sub zoom_to_bed { -# my ($self) = @_; -# -# if ($self->bed_shape) { -# $self->zoom_to_bounding_box($self->bed_bounding_box); -# } -#} -# -#sub zoom_to_volume { -# my ($self, $volume_idx) = @_; -# -# my $volume = $self->volumes->[$volume_idx]; -# my $bb = $volume->transformed_bounding_box; -# $self->zoom_to_bounding_box($bb); -#} -# -#sub zoom_to_volumes { -# my ($self) = @_; -# -# $self->_apply_zoom_to_volumes_filter(1); -# $self->zoom_to_bounding_box($self->volumes_bounding_box); -# $self->_apply_zoom_to_volumes_filter(0); -#} -# -#sub volumes_bounding_box { -# my ($self) = @_; -# -# my $bb = Slic3r::Geometry::BoundingBoxf3->new; -# foreach my $v (@{$self->volumes}) { -# $bb->merge($v->transformed_bounding_box) if (! $self->_apply_zoom_to_volumes_filter || $v->zoom_to_volumes); -# } -# return $bb; -#} -# -#sub bed_bounding_box { -# my ($self) = @_; -# -# my $bb = Slic3r::Geometry::BoundingBoxf3->new; -# if ($self->bed_shape) { -# $bb->merge_point(Slic3r::Pointf3->new(@$_, 0)) for @{$self->bed_shape}; -# } -# return $bb; -#} -# -#sub max_bounding_box { -# my ($self) = @_; -# -# my $bb = $self->bed_bounding_box; -# $bb->merge($self->volumes_bounding_box); -# return $bb; -#} -# -## Used by ObjectCutDialog and ObjectPartsPanel to generate a rectangular ground plane -## to support the scene objects. -#sub set_auto_bed_shape { -# my ($self, $bed_shape) = @_; -# -# # draw a default square bed around object center -# my $max_size = max(@{ $self->volumes_bounding_box->size }); -# my $center = $self->volumes_bounding_box->center; -# $self->set_bed_shape([ -# [ $center->x - $max_size, $center->y - $max_size ], #-- -# [ $center->x + $max_size, $center->y - $max_size ], #-- -# [ $center->x + $max_size, $center->y + $max_size ], #++ -# [ $center->x - $max_size, $center->y + $max_size ], #++ -# ]); -# # Set the origin for painting of the coordinate system axes. -# $self->origin(Slic3r::Pointf->new(@$center[X,Y])); -#} -# -## Set the bed shape to a single closed 2D polygon (array of two element arrays), -## triangulate the bed and store the triangles into $self->bed_triangles, -## fills the $self->bed_grid_lines and sets $self->origin. -## Sets $self->bed_polygon to limit the object placement. -#sub set_bed_shape { -# my ($self, $bed_shape) = @_; -# -# $self->bed_shape($bed_shape); -# -# # triangulate bed -# my $expolygon = Slic3r::ExPolygon->new([ map [map scale($_), @$_], @$bed_shape ]); -# my $bed_bb = $expolygon->bounding_box; -# -# { -# my @points = (); -# foreach my $triangle (@{ $expolygon->triangulate }) { -# push @points, map {+ unscale($_->x), unscale($_->y), GROUND_Z } @$triangle; -# } -# $self->bed_triangles(OpenGL::Array->new_list(GL_FLOAT, @points)); -# } -# -# { -# my @polylines = (); -# for (my $x = $bed_bb->x_min; $x <= $bed_bb->x_max; $x += scale 10) { -# push @polylines, Slic3r::Polyline->new([$x,$bed_bb->y_min], [$x,$bed_bb->y_max]); -# } -# for (my $y = $bed_bb->y_min; $y <= $bed_bb->y_max; $y += scale 10) { -# push @polylines, Slic3r::Polyline->new([$bed_bb->x_min,$y], [$bed_bb->x_max,$y]); -# } -# # clip with a slightly grown expolygon because our lines lay on the contours and -# # may get erroneously clipped -# my @lines = map Slic3r::Line->new(@$_[0,-1]), -# @{intersection_pl(\@polylines, [ @{$expolygon->offset(+scaled_epsilon)} ])}; -# -# # append bed contours -# push @lines, map @{$_->lines}, @$expolygon; -# -# my @points = (); -# foreach my $line (@lines) { -# push @points, map {+ unscale($_->x), unscale($_->y), GROUND_Z } @$line; #)) -# } -# $self->bed_grid_lines(OpenGL::Array->new_list(GL_FLOAT, @points)); -# } -# -# # Set the origin for painting of the coordinate system axes. -# $self->origin(Slic3r::Pointf->new(0,0)); -# -# $self->bed_polygon(offset_ex([$expolygon->contour], $bed_bb->radius * 1.7, JT_ROUND, scale(0.5))->[0]->contour->clone); -#} -# -#sub deselect_volumes { -# my ($self) = @_; -# $_->set_selected(0) for @{$self->volumes}; -#} -# -#sub select_volume { -# my ($self, $volume_idx) = @_; -# -# return if ($volume_idx >= scalar(@{$self->volumes})); -# -# $self->volumes->[$volume_idx]->set_selected(1) -# if $volume_idx != -1; -#} -# -#sub SetCuttingPlane { -# my ($self, $z, $expolygons) = @_; -# -# $self->cutting_plane_z($z); -# -# # grow slices in order to display them better -# $expolygons = offset_ex([ map @$_, @$expolygons ], scale 0.1); -# -# my @verts = (); -# foreach my $line (map @{$_->lines}, map @$_, @$expolygons) { -# push @verts, ( -# unscale($line->a->x), unscale($line->a->y), $z, #)) -# unscale($line->b->x), unscale($line->b->y), $z, #)) -# ); -# } -# $self->cut_lines_vertices(OpenGL::Array->new_list(GL_FLOAT, @verts)); -#} -# -## Given an axis and angle, compute quaternion. -#sub axis_to_quat { -# my ($ax, $phi) = @_; -# -# my $lena = sqrt(reduce { $a + $b } (map { $_ * $_ } @$ax)); -# my @q = map { $_ * (1 / $lena) } @$ax; -# @q = map { $_ * sin($phi / 2.0) } @q; -# $q[$#q + 1] = cos($phi / 2.0); -# return @q; -#} -# -## Project a point on the virtual trackball. -## If it is inside the sphere, map it to the sphere, if it outside map it -## to a hyperbola. -#sub project_to_sphere { -# my ($r, $x, $y) = @_; -# -# my $d = sqrt($x * $x + $y * $y); -# if ($d < $r * 0.70710678118654752440) { # Inside sphere -# return sqrt($r * $r - $d * $d); -# } else { # On hyperbola -# my $t = $r / 1.41421356237309504880; -# return $t * $t / $d; -# } -#} -# -#sub cross { -# my ($v1, $v2) = @_; -# -# return (@$v1[1] * @$v2[2] - @$v1[2] * @$v2[1], -# @$v1[2] * @$v2[0] - @$v1[0] * @$v2[2], -# @$v1[0] * @$v2[1] - @$v1[1] * @$v2[0]); -#} -# -## Simulate a track-ball. Project the points onto the virtual trackball, -## then figure out the axis of rotation, which is the cross product of -## P1 P2 and O P1 (O is the center of the ball, 0,0,0) Note: This is a -## deformed trackball-- is a trackball in the center, but is deformed -## into a hyperbolic sheet of rotation away from the center. -## It is assumed that the arguments to this routine are in the range -## (-1.0 ... 1.0). -#sub trackball { -# my ($p1x, $p1y, $p2x, $p2y) = @_; -# -# if ($p1x == $p2x && $p1y == $p2y) { -# # zero rotation -# return (0.0, 0.0, 0.0, 1.0); -# } -# -# # First, figure out z-coordinates for projection of P1 and P2 to -# # deformed sphere -# my @p1 = ($p1x, $p1y, project_to_sphere(TRACKBALLSIZE, $p1x, $p1y)); -# my @p2 = ($p2x, $p2y, project_to_sphere(TRACKBALLSIZE, $p2x, $p2y)); -# -# # axis of rotation (cross product of P1 and P2) -# my @a = cross(\@p2, \@p1); -# -# # Figure out how much to rotate around that axis. -# my @d = map { $_ * $_ } (map { $p1[$_] - $p2[$_] } 0 .. $#p1); -# my $t = sqrt(reduce { $a + $b } @d) / (2.0 * TRACKBALLSIZE); -# -# # Avoid problems with out-of-control values... -# $t = 1.0 if ($t > 1.0); -# $t = -1.0 if ($t < -1.0); -# my $phi = 2.0 * asin($t); -# -# return axis_to_quat(\@a, $phi); -#} -# -## Build a rotation matrix, given a quaternion rotation. -#sub quat_to_rotmatrix { -# my ($q) = @_; -# -# my @m = (); -# -# $m[0] = 1.0 - 2.0 * (@$q[1] * @$q[1] + @$q[2] * @$q[2]); -# $m[1] = 2.0 * (@$q[0] * @$q[1] - @$q[2] * @$q[3]); -# $m[2] = 2.0 * (@$q[2] * @$q[0] + @$q[1] * @$q[3]); -# $m[3] = 0.0; -# -# $m[4] = 2.0 * (@$q[0] * @$q[1] + @$q[2] * @$q[3]); -# $m[5] = 1.0 - 2.0 * (@$q[2] * @$q[2] + @$q[0] * @$q[0]); -# $m[6] = 2.0 * (@$q[1] * @$q[2] - @$q[0] * @$q[3]); -# $m[7] = 0.0; -# -# $m[8] = 2.0 * (@$q[2] * @$q[0] - @$q[1] * @$q[3]); -# $m[9] = 2.0 * (@$q[1] * @$q[2] + @$q[0] * @$q[3]); -# $m[10] = 1.0 - 2.0 * (@$q[1] * @$q[1] + @$q[0] * @$q[0]); -# $m[11] = 0.0; -# -# $m[12] = 0.0; -# $m[13] = 0.0; -# $m[14] = 0.0; -# $m[15] = 1.0; -# -# return @m; -#} -# -#sub mulquats { -# my ($q1, $rq) = @_; -# -# return (@$q1[3] * @$rq[0] + @$q1[0] * @$rq[3] + @$q1[1] * @$rq[2] - @$q1[2] * @$rq[1], -# @$q1[3] * @$rq[1] + @$q1[1] * @$rq[3] + @$q1[2] * @$rq[0] - @$q1[0] * @$rq[2], -# @$q1[3] * @$rq[2] + @$q1[2] * @$rq[3] + @$q1[0] * @$rq[1] - @$q1[1] * @$rq[0], -# @$q1[3] * @$rq[3] - @$q1[0] * @$rq[0] - @$q1[1] * @$rq[1] - @$q1[2] * @$rq[2]) -#} -# -## Convert the screen space coordinate to an object space coordinate. -## If the Z screen space coordinate is not provided, a depth buffer value is substituted. -#sub mouse_to_3d { -# my ($self, $x, $y, $z) = @_; -# -# return unless $self->GetContext; -# $self->SetCurrent($self->GetContext); -# -# my @viewport = glGetIntegerv_p(GL_VIEWPORT); # 4 items -# my @mview = glGetDoublev_p(GL_MODELVIEW_MATRIX); # 16 items -# my @proj = glGetDoublev_p(GL_PROJECTION_MATRIX); # 16 items -# -# $y = $viewport[3] - $y; -# $z //= glReadPixels_p($x, $y, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT); -# my @projected = gluUnProject_p($x, $y, $z, @mview, @proj, @viewport); -# return Slic3r::Pointf3->new(@projected); -#} -# -#sub GetContext { -# my ($self) = @_; -# return $self->{context} ||= Wx::GLContext->new($self); -#} -# -#sub SetCurrent { -# my ($self, $context) = @_; -# return $self->SUPER::SetCurrent($context); -#} -# -#sub UseVBOs { -# my ($self) = @_; -# -# if (! defined ($self->{use_VBOs})) { -# my $use_legacy = wxTheApp->{app_config}->get('use_legacy_opengl'); -# if ($use_legacy eq '1') { -# # Disable OpenGL 2.0 rendering. -# $self->{use_VBOs} = 0; -# # Don't enable the layer editing tool. -# $self->{layer_editing_enabled} = 0; -# # 2 means failed -# $self->{layer_editing_initialized} = 2; -# return 0; -# } -# # This is a special path for wxWidgets on GTK, where an OpenGL context is initialized -# # first when an OpenGL widget is shown for the first time. How ugly. -# return 0 if (! $self->init && $^O eq 'linux'); -# # Don't use VBOs if anything fails. -# $self->{use_VBOs} = 0; -# if ($self->GetContext) { -# $self->SetCurrent($self->GetContext); -# Slic3r::GUI::_3DScene::_glew_init; -# my @gl_version = split(/\./, glGetString(GL_VERSION)); -# $self->{use_VBOs} = int($gl_version[0]) >= 2; -# # print "UseVBOs $self OpenGL major: $gl_version[0], minor: $gl_version[1]. Use VBOs: ", $self->{use_VBOs}, "\n"; -# } -# } -# return $self->{use_VBOs}; -#} -# -#sub Resize { -# my ($self, $x, $y) = @_; -# -# return unless $self->GetContext; -# $self->_dirty(0); -# -# $self->SetCurrent($self->GetContext); -# glViewport(0, 0, $x, $y); -# -# $x /= $self->_zoom; -# $y /= $self->_zoom; -# -# glMatrixMode(GL_PROJECTION); -# glLoadIdentity(); -# if ($self->_camera_type eq 'ortho') { -# #FIXME setting the size of the box 10x larger than necessary -# # is only a workaround for an incorrectly set camera. -# # This workaround harms Z-buffer accuracy! -## my $depth = 1.05 * $self->max_bounding_box->radius(); -# my $depth = 5.0 * max(@{ $self->max_bounding_box->size }); -# glOrtho( -# -$x/2, $x/2, -$y/2, $y/2, -# -$depth, $depth, -# ); -# } else { -# die "Invalid camera type: ", $self->_camera_type, "\n" if ($self->_camera_type ne 'perspective'); -# my $bbox_r = $self->max_bounding_box->radius(); -# my $fov = PI * 45. / 180.; -# my $fov_tan = tan(0.5 * $fov); -# my $cam_distance = 0.5 * $bbox_r / $fov_tan; -# $self->_camera_distance($cam_distance); -# my $nr = $cam_distance - $bbox_r * 1.1; -# my $fr = $cam_distance + $bbox_r * 1.1; -# $nr = 1 if ($nr < 1); -# $fr = $nr + 1 if ($fr < $nr + 1); -# my $h2 = $fov_tan * $nr; -# my $w2 = $h2 * $x / $y; -# glFrustum(-$w2, $w2, -$h2, $h2, $nr, $fr); -# } -# glMatrixMode(GL_MODELVIEW); -#} -# -#sub InitGL { -# my $self = shift; -# -# return if $self->init; -# return unless $self->GetContext; -# $self->init(1); -# -## # This is a special path for wxWidgets on GTK, where an OpenGL context is initialized -## # first when an OpenGL widget is shown for the first time. How ugly. -## # In that case the volumes are wainting to be moved to Vertex Buffer Objects -## # after the OpenGL context is being initialized. -## $self->volumes->finalize_geometry(1) -## if ($^O eq 'linux' && $self->UseVBOs); -# -# $self->zoom_to_bed; -# -# glClearColor(0, 0, 0, 1); -# glColor3f(1, 0, 0); -# glEnable(GL_DEPTH_TEST); -# glClearDepth(1.0); -# glDepthFunc(GL_LEQUAL); -# glEnable(GL_CULL_FACE); -# glEnable(GL_BLEND); -# glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); -# -# # Set antialiasing/multisampling -# glDisable(GL_LINE_SMOOTH); -# glDisable(GL_POLYGON_SMOOTH); -# -# # See "GL_MULTISAMPLE and GL_ARRAY_BUFFER_ARB messages on failed launch" -# # https://github.com/alexrj/Slic3r/issues/4085 -# eval { -# # Disable the multi sampling by default, so the picking by color will work correctly. -# glDisable(GL_MULTISAMPLE); -# }; -# # Disable multi sampling if the eval failed. -# $self->{can_multisample} = 0 if $@; -# -# # ambient lighting -# glLightModelfv_p(GL_LIGHT_MODEL_AMBIENT, 0.3, 0.3, 0.3, 1); -# -# glEnable(GL_LIGHTING); -# glEnable(GL_LIGHT0); -# glEnable(GL_LIGHT1); -# -# # light from camera -# glLightfv_p(GL_LIGHT1, GL_POSITION, 1, 0, 1, 0); -# glLightfv_p(GL_LIGHT1, GL_SPECULAR, 0.3, 0.3, 0.3, 1); -# glLightfv_p(GL_LIGHT1, GL_DIFFUSE, 0.2, 0.2, 0.2, 1); -# -# # Enables Smooth Color Shading; try GL_FLAT for (lack of) fun. -# glShadeModel(GL_SMOOTH); -# -## glMaterialfv_p(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, 0.5, 0.3, 0.3, 1); -## glMaterialfv_p(GL_FRONT_AND_BACK, GL_SPECULAR, 1, 1, 1, 1); -## glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 50); -## glMaterialfv_p(GL_FRONT_AND_BACK, GL_EMISSION, 0.1, 0, 0, 0.9); -# -# # A handy trick -- have surface material mirror the color. -# glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE); -# glEnable(GL_COLOR_MATERIAL); -# glEnable(GL_MULTISAMPLE) if ($self->{can_multisample}); -# -# if ($self->UseVBOs) { -# my $shader = new Slic3r::GUI::_3DScene::GLShader; -## if (! $shader->load($self->_fragment_shader_Phong, $self->_vertex_shader_Phong)) { -# print "Compilaton of path shader failed: \n" . $shader->last_error . "\n"; -# $shader = undef; -# } else { -# $self->{plain_shader} = $shader; -# } -# } -#} -# -#sub DestroyGL { -# my $self = shift; -# if ($self->GetContext) { -# $self->SetCurrent($self->GetContext); -# if ($self->{plain_shader}) { -# $self->{plain_shader}->release; -# delete $self->{plain_shader}; -# } -# if ($self->{layer_height_edit_shader}) { -# $self->{layer_height_edit_shader}->release; -# delete $self->{layer_height_edit_shader}; -# } -# $self->volumes->release_geometry; -# } -#} -# -#sub Render { -# my ($self, $dc) = @_; -# -# # prevent calling SetCurrent() when window is not shown yet -# return unless $self->IsShownOnScreen; -# return unless my $context = $self->GetContext; -# $self->SetCurrent($context); -# $self->InitGL; -# -# glClearColor(1, 1, 1, 1); -# glClearDepth(1); -# glDepthFunc(GL_LESS); -# glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); -# -# glMatrixMode(GL_MODELVIEW); -# glLoadIdentity(); -# -# if (!TURNTABLE_MODE) { -# # Shift the perspective camera. -# my $camera_pos = Slic3r::Pointf3->new(0,0,-$self->_camera_distance); -# glTranslatef(@$camera_pos); -# } -# -# if (TURNTABLE_MODE) { -# # Turntable mode is enabled by default. -# glRotatef(-$self->_stheta, 1, 0, 0); # pitch -# glRotatef($self->_sphi, 0, 0, 1); # yaw -# } else { -# my @rotmat = quat_to_rotmatrix($self->quat); -# glMultMatrixd_p(@rotmat[0..15]); -# } -# -# glTranslatef(@{ $self->_camera_target->negative }); -# -# # light from above -# glLightfv_p(GL_LIGHT0, GL_POSITION, -0.5, -0.5, 1, 0); -# glLightfv_p(GL_LIGHT0, GL_SPECULAR, 0.2, 0.2, 0.2, 1); -# glLightfv_p(GL_LIGHT0, GL_DIFFUSE, 0.5, 0.5, 0.5, 1); -# -# # Head light -# glLightfv_p(GL_LIGHT1, GL_POSITION, 1, 0, 1, 0); -# -# if ($self->enable_picking && !$self->_mouse_dragging) { -# if (my $pos = $self->_mouse_pos) { -# # Render the object for picking. -# # FIXME This cannot possibly work in a multi-sampled context as the color gets mangled by the anti-aliasing. -# # Better to use software ray-casting on a bounding-box hierarchy. -# glPushAttrib(GL_ENABLE_BIT); -# glDisable(GL_MULTISAMPLE) if ($self->{can_multisample}); -# glDisable(GL_LIGHTING); -# glDisable(GL_BLEND); -# $self->draw_volumes(1); -# glPopAttrib(); -# glFlush(); -# my $col = [ glReadPixels_p($pos->x, $self->GetSize->GetHeight - $pos->y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE) ]; -# my $volume_idx = $col->[0] + $col->[1]*256 + $col->[2]*256*256; -# $self->_hover_volume_idx(undef); -# $_->set_hover(0) for @{$self->volumes}; -# if ($volume_idx <= $#{$self->volumes}) { -# $self->_hover_volume_idx($volume_idx); -# -# $self->volumes->[$volume_idx]->set_hover(1); -# my $group_id = $self->volumes->[$volume_idx]->select_group_id; -# if ($group_id != -1) { -# $_->set_hover(1) for grep { $_->select_group_id == $group_id } @{$self->volumes}; -# } -# -# $self->on_hover->($volume_idx) if $self->on_hover; -# } -# glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); -# } -# } -# -# # draw fixed background -# if ($self->background) { -# glDisable(GL_LIGHTING); -# glPushMatrix(); -# glLoadIdentity(); -# -# glMatrixMode(GL_PROJECTION); -# glPushMatrix(); -# glLoadIdentity(); -# -# # Draws a bluish bottom to top gradient over the complete screen. -# glDisable(GL_DEPTH_TEST); -# glBegin(GL_QUADS); -# glColor3f(0.0,0.0,0.0); -# glVertex3f(-1.0,-1.0, 1.0); -# glVertex3f( 1.0,-1.0, 1.0); -# glColor3f(10/255,98/255,144/255); -# glVertex3f( 1.0, 1.0, 1.0); -# glVertex3f(-1.0, 1.0, 1.0); -# glEnd(); -# glPopMatrix(); -# glEnable(GL_DEPTH_TEST); -# -# glMatrixMode(GL_MODELVIEW); -# glPopMatrix(); -# glEnable(GL_LIGHTING); -# } -# -# # draw ground and axes -# glDisable(GL_LIGHTING); -# -# # draw ground -# my $ground_z = GROUND_Z; -# -# if ($self->bed_triangles) { -# glDisable(GL_DEPTH_TEST); -# -# glEnable(GL_BLEND); -# glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); -# -# glEnableClientState(GL_VERTEX_ARRAY); -# glColor4f(0.8, 0.6, 0.5, 0.4); -# glNormal3d(0,0,1); -# glVertexPointer_c(3, GL_FLOAT, 0, $self->bed_triangles->ptr()); -# glDrawArrays(GL_TRIANGLES, 0, $self->bed_triangles->elements / 3); -# glDisableClientState(GL_VERTEX_ARRAY); -# -# # we need depth test for grid, otherwise it would disappear when looking -# # the object from below -# glEnable(GL_DEPTH_TEST); -# -# # draw grid -# glLineWidth(3); -# glColor4f(0.2, 0.2, 0.2, 0.4); -# glEnableClientState(GL_VERTEX_ARRAY); -# glVertexPointer_c(3, GL_FLOAT, 0, $self->bed_grid_lines->ptr()); -# glDrawArrays(GL_LINES, 0, $self->bed_grid_lines->elements / 3); -# glDisableClientState(GL_VERTEX_ARRAY); -# -# glDisable(GL_BLEND); -# } -# -# my $volumes_bb = $self->volumes_bounding_box; -# -# { -# # draw axes -# # disable depth testing so that axes are not covered by ground -# glDisable(GL_DEPTH_TEST); -# my $origin = $self->origin; -# my $axis_len = $self->use_plain_shader ? 0.3 * max(@{ $self->bed_bounding_box->size }) : 2 * max(@{ $volumes_bb->size }); -# glLineWidth(2); -# glBegin(GL_LINES); -# # draw line for x axis -# glColor3f(1, 0, 0); -# glVertex3f(@$origin, $ground_z); -# glVertex3f($origin->x + $axis_len, $origin->y, $ground_z); #,, -# # draw line for y axis -# glColor3f(0, 1, 0); -# glVertex3f(@$origin, $ground_z); -# glVertex3f($origin->x, $origin->y + $axis_len, $ground_z); #++ -# glEnd(); -# # draw line for Z axis -# # (re-enable depth test so that axis is correctly shown when objects are behind it) -# glEnable(GL_DEPTH_TEST); -# glBegin(GL_LINES); -# glColor3f(0, 0, 1); -# glVertex3f(@$origin, $ground_z); -# glVertex3f(@$origin, $ground_z+$axis_len); -# glEnd(); -# } -# -# glEnable(GL_LIGHTING); -# -# # draw objects -# if (! $self->use_plain_shader) { -# $self->draw_volumes; -# } elsif ($self->UseVBOs) { -# if ($self->enable_picking) { -# $self->mark_volumes_for_layer_height; -# $self->volumes->set_print_box($self->bed_bounding_box->x_min, $self->bed_bounding_box->y_min, 0.0, $self->bed_bounding_box->x_max, $self->bed_bounding_box->y_max, $self->{config}->get('max_print_height')); -# $self->volumes->check_outside_state($self->{config}); -# # do not cull backfaces to show broken geometry, if any -# glDisable(GL_CULL_FACE); -# } -# $self->{plain_shader}->enable if $self->{plain_shader}; -# $self->volumes->render_VBOs; -# $self->{plain_shader}->disable; -# glEnable(GL_CULL_FACE) if ($self->enable_picking); -# } else { -# # do not cull backfaces to show broken geometry, if any -# glDisable(GL_CULL_FACE) if ($self->enable_picking); -# $self->volumes->render_legacy; -# glEnable(GL_CULL_FACE) if ($self->enable_picking); -# } -# -# if (defined $self->cutting_plane_z) { -# # draw cutting plane -# my $plane_z = $self->cutting_plane_z; -# my $bb = $volumes_bb; -# glDisable(GL_CULL_FACE); -# glDisable(GL_LIGHTING); -# glEnable(GL_BLEND); -# glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); -# glBegin(GL_QUADS); -# glColor4f(0.8, 0.8, 0.8, 0.5); -# glVertex3f($bb->x_min-20, $bb->y_min-20, $plane_z); -# glVertex3f($bb->x_max+20, $bb->y_min-20, $plane_z); -# glVertex3f($bb->x_max+20, $bb->y_max+20, $plane_z); -# glVertex3f($bb->x_min-20, $bb->y_max+20, $plane_z); -# glEnd(); -# glEnable(GL_CULL_FACE); -# glDisable(GL_BLEND); -# -# # draw cutting contours -# glEnableClientState(GL_VERTEX_ARRAY); -# glLineWidth(2); -# glColor3f(0, 0, 0); -# glVertexPointer_c(3, GL_FLOAT, 0, $self->cut_lines_vertices->ptr()); -# glDrawArrays(GL_LINES, 0, $self->cut_lines_vertices->elements / 3); -# glVertexPointer_c(3, GL_FLOAT, 0, 0); -# glDisableClientState(GL_VERTEX_ARRAY); -# } -# -# # draw warning message -# $self->draw_warning; -# -# # draw gcode preview legend -# $self->draw_legend; -# -# $self->draw_active_object_annotations; -# -# $self->SwapBuffers(); -#} -# -#sub draw_volumes { -# # $fakecolor is a boolean indicating, that the objects shall be rendered in a color coding the object index for picking. -# my ($self, $fakecolor) = @_; -# -# # do not cull backfaces to show broken geometry, if any -# glDisable(GL_CULL_FACE); -# -# glEnable(GL_BLEND); -# glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); -# -# glEnableClientState(GL_VERTEX_ARRAY); -# glEnableClientState(GL_NORMAL_ARRAY); -# -# foreach my $volume_idx (0..$#{$self->volumes}) { -# my $volume = $self->volumes->[$volume_idx]; -# -# if ($fakecolor) { -# # Object picking mode. Render the object with a color encoding the object index. -# my $r = ($volume_idx & 0x000000FF) >> 0; -# my $g = ($volume_idx & 0x0000FF00) >> 8; -# my $b = ($volume_idx & 0x00FF0000) >> 16; -# glColor4f($r/255.0, $g/255.0, $b/255.0, 1); -# } elsif ($volume->selected) { -# glColor4f(@{ &SELECTED_COLOR }); -# } elsif ($volume->hover) { -# glColor4f(@{ &HOVER_COLOR }); -# } else { -# glColor4f(@{ $volume->color }); -# } -# -# $volume->render; -# } -# glDisableClientState(GL_NORMAL_ARRAY); -# glDisableClientState(GL_VERTEX_ARRAY); -# -# glDisable(GL_BLEND); -# glEnable(GL_CULL_FACE); -#} -# -#sub mark_volumes_for_layer_height { -# my ($self) = @_; -# -# foreach my $volume_idx (0..$#{$self->volumes}) { -# my $volume = $self->volumes->[$volume_idx]; -# my $object_id = int($volume->select_group_id / 1000000); -# if ($self->layer_editing_enabled && $volume->selected && $self->{layer_height_edit_shader} && -# $volume->has_layer_height_texture && $object_id < $self->{print}->object_count) { -# $volume->set_layer_height_texture_data($self->{layer_preview_z_texture_id}, $self->{layer_height_edit_shader}->shader_program_id, -# $self->{print}->get_object($object_id), $self->_variable_layer_thickness_bar_mouse_cursor_z_relative, $self->{layer_height_edit_band_width}); -# } else { -# $volume->reset_layer_height_texture_data(); -# } -# } -#} -# -#sub _load_image_set_texture { -# my ($self, $file_name) = @_; -# # Load a PNG with an alpha channel. -# my $img = Wx::Image->new; -# $img->LoadFile(Slic3r::var($file_name), wxBITMAP_TYPE_PNG); -# # Get RGB & alpha raw data from wxImage, interleave them into a Perl array. -# my @rgb = unpack 'C*', $img->GetData(); -# my @alpha = $img->HasAlpha ? unpack 'C*', $img->GetAlpha() : (255) x (int(@rgb) / 3); -# my $n_pixels = int(@alpha); -# my @data = (0)x($n_pixels * 4); -# for (my $i = 0; $i < $n_pixels; $i += 1) { -# $data[$i*4 ] = $rgb[$i*3]; -# $data[$i*4+1] = $rgb[$i*3+1]; -# $data[$i*4+2] = $rgb[$i*3+2]; -# $data[$i*4+3] = $alpha[$i]; -# } -# # Initialize a raw bitmap data. -# my $params = { -# loaded => 1, -# valid => $n_pixels > 0, -# width => $img->GetWidth, -# height => $img->GetHeight, -# data => OpenGL::Array->new_list(GL_UNSIGNED_BYTE, @data), -# texture_id => glGenTextures_p(1) -# }; -# # Create and initialize a texture with the raw data. -# glBindTexture(GL_TEXTURE_2D, $params->{texture_id}); -# glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -# glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); -# glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1); -# glTexImage2D_c(GL_TEXTURE_2D, 0, GL_RGBA8, $params->{width}, $params->{height}, 0, GL_RGBA, GL_UNSIGNED_BYTE, $params->{data}->ptr); -# glBindTexture(GL_TEXTURE_2D, 0); -# return $params; -#} -# -#sub _variable_layer_thickness_load_overlay_image { -# my ($self) = @_; -# $self->{layer_preview_annotation} = $self->_load_image_set_texture('variable_layer_height_tooltip.png') -# if (! $self->{layer_preview_annotation}->{loaded}); -# return $self->{layer_preview_annotation}->{valid}; -#} -# -#sub _variable_layer_thickness_load_reset_image { -# my ($self) = @_; -# $self->{layer_preview_reset_image} = $self->_load_image_set_texture('variable_layer_height_reset.png') -# if (! $self->{layer_preview_reset_image}->{loaded}); -# return $self->{layer_preview_reset_image}->{valid}; -#} -# -## Paint the tooltip. -#sub _render_image { -# my ($self, $image, $l, $r, $b, $t) = @_; -# $self->_render_texture($image->{texture_id}, $l, $r, $b, $t); -#} -# -#sub _render_texture { -# my ($self, $tex_id, $l, $r, $b, $t) = @_; -# -# glColor4f(1.,1.,1.,1.); -# glDisable(GL_LIGHTING); -# glEnable(GL_BLEND); -# glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); -# glEnable(GL_TEXTURE_2D); -# glBindTexture(GL_TEXTURE_2D, $tex_id); -# glBegin(GL_QUADS); -# glTexCoord2d(0.,1.); glVertex3f($l, $b, 0); -# glTexCoord2d(1.,1.); glVertex3f($r, $b, 0); -# glTexCoord2d(1.,0.); glVertex3f($r, $t, 0); -# glTexCoord2d(0.,0.); glVertex3f($l, $t, 0); -# glEnd(); -# glBindTexture(GL_TEXTURE_2D, 0); -# glDisable(GL_TEXTURE_2D); -# glDisable(GL_BLEND); -# glEnable(GL_LIGHTING); -#} -# -#sub draw_active_object_annotations { -# # $fakecolor is a boolean indicating, that the objects shall be rendered in a color coding the object index for picking. -# my ($self) = @_; -# -# return if (! $self->{layer_height_edit_shader} || ! $self->layer_editing_enabled); -# -# # Find the selected volume, over which the layer editing is active. -# my $volume; -# foreach my $volume_idx (0..$#{$self->volumes}) { -# my $v = $self->volumes->[$volume_idx]; -# if ($v->selected && $v->has_layer_height_texture) { -# $volume = $v; -# last; -# } -# } -# return if (! $volume); -# -# # If the active object was not allocated at the Print, go away. This should only be a momentary case between an object addition / deletion -# # and an update by Platter::async_apply_config. -# my $object_idx = int($volume->select_group_id / 1000000); -# return if $object_idx >= $self->{print}->object_count; -# -# # The viewport and camera are set to complete view and glOrtho(-$x/2, $x/2, -$y/2, $y/2, -$depth, $depth), -# # where x, y is the window size divided by $self->_zoom. -# my ($bar_left, $bar_bottom, $bar_right, $bar_top) = $self->_variable_layer_thickness_bar_rect_viewport; -# my ($reset_left, $reset_bottom, $reset_right, $reset_top) = $self->_variable_layer_thickness_reset_rect_viewport; -# my $z_cursor_relative = $self->_variable_layer_thickness_bar_mouse_cursor_z_relative; -# -# my $print_object = $self->{print}->get_object($object_idx); -# my $z_max = $print_object->model_object->bounding_box->z_max; -# -# $self->{layer_height_edit_shader}->enable; -# $self->{layer_height_edit_shader}->set_uniform('z_to_texture_row', $volume->layer_height_texture_z_to_row_id); -# $self->{layer_height_edit_shader}->set_uniform('z_texture_row_to_normalized', 1. / $volume->layer_height_texture_height); -# $self->{layer_height_edit_shader}->set_uniform('z_cursor', $z_max * $z_cursor_relative); -# $self->{layer_height_edit_shader}->set_uniform('z_cursor_band_width', $self->{layer_height_edit_band_width}); -# glBindTexture(GL_TEXTURE_2D, $self->{layer_preview_z_texture_id}); -# glTexImage2D_c(GL_TEXTURE_2D, 0, GL_RGBA8, $volume->layer_height_texture_width, $volume->layer_height_texture_height, -# 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); -# glTexImage2D_c(GL_TEXTURE_2D, 1, GL_RGBA8, $volume->layer_height_texture_width / 2, $volume->layer_height_texture_height / 2, -# 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); -# glTexSubImage2D_c(GL_TEXTURE_2D, 0, 0, 0, $volume->layer_height_texture_width, $volume->layer_height_texture_height, -# GL_RGBA, GL_UNSIGNED_BYTE, $volume->layer_height_texture_data_ptr_level0); -# glTexSubImage2D_c(GL_TEXTURE_2D, 1, 0, 0, $volume->layer_height_texture_width / 2, $volume->layer_height_texture_height / 2, -# GL_RGBA, GL_UNSIGNED_BYTE, $volume->layer_height_texture_data_ptr_level1); -# -# # Render the color bar. -# glDisable(GL_DEPTH_TEST); -# # The viewport and camera are set to complete view and glOrtho(-$x/2, $x/2, -$y/2, $y/2, -$depth, $depth), -# # where x, y is the window size divided by $self->_zoom. -# glPushMatrix(); -# glLoadIdentity(); -# # Paint the overlay. -# glBegin(GL_QUADS); -# glVertex3f($bar_left, $bar_bottom, 0); -# glVertex3f($bar_right, $bar_bottom, 0); -# glVertex3f($bar_right, $bar_top, $z_max); -# glVertex3f($bar_left, $bar_top, $z_max); -# glEnd(); -# glBindTexture(GL_TEXTURE_2D, 0); -# $self->{layer_height_edit_shader}->disable; -# -# # Paint the tooltip. -# if ($self->_variable_layer_thickness_load_overlay_image) -# my $gap = 10/$self->_zoom; -# my ($l, $r, $b, $t) = ($bar_left - $self->{layer_preview_annotation}->{width}/$self->_zoom - $gap, $bar_left - $gap, $reset_bottom + $self->{layer_preview_annotation}->{height}/$self->_zoom + $gap, $reset_bottom + $gap); -# $self->_render_image($self->{layer_preview_annotation}, $l, $r, $t, $b); -# } -# -# # Paint the reset button. -# if ($self->_variable_layer_thickness_load_reset_image) { -# $self->_render_image($self->{layer_preview_reset_image}, $reset_left, $reset_right, $reset_bottom, $reset_top); -# } -# -# # Paint the graph. -# #FIXME show some kind of legend. -# my $max_z = unscale($print_object->size->z); -# my $profile = $print_object->model_object->layer_height_profile; -# my $layer_height = $print_object->config->get('layer_height'); -# my $layer_height_max = 10000000000.; -# { -# # Get a maximum layer height value. -# #FIXME This is a duplicate code of Slicing.cpp. -# my $nozzle_diameters = $print_object->print->config->get('nozzle_diameter'); -# my $layer_heights_min = $print_object->print->config->get('min_layer_height'); -# my $layer_heights_max = $print_object->print->config->get('max_layer_height'); -# for (my $i = 0; $i < scalar(@{$nozzle_diameters}); $i += 1) { -# my $lh_min = ($layer_heights_min->[$i] == 0.) ? 0.07 : max(0.01, $layer_heights_min->[$i]); -# my $lh_max = ($layer_heights_max->[$i] == 0.) ? (0.75 * $nozzle_diameters->[$i]) : $layer_heights_max->[$i]; -# $layer_height_max = min($layer_height_max, max($lh_min, $lh_max)); -# } -# } -# # Make the vertical bar a bit wider so the layer height curve does not touch the edge of the bar region. -# $layer_height_max *= 1.12; -# # Baseline -# glColor3f(0., 0., 0.); -# glBegin(GL_LINE_STRIP); -# glVertex2f($bar_left + $layer_height * ($bar_right - $bar_left) / $layer_height_max, $bar_bottom); -# glVertex2f($bar_left + $layer_height * ($bar_right - $bar_left) / $layer_height_max, $bar_top); -# glEnd(); -# # Curve -# glColor3f(0., 0., 1.); -# glBegin(GL_LINE_STRIP); -# for (my $i = 0; $i < int(@{$profile}); $i += 2) { -# my $z = $profile->[$i]; -# my $h = $profile->[$i+1]; -# glVertex3f($bar_left + $h * ($bar_right - $bar_left) / $layer_height_max, $bar_bottom + $z * ($bar_top - $bar_bottom) / $max_z, $z); -# } -# glEnd(); -# # Revert the matrices. -# glPopMatrix(); -# glEnable(GL_DEPTH_TEST); -#} -# -#sub draw_legend { -# my ($self) = @_; -# -# if (!$self->_legend_enabled) { -# return; -# } -# -# # If the legend texture has not been loaded into the GPU, do it now. -# my $tex_id = Slic3r::GUI::_3DScene::finalize_legend_texture; -# if ($tex_id > 0) -# { -# my $tex_w = Slic3r::GUI::_3DScene::get_legend_texture_width; -# my $tex_h = Slic3r::GUI::_3DScene::get_legend_texture_height; -# if (($tex_w > 0) && ($tex_h > 0)) -# { -# glDisable(GL_DEPTH_TEST); -# glPushMatrix(); -# glLoadIdentity(); -# -# my ($cw, $ch) = $self->GetSizeWH; -# -# my $l = (-0.5 * $cw) / $self->_zoom; -# my $t = (0.5 * $ch) / $self->_zoom; -# my $r = $l + $tex_w / $self->_zoom; -# my $b = $t - $tex_h / $self->_zoom; -# $self->_render_texture($tex_id, $l, $r, $b, $t); -# -# glPopMatrix(); -# glEnable(GL_DEPTH_TEST); -# } -# } -#} -# -#sub draw_warning { -# my ($self) = @_; -# -# if (!$self->_warning_enabled) { -# return; -# } -# -# # If the warning texture has not been loaded into the GPU, do it now. -# my $tex_id = Slic3r::GUI::_3DScene::finalize_warning_texture; -# if ($tex_id > 0) -# { -# my $tex_w = Slic3r::GUI::_3DScene::get_warning_texture_width; -# my $tex_h = Slic3r::GUI::_3DScene::get_warning_texture_height; -# if (($tex_w > 0) && ($tex_h > 0)) -# { -# glDisable(GL_DEPTH_TEST); -# glPushMatrix(); -# glLoadIdentity(); -# -# my ($cw, $ch) = $self->GetSizeWH; -# -# my $l = (-0.5 * $tex_w) / $self->_zoom; -# my $t = (-0.5 * $ch + $tex_h) / $self->_zoom; -# my $r = $l + $tex_w / $self->_zoom; -# my $b = $t - $tex_h / $self->_zoom; -# $self->_render_texture($tex_id, $l, $r, $b, $t); -# -# glPopMatrix(); -# glEnable(GL_DEPTH_TEST); -# } -# } -#} -# -#sub update_volumes_colors_by_extruder { -# my ($self, $config) = @_; -# $self->volumes->update_colors_by_extruder($config); -#} -# -#sub opengl_info -#{ -# my ($self, %params) = @_; -# my %tag = Slic3r::tags($params{format}); -# -# my $gl_version = glGetString(GL_VERSION); -# my $gl_vendor = glGetString(GL_VENDOR); -# my $gl_renderer = glGetString(GL_RENDERER); -# my $glsl_version = glGetString(GL_SHADING_LANGUAGE_VERSION); -# -# my $out = ''; -# $out .= "$tag{h2start}OpenGL installation$tag{h2end}$tag{eol}"; -# $out .= " $tag{bstart}Using POGL$tag{bend} v$OpenGL::BUILD_VERSION$tag{eol}"; -# $out .= " $tag{bstart}GL version: $tag{bend}${gl_version}$tag{eol}"; -# $out .= " $tag{bstart}vendor: $tag{bend}${gl_vendor}$tag{eol}"; -# $out .= " $tag{bstart}renderer: $tag{bend}${gl_renderer}$tag{eol}"; -# $out .= " $tag{bstart}GLSL version: $tag{bend}${glsl_version}$tag{eol}"; -# -# # Check for other OpenGL extensions -# $out .= "$tag{h2start}Installed extensions (* implemented in the module):$tag{h2end}$tag{eol}"; -# my $extensions = glGetString(GL_EXTENSIONS); -# my @extensions = split(' ',$extensions); -# foreach my $ext (sort @extensions) { -# my $stat = glpCheckExtension($ext); -# $out .= sprintf("%s ${ext}$tag{eol}", $stat?' ':'*'); -# $out .= sprintf(" ${stat}$tag{eol}") if ($stat && $stat !~ m|^$ext |); -# } -# -# return $out; -#} -# -#sub _report_opengl_state -#{ -# my ($self, $comment) = @_; -# my $err = glGetError(); -# return 0 if ($err == 0); -# -# # gluErrorString() hangs. Don't use it. -## my $errorstr = gluErrorString(); -# my $errorstr = ''; -# if ($err == 0x0500) { -# $errorstr = 'GL_INVALID_ENUM'; -# } elsif ($err == GL_INVALID_VALUE) { -# $errorstr = 'GL_INVALID_VALUE'; -# } elsif ($err == GL_INVALID_OPERATION) { -# $errorstr = 'GL_INVALID_OPERATION'; -# } elsif ($err == GL_STACK_OVERFLOW) { -# $errorstr = 'GL_STACK_OVERFLOW'; -# } elsif ($err == GL_OUT_OF_MEMORY) { -# $errorstr = 'GL_OUT_OF_MEMORY'; -# } else { -# $errorstr = 'unknown'; -# } -# if (defined($comment)) { -# printf("OpenGL error at %s, nr %d (0x%x): %s\n", $comment, $err, $err, $errorstr); -# } else { -# printf("OpenGL error nr %d (0x%x): %s\n", $err, $err, $errorstr); -# } -#} -# -#sub _vertex_shader_Gouraud { -# return <<'VERTEX'; -##version 110 -# -##define INTENSITY_CORRECTION 0.6 -# -#// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31) -#const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929); -##define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION) -##define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION) -##define LIGHT_TOP_SHININESS 20.0 -# -#// normalized values for (1./1.43, 0.2/1.43, 1./1.43) -#const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074); -##define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION) -#//#define LIGHT_FRONT_SPECULAR (0.0 * INTENSITY_CORRECTION) -#//#define LIGHT_FRONT_SHININESS 5.0 -# -##define INTENSITY_AMBIENT 0.3 -# -#const vec3 ZERO = vec3(0.0, 0.0, 0.0); -# -#struct PrintBoxDetection -#{ -# vec3 min; -# vec3 max; -# // xyz contains the offset, if w == 1.0 detection needs to be performed -# vec4 volume_origin; -#}; -# -#uniform PrintBoxDetection print_box; -# -#// x = tainted, y = specular; -#varying vec2 intensity; -# -#varying vec3 delta_box_min; -#varying vec3 delta_box_max; -# -#void main() -#{ -# // First transform the normal into camera space and normalize the result. -# vec3 normal = normalize(gl_NormalMatrix * gl_Normal); -# -# // Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex. -# // Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range. -# float NdotL = max(dot(normal, LIGHT_TOP_DIR), 0.0); -# -# intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE; -# intensity.y = 0.0; -# -# if (NdotL > 0.0) -# intensity.y += LIGHT_TOP_SPECULAR * pow(max(dot(normal, reflect(-LIGHT_TOP_DIR, normal)), 0.0), LIGHT_TOP_SHININESS); -# -# // Perform the same lighting calculation for the 2nd light source (no specular applied). -# NdotL = max(dot(normal, LIGHT_FRONT_DIR), 0.0); -# intensity.x += NdotL * LIGHT_FRONT_DIFFUSE; -# -# // compute deltas for out of print volume detection (world coordinates) -# if (print_box.volume_origin.w == 1.0) -# { -# vec3 v = gl_Vertex.xyz + print_box.volume_origin.xyz; -# delta_box_min = v - print_box.min; -# delta_box_max = v - print_box.max; -# } -# else -# { -# delta_box_min = ZERO; -# delta_box_max = ZERO; -# } -# -# gl_Position = ftransform(); -#} -# -#VERTEX -#} -# -#sub _fragment_shader_Gouraud { -# return <<'FRAGMENT'; -##version 110 -# -#const vec3 ZERO = vec3(0.0, 0.0, 0.0); -# -#// x = tainted, y = specular; -#varying vec2 intensity; -# -#varying vec3 delta_box_min; -#varying vec3 delta_box_max; -# -#uniform vec4 uniform_color; -# -#void main() -#{ -# // if the fragment is outside the print volume -> use darker color -# vec3 color = (any(lessThan(delta_box_min, ZERO)) || any(greaterThan(delta_box_max, ZERO))) ? mix(uniform_color.rgb, ZERO, 0.3333) : uniform_color.rgb; -# gl_FragColor = vec4(vec3(intensity.y, intensity.y, intensity.y) + color * intensity.x, uniform_color.a); -#} -# -#FRAGMENT -#} -# -#sub _vertex_shader_Phong { -# return <<'VERTEX'; -##version 110 -# -#varying vec3 normal; -#varying vec3 eye; -#void main(void) -#{ -# eye = normalize(vec3(gl_ModelViewMatrix * gl_Vertex)); -# normal = normalize(gl_NormalMatrix * gl_Normal); -# gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; -#} -#VERTEX -#} -# -#sub _fragment_shader_Phong { -# return <<'FRAGMENT'; -##version 110 -# -##define INTENSITY_CORRECTION 0.7 -# -##define LIGHT_TOP_DIR -0.6/1.31, 0.6/1.31, 1./1.31 -##define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION) -##define LIGHT_TOP_SPECULAR (0.5 * INTENSITY_CORRECTION) -#//#define LIGHT_TOP_SHININESS 50. -##define LIGHT_TOP_SHININESS 10. -# -##define LIGHT_FRONT_DIR 1./1.43, 0.2/1.43, 1./1.43 -##define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION) -##define LIGHT_FRONT_SPECULAR (0.0 * INTENSITY_CORRECTION) -##define LIGHT_FRONT_SHININESS 50. -# -##define INTENSITY_AMBIENT 0.0 -# -#varying vec3 normal; -#varying vec3 eye; -#uniform vec4 uniform_color; -#void main() { -# -# float intensity_specular = 0.; -# float intensity_tainted = 0.; -# float intensity = max(dot(normal,vec3(LIGHT_TOP_DIR)), 0.0); -# // if the vertex is lit compute the specular color -# if (intensity > 0.0) { -# intensity_tainted = LIGHT_TOP_DIFFUSE * intensity; -# // compute the half vector -# vec3 h = normalize(vec3(LIGHT_TOP_DIR) + eye); -# // compute the specular term into spec -# intensity_specular = LIGHT_TOP_SPECULAR * pow(max(dot(h, normal), 0.0), LIGHT_TOP_SHININESS); -# } -# intensity = max(dot(normal,vec3(LIGHT_FRONT_DIR)), 0.0); -# // if the vertex is lit compute the specular color -# if (intensity > 0.0) { -# intensity_tainted += LIGHT_FRONT_DIFFUSE * intensity; -# // compute the half vector -#// vec3 h = normalize(vec3(LIGHT_FRONT_DIR) + eye); -# // compute the specular term into spec -#// intensity_specular += LIGHT_FRONT_SPECULAR * pow(max(dot(h,normal), 0.0), LIGHT_FRONT_SHININESS); -# } -# -# gl_FragColor = max( -# vec4(intensity_specular, intensity_specular, intensity_specular, 0.) + uniform_color * intensity_tainted, -# INTENSITY_AMBIENT * uniform_color); -# gl_FragColor.a = uniform_color.a; -#} -#FRAGMENT -#} -# -#sub _vertex_shader_variable_layer_height { -# return <<'VERTEX'; -##version 110 -# -##define INTENSITY_CORRECTION 0.6 -# -#const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929); -##define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION) -##define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION) -##define LIGHT_TOP_SHININESS 20.0 -# -#const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074); -##define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION) -#//#define LIGHT_FRONT_SPECULAR (0.0 * INTENSITY_CORRECTION) -#//#define LIGHT_FRONT_SHININESS 5.0 -# -##define INTENSITY_AMBIENT 0.3 -# -#// x = tainted, y = specular; -#varying vec2 intensity; -# -#varying float object_z; -# -#void main() -#{ -# // First transform the normal into camera space and normalize the result. -# vec3 normal = normalize(gl_NormalMatrix * gl_Normal); -# -# // Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex. -# // Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range. -# float NdotL = max(dot(normal, LIGHT_TOP_DIR), 0.0); -# -# intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE; -# intensity.y = 0.0; -# -# if (NdotL > 0.0) -# intensity.y += LIGHT_TOP_SPECULAR * pow(max(dot(normal, reflect(-LIGHT_TOP_DIR, normal)), 0.0), LIGHT_TOP_SHININESS); -# -# // Perform the same lighting calculation for the 2nd light source (no specular) -# NdotL = max(dot(normal, LIGHT_FRONT_DIR), 0.0); -# -# intensity.x += NdotL * LIGHT_FRONT_DIFFUSE; -# -# // Scaled to widths of the Z texture. -# object_z = gl_Vertex.z; -# -# gl_Position = ftransform(); -#} -# -#VERTEX -#} -# -#sub _fragment_shader_variable_layer_height { -# return <<'FRAGMENT'; -##version 110 -# -##define M_PI 3.1415926535897932384626433832795 -# -#// 2D texture (1D texture split by the rows) of color along the object Z axis. -#uniform sampler2D z_texture; -#// Scaling from the Z texture rows coordinate to the normalized texture row coordinate. -#uniform float z_to_texture_row; -#uniform float z_texture_row_to_normalized; -#uniform float z_cursor; -#uniform float z_cursor_band_width; -# -#// x = tainted, y = specular; -#varying vec2 intensity; -# -#varying float object_z; -# -#void main() -#{ -# float object_z_row = z_to_texture_row * object_z; -# // Index of the row in the texture. -# float z_texture_row = floor(object_z_row); -# // Normalized coordinate from 0. to 1. -# float z_texture_col = object_z_row - z_texture_row; -# float z_blend = 0.25 * cos(min(M_PI, abs(M_PI * (object_z - z_cursor) * 1.8 / z_cursor_band_width))) + 0.25; -# // Calculate level of detail from the object Z coordinate. -# // This makes the slowly sloping surfaces to be show with high detail (with stripes), -# // and the vertical surfaces to be shown with low detail (no stripes) -# float z_in_cells = object_z_row * 190.; -# // Gradient of Z projected on the screen. -# float dx_vtc = dFdx(z_in_cells); -# float dy_vtc = dFdy(z_in_cells); -# float lod = clamp(0.5 * log2(max(dx_vtc*dx_vtc, dy_vtc*dy_vtc)), 0., 1.); -# // Sample the Z texture. Texture coordinates are normalized to <0, 1>. -# vec4 color = -# mix(texture2D(z_texture, vec2(z_texture_col, z_texture_row_to_normalized * (z_texture_row + 0.5 )), -10000.), -# texture2D(z_texture, vec2(z_texture_col, z_texture_row_to_normalized * (z_texture_row * 2. + 1.)), 10000.), lod); -# -# // Mix the final color. -# gl_FragColor = -# vec4(intensity.y, intensity.y, intensity.y, 1.0) + intensity.x * mix(color, vec4(1.0, 1.0, 0.0, 1.0), z_blend); -#} -# -#FRAGMENT -#} -#=================================================================================================================================== - # The 3D canvas to display objects and tool paths. package Slic3r::GUI::3DScene; use base qw(Slic3r::GUI::3DScene::Base); -#=================================================================================================================================== -#use OpenGL qw(:glconstants :gluconstants :glufunctions); -#use List::Util qw(first min max); -#use Slic3r::Geometry qw(scale unscale epsilon); -#use Slic3r::Print::State ':steps'; -#=================================================================================================================================== - -#=================================================================================================================================== -#__PACKAGE__->mk_accessors(qw( -# color_by -# select_by -# drag_by -#)); -#=================================================================================================================================== - sub new { my $class = shift; - my $self = $class->SUPER::new(@_); -#=================================================================================================================================== -# $self->color_by('volume'); # object | volume -# $self->select_by('object'); # object | volume | instance -# $self->drag_by('instance'); # object | instance -#=================================================================================================================================== - + my $self = $class->SUPER::new(@_); return $self; } -#============================================================================================================================== -#sub load_object { -# my ($self, $model, $print, $obj_idx, $instance_idxs) = @_; -# -# $self->SetCurrent($self->GetContext) if $useVBOs; -# -# my $model_object; -# if ($model->isa('Slic3r::Model::Object')) { -# $model_object = $model; -# $model = $model_object->model; -# $obj_idx = 0; -# } else { -# $model_object = $model->get_object($obj_idx); -# } -# -# $instance_idxs ||= [0..$#{$model_object->instances}]; -# my $volume_indices = $self->volumes->load_object( -# $model_object, $obj_idx, $instance_idxs, $self->color_by, $self->select_by, $self->drag_by, -# $self->UseVBOs); -# return @{$volume_indices}; -#} -# -## Create 3D thick extrusion lines for a skirt and brim. -## Adds a new Slic3r::GUI::3DScene::Volume to $self->volumes. -#sub load_print_toolpaths { -# my ($self, $print, $colors) = @_; -# -# $self->SetCurrent($self->GetContext) if $self->UseVBOs; -# Slic3r::GUI::_3DScene::_load_print_toolpaths($print, $self->volumes, $colors, $self->UseVBOs) -# if ($print->step_done(STEP_SKIRT) && $print->step_done(STEP_BRIM)); -#} -# -## Create 3D thick extrusion lines for object forming extrusions. -## Adds a new Slic3r::GUI::3DScene::Volume to $self->volumes, -## one for perimeters, one for infill and one for supports. -#sub load_print_object_toolpaths { -# my ($self, $object, $colors) = @_; -# -# $self->SetCurrent($self->GetContext) if $self->UseVBOs; -# Slic3r::GUI::_3DScene::_load_print_object_toolpaths($object, $self->volumes, $colors, $self->UseVBOs); -#} -# -## Create 3D thick extrusion lines for wipe tower extrusions. -#sub load_wipe_tower_toolpaths { -# my ($self, $print, $colors) = @_; -# -# $self->SetCurrent($self->GetContext) if $self->UseVBOs; -# Slic3r::GUI::_3DScene::_load_wipe_tower_toolpaths($print, $self->volumes, $colors, $self->UseVBOs) -# if ($print->step_done(STEP_WIPE_TOWER)); -#} -# -#sub load_gcode_preview { -# my ($self, $print, $gcode_preview_data, $colors) = @_; -# -# $self->SetCurrent($self->GetContext) if $self->UseVBOs; -# Slic3r::GUI::_3DScene::load_gcode_preview($print, $gcode_preview_data, $self->volumes, $colors, $self->UseVBOs); -#} -# -#sub set_toolpaths_range { -# my ($self, $min_z, $max_z) = @_; -# $self->volumes->set_range($min_z, $max_z); -#} -# -#sub reset_legend_texture { -# Slic3r::GUI::_3DScene::reset_legend_texture(); -#} -# -#sub get_current_print_zs { -# my ($self, $active_only) = @_; -# return $self->volumes->get_current_print_zs($active_only); -#} -#============================================================================================================================== - 1; diff --git a/lib/Slic3r/GUI/Plater/3D.pm b/lib/Slic3r/GUI/Plater/3D.pm index 7f83e0f57..0b770b31c 100644 --- a/lib/Slic3r/GUI/Plater/3D.pm +++ b/lib/Slic3r/GUI/Plater/3D.pm @@ -5,25 +5,13 @@ use utf8; use List::Util qw(); use Wx qw(:misc :pen :brush :sizer :font :cursor :keycode wxTAB_TRAVERSAL); -#============================================================================================================================== -#use Wx::Event qw(EVT_KEY_DOWN EVT_CHAR); -#============================================================================================================================== use base qw(Slic3r::GUI::3DScene Class::Accessor); -#============================================================================================================================== -#use Wx::Locale gettext => 'L'; -# -#__PACKAGE__->mk_accessors(qw( -# on_arrange on_rotate_object_left on_rotate_object_right on_scale_object_uniformly -# on_remove_object on_increase_objects on_decrease_objects on_enable_action_buttons)); -#============================================================================================================================== - sub new { my $class = shift; my ($parent, $objects, $model, $print, $config) = @_; my $self = $class->SUPER::new($parent); -#============================================================================================================================== Slic3r::GUI::_3DScene::enable_picking($self, 1); Slic3r::GUI::_3DScene::enable_moving($self, 1); Slic3r::GUI::_3DScene::set_select_by($self, 'object'); @@ -31,253 +19,8 @@ sub new { Slic3r::GUI::_3DScene::set_model($self, $model); Slic3r::GUI::_3DScene::set_print($self, $print); Slic3r::GUI::_3DScene::set_config($self, $config); -# $self->enable_picking(1); -# $self->enable_moving(1); -# $self->select_by('object'); -# $self->drag_by('instance'); -# -# $self->{objects} = $objects; -# $self->{model} = $model; -# $self->{print} = $print; -# $self->{config} = $config; -# $self->{on_select_object} = sub {}; -# $self->{on_instances_moved} = sub {}; -# $self->{on_wipe_tower_moved} = sub {}; -# -# $self->{objects_volumes_idxs} = []; -# -# $self->on_select(sub { -# my ($volume_idx) = @_; -# $self->{on_select_object}->(($volume_idx == -1) ? undef : $self->volumes->[$volume_idx]->object_idx) -# if ($self->{on_select_object}); -# }); -# -# $self->on_move(sub { -# my @volume_idxs = @_; -# my %done = (); # prevent moving instances twice -# my $object_moved; -# my $wipe_tower_moved; -# foreach my $volume_idx (@volume_idxs) { -# my $volume = $self->volumes->[$volume_idx]; -# my $obj_idx = $volume->object_idx; -# my $instance_idx = $volume->instance_idx; -# next if $done{"${obj_idx}_${instance_idx}"}; -# $done{"${obj_idx}_${instance_idx}"} = 1; -# if ($obj_idx < 1000) { -# # Move a regular object. -# my $model_object = $self->{model}->get_object($obj_idx); -# $model_object -# ->instances->[$instance_idx] -# ->offset -# ->translate($volume->origin->x, $volume->origin->y); #)) -# $model_object->invalidate_bounding_box; -# $object_moved = 1; -# } elsif ($obj_idx == 1000) { -# # Move a wipe tower proxy. -# $wipe_tower_moved = $volume->origin; -# } -# } -# -# $self->{on_instances_moved}->() -# if $object_moved && $self->{on_instances_moved}; -# $self->{on_wipe_tower_moved}->($wipe_tower_moved) -# if $wipe_tower_moved && $self->{on_wipe_tower_moved}; -# }); -# -# EVT_KEY_DOWN($self, sub { -# my ($s, $event) = @_; -# if ($event->HasModifiers) { -# $event->Skip; -# } else { -# my $key = $event->GetKeyCode; -# if ($key == WXK_DELETE) { -# $self->on_remove_object->() if $self->on_remove_object; -# } else { -# $event->Skip; -# } -# } -# }); -# -# EVT_CHAR($self, sub { -# my ($s, $event) = @_; -# if ($event->HasModifiers) { -# $event->Skip; -# } else { -# my $key = $event->GetKeyCode; -# if ($key == ord('a')) { -# $self->on_arrange->() if $self->on_arrange; -# } elsif ($key == ord('l')) { -# $self->on_rotate_object_left->() if $self->on_rotate_object_left; -# } elsif ($key == ord('r')) { -# $self->on_rotate_object_right->() if $self->on_rotate_object_right; -# } elsif ($key == ord('s')) { -# $self->on_scale_object_uniformly->() if $self->on_scale_object_uniformly; -# } elsif ($key == ord('+')) { -# $self->on_increase_objects->() if $self->on_increase_objects; -# } elsif ($key == ord('-')) { -# $self->on_decrease_objects->() if $self->on_decrease_objects; -# } else { -# $event->Skip; -# } -# } -# }); -#============================================================================================================================== return $self; } -#============================================================================================================================== -#sub set_on_select_object { -# my ($self, $cb) = @_; -# $self->{on_select_object} = $cb; -#} -# -#sub set_on_double_click { -# my ($self, $cb) = @_; -# $self->on_double_click($cb); -#} -# -#sub set_on_right_click { -# my ($self, $cb) = @_; -# $self->on_right_click($cb); -#} -# -#sub set_on_arrange { -# my ($self, $cb) = @_; -# $self->on_arrange($cb); -#} -# -#sub set_on_rotate_object_left { -# my ($self, $cb) = @_; -# $self->on_rotate_object_left($cb); -#} -# -#sub set_on_rotate_object_right { -# my ($self, $cb) = @_; -# $self->on_rotate_object_right($cb); -#} -# -#sub set_on_scale_object_uniformly { -# my ($self, $cb) = @_; -# $self->on_scale_object_uniformly($cb); -#} -# -#sub set_on_increase_objects { -# my ($self, $cb) = @_; -# $self->on_increase_objects($cb); -#} -# -#sub set_on_decrease_objects { -# my ($self, $cb) = @_; -# $self->on_decrease_objects($cb); -#} -# -#sub set_on_remove_object { -# my ($self, $cb) = @_; -# $self->on_remove_object($cb); -#} -# -#sub set_on_instances_moved { -# my ($self, $cb) = @_; -# $self->{on_instances_moved} = $cb; -#} -# -#sub set_on_wipe_tower_moved { -# my ($self, $cb) = @_; -# $self->{on_wipe_tower_moved} = $cb; -#} -# -#sub set_on_model_update { -# my ($self, $cb) = @_; -# $self->on_model_update($cb); -#} -# -#sub set_on_enable_action_buttons { -# my ($self, $cb) = @_; -# $self->on_enable_action_buttons($cb); -#} -# -#sub update_volumes_selection { -# my ($self) = @_; -# -# foreach my $obj_idx (0..$#{$self->{model}->objects}) { -# if ($self->{objects}[$obj_idx]->selected) { -# my $volume_idxs = $self->{objects_volumes_idxs}->[$obj_idx]; -# $self->select_volume($_) for @{$volume_idxs}; -# } -# } -#} -# -#sub reload_scene { -# my ($self, $force) = @_; -# -# $self->reset_objects; -# $self->update_bed_size; -# -# if (! $self->IsShown && ! $force) { -# $self->{reload_delayed} = 1; -# return; -# } -# -# $self->{reload_delayed} = 0; -# -# $self->{objects_volumes_idxs} = []; -# foreach my $obj_idx (0..$#{$self->{model}->objects}) { -# my @volume_idxs = $self->load_object($self->{model}, $self->{print}, $obj_idx); -# push(@{$self->{objects_volumes_idxs}}, \@volume_idxs); -# } -# -# $self->update_volumes_selection; -# -# if (defined $self->{config}->nozzle_diameter) { -# # Should the wipe tower be visualized? -# my $extruders_count = scalar @{ $self->{config}->nozzle_diameter }; -# # Height of a print. -# my $height = $self->{model}->bounding_box->z_max; -# # Show at least a slab. -# $height = 10 if $height < 10; -# if ($extruders_count > 1 && $self->{config}->single_extruder_multi_material && $self->{config}->wipe_tower && -# ! $self->{config}->complete_objects) { -# $self->volumes->load_wipe_tower_preview(1000, -# $self->{config}->wipe_tower_x, $self->{config}->wipe_tower_y, $self->{config}->wipe_tower_width, -# #$self->{config}->wipe_tower_per_color_wipe# 15 * ($extruders_count - 1), # this is just a hack when the config parameter became obsolete -# 15 * ($extruders_count - 1), -# $self->{model}->bounding_box->z_max, $self->{config}->wipe_tower_rotation_angle, $self->UseVBOs); -# } -# } -# -# $self->update_volumes_colors_by_extruder($self->{config}); -# -# # checks for geometry outside the print volume to render it accordingly -# if (scalar @{$self->volumes} > 0) -# { -# my $contained = $self->volumes->check_outside_state($self->{config}); -# if (!$contained) { -# $self->set_warning_enabled(1); -# Slic3r::GUI::_3DScene::generate_warning_texture(L("Detected object outside print volume")); -# $self->on_enable_action_buttons->(0) if ($self->on_enable_action_buttons); -# } else { -# $self->set_warning_enabled(0); -# $self->volumes->reset_outside_state(); -# Slic3r::GUI::_3DScene::reset_warning_texture(); -# $self->on_enable_action_buttons->(scalar @{$self->{model}->objects} > 0) if ($self->on_enable_action_buttons); -# } -# } else { -# $self->set_warning_enabled(0); -# Slic3r::GUI::_3DScene::reset_warning_texture(); -# } -#} -# -#sub update_bed_size { -# my ($self) = @_; -# $self->set_bed_shape($self->{config}->bed_shape); -#} -# -## Called by the Platter wxNotebook when this page is activated. -#sub OnActivate { -# my ($self) = @_; -# $self->reload_scene(1) if ($self->{reload_delayed}); -#} -#============================================================================================================================== - 1; From b139f3878483f6c4dddc5de21559037280950a15 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 21 Jun 2018 13:03:53 +0200 Subject: [PATCH 038/198] Attempt to fix texture rendering on OpenGL 1.1 cards --- xs/src/slic3r/GUI/3DScene.cpp | 6 ++++++ xs/src/slic3r/GUI/GLCanvas3D.cpp | 15 ++++++++++++--- xs/src/slic3r/GUI/GLTexture.cpp | 12 ++++++++++-- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/xs/src/slic3r/GUI/3DScene.cpp b/xs/src/slic3r/GUI/3DScene.cpp index e404a9d51..a389bded0 100644 --- a/xs/src/slic3r/GUI/3DScene.cpp +++ b/xs/src/slic3r/GUI/3DScene.cpp @@ -396,6 +396,9 @@ void GLVolume::render_using_layer_height() const GLsizei half_w = w / 2; GLsizei half_h = h / 2; +//####################################################################################################################### + ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); +//####################################################################################################################### glBindTexture(GL_TEXTURE_2D, layer_height_texture_data.texture_id); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); glTexImage2D(GL_TEXTURE_2D, 1, GL_RGBA8, half_w, half_h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); @@ -1582,6 +1585,9 @@ unsigned int _3DScene::TextureBase::finalize() { if (!m_data.empty()) { // sends buffer to gpu +//####################################################################################################################### + ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); +//####################################################################################################################### ::glGenTextures(1, &m_tex_id); ::glBindTexture(GL_TEXTURE_2D, m_tex_id); ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, (GLsizei)m_tex_width, (GLsizei)m_tex_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const GLvoid*)m_data.data()); diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index 4f816b2d8..be67c335a 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -498,7 +498,9 @@ void GLCanvas3D::Bed::_render_prusa(float theta) const ::glEnable(GL_BLEND); ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); -// ::glEnable(GL_TEXTURE_2D); +//####################################################################################################################### + ::glEnable(GL_TEXTURE_2D); +//####################################################################################################################### ::glEnableClientState(GL_VERTEX_ARRAY); ::glEnableClientState(GL_TEXTURE_COORD_ARRAY); @@ -519,7 +521,9 @@ void GLCanvas3D::Bed::_render_prusa(float theta) const ::glDisableClientState(GL_TEXTURE_COORD_ARRAY); ::glDisableClientState(GL_VERTEX_ARRAY); -// ::glDisable(GL_TEXTURE_2D); +//####################################################################################################################### + ::glDisable(GL_TEXTURE_2D); +//####################################################################################################################### ::glDisable(GL_BLEND); } @@ -983,6 +987,9 @@ void GLCanvas3D::LayersEditing::_render_active_object_annotations(const GLCanvas GLsizei half_w = w / 2; GLsizei half_h = h / 2; +//####################################################################################################################### + ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); +//####################################################################################################################### ::glBindTexture(GL_TEXTURE_2D, m_z_texture_id); ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); ::glTexImage2D(GL_TEXTURE_2D, 1, GL_RGBA8, half_w, half_h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); @@ -1555,7 +1562,9 @@ bool GLCanvas3D::init(bool useVBOs, bool use_legacy_opengl) if (m_gizmos.is_enabled() && !m_gizmos.init()) return false; - ::glEnable(GL_TEXTURE_2D); +//####################################################################################################################### +// ::glEnable(GL_TEXTURE_2D); +//####################################################################################################################### m_initialized = true; diff --git a/xs/src/slic3r/GUI/GLTexture.cpp b/xs/src/slic3r/GUI/GLTexture.cpp index d1059a400..1256aca58 100644 --- a/xs/src/slic3r/GUI/GLTexture.cpp +++ b/xs/src/slic3r/GUI/GLTexture.cpp @@ -72,6 +72,10 @@ bool GLTexture::load_from_file(const std::string& filename, bool generate_mipmap } // sends data to gpu + +//####################################################################################################################### + ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); +//####################################################################################################################### ::glGenTextures(1, &m_id); ::glBindTexture(GL_TEXTURE_2D, m_id); ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, (GLsizei)m_width, (GLsizei)m_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)data.data()); @@ -132,7 +136,9 @@ void GLTexture::render_texture(unsigned int tex_id, float left, float right, flo ::glDisable(GL_LIGHTING); ::glEnable(GL_BLEND); ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); -// ::glEnable(GL_TEXTURE_2D); +//####################################################################################################################### + ::glEnable(GL_TEXTURE_2D); +//####################################################################################################################### ::glBindTexture(GL_TEXTURE_2D, (GLuint)tex_id); @@ -145,7 +151,9 @@ void GLTexture::render_texture(unsigned int tex_id, float left, float right, flo ::glBindTexture(GL_TEXTURE_2D, 0); -// ::glDisable(GL_TEXTURE_2D); +//####################################################################################################################### + ::glDisable(GL_TEXTURE_2D); +//####################################################################################################################### ::glDisable(GL_BLEND); ::glEnable(GL_LIGHTING); } From 75cd436ae5e4a5f47bcd552503ec3959ac3c5529 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 21 Jun 2018 15:43:34 +0200 Subject: [PATCH 039/198] 2nd Attempt to fix texture rendering on OpenGL 1.1 cards --- xs/src/slic3r/GUI/3DScene.cpp | 4 ++-- xs/src/slic3r/GUI/GLCanvas3D.cpp | 7 +++++-- xs/src/slic3r/GUI/GLTexture.cpp | 7 +++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/xs/src/slic3r/GUI/3DScene.cpp b/xs/src/slic3r/GUI/3DScene.cpp index a389bded0..0c06b476c 100644 --- a/xs/src/slic3r/GUI/3DScene.cpp +++ b/xs/src/slic3r/GUI/3DScene.cpp @@ -397,7 +397,7 @@ void GLVolume::render_using_layer_height() const GLsizei half_h = h / 2; //####################################################################################################################### - ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); +// ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); //####################################################################################################################### glBindTexture(GL_TEXTURE_2D, layer_height_texture_data.texture_id); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); @@ -1586,7 +1586,7 @@ unsigned int _3DScene::TextureBase::finalize() if (!m_data.empty()) { // sends buffer to gpu //####################################################################################################################### - ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); +// ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); //####################################################################################################################### ::glGenTextures(1, &m_tex_id); ::glBindTexture(GL_TEXTURE_2D, m_tex_id); diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index be67c335a..1d6aebd56 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -500,6 +500,7 @@ void GLCanvas3D::Bed::_render_prusa(float theta) const //####################################################################################################################### ::glEnable(GL_TEXTURE_2D); + ::glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); //####################################################################################################################### ::glEnableClientState(GL_VERTEX_ARRAY); @@ -508,7 +509,9 @@ void GLCanvas3D::Bed::_render_prusa(float theta) const if (theta > 90.0f) ::glFrontFace(GL_CW); - ::glColor4f(1.0f, 1.0f, 1.0f, 1.0f); +//####################################################################################################################### +// ::glColor4f(1.0f, 1.0f, 1.0f, 1.0f); +//####################################################################################################################### ::glBindTexture(GL_TEXTURE_2D, (theta <= 90.0f) ? (GLuint)m_top_texture.get_id() : (GLuint)m_bottom_texture.get_id()); ::glVertexPointer(3, GL_FLOAT, 0, (GLvoid*)m_triangles.get_vertices()); ::glTexCoordPointer(2, GL_FLOAT, 0, (GLvoid*)m_triangles.get_tex_coords()); @@ -988,7 +991,7 @@ void GLCanvas3D::LayersEditing::_render_active_object_annotations(const GLCanvas GLsizei half_h = h / 2; //####################################################################################################################### - ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); +// ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); //####################################################################################################################### ::glBindTexture(GL_TEXTURE_2D, m_z_texture_id); ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); diff --git a/xs/src/slic3r/GUI/GLTexture.cpp b/xs/src/slic3r/GUI/GLTexture.cpp index 1256aca58..8809153ad 100644 --- a/xs/src/slic3r/GUI/GLTexture.cpp +++ b/xs/src/slic3r/GUI/GLTexture.cpp @@ -74,7 +74,7 @@ bool GLTexture::load_from_file(const std::string& filename, bool generate_mipmap // sends data to gpu //####################################################################################################################### - ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); +// ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); //####################################################################################################################### ::glGenTextures(1, &m_id); ::glBindTexture(GL_TEXTURE_2D, m_id); @@ -131,13 +131,16 @@ const std::string& GLTexture::get_source() const void GLTexture::render_texture(unsigned int tex_id, float left, float right, float bottom, float top) { - ::glColor4f(1.0f, 1.0f, 1.0f, 1.0f); +//####################################################################################################################### +// ::glColor4f(1.0f, 1.0f, 1.0f, 1.0f); +//####################################################################################################################### ::glDisable(GL_LIGHTING); ::glEnable(GL_BLEND); ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); //####################################################################################################################### ::glEnable(GL_TEXTURE_2D); + ::glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); //####################################################################################################################### ::glBindTexture(GL_TEXTURE_2D, (GLuint)tex_id); From 4454c3437f2e031ea54af77ed40cc445ca00d596 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Thu, 21 Jun 2018 16:15:56 +0200 Subject: [PATCH 040/198] "Machine limits" page is completed --- xs/src/libslic3r/PrintConfig.cpp | 34 ++++++---- xs/src/slic3r/GUI/Field.cpp | 16 +++++ xs/src/slic3r/GUI/Field.hpp | 28 ++++++++ xs/src/slic3r/GUI/OptionsGroup.cpp | 4 +- xs/src/slic3r/GUI/OptionsGroup.hpp | 8 ++- xs/src/slic3r/GUI/Tab.cpp | 104 +++++++++++++---------------- 6 files changed, 120 insertions(+), 74 deletions(-) diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 54aa3b424..68fc2da24 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -856,6 +856,12 @@ PrintConfigDef::PrintConfigDef() def->min = 0; def->default_value = new ConfigOptionFloat(0.3); + def = this->add("silent_mode", coBool); + def->label = L("Support silent mode"); + def->tooltip = L("Set silent mode for the G-code flavor"); + def->default_value = new ConfigOptionBool(true); + + const int machine_linits_opt_width = 70; { struct AxisDefault { std::string name; @@ -874,65 +880,72 @@ PrintConfigDef::PrintConfigDef() std::string axis_upper = boost::to_upper_copy(axis.name); // Add the machine feedrate limits for XYZE axes. (M203) def = this->add("machine_max_feedrate_" + axis.name, coFloats); - def->label = (boost::format(L("Maximum feedrate %1%")) % axis_upper).str(); + def->full_label = (boost::format(L("Maximum feedrate %1%")) % axis_upper).str(); def->category = L("Machine limits"); def->tooltip = (boost::format(L("Maximum feedrate of the %1% axis")) % axis_upper).str(); def->sidetext = L("mm/s"); def->min = 0; + def->width = machine_linits_opt_width; def->default_value = new ConfigOptionFloats(axis.max_feedrate); // Add the machine acceleration limits for XYZE axes (M201) def = this->add("machine_max_acceleration_" + axis.name, coFloats); - def->label = (boost::format(L("Maximum acceleration %1%")) % axis_upper).str(); + def->full_label = (boost::format(L("Maximum acceleration %1%")) % axis_upper).str(); def->category = L("Machine limits"); def->tooltip = (boost::format(L("Maximum acceleration of the %1% axis")) % axis_upper).str(); def->sidetext = L("mm/s²"); def->min = 0; + def->width = machine_linits_opt_width; def->default_value = new ConfigOptionFloats(axis.max_acceleration); // Add the machine jerk limits for XYZE axes (M205) def = this->add("machine_max_jerk_" + axis.name, coFloats); - def->label = (boost::format(L("Maximum jerk %1%")) % axis_upper).str(); + def->full_label = (boost::format(L("Maximum jerk %1%")) % axis_upper).str(); def->category = L("Machine limits"); def->tooltip = (boost::format(L("Maximum jerk of the %1% axis")) % axis_upper).str(); def->sidetext = L("mm/s"); def->min = 0; + def->width = machine_linits_opt_width; def->default_value = new ConfigOptionFloats(axis.max_jerk); } } // M205 S... [mm/sec] def = this->add("machine_min_extruding_rate", coFloats); - def->label = L("Minimum feedrate when extruding"); + def->full_label = L("Minimum feedrate when extruding"); def->category = L("Machine limits"); def->tooltip = L("Minimum feedrate when extruding") + " (M205 S)"; def->sidetext = L("mm/s"); def->min = 0; + def->width = machine_linits_opt_width; def->default_value = new ConfigOptionFloats{ 0., 0. }; // M205 T... [mm/sec] def = this->add("machine_min_travel_rate", coFloats); - def->label = L("Minimum travel feedrate"); + def->full_label = L("Minimum travel feedrate"); def->category = L("Machine limits"); def->tooltip = L("Minimum travel feedrate") + " (M205 T)"; def->sidetext = L("mm/s"); def->min = 0; + def->width = machine_linits_opt_width; def->default_value = new ConfigOptionFloats{ 0., 0. }; // M204 S... [mm/sec^2] def = this->add("machine_max_acceleration_extruding", coFloats); - def->label = L("Maximum acceleration when extruding"); + def->full_label = L("Maximum acceleration when extruding"); def->category = L("Machine limits"); def->tooltip = L("Maximum acceleration when extruding") + " (M204 S)"; def->sidetext = L("mm/s²"); def->min = 0; + def->width = machine_linits_opt_width; def->default_value = new ConfigOptionFloats(1250., 1250.); // M204 T... [mm/sec^2] def = this->add("machine_max_acceleration_retracting", coFloats); - def->label = L("Maximum acceleration when retracting"); + def->full_label = L("Maximum acceleration when retracting"); def->category = L("Machine limits"); def->tooltip = L("Maximum acceleration when retracting") + " (M204 T)"; def->sidetext = L("mm/s²"); def->min = 0; + def->width = machine_linits_opt_width; def->default_value = new ConfigOptionFloats(1250., 1250.); def = this->add("max_fan_speed", coInts); @@ -1565,13 +1578,6 @@ PrintConfigDef::PrintConfigDef() def->cli = "single-extruder-multi-material!"; def->default_value = new ConfigOptionBool(false); - // -- ! Kinematics options - def = this->add("silent_mode", coBool); - def->label = L("Silent mode"); - def->tooltip = L("Set silent mode for the G-code flavor"); - def->default_value = new ConfigOptionBool(true); - // -- ! - def = this->add("support_material", coBool); def->label = L("Generate support material"); def->category = L("Support material"); diff --git a/xs/src/slic3r/GUI/Field.cpp b/xs/src/slic3r/GUI/Field.cpp index 43c9e7db9..46b04d959 100644 --- a/xs/src/slic3r/GUI/Field.cpp +++ b/xs/src/slic3r/GUI/Field.cpp @@ -665,6 +665,22 @@ boost::any& PointCtrl::get_value() return m_value = ret_point; } +void StaticText::BUILD() +{ + auto size = wxSize(wxDefaultSize); + if (m_opt.height >= 0) size.SetHeight(m_opt.height); + if (m_opt.width >= 0) size.SetWidth(m_opt.width); + + wxString legend(static_cast(m_opt.default_value)->value); + auto temp = new wxStaticText(m_parent, wxID_ANY, legend, wxDefaultPosition, size); + temp->SetFont(bold_font()); + + // // recast as a wxWindow to fit the calling convention + window = dynamic_cast(temp); + + temp->SetToolTip(get_tooltip_text(legend)); +} + } // GUI } // Slic3r diff --git a/xs/src/slic3r/GUI/Field.hpp b/xs/src/slic3r/GUI/Field.hpp index 948178d3e..fb6116b79 100644 --- a/xs/src/slic3r/GUI/Field.hpp +++ b/xs/src/slic3r/GUI/Field.hpp @@ -384,6 +384,34 @@ public: wxSizer* getSizer() override { return sizer; } }; +class StaticText : public Field { + using Field::Field; +public: + StaticText(const ConfigOptionDef& opt, const t_config_option_key& id) : Field(opt, id) {} + StaticText(wxWindow* parent, const ConfigOptionDef& opt, const t_config_option_key& id) : Field(parent, opt, id) {} + ~StaticText() {} + + wxWindow* window{ nullptr }; + void BUILD() override; + + void set_value(const std::string& value, bool change_event = false) { + m_disable_change_event = !change_event; + dynamic_cast(window)->SetLabel(value); + m_disable_change_event = false; + } + void set_value(const boost::any& value, bool change_event = false) { + m_disable_change_event = !change_event; + dynamic_cast(window)->SetLabel(boost::any_cast(value)); + m_disable_change_event = false; + } + + boost::any& get_value()override { return m_value; } + + void enable() override { dynamic_cast(window)->Enable(); }; + void disable() override{ dynamic_cast(window)->Disable(); }; + wxWindow* getWindow() override { return window; } +}; + } // GUI } // Slic3r diff --git a/xs/src/slic3r/GUI/OptionsGroup.cpp b/xs/src/slic3r/GUI/OptionsGroup.cpp index 57659d03d..053293ee6 100644 --- a/xs/src/slic3r/GUI/OptionsGroup.cpp +++ b/xs/src/slic3r/GUI/OptionsGroup.cpp @@ -31,6 +31,8 @@ const t_field& OptionsGroup::build_field(const t_config_option_key& id, const Co m_fields.emplace(id, STDMOVE(Choice::Create(parent(), opt, id))); } else if (opt.gui_type.compare("slider") == 0) { } else if (opt.gui_type.compare("i_spin") == 0) { // Spinctrl + } else if (opt.gui_type.compare("legend") == 0) { // StaticText + m_fields.emplace(id, STDMOVE(StaticText::Create(parent(), opt, id))); } else { switch (opt.type) { case coFloatOrPercent: @@ -86,7 +88,7 @@ const t_field& OptionsGroup::build_field(const t_config_option_key& id, const Co if (!this->m_disabled) this->back_to_sys_value(opt_id); }; - if (!m_is_tab_opt) { + if (!m_show_modified_btns) { field->m_Undo_btn->Hide(); field->m_Undo_to_sys_btn->Hide(); } diff --git a/xs/src/slic3r/GUI/OptionsGroup.hpp b/xs/src/slic3r/GUI/OptionsGroup.hpp index f35147642..422e1afd9 100644 --- a/xs/src/slic3r/GUI/OptionsGroup.hpp +++ b/xs/src/slic3r/GUI/OptionsGroup.hpp @@ -127,8 +127,12 @@ public: inline void enable() { for (auto& field : m_fields) field.second->enable(); } inline void disable() { for (auto& field : m_fields) field.second->disable(); } + void set_show_modified_btns_val(bool show) { + m_show_modified_btns = show; + } + OptionsGroup(wxWindow* _parent, const wxString& title, bool is_tab_opt=false) : - m_parent(_parent), title(title), m_is_tab_opt(is_tab_opt), staticbox(title!="") { + m_parent(_parent), title(title), m_show_modified_btns(is_tab_opt), staticbox(title!="") { auto stb = new wxStaticBox(_parent, wxID_ANY, title); stb->SetFont(bold_font()); sizer = (staticbox ? new wxStaticBoxSizer(stb/*new wxStaticBox(_parent, wxID_ANY, title)*/, wxVERTICAL) : new wxBoxSizer(wxVERTICAL)); @@ -158,7 +162,7 @@ protected: bool m_disabled {false}; wxGridSizer* m_grid_sizer {nullptr}; // "true" if option is created in preset tabs - bool m_is_tab_opt{ false }; + bool m_show_modified_btns{ false }; // This panel is needed for correct showing of the ToolTips for Button, StaticText and CheckBox // Tooltips on GTK doesn't work inside wxStaticBoxSizer unless you insert a panel diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 33636c709..583773c1e 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -1718,73 +1718,63 @@ void TabPrinter::extruders_count_changed(size_t extruders_count){ on_value_change("extruders_count", extruders_count); } +void append_option_line(ConfigOptionsGroupShp optgroup, const std::string opt_key) +{ + auto option = optgroup->get_option(opt_key, 0); + auto line = Line{ option.opt.full_label, "" }; + line.append_option(option); + line.append_option(optgroup->get_option(opt_key, 1)); + optgroup->append_line(line); +} + PageShp TabPrinter::create_kinematics_page() { auto page = add_options_page(_(L("Machine limits")), "cog.png", true); - auto optgroup = page->new_optgroup(_(L("Maximum accelerations"))); - auto line = Line{ _(L("Standard/Silent mode")), "" }; - line.append_option(optgroup->get_option("machine_max_acceleration_x", 0)); - line.append_option(optgroup->get_option("machine_max_acceleration_x", 1)); + + // Legend for OptionsGroups + auto optgroup = page->new_optgroup(_(L(""))); + optgroup->set_show_modified_btns_val(false); + optgroup->label_width = 230; + auto line = Line{ "", "" }; + + ConfigOptionDef def; + def.type = coString; + def.width = 150; + def.gui_type = "legend"; + def.tooltip = L("Values in this column are for Full Power mode"); + def.default_value = new ConfigOptionString{ L("Full Power")}; + + auto option = Option(def, "full_power_legend"); + line.append_option(option); + + def.tooltip = L("Values in this column are for Silent mode"); + def.default_value = new ConfigOptionString{ L("Silent") }; + option = Option(def, "silent_legend"); + line.append_option(option); + optgroup->append_line(line); - line = Line{ "", "" }; - line.append_option(optgroup->get_option("machine_max_acceleration_y", 0)); - line.append_option(optgroup->get_option("machine_max_acceleration_y", 1)); - optgroup->append_line(line); - line = Line{ _(L("Standard/Silent mode")), "" }; - line.append_option(optgroup->get_option("machine_max_acceleration_z", 0)); - line.append_option(optgroup->get_option("machine_max_acceleration_z", 1)); - optgroup->append_line(line); - line = Line{ _(L("Standard/Silent mode")), "" }; - line.append_option(optgroup->get_option("machine_max_acceleration_e", 0)); - line.append_option(optgroup->get_option("machine_max_acceleration_e", 1)); - optgroup->append_line(line); -// optgroup->append_single_option_line("machine_max_acceleration_x", 0); -// optgroup->append_single_option_line("machine_max_acceleration_y", 0); -// optgroup->append_single_option_line("machine_max_acceleration_z", 0); -// optgroup->append_single_option_line("machine_max_acceleration_e", 0); + + std::vector axes{ "x", "y", "z", "e" }; + optgroup = page->new_optgroup(_(L("Maximum accelerations"))); + for (const std::string &axis : axes) { + append_option_line(optgroup, "machine_max_acceleration_" + axis); + } optgroup = page->new_optgroup(_(L("Maximum feedrates"))); - optgroup->append_single_option_line("machine_max_feedrate_x", 0); - optgroup->append_single_option_line("machine_max_feedrate_y", 0); - optgroup->append_single_option_line("machine_max_feedrate_z", 0); - optgroup->append_single_option_line("machine_max_feedrate_e", 0); + for (const std::string &axis : axes) { + append_option_line(optgroup, "machine_max_feedrate_" + axis); + } optgroup = page->new_optgroup(_(L("Starting Acceleration"))); - optgroup->append_single_option_line("machine_max_acceleration_extruding", 0); - optgroup->append_single_option_line("machine_max_acceleration_retracting", 0); + append_option_line(optgroup, "machine_max_acceleration_extruding"); + append_option_line(optgroup, "machine_max_acceleration_retracting"); optgroup = page->new_optgroup(_(L("Advanced"))); - optgroup->append_single_option_line("machine_min_extruding_rate", 0); - optgroup->append_single_option_line("machine_min_travel_rate", 0); - optgroup->append_single_option_line("machine_max_jerk_x", 0); - optgroup->append_single_option_line("machine_max_jerk_y", 0); - optgroup->append_single_option_line("machine_max_jerk_z", 0); - optgroup->append_single_option_line("machine_max_jerk_e", 0); - - //for silent mode -// optgroup = page->new_optgroup(_(L("Maximum accelerations"))); -// optgroup->append_single_option_line("machine_max_acceleration_x", 1); -// optgroup->append_single_option_line("machine_max_acceleration_y", 1); -// optgroup->append_single_option_line("machine_max_acceleration_z", 1); -// optgroup->append_single_option_line("machine_max_acceleration_e", 1); - - optgroup = page->new_optgroup(_(L("Maximum feedrates (Silent mode)"))); - optgroup->append_single_option_line("machine_max_feedrate_x", 1); - optgroup->append_single_option_line("machine_max_feedrate_y", 1); - optgroup->append_single_option_line("machine_max_feedrate_z", 1); - optgroup->append_single_option_line("machine_max_feedrate_e", 1); - - optgroup = page->new_optgroup(_(L("Starting Acceleration (Silent mode)"))); - optgroup->append_single_option_line("machine_max_acceleration_extruding", 1); - optgroup->append_single_option_line("machine_max_acceleration_retracting", 1); - - optgroup = page->new_optgroup(_(L("Advanced (Silent mode)"))); - optgroup->append_single_option_line("machine_min_extruding_rate", 1); - optgroup->append_single_option_line("machine_min_travel_rate", 1); - optgroup->append_single_option_line("machine_max_jerk_x", 1); - optgroup->append_single_option_line("machine_max_jerk_y", 1); - optgroup->append_single_option_line("machine_max_jerk_z", 1); - optgroup->append_single_option_line("machine_max_jerk_e", 1); + append_option_line(optgroup, "machine_min_extruding_rate"); + append_option_line(optgroup, "machine_min_travel_rate"); + for (const std::string &axis : axes) { + append_option_line(optgroup, "machine_max_jerk_" + axis); + } return page; } From 4ba3cef49660f00d3d07b730709ab8af2127c084 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Fri, 22 Jun 2018 08:38:13 +0200 Subject: [PATCH 041/198] 3rd Attempt to fix texture rendering on OpenGL 1.1 cards --- xs/src/slic3r/GUI/GLCanvas3D.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index 1d6aebd56..d57c85958 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -3547,6 +3547,9 @@ void GLCanvas3D::_render_warning_texture() const unsigned int h = _3DScene::get_warning_texture_height(); if ((w > 0) && (h > 0)) { +//############################################################################################################################### + ::glDisable(GL_LIGHTING); +//############################################################################################################################### ::glDisable(GL_DEPTH_TEST); ::glPushMatrix(); ::glLoadIdentity(); @@ -3580,6 +3583,9 @@ void GLCanvas3D::_render_legend_texture() const unsigned int h = _3DScene::get_legend_texture_height(); if ((w > 0) && (h > 0)) { +//############################################################################################################################### + ::glDisable(GL_LIGHTING); +//############################################################################################################################### ::glDisable(GL_DEPTH_TEST); ::glPushMatrix(); ::glLoadIdentity(); From be52647440287f4fb06ae3868213ba7d898c211b Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Fri, 22 Jun 2018 09:00:01 +0200 Subject: [PATCH 042/198] Smaller gizmos icons --- xs/src/slic3r/GUI/GLCanvas3D.cpp | 13 +++++++------ xs/src/slic3r/GUI/GLCanvas3D.hpp | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index d57c85958..bf8a9412f 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -1109,8 +1109,9 @@ bool GLCanvas3D::Mouse::is_start_position_3D_defined() const return (drag.start_position_3D != Drag::Invalid_3D_Point); } -const float GLCanvas3D::Gizmos::OverlayOffsetX = 10.0f; -const float GLCanvas3D::Gizmos::OverlayGapY = 10.0f; +const float GLCanvas3D::Gizmos::OverlayTexturesScale = 0.75f; +const float GLCanvas3D::Gizmos::OverlayOffsetX = 10.0f * OverlayTexturesScale; +const float GLCanvas3D::Gizmos::OverlayGapY = 5.0f * OverlayTexturesScale; GLCanvas3D::Gizmos::Gizmos() : m_enabled(false) @@ -1176,7 +1177,7 @@ void GLCanvas3D::Gizmos::update_hover_state(const GLCanvas3D& canvas, const Poin if (it->second == nullptr) continue; - float tex_size = (float)it->second->get_textures_size(); + float tex_size = (float)it->second->get_textures_size() * OverlayTexturesScale; float half_tex_size = 0.5f * tex_size; // we currently use circular icons for gizmo, so we check the radius @@ -1202,7 +1203,7 @@ void GLCanvas3D::Gizmos::update_on_off_state(const GLCanvas3D& canvas, const Poi if (it->second == nullptr) continue; - float tex_size = (float)it->second->get_textures_size(); + float tex_size = (float)it->second->get_textures_size() * OverlayTexturesScale; float half_tex_size = 0.5f * tex_size; // we currently use circular icons for gizmo, so we check the radius @@ -1268,7 +1269,7 @@ bool GLCanvas3D::Gizmos::overlay_contains_mouse(const GLCanvas3D& canvas, const if (it->second == nullptr) continue; - float tex_size = (float)it->second->get_textures_size(); + float tex_size = (float)it->second->get_textures_size() * OverlayTexturesScale; float half_tex_size = 0.5f * tex_size; // we currently use circular icons for gizmo, so we check the radius @@ -1425,7 +1426,7 @@ void GLCanvas3D::Gizmos::_render_overlay(const GLCanvas3D& canvas) const float scaled_gap_y = OverlayGapY * inv_zoom; for (GizmosMap::const_iterator it = m_gizmos.begin(); it != m_gizmos.end(); ++it) { - float tex_size = (float)it->second->get_textures_size() * inv_zoom; + float tex_size = (float)it->second->get_textures_size() * OverlayTexturesScale * inv_zoom; GLTexture::render_texture(it->second->get_textures_id(), top_x, top_x + tex_size, top_y - tex_size, top_y); top_y -= (tex_size + scaled_gap_y); } diff --git a/xs/src/slic3r/GUI/GLCanvas3D.hpp b/xs/src/slic3r/GUI/GLCanvas3D.hpp index 2cda7214e..41590a0d0 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.hpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.hpp @@ -327,6 +327,7 @@ public: class Gizmos { + static const float OverlayTexturesScale; static const float OverlayOffsetX; static const float OverlayGapY; From 266a4413bdcb680b253f9dc19d5ecadcd2d0beeb Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Fri, 22 Jun 2018 09:42:56 +0200 Subject: [PATCH 043/198] 4th Attempt to fix texture rendering on OpenGL 1.1 cards --- xs/src/slic3r/GUI/3DScene.cpp | 18 +++++++++++++++--- xs/src/slic3r/GUI/GLCanvas3D.cpp | 6 ------ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/xs/src/slic3r/GUI/3DScene.cpp b/xs/src/slic3r/GUI/3DScene.cpp index 0c06b476c..23bce332b 100644 --- a/xs/src/slic3r/GUI/3DScene.cpp +++ b/xs/src/slic3r/GUI/3DScene.cpp @@ -1583,14 +1583,26 @@ GUI::GLCanvas3DManager _3DScene::s_canvas_mgr; unsigned int _3DScene::TextureBase::finalize() { - if (!m_data.empty()) { +//####################################################################################################################### + if ((m_tex_id == 0) && !m_data.empty()) { +// if (!m_data.empty()) { +//####################################################################################################################### // sends buffer to gpu //####################################################################################################################### // ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); //####################################################################################################################### ::glGenTextures(1, &m_tex_id); - ::glBindTexture(GL_TEXTURE_2D, m_tex_id); - ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, (GLsizei)m_tex_width, (GLsizei)m_tex_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const GLvoid*)m_data.data()); +//####################################################################################################################### + ::glBindTexture(GL_TEXTURE_2D, (GLuint)m_tex_id); +// ::glBindTexture(GL_TEXTURE_2D, m_tex_id); +//####################################################################################################################### +//####################################################################################################################### + ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, (GLsizei)m_tex_width, (GLsizei)m_tex_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)m_data.data()); + + std::cout << "loaded texture: " << m_tex_width << ", " << m_tex_height << std::endl; + +// ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, (GLsizei)m_tex_width, (GLsizei)m_tex_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const GLvoid*)m_data.data()); +//####################################################################################################################### ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1); diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index bf8a9412f..6fb44f44d 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -3548,9 +3548,6 @@ void GLCanvas3D::_render_warning_texture() const unsigned int h = _3DScene::get_warning_texture_height(); if ((w > 0) && (h > 0)) { -//############################################################################################################################### - ::glDisable(GL_LIGHTING); -//############################################################################################################################### ::glDisable(GL_DEPTH_TEST); ::glPushMatrix(); ::glLoadIdentity(); @@ -3584,9 +3581,6 @@ void GLCanvas3D::_render_legend_texture() const unsigned int h = _3DScene::get_legend_texture_height(); if ((w > 0) && (h > 0)) { -//############################################################################################################################### - ::glDisable(GL_LIGHTING); -//############################################################################################################################### ::glDisable(GL_DEPTH_TEST); ::glPushMatrix(); ::glLoadIdentity(); From bfe78967099fd5fd21884a3b94095a7356ab1e1d Mon Sep 17 00:00:00 2001 From: YuSanka Date: Fri, 22 Jun 2018 10:59:54 +0200 Subject: [PATCH 044/198] Try to fix uncorrect setup on Linux --- xs/src/slic3r/GUI/3DScene.cpp | 2 +- xs/src/slic3r/GUI/Field.cpp | 4 ++-- xs/src/slic3r/GUI/OptionsGroup.cpp | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/xs/src/slic3r/GUI/3DScene.cpp b/xs/src/slic3r/GUI/3DScene.cpp index 1879b3082..da7bfb812 100644 --- a/xs/src/slic3r/GUI/3DScene.cpp +++ b/xs/src/slic3r/GUI/3DScene.cpp @@ -1588,7 +1588,7 @@ bool _3DScene::LegendTexture::generate(const GCodePreviewData& preview_data, con m_data.clear(); // collects items to render - auto title = GUI::L_str(preview_data.get_legend_title()); + auto title = _(preview_data.get_legend_title()); const GCodePreviewData::LegendItemsList& items = preview_data.get_legend_items(tool_colors); unsigned int items_count = (unsigned int)items.size(); diff --git a/xs/src/slic3r/GUI/Field.cpp b/xs/src/slic3r/GUI/Field.cpp index 46b04d959..ba59225f6 100644 --- a/xs/src/slic3r/GUI/Field.cpp +++ b/xs/src/slic3r/GUI/Field.cpp @@ -67,7 +67,7 @@ namespace Slic3r { namespace GUI { wxString Field::get_tooltip_text(const wxString& default_string) { wxString tooltip_text(""); - wxString tooltip = L_str(m_opt.tooltip); + wxString tooltip = _(m_opt.tooltip); if (tooltip.length() > 0) tooltip_text = tooltip + "(" + _(L("default")) + ": " + (boost::iends_with(m_opt_id, "_gcode") ? "\n" : "") + @@ -355,7 +355,7 @@ void Choice::BUILD() { } else{ for (auto el : m_opt.enum_labels.empty() ? m_opt.enum_values : m_opt.enum_labels){ - const wxString& str = m_opt_id == "support" ? L_str(el) : el; + const wxString& str = _(el);//m_opt_id == "support" ? _(el) : el; temp->Append(str); } set_selection(); diff --git a/xs/src/slic3r/GUI/OptionsGroup.cpp b/xs/src/slic3r/GUI/OptionsGroup.cpp index 053293ee6..fc68564f2 100644 --- a/xs/src/slic3r/GUI/OptionsGroup.cpp +++ b/xs/src/slic3r/GUI/OptionsGroup.cpp @@ -194,7 +194,7 @@ void OptionsGroup::append_line(const Line& line, wxStaticText** colored_Label/* ConfigOptionDef option = opt.opt; // add label if any if (option.label != "") { - wxString str_label = L_str(option.label); + wxString str_label = _(option.label); //! To correct translation by context have to use wxGETTEXT_IN_CONTEXT macro from wxWidget 3.1.1 // wxString str_label = (option.label == "Top" || option.label == "Bottom") ? // wxGETTEXT_IN_CONTEXT("Layers", wxString(option.label.c_str()): @@ -215,7 +215,7 @@ void OptionsGroup::append_line(const Line& line, wxStaticText** colored_Label/* // add sidetext if any if (option.sidetext != "") { - auto sidetext = new wxStaticText(parent(), wxID_ANY, L_str(option.sidetext), wxDefaultPosition, wxDefaultSize); + auto sidetext = new wxStaticText(parent(), wxID_ANY, _(option.sidetext), wxDefaultPosition, wxDefaultSize); sidetext->SetFont(sidetext_font); sizer->Add(sidetext, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, 4); } @@ -237,7 +237,7 @@ void OptionsGroup::append_line(const Line& line, wxStaticText** colored_Label/* } Line OptionsGroup::create_single_option_line(const Option& option) const { - Line retval{ L_str(option.opt.label), L_str(option.opt.tooltip) }; + Line retval{ _(option.opt.label), _(option.opt.tooltip) }; Option tmp(option); tmp.opt.label = std::string(""); retval.append_option(tmp); From ac7d21b50a14a49e30c1b070799264b9e4547448 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Fri, 22 Jun 2018 11:19:38 +0200 Subject: [PATCH 045/198] Geometry info updated while using gizmos --- lib/Slic3r/GUI/Plater.pm | 21 ++++++++++++++++++ xs/src/libslic3r/Utils.hpp | 3 ++- xs/src/libslic3r/utils.cpp | 24 +++++++++++++++++--- xs/src/slic3r/GUI/3DScene.cpp | 22 ++++++++++++------- xs/src/slic3r/GUI/3DScene.hpp | 1 + xs/src/slic3r/GUI/GLCanvas3D.cpp | 27 +++++++++++++++++++---- xs/src/slic3r/GUI/GLCanvas3D.hpp | 2 ++ xs/src/slic3r/GUI/GLCanvas3DManager.cpp | 7 ++++++ xs/src/slic3r/GUI/GLCanvas3DManager.hpp | 1 + xs/src/slic3r/GUI/GLTexture.cpp | 29 ++++++++++++++++++------- xs/xsp/GUI_3DScene.xsp | 7 ++++++ 11 files changed, 120 insertions(+), 24 deletions(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 49c65e96e..3928aeaf2 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -142,6 +142,24 @@ sub new { $self->rotate(rad2deg($angle_z), Z, 'absolute'); }; +#=================================================================================================================================================== + # callback to update object's geometry info while using gizmos + my $on_update_geometry_info = sub { + my ($size_x, $size_y, $size_z, $scale_factor) = @_; + + my ($obj_idx, $object) = $self->selected_object; + + if ((defined $obj_idx) && ($self->{object_info_size})) { # have we already loaded the info pane? + $self->{object_info_size}->SetLabel(sprintf("%.2f x %.2f x %.2f", $size_x, $size_y, $size_z)); + my $model_object = $self->{model}->objects->[$obj_idx]; + if (my $stats = $model_object->mesh_stats) { + $self->{object_info_volume}->SetLabel(sprintf('%.2f', $stats->{volume} * $scale_factor**3)); + } + } + }; +#=================================================================================================================================================== + + # Initialize 3D plater if ($Slic3r::GUI::have_OpenGL) { $self->{canvas3D} = Slic3r::GUI::Plater::3D->new($self->{preview_notebook}, $self->{objects}, $self->{model}, $self->{print}, $self->{config}); @@ -160,6 +178,9 @@ sub new { Slic3r::GUI::_3DScene::register_on_enable_action_buttons_callback($self->{canvas3D}, $enable_action_buttons); Slic3r::GUI::_3DScene::register_on_gizmo_scale_uniformly_callback($self->{canvas3D}, $on_gizmo_scale_uniformly); Slic3r::GUI::_3DScene::register_on_gizmo_rotate_callback($self->{canvas3D}, $on_gizmo_rotate); +#=================================================================================================================================================== + Slic3r::GUI::_3DScene::register_on_update_geometry_info_callback($self->{canvas3D}, $on_update_geometry_info); +#=================================================================================================================================================== Slic3r::GUI::_3DScene::enable_gizmos($self->{canvas3D}, 1); Slic3r::GUI::_3DScene::enable_shader($self->{canvas3D}, 1); Slic3r::GUI::_3DScene::enable_force_zoom_to_bed($self->{canvas3D}, 1); diff --git a/xs/src/libslic3r/Utils.hpp b/xs/src/libslic3r/Utils.hpp index 921841a27..a501fa4d3 100644 --- a/xs/src/libslic3r/Utils.hpp +++ b/xs/src/libslic3r/Utils.hpp @@ -96,7 +96,8 @@ public: void call(int i, int j) const; void call(const std::vector& ints) const; void call(double d) const; - void call(double x, double y) const; + void call(double a, double b) const; + void call(double a, double b, double c, double d) const; void call(bool b) const; private: void *m_callback; diff --git a/xs/src/libslic3r/utils.cpp b/xs/src/libslic3r/utils.cpp index 745d07fcd..6178e6cba 100644 --- a/xs/src/libslic3r/utils.cpp +++ b/xs/src/libslic3r/utils.cpp @@ -262,7 +262,7 @@ void PerlCallback::call(double d) const LEAVE; } -void PerlCallback::call(double x, double y) const +void PerlCallback::call(double a, double b) const { if (!m_callback) return; @@ -270,8 +270,26 @@ void PerlCallback::call(double x, double y) const ENTER; SAVETMPS; PUSHMARK(SP); - XPUSHs(sv_2mortal(newSVnv(x))); - XPUSHs(sv_2mortal(newSVnv(y))); + XPUSHs(sv_2mortal(newSVnv(a))); + XPUSHs(sv_2mortal(newSVnv(b))); + PUTBACK; + perl_call_sv(SvRV((SV*)m_callback), G_DISCARD); + FREETMPS; + LEAVE; +} + +void PerlCallback::call(double a, double b, double c, double d) const +{ + if (!m_callback) + return; + dSP; + ENTER; + SAVETMPS; + PUSHMARK(SP); + XPUSHs(sv_2mortal(newSVnv(a))); + XPUSHs(sv_2mortal(newSVnv(b))); + XPUSHs(sv_2mortal(newSVnv(c))); + XPUSHs(sv_2mortal(newSVnv(d))); PUTBACK; perl_call_sv(SvRV((SV*)m_callback), G_DISCARD); FREETMPS; diff --git a/xs/src/slic3r/GUI/3DScene.cpp b/xs/src/slic3r/GUI/3DScene.cpp index 23bce332b..b7fe7aa6a 100644 --- a/xs/src/slic3r/GUI/3DScene.cpp +++ b/xs/src/slic3r/GUI/3DScene.cpp @@ -397,11 +397,15 @@ void GLVolume::render_using_layer_height() const GLsizei half_h = h / 2; //####################################################################################################################### -// ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); //####################################################################################################################### glBindTexture(GL_TEXTURE_2D, layer_height_texture_data.texture_id); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); - glTexImage2D(GL_TEXTURE_2D, 1, GL_RGBA8, half_w, half_h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); +//#################################################################################################################################################### + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); + glTexImage2D(GL_TEXTURE_2D, 1, GL_RGBA, half_w, half_h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); +// glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); +// glTexImage2D(GL_TEXTURE_2D, 1, GL_RGBA8, half_w, half_h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); +//#################################################################################################################################################### glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, layer_height_texture_data_ptr_level0()); glTexSubImage2D(GL_TEXTURE_2D, 1, 0, 0, half_w, half_h, GL_RGBA, GL_UNSIGNED_BYTE, layer_height_texture_data_ptr_level1()); @@ -1589,7 +1593,7 @@ unsigned int _3DScene::TextureBase::finalize() //####################################################################################################################### // sends buffer to gpu //####################################################################################################################### -// ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); //####################################################################################################################### ::glGenTextures(1, &m_tex_id); //####################################################################################################################### @@ -1597,10 +1601,7 @@ unsigned int _3DScene::TextureBase::finalize() // ::glBindTexture(GL_TEXTURE_2D, m_tex_id); //####################################################################################################################### //####################################################################################################################### - ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, (GLsizei)m_tex_width, (GLsizei)m_tex_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)m_data.data()); - - std::cout << "loaded texture: " << m_tex_width << ", " << m_tex_height << std::endl; - + ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)m_tex_width, (GLsizei)m_tex_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)m_data.data()); // ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, (GLsizei)m_tex_width, (GLsizei)m_tex_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const GLvoid*)m_data.data()); //####################################################################################################################### ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); @@ -2166,6 +2167,11 @@ void _3DScene::register_on_gizmo_rotate_callback(wxGLCanvas* canvas, void* callb s_canvas_mgr.register_on_gizmo_rotate_callback(canvas, callback); } +void _3DScene::register_on_update_geometry_info_callback(wxGLCanvas* canvas, void* callback) +{ + s_canvas_mgr.register_on_update_geometry_info_callback(canvas, callback); +} + static inline int hex_digit_to_int(const char c) { return diff --git a/xs/src/slic3r/GUI/3DScene.hpp b/xs/src/slic3r/GUI/3DScene.hpp index 6cdd295c3..692cd0d9f 100644 --- a/xs/src/slic3r/GUI/3DScene.hpp +++ b/xs/src/slic3r/GUI/3DScene.hpp @@ -585,6 +585,7 @@ public: static void register_on_enable_action_buttons_callback(wxGLCanvas* canvas, void* callback); static void register_on_gizmo_scale_uniformly_callback(wxGLCanvas* canvas, void* callback); static void register_on_gizmo_rotate_callback(wxGLCanvas* canvas, void* callback); + static void register_on_update_geometry_info_callback(wxGLCanvas* canvas, void* callback); static std::vector load_object(wxGLCanvas* canvas, const ModelObject* model_object, int obj_idx, std::vector instance_idxs); static std::vector load_object(wxGLCanvas* canvas, const Model* model, int obj_idx); diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index 6fb44f44d..c2bbcbedc 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -500,7 +500,7 @@ void GLCanvas3D::Bed::_render_prusa(float theta) const //####################################################################################################################### ::glEnable(GL_TEXTURE_2D); - ::glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + ::glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); //####################################################################################################################### ::glEnableClientState(GL_VERTEX_ARRAY); @@ -991,11 +991,15 @@ void GLCanvas3D::LayersEditing::_render_active_object_annotations(const GLCanvas GLsizei half_h = h / 2; //####################################################################################################################### -// ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); //####################################################################################################################### ::glBindTexture(GL_TEXTURE_2D, m_z_texture_id); - ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); - ::glTexImage2D(GL_TEXTURE_2D, 1, GL_RGBA8, half_w, half_h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); +//#################################################################################################################################################### + ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); + ::glTexImage2D(GL_TEXTURE_2D, 1, GL_RGBA, half_w, half_h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); +// ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); +// ::glTexImage2D(GL_TEXTURE_2D, 1, GL_RGBA8, half_w, half_h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); +//#################################################################################################################################################### ::glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, volume.layer_height_texture_data_ptr_level0()); ::glTexSubImage2D(GL_TEXTURE_2D, 1, 0, 0, half_w, half_h, GL_RGBA, GL_UNSIGNED_BYTE, volume.layer_height_texture_data_ptr_level1()); @@ -2582,6 +2586,12 @@ void GLCanvas3D::register_on_gizmo_rotate_callback(void* callback) m_on_gizmo_rotate_callback.register_callback(callback); } +void GLCanvas3D::register_on_update_geometry_info_callback(void* callback) +{ + if (callback != nullptr) + m_on_update_geometry_info_callback.register_callback(callback); +} + void GLCanvas3D::bind_event_handlers() { if (m_canvas != nullptr) @@ -2974,6 +2984,14 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) default: break; } + + if (!volumes.empty()) + { + const BoundingBoxf3& bb = volumes[0]->transformed_bounding_box(); + const Pointf3& size = bb.size(); + m_on_update_geometry_info_callback.call(size.x, size.y, size.z, m_gizmos.get_scale()); + } + m_dirty = true; } else if (evt.Dragging() && !gizmos_overlay_contains_mouse) @@ -3333,6 +3351,7 @@ void GLCanvas3D::_deregister_callbacks() m_on_enable_action_buttons_callback.deregister_callback(); m_on_gizmo_scale_uniformly_callback.deregister_callback(); m_on_gizmo_rotate_callback.deregister_callback(); + m_on_update_geometry_info_callback.deregister_callback(); } void GLCanvas3D::_mark_volumes_for_layer_height() const diff --git a/xs/src/slic3r/GUI/GLCanvas3D.hpp b/xs/src/slic3r/GUI/GLCanvas3D.hpp index 41590a0d0..77e89bb7e 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.hpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.hpp @@ -454,6 +454,7 @@ private: PerlCallback m_on_enable_action_buttons_callback; PerlCallback m_on_gizmo_scale_uniformly_callback; PerlCallback m_on_gizmo_rotate_callback; + PerlCallback m_on_update_geometry_info_callback; public: GLCanvas3D(wxGLCanvas* canvas, wxGLContext* context); @@ -562,6 +563,7 @@ public: void register_on_enable_action_buttons_callback(void* callback); void register_on_gizmo_scale_uniformly_callback(void* callback); void register_on_gizmo_rotate_callback(void* callback); + void register_on_update_geometry_info_callback(void* callback); void bind_event_handlers(); void unbind_event_handlers(); diff --git a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp index 5a757aec8..b7067ea58 100644 --- a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp @@ -685,6 +685,13 @@ void GLCanvas3DManager::register_on_gizmo_rotate_callback(wxGLCanvas* canvas, vo it->second->register_on_gizmo_rotate_callback(callback); } +void GLCanvas3DManager::register_on_update_geometry_info_callback(wxGLCanvas* canvas, void* callback) +{ + CanvasesMap::iterator it = _get_canvas(canvas); + if (it != m_canvases.end()) + it->second->register_on_update_geometry_info_callback(callback); +} + GLCanvas3DManager::CanvasesMap::iterator GLCanvas3DManager::_get_canvas(wxGLCanvas* canvas) { return (canvas == nullptr) ? m_canvases.end() : m_canvases.find(canvas); diff --git a/xs/src/slic3r/GUI/GLCanvas3DManager.hpp b/xs/src/slic3r/GUI/GLCanvas3DManager.hpp index d619afc35..d3cadf8b7 100644 --- a/xs/src/slic3r/GUI/GLCanvas3DManager.hpp +++ b/xs/src/slic3r/GUI/GLCanvas3DManager.hpp @@ -155,6 +155,7 @@ public: void register_on_enable_action_buttons_callback(wxGLCanvas* canvas, void* callback); void register_on_gizmo_scale_uniformly_callback(wxGLCanvas* canvas, void* callback); void register_on_gizmo_rotate_callback(wxGLCanvas* canvas, void* callback); + void register_on_update_geometry_info_callback(wxGLCanvas* canvas, void* callback); private: CanvasesMap::iterator _get_canvas(wxGLCanvas* canvas); diff --git a/xs/src/slic3r/GUI/GLTexture.cpp b/xs/src/slic3r/GUI/GLTexture.cpp index 8809153ad..4f411e4c3 100644 --- a/xs/src/slic3r/GUI/GLTexture.cpp +++ b/xs/src/slic3r/GUI/GLTexture.cpp @@ -74,11 +74,14 @@ bool GLTexture::load_from_file(const std::string& filename, bool generate_mipmap // sends data to gpu //####################################################################################################################### -// ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); //####################################################################################################################### ::glGenTextures(1, &m_id); ::glBindTexture(GL_TEXTURE_2D, m_id); - ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, (GLsizei)m_width, (GLsizei)m_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)data.data()); +//#################################################################################################################################################### + ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)m_width, (GLsizei)m_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)data.data()); +// ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, (GLsizei)m_width, (GLsizei)m_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)data.data()); +//#################################################################################################################################################### if (generate_mipmaps) { // we manually generate mipmaps because glGenerateMipmap() function is not reliable on all graphics cards @@ -135,21 +138,25 @@ void GLTexture::render_texture(unsigned int tex_id, float left, float right, flo // ::glColor4f(1.0f, 1.0f, 1.0f, 1.0f); //####################################################################################################################### +//####################################################################################################################### + bool lighting_enabled = ::glIsEnabled(GL_LIGHTING); +//####################################################################################################################### + ::glDisable(GL_LIGHTING); ::glEnable(GL_BLEND); ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); //####################################################################################################################### ::glEnable(GL_TEXTURE_2D); - ::glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + ::glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); //####################################################################################################################### ::glBindTexture(GL_TEXTURE_2D, (GLuint)tex_id); ::glBegin(GL_QUADS); - ::glTexCoord2d(0.0f, 1.0f); ::glVertex3f(left, bottom, 0.0f); - ::glTexCoord2d(1.0f, 1.0f); ::glVertex3f(right, bottom, 0.0f); - ::glTexCoord2d(1.0f, 0.0f); ::glVertex3f(right, top, 0.0f); - ::glTexCoord2d(0.0f, 0.0f); ::glVertex3f(left, top, 0.0f); + ::glTexCoord2f(0.0f, 1.0f); ::glVertex3f(left, bottom, 0.0f); + ::glTexCoord2f(1.0f, 1.0f); ::glVertex3f(right, bottom, 0.0f); + ::glTexCoord2f(1.0f, 0.0f); ::glVertex3f(right, top, 0.0f); + ::glTexCoord2f(0.0f, 0.0f); ::glVertex3f(left, top, 0.0f); ::glEnd(); ::glBindTexture(GL_TEXTURE_2D, 0); @@ -158,6 +165,9 @@ void GLTexture::render_texture(unsigned int tex_id, float left, float right, flo ::glDisable(GL_TEXTURE_2D); //####################################################################################################################### ::glDisable(GL_BLEND); +//####################################################################################################################### + if (lighting_enabled) +//####################################################################################################################### ::glEnable(GL_LIGHTING); } @@ -193,7 +203,10 @@ void GLTexture::_generate_mipmaps(wxImage& image) data[data_id + 3] = (img_alpha != nullptr) ? img_alpha[i] : 255; } - ::glTexImage2D(GL_TEXTURE_2D, level, GL_RGBA8, (GLsizei)w, (GLsizei)h, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)data.data()); +//#################################################################################################################################################### + ::glTexImage2D(GL_TEXTURE_2D, level, GL_RGBA, (GLsizei)w, (GLsizei)h, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)data.data()); +// ::glTexImage2D(GL_TEXTURE_2D, level, GL_RGBA8, (GLsizei)w, (GLsizei)h, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)data.data()); +//#################################################################################################################################################### } } diff --git a/xs/xsp/GUI_3DScene.xsp b/xs/xsp/GUI_3DScene.xsp index bddae54a6..deca2e100 100644 --- a/xs/xsp/GUI_3DScene.xsp +++ b/xs/xsp/GUI_3DScene.xsp @@ -622,6 +622,13 @@ register_on_gizmo_rotate_callback(canvas, callback) CODE: _3DScene::register_on_gizmo_rotate_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); +void +register_on_update_geometry_info_callback(canvas, callback) + SV *canvas; + SV *callback; + CODE: + _3DScene::register_on_update_geometry_info_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); + unsigned int finalize_legend_texture() CODE: From 15c69a90ecf524f7f03ec9857772895c3d1e6101 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Fri, 22 Jun 2018 12:21:43 +0200 Subject: [PATCH 046/198] Changed use of GL_LIGHTING logic and code cleanup --- xs/src/slic3r/GUI/3DScene.cpp | 17 ----------------- xs/src/slic3r/GUI/GLCanvas3D.cpp | 32 +++++++------------------------- xs/src/slic3r/GUI/GLGizmo.cpp | 4 ---- xs/src/slic3r/GUI/GLTexture.cpp | 25 ------------------------- 4 files changed, 7 insertions(+), 71 deletions(-) diff --git a/xs/src/slic3r/GUI/3DScene.cpp b/xs/src/slic3r/GUI/3DScene.cpp index b7fe7aa6a..ac359cad7 100644 --- a/xs/src/slic3r/GUI/3DScene.cpp +++ b/xs/src/slic3r/GUI/3DScene.cpp @@ -396,16 +396,10 @@ void GLVolume::render_using_layer_height() const GLsizei half_w = w / 2; GLsizei half_h = h / 2; -//####################################################################################################################### ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); -//####################################################################################################################### glBindTexture(GL_TEXTURE_2D, layer_height_texture_data.texture_id); -//#################################################################################################################################################### glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); glTexImage2D(GL_TEXTURE_2D, 1, GL_RGBA, half_w, half_h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); -// glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); -// glTexImage2D(GL_TEXTURE_2D, 1, GL_RGBA8, half_w, half_h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); -//#################################################################################################################################################### glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, layer_height_texture_data_ptr_level0()); glTexSubImage2D(GL_TEXTURE_2D, 1, 0, 0, half_w, half_h, GL_RGBA, GL_UNSIGNED_BYTE, layer_height_texture_data_ptr_level1()); @@ -1587,23 +1581,12 @@ GUI::GLCanvas3DManager _3DScene::s_canvas_mgr; unsigned int _3DScene::TextureBase::finalize() { -//####################################################################################################################### if ((m_tex_id == 0) && !m_data.empty()) { -// if (!m_data.empty()) { -//####################################################################################################################### // sends buffer to gpu -//####################################################################################################################### ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); -//####################################################################################################################### ::glGenTextures(1, &m_tex_id); -//####################################################################################################################### ::glBindTexture(GL_TEXTURE_2D, (GLuint)m_tex_id); -// ::glBindTexture(GL_TEXTURE_2D, m_tex_id); -//####################################################################################################################### -//####################################################################################################################### ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)m_tex_width, (GLsizei)m_tex_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)m_data.data()); -// ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, (GLsizei)m_tex_width, (GLsizei)m_tex_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const GLvoid*)m_data.data()); -//####################################################################################################################### ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1); diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index c2bbcbedc..7dadfba03 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -498,10 +498,8 @@ void GLCanvas3D::Bed::_render_prusa(float theta) const ::glEnable(GL_BLEND); ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); -//####################################################################################################################### ::glEnable(GL_TEXTURE_2D); ::glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); -//####################################################################################################################### ::glEnableClientState(GL_VERTEX_ARRAY); ::glEnableClientState(GL_TEXTURE_COORD_ARRAY); @@ -509,9 +507,6 @@ void GLCanvas3D::Bed::_render_prusa(float theta) const if (theta > 90.0f) ::glFrontFace(GL_CW); -//####################################################################################################################### -// ::glColor4f(1.0f, 1.0f, 1.0f, 1.0f); -//####################################################################################################################### ::glBindTexture(GL_TEXTURE_2D, (theta <= 90.0f) ? (GLuint)m_top_texture.get_id() : (GLuint)m_bottom_texture.get_id()); ::glVertexPointer(3, GL_FLOAT, 0, (GLvoid*)m_triangles.get_vertices()); ::glTexCoordPointer(2, GL_FLOAT, 0, (GLvoid*)m_triangles.get_tex_coords()); @@ -524,9 +519,7 @@ void GLCanvas3D::Bed::_render_prusa(float theta) const ::glDisableClientState(GL_TEXTURE_COORD_ARRAY); ::glDisableClientState(GL_VERTEX_ARRAY); -//####################################################################################################################### ::glDisable(GL_TEXTURE_2D); -//####################################################################################################################### ::glDisable(GL_BLEND); } @@ -566,6 +559,7 @@ void GLCanvas3D::Bed::_render_custom() const ::glDisableClientState(GL_VERTEX_ARRAY); ::glDisable(GL_BLEND); + ::glDisable(GL_LIGHTING); } } @@ -590,7 +584,6 @@ GLCanvas3D::Axes::Axes() void GLCanvas3D::Axes::render(bool depth_test) const { - ::glDisable(GL_LIGHTING); if (depth_test) ::glEnable(GL_DEPTH_TEST); else @@ -636,7 +629,6 @@ bool GLCanvas3D::CuttingPlane::set(float z, const ExPolygons& polygons) void GLCanvas3D::CuttingPlane::render(const BoundingBoxf3& bb) const { - ::glDisable(GL_LIGHTING); _render_plane(bb); _render_contour(); } @@ -990,16 +982,10 @@ void GLCanvas3D::LayersEditing::_render_active_object_annotations(const GLCanvas GLsizei half_w = w / 2; GLsizei half_h = h / 2; -//####################################################################################################################### ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); -//####################################################################################################################### ::glBindTexture(GL_TEXTURE_2D, m_z_texture_id); -//#################################################################################################################################################### ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); ::glTexImage2D(GL_TEXTURE_2D, 1, GL_RGBA, half_w, half_h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); -// ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); -// ::glTexImage2D(GL_TEXTURE_2D, 1, GL_RGBA8, half_w, half_h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); -//#################################################################################################################################################### ::glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, volume.layer_height_texture_data_ptr_level0()); ::glTexSubImage2D(GL_TEXTURE_2D, 1, 0, 0, half_w, half_h, GL_RGBA, GL_UNSIGNED_BYTE, volume.layer_height_texture_data_ptr_level1()); @@ -1570,10 +1556,6 @@ bool GLCanvas3D::init(bool useVBOs, bool use_legacy_opengl) if (m_gizmos.is_enabled() && !m_gizmos.init()) return false; -//####################################################################################################################### -// ::glEnable(GL_TEXTURE_2D); -//####################################################################################################################### - m_initialized = true; return true; @@ -3411,7 +3393,6 @@ void GLCanvas3D::_picking_pass() const if (m_multisample_allowed) ::glDisable(GL_MULTISAMPLE); - ::glDisable(GL_LIGHTING); ::glDisable(GL_BLEND); ::glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); @@ -3467,8 +3448,6 @@ void GLCanvas3D::_render_background() const static const float COLOR[3] = { 10.0f / 255.0f, 98.0f / 255.0f, 144.0f / 255.0f }; - ::glDisable(GL_LIGHTING); - ::glPushMatrix(); ::glLoadIdentity(); ::glMatrixMode(GL_PROJECTION); @@ -3547,6 +3526,8 @@ void GLCanvas3D::_render_objects() const if (m_picking_enabled) ::glEnable(GL_CULL_FACE); } + + ::glDisable(GL_LIGHTING); } void GLCanvas3D::_render_cutting_plane() const @@ -3655,9 +3636,7 @@ void GLCanvas3D::_render_volumes(bool fake_colors) const { static const GLfloat INV_255 = 1.0f / 255.0f; - if (fake_colors) - ::glDisable(GL_LIGHTING); - else + if (!fake_colors) ::glEnable(GL_LIGHTING); // do not cull backfaces to show broken geometry, if any @@ -3695,6 +3674,9 @@ void GLCanvas3D::_render_volumes(bool fake_colors) const ::glDisable(GL_BLEND); ::glEnable(GL_CULL_FACE); + + if (!fake_colors) + ::glDisable(GL_LIGHTING); } void GLCanvas3D::_render_gizmo() const diff --git a/xs/src/slic3r/GUI/GLGizmo.cpp b/xs/src/slic3r/GUI/GLGizmo.cpp index 0b5f4b3b7..4a76b287b 100644 --- a/xs/src/slic3r/GUI/GLGizmo.cpp +++ b/xs/src/slic3r/GUI/GLGizmo.cpp @@ -222,7 +222,6 @@ void GLGizmoRotate::on_update(const Pointf& mouse_pos) void GLGizmoRotate::on_render(const BoundingBoxf3& box) const { - ::glDisable(GL_LIGHTING); ::glDisable(GL_DEPTH_TEST); const Pointf3& size = box.size(); @@ -244,7 +243,6 @@ void GLGizmoRotate::on_render(const BoundingBoxf3& box) const void GLGizmoRotate::on_render_for_picking(const BoundingBoxf3& box) const { - ::glDisable(GL_LIGHTING); ::glDisable(GL_DEPTH_TEST); m_grabbers[0].color[0] = 1.0f; @@ -413,7 +411,6 @@ void GLGizmoScale::on_update(const Pointf& mouse_pos) void GLGizmoScale::on_render(const BoundingBoxf3& box) const { - ::glDisable(GL_LIGHTING); ::glDisable(GL_DEPTH_TEST); coordf_t min_x = box.min.x - (coordf_t)Offset; @@ -452,7 +449,6 @@ void GLGizmoScale::on_render_for_picking(const BoundingBoxf3& box) const { static const GLfloat INV_255 = 1.0f / 255.0f; - ::glDisable(GL_LIGHTING); ::glDisable(GL_DEPTH_TEST); for (unsigned int i = 0; i < 4; ++i) diff --git a/xs/src/slic3r/GUI/GLTexture.cpp b/xs/src/slic3r/GUI/GLTexture.cpp index 4f411e4c3..88d949c7b 100644 --- a/xs/src/slic3r/GUI/GLTexture.cpp +++ b/xs/src/slic3r/GUI/GLTexture.cpp @@ -73,15 +73,10 @@ bool GLTexture::load_from_file(const std::string& filename, bool generate_mipmap // sends data to gpu -//####################################################################################################################### ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); -//####################################################################################################################### ::glGenTextures(1, &m_id); ::glBindTexture(GL_TEXTURE_2D, m_id); -//#################################################################################################################################################### ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)m_width, (GLsizei)m_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)data.data()); -// ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, (GLsizei)m_width, (GLsizei)m_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)data.data()); -//#################################################################################################################################################### if (generate_mipmaps) { // we manually generate mipmaps because glGenerateMipmap() function is not reliable on all graphics cards @@ -134,21 +129,10 @@ const std::string& GLTexture::get_source() const void GLTexture::render_texture(unsigned int tex_id, float left, float right, float bottom, float top) { -//####################################################################################################################### -// ::glColor4f(1.0f, 1.0f, 1.0f, 1.0f); -//####################################################################################################################### - -//####################################################################################################################### - bool lighting_enabled = ::glIsEnabled(GL_LIGHTING); -//####################################################################################################################### - - ::glDisable(GL_LIGHTING); ::glEnable(GL_BLEND); ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); -//####################################################################################################################### ::glEnable(GL_TEXTURE_2D); ::glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); -//####################################################################################################################### ::glBindTexture(GL_TEXTURE_2D, (GLuint)tex_id); @@ -161,14 +145,8 @@ void GLTexture::render_texture(unsigned int tex_id, float left, float right, flo ::glBindTexture(GL_TEXTURE_2D, 0); -//####################################################################################################################### ::glDisable(GL_TEXTURE_2D); -//####################################################################################################################### ::glDisable(GL_BLEND); -//####################################################################################################################### - if (lighting_enabled) -//####################################################################################################################### - ::glEnable(GL_LIGHTING); } void GLTexture::_generate_mipmaps(wxImage& image) @@ -203,10 +181,7 @@ void GLTexture::_generate_mipmaps(wxImage& image) data[data_id + 3] = (img_alpha != nullptr) ? img_alpha[i] : 255; } -//#################################################################################################################################################### ::glTexImage2D(GL_TEXTURE_2D, level, GL_RGBA, (GLsizei)w, (GLsizei)h, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)data.data()); -// ::glTexImage2D(GL_TEXTURE_2D, level, GL_RGBA8, (GLsizei)w, (GLsizei)h, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)data.data()); -//#################################################################################################################################################### } } From c10e9a6840dc99fcb02b1d0f493646e804b62a94 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Fri, 22 Jun 2018 12:27:56 +0200 Subject: [PATCH 047/198] Fixed crash-bug when close application after language changing --- xs/src/slic3r/GUI/GUI.cpp | 8 ++++++++ xs/src/slic3r/GUI/GUI.hpp | 2 ++ xs/xsp/GUI.xsp | 3 +++ 3 files changed, 13 insertions(+) diff --git a/xs/src/slic3r/GUI/GUI.cpp b/xs/src/slic3r/GUI/GUI.cpp index 1751f4548..9fe45a376 100644 --- a/xs/src/slic3r/GUI/GUI.cpp +++ b/xs/src/slic3r/GUI/GUI.cpp @@ -56,6 +56,7 @@ #include "../Utils/PresetUpdater.hpp" #include "../Config/Snapshot.hpp" +#include "3DScene.hpp" namespace Slic3r { namespace GUI { @@ -109,6 +110,7 @@ wxNotebook *g_wxTabPanel = nullptr; AppConfig *g_AppConfig = nullptr; PresetBundle *g_PresetBundle= nullptr; PresetUpdater *g_PresetUpdater = nullptr; +_3DScene *g_3DScene = nullptr; wxColour g_color_label_modified; wxColour g_color_label_sys; wxColour g_color_label_default; @@ -194,6 +196,11 @@ void set_preset_updater(PresetUpdater *updater) g_PresetUpdater = updater; } +void set_3DScene(_3DScene *scene) +{ + g_3DScene = scene; +} + std::vector& get_tabs_list() { return g_tabs_list; @@ -392,6 +399,7 @@ void add_config_menu(wxMenuBar *menu, int event_preferences_changed, int event_l save_language(); show_info(g_wxTabPanel, _(L("Application will be restarted")), _(L("Attention!"))); if (event_language_change > 0) { + g_3DScene->remove_all_canvases();// remove all canvas before recreate GUI wxCommandEvent event(event_language_change); g_wxApp->ProcessEvent(event); } diff --git a/xs/src/slic3r/GUI/GUI.hpp b/xs/src/slic3r/GUI/GUI.hpp index 663815f68..6b722a439 100644 --- a/xs/src/slic3r/GUI/GUI.hpp +++ b/xs/src/slic3r/GUI/GUI.hpp @@ -32,6 +32,7 @@ class AppConfig; class PresetUpdater; class DynamicPrintConfig; class TabIface; +class _3DScene; #define _(s) Slic3r::translate((s)) inline wxString translate(const char *s) { return wxGetTranslation(wxString(s, wxConvUTF8)); } @@ -87,6 +88,7 @@ void set_tab_panel(wxNotebook *tab_panel); void set_app_config(AppConfig *app_config); void set_preset_bundle(PresetBundle *preset_bundle); void set_preset_updater(PresetUpdater *updater); +void set_3DScene(_3DScene *scene); AppConfig* get_app_config(); wxApp* get_app(); diff --git a/xs/xsp/GUI.xsp b/xs/xsp/GUI.xsp index af0612f19..6b05e9a67 100644 --- a/xs/xsp/GUI.xsp +++ b/xs/xsp/GUI.xsp @@ -101,3 +101,6 @@ void desktop_open_datadir_folder() void fix_model_by_win10_sdk_gui(ModelObject *model_object_src, Print *print, Model *model_dst) %code%{ Slic3r::fix_model_by_win10_sdk_gui(*model_object_src, *print, *model_dst); %}; + +void set_3DScene(SV *scene) + %code%{ Slic3r::GUI::set_3DScene((_3DScene *)wxPli_sv_2_object(aTHX_ scene, "Slic3r::Model::3DScene") ); %}; From 3fdefbfbea324aa5940811a06b418290d966ecbd Mon Sep 17 00:00:00 2001 From: YuSanka Date: Fri, 22 Jun 2018 13:01:41 +0200 Subject: [PATCH 048/198] Added updatin of the "Machine limits" page according to "use silent mode" --- xs/src/slic3r/GUI/Tab.cpp | 57 ++++++++++++++++++++++----------------- xs/src/slic3r/GUI/Tab.hpp | 3 +++ 2 files changed, 36 insertions(+), 24 deletions(-) diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 583773c1e..170388434 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -1631,8 +1631,14 @@ void TabPrinter::build() optgroup->m_on_change = [this, optgroup](t_config_option_key opt_key, boost::any value){ wxTheApp->CallAfter([this, opt_key, value](){ - if (opt_key.compare("gcode_flavor") == 0) - build_extruder_pages(); + if (opt_key.compare("silent_mode") == 0) { + bool val = boost::any_cast(value); + if (m_use_silent_mode != val) { + m_rebuil_kinematics_page = true; + m_use_silent_mode = val; + } + } + build_extruder_pages(); update_dirty(); on_value_change(opt_key, value); }); @@ -1718,12 +1724,13 @@ void TabPrinter::extruders_count_changed(size_t extruders_count){ on_value_change("extruders_count", extruders_count); } -void append_option_line(ConfigOptionsGroupShp optgroup, const std::string opt_key) +void TabPrinter::append_option_line(ConfigOptionsGroupShp optgroup, const std::string opt_key) { auto option = optgroup->get_option(opt_key, 0); auto line = Line{ option.opt.full_label, "" }; line.append_option(option); - line.append_option(optgroup->get_option(opt_key, 1)); + if (m_use_silent_mode) + line.append_option(optgroup->get_option(opt_key, 1)); optgroup->append_line(line); } @@ -1731,31 +1738,33 @@ PageShp TabPrinter::create_kinematics_page() { auto page = add_options_page(_(L("Machine limits")), "cog.png", true); - // Legend for OptionsGroups - auto optgroup = page->new_optgroup(_(L(""))); - optgroup->set_show_modified_btns_val(false); - optgroup->label_width = 230; - auto line = Line{ "", "" }; + if (m_use_silent_mode) { + // Legend for OptionsGroups + auto optgroup = page->new_optgroup(_(L(""))); + optgroup->set_show_modified_btns_val(false); + optgroup->label_width = 230; + auto line = Line{ "", "" }; - ConfigOptionDef def; - def.type = coString; - def.width = 150; - def.gui_type = "legend"; - def.tooltip = L("Values in this column are for Full Power mode"); - def.default_value = new ConfigOptionString{ L("Full Power")}; + ConfigOptionDef def; + def.type = coString; + def.width = 150; + def.gui_type = "legend"; + def.tooltip = L("Values in this column are for Full Power mode"); + def.default_value = new ConfigOptionString{ L("Full Power") }; - auto option = Option(def, "full_power_legend"); - line.append_option(option); + auto option = Option(def, "full_power_legend"); + line.append_option(option); - def.tooltip = L("Values in this column are for Silent mode"); - def.default_value = new ConfigOptionString{ L("Silent") }; - option = Option(def, "silent_legend"); - line.append_option(option); + def.tooltip = L("Values in this column are for Silent mode"); + def.default_value = new ConfigOptionString{ L("Silent") }; + option = Option(def, "silent_legend"); + line.append_option(option); - optgroup->append_line(line); + optgroup->append_line(line); + } std::vector axes{ "x", "y", "z", "e" }; - optgroup = page->new_optgroup(_(L("Maximum accelerations"))); + auto optgroup = page->new_optgroup(_(L("Maximum accelerations"))); for (const std::string &axis : axes) { append_option_line(optgroup, "machine_max_acceleration_" + axis); } @@ -1789,7 +1798,7 @@ void TabPrinter::build_extruder_pages() size_t existed_page = 0; for (int i = n_before_extruders; i < m_pages.size(); ++i) // first make sure it's not there already if (m_pages[i]->title().find(_(L("Machine limits"))) != std::string::npos) { - if (!is_marlin_flavor) + if (!is_marlin_flavor || m_rebuil_kinematics_page) m_pages.erase(m_pages.begin() + i); else existed_page = i; diff --git a/xs/src/slic3r/GUI/Tab.hpp b/xs/src/slic3r/GUI/Tab.hpp index ab63bcc78..90bb40b9e 100644 --- a/xs/src/slic3r/GUI/Tab.hpp +++ b/xs/src/slic3r/GUI/Tab.hpp @@ -313,6 +313,9 @@ public: class TabPrinter : public Tab { bool m_has_single_extruder_MM_page = false; + bool m_use_silent_mode = false; + void append_option_line(ConfigOptionsGroupShp optgroup, const std::string opt_key); + bool m_rebuil_kinematics_page = false; public: wxButton* m_serial_test_btn; wxButton* m_octoprint_host_test_btn; From f420ced581a1ab7144dffa125d6b04fb1ae22f45 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Fri, 22 Jun 2018 14:01:27 +0200 Subject: [PATCH 049/198] Time estimators use initial data from config --- xs/src/libslic3r/GCode.cpp | 53 ++++++++++++++++++++++++++------ xs/src/libslic3r/GCode.hpp | 2 ++ xs/src/libslic3r/PrintConfig.hpp | 2 ++ 3 files changed, 47 insertions(+), 10 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index aa2b1399a..c1798b0b5 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -375,7 +375,7 @@ void GCode::do_export(Print *print, const char *path, GCodePreviewData *preview_ } fclose(file); - if (m_default_time_estimator.get_dialect() == gcfMarlin) + if (m_silent_time_estimator_enabled) GCodeTimeEstimator::post_process_elapsed_times(path_tmp, m_default_time_estimator.get_time(), m_silent_time_estimator.get_time()); if (! this->m_placeholder_parser_failed_templates.empty()) { @@ -410,12 +410,45 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) // resets time estimators m_default_time_estimator.reset(); m_default_time_estimator.set_dialect(print.config.gcode_flavor); - if (print.config.gcode_flavor == gcfMarlin) + m_default_time_estimator.set_acceleration(print.config.machine_max_acceleration_extruding.values[0]); + m_default_time_estimator.set_retract_acceleration(print.config.machine_max_acceleration_retracting.values[0]); + m_default_time_estimator.set_minimum_feedrate(print.config.machine_min_extruding_rate.values[0]); + m_default_time_estimator.set_minimum_travel_feedrate(print.config.machine_min_travel_rate.values[0]); + m_default_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::X, print.config.machine_max_acceleration_x.values[0]); + m_default_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Y, print.config.machine_max_acceleration_y.values[0]); + m_default_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Z, print.config.machine_max_acceleration_z.values[0]); + m_default_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::E, print.config.machine_max_acceleration_e.values[0]); + m_default_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::X, print.config.machine_max_feedrate_x.values[0]); + m_default_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Y, print.config.machine_max_feedrate_y.values[0]); + m_default_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Z, print.config.machine_max_feedrate_z.values[0]); + m_default_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::E, print.config.machine_max_feedrate_e.values[0]); + m_default_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::X, print.config.machine_max_jerk_x.values[0]); + m_default_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Y, print.config.machine_max_jerk_y.values[0]); + m_default_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Z, print.config.machine_max_jerk_z.values[0]); + m_default_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::E, print.config.machine_max_jerk_e.values[0]); + + m_silent_time_estimator_enabled = (print.config.gcode_flavor == gcfMarlin) && print.config.silent_mode; + if (m_silent_time_estimator_enabled) { m_silent_time_estimator.reset(); m_silent_time_estimator.set_dialect(print.config.gcode_flavor); + m_silent_time_estimator.set_acceleration(print.config.machine_max_acceleration_extruding.values[1]); + m_silent_time_estimator.set_retract_acceleration(print.config.machine_max_acceleration_retracting.values[1]); + m_silent_time_estimator.set_minimum_feedrate(print.config.machine_min_extruding_rate.values[1]); + m_silent_time_estimator.set_minimum_travel_feedrate(print.config.machine_min_travel_rate.values[1]); + m_silent_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::X, print.config.machine_max_acceleration_x.values[1]); + m_silent_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Y, print.config.machine_max_acceleration_y.values[1]); + m_silent_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Z, print.config.machine_max_acceleration_z.values[1]); + m_silent_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::E, print.config.machine_max_acceleration_e.values[1]); + m_silent_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::X, print.config.machine_max_feedrate_x.values[1]); + m_silent_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Y, print.config.machine_max_feedrate_y.values[1]); + m_silent_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Z, print.config.machine_max_feedrate_z.values[1]); + m_silent_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::E, print.config.machine_max_feedrate_e.values[1]); + m_silent_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::X, print.config.machine_max_jerk_x.values[1]); + m_silent_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Y, print.config.machine_max_jerk_y.values[1]); + m_silent_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Z, print.config.machine_max_jerk_z.values[1]); + m_silent_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::E, print.config.machine_max_jerk_e.values[1]); } - // resets analyzer m_analyzer.reset(); m_enable_analyzer = preview_data != nullptr; @@ -606,7 +639,7 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) } // before start gcode time estimation - if (m_default_time_estimator.get_dialect() == gcfMarlin) + if (m_silent_time_estimator_enabled) { _write(file, m_default_time_estimator.get_elapsed_time_string().c_str()); _write(file, m_silent_time_estimator.get_elapsed_time_string().c_str()); @@ -817,7 +850,7 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) _writeln(file, this->placeholder_parser_process("end_filament_gcode", end_gcode, (unsigned int)(&end_gcode - &print.config.end_filament_gcode.values.front()), &config)); } // before end gcode time estimation - if (m_default_time_estimator.get_dialect() == gcfMarlin) + if (m_silent_time_estimator_enabled) { _write(file, m_default_time_estimator.get_elapsed_time_string().c_str()); _write(file, m_silent_time_estimator.get_elapsed_time_string().c_str()); @@ -829,7 +862,7 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) // calculates estimated printing time m_default_time_estimator.calculate_time(); - if (m_default_time_estimator.get_dialect() == gcfMarlin) + if (m_silent_time_estimator_enabled) m_silent_time_estimator.calculate_time(); // Get filament stats. @@ -839,7 +872,7 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) print.total_weight = 0.; print.total_cost = 0.; print.estimated_default_print_time = m_default_time_estimator.get_time_dhms(); - print.estimated_silent_print_time = (m_default_time_estimator.get_dialect() == gcfMarlin) ? m_silent_time_estimator.get_time_dhms() : "N/A"; + print.estimated_silent_print_time = m_silent_time_estimator_enabled ? m_silent_time_estimator.get_time_dhms() : "N/A"; for (const Extruder &extruder : m_writer.extruders()) { double used_filament = extruder.used_filament(); double extruded_volume = extruder.extruded_volume(); @@ -860,7 +893,7 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) } _write_format(file, "; total filament cost = %.1lf\n", print.total_cost); _write_format(file, "; estimated printing time (default mode) = %s\n", m_default_time_estimator.get_time_dhms().c_str()); - if (m_default_time_estimator.get_dialect() == gcfMarlin) + if (m_silent_time_estimator_enabled) _write_format(file, "; estimated printing time (silent mode) = %s\n", m_silent_time_estimator.get_time_dhms().c_str()); // Append full config. @@ -1430,7 +1463,7 @@ void GCode::process_layer( _write(file, gcode); // after layer time estimation - if (m_default_time_estimator.get_dialect() == gcfMarlin) + if (m_silent_time_estimator_enabled) { _write(file, m_default_time_estimator.get_elapsed_time_string().c_str()); _write(file, m_silent_time_estimator.get_elapsed_time_string().c_str()); @@ -2094,7 +2127,7 @@ void GCode::_write(FILE* file, const char *what) fwrite(gcode, 1, ::strlen(gcode), file); // updates time estimator and gcode lines vector m_default_time_estimator.add_gcode_block(gcode); - if (m_default_time_estimator.get_dialect() == gcfMarlin) + if (m_silent_time_estimator_enabled) m_silent_time_estimator.add_gcode_block(gcode); } } diff --git a/xs/src/libslic3r/GCode.hpp b/xs/src/libslic3r/GCode.hpp index b938604ef..9fd31b993 100644 --- a/xs/src/libslic3r/GCode.hpp +++ b/xs/src/libslic3r/GCode.hpp @@ -135,6 +135,7 @@ public: m_second_layer_things_done(false), m_default_time_estimator(GCodeTimeEstimator::Default), m_silent_time_estimator(GCodeTimeEstimator::Silent), + m_silent_time_estimator_enabled(false), m_last_obj_copy(nullptr, Point(std::numeric_limits::max(), std::numeric_limits::max())) {} ~GCode() {} @@ -294,6 +295,7 @@ protected: // Time estimators GCodeTimeEstimator m_default_time_estimator; GCodeTimeEstimator m_silent_time_estimator; + bool m_silent_time_estimator_enabled; // Analyzer GCodeAnalyzer m_analyzer; diff --git a/xs/src/libslic3r/PrintConfig.hpp b/xs/src/libslic3r/PrintConfig.hpp index f3be03c2a..b28618624 100644 --- a/xs/src/libslic3r/PrintConfig.hpp +++ b/xs/src/libslic3r/PrintConfig.hpp @@ -555,6 +555,7 @@ public: ConfigOptionFloat cooling_tube_retraction; ConfigOptionFloat cooling_tube_length; ConfigOptionFloat parking_pos_retraction; + ConfigOptionBool silent_mode; std::string get_extrusion_axis() const @@ -612,6 +613,7 @@ protected: OPT_PTR(cooling_tube_retraction); OPT_PTR(cooling_tube_length); OPT_PTR(parking_pos_retraction); + OPT_PTR(silent_mode); } }; From e2126c2dd623048f74e9195c921926e33fbf03c7 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Fri, 22 Jun 2018 14:03:34 +0200 Subject: [PATCH 050/198] Dedicated objects are now not ignored --- xs/src/libslic3r/Print.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index 6749babf8..dac48bfd3 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -1198,7 +1198,7 @@ float Print::mark_wiping_extrusions(ToolOrdering::LayerTools& layer_tools, unsig for (int i=0 ; i<(int)object_list.size() ; ++i) { // Let's iterate through all objects... const auto& object = object_list[i]; - if (!perimeters_done && (i+1==objects.size() || !objects[i+1]->config.wipe_into_objects)) { // last dedicated object in list + if (!perimeters_done && (i+1==object_list.size() || !object_list[i]->config.wipe_into_objects)) { // we passed the last dedicated object in list perimeters_done = true; i=-1; // let's go from the start again continue; @@ -1224,7 +1224,7 @@ float Print::mark_wiping_extrusions(ToolOrdering::LayerTools& layer_tools, unsig ExtrusionEntityCollection& eec = this_layer->regions[region_id]->fills; for (ExtrusionEntity* ee : eec.entities) { // iterate through all infill Collections if (volume_to_wipe <= 0.f) - break; + return 0.f; auto* fill = dynamic_cast(ee); if (fill->role() == erTopSolidInfill || fill->role() == erGapFill) // these cannot be changed - such infill is / may be visible continue; @@ -1258,12 +1258,12 @@ float Print::mark_wiping_extrusions(ToolOrdering::LayerTools& layer_tools, unsig } - if ((config.infill_first ? perimeters_done : !perimeters_done) && object->config.wipe_into_objects) + if (object->config.wipe_into_objects && (config.infill_first ? perimeters_done : !perimeters_done)) { ExtrusionEntityCollection& eec = this_layer->regions[region_id]->perimeters; for (ExtrusionEntity* ee : eec.entities) { // iterate through all perimeter Collections if (volume_to_wipe <= 0.f) - break; + return 0.f; auto* fill = dynamic_cast(ee); // What extruder would this normally be printed with? unsigned int correct_extruder = get_extruder(fill, region); From 082ed95a943554d27f0bbf8815c1db76d1208515 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Fri, 22 Jun 2018 14:17:03 +0200 Subject: [PATCH 051/198] Activate existing projects after loading AMF/3MF/Config: Initial implementation. --- xs/src/libslic3r/GCode.cpp | 5 ++-- xs/src/slic3r/GUI/Preset.cpp | 45 +++++++++++++++++++++++++++++- xs/src/slic3r/GUI/Preset.hpp | 12 ++++++++ xs/src/slic3r/GUI/PresetBundle.cpp | 30 +++++++++++--------- 4 files changed, 76 insertions(+), 16 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 479af7abe..009493113 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1415,11 +1415,12 @@ void GCode::append_full_config(const Print& print, std::string& str) for (size_t i = 0; i < sizeof(configs) / sizeof(configs[0]); ++i) { const StaticPrintConfig *cfg = configs[i]; for (const std::string &key : cfg->keys()) - { if (key != "compatible_printers") str += "; " + key + " = " + cfg->serialize(key) + "\n"; - } } + const DynamicConfig &full_config = print.placeholder_parser.config(); + for (const char *key : { "print_settings_id", "filament_settings_id", "printer_settings_id" }) + str += std::string("; ") + key + " = " + full_config.serialize(key) + "\n"; } void GCode::set_extruders(const std::vector &extruder_ids) diff --git a/xs/src/slic3r/GUI/Preset.cpp b/xs/src/slic3r/GUI/Preset.cpp index 68982185b..d9774bfc2 100644 --- a/xs/src/slic3r/GUI/Preset.cpp +++ b/xs/src/slic3r/GUI/Preset.cpp @@ -424,7 +424,50 @@ Preset& PresetCollection::load_preset(const std::string &path, const std::string { DynamicPrintConfig cfg(this->default_preset().config); cfg.apply_only(config, cfg.keys(), true); - return this->load_preset(path, name, std::move(cfg)); + return this->load_preset(path, name, std::move(cfg), select); +} + +// Load a preset from an already parsed config file, insert it into the sorted sequence of presets +// and select it, losing previous modifications. +// In case +Preset& PresetCollection::load_external_preset( + // Path to the profile source file (a G-code, an AMF or 3MF file, a config file) + const std::string &path, + // Name of the profile, derived from the source file name. + const std::string &name, + // Original name of the profile, extracted from the loaded config. Empty, if the name has not been stored. + const std::string &original_name, + // Config to initialize the preset from. + const DynamicPrintConfig &config, + // Select the preset after loading? + bool select) +{ + // Load the preset over a default preset, so that the missing fields are filled in from the default preset. + DynamicPrintConfig cfg(this->default_preset().config); + cfg.apply_only(config, cfg.keys(), true); + // Is there a preset already loaded with the name stored inside the config? + std::deque::iterator it = original_name.empty() ? m_presets.end() : this->find_preset_internal(original_name); + if (it != m_presets.end()) { + t_config_option_keys diff = it->config.diff(cfg); + //FIXME Following keys are either not updated in the preset (the *_settings_id), + // or not stored into the AMF/3MF/Config file, therefore they will most likely not match. + // Ignore these differences for now. + for (const char *key : { "compatible_printers", "compatible_printers_condition", "inherits", + "print_settings_id", "filament_settings_id", "printer_settings_id", + "printer_model", "printer_variant", "default_print_profile", "default_filament_profile" }) + diff.erase(std::remove(diff.begin(), diff.end(), key), diff.end()); + // Preset with the same name as stored inside the config exists. + if (diff.empty()) { + // The preset exists and it matches the values stored inside config. + if (select) + this->select_preset(it - m_presets.begin()); + return *it; + } + } + // The external preset does not match an internal preset, load the external preset. + Preset &preset = this->load_preset(path, name, std::move(cfg), select); + preset.is_external = true; + return preset; } Preset& PresetCollection::load_preset(const std::string &path, const std::string &name, DynamicPrintConfig &&config, bool select) diff --git a/xs/src/slic3r/GUI/Preset.hpp b/xs/src/slic3r/GUI/Preset.hpp index 31fb69aa8..ee0cdc18b 100644 --- a/xs/src/slic3r/GUI/Preset.hpp +++ b/xs/src/slic3r/GUI/Preset.hpp @@ -200,6 +200,18 @@ public: Preset& load_preset(const std::string &path, const std::string &name, const DynamicPrintConfig &config, bool select = true); Preset& load_preset(const std::string &path, const std::string &name, DynamicPrintConfig &&config, bool select = true); + Preset& load_external_preset( + // Path to the profile source file (a G-code, an AMF or 3MF file, a config file) + const std::string &path, + // Name of the profile, derived from the source file name. + const std::string &name, + // Original name of the profile, extracted from the loaded config. Empty, if the name has not been stored. + const std::string &original_name, + // Config to initialize the preset from. + const DynamicPrintConfig &config, + // Select the preset after loading? + bool select = true); + // Save the preset under a new name. If the name is different from the old one, // a new preset is stored into the list of presets. // All presets are marked as not modified and the new preset is activated. diff --git a/xs/src/slic3r/GUI/PresetBundle.cpp b/xs/src/slic3r/GUI/PresetBundle.cpp index d36ef7b6f..8f417fcfe 100644 --- a/xs/src/slic3r/GUI/PresetBundle.cpp +++ b/xs/src/slic3r/GUI/PresetBundle.cpp @@ -416,6 +416,9 @@ DynamicPrintConfig PresetBundle::full_config() const opt->value = boost::algorithm::clamp(opt->value, 0, int(num_extruders)); } + out.option("print_settings_id", true)->value = this->prints.get_selected_preset().name; + out.option("filament_settings_id", true)->values = this->filament_presets; + out.option("printer_settings_id", true)->value = this->printers.get_selected_preset().name; return out; } @@ -502,24 +505,25 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool // First load the print and printer presets. for (size_t i_group = 0; i_group < 2; ++ i_group) { PresetCollection &presets = (i_group == 0) ? this->prints : this->printers; - Preset &preset = presets.load_preset(is_external ? name_or_path : presets.path_from_name(name), name, config); - if (is_external) - preset.is_external = true; + if (is_external) + presets.load_external_preset(name_or_path, name, + config.opt_string((i_group == 0) ? "print_settings_id" : "printer_settings_id"), + config); else - preset.save(); + presets.load_preset(presets.path_from_name(name), name, config).save(); } // 3) Now load the filaments. If there are multiple filament presets, split them and load them. auto *nozzle_diameter = dynamic_cast(config.option("nozzle_diameter")); auto *filament_diameter = dynamic_cast(config.option("filament_diameter")); size_t num_extruders = std::min(nozzle_diameter->values.size(), filament_diameter->values.size()); + const ConfigOptionStrings *old_filament_profile_names = config.option("filament_settings_id", false); + assert(old_filament_profile_names != nullptr); if (num_extruders <= 1) { - Preset &preset = this->filaments.load_preset( - is_external ? name_or_path : this->filaments.path_from_name(name), name, config); if (is_external) - preset.is_external = true; + this->filaments.load_external_preset(name_or_path, name, old_filament_profile_names->values.front(), config); else - preset.save(); + this->filaments.load_preset(this->filaments.path_from_name(name), name, config).save(); this->filament_presets.clear(); this->filament_presets.emplace_back(name); } else { @@ -548,13 +552,13 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool sprintf(suffix, " (%d)", i); std::string new_name = name + suffix; // Load all filament presets, but only select the first one in the preset dialog. - Preset &preset = this->filaments.load_preset( - is_external ? name_or_path : this->filaments.path_from_name(new_name), - new_name, std::move(configs[i]), i == 0); if (is_external) - preset.is_external = true; + this->filaments.load_external_preset(name_or_path, new_name, + (i < old_filament_profile_names->values.size()) ? old_filament_profile_names->values[i] : "", + std::move(configs[i]), i == 0); else - preset.save(); + this->filaments.load_preset(this->filaments.path_from_name(new_name), + new_name, std::move(configs[i]), i == 0).save(); this->filament_presets.emplace_back(new_name); } } From de540de9aa321989eff17953d6e5ae84595f1526 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Fri, 22 Jun 2018 15:11:04 +0200 Subject: [PATCH 052/198] 5th Attempt to fix texture rendering on OpenGL 1.1 cards --- xs/src/slic3r/GUI/GLCanvas3D.cpp | 3 ++- xs/src/slic3r/GUI/GLGizmo.cpp | 2 +- xs/src/slic3r/GUI/GLGizmo.hpp | 2 +- xs/src/slic3r/GUI/GLTexture.cpp | 28 +++++++++++++++++++++++----- 4 files changed, 27 insertions(+), 8 deletions(-) diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index 7dadfba03..40da7551e 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -1417,7 +1417,7 @@ void GLCanvas3D::Gizmos::_render_overlay(const GLCanvas3D& canvas) const for (GizmosMap::const_iterator it = m_gizmos.begin(); it != m_gizmos.end(); ++it) { float tex_size = (float)it->second->get_textures_size() * OverlayTexturesScale * inv_zoom; - GLTexture::render_texture(it->second->get_textures_id(), top_x, top_x + tex_size, top_y - tex_size, top_y); + GLTexture::render_texture(it->second->get_texture_id(), top_x, top_x + tex_size, top_y - tex_size, top_y); top_y -= (tex_size + scaled_gap_y); } } @@ -3592,6 +3592,7 @@ void GLCanvas3D::_render_legend_texture() const float t = (0.5f * (float)cnv_size.get_height()) * inv_zoom; float r = l + (float)w * inv_zoom; float b = t - (float)h * inv_zoom; + GLTexture::render_texture(tex_id, l, r, b, t); ::glPopMatrix(); diff --git a/xs/src/slic3r/GUI/GLGizmo.cpp b/xs/src/slic3r/GUI/GLGizmo.cpp index 4a76b287b..391a22f97 100644 --- a/xs/src/slic3r/GUI/GLGizmo.cpp +++ b/xs/src/slic3r/GUI/GLGizmo.cpp @@ -92,7 +92,7 @@ void GLGizmoBase::set_state(GLGizmoBase::EState state) m_state = state; } -unsigned int GLGizmoBase::get_textures_id() const +unsigned int GLGizmoBase::get_texture_id() const { return m_textures[m_state].get_id(); } diff --git a/xs/src/slic3r/GUI/GLGizmo.hpp b/xs/src/slic3r/GUI/GLGizmo.hpp index d8a5517c1..5e6eb79c7 100644 --- a/xs/src/slic3r/GUI/GLGizmo.hpp +++ b/xs/src/slic3r/GUI/GLGizmo.hpp @@ -57,7 +57,7 @@ public: EState get_state() const; void set_state(EState state); - unsigned int get_textures_id() const; + unsigned int get_texture_id() const; int get_textures_size() const; int get_hover_id() const; diff --git a/xs/src/slic3r/GUI/GLTexture.cpp b/xs/src/slic3r/GUI/GLTexture.cpp index 88d949c7b..a1211ff87 100644 --- a/xs/src/slic3r/GUI/GLTexture.cpp +++ b/xs/src/slic3r/GUI/GLTexture.cpp @@ -72,7 +72,6 @@ bool GLTexture::load_from_file(const std::string& filename, bool generate_mipmap } // sends data to gpu - ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); ::glGenTextures(1, &m_id); ::glBindTexture(GL_TEXTURE_2D, m_id); @@ -131,16 +130,35 @@ void GLTexture::render_texture(unsigned int tex_id, float left, float right, flo { ::glEnable(GL_BLEND); ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + ::glEnable(GL_TEXTURE_2D); ::glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); ::glBindTexture(GL_TEXTURE_2D, (GLuint)tex_id); +//############################################################################################################################### + ::glBegin(GL_TRIANGLES); + ::glTexCoord2f(0.0f, 1.0f); ::glVertex2f(left, bottom); + ::glTexCoord2f(1.0f, 1.0f); ::glVertex2f(right, bottom); + ::glTexCoord2f(1.0f, 0.0f); ::glVertex2f(right, top); + + ::glTexCoord2f(1.0f, 0.0f); ::glVertex2f(right, top); + ::glTexCoord2f(0.0f, 0.0f); ::glVertex2f(left, top); + ::glTexCoord2f(0.0f, 1.0f); ::glVertex2f(left, bottom); + +/* ::glBegin(GL_QUADS); - ::glTexCoord2f(0.0f, 1.0f); ::glVertex3f(left, bottom, 0.0f); - ::glTexCoord2f(1.0f, 1.0f); ::glVertex3f(right, bottom, 0.0f); - ::glTexCoord2f(1.0f, 0.0f); ::glVertex3f(right, top, 0.0f); - ::glTexCoord2f(0.0f, 0.0f); ::glVertex3f(left, top, 0.0f); + ::glTexCoord2f(0.0f, 1.0f); ::glVertex2f(left, bottom); + ::glTexCoord2f(1.0f, 1.0f); ::glVertex2f(right, bottom); + ::glTexCoord2f(1.0f, 0.0f); ::glVertex2f(right, top); + ::glTexCoord2f(0.0f, 0.0f); ::glVertex2f(left, top); +*/ + +// ::glTexCoord2f(0.0f, 1.0f); ::glVertex3f(left, bottom, 0.0f); +// ::glTexCoord2f(1.0f, 1.0f); ::glVertex3f(right, bottom, 0.0f); +// ::glTexCoord2f(1.0f, 0.0f); ::glVertex3f(right, top, 0.0f); +// ::glTexCoord2f(0.0f, 0.0f); ::glVertex3f(left, top, 0.0f); +//############################################################################################################################### ::glEnd(); ::glBindTexture(GL_TEXTURE_2D, 0); From c948ca647cea5a4e41a1ac017f3244da1a8ec6de Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Fri, 22 Jun 2018 16:11:00 +0200 Subject: [PATCH 053/198] Code cleanup --- lib/Slic3r/GUI/Plater.pm | 5 ----- xs/src/slic3r/GUI/GLCanvas3D.cpp | 6 +++++- xs/src/slic3r/GUI/GLTexture.cpp | 18 ------------------ 3 files changed, 5 insertions(+), 24 deletions(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 3928aeaf2..76198da1e 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -142,7 +142,6 @@ sub new { $self->rotate(rad2deg($angle_z), Z, 'absolute'); }; -#=================================================================================================================================================== # callback to update object's geometry info while using gizmos my $on_update_geometry_info = sub { my ($size_x, $size_y, $size_z, $scale_factor) = @_; @@ -157,8 +156,6 @@ sub new { } } }; -#=================================================================================================================================================== - # Initialize 3D plater if ($Slic3r::GUI::have_OpenGL) { @@ -178,9 +175,7 @@ sub new { Slic3r::GUI::_3DScene::register_on_enable_action_buttons_callback($self->{canvas3D}, $enable_action_buttons); Slic3r::GUI::_3DScene::register_on_gizmo_scale_uniformly_callback($self->{canvas3D}, $on_gizmo_scale_uniformly); Slic3r::GUI::_3DScene::register_on_gizmo_rotate_callback($self->{canvas3D}, $on_gizmo_rotate); -#=================================================================================================================================================== Slic3r::GUI::_3DScene::register_on_update_geometry_info_callback($self->{canvas3D}, $on_update_geometry_info); -#=================================================================================================================================================== Slic3r::GUI::_3DScene::enable_gizmos($self->{canvas3D}, 1); Slic3r::GUI::_3DScene::enable_shader($self->{canvas3D}, 1); Slic3r::GUI::_3DScene::enable_force_zoom_to_bed($self->{canvas3D}, 1); diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index 40da7551e..c92caafba 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -1901,6 +1901,10 @@ void GLCanvas3D::update_gizmos_data() m_gizmos.set_angle_z(model_instance->rotation); break; } + default: + { + break; + } } } } @@ -3813,7 +3817,7 @@ int GLCanvas3D::_get_first_selected_volume_id() const { int object_id = vol->select_group_id / 1000000; // Objects with object_id >= 1000 have a specific meaning, for example the wipe tower proxy. - if (object_id < 10000) + if ((object_id < 10000) && (object_id < objects_count)) { int volume_id = 0; for (int i = 0; i < object_id; ++i) diff --git a/xs/src/slic3r/GUI/GLTexture.cpp b/xs/src/slic3r/GUI/GLTexture.cpp index a1211ff87..2af555707 100644 --- a/xs/src/slic3r/GUI/GLTexture.cpp +++ b/xs/src/slic3r/GUI/GLTexture.cpp @@ -136,29 +136,11 @@ void GLTexture::render_texture(unsigned int tex_id, float left, float right, flo ::glBindTexture(GL_TEXTURE_2D, (GLuint)tex_id); -//############################################################################################################################### - ::glBegin(GL_TRIANGLES); - ::glTexCoord2f(0.0f, 1.0f); ::glVertex2f(left, bottom); - ::glTexCoord2f(1.0f, 1.0f); ::glVertex2f(right, bottom); - ::glTexCoord2f(1.0f, 0.0f); ::glVertex2f(right, top); - - ::glTexCoord2f(1.0f, 0.0f); ::glVertex2f(right, top); - ::glTexCoord2f(0.0f, 0.0f); ::glVertex2f(left, top); - ::glTexCoord2f(0.0f, 1.0f); ::glVertex2f(left, bottom); - -/* ::glBegin(GL_QUADS); ::glTexCoord2f(0.0f, 1.0f); ::glVertex2f(left, bottom); ::glTexCoord2f(1.0f, 1.0f); ::glVertex2f(right, bottom); ::glTexCoord2f(1.0f, 0.0f); ::glVertex2f(right, top); ::glTexCoord2f(0.0f, 0.0f); ::glVertex2f(left, top); -*/ - -// ::glTexCoord2f(0.0f, 1.0f); ::glVertex3f(left, bottom, 0.0f); -// ::glTexCoord2f(1.0f, 1.0f); ::glVertex3f(right, bottom, 0.0f); -// ::glTexCoord2f(1.0f, 0.0f); ::glVertex3f(right, top, 0.0f); -// ::glTexCoord2f(0.0f, 0.0f); ::glVertex3f(left, top, 0.0f); -//############################################################################################################################### ::glEnd(); ::glBindTexture(GL_TEXTURE_2D, 0); From 54c90ee9488be6cac3df4d9fb6231fbd828a7059 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Fri, 22 Jun 2018 16:13:34 +0200 Subject: [PATCH 054/198] Updated PrintConfig default values for machine limits + fixed incorrect default value setting for the TextCtrl --- xs/src/libslic3r/PrintConfig.cpp | 28 ++++++++++++++-------------- xs/src/slic3r/GUI/Field.cpp | 32 +++++++++++++++++++++++--------- xs/src/slic3r/GUI/Field.hpp | 1 + xs/src/slic3r/GUI/Tab.cpp | 4 ++-- xs/src/slic3r/GUI/Tab.hpp | 2 +- 5 files changed, 41 insertions(+), 26 deletions(-) diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 68fc2da24..a59a835f4 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -861,7 +861,7 @@ PrintConfigDef::PrintConfigDef() def->tooltip = L("Set silent mode for the G-code flavor"); def->default_value = new ConfigOptionBool(true); - const int machine_linits_opt_width = 70; + const int machine_limits_opt_width = 70; { struct AxisDefault { std::string name; @@ -871,10 +871,10 @@ PrintConfigDef::PrintConfigDef() }; std::vector axes { // name, max_feedrate, max_acceleration, max_jerk - { "x", { 200., 200. }, { 1000., 1000. }, { 10., 10. } }, - { "y", { 200., 200. }, { 1000., 1000. }, { 10., 10. } }, - { "z", { 12., 12. }, { 200., 200. }, { 0.4, 0.4 } }, - { "e", { 120., 120. }, { 5000., 5000. }, { 2.5, 2.5 } } + { "x", { 500., 200. }, { 9000., 1000. }, { 10., 10. } }, + { "y", { 500., 200. }, { 9000., 1000. }, { 10., 10. } }, + { "z", { 12., 12. }, { 500., 200. }, { 0.2, 0.4 } }, + { "e", { 120., 120. }, { 10000., 5000. }, { 2.5, 2.5 } } }; for (const AxisDefault &axis : axes) { std::string axis_upper = boost::to_upper_copy(axis.name); @@ -885,7 +885,7 @@ PrintConfigDef::PrintConfigDef() def->tooltip = (boost::format(L("Maximum feedrate of the %1% axis")) % axis_upper).str(); def->sidetext = L("mm/s"); def->min = 0; - def->width = machine_linits_opt_width; + def->width = machine_limits_opt_width; def->default_value = new ConfigOptionFloats(axis.max_feedrate); // Add the machine acceleration limits for XYZE axes (M201) def = this->add("machine_max_acceleration_" + axis.name, coFloats); @@ -894,7 +894,7 @@ PrintConfigDef::PrintConfigDef() def->tooltip = (boost::format(L("Maximum acceleration of the %1% axis")) % axis_upper).str(); def->sidetext = L("mm/s²"); def->min = 0; - def->width = machine_linits_opt_width; + def->width = machine_limits_opt_width; def->default_value = new ConfigOptionFloats(axis.max_acceleration); // Add the machine jerk limits for XYZE axes (M205) def = this->add("machine_max_jerk_" + axis.name, coFloats); @@ -903,7 +903,7 @@ PrintConfigDef::PrintConfigDef() def->tooltip = (boost::format(L("Maximum jerk of the %1% axis")) % axis_upper).str(); def->sidetext = L("mm/s"); def->min = 0; - def->width = machine_linits_opt_width; + def->width = machine_limits_opt_width; def->default_value = new ConfigOptionFloats(axis.max_jerk); } } @@ -915,7 +915,7 @@ PrintConfigDef::PrintConfigDef() def->tooltip = L("Minimum feedrate when extruding") + " (M205 S)"; def->sidetext = L("mm/s"); def->min = 0; - def->width = machine_linits_opt_width; + def->width = machine_limits_opt_width; def->default_value = new ConfigOptionFloats{ 0., 0. }; // M205 T... [mm/sec] @@ -925,7 +925,7 @@ PrintConfigDef::PrintConfigDef() def->tooltip = L("Minimum travel feedrate") + " (M205 T)"; def->sidetext = L("mm/s"); def->min = 0; - def->width = machine_linits_opt_width; + def->width = machine_limits_opt_width; def->default_value = new ConfigOptionFloats{ 0., 0. }; // M204 S... [mm/sec^2] @@ -935,8 +935,8 @@ PrintConfigDef::PrintConfigDef() def->tooltip = L("Maximum acceleration when extruding") + " (M204 S)"; def->sidetext = L("mm/s²"); def->min = 0; - def->width = machine_linits_opt_width; - def->default_value = new ConfigOptionFloats(1250., 1250.); + def->width = machine_limits_opt_width; + def->default_value = new ConfigOptionFloats(1500., 1250.); // M204 T... [mm/sec^2] def = this->add("machine_max_acceleration_retracting", coFloats); @@ -945,8 +945,8 @@ PrintConfigDef::PrintConfigDef() def->tooltip = L("Maximum acceleration when retracting") + " (M204 T)"; def->sidetext = L("mm/s²"); def->min = 0; - def->width = machine_linits_opt_width; - def->default_value = new ConfigOptionFloats(1250., 1250.); + def->width = machine_limits_opt_width; + def->default_value = new ConfigOptionFloats(1500., 1250.); def = this->add("max_fan_speed", coInts); def->label = L("Max"); diff --git a/xs/src/slic3r/GUI/Field.cpp b/xs/src/slic3r/GUI/Field.cpp index ba59225f6..57420a411 100644 --- a/xs/src/slic3r/GUI/Field.cpp +++ b/xs/src/slic3r/GUI/Field.cpp @@ -35,6 +35,22 @@ namespace Slic3r { namespace GUI { set_undo_bitmap(&bmp); set_undo_to_sys_bitmap(&bmp); + switch (m_opt.type) + { + case coPercents: + case coFloats: + case coStrings: + case coBools: + case coInts: { + auto tag_pos = m_opt_id.find("#"); + if (tag_pos != std::string::npos) + m_opt_idx = stoi(m_opt_id.substr(tag_pos + 1, m_opt_id.size())); + break; + } + default: + break; + } + BUILD(); } @@ -151,10 +167,10 @@ namespace Slic3r { namespace GUI { case coFloat: { double val = m_opt.type == coFloats ? - static_cast(m_opt.default_value)->get_at(0) : + static_cast(m_opt.default_value)->get_at(m_opt_idx) : m_opt.type == coFloat ? m_opt.default_value->getFloat() : - static_cast(m_opt.default_value)->get_at(0); + static_cast(m_opt.default_value)->get_at(m_opt_idx); text_value = double_to_string(val); break; } @@ -164,10 +180,8 @@ namespace Slic3r { namespace GUI { case coStrings: { const ConfigOptionStrings *vec = static_cast(m_opt.default_value); - if (vec == nullptr || vec->empty()) break; - if (vec->size() > 1) - break; - text_value = vec->values.at(0); + if (vec == nullptr || vec->empty()) break; //for the case of empty default value + text_value = vec->get_at(m_opt_idx); break; } default: @@ -249,7 +263,7 @@ void CheckBox::BUILD() { bool check_value = m_opt.type == coBool ? m_opt.default_value->getBool() : m_opt.type == coBools ? - static_cast(m_opt.default_value)->values.at(0) : + static_cast(m_opt.default_value)->get_at(m_opt_idx) : false; auto temp = new wxCheckBox(m_parent, wxID_ANY, wxString(""), wxDefaultPosition, size); @@ -408,7 +422,7 @@ void Choice::set_selection() break; } case coStrings:{ - text_value = static_cast(m_opt.default_value)->values.at(0); + text_value = static_cast(m_opt.default_value)->get_at(m_opt_idx); size_t idx = 0; for (auto el : m_opt.enum_values) @@ -572,7 +586,7 @@ void ColourPicker::BUILD() if (m_opt.height >= 0) size.SetHeight(m_opt.height); if (m_opt.width >= 0) size.SetWidth(m_opt.width); - wxString clr(static_cast(m_opt.default_value)->values.at(0)); + wxString clr(static_cast(m_opt.default_value)->get_at(m_opt_idx)); auto temp = new wxColourPickerCtrl(m_parent, wxID_ANY, clr, wxDefaultPosition, size); // // recast as a wxWindow to fit the calling convention diff --git a/xs/src/slic3r/GUI/Field.hpp b/xs/src/slic3r/GUI/Field.hpp index fb6116b79..db8d2a408 100644 --- a/xs/src/slic3r/GUI/Field.hpp +++ b/xs/src/slic3r/GUI/Field.hpp @@ -95,6 +95,7 @@ public: /// Copy of ConfigOption for deduction purposes const ConfigOptionDef m_opt {ConfigOptionDef()}; const t_config_option_key m_opt_id;//! {""}; + int m_opt_idx = 0; /// Sets a value for this control. /// subclasses should overload with a specific version diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 170388434..4935d8dcd 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -1734,7 +1734,7 @@ void TabPrinter::append_option_line(ConfigOptionsGroupShp optgroup, const std::s optgroup->append_line(line); } -PageShp TabPrinter::create_kinematics_page() +PageShp TabPrinter::build_kinematics_page() { auto page = add_options_page(_(L("Machine limits")), "cog.png", true); @@ -1806,7 +1806,7 @@ void TabPrinter::build_extruder_pages() } if (existed_page < n_before_extruders && is_marlin_flavor){ - auto page = create_kinematics_page(); + auto page = build_kinematics_page(); m_pages.insert(m_pages.begin() + n_before_extruders, page); } diff --git a/xs/src/slic3r/GUI/Tab.hpp b/xs/src/slic3r/GUI/Tab.hpp index 90bb40b9e..4906b8d1e 100644 --- a/xs/src/slic3r/GUI/Tab.hpp +++ b/xs/src/slic3r/GUI/Tab.hpp @@ -333,7 +333,7 @@ public: void update() override; void update_serial_ports(); void extruders_count_changed(size_t extruders_count); - PageShp create_kinematics_page(); + PageShp build_kinematics_page(); void build_extruder_pages(); void on_preset_loaded() override; void init_options_list() override; From f9b85b67009ae7b7e65154e9e0485847110b4858 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Mon, 25 Jun 2018 16:03:43 +0200 Subject: [PATCH 055/198] Correct updating of "Machine limits" and "Single extruder MM setup" pages --- xs/src/slic3r/GUI/Tab.cpp | 11 ++++++++--- xs/src/slic3r/GUI/Tab.hpp | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 4935d8dcd..cf1b84639 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -1634,7 +1634,7 @@ void TabPrinter::build() if (opt_key.compare("silent_mode") == 0) { bool val = boost::any_cast(value); if (m_use_silent_mode != val) { - m_rebuil_kinematics_page = true; + m_rebuild_kinematics_page = true; m_use_silent_mode = val; } } @@ -1798,7 +1798,7 @@ void TabPrinter::build_extruder_pages() size_t existed_page = 0; for (int i = n_before_extruders; i < m_pages.size(); ++i) // first make sure it's not there already if (m_pages[i]->title().find(_(L("Machine limits"))) != std::string::npos) { - if (!is_marlin_flavor || m_rebuil_kinematics_page) + if (!is_marlin_flavor || m_rebuild_kinematics_page) m_pages.erase(m_pages.begin() + i); else existed_page = i; @@ -1922,6 +1922,10 @@ void TabPrinter::update(){ bool is_marlin_flavor = m_config->option>("gcode_flavor")->value == gcfMarlin; get_field("silent_mode")->toggle(is_marlin_flavor); + if (m_use_silent_mode != m_config->opt_bool("silent_mode")) { + m_rebuild_kinematics_page = true; + m_use_silent_mode = m_config->opt_bool("silent_mode"); + } for (size_t i = 0; i < m_extruders_count; ++i) { bool have_retract_length = m_config->opt_float("retract_length", i) > 0; @@ -2039,7 +2043,8 @@ void Tab::rebuild_page_tree() auto itemId = m_treectrl->AppendItem(rootItem, p->title(), p->iconID()); m_treectrl->SetItemTextColour(itemId, p->get_item_colour()); if (p->title() == selected) { - m_disable_tree_sel_changed_event = 1; + if (!(p->title() == _(L("Machine limits")) || p->title() == _(L("Single extruder MM setup")))) // These Pages have to be updated inside OnTreeSelChange + m_disable_tree_sel_changed_event = 1; m_treectrl->SelectItem(itemId); m_disable_tree_sel_changed_event = 0; have_selection = 1; diff --git a/xs/src/slic3r/GUI/Tab.hpp b/xs/src/slic3r/GUI/Tab.hpp index 4906b8d1e..9045a5182 100644 --- a/xs/src/slic3r/GUI/Tab.hpp +++ b/xs/src/slic3r/GUI/Tab.hpp @@ -315,7 +315,7 @@ class TabPrinter : public Tab bool m_has_single_extruder_MM_page = false; bool m_use_silent_mode = false; void append_option_line(ConfigOptionsGroupShp optgroup, const std::string opt_key); - bool m_rebuil_kinematics_page = false; + bool m_rebuild_kinematics_page = false; public: wxButton* m_serial_test_btn; wxButton* m_octoprint_host_test_btn; From 2fae893af2fd6e6f3e0bcc1d629dc19ee7d108a5 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Tue, 26 Jun 2018 10:37:36 +0200 Subject: [PATCH 056/198] Fixed #998 Added detection of gtk2/gtk3 GUI libraries required by Alien::wxWidgets. Added gtk2/gtk3 include paths, so we may call gtk2/3 API directly if needed for some workaround. --- cmake/modules/FindAlienWx.cmake | 3 +++ xs/CMakeLists.txt | 10 ++++++++++ xs/src/slic3r/GUI/OptionsGroup.cpp | 9 ++++++++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/cmake/modules/FindAlienWx.cmake b/cmake/modules/FindAlienWx.cmake index a96c29195..65221172b 100644 --- a/cmake/modules/FindAlienWx.cmake +++ b/cmake/modules/FindAlienWx.cmake @@ -49,6 +49,7 @@ my \$defines = ' ' . Alien::wxWidgets->defines; my \$cflags = Alien::wxWidgets->c_flags; my \$linkflags = Alien::wxWidgets->link_flags; my \$libraries = ' ' . Alien::wxWidgets->libraries(@components); +my \$gui_toolkit = Alien::wxWidgets->config->{toolkit}; #my @libraries = Alien::wxWidgets->link_libraries(@components); #my @implib = Alien::wxWidgets->import_libraries(@components); #my @shrlib = Alien::wxWidgets->shared_libraries(@components); @@ -82,6 +83,7 @@ cmake_set_var('LIBRARIES', \$libraries); cmake_set_var('DEFINITIONS', \$defines); #cmake_set_var('DEFINITIONS_DEBUG', ); cmake_set_var('CXX_FLAGS', \$cflags); +cmake_set_var('GUI_TOOLKIT', \$gui_toolkit); close \$fh; ") include(${AlienWx_TEMP_INCLUDE}) @@ -96,6 +98,7 @@ if (AlienWx_DEBUG) message(STATUS " AlienWx_DEFINITIONS = ${AlienWx_DEFINITIONS}") message(STATUS " AlienWx_DEFINITIONS_DEBUG = ${AlienWx_DEFINITIONS_DEBUG}") message(STATUS " AlienWx_CXX_FLAGS = ${AlienWx_CXX_FLAGS}") + message(STATUS " AlienWx_GUI_TOOLKIT = ${AlienWx_GUI_TOOLKIT}") endif() include(FindPackageHandleStandardArgs) diff --git a/xs/CMakeLists.txt b/xs/CMakeLists.txt index 66c1cdd6a..f4d0b17ea 100644 --- a/xs/CMakeLists.txt +++ b/xs/CMakeLists.txt @@ -8,6 +8,7 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules/) if (CMAKE_SYSTEM_NAME STREQUAL "Linux") # Workaround for an old CMake, which does not understand CMAKE_CXX_STANDARD. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall" ) + find_package(PkgConfig REQUIRED) endif() if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUXX) @@ -579,6 +580,15 @@ if (SLIC3R_PRUSACONTROL) #add_compile_options(${AlienWx_CXX_FLAGS}) add_definitions(${AlienWx_DEFINITIONS}) set(wxWidgets_LIBRARIES ${AlienWx_LIBRARIES}) + # On Linux / gtk, we need to have a direct access to gtk+ for some workarounds. + if (AlienWx_GUI_TOOLKIT STREQUAL "gtk2") + pkg_check_modules(GTK2 gtk+-2.0) + include_directories(${GTK2_INCLUDE_DIRS}) + endif() + if (AlienWx_GUI_TOOLKIT STREQUAL "gtk3") + pkg_check_modules(GTK3 gtk+-3.0) + include_directories(${GTK3_INCLUDE_DIRS}) + endif() else () find_package(wxWidgets REQUIRED COMPONENTS base core adv html gl) include(${wxWidgets_USE_FILE}) diff --git a/xs/src/slic3r/GUI/OptionsGroup.cpp b/xs/src/slic3r/GUI/OptionsGroup.cpp index 57659d03d..629a9f3a0 100644 --- a/xs/src/slic3r/GUI/OptionsGroup.cpp +++ b/xs/src/slic3r/GUI/OptionsGroup.cpp @@ -150,8 +150,15 @@ void OptionsGroup::append_line(const Line& line, wxStaticText** colored_Label/* // Build a label if we have it wxStaticText* label=nullptr; if (label_width != 0) { + long label_style = staticbox ? 0 : wxALIGN_RIGHT; +#ifdef __WXGTK__ + // workaround for correct text align of the StaticBox on Linux + // flags wxALIGN_RIGHT and wxALIGN_CENTRE don't work when Ellipsize flags are _not_ given. + // Text is properly aligned only when Ellipsize is checked. + label_style |= staticbox ? 0 : wxST_ELLIPSIZE_END; +#endif /* __WXGTK__ */ label = new wxStaticText(parent(), wxID_ANY, line.label + (line.label.IsEmpty() ? "" : ":"), - wxDefaultPosition, wxSize(label_width, -1), staticbox ? 0 : wxALIGN_RIGHT); + wxDefaultPosition, wxSize(label_width, -1), label_style); label->SetFont(label_font); label->Wrap(label_width); // avoid a Linux/GTK bug grid_sizer->Add(label, 0, (staticbox ? 0 : wxALIGN_RIGHT | wxRIGHT) | wxALIGN_CENTER_VERTICAL, 5); From 1175dc95f688a8b17e75a7cdf5ef1b472905bede Mon Sep 17 00:00:00 2001 From: bubnikv Date: Tue, 26 Jun 2018 10:50:50 +0200 Subject: [PATCH 057/198] Storing and recovering the "compatible_printers_condition" and "inherits" fields from / to the AMF/3MF/Config files. The "compatible_printers_condition" are collected over all active profiles (one print, possibly multiple filament, and one printer profile) into a single vector. --- xs/src/libslic3r/Config.cpp | 5 +- xs/src/libslic3r/GCode.cpp | 5 +- xs/src/libslic3r/PrintConfig.cpp | 14 ++-- xs/src/slic3r/GUI/Preset.cpp | 32 ++++----- xs/src/slic3r/GUI/PresetBundle.cpp | 105 ++++++++++++++++++++++++----- xs/src/slic3r/GUI/Tab.cpp | 8 +-- 6 files changed, 128 insertions(+), 41 deletions(-) diff --git a/xs/src/libslic3r/Config.cpp b/xs/src/libslic3r/Config.cpp index 8c1349e08..4218fbcf9 100644 --- a/xs/src/libslic3r/Config.cpp +++ b/xs/src/libslic3r/Config.cpp @@ -188,7 +188,10 @@ void ConfigBase::apply_only(const ConfigBase &other, const t_config_option_keys throw UnknownOptionException(opt_key); } const ConfigOption *other_opt = other.option(opt_key); - if (other_opt != nullptr) + if (other_opt == nullptr) { + // The key was not found in the source config, therefore it will not be initialized! +// printf("Not found, therefore not initialized: %s\n", opt_key.c_str()); + } else my_opt->set(other_opt); } } diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 009493113..16f8ac736 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1419,7 +1419,10 @@ void GCode::append_full_config(const Print& print, std::string& str) str += "; " + key + " = " + cfg->serialize(key) + "\n"; } const DynamicConfig &full_config = print.placeholder_parser.config(); - for (const char *key : { "print_settings_id", "filament_settings_id", "printer_settings_id" }) + for (const char *key : { + "print_settings_id", "filament_settings_id", "printer_settings_id", + "printer_model", "printer_variant", "default_print_profile", "default_filament_profile", + "compatible_printers_condition", "inherits" }) str += std::string("; ") + key + " = " + full_config.serialize(key) + "\n"; } diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 486e6fe18..02961493e 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -147,12 +147,15 @@ PrintConfigDef::PrintConfigDef() def->label = L("Compatible printers"); def->default_value = new ConfigOptionStrings(); - def = this->add("compatible_printers_condition", coString); + // The following value is defined as a vector of strings, so it could + // collect the "inherits" values over the print and filaments profiles + // when storing into a project file (AMF, 3MF, Config ...) + def = this->add("compatible_printers_condition", coStrings); def->label = L("Compatible printers condition"); def->tooltip = L("A boolean expression using the configuration values of an active printer profile. " "If this expression evaluates to true, this profile is considered compatible " "with the active printer profile."); - def->default_value = new ConfigOptionString(); + def->default_value = new ConfigOptionStrings { "" }; def = this->add("complete_objects", coBool); def->label = L("Complete individual objects"); @@ -819,12 +822,15 @@ PrintConfigDef::PrintConfigDef() def->min = 0; def->default_value = new ConfigOptionFloat(80); - def = this->add("inherits", coString); + // The following value is defined as a vector of strings, so it could + // collect the "inherits" values over the print and filaments profiles + // when storing into a project file (AMF, 3MF, Config ...) + def = this->add("inherits", coStrings); def->label = L("Inherits profile"); def->tooltip = L("Name of the profile, from which this profile inherits."); def->full_width = true; def->height = 50; - def->default_value = new ConfigOptionString(""); + def->default_value = new ConfigOptionStrings { "" }; def = this->add("interface_shells", coBool); def->label = L("Interface shells"); diff --git a/xs/src/slic3r/GUI/Preset.cpp b/xs/src/slic3r/GUI/Preset.cpp index d9774bfc2..120e1c9a7 100644 --- a/xs/src/slic3r/GUI/Preset.cpp +++ b/xs/src/slic3r/GUI/Preset.cpp @@ -180,7 +180,7 @@ void Preset::normalize(DynamicPrintConfig &config) size_t n = (nozzle_diameter == nullptr) ? 1 : nozzle_diameter->values.size(); const auto &defaults = FullPrintConfig::defaults(); for (const std::string &key : Preset::filament_options()) { - if (key == "compatible_printers") + if (key == "compatible_printers" || key == "compatible_printers_condition" || key == "inherits") continue; auto *opt = config.option(key, false); assert(opt != nullptr); @@ -234,12 +234,12 @@ std::string Preset::label() const bool Preset::is_compatible_with_printer(const Preset &active_printer, const DynamicPrintConfig *extra_config) const { - auto *condition = dynamic_cast(this->config.option("compatible_printers_condition")); + auto *condition = dynamic_cast(this->config.option("compatible_printers_condition")); auto *compatible_printers = dynamic_cast(this->config.option("compatible_printers")); bool has_compatible_printers = compatible_printers != nullptr && ! compatible_printers->values.empty(); - if (! has_compatible_printers && condition != nullptr && ! condition->value.empty()) { + if (! has_compatible_printers && condition != nullptr && ! condition->values.empty() && ! condition->values.front().empty()) { try { - return PlaceholderParser::evaluate_boolean_expression(condition->value, active_printer.config, extra_config); + return PlaceholderParser::evaluate_boolean_expression(condition->values.front(), active_printer.config, extra_config); } catch (const std::runtime_error &err) { //FIXME in case of an error, return "compatible with everything". printf("Preset::is_compatible_with_printer - parsing error of compatible_printers_condition %s:\n%s\n", active_printer.name.c_str(), err.what()); @@ -449,9 +449,8 @@ Preset& PresetCollection::load_external_preset( std::deque::iterator it = original_name.empty() ? m_presets.end() : this->find_preset_internal(original_name); if (it != m_presets.end()) { t_config_option_keys diff = it->config.diff(cfg); - //FIXME Following keys are either not updated in the preset (the *_settings_id), - // or not stored into the AMF/3MF/Config file, therefore they will most likely not match. - // Ignore these differences for now. + // Following keys are used by the UI, not by the slicing core, therefore they are not important + // when comparing profiles for equality. Ignore them. for (const char *key : { "compatible_printers", "compatible_printers_condition", "inherits", "print_settings_id", "filament_settings_id", "printer_settings_id", "printer_model", "printer_variant", "default_print_profile", "default_filament_profile" }) @@ -503,7 +502,10 @@ void PresetCollection::save_current_preset(const std::string &new_name) } else { // Creating a new preset. Preset &preset = *m_presets.insert(it, m_edited_preset); - std::string &inherits = preset.config.opt_string("inherits", true); + ConfigOptionStrings *opt_inherits = preset.config.option("inherits", true); + if (opt_inherits->values.empty()) + opt_inherits->values.emplace_back(std::string()); + std::string &inherits = opt_inherits->values.front(); std::string old_name = preset.name; preset.name = new_name; preset.file = this->path_from_name(new_name); @@ -556,20 +558,20 @@ bool PresetCollection::load_bitmap_default(const std::string &file_name) const Preset* PresetCollection::get_selected_preset_parent() const { - auto *inherits = dynamic_cast(this->get_edited_preset().config.option("inherits")); - if (inherits == nullptr || inherits->value.empty()) - return this->get_selected_preset().is_system ? &this->get_selected_preset() : nullptr; // nullptr; - const Preset* preset = this->find_preset(inherits->value, false); + auto *inherits = dynamic_cast(this->get_edited_preset().config.option("inherits")); + if (inherits == nullptr || inherits->values.empty() || inherits->values.front().empty()) + return this->get_selected_preset().is_system ? &this->get_selected_preset() : nullptr; + const Preset* preset = this->find_preset(inherits->values.front(), false); return (preset == nullptr || preset->is_default || preset->is_external) ? nullptr : preset; } const Preset* PresetCollection::get_preset_parent(const Preset& child) const { - auto *inherits = dynamic_cast(child.config.option("inherits")); - if (inherits == nullptr || inherits->value.empty()) + auto *inherits = dynamic_cast(child.config.option("inherits")); + if (inherits == nullptr || inherits->values.empty() || inherits->values.front().empty()) // return this->get_selected_preset().is_system ? &this->get_selected_preset() : nullptr; return nullptr; - const Preset* preset = this->find_preset(inherits->value, false); + const Preset* preset = this->find_preset(inherits->values.front(), false); return (preset == nullptr/* || preset->is_default */|| preset->is_external) ? nullptr : preset; } diff --git a/xs/src/slic3r/GUI/PresetBundle.cpp b/xs/src/slic3r/GUI/PresetBundle.cpp index 8f417fcfe..147975f16 100644 --- a/xs/src/slic3r/GUI/PresetBundle.cpp +++ b/xs/src/slic3r/GUI/PresetBundle.cpp @@ -52,26 +52,40 @@ PresetBundle::PresetBundle() : if (wxImage::FindHandler(wxBITMAP_TYPE_PNG) == nullptr) wxImage::AddHandler(new wxPNGHandler); - // Create the ID config keys, as they are not part of the Static print config classes. - this->prints.default_preset().config.opt_string("print_settings_id", true); - this->filaments.default_preset().config.option("filament_settings_id", true)->values.assign(1, std::string()); - this->printers.default_preset().config.opt_string("printer_settings_id", true); - // "compatible printers" are not mandatory yet. + // The following keys are handled by the UI, they do not have a counterpart in any StaticPrintConfig derived classes, + // therefore they need to be handled differently. As they have no counterpart in StaticPrintConfig, they are not being + // initialized based on PrintConfigDef(), but to empty values (zeros, empty vectors, empty strings). + // + // "compatible_printers", "compatible_printers_condition", "inherits", + // "print_settings_id", "filament_settings_id", "printer_settings_id", + // "printer_vendor", "printer_model", "printer_variant", "default_print_profile", "default_filament_profile" + // //FIXME Rename "compatible_printers" and "compatible_printers_condition", as they are defined in both print and filament profiles, // therefore they are clashing when generating a a config file, G-code or AMF/3MF. -// this->filaments.default_preset().config.optptr("compatible_printers", true); -// this->filaments.default_preset().config.optptr("compatible_printers_condition", true); -// this->prints.default_preset().config.optptr("compatible_printers", true); -// this->prints.default_preset().config.optptr("compatible_printers_condition", true); - // Create the "printer_vendor", "printer_model" and "printer_variant" keys. + + // Create the ID config keys, as they are not part of the Static print config classes. + this->prints.default_preset().config.optptr("print_settings_id", true); + this->prints.default_preset().config.option("compatible_printers_condition", true)->values = { "" }; + this->prints.default_preset().config.option("inherits", true)->values = { "" }; + + this->filaments.default_preset().config.option("filament_settings_id", true)->values = { "" }; + this->filaments.default_preset().config.option("compatible_printers_condition", true)->values = { "" }; + this->filaments.default_preset().config.option("inherits", true)->values = { "" }; + + this->printers.default_preset().config.optptr("printer_settings_id", true); this->printers.default_preset().config.optptr("printer_vendor", true); this->printers.default_preset().config.optptr("printer_model", true); this->printers.default_preset().config.optptr("printer_variant", true); - // Load the default preset bitmaps. + this->printers.default_preset().config.optptr("default_print_profile", true); + this->printers.default_preset().config.optptr("default_filament_profile", true); + this->printers.default_preset().config.option("inherits", true)->values = { "" }; + + // Load the default preset bitmaps. this->prints .load_bitmap_default("cog.png"); this->filaments.load_bitmap_default("spool.png"); this->printers .load_bitmap_default("printer_empty.png"); this->load_compatible_bitmaps(); + // Re-activate the default presets, so their "edited" preset copies will be updated with the additional configuration values above. this->prints .select_preset(0); this->filaments.select_preset(0); @@ -370,9 +384,20 @@ DynamicPrintConfig PresetBundle::full_config() const auto *nozzle_diameter = dynamic_cast(out.option("nozzle_diameter")); size_t num_extruders = nozzle_diameter->values.size(); + // Collect the "compatible_printers_condition" and "inherits" values over all presets (print, filaments, printers) into a single vector. + std::vector compatible_printers_condition; + std::vector inherits; + auto append_config_string = [](const DynamicConfig &cfg, const std::string &key, std::vector &dst) { + const ConfigOptionStrings *opt = cfg.opt(key); + dst.emplace_back((opt == nullptr || opt->values.empty()) ? "" : opt->values.front()); + }; + append_config_string(this->prints.get_edited_preset().config, "compatible_printers_condition", compatible_printers_condition); + append_config_string(this->prints.get_edited_preset().config, "inherits", inherits); if (num_extruders <= 1) { out.apply(this->filaments.get_edited_preset().config); + append_config_string(this->filaments.get_edited_preset().config, "compatible_printers_condition", compatible_printers_condition); + append_config_string(this->filaments.get_edited_preset().config, "inherits", inherits); } else { // Retrieve filament presets and build a single config object for them. // First collect the filament configurations based on the user selection of this->filament_presets. @@ -382,11 +407,15 @@ DynamicPrintConfig PresetBundle::full_config() const filament_configs.emplace_back(&this->filaments.find_preset(filament_preset_name, true)->config); while (filament_configs.size() < num_extruders) filament_configs.emplace_back(&this->filaments.first_visible().config); + for (const DynamicPrintConfig *cfg : filament_configs) { + append_config_string(*cfg, "compatible_printers_condition", compatible_printers_condition); + append_config_string(*cfg, "inherits", inherits); + } // Option values to set a ConfigOptionVector from. std::vector filament_opts(num_extruders, nullptr); // loop through options and apply them to the resulting config. for (const t_config_option_key &key : this->filaments.default_preset().config.keys()) { - if (key == "compatible_printers" || key == "compatible_printers_condition") + if (key == "compatible_printers" || key == "compatible_printers_condition" || key == "inherits") continue; // Get a destination option. ConfigOption *opt_dst = out.option(key, false); @@ -404,9 +433,13 @@ DynamicPrintConfig PresetBundle::full_config() const } } - //FIXME These two value types clash between the print and filament profiles. They should be renamed. + // Don't store the "compatible_printers_condition" for the printer profile, there is none. + append_config_string(this->printers.get_edited_preset().config, "inherits", inherits); + + // These two value types clash between the print and filament profiles. They should be renamed. out.erase("compatible_printers"); out.erase("compatible_printers_condition"); + out.erase("inherits"); static const char *keys[] = { "perimeter", "infill", "solid_infill", "support_material", "support_material_interface" }; for (size_t i = 0; i < sizeof(keys) / sizeof(keys[0]); ++ i) { @@ -419,6 +452,22 @@ DynamicPrintConfig PresetBundle::full_config() const out.option("print_settings_id", true)->value = this->prints.get_selected_preset().name; out.option("filament_settings_id", true)->values = this->filament_presets; out.option("printer_settings_id", true)->value = this->printers.get_selected_preset().name; + + // Serialize the collected "compatible_printers_condition" and "inherits" fields. + // There will be 1 + num_exturders fields for "inherits" and 2 + num_extruders for "compatible_printers_condition" stored. + // The vector will not be stored if all fields are empty strings. + auto add_if_some_non_empty = [&out](std::vector &&values, const std::string &key) { + bool nonempty = false; + for (const std::string &v : values) + if (! v.empty()) { + nonempty = true; + break; + } + if (nonempty) + out.set_key_value(key, new ConfigOptionStrings(std::move(values))); + }; + add_if_some_non_empty(std::move(compatible_printers_condition), "compatible_printers_condition"); + add_if_some_non_empty(std::move(inherits), "inherits"); return out; } @@ -497,6 +546,20 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool } } + size_t num_extruders = std::min(config.option("nozzle_diameter" )->values.size(), + config.option("filament_diameter")->values.size()); + // Make a copy of the "compatible_printers_condition" and "inherits" vectors, which + // accumulate values over all presets (print, filaments, printers). + // These values will be distributed into their particular presets when loading. + auto *compatible_printers_condition = config.option("compatible_printers_condition", true); + auto *inherits = config.option("inherits", true); + std::vector compatible_printers_condition_values = std::move(compatible_printers_condition->values); + std::vector inherits_values = std::move(inherits->values); + if (compatible_printers_condition_values.empty()) + compatible_printers_condition_values.emplace_back(std::string()); + if (inherits_values.empty()) + inherits_values.emplace_back(std::string()); + // 1) Create a name from the file name. // Keep the suffix (.ini, .gcode, .amf, .3mf etc) to differentiate it from the normal profiles. std::string name = is_external ? boost::filesystem::path(name_or_path).filename().string() : name_or_path; @@ -505,6 +568,11 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool // First load the print and printer presets. for (size_t i_group = 0; i_group < 2; ++ i_group) { PresetCollection &presets = (i_group == 0) ? this->prints : this->printers; + // Split the "compatible_printers_condition" and "inherits" values one by one from a single vector to the print & printer profiles. + size_t idx = (i_group == 0) ? 0 : num_extruders + 1; + inherits->values = { (idx < inherits_values.size()) ? inherits_values[idx] : "" }; + if (i_group == 0) + compatible_printers_condition->values = { compatible_printers_condition_values.front() }; if (is_external) presets.load_external_preset(name_or_path, name, config.opt_string((i_group == 0) ? "print_settings_id" : "printer_settings_id"), @@ -513,10 +581,15 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool presets.load_preset(presets.path_from_name(name), name, config).save(); } + // Update the "compatible_printers_condition" and "inherits" vectors, so their number matches the number of extruders. + compatible_printers_condition_values.erase(compatible_printers_condition_values.begin()); + inherits_values.erase(inherits_values.begin()); + compatible_printers_condition_values.resize(num_extruders, std::string()); + inherits_values.resize(num_extruders, std::string()); + compatible_printers_condition->values = std::move(compatible_printers_condition_values); + inherits->values = std::move(inherits_values); + // 3) Now load the filaments. If there are multiple filament presets, split them and load them. - auto *nozzle_diameter = dynamic_cast(config.option("nozzle_diameter")); - auto *filament_diameter = dynamic_cast(config.option("filament_diameter")); - size_t num_extruders = std::min(nozzle_diameter->values.size(), filament_diameter->values.size()); const ConfigOptionStrings *old_filament_profile_names = config.option("filament_settings_id", false); assert(old_filament_profile_names != nullptr); if (num_extruders <= 1) { diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 6eabc2f47..3bfab54b3 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -803,7 +803,7 @@ void Tab::reload_compatible_printers_widget() bool has_any = !m_config->option("compatible_printers")->values.empty(); has_any ? m_compatible_printers_btn->Enable() : m_compatible_printers_btn->Disable(); m_compatible_printers_checkbox->SetValue(!has_any); - get_field("compatible_printers_condition")->toggle(!has_any); + get_field("compatible_printers_condition", 0)->toggle(!has_any); } void TabPrint::build() @@ -1014,7 +1014,7 @@ void TabPrint::build() }; optgroup->append_line(line, &m_colored_Label); - option = optgroup->get_option("compatible_printers_condition"); + option = optgroup->get_option("compatible_printers_condition", 0); option.opt.full_width = true; optgroup->append_single_option_line(option); @@ -1365,7 +1365,7 @@ void TabFilament::build() }; optgroup->append_line(line, &m_colored_Label); - option = optgroup->get_option("compatible_printers_condition"); + option = optgroup->get_option("compatible_printers_condition", 0); option.opt.full_width = true; optgroup->append_single_option_line(option); @@ -2240,7 +2240,7 @@ wxSizer* Tab::compatible_printers_widget(wxWindow* parent, wxCheckBox** checkbox // All printers have been made compatible with this preset. if ((*checkbox)->GetValue()) load_key_value("compatible_printers", std::vector {}); - get_field("compatible_printers_condition")->toggle((*checkbox)->GetValue()); + get_field("compatible_printers_condition", 0)->toggle((*checkbox)->GetValue()); update_changed_ui(); }) ); From a754de4c324518edc1ab931e01253a51b94bea99 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Tue, 26 Jun 2018 11:17:30 +0200 Subject: [PATCH 058/198] Fixed panning in Layers view --- lib/Slic3r/GUI/Plater/2DToolpaths.pm | 69 ++++++++++++++++++---------- xs/xsp/BoundingBox.xsp | 4 ++ 2 files changed, 48 insertions(+), 25 deletions(-) diff --git a/lib/Slic3r/GUI/Plater/2DToolpaths.pm b/lib/Slic3r/GUI/Plater/2DToolpaths.pm index 96a252a08..382310f24 100644 --- a/lib/Slic3r/GUI/Plater/2DToolpaths.pm +++ b/lib/Slic3r/GUI/Plater/2DToolpaths.pm @@ -199,11 +199,11 @@ sub new { my $old_zoom = $self->_zoom; # Calculate the zoom delta and apply it to the current zoom factor - my $zoom = $e->GetWheelRotation() / $e->GetWheelDelta(); + my $zoom = -$e->GetWheelRotation() / $e->GetWheelDelta(); $zoom = max(min($zoom, 4), -4); $zoom /= 10; $self->_zoom($self->_zoom / (1-$zoom)); - $self->_zoom(1) if $self->_zoom > 1; # prevent from zooming out too much + $self->_zoom(1.25) if $self->_zoom > 1.25; # prevent from zooming out too much { # In order to zoom around the mouse point we need to translate @@ -227,7 +227,6 @@ sub new { } $self->_dirty(1); - $self->Refresh; }); EVT_MOUSE_EVENTS($self, \&mouse_event); @@ -255,8 +254,8 @@ sub mouse_event { return if !$self->GetParent->enabled; my $pos = Slic3r::Pointf->new($e->GetPositionXY); - if ($e->Entering && &Wx::wxMSW) { - # wxMSW needs focus in order to catch mouse wheel events + if ($e->Entering && (&Wx::wxMSW || $^O eq 'linux')) { + # wxMSW and Linux needs focus in order to catch key events $self->SetFocus; } elsif ($e->Dragging) { if ($e->LeftIsDown || $e->MiddleIsDown || $e->RightIsDown) { @@ -276,7 +275,6 @@ sub mouse_event { ); $self->_dirty(1); - $self->Refresh; } $self->_drag_start_xy($pos); } @@ -631,6 +629,27 @@ sub Resize { glLoadIdentity(); my $bb = $self->bb->clone; + + # rescale in dependence of window aspect ratio + my $bb_size = $bb->size; + my $ratio_x = ($x != 0.0) ? $bb_size->x / $x : 1.0; + my $ratio_y = ($y != 0.0) ? $bb_size->y / $y : 1.0; + + if ($ratio_y < $ratio_x) { + if ($ratio_y != 0.0) { + my $new_size_y = $bb_size->y * $ratio_x / $ratio_y; + my $half_delta_size_y = 0.5 * ($new_size_y - $bb_size->y); + $bb->set_y_min($bb->y_min - $half_delta_size_y); + $bb->set_y_max($bb->y_max + $half_delta_size_y); + } + } elsif ($ratio_x < $ratio_y) { + if ($ratio_x != 0.0) { + my $new_size_x = $bb_size->x * $ratio_y / $ratio_x; + my $half_delta_size_x = 0.5 * ($new_size_x - $bb_size->x); + $bb->set_x_min($bb->x_min - $half_delta_size_x); + $bb->set_x_max($bb->x_max + $half_delta_size_x); + } + } # center bounding box around origin before scaling it my $bb_center = $bb->center; @@ -645,25 +664,25 @@ sub Resize { # translate camera $bb->translate(@{$self->_camera_target}); - # keep camera_bb within total bb - # (i.e. prevent user from panning outside the bounding box) - { - my @translate = (0,0); - if ($bb->x_min < $self->bb->x_min) { - $translate[X] += $self->bb->x_min - $bb->x_min; - } - if ($bb->y_min < $self->bb->y_min) { - $translate[Y] += $self->bb->y_min - $bb->y_min; - } - if ($bb->x_max > $self->bb->x_max) { - $translate[X] -= $bb->x_max - $self->bb->x_max; - } - if ($bb->y_max > $self->bb->y_max) { - $translate[Y] -= $bb->y_max - $self->bb->y_max; - } - $self->_camera_target->translate(@translate); - $bb->translate(@translate); - } +# # keep camera_bb within total bb +# # (i.e. prevent user from panning outside the bounding box) +# { +# my @translate = (0,0); +# if ($bb->x_min < $self->bb->x_min) { +# $translate[X] += $self->bb->x_min - $bb->x_min; +# } +# if ($bb->y_min < $self->bb->y_min) { +# $translate[Y] += $self->bb->y_min - $bb->y_min; +# } +# if ($bb->x_max > $self->bb->x_max) { +# $translate[X] -= $bb->x_max - $self->bb->x_max; +# } +# if ($bb->y_max > $self->bb->y_max) { +# $translate[Y] -= $bb->y_max - $self->bb->y_max; +# } +# $self->_camera_target->translate(@translate); +# $bb->translate(@translate); +# } # save camera $self->_camera_bb($bb); diff --git a/xs/xsp/BoundingBox.xsp b/xs/xsp/BoundingBox.xsp index df8e6baea..ebeb17822 100644 --- a/xs/xsp/BoundingBox.xsp +++ b/xs/xsp/BoundingBox.xsp @@ -29,6 +29,10 @@ int x_max() %code{% RETVAL = THIS->max.x; %}; int y_min() %code{% RETVAL = THIS->min.y; %}; int y_max() %code{% RETVAL = THIS->max.y; %}; + void set_x_min(double val) %code{% THIS->min.x = val; %}; + void set_x_max(double val) %code{% THIS->max.x = val; %}; + void set_y_min(double val) %code{% THIS->min.y = val; %}; + void set_y_max(double val) %code{% THIS->max.y = val; %}; std::string serialize() %code{% char buf[2048]; sprintf(buf, "%ld,%ld;%ld,%ld", THIS->min.x, THIS->min.y, THIS->max.x, THIS->max.y); RETVAL = buf; %}; bool defined() %code{% RETVAL = THIS->defined; %}; From 5da3986e22a1f5b626de5dd7172a5954c8637fc8 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Tue, 26 Jun 2018 11:17:40 +0200 Subject: [PATCH 059/198] Updated POT-file --- resources/localization/Slic3rPE.pot | 835 +++++++++++++++------------- resources/localization/list.txt | 1 + 2 files changed, 442 insertions(+), 394 deletions(-) diff --git a/resources/localization/Slic3rPE.pot b/resources/localization/Slic3rPE.pot index 782f94c49..029e7c4b2 100644 --- a/resources/localization/Slic3rPE.pot +++ b/resources/localization/Slic3rPE.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-06-11 13:34+0200\n" +"POT-Creation-Date: 2018-06-26 11:11+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -33,7 +33,7 @@ msgid "Rectangular" msgstr "" #: xs/src/slic3r/GUI/BedShapeDialog.cpp:50 xs/src/slic3r/GUI/Tab.cpp:1745 -#: lib/Slic3r/GUI/Plater.pm:432 +#: lib/Slic3r/GUI/Plater.pm:477 msgid "Size" msgstr "" @@ -56,8 +56,10 @@ msgid "Circular" msgstr "" #: xs/src/slic3r/GUI/BedShapeDialog.cpp:65 -#: xs/src/slic3r/GUI/ConfigWizard.cpp:87 xs/src/slic3r/GUI/ConfigWizard.cpp:434 -#: xs/src/slic3r/GUI/ConfigWizard.cpp:448 xs/src/slic3r/GUI/RammingChart.cpp:81 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:87 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:439 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:453 +#: xs/src/slic3r/GUI/RammingChart.cpp:81 #: xs/src/slic3r/GUI/WipeTowerDialog.cpp:79 #: xs/src/libslic3r/PrintConfig.cpp:130 xs/src/libslic3r/PrintConfig.cpp:173 #: xs/src/libslic3r/PrintConfig.cpp:181 xs/src/libslic3r/PrintConfig.cpp:229 @@ -79,7 +81,8 @@ msgstr "" msgid "mm" msgstr "" -#: xs/src/slic3r/GUI/BedShapeDialog.cpp:66 xs/src/libslic3r/PrintConfig.cpp:494 +#: xs/src/slic3r/GUI/BedShapeDialog.cpp:66 +#: xs/src/libslic3r/PrintConfig.cpp:494 msgid "Diameter" msgstr "" @@ -121,7 +124,7 @@ msgid "" msgstr "" #: xs/src/slic3r/GUI/BedShapeDialog.hpp:44 -#: xs/src/slic3r/GUI/ConfigWizard.cpp:397 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:402 msgid "Bed Shape" msgstr "" @@ -239,7 +242,7 @@ msgstr "" msgid "Activate" msgstr "" -#: xs/src/slic3r/GUI/ConfigSnapshotDialog.cpp:96 xs/src/slic3r/GUI/GUI.cpp:321 +#: xs/src/slic3r/GUI/ConfigSnapshotDialog.cpp:96 xs/src/slic3r/GUI/GUI.cpp:323 msgid "Configuration Snapshots" msgstr "" @@ -255,54 +258,54 @@ msgstr "" msgid "Select none" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:207 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:212 #, possible-c-format msgid "Welcome to the Slic3r %s" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:207 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:212 msgid "Welcome" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:213 xs/src/slic3r/GUI/GUI.cpp:318 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:218 xs/src/slic3r/GUI/GUI.cpp:320 #, possible-c-format msgid "Run %s" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:215 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:220 #, possible-c-format msgid "" "Hello, welcome to Slic3r Prusa Edition! This %s helps you with the initial " "configuration; just a few settings and you will be ready to print." msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:219 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:224 msgid "" "Remove user profiles - install from scratch (a snapshot will be taken " "beforehand)" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:240 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:245 msgid "Other vendors" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:242 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:247 msgid "Custom setup" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:266 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:271 msgid "Automatic updates" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:266 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:271 msgid "Updates" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:274 xs/src/slic3r/GUI/Preferences.cpp:59 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:279 xs/src/slic3r/GUI/Preferences.cpp:59 msgid "Check for application updates" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:277 xs/src/slic3r/GUI/Preferences.cpp:61 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:282 xs/src/slic3r/GUI/Preferences.cpp:61 msgid "" "If enabled, Slic3r checks for new versions of Slic3r PE online. When a new " "version becomes available a notification is displayed at the next " @@ -310,11 +313,11 @@ msgid "" "notification mechanisms, no automatic installation is done." msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:281 xs/src/slic3r/GUI/Preferences.cpp:67 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:286 xs/src/slic3r/GUI/Preferences.cpp:67 msgid "Update built-in Presets automatically" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:284 xs/src/slic3r/GUI/Preferences.cpp:69 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:289 xs/src/slic3r/GUI/Preferences.cpp:69 msgid "" "If enabled, Slic3r downloads updates of built-in system presets in the " "background. These updates are downloaded into a separate temporary location. " @@ -322,327 +325,339 @@ msgid "" "startup." msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:285 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:290 msgid "" "Updates are never applied without user's consent and never overwrite user's " "customized settings." msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:290 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:295 msgid "" "Additionally a backup snapshot of the whole configuration is created before " "an update is applied." msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:297 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:302 msgid "Other Vendors" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:299 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:304 msgid "Pick another vendor supported by Slic3r PE:" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:358 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:363 msgid "Firmware Type" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:358 xs/src/slic3r/GUI/Tab.cpp:1628 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:363 xs/src/slic3r/GUI/Tab.cpp:1628 msgid "Firmware" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:362 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:367 msgid "Choose the type of firmware used by your printer." msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:397 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:402 msgid "Bed Shape and Size" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:400 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:405 msgid "Set the shape of your printer's bed." msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:414 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:419 msgid "Filament and Nozzle Diameters" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:414 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:419 msgid "Print Diameters" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:430 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:435 msgid "Enter the diameter of your printer's hot end nozzle." msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:433 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:438 msgid "Nozzle Diameter:" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:443 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:448 msgid "Enter the diameter of your filament." msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:444 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:449 msgid "" "Good precision is required, so use a caliper and do multiple measurements " "along the filament, then compute the average." msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:447 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:452 msgid "Filament Diameter:" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:465 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:470 msgid "Extruder and Bed Temperatures" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:465 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:470 msgid "Temperatures" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:481 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:486 msgid "Enter the temperature needed for extruding your filament." msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:482 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:487 msgid "A rule of thumb is 160 to 230 °C for PLA, and 215 to 250 °C for ABS." msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:485 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:490 msgid "Extrusion Temperature:" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:486 -#: xs/src/slic3r/GUI/ConfigWizard.cpp:500 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:491 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:505 msgid "°C" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:495 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:500 msgid "" "Enter the bed temperature needed for getting your filament to stick to your " "heated bed." msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:496 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:501 msgid "" "A rule of thumb is 60 °C for PLA and 110 °C for ABS. Leave zero if you have " "no heated bed." msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:499 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:504 msgid "Bed Temperature:" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:807 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:817 +msgid "< &Back" +msgstr "" + +#: xs/src/slic3r/GUI/ConfigWizard.cpp:818 +msgid "&Next >" +msgstr "" + +#: xs/src/slic3r/GUI/ConfigWizard.cpp:819 msgid "&Finish" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:865 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:889 msgid "Configuration Wizard" msgstr "" -#: xs/src/slic3r/GUI/ConfigWizard.cpp:867 +#: xs/src/slic3r/GUI/ConfigWizard.cpp:891 msgid "Configuration Assistant" msgstr "" -#: xs/src/slic3r/GUI/FirmwareDialog.cpp:84 +#: xs/src/slic3r/GUI/FirmwareDialog.cpp:87 msgid "Flash!" msgstr "" -#: xs/src/slic3r/GUI/FirmwareDialog.cpp:85 +#: xs/src/slic3r/GUI/FirmwareDialog.cpp:88 msgid "Cancel" msgstr "" -#: xs/src/slic3r/GUI/FirmwareDialog.cpp:123 +#: xs/src/slic3r/GUI/FirmwareDialog.cpp:128 msgid "Flashing in progress. Please do not disconnect the printer!" msgstr "" -#: xs/src/slic3r/GUI/FirmwareDialog.cpp:145 +#: xs/src/slic3r/GUI/FirmwareDialog.cpp:155 msgid "Flashing succeeded!" msgstr "" -#: xs/src/slic3r/GUI/FirmwareDialog.cpp:146 +#: xs/src/slic3r/GUI/FirmwareDialog.cpp:156 msgid "Flashing failed. Please see the avrdude log below." msgstr "" -#: xs/src/slic3r/GUI/FirmwareDialog.cpp:147 +#: xs/src/slic3r/GUI/FirmwareDialog.cpp:157 msgid "Flashing cancelled." msgstr "" -#: xs/src/slic3r/GUI/FirmwareDialog.cpp:213 +#: xs/src/slic3r/GUI/FirmwareDialog.cpp:294 msgid "Cancelling..." msgstr "" -#: xs/src/slic3r/GUI/FirmwareDialog.cpp:266 +#: xs/src/slic3r/GUI/FirmwareDialog.cpp:347 msgid "Firmware flasher" msgstr "" -#: xs/src/slic3r/GUI/FirmwareDialog.cpp:286 +#: xs/src/slic3r/GUI/FirmwareDialog.cpp:367 msgid "Serial port:" msgstr "" -#: xs/src/slic3r/GUI/FirmwareDialog.cpp:288 +#: xs/src/slic3r/GUI/FirmwareDialog.cpp:369 msgid "Rescan" msgstr "" -#: xs/src/slic3r/GUI/FirmwareDialog.cpp:293 +#: xs/src/slic3r/GUI/FirmwareDialog.cpp:374 msgid "Firmware image:" msgstr "" -#: xs/src/slic3r/GUI/FirmwareDialog.cpp:296 +#: xs/src/slic3r/GUI/FirmwareDialog.cpp:377 msgid "Status:" msgstr "" -#: xs/src/slic3r/GUI/FirmwareDialog.cpp:297 +#: xs/src/slic3r/GUI/FirmwareDialog.cpp:378 msgid "Ready" msgstr "" -#: xs/src/slic3r/GUI/FirmwareDialog.cpp:300 +#: xs/src/slic3r/GUI/FirmwareDialog.cpp:381 msgid "Progress:" msgstr "" -#: xs/src/slic3r/GUI/FirmwareDialog.cpp:319 +#: xs/src/slic3r/GUI/FirmwareDialog.cpp:400 msgid "Advanced: avrdude output log" msgstr "" -#: xs/src/slic3r/GUI/FirmwareDialog.cpp:365 +#: xs/src/slic3r/GUI/FirmwareDialog.cpp:446 msgid "" "Are you sure you want to cancel firmware flashing?\n" "This could leave your printer in an unusable state!" msgstr "" -#: xs/src/slic3r/GUI/FirmwareDialog.cpp:366 +#: xs/src/slic3r/GUI/FirmwareDialog.cpp:447 msgid "Confirmation" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:206 +#: xs/src/slic3r/GUI/GLCanvas3D.cpp:1990 +msgid "Detected object outside print volume" +msgstr "" + +#: xs/src/slic3r/GUI/GUI.cpp:208 msgid "Array of language names and identifiers should have the same size." msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:217 +#: xs/src/slic3r/GUI/GUI.cpp:219 msgid "Select the language" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:217 +#: xs/src/slic3r/GUI/GUI.cpp:219 msgid "Language" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:279 xs/src/libslic3r/PrintConfig.cpp:187 +#: xs/src/slic3r/GUI/GUI.cpp:281 xs/src/libslic3r/PrintConfig.cpp:187 msgid "Default" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:321 +#: xs/src/slic3r/GUI/GUI.cpp:323 msgid "Inspect / activate configuration snapshots" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:322 +#: xs/src/slic3r/GUI/GUI.cpp:324 msgid "Take Configuration Snapshot" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:322 +#: xs/src/slic3r/GUI/GUI.cpp:324 msgid "Capture a configuration snapshot" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:325 xs/src/slic3r/GUI/Preferences.cpp:9 +#: xs/src/slic3r/GUI/GUI.cpp:327 xs/src/slic3r/GUI/Preferences.cpp:9 msgid "Preferences" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:325 +#: xs/src/slic3r/GUI/GUI.cpp:327 msgid "Application preferences" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:326 +#: xs/src/slic3r/GUI/GUI.cpp:328 msgid "Change Application Language" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:328 +#: xs/src/slic3r/GUI/GUI.cpp:330 msgid "Flash printer firmware" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:328 +#: xs/src/slic3r/GUI/GUI.cpp:330 msgid "Upload a firmware image into an Arduino based printer" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:340 +#: xs/src/slic3r/GUI/GUI.cpp:342 msgid "Taking configuration snapshot" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:340 +#: xs/src/slic3r/GUI/GUI.cpp:342 msgid "Snapshot name" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:378 +#: xs/src/slic3r/GUI/GUI.cpp:380 msgid "Application will be restarted" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:378 +#: xs/src/slic3r/GUI/GUI.cpp:380 msgid "Attention!" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:393 +#: xs/src/slic3r/GUI/GUI.cpp:396 msgid "&Configuration" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:417 +#: xs/src/slic3r/GUI/GUI.cpp:420 msgid "You have unsaved changes " msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:417 +#: xs/src/slic3r/GUI/GUI.cpp:420 msgid ". Discard changes and continue anyway?" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:418 +#: xs/src/slic3r/GUI/GUI.cpp:421 msgid "Unsaved Presets" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:626 +#: xs/src/slic3r/GUI/GUI.cpp:629 msgid "Notice" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:631 +#: xs/src/slic3r/GUI/GUI.cpp:634 msgid "Attempt to free unreferenced scalar" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:633 xs/src/slic3r/GUI/WipeTowerDialog.cpp:39 +#: xs/src/slic3r/GUI/GUI.cpp:636 xs/src/slic3r/GUI/WipeTowerDialog.cpp:39 #: xs/src/slic3r/GUI/WipeTowerDialog.cpp:321 msgid "Warning" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:822 +#: xs/src/slic3r/GUI/GUI.cpp:825 msgid "Support" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:825 +#: xs/src/slic3r/GUI/GUI.cpp:828 msgid "Select what kind of support do you need" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:826 xs/src/libslic3r/GCode/PreviewData.cpp:157 +#: xs/src/slic3r/GUI/GUI.cpp:829 xs/src/libslic3r/GCode/PreviewData.cpp:157 msgid "None" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:827 xs/src/libslic3r/PrintConfig.cpp:1516 +#: xs/src/slic3r/GUI/GUI.cpp:830 xs/src/libslic3r/PrintConfig.cpp:1516 msgid "Support on build plate only" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:828 +#: xs/src/slic3r/GUI/GUI.cpp:831 msgid "Everywhere" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:840 xs/src/slic3r/GUI/Tab.cpp:872 +#: xs/src/slic3r/GUI/GUI.cpp:843 xs/src/slic3r/GUI/Tab.cpp:872 msgid "Brim" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:842 +#: xs/src/slic3r/GUI/GUI.cpp:845 msgid "" "This flag enables the brim that will be printed around each object on the " "first layer." msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:851 +#: xs/src/slic3r/GUI/GUI.cpp:854 msgid "Purging volumes" msgstr "" -#: xs/src/slic3r/GUI/GUI.cpp:893 +#: xs/src/slic3r/GUI/GUI.cpp:896 msgid "Export print config" msgstr "" @@ -891,12 +906,12 @@ msgid "Profile dependencies" msgstr "" #: xs/src/slic3r/GUI/Tab.cpp:1011 xs/src/slic3r/GUI/Tab.cpp:1362 -#: xs/src/slic3r/GUI/Tab.cpp:2248 xs/src/libslic3r/PrintConfig.cpp:144 +#: xs/src/slic3r/GUI/Tab.cpp:2261 xs/src/libslic3r/PrintConfig.cpp:144 msgid "Compatible printers" msgstr "" #: xs/src/slic3r/GUI/Tab.cpp:1044 -#, possible-c-format +#, no-c-format msgid "" "The Spiral Vase mode requires:\n" "- one perimeter\n" @@ -952,7 +967,7 @@ msgid "The " msgstr "" #: xs/src/slic3r/GUI/Tab.cpp:1153 -#, possible-c-format +#, no-c-format msgid "" " infill pattern is not supposed to work at 100% density.\n" "\n" @@ -960,7 +975,7 @@ msgid "" msgstr "" #: xs/src/slic3r/GUI/Tab.cpp:1258 xs/src/slic3r/GUI/Tab.cpp:1259 -#: lib/Slic3r/GUI/Plater.pm:388 +#: lib/Slic3r/GUI/Plater.pm:433 msgid "Filament" msgstr "" @@ -1043,7 +1058,7 @@ msgstr "" msgid "Bed shape" msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:1446 xs/src/slic3r/GUI/Tab.cpp:2216 +#: xs/src/slic3r/GUI/Tab.cpp:1446 xs/src/slic3r/GUI/Tab.cpp:2229 msgid " Set " msgstr "" @@ -1083,7 +1098,7 @@ msgstr "" msgid "Connection failed." msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:1542 xs/src/slic3r/Utils/OctoPrint.cpp:50 +#: xs/src/slic3r/GUI/Tab.cpp:1542 xs/src/slic3r/Utils/OctoPrint.cpp:110 msgid "OctoPrint upload" msgstr "" @@ -1168,8 +1183,8 @@ msgid "" "setups)" msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:1776 lib/Slic3r/GUI/Plater.pm:160 -#: lib/Slic3r/GUI/Plater.pm:2189 +#: xs/src/slic3r/GUI/Tab.cpp:1776 lib/Slic3r/GUI/Plater.pm:192 +#: lib/Slic3r/GUI/Plater.pm:2283 msgid "Preview" msgstr "" @@ -1228,74 +1243,74 @@ msgstr "" msgid "Unsaved Changes" msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2126 +#: xs/src/slic3r/GUI/Tab.cpp:2139 msgid "The supplied name is empty. It can't be saved." msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2131 +#: xs/src/slic3r/GUI/Tab.cpp:2144 msgid "Cannot overwrite a system profile." msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2135 +#: xs/src/slic3r/GUI/Tab.cpp:2148 msgid "Cannot overwrite an external profile." msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2159 +#: xs/src/slic3r/GUI/Tab.cpp:2172 msgid "remove" msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2159 +#: xs/src/slic3r/GUI/Tab.cpp:2172 msgid "delete" msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2160 +#: xs/src/slic3r/GUI/Tab.cpp:2173 msgid "Are you sure you want to " msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2160 +#: xs/src/slic3r/GUI/Tab.cpp:2173 msgid " the selected preset?" msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2161 +#: xs/src/slic3r/GUI/Tab.cpp:2174 msgid "Remove" msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2161 lib/Slic3r/GUI/Plater.pm:188 -#: lib/Slic3r/GUI/Plater.pm:206 lib/Slic3r/GUI/Plater.pm:2085 +#: xs/src/slic3r/GUI/Tab.cpp:2174 lib/Slic3r/GUI/Plater.pm:233 +#: lib/Slic3r/GUI/Plater.pm:251 lib/Slic3r/GUI/Plater.pm:2174 msgid "Delete" msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2162 +#: xs/src/slic3r/GUI/Tab.cpp:2175 msgid " Preset" msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2215 +#: xs/src/slic3r/GUI/Tab.cpp:2228 msgid "All" msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2247 +#: xs/src/slic3r/GUI/Tab.cpp:2260 msgid "Select the printers this profile is compatible with." msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2293 xs/src/slic3r/GUI/Tab.cpp:2379 +#: xs/src/slic3r/GUI/Tab.cpp:2306 xs/src/slic3r/GUI/Tab.cpp:2392 #: xs/src/slic3r/GUI/Preset.cpp:613 xs/src/slic3r/GUI/Preset.cpp:653 #: xs/src/slic3r/GUI/Preset.cpp:678 xs/src/slic3r/GUI/Preset.cpp:710 #: xs/src/slic3r/GUI/PresetBundle.cpp:1119 -#: xs/src/slic3r/GUI/PresetBundle.cpp:1172 lib/Slic3r/GUI/Plater.pm:573 +#: xs/src/slic3r/GUI/PresetBundle.cpp:1172 lib/Slic3r/GUI/Plater.pm:618 msgid "System presets" msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2294 xs/src/slic3r/GUI/Tab.cpp:2380 +#: xs/src/slic3r/GUI/Tab.cpp:2307 xs/src/slic3r/GUI/Tab.cpp:2393 msgid "Default presets" msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2449 +#: xs/src/slic3r/GUI/Tab.cpp:2462 msgid "" "LOCKED LOCK;indicates that the settings are the same as the system values " "for the current option group" msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2452 +#: xs/src/slic3r/GUI/Tab.cpp:2465 msgid "" "UNLOCKED LOCK;indicates that some settings were changed and are not equal to " "the system values for the current option group.\n" @@ -1303,13 +1318,13 @@ msgid "" "to the system values." msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2458 +#: xs/src/slic3r/GUI/Tab.cpp:2471 msgid "" "WHITE BULLET;for the left button: \tindicates a non-system preset,\n" "for the right button: \tindicates that the settings hasn't been modified." msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2462 +#: xs/src/slic3r/GUI/Tab.cpp:2475 msgid "" "BACK ARROW;indicates that the settings were changed and are not equal to the " "last saved preset for the current option group.\n" @@ -1317,30 +1332,30 @@ msgid "" "to the last saved preset." msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2488 +#: xs/src/slic3r/GUI/Tab.cpp:2501 msgid "" "LOCKED LOCK icon indicates that the settings are the same as the system " "values for the current option group" msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2490 +#: xs/src/slic3r/GUI/Tab.cpp:2503 msgid "" "UNLOCKED LOCK icon indicates that some settings were changed and are not " "equal to the system values for the current option group.\n" "Click to reset all settings for current option group to the system values." msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2493 +#: xs/src/slic3r/GUI/Tab.cpp:2506 msgid "WHITE BULLET icon indicates a non system preset." msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2496 +#: xs/src/slic3r/GUI/Tab.cpp:2509 msgid "" "WHITE BULLET icon indicates that the settings are the same as in the last " "saved preset for the current option group." msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2498 +#: xs/src/slic3r/GUI/Tab.cpp:2511 msgid "" "BACK ARROW icon indicates that the settings were changed and are not equal " "to the last saved preset for the current option group.\n" @@ -1348,46 +1363,53 @@ msgid "" "preset." msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2504 +#: xs/src/slic3r/GUI/Tab.cpp:2517 msgid "" "LOCKED LOCK icon indicates that the value is the same as the system value." msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2505 +#: xs/src/slic3r/GUI/Tab.cpp:2518 msgid "" "UNLOCKED LOCK icon indicates that the value was changed and is not equal to " "the system value.\n" "Click to reset current value to the system value." msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2511 +#: xs/src/slic3r/GUI/Tab.cpp:2524 msgid "" "WHITE BULLET icon indicates that the value is the same as in the last saved " "preset." msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2512 +#: xs/src/slic3r/GUI/Tab.cpp:2525 msgid "" "BACK ARROW icon indicates that the value was changed and is not equal to the " "last saved preset.\n" "Click to reset current value to the last saved preset." msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2582 lib/Slic3r/GUI/MainFrame.pm:448 -#: lib/Slic3r/GUI/Plater.pm:1685 +#: xs/src/slic3r/GUI/Tab.cpp:2595 lib/Slic3r/GUI/MainFrame.pm:450 +#: lib/Slic3r/GUI/Plater.pm:1756 msgid "Save " msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2582 +#: xs/src/slic3r/GUI/Tab.cpp:2595 msgid " as:" msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2616 -msgid "" -"The supplied name is not valid; the following characters are not allowed:" +#: xs/src/slic3r/GUI/Tab.cpp:2634 xs/src/slic3r/GUI/Tab.cpp:2638 +msgid "The supplied name is not valid;" msgstr "" -#: xs/src/slic3r/GUI/Tab.cpp:2619 +#: xs/src/slic3r/GUI/Tab.cpp:2635 +msgid "the following characters are not allowed:" +msgstr "" + +#: xs/src/slic3r/GUI/Tab.cpp:2639 +msgid "the following postfix are not allowed:" +msgstr "" + +#: xs/src/slic3r/GUI/Tab.cpp:2642 msgid "The supplied name is not available." msgstr "" @@ -1407,21 +1429,21 @@ msgstr "" msgid "Save preset" msgstr "" -#: xs/src/slic3r/GUI/Field.cpp:72 +#: xs/src/slic3r/GUI/Field.cpp:82 msgid "default" msgstr "" -#: xs/src/slic3r/GUI/Field.cpp:102 +#: xs/src/slic3r/GUI/Field.cpp:112 #, possible-c-format msgid "%s doesn't support percentage" msgstr "" -#: xs/src/slic3r/GUI/Field.cpp:111 +#: xs/src/slic3r/GUI/Field.cpp:121 msgid "Input value is out of range" msgstr "" #: xs/src/slic3r/GUI/Preset.cpp:657 xs/src/slic3r/GUI/Preset.cpp:714 -#: xs/src/slic3r/GUI/PresetBundle.cpp:1177 lib/Slic3r/GUI/Plater.pm:574 +#: xs/src/slic3r/GUI/PresetBundle.cpp:1177 lib/Slic3r/GUI/Plater.pm:619 msgid "User presets" msgstr "" @@ -1834,19 +1856,35 @@ msgstr "" msgid "Show advanced settings" msgstr "" -#: xs/src/slic3r/Utils/OctoPrint.cpp:47 +#: xs/src/slic3r/Utils/OctoPrint.cpp:33 +msgid "Send G-Code to printer" +msgstr "" + +#: xs/src/slic3r/Utils/OctoPrint.cpp:33 +msgid "Upload to OctoPrint with the following filename:" +msgstr "" + +#: xs/src/slic3r/Utils/OctoPrint.cpp:35 +msgid "Start printing after upload" +msgstr "" + +#: xs/src/slic3r/Utils/OctoPrint.cpp:37 +msgid "Use forward slashes ( / ) as a directory separator if needed." +msgstr "" + +#: xs/src/slic3r/Utils/OctoPrint.cpp:98 msgid "Error while uploading to the OctoPrint server" msgstr "" -#: xs/src/slic3r/Utils/OctoPrint.cpp:51 lib/Slic3r/GUI/Plater.pm:1516 +#: xs/src/slic3r/Utils/OctoPrint.cpp:111 lib/Slic3r/GUI/Plater.pm:1559 msgid "Sending G-code file to the OctoPrint server..." msgstr "" -#: xs/src/slic3r/Utils/OctoPrint.cpp:120 +#: xs/src/slic3r/Utils/OctoPrint.cpp:192 msgid "Invalid API key" msgstr "" -#: xs/src/slic3r/Utils/PresetUpdater.cpp:514 +#: xs/src/slic3r/Utils/PresetUpdater.cpp:533 #, possible-c-format msgid "requires min. %s and max. %s" msgstr "" @@ -1893,11 +1931,11 @@ msgid "" "default extruder and bed temperature are reset using non-wait command; " "however if M104, M109, M140 or M190 are detected in this custom code, Slic3r " "will not add temperature commands. Note that you can use placeholder " -"variables for all Slic3r settings, so you can put a \"M109 " -"S[first_layer_temperature]\" command wherever you want." +"variables for all Slic3r settings, so you can put a \"M109 S" +"[first_layer_temperature]\" command wherever you want." msgstr "" -#: xs/src/libslic3r/PrintConfig.cpp:68 lib/Slic3r/GUI/MainFrame.pm:307 +#: xs/src/libslic3r/PrintConfig.cpp:68 lib/Slic3r/GUI/MainFrame.pm:309 msgid "Bottom" msgstr "" @@ -2226,7 +2264,7 @@ msgid "Extra perimeters if needed" msgstr "" #: xs/src/libslic3r/PrintConfig.cpp:328 -#, possible-c-format +#, no-c-format msgid "" "Add more perimeters when needed for avoiding gaps in sloping walls. Slic3r " "keeps adding perimeters, until more than 70% of the loop immediately above " @@ -2457,7 +2495,7 @@ msgstr "" msgid "Soluble material is most likely used for a soluble support." msgstr "" -#: xs/src/libslic3r/PrintConfig.cpp:539 lib/Slic3r/GUI/Plater.pm:474 +#: xs/src/libslic3r/PrintConfig.cpp:539 lib/Slic3r/GUI/Plater.pm:519 msgid "Cost" msgstr "" @@ -2487,6 +2525,7 @@ msgid "Fill density" msgstr "" #: xs/src/libslic3r/PrintConfig.cpp:566 +#, no-c-format msgid "Density of internal infill, expressed in the range 0% - 100%." msgstr "" @@ -2710,7 +2749,7 @@ msgid "This setting represents the maximum speed of your fan." msgstr "" #: xs/src/libslic3r/PrintConfig.cpp:867 -#, possible-c-format +#, no-c-format msgid "" "This is the highest printable layer height for this extruder, used to cap " "the variable layer height and support layer height. Maximum recommended " @@ -3324,8 +3363,8 @@ msgid "" "detects M104, M109, M140 or M190 in your custom codes, such commands will " "not be prepended automatically so you're free to customize the order of " "heating commands and other custom actions. Note that you can use placeholder " -"variables for all Slic3r settings, so you can put a \"M109 " -"S[first_layer_temperature]\" command wherever you want. If you have multiple " +"variables for all Slic3r settings, so you can put a \"M109 S" +"[first_layer_temperature]\" command wherever you want. If you have multiple " "extruders, the gcode is processed in extruder order." msgstr "" @@ -3580,7 +3619,7 @@ msgid "" "for auto." msgstr "" -#: xs/src/libslic3r/PrintConfig.cpp:1744 lib/Slic3r/GUI/MainFrame.pm:306 +#: xs/src/libslic3r/PrintConfig.cpp:1744 lib/Slic3r/GUI/MainFrame.pm:308 msgid "Top" msgstr "" @@ -3592,7 +3631,8 @@ msgstr "" msgid "Top solid layers" msgstr "" -#: xs/src/libslic3r/PrintConfig.cpp:1753 lib/Slic3r/GUI/Plater/3DPreview.pm:105 +#: xs/src/libslic3r/PrintConfig.cpp:1753 +#: lib/Slic3r/GUI/Plater/3DPreview.pm:105 msgid "Travel" msgstr "" @@ -3803,7 +3843,7 @@ msgstr "" msgid "Tool" msgstr "" -#: lib/Slic3r/GUI.pm:308 +#: lib/Slic3r/GUI.pm:307 msgid "Choose one or more files (STL/OBJ/AMF/3MF/PRUSA):" msgstr "" @@ -3816,891 +3856,898 @@ msgid "" " - Remember to check for updates at http://github.com/prusa3d/slic3r/releases" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:114 +#: lib/Slic3r/GUI/MainFrame.pm:116 msgid "Plater" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:116 +#: lib/Slic3r/GUI/MainFrame.pm:118 msgid "Controller" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:194 +#: lib/Slic3r/GUI/MainFrame.pm:196 msgid "Open STL/OBJ/AMF/3MF…\tCtrl+O" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:194 +#: lib/Slic3r/GUI/MainFrame.pm:196 msgid "Open a model" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:197 +#: lib/Slic3r/GUI/MainFrame.pm:199 msgid "&Load Config…\tCtrl+L" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:197 +#: lib/Slic3r/GUI/MainFrame.pm:199 msgid "Load exported configuration file" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:200 +#: lib/Slic3r/GUI/MainFrame.pm:202 msgid "&Export Config…\tCtrl+E" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:200 +#: lib/Slic3r/GUI/MainFrame.pm:202 msgid "Export current configuration to file" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:203 +#: lib/Slic3r/GUI/MainFrame.pm:205 msgid "&Load Config Bundle…" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:203 +#: lib/Slic3r/GUI/MainFrame.pm:205 msgid "Load presets from a bundle" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:206 +#: lib/Slic3r/GUI/MainFrame.pm:208 msgid "&Export Config Bundle…" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:206 +#: lib/Slic3r/GUI/MainFrame.pm:208 msgid "Export all presets to file" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:211 +#: lib/Slic3r/GUI/MainFrame.pm:213 msgid "Q&uick Slice…\tCtrl+U" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:211 +#: lib/Slic3r/GUI/MainFrame.pm:213 msgid "Slice a file into a G-code" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:217 +#: lib/Slic3r/GUI/MainFrame.pm:219 msgid "Quick Slice and Save &As…\tCtrl+Alt+U" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:217 +#: lib/Slic3r/GUI/MainFrame.pm:219 msgid "Slice a file into a G-code, save as" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:223 +#: lib/Slic3r/GUI/MainFrame.pm:225 msgid "&Repeat Last Quick Slice\tCtrl+Shift+U" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:223 +#: lib/Slic3r/GUI/MainFrame.pm:225 msgid "Repeat last quick slice" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:230 +#: lib/Slic3r/GUI/MainFrame.pm:232 msgid "Slice to SV&G…\tCtrl+G" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:230 +#: lib/Slic3r/GUI/MainFrame.pm:232 msgid "Slice file to a multi-layer SVG" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:234 +#: lib/Slic3r/GUI/MainFrame.pm:236 msgid "(&Re)Slice Now\tCtrl+S" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:234 +#: lib/Slic3r/GUI/MainFrame.pm:236 msgid "Start new slicing process" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:237 +#: lib/Slic3r/GUI/MainFrame.pm:239 msgid "Repair STL file…" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:237 +#: lib/Slic3r/GUI/MainFrame.pm:239 msgid "Automatically repair an STL file" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:241 +#: lib/Slic3r/GUI/MainFrame.pm:243 msgid "&Quit" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:241 +#: lib/Slic3r/GUI/MainFrame.pm:243 msgid "Quit Slic3r" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:251 +#: lib/Slic3r/GUI/MainFrame.pm:253 msgid "Export G-code..." msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:251 +#: lib/Slic3r/GUI/MainFrame.pm:253 msgid "Export current plate as G-code" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:254 +#: lib/Slic3r/GUI/MainFrame.pm:256 msgid "Export plate as STL..." msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:254 +#: lib/Slic3r/GUI/MainFrame.pm:256 msgid "Export current plate as STL" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:257 +#: lib/Slic3r/GUI/MainFrame.pm:259 msgid "Export plate as AMF..." msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:257 +#: lib/Slic3r/GUI/MainFrame.pm:259 msgid "Export current plate as AMF" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:260 +#: lib/Slic3r/GUI/MainFrame.pm:262 msgid "Export plate as 3MF..." msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:260 +#: lib/Slic3r/GUI/MainFrame.pm:262 msgid "Export current plate as 3MF" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:273 +#: lib/Slic3r/GUI/MainFrame.pm:275 msgid "Select &Plater Tab\tCtrl+1" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:273 +#: lib/Slic3r/GUI/MainFrame.pm:275 msgid "Show the plater" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:279 +#: lib/Slic3r/GUI/MainFrame.pm:281 msgid "Select &Controller Tab\tCtrl+T" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:279 +#: lib/Slic3r/GUI/MainFrame.pm:281 msgid "Show the printer controller" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:287 +#: lib/Slic3r/GUI/MainFrame.pm:289 msgid "Select P&rint Settings Tab\tCtrl+2" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:287 +#: lib/Slic3r/GUI/MainFrame.pm:289 msgid "Show the print settings" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:290 +#: lib/Slic3r/GUI/MainFrame.pm:292 msgid "Select &Filament Settings Tab\tCtrl+3" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:290 +#: lib/Slic3r/GUI/MainFrame.pm:292 msgid "Show the filament settings" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:293 +#: lib/Slic3r/GUI/MainFrame.pm:295 msgid "Select Print&er Settings Tab\tCtrl+4" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:293 +#: lib/Slic3r/GUI/MainFrame.pm:295 msgid "Show the printer settings" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:305 +#: lib/Slic3r/GUI/MainFrame.pm:307 msgid "Iso" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:305 +#: lib/Slic3r/GUI/MainFrame.pm:307 msgid "Iso View" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:306 +#: lib/Slic3r/GUI/MainFrame.pm:308 msgid "Top View" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:307 +#: lib/Slic3r/GUI/MainFrame.pm:309 msgid "Bottom View" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:308 +#: lib/Slic3r/GUI/MainFrame.pm:310 msgid "Front" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:308 +#: lib/Slic3r/GUI/MainFrame.pm:310 msgid "Front View" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:309 +#: lib/Slic3r/GUI/MainFrame.pm:311 msgid "Rear" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:309 +#: lib/Slic3r/GUI/MainFrame.pm:311 msgid "Rear View" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:310 +#: lib/Slic3r/GUI/MainFrame.pm:312 msgid "Left" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:310 +#: lib/Slic3r/GUI/MainFrame.pm:312 msgid "Left View" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:311 +#: lib/Slic3r/GUI/MainFrame.pm:313 msgid "Right" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:311 +#: lib/Slic3r/GUI/MainFrame.pm:313 msgid "Right View" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:317 +#: lib/Slic3r/GUI/MainFrame.pm:319 msgid "Prusa 3D Drivers" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:317 +#: lib/Slic3r/GUI/MainFrame.pm:319 msgid "Open the Prusa3D drivers download page in your browser" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:320 +#: lib/Slic3r/GUI/MainFrame.pm:322 msgid "Prusa Edition Releases" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:320 +#: lib/Slic3r/GUI/MainFrame.pm:322 msgid "Open the Prusa Edition releases page in your browser" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:327 +#: lib/Slic3r/GUI/MainFrame.pm:329 msgid "Slic3r &Website" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:327 +#: lib/Slic3r/GUI/MainFrame.pm:329 msgid "Open the Slic3r website in your browser" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:330 +#: lib/Slic3r/GUI/MainFrame.pm:332 msgid "Slic3r &Manual" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:330 +#: lib/Slic3r/GUI/MainFrame.pm:332 msgid "Open the Slic3r manual in your browser" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:334 +#: lib/Slic3r/GUI/MainFrame.pm:336 msgid "System Info" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:334 +#: lib/Slic3r/GUI/MainFrame.pm:336 msgid "Show system information" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:337 +#: lib/Slic3r/GUI/MainFrame.pm:339 msgid "Show &Configuration Folder" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:337 +#: lib/Slic3r/GUI/MainFrame.pm:339 msgid "Show user configuration folder (datadir)" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:340 +#: lib/Slic3r/GUI/MainFrame.pm:342 msgid "Report an Issue" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:340 +#: lib/Slic3r/GUI/MainFrame.pm:342 msgid "Report an issue on the Slic3r Prusa Edition" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:343 +#: lib/Slic3r/GUI/MainFrame.pm:345 msgid "&About Slic3r" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:343 +#: lib/Slic3r/GUI/MainFrame.pm:345 msgid "Show about dialog" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:353 +#: lib/Slic3r/GUI/MainFrame.pm:355 msgid "&File" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:354 +#: lib/Slic3r/GUI/MainFrame.pm:356 msgid "&Plater" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:355 +#: lib/Slic3r/GUI/MainFrame.pm:357 msgid "&Object" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:356 +#: lib/Slic3r/GUI/MainFrame.pm:358 msgid "&Window" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:357 +#: lib/Slic3r/GUI/MainFrame.pm:359 msgid "&View" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:360 +#: lib/Slic3r/GUI/MainFrame.pm:362 msgid "&Help" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:391 +#: lib/Slic3r/GUI/MainFrame.pm:393 msgid "Choose a file to slice (STL/OBJ/AMF/3MF/PRUSA):" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:403 +#: lib/Slic3r/GUI/MainFrame.pm:405 msgid "No previously sliced file." msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:404 lib/Slic3r/GUI/Plater.pm:1363 +#: lib/Slic3r/GUI/MainFrame.pm:406 lib/Slic3r/GUI/Plater.pm:1406 msgid "Error" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:408 +#: lib/Slic3r/GUI/MainFrame.pm:410 msgid "Previously sliced file (" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:408 +#: lib/Slic3r/GUI/MainFrame.pm:410 msgid ") not found." msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:409 +#: lib/Slic3r/GUI/MainFrame.pm:411 msgid "File Not Found" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:448 +#: lib/Slic3r/GUI/MainFrame.pm:450 msgid "SVG" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:448 +#: lib/Slic3r/GUI/MainFrame.pm:450 msgid "G-code" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:448 lib/Slic3r/GUI/Plater.pm:1685 +#: lib/Slic3r/GUI/MainFrame.pm:450 lib/Slic3r/GUI/Plater.pm:1756 msgid " file as:" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:462 +#: lib/Slic3r/GUI/MainFrame.pm:464 msgid "Slicing…" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:462 +#: lib/Slic3r/GUI/MainFrame.pm:464 msgid "Processing " msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:482 +#: lib/Slic3r/GUI/MainFrame.pm:484 msgid " was successfully sliced." msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:484 +#: lib/Slic3r/GUI/MainFrame.pm:486 msgid "Slicing Done!" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:500 +#: lib/Slic3r/GUI/MainFrame.pm:502 msgid "Select the STL file to repair:" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:514 +#: lib/Slic3r/GUI/MainFrame.pm:516 msgid "Save OBJ file (less prone to coordinate errors than STL) as:" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:528 +#: lib/Slic3r/GUI/MainFrame.pm:530 msgid "Your file was repaired." msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:528 +#: lib/Slic3r/GUI/MainFrame.pm:530 msgid "Repair" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:539 +#: lib/Slic3r/GUI/MainFrame.pm:541 msgid "Save configuration as:" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:557 lib/Slic3r/GUI/MainFrame.pm:601 +#: lib/Slic3r/GUI/MainFrame.pm:559 lib/Slic3r/GUI/MainFrame.pm:603 msgid "Select configuration to load:" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:580 +#: lib/Slic3r/GUI/MainFrame.pm:582 msgid "Save presets bundle as:" msgstr "" -#: lib/Slic3r/GUI/MainFrame.pm:621 +#: lib/Slic3r/GUI/MainFrame.pm:623 #, possible-perl-format msgid "%d presets successfully imported." msgstr "" -#: lib/Slic3r/GUI/Plater.pm:112 lib/Slic3r/GUI/Plater.pm:2188 +#: lib/Slic3r/GUI/Plater.pm:140 lib/Slic3r/GUI/Plater.pm:2282 msgid "3D" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:148 +#: lib/Slic3r/GUI/Plater.pm:180 msgid "2D" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:167 +#: lib/Slic3r/GUI/Plater.pm:199 msgid "Layers" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:187 lib/Slic3r/GUI/Plater.pm:205 +#: lib/Slic3r/GUI/Plater.pm:232 lib/Slic3r/GUI/Plater.pm:250 msgid "Add…" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:189 lib/Slic3r/GUI/Plater.pm:207 +#: lib/Slic3r/GUI/Plater.pm:234 lib/Slic3r/GUI/Plater.pm:252 msgid "Delete All" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:190 lib/Slic3r/GUI/Plater.pm:208 +#: lib/Slic3r/GUI/Plater.pm:235 lib/Slic3r/GUI/Plater.pm:253 msgid "Arrange" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:192 +#: lib/Slic3r/GUI/Plater.pm:237 msgid "More" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:193 +#: lib/Slic3r/GUI/Plater.pm:238 msgid "Fewer" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:195 +#: lib/Slic3r/GUI/Plater.pm:240 msgid "45° ccw" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:196 +#: lib/Slic3r/GUI/Plater.pm:241 msgid "45° cw" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:197 lib/Slic3r/GUI/Plater.pm:213 +#: lib/Slic3r/GUI/Plater.pm:242 lib/Slic3r/GUI/Plater.pm:258 msgid "Scale…" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:198 lib/Slic3r/GUI/Plater.pm:214 -#: lib/Slic3r/GUI/Plater.pm:2163 +#: lib/Slic3r/GUI/Plater.pm:243 lib/Slic3r/GUI/Plater.pm:259 +#: lib/Slic3r/GUI/Plater.pm:2252 msgid "Split" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:199 lib/Slic3r/GUI/Plater.pm:215 -#: lib/Slic3r/GUI/Plater.pm:2166 +#: lib/Slic3r/GUI/Plater.pm:244 lib/Slic3r/GUI/Plater.pm:260 +#: lib/Slic3r/GUI/Plater.pm:2255 msgid "Cut…" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:201 lib/Slic3r/GUI/Plater.pm:216 -#: lib/Slic3r/GUI/Plater.pm:2170 +#: lib/Slic3r/GUI/Plater.pm:246 lib/Slic3r/GUI/Plater.pm:261 +#: lib/Slic3r/GUI/Plater.pm:2259 msgid "Settings…" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:202 +#: lib/Slic3r/GUI/Plater.pm:247 msgid "Layer Editing" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:217 +#: lib/Slic3r/GUI/Plater.pm:262 msgid "Layer editing" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:240 +#: lib/Slic3r/GUI/Plater.pm:285 msgid "Name" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:241 lib/Slic3r/GUI/Plater.pm:963 +#: lib/Slic3r/GUI/Plater.pm:286 lib/Slic3r/GUI/Plater.pm:1007 msgid "Copies" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:242 lib/Slic3r/GUI/Plater.pm:1119 -#: lib/Slic3r/GUI/Plater.pm:1124 lib/Slic3r/GUI/Plater.pm:2132 +#: lib/Slic3r/GUI/Plater.pm:287 lib/Slic3r/GUI/Plater.pm:1163 +#: lib/Slic3r/GUI/Plater.pm:1168 lib/Slic3r/GUI/Plater.pm:2221 msgid "Scale" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:256 +#: lib/Slic3r/GUI/Plater.pm:301 msgid "Export G-code…" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:257 +#: lib/Slic3r/GUI/Plater.pm:302 msgid "Slice now" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:258 +#: lib/Slic3r/GUI/Plater.pm:303 msgid "Print…" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:259 +#: lib/Slic3r/GUI/Plater.pm:304 msgid "Send to printer" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:260 +#: lib/Slic3r/GUI/Plater.pm:305 msgid "Export STL…" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:387 +#: lib/Slic3r/GUI/Plater.pm:432 msgid "Print settings" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:389 +#: lib/Slic3r/GUI/Plater.pm:434 msgid "Printer" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:422 +#: lib/Slic3r/GUI/Plater.pm:467 msgid "Info" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:433 +#: lib/Slic3r/GUI/Plater.pm:478 msgid "Volume" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:434 +#: lib/Slic3r/GUI/Plater.pm:479 msgid "Facets" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:435 +#: lib/Slic3r/GUI/Plater.pm:480 msgid "Materials" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:436 +#: lib/Slic3r/GUI/Plater.pm:481 msgid "Manifold" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:462 +#: lib/Slic3r/GUI/Plater.pm:507 msgid "Sliced Info" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:471 +#: lib/Slic3r/GUI/Plater.pm:516 msgid "Used Filament (m)" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:472 +#: lib/Slic3r/GUI/Plater.pm:517 msgid "Used Filament (mm³)" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:473 +#: lib/Slic3r/GUI/Plater.pm:518 msgid "Used Filament (g)" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:475 +#: lib/Slic3r/GUI/Plater.pm:520 msgid "Estimated printing time" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:683 +#: lib/Slic3r/GUI/Plater.pm:728 msgid "Loading…" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:683 lib/Slic3r/GUI/Plater.pm:697 +#: lib/Slic3r/GUI/Plater.pm:728 lib/Slic3r/GUI/Plater.pm:742 msgid "Processing input file\n" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:720 +#: lib/Slic3r/GUI/Plater.pm:765 msgid "" "This file contains several objects positioned at multiple heights. Instead " "of considering them as multiple objects, should I consider\n" "this file as a single object having multiple parts?\n" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:723 lib/Slic3r/GUI/Plater.pm:740 +#: lib/Slic3r/GUI/Plater.pm:768 lib/Slic3r/GUI/Plater.pm:785 msgid "Multi-part object detected" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:737 +#: lib/Slic3r/GUI/Plater.pm:782 msgid "" "Multiple objects were loaded for a multi-material printer.\n" "Instead of considering them as multiple objects, should I consider\n" "these files to represent a single object having multiple parts?\n" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:749 +#: lib/Slic3r/GUI/Plater.pm:794 msgid "Loaded " msgstr "" -#: lib/Slic3r/GUI/Plater.pm:807 +#: lib/Slic3r/GUI/Plater.pm:852 msgid "" "Your object appears to be too large, so it was automatically scaled down to " "fit your print bed." msgstr "" -#: lib/Slic3r/GUI/Plater.pm:808 +#: lib/Slic3r/GUI/Plater.pm:853 msgid "Object too large?" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:963 +#: lib/Slic3r/GUI/Plater.pm:1007 msgid "Enter the number of copies of the selected object:" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:990 +#: lib/Slic3r/GUI/Plater.pm:1034 msgid "" "\n" "Non-positive value." msgstr "" -#: lib/Slic3r/GUI/Plater.pm:991 +#: lib/Slic3r/GUI/Plater.pm:1035 msgid "" "\n" "Not a numeric value." msgstr "" -#: lib/Slic3r/GUI/Plater.pm:992 +#: lib/Slic3r/GUI/Plater.pm:1036 msgid "Slic3r Error" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:1093 +#: lib/Slic3r/GUI/Plater.pm:1057 +msgid "Enter the rotation angle:" +msgstr "" + +#: lib/Slic3r/GUI/Plater.pm:1057 +msgid "Rotate around " +msgstr "" + +#: lib/Slic3r/GUI/Plater.pm:1057 +msgid "Invalid rotation angle entered" +msgstr "" + +#: lib/Slic3r/GUI/Plater.pm:1137 #, possible-perl-format msgid "Enter the new size for the selected object (print bed: %smm):" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:1094 lib/Slic3r/GUI/Plater.pm:1098 +#: lib/Slic3r/GUI/Plater.pm:1138 lib/Slic3r/GUI/Plater.pm:1142 msgid "Scale along " msgstr "" -#: lib/Slic3r/GUI/Plater.pm:1094 lib/Slic3r/GUI/Plater.pm:1098 -#: lib/Slic3r/GUI/Plater.pm:1119 lib/Slic3r/GUI/Plater.pm:1124 +#: lib/Slic3r/GUI/Plater.pm:1138 lib/Slic3r/GUI/Plater.pm:1142 +#: lib/Slic3r/GUI/Plater.pm:1163 lib/Slic3r/GUI/Plater.pm:1168 msgid "Invalid scaling value entered" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:1098 lib/Slic3r/GUI/Plater.pm:1124 -#, possible-perl-format +#: lib/Slic3r/GUI/Plater.pm:1142 lib/Slic3r/GUI/Plater.pm:1168 +#, no-perl-format msgid "Enter the scale % for the selected object:" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:1119 +#: lib/Slic3r/GUI/Plater.pm:1163 msgid "Enter the new max size for the selected object:" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:1175 +#: lib/Slic3r/GUI/Plater.pm:1219 msgid "" "The selected object can't be split because it contains more than one volume/" "material." msgstr "" -#: lib/Slic3r/GUI/Plater.pm:1184 +#: lib/Slic3r/GUI/Plater.pm:1228 msgid "" "The selected object couldn't be split because it contains only one part." msgstr "" -#: lib/Slic3r/GUI/Plater.pm:1349 +#: lib/Slic3r/GUI/Plater.pm:1392 msgid "Slicing cancelled" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:1363 +#: lib/Slic3r/GUI/Plater.pm:1406 msgid "Another export job is currently running." msgstr "" -#: lib/Slic3r/GUI/Plater.pm:1399 -msgid "Save G-code file as:" -msgstr "" - -#: lib/Slic3r/GUI/Plater.pm:1416 -msgid "Export cancelled" -msgstr "" - -#: lib/Slic3r/GUI/Plater.pm:1513 +#: lib/Slic3r/GUI/Plater.pm:1556 msgid "File added to print queue" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:1519 +#: lib/Slic3r/GUI/Plater.pm:1562 msgid "G-code file exported to " msgstr "" -#: lib/Slic3r/GUI/Plater.pm:1522 +#: lib/Slic3r/GUI/Plater.pm:1565 msgid "Export failed" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:1534 +#: lib/Slic3r/GUI/Plater.pm:1577 msgid "OctoPrint upload finished." msgstr "" -#: lib/Slic3r/GUI/Plater.pm:1577 lib/Slic3r/GUI/Plater.pm:1619 +#: lib/Slic3r/GUI/Plater.pm:1620 lib/Slic3r/GUI/Plater.pm:1662 msgid "STL file exported to " msgstr "" -#: lib/Slic3r/GUI/Plater.pm:1630 +#: lib/Slic3r/GUI/Plater.pm:1701 msgid "AMF file exported to " msgstr "" -#: lib/Slic3r/GUI/Plater.pm:1634 +#: lib/Slic3r/GUI/Plater.pm:1705 msgid "Error exporting AMF file " msgstr "" -#: lib/Slic3r/GUI/Plater.pm:1646 +#: lib/Slic3r/GUI/Plater.pm:1717 msgid "3MF file exported to " msgstr "" -#: lib/Slic3r/GUI/Plater.pm:1650 +#: lib/Slic3r/GUI/Plater.pm:1721 msgid "Error exporting 3MF file " msgstr "" -#: lib/Slic3r/GUI/Plater.pm:1897 -msgid "" -"Please install the OpenGL modules to use this feature (see build " -"instructions)." -msgstr "" - -#: lib/Slic3r/GUI/Plater.pm:2010 +#: lib/Slic3r/GUI/Plater.pm:2099 #, possible-perl-format msgid "%d (%d shells)" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2012 +#: lib/Slic3r/GUI/Plater.pm:2101 #, possible-perl-format msgid "Auto-repaired (%d errors)" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2017 +#: lib/Slic3r/GUI/Plater.pm:2106 #, possible-perl-format msgid "" "%d degenerate facets, %d edges fixed, %d facets removed, %d facets added, %d " "facets reversed, %d backwards edges" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2022 +#: lib/Slic3r/GUI/Plater.pm:2111 msgid "Yes" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2085 +#: lib/Slic3r/GUI/Plater.pm:2174 msgid "Remove the selected object" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2088 +#: lib/Slic3r/GUI/Plater.pm:2177 msgid "Increase copies" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2088 +#: lib/Slic3r/GUI/Plater.pm:2177 msgid "Place one more copy of the selected object" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2091 +#: lib/Slic3r/GUI/Plater.pm:2180 msgid "Decrease copies" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2091 +#: lib/Slic3r/GUI/Plater.pm:2180 msgid "Remove one copy of the selected object" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2094 +#: lib/Slic3r/GUI/Plater.pm:2183 msgid "Set number of copies…" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2094 +#: lib/Slic3r/GUI/Plater.pm:2183 msgid "Change the number of copies of the selected object" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2098 +#: lib/Slic3r/GUI/Plater.pm:2187 msgid "Rotate 45° clockwise" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2098 +#: lib/Slic3r/GUI/Plater.pm:2187 msgid "Rotate the selected object by 45° clockwise" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2101 +#: lib/Slic3r/GUI/Plater.pm:2190 msgid "Rotate 45° counter-clockwise" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2101 +#: lib/Slic3r/GUI/Plater.pm:2190 msgid "Rotate the selected object by 45° counter-clockwise" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2106 +#: lib/Slic3r/GUI/Plater.pm:2195 msgid "Rotate" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2106 +#: lib/Slic3r/GUI/Plater.pm:2195 msgid "Rotate the selected object by an arbitrary angle" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2108 +#: lib/Slic3r/GUI/Plater.pm:2197 msgid "Around X axis…" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2108 +#: lib/Slic3r/GUI/Plater.pm:2197 msgid "Rotate the selected object by an arbitrary angle around X axis" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2111 +#: lib/Slic3r/GUI/Plater.pm:2200 msgid "Around Y axis…" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2111 +#: lib/Slic3r/GUI/Plater.pm:2200 msgid "Rotate the selected object by an arbitrary angle around Y axis" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2114 +#: lib/Slic3r/GUI/Plater.pm:2203 msgid "Around Z axis…" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2114 +#: lib/Slic3r/GUI/Plater.pm:2203 msgid "Rotate the selected object by an arbitrary angle around Z axis" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2119 +#: lib/Slic3r/GUI/Plater.pm:2208 msgid "Mirror" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2119 +#: lib/Slic3r/GUI/Plater.pm:2208 msgid "Mirror the selected object" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2121 lib/Slic3r/GUI/Plater.pm:2137 -#: lib/Slic3r/GUI/Plater.pm:2153 +#: lib/Slic3r/GUI/Plater.pm:2210 lib/Slic3r/GUI/Plater.pm:2226 +#: lib/Slic3r/GUI/Plater.pm:2242 msgid "Along X axis…" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2121 +#: lib/Slic3r/GUI/Plater.pm:2210 msgid "Mirror the selected object along the X axis" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2124 lib/Slic3r/GUI/Plater.pm:2140 -#: lib/Slic3r/GUI/Plater.pm:2156 +#: lib/Slic3r/GUI/Plater.pm:2213 lib/Slic3r/GUI/Plater.pm:2229 +#: lib/Slic3r/GUI/Plater.pm:2245 msgid "Along Y axis…" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2124 +#: lib/Slic3r/GUI/Plater.pm:2213 msgid "Mirror the selected object along the Y axis" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2127 lib/Slic3r/GUI/Plater.pm:2143 -#: lib/Slic3r/GUI/Plater.pm:2159 +#: lib/Slic3r/GUI/Plater.pm:2216 lib/Slic3r/GUI/Plater.pm:2232 +#: lib/Slic3r/GUI/Plater.pm:2248 msgid "Along Z axis…" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2127 +#: lib/Slic3r/GUI/Plater.pm:2216 msgid "Mirror the selected object along the Z axis" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2132 lib/Slic3r/GUI/Plater.pm:2148 +#: lib/Slic3r/GUI/Plater.pm:2221 lib/Slic3r/GUI/Plater.pm:2237 msgid "Scale the selected object along a single axis" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2134 lib/Slic3r/GUI/Plater.pm:2150 +#: lib/Slic3r/GUI/Plater.pm:2223 lib/Slic3r/GUI/Plater.pm:2239 msgid "Uniformly…" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2134 lib/Slic3r/GUI/Plater.pm:2150 +#: lib/Slic3r/GUI/Plater.pm:2223 lib/Slic3r/GUI/Plater.pm:2239 msgid "Scale the selected object along the XYZ axes" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2137 lib/Slic3r/GUI/Plater.pm:2153 +#: lib/Slic3r/GUI/Plater.pm:2226 lib/Slic3r/GUI/Plater.pm:2242 msgid "Scale the selected object along the X axis" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2140 lib/Slic3r/GUI/Plater.pm:2156 +#: lib/Slic3r/GUI/Plater.pm:2229 lib/Slic3r/GUI/Plater.pm:2245 msgid "Scale the selected object along the Y axis" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2143 lib/Slic3r/GUI/Plater.pm:2159 +#: lib/Slic3r/GUI/Plater.pm:2232 lib/Slic3r/GUI/Plater.pm:2248 msgid "Scale the selected object along the Z axis" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2148 +#: lib/Slic3r/GUI/Plater.pm:2237 msgid "Scale to size" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2163 +#: lib/Slic3r/GUI/Plater.pm:2252 msgid "Split the selected object into individual parts" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2166 +#: lib/Slic3r/GUI/Plater.pm:2255 msgid "Open the 3D cutting tool" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2170 +#: lib/Slic3r/GUI/Plater.pm:2259 msgid "Open the object editor dialog" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2174 +#: lib/Slic3r/GUI/Plater.pm:2263 msgid "Reload from Disk" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2174 +#: lib/Slic3r/GUI/Plater.pm:2263 msgid "Reload the selected file from Disk" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2177 +#: lib/Slic3r/GUI/Plater.pm:2266 msgid "Export object as STL…" msgstr "" -#: lib/Slic3r/GUI/Plater.pm:2177 +#: lib/Slic3r/GUI/Plater.pm:2266 msgid "Export this single object as STL file" msgstr "" +#: lib/Slic3r/GUI/Plater.pm:2270 +msgid "Fix STL through Netfabb" +msgstr "" + +#: lib/Slic3r/GUI/Plater.pm:2270 +msgid "" +"Fix the model by sending it to a Netfabb cloud service through Windows 10 API" +msgstr "" + #: lib/Slic3r/GUI/Plater/2D.pm:131 msgid "What do you want to print today? ™" msgstr "" diff --git a/resources/localization/list.txt b/resources/localization/list.txt index 0fd528994..a4d07b617 100644 --- a/resources/localization/list.txt +++ b/resources/localization/list.txt @@ -6,6 +6,7 @@ xs/src/slic3r/GUI/ButtonsDescription.cpp xs/src/slic3r/GUI/ConfigSnapshotDialog.cpp xs/src/slic3r/GUI/ConfigWizard.cpp xs/src/slic3r/GUI/FirmwareDialog.cpp +xs/src/slic3r/GUI/GLCanvas3D.cpp xs/src/slic3r/GUI/GUI.cpp xs/src/slic3r/GUI/MsgDialog.cpp xs/src/slic3r/GUI/Tab.cpp From 59510c42d1b2e03a9d08dedc5d330801f12e269a Mon Sep 17 00:00:00 2001 From: bubnikv Date: Tue, 26 Jun 2018 11:31:01 +0200 Subject: [PATCH 060/198] When loading an archive (AMF/3MF/Config), the original name of the profile is show in braces next to the file name. --- xs/src/slic3r/GUI/Preset.cpp | 53 +++++++++++++++++++++++------- xs/src/slic3r/GUI/PresetBundle.cpp | 27 ++++++++------- 2 files changed, 57 insertions(+), 23 deletions(-) diff --git a/xs/src/slic3r/GUI/Preset.cpp b/xs/src/slic3r/GUI/Preset.cpp index 120e1c9a7..d52ea6215 100644 --- a/xs/src/slic3r/GUI/Preset.cpp +++ b/xs/src/slic3r/GUI/Preset.cpp @@ -427,6 +427,19 @@ Preset& PresetCollection::load_preset(const std::string &path, const std::string return this->load_preset(path, name, std::move(cfg), select); } +static bool profile_print_params_same(const DynamicPrintConfig &cfg1, const DynamicPrintConfig &cfg2) +{ + t_config_option_keys diff = cfg1.diff(cfg2); + // Following keys are used by the UI, not by the slicing core, therefore they are not important + // when comparing profiles for equality. Ignore them. + for (const char *key : { "compatible_printers", "compatible_printers_condition", "inherits", + "print_settings_id", "filament_settings_id", "printer_settings_id", + "printer_model", "printer_variant", "default_print_profile", "default_filament_profile" }) + diff.erase(std::remove(diff.begin(), diff.end(), key), diff.end()); + // Preset with the same name as stored inside the config exists. + return diff.empty(); +} + // Load a preset from an already parsed config file, insert it into the sorted sequence of presets // and select it, losing previous modifications. // In case @@ -447,24 +460,40 @@ Preset& PresetCollection::load_external_preset( cfg.apply_only(config, cfg.keys(), true); // Is there a preset already loaded with the name stored inside the config? std::deque::iterator it = original_name.empty() ? m_presets.end() : this->find_preset_internal(original_name); - if (it != m_presets.end()) { - t_config_option_keys diff = it->config.diff(cfg); - // Following keys are used by the UI, not by the slicing core, therefore they are not important - // when comparing profiles for equality. Ignore them. - for (const char *key : { "compatible_printers", "compatible_printers_condition", "inherits", - "print_settings_id", "filament_settings_id", "printer_settings_id", - "printer_model", "printer_variant", "default_print_profile", "default_filament_profile" }) - diff.erase(std::remove(diff.begin(), diff.end(), key), diff.end()); - // Preset with the same name as stored inside the config exists. - if (diff.empty()) { + if (it != m_presets.end() && profile_print_params_same(it->config, cfg)) { + // The preset exists and it matches the values stored inside config. + if (select) + this->select_preset(it - m_presets.begin()); + return *it; + } + // The external preset does not match an internal preset, load the external preset. + std::string new_name; + for (size_t idx = 0;; ++ idx) { + std::string suffix; + if (original_name.empty()) { + if (idx > 0) + suffix = " (" + std::to_string(idx) + ")"; + } else { + if (idx == 0) + suffix = " (" + original_name + ")"; + else + suffix = " (" + original_name + "-" + std::to_string(idx) + ")"; + } + new_name = name + suffix; + it = this->find_preset_internal(new_name); + if (it == m_presets.end()) + // Unique profile name. Insert a new profile. + break; + if (profile_print_params_same(it->config, cfg)) { // The preset exists and it matches the values stored inside config. if (select) this->select_preset(it - m_presets.begin()); return *it; } + // Form another profile name. } - // The external preset does not match an internal preset, load the external preset. - Preset &preset = this->load_preset(path, name, std::move(cfg), select); + // Insert a new profile. + Preset &preset = this->load_preset(path, new_name, std::move(cfg), select); preset.is_external = true; return preset; } diff --git a/xs/src/slic3r/GUI/PresetBundle.cpp b/xs/src/slic3r/GUI/PresetBundle.cpp index 147975f16..fcf8ce859 100644 --- a/xs/src/slic3r/GUI/PresetBundle.cpp +++ b/xs/src/slic3r/GUI/PresetBundle.cpp @@ -618,21 +618,26 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool // Load the configs into this->filaments and make them active. this->filament_presets.clear(); for (size_t i = 0; i < configs.size(); ++ i) { - char suffix[64]; - if (i == 0) - suffix[0] = 0; - else - sprintf(suffix, " (%d)", i); - std::string new_name = name + suffix; // Load all filament presets, but only select the first one in the preset dialog. + Preset *loaded = nullptr; if (is_external) - this->filaments.load_external_preset(name_or_path, new_name, + loaded = &this->filaments.load_external_preset(name_or_path, name, (i < old_filament_profile_names->values.size()) ? old_filament_profile_names->values[i] : "", std::move(configs[i]), i == 0); - else - this->filaments.load_preset(this->filaments.path_from_name(new_name), - new_name, std::move(configs[i]), i == 0).save(); - this->filament_presets.emplace_back(new_name); + else { + // Used by the config wizard when creating a custom setup. + // Therefore this block should only be called for a single extruder. + char suffix[64]; + if (i == 0) + suffix[0] = 0; + else + sprintf(suffix, "%d", i); + std::string new_name = name + suffix; + loaded = &this->filaments.load_preset(this->filaments.path_from_name(new_name), + new_name, std::move(configs[i]), i == 0); + loaded->save(); + } + this->filament_presets.emplace_back(loaded->name); } } From 87c1654e31d489bca2575d09c382f311f1e6279d Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Tue, 26 Jun 2018 12:19:19 +0200 Subject: [PATCH 061/198] Fixed bed update when changing selected printer --- lib/Slic3r/GUI/Plater.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index e6b2fca79..96bddd466 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -1890,6 +1890,8 @@ sub on_config_change { $update_scheduled = 1; } elsif ($opt_key eq 'printer_model') { # update to force bed selection (for texturing) + Slic3r::GUI::_3DScene::set_bed_shape($self->{canvas3D}, $self->{config}->bed_shape) if $self->{canvas3D}; + Slic3r::GUI::_3DScene::set_bed_shape($self->{preview3D}->canvas, $self->{config}->bed_shape) if $self->{preview3D}; $update_scheduled = 1; } } From bd1d70d8d36dbcf055b521f7ce50b4cfb611e714 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Tue, 26 Jun 2018 12:50:04 +0200 Subject: [PATCH 062/198] Fixed crash when slicing from Layers tab --- lib/Slic3r/GUI/Plater/2D.pm | 1 - lib/Slic3r/GUI/Plater/3DPreview.pm | 1 + xs/src/slic3r/GUI/GLCanvas3D.cpp | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/GUI/Plater/2D.pm b/lib/Slic3r/GUI/Plater/2D.pm index 83c2a5021..88a05c292 100644 --- a/lib/Slic3r/GUI/Plater/2D.pm +++ b/lib/Slic3r/GUI/Plater/2D.pm @@ -233,7 +233,6 @@ sub mouse_event { } elsif ($event->LeftUp) { if ($self->{drag_object}) { $self->{on_instances_moved}->(); - Slic3r::GUI::_3DScene::reset_current_canvas(); } $self->{drag_start_pos} = undef; $self->{drag_object} = undef; diff --git a/lib/Slic3r/GUI/Plater/3DPreview.pm b/lib/Slic3r/GUI/Plater/3DPreview.pm index 9ed2374ec..c7dab869f 100644 --- a/lib/Slic3r/GUI/Plater/3DPreview.pm +++ b/lib/Slic3r/GUI/Plater/3DPreview.pm @@ -279,6 +279,7 @@ sub reload_print { my ($self, $force) = @_; Slic3r::GUI::_3DScene::reset_volumes($self->canvas); + Slic3r::GUI::_3DScene::reset_current_canvas(); $self->_loaded(0); if (! $self->IsShown && ! $force) { diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index f5db97731..2148579e8 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -2376,7 +2376,7 @@ void GLCanvas3D::load_gcode_preview(const GCodePreviewData& preview_data, const if ((m_canvas != nullptr) && (m_print != nullptr)) { // ensures that this canvas is current - if (!_3DScene::set_current(m_canvas, false)) + if (!_3DScene::set_current(m_canvas, true)) return; if (m_volumes.empty()) From 22463343a738f7a36b6d59cd038b77a7ec83d8de Mon Sep 17 00:00:00 2001 From: bubnikv Date: Tue, 26 Jun 2018 13:22:24 +0200 Subject: [PATCH 063/198] Fixed integration tests. --- xs/src/libslic3r/GCode.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 16f8ac736..b007fbea0 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1419,11 +1419,14 @@ void GCode::append_full_config(const Print& print, std::string& str) str += "; " + key + " = " + cfg->serialize(key) + "\n"; } const DynamicConfig &full_config = print.placeholder_parser.config(); - for (const char *key : { - "print_settings_id", "filament_settings_id", "printer_settings_id", - "printer_model", "printer_variant", "default_print_profile", "default_filament_profile", - "compatible_printers_condition", "inherits" }) - str += std::string("; ") + key + " = " + full_config.serialize(key) + "\n"; + for (const char *key : { + "print_settings_id", "filament_settings_id", "printer_settings_id", + "printer_model", "printer_variant", "default_print_profile", "default_filament_profile", + "compatible_printers_condition", "inherits" }) { + const ConfigOption *opt = full_config.option(key); + if (opt != nullptr) + str += std::string("; ") + key + " = " + opt->serialize() + "\n"; + } } void GCode::set_extruders(const std::vector &extruder_ids) From f8388abe17f8fbb119cc8d60aac4fa047e454952 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Tue, 26 Jun 2018 14:12:25 +0200 Subject: [PATCH 064/198] 'Dontcare' extrusions now don't force a toolchange + code reorganization --- xs/src/libslic3r/GCode.cpp | 14 +- xs/src/libslic3r/GCode.hpp | 2 +- xs/src/libslic3r/GCode/ToolOrdering.cpp | 194 ++++++++++++++++++++++-- xs/src/libslic3r/GCode/ToolOrdering.hpp | 106 +++++++------ xs/src/libslic3r/Print.cpp | 113 +------------- xs/src/libslic3r/Print.hpp | 10 +- 6 files changed, 259 insertions(+), 180 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index b06232a92..1271ee9ee 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -764,7 +764,7 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) } // Extrude the layers. for (auto &layer : layers_to_print) { - const ToolOrdering::LayerTools &layer_tools = tool_ordering.tools_for_layer(layer.first); + const LayerTools &layer_tools = tool_ordering.tools_for_layer(layer.first); if (m_wipe_tower && layer_tools.has_wipe_tower) m_wipe_tower->next_layer(); this->process_layer(file, print, layer.second, layer_tools, size_t(-1)); @@ -1009,7 +1009,7 @@ void GCode::process_layer( const Print &print, // Set of object & print layers of the same PrintObject and with the same print_z. const std::vector &layers, - const ToolOrdering::LayerTools &layer_tools, + const LayerTools &layer_tools, // If set to size_t(-1), then print all copies of all objects. // Otherwise print a single copy of a single object. const size_t single_object_idx) @@ -1239,18 +1239,20 @@ void GCode::process_layer( continue; // This extrusion is part of certain Region, which tells us which extruder should be used for it: - int correct_extruder_id = get_extruder(fill, region); entity_type=="infills" ? std::max(0, (is_solid_infill(fill->entities.front()->role()) ? region.config.solid_infill_extruder : region.config.infill_extruder) - 1) : + int correct_extruder_id = get_extruder(*fill, region); entity_type=="infills" ? std::max(0, (is_solid_infill(fill->entities.front()->role()) ? region.config.solid_infill_extruder : region.config.infill_extruder) - 1) : std::max(region.config.perimeter_extruder.value - 1, 0); // Let's recover vector of extruder overrides: - const ExtruderPerCopy* entity_overrides = const_cast(layer_tools).wiping_extrusions.get_extruder_overrides(fill, correct_extruder_id, layer_to_print.object()->_shifted_copies.size()); + const ExtruderPerCopy* entity_overrides = const_cast(layer_tools).wiping_extrusions.get_extruder_overrides(fill, correct_extruder_id, layer_to_print.object()->_shifted_copies.size()); // Now we must add this extrusion into the by_extruder map, once for each extruder that will print it: for (unsigned int extruder : layer_tools.extruders) { // Init by_extruder item only if we actually use the extruder: - if (std::find(entity_overrides->begin(), entity_overrides->end(), extruder) != entity_overrides->end() || // at least one copy is overridden to use this extruder - std::find(entity_overrides->begin(), entity_overrides->end(), -extruder-1) != entity_overrides->end()) // at least one copy would normally be printed with this extruder (see get_extruder_overrides function for explanation) + if (std::find(entity_overrides->begin(), entity_overrides->end(), extruder) != entity_overrides->end() || // at least one copy is overridden to use this extruder + std::find(entity_overrides->begin(), entity_overrides->end(), -extruder-1) != entity_overrides->end() || // at least one copy would normally be printed with this extruder (see get_extruder_overrides function for explanation) + (std::find(layer_tools.extruders.begin(), layer_tools.extruders.end(), correct_extruder_id) == layer_tools.extruders.end() && extruder == layer_tools.extruders.back())) // this entity is not overridden, but its extruder is not in layer_tools - we'll print it + //by last extruder on this layer (could happen e.g. when a wiping object is taller than others - dontcare extruders are eradicated from layer_tools) { std::vector &islands = object_islands_by_extruder( by_extruder, diff --git a/xs/src/libslic3r/GCode.hpp b/xs/src/libslic3r/GCode.hpp index ad3f1e26b..a5c63f208 100644 --- a/xs/src/libslic3r/GCode.hpp +++ b/xs/src/libslic3r/GCode.hpp @@ -185,7 +185,7 @@ protected: const Print &print, // Set of object & print layers of the same PrintObject and with the same print_z. const std::vector &layers, - const ToolOrdering::LayerTools &layer_tools, + const LayerTools &layer_tools, // If set to size_t(-1), then print all copies of all objects. // Otherwise print a single copy of a single object. const size_t single_object_idx = size_t(-1)); diff --git a/xs/src/libslic3r/GCode/ToolOrdering.cpp b/xs/src/libslic3r/GCode/ToolOrdering.cpp index 719f7a97a..34bb32e65 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.cpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.cpp @@ -48,6 +48,7 @@ ToolOrdering::ToolOrdering(const PrintObject &object, unsigned int first_extrude // (print.config.complete_objects is false). ToolOrdering::ToolOrdering(const Print &print, unsigned int first_extruder, bool prime_multi_material) { + m_print_config_ptr = &print.config; // Initialize the print layers for all objects and all layers. coordf_t object_bottom_z = 0.; { @@ -77,9 +78,9 @@ ToolOrdering::ToolOrdering(const Print &print, unsigned int first_extruder, bool } -ToolOrdering::LayerTools& ToolOrdering::tools_for_layer(coordf_t print_z) +LayerTools& ToolOrdering::tools_for_layer(coordf_t print_z) { - auto it_layer_tools = std::lower_bound(m_layer_tools.begin(), m_layer_tools.end(), ToolOrdering::LayerTools(print_z - EPSILON)); + auto it_layer_tools = std::lower_bound(m_layer_tools.begin(), m_layer_tools.end(), LayerTools(print_z - EPSILON)); assert(it_layer_tools != m_layer_tools.end()); coordf_t dist_min = std::abs(it_layer_tools->print_z - print_z); for (++ it_layer_tools; it_layer_tools != m_layer_tools.end(); ++it_layer_tools) { @@ -103,7 +104,7 @@ void ToolOrdering::initialize_layers(std::vector &zs) coordf_t zmax = zs[i] + EPSILON; for (; j < zs.size() && zs[j] <= zmax; ++ j) ; // Assign an average print_z to the set of layers with nearly equal print_z. - m_layer_tools.emplace_back(LayerTools(0.5 * (zs[i] + zs[j-1]))); + m_layer_tools.emplace_back(LayerTools(0.5 * (zs[i] + zs[j-1]), m_print_config_ptr)); i = j; } } @@ -135,12 +136,25 @@ void ToolOrdering::collect_extruders(const PrintObject &object) if (layerm == nullptr) continue; const PrintRegion ®ion = *object.print()->regions[region_id]; + if (! layerm->perimeters.entities.empty()) { - layer_tools.extruders.push_back(region.config.perimeter_extruder.value); + bool something_nonoverriddable = false; + for (const auto& eec : layerm->perimeters.entities) // let's check if there are nonoverriddable entities + if (!layer_tools.wiping_extrusions.is_overriddable(dynamic_cast(*eec), *m_print_config_ptr, object, region)) { + something_nonoverriddable = true; + break; + } + + if (something_nonoverriddable) + layer_tools.extruders.push_back(region.config.perimeter_extruder.value); + layer_tools.has_object = true; } + + bool has_infill = false; bool has_solid_infill = false; + bool something_nonoverriddable = false; for (const ExtrusionEntity *ee : layerm->fills.entities) { // fill represents infill extrusions of a single island. const auto *fill = dynamic_cast(ee); @@ -149,19 +163,32 @@ void ToolOrdering::collect_extruders(const PrintObject &object) has_solid_infill = true; else if (role != erNone) has_infill = true; + + if (!something_nonoverriddable && !layer_tools.wiping_extrusions.is_overriddable(*fill, *m_print_config_ptr, object, region)) + something_nonoverriddable = true; + } + if (something_nonoverriddable) + { + if (has_solid_infill) + layer_tools.extruders.push_back(region.config.solid_infill_extruder); + if (has_infill) + layer_tools.extruders.push_back(region.config.infill_extruder); } - if (has_solid_infill) - layer_tools.extruders.push_back(region.config.solid_infill_extruder); - if (has_infill) - layer_tools.extruders.push_back(region.config.infill_extruder); if (has_solid_infill || has_infill) layer_tools.has_object = true; } } - // Sort and remove duplicates - for (LayerTools < : m_layer_tools) - sort_remove_duplicates(lt.extruders); + // Sort and remove duplicates, make sure that there are some tools for each object layer (e.g. tall wiping object will result in empty extruders vector) + for (auto lt_it=m_layer_tools.begin(); lt_it != m_layer_tools.end(); ++lt_it) { + sort_remove_duplicates(lt_it->extruders); + + if (lt_it->extruders.empty() && lt_it->has_object) + if (lt_it != m_layer_tools.begin()) + lt_it->extruders.push_back(std::prev(lt_it)->extruders.back()); + else + lt_it->extruders.push_back(1); + } } // Reorder extruders to minimize layer changes. @@ -348,6 +375,151 @@ void WipingExtrusions::set_extruder_override(const ExtrusionEntity* entity, unsi } +// Finds last non-soluble extruder on the layer +bool WipingExtrusions::is_last_nonsoluble_on_layer(const PrintConfig& print_config, const LayerTools& lt, unsigned int extruder) const { + for (auto extruders_it = lt.extruders.rbegin(); extruders_it != lt.extruders.rend(); ++extruders_it) + if (!print_config.filament_soluble.get_at(*extruders_it)) + return (*extruders_it == extruder); + return false; +} + + +// Decides whether this entity could be overridden +bool WipingExtrusions::is_overriddable(const ExtrusionEntityCollection& eec, const PrintConfig& print_config, const PrintObject& object, const PrintRegion& region) const { + if ((!is_infill(eec.role()) && !object.config.wipe_into_objects) || + ((eec.role() == erTopSolidInfill || eec.role() == erGapFill) && !object.config.wipe_into_objects) || + (is_infill(eec.role()) && !region.config.wipe_into_infill) || + (print_config.filament_soluble.get_at(get_extruder(eec, region))) ) + return false; + + return true; +} + + +// Following function iterates through all extrusions on the layer, remembers those that could be used for wiping after toolchange +// and returns volume that is left to be wiped on the wipe tower. +float WipingExtrusions::mark_wiping_extrusions(const Print& print, const LayerTools& layer_tools, unsigned int new_extruder, float volume_to_wipe) +{ + const float min_infill_volume = 0.f; // ignore infill with smaller volume than this + + if (print.config.filament_soluble.get_at(new_extruder)) + return volume_to_wipe; // Soluble filament cannot be wiped in a random infill + + bool last_nonsoluble = is_last_nonsoluble_on_layer(print.config, layer_tools, new_extruder); + + // we will sort objects so that dedicated for wiping are at the beginning: + PrintObjectPtrs object_list = print.objects; + std::sort(object_list.begin(), object_list.end(), [](const PrintObject* a, const PrintObject* b) { return a->config.wipe_into_objects; }); + + + // We will now iterate through + // - first the dedicated objects to mark perimeters or infills (depending on infill_first) + // - second through the dedicated ones again to mark infills or perimeters (depending on infill_first) + // - then all the others to mark infills (in case that !infill_first, we must also check that the perimeter is finished already + // this is controlled by the following variable: + bool perimeters_done = false; + + for (int i=0 ; i<(int)object_list.size() ; ++i) { + const auto& object = object_list[i]; + + if (!perimeters_done && (i+1==(int)object_list.size() || !object_list[i]->config.wipe_into_objects)) { // we passed the last dedicated object in list + perimeters_done = true; + i=-1; // let's go from the start again + continue; + } + + // Finds this layer: + auto this_layer_it = std::find_if(object->layers.begin(), object->layers.end(), [&layer_tools](const Layer* lay) { return std::abs(layer_tools.print_z - lay->print_z)layers.end()) + continue; + const Layer* this_layer = *this_layer_it; + unsigned int num_of_copies = object->_shifted_copies.size(); + + for (unsigned int copy = 0; copy < num_of_copies; ++copy) { // iterate through copies first, so that we mark neighbouring infills to minimize travel moves + + for (size_t region_id = 0; region_id < object->print()->regions.size(); ++ region_id) { + const auto& region = *object->print()->regions[region_id]; + + if (!region.config.wipe_into_infill && !object->config.wipe_into_objects) + continue; + + + if (((!print.config.infill_first ? perimeters_done : !perimeters_done) || !object->config.wipe_into_objects) && region.config.wipe_into_infill) { + const ExtrusionEntityCollection& eec = this_layer->regions[region_id]->fills; + for (const ExtrusionEntity* ee : eec.entities) { // iterate through all infill Collections + auto* fill = dynamic_cast(ee); + + if (fill->role() == erTopSolidInfill || fill->role() == erGapFill) // these cannot be changed - such infill is / may be visible + continue; + + // What extruder would this normally be printed with? + unsigned int correct_extruder = get_extruder(*fill, region); + + bool force_override = false; + // If the extruder is not in layer tools - we MUST override it. This happens whenever all extrusions, that would normally + // be printed with this extruder on this layer are "dont care" (part of infill/perimeter wiping): + if (last_nonsoluble && std::find(layer_tools.extruders.begin(), layer_tools.extruders.end(), correct_extruder) == layer_tools.extruders.end()) + force_override = true; + if (!force_override && volume_to_wipe<=0) + continue; + + if (!is_overriddable(*fill, print.config, *object, region)) + continue; + + if (!object->config.wipe_into_objects && !print.config.infill_first && !force_override) { + // In this case we must check that the original extruder is used on this layer before the one we are overridding + // (and the perimeters will be finished before the infill is printed): + if ((!print.config.infill_first && region.config.wipe_into_infill)) { + bool unused_yet = false; + for (unsigned i = 0; i < layer_tools.extruders.size(); ++i) { + if (layer_tools.extruders[i] == new_extruder) + unused_yet = true; + if (layer_tools.extruders[i] == correct_extruder) + break; + } + if (unused_yet) + continue; + } + } + + if (force_override || (!is_entity_overridden(fill, copy) && fill->total_volume() > min_infill_volume)) { // this infill will be used to wipe this extruder + set_extruder_override(fill, copy, new_extruder, num_of_copies); + volume_to_wipe -= fill->total_volume(); + } + } + } + + + if (object->config.wipe_into_objects && (print.config.infill_first ? perimeters_done : !perimeters_done)) + { + const ExtrusionEntityCollection& eec = this_layer->regions[region_id]->perimeters; + for (const ExtrusionEntity* ee : eec.entities) { // iterate through all perimeter Collections + auto* fill = dynamic_cast(ee); + // What extruder would this normally be printed with? + unsigned int correct_extruder = get_extruder(*fill, region); + bool force_override = false; + if (last_nonsoluble && std::find(layer_tools.extruders.begin(), layer_tools.extruders.end(), correct_extruder) == layer_tools.extruders.end()) + force_override = true; + if (!force_override && volume_to_wipe<=0) + continue; + + if (!is_overriddable(*fill, print.config, *object, region)) + continue; + + if (force_override || (!is_entity_overridden(fill, copy) && fill->total_volume() > min_infill_volume)) { + set_extruder_override(fill, copy, new_extruder, num_of_copies); + volume_to_wipe -= fill->total_volume(); + } + } + } + } + } + } + return std::max(0.f, volume_to_wipe); +} + + + // Following function is called from process_layer and returns pointer to vector with information about which extruders should be used for given copy of this entity. // It first makes sure the pointer is valid (creates the vector if it does not exist) and contains a record for each copy diff --git a/xs/src/libslic3r/GCode/ToolOrdering.hpp b/xs/src/libslic3r/GCode/ToolOrdering.hpp index 241567a75..862b58f67 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.hpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.hpp @@ -9,6 +9,8 @@ namespace Slic3r { class Print; class PrintObject; +class LayerTools; + // Object of this class holds information about whether an extrusion is printed immediately @@ -16,65 +18,74 @@ class PrintObject; // of several copies - this has to be taken into account. class WipingExtrusions { - public: +public: bool is_anything_overridden() const { // if there are no overrides, all the agenda can be skipped - this function can tell us if that's the case return something_overridden; } + // This is called from GCode::process_layer - see implementation for further comments: + const std::vector* get_extruder_overrides(const ExtrusionEntity* entity, int correct_extruder_id, int num_of_copies); + + // This function goes through all infill entities, decides which ones will be used for wiping and + // marks them by the extruder id. Returns volume that remains to be wiped on the wipe tower: + float mark_wiping_extrusions(const Print& print, const LayerTools& layer_tools, unsigned int new_extruder, float volume_to_wipe); + + bool is_overriddable(const ExtrusionEntityCollection& ee, const PrintConfig& print_config, const PrintObject& object, const PrintRegion& region) const; + +private: + bool is_last_nonsoluble_on_layer(const PrintConfig& print_config, const LayerTools& lt, unsigned int extruder) const; + + // This function is called from mark_wiping_extrusions and sets extruder that it should be printed with (-1 .. as usual) + void set_extruder_override(const ExtrusionEntity* entity, unsigned int copy_id, int extruder, unsigned int num_of_copies); + // Returns true in case that entity is not printed with its usual extruder for a given copy: bool is_entity_overridden(const ExtrusionEntity* entity, int copy_id) const { return (entity_map.find(entity) == entity_map.end() ? false : entity_map.at(entity).at(copy_id) != -1); } - // This function is called from Print::mark_wiping_extrusions and sets extruder that it should be printed with (-1 .. as usual) - void set_extruder_override(const ExtrusionEntity* entity, unsigned int copy_id, int extruder, unsigned int num_of_copies); - - // This is called from GCode::process_layer - see implementation for further comments: - const std::vector* get_extruder_overrides(const ExtrusionEntity* entity, int correct_extruder_id, int num_of_copies); - -private: std::map> entity_map; // to keep track of who prints what bool something_overridden = false; }; -class ToolOrdering +class LayerTools { public: - struct LayerTools - { - LayerTools(const coordf_t z) : - print_z(z), - has_object(false), - has_support(false), - has_wipe_tower(false), - wipe_tower_partitions(0), - wipe_tower_layer_height(0.) {} + LayerTools(const coordf_t z, const PrintConfig* print_config_ptr = nullptr) : + print_z(z), + has_object(false), + has_support(false), + has_wipe_tower(false), + wipe_tower_partitions(0), + wipe_tower_layer_height(0.) {} - bool operator< (const LayerTools &rhs) const { return print_z < rhs.print_z; } - bool operator==(const LayerTools &rhs) const { return print_z == rhs.print_z; } + bool operator< (const LayerTools &rhs) const { return print_z - EPSILON < rhs.print_z; } + bool operator==(const LayerTools &rhs) const { return std::abs(print_z - rhs.print_z) < EPSILON; } - coordf_t print_z; - bool has_object; - bool has_support; - // Zero based extruder IDs, ordered to minimize tool switches. - std::vector extruders; - // Will there be anything extruded on this layer for the wipe tower? - // Due to the support layers possibly interleaving the object layers, - // wipe tower will be disabled for some support only layers. - bool has_wipe_tower; - // Number of wipe tower partitions to support the required number of tool switches - // and to support the wipe tower partitions above this one. - size_t wipe_tower_partitions; - coordf_t wipe_tower_layer_height; + coordf_t print_z; + bool has_object; + bool has_support; + // Zero based extruder IDs, ordered to minimize tool switches. + std::vector extruders; + // Will there be anything extruded on this layer for the wipe tower? + // Due to the support layers possibly interleaving the object layers, + // wipe tower will be disabled for some support only layers. + bool has_wipe_tower; + // Number of wipe tower partitions to support the required number of tool switches + // and to support the wipe tower partitions above this one. + size_t wipe_tower_partitions; + coordf_t wipe_tower_layer_height; + + // This object holds list of extrusion that will be used for extruder wiping + WipingExtrusions wiping_extrusions; +}; - // This holds list of extrusion that will be used for extruder wiping - WipingExtrusions wiping_extrusions; - - }; +class ToolOrdering +{ +public: ToolOrdering() {} // For the use case when each object is printed separately @@ -114,17 +125,22 @@ private: void collect_extruders(const PrintObject &object); void reorder_extruders(unsigned int last_extruder_id); void fill_wipe_tower_partitions(const PrintConfig &config, coordf_t object_bottom_z); - void collect_extruder_statistics(bool prime_multi_material); + void collect_extruder_statistics(bool prime_multi_material); - std::vector m_layer_tools; - // First printing extruder, including the multi-material priming sequence. - unsigned int m_first_printing_extruder = (unsigned int)-1; - // Final printing extruder. - unsigned int m_last_printing_extruder = (unsigned int)-1; - // All extruders, which extrude some material over m_layer_tools. - std::vector m_all_printing_extruders; + std::vector m_layer_tools; + // First printing extruder, including the multi-material priming sequence. + unsigned int m_first_printing_extruder = (unsigned int)-1; + // Final printing extruder. + unsigned int m_last_printing_extruder = (unsigned int)-1; + // All extruders, which extrude some material over m_layer_tools. + std::vector m_all_printing_extruders; + + + const PrintConfig* m_print_config_ptr = nullptr; }; + + } // namespace SLic3r #endif /* slic3r_ToolOrdering_hpp_ */ diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index dac48bfd3..fcbe74b85 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -1064,7 +1064,7 @@ void Print::_make_wipe_tower() size_t idx_end = m_tool_ordering.layer_tools().size(); // Find the first wipe tower layer, which does not have a counterpart in an object or a support layer. for (size_t i = 0; i < idx_end; ++ i) { - const ToolOrdering::LayerTools < = m_tool_ordering.layer_tools()[i]; + const LayerTools < = m_tool_ordering.layer_tools()[i]; if (lt.has_wipe_tower && ! lt.has_object && ! lt.has_support) { idx_begin = i; break; @@ -1078,7 +1078,7 @@ void Print::_make_wipe_tower() for (; it_layer != it_end && (*it_layer)->print_z - EPSILON < wipe_tower_new_layer_print_z_first; ++ it_layer); // Find the stopper of the sequence of wipe tower layers, which do not have a counterpart in an object or a support layer. for (size_t i = idx_begin; i < idx_end; ++ i) { - ToolOrdering::LayerTools < = const_cast(m_tool_ordering.layer_tools()[i]); + LayerTools < = const_cast(m_tool_ordering.layer_tools()[i]); if (! (lt.has_wipe_tower && ! lt.has_object && ! lt.has_support)) break; lt.has_support = true; @@ -1137,7 +1137,7 @@ void Print::_make_wipe_tower() float volume_to_wipe = wipe_volumes[current_extruder_id][extruder_id]; // total volume to wipe after this toolchange if (!first_layer) // unless we're on the first layer, try to assign some infills/objects for the wiping: - volume_to_wipe = mark_wiping_extrusions(layer_tools, extruder_id, wipe_volumes[current_extruder_id][extruder_id]); + volume_to_wipe = layer_tools.wiping_extrusions.mark_wiping_extrusions(*this, layer_tools, extruder_id, wipe_volumes[current_extruder_id][extruder_id]); wipe_tower.plan_toolchange(layer_tools.print_z, layer_tools.wipe_tower_layer_height, current_extruder_id, extruder_id, first_layer && extruder_id == m_tool_ordering.all_extruders().back(), volume_to_wipe); current_extruder_id = extruder_id; @@ -1173,114 +1173,7 @@ void Print::_make_wipe_tower() } -// Following function iterates through all extrusions on the layer, remembers those that could be used for wiping after toolchange -// and returns volume that is left to be wiped on the wipe tower. -float Print::mark_wiping_extrusions(ToolOrdering::LayerTools& layer_tools, unsigned int new_extruder, float volume_to_wipe) -{ - const float min_infill_volume = 0.f; // ignore infill with smaller volume than this - if (config.filament_soluble.get_at(new_extruder)) - return volume_to_wipe; // Soluble filament cannot be wiped in a random infill - - PrintObjectPtrs object_list = objects; - - // sort objects so that dedicated for wiping are at the beginning: - std::sort(object_list.begin(), object_list.end(), [](const PrintObject* a, const PrintObject* b) { return a->config.wipe_into_objects; }); - - - // We will now iterate through objects - // - first through the dedicated ones to mark perimeters or infills (depending on infill_first) - // - second through the dedicated ones again to mark infills or perimeters (depending on infill_first) - // - then for the others to mark infills - // this is controlled by the following variable: - bool perimeters_done = false; - - for (int i=0 ; i<(int)object_list.size() ; ++i) { // Let's iterate through all objects... - const auto& object = object_list[i]; - - if (!perimeters_done && (i+1==object_list.size() || !object_list[i]->config.wipe_into_objects)) { // we passed the last dedicated object in list - perimeters_done = true; - i=-1; // let's go from the start again - continue; - } - - // Finds this layer: - auto this_layer_it = std::find_if(object->layers.begin(), object->layers.end(), [&layer_tools](const Layer* lay) { return std::abs(layer_tools.print_z - lay->print_z)layers.end()) - continue; - const Layer* this_layer = *this_layer_it; - unsigned int num_of_copies = object->_shifted_copies.size(); - - for (unsigned int copy = 0; copy < num_of_copies; ++copy) { // iterate through copies first, so that we mark neighbouring infills to minimize travel moves - - for (size_t region_id = 0; region_id < object->print()->regions.size(); ++ region_id) { - const auto& region = *object->print()->regions[region_id]; - - if (!region.config.wipe_into_infill && !object->config.wipe_into_objects) - continue; - - - if (((!config.infill_first ? perimeters_done : !perimeters_done) || !object->config.wipe_into_objects) && region.config.wipe_into_infill) { - ExtrusionEntityCollection& eec = this_layer->regions[region_id]->fills; - for (ExtrusionEntity* ee : eec.entities) { // iterate through all infill Collections - if (volume_to_wipe <= 0.f) - return 0.f; - auto* fill = dynamic_cast(ee); - if (fill->role() == erTopSolidInfill || fill->role() == erGapFill) // these cannot be changed - such infill is / may be visible - continue; - - // What extruder would this normally be printed with? - unsigned int correct_extruder = get_extruder(fill, region); - if (config.filament_soluble.get_at(correct_extruder)) // if this entity is meant to be soluble, keep it that way - continue; - - if (!object->config.wipe_into_objects && !config.infill_first) { - // In this case we must check that the original extruder is used on this layer before the one we are overridding - // (and the perimeters will be finished before the infill is printed): - if (!config.infill_first && region.config.wipe_into_infill) { - bool unused_yet = false; - for (unsigned i = 0; i < layer_tools.extruders.size(); ++i) { - if (layer_tools.extruders[i] == new_extruder) - unused_yet = true; - if (layer_tools.extruders[i] == correct_extruder) - break; - } - if (unused_yet) - continue; - } - } - - if (!layer_tools.wiping_extrusions.is_entity_overridden(fill, copy) && fill->total_volume() > min_infill_volume) { // this infill will be used to wipe this extruder - layer_tools.wiping_extrusions.set_extruder_override(fill, copy, new_extruder, num_of_copies); - volume_to_wipe -= fill->total_volume(); - } - } - } - - - if (object->config.wipe_into_objects && (config.infill_first ? perimeters_done : !perimeters_done)) - { - ExtrusionEntityCollection& eec = this_layer->regions[region_id]->perimeters; - for (ExtrusionEntity* ee : eec.entities) { // iterate through all perimeter Collections - if (volume_to_wipe <= 0.f) - return 0.f; - auto* fill = dynamic_cast(ee); - // What extruder would this normally be printed with? - unsigned int correct_extruder = get_extruder(fill, region); - if (config.filament_soluble.get_at(correct_extruder)) // if this entity is meant to be soluble, keep it that way - continue; - - if (!layer_tools.wiping_extrusions.is_entity_overridden(fill, copy) && fill->total_volume() > min_infill_volume) { - layer_tools.wiping_extrusions.set_extruder_override(fill, copy, new_extruder, num_of_copies); - volume_to_wipe -= fill->total_volume(); - } - } - } - } - } - } - return std::max(0.f, volume_to_wipe); -} std::string Print::output_filename() diff --git a/xs/src/libslic3r/Print.hpp b/xs/src/libslic3r/Print.hpp index 8ae9b3689..f90fb500f 100644 --- a/xs/src/libslic3r/Print.hpp +++ b/xs/src/libslic3r/Print.hpp @@ -318,19 +318,15 @@ private: bool invalidate_state_by_config_options(const std::vector &opt_keys); PrintRegionConfig _region_config_from_model_volume(const ModelVolume &volume); - // This function goes through all infill entities, decides which ones will be used for wiping and - // marks them by the extruder id. Returns volume that remains to be wiped on the wipe tower: - float mark_wiping_extrusions(ToolOrdering::LayerTools& layer_tools, unsigned int new_extruder, float volume_to_wipe); - // Has the calculation been canceled? tbb::atomic m_canceled; }; // Returns extruder this eec should be printed with, according to PrintRegion config -static int get_extruder(const ExtrusionEntityCollection* fill, const PrintRegion ®ion) { - return is_infill(fill->role()) ? std::max(0, (is_solid_infill(fill->entities.front()->role()) ? region.config.solid_infill_extruder : region.config.infill_extruder) - 1) : - std::max(region.config.perimeter_extruder.value - 1, 0); +static int get_extruder(const ExtrusionEntityCollection& fill, const PrintRegion ®ion) { + return is_infill(fill.role()) ? std::max(0, (is_solid_infill(fill.entities.front()->role()) ? region.config.solid_infill_extruder : region.config.infill_extruder) - 1) : + std::max(region.config.perimeter_extruder.value - 1, 0); } From 645cc65d2b340752f390359ce3ed09a49b463588 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Tue, 26 Jun 2018 15:29:23 +0200 Subject: [PATCH 065/198] When running on Windows, Perl $^X returns slic3r.exe or slic3r-console.exe Do some magic to get the perl interpreter path. --- lib/Slic3r/Print.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index 8300fdbed..a9763a824 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -101,7 +101,12 @@ sub export_gcode { die "The configured post-processing script is not executable: check permissions. ($script)\n"; } if ($^O eq 'MSWin32' && $script =~ /\.[pP][lL]/) { - system($^X, $script, $output_file); + # The current process (^X) may be slic3r.exe or slic3r-console.exe. + # Replace it with the current perl interpreter. + my($filename, $directories, $suffix) = fileparse($^X); + $filename =~ s/^slic3r.*$/perl5\.24\.0\.exe/; + my $interpreter = $directories . $filename; + system($interpreter, $script, $output_file); } else { system($script, $output_file); } From 27b6c061d81122729e38446c961066316b23760b Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Fri, 22 Jun 2018 15:01:33 +0200 Subject: [PATCH 066/198] ConfigWizard: Fix default printer selection --- xs/src/slic3r/GUI/ConfigWizard.cpp | 14 +++++++++----- xs/src/slic3r/GUI/ConfigWizard_private.hpp | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/xs/src/slic3r/GUI/ConfigWizard.cpp b/xs/src/slic3r/GUI/ConfigWizard.cpp index ce06da853..f723e7f4b 100644 --- a/xs/src/slic3r/GUI/ConfigWizard.cpp +++ b/xs/src/slic3r/GUI/ConfigWizard.cpp @@ -113,11 +113,6 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, cons sizer->Add(all_none_sizer, 0, wxEXPAND); SetSizer(sizer); - - if (cboxes.size() > 0) { - cboxes[0]->SetValue(true); - on_checkbox(cboxes[0], true); - } } void PrinterPicker::select_all(bool select) @@ -130,6 +125,14 @@ void PrinterPicker::select_all(bool select) } } +void PrinterPicker::select_one(size_t i, bool select) +{ + if (i < cboxes.size() && cboxes[i]->GetValue() != select) { + cboxes[i]->SetValue(select); + on_checkbox(cboxes[i], select); + } +} + void PrinterPicker::on_checkbox(const Checkbox *cbox, bool checked) { variants_checked += checked ? 1 : -1; @@ -232,6 +235,7 @@ PageWelcome::PageWelcome(ConfigWizard *parent) : AppConfig &appconfig_vendors = this->wizard_p()->appconfig_vendors; printer_picker = new PrinterPicker(this, vendor_prusa->second, appconfig_vendors); + printer_picker->select_one(0, true); // Select the default (first) model/variant on the Prusa vendor printer_picker->Bind(EVT_PRINTER_PICK, [this, &appconfig_vendors](const PrinterPickerEvent &evt) { appconfig_vendors.set_variant(evt.vendor_id, evt.model_id, evt.variant_name, evt.enable); this->on_variant_checked(); diff --git a/xs/src/slic3r/GUI/ConfigWizard_private.hpp b/xs/src/slic3r/GUI/ConfigWizard_private.hpp index 72cb88655..04319a1b4 100644 --- a/xs/src/slic3r/GUI/ConfigWizard_private.hpp +++ b/xs/src/slic3r/GUI/ConfigWizard_private.hpp @@ -56,6 +56,7 @@ struct PrinterPicker: wxPanel PrinterPicker(wxWindow *parent, const VendorProfile &vendor, const AppConfig &appconfig_vendors); void select_all(bool select); + void select_one(size_t i, bool select); void on_checkbox(const Checkbox *cbox, bool checked); }; From ac829ea0637e2108f4d4d90b5ad2dc650761f1dd Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Fri, 22 Jun 2018 15:27:04 +0200 Subject: [PATCH 067/198] PresetUpdater: Fix double update detection (had_config_update) --- xs/src/slic3r/Utils/PresetUpdater.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xs/src/slic3r/Utils/PresetUpdater.cpp b/xs/src/slic3r/Utils/PresetUpdater.cpp index 8159a75e2..1ce814b89 100644 --- a/xs/src/slic3r/Utils/PresetUpdater.cpp +++ b/xs/src/slic3r/Utils/PresetUpdater.cpp @@ -537,15 +537,15 @@ bool PresetUpdater::config_update() const incompats_map.emplace(std::make_pair(std::move(vendor), std::move(restrictions))); } + p->had_config_update = true; // This needs to be done before a dialog is shown because of OnIdle() + CallAfter() in Perl + GUI::MsgDataIncompatible dlg(std::move(incompats_map)); const auto res = dlg.ShowModal(); if (res == wxID_REPLACE) { BOOST_LOG_TRIVIAL(info) << "User wants to re-configure..."; p->perform_updates(std::move(updates)); GUI::ConfigWizard wizard(nullptr, GUI::ConfigWizard::RR_DATA_INCOMPAT); - if (wizard.run(GUI::get_preset_bundle(), this)) { - p->had_config_update = true; - } else { + if (! wizard.run(GUI::get_preset_bundle(), this)) { return false; } } else { @@ -566,6 +566,8 @@ bool PresetUpdater::config_update() const updates_map.emplace(std::make_pair(std::move(vendor), std::move(ver_str))); } + p->had_config_update = true; // Ditto, see above + GUI::MsgUpdateConfig dlg(std::move(updates_map)); const auto res = dlg.ShowModal(); @@ -581,8 +583,6 @@ bool PresetUpdater::config_update() const } else { BOOST_LOG_TRIVIAL(info) << "User refused the update"; } - - p->had_config_update = true; } else { BOOST_LOG_TRIVIAL(info) << "No configuration updates available."; } From 5c89a80ef4b1efb493af1e5ace21360fbfd193d4 Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Mon, 25 Jun 2018 13:29:54 +0200 Subject: [PATCH 068/198] ConfigWizard: Mark the first variant of each printer as default in the GUI --- xs/src/slic3r/GUI/ConfigWizard.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xs/src/slic3r/GUI/ConfigWizard.cpp b/xs/src/slic3r/GUI/ConfigWizard.cpp index f723e7f4b..642c6dce7 100644 --- a/xs/src/slic3r/GUI/ConfigWizard.cpp +++ b/xs/src/slic3r/GUI/ConfigWizard.cpp @@ -83,8 +83,11 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, cons const auto model_id = model.id; + bool default_variant = true; // Mark the first variant as default in the GUI for (const auto &variant : model.variants) { - const auto label = wxString::Format("%s %s %s", variant.name, _(L("mm")), _(L("nozzle"))); + const auto label = wxString::Format("%s %s %s %s", variant.name, _(L("mm")), _(L("nozzle")), + (default_variant ? _(L("(default)")) : wxString())); + default_variant = false; auto *cbox = new Checkbox(panel, label, model_id, variant.name); const size_t idx = cboxes.size(); cboxes.push_back(cbox); From 2a23a9c5bc6d5ee335c5ec55b52c215c07024f96 Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Wed, 27 Jun 2018 10:34:21 +0200 Subject: [PATCH 069/198] Fix: Http: Body size limit not properly initialized --- xs/src/slic3r/Utils/Http.cpp | 1 + xs/src/slic3r/Utils/Http.hpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/xs/src/slic3r/Utils/Http.cpp b/xs/src/slic3r/Utils/Http.cpp index 47021d39f..949a0e7d6 100644 --- a/xs/src/slic3r/Utils/Http.cpp +++ b/xs/src/slic3r/Utils/Http.cpp @@ -71,6 +71,7 @@ Http::priv::priv(const std::string &url) : form(nullptr), form_end(nullptr), headerlist(nullptr), + limit(0), cancel(false) { if (curl == nullptr) { diff --git a/xs/src/slic3r/Utils/Http.hpp b/xs/src/slic3r/Utils/Http.hpp index 73656bf88..7c2bd84fc 100644 --- a/xs/src/slic3r/Utils/Http.hpp +++ b/xs/src/slic3r/Utils/Http.hpp @@ -46,7 +46,8 @@ public: Http& operator=(const Http &) = delete; Http& operator=(Http &&) = delete; - // Sets a maximum size of the data that can be received. The default is 5MB. + // Sets a maximum size of the data that can be received. + // A value of zero sets the default limit, which is is 5MB. Http& size_limit(size_t sizeLimit); // Sets a HTTP header field. Http& header(std::string name, const std::string &value); From 5c323474499b133d7994da296b1d906bbc1e656a Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Wed, 27 Jun 2018 11:31:11 +0200 Subject: [PATCH 070/198] 1st attempt to fix opengl on ubuntu --- lib/Slic3r/GUI/Plater.pm | 4 +- lib/Slic3r/GUI/Plater/3DPreview.pm | 4 +- xs/src/slic3r/GUI/3DScene.cpp | 20 +++--- xs/src/slic3r/GUI/3DScene.hpp | 6 +- xs/src/slic3r/GUI/GLCanvas3D.cpp | 80 ++++++++++++++++++---- xs/src/slic3r/GUI/GLCanvas3D.hpp | 10 ++- xs/src/slic3r/GUI/GLCanvas3DManager.cpp | 88 ++++++++++++++----------- xs/src/slic3r/GUI/GLCanvas3DManager.hpp | 8 ++- xs/xsp/GUI_3DScene.xsp | 5 -- 9 files changed, 154 insertions(+), 71 deletions(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 96bddd466..1e32fd8d3 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -204,7 +204,9 @@ sub new { if (($preview != $self->{preview3D}) && ($preview != $self->{canvas3D})) { Slic3r::GUI::_3DScene::set_active($self->{preview3D}->canvas, 0); Slic3r::GUI::_3DScene::set_active($self->{canvas3D}, 0); - Slic3r::GUI::_3DScene::reset_current_canvas(); +#================================================================================================================== +# Slic3r::GUI::_3DScene::reset_current_canvas(); +#================================================================================================================== $preview->OnActivate if $preview->can('OnActivate'); } elsif ($preview == $self->{preview3D}) { Slic3r::GUI::_3DScene::set_active($self->{preview3D}->canvas, 1); diff --git a/lib/Slic3r/GUI/Plater/3DPreview.pm b/lib/Slic3r/GUI/Plater/3DPreview.pm index c7dab869f..9a470e017 100644 --- a/lib/Slic3r/GUI/Plater/3DPreview.pm +++ b/lib/Slic3r/GUI/Plater/3DPreview.pm @@ -279,7 +279,9 @@ sub reload_print { my ($self, $force) = @_; Slic3r::GUI::_3DScene::reset_volumes($self->canvas); - Slic3r::GUI::_3DScene::reset_current_canvas(); +#================================================================================================================== +# Slic3r::GUI::_3DScene::reset_current_canvas(); +#================================================================================================================== $self->_loaded(0); if (! $self->IsShown && ! $force) { diff --git a/xs/src/slic3r/GUI/3DScene.cpp b/xs/src/slic3r/GUI/3DScene.cpp index a499825a4..556be56bc 100644 --- a/xs/src/slic3r/GUI/3DScene.cpp +++ b/xs/src/slic3r/GUI/3DScene.cpp @@ -1754,15 +1754,17 @@ bool _3DScene::init(wxGLCanvas* canvas) return s_canvas_mgr.init(canvas); } -bool _3DScene::set_current(wxGLCanvas* canvas, bool force) -{ - return s_canvas_mgr.set_current(canvas, force); -} - -void _3DScene::reset_current_canvas() -{ - s_canvas_mgr.set_current(nullptr, false); -} +//################################################################################################################# +//bool _3DScene::set_current(wxGLCanvas* canvas, bool force) +//{ +// return s_canvas_mgr.set_current(canvas, force); +//} +// +//void _3DScene::reset_current_canvas() +//{ +// s_canvas_mgr.set_current(nullptr, false); +//} +//################################################################################################################# void _3DScene::set_active(wxGLCanvas* canvas, bool active) { diff --git a/xs/src/slic3r/GUI/3DScene.hpp b/xs/src/slic3r/GUI/3DScene.hpp index f45bab276..a375bd756 100644 --- a/xs/src/slic3r/GUI/3DScene.hpp +++ b/xs/src/slic3r/GUI/3DScene.hpp @@ -516,8 +516,10 @@ public: static bool init(wxGLCanvas* canvas); - static bool set_current(wxGLCanvas* canvas, bool force); - static void reset_current_canvas(); +//################################################################################################################# +// static bool set_current(wxGLCanvas* canvas, bool force); +// static void reset_current_canvas(); +//################################################################################################################# static void set_active(wxGLCanvas* canvas, bool active); static void set_as_dirty(wxGLCanvas* canvas); diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index 2148579e8..04b134b41 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -1408,9 +1408,15 @@ GLGizmoBase* GLCanvas3D::Gizmos::_get_current() const return (it != m_gizmos.end()) ? it->second : nullptr; } -GLCanvas3D::GLCanvas3D(wxGLCanvas* canvas, wxGLContext* context) +//################################################################################################################# +GLCanvas3D::GLCanvas3D(wxGLCanvas* canvas) +//GLCanvas3D::GLCanvas3D(wxGLCanvas* canvas, wxGLContext* context) +//################################################################################################################# : m_canvas(canvas) - , m_context(context) +//################################################################################################################# + , m_context(nullptr) +// , m_context(context) +//################################################################################################################# , m_timer(nullptr) , m_config(nullptr) , m_print(nullptr) @@ -1433,8 +1439,16 @@ GLCanvas3D::GLCanvas3D(wxGLCanvas* canvas, wxGLContext* context) , m_drag_by("instance") , m_reload_delayed(false) { +//################################################################################################################# if (m_canvas != nullptr) + { + m_context = new wxGLContext(m_canvas); m_timer = new wxTimer(m_canvas); + } + +// if (m_canvas != nullptr) +// m_timer = new wxTimer(m_canvas); +//################################################################################################################# } GLCanvas3D::~GLCanvas3D() @@ -1447,6 +1461,14 @@ GLCanvas3D::~GLCanvas3D() m_timer = nullptr; } +//################################################################################################################# + if (m_context != nullptr) + { + delete m_context; + m_context = nullptr; + } +//################################################################################################################# + _deregister_callbacks(); } @@ -1455,6 +1477,11 @@ bool GLCanvas3D::init(bool useVBOs, bool use_legacy_opengl) if (m_initialized) return true; +//################################################################################################################# + if ((m_canvas == nullptr) || (m_context == nullptr)) + return false; +//################################################################################################################# + ::glClearColor(1.0f, 1.0f, 1.0f, 1.0f); ::glClearDepth(1.0f); @@ -1520,14 +1547,27 @@ bool GLCanvas3D::init(bool useVBOs, bool use_legacy_opengl) return true; } -bool GLCanvas3D::set_current(bool force) +//################################################################################################################# +bool GLCanvas3D::set_current() { - if ((force || m_active) && (m_canvas != nullptr) && (m_context != nullptr)) + if ((m_canvas != nullptr) && (m_context != nullptr)) +// if (m_active && (m_canvas != nullptr) && (m_context != nullptr)) + { + std::cout << "set_current: " << (void*)m_canvas << " - " << (void*)m_context << std::endl; return m_canvas->SetCurrent(*m_context); - + } return false; } +//bool GLCanvas3D::set_current(bool force) +//{ +// if ((force || m_active) && (m_canvas != nullptr) && (m_context != nullptr)) +// return m_canvas->SetCurrent(*m_context); +// +// return false; +//} +//################################################################################################################# + void GLCanvas3D::set_active(bool active) { m_active = active; @@ -1549,7 +1589,10 @@ void GLCanvas3D::reset_volumes() if (!m_volumes.empty()) { // ensures this canvas is current - if ((m_canvas == nullptr) || !_3DScene::set_current(m_canvas, true)) +//################################################################################################################# + if (!set_current()) +// if ((m_canvas == nullptr) || !_3DScene::set_current(m_canvas, true)) +//################################################################################################################# return; m_volumes.release_geometry(); @@ -1850,7 +1893,10 @@ void GLCanvas3D::render() return; // ensures this canvas is current and initialized - if (!_3DScene::set_current(m_canvas, false) || !_3DScene::init(m_canvas)) +//################################################################################################################# + if (!set_current() || !_3DScene::init(m_canvas)) +// if (!_3DScene::set_current(m_canvas, false) || !_3DScene::init(m_canvas)) +//################################################################################################################# return; if (m_force_zoom_to_bed_enabled) @@ -1933,7 +1979,10 @@ void GLCanvas3D::reload_scene(bool force) reset_volumes(); // ensures this canvas is current - if (!_3DScene::set_current(m_canvas, true)) +//################################################################################################################# + if (!set_current()) +// if (!_3DScene::set_current(m_canvas, true)) +//################################################################################################################# return; set_bed_shape(dynamic_cast(m_config->option("bed_shape"))->values); @@ -2008,7 +2057,10 @@ void GLCanvas3D::reload_scene(bool force) void GLCanvas3D::load_print_toolpaths() { // ensures this canvas is current - if (!_3DScene::set_current(m_canvas, true)) +//################################################################################################################# + if (!set_current()) +// if (!_3DScene::set_current(m_canvas, true)) +//################################################################################################################# return; if (m_print == nullptr) @@ -2376,7 +2428,10 @@ void GLCanvas3D::load_gcode_preview(const GCodePreviewData& preview_data, const if ((m_canvas != nullptr) && (m_print != nullptr)) { // ensures that this canvas is current - if (!_3DScene::set_current(m_canvas, true)) +//################################################################################################################# + if (!set_current()) +// if (!_3DScene::set_current(m_canvas, true)) +//################################################################################################################# return; if (m_volumes.empty()) @@ -3019,7 +3074,10 @@ void GLCanvas3D::_resize(unsigned int w, unsigned int h) return; // ensures that this canvas is current - _3DScene::set_current(m_canvas, false); +//################################################################################################################# + set_current(); +// _3DScene::set_current(m_canvas, false); +//################################################################################################################# ::glViewport(0, 0, w, h); ::glMatrixMode(GL_PROJECTION); diff --git a/xs/src/slic3r/GUI/GLCanvas3D.hpp b/xs/src/slic3r/GUI/GLCanvas3D.hpp index 237044e83..181f5d1ac 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.hpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.hpp @@ -444,12 +444,18 @@ private: PerlCallback m_on_gizmo_scale_uniformly_callback; public: - GLCanvas3D(wxGLCanvas* canvas, wxGLContext* context); +//################################################################################################################# + GLCanvas3D(wxGLCanvas* canvas); +// GLCanvas3D(wxGLCanvas* canvas, wxGLContext* context); +//################################################################################################################# ~GLCanvas3D(); bool init(bool useVBOs, bool use_legacy_opengl); - bool set_current(bool force); +//################################################################################################################# + bool set_current(); +// bool set_current(bool force); +//################################################################################################################# void set_active(bool active); void set_as_dirty(); diff --git a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp index 62d17827a..0021f13eb 100644 --- a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp @@ -114,8 +114,11 @@ std::string GLCanvas3DManager::GLInfo::to_string(bool format_as_html, bool exten } GLCanvas3DManager::GLCanvas3DManager() - : m_context(nullptr) - , m_current(nullptr) +//################################################################################################################# + : m_current(nullptr) +// : m_context(nullptr) +// , m_current(nullptr) +//################################################################################################################# , m_gl_initialized(false) , m_use_legacy_opengl(false) , m_use_VBOs(false) @@ -124,8 +127,10 @@ GLCanvas3DManager::GLCanvas3DManager() GLCanvas3DManager::~GLCanvas3DManager() { - if (m_context != nullptr) - delete m_context; +//################################################################################################################# +// if (m_context != nullptr) +// delete m_context; +//################################################################################################################# } bool GLCanvas3DManager::add(wxGLCanvas* canvas) @@ -136,14 +141,19 @@ bool GLCanvas3DManager::add(wxGLCanvas* canvas) if (_get_canvas(canvas) != m_canvases.end()) return false; - if (m_context == nullptr) - { - m_context = new wxGLContext(canvas); - if (m_context == nullptr) - return false; - } +//################################################################################################################# +// if (m_context == nullptr) +// { +// m_context = new wxGLContext(canvas); +// if (m_context == nullptr) +// return false; +// } +//################################################################################################################# - GLCanvas3D* canvas3D = new GLCanvas3D(canvas, m_context); +//################################################################################################################# + GLCanvas3D* canvas3D = new GLCanvas3D(canvas); +// GLCanvas3D* canvas3D = new GLCanvas3D(canvas, m_context); +//################################################################################################################# if (canvas3D == nullptr) return false; @@ -213,33 +223,35 @@ bool GLCanvas3DManager::init(wxGLCanvas* canvas) return false; } -bool GLCanvas3DManager::set_current(wxGLCanvas* canvas, bool force) -{ - // given canvas is already current, return - if (m_current == canvas) - return true; - - if (canvas == nullptr) - { - m_current = nullptr; - return true; - } - - // set given canvas as current - CanvasesMap::iterator it = _get_canvas(canvas); - if (it != m_canvases.end()) - { - bool res = it->second->set_current(force); - if (res) - { - m_current = canvas; - return true; - } - } - - m_current = nullptr; - return false; -} +//################################################################################################################# +//bool GLCanvas3DManager::set_current(wxGLCanvas* canvas, bool force) +//{ +// // given canvas is already current, return +// if (m_current == canvas) +// return true; +// +// if (canvas == nullptr) +// { +// m_current = nullptr; +// return true; +// } +// +// // set given canvas as current +// CanvasesMap::iterator it = _get_canvas(canvas); +// if (it != m_canvases.end()) +// { +// bool res = it->second->set_current(force); +// if (res) +// { +// m_current = canvas; +// return true; +// } +// } +// +// m_current = nullptr; +// return false; +//} +//################################################################################################################# void GLCanvas3DManager::set_active(wxGLCanvas* canvas, bool active) { diff --git a/xs/src/slic3r/GUI/GLCanvas3DManager.hpp b/xs/src/slic3r/GUI/GLCanvas3DManager.hpp index 35a1db206..57e6f503d 100644 --- a/xs/src/slic3r/GUI/GLCanvas3DManager.hpp +++ b/xs/src/slic3r/GUI/GLCanvas3DManager.hpp @@ -43,7 +43,9 @@ class GLCanvas3DManager typedef std::map CanvasesMap; - wxGLContext* m_context; +//################################################################################################################# +// wxGLContext* m_context; +//################################################################################################################# CanvasesMap m_canvases; wxGLCanvas* m_current; GLInfo m_gl_info; @@ -70,7 +72,9 @@ public: bool init(wxGLCanvas* canvas); - bool set_current(wxGLCanvas* canvas, bool force); +//################################################################################################################# +// bool set_current(wxGLCanvas* canvas, bool force); +//################################################################################################################# void set_active(wxGLCanvas* canvas, bool active); void set_as_dirty(wxGLCanvas* canvas); diff --git a/xs/xsp/GUI_3DScene.xsp b/xs/xsp/GUI_3DScene.xsp index 8ee88543d..d46c06120 100644 --- a/xs/xsp/GUI_3DScene.xsp +++ b/xs/xsp/GUI_3DScene.xsp @@ -190,11 +190,6 @@ remove_all_canvases() CODE: _3DScene::remove_all_canvases(); -void -reset_current_canvas() - CODE: - _3DScene::reset_current_canvas(); - void set_active(canvas, active) SV *canvas; From 23d10fdadc7810eeec999c1e34f81f5d55d3cda6 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Wed, 27 Jun 2018 12:05:23 +0200 Subject: [PATCH 071/198] 2nd attempt to fix opengl on ubuntu --- xs/src/slic3r/GUI/GLCanvas3D.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index 04b134b41..d44106337 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -1553,7 +1553,7 @@ bool GLCanvas3D::set_current() if ((m_canvas != nullptr) && (m_context != nullptr)) // if (m_active && (m_canvas != nullptr) && (m_context != nullptr)) { - std::cout << "set_current: " << (void*)m_canvas << " - " << (void*)m_context << std::endl; +// std::cout << "set_current: " << (void*)m_canvas << " - " << (void*)m_context << std::endl; return m_canvas->SetCurrent(*m_context); } return false; @@ -1698,6 +1698,10 @@ void GLCanvas3D::set_bed_shape(const Pointfs& shape) // Set the origin and size for painting of the coordinate system axes. m_axes.origin = Pointf3(0.0, 0.0, (coordf_t)GROUND_Z); set_axes_length(0.3f * (float)m_bed.get_bounding_box().max_size()); + +//########################################################################################################################### + m_dirty = true; +//########################################################################################################################### } void GLCanvas3D::set_auto_bed_shape() @@ -3059,7 +3063,10 @@ Point GLCanvas3D::get_local_mouse_position() const bool GLCanvas3D::_is_shown_on_screen() const { - return (m_canvas != nullptr) ? m_active && m_canvas->IsShownOnScreen() : false; +//################################################################################################################# + return (m_canvas != nullptr) ? m_canvas->IsShownOnScreen() : false; +// return (m_canvas != nullptr) ? m_active && m_canvas->IsShownOnScreen() : false; +//################################################################################################################# } void GLCanvas3D::_force_zoom_to_bed() From 8db4fdc24c2fa17f359065038f738e032db23d92 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Wed, 27 Jun 2018 12:36:49 +0200 Subject: [PATCH 072/198] 3rd attempt to fix opengl on ubuntu --- lib/Slic3r/GUI/Plater.pm | 20 ++++++++++----- xs/src/slic3r/GUI/3DScene.cpp | 10 ++++---- xs/src/slic3r/GUI/3DScene.hpp | 4 +-- xs/src/slic3r/GUI/GLCanvas3D.cpp | 34 ++++++++++++++++--------- xs/src/slic3r/GUI/GLCanvas3D.hpp | 12 ++++++--- xs/src/slic3r/GUI/GLCanvas3DManager.cpp | 14 +++++----- xs/src/slic3r/GUI/GLCanvas3DManager.hpp | 2 +- xs/xsp/GUI_3DScene.xsp | 7 ----- 8 files changed, 58 insertions(+), 45 deletions(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 1e32fd8d3..47a060e47 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -186,7 +186,9 @@ sub new { # Initialize 3D toolpaths preview if ($Slic3r::GUI::have_OpenGL) { $self->{preview3D} = Slic3r::GUI::Plater::3DPreview->new($self->{preview_notebook}, $self->{print}, $self->{gcode_preview_data}, $self->{config}); - Slic3r::GUI::_3DScene::set_active($self->{preview3D}->canvas, 0); +#================================================================================================================== +# Slic3r::GUI::_3DScene::set_active($self->{preview3D}->canvas, 0); +#================================================================================================================== Slic3r::GUI::_3DScene::enable_legend_texture($self->{preview3D}->canvas, 1); Slic3r::GUI::_3DScene::register_on_viewport_changed_callback($self->{preview3D}->canvas, sub { Slic3r::GUI::_3DScene::set_viewport_from_scene($self->{canvas3D}, $self->{preview3D}->canvas); }); $self->{preview_notebook}->AddPage($self->{preview3D}, L('Preview')); @@ -202,21 +204,25 @@ sub new { EVT_NOTEBOOK_PAGE_CHANGED($self, $self->{preview_notebook}, sub { my $preview = $self->{preview_notebook}->GetCurrentPage; if (($preview != $self->{preview3D}) && ($preview != $self->{canvas3D})) { - Slic3r::GUI::_3DScene::set_active($self->{preview3D}->canvas, 0); - Slic3r::GUI::_3DScene::set_active($self->{canvas3D}, 0); #================================================================================================================== +# Slic3r::GUI::_3DScene::set_active($self->{preview3D}->canvas, 0); +# Slic3r::GUI::_3DScene::set_active($self->{canvas3D}, 0); # Slic3r::GUI::_3DScene::reset_current_canvas(); #================================================================================================================== $preview->OnActivate if $preview->can('OnActivate'); } elsif ($preview == $self->{preview3D}) { - Slic3r::GUI::_3DScene::set_active($self->{preview3D}->canvas, 1); - Slic3r::GUI::_3DScene::set_active($self->{canvas3D}, 0); +#================================================================================================================== +# Slic3r::GUI::_3DScene::set_active($self->{preview3D}->canvas, 1); +# Slic3r::GUI::_3DScene::set_active($self->{canvas3D}, 0); +#================================================================================================================== $self->{preview3D}->load_print; # sets the canvas as dirty to force a render at the 1st idle event (wxWidgets IsShownOnScreen() is buggy and cannot be used reliably) Slic3r::GUI::_3DScene::set_as_dirty($self->{preview3D}->canvas); } elsif ($preview == $self->{canvas3D}) { - Slic3r::GUI::_3DScene::set_active($self->{canvas3D}, 1); - Slic3r::GUI::_3DScene::set_active($self->{preview3D}->canvas, 0); +#================================================================================================================== +# Slic3r::GUI::_3DScene::set_active($self->{canvas3D}, 1); +# Slic3r::GUI::_3DScene::set_active($self->{preview3D}->canvas, 0); +#================================================================================================================== if (Slic3r::GUI::_3DScene::is_reload_delayed($self->{canvas3D})) { my $selections = $self->collect_selections; Slic3r::GUI::_3DScene::set_objects_selections($self->{canvas3D}, \@$selections); diff --git a/xs/src/slic3r/GUI/3DScene.cpp b/xs/src/slic3r/GUI/3DScene.cpp index 556be56bc..ac2304c69 100644 --- a/xs/src/slic3r/GUI/3DScene.cpp +++ b/xs/src/slic3r/GUI/3DScene.cpp @@ -1764,13 +1764,13 @@ bool _3DScene::init(wxGLCanvas* canvas) //{ // s_canvas_mgr.set_current(nullptr, false); //} +// +//void _3DScene::set_active(wxGLCanvas* canvas, bool active) +//{ +// s_canvas_mgr.set_active(canvas, active); +//} //################################################################################################################# -void _3DScene::set_active(wxGLCanvas* canvas, bool active) -{ - s_canvas_mgr.set_active(canvas, active); -} - void _3DScene::set_as_dirty(wxGLCanvas* canvas) { s_canvas_mgr.set_as_dirty(canvas); diff --git a/xs/src/slic3r/GUI/3DScene.hpp b/xs/src/slic3r/GUI/3DScene.hpp index a375bd756..d34a79ee3 100644 --- a/xs/src/slic3r/GUI/3DScene.hpp +++ b/xs/src/slic3r/GUI/3DScene.hpp @@ -519,9 +519,9 @@ public: //################################################################################################################# // static bool set_current(wxGLCanvas* canvas, bool force); // static void reset_current_canvas(); +// +// static void set_active(wxGLCanvas* canvas, bool active); //################################################################################################################# - - static void set_active(wxGLCanvas* canvas, bool active); static void set_as_dirty(wxGLCanvas* canvas); static unsigned int get_volumes_count(wxGLCanvas* canvas); diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index d44106337..e3a3b1572 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -1422,7 +1422,9 @@ GLCanvas3D::GLCanvas3D(wxGLCanvas* canvas) , m_print(nullptr) , m_model(nullptr) , m_dirty(true) - , m_active(true) +//################################################################################################################# +// , m_active(true) +//################################################################################################################# , m_initialized(false) , m_use_VBOs(false) , m_force_zoom_to_bed_enabled(false) @@ -1552,10 +1554,8 @@ bool GLCanvas3D::set_current() { if ((m_canvas != nullptr) && (m_context != nullptr)) // if (m_active && (m_canvas != nullptr) && (m_context != nullptr)) - { -// std::cout << "set_current: " << (void*)m_canvas << " - " << (void*)m_context << std::endl; return m_canvas->SetCurrent(*m_context); - } + return false; } @@ -1568,10 +1568,12 @@ bool GLCanvas3D::set_current() //} //################################################################################################################# -void GLCanvas3D::set_active(bool active) -{ - m_active = active; -} +//################################################################################################################# +//void GLCanvas3D::set_active(bool active) +//{ +// m_active = active; +//} +//################################################################################################################# void GLCanvas3D::set_as_dirty() { @@ -2753,9 +2755,13 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) } else if (evt.LeftDClick() && (m_hover_volume_id != -1)) { - m_active = false; +//################################################################################################################# +// m_active = false; +//################################################################################################################# m_on_double_click_callback.call(); - m_active = true; +//################################################################################################################# +// m_active = true; +//################################################################################################################# } else if (evt.LeftDown() || evt.RightDown()) { @@ -2853,9 +2859,13 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) // if right clicking on volume, propagate event through callback if (m_volumes.volumes[volume_idx]->hover) { - m_active = false; +//################################################################################################################# +// m_active = false; +//################################################################################################################# m_on_right_click_callback.call(pos.x, pos.y); - m_active = true; +//################################################################################################################# +// m_active = true; +//################################################################################################################# } } } diff --git a/xs/src/slic3r/GUI/GLCanvas3D.hpp b/xs/src/slic3r/GUI/GLCanvas3D.hpp index 181f5d1ac..2ab7863aa 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.hpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.hpp @@ -401,9 +401,11 @@ private: Model* m_model; bool m_dirty; - // the active member has been introduced to overcome a bug in wxWidgets method IsShownOnScreen() which always return true - // when a window is inside a wxNotebook - bool m_active; +//################################################################################################################# +// // the active member has been introduced to overcome a bug in wxWidgets method IsShownOnScreen() which always return true +// // when a window is inside a wxNotebook +// bool m_active; +//################################################################################################################# bool m_initialized; bool m_use_VBOs; bool m_force_zoom_to_bed_enabled; @@ -457,7 +459,9 @@ public: // bool set_current(bool force); //################################################################################################################# - void set_active(bool active); +//################################################################################################################# +// void set_active(bool active); +//################################################################################################################# void set_as_dirty(); unsigned int get_volumes_count() const; diff --git a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp index 0021f13eb..660f1f41f 100644 --- a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp @@ -251,15 +251,15 @@ bool GLCanvas3DManager::init(wxGLCanvas* canvas) // m_current = nullptr; // return false; //} +// +//void GLCanvas3DManager::set_active(wxGLCanvas* canvas, bool active) +//{ +// CanvasesMap::iterator it = _get_canvas(canvas); +// if (it != m_canvases.end()) +// it->second->set_active(active); +//} //################################################################################################################# -void GLCanvas3DManager::set_active(wxGLCanvas* canvas, bool active) -{ - CanvasesMap::iterator it = _get_canvas(canvas); - if (it != m_canvases.end()) - it->second->set_active(active); -} - void GLCanvas3DManager::set_as_dirty(wxGLCanvas* canvas) { CanvasesMap::iterator it = _get_canvas(canvas); diff --git a/xs/src/slic3r/GUI/GLCanvas3DManager.hpp b/xs/src/slic3r/GUI/GLCanvas3DManager.hpp index 57e6f503d..c5b03a553 100644 --- a/xs/src/slic3r/GUI/GLCanvas3DManager.hpp +++ b/xs/src/slic3r/GUI/GLCanvas3DManager.hpp @@ -74,8 +74,8 @@ public: //################################################################################################################# // bool set_current(wxGLCanvas* canvas, bool force); +// void set_active(wxGLCanvas* canvas, bool active); //################################################################################################################# - void set_active(wxGLCanvas* canvas, bool active); void set_as_dirty(wxGLCanvas* canvas); unsigned int get_volumes_count(wxGLCanvas* canvas) const; diff --git a/xs/xsp/GUI_3DScene.xsp b/xs/xsp/GUI_3DScene.xsp index d46c06120..48bd30cd1 100644 --- a/xs/xsp/GUI_3DScene.xsp +++ b/xs/xsp/GUI_3DScene.xsp @@ -190,13 +190,6 @@ remove_all_canvases() CODE: _3DScene::remove_all_canvases(); -void -set_active(canvas, active) - SV *canvas; - bool active; - CODE: - _3DScene::set_active((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), active); - void set_as_dirty(canvas) SV *canvas; From 06f44a9e4b7962e910f3c9a65276b04ffe160e37 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Wed, 27 Jun 2018 12:49:38 +0200 Subject: [PATCH 073/198] Code cleanup --- lib/Slic3r/GUI/Plater.pm | 16 ------ lib/Slic3r/GUI/Plater/3DPreview.pm | 3 - xs/src/slic3r/GUI/3DScene.cpp | 17 ------ xs/src/slic3r/GUI/3DScene.hpp | 6 -- xs/src/slic3r/GUI/GLCanvas3D.cpp | 75 ------------------------- xs/src/slic3r/GUI/GLCanvas3D.hpp | 14 ----- xs/src/slic3r/GUI/GLCanvas3DManager.cpp | 61 -------------------- xs/src/slic3r/GUI/GLCanvas3DManager.hpp | 8 --- 8 files changed, 200 deletions(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 47a060e47..2b0a5a0d5 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -186,9 +186,6 @@ sub new { # Initialize 3D toolpaths preview if ($Slic3r::GUI::have_OpenGL) { $self->{preview3D} = Slic3r::GUI::Plater::3DPreview->new($self->{preview_notebook}, $self->{print}, $self->{gcode_preview_data}, $self->{config}); -#================================================================================================================== -# Slic3r::GUI::_3DScene::set_active($self->{preview3D}->canvas, 0); -#================================================================================================================== Slic3r::GUI::_3DScene::enable_legend_texture($self->{preview3D}->canvas, 1); Slic3r::GUI::_3DScene::register_on_viewport_changed_callback($self->{preview3D}->canvas, sub { Slic3r::GUI::_3DScene::set_viewport_from_scene($self->{canvas3D}, $self->{preview3D}->canvas); }); $self->{preview_notebook}->AddPage($self->{preview3D}, L('Preview')); @@ -204,25 +201,12 @@ sub new { EVT_NOTEBOOK_PAGE_CHANGED($self, $self->{preview_notebook}, sub { my $preview = $self->{preview_notebook}->GetCurrentPage; if (($preview != $self->{preview3D}) && ($preview != $self->{canvas3D})) { -#================================================================================================================== -# Slic3r::GUI::_3DScene::set_active($self->{preview3D}->canvas, 0); -# Slic3r::GUI::_3DScene::set_active($self->{canvas3D}, 0); -# Slic3r::GUI::_3DScene::reset_current_canvas(); -#================================================================================================================== $preview->OnActivate if $preview->can('OnActivate'); } elsif ($preview == $self->{preview3D}) { -#================================================================================================================== -# Slic3r::GUI::_3DScene::set_active($self->{preview3D}->canvas, 1); -# Slic3r::GUI::_3DScene::set_active($self->{canvas3D}, 0); -#================================================================================================================== $self->{preview3D}->load_print; # sets the canvas as dirty to force a render at the 1st idle event (wxWidgets IsShownOnScreen() is buggy and cannot be used reliably) Slic3r::GUI::_3DScene::set_as_dirty($self->{preview3D}->canvas); } elsif ($preview == $self->{canvas3D}) { -#================================================================================================================== -# Slic3r::GUI::_3DScene::set_active($self->{canvas3D}, 1); -# Slic3r::GUI::_3DScene::set_active($self->{preview3D}->canvas, 0); -#================================================================================================================== if (Slic3r::GUI::_3DScene::is_reload_delayed($self->{canvas3D})) { my $selections = $self->collect_selections; Slic3r::GUI::_3DScene::set_objects_selections($self->{canvas3D}, \@$selections); diff --git a/lib/Slic3r/GUI/Plater/3DPreview.pm b/lib/Slic3r/GUI/Plater/3DPreview.pm index 9a470e017..9ed2374ec 100644 --- a/lib/Slic3r/GUI/Plater/3DPreview.pm +++ b/lib/Slic3r/GUI/Plater/3DPreview.pm @@ -279,9 +279,6 @@ sub reload_print { my ($self, $force) = @_; Slic3r::GUI::_3DScene::reset_volumes($self->canvas); -#================================================================================================================== -# Slic3r::GUI::_3DScene::reset_current_canvas(); -#================================================================================================================== $self->_loaded(0); if (! $self->IsShown && ! $force) { diff --git a/xs/src/slic3r/GUI/3DScene.cpp b/xs/src/slic3r/GUI/3DScene.cpp index ac2304c69..09e10ac28 100644 --- a/xs/src/slic3r/GUI/3DScene.cpp +++ b/xs/src/slic3r/GUI/3DScene.cpp @@ -1754,23 +1754,6 @@ bool _3DScene::init(wxGLCanvas* canvas) return s_canvas_mgr.init(canvas); } -//################################################################################################################# -//bool _3DScene::set_current(wxGLCanvas* canvas, bool force) -//{ -// return s_canvas_mgr.set_current(canvas, force); -//} -// -//void _3DScene::reset_current_canvas() -//{ -// s_canvas_mgr.set_current(nullptr, false); -//} -// -//void _3DScene::set_active(wxGLCanvas* canvas, bool active) -//{ -// s_canvas_mgr.set_active(canvas, active); -//} -//################################################################################################################# - void _3DScene::set_as_dirty(wxGLCanvas* canvas) { s_canvas_mgr.set_as_dirty(canvas); diff --git a/xs/src/slic3r/GUI/3DScene.hpp b/xs/src/slic3r/GUI/3DScene.hpp index d34a79ee3..9016f984d 100644 --- a/xs/src/slic3r/GUI/3DScene.hpp +++ b/xs/src/slic3r/GUI/3DScene.hpp @@ -516,12 +516,6 @@ public: static bool init(wxGLCanvas* canvas); -//################################################################################################################# -// static bool set_current(wxGLCanvas* canvas, bool force); -// static void reset_current_canvas(); -// -// static void set_active(wxGLCanvas* canvas, bool active); -//################################################################################################################# static void set_as_dirty(wxGLCanvas* canvas); static unsigned int get_volumes_count(wxGLCanvas* canvas); diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index e3a3b1572..adea27fa4 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -1408,23 +1408,14 @@ GLGizmoBase* GLCanvas3D::Gizmos::_get_current() const return (it != m_gizmos.end()) ? it->second : nullptr; } -//################################################################################################################# GLCanvas3D::GLCanvas3D(wxGLCanvas* canvas) -//GLCanvas3D::GLCanvas3D(wxGLCanvas* canvas, wxGLContext* context) -//################################################################################################################# : m_canvas(canvas) -//################################################################################################################# , m_context(nullptr) -// , m_context(context) -//################################################################################################################# , m_timer(nullptr) , m_config(nullptr) , m_print(nullptr) , m_model(nullptr) , m_dirty(true) -//################################################################################################################# -// , m_active(true) -//################################################################################################################# , m_initialized(false) , m_use_VBOs(false) , m_force_zoom_to_bed_enabled(false) @@ -1441,16 +1432,11 @@ GLCanvas3D::GLCanvas3D(wxGLCanvas* canvas) , m_drag_by("instance") , m_reload_delayed(false) { -//################################################################################################################# if (m_canvas != nullptr) { m_context = new wxGLContext(m_canvas); m_timer = new wxTimer(m_canvas); } - -// if (m_canvas != nullptr) -// m_timer = new wxTimer(m_canvas); -//################################################################################################################# } GLCanvas3D::~GLCanvas3D() @@ -1463,13 +1449,11 @@ GLCanvas3D::~GLCanvas3D() m_timer = nullptr; } -//################################################################################################################# if (m_context != nullptr) { delete m_context; m_context = nullptr; } -//################################################################################################################# _deregister_callbacks(); } @@ -1479,10 +1463,8 @@ bool GLCanvas3D::init(bool useVBOs, bool use_legacy_opengl) if (m_initialized) return true; -//################################################################################################################# if ((m_canvas == nullptr) || (m_context == nullptr)) return false; -//################################################################################################################# ::glClearColor(1.0f, 1.0f, 1.0f, 1.0f); ::glClearDepth(1.0f); @@ -1549,32 +1531,14 @@ bool GLCanvas3D::init(bool useVBOs, bool use_legacy_opengl) return true; } -//################################################################################################################# bool GLCanvas3D::set_current() { if ((m_canvas != nullptr) && (m_context != nullptr)) -// if (m_active && (m_canvas != nullptr) && (m_context != nullptr)) return m_canvas->SetCurrent(*m_context); return false; } -//bool GLCanvas3D::set_current(bool force) -//{ -// if ((force || m_active) && (m_canvas != nullptr) && (m_context != nullptr)) -// return m_canvas->SetCurrent(*m_context); -// -// return false; -//} -//################################################################################################################# - -//################################################################################################################# -//void GLCanvas3D::set_active(bool active) -//{ -// m_active = active; -//} -//################################################################################################################# - void GLCanvas3D::set_as_dirty() { m_dirty = true; @@ -1591,10 +1555,7 @@ void GLCanvas3D::reset_volumes() if (!m_volumes.empty()) { // ensures this canvas is current -//################################################################################################################# if (!set_current()) -// if ((m_canvas == nullptr) || !_3DScene::set_current(m_canvas, true)) -//################################################################################################################# return; m_volumes.release_geometry(); @@ -1701,9 +1662,7 @@ void GLCanvas3D::set_bed_shape(const Pointfs& shape) m_axes.origin = Pointf3(0.0, 0.0, (coordf_t)GROUND_Z); set_axes_length(0.3f * (float)m_bed.get_bounding_box().max_size()); -//########################################################################################################################### m_dirty = true; -//########################################################################################################################### } void GLCanvas3D::set_auto_bed_shape() @@ -1899,10 +1858,7 @@ void GLCanvas3D::render() return; // ensures this canvas is current and initialized -//################################################################################################################# if (!set_current() || !_3DScene::init(m_canvas)) -// if (!_3DScene::set_current(m_canvas, false) || !_3DScene::init(m_canvas)) -//################################################################################################################# return; if (m_force_zoom_to_bed_enabled) @@ -1985,10 +1941,7 @@ void GLCanvas3D::reload_scene(bool force) reset_volumes(); // ensures this canvas is current -//################################################################################################################# if (!set_current()) -// if (!_3DScene::set_current(m_canvas, true)) -//################################################################################################################# return; set_bed_shape(dynamic_cast(m_config->option("bed_shape"))->values); @@ -2063,10 +2016,7 @@ void GLCanvas3D::reload_scene(bool force) void GLCanvas3D::load_print_toolpaths() { // ensures this canvas is current -//################################################################################################################# if (!set_current()) -// if (!_3DScene::set_current(m_canvas, true)) -//################################################################################################################# return; if (m_print == nullptr) @@ -2434,10 +2384,7 @@ void GLCanvas3D::load_gcode_preview(const GCodePreviewData& preview_data, const if ((m_canvas != nullptr) && (m_print != nullptr)) { // ensures that this canvas is current -//################################################################################################################# if (!set_current()) -// if (!_3DScene::set_current(m_canvas, true)) -//################################################################################################################# return; if (m_volumes.empty()) @@ -2754,15 +2701,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) #endif } else if (evt.LeftDClick() && (m_hover_volume_id != -1)) - { -//################################################################################################################# -// m_active = false; -//################################################################################################################# m_on_double_click_callback.call(); -//################################################################################################################# -// m_active = true; -//################################################################################################################# - } else if (evt.LeftDown() || evt.RightDown()) { // If user pressed left or right button we first check whether this happened @@ -2858,15 +2797,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) { // if right clicking on volume, propagate event through callback if (m_volumes.volumes[volume_idx]->hover) - { -//################################################################################################################# -// m_active = false; -//################################################################################################################# m_on_right_click_callback.call(pos.x, pos.y); -//################################################################################################################# -// m_active = true; -//################################################################################################################# - } } } } @@ -3073,10 +3004,7 @@ Point GLCanvas3D::get_local_mouse_position() const bool GLCanvas3D::_is_shown_on_screen() const { -//################################################################################################################# return (m_canvas != nullptr) ? m_canvas->IsShownOnScreen() : false; -// return (m_canvas != nullptr) ? m_active && m_canvas->IsShownOnScreen() : false; -//################################################################################################################# } void GLCanvas3D::_force_zoom_to_bed() @@ -3091,10 +3019,7 @@ void GLCanvas3D::_resize(unsigned int w, unsigned int h) return; // ensures that this canvas is current -//################################################################################################################# set_current(); -// _3DScene::set_current(m_canvas, false); -//################################################################################################################# ::glViewport(0, 0, w, h); ::glMatrixMode(GL_PROJECTION); diff --git a/xs/src/slic3r/GUI/GLCanvas3D.hpp b/xs/src/slic3r/GUI/GLCanvas3D.hpp index 2ab7863aa..b0706a05d 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.hpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.hpp @@ -401,11 +401,6 @@ private: Model* m_model; bool m_dirty; -//################################################################################################################# -// // the active member has been introduced to overcome a bug in wxWidgets method IsShownOnScreen() which always return true -// // when a window is inside a wxNotebook -// bool m_active; -//################################################################################################################# bool m_initialized; bool m_use_VBOs; bool m_force_zoom_to_bed_enabled; @@ -446,22 +441,13 @@ private: PerlCallback m_on_gizmo_scale_uniformly_callback; public: -//################################################################################################################# GLCanvas3D(wxGLCanvas* canvas); -// GLCanvas3D(wxGLCanvas* canvas, wxGLContext* context); -//################################################################################################################# ~GLCanvas3D(); bool init(bool useVBOs, bool use_legacy_opengl); -//################################################################################################################# bool set_current(); -// bool set_current(bool force); -//################################################################################################################# -//################################################################################################################# -// void set_active(bool active); -//################################################################################################################# void set_as_dirty(); unsigned int get_volumes_count() const; diff --git a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp index 660f1f41f..f817e7739 100644 --- a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp @@ -114,25 +114,13 @@ std::string GLCanvas3DManager::GLInfo::to_string(bool format_as_html, bool exten } GLCanvas3DManager::GLCanvas3DManager() -//################################################################################################################# : m_current(nullptr) -// : m_context(nullptr) -// , m_current(nullptr) -//################################################################################################################# , m_gl_initialized(false) , m_use_legacy_opengl(false) , m_use_VBOs(false) { } -GLCanvas3DManager::~GLCanvas3DManager() -{ -//################################################################################################################# -// if (m_context != nullptr) -// delete m_context; -//################################################################################################################# -} - bool GLCanvas3DManager::add(wxGLCanvas* canvas) { if (canvas == nullptr) @@ -141,19 +129,7 @@ bool GLCanvas3DManager::add(wxGLCanvas* canvas) if (_get_canvas(canvas) != m_canvases.end()) return false; -//################################################################################################################# -// if (m_context == nullptr) -// { -// m_context = new wxGLContext(canvas); -// if (m_context == nullptr) -// return false; -// } -//################################################################################################################# - -//################################################################################################################# GLCanvas3D* canvas3D = new GLCanvas3D(canvas); -// GLCanvas3D* canvas3D = new GLCanvas3D(canvas, m_context); -//################################################################################################################# if (canvas3D == nullptr) return false; @@ -223,43 +199,6 @@ bool GLCanvas3DManager::init(wxGLCanvas* canvas) return false; } -//################################################################################################################# -//bool GLCanvas3DManager::set_current(wxGLCanvas* canvas, bool force) -//{ -// // given canvas is already current, return -// if (m_current == canvas) -// return true; -// -// if (canvas == nullptr) -// { -// m_current = nullptr; -// return true; -// } -// -// // set given canvas as current -// CanvasesMap::iterator it = _get_canvas(canvas); -// if (it != m_canvases.end()) -// { -// bool res = it->second->set_current(force); -// if (res) -// { -// m_current = canvas; -// return true; -// } -// } -// -// m_current = nullptr; -// return false; -//} -// -//void GLCanvas3DManager::set_active(wxGLCanvas* canvas, bool active) -//{ -// CanvasesMap::iterator it = _get_canvas(canvas); -// if (it != m_canvases.end()) -// it->second->set_active(active); -//} -//################################################################################################################# - void GLCanvas3DManager::set_as_dirty(wxGLCanvas* canvas) { CanvasesMap::iterator it = _get_canvas(canvas); diff --git a/xs/src/slic3r/GUI/GLCanvas3DManager.hpp b/xs/src/slic3r/GUI/GLCanvas3DManager.hpp index c5b03a553..9d9285601 100644 --- a/xs/src/slic3r/GUI/GLCanvas3DManager.hpp +++ b/xs/src/slic3r/GUI/GLCanvas3DManager.hpp @@ -43,9 +43,6 @@ class GLCanvas3DManager typedef std::map CanvasesMap; -//################################################################################################################# -// wxGLContext* m_context; -//################################################################################################################# CanvasesMap m_canvases; wxGLCanvas* m_current; GLInfo m_gl_info; @@ -55,7 +52,6 @@ class GLCanvas3DManager public: GLCanvas3DManager(); - ~GLCanvas3DManager(); bool add(wxGLCanvas* canvas); bool remove(wxGLCanvas* canvas); @@ -72,10 +68,6 @@ public: bool init(wxGLCanvas* canvas); -//################################################################################################################# -// bool set_current(wxGLCanvas* canvas, bool force); -// void set_active(wxGLCanvas* canvas, bool active); -//################################################################################################################# void set_as_dirty(wxGLCanvas* canvas); unsigned int get_volumes_count(wxGLCanvas* canvas) const; From 8eb8a8b1f6c95b6ff741199a60a70cd91f4aad31 Mon Sep 17 00:00:00 2001 From: Chow Loong Jin Date: Sat, 23 Jun 2018 09:53:23 +0800 Subject: [PATCH 074/198] Fix format-security violation with croak Missed one in https://github.com/prusa3d/slic3r/pull/802. --- xs/xsp/GCode.xsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/xsp/GCode.xsp b/xs/xsp/GCode.xsp index 36b43271c..c1856ccf7 100644 --- a/xs/xsp/GCode.xsp +++ b/xs/xsp/GCode.xsp @@ -31,7 +31,7 @@ try { THIS->do_export(print, path, preview_data); } catch (std::exception& e) { - croak(e.what()); + croak("%s\n", e.what()); } %}; From 3229574a39e9b60291384a540e0afaab407351f2 Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Fri, 22 Jun 2018 15:01:33 +0200 Subject: [PATCH 075/198] ConfigWizard: Fix default printer selection --- xs/src/slic3r/GUI/ConfigWizard.cpp | 14 +++++++++----- xs/src/slic3r/GUI/ConfigWizard_private.hpp | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/xs/src/slic3r/GUI/ConfigWizard.cpp b/xs/src/slic3r/GUI/ConfigWizard.cpp index ce06da853..f723e7f4b 100644 --- a/xs/src/slic3r/GUI/ConfigWizard.cpp +++ b/xs/src/slic3r/GUI/ConfigWizard.cpp @@ -113,11 +113,6 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, cons sizer->Add(all_none_sizer, 0, wxEXPAND); SetSizer(sizer); - - if (cboxes.size() > 0) { - cboxes[0]->SetValue(true); - on_checkbox(cboxes[0], true); - } } void PrinterPicker::select_all(bool select) @@ -130,6 +125,14 @@ void PrinterPicker::select_all(bool select) } } +void PrinterPicker::select_one(size_t i, bool select) +{ + if (i < cboxes.size() && cboxes[i]->GetValue() != select) { + cboxes[i]->SetValue(select); + on_checkbox(cboxes[i], select); + } +} + void PrinterPicker::on_checkbox(const Checkbox *cbox, bool checked) { variants_checked += checked ? 1 : -1; @@ -232,6 +235,7 @@ PageWelcome::PageWelcome(ConfigWizard *parent) : AppConfig &appconfig_vendors = this->wizard_p()->appconfig_vendors; printer_picker = new PrinterPicker(this, vendor_prusa->second, appconfig_vendors); + printer_picker->select_one(0, true); // Select the default (first) model/variant on the Prusa vendor printer_picker->Bind(EVT_PRINTER_PICK, [this, &appconfig_vendors](const PrinterPickerEvent &evt) { appconfig_vendors.set_variant(evt.vendor_id, evt.model_id, evt.variant_name, evt.enable); this->on_variant_checked(); diff --git a/xs/src/slic3r/GUI/ConfigWizard_private.hpp b/xs/src/slic3r/GUI/ConfigWizard_private.hpp index 72cb88655..04319a1b4 100644 --- a/xs/src/slic3r/GUI/ConfigWizard_private.hpp +++ b/xs/src/slic3r/GUI/ConfigWizard_private.hpp @@ -56,6 +56,7 @@ struct PrinterPicker: wxPanel PrinterPicker(wxWindow *parent, const VendorProfile &vendor, const AppConfig &appconfig_vendors); void select_all(bool select); + void select_one(size_t i, bool select); void on_checkbox(const Checkbox *cbox, bool checked); }; From e00125d866c23bd68924d1fe4f92af8a05a5de03 Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Fri, 22 Jun 2018 15:27:04 +0200 Subject: [PATCH 076/198] PresetUpdater: Fix double update detection (had_config_update) --- xs/src/slic3r/Utils/PresetUpdater.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xs/src/slic3r/Utils/PresetUpdater.cpp b/xs/src/slic3r/Utils/PresetUpdater.cpp index 8159a75e2..1ce814b89 100644 --- a/xs/src/slic3r/Utils/PresetUpdater.cpp +++ b/xs/src/slic3r/Utils/PresetUpdater.cpp @@ -537,15 +537,15 @@ bool PresetUpdater::config_update() const incompats_map.emplace(std::make_pair(std::move(vendor), std::move(restrictions))); } + p->had_config_update = true; // This needs to be done before a dialog is shown because of OnIdle() + CallAfter() in Perl + GUI::MsgDataIncompatible dlg(std::move(incompats_map)); const auto res = dlg.ShowModal(); if (res == wxID_REPLACE) { BOOST_LOG_TRIVIAL(info) << "User wants to re-configure..."; p->perform_updates(std::move(updates)); GUI::ConfigWizard wizard(nullptr, GUI::ConfigWizard::RR_DATA_INCOMPAT); - if (wizard.run(GUI::get_preset_bundle(), this)) { - p->had_config_update = true; - } else { + if (! wizard.run(GUI::get_preset_bundle(), this)) { return false; } } else { @@ -566,6 +566,8 @@ bool PresetUpdater::config_update() const updates_map.emplace(std::make_pair(std::move(vendor), std::move(ver_str))); } + p->had_config_update = true; // Ditto, see above + GUI::MsgUpdateConfig dlg(std::move(updates_map)); const auto res = dlg.ShowModal(); @@ -581,8 +583,6 @@ bool PresetUpdater::config_update() const } else { BOOST_LOG_TRIVIAL(info) << "User refused the update"; } - - p->had_config_update = true; } else { BOOST_LOG_TRIVIAL(info) << "No configuration updates available."; } From 6706c3b71f49ee82c9f027b027d62bb75feb049d Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Mon, 25 Jun 2018 13:29:54 +0200 Subject: [PATCH 077/198] ConfigWizard: Mark the first variant of each printer as default in the GUI --- xs/src/slic3r/GUI/ConfigWizard.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xs/src/slic3r/GUI/ConfigWizard.cpp b/xs/src/slic3r/GUI/ConfigWizard.cpp index f723e7f4b..642c6dce7 100644 --- a/xs/src/slic3r/GUI/ConfigWizard.cpp +++ b/xs/src/slic3r/GUI/ConfigWizard.cpp @@ -83,8 +83,11 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, cons const auto model_id = model.id; + bool default_variant = true; // Mark the first variant as default in the GUI for (const auto &variant : model.variants) { - const auto label = wxString::Format("%s %s %s", variant.name, _(L("mm")), _(L("nozzle"))); + const auto label = wxString::Format("%s %s %s %s", variant.name, _(L("mm")), _(L("nozzle")), + (default_variant ? _(L("(default)")) : wxString())); + default_variant = false; auto *cbox = new Checkbox(panel, label, model_id, variant.name); const size_t idx = cboxes.size(); cboxes.push_back(cbox); From 930a2f1d1203ae8c5205b9fcacb70368b9deebb9 Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Wed, 27 Jun 2018 10:34:21 +0200 Subject: [PATCH 078/198] Fix: Http: Body size limit not properly initialized --- xs/src/slic3r/Utils/Http.cpp | 1 + xs/src/slic3r/Utils/Http.hpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/xs/src/slic3r/Utils/Http.cpp b/xs/src/slic3r/Utils/Http.cpp index 47021d39f..949a0e7d6 100644 --- a/xs/src/slic3r/Utils/Http.cpp +++ b/xs/src/slic3r/Utils/Http.cpp @@ -71,6 +71,7 @@ Http::priv::priv(const std::string &url) : form(nullptr), form_end(nullptr), headerlist(nullptr), + limit(0), cancel(false) { if (curl == nullptr) { diff --git a/xs/src/slic3r/Utils/Http.hpp b/xs/src/slic3r/Utils/Http.hpp index 73656bf88..7c2bd84fc 100644 --- a/xs/src/slic3r/Utils/Http.hpp +++ b/xs/src/slic3r/Utils/Http.hpp @@ -46,7 +46,8 @@ public: Http& operator=(const Http &) = delete; Http& operator=(Http &&) = delete; - // Sets a maximum size of the data that can be received. The default is 5MB. + // Sets a maximum size of the data that can be received. + // A value of zero sets the default limit, which is is 5MB. Http& size_limit(size_t sizeLimit); // Sets a HTTP header field. Http& header(std::string name, const std::string &value); From c11a163e08854164e1e1170b3ce4486644bebc84 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Wed, 27 Jun 2018 14:08:46 +0200 Subject: [PATCH 079/198] Correct extruder is used for dontcare extrusions --- xs/src/libslic3r/GCode/ToolOrdering.cpp | 39 ++++++++++++++----------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/xs/src/libslic3r/GCode/ToolOrdering.cpp b/xs/src/libslic3r/GCode/ToolOrdering.cpp index 34bb32e65..20f5318ea 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.cpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.cpp @@ -179,15 +179,13 @@ void ToolOrdering::collect_extruders(const PrintObject &object) } } - // Sort and remove duplicates, make sure that there are some tools for each object layer (e.g. tall wiping object will result in empty extruders vector) - for (auto lt_it=m_layer_tools.begin(); lt_it != m_layer_tools.end(); ++lt_it) { - sort_remove_duplicates(lt_it->extruders); + for (auto& layer : m_layer_tools) { + // Sort and remove duplicates + sort_remove_duplicates(layer.extruders); - if (lt_it->extruders.empty() && lt_it->has_object) - if (lt_it != m_layer_tools.begin()) - lt_it->extruders.push_back(std::prev(lt_it)->extruders.back()); - else - lt_it->extruders.push_back(1); + // make sure that there are some tools for each object layer (e.g. tall wiping object will result in empty extruders vector) + if (layer.extruders.empty() && layer.has_object) + layer.extruders.push_back(0); // 0="dontcare" extruder - it will be taken care of in reorder_extruders } } @@ -360,7 +358,8 @@ void ToolOrdering::collect_extruder_statistics(bool prime_multi_material) // This function is called from Print::mark_wiping_extrusions and sets extruder this entity should be printed with (-1 .. as usual) -void WipingExtrusions::set_extruder_override(const ExtrusionEntity* entity, unsigned int copy_id, int extruder, unsigned int num_of_copies) { +void WipingExtrusions::set_extruder_override(const ExtrusionEntity* entity, unsigned int copy_id, int extruder, unsigned int num_of_copies) +{ something_overridden = true; auto entity_map_it = (entity_map.insert(std::make_pair(entity, std::vector()))).first; // (add and) return iterator @@ -376,7 +375,8 @@ void WipingExtrusions::set_extruder_override(const ExtrusionEntity* entity, unsi // Finds last non-soluble extruder on the layer -bool WipingExtrusions::is_last_nonsoluble_on_layer(const PrintConfig& print_config, const LayerTools& lt, unsigned int extruder) const { +bool WipingExtrusions::is_last_nonsoluble_on_layer(const PrintConfig& print_config, const LayerTools& lt, unsigned int extruder) const +{ for (auto extruders_it = lt.extruders.rbegin(); extruders_it != lt.extruders.rend(); ++extruders_it) if (!print_config.filament_soluble.get_at(*extruders_it)) return (*extruders_it == extruder); @@ -385,12 +385,16 @@ bool WipingExtrusions::is_last_nonsoluble_on_layer(const PrintConfig& print_conf // Decides whether this entity could be overridden -bool WipingExtrusions::is_overriddable(const ExtrusionEntityCollection& eec, const PrintConfig& print_config, const PrintObject& object, const PrintRegion& region) const { - if ((!is_infill(eec.role()) && !object.config.wipe_into_objects) || - ((eec.role() == erTopSolidInfill || eec.role() == erGapFill) && !object.config.wipe_into_objects) || - (is_infill(eec.role()) && !region.config.wipe_into_infill) || - (print_config.filament_soluble.get_at(get_extruder(eec, region))) ) - return false; +bool WipingExtrusions::is_overriddable(const ExtrusionEntityCollection& eec, const PrintConfig& print_config, const PrintObject& object, const PrintRegion& region) const +{ + if (print_config.filament_soluble.get_at(get_extruder(eec, region))) + return false; + + if (object.config.wipe_into_objects) + return true; + + if (!region.config.wipe_into_infill || eec.role() != erInternalInfill) + return false; return true; } @@ -527,7 +531,8 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, const LayerTo // so -1 was used as "print as usual". // The resulting vector has to keep track of which extrusions are the ones that were overridden and which were not. In the extruder is used as overridden, // its number is saved as it is (zero-based index). Usual extrusions are saved as -number-1 (unfortunately there is no negative zero). -const std::vector* WipingExtrusions::get_extruder_overrides(const ExtrusionEntity* entity, int correct_extruder_id, int num_of_copies) { +const std::vector* WipingExtrusions::get_extruder_overrides(const ExtrusionEntity* entity, int correct_extruder_id, int num_of_copies) +{ auto entity_map_it = entity_map.find(entity); if (entity_map_it == entity_map.end()) entity_map_it = (entity_map.insert(std::make_pair(entity, std::vector()))).first; From 54bd0af905b6592f813be46525422beaab946f53 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Wed, 27 Jun 2018 15:07:37 +0200 Subject: [PATCH 080/198] Infill wiping turned off by default and in some automatic tests --- t/combineinfill.t | 1 + t/fill.t | 1 + xs/src/libslic3r/GCode/ToolOrdering.cpp | 13 +++++-------- xs/src/libslic3r/PrintConfig.cpp | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/t/combineinfill.t b/t/combineinfill.t index 5402a84f5..563ecb9c1 100644 --- a/t/combineinfill.t +++ b/t/combineinfill.t @@ -61,6 +61,7 @@ plan tests => 8; $config->set('infill_every_layers', 2); $config->set('perimeter_extruder', 1); $config->set('infill_extruder', 2); + $config->set('wipe_into_infill', 0); $config->set('support_material_extruder', 3); $config->set('support_material_interface_extruder', 3); $config->set('top_solid_layers', 0); diff --git a/t/fill.t b/t/fill.t index dd9eee487..5cbd568dd 100644 --- a/t/fill.t +++ b/t/fill.t @@ -201,6 +201,7 @@ for my $pattern (qw(rectilinear honeycomb hilbertcurve concentric)) { $config->set('bottom_solid_layers', 0); $config->set('infill_extruder', 2); $config->set('infill_extrusion_width', 0.5); + $config->set('wipe_into_infill', 0); $config->set('fill_density', 40); $config->set('cooling', [ 0 ]); # for preventing speeds from being altered $config->set('first_layer_speed', '100%'); # for preventing speeds from being altered diff --git a/xs/src/libslic3r/GCode/ToolOrdering.cpp b/xs/src/libslic3r/GCode/ToolOrdering.cpp index 20f5318ea..761e83fcc 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.cpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.cpp @@ -453,7 +453,7 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, const LayerTo for (const ExtrusionEntity* ee : eec.entities) { // iterate through all infill Collections auto* fill = dynamic_cast(ee); - if (fill->role() == erTopSolidInfill || fill->role() == erGapFill) // these cannot be changed - such infill is / may be visible + if (!is_overriddable(*fill, print.config, *object, region)) continue; // What extruder would this normally be printed with? @@ -467,9 +467,6 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, const LayerTo if (!force_override && volume_to_wipe<=0) continue; - if (!is_overriddable(*fill, print.config, *object, region)) - continue; - if (!object->config.wipe_into_objects && !print.config.infill_first && !force_override) { // In this case we must check that the original extruder is used on this layer before the one we are overridding // (and the perimeters will be finished before the infill is printed): @@ -493,12 +490,15 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, const LayerTo } } - + // Now the same for perimeters - see comments above for explanation: if (object->config.wipe_into_objects && (print.config.infill_first ? perimeters_done : !perimeters_done)) { const ExtrusionEntityCollection& eec = this_layer->regions[region_id]->perimeters; for (const ExtrusionEntity* ee : eec.entities) { // iterate through all perimeter Collections auto* fill = dynamic_cast(ee); + if (!is_overriddable(*fill, print.config, *object, region)) + continue; + // What extruder would this normally be printed with? unsigned int correct_extruder = get_extruder(*fill, region); bool force_override = false; @@ -507,9 +507,6 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, const LayerTo if (!force_override && volume_to_wipe<=0) continue; - if (!is_overriddable(*fill, print.config, *object, region)) - continue; - if (force_override || (!is_entity_overridden(fill, copy) && fill->total_volume() > min_infill_volume)) { set_extruder_override(fill, copy, new_extruder, num_of_copies); volume_to_wipe -= fill->total_volume(); diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 0833e13c8..c28c1404e 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -1892,7 +1892,7 @@ PrintConfigDef::PrintConfigDef() "This lowers the amount of waste but may result in longer print time " " due to additional travel moves."); def->cli = "wipe-into-infill!"; - def->default_value = new ConfigOptionBool(true); + def->default_value = new ConfigOptionBool(false); def = this->add("wipe_into_objects", coBool); def->category = L("Extruders"); From 7ff22b941343bd8f3aabed43d75fb64b9ff5abab Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Wed, 27 Jun 2018 15:35:47 +0200 Subject: [PATCH 081/198] Time estimate emitted to gcode at requested interval --- lib/Slic3r/GUI/Plater.pm | 10 +- xs/src/libslic3r/GCode.cpp | 157 ++++++--- xs/src/libslic3r/GCode.hpp | 10 +- xs/src/libslic3r/GCodeTimeEstimator.cpp | 418 +++++++++++++++++++----- xs/src/libslic3r/GCodeTimeEstimator.hpp | 67 +++- xs/src/libslic3r/Print.hpp | 5 +- xs/src/libslic3r/PrintConfig.cpp | 10 +- xs/xsp/Print.xsp | 4 +- 8 files changed, 544 insertions(+), 137 deletions(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 330ec69d5..9422da354 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -509,7 +509,10 @@ sub new { fil_mm3 => L("Used Filament (mm³)"), fil_g => L("Used Filament (g)"), cost => L("Cost"), - default_time => L("Estimated printing time (default mode)"), +#========================================================================================================================================== + normal_time => L("Estimated printing time (normal mode)"), +# default_time => L("Estimated printing time (default mode)"), +#========================================================================================================================================== silent_time => L("Estimated printing time (silent mode)"), ); while (my $field = shift @info) { @@ -1578,7 +1581,10 @@ sub on_export_completed { $self->{"print_info_cost"}->SetLabel(sprintf("%.2f" , $self->{print}->total_cost)); $self->{"print_info_fil_g"}->SetLabel(sprintf("%.2f" , $self->{print}->total_weight)); $self->{"print_info_fil_mm3"}->SetLabel(sprintf("%.2f" , $self->{print}->total_extruded_volume)); - $self->{"print_info_default_time"}->SetLabel($self->{print}->estimated_default_print_time); +#========================================================================================================================================== + $self->{"print_info_normal_time"}->SetLabel($self->{print}->estimated_normal_print_time); +# $self->{"print_info_default_time"}->SetLabel($self->{print}->estimated_default_print_time); +#========================================================================================================================================== $self->{"print_info_silent_time"}->SetLabel($self->{print}->estimated_silent_print_time); $self->{"print_info_fil_m"}->SetLabel(sprintf("%.2f" , $self->{print}->total_used_filament / 1000)); $self->{"print_info_box_show"}->(1); diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index c1798b0b5..1f0aac816 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -375,8 +375,15 @@ void GCode::do_export(Print *print, const char *path, GCodePreviewData *preview_ } fclose(file); +//################################################################################################################# + m_normal_time_estimator.post_process_remaining_times(path_tmp, 60.0f); +//################################################################################################################# + if (m_silent_time_estimator_enabled) - GCodeTimeEstimator::post_process_elapsed_times(path_tmp, m_default_time_estimator.get_time(), m_silent_time_estimator.get_time()); +//############################################################################################################3 + m_silent_time_estimator.post_process_remaining_times(path_tmp, 60.0f); +// GCodeTimeEstimator::post_process_elapsed_times(path_tmp, m_default_time_estimator.get_time(), m_silent_time_estimator.get_time()); +//############################################################################################################3 if (! this->m_placeholder_parser_failed_templates.empty()) { // G-code export proceeded, but some of the PlaceholderParser substitutions failed. @@ -408,30 +415,72 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) PROFILE_FUNC(); // resets time estimators - m_default_time_estimator.reset(); - m_default_time_estimator.set_dialect(print.config.gcode_flavor); - m_default_time_estimator.set_acceleration(print.config.machine_max_acceleration_extruding.values[0]); - m_default_time_estimator.set_retract_acceleration(print.config.machine_max_acceleration_retracting.values[0]); - m_default_time_estimator.set_minimum_feedrate(print.config.machine_min_extruding_rate.values[0]); - m_default_time_estimator.set_minimum_travel_feedrate(print.config.machine_min_travel_rate.values[0]); - m_default_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::X, print.config.machine_max_acceleration_x.values[0]); - m_default_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Y, print.config.machine_max_acceleration_y.values[0]); - m_default_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Z, print.config.machine_max_acceleration_z.values[0]); - m_default_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::E, print.config.machine_max_acceleration_e.values[0]); - m_default_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::X, print.config.machine_max_feedrate_x.values[0]); - m_default_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Y, print.config.machine_max_feedrate_y.values[0]); - m_default_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Z, print.config.machine_max_feedrate_z.values[0]); - m_default_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::E, print.config.machine_max_feedrate_e.values[0]); - m_default_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::X, print.config.machine_max_jerk_x.values[0]); - m_default_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Y, print.config.machine_max_jerk_y.values[0]); - m_default_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Z, print.config.machine_max_jerk_z.values[0]); - m_default_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::E, print.config.machine_max_jerk_e.values[0]); +//####################################################################################################################################################################### + m_normal_time_estimator.reset(); + m_normal_time_estimator.set_dialect(print.config.gcode_flavor); + m_normal_time_estimator.set_remaining_times_enabled(false); + m_normal_time_estimator.set_acceleration(print.config.machine_max_acceleration_extruding.values[0]); + m_normal_time_estimator.set_retract_acceleration(print.config.machine_max_acceleration_retracting.values[0]); + m_normal_time_estimator.set_minimum_feedrate(print.config.machine_min_extruding_rate.values[0]); + m_normal_time_estimator.set_minimum_travel_feedrate(print.config.machine_min_travel_rate.values[0]); + m_normal_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::X, print.config.machine_max_acceleration_x.values[0]); + m_normal_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Y, print.config.machine_max_acceleration_y.values[0]); + m_normal_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Z, print.config.machine_max_acceleration_z.values[0]); + m_normal_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::E, print.config.machine_max_acceleration_e.values[0]); + m_normal_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::X, print.config.machine_max_feedrate_x.values[0]); + m_normal_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Y, print.config.machine_max_feedrate_y.values[0]); + m_normal_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Z, print.config.machine_max_feedrate_z.values[0]); + m_normal_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::E, print.config.machine_max_feedrate_e.values[0]); + m_normal_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::X, print.config.machine_max_jerk_x.values[0]); + m_normal_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Y, print.config.machine_max_jerk_y.values[0]); + m_normal_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Z, print.config.machine_max_jerk_z.values[0]); + m_normal_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::E, print.config.machine_max_jerk_e.values[0]); + + std::cout << "Normal" << std::endl; + std::cout << "set_acceleration " << print.config.machine_max_acceleration_extruding.values[0] << std::endl; + std::cout << "set_retract_acceleration " << print.config.machine_max_acceleration_retracting.values[0] << std::endl; + std::cout << "set_minimum_feedrate " << print.config.machine_min_extruding_rate.values[0] << std::endl; + std::cout << "set_minimum_travel_feedrate " << print.config.machine_min_travel_rate.values[0] << std::endl; + std::cout << "set_axis_max_acceleration X " << print.config.machine_max_acceleration_x.values[0] << std::endl; + std::cout << "set_axis_max_acceleration Y " << print.config.machine_max_acceleration_y.values[0] << std::endl; + std::cout << "set_axis_max_acceleration Z " << print.config.machine_max_acceleration_z.values[0] << std::endl; + std::cout << "set_axis_max_acceleration E " << print.config.machine_max_acceleration_e.values[0] << std::endl; + std::cout << "set_axis_max_feedrate X " << print.config.machine_max_feedrate_x.values[0] << std::endl; + std::cout << "set_axis_max_feedrate Y " << print.config.machine_max_feedrate_y.values[0] << std::endl; + std::cout << "set_axis_max_feedrate Z " << print.config.machine_max_feedrate_z.values[0] << std::endl; + std::cout << "set_axis_max_feedrate E " << print.config.machine_max_feedrate_e.values[0] << std::endl; + std::cout << "set_axis_max_jerk X " << print.config.machine_max_jerk_x.values[0] << std::endl; + std::cout << "set_axis_max_jerk Y " << print.config.machine_max_jerk_y.values[0] << std::endl; + std::cout << "set_axis_max_jerk Z " << print.config.machine_max_jerk_z.values[0] << std::endl; + std::cout << "set_axis_max_jerk E " << print.config.machine_max_jerk_e.values[0] << std::endl; + + +// m_default_time_estimator.reset(); +// m_default_time_estimator.set_dialect(print.config.gcode_flavor); +// m_default_time_estimator.set_acceleration(print.config.machine_max_acceleration_extruding.values[0]); +// m_default_time_estimator.set_retract_acceleration(print.config.machine_max_acceleration_retracting.values[0]); +// m_default_time_estimator.set_minimum_feedrate(print.config.machine_min_extruding_rate.values[0]); +// m_default_time_estimator.set_minimum_travel_feedrate(print.config.machine_min_travel_rate.values[0]); +// m_default_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::X, print.config.machine_max_acceleration_x.values[0]); +// m_default_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Y, print.config.machine_max_acceleration_y.values[0]); +// m_default_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Z, print.config.machine_max_acceleration_z.values[0]); +// m_default_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::E, print.config.machine_max_acceleration_e.values[0]); +// m_default_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::X, print.config.machine_max_feedrate_x.values[0]); +// m_default_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Y, print.config.machine_max_feedrate_y.values[0]); +// m_default_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Z, print.config.machine_max_feedrate_z.values[0]); +// m_default_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::E, print.config.machine_max_feedrate_e.values[0]); +// m_default_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::X, print.config.machine_max_jerk_x.values[0]); +// m_default_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Y, print.config.machine_max_jerk_y.values[0]); +// m_default_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Z, print.config.machine_max_jerk_z.values[0]); +// m_default_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::E, print.config.machine_max_jerk_e.values[0]); +//####################################################################################################################################################################### m_silent_time_estimator_enabled = (print.config.gcode_flavor == gcfMarlin) && print.config.silent_mode; if (m_silent_time_estimator_enabled) { m_silent_time_estimator.reset(); m_silent_time_estimator.set_dialect(print.config.gcode_flavor); + m_silent_time_estimator.set_remaining_times_enabled(false); m_silent_time_estimator.set_acceleration(print.config.machine_max_acceleration_extruding.values[1]); m_silent_time_estimator.set_retract_acceleration(print.config.machine_max_acceleration_retracting.values[1]); m_silent_time_estimator.set_minimum_feedrate(print.config.machine_min_extruding_rate.values[1]); @@ -638,12 +687,14 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) _writeln(file, buf); } - // before start gcode time estimation - if (m_silent_time_estimator_enabled) - { - _write(file, m_default_time_estimator.get_elapsed_time_string().c_str()); - _write(file, m_silent_time_estimator.get_elapsed_time_string().c_str()); - } +//####################################################################################################################################################################### +// // before start gcode time estimation +// if (m_silent_time_estimator_enabled) +// { +// _write(file, m_default_time_estimator.get_elapsed_time_string().c_str()); +// _write(file, m_silent_time_estimator.get_elapsed_time_string().c_str()); +// } +//####################################################################################################################################################################### // Write the custom start G-code _writeln(file, start_gcode); @@ -849,21 +900,34 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) for (const std::string &end_gcode : print.config.end_filament_gcode.values) _writeln(file, this->placeholder_parser_process("end_filament_gcode", end_gcode, (unsigned int)(&end_gcode - &print.config.end_filament_gcode.values.front()), &config)); } - // before end gcode time estimation - if (m_silent_time_estimator_enabled) - { - _write(file, m_default_time_estimator.get_elapsed_time_string().c_str()); - _write(file, m_silent_time_estimator.get_elapsed_time_string().c_str()); - } +//####################################################################################################################################################################### +// // before end gcode time estimation +// if (m_silent_time_estimator_enabled) +// { +// _write(file, m_default_time_estimator.get_elapsed_time_string().c_str()); +// _write(file, m_silent_time_estimator.get_elapsed_time_string().c_str()); +// } +//####################################################################################################################################################################### _writeln(file, this->placeholder_parser_process("end_gcode", print.config.end_gcode, m_writer.extruder()->id(), &config)); } _write(file, m_writer.update_progress(m_layer_count, m_layer_count, true)); // 100% _write(file, m_writer.postamble()); // calculates estimated printing time - m_default_time_estimator.calculate_time(); +//####################################################################################################################################################################### + m_normal_time_estimator.set_remaining_times_enabled(true); + m_normal_time_estimator.calculate_time(); +// m_default_time_estimator.calculate_time(); +//####################################################################################################################################################################### if (m_silent_time_estimator_enabled) +//####################################################################################################################################################################### + { + m_silent_time_estimator.set_remaining_times_enabled(true); +//####################################################################################################################################################################### m_silent_time_estimator.calculate_time(); +//####################################################################################################################################################################### + } +//####################################################################################################################################################################### // Get filament stats. print.filament_stats.clear(); @@ -871,7 +935,10 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) print.total_extruded_volume = 0.; print.total_weight = 0.; print.total_cost = 0.; - print.estimated_default_print_time = m_default_time_estimator.get_time_dhms(); +//####################################################################################################################################################################### + print.estimated_normal_print_time = m_normal_time_estimator.get_time_dhms(); +// print.estimated_default_print_time = m_default_time_estimator.get_time_dhms(); +//####################################################################################################################################################################### print.estimated_silent_print_time = m_silent_time_estimator_enabled ? m_silent_time_estimator.get_time_dhms() : "N/A"; for (const Extruder &extruder : m_writer.extruders()) { double used_filament = extruder.used_filament(); @@ -892,7 +959,10 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) print.total_extruded_volume = print.total_extruded_volume + extruded_volume; } _write_format(file, "; total filament cost = %.1lf\n", print.total_cost); - _write_format(file, "; estimated printing time (default mode) = %s\n", m_default_time_estimator.get_time_dhms().c_str()); +//####################################################################################################################################################################### + _write_format(file, "; estimated printing time (normal mode) = %s\n", m_normal_time_estimator.get_time_dhms().c_str()); +// _write_format(file, "; estimated printing time (default mode) = %s\n", m_default_time_estimator.get_time_dhms().c_str()); +//####################################################################################################################################################################### if (m_silent_time_estimator_enabled) _write_format(file, "; estimated printing time (silent mode) = %s\n", m_silent_time_estimator.get_time_dhms().c_str()); @@ -1462,12 +1532,14 @@ void GCode::process_layer( _write(file, gcode); - // after layer time estimation - if (m_silent_time_estimator_enabled) - { - _write(file, m_default_time_estimator.get_elapsed_time_string().c_str()); - _write(file, m_silent_time_estimator.get_elapsed_time_string().c_str()); - } +//####################################################################################################################################################################### +// // after layer time estimation +// if (m_silent_time_estimator_enabled) +// { +// _write(file, m_default_time_estimator.get_elapsed_time_string().c_str()); +// _write(file, m_silent_time_estimator.get_elapsed_time_string().c_str()); +// } +//####################################################################################################################################################################### } void GCode::apply_print_config(const PrintConfig &print_config) @@ -2126,7 +2198,10 @@ void GCode::_write(FILE* file, const char *what) // writes string to file fwrite(gcode, 1, ::strlen(gcode), file); // updates time estimator and gcode lines vector - m_default_time_estimator.add_gcode_block(gcode); +//####################################################################################################################################################################### + m_normal_time_estimator.add_gcode_block(gcode); +// m_default_time_estimator.add_gcode_block(gcode); +//####################################################################################################################################################################### if (m_silent_time_estimator_enabled) m_silent_time_estimator.add_gcode_block(gcode); } diff --git a/xs/src/libslic3r/GCode.hpp b/xs/src/libslic3r/GCode.hpp index 9fd31b993..d994e750f 100644 --- a/xs/src/libslic3r/GCode.hpp +++ b/xs/src/libslic3r/GCode.hpp @@ -133,7 +133,10 @@ public: m_last_height(GCodeAnalyzer::Default_Height), m_brim_done(false), m_second_layer_things_done(false), - m_default_time_estimator(GCodeTimeEstimator::Default), +//############################################################################################################3 + m_normal_time_estimator(GCodeTimeEstimator::Normal), +// m_default_time_estimator(GCodeTimeEstimator::Default), +//############################################################################################################3 m_silent_time_estimator(GCodeTimeEstimator::Silent), m_silent_time_estimator_enabled(false), m_last_obj_copy(nullptr, Point(std::numeric_limits::max(), std::numeric_limits::max())) @@ -293,7 +296,10 @@ protected: std::pair m_last_obj_copy; // Time estimators - GCodeTimeEstimator m_default_time_estimator; +//############################################################################################################3 + GCodeTimeEstimator m_normal_time_estimator; +// GCodeTimeEstimator m_default_time_estimator; +//############################################################################################################3 GCodeTimeEstimator m_silent_time_estimator; bool m_silent_time_estimator_enabled; diff --git a/xs/src/libslic3r/GCodeTimeEstimator.cpp b/xs/src/libslic3r/GCodeTimeEstimator.cpp index ad82c6820..8f306835f 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.cpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.cpp @@ -12,15 +12,26 @@ static const float MMMIN_TO_MMSEC = 1.0f / 60.0f; static const float MILLISEC_TO_SEC = 0.001f; static const float INCHES_TO_MM = 25.4f; -static const float DEFAULT_FEEDRATE = 1500.0f; // from Prusa Firmware (Marlin_main.cpp) -static const float DEFAULT_ACCELERATION = 1500.0f; // Prusa Firmware 1_75mm_MK2 -static const float DEFAULT_RETRACT_ACCELERATION = 1500.0f; // Prusa Firmware 1_75mm_MK2 -static const float DEFAULT_AXIS_MAX_FEEDRATE[] = { 500.0f, 500.0f, 12.0f, 120.0f }; // Prusa Firmware 1_75mm_MK2 -static const float DEFAULT_AXIS_MAX_ACCELERATION[] = { 9000.0f, 9000.0f, 500.0f, 10000.0f }; // Prusa Firmware 1_75mm_MK2 -static const float DEFAULT_AXIS_MAX_JERK[] = { 10.0f, 10.0f, 0.2f, 2.5f }; // from Prusa Firmware (Configuration.h) -static const float DEFAULT_MINIMUM_FEEDRATE = 0.0f; // from Prusa Firmware (Configuration_adv.h) -static const float DEFAULT_MINIMUM_TRAVEL_FEEDRATE = 0.0f; // from Prusa Firmware (Configuration_adv.h) -static const float DEFAULT_EXTRUDE_FACTOR_OVERRIDE_PERCENTAGE = 1.0f; // 100 percent +//####################################################################################################################################################################### +static const float NORMAL_FEEDRATE = 1500.0f; // from Prusa Firmware (Marlin_main.cpp) +static const float NORMAL_ACCELERATION = 1500.0f; // Prusa Firmware 1_75mm_MK2 +static const float NORMAL_RETRACT_ACCELERATION = 1500.0f; // Prusa Firmware 1_75mm_MK2 +static const float NORMAL_AXIS_MAX_FEEDRATE[] = { 500.0f, 500.0f, 12.0f, 120.0f }; // Prusa Firmware 1_75mm_MK2 +static const float NORMAL_AXIS_MAX_ACCELERATION[] = { 9000.0f, 9000.0f, 500.0f, 10000.0f }; // Prusa Firmware 1_75mm_MK2 +static const float NORMAL_AXIS_MAX_JERK[] = { 10.0f, 10.0f, 0.4f, 2.5f }; // from Prusa Firmware (Configuration.h) +static const float NORMAL_MINIMUM_FEEDRATE = 0.0f; // from Prusa Firmware (Configuration_adv.h) +static const float NORMAL_MINIMUM_TRAVEL_FEEDRATE = 0.0f; // from Prusa Firmware (Configuration_adv.h) +static const float NORMAL_EXTRUDE_FACTOR_OVERRIDE_PERCENTAGE = 1.0f; // 100 percent +//static const float DEFAULT_FEEDRATE = 1500.0f; // from Prusa Firmware (Marlin_main.cpp) +//static const float DEFAULT_ACCELERATION = 1500.0f; // Prusa Firmware 1_75mm_MK2 +//static const float DEFAULT_RETRACT_ACCELERATION = 1500.0f; // Prusa Firmware 1_75mm_MK2 +//static const float DEFAULT_AXIS_MAX_FEEDRATE[] = { 500.0f, 500.0f, 12.0f, 120.0f }; // Prusa Firmware 1_75mm_MK2 +//static const float DEFAULT_AXIS_MAX_ACCELERATION[] = { 9000.0f, 9000.0f, 500.0f, 10000.0f }; // Prusa Firmware 1_75mm_MK2 +//static const float DEFAULT_AXIS_MAX_JERK[] = { 10.0f, 10.0f, 0.2f, 2.5f }; // from Prusa Firmware (Configuration.h) +//static const float DEFAULT_MINIMUM_FEEDRATE = 0.0f; // from Prusa Firmware (Configuration_adv.h) +//static const float DEFAULT_MINIMUM_TRAVEL_FEEDRATE = 0.0f; // from Prusa Firmware (Configuration_adv.h) +//static const float DEFAULT_EXTRUDE_FACTOR_OVERRIDE_PERCENTAGE = 1.0f; // 100 percent +//####################################################################################################################################################################### static const float SILENT_FEEDRATE = 1500.0f; // from Prusa Firmware (Marlin_main.cpp) static const float SILENT_ACCELERATION = 1250.0f; // Prusa Firmware 1_75mm_MK25-RAMBo13a-E3Dv6full @@ -34,10 +45,12 @@ static const float SILENT_EXTRUDE_FACTOR_OVERRIDE_PERCENTAGE = 1.0f; // 100 perc static const float PREVIOUS_FEEDRATE_THRESHOLD = 0.0001f; -static const std::string ELAPSED_TIME_TAG_DEFAULT = ";_ELAPSED_TIME_DEFAULT: "; -static const std::string ELAPSED_TIME_TAG_SILENT = ";_ELAPSED_TIME_SILENT: "; - -static const std::string REMAINING_TIME_CMD = "M73"; +//############################################################################################################3 +//static const std::string ELAPSED_TIME_TAG_DEFAULT = ";_ELAPSED_TIME_DEFAULT: "; +//static const std::string ELAPSED_TIME_TAG_SILENT = ";_ELAPSED_TIME_SILENT: "; +// +//static const std::string REMAINING_TIME_CMD = "M73"; +//############################################################################################################3 #if ENABLE_MOVE_STATS static const std::string MOVE_TYPE_STR[Slic3r::GCodeTimeEstimator::Block::Num_Types] = @@ -93,8 +106,19 @@ namespace Slic3r { return ::sqrt(value); } +//################################################################################################################# + GCodeTimeEstimator::Block::Time::Time() + : elapsed(-1.0f) + , remaining(-1.0f) + { + } +//################################################################################################################# + GCodeTimeEstimator::Block::Block() : st_synchronized(false) +//################################################################################################################# + , g1_line_id(0) +//################################################################################################################# { } @@ -159,6 +183,13 @@ namespace Slic3r { trapezoid.decelerate_after = accelerate_distance + cruise_distance; } +//################################################################################################################# + void GCodeTimeEstimator::Block::calculate_remaining_time(float final_time) + { + time.remaining = (time.elapsed >= 0.0f) ? final_time - time.elapsed : -1.0f; + } +//################################################################################################################# + float GCodeTimeEstimator::Block::max_allowable_speed(float acceleration, float target_velocity, float distance) { // to avoid invalid negative numbers due to numerical imprecision @@ -217,6 +248,10 @@ namespace Slic3r { _reset_time(); _set_blocks_st_synchronize(false); _calculate_time(); +//################################################################################################################# + if (are_remaining_times_enabled()) + _calculate_remaining_times(); +//################################################################################################################# #if ENABLE_MOVE_STATS _log_moves_stats(); @@ -265,82 +300,180 @@ namespace Slic3r { #endif // ENABLE_MOVE_STATS } - std::string GCodeTimeEstimator::get_elapsed_time_string() - { - calculate_time(); - switch (_mode) - { - default: - case Default: - return ELAPSED_TIME_TAG_DEFAULT + std::to_string(get_time()) + "\n"; - case Silent: - return ELAPSED_TIME_TAG_SILENT + std::to_string(get_time()) + "\n"; - } - } +//############################################################################################################3 +// std::string GCodeTimeEstimator::get_elapsed_time_string() +// { +// calculate_time(); +// switch (_mode) +// { +// default: +// case Default: +// return ELAPSED_TIME_TAG_DEFAULT + std::to_string(get_time()) + "\n"; +// case Silent: +// return ELAPSED_TIME_TAG_SILENT + std::to_string(get_time()) + "\n"; +// } +// } +// +// bool GCodeTimeEstimator::post_process_elapsed_times(const std::string& filename, float default_time, float silent_time) +// { +// boost::nowide::ifstream in(filename); +// if (!in.good()) +// throw std::runtime_error(std::string("Remaining times estimation failed.\nCannot open file for reading.\n")); +// +// std::string path_tmp = filename + ".times"; +// +// FILE* out = boost::nowide::fopen(path_tmp.c_str(), "wb"); +// if (out == nullptr) +// throw std::runtime_error(std::string("Remaining times estimation failed.\nCannot open file for writing.\n")); +// +// std::string line; +// while (std::getline(in, line)) +// { +// if (!in.good()) +// { +// fclose(out); +// throw std::runtime_error(std::string("Remaining times estimation failed.\nError while reading from file.\n")); +// } +// +// // this function expects elapsed time for default and silent mode to be into two consecutive lines inside the gcode +// if (boost::contains(line, ELAPSED_TIME_TAG_DEFAULT)) +// { +// std::string default_elapsed_time_str = line.substr(ELAPSED_TIME_TAG_DEFAULT.length()); +// float elapsed_time = (float)atof(default_elapsed_time_str.c_str()); +// float remaining_time = default_time - elapsed_time; +// line = REMAINING_TIME_CMD + " P" + std::to_string((int)(100.0f * elapsed_time / default_time)); +// line += " R" + _get_time_minutes(remaining_time); +// +// std::string next_line; +// std::getline(in, next_line); +// if (!in.good()) +// { +// fclose(out); +// throw std::runtime_error(std::string("Remaining times estimation failed.\nError while reading from file.\n")); +// } +// +// if (boost::contains(next_line, ELAPSED_TIME_TAG_SILENT)) +// { +// std::string silent_elapsed_time_str = next_line.substr(ELAPSED_TIME_TAG_SILENT.length()); +// float elapsed_time = (float)atof(silent_elapsed_time_str.c_str()); +// float remaining_time = silent_time - elapsed_time; +// line += " Q" + std::to_string((int)(100.0f * elapsed_time / silent_time)); +// line += " S" + _get_time_minutes(remaining_time); +// } +// else +// // found horphaned default elapsed time, skip the remaining time line output +// line = next_line; +// } +// else if (boost::contains(line, ELAPSED_TIME_TAG_SILENT)) +// // found horphaned silent elapsed time, skip the remaining time line output +// continue; +// +// line += "\n"; +// fwrite((const void*)line.c_str(), 1, line.length(), out); +// if (ferror(out)) +// { +// in.close(); +// fclose(out); +// boost::nowide::remove(path_tmp.c_str()); +// throw std::runtime_error(std::string("Remaining times estimation failed.\nIs the disk full?\n")); +// } +// } +// +// fclose(out); +// in.close(); +// +// boost::nowide::remove(filename.c_str()); +// if (boost::nowide::rename(path_tmp.c_str(), filename.c_str()) != 0) +// throw std::runtime_error(std::string("Failed to rename the output G-code file from ") + path_tmp + " to " + filename + '\n' + +// "Is " + path_tmp + " locked?" + '\n'); +// +// return true; +// } +//############################################################################################################3 - bool GCodeTimeEstimator::post_process_elapsed_times(const std::string& filename, float default_time, float silent_time) +//################################################################################################################# + bool GCodeTimeEstimator::post_process_remaining_times(const std::string& filename, float interval) { boost::nowide::ifstream in(filename); if (!in.good()) - throw std::runtime_error(std::string("Remaining times estimation failed.\nCannot open file for reading.\n")); + throw std::runtime_error(std::string("Remaining times export failed.\nCannot open file for reading.\n")); std::string path_tmp = filename + ".times"; FILE* out = boost::nowide::fopen(path_tmp.c_str(), "wb"); if (out == nullptr) - throw std::runtime_error(std::string("Remaining times estimation failed.\nCannot open file for writing.\n")); + throw std::runtime_error(std::string("Remaining times export failed.\nCannot open file for writing.\n")); - std::string line; - while (std::getline(in, line)) + std::string time_mask; + switch (_mode) + { + default: + case Normal: + { + time_mask = "M73 P%s R%s\n"; + break; + } + case Silent: + { + time_mask = "M73 Q%s S%s\n"; + break; + } + } + + unsigned int g1_lines_count = 0; + float last_recorded_time = _time; + std::string gcode_line; + while (std::getline(in, gcode_line)) { if (!in.good()) { fclose(out); - throw std::runtime_error(std::string("Remaining times estimation failed.\nError while reading from file.\n")); + throw std::runtime_error(std::string("Remaining times export failed.\nError while reading from file.\n")); } - // this function expects elapsed time for default and silent mode to be into two consecutive lines inside the gcode - if (boost::contains(line, ELAPSED_TIME_TAG_DEFAULT)) - { - std::string default_elapsed_time_str = line.substr(ELAPSED_TIME_TAG_DEFAULT.length()); - float elapsed_time = (float)atof(default_elapsed_time_str.c_str()); - float remaining_time = default_time - elapsed_time; - line = REMAINING_TIME_CMD + " P" + std::to_string((int)(100.0f * elapsed_time / default_time)); - line += " R" + _get_time_minutes(remaining_time); - - std::string next_line; - std::getline(in, next_line); - if (!in.good()) - { - fclose(out); - throw std::runtime_error(std::string("Remaining times estimation failed.\nError while reading from file.\n")); - } - - if (boost::contains(next_line, ELAPSED_TIME_TAG_SILENT)) - { - std::string silent_elapsed_time_str = next_line.substr(ELAPSED_TIME_TAG_SILENT.length()); - float elapsed_time = (float)atof(silent_elapsed_time_str.c_str()); - float remaining_time = silent_time - elapsed_time; - line += " Q" + std::to_string((int)(100.0f * elapsed_time / silent_time)); - line += " S" + _get_time_minutes(remaining_time); - } - else - // found horphaned default elapsed time, skip the remaining time line output - line = next_line; - } - else if (boost::contains(line, ELAPSED_TIME_TAG_SILENT)) - // found horphaned silent elapsed time, skip the remaining time line output - continue; - - line += "\n"; - fwrite((const void*)line.c_str(), 1, line.length(), out); + // saves back the line + gcode_line += "\n"; + fwrite((const void*)gcode_line.c_str(), 1, gcode_line.length(), out); if (ferror(out)) { in.close(); fclose(out); boost::nowide::remove(path_tmp.c_str()); - throw std::runtime_error(std::string("Remaining times estimation failed.\nIs the disk full?\n")); + throw std::runtime_error(std::string("Remaining times export failed.\nIs the disk full?\n")); } + + // add remaining time lines where needed + _parser.parse_line(gcode_line, + [this, &g1_lines_count, &last_recorded_time, &in, &out, &path_tmp, time_mask, interval](GCodeReader& reader, const GCodeReader::GCodeLine& line) + { + if (line.cmd_is("G1")) + { + ++g1_lines_count; + for (const Block& block : _blocks) + { + if (block.g1_line_id == g1_lines_count) + { + if ((last_recorded_time == _time) || (last_recorded_time - block.time.remaining > interval)) + { + char buffer[1024]; + sprintf(buffer, time_mask.c_str(), std::to_string((int)(100.0f * block.time.elapsed / _time)).c_str(), _get_time_minutes(block.time.remaining).c_str()); + + fwrite((const void*)buffer, 1, ::strlen(buffer), out); + if (ferror(out)) + { + in.close(); + fclose(out); + boost::nowide::remove(path_tmp.c_str()); + throw std::runtime_error(std::string("Remaining times export failed.\nIs the disk full?\n")); + } + + last_recorded_time = block.time.remaining; + break; + } + } + } + } + }); } fclose(out); @@ -353,6 +486,7 @@ namespace Slic3r { return true; } +//################################################################################################################# void GCodeTimeEstimator::set_axis_position(EAxis axis, float position) { @@ -371,6 +505,25 @@ namespace Slic3r { void GCodeTimeEstimator::set_axis_max_jerk(EAxis axis, float jerk) { +//############################################################################################################3 + if ((axis == X) || (axis == Y)) + { + switch (_mode) + { + default: + case Normal: + { + jerk = std::min(jerk, NORMAL_AXIS_MAX_JERK[axis]); + break; + } + case Silent: + { + jerk = std::min(jerk, SILENT_AXIS_MAX_JERK[axis]); + break; + } + } + } +//############################################################################################################3 _state.axis[axis].max_jerk = jerk; } @@ -494,6 +647,33 @@ namespace Slic3r { return _state.e_local_positioning_type; } +//################################################################################################################# + bool GCodeTimeEstimator::are_remaining_times_enabled() const + { + return _state.remaining_times_enabled; + } + + void GCodeTimeEstimator::set_remaining_times_enabled(bool enable) + { + _state.remaining_times_enabled = enable; + } + + int GCodeTimeEstimator::get_g1_line_id() const + { + return _state.g1_line_id; + } + + void GCodeTimeEstimator::increment_g1_line_id() + { + ++_state.g1_line_id; + } + + void GCodeTimeEstimator::reset_g1_line_id() + { + _state.g1_line_id = 0; + } +//################################################################################################################# + void GCodeTimeEstimator::add_additional_time(float timeSec) { _state.additional_time += timeSec; @@ -515,13 +695,22 @@ namespace Slic3r { set_dialect(gcfRepRap); set_global_positioning_type(Absolute); set_e_local_positioning_type(Absolute); +//################################################################################################################# + set_remaining_times_enabled(false); +//################################################################################################################# switch (_mode) { default: - case Default: +//############################################################################################################3 + case Normal: +// case Default: +//############################################################################################################3 { - _set_default_as_default(); +//############################################################################################################3 + _set_default_as_normal(); +// _set_default_as_default(); +//############################################################################################################3 break; } case Silent: @@ -567,6 +756,10 @@ namespace Slic3r { set_axis_position(Z, 0.0f); set_additional_time(0.0f); + +//############################################################################################################3 + reset_g1_line_id(); +//############################################################################################################3 } void GCodeTimeEstimator::_reset_time() @@ -579,22 +772,61 @@ namespace Slic3r { _blocks.clear(); } - void GCodeTimeEstimator::_set_default_as_default() +//############################################################################################################3 + void GCodeTimeEstimator::_set_default_as_normal() +// void GCodeTimeEstimator::_set_default_as_default() +//############################################################################################################3 { - set_feedrate(DEFAULT_FEEDRATE); - set_acceleration(DEFAULT_ACCELERATION); - set_retract_acceleration(DEFAULT_RETRACT_ACCELERATION); - set_minimum_feedrate(DEFAULT_MINIMUM_FEEDRATE); - set_minimum_travel_feedrate(DEFAULT_MINIMUM_TRAVEL_FEEDRATE); - set_extrude_factor_override_percentage(DEFAULT_EXTRUDE_FACTOR_OVERRIDE_PERCENTAGE); +//############################################################################################################3 + set_feedrate(NORMAL_FEEDRATE); + set_acceleration(NORMAL_ACCELERATION); + set_retract_acceleration(NORMAL_RETRACT_ACCELERATION); + set_minimum_feedrate(NORMAL_MINIMUM_FEEDRATE); + set_minimum_travel_feedrate(NORMAL_MINIMUM_TRAVEL_FEEDRATE); + set_extrude_factor_override_percentage(NORMAL_EXTRUDE_FACTOR_OVERRIDE_PERCENTAGE); for (unsigned char a = X; a < Num_Axis; ++a) { EAxis axis = (EAxis)a; - set_axis_max_feedrate(axis, DEFAULT_AXIS_MAX_FEEDRATE[a]); - set_axis_max_acceleration(axis, DEFAULT_AXIS_MAX_ACCELERATION[a]); - set_axis_max_jerk(axis, DEFAULT_AXIS_MAX_JERK[a]); + set_axis_max_feedrate(axis, NORMAL_AXIS_MAX_FEEDRATE[a]); + set_axis_max_acceleration(axis, NORMAL_AXIS_MAX_ACCELERATION[a]); + set_axis_max_jerk(axis, NORMAL_AXIS_MAX_JERK[a]); } + + std::cout << "Normal Default" << std::endl; + std::cout << "set_acceleration " << NORMAL_ACCELERATION << std::endl; + std::cout << "set_retract_acceleration " << NORMAL_RETRACT_ACCELERATION << std::endl; + std::cout << "set_minimum_feedrate " << NORMAL_MINIMUM_FEEDRATE << std::endl; + std::cout << "set_minimum_travel_feedrate " << NORMAL_MINIMUM_TRAVEL_FEEDRATE << std::endl; + std::cout << "set_axis_max_acceleration X " << NORMAL_AXIS_MAX_ACCELERATION[X] << std::endl; + std::cout << "set_axis_max_acceleration Y " << NORMAL_AXIS_MAX_ACCELERATION[Y] << std::endl; + std::cout << "set_axis_max_acceleration Z " << NORMAL_AXIS_MAX_ACCELERATION[Z] << std::endl; + std::cout << "set_axis_max_acceleration E " << NORMAL_AXIS_MAX_ACCELERATION[E] << std::endl; + std::cout << "set_axis_max_feedrate X " << NORMAL_AXIS_MAX_FEEDRATE[X] << std::endl; + std::cout << "set_axis_max_feedrate Y " << NORMAL_AXIS_MAX_FEEDRATE[Y] << std::endl; + std::cout << "set_axis_max_feedrate Z " << NORMAL_AXIS_MAX_FEEDRATE[Z] << std::endl; + std::cout << "set_axis_max_feedrate E " << NORMAL_AXIS_MAX_FEEDRATE[E] << std::endl; + std::cout << "set_axis_max_jerk X " << NORMAL_AXIS_MAX_JERK[X] << std::endl; + std::cout << "set_axis_max_jerk Y " << NORMAL_AXIS_MAX_JERK[Y] << std::endl; + std::cout << "set_axis_max_jerk Z " << NORMAL_AXIS_MAX_JERK[Z] << std::endl; + std::cout << "set_axis_max_jerk E " << NORMAL_AXIS_MAX_JERK[E] << std::endl; + + +// set_feedrate(DEFAULT_FEEDRATE); +// set_acceleration(DEFAULT_ACCELERATION); +// set_retract_acceleration(DEFAULT_RETRACT_ACCELERATION); +// set_minimum_feedrate(DEFAULT_MINIMUM_FEEDRATE); +// set_minimum_travel_feedrate(DEFAULT_MINIMUM_TRAVEL_FEEDRATE); +// set_extrude_factor_override_percentage(DEFAULT_EXTRUDE_FACTOR_OVERRIDE_PERCENTAGE); +// +// for (unsigned char a = X; a < Num_Axis; ++a) +// { +// EAxis axis = (EAxis)a; +// set_axis_max_feedrate(axis, DEFAULT_AXIS_MAX_FEEDRATE[a]); +// set_axis_max_acceleration(axis, DEFAULT_AXIS_MAX_ACCELERATION[a]); +// set_axis_max_jerk(axis, DEFAULT_AXIS_MAX_JERK[a]); +// } +//############################################################################################################3 } void GCodeTimeEstimator::_set_default_as_silent() @@ -631,7 +863,10 @@ namespace Slic3r { _time += get_additional_time(); - for (const Block& block : _blocks) +//########################################################################################################################## + for (Block& block : _blocks) +// for (const Block& block : _blocks) +//########################################################################################################################## { if (block.st_synchronized) continue; @@ -642,6 +877,9 @@ namespace Slic3r { block_time += block.cruise_time(); block_time += block.deceleration_time(); _time += block_time; +//########################################################################################################################## + block.time.elapsed = _time; +//########################################################################################################################## MovesStatsMap::iterator it = _moves_stats.find(block.move_type); if (it == _moves_stats.end()) @@ -653,10 +891,23 @@ namespace Slic3r { _time += block.acceleration_time(); _time += block.cruise_time(); _time += block.deceleration_time(); +//########################################################################################################################## + block.time.elapsed = _time; +//########################################################################################################################## #endif // ENABLE_MOVE_STATS } } +//################################################################################################################# + void GCodeTimeEstimator::_calculate_remaining_times() + { + for (Block& block : _blocks) + { + block.calculate_remaining_time(_time); + } + } +//################################################################################################################# + void GCodeTimeEstimator::_process_gcode_line(GCodeReader&, const GCodeReader::GCodeLine& line) { PROFILE_FUNC(); @@ -790,6 +1041,10 @@ namespace Slic3r { void GCodeTimeEstimator::_processG1(const GCodeReader::GCodeLine& line) { +//############################################################################################################3 + increment_g1_line_id(); +//############################################################################################################3 + // updates axes positions from line EUnits units = get_units(); float new_pos[Num_Axis]; @@ -808,6 +1063,9 @@ namespace Slic3r { // fills block data Block block; +//############################################################################################################3 + block.g1_line_id = get_g1_line_id(); +//############################################################################################################3 // calculates block movement deltas float max_abs_delta = 0.0f; diff --git a/xs/src/libslic3r/GCodeTimeEstimator.hpp b/xs/src/libslic3r/GCodeTimeEstimator.hpp index 14ff1efea..924c9e303 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.hpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.hpp @@ -19,7 +19,10 @@ namespace Slic3r { public: enum EMode : unsigned char { - Default, +//####################################################################################################################################################################### + Normal, +// Default, +//####################################################################################################################################################################### Silent }; @@ -77,6 +80,10 @@ namespace Slic3r { float minimum_feedrate; // mm/s float minimum_travel_feedrate; // mm/s float extrude_factor_override_percentage; +//################################################################################################################# + bool remaining_times_enabled; + unsigned int g1_line_id; +//################################################################################################################# }; public: @@ -127,6 +134,15 @@ namespace Slic3r { bool nominal_length; }; +//################################################################################################################# + struct Time + { + float elapsed; + float remaining; + + Time(); + }; +//################################################################################################################# #if ENABLE_MOVE_STATS EMoveType move_type; @@ -140,6 +156,10 @@ namespace Slic3r { FeedrateProfile feedrate; Trapezoid trapezoid; +//################################################################################################################# + Time time; + unsigned int g1_line_id; +//################################################################################################################# bool st_synchronized; @@ -169,6 +189,10 @@ namespace Slic3r { // Calculates this block's trapezoid void calculate_trapezoid(); +//################################################################################################################# + void calculate_remaining_time(float final_time); +//################################################################################################################# + // Calculates the maximum allowable speed at this point when you must be able to reach target_velocity using the // acceleration within the allotted distance. static float max_allowable_speed(float acceleration, float target_velocity, float distance); @@ -231,12 +255,25 @@ namespace Slic3r { // Calculates the time estimate from the gcode contained in given list of gcode lines void calculate_time_from_lines(const std::vector& gcode_lines); - // Calculates the time estimate from the gcode lines added using add_gcode_line() or add_gcode_block() - // and returns it in a formatted string - std::string get_elapsed_time_string(); +//############################################################################################################3 +// // Calculates the time estimate from the gcode lines added using add_gcode_line() or add_gcode_block() +// // and returns it in a formatted string +// std::string get_elapsed_time_string(); +//############################################################################################################3 - // Converts elapsed time lines, contained in the gcode saved with the given filename, into remaining time commands - static bool post_process_elapsed_times(const std::string& filename, float default_time, float silent_time); +//############################################################################################################3 +// // Converts elapsed time lines, contained in the gcode saved with the given filename, into remaining time commands +// static bool post_process_elapsed_times(const std::string& filename, float default_time, float silent_time); +//############################################################################################################3 + +//################################################################################################################# + // Process the gcode contained in the file with the given filename, + // placing in it new lines (M73) containing the remaining time, at the given interval in seconds + // and saving the result back in the same file + // This time estimator should have been already used to calculate the time estimate for the gcode + // contained in the given file before to call this method + bool post_process_remaining_times(const std::string& filename, float interval_sec); +//################################################################################################################# // Set current position on the given axis with the given value void set_axis_position(EAxis axis, float position); @@ -282,6 +319,15 @@ namespace Slic3r { void set_e_local_positioning_type(EPositioningType type); EPositioningType get_e_local_positioning_type() const; +//################################################################################################################# + bool are_remaining_times_enabled() const; + void set_remaining_times_enabled(bool enable); + + int get_g1_line_id() const; + void increment_g1_line_id(); + void reset_g1_line_id(); +//################################################################################################################# + void add_additional_time(float timeSec); void set_additional_time(float timeSec); float get_additional_time() const; @@ -305,7 +351,10 @@ namespace Slic3r { void _reset_time(); void _reset_blocks(); - void _set_default_as_default(); +//############################################################################################################3 + void _set_default_as_normal(); +// void _set_default_as_default(); +//############################################################################################################3 void _set_default_as_silent(); void _set_blocks_st_synchronize(bool state); @@ -313,6 +362,10 @@ namespace Slic3r { // Calculates the time estimate void _calculate_time(); +//################################################################################################################# + void _calculate_remaining_times(); +//################################################################################################################# + // Processes the given gcode line void _process_gcode_line(GCodeReader&, const GCodeReader::GCodeLine& line); diff --git a/xs/src/libslic3r/Print.hpp b/xs/src/libslic3r/Print.hpp index db92087b7..9fd59d690 100644 --- a/xs/src/libslic3r/Print.hpp +++ b/xs/src/libslic3r/Print.hpp @@ -235,7 +235,10 @@ public: PrintRegionPtrs regions; PlaceholderParser placeholder_parser; // TODO: status_cb - std::string estimated_default_print_time; +//####################################################################################################################################################################### + std::string estimated_normal_print_time; +// std::string estimated_default_print_time; +//####################################################################################################################################################################### std::string estimated_silent_print_time; double total_used_filament, total_extruded_volume, total_cost, total_weight; std::map filament_stats; diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 8c66d44ec..49568e0ab 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -936,7 +936,10 @@ PrintConfigDef::PrintConfigDef() def->sidetext = L("mm/s²"); def->min = 0; def->width = machine_limits_opt_width; - def->default_value = new ConfigOptionFloats(1500., 1250.); +//################################################################################################################################## + def->default_value = new ConfigOptionFloats{ 1500., 1250. }; +// def->default_value = new ConfigOptionFloats(1500., 1250.); +//################################################################################################################################## // M204 T... [mm/sec^2] def = this->add("machine_max_acceleration_retracting", coFloats); @@ -946,7 +949,10 @@ PrintConfigDef::PrintConfigDef() def->sidetext = L("mm/s²"); def->min = 0; def->width = machine_limits_opt_width; - def->default_value = new ConfigOptionFloats(1500., 1250.); +//################################################################################################################################## + def->default_value = new ConfigOptionFloats{ 1500., 1250. }; +// def->default_value = new ConfigOptionFloats(1500., 1250.); +//################################################################################################################################## def = this->add("max_fan_speed", coInts); def->label = L("Max"); diff --git a/xs/xsp/Print.xsp b/xs/xsp/Print.xsp index bc5eb7433..717064916 100644 --- a/xs/xsp/Print.xsp +++ b/xs/xsp/Print.xsp @@ -145,8 +145,8 @@ _constant() %code%{ RETVAL = &THIS->skirt; %}; Ref brim() %code%{ RETVAL = &THIS->brim; %}; - std::string estimated_default_print_time() - %code%{ RETVAL = THIS->estimated_default_print_time; %}; + std::string estimated_normal_print_time() + %code%{ RETVAL = THIS->estimated_normal_print_time; %}; std::string estimated_silent_print_time() %code%{ RETVAL = THIS->estimated_silent_print_time; %}; From bb288f2a1b99a18d8776809a0154cf9e1026cc3a Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Wed, 27 Jun 2018 15:49:02 +0200 Subject: [PATCH 082/198] Fixed a crash when complete_objects was turned on --- xs/src/libslic3r/GCode/ToolOrdering.cpp | 27 ++++++++++++++++--------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/xs/src/libslic3r/GCode/ToolOrdering.cpp b/xs/src/libslic3r/GCode/ToolOrdering.cpp index 761e83fcc..598d3bcc6 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.cpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.cpp @@ -138,15 +138,19 @@ void ToolOrdering::collect_extruders(const PrintObject &object) const PrintRegion ®ion = *object.print()->regions[region_id]; if (! layerm->perimeters.entities.empty()) { - bool something_nonoverriddable = false; - for (const auto& eec : layerm->perimeters.entities) // let's check if there are nonoverriddable entities - if (!layer_tools.wiping_extrusions.is_overriddable(dynamic_cast(*eec), *m_print_config_ptr, object, region)) { - something_nonoverriddable = true; - break; - } + bool something_nonoverriddable = true; + + if (m_print_config_ptr) { // in this case complete_objects is false (see ToolOrdering constructors) + something_nonoverriddable = false; + for (const auto& eec : layerm->perimeters.entities) // let's check if there are nonoverriddable entities + if (!layer_tools.wiping_extrusions.is_overriddable(dynamic_cast(*eec), *m_print_config_ptr, object, region)) { + something_nonoverriddable = true; + break; + } + } if (something_nonoverriddable) - layer_tools.extruders.push_back(region.config.perimeter_extruder.value); + layer_tools.extruders.push_back(region.config.perimeter_extruder.value); layer_tools.has_object = true; } @@ -164,10 +168,13 @@ void ToolOrdering::collect_extruders(const PrintObject &object) else if (role != erNone) has_infill = true; - if (!something_nonoverriddable && !layer_tools.wiping_extrusions.is_overriddable(*fill, *m_print_config_ptr, object, region)) - something_nonoverriddable = true; + if (m_print_config_ptr) { + if (!something_nonoverriddable && !layer_tools.wiping_extrusions.is_overriddable(*fill, *m_print_config_ptr, object, region)) + something_nonoverriddable = true; + } } - if (something_nonoverriddable) + + if (something_nonoverriddable || !m_print_config_ptr) { if (has_solid_infill) layer_tools.extruders.push_back(region.config.solid_infill_extruder); From 80b430ad94daa8b34b6432076e8d3ee03c2e2732 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 27 Jun 2018 16:57:42 +0200 Subject: [PATCH 083/198] Simplified handling of the "compatible_printers_condition" and "inherits" configuration values. Implemented correct setting of the "inherits" flag for the profiles loaded from AMF/3MF/Config files. --- xs/src/slic3r/GUI/Preset.cpp | 35 +++++++++++++++++------------- xs/src/slic3r/GUI/Preset.hpp | 25 ++++++++++++++++++--- xs/src/slic3r/GUI/PresetBundle.cpp | 28 ++++++++++-------------- 3 files changed, 54 insertions(+), 34 deletions(-) diff --git a/xs/src/slic3r/GUI/Preset.cpp b/xs/src/slic3r/GUI/Preset.cpp index d52ea6215..c0b02d460 100644 --- a/xs/src/slic3r/GUI/Preset.cpp +++ b/xs/src/slic3r/GUI/Preset.cpp @@ -234,12 +234,12 @@ std::string Preset::label() const bool Preset::is_compatible_with_printer(const Preset &active_printer, const DynamicPrintConfig *extra_config) const { - auto *condition = dynamic_cast(this->config.option("compatible_printers_condition")); + auto &condition = this->compatible_printers_condition(); auto *compatible_printers = dynamic_cast(this->config.option("compatible_printers")); bool has_compatible_printers = compatible_printers != nullptr && ! compatible_printers->values.empty(); - if (! has_compatible_printers && condition != nullptr && ! condition->values.empty() && ! condition->values.front().empty()) { + if (! has_compatible_printers && ! condition.empty()) { try { - return PlaceholderParser::evaluate_boolean_expression(condition->values.front(), active_printer.config, extra_config); + return PlaceholderParser::evaluate_boolean_expression(condition, active_printer.config, extra_config); } catch (const std::runtime_error &err) { //FIXME in case of an error, return "compatible with everything". printf("Preset::is_compatible_with_printer - parsing error of compatible_printers_condition %s:\n%s\n", active_printer.name.c_str(), err.what()); @@ -466,6 +466,15 @@ Preset& PresetCollection::load_external_preset( this->select_preset(it - m_presets.begin()); return *it; } + // Update the "inherits" field. + std::string &inherits = Preset::inherits(cfg); + if (it != m_presets.end() && inherits.empty()) { + // There is a profile with the same name already loaded. Should we update the "inherits" field? + if (it->vendor == nullptr) + inherits = it->inherits(); + else + inherits = it->name; + } // The external preset does not match an internal preset, load the external preset. std::string new_name; for (size_t idx = 0;; ++ idx) { @@ -531,10 +540,7 @@ void PresetCollection::save_current_preset(const std::string &new_name) } else { // Creating a new preset. Preset &preset = *m_presets.insert(it, m_edited_preset); - ConfigOptionStrings *opt_inherits = preset.config.option("inherits", true); - if (opt_inherits->values.empty()) - opt_inherits->values.emplace_back(std::string()); - std::string &inherits = opt_inherits->values.front(); + std::string &inherits = preset.inherits(); std::string old_name = preset.name; preset.name = new_name; preset.file = this->path_from_name(new_name); @@ -549,7 +555,6 @@ void PresetCollection::save_current_preset(const std::string &new_name) // Inherited from a user preset. Just maintain the "inherited" flag, // meaning it will inherit from either the system preset, or the inherited user preset. } - preset.inherits = inherits; preset.is_default = false; preset.is_system = false; preset.is_external = false; @@ -587,20 +592,20 @@ bool PresetCollection::load_bitmap_default(const std::string &file_name) const Preset* PresetCollection::get_selected_preset_parent() const { - auto *inherits = dynamic_cast(this->get_edited_preset().config.option("inherits")); - if (inherits == nullptr || inherits->values.empty() || inherits->values.front().empty()) + const std::string &inherits = this->get_edited_preset().inherits(); + if (inherits.empty()) return this->get_selected_preset().is_system ? &this->get_selected_preset() : nullptr; - const Preset* preset = this->find_preset(inherits->values.front(), false); + const Preset* preset = this->find_preset(inherits, false); return (preset == nullptr || preset->is_default || preset->is_external) ? nullptr : preset; } const Preset* PresetCollection::get_preset_parent(const Preset& child) const { - auto *inherits = dynamic_cast(child.config.option("inherits")); - if (inherits == nullptr || inherits->values.empty() || inherits->values.front().empty()) + const std::string &inherits = child.inherits(); + if (inherits.empty()) // return this->get_selected_preset().is_system ? &this->get_selected_preset() : nullptr; return nullptr; - const Preset* preset = this->find_preset(inherits->values.front(), false); + const Preset* preset = this->find_preset(inherits, false); return (preset == nullptr/* || preset->is_default */|| preset->is_external) ? nullptr : preset; } @@ -837,7 +842,7 @@ std::vector PresetCollection::dirty_options(const Preset *edited, c // The "compatible_printers" option key is handled differently from the others: // It is not mandatory. If the key is missing, it means it is compatible with any printer. // If the key exists and it is empty, it means it is compatible with no printer. - std::initializer_list optional_keys { "compatible_printers", "compatible_printers_condition" }; + std::initializer_list optional_keys { "compatible_printers" }; for (auto &opt_key : optional_keys) { if (reference->config.has(opt_key) != edited->config.has(opt_key)) changed.emplace_back(opt_key); diff --git a/xs/src/slic3r/GUI/Preset.hpp b/xs/src/slic3r/GUI/Preset.hpp index ee0cdc18b..42ef6ceee 100644 --- a/xs/src/slic3r/GUI/Preset.hpp +++ b/xs/src/slic3r/GUI/Preset.hpp @@ -113,9 +113,6 @@ public: // or a Configuration file bundling the Print + Filament + Printer presets (in that case is_external and possibly is_system will be true), // or it could be a G-code (again, is_external will be true). std::string file; - // A user profile may inherit its settings either from a system profile, or from a user profile. - // A system profile shall never derive from any other profile, as the system profile hierarchy is being flattened during loading. - std::string inherits; // If this is a system profile, then there should be a vendor data available to display at the UI. const VendorProfile *vendor = nullptr; @@ -142,6 +139,28 @@ public: bool is_compatible_with_printer(const Preset &active_printer, const DynamicPrintConfig *extra_config) const; bool is_compatible_with_printer(const Preset &active_printer) const; + // Returns the name of the preset, from which this preset inherits. + static std::string& inherits(DynamicPrintConfig &cfg) + { + auto option = cfg.option("inherits", true); + if (option->values.empty()) + option->values.emplace_back(std::string()); + return option->values.front(); + } + std::string& inherits() { return Preset::inherits(this->config); } + const std::string& inherits() const { return Preset::inherits(const_cast(this)->config); } + + // Returns the "compatible_printers_condition". + static std::string& compatible_printers_condition(DynamicPrintConfig &cfg) + { + auto option = cfg.option("compatible_printers_condition", true); + if (option->values.empty()) + option->values.emplace_back(std::string()); + return option->values.front(); + } + std::string& compatible_printers_condition() { return Preset::compatible_printers_condition(this->config); } + const std::string& compatible_printers_condition() const { return Preset::compatible_printers_condition(const_cast(this)->config); } + // Mark this preset as compatible if it is compatible with active_printer. bool update_compatible_with_printer(const Preset &active_printer, const DynamicPrintConfig *extra_config); diff --git a/xs/src/slic3r/GUI/PresetBundle.cpp b/xs/src/slic3r/GUI/PresetBundle.cpp index fcf8ce859..c11816d06 100644 --- a/xs/src/slic3r/GUI/PresetBundle.cpp +++ b/xs/src/slic3r/GUI/PresetBundle.cpp @@ -65,12 +65,12 @@ PresetBundle::PresetBundle() : // Create the ID config keys, as they are not part of the Static print config classes. this->prints.default_preset().config.optptr("print_settings_id", true); - this->prints.default_preset().config.option("compatible_printers_condition", true)->values = { "" }; - this->prints.default_preset().config.option("inherits", true)->values = { "" }; + this->prints.default_preset().compatible_printers_condition(); + this->prints.default_preset().inherits(); this->filaments.default_preset().config.option("filament_settings_id", true)->values = { "" }; - this->filaments.default_preset().config.option("compatible_printers_condition", true)->values = { "" }; - this->filaments.default_preset().config.option("inherits", true)->values = { "" }; + this->filaments.default_preset().compatible_printers_condition(); + this->filaments.default_preset().inherits(); this->printers.default_preset().config.optptr("printer_settings_id", true); this->printers.default_preset().config.optptr("printer_vendor", true); @@ -78,7 +78,7 @@ PresetBundle::PresetBundle() : this->printers.default_preset().config.optptr("printer_variant", true); this->printers.default_preset().config.optptr("default_print_profile", true); this->printers.default_preset().config.optptr("default_filament_profile", true); - this->printers.default_preset().config.option("inherits", true)->values = { "" }; + this->printers.default_preset().inherits(); // Load the default preset bitmaps. this->prints .load_bitmap_default("cog.png"); @@ -387,17 +387,13 @@ DynamicPrintConfig PresetBundle::full_config() const // Collect the "compatible_printers_condition" and "inherits" values over all presets (print, filaments, printers) into a single vector. std::vector compatible_printers_condition; std::vector inherits; - auto append_config_string = [](const DynamicConfig &cfg, const std::string &key, std::vector &dst) { - const ConfigOptionStrings *opt = cfg.opt(key); - dst.emplace_back((opt == nullptr || opt->values.empty()) ? "" : opt->values.front()); - }; - append_config_string(this->prints.get_edited_preset().config, "compatible_printers_condition", compatible_printers_condition); - append_config_string(this->prints.get_edited_preset().config, "inherits", inherits); + compatible_printers_condition.emplace_back(this->prints.get_edited_preset().compatible_printers_condition()); + inherits .emplace_back(this->prints.get_edited_preset().inherits()); if (num_extruders <= 1) { out.apply(this->filaments.get_edited_preset().config); - append_config_string(this->filaments.get_edited_preset().config, "compatible_printers_condition", compatible_printers_condition); - append_config_string(this->filaments.get_edited_preset().config, "inherits", inherits); + compatible_printers_condition.emplace_back(this->filaments.get_edited_preset().compatible_printers_condition()); + inherits .emplace_back(this->filaments.get_edited_preset().inherits()); } else { // Retrieve filament presets and build a single config object for them. // First collect the filament configurations based on the user selection of this->filament_presets. @@ -408,8 +404,8 @@ DynamicPrintConfig PresetBundle::full_config() const while (filament_configs.size() < num_extruders) filament_configs.emplace_back(&this->filaments.first_visible().config); for (const DynamicPrintConfig *cfg : filament_configs) { - append_config_string(*cfg, "compatible_printers_condition", compatible_printers_condition); - append_config_string(*cfg, "inherits", inherits); + compatible_printers_condition.emplace_back(Preset::compatible_printers_condition(*const_cast(cfg))); + inherits .emplace_back(Preset::inherits(*const_cast(cfg))); } // Option values to set a ConfigOptionVector from. std::vector filament_opts(num_extruders, nullptr); @@ -434,7 +430,7 @@ DynamicPrintConfig PresetBundle::full_config() const } // Don't store the "compatible_printers_condition" for the printer profile, there is none. - append_config_string(this->printers.get_edited_preset().config, "inherits", inherits); + inherits.emplace_back(this->printers.get_edited_preset().inherits()); // These two value types clash between the print and filament profiles. They should be renamed. out.erase("compatible_printers"); From 5787c495d670a980ec5120c3740aa2470e4096a3 Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Wed, 27 Jun 2018 17:00:20 +0200 Subject: [PATCH 084/198] Octoprint: Improve error reporting --- xs/src/slic3r/Utils/Http.cpp | 18 ++++++++++-------- xs/src/slic3r/Utils/Http.hpp | 9 +++++++++ xs/src/slic3r/Utils/OctoPrint.cpp | 20 +++++++++----------- xs/src/slic3r/Utils/OctoPrint.hpp | 2 +- 4 files changed, 29 insertions(+), 20 deletions(-) diff --git a/xs/src/slic3r/Utils/Http.cpp b/xs/src/slic3r/Utils/Http.cpp index 47021d39f..1a202b2ad 100644 --- a/xs/src/slic3r/Utils/Http.cpp +++ b/xs/src/slic3r/Utils/Http.cpp @@ -201,7 +201,6 @@ std::string Http::priv::body_size_error() void Http::priv::http_perform() { - ::curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1L); ::curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); ::curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writecb); ::curl_easy_setopt(curl, CURLOPT_WRITEDATA, static_cast(this)); @@ -230,8 +229,6 @@ void Http::priv::http_perform() } CURLcode res = ::curl_easy_perform(curl); - long http_status = 0; - ::curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_status); if (res != CURLE_OK) { if (res == CURLE_ABORTED_BY_CALLBACK) { @@ -242,17 +239,22 @@ void Http::priv::http_perform() if (progressfn) { progressfn(dummyprogress, cancel); } } else { // The abort comes from the CURLOPT_READFUNCTION callback, which means reading file failed - if (errorfn) { errorfn(std::move(buffer), "Error reading file for file upload", http_status); } + if (errorfn) { errorfn(std::move(buffer), "Error reading file for file upload", 0); } } } else if (res == CURLE_WRITE_ERROR) { - if (errorfn) { errorfn(std::move(buffer), body_size_error(), http_status); } + if (errorfn) { errorfn(std::move(buffer), body_size_error(), 0); } } else { - if (errorfn) { errorfn(std::move(buffer), curl_error(res), http_status); } + if (errorfn) { errorfn(std::move(buffer), curl_error(res), 0); } }; } else { - if (completefn) { - completefn(std::move(buffer), http_status); + long http_status = 0; + ::curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_status); + + if (http_status >= 400) { + if (errorfn) { errorfn(std::move(buffer), std::string(), http_status); } + } else { + if (completefn) { completefn(std::move(buffer), http_status); } } } } diff --git a/xs/src/slic3r/Utils/Http.hpp b/xs/src/slic3r/Utils/Http.hpp index 73656bf88..0724da9ee 100644 --- a/xs/src/slic3r/Utils/Http.hpp +++ b/xs/src/slic3r/Utils/Http.hpp @@ -29,7 +29,16 @@ public: typedef std::shared_ptr Ptr; typedef std::function CompleteFn; + + // A HTTP request may fail at various stages of completeness (URL parsing, DNS lookup, TCP connection, ...). + // If the HTTP request could not be made or failed before completion, the `error` arg contains a description + // of the error and `http_status` is zero. + // If the HTTP request was completed but the response HTTP code is >= 400, `error` is empty and `http_status` contains the response code. + // In either case there may or may not be a body. typedef std::function ErrorFn; + + // See the Progress struct above. + // Writing true to the `cancel` reference cancels the request in progress. typedef std::function ProgressFn; Http(Http &&other); diff --git a/xs/src/slic3r/Utils/OctoPrint.cpp b/xs/src/slic3r/Utils/OctoPrint.cpp index 86049de16..97b4123d4 100644 --- a/xs/src/slic3r/Utils/OctoPrint.cpp +++ b/xs/src/slic3r/Utils/OctoPrint.cpp @@ -78,10 +78,10 @@ bool OctoPrint::test(wxString &msg) const auto http = Http::get(std::move(url)); set_auth(http); - http.on_error([&](std::string, std::string error, unsigned status) { - BOOST_LOG_TRIVIAL(error) << boost::format("Octoprint: Error getting version: %1% (HTTP %2%)") % error % status; + http.on_error([&](std::string body, std::string error, unsigned status) { + BOOST_LOG_TRIVIAL(error) << boost::format("Octoprint: Error getting version: %1%, HTTP %2%, body: `%3%`") % error % status % body; res = false; - msg = format_error(error, status); + msg = format_error(body, error, status); }) .on_complete([&](std::string body, unsigned) { BOOST_LOG_TRIVIAL(debug) << boost::format("Octoprint: Got version: %1%") % body; @@ -140,8 +140,8 @@ bool OctoPrint::send_gcode(const std::string &filename) const progress_dialog.Update(PROGRESS_RANGE); }) .on_error([&](std::string body, std::string error, unsigned status) { - BOOST_LOG_TRIVIAL(error) << boost::format("Octoprint: Error uploading file: %1% (HTTP %2%)") % error % status; - auto errormsg = wxString::Format("%s: %s", errortitle, format_error(error, status)); + BOOST_LOG_TRIVIAL(error) << boost::format("Octoprint: Error uploading file: %1%, HTTP %2%, body: `%3%`") % error % status % body; + auto errormsg = wxString::Format("%s: %s", errortitle, format_error(body, error, status)); GUI::show_error(&progress_dialog, std::move(errormsg)); res = false; }) @@ -183,15 +183,13 @@ std::string OctoPrint::make_url(const std::string &path) const } } -wxString OctoPrint::format_error(const std::string &error, unsigned status) +wxString OctoPrint::format_error(const std::string &body, const std::string &error, unsigned status) { - auto wxerror = wxString::FromUTF8(error.data()); - if (status != 0) { - return wxString::Format("HTTP %u: %s", status, - (status == 401 ? _(L("Invalid API key")) : wxerror)); + auto wxbody = wxString::FromUTF8(body.data()); + return wxString::Format("HTTP %u: %s", status, wxbody); } else { - return wxerror; + return wxString::FromUTF8(error.data()); } } diff --git a/xs/src/slic3r/Utils/OctoPrint.hpp b/xs/src/slic3r/Utils/OctoPrint.hpp index a8599faa9..1e2098ae3 100644 --- a/xs/src/slic3r/Utils/OctoPrint.hpp +++ b/xs/src/slic3r/Utils/OctoPrint.hpp @@ -26,7 +26,7 @@ private: void set_auth(Http &http) const; std::string make_url(const std::string &path) const; - static wxString format_error(const std::string &error, unsigned status); + static wxString format_error(const std::string &body, const std::string &error, unsigned status); }; From 9725966f38d10f65bbec5413fb0e8e323418c072 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 28 Jun 2018 08:52:07 +0200 Subject: [PATCH 085/198] Time estimate uses G1 lines containing E parameter for remaining time calculations --- xs/src/libslic3r/GCodeTimeEstimator.cpp | 44 +++++-------------------- xs/src/libslic3r/GCodeTimeEstimator.hpp | 20 +---------- 2 files changed, 9 insertions(+), 55 deletions(-) diff --git a/xs/src/libslic3r/GCodeTimeEstimator.cpp b/xs/src/libslic3r/GCodeTimeEstimator.cpp index 8f306835f..916a93eba 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.cpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.cpp @@ -106,14 +106,6 @@ namespace Slic3r { return ::sqrt(value); } -//################################################################################################################# - GCodeTimeEstimator::Block::Time::Time() - : elapsed(-1.0f) - , remaining(-1.0f) - { - } -//################################################################################################################# - GCodeTimeEstimator::Block::Block() : st_synchronized(false) //################################################################################################################# @@ -183,13 +175,6 @@ namespace Slic3r { trapezoid.decelerate_after = accelerate_distance + cruise_distance; } -//################################################################################################################# - void GCodeTimeEstimator::Block::calculate_remaining_time(float final_time) - { - time.remaining = (time.elapsed >= 0.0f) ? final_time - time.elapsed : -1.0f; - } -//################################################################################################################# - float GCodeTimeEstimator::Block::max_allowable_speed(float acceleration, float target_velocity, float distance) { // to avoid invalid negative numbers due to numerical imprecision @@ -248,10 +233,6 @@ namespace Slic3r { _reset_time(); _set_blocks_st_synchronize(false); _calculate_time(); -//################################################################################################################# - if (are_remaining_times_enabled()) - _calculate_remaining_times(); -//################################################################################################################# #if ENABLE_MOVE_STATS _log_moves_stats(); @@ -446,17 +427,18 @@ namespace Slic3r { _parser.parse_line(gcode_line, [this, &g1_lines_count, &last_recorded_time, &in, &out, &path_tmp, time_mask, interval](GCodeReader& reader, const GCodeReader::GCodeLine& line) { - if (line.cmd_is("G1")) + if (line.cmd_is("G1") && line.has_e()) { ++g1_lines_count; for (const Block& block : _blocks) { - if (block.g1_line_id == g1_lines_count) + if ((block.g1_line_id == g1_lines_count) && (block.elapsed_time != -1.0f)) { - if ((last_recorded_time == _time) || (last_recorded_time - block.time.remaining > interval)) + float block_remaining_time = _time - block.elapsed_time; + if ((last_recorded_time == _time) || (last_recorded_time - block_remaining_time > interval)) { char buffer[1024]; - sprintf(buffer, time_mask.c_str(), std::to_string((int)(100.0f * block.time.elapsed / _time)).c_str(), _get_time_minutes(block.time.remaining).c_str()); + sprintf(buffer, time_mask.c_str(), std::to_string((int)(100.0f * block.elapsed_time / _time)).c_str(), _get_time_minutes(block_remaining_time).c_str()); fwrite((const void*)buffer, 1, ::strlen(buffer), out); if (ferror(out)) @@ -467,7 +449,7 @@ namespace Slic3r { throw std::runtime_error(std::string("Remaining times export failed.\nIs the disk full?\n")); } - last_recorded_time = block.time.remaining; + last_recorded_time = block_remaining_time; break; } } @@ -878,7 +860,7 @@ namespace Slic3r { block_time += block.deceleration_time(); _time += block_time; //########################################################################################################################## - block.time.elapsed = _time; + block.elapsed_time = are_remaining_times_enabled() ? _time : -1.0f; //########################################################################################################################## MovesStatsMap::iterator it = _moves_stats.find(block.move_type); @@ -892,22 +874,12 @@ namespace Slic3r { _time += block.cruise_time(); _time += block.deceleration_time(); //########################################################################################################################## - block.time.elapsed = _time; + block.elapsed_time = are_remaining_times_enabled() ? _time : -1.0f; //########################################################################################################################## #endif // ENABLE_MOVE_STATS } } -//################################################################################################################# - void GCodeTimeEstimator::_calculate_remaining_times() - { - for (Block& block : _blocks) - { - block.calculate_remaining_time(_time); - } - } -//################################################################################################################# - void GCodeTimeEstimator::_process_gcode_line(GCodeReader&, const GCodeReader::GCodeLine& line) { PROFILE_FUNC(); diff --git a/xs/src/libslic3r/GCodeTimeEstimator.hpp b/xs/src/libslic3r/GCodeTimeEstimator.hpp index 924c9e303..cbb43fbea 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.hpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.hpp @@ -134,16 +134,6 @@ namespace Slic3r { bool nominal_length; }; -//################################################################################################################# - struct Time - { - float elapsed; - float remaining; - - Time(); - }; -//################################################################################################################# - #if ENABLE_MOVE_STATS EMoveType move_type; #endif // ENABLE_MOVE_STATS @@ -157,7 +147,7 @@ namespace Slic3r { FeedrateProfile feedrate; Trapezoid trapezoid; //################################################################################################################# - Time time; + float elapsed_time; unsigned int g1_line_id; //################################################################################################################# @@ -189,10 +179,6 @@ namespace Slic3r { // Calculates this block's trapezoid void calculate_trapezoid(); -//################################################################################################################# - void calculate_remaining_time(float final_time); -//################################################################################################################# - // Calculates the maximum allowable speed at this point when you must be able to reach target_velocity using the // acceleration within the allotted distance. static float max_allowable_speed(float acceleration, float target_velocity, float distance); @@ -362,10 +348,6 @@ namespace Slic3r { // Calculates the time estimate void _calculate_time(); -//################################################################################################################# - void _calculate_remaining_times(); -//################################################################################################################# - // Processes the given gcode line void _process_gcode_line(GCodeReader&, const GCodeReader::GCodeLine& line); From 7d61b2076f4a003104f9a45ba7b130cd97b15eb5 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 28 Jun 2018 09:24:07 +0200 Subject: [PATCH 086/198] Faster remaining time calculation --- xs/src/libslic3r/GCodeTimeEstimator.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/xs/src/libslic3r/GCodeTimeEstimator.cpp b/xs/src/libslic3r/GCodeTimeEstimator.cpp index 916a93eba..fc43748a9 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.cpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.cpp @@ -402,7 +402,8 @@ namespace Slic3r { } unsigned int g1_lines_count = 0; - float last_recorded_time = _time; + float last_recorded_time = 0.0f; + int last_recorded_id = -1; std::string gcode_line; while (std::getline(in, gcode_line)) { @@ -425,17 +426,21 @@ namespace Slic3r { // add remaining time lines where needed _parser.parse_line(gcode_line, - [this, &g1_lines_count, &last_recorded_time, &in, &out, &path_tmp, time_mask, interval](GCodeReader& reader, const GCodeReader::GCodeLine& line) + [this, &g1_lines_count, &last_recorded_time, &last_recorded_id, &in, &out, &path_tmp, time_mask, interval](GCodeReader& reader, const GCodeReader::GCodeLine& line) { - if (line.cmd_is("G1") && line.has_e()) + if (line.cmd_is("G1")) { ++g1_lines_count; - for (const Block& block : _blocks) + if (!line.has_e()) + return; + + for (int i = last_recorded_id + 1; i < (int)_blocks.size(); ++i) { + const Block& block = _blocks[i]; if ((block.g1_line_id == g1_lines_count) && (block.elapsed_time != -1.0f)) { float block_remaining_time = _time - block.elapsed_time; - if ((last_recorded_time == _time) || (last_recorded_time - block_remaining_time > interval)) + if (std::abs(last_recorded_time - block_remaining_time) > interval) { char buffer[1024]; sprintf(buffer, time_mask.c_str(), std::to_string((int)(100.0f * block.elapsed_time / _time)).c_str(), _get_time_minutes(block_remaining_time).c_str()); @@ -450,7 +455,8 @@ namespace Slic3r { } last_recorded_time = block_remaining_time; - break; + last_recorded_id = i; + return; } } } From 19f5863d75b286e7459f2ce163ec5e5befe1ac78 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Thu, 28 Jun 2018 10:22:04 +0200 Subject: [PATCH 087/198] Wipe tower fix - incorrect start/end position reported to the GCode generator when the tower was rotated --- xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp index fbde83754..5aa6470a2 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp @@ -142,10 +142,10 @@ public: } m_gcode += "G1"; - if (std::abs(dx) > EPSILON) + if (std::abs(rot.x - rotated_current_pos.x) > EPSILON) m_gcode += set_format_X(rot.x); - if (std::abs(dy) > EPSILON) + if (std::abs(rot.y - rotated_current_pos.y) > EPSILON) m_gcode += set_format_Y(rot.y); if (e != 0.f) From 5605835ba9d4a48099401351843143f6088b72d2 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Thu, 28 Jun 2018 12:40:27 +0200 Subject: [PATCH 088/198] Use silent_mode only with MK3 printer --- xs/src/slic3r/GUI/Tab.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index cf1b84639..21fde64f2 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -1921,8 +1921,12 @@ void TabPrinter::update(){ get_field("single_extruder_multi_material")->toggle(have_multiple_extruders); bool is_marlin_flavor = m_config->option>("gcode_flavor")->value == gcfMarlin; - get_field("silent_mode")->toggle(is_marlin_flavor); - if (m_use_silent_mode != m_config->opt_bool("silent_mode")) { + + const std::string &printer_model = m_config->opt_string("printer_model"); + bool can_use_silent_mode = printer_model.empty() ? false : printer_model == "MK3"; // "true" only for MK3 printers + + get_field("silent_mode")->toggle(can_use_silent_mode && is_marlin_flavor); + if (can_use_silent_mode && m_use_silent_mode != m_config->opt_bool("silent_mode")) { m_rebuild_kinematics_page = true; m_use_silent_mode = m_config->opt_bool("silent_mode"); } From dc25df7b3225665b1e857abb977bfdfce440c143 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 28 Jun 2018 13:57:28 +0200 Subject: [PATCH 089/198] Faster remaining times export --- xs/src/libslic3r/GCode.cpp | 39 +++---- xs/src/libslic3r/GCodeTimeEstimator.cpp | 138 +++++++++++++----------- xs/src/libslic3r/GCodeTimeEstimator.hpp | 5 +- 3 files changed, 98 insertions(+), 84 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 1f0aac816..9f3818104 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -436,23 +436,23 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) m_normal_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Z, print.config.machine_max_jerk_z.values[0]); m_normal_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::E, print.config.machine_max_jerk_e.values[0]); - std::cout << "Normal" << std::endl; - std::cout << "set_acceleration " << print.config.machine_max_acceleration_extruding.values[0] << std::endl; - std::cout << "set_retract_acceleration " << print.config.machine_max_acceleration_retracting.values[0] << std::endl; - std::cout << "set_minimum_feedrate " << print.config.machine_min_extruding_rate.values[0] << std::endl; - std::cout << "set_minimum_travel_feedrate " << print.config.machine_min_travel_rate.values[0] << std::endl; - std::cout << "set_axis_max_acceleration X " << print.config.machine_max_acceleration_x.values[0] << std::endl; - std::cout << "set_axis_max_acceleration Y " << print.config.machine_max_acceleration_y.values[0] << std::endl; - std::cout << "set_axis_max_acceleration Z " << print.config.machine_max_acceleration_z.values[0] << std::endl; - std::cout << "set_axis_max_acceleration E " << print.config.machine_max_acceleration_e.values[0] << std::endl; - std::cout << "set_axis_max_feedrate X " << print.config.machine_max_feedrate_x.values[0] << std::endl; - std::cout << "set_axis_max_feedrate Y " << print.config.machine_max_feedrate_y.values[0] << std::endl; - std::cout << "set_axis_max_feedrate Z " << print.config.machine_max_feedrate_z.values[0] << std::endl; - std::cout << "set_axis_max_feedrate E " << print.config.machine_max_feedrate_e.values[0] << std::endl; - std::cout << "set_axis_max_jerk X " << print.config.machine_max_jerk_x.values[0] << std::endl; - std::cout << "set_axis_max_jerk Y " << print.config.machine_max_jerk_y.values[0] << std::endl; - std::cout << "set_axis_max_jerk Z " << print.config.machine_max_jerk_z.values[0] << std::endl; - std::cout << "set_axis_max_jerk E " << print.config.machine_max_jerk_e.values[0] << std::endl; +// std::cout << "Normal" << std::endl; +// std::cout << "set_acceleration " << print.config.machine_max_acceleration_extruding.values[0] << std::endl; +// std::cout << "set_retract_acceleration " << print.config.machine_max_acceleration_retracting.values[0] << std::endl; +// std::cout << "set_minimum_feedrate " << print.config.machine_min_extruding_rate.values[0] << std::endl; +// std::cout << "set_minimum_travel_feedrate " << print.config.machine_min_travel_rate.values[0] << std::endl; +// std::cout << "set_axis_max_acceleration X " << print.config.machine_max_acceleration_x.values[0] << std::endl; +// std::cout << "set_axis_max_acceleration Y " << print.config.machine_max_acceleration_y.values[0] << std::endl; +// std::cout << "set_axis_max_acceleration Z " << print.config.machine_max_acceleration_z.values[0] << std::endl; +// std::cout << "set_axis_max_acceleration E " << print.config.machine_max_acceleration_e.values[0] << std::endl; +// std::cout << "set_axis_max_feedrate X " << print.config.machine_max_feedrate_x.values[0] << std::endl; +// std::cout << "set_axis_max_feedrate Y " << print.config.machine_max_feedrate_y.values[0] << std::endl; +// std::cout << "set_axis_max_feedrate Z " << print.config.machine_max_feedrate_z.values[0] << std::endl; +// std::cout << "set_axis_max_feedrate E " << print.config.machine_max_feedrate_e.values[0] << std::endl; +// std::cout << "set_axis_max_jerk X " << print.config.machine_max_jerk_x.values[0] << std::endl; +// std::cout << "set_axis_max_jerk Y " << print.config.machine_max_jerk_y.values[0] << std::endl; +// std::cout << "set_axis_max_jerk Z " << print.config.machine_max_jerk_z.values[0] << std::endl; +// std::cout << "set_axis_max_jerk E " << print.config.machine_max_jerk_e.values[0] << std::endl; // m_default_time_estimator.reset(); @@ -945,7 +945,10 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) double extruded_volume = extruder.extruded_volume(); double filament_weight = extruded_volume * extruder.filament_density() * 0.001; double filament_cost = filament_weight * extruder.filament_cost() * 0.001; - print.filament_stats.insert(std::pair(extruder.id(), used_filament)); +//####################################################################################################################################################################### + print.filament_stats.insert(std::pair(extruder.id(), (float)used_filament)); +// print.filament_stats.insert(std::pair(extruder.id(), used_filament)); +//####################################################################################################################################################################### _write_format(file, "; filament used = %.1lfmm (%.1lfcm3)\n", used_filament, extruded_volume * 0.001); if (filament_weight > 0.) { print.total_weight = print.total_weight + filament_weight; diff --git a/xs/src/libslic3r/GCodeTimeEstimator.cpp b/xs/src/libslic3r/GCodeTimeEstimator.cpp index fc43748a9..15a346399 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.cpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.cpp @@ -108,9 +108,6 @@ namespace Slic3r { GCodeTimeEstimator::Block::Block() : st_synchronized(false) -//################################################################################################################# - , g1_line_id(0) -//################################################################################################################# { } @@ -403,8 +400,10 @@ namespace Slic3r { unsigned int g1_lines_count = 0; float last_recorded_time = 0.0f; - int last_recorded_id = -1; std::string gcode_line; + // buffer line to export only when greater than 64K to reduce writing calls + std::string export_line; + char time_line[64]; while (std::getline(in, gcode_line)) { if (!in.good()) @@ -413,9 +412,56 @@ namespace Slic3r { throw std::runtime_error(std::string("Remaining times export failed.\nError while reading from file.\n")); } - // saves back the line gcode_line += "\n"; - fwrite((const void*)gcode_line.c_str(), 1, gcode_line.length(), out); + + // add remaining time lines where needed + _parser.parse_line(gcode_line, + [this, &g1_lines_count, &last_recorded_time, &time_line, &gcode_line, time_mask, interval](GCodeReader& reader, const GCodeReader::GCodeLine& line) + { + if (line.cmd_is("G1")) + { + ++g1_lines_count; + + if (!line.has_e()) + return; + + G1LineIdToBlockIdMap::const_iterator it = _g1_line_ids.find(g1_lines_count); + if ((it != _g1_line_ids.end()) && (it->second < (unsigned int)_blocks.size())) + { + const Block& block = _blocks[it->second]; + if (block.elapsed_time != -1.0f) + { + float block_remaining_time = _time - block.elapsed_time; + if (std::abs(last_recorded_time - block_remaining_time) > interval) + { + sprintf(time_line, time_mask.c_str(), std::to_string((int)(100.0f * block.elapsed_time / _time)).c_str(), _get_time_minutes(block_remaining_time).c_str()); + gcode_line += time_line; + + last_recorded_time = block_remaining_time; + } + } + } + } + }); + + export_line += gcode_line; + if (export_line.length() > 65535) + { + fwrite((const void*)export_line.c_str(), 1, export_line.length(), out); + if (ferror(out)) + { + in.close(); + fclose(out); + boost::nowide::remove(path_tmp.c_str()); + throw std::runtime_error(std::string("Remaining times export failed.\nIs the disk full?\n")); + } + export_line.clear(); + } + } + + if (export_line.length() > 0) + { + fwrite((const void*)export_line.c_str(), 1, export_line.length(), out); if (ferror(out)) { in.close(); @@ -423,45 +469,6 @@ namespace Slic3r { boost::nowide::remove(path_tmp.c_str()); throw std::runtime_error(std::string("Remaining times export failed.\nIs the disk full?\n")); } - - // add remaining time lines where needed - _parser.parse_line(gcode_line, - [this, &g1_lines_count, &last_recorded_time, &last_recorded_id, &in, &out, &path_tmp, time_mask, interval](GCodeReader& reader, const GCodeReader::GCodeLine& line) - { - if (line.cmd_is("G1")) - { - ++g1_lines_count; - if (!line.has_e()) - return; - - for (int i = last_recorded_id + 1; i < (int)_blocks.size(); ++i) - { - const Block& block = _blocks[i]; - if ((block.g1_line_id == g1_lines_count) && (block.elapsed_time != -1.0f)) - { - float block_remaining_time = _time - block.elapsed_time; - if (std::abs(last_recorded_time - block_remaining_time) > interval) - { - char buffer[1024]; - sprintf(buffer, time_mask.c_str(), std::to_string((int)(100.0f * block.elapsed_time / _time)).c_str(), _get_time_minutes(block_remaining_time).c_str()); - - fwrite((const void*)buffer, 1, ::strlen(buffer), out); - if (ferror(out)) - { - in.close(); - fclose(out); - boost::nowide::remove(path_tmp.c_str()); - throw std::runtime_error(std::string("Remaining times export failed.\nIs the disk full?\n")); - } - - last_recorded_time = block_remaining_time; - last_recorded_id = i; - return; - } - } - } - } - }); } fclose(out); @@ -747,6 +754,7 @@ namespace Slic3r { //############################################################################################################3 reset_g1_line_id(); + _g1_line_ids.clear(); //############################################################################################################3 } @@ -781,23 +789,23 @@ namespace Slic3r { set_axis_max_jerk(axis, NORMAL_AXIS_MAX_JERK[a]); } - std::cout << "Normal Default" << std::endl; - std::cout << "set_acceleration " << NORMAL_ACCELERATION << std::endl; - std::cout << "set_retract_acceleration " << NORMAL_RETRACT_ACCELERATION << std::endl; - std::cout << "set_minimum_feedrate " << NORMAL_MINIMUM_FEEDRATE << std::endl; - std::cout << "set_minimum_travel_feedrate " << NORMAL_MINIMUM_TRAVEL_FEEDRATE << std::endl; - std::cout << "set_axis_max_acceleration X " << NORMAL_AXIS_MAX_ACCELERATION[X] << std::endl; - std::cout << "set_axis_max_acceleration Y " << NORMAL_AXIS_MAX_ACCELERATION[Y] << std::endl; - std::cout << "set_axis_max_acceleration Z " << NORMAL_AXIS_MAX_ACCELERATION[Z] << std::endl; - std::cout << "set_axis_max_acceleration E " << NORMAL_AXIS_MAX_ACCELERATION[E] << std::endl; - std::cout << "set_axis_max_feedrate X " << NORMAL_AXIS_MAX_FEEDRATE[X] << std::endl; - std::cout << "set_axis_max_feedrate Y " << NORMAL_AXIS_MAX_FEEDRATE[Y] << std::endl; - std::cout << "set_axis_max_feedrate Z " << NORMAL_AXIS_MAX_FEEDRATE[Z] << std::endl; - std::cout << "set_axis_max_feedrate E " << NORMAL_AXIS_MAX_FEEDRATE[E] << std::endl; - std::cout << "set_axis_max_jerk X " << NORMAL_AXIS_MAX_JERK[X] << std::endl; - std::cout << "set_axis_max_jerk Y " << NORMAL_AXIS_MAX_JERK[Y] << std::endl; - std::cout << "set_axis_max_jerk Z " << NORMAL_AXIS_MAX_JERK[Z] << std::endl; - std::cout << "set_axis_max_jerk E " << NORMAL_AXIS_MAX_JERK[E] << std::endl; +// std::cout << "Normal Default" << std::endl; +// std::cout << "set_acceleration " << NORMAL_ACCELERATION << std::endl; +// std::cout << "set_retract_acceleration " << NORMAL_RETRACT_ACCELERATION << std::endl; +// std::cout << "set_minimum_feedrate " << NORMAL_MINIMUM_FEEDRATE << std::endl; +// std::cout << "set_minimum_travel_feedrate " << NORMAL_MINIMUM_TRAVEL_FEEDRATE << std::endl; +// std::cout << "set_axis_max_acceleration X " << NORMAL_AXIS_MAX_ACCELERATION[X] << std::endl; +// std::cout << "set_axis_max_acceleration Y " << NORMAL_AXIS_MAX_ACCELERATION[Y] << std::endl; +// std::cout << "set_axis_max_acceleration Z " << NORMAL_AXIS_MAX_ACCELERATION[Z] << std::endl; +// std::cout << "set_axis_max_acceleration E " << NORMAL_AXIS_MAX_ACCELERATION[E] << std::endl; +// std::cout << "set_axis_max_feedrate X " << NORMAL_AXIS_MAX_FEEDRATE[X] << std::endl; +// std::cout << "set_axis_max_feedrate Y " << NORMAL_AXIS_MAX_FEEDRATE[Y] << std::endl; +// std::cout << "set_axis_max_feedrate Z " << NORMAL_AXIS_MAX_FEEDRATE[Z] << std::endl; +// std::cout << "set_axis_max_feedrate E " << NORMAL_AXIS_MAX_FEEDRATE[E] << std::endl; +// std::cout << "set_axis_max_jerk X " << NORMAL_AXIS_MAX_JERK[X] << std::endl; +// std::cout << "set_axis_max_jerk Y " << NORMAL_AXIS_MAX_JERK[Y] << std::endl; +// std::cout << "set_axis_max_jerk Z " << NORMAL_AXIS_MAX_JERK[Z] << std::endl; +// std::cout << "set_axis_max_jerk E " << NORMAL_AXIS_MAX_JERK[E] << std::endl; // set_feedrate(DEFAULT_FEEDRATE); @@ -1041,9 +1049,6 @@ namespace Slic3r { // fills block data Block block; -//############################################################################################################3 - block.g1_line_id = get_g1_line_id(); -//############################################################################################################3 // calculates block movement deltas float max_abs_delta = 0.0f; @@ -1213,6 +1218,9 @@ namespace Slic3r { // adds block to blocks list _blocks.emplace_back(block); +//############################################################################################################3 + _g1_line_ids.insert(G1LineIdToBlockIdMap::value_type(get_g1_line_id(), (unsigned int)_blocks.size() - 1)); +//############################################################################################################3 } void GCodeTimeEstimator::_processG4(const GCodeReader::GCodeLine& line) diff --git a/xs/src/libslic3r/GCodeTimeEstimator.hpp b/xs/src/libslic3r/GCodeTimeEstimator.hpp index cbb43fbea..ef074f073 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.hpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.hpp @@ -148,7 +148,6 @@ namespace Slic3r { Trapezoid trapezoid; //################################################################################################################# float elapsed_time; - unsigned int g1_line_id; //################################################################################################################# bool st_synchronized; @@ -207,6 +206,8 @@ namespace Slic3r { typedef std::map MovesStatsMap; #endif // ENABLE_MOVE_STATS + typedef std::map G1LineIdToBlockIdMap; + private: EMode _mode; GCodeReader _parser; @@ -214,6 +215,8 @@ namespace Slic3r { Feedrates _curr; Feedrates _prev; BlocksList _blocks; + // Map between g1 line id and blocks id, used to speed up export of remaining times + G1LineIdToBlockIdMap _g1_line_ids; float _time; // s #if ENABLE_MOVE_STATS From 0b1833a2afd26c54459656894747bdc7fc7cf4bf Mon Sep 17 00:00:00 2001 From: YuSanka Date: Thu, 28 Jun 2018 16:01:06 +0200 Subject: [PATCH 090/198] Try to fix tooltips on OSX --- lib/Slic3r/GUI/MainFrame.pm | 4 ++++ xs/src/slic3r/GUI/ConfigWizard.cpp | 4 ++-- xs/src/slic3r/GUI/GUI.cpp | 7 +++--- xs/src/slic3r/GUI/Tab.cpp | 38 ++++++++++++++++++++++++++++++ xs/src/slic3r/GUI/Tab.hpp | 6 +++-- 5 files changed, 52 insertions(+), 7 deletions(-) diff --git a/lib/Slic3r/GUI/MainFrame.pm b/lib/Slic3r/GUI/MainFrame.pm index 910b86dd8..ea4a158f4 100644 --- a/lib/Slic3r/GUI/MainFrame.pm +++ b/lib/Slic3r/GUI/MainFrame.pm @@ -110,6 +110,10 @@ sub _init_tabpanel { EVT_NOTEBOOK_PAGE_CHANGED($self, $self->{tabpanel}, sub { my $panel = $self->{tabpanel}->GetCurrentPage; $panel->OnActivate if $panel->can('OnActivate'); + + for my $tab_name (qw(print filament printer)) { + Slic3r::GUI::get_preset_tab("$tab_name")->OnActivate if ("$tab_name" eq $panel->GetName); + } }); if (!$self->{no_plater}) { diff --git a/xs/src/slic3r/GUI/ConfigWizard.cpp b/xs/src/slic3r/GUI/ConfigWizard.cpp index 642c6dce7..2e315a70b 100644 --- a/xs/src/slic3r/GUI/ConfigWizard.cpp +++ b/xs/src/slic3r/GUI/ConfigWizard.cpp @@ -893,9 +893,9 @@ const wxString& ConfigWizard::name() { // A different naming convention is used for the Wizard on Windows vs. OSX & GTK. #if WIN32 - static const wxString config_wizard_name = _(L("Configuration Wizard")); + static const wxString config_wizard_name = L("Configuration Wizard"); #else - static const wxString config_wizard_name = _(L("Configuration Assistant")); + static const wxString config_wizard_name = L("Configuration Assistant"); #endif return config_wizard_name; } diff --git a/xs/src/slic3r/GUI/GUI.cpp b/xs/src/slic3r/GUI/GUI.cpp index c1f8adaf1..250f475e2 100644 --- a/xs/src/slic3r/GUI/GUI.cpp +++ b/xs/src/slic3r/GUI/GUI.cpp @@ -317,10 +317,11 @@ void add_config_menu(wxMenuBar *menu, int event_preferences_changed, int event_l auto local_menu = new wxMenu(); wxWindowID config_id_base = wxWindow::NewControlId((int)ConfigMenuCnt); - const auto config_wizard_tooltip = wxString::Format(_(L("Run %s")), ConfigWizard::name()); + const auto config_wizard_name = _(ConfigWizard::name().wx_str()); + const auto config_wizard_tooltip = wxString::Format(_(L("Run %s")), config_wizard_name); // Cmd+, is standard on OS X - what about other operating systems? - local_menu->Append(config_id_base + ConfigMenuWizard, ConfigWizard::name() + dots, config_wizard_tooltip); - local_menu->Append(config_id_base + ConfigMenuSnapshots, _(L("Configuration Snapshots"))+dots, _(L("Inspect / activate configuration snapshots"))); + local_menu->Append(config_id_base + ConfigMenuWizard, config_wizard_name + dots, config_wizard_tooltip); + local_menu->Append(config_id_base + ConfigMenuSnapshots, _(L("Configuration Snapshots"))+dots, _(L("Inspect / activate configuration snapshots"))); local_menu->Append(config_id_base + ConfigMenuTakeSnapshot, _(L("Take Configuration Snapshot")), _(L("Capture a configuration snapshot"))); // local_menu->Append(config_id_base + ConfigMenuUpdate, _(L("Check for updates")), _(L("Check for configuration updates"))); local_menu->AppendSeparator(); diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 94f8cc3ea..d3d83fee8 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -40,10 +40,24 @@ void Tab::create_preset_tab(PresetBundle *preset_bundle) m_preset_bundle = preset_bundle; // Vertical sizer to hold the choice menu and the rest of the page. +#ifdef __WXOSX__ + auto *main_sizer = new wxBoxSizer(wxVERTICAL); + main_sizer->SetSizeHints(this); + this->SetSizer(main_sizer); + + m_tmp_panel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBK_LEFT | wxTAB_TRAVERSAL); + auto panel = m_tmp_panel; + auto sizer = new wxBoxSizer(wxVERTICAL); + m_tmp_panel->SetSizer(sizer); + m_tmp_panel->Layout(); + + main_sizer->Add(m_tmp_panel, 1, wxEXPAND | wxALL, 0); +#else Tab *panel = this; auto *sizer = new wxBoxSizer(wxVERTICAL); sizer->SetSizeHints(panel); panel->SetSizer(sizer); +#endif //__WXOSX__ // preset chooser m_presets_choice = new wxBitmapComboBox(panel, wxID_ANY, "", wxDefaultPosition, wxSize(270, -1), 0, 0,wxCB_READONLY); @@ -290,6 +304,28 @@ PageShp Tab::add_options_page(const wxString& title, const std::string& icon, bo return page; } +void Tab::OnActivate() +{ +#ifdef __WXOSX__ + wxWindowUpdateLocker noUpdates(this); + + m_tmp_panel->Fit(); + + Page* page = nullptr; + auto selection = m_treectrl->GetItemText(m_treectrl->GetSelection()); + for (auto p : m_pages) + if (p->title() == selection) + { + page = p.get(); + break; + } + if (page == nullptr) return; + page->Fit(); + m_hsizer->Layout(); + Refresh(); +#endif // __WXOSX__ +} + void Tab::update_labels_colour() { Freeze(); @@ -1248,6 +1284,7 @@ void TabPrint::OnActivate() { m_recommended_thin_wall_thickness_description_line->SetText( from_u8(PresetHints::recommended_thin_wall_thickness(*m_preset_bundle))); + Tab::OnActivate(); } void TabFilament::build() @@ -1405,6 +1442,7 @@ void TabFilament::update() void TabFilament::OnActivate() { m_volumetric_speed_description_line->SetText(from_u8(PresetHints::maximum_volumetric_flow_description(*m_preset_bundle))); + Tab::OnActivate(); } wxSizer* Tab::description_line_widget(wxWindow* parent, ogStaticText* *StaticText) diff --git a/xs/src/slic3r/GUI/Tab.hpp b/xs/src/slic3r/GUI/Tab.hpp index d6bf2cf43..6c9297c71 100644 --- a/xs/src/slic3r/GUI/Tab.hpp +++ b/xs/src/slic3r/GUI/Tab.hpp @@ -118,7 +118,9 @@ protected: wxButton* m_undo_btn; wxButton* m_undo_to_sys_btn; wxButton* m_question_btn; - +#ifdef __WXOSX__ + wxPanel* m_tmp_panel; +#endif // __WXOSX__ wxComboCtrl* m_cc_presets_choice; wxDataViewTreeCtrl* m_presetctrl; wxImageList* m_preset_icons; @@ -242,7 +244,7 @@ public: PageShp add_options_page(const wxString& title, const std::string& icon, bool is_extruder_pages = false); - virtual void OnActivate(){} + virtual void OnActivate(); virtual void on_preset_loaded(){} virtual void build() = 0; virtual void update() = 0; From 5446b9f1e570867e0a3e2584aaf8d964b25a0889 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Thu, 28 Jun 2018 16:14:17 +0200 Subject: [PATCH 091/198] Incorporating performance optimizations from libnest2d --- xs/src/libnest2d/CMakeLists.txt | 24 +- xs/src/libnest2d/README.md | 33 +- .../cmake_modules/DownloadNLopt.cmake | 31 + .../libnest2d/cmake_modules/FindNLopt.cmake | 125 ++ xs/src/libnest2d/libnest2d/boost_alg.hpp | 37 +- .../clipper_backend/clipper_backend.cpp | 20 + .../clipper_backend/clipper_backend.hpp | 115 +- xs/src/libnest2d/libnest2d/common.hpp | 123 +- xs/src/libnest2d/libnest2d/geometries_nfp.hpp | 9 +- .../libnest2d/libnest2d/geometry_traits.hpp | 86 +- xs/src/libnest2d/libnest2d/libnest2d.hpp | 46 +- xs/src/libnest2d/libnest2d/optimizer.hpp | 419 +++++++ .../libnest2d/optimizers/genetic.hpp | 31 + .../optimizers/nlopt_boilerplate.hpp | 176 +++ .../libnest2d/optimizers/simplex.hpp | 20 + .../libnest2d/optimizers/subplex.hpp | 20 + .../libnest2d/placers/bottomleftplacer.hpp | 5 +- .../libnest2d/libnest2d/placers/nfpplacer.hpp | 418 +++++-- .../libnest2d/placers/placer_boilerplate.hpp | 40 +- .../libnest2d/selections/djd_heuristic.hpp | 288 +++-- .../libnest2d/libnest2d/selections/filler.hpp | 34 +- xs/src/libnest2d/tests/main.cpp | 103 +- xs/src/libnest2d/tests/printer_parts.cpp | 1074 ++++++++--------- xs/src/libnest2d/tests/svgtools.hpp | 8 +- xs/src/libnest2d/tests/test.cpp | 25 +- xs/src/libslic3r/Model.cpp | 68 +- xs/src/libslic3r/Model.hpp | 3 +- xs/src/libslic3r/Print.cpp | 2 +- 28 files changed, 2565 insertions(+), 818 deletions(-) create mode 100644 xs/src/libnest2d/cmake_modules/DownloadNLopt.cmake create mode 100644 xs/src/libnest2d/cmake_modules/FindNLopt.cmake create mode 100644 xs/src/libnest2d/libnest2d/optimizer.hpp create mode 100644 xs/src/libnest2d/libnest2d/optimizers/genetic.hpp create mode 100644 xs/src/libnest2d/libnest2d/optimizers/nlopt_boilerplate.hpp create mode 100644 xs/src/libnest2d/libnest2d/optimizers/simplex.hpp create mode 100644 xs/src/libnest2d/libnest2d/optimizers/subplex.hpp diff --git a/xs/src/libnest2d/CMakeLists.txt b/xs/src/libnest2d/CMakeLists.txt index ac9530a63..7977066c1 100644 --- a/xs/src/libnest2d/CMakeLists.txt +++ b/xs/src/libnest2d/CMakeLists.txt @@ -35,6 +35,7 @@ set(LIBNEST2D_SRCFILES libnest2d/geometry_traits.hpp libnest2d/geometries_io.hpp libnest2d/common.hpp + libnest2d/optimizer.hpp libnest2d/placers/placer_boilerplate.hpp libnest2d/placers/bottomleftplacer.hpp libnest2d/placers/nfpplacer.hpp @@ -43,6 +44,10 @@ set(LIBNEST2D_SRCFILES libnest2d/selections/filler.hpp libnest2d/selections/firstfit.hpp libnest2d/selections/djd_heuristic.hpp + libnest2d/optimizers/simplex.hpp + libnest2d/optimizers/subplex.hpp + libnest2d/optimizers/genetic.hpp + libnest2d/optimizers/nlopt_boilerplate.hpp ) if((NOT LIBNEST2D_GEOMETRIES_TARGET) OR (LIBNEST2D_GEOMETRIES_TARGET STREQUAL "")) @@ -68,17 +73,24 @@ else() message(STATUS "Libnest2D backend is: ${LIBNEST2D_GEOMETRIES_TARGET}") endif() -message(STATUS "clipper lib is: ${LIBNEST2D_GEOMETRIES_TARGET}") +message(STATUS "clipper lib is: ${LIBNEST2D_GEOMETRIES_TARGET}") + +find_package(NLopt 1.4) +if(NOT NLopt_FOUND) + message(STATUS "NLopt not found so downloading and automatic build is performed...") + include(DownloadNLopt) +endif() +find_package(Threads REQUIRED) add_library(libnest2d_static STATIC ${LIBNEST2D_SRCFILES} ) -target_link_libraries(libnest2d_static PRIVATE ${LIBNEST2D_GEOMETRIES_TARGET}) -target_include_directories(libnest2d_static PUBLIC ${CMAKE_SOURCE_DIR}) +target_link_libraries(libnest2d_static PRIVATE ${LIBNEST2D_GEOMETRIES_TARGET} ${NLopt_LIBS}) +target_include_directories(libnest2d_static PUBLIC ${CMAKE_SOURCE_DIR} ${NLopt_INCLUDE_DIR}) set_target_properties(libnest2d_static PROPERTIES PREFIX "") if(LIBNEST2D_BUILD_SHARED_LIB) add_library(libnest2d SHARED ${LIBNEST2D_SRCFILES} ) - target_link_libraries(libnest2d PRIVATE ${LIBNEST2D_GEOMETRIES_TARGET}) - target_include_directories(libnest2d PUBLIC ${CMAKE_SOURCE_DIR}) + target_link_libraries(libnest2d PRIVATE ${LIBNEST2D_GEOMETRIES_TARGET} ${NLopt_LIBS}) + target_include_directories(libnest2d PUBLIC ${CMAKE_SOURCE_DIR} ${NLopt_INCLUDE_DIR}) set_target_properties(libnest2d PROPERTIES PREFIX "") endif() @@ -98,6 +110,6 @@ if(LIBNEST2D_BUILD_EXAMPLES) tests/svgtools.hpp tests/printer_parts.cpp tests/printer_parts.h) - target_link_libraries(example libnest2d_static) + target_link_libraries(example libnest2d_static Threads::Threads) target_include_directories(example PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) endif() diff --git a/xs/src/libnest2d/README.md b/xs/src/libnest2d/README.md index f2182d649..3508801a8 100644 --- a/xs/src/libnest2d/README.md +++ b/xs/src/libnest2d/README.md @@ -1,29 +1,26 @@ # Introduction Libnest2D is a library and framework for the 2D bin packaging problem. -Inspired from the [SVGNest](svgnest.com) Javascript library the project is is +Inspired from the [SVGNest](svgnest.com) Javascript library the project is built from scratch in C++11. The library is written with a policy that it should be usable out of the box with a very simple interface but has to be customizable -to the very core as well. This has led to a design where the algorithms are -defined in a header only fashion with template only geometry types. These -geometries can have custom or already existing implementation to avoid copying -or having unnecessary dependencies. +to the very core as well. The algorithms are defined in a header only fashion +with templated geometry types. These geometries can have custom or already +existing implementation to avoid copying or having unnecessary dependencies. -A default backend is provided if a user just wants to use the library out of the -box without implementing the interface of these geometry types. The default -backend is built on top of boost geometry and the -[polyclipping](http://www.angusj.com/delphi/clipper.php) library and implies the -dependency on these packages as well as the compilation of the backend (although -I may find a solution in the future to make the backend header only as well). +A default backend is provided if the user of the library just wants to use it +out of the box without additional integration. The default backend is reasonably +fast and robust, being built on top of boost geometry and the +[polyclipping](http://www.angusj.com/delphi/clipper.php) library. Usage of +this default backend implies the dependency on these packages as well as the +compilation of the backend itself (The default backend is not yet header only). -This software is currently under heavy construction and lacks a throughout -documentation and some essential algorithms as well. At this point a fairly -untested version of the DJD selection heuristic is working with a bottom-left -placing strategy which may produce usable arrangements in most cases. +This software is currently under construction and lacks a throughout +documentation and some essential algorithms as well. At this stage it works well +for rectangles and convex closed polygons without considering holes and +concavities. -The no-fit polygon based placement strategy will be implemented in the very near -future which should produce high quality results for convex and non convex -polygons with holes as well. +Holes and non-convex polygons will be usable in the near future as well. # References - [SVGNest](https://github.com/Jack000/SVGnest) diff --git a/xs/src/libnest2d/cmake_modules/DownloadNLopt.cmake b/xs/src/libnest2d/cmake_modules/DownloadNLopt.cmake new file mode 100644 index 000000000..814213b38 --- /dev/null +++ b/xs/src/libnest2d/cmake_modules/DownloadNLopt.cmake @@ -0,0 +1,31 @@ +include(DownloadProject) + +if (CMAKE_VERSION VERSION_LESS 3.2) + set(UPDATE_DISCONNECTED_IF_AVAILABLE "") +else() + set(UPDATE_DISCONNECTED_IF_AVAILABLE "UPDATE_DISCONNECTED 1") +endif() + +# set(NLopt_DIR ${CMAKE_BINARY_DIR}/nlopt) +include(DownloadProject) +download_project( PROJ nlopt + GIT_REPOSITORY https://github.com/stevengj/nlopt.git + GIT_TAG 1fcbcbf2fe8e34234e016cc43a6c41d3e8453e1f #master #nlopt-2.4.2 + # CMAKE_CACHE_ARGS -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${NLopt_DIR} + ${UPDATE_DISCONNECTED_IF_AVAILABLE} +) + +set(SHARED_LIBS_STATE BUILD_SHARED_LIBS) +set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) +set(NLOPT_PYTHON OFF CACHE BOOL "" FORCE) +set(NLOPT_OCTAVE OFF CACHE BOOL "" FORCE) +set(NLOPT_MATLAB OFF CACHE BOOL "" FORCE) +set(NLOPT_GUILE OFF CACHE BOOL "" FORCE) +set(NLOPT_SWIG OFF CACHE BOOL "" FORCE) +set(NLOPT_LINK_PYTHON OFF CACHE BOOL "" FORCE) + +add_subdirectory(${nlopt_SOURCE_DIR} ${nlopt_BINARY_DIR}) + +set(NLopt_LIBS nlopt) +set(NLopt_INCLUDE_DIR ${nlopt_BINARY_DIR}) +set(SHARED_LIBS_STATE ${SHARED_STATE}) \ No newline at end of file diff --git a/xs/src/libnest2d/cmake_modules/FindNLopt.cmake b/xs/src/libnest2d/cmake_modules/FindNLopt.cmake new file mode 100644 index 000000000..4b93be7b6 --- /dev/null +++ b/xs/src/libnest2d/cmake_modules/FindNLopt.cmake @@ -0,0 +1,125 @@ +#/////////////////////////////////////////////////////////////////////////// +#//------------------------------------------------------------------------- +#// +#// Description: +#// cmake module for finding NLopt installation +#// NLopt installation location is defined by environment variable $NLOPT +#// +#// following variables are defined: +#// NLopt_DIR - NLopt installation directory +#// NLopt_INCLUDE_DIR - NLopt header directory +#// NLopt_LIBRARY_DIR - NLopt library directory +#// NLopt_LIBS - NLopt library files +#// +#// Example usage: +#// find_package(NLopt 1.4 REQUIRED) +#// +#// +#//------------------------------------------------------------------------- + + +set(NLopt_FOUND FALSE) +set(NLopt_ERROR_REASON "") +set(NLopt_DEFINITIONS "") +set(NLopt_LIBS) + + +set(NLopt_DIR $ENV{NLOPT}) +if(NOT NLopt_DIR) + + set(NLopt_FOUND TRUE) + + set(_NLopt_LIB_NAMES "nlopt") + find_library(NLopt_LIBS + NAMES ${_NLopt_LIB_NAMES}) + if(NOT NLopt_LIBS) + set(NLopt_FOUND FALSE) + set(NLopt_ERROR_REASON "${NLopt_ERROR_REASON} Cannot find NLopt library '${_NLopt_LIB_NAMES}'.") + else() + get_filename_component(NLopt_DIR ${NLopt_LIBS} PATH) + endif() + unset(_NLopt_LIB_NAMES) + + set(_NLopt_HEADER_FILE_NAME "nlopt.hpp") + find_file(_NLopt_HEADER_FILE + NAMES ${_NLopt_HEADER_FILE_NAME}) + if(NOT _NLopt_HEADER_FILE) + set(NLopt_FOUND FALSE) + set(NLopt_ERROR_REASON "${NLopt_ERROR_REASON} Cannot find NLopt header file '${_NLopt_HEADER_FILE_NAME}'.") + endif() + unset(_NLopt_HEADER_FILE_NAME) + unset(_NLopt_HEADER_FILE) + + if(NOT NLopt_FOUND) + set(NLopt_ERROR_REASON "${NLopt_ERROR_REASON} NLopt not found in system directories (and environment variable NLOPT is not set).") + else() + get_filename_component(NLopt_INCLUDE_DIR ${_NLopt_HEADER_FILE} DIRECTORY ) + endif() + + + +else() + + set(NLopt_FOUND TRUE) + + set(NLopt_INCLUDE_DIR "${NLopt_DIR}/include") + if(NOT EXISTS "${NLopt_INCLUDE_DIR}") + set(NLopt_FOUND FALSE) + set(NLopt_ERROR_REASON "${NLopt_ERROR_REASON} Directory '${NLopt_INCLUDE_DIR}' does not exist.") + endif() + + set(NLopt_LIBRARY_DIR "${NLopt_DIR}/lib") + if(NOT EXISTS "${NLopt_LIBRARY_DIR}") + set(NLopt_FOUND FALSE) + set(NLopt_ERROR_REASON "${NLopt_ERROR_REASON} Directory '${NLopt_LIBRARY_DIR}' does not exist.") + endif() + + set(_NLopt_LIB_NAMES "nlopt_cxx") + find_library(NLopt_LIBS + NAMES ${_NLopt_LIB_NAMES} + PATHS ${NLopt_LIBRARY_DIR} + NO_DEFAULT_PATH) + if(NOT NLopt_LIBS) + set(NLopt_FOUND FALSE) + set(NLopt_ERROR_REASON "${NLopt_ERROR_REASON} Cannot find NLopt library '${_NLopt_LIB_NAMES}' in '${NLopt_LIBRARY_DIR}'.") + endif() + unset(_NLopt_LIB_NAMES) + + set(_NLopt_HEADER_FILE_NAME "nlopt.hpp") + find_file(_NLopt_HEADER_FILE + NAMES ${_NLopt_HEADER_FILE_NAME} + PATHS ${NLopt_INCLUDE_DIR} + NO_DEFAULT_PATH) + if(NOT _NLopt_HEADER_FILE) + set(NLopt_FOUND FALSE) + set(NLopt_ERROR_REASON "${NLopt_ERROR_REASON} Cannot find NLopt header file '${_NLopt_HEADER_FILE_NAME}' in '${NLopt_INCLUDE_DIR}'.") + endif() + unset(_NLopt_HEADER_FILE_NAME) + unset(_NLopt_HEADER_FILE) + +endif() + + +# make variables changeable +mark_as_advanced( + NLopt_INCLUDE_DIR + NLopt_LIBRARY_DIR + NLopt_LIBS + NLopt_DEFINITIONS + ) + + +# report result +if(NLopt_FOUND) + message(STATUS "Found NLopt in '${NLopt_DIR}'.") + message(STATUS "Using NLopt include directory '${NLopt_INCLUDE_DIR}'.") + message(STATUS "Using NLopt library '${NLopt_LIBS}'.") +else() + if(NLopt_FIND_REQUIRED) + message(FATAL_ERROR "Unable to find requested NLopt installation:${NLopt_ERROR_REASON}") + else() + if(NOT NLopt_FIND_QUIETLY) + message(STATUS "NLopt was not found:${NLopt_ERROR_REASON}") + endif() + endif() +endif() \ No newline at end of file diff --git a/xs/src/libnest2d/libnest2d/boost_alg.hpp b/xs/src/libnest2d/libnest2d/boost_alg.hpp index fb43c2125..8cd126f68 100644 --- a/xs/src/libnest2d/libnest2d/boost_alg.hpp +++ b/xs/src/libnest2d/libnest2d/boost_alg.hpp @@ -5,6 +5,9 @@ #include #endif +#ifdef __clang__ +#undef _MSC_EXTENSIONS +#endif #include // this should be removed to not confuse the compiler @@ -152,7 +155,7 @@ template<> struct indexed_access { return bp2d::getX(seg.first()); } static inline void set(bp2d::Segment &seg, bp2d::Coord const& coord) { - bp2d::setX(seg.first(), coord); + auto p = seg.first(); bp2d::setX(p, coord); seg.first(p); } }; @@ -161,7 +164,7 @@ template<> struct indexed_access { return bp2d::getY(seg.first()); } static inline void set(bp2d::Segment &seg, bp2d::Coord const& coord) { - bp2d::setY(seg.first(), coord); + auto p = seg.first(); bp2d::setY(p, coord); seg.first(p); } }; @@ -170,7 +173,7 @@ template<> struct indexed_access { return bp2d::getX(seg.second()); } static inline void set(bp2d::Segment &seg, bp2d::Coord const& coord) { - bp2d::setX(seg.second(), coord); + auto p = seg.second(); bp2d::setX(p, coord); seg.second(p); } }; @@ -179,7 +182,7 @@ template<> struct indexed_access { return bp2d::getY(seg.second()); } static inline void set(bp2d::Segment &seg, bp2d::Coord const& coord) { - bp2d::setY(seg.second(), coord); + auto p = seg.second(); bp2d::setY(p, coord); seg.second(p); } }; @@ -325,20 +328,23 @@ inline bool ShapeLike::intersects(const PathImpl& sh1, // Tell libnest2d how to make string out of a ClipperPolygon object template<> inline bool ShapeLike::intersects(const PolygonImpl& sh1, - const PolygonImpl& sh2) { + const PolygonImpl& sh2) +{ return boost::geometry::intersects(sh1, sh2); } // Tell libnest2d how to make string out of a ClipperPolygon object template<> inline bool ShapeLike::intersects(const bp2d::Segment& s1, - const bp2d::Segment& s2) { + const bp2d::Segment& s2) +{ return boost::geometry::intersects(s1, s2); } #ifndef DISABLE_BOOST_AREA template<> -inline double ShapeLike::area(const PolygonImpl& shape) { +inline double ShapeLike::area(const PolygonImpl& shape) +{ return boost::geometry::area(shape); } #endif @@ -364,16 +370,25 @@ inline bool ShapeLike::touches( const PolygonImpl& sh1, return boost::geometry::touches(sh1, sh2); } +template<> +inline bool ShapeLike::touches( const PointImpl& point, + const PolygonImpl& shape) +{ + return boost::geometry::touches(point, shape); +} + #ifndef DISABLE_BOOST_BOUNDING_BOX template<> -inline bp2d::Box ShapeLike::boundingBox(const PolygonImpl& sh) { +inline bp2d::Box ShapeLike::boundingBox(const PolygonImpl& sh) +{ bp2d::Box b; boost::geometry::envelope(sh, b); return b; } template<> -inline bp2d::Box ShapeLike::boundingBox(const bp2d::Shapes& shapes) { +inline bp2d::Box ShapeLike::boundingBox(const bp2d::Shapes& shapes) +{ bp2d::Box b; boost::geometry::envelope(shapes, b); return b; @@ -398,17 +413,19 @@ inline PolygonImpl ShapeLike::convexHull(const bp2d::Shapes& shapes) } #endif +#ifndef DISABLE_BOOST_ROTATE template<> inline void ShapeLike::rotate(PolygonImpl& sh, const Radians& rads) { namespace trans = boost::geometry::strategy::transform; PolygonImpl cpy = sh; - trans::rotate_transformer rotate(rads); + boost::geometry::transform(cpy, sh, rotate); } +#endif #ifndef DISABLE_BOOST_TRANSLATE template<> diff --git a/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.cpp b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.cpp index 6bd7bf99f..746edf1f4 100644 --- a/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.cpp +++ b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.cpp @@ -1,15 +1,35 @@ #include "clipper_backend.hpp" +#include namespace libnest2d { namespace { + +class SpinLock { + std::atomic_flag& lck_; +public: + + inline SpinLock(std::atomic_flag& flg): lck_(flg) {} + + inline void lock() { + while(lck_.test_and_set(std::memory_order_acquire)) {} + } + + inline void unlock() { lck_.clear(std::memory_order_release); } +}; + class HoleCache { friend struct libnest2d::ShapeLike; std::unordered_map< const PolygonImpl*, ClipperLib::Paths> map; ClipperLib::Paths& _getHoles(const PolygonImpl* p) { + static std::atomic_flag flg = ATOMIC_FLAG_INIT; + SpinLock lock(flg); + + lock.lock(); ClipperLib::Paths& paths = map[p]; + lock.unlock(); if(paths.size() != p->Childs.size()) { paths.reserve(p->Childs.size()); diff --git a/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp index 6621d7085..ef9a2b622 100644 --- a/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp +++ b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp @@ -103,7 +103,7 @@ inline TCoord& PointLike::y(PointImpl& p) } template<> -inline void ShapeLike::reserve(PolygonImpl& sh, unsigned long vertex_capacity) +inline void ShapeLike::reserve(PolygonImpl& sh, size_t vertex_capacity) { return sh.Contour.reserve(vertex_capacity); } @@ -164,6 +164,95 @@ inline void ShapeLike::offset(PolygonImpl& sh, TCoord distance) { } +// TODO : make it convex hull right and faster than boost + +//#define DISABLE_BOOST_CONVEX_HULL +//inline TCoord cross( const PointImpl &O, +// const PointImpl &A, +// const PointImpl &B) +//{ +// return (A.X - O.X) * (B.Y - O.Y) - (A.Y - O.Y) * (B.X - O.X); +//} + +//template<> +//inline PolygonImpl ShapeLike::convexHull(const PolygonImpl& sh) +//{ +// auto& P = sh.Contour; +// PolygonImpl ret; + +// size_t n = P.size(), k = 0; +// if (n <= 3) return ret; + +// auto& H = ret.Contour; +// H.resize(2*n); +// std::vector indices(P.size(), 0); +// std::iota(indices.begin(), indices.end(), 0); + +// // Sort points lexicographically +// std::sort(indices.begin(), indices.end(), [&P](unsigned i1, unsigned i2){ +// auto& p1 = P[i1], &p2 = P[i2]; +// return p1.X < p2.X || (p1.X == p2.X && p1.Y < p2.Y); +// }); + +// // Build lower hull +// for (size_t i = 0; i < n; ++i) { +// while (k >= 2 && cross(H[k-2], H[k-1], P[i]) <= 0) k--; +// H[k++] = P[i]; +// } + +// // Build upper hull +// for (size_t i = n-1, t = k+1; i > 0; --i) { +// while (k >= t && cross(H[k-2], H[k-1], P[i-1]) <= 0) k--; +// H[k++] = P[i-1]; +// } + +// H.resize(k-1); +// return ret; +//} + +//template<> +//inline PolygonImpl ShapeLike::convexHull( +// const ShapeLike::Shapes& shapes) +//{ +// PathImpl P; +// PolygonImpl ret; + +// size_t n = 0, k = 0; +// for(auto& sh : shapes) { n += sh.Contour.size(); } + +// P.reserve(n); +// for(auto& sh : shapes) { P.insert(P.end(), +// sh.Contour.begin(), sh.Contour.end()); } + +// if (n <= 3) { ret.Contour = P; return ret; } + +// auto& H = ret.Contour; +// H.resize(2*n); +// std::vector indices(P.size(), 0); +// std::iota(indices.begin(), indices.end(), 0); + +// // Sort points lexicographically +// std::sort(indices.begin(), indices.end(), [&P](unsigned i1, unsigned i2){ +// auto& p1 = P[i1], &p2 = P[i2]; +// return p1.X < p2.X || (p1.X == p2.X && p1.Y < p2.Y); +// }); + +// // Build lower hull +// for (size_t i = 0; i < n; ++i) { +// while (k >= 2 && cross(H[k-2], H[k-1], P[i]) <= 0) k--; +// H[k++] = P[i]; +// } + +// // Build upper hull +// for (size_t i = n-1, t = k+1; i > 0; --i) { +// while (k >= t && cross(H[k-2], H[k-1], P[i-1]) <= 0) k--; +// H[k++] = P[i-1]; +// } + +// H.resize(k-1); +// return ret; +//} + template<> inline PolygonImpl& Nfp::minkowskiAdd(PolygonImpl& sh, const PolygonImpl& other) @@ -263,8 +352,30 @@ inline void ShapeLike::translate(PolygonImpl& sh, const PointImpl& offs) for(auto& hole : sh.Childs) for(auto& p : hole->Contour) { p += offs; } } -#define DISABLE_BOOST_NFP_MERGE +#define DISABLE_BOOST_ROTATE +template<> +inline void ShapeLike::rotate(PolygonImpl& sh, const Radians& rads) +{ + using Coord = TCoord; + auto cosa = rads.cos();//std::cos(rads); + auto sina = rads.sin(); //std::sin(rads); + + for(auto& p : sh.Contour) { + p = { + static_cast(p.X * cosa - p.Y * sina), + static_cast(p.X * sina + p.Y * cosa) + }; + } + for(auto& hole : sh.Childs) for(auto& p : hole->Contour) { + p = { + static_cast(p.X * cosa - p.Y * sina), + static_cast(p.X * sina + p.Y * cosa) + }; + } +} + +#define DISABLE_BOOST_NFP_MERGE template<> inline Nfp::Shapes Nfp::merge(const Nfp::Shapes& shapes, const PolygonImpl& sh) diff --git a/xs/src/libnest2d/libnest2d/common.hpp b/xs/src/libnest2d/libnest2d/common.hpp index 6e6174352..9de75415b 100644 --- a/xs/src/libnest2d/libnest2d/common.hpp +++ b/xs/src/libnest2d/libnest2d/common.hpp @@ -1,6 +1,15 @@ #ifndef LIBNEST2D_CONFIG_HPP #define LIBNEST2D_CONFIG_HPP +#ifndef NDEBUG +#include +#endif + +#include +#include +#include +#include + #if defined(_MSC_VER) && _MSC_VER <= 1800 || __cplusplus < 201103L #define BP2D_NOEXCEPT #define BP2D_CONSTEXPR @@ -9,12 +18,50 @@ #define BP2D_CONSTEXPR constexpr #endif -#include -#include -#include + +/* + * Debugging output dout and derr definition + */ +//#ifndef NDEBUG +//# define dout std::cout +//# define derr std::cerr +//#else +//# define dout 0 && std::cout +//# define derr 0 && std::cerr +//#endif namespace libnest2d { +struct DOut { +#ifndef NDEBUG + std::ostream& out = std::cout; +#endif +}; + +struct DErr { +#ifndef NDEBUG + std::ostream& out = std::cerr; +#endif +}; + +template +inline DOut&& operator<<( DOut&& out, T&& d) { +#ifndef NDEBUG + out.out << d; +#endif + return std::move(out); +} + +template +inline DErr&& operator<<( DErr&& out, T&& d) { +#ifndef NDEBUG + out.out << d; +#endif + return std::move(out); +} +inline DOut dout() { return DOut(); } +inline DErr derr() { return DErr(); } + template< class T > struct remove_cvref { using type = typename std::remove_cv< @@ -24,9 +71,58 @@ struct remove_cvref { template< class T > using remove_cvref_t = typename remove_cvref::type; +template< class T > +using remove_ref_t = typename std::remove_reference::type; + template using enable_if_t = typename std::enable_if::type; +template +struct invoke_result { + using type = typename std::result_of::type; +}; + +template +using invoke_result_t = typename invoke_result::type; + +/* ************************************************************************** */ +/* C++14 std::index_sequence implementation: */ +/* ************************************************************************** */ + +/** + * \brief C++11 conformant implementation of the index_sequence type from C++14 + */ +template struct index_sequence { + using value_type = size_t; + BP2D_CONSTEXPR value_type size() const { return sizeof...(Ints); } +}; + +// A Help structure to generate the integer list +template struct genSeq; + +// Recursive template to generate the list +template struct genSeq { + // Type will contain a genSeq with Nseq appended by one element + using Type = typename genSeq< I - 1, I - 1, Nseq...>::Type; +}; + +// Terminating recursion +template struct genSeq<0, Nseq...> { + // If I is zero, Type will contain index_sequence with the fuly generated + // integer list. + using Type = index_sequence; +}; + +/// Helper alias to make an index sequence from 0 to N +template using make_index_sequence = typename genSeq::Type; + +/// Helper alias to make an index sequence for a parameter pack +template +using index_sequence_for = make_index_sequence; + + +/* ************************************************************************** */ + /** * A useful little tool for triggering static_assert error messages e.g. when * a mandatory template specialization (implementation) is missing. @@ -35,12 +131,14 @@ using enable_if_t = typename std::enable_if::type; */ template struct always_false { enum { value = false }; }; -const auto BP2D_CONSTEXPR Pi = 3.141592653589793238463; // 2*std::acos(0); +const double BP2D_CONSTEXPR Pi = 3.141592653589793238463; // 2*std::acos(0); +const double BP2D_CONSTEXPR Pi_2 = 2*Pi; /** * @brief Only for the Radian and Degrees classes to behave as doubles. */ class Double { +protected: double val_; public: Double(): val_(double{}) { } @@ -56,12 +154,29 @@ class Degrees; * @brief Data type representing radians. It supports conversion to degrees. */ class Radians: public Double { + mutable double sin_ = std::nan(""), cos_ = std::nan(""); public: Radians(double rads = Double() ): Double(rads) {} inline Radians(const Degrees& degs); inline operator Degrees(); inline double toDegrees(); + + inline double sin() const { + if(std::isnan(sin_)) { + cos_ = std::cos(val_); + sin_ = std::sin(val_); + } + return sin_; + } + + inline double cos() const { + if(std::isnan(cos_)) { + cos_ = std::cos(val_); + sin_ = std::sin(val_); + } + return cos_; + } }; /** diff --git a/xs/src/libnest2d/libnest2d/geometries_nfp.hpp b/xs/src/libnest2d/libnest2d/geometries_nfp.hpp index 9f8bd6031..f3672d4fe 100644 --- a/xs/src/libnest2d/libnest2d/geometries_nfp.hpp +++ b/xs/src/libnest2d/libnest2d/geometries_nfp.hpp @@ -75,12 +75,12 @@ static RawShape noFitPolygon(const RawShape& sh, const RawShape& other) { RawShape rsh; // Final nfp placeholder std::vector edgelist; - size_t cap = ShapeLike::contourVertexCount(sh) + + auto cap = ShapeLike::contourVertexCount(sh) + ShapeLike::contourVertexCount(other); // Reserve the needed memory edgelist.reserve(cap); - ShapeLike::reserve(rsh, cap); + ShapeLike::reserve(rsh, static_cast(cap)); { // place all edges from sh into edgelist auto first = ShapeLike::cbegin(sh); @@ -208,9 +208,10 @@ static inline bool _vsort(const TPoint& v1, const TPoint& v2) { using Coord = TCoord>; - auto diff = getY(v1) - getY(v2); + Coord &&x1 = getX(v1), &&x2 = getX(v2), &&y1 = getY(v1), &&y2 = getY(v2); + auto diff = y1 - y2; if(std::abs(diff) <= std::numeric_limits::epsilon()) - return getX(v1) < getX(v2); + return x1 < x2; return diff < 0; } diff --git a/xs/src/libnest2d/libnest2d/geometry_traits.hpp b/xs/src/libnest2d/libnest2d/geometry_traits.hpp index b1353b457..f4cfe31af 100644 --- a/xs/src/libnest2d/libnest2d/geometry_traits.hpp +++ b/xs/src/libnest2d/libnest2d/geometry_traits.hpp @@ -20,17 +20,17 @@ template using TCoord = typename CoordType>::Type; /// Getting the type of point structure used by a shape. -template struct PointType { using Type = void; }; +template struct PointType { /*using Type = void;*/ }; /// TPoint as shorthand for `typename PointType::Type`. template using TPoint = typename PointType>::Type; /// Getting the VertexIterator type of a shape class. -template struct VertexIteratorType { using Type = void; }; +template struct VertexIteratorType { /*using Type = void;*/ }; /// Getting the const vertex iterator for a shape class. -template struct VertexConstIteratorType { using Type = void; }; +template struct VertexConstIteratorType {/* using Type = void;*/ }; /** * TVertexIterator as shorthand for @@ -86,23 +86,47 @@ public: inline RawPoint center() const BP2D_NOEXCEPT; }; +/** + * \brief An abstraction of a directed line segment with two points. + */ template class _Segment: PointPair { using PointPair::p1; using PointPair::p2; + mutable Radians angletox_ = std::nan(""); public: inline _Segment() {} + inline _Segment(const RawPoint& p, const RawPoint& pp): PointPair({p, pp}) {} + /** + * @brief Get the first point. + * @return Returns the starting point. + */ inline const RawPoint& first() const BP2D_NOEXCEPT { return p1; } + + /** + * @brief The end point. + * @return Returns the end point of the segment. + */ inline const RawPoint& second() const BP2D_NOEXCEPT { return p2; } - inline RawPoint& first() BP2D_NOEXCEPT { return p1; } - inline RawPoint& second() BP2D_NOEXCEPT { return p2; } + inline void first(const RawPoint& p) BP2D_NOEXCEPT + { + angletox_ = std::nan(""); p1 = p; + } + inline void second(const RawPoint& p) BP2D_NOEXCEPT { + angletox_ = std::nan(""); p2 = p; + } + + /// Returns the angle measured to the X (horizontal) axis. inline Radians angleToXaxis() const; + + /// The length of the segment in the measure of the coordinate system. + inline double length(); }; // This struct serves as a namespace. The only difference is that is can be @@ -204,13 +228,14 @@ struct PointLike { }; template -TCoord _Box::width() const BP2D_NOEXCEPT { +TCoord _Box::width() const BP2D_NOEXCEPT +{ return PointLike::x(maxCorner()) - PointLike::x(minCorner()); } - template -TCoord _Box::height() const BP2D_NOEXCEPT { +TCoord _Box::height() const BP2D_NOEXCEPT +{ return PointLike::y(maxCorner()) - PointLike::y(minCorner()); } @@ -221,33 +246,37 @@ template TCoord getY(const RawPoint& p) { return PointLike::y(p); } template -void setX(RawPoint& p, const TCoord& val) { +void setX(RawPoint& p, const TCoord& val) +{ PointLike::x(p) = val; } template -void setY(RawPoint& p, const TCoord& val) { +void setY(RawPoint& p, const TCoord& val) +{ PointLike::y(p) = val; } template inline Radians _Segment::angleToXaxis() const { - static const double Pi_2 = 2*Pi; - TCoord dx = getX(second()) - getX(first()); - TCoord dy = getY(second()) - getY(first()); + if(std::isnan(angletox_)) { + TCoord dx = getX(second()) - getX(first()); + TCoord dy = getY(second()) - getY(first()); - double a = std::atan2(dy, dx); -// if(dx == 0 && dy >= 0) return Pi/2; -// if(dx == 0 && dy < 0) return 3*Pi/2; -// if(dy == 0 && dx >= 0) return 0; -// if(dy == 0 && dx < 0) return Pi; + double a = std::atan2(dy, dx); + auto s = std::signbit(a); -// double ddx = static_cast(dx); - auto s = std::signbit(a); -// double a = std::atan(ddx/dy); - if(s) a += Pi_2; - return a; + if(s) a += Pi_2; + angletox_ = a; + } + return angletox_; +} + +template +inline double _Segment::length() +{ + return PointLike::distance(first(), second()); } template @@ -319,7 +348,7 @@ struct ShapeLike { // Optional, does nothing by default template - static void reserve(RawShape& /*sh*/, unsigned long /*vertex_capacity*/) {} + static void reserve(RawShape& /*sh*/, size_t /*vertex_capacity*/) {} template static void addVertex(RawShape& sh, Args...args) @@ -415,6 +444,15 @@ struct ShapeLike { return false; } + template + static bool touches( const TPoint& /*point*/, + const RawShape& /*shape*/) + { + static_assert(always_false::value, + "ShapeLike::touches(point, shape) unimplemented!"); + return false; + } + template static _Box> boundingBox(const RawShape& /*sh*/) { diff --git a/xs/src/libnest2d/libnest2d/libnest2d.hpp b/xs/src/libnest2d/libnest2d/libnest2d.hpp index 76df1829b..aa36bd1bf 100644 --- a/xs/src/libnest2d/libnest2d/libnest2d.hpp +++ b/xs/src/libnest2d/libnest2d/libnest2d.hpp @@ -9,6 +9,9 @@ #include #include "geometry_traits.hpp" +//#include "optimizers/subplex.hpp" +//#include "optimizers/simplex.hpp" +#include "optimizers/genetic.hpp" namespace libnest2d { @@ -48,6 +51,7 @@ class _Item { mutable bool area_cache_valid_ = false; mutable RawShape offset_cache_; mutable bool offset_cache_valid_ = false; + public: /// The type of the shape which was handed over as the template argument. @@ -188,7 +192,7 @@ public: } /// The number of the outer ring vertices. - inline unsigned long vertexCount() const { + inline size_t vertexCount() const { return ShapeLike::contourVertexCount(sh_); } @@ -495,6 +499,8 @@ public: /// Clear the packed items so a new session can be started. inline void clearItems() { impl_.clearItems(); } + inline double filledArea() const { return impl_.filledArea(); } + #ifndef NDEBUG inline auto getDebugItems() -> decltype(impl_.debug_items_)& { @@ -629,7 +635,7 @@ template class Arranger { using TSel = SelectionStrategyLike; TSel selector_; - + bool use_min_bb_rotation_ = false; public: using Item = typename PlacementStrategy::Item; using ItemRef = std::reference_wrapper; @@ -713,9 +719,9 @@ public: } /// Set a progress indicatior function object for the selector. - inline void progressIndicator(ProgressFunction func) + inline Arranger& progressIndicator(ProgressFunction func) { - selector_.progressIndicator(func); + selector_.progressIndicator(func); return *this; } inline PackGroup lastResult() { @@ -727,6 +733,10 @@ public: return ret; } + inline Arranger& useMinimumBoundigBoxRotation(bool s = true) { + use_min_bb_rotation_ = s; return *this; + } + private: template solver(stopcr); + + auto orig_rot = item.rotation(); + + auto result = solver.optimize_min([&item, &orig_rot](Radians rot){ + item.rotation(orig_rot + rot); + auto bb = item.boundingBox(); + return std::sqrt(bb.height()*bb.width()); + }, opt::initvals(Radians(0)), opt::bound(-Pi/2, Pi/2)); + + item.rotation(orig_rot); + + return std::get<0>(result.optimum); + } + template inline void __arrange(TIter from, TIter to) { if(min_obj_distance_ > 0) std::for_each(from, to, [this](Item& item) { item.addOffset(static_cast(std::ceil(min_obj_distance_/2.0))); }); + if(use_min_bb_rotation_) + std::for_each(from, to, [this](Item& item){ + Radians rot = findBestRotation(item); + item.rotate(rot); + }); + selector_.template packItems( from, to, bin_, pconfig_); - if(min_obj_distance_ > 0) std::for_each(from, to, [this](Item& item) { + if(min_obj_distance_ > 0) std::for_each(from, to, [](Item& item) { item.removeOffset(); }); diff --git a/xs/src/libnest2d/libnest2d/optimizer.hpp b/xs/src/libnest2d/libnest2d/optimizer.hpp new file mode 100644 index 000000000..52e67f7d5 --- /dev/null +++ b/xs/src/libnest2d/libnest2d/optimizer.hpp @@ -0,0 +1,419 @@ +#ifndef OPTIMIZER_HPP +#define OPTIMIZER_HPP + +#include +#include +#include +#include "common.hpp" + +namespace libnest2d { namespace opt { + +using std::forward; +using std::tuple; +using std::get; +using std::tuple_element; + +/// A Type trait for upper and lower limit of a numeric type. +template +struct limits { + inline static T min() { return std::numeric_limits::min(); } + inline static T max() { return std::numeric_limits::max(); } +}; + +template +struct limits::has_infinity, void>> { + inline static T min() { return -std::numeric_limits::infinity(); } + inline static T max() { return std::numeric_limits::infinity(); } +}; + +/// An interval of possible input values for optimization +template +class Bound { + T min_; + T max_; +public: + Bound(const T& min = limits::min(), + const T& max = limits::max()): min_(min), max_(max) {} + inline const T min() const BP2D_NOEXCEPT { return min_; } + inline const T max() const BP2D_NOEXCEPT { return max_; } +}; + +/** + * Helper function to make a Bound object with its type deduced automatically. + */ +template +inline Bound bound(const T& min, const T& max) { return Bound(min, max); } + +/** + * This is the type of an input tuple for the object function. It holds the + * values and their type in each dimension. + */ +template using Input = tuple; + +template +inline tuple initvals(Args...args) { return std::make_tuple(args...); } + +/** + * @brief Helper class to be able to loop over a parameter pack's elements. + */ +class metaloop { +// The implementation is based on partial struct template specializations. +// Basically we need a template type that is callable and takes an integer +// non-type template parameter which can be used to implement recursive calls. +// +// C++11 will not allow the usage of a plain template function that is why we +// use struct with overloaded call operator. At the same time C++11 prohibits +// partial template specialization with a non type parameter such as int. We +// need to wrap that in a type (see metaloop::Int). + +/* + * A helper alias to create integer values wrapped as a type. It is nessecary + * because a non type template parameter (such as int) would be prohibited in + * a partial specialization. Also for the same reason we have to use a class + * _Metaloop instead of a simple function as a functor. A function cannot be + * partially specialized in a way that is neccesary for this trick. + */ +template using Int = std::integral_constant; + +/* + * Helper class to implement in-place functors. + * + * We want to be able to use inline functors like a lambda to keep the code + * as clear as possible. + */ +template class MapFn { + Fn&& fn_; +public: + + // It takes the real functor that can be specified in-place but only + // with C++14 because the second parameter's type will depend on the + // type of the parameter pack element that is processed. In C++14 we can + // specify this second parameter type as auto in the lamda parameter list. + inline MapFn(Fn&& fn): fn_(forward(fn)) {} + + template void operator ()(T&& pack_element) { + // We provide the index as the first parameter and the pack (or tuple) + // element as the second parameter to the functor. + fn_(N, forward(pack_element)); + } +}; + +/* + * Implementation of the template loop trick. + * We create a mechanism for looping over a parameter pack in compile time. + * \tparam Idx is the loop index which will be decremented at each recursion. + * \tparam Args The parameter pack that will be processed. + * + */ +template +class _MetaLoop {}; + +// Implementation for the first element of Args... +template +class _MetaLoop, Args...> { +public: + + const static BP2D_CONSTEXPR int N = 0; + const static BP2D_CONSTEXPR int ARGNUM = sizeof...(Args)-1; + + template + void run( Tup&& valtup, Fn&& fn) { + MapFn {forward(fn)} (get(valtup)); + } +}; + +// Implementation for the N-th element of Args... +template +class _MetaLoop, Args...> { +public: + + const static BP2D_CONSTEXPR int ARGNUM = sizeof...(Args)-1; + + template + void run(Tup&& valtup, Fn&& fn) { + MapFn {forward(fn)} (std::get(valtup)); + + // Recursive call to process the next element of Args + _MetaLoop, Args...> ().run(forward(valtup), + forward(fn)); + } +}; + +/* + * Instantiation: We must instantiate the template with the last index because + * the generalized version calls the decremented instantiations recursively. + * Once the instantiation with the first index is called, the terminating + * version of run is called which does not call itself anymore. + * + * If you are utterly annoyed, at least you have learned a super crazy + * functional metaprogramming pattern. + */ +template +using MetaLoop = _MetaLoop, Args...>; + +public: + +/** + * \brief The final usable function template. + * + * This is similar to what varags was on C but in compile time C++11. + * You can call: + * apply(, ); + * For example: + * + * struct mapfunc { + * template void operator()(int N, T&& element) { + * std::cout << "The value of the parameter "<< N <<": " + * << element << std::endl; + * } + * }; + * + * apply(mapfunc(), 'a', 10, 151.545); + * + * C++14: + * apply([](int N, auto&& element){ + * std::cout << "The value of the parameter "<< N <<": " + * << element << std::endl; + * }, 'a', 10, 151.545); + * + * This yields the output: + * The value of the parameter 0: a + * The value of the parameter 1: 10 + * The value of the parameter 2: 151.545 + * + * As an addition, the function can be called with a tuple as the second + * parameter holding the arguments instead of a parameter pack. + * + */ +template +inline static void apply(Fn&& fn, Args&&...args) { + MetaLoop().run(tuple(forward(args)...), + forward(fn)); +} + +/// The version of apply with a tuple rvalue reference. +template +inline static void apply(Fn&& fn, tuple&& tup) { + MetaLoop().run(std::move(tup), forward(fn)); +} + +/// The version of apply with a tuple lvalue reference. +template +inline static void apply(Fn&& fn, tuple& tup) { + MetaLoop().run(tup, forward(fn)); +} + +/// The version of apply with a tuple const reference. +template +inline static void apply(Fn&& fn, const tuple& tup) { + MetaLoop().run(tup, forward(fn)); +} + +/** + * Call a function with its arguments encapsualted in a tuple. + */ +template +inline static auto +callFunWithTuple(Fn&& fn, Tup&& tup, index_sequence) -> + decltype(fn(std::get(tup)...)) +{ + return fn(std::get(tup)...); +} + +}; + +/** + * @brief Specific optimization methods for which a default optimizer + * implementation can be instantiated. + */ +enum class Method { + L_SIMPLEX, + L_SUBPLEX, + G_GENETIC, + //... +}; + +/** + * @brief Info about result of an optimization. These codes are exactly the same + * as the nlopt codes for convinience. + */ +enum ResultCodes { + FAILURE = -1, /* generic failure code */ + INVALID_ARGS = -2, + OUT_OF_MEMORY = -3, + ROUNDOFF_LIMITED = -4, + FORCED_STOP = -5, + SUCCESS = 1, /* generic success code */ + STOPVAL_REACHED = 2, + FTOL_REACHED = 3, + XTOL_REACHED = 4, + MAXEVAL_REACHED = 5, + MAXTIME_REACHED = 6 +}; + +/** + * \brief A type to hold the complete result of the optimization. + */ +template +struct Result { + ResultCodes resultcode; + std::tuple optimum; + double score; +}; + +/** + * @brief The stop limit can be specified as the absolute error or as the + * relative error, just like in nlopt. + */ +enum class StopLimitType { + ABSOLUTE, + RELATIVE +}; + +/** + * @brief A type for specifying the stop criteria. + */ +struct StopCriteria { + + /// Relative or absolute termination error + StopLimitType type = StopLimitType::RELATIVE; + + /// The error value that is interpredted depending on the type property. + double stoplimit = 0.0001; + + unsigned max_iterations = 0; +}; + +/** + * \brief The Optimizer base class with CRTP pattern. + */ +template +class Optimizer { +protected: + enum class OptDir{ + MIN, + MAX + } dir_; + + StopCriteria stopcr_; + +public: + + inline explicit Optimizer(const StopCriteria& scr = {}): stopcr_(scr) {} + + /** + * \brief Optimize for minimum value of the provided objectfunction. + * \param objectfunction The function that will be searched for the minimum + * return value. + * \param initvals A tuple with the initial values for the search + * \param bounds A parameter pack with the bounds for each dimension. + * \return Returns a Result structure. + * An example call would be: + * auto result = opt.optimize_min( + * [](std::tuple x) // object function + * { + * return std::pow(std::get<0>(x), 2); + * }, + * std::make_tuple(-0.5), // initial value + * {-1.0, 1.0} // search space bounds + * ); + */ + template + inline Result optimize_min(Func&& objectfunction, + Input initvals, + Bound... bounds) + { + dir_ = OptDir::MIN; + return static_cast(this)->template optimize( + forward(objectfunction), initvals, bounds... ); + } + + template + inline Result optimize_min(Func&& objectfunction, + Input initvals) + { + dir_ = OptDir::MIN; + return static_cast(this)->template optimize( + objectfunction, initvals, Bound()... ); + } + + template + inline Result optimize_min(Func&& objectfunction) + { + dir_ = OptDir::MIN; + return static_cast(this)->template optimize( + objectfunction, + Input(), + Bound()... ); + } + + /// Same as optimize_min but optimizes for maximum function value. + template + inline Result optimize_max(Func&& objectfunction, + Input initvals, + Bound... bounds) + { + dir_ = OptDir::MAX; + return static_cast(this)->template optimize( + objectfunction, initvals, bounds... ); + } + + template + inline Result optimize_max(Func&& objectfunction, + Input initvals) + { + dir_ = OptDir::MAX; + return static_cast(this)->template optimize( + objectfunction, initvals, Bound()... ); + } + + template + inline Result optimize_max(Func&& objectfunction) + { + dir_ = OptDir::MAX; + return static_cast(this)->template optimize( + objectfunction, + Input(), + Bound()... ); + } + +}; + +// Just to be able to instantiate an unimplemented method and generate compile +// error. +template +class DummyOptimizer : public Optimizer> { + friend class Optimizer>; + +public: + DummyOptimizer() { + static_assert(always_false::value, "Optimizer unimplemented!"); + } + + template + Result optimize(Func&& func, + std::tuple initvals, + Bound... args) + { + return Result(); + } +}; + +// Specializing this struct will tell what kind of optimizer to generate for +// a given method +template struct OptimizerSubclass { using Type = DummyOptimizer<>; }; + +/// Optimizer type based on the method provided in parameter m. +template using TOptimizer = typename OptimizerSubclass::Type; + +/// Global optimizer with an explicitly specified local method. +template +inline TOptimizer GlobalOptimizer(Method, const StopCriteria& scr = {}) +{ // Need to be specialized in order to do anything useful. + return TOptimizer(scr); +} + +} +} + +#endif // OPTIMIZER_HPP diff --git a/xs/src/libnest2d/libnest2d/optimizers/genetic.hpp b/xs/src/libnest2d/libnest2d/optimizers/genetic.hpp new file mode 100644 index 000000000..276854a12 --- /dev/null +++ b/xs/src/libnest2d/libnest2d/optimizers/genetic.hpp @@ -0,0 +1,31 @@ +#ifndef GENETIC_HPP +#define GENETIC_HPP + +#include "nlopt_boilerplate.hpp" + +namespace libnest2d { namespace opt { + +class GeneticOptimizer: public NloptOptimizer { +public: + inline explicit GeneticOptimizer(const StopCriteria& scr = {}): + NloptOptimizer(method2nloptAlg(Method::G_GENETIC), scr) {} + + inline GeneticOptimizer& localMethod(Method m) { + localmethod_ = m; + return *this; + } +}; + +template<> +struct OptimizerSubclass { using Type = GeneticOptimizer; }; + +template<> TOptimizer GlobalOptimizer( + Method localm, const StopCriteria& scr ) +{ + return GeneticOptimizer (scr).localMethod(localm); +} + +} +} + +#endif // GENETIC_HPP diff --git a/xs/src/libnest2d/libnest2d/optimizers/nlopt_boilerplate.hpp b/xs/src/libnest2d/libnest2d/optimizers/nlopt_boilerplate.hpp new file mode 100644 index 000000000..798bf9622 --- /dev/null +++ b/xs/src/libnest2d/libnest2d/optimizers/nlopt_boilerplate.hpp @@ -0,0 +1,176 @@ +#ifndef NLOPT_BOILERPLATE_HPP +#define NLOPT_BOILERPLATE_HPP + +#include +#include +#include + +#include + +namespace libnest2d { namespace opt { + +nlopt::algorithm method2nloptAlg(Method m) { + + switch(m) { + case Method::L_SIMPLEX: return nlopt::LN_NELDERMEAD; + case Method::L_SUBPLEX: return nlopt::LN_SBPLX; + case Method::G_GENETIC: return nlopt::GN_ESCH; + default: assert(false); throw(m); + } +} + +/** + * Optimizer based on NLopt. + * + * All the optimized types have to be convertible to double. + */ +class NloptOptimizer: public Optimizer { +protected: + nlopt::opt opt_; + std::vector lower_bounds_; + std::vector upper_bounds_; + std::vector initvals_; + nlopt::algorithm alg_; + Method localmethod_; + + using Base = Optimizer; + + friend Base; + + // ********************************************************************** */ + + // TODO: CHANGE FOR LAMBDAS WHEN WE WILL MOVE TO C++14 + + struct BoundsFunc { + NloptOptimizer& self; + inline explicit BoundsFunc(NloptOptimizer& o): self(o) {} + + template void operator()(int N, T& bounds) + { + self.lower_bounds_[N] = bounds.min(); + self.upper_bounds_[N] = bounds.max(); + } + }; + + struct InitValFunc { + NloptOptimizer& self; + inline explicit InitValFunc(NloptOptimizer& o): self(o) {} + + template void operator()(int N, T& initval) + { + self.initvals_[N] = initval; + } + }; + + struct ResultCopyFunc { + NloptOptimizer& self; + inline explicit ResultCopyFunc(NloptOptimizer& o): self(o) {} + + template void operator()(int N, T& resultval) + { + resultval = self.initvals_[N]; + } + }; + + struct FunvalCopyFunc { + using D = const std::vector; + D& params; + inline explicit FunvalCopyFunc(D& p): params(p) {} + + template void operator()(int N, T& resultval) + { + resultval = params[N]; + } + }; + + /* ********************************************************************** */ + + template + static double optfunc(const std::vector& params, + std::vector& grad, + void *data) + { + auto fnptr = static_cast*>(data); + auto funval = std::tuple(); + + // copy the obtained objectfunction arguments to the funval tuple. + metaloop::apply(FunvalCopyFunc(params), funval); + + auto ret = metaloop::callFunWithTuple(*fnptr, funval, + index_sequence_for()); + + return ret; + } + + template + Result optimize(Func&& func, + std::tuple initvals, + Bound... args) + { + lower_bounds_.resize(sizeof...(Args)); + upper_bounds_.resize(sizeof...(Args)); + initvals_.resize(sizeof...(Args)); + + opt_ = nlopt::opt(alg_, sizeof...(Args) ); + + // Copy the bounds which is obtained as a parameter pack in args into + // lower_bounds_ and upper_bounds_ + metaloop::apply(BoundsFunc(*this), args...); + + opt_.set_lower_bounds(lower_bounds_); + opt_.set_upper_bounds(upper_bounds_); + + nlopt::opt localopt; + switch(opt_.get_algorithm()) { + case nlopt::GN_MLSL: + case nlopt::GN_MLSL_LDS: + localopt = nlopt::opt(method2nloptAlg(localmethod_), + sizeof...(Args)); + localopt.set_lower_bounds(lower_bounds_); + localopt.set_upper_bounds(upper_bounds_); + opt_.set_local_optimizer(localopt); + default: ; + } + + switch(this->stopcr_.type) { + case StopLimitType::ABSOLUTE: + opt_.set_ftol_abs(stopcr_.stoplimit); break; + case StopLimitType::RELATIVE: + opt_.set_ftol_rel(stopcr_.stoplimit); break; + } + + if(this->stopcr_.max_iterations > 0) + opt_.set_maxeval(this->stopcr_.max_iterations ); + + // Take care of the initial values, copy them to initvals_ + metaloop::apply(InitValFunc(*this), initvals); + + switch(dir_) { + case OptDir::MIN: + opt_.set_min_objective(optfunc, &func); break; + case OptDir::MAX: + opt_.set_max_objective(optfunc, &func); break; + } + + Result result; + + auto rescode = opt_.optimize(initvals_, result.score); + result.resultcode = static_cast(rescode); + + metaloop::apply(ResultCopyFunc(*this), result.optimum); + + return result; + } + +public: + inline explicit NloptOptimizer(nlopt::algorithm alg, + StopCriteria stopcr = {}): + Base(stopcr), alg_(alg), localmethod_(Method::L_SIMPLEX) {} + +}; + +} +} + + +#endif // NLOPT_BOILERPLATE_HPP diff --git a/xs/src/libnest2d/libnest2d/optimizers/simplex.hpp b/xs/src/libnest2d/libnest2d/optimizers/simplex.hpp new file mode 100644 index 000000000..78b09b89a --- /dev/null +++ b/xs/src/libnest2d/libnest2d/optimizers/simplex.hpp @@ -0,0 +1,20 @@ +#ifndef SIMPLEX_HPP +#define SIMPLEX_HPP + +#include "nlopt_boilerplate.hpp" + +namespace libnest2d { namespace opt { + +class SimplexOptimizer: public NloptOptimizer { +public: + inline explicit SimplexOptimizer(const StopCriteria& scr = {}): + NloptOptimizer(method2nloptAlg(Method::L_SIMPLEX), scr) {} +}; + +template<> +struct OptimizerSubclass { using Type = SimplexOptimizer; }; + +} +} + +#endif // SIMPLEX_HPP diff --git a/xs/src/libnest2d/libnest2d/optimizers/subplex.hpp b/xs/src/libnest2d/libnest2d/optimizers/subplex.hpp new file mode 100644 index 000000000..841b04057 --- /dev/null +++ b/xs/src/libnest2d/libnest2d/optimizers/subplex.hpp @@ -0,0 +1,20 @@ +#ifndef SUBPLEX_HPP +#define SUBPLEX_HPP + +#include "nlopt_boilerplate.hpp" + +namespace libnest2d { namespace opt { + +class SubplexOptimizer: public NloptOptimizer { +public: + inline explicit SubplexOptimizer(const StopCriteria& scr = {}): + NloptOptimizer(method2nloptAlg(Method::L_SUBPLEX), scr) {} +}; + +template<> +struct OptimizerSubclass { using Type = SubplexOptimizer; }; + +} +} + +#endif // SUBPLEX_HPP diff --git a/xs/src/libnest2d/libnest2d/placers/bottomleftplacer.hpp b/xs/src/libnest2d/libnest2d/placers/bottomleftplacer.hpp index d34301205..775e44e09 100644 --- a/xs/src/libnest2d/libnest2d/placers/bottomleftplacer.hpp +++ b/xs/src/libnest2d/libnest2d/placers/bottomleftplacer.hpp @@ -348,8 +348,9 @@ protected: };*/ auto reverseAddOthers = [&rsh, finish, start, &item](){ - for(size_t i = finish-1; i > start; i--) - ShapeLike::addVertex(rsh, item.vertex(i)); + for(auto i = finish-1; i > start; i--) + ShapeLike::addVertex(rsh, item.vertex( + static_cast(i))); }; // Final polygon construction... diff --git a/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp b/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp index f5701b904..7ad983b61 100644 --- a/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp +++ b/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp @@ -1,8 +1,13 @@ #ifndef NOFITPOLY_HPP #define NOFITPOLY_HPP +#ifndef NDEBUG +#include +#endif #include "placer_boilerplate.hpp" #include "../geometries_nfp.hpp" +#include +//#include namespace libnest2d { namespace strategies { @@ -17,10 +22,183 @@ struct NfpPConfig { TOP_RIGHT, }; - bool allow_rotations = false; + /// Which angles to try out for better results + std::vector rotations; + + /// Where to align the resulting packed pile Alignment alignment; + + NfpPConfig(): rotations({0.0, Pi/2.0, Pi, 3*Pi/2}), + alignment(Alignment::CENTER) {} }; +// A class for getting a point on the circumference of the polygon (in log time) +template class EdgeCache { + using Vertex = TPoint; + using Coord = TCoord; + using Edge = _Segment; + + enum Corners { + BOTTOM, + LEFT, + RIGHT, + TOP, + NUM_CORNERS + }; + + mutable std::vector corners_; + + std::vector emap_; + std::vector distances_; + double full_distance_ = 0; + + void createCache(const RawShape& sh) { + auto first = ShapeLike::cbegin(sh); + auto next = first + 1; + auto endit = ShapeLike::cend(sh); + + distances_.reserve(ShapeLike::contourVertexCount(sh)); + + while(next != endit) { + emap_.emplace_back(*(first++), *(next++)); + full_distance_ += emap_.back().length(); + distances_.push_back(full_distance_); + } + } + + void fetchCorners() const { + if(!corners_.empty()) return; + + corners_ = std::vector(NUM_CORNERS, 0.0); + + std::vector idx_ud(emap_.size(), 0); + std::vector idx_lr(emap_.size(), 0); + + std::iota(idx_ud.begin(), idx_ud.end(), 0); + std::iota(idx_lr.begin(), idx_lr.end(), 0); + + std::sort(idx_ud.begin(), idx_ud.end(), + [this](unsigned idx1, unsigned idx2) + { + const Vertex& v1 = emap_[idx1].first(); + const Vertex& v2 = emap_[idx2].first(); + auto diff = getY(v1) - getY(v2); + if(std::abs(diff) <= std::numeric_limits::epsilon()) + return getX(v1) < getX(v2); + + return diff < 0; + }); + + std::sort(idx_lr.begin(), idx_lr.end(), + [this](unsigned idx1, unsigned idx2) + { + const Vertex& v1 = emap_[idx1].first(); + const Vertex& v2 = emap_[idx2].first(); + + auto diff = getX(v1) - getX(v2); + if(std::abs(diff) <= std::numeric_limits::epsilon()) + return getY(v1) < getY(v2); + + return diff < 0; + }); + + corners_[BOTTOM] = distances_[idx_ud.front()]/full_distance_; + corners_[TOP] = distances_[idx_ud.back()]/full_distance_; + corners_[LEFT] = distances_[idx_lr.front()]/full_distance_; + corners_[RIGHT] = distances_[idx_lr.back()]/full_distance_; + } + +public: + + using iterator = std::vector::iterator; + using const_iterator = std::vector::const_iterator; + + inline EdgeCache() = default; + + inline EdgeCache(const _Item& item) + { + createCache(item.transformedShape()); + } + + inline EdgeCache(const RawShape& sh) + { + createCache(sh); + } + + /** + * @brief Get a point on the circumference of a polygon. + * @param distance A relative distance from the starting point to the end. + * Can be from 0.0 to 1.0 where 0.0 is the starting point and 1.0 is the + * closing point (which should be eqvivalent with the starting point with + * closed polygons). + * @return Returns the coordinates of the point lying on the polygon + * circumference. + */ + inline Vertex coords(double distance) { + assert(distance >= .0 && distance <= 1.0); + + // distance is from 0.0 to 1.0, we scale it up to the full length of + // the circumference + double d = distance*full_distance_; + + // Magic: we find the right edge in log time + auto it = std::lower_bound(distances_.begin(), distances_.end(), d); + auto idx = it - distances_.begin(); // get the index of the edge + auto edge = emap_[idx]; // extrac the edge + + // Get the remaining distance on the target edge + auto ed = d - (idx > 0 ? *std::prev(it) : 0 ); + auto angle = edge.angleToXaxis(); + Vertex ret = edge.first(); + + // Get the point on the edge which lies in ed distance from the start + ret += { static_cast(std::round(ed*std::cos(angle))), + static_cast(std::round(ed*std::sin(angle))) }; + + return ret; + } + + inline double circumference() const BP2D_NOEXCEPT { return full_distance_; } + + inline double corner(Corners c) const BP2D_NOEXCEPT { + assert(c < NUM_CORNERS); + fetchCorners(); + return corners_[c]; + } + + inline const std::vector& corners() const BP2D_NOEXCEPT { + fetchCorners(); + return corners_; + } + +}; + +// Nfp for a bunch of polygons. If the polygons are convex, the nfp calculated +// for trsh can be the union of nfp-s calculated with each polygon +template +Nfp::Shapes nfp(const Container& polygons, const RawShape& trsh ) +{ + using Item = _Item; + + Nfp::Shapes nfps; + + for(Item& sh : polygons) { + auto subnfp = Nfp::noFitPolygon(sh.transformedShape(), + trsh); + #ifndef NDEBUG + auto vv = ShapeLike::isValid(sh.transformedShape()); + assert(vv.first); + + auto vnfp = ShapeLike::isValid(subnfp); + assert(vnfp.first); + #endif + + nfps = Nfp::merge(nfps, subnfp); + } + + return nfps; +} + template class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer, RawShape, _Box>, NfpPConfig> { @@ -32,9 +210,30 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer, using Box = _Box>; + const double norm_; + const double penality_; + + bool static wouldFit(const RawShape& chull, const RawShape& bin) { + auto bbch = ShapeLike::boundingBox(chull); + auto bbin = ShapeLike::boundingBox(bin); + auto d = bbin.minCorner() - bbch.minCorner(); + auto chullcpy = chull; + ShapeLike::translate(chullcpy, d); + return ShapeLike::isInside(chullcpy, bbin); + } + + bool static wouldFit(const RawShape& chull, const Box& bin) + { + auto bbch = ShapeLike::boundingBox(chull); + return bbch.width() <= bin.width() && bbch.height() <= bin.height(); + } + public: - inline explicit _NofitPolyPlacer(const BinType& bin): Base(bin) {} + inline explicit _NofitPolyPlacer(const BinType& bin): + Base(bin), + norm_(std::sqrt(ShapeLike::area(bin))), + penality_(1e6*norm_) {} PackResult trypack(Item& item) { @@ -47,88 +246,148 @@ public: can_pack = item.isInside(bin_); } else { - // place the new item outside of the print bed to make sure it is - // disjuct from the current merged pile - placeOutsideOfBin(item); + double global_score = penality_; - auto trsh = item.transformedShape(); + auto initial_tr = item.translation(); + auto initial_rot = item.rotation(); + Vertex final_tr = {0, 0}; + Radians final_rot = initial_rot; Nfp::Shapes nfps; -#ifndef NDEBUG -#ifdef DEBUG_EXPORT_NFP - Base::debug_items_.clear(); -#endif - auto v = ShapeLike::isValid(trsh); - assert(v.first); -#endif - for(Item& sh : items_) { - auto subnfp = Nfp::noFitPolygon(sh.transformedShape(), - trsh); -#ifndef NDEBUG -#ifdef DEBUG_EXPORT_NFP - Base::debug_items_.emplace_back(subnfp); -#endif - auto vv = ShapeLike::isValid(sh.transformedShape()); - assert(vv.first); + for(auto rot : config_.rotations) { - auto vnfp = ShapeLike::isValid(subnfp); - assert(vnfp.first); -#endif - nfps = Nfp::merge(nfps, subnfp); - } + item.translation(initial_tr); + item.rotation(initial_rot + rot); - double min_area = std::numeric_limits::max(); - Vertex tr = {0, 0}; + // place the new item outside of the print bed to make sure + // it is disjuct from the current merged pile + placeOutsideOfBin(item); - auto iv = Nfp::referenceVertex(trsh); + auto trsh = item.transformedShape(); - // place item on each the edge of this nfp - for(auto& nfp : nfps) - ShapeLike::foreachContourVertex(nfp, [&] - (Vertex& v) - { - Coord dx = getX(v) - getX(iv); - Coord dy = getY(v) - getY(iv); + nfps = nfp(items_, trsh); + auto iv = Nfp::referenceVertex(trsh); - Item placeditem(trsh); - placeditem.translate(Vertex(dx, dy)); + auto startpos = item.translation(); - if( placeditem.isInside(bin_) ) { - Nfp::Shapes m; - m.reserve(items_.size()); + std::vector> ecache; + ecache.reserve(nfps.size()); - for(Item& pi : items_) - m.emplace_back(pi.transformedShape()); + for(auto& nfp : nfps ) ecache.emplace_back(nfp); - m.emplace_back(placeditem.transformedShape()); + auto getNfpPoint = [&ecache](double relpos) { + auto relpfloor = std::floor(relpos); + auto nfp_idx = static_cast(relpfloor); + if(nfp_idx >= ecache.size()) nfp_idx--; + auto p = relpos - relpfloor; + return ecache[nfp_idx].coords(p); + }; -// auto b = ShapeLike::boundingBox(m); - -// auto a = static_cast(std::max(b.height(), -// b.width())); - - auto b = ShapeLike::convexHull(m); - auto a = ShapeLike::area(b); - - if(a < min_area) { - can_pack = true; - min_area = a; - tr = {dx, dy}; - } + Nfp::Shapes pile; + pile.reserve(items_.size()+1); + double pile_area = 0; + for(Item& mitem : items_) { + pile.emplace_back(mitem.transformedShape()); + pile_area += mitem.area(); } - }); -#ifndef NDEBUG - for(auto&nfp : nfps) { - auto val = ShapeLike::isValid(nfp); - if(!val.first) std::cout << val.second << std::endl; -#ifdef DEBUG_EXPORT_NFP - Base::debug_items_.emplace_back(nfp); -#endif + // Our object function for placement + auto objfunc = [&] (double relpos) + { + Vertex v = getNfpPoint(relpos); + auto d = v - iv; + d += startpos; + item.translation(d); + + pile.emplace_back(item.transformedShape()); + + double occupied_area = pile_area + item.area(); + auto ch = ShapeLike::convexHull(pile); + + pile.pop_back(); + + // The pack ratio -- how much is the convex hull occupied + double pack_rate = occupied_area/ShapeLike::area(ch); + + // ratio of waste + double waste = 1.0 - pack_rate; + + // Score is the square root of waste. This will extend the + // range of good (lower) values and shring the range of bad + // (larger) values. + auto score = std::sqrt(waste); + + if(!wouldFit(ch, bin_)) score = 2*penality_ - score; + + return score; + }; + + opt::StopCriteria stopcr; + stopcr.max_iterations = 1000; + stopcr.stoplimit = 0.01; + stopcr.type = opt::StopLimitType::RELATIVE; + opt::TOptimizer solver(stopcr); + + double optimum = 0; + double best_score = penality_; + + // double max_bound = 1.0*nfps.size(); + // Genetic should look like this: + /*auto result = solver.optimize_min(objfunc, + opt::initvals(0.0), + opt::bound(0.0, max_bound) + ); + + if(result.score < penality_) { + best_score = result.score; + optimum = std::get<0>(result.optimum); + }*/ + + // Local optimization with the four polygon corners as + // starting points + for(unsigned ch = 0; ch < ecache.size(); ch++) { + auto& cache = ecache[ch]; + + std::for_each(cache.corners().begin(), + cache.corners().end(), + [ch, &solver, &objfunc, + &best_score, &optimum] + (double pos) + { + try { + auto result = solver.optimize_min(objfunc, + opt::initvals(ch+pos), + opt::bound(ch, 1.0 + ch) + ); + + if(result.score < best_score) { + best_score = result.score; + optimum = std::get<0>(result.optimum); + } + } catch(std::exception& + #ifndef NDEBUG + e + #endif + ) { + #ifndef NDEBUG + std::cerr << "ERROR " << e.what() << std::endl; + #endif + } + }); + } + + if( best_score < global_score ) { + auto d = getNfpPoint(optimum) - iv; + d += startpos; + final_tr = d; + final_rot = initial_rot + rot; + can_pack = true; + global_score = best_score; + } } -#endif - item.translate(tr); + item.translation(final_tr); + item.rotation(final_rot); } if(can_pack) { @@ -138,10 +397,13 @@ public: return ret; } -private: + ~_NofitPolyPlacer() { + Nfp::Shapes m; + m.reserve(items_.size()); + + for(Item& item : items_) m.emplace_back(item.transformedShape()); + auto&& bb = ShapeLike::boundingBox(m); - void setInitialPosition(Item& item) { - Box&& bb = item.boundingBox(); Vertex ci, cb; switch(config_.alignment) { @@ -173,11 +435,23 @@ private: } auto d = cb - ci; + for(Item& item : items_) item.translate(d); + } + +private: + + void setInitialPosition(Item& item) { + Box&& bb = item.boundingBox(); + + Vertex ci = bb.minCorner(); + Vertex cb = bin_.minCorner(); + + auto&& d = cb - ci; item.translate(d); } void placeOutsideOfBin(Item& item) { - auto bb = item.boundingBox(); + auto&& bb = item.boundingBox(); Box binbb = ShapeLike::boundingBox(bin_); Vertex v = { getX(bb.maxCorner()), getY(bb.minCorner()) }; diff --git a/xs/src/libnest2d/libnest2d/placers/placer_boilerplate.hpp b/xs/src/libnest2d/libnest2d/placers/placer_boilerplate.hpp index 338667432..9d2cb626b 100644 --- a/xs/src/libnest2d/libnest2d/placers/placer_boilerplate.hpp +++ b/xs/src/libnest2d/libnest2d/placers/placer_boilerplate.hpp @@ -12,6 +12,8 @@ template>> > class PlacerBoilerplate { + mutable bool farea_valid_ = false; + mutable double farea_ = 0.0; public: using Item = _Item; using Vertex = TPoint; @@ -39,7 +41,10 @@ public: using ItemGroup = const Container&; - inline PlacerBoilerplate(const BinType& bin): bin_(bin) {} + inline PlacerBoilerplate(const BinType& bin, unsigned cap = 50): bin_(bin) + { + items_.reserve(cap); + } inline const BinType& bin() const BP2D_NOEXCEPT { return bin_; } @@ -53,7 +58,10 @@ public: bool pack(Item& item) { auto&& r = static_cast(this)->trypack(item); - if(r) items_.push_back(*(r.item_ptr_)); + if(r) { + items_.push_back(*(r.item_ptr_)); + farea_valid_ = false; + } return r; } @@ -62,14 +70,38 @@ public: r.item_ptr_->translation(r.move_); r.item_ptr_->rotation(r.rot_); items_.push_back(*(r.item_ptr_)); + farea_valid_ = false; } } - void unpackLast() { items_.pop_back(); } + void unpackLast() { + items_.pop_back(); + farea_valid_ = false; + } inline ItemGroup getItems() const { return items_; } - inline void clearItems() { items_.clear(); } + inline void clearItems() { + items_.clear(); + farea_valid_ = false; +#ifndef NDEBUG + debug_items_.clear(); +#endif + } + + inline double filledArea() const { + if(farea_valid_) return farea_; + else { + farea_ = .0; + std::for_each(items_.begin(), items_.end(), + [this] (Item& item) { + farea_ += item.area(); + }); + farea_valid_ = true; + } + + return farea_; + } #ifndef NDEBUG std::vector debug_items_; diff --git a/xs/src/libnest2d/libnest2d/selections/djd_heuristic.hpp b/xs/src/libnest2d/libnest2d/selections/djd_heuristic.hpp index 305b3403a..2d1ca08cb 100644 --- a/xs/src/libnest2d/libnest2d/selections/djd_heuristic.hpp +++ b/xs/src/libnest2d/libnest2d/selections/djd_heuristic.hpp @@ -2,6 +2,10 @@ #define DJD_HEURISTIC_HPP #include +#include +#include +#include + #include "selection_boilerplate.hpp" namespace libnest2d { namespace strategies { @@ -13,6 +17,20 @@ namespace libnest2d { namespace strategies { template class _DJDHeuristic: public SelectionBoilerplate { using Base = SelectionBoilerplate; + + class SpinLock { + std::atomic_flag& lck_; + public: + + inline SpinLock(std::atomic_flag& flg): lck_(flg) {} + + inline void lock() { + while(lck_.test_and_set(std::memory_order_acquire)) {} + } + + inline void unlock() { lck_.clear(std::memory_order_release); } + }; + public: using typename Base::Item; using typename Base::ItemRef; @@ -21,27 +39,54 @@ public: * @brief The Config for DJD heuristic. */ struct Config { - /// Max number of bins. - unsigned max_bins = 0; /** * If true, the algorithm will try to place pair and driplets in all * possible order. */ bool try_reverse_order = true; + + /** + * The initial fill proportion of the bin area that will be filled before + * trying items one by one, or pairs or triplets. + * + * The initial fill proportion suggested by + * [López-Camacho]\ + * (http://www.cs.stir.ac.uk/~goc/papers/EffectiveHueristic2DAOR2013.pdf) + * is one third of the area of bin. + */ + double initial_fill_proportion = 1.0/3.0; + + /** + * @brief How much is the acceptable waste incremented at each iteration + */ + double waste_increment = 0.1; + + /** + * @brief Allow parallel jobs for filling multiple bins. + * + * This will decrease the soution quality but can greatly boost up + * performance for large number of items. + */ + bool allow_parallel = true; + + /** + * @brief Always use parallel processing if the items don't fit into + * one bin. + */ + bool force_parallel = false; }; private: using Base::packed_bins_; using ItemGroup = typename Base::ItemGroup; - using Container = ItemGroup;//typename std::vector; + using Container = ItemGroup; Container store_; Config config_; - // The initial fill proportion of the bin area that will be filled before - // trying items one by one, or pairs or triplets. - static const double INITIAL_FILL_PROPORTION; + static const unsigned MAX_ITEMS_SEQUENTIALLY = 30; + static const unsigned MAX_VERTICES_SEQUENTIALLY = MAX_ITEMS_SEQUENTIALLY*20; public: @@ -61,7 +106,9 @@ public: using ItemList = std::list; const double bin_area = ShapeLike::area(bin); - const double w = bin_area * 0.1; + const double w = bin_area * config_.waste_increment; + + const double INITIAL_FILL_PROPORTION = config_.initial_fill_proportion; const double INITIAL_FILL_AREA = bin_area*INITIAL_FILL_PROPORTION; store_.clear(); @@ -74,24 +121,22 @@ public: return i1.area() > i2.area(); }); - ItemList not_packed(store_.begin(), store_.end()); + size_t glob_vertex_count = 0; + std::for_each(store_.begin(), store_.end(), + [&glob_vertex_count](const Item& item) { + glob_vertex_count += item.vertexCount(); + }); std::vector placers; - double free_area = 0; - double filled_area = 0; - double waste = 0; bool try_reverse = config_.try_reverse_order; // Will use a subroutine to add a new bin - auto addBin = [this, &placers, &free_area, - &filled_area, &bin, &pconfig]() + auto addBin = [this, &placers, &bin, &pconfig]() { placers.emplace_back(bin); packed_bins_.emplace_back(); placers.back().configure(pconfig); - free_area = ShapeLike::area(bin); - filled_area = 0; }; // Types for pairs and triplets @@ -136,8 +181,11 @@ public: }; auto tryOneByOne = // Subroutine to try adding items one by one. - [¬_packed, &bin_area, &free_area, &filled_area] - (Placer& placer, double waste) + [&bin_area] + (Placer& placer, ItemList& not_packed, + double waste, + double& free_area, + double& filled_area) { double item_area = 0; bool ret = false; @@ -160,9 +208,12 @@ public: }; auto tryGroupsOfTwo = // Try adding groups of two items into the bin. - [¬_packed, &bin_area, &free_area, &filled_area, &check_pair, + [&bin_area, &check_pair, try_reverse] - (Placer& placer, double waste) + (Placer& placer, ItemList& not_packed, + double waste, + double& free_area, + double& filled_area) { double item_area = 0, largest_area = 0, smallest_area = 0; double second_largest = 0, second_smallest = 0; @@ -259,12 +310,15 @@ public: }; auto tryGroupsOfThree = // Try adding groups of three items. - [¬_packed, &bin_area, &free_area, &filled_area, + [&bin_area, &check_pair, &check_triplet, try_reverse] - (Placer& placer, double waste) + (Placer& placer, ItemList& not_packed, + double waste, + double& free_area, + double& filled_area) { - - if(not_packed.size() < 3) return false; + auto np_size = not_packed.size(); + if(np_size < 3) return false; auto it = not_packed.begin(); // from const auto endit = not_packed.end(); // to @@ -275,6 +329,10 @@ public: std::vector wrong_pairs; std::vector wrong_triplets; + auto cap = np_size*np_size / 2 ; + wrong_pairs.reserve(cap); + wrong_triplets.reserve(cap); + // Will be true if a succesfull pack can be made. bool ret = false; @@ -445,88 +503,172 @@ public: return ret; }; - addBin(); - // Safety test: try to pack each item into an empty bin. If it fails // then it should be removed from the not_packed list - { auto it = not_packed.begin(); - while (it != not_packed.end()) { + { auto it = store_.begin(); + while (it != store_.end()) { Placer p(bin); if(!p.pack(*it)) { auto itmp = it++; - not_packed.erase(itmp); + store_.erase(itmp); } else it++; } } - auto makeProgress = [this, ¬_packed](Placer& placer) { - packed_bins_.back() = placer.getItems(); + int acounter = int(store_.size()); + std::atomic_flag flg = ATOMIC_FLAG_INIT; + SpinLock slock(flg); + + auto makeProgress = [this, &acounter, &slock] + (Placer& placer, size_t idx, int packednum) + { + + packed_bins_[idx] = placer.getItems(); #ifndef NDEBUG - packed_bins_.back().insert(packed_bins_.back().end(), + packed_bins_[idx].insert(packed_bins_[idx].end(), placer.getDebugItems().begin(), placer.getDebugItems().end()); #endif - this->progress_(not_packed.size()); + // TODO here should be a spinlock + slock.lock(); + acounter -= packednum; + this->progress_(acounter); + slock.unlock(); }; - while(!not_packed.empty()) { + double items_area = 0; + for(Item& item : store_) items_area += item.area(); - auto& placer = placers.back(); + // Number of bins that will definitely be needed + auto bincount_guess = unsigned(std::ceil(items_area / bin_area)); - {// Fill the bin up to INITIAL_FILL_PROPORTION of its capacity - auto it = not_packed.begin(); + // Do parallel if feasible + bool do_parallel = config_.allow_parallel && bincount_guess > 1 && + ((glob_vertex_count > MAX_VERTICES_SEQUENTIALLY || + store_.size() > MAX_ITEMS_SEQUENTIALLY) || + config_.force_parallel); - while(it != not_packed.end() && - filled_area < INITIAL_FILL_AREA) - { - if(placer.pack(*it)) { - filled_area += it->get().area(); - free_area = bin_area - filled_area; - auto itmp = it++; - not_packed.erase(itmp); - makeProgress(placer); - } else it++; + if(do_parallel) dout() << "Parallel execution..." << "\n"; + + // The DJD heuristic algorithm itself: + auto packjob = [INITIAL_FILL_AREA, bin_area, w, + &tryOneByOne, + &tryGroupsOfTwo, + &tryGroupsOfThree, + &makeProgress] + (Placer& placer, ItemList& not_packed, size_t idx) + { + bool can_pack = true; + + double filled_area = placer.filledArea(); + double free_area = bin_area - filled_area; + double waste = .0; + + while(!not_packed.empty() && can_pack) { + + {// Fill the bin up to INITIAL_FILL_PROPORTION of its capacity + auto it = not_packed.begin(); + + while(it != not_packed.end() && + filled_area < INITIAL_FILL_AREA) + { + if(placer.pack(*it)) { + filled_area += it->get().area(); + free_area = bin_area - filled_area; + auto itmp = it++; + not_packed.erase(itmp); + makeProgress(placer, idx, 1); + } else it++; + } + } + + // try pieses one by one + while(tryOneByOne(placer, not_packed, waste, free_area, + filled_area)) { + waste = 0; + makeProgress(placer, idx, 1); + } + + // try groups of 2 pieses + while(tryGroupsOfTwo(placer, not_packed, waste, free_area, + filled_area)) { + waste = 0; + makeProgress(placer, idx, 2); + } + + // try groups of 3 pieses + while(tryGroupsOfThree(placer, not_packed, waste, free_area, + filled_area)) { + waste = 0; + makeProgress(placer, idx, 3); + } + + if(waste < free_area) waste += w; + else if(!not_packed.empty()) can_pack = false; + } + + return can_pack; + }; + + size_t idx = 0; + ItemList remaining; + + if(do_parallel) { + std::vector not_packeds(bincount_guess); + + // Preallocating the bins + for(unsigned b = 0; b < bincount_guess; b++) { + addBin(); + ItemList& not_packed = not_packeds[b]; + for(unsigned idx = b; idx < store_.size(); idx+=bincount_guess) { + not_packed.push_back(store_[idx]); } } - // try pieses one by one - while(tryOneByOne(placer, waste)) { - waste = 0; - makeProgress(placer); + // The parallel job + auto job = [&placers, ¬_packeds, &packjob](unsigned idx) { + Placer& placer = placers[idx]; + ItemList& not_packed = not_packeds[idx]; + return packjob(placer, not_packed, idx); + }; + + // We will create jobs for each bin + std::vector> rets(bincount_guess); + + for(unsigned b = 0; b < bincount_guess; b++) { // launch the jobs + rets[b] = std::async(std::launch::async, job, b); } - // try groups of 2 pieses - while(tryGroupsOfTwo(placer, waste)) { - waste = 0; - makeProgress(placer); + for(unsigned fi = 0; fi < rets.size(); ++fi) { + rets[fi].wait(); + + // Collect remaining items while waiting for the running jobs + remaining.merge( not_packeds[fi], [](Item& i1, Item& i2) { + return i1.area() > i2.area(); + }); + } - // try groups of 3 pieses - while(tryGroupsOfThree(placer, waste)) { - waste = 0; - makeProgress(placer); + idx = placers.size(); + + // Try to put the remaining items into one of the packed bins + if(remaining.size() <= placers.size()) + for(size_t j = 0; j < idx && !remaining.empty(); j++) { + packjob(placers[j], remaining, j); } - if(waste < free_area) waste += w; - else if(!not_packed.empty()) addBin(); + } else { + remaining = ItemList(store_.begin(), store_.end()); + } + + while(!remaining.empty()) { + addBin(); + packjob(placers[idx], remaining, idx); idx++; } -// std::for_each(placers.begin(), placers.end(), -// [this](Placer& placer){ -// packed_bins_.push_back(placer.getItems()); -// }); } }; -/* - * The initial fill proportion suggested by - * [López-Camacho]\ - * (http://www.cs.stir.ac.uk/~goc/papers/EffectiveHueristic2DAOR2013.pdf) - * is one third of the area of bin. - */ -template -const double _DJDHeuristic::INITIAL_FILL_PROPORTION = 1.0/3.0; - } } diff --git a/xs/src/libnest2d/libnest2d/selections/filler.hpp b/xs/src/libnest2d/libnest2d/selections/filler.hpp index 96c5da4a1..94e30fd5b 100644 --- a/xs/src/libnest2d/libnest2d/selections/filler.hpp +++ b/xs/src/libnest2d/libnest2d/selections/filler.hpp @@ -33,7 +33,17 @@ public: store_.clear(); store_.reserve(last-first); - packed_bins_.clear(); + packed_bins_.emplace_back(); + + auto makeProgress = [this](PlacementStrategyLike& placer) { + packed_bins_.back() = placer.getItems(); +#ifndef NDEBUG + packed_bins_.back().insert(packed_bins_.back().end(), + placer.getDebugItems().begin(), + placer.getDebugItems().end()); +#endif + this->progress_(packed_bins_.back().size()); + }; std::copy(first, last, std::back_inserter(store_)); @@ -50,18 +60,22 @@ public: PlacementStrategyLike placer(bin); placer.configure(pconfig); - bool was_packed = false; - for(auto& item : store_ ) { - if(!placer.pack(item)) { - packed_bins_.push_back(placer.getItems()); + auto it = store_.begin(); + while(it != store_.end()) { + if(!placer.pack(*it)) { + if(packed_bins_.back().empty()) ++it; + makeProgress(placer); placer.clearItems(); - was_packed = placer.pack(item); - } else was_packed = true; + packed_bins_.emplace_back(); + } else { + makeProgress(placer); + ++it; + } } - if(was_packed) { - packed_bins_.push_back(placer.getItems()); - } +// if(was_packed) { +// packed_bins_.push_back(placer.getItems()); +// } } }; diff --git a/xs/src/libnest2d/tests/main.cpp b/xs/src/libnest2d/tests/main.cpp index 633fe0c97..20dab3529 100644 --- a/xs/src/libnest2d/tests/main.cpp +++ b/xs/src/libnest2d/tests/main.cpp @@ -1,6 +1,8 @@ #include -#include #include +#include + +//#define DEBUG_EXPORT_NFP #include #include @@ -8,6 +10,8 @@ #include "printer_parts.h" #include "benchmark.h" #include "svgtools.hpp" +//#include +//#include using namespace libnest2d; using ItemGroup = std::vector>; @@ -36,51 +40,122 @@ std::vector& stegoParts() { void arrangeRectangles() { using namespace libnest2d; - auto input = stegoParts(); - const int SCALE = 1000000; + std::vector rects = { + {80*SCALE, 80*SCALE}, + {60*SCALE, 90*SCALE}, + {70*SCALE, 30*SCALE}, + {80*SCALE, 60*SCALE}, + {60*SCALE, 60*SCALE}, + {60*SCALE, 40*SCALE}, + {40*SCALE, 40*SCALE}, + {10*SCALE, 10*SCALE}, + {10*SCALE, 10*SCALE}, + {10*SCALE, 10*SCALE}, + {10*SCALE, 10*SCALE}, + {10*SCALE, 10*SCALE}, + {5*SCALE, 5*SCALE}, + {5*SCALE, 5*SCALE}, + {5*SCALE, 5*SCALE}, + {5*SCALE, 5*SCALE}, + {5*SCALE, 5*SCALE}, + {5*SCALE, 5*SCALE}, + {5*SCALE, 5*SCALE}, + {20*SCALE, 20*SCALE} + }; - Box bin(210*SCALE, 250*SCALE); +// std::vector rects = { +// {20*SCALE, 10*SCALE}, +// {20*SCALE, 10*SCALE}, +// {20*SCALE, 20*SCALE}, +// }; - Coord min_obj_distance = 0; //6*SCALE; +// std::vector input { +// {{0, 0}, {0, 20*SCALE}, {10*SCALE, 0}, {0, 0}} +// }; - NfpPlacer::Config pconf; - pconf.alignment = NfpPlacer::Config::Alignment::TOP_LEFT; - Arranger arrange(bin, min_obj_distance, pconf); + std::vector input; + input.insert(input.end(), prusaParts().begin(), prusaParts().end()); +// input.insert(input.end(), stegoParts().begin(), stegoParts().end()); +// input.insert(input.end(), rects.begin(), rects.end()); -// arrange.progressIndicator([&arrange, &bin](unsigned r){ + Box bin(250*SCALE, 210*SCALE); + + Coord min_obj_distance = 6*SCALE; + + using Packer = Arranger; + + Packer::PlacementConfig pconf; + pconf.alignment = NfpPlacer::Config::Alignment::CENTER; +// pconf.rotations = {0.0, Pi/2.0, Pi, 3*Pi/2}; + Packer::SelectionConfig sconf; + sconf.allow_parallel = true; + sconf.force_parallel = false; + sconf.try_reverse_order = false; + Packer arrange(bin, min_obj_distance, pconf, sconf); + + arrange.progressIndicator([&](unsigned r){ // svg::SVGWriter::Config conf; // conf.mm_in_coord_units = SCALE; // svg::SVGWriter svgw(conf); // svgw.setSize(bin); // svgw.writePackGroup(arrange.lastResult()); -// svgw.save("out"); -// std::cout << "Remaining items: " << r << std::endl; -// }); +// svgw.save("debout"); + std::cout << "Remaining items: " << r << std::endl; + }).useMinimumBoundigBoxRotation(); Benchmark bench; bench.start(); - auto result = arrange(input.begin(), + auto result = arrange.arrange(input.begin(), input.end()); bench.stop(); - std::cout << bench.getElapsedSec() << std::endl; + std::vector eff; + eff.reserve(result.size()); + + auto bin_area = double(bin.height()*bin.width()); + for(auto& r : result) { + double a = 0; + std::for_each(r.begin(), r.end(), [&a] (Item& e ){ a += e.area(); }); + eff.emplace_back(a/bin_area); + }; + + std::cout << bench.getElapsedSec() << " bin count: " << result.size() + << std::endl; + + std::cout << "Bin efficiency: ("; + for(double e : eff) std::cout << e*100.0 << "% "; + std::cout << ") Average: " + << std::accumulate(eff.begin(), eff.end(), 0.0)*100.0/result.size() + << " %" << std::endl; + + std::cout << "Bin usage: ("; + unsigned total = 0; + for(auto& r : result) { std::cout << r.size() << " "; total += r.size(); } + std::cout << ") Total: " << total << std::endl; for(auto& it : input) { auto ret = ShapeLike::isValid(it.transformedShape()); std::cout << ret.second << std::endl; } + if(total != input.size()) std::cout << "ERROR " << "could not pack " + << input.size() - total << " elements!" + << std::endl; + svg::SVGWriter::Config conf; conf.mm_in_coord_units = SCALE; svg::SVGWriter svgw(conf); svgw.setSize(bin); svgw.writePackGroup(result); +// std::for_each(input.begin(), input.end(), [&svgw](Item& item){ svgw.writeItem(item);}); svgw.save("out"); } + + int main(void /*int argc, char **argv*/) { arrangeRectangles(); // findDegenerateCase(); diff --git a/xs/src/libnest2d/tests/printer_parts.cpp b/xs/src/libnest2d/tests/printer_parts.cpp index 13bc627ad..6d36bc1cd 100644 --- a/xs/src/libnest2d/tests/printer_parts.cpp +++ b/xs/src/libnest2d/tests/printer_parts.cpp @@ -3,596 +3,594 @@ const TestData PRINTER_PART_POLYGONS = { { - {120000000, 113954048}, - {130000000, 113954048}, - {130000000, 104954048}, - {129972610, 104431449}, - {128500000, 96045951}, - {121500000, 96045951}, - {120027389, 104431449}, - {120000000, 104954048}, - {120000000, 113954048}, + {-5000000, 8954050}, + {5000000, 8954050}, + {5000000, -45949}, + {4972609, -568550}, + {3500000, -8954050}, + {-3500000, -8954050}, + {-4972609, -568550}, + {-5000000, -45949}, + {-5000000, 8954050}, }, { - {61250000, 97000000}, - {70250000, 151000000}, - {175750000, 151000000}, - {188750000, 138000000}, - {188750000, 59000000}, - {70250000, 59000000}, - {61250000, 77000000}, - {61250000, 97000000}, + {-63750000, -8000000}, + {-54750000, 46000000}, + {50750000, 46000000}, + {63750000, 33000000}, + {63750000, -46000000}, + {-54750000, -46000000}, + {-63750000, -28000000}, + {-63750000, -8000000}, }, { - {72250000, 146512344}, - {93750000, 150987655}, - {177750000, 150987655}, - {177750000, 59012348}, - {72250000, 59012348}, - {72250000, 146512344}, + {-52750000, 41512348}, + {-31250000, 45987651}, + {52750000, 45987651}, + {52750000, -45987651}, + {-52750000, -45987651}, + {-52750000, 41512348}, }, { - {121099998, 119000000}, - {122832046, 119000000}, - {126016967, 113483596}, - {126721450, 112263397}, - {128828536, 108613792}, - {128838806, 108582153}, - {128871566, 108270568}, - {128899993, 108000000}, - {128500000, 102000000}, - {128447555, 101501014}, - {128292510, 101023834}, - {128100006, 100487052}, - {126030128, 96901916}, - {122622650, 91000000}, - {121099998, 91000000}, - {121099998, 119000000}, + {-3900000, 14000000}, + {-2167950, 14000000}, + {1721454, 7263400}, + {3828529, 3613790}, + {3838809, 3582149}, + {3871560, 3270569}, + {3900000, 3000000}, + {3500000, -3000000}, + {3471560, -3270565}, + {3447549, -3498986}, + {3292510, -3976167}, + {3099999, -4512949}, + {2530129, -5500000}, + {807565, -8483570}, + {-2377349, -14000000}, + {-3900000, -14000000}, + {-3900000, 14000000}, }, { - {93250000, 104000000}, - {99750000, 145500000}, - {106750000, 152500000}, - {135750000, 152500000}, - {141750000, 146500000}, - {156750000, 68000000}, - {156750000, 61142101}, - {156659606, 61051700}, - {153107894, 57500000}, - {143392105, 57500000}, - {104250000, 58500000}, - {93250000, 101000000}, - {93250000, 104000000}, + {-31750000, -1000000}, + {-25250000, 40500000}, + {-18250000, 47500000}, + {10750000, 47500000}, + {16750000, 41500000}, + {31750000, -37000000}, + {31750000, -43857898}, + {28107900, -47500000}, + {18392099, -47500000}, + {-20750000, -46500000}, + {-31750000, -4000000}, + {-31750000, -1000000}, }, { - {90375000, 90734603}, - {114074996, 129875000}, - {158324996, 129875000}, - {162574996, 125625000}, - {162574996, 122625000}, - {151574996, 80125000}, - {116074996, 80125000}, - {90375000, 80515396}, - {87425003, 85625000}, - {90375000, 90734603}, + {-34625000, -14265399}, + {-10924999, 24875000}, + {33325000, 24875000}, + {37575000, 20625000}, + {37575000, 17625000}, + {26575000, -24875000}, + {-8924999, -24875000}, + {-34625000, -24484600}, + {-37575000, -19375000}, + {-34625000, -14265399}, }, { - {111000000, 114000000}, - {114000000, 122000000}, - {139000000, 122000000}, - {139000000, 88000000}, - {114000000, 88000000}, - {111000000, 97000000}, - {111000000, 114000000}, + {-14000000, 9000000}, + {-11000000, 17000000}, + {14000000, 17000000}, + {14000000, -17000000}, + {-11000000, -17000000}, + {-14000000, -8000000}, + {-14000000, 9000000}, }, { - {119699996, 107227401}, - {124762199, 110150001}, - {130300003, 110150001}, - {130300003, 105650001}, - {129699996, 99850006}, - {119699996, 99850006}, - {119699996, 107227401}, + {-5300000, 2227401}, + {-237800, 5150001}, + {5299999, 5150001}, + {5299999, 650001}, + {4699999, -5149997}, + {-5300000, -5149997}, + {-5300000, 2227401}, }, { - {113000000, 123000000}, - {137000000, 123000000}, - {137000000, 87000000}, - {113000000, 87000000}, - {113000000, 123000000}, + {-12000000, 18000000}, + {12000000, 18000000}, + {12000000, -18000000}, + {-12000000, -18000000}, + {-12000000, 18000000}, }, { - {107000000, 104000000}, - {110000000, 127000000}, - {114000000, 131000000}, - {136000000, 131000000}, - {140000000, 127000000}, - {143000000, 104000000}, - {143000000, 79000000}, - {107000000, 79000000}, - {107000000, 104000000}, + {-18000000, -1000000}, + {-15000000, 22000000}, + {-11000000, 26000000}, + {11000000, 26000000}, + {15000000, 22000000}, + {18000000, -1000000}, + {18000000, -26000000}, + {-18000000, -26000000}, + {-18000000, -1000000}, }, { - {47500000, 135000000}, - {52500000, 140000000}, - {197500000, 140000000}, - {202500000, 135000000}, - {202500000, 72071098}, - {200428894, 70000000}, - {49571098, 70000000}, - {48570396, 71000701}, - {47500000, 72071098}, - {47500000, 135000000}, + {-77500000, 30000000}, + {-72500000, 35000000}, + {72500000, 35000000}, + {77500000, 30000000}, + {77500000, -32928901}, + {75428901, -35000000}, + {-75428901, -35000000}, + {-77500000, -32928901}, + {-77500000, 30000000}, }, { - {115054779, 101934379}, - {115218521, 102968223}, - {115489440, 103979270}, - {115864547, 104956466}, - {122900001, 119110900}, - {127099998, 119110900}, - {134135452, 104956466}, - {134510559, 103979270}, - {134781478, 102968223}, - {134945220, 101934379}, - {135000000, 100889099}, - {134945220, 99843818}, - {134781478, 98809982}, - {134510559, 97798927}, - {134135452, 96821731}, - {133660247, 95889099}, - {133090164, 95011245}, - {132431457, 94197792}, - {131691314, 93457649}, - {130877853, 92798927}, - {130000000, 92228851}, - {129067367, 91753646}, - {128090164, 91378540}, - {127079116, 91107620}, - {126045280, 90943878}, - {125000000, 90889099}, - {123954719, 90943878}, - {122920883, 91107620}, - {121909828, 91378540}, - {120932632, 91753646}, - {120000000, 92228851}, - {119122146, 92798927}, - {118308692, 93457649}, - {117568550, 94197792}, - {116909828, 95011245}, - {116339752, 95889099}, - {115864547, 96821731}, - {115489440, 97798927}, - {115218521, 98809982}, - {115054779, 99843818}, - {115000000, 100889099}, - {115054779, 101934379}, + {-9945219, -3065619}, + {-9781479, -2031780}, + {-9510560, -1020730}, + {-9135450, -43529}, + {-2099999, 14110899}, + {2099999, 14110899}, + {9135450, -43529}, + {9510560, -1020730}, + {9781479, -2031780}, + {9945219, -3065619}, + {10000000, -4110899}, + {9945219, -5156179}, + {9781479, -6190019}, + {9510560, -7201069}, + {9135450, -8178270}, + {8660249, -9110899}, + {8090169, -9988750}, + {7431449, -10802209}, + {6691309, -11542349}, + {5877850, -12201069}, + {5000000, -12771149}, + {4067369, -13246350}, + {3090169, -13621459}, + {2079119, -13892379}, + {1045279, -14056119}, + {0, -14110899}, + {-1045279, -14056119}, + {-2079119, -13892379}, + {-3090169, -13621459}, + {-4067369, -13246350}, + {-5000000, -12771149}, + {-5877850, -12201069}, + {-6691309, -11542349}, + {-7431449, -10802209}, + {-8090169, -9988750}, + {-8660249, -9110899}, + {-9135450, -8178270}, + {-9510560, -7201069}, + {-9781479, -6190019}, + {-9945219, -5156179}, + {-10000000, -4110899}, + {-9945219, -3065619}, }, { - {90807601, 99807609}, - {93500000, 144000000}, - {116816207, 152669006}, - {118230407, 152669006}, - {120351806, 150547698}, - {159192398, 111707107}, - {159192398, 110192390}, - {156500000, 66000000}, - {133183807, 57331001}, - {131769607, 57331001}, - {129648208, 59452301}, - {92525100, 96575378}, - {90807601, 98292892}, - {90807601, 99807609}, + {-34192394, -5192389}, + {-31499996, 39000000}, + {-8183795, 47668998}, + {-6769596, 47668998}, + {-4648197, 45547698}, + {34192394, 6707109}, + {34192394, 5192389}, + {31500003, -39000000}, + {8183803, -47668998}, + {6769603, -47668998}, + {4648202, -45547698}, + {-32474895, -8424619}, + {-34192394, -6707109}, + {-34192394, -5192389}, }, { - {101524497, 93089904}, - {107000000, 113217697}, - {113860298, 125099998}, - {114728599, 125900001}, - {134532012, 125900001}, - {136199996, 125099998}, - {143500000, 113599998}, - {148475494, 93089904}, - {148800003, 90099998}, - {148706604, 89211097}, - {148668899, 88852500}, - {148281295, 87659599}, - {147654098, 86573303}, - {146814804, 85641098}, - {145800003, 84903800}, - {144654098, 84393699}, - {143427200, 84132904}, - {142800003, 84099998}, - {107199996, 84099998}, - {106572799, 84132904}, - {105345901, 84393699}, - {104199996, 84903800}, - {103185195, 85641098}, - {102345901, 86573303}, - {101718704, 87659599}, - {101331100, 88852500}, - {101199996, 90099998}, - {101524497, 93089904}, + {-23475500, -11910099}, + {-18000000, 8217699}, + {-11139699, 20100000}, + {-10271400, 20899999}, + {9532010, 20899999}, + {11199999, 20100000}, + {18500000, 8600000}, + {23475500, -11910099}, + {23799999, -14899999}, + {23706600, -15788900}, + {23668899, -16147499}, + {23281299, -17340400}, + {22654100, -18426700}, + {21814800, -19358900}, + {20799999, -20096199}, + {19654100, -20606300}, + {18427200, -20867099}, + {17799999, -20899999}, + {-17799999, -20899999}, + {-18427200, -20867099}, + {-19654100, -20606300}, + {-20799999, -20096199}, + {-21814800, -19358900}, + {-22654100, -18426700}, + {-23281299, -17340400}, + {-23668899, -16147499}, + {-23799999, -14899999}, + {-23475500, -11910099}, }, { - {93000000, 115000000}, - {93065559, 115623733}, - {93259361, 116220207}, - {93572952, 116763359}, - {93992614, 117229431}, - {94500000, 117598083}, - {95072952, 117853172}, - {95686416, 117983566}, - {141000000, 121000000}, - {151000000, 121000000}, - {156007400, 117229431}, - {156427093, 116763359}, - {156740600, 116220207}, - {156934402, 115623733}, - {157000000, 115000000}, - {157000000, 92000000}, - {156934402, 91376296}, - {156740600, 90779800}, - {156427093, 90236602}, - {156007400, 89770599}, - {155500000, 89401901}, - {154927093, 89146797}, - {154313598, 89016403}, - {154000000, 89000000}, - {97000000, 89000000}, - {95686416, 89016403}, - {95072952, 89146797}, - {94500000, 89401901}, - {93992614, 89770599}, - {93572952, 90236602}, - {93259361, 90779800}, - {93065559, 91376296}, - {93000000, 92000000}, - {93000000, 115000000}, + {-32000000, 10000000}, + {-31934440, 10623733}, + {-31740640, 11220210}, + {-31427049, 11763360}, + {-31007389, 12229430}, + {-30500000, 12598079}, + {-29927051, 12853170}, + {-29313585, 12983570}, + {16000000, 16000000}, + {26000000, 16000000}, + {31007400, 12229430}, + {31427101, 11763360}, + {31740600, 11220210}, + {31934398, 10623733}, + {32000000, 10000000}, + {32000000, -13000000}, + {31934398, -13623699}, + {31740600, -14220199}, + {31427101, -14763399}, + {31007400, -15229400}, + {30500000, -15598100}, + {29927101, -15853200}, + {29313598, -15983600}, + {29000000, -16000000}, + {-28000000, -16000000}, + {-29313585, -15983600}, + {-29927051, -15853200}, + {-30500000, -15598100}, + {-31007389, -15229400}, + {-31427049, -14763399}, + {-31740640, -14220199}, + {-31934440, -13623699}, + {-32000000, -13000000}, + {-32000000, 10000000}, }, { - {88866210, 58568977}, - {88959899, 58828182}, - {89147277, 59346588}, - {127200073, 164616485}, - {137112792, 192039184}, - {139274505, 198019332}, - {139382049, 198291641}, - {139508483, 198563430}, - {139573425, 198688369}, - {139654052, 198832443}, - {139818634, 199096328}, - {139982757, 199327621}, - {140001708, 199352630}, - {140202392, 199598999}, - {140419342, 199833160}, - {140497497, 199910552}, - {140650848, 200053039}, - {140894866, 200256866}, - {141104309, 200412185}, - {141149047, 200443206}, - {141410888, 200611038}, - {141677795, 200759750}, - {141782348, 200812332}, - {141947143, 200889144}, - {142216400, 200999465}, - {142483123, 201091293}, - {142505554, 201098251}, - {142745178, 201165542}, - {143000671, 201223373}, - {143245880, 201265884}, - {143484039, 201295257}, - {143976715, 201319580}, - {156135131, 201319580}, - {156697082, 201287902}, - {156746368, 201282104}, - {157263000, 201190719}, - {157338623, 201172576}, - {157821411, 201026641}, - {157906188, 200995391}, - {158360565, 200797012}, - {158443420, 200754882}, - {158869171, 200505874}, - {158900756, 200485122}, - {159136413, 200318618}, - {159337127, 200159790}, - {159377288, 200125930}, - {159619628, 199905410}, - {159756286, 199767364}, - {159859008, 199656143}, - {160090606, 199378067}, - {160120849, 199338546}, - {160309295, 199072113}, - {160434875, 198871475}, - {160510070, 198740310}, - {160688232, 198385772}, - {160699096, 198361679}, - {160839782, 198012557}, - {160905487, 197817459}, - {160961578, 197625488}, - {161048004, 197249023}, - {161051574, 197229934}, - {161108856, 196831405}, - {161122985, 196667816}, - {161133789, 196435317}, - {161129669, 196085830}, - {161127685, 196046661}, - {161092742, 195669830}, - {161069946, 195514739}, - {161031829, 195308425}, - {160948211, 194965225}, - {159482635, 189756820}, - {152911407, 166403976}, - {145631286, 140531890}, - {119127441, 46342559}, - {110756378, 16593490}, - {110423187, 15409400}, - {109578002, 12405799}, - {109342315, 11568267}, - {108961059, 11279479}, - {108579803, 10990692}, - {107817291, 10413124}, - {106165161, 9161727}, - {105529724, 8680419}, - {103631866, 8680419}, - {102236145, 8680465}, - {95257537, 8680725}, - {92466064, 8680831}, - {88866210, 50380981}, - {88866210, 58568977}, + {-36133789, -46431022}, + {-36040100, -46171817}, + {-35852722, -45653411}, + {2200073, 59616485}, + {12112792, 87039184}, + {14274505, 93019332}, + {14382049, 93291641}, + {14508483, 93563430}, + {14573425, 93688369}, + {14654052, 93832443}, + {14818634, 94096328}, + {14982757, 94327621}, + {15001708, 94352630}, + {15202392, 94598999}, + {15419342, 94833160}, + {15497497, 94910552}, + {15650848, 95053039}, + {15894866, 95256866}, + {16104309, 95412185}, + {16149047, 95443206}, + {16410888, 95611038}, + {16677795, 95759750}, + {16782348, 95812332}, + {16947143, 95889144}, + {17216400, 95999465}, + {17483123, 96091293}, + {17505554, 96098251}, + {17745178, 96165542}, + {18000671, 96223373}, + {18245880, 96265884}, + {18484039, 96295257}, + {18976715, 96319580}, + {31135131, 96319580}, + {31697082, 96287902}, + {31746368, 96282104}, + {32263000, 96190719}, + {32338623, 96172576}, + {32821411, 96026641}, + {32906188, 95995391}, + {33360565, 95797012}, + {33443420, 95754882}, + {33869171, 95505874}, + {33900756, 95485122}, + {34136413, 95318618}, + {34337127, 95159790}, + {34377288, 95125930}, + {34619628, 94905410}, + {34756286, 94767364}, + {34859008, 94656143}, + {35090606, 94378067}, + {35120849, 94338546}, + {35309295, 94072113}, + {35434875, 93871475}, + {35510070, 93740310}, + {35688232, 93385772}, + {35699096, 93361679}, + {35839782, 93012557}, + {35905487, 92817459}, + {35961578, 92625488}, + {36048004, 92249023}, + {36051574, 92229934}, + {36108856, 91831405}, + {36122985, 91667816}, + {36133789, 91435317}, + {36129669, 91085830}, + {36127685, 91046661}, + {36092742, 90669830}, + {36069946, 90514739}, + {36031829, 90308425}, + {35948211, 89965225}, + {34482635, 84756820}, + {27911407, 61403976}, + {-5872558, -58657440}, + {-14243621, -88406509}, + {-14576812, -89590599}, + {-15421997, -92594200}, + {-15657684, -93431732}, + {-16038940, -93720520}, + {-16420196, -94009307}, + {-17182708, -94586875}, + {-18834838, -95838272}, + {-19470275, -96319580}, + {-21368133, -96319580}, + {-22763854, -96319534}, + {-29742462, -96319274}, + {-32533935, -96319168}, + {-36133789, -54619018}, + {-36133789, -46431022}, }, { - {99000000, 130500000}, - {101070701, 132570709}, - {118500000, 150000000}, - {142500000, 150000000}, - {151000000, 141500000}, - {151000000, 86000000}, - {150949996, 80500000}, - {142000000, 62785301}, - {139300003, 60000000}, - {110699996, 60000000}, - {107500000, 63285301}, - {101599998, 80500000}, - {99000000, 94535995}, - {99000000, 130500000}, + {-26000000, 25500000}, + {-6500000, 45000000}, + {17499998, 45000000}, + {23966310, 38533699}, + {26000000, 36500000}, + {26000000, -19000000}, + {25950000, -24500000}, + {17000000, -42214698}, + {14300000, -45000000}, + {-14299999, -45000000}, + {-17500000, -41714698}, + {-23400001, -24500000}, + {-26000000, -10464000}, + {-26000000, 25500000}, }, { - {99000000, 121636100}, - {99927795, 123777801}, - {108500000, 140300003}, - {109949996, 141750000}, - {138550003, 141750000}, - {140000000, 140300003}, - {151000000, 121045196}, - {151000000, 102250000}, - {141500000, 70492095}, - {139257904, 68250000}, - {110742095, 68250000}, - {108500000, 70492095}, - {99000000, 102250000}, - {99000000, 121636100}, + {-26000000, 16636100}, + {-25072200, 18777799}, + {-16500000, 35299999}, + {-15050000, 36750000}, + {13550000, 36750000}, + {15000000, 35299999}, + {26000000, 16045200}, + {26000000, -2750000}, + {16500000, -34507900}, + {14840600, -36167301}, + {14257900, -36750000}, + {-14257900, -36750000}, + {-16500000, -34507900}, + {-26000000, -2750000}, + {-26000000, 16636100}, }, { - {106937652, 123950103}, - {129644943, 125049896}, - {131230361, 125049896}, - {132803283, 124851196}, - {134338897, 124456901}, - {135812988, 123873298}, - {137202316, 123109497}, - {138484954, 122177597}, - {139640670, 121092300}, - {140651245, 119870697}, - {141500747, 118532104}, - {142175842, 117097595}, - {142665756, 115589698}, - {142962844, 114032402}, - {143062347, 112450103}, - {142962844, 110867797}, - {140810745, 93992263}, - {140683746, 93272232}, - {140506851, 92562797}, - {140280929, 91867439}, - {140007034, 91189529}, - {139686523, 90532394}, - {139320953, 89899200}, - {138912094, 89293052}, - {138461959, 88716903}, - {137972732, 88173553}, - {137446792, 87665664}, - {136886703, 87195693}, - {136295196, 86765930}, - {135675155, 86378479}, - {135029586, 86035232}, - {134361648, 85737854}, - {133674606, 85487777}, - {132971786, 85286300}, - {132256607, 85134201}, - {131532592, 85032501}, - {130803222, 84981498}, - {130437652, 84975097}, - {123937652, 84950103}, - {108437652, 84950103}, - {106937652, 86450103}, - {106937652, 123950103}, + {-18062349, 18950099}, + {4644938, 20049900}, + {6230361, 20049900}, + {7803279, 19851200}, + {9338899, 19456899}, + {10812990, 18873300}, + {12202310, 18109500}, + {13484951, 17177600}, + {14640670, 16092300}, + {15651250, 14870700}, + {16500749, 13532100}, + {17175849, 12097599}, + {17665750, 10589700}, + {17962850, 9032400}, + {18062349, 7450099}, + {17962850, 5867799}, + {15810750, -11007740}, + {15683750, -11727769}, + {15506849, -12437200}, + {15280929, -13132559}, + {15007040, -13810470}, + {14686531, -14467609}, + {14320949, -15100799}, + {13912099, -15706950}, + {13461959, -16283100}, + {12972730, -16826450}, + {12446790, -17334339}, + {11886699, -17804309}, + {11295190, -18234069}, + {10675149, -18621520}, + {10029590, -18964771}, + {9361650, -19262149}, + {8674600, -19512220}, + {7971780, -19713699}, + {7256609, -19865798}, + {6532589, -19967498}, + {5803222, -20018501}, + {5437650, -20024900}, + {-1062349, -20049900}, + {-16562349, -20049900}, + {-18062349, -18549900}, + {-18062349, 18950099}, }, { - {106937652, 146299896}, - {123937652, 146299896}, - {140280929, 96882560}, - {140506851, 96187202}, - {140683746, 95477767}, - {140810745, 94757736}, - {142962844, 77882202}, - {143062347, 76299896}, - {142962844, 74717597}, - {142665756, 73160301}, - {142175842, 71652404}, - {141500747, 70217895}, - {140651245, 68879302}, - {139640670, 67657699}, - {138484954, 66572402}, - {137202316, 65640502}, - {135812988, 64876701}, - {134338897, 64293098}, - {132803283, 63898799}, - {131230361, 63700099}, - {129644943, 63700099}, - {106937652, 64799896}, - {106937652, 146299896}, + {-18062349, 41299900}, + {-1062349, 41299900}, + {15280929, -8117440}, + {15506849, -8812799}, + {15683750, -9522230}, + {15810750, -10242259}, + {17962850, -27117799}, + {18062349, -28700099}, + {17962850, -30282400}, + {17665750, -31839700}, + {17175849, -33347599}, + {16500749, -34782100}, + {15651250, -36120700}, + {14640670, -37342300}, + {13484951, -38427600}, + {12202310, -39359500}, + {10812990, -40123298}, + {9338899, -40706901}, + {7803279, -41101200}, + {6230361, -41299900}, + {4644938, -41299900}, + {-18062349, -40200099}, + {-18062349, 41299900}, }, { - {113250000, 118057899}, - {115192138, 120000000}, - {129392135, 129000000}, - {136750000, 129000000}, - {136750000, 81000000}, - {129392135, 81000000}, - {115192138, 90000000}, - {113250000, 91942100}, - {113250000, 118057899}, + {-11750000, 13057900}, + {-9807860, 15000000}, + {4392139, 24000000}, + {11750000, 24000000}, + {11750000, -24000000}, + {4392139, -24000000}, + {-9807860, -15000000}, + {-11750000, -13057900}, + {-11750000, 13057900}, }, { - {112500000, 122500000}, - {137500000, 122500000}, - {137500000, 87500000}, - {112500000, 87500000}, - {112500000, 122500000}, + {-12500000, 17500000}, + {12500000, 17500000}, + {12500000, -17500000}, + {-12500000, -17500000}, + {-12500000, 17500000}, }, { - {101500000, 116500000}, - {111142143, 126000000}, - {114000000, 126000000}, - {143500000, 105500000}, - {148500000, 100500000}, - {148500000, 85500000}, - {147000000, 84000000}, - {101500000, 84000000}, - {101500000, 116500000}, + {-23500000, 11500000}, + {-13857859, 21000000}, + {-11000000, 21000000}, + {18500000, 500000}, + {23500000, -4500000}, + {23500000, -19500000}, + {22000000, -21000000}, + {-23500000, -21000000}, + {-23500000, 11500000}, }, { - {112000000, 110250000}, - {121000000, 111750000}, - {129000000, 111750000}, - {138000000, 110250000}, - {138000000, 105838462}, - {136376296, 103026062}, - {135350906, 101250000}, - {133618804, 98250000}, - {116501708, 98250000}, - {112000000, 106047180}, - {112000000, 110250000}, + {-13000000, 5250000}, + {-4000000, 6750000}, + {4000000, 6750000}, + {13000000, 5250000}, + {13000000, 838459}, + {11376299, -1973939}, + {10350899, -3750000}, + {8618800, -6750000}, + {-8498290, -6750000}, + {-13000000, 1047180}, + {-13000000, 5250000}, }, { - {100000000, 155500000}, - {103500000, 159000000}, - {143286804, 159000000}, - {150000000, 152286804}, - {150000000, 57713199}, - {143397705, 51110900}, - {143286804, 51000000}, - {103500000, 51000000}, - {100000000, 54500000}, - {100000000, 155500000}, + {-25000000, 50500000}, + {-21500000, 54000000}, + {18286800, 54000000}, + {25000000, 47286800}, + {25000000, -47286800}, + {18286800, -54000000}, + {-21500000, -54000000}, + {-25000000, -50500000}, + {-25000000, 50500000}, }, { - {106000000, 151000000}, - {108199996, 151000000}, - {139000000, 139000000}, - {144000000, 134000000}, - {144000000, 76000000}, - {139000000, 71000000}, - {108199996, 59000000}, - {106000000, 59000000}, - {106000000, 151000000}, + {-19000000, 46000000}, + {-16799999, 46000000}, + {14000000, 34000000}, + {19000000, 29000000}, + {19000000, -29000000}, + {14000000, -34000000}, + {-16799999, -46000000}, + {-19000000, -46000000}, + {-19000000, 46000000}, }, { - {117043830, 105836227}, - {117174819, 106663291}, - {117232467, 106914527}, - {117391548, 107472137}, - {117691642, 108253890}, - {117916351, 108717781}, - {118071800, 109000000}, - {118527862, 109702278}, - {119011909, 110304977}, - {119054840, 110353042}, - {119646957, 110945159}, - {120297721, 111472137}, - {120455482, 111583869}, - {121000000, 111928199}, - {121746109, 112308357}, - {122163162, 112480133}, - {122527862, 112608451}, - {123336708, 112825180}, - {124035705, 112941673}, - {124163772, 112956169}, - {125000000, 113000000}, - {125836227, 112956169}, - {125964294, 112941673}, - {126663291, 112825180}, - {127472137, 112608451}, - {127836837, 112480133}, - {128253890, 112308357}, - {129000000, 111928199}, - {129544525, 111583869}, - {129702285, 111472137}, - {130353042, 110945159}, - {130945159, 110353042}, - {130988082, 110304977}, - {131472137, 109702278}, - {131928192, 109000000}, - {132083648, 108717781}, - {132308364, 108253890}, - {132608444, 107472137}, - {132767532, 106914527}, - {132825180, 106663291}, - {132956176, 105836227}, - {133000000, 105000000}, - {132956176, 104163772}, - {132825180, 103336708}, - {132767532, 103085472}, - {132608444, 102527862}, - {132308364, 101746109}, - {132083648, 101282218}, - {131928192, 101000000}, - {131472137, 100297721}, - {130988082, 99695022}, - {130945159, 99646957}, - {130353042, 99054840}, - {129702285, 98527862}, - {129544525, 98416130}, - {129000000, 98071800}, - {128253890, 97691642}, - {127836837, 97519866}, - {127472137, 97391548}, - {126663291, 97174819}, - {125964294, 97058326}, - {125836227, 97043830}, - {125000000, 97000000}, - {124163772, 97043830}, - {124035705, 97058326}, - {123336708, 97174819}, - {122527862, 97391548}, - {122163162, 97519866}, - {121746109, 97691642}, - {121000000, 98071800}, - {120455482, 98416130}, - {120297721, 98527862}, - {119646957, 99054840}, - {119054840, 99646957}, - {119011909, 99695022}, - {118527862, 100297721}, - {118071800, 101000000}, - {117916351, 101282218}, - {117691642, 101746109}, - {117391548, 102527862}, - {117232467, 103085472}, - {117174819, 103336708}, - {117043830, 104163772}, - {117000000, 105000000}, - {117043830, 105836227}, + {-7956170, 836226}, + {-7825180, 1663290}, + {-7767529, 1914530}, + {-7608449, 2472140}, + {-7308360, 3253890}, + {-7083650, 3717780}, + {-6928199, 4000000}, + {-6472139, 4702280}, + {-5988090, 5304979}, + {-5945159, 5353040}, + {-5353040, 5945159}, + {-4702280, 6472139}, + {-4544519, 6583869}, + {-4000000, 6928199}, + {-3253890, 7308360}, + {-2836839, 7480130}, + {-2472140, 7608449}, + {-1663290, 7825180}, + {-964293, 7941669}, + {-836226, 7956170}, + {0, 8000000}, + {836226, 7956170}, + {964293, 7941669}, + {1663290, 7825180}, + {2472140, 7608449}, + {2836839, 7480130}, + {3253890, 7308360}, + {4000000, 6928199}, + {4544519, 6583869}, + {4702280, 6472139}, + {5353040, 5945159}, + {5945159, 5353040}, + {5988090, 5304979}, + {6472139, 4702280}, + {6928199, 4000000}, + {7083650, 3717780}, + {7308360, 3253890}, + {7608449, 2472140}, + {7767529, 1914530}, + {7825180, 1663290}, + {7956170, 836226}, + {8000000, 0}, + {7956170, -836226}, + {7825180, -1663290}, + {7767529, -1914530}, + {7608449, -2472140}, + {7308360, -3253890}, + {7083650, -3717780}, + {6928199, -4000000}, + {6472139, -4702280}, + {5988090, -5304979}, + {5945159, -5353040}, + {5353040, -5945159}, + {4702280, -6472139}, + {4544519, -6583869}, + {4000000, -6928199}, + {3253890, -7308360}, + {2836839, -7480130}, + {2472140, -7608449}, + {1663290, -7825180}, + {964293, -7941669}, + {836226, -7956170}, + {0, -8000000}, + {-836226, -7956170}, + {-964293, -7941669}, + {-1663290, -7825180}, + {-2472140, -7608449}, + {-2836839, -7480130}, + {-3253890, -7308360}, + {-4000000, -6928199}, + {-4544519, -6583869}, + {-4702280, -6472139}, + {-5353040, -5945159}, + {-5945159, -5353040}, + {-5988090, -5304979}, + {-6472139, -4702280}, + {-6928199, -4000000}, + {-7083650, -3717780}, + {-7308360, -3253890}, + {-7608449, -2472140}, + {-7767529, -1914530}, + {-7825180, -1663290}, + {-7956170, -836226}, + {-8000000, 0}, + {-7956170, 836226}, }, }; diff --git a/xs/src/libnest2d/tests/svgtools.hpp b/xs/src/libnest2d/tests/svgtools.hpp index 5ede726f3..f0db85217 100644 --- a/xs/src/libnest2d/tests/svgtools.hpp +++ b/xs/src/libnest2d/tests/svgtools.hpp @@ -50,7 +50,9 @@ public: if(conf_.origo_location == BOTTOMLEFT) for(unsigned i = 0; i < tsh.vertexCount(); i++) { auto v = tsh.vertex(i); - setY(v, -getY(v) + conf_.height*conf_.mm_in_coord_units); + auto d = static_cast( + std::round(conf_.height*conf_.mm_in_coord_units) ); + setY(v, -getY(v) + d); tsh.setVertex(i, v); } currentLayer() += ShapeLike::serialize(tsh.rawShape(), @@ -78,8 +80,8 @@ public: } void save(const std::string& filepath) { - unsigned lyrc = svg_layers_.size() > 1? 1 : 0; - unsigned last = svg_layers_.size() > 1? svg_layers_.size() : 0; + size_t lyrc = svg_layers_.size() > 1? 1 : 0; + size_t last = svg_layers_.size() > 1? svg_layers_.size() : 0; for(auto& lyr : svg_layers_) { std::fstream out(filepath + (lyrc > 0? std::to_string(lyrc) : "") + diff --git a/xs/src/libnest2d/tests/test.cpp b/xs/src/libnest2d/tests/test.cpp index 7ed7aa419..9aee6d799 100644 --- a/xs/src/libnest2d/tests/test.cpp +++ b/xs/src/libnest2d/tests/test.cpp @@ -253,7 +253,7 @@ TEST(GeometryAlgorithms, LeftAndDownPolygon) ASSERT_TRUE(ShapeLike::isValid(leftp.rawShape()).first); ASSERT_EQ(leftp.vertexCount(), leftControl.vertexCount()); - for(size_t i = 0; i < leftControl.vertexCount(); i++) { + for(unsigned long i = 0; i < leftControl.vertexCount(); i++) { ASSERT_EQ(getX(leftp.vertex(i)), getX(leftControl.vertex(i))); ASSERT_EQ(getY(leftp.vertex(i)), getY(leftControl.vertex(i))); } @@ -263,7 +263,7 @@ TEST(GeometryAlgorithms, LeftAndDownPolygon) ASSERT_TRUE(ShapeLike::isValid(downp.rawShape()).first); ASSERT_EQ(downp.vertexCount(), downControl.vertexCount()); - for(size_t i = 0; i < downControl.vertexCount(); i++) { + for(unsigned long i = 0; i < downControl.vertexCount(); i++) { ASSERT_EQ(getX(downp.vertex(i)), getX(downControl.vertex(i))); ASSERT_EQ(getY(downp.vertex(i)), getY(downControl.vertex(i))); } @@ -696,6 +696,27 @@ TEST(GeometryAlgorithms, nfpConvexConvex) { } } +TEST(GeometryAlgorithms, pointOnPolygonContour) { + using namespace libnest2d; + + Rectangle input(10, 10); + + strategies::EdgeCache ecache(input); + + auto first = *input.begin(); + ASSERT_TRUE(getX(first) == getX(ecache.coords(0))); + ASSERT_TRUE(getY(first) == getY(ecache.coords(0))); + + auto last = *std::prev(input.end()); + ASSERT_TRUE(getX(last) == getX(ecache.coords(1.0))); + ASSERT_TRUE(getY(last) == getY(ecache.coords(1.0))); + + for(int i = 0; i <= 100; i++) { + auto v = ecache.coords(i*(0.01)); + ASSERT_TRUE(ShapeLike::touches(v, input.transformedShape())); + } +} + int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); diff --git a/xs/src/libslic3r/Model.cpp b/xs/src/libslic3r/Model.cpp index d130c837f..743b253e3 100644 --- a/xs/src/libslic3r/Model.cpp +++ b/xs/src/libslic3r/Model.cpp @@ -331,14 +331,20 @@ ShapeData2D projectModelFromTop(const Slic3r::Model &model) { for(auto objinst : objptr->instances) { if(objinst) { Slic3r::TriangleMesh tmpmesh = rmesh; - objinst->transform_mesh(&tmpmesh); +// objinst->transform_mesh(&tmpmesh); ClipperLib::PolyNode pn; auto p = tmpmesh.convex_hull(); p.make_clockwise(); p.append(p.first_point()); pn.Contour = Slic3rMultiPoint_to_ClipperPath( p ); - ret.emplace_back(objinst, Item(std::move(pn))); + Item item(std::move(pn)); + item.rotation(objinst->rotation); + item.translation( { + ClipperLib::cInt(objinst->offset.x/SCALING_FACTOR), + ClipperLib::cInt(objinst->offset.y/SCALING_FACTOR) + }); + ret.emplace_back(objinst, item); } } } @@ -407,7 +413,7 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, // std::cout << "}" << std::endl; // return true; - double area = 0; + bool hasbin = bb != nullptr && bb->defined; double area_max = 0; Item *biggest = nullptr; @@ -416,24 +422,25 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, std::vector> shapes; shapes.reserve(shapemap.size()); std::for_each(shapemap.begin(), shapemap.end(), - [&shapes, &area, min_obj_distance, &area_max, &biggest] + [&shapes, min_obj_distance, &area_max, &biggest,hasbin] (ShapeData2D::value_type& it) { - Item& item = it.second; - item.addOffset(min_obj_distance); - auto b = ShapeLike::boundingBox(item.transformedShape()); - auto a = b.width()*b.height(); - if(area_max < a) { - area_max = static_cast(a); - biggest = &item; + if(!hasbin) { + Item& item = it.second; + item.addOffset(min_obj_distance); + auto b = ShapeLike::boundingBox(item.transformedShape()); + auto a = b.width()*b.height(); + if(area_max < a) { + area_max = static_cast(a); + biggest = &item; + } } - area += b.width()*b.height(); shapes.push_back(std::ref(it.second)); }); Box bin; - if(bb != nullptr && bb->defined) { + if(hasbin) { // Scale up the bounding box to clipper scale. BoundingBoxf bbb = *bb; bbb.scale(1.0/SCALING_FACTOR); @@ -456,8 +463,13 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, using Arranger = Arranger; Arranger::PlacementConfig pcfg; - pcfg.alignment = Arranger::PlacementConfig::Alignment::BOTTOM_LEFT; - Arranger arranger(bin, min_obj_distance, pcfg); + Arranger::SelectionConfig scfg; + + scfg.try_reverse_order = false; + scfg.force_parallel = true; + pcfg.alignment = Arranger::PlacementConfig::Alignment::CENTER; + Arranger arranger(bin, min_obj_distance, pcfg, scfg); + arranger.useMinimumBoundigBoxRotation(); std::cout << "Arranging model..." << std::endl; bench.start(); @@ -483,18 +495,15 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, // Get the tranformation data from the item object and scale it // appropriately - Radians rot = item.rotation(); auto off = item.translation(); - Pointf foff(off.X*SCALING_FACTOR + batch_offset, + Radians rot = item.rotation(); + Pointf foff(off.X*SCALING_FACTOR, off.Y*SCALING_FACTOR); // write the tranformation data into the model instance - inst_ptr->rotation += rot; - inst_ptr->offset += foff; - - // Debug - /*std::cout << "item " << idx << ": \n" << "\toffset_x: " - * << foff.x << "\n\toffset_y: " << foff.y << std::endl;*/ + inst_ptr->rotation = rot; + inst_ptr->offset = foff; + inst_ptr->offset_z = -batch_offset; } }; @@ -503,14 +512,23 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, if(first_bin_only) { applyResult(result.front(), 0); } else { + + const auto STRIDE_PADDING = 1.2; + const auto MIN_STRIDE = 100; + + auto h = STRIDE_PADDING * model.bounding_box().size().z; + h = h < MIN_STRIDE ? MIN_STRIDE : h; + Coord stride = static_cast(h); + Coord batch_offset = 0; + for(auto& group : result) { applyResult(group, batch_offset); // Only the first pack group can be placed onto the print bed. The // other objects which could not fit will be placed next to the // print bed - batch_offset += static_cast(2*bin.width()*SCALING_FACTOR); + batch_offset += stride; } } bench.stop(); @@ -1236,7 +1254,7 @@ void ModelInstance::transform_mesh(TriangleMesh* mesh, bool dont_translate) cons mesh->rotate_z(this->rotation); // rotate around mesh origin mesh->scale(this->scaling_factor); // scale around mesh origin if (!dont_translate) - mesh->translate(this->offset.x, this->offset.y, 0); + mesh->translate(this->offset.x, this->offset.y, this->offset_z); } BoundingBoxf3 ModelInstance::transform_mesh_bounding_box(const TriangleMesh* mesh, bool dont_translate) const diff --git a/xs/src/libslic3r/Model.hpp b/xs/src/libslic3r/Model.hpp index 8b63c3641..42b0a9edb 100644 --- a/xs/src/libslic3r/Model.hpp +++ b/xs/src/libslic3r/Model.hpp @@ -201,8 +201,9 @@ public: double rotation; // Rotation around the Z axis, in radians around mesh center point double scaling_factor; Pointf offset; // in unscaled coordinates + double offset_z = 0; - ModelObject* get_object() const { return this->object; }; + ModelObject* get_object() const { return this->object; } // To be called on an external mesh void transform_mesh(TriangleMesh* mesh, bool dont_translate = false) const; diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index 08802139d..ba720aa04 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -444,7 +444,7 @@ bool Print::apply_config(DynamicPrintConfig config) const ModelVolume &volume = *object->model_object()->volumes[volume_id]; if (this_region_config_set) { // If the new config for this volume differs from the other - // volume configs currently associated to this region, it means + // volume configs currently associated to this region, it means // the region subdivision does not make sense anymore. if (! this_region_config.equals(this->_region_config_from_model_volume(volume))) { rearrange_regions = true; From 75bda8cfd8ce7ea5995cf494bed0184889226061 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Thu, 28 Jun 2018 16:50:06 +0200 Subject: [PATCH 092/198] Addition to last commit --- xs/src/slic3r/GUI/Tab.cpp | 36 +++++++++++++++++++++++------------- xs/src/slic3r/GUI/Tab.hpp | 2 +- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index d3d83fee8..ba75c3c6f 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -45,6 +45,8 @@ void Tab::create_preset_tab(PresetBundle *preset_bundle) main_sizer->SetSizeHints(this); this->SetSizer(main_sizer); + // Create additional panel to Fit() it from OnActivate() + // It's needed for tooltip showing on OSX m_tmp_panel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBK_LEFT | wxTAB_TRAVERSAL); auto panel = m_tmp_panel; auto sizer = new wxBoxSizer(wxVERTICAL); @@ -293,7 +295,12 @@ PageShp Tab::add_options_page(const wxString& title, const std::string& icon, bo } } // Initialize the page. - PageShp page(new Page(this, title, icon_idx)); +#ifdef __WXOSX__ + auto panel = m_tmp_panel; +#else + auto panel = this; +#endif + PageShp page(new Page(panel, title, icon_idx)); page->SetScrollbars(1, 1, 1, 1); page->Hide(); m_hsizer->Add(page.get(), 1, wxEXPAND | wxLEFT, 5); @@ -309,20 +316,22 @@ void Tab::OnActivate() #ifdef __WXOSX__ wxWindowUpdateLocker noUpdates(this); + auto sizer = GetSizer(); + m_tmp_panel->GetSizer()->SetMinSize(sizer->GetSize()); m_tmp_panel->Fit(); - Page* page = nullptr; - auto selection = m_treectrl->GetItemText(m_treectrl->GetSelection()); - for (auto p : m_pages) - if (p->title() == selection) - { - page = p.get(); - break; - } - if (page == nullptr) return; - page->Fit(); - m_hsizer->Layout(); - Refresh(); +// Page* page = nullptr; +// auto selection = m_treectrl->GetItemText(m_treectrl->GetSelection()); +// for (auto p : m_pages) +// if (p->title() == selection) +// { +// page = p.get(); +// break; +// } +// if (page == nullptr) return; +// page->Fit(); +// m_hsizer->Layout(); +// Refresh(); #endif // __WXOSX__ } @@ -2124,6 +2133,7 @@ void Tab::OnTreeSelChange(wxTreeEvent& event) #endif page->Show(); + page->Fit(); m_hsizer->Layout(); Refresh(); diff --git a/xs/src/slic3r/GUI/Tab.hpp b/xs/src/slic3r/GUI/Tab.hpp index 6c9297c71..82670121c 100644 --- a/xs/src/slic3r/GUI/Tab.hpp +++ b/xs/src/slic3r/GUI/Tab.hpp @@ -200,7 +200,7 @@ public: Tab() {} Tab(wxNotebook* parent, const wxString& title, const char* name, bool no_controller) : m_parent(parent), m_title(title), m_name(name), m_no_controller(no_controller) { - Create(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBK_LEFT | wxTAB_TRAVERSAL); + Create(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBK_LEFT | wxTAB_TRAVERSAL, name); get_tabs_list().push_back(this); } ~Tab(){ From 0171f49ad0cb3c7d11e5aaa5f613992b2e84f7e0 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Thu, 28 Jun 2018 17:14:45 +0200 Subject: [PATCH 093/198] And last try.. --- xs/src/slic3r/GUI/Tab.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index ba75c3c6f..4186cd8db 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -318,7 +318,7 @@ void Tab::OnActivate() auto sizer = GetSizer(); m_tmp_panel->GetSizer()->SetMinSize(sizer->GetSize()); - m_tmp_panel->Fit(); + /*m_tmp_panel->*/Fit(); // Page* page = nullptr; // auto selection = m_treectrl->GetItemText(m_treectrl->GetSelection()); From 5f1f7dcbedcdc884b4cd489562b444ad372b89c9 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Wed, 27 Jun 2018 09:07:04 +0200 Subject: [PATCH 094/198] Fix of tooltips on OSX showing on the first page of a parameter tab. --- lib/Slic3r/GUI/MainFrame.pm | 4 + xs/src/slic3r/GUI/ConfigWizard.cpp | 4 +- xs/src/slic3r/GUI/GUI.cpp | 7 +- xs/src/slic3r/GUI/Tab.cpp | 132 +++++++++++------------------ xs/src/slic3r/GUI/Tab.hpp | 6 +- 5 files changed, 63 insertions(+), 90 deletions(-) diff --git a/lib/Slic3r/GUI/MainFrame.pm b/lib/Slic3r/GUI/MainFrame.pm index 910b86dd8..ea4a158f4 100644 --- a/lib/Slic3r/GUI/MainFrame.pm +++ b/lib/Slic3r/GUI/MainFrame.pm @@ -110,6 +110,10 @@ sub _init_tabpanel { EVT_NOTEBOOK_PAGE_CHANGED($self, $self->{tabpanel}, sub { my $panel = $self->{tabpanel}->GetCurrentPage; $panel->OnActivate if $panel->can('OnActivate'); + + for my $tab_name (qw(print filament printer)) { + Slic3r::GUI::get_preset_tab("$tab_name")->OnActivate if ("$tab_name" eq $panel->GetName); + } }); if (!$self->{no_plater}) { diff --git a/xs/src/slic3r/GUI/ConfigWizard.cpp b/xs/src/slic3r/GUI/ConfigWizard.cpp index ce06da853..b19515dd4 100644 --- a/xs/src/slic3r/GUI/ConfigWizard.cpp +++ b/xs/src/slic3r/GUI/ConfigWizard.cpp @@ -886,9 +886,9 @@ const wxString& ConfigWizard::name() { // A different naming convention is used for the Wizard on Windows vs. OSX & GTK. #if WIN32 - static const wxString config_wizard_name = _(L("Configuration Wizard")); + static const wxString config_wizard_name = L("Configuration Wizard"); #else - static const wxString config_wizard_name = _(L("Configuration Assistant")); + static const wxString config_wizard_name = L("Configuration Assistant"); #endif return config_wizard_name; } diff --git a/xs/src/slic3r/GUI/GUI.cpp b/xs/src/slic3r/GUI/GUI.cpp index c1f8adaf1..12af36d19 100644 --- a/xs/src/slic3r/GUI/GUI.cpp +++ b/xs/src/slic3r/GUI/GUI.cpp @@ -317,10 +317,11 @@ void add_config_menu(wxMenuBar *menu, int event_preferences_changed, int event_l auto local_menu = new wxMenu(); wxWindowID config_id_base = wxWindow::NewControlId((int)ConfigMenuCnt); - const auto config_wizard_tooltip = wxString::Format(_(L("Run %s")), ConfigWizard::name()); + auto config_wizard_name = _(ConfigWizard::name().wx_str()); + const auto config_wizard_tooltip = wxString::Format(_(L("Run %s")), config_wizard_name); // Cmd+, is standard on OS X - what about other operating systems? - local_menu->Append(config_id_base + ConfigMenuWizard, ConfigWizard::name() + dots, config_wizard_tooltip); - local_menu->Append(config_id_base + ConfigMenuSnapshots, _(L("Configuration Snapshots"))+dots, _(L("Inspect / activate configuration snapshots"))); + local_menu->Append(config_id_base + ConfigMenuWizard, config_wizard_name + dots, config_wizard_tooltip); + local_menu->Append(config_id_base + ConfigMenuSnapshots, _(L("Configuration Snapshots"))+dots, _(L("Inspect / activate configuration snapshots"))); local_menu->Append(config_id_base + ConfigMenuTakeSnapshot, _(L("Take Configuration Snapshot")), _(L("Capture a configuration snapshot"))); // local_menu->Append(config_id_base + ConfigMenuUpdate, _(L("Check for updates")), _(L("Check for configuration updates"))); local_menu->AppendSeparator(); diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 94f8cc3ea..b3b3c6139 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -47,66 +47,32 @@ void Tab::create_preset_tab(PresetBundle *preset_bundle) // preset chooser m_presets_choice = new wxBitmapComboBox(panel, wxID_ANY, "", wxDefaultPosition, wxSize(270, -1), 0, 0,wxCB_READONLY); - /* - m_cc_presets_choice = new wxComboCtrl(panel, wxID_ANY, L(""), wxDefaultPosition, wxDefaultSize, wxCB_READONLY); - wxDataViewTreeCtrlComboPopup* popup = new wxDataViewTreeCtrlComboPopup; - if (popup != nullptr) - { - // FIXME If the following line is removed, the combo box popup list will not react to mouse clicks. - // On the other side, with this line the combo box popup cannot be closed by clicking on the combo button on Windows 10. -// m_cc_presets_choice->UseAltPopupWindow(); - -// m_cc_presets_choice->EnablePopupAnimation(false); - m_cc_presets_choice->SetPopupControl(popup); - popup->SetStringValue(from_u8("Text1")); - - popup->Bind(wxEVT_DATAVIEW_SELECTION_CHANGED, [this, popup](wxCommandEvent& evt) - { - auto selected = popup->GetItemText(popup->GetSelection()); - if (selected != _(L("System presets")) && selected != _(L("Default presets"))) - { - m_cc_presets_choice->SetText(selected); - std::string selected_string = selected.ToUTF8().data(); -#ifdef __APPLE__ -#else - select_preset(selected_string); -#endif - } - }); - -// popup->Bind(wxEVT_KEY_DOWN, [popup](wxKeyEvent& evt) { popup->OnKeyEvent(evt); }); -// popup->Bind(wxEVT_KEY_UP, [popup](wxKeyEvent& evt) { popup->OnKeyEvent(evt); }); - - auto icons = new wxImageList(16, 16, true, 1); - popup->SetImageList(icons); - icons->Add(*new wxIcon(from_u8(Slic3r::var("flag-green-icon.png")), wxBITMAP_TYPE_PNG)); - icons->Add(*new wxIcon(from_u8(Slic3r::var("flag-red-icon.png")), wxBITMAP_TYPE_PNG)); - } -*/ auto color = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); //buttons + m_btn_panel = new wxPanel(panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBK_LEFT | wxTAB_TRAVERSAL); + wxBitmap bmpMenu; bmpMenu = wxBitmap(from_u8(Slic3r::var("disk.png")), wxBITMAP_TYPE_PNG); - m_btn_save_preset = new wxBitmapButton(panel, wxID_ANY, bmpMenu, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE); + m_btn_save_preset = new wxBitmapButton(m_btn_panel, wxID_ANY, bmpMenu, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE); if (wxMSW) m_btn_save_preset->SetBackgroundColour(color); bmpMenu = wxBitmap(from_u8(Slic3r::var("delete.png")), wxBITMAP_TYPE_PNG); - m_btn_delete_preset = new wxBitmapButton(panel, wxID_ANY, bmpMenu, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE); + m_btn_delete_preset = new wxBitmapButton(m_btn_panel, wxID_ANY, bmpMenu, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE); if (wxMSW) m_btn_delete_preset->SetBackgroundColour(color); m_show_incompatible_presets = false; m_bmp_show_incompatible_presets.LoadFile(from_u8(Slic3r::var("flag-red-icon.png")), wxBITMAP_TYPE_PNG); m_bmp_hide_incompatible_presets.LoadFile(from_u8(Slic3r::var("flag-green-icon.png")), wxBITMAP_TYPE_PNG); - m_btn_hide_incompatible_presets = new wxBitmapButton(panel, wxID_ANY, m_bmp_hide_incompatible_presets, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE); + m_btn_hide_incompatible_presets = new wxBitmapButton(m_btn_panel, wxID_ANY, m_bmp_hide_incompatible_presets, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE); if (wxMSW) m_btn_hide_incompatible_presets->SetBackgroundColour(color); m_btn_save_preset->SetToolTip(_(L("Save current ")) + m_title); m_btn_delete_preset->SetToolTip(_(L("Delete this preset"))); m_btn_delete_preset->Disable(); - m_undo_btn = new wxButton(panel, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT | wxNO_BORDER); - m_undo_to_sys_btn = new wxButton(panel, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT | wxNO_BORDER); - m_question_btn = new wxButton(panel, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT | wxNO_BORDER); + m_undo_btn = new wxButton(m_btn_panel, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT | wxNO_BORDER); + m_undo_to_sys_btn = new wxButton(m_btn_panel, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT | wxNO_BORDER); + m_question_btn = new wxButton(m_btn_panel, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT | wxNO_BORDER); if (wxMSW) { m_undo_btn->SetBackgroundColour(color); m_undo_to_sys_btn->SetBackgroundColour(color); @@ -153,57 +119,32 @@ void Tab::create_preset_tab(PresetBundle *preset_bundle) m_modified_label_clr = get_label_clr_modified(); m_default_text_clr = get_label_clr_default(); + auto btn_sizer = new wxBoxSizer(wxHORIZONTAL); + m_btn_panel->SetSizer(btn_sizer); + m_btn_panel->Layout(); + + btn_sizer->Add(m_btn_save_preset, 0, wxALIGN_CENTER_VERTICAL); + btn_sizer->AddSpacer(4); + btn_sizer->Add(m_btn_delete_preset, 0, wxALIGN_CENTER_VERTICAL); + btn_sizer->AddSpacer(16); + btn_sizer->Add(m_btn_hide_incompatible_presets, 0, wxALIGN_CENTER_VERTICAL); + btn_sizer->AddSpacer(64); + btn_sizer->Add(m_undo_to_sys_btn, 0, wxALIGN_CENTER_VERTICAL); + btn_sizer->Add(m_undo_btn, 0, wxALIGN_CENTER_VERTICAL); + btn_sizer->AddSpacer(32); + btn_sizer->Add(m_question_btn, 0, wxALIGN_CENTER_VERTICAL); + m_hsizer = new wxBoxSizer(wxHORIZONTAL); sizer->Add(m_hsizer, 0, wxBOTTOM, 3); m_hsizer->Add(m_presets_choice, 1, wxLEFT | wxRIGHT | wxTOP | wxALIGN_CENTER_VERTICAL, 3); m_hsizer->AddSpacer(4); - m_hsizer->Add(m_btn_save_preset, 0, wxALIGN_CENTER_VERTICAL); - m_hsizer->AddSpacer(4); - m_hsizer->Add(m_btn_delete_preset, 0, wxALIGN_CENTER_VERTICAL); - m_hsizer->AddSpacer(16); - m_hsizer->Add(m_btn_hide_incompatible_presets, 0, wxALIGN_CENTER_VERTICAL); - m_hsizer->AddSpacer(64); - m_hsizer->Add(m_undo_to_sys_btn, 0, wxALIGN_CENTER_VERTICAL); - m_hsizer->Add(m_undo_btn, 0, wxALIGN_CENTER_VERTICAL); - m_hsizer->AddSpacer(32); - m_hsizer->Add(m_question_btn, 0, wxALIGN_CENTER_VERTICAL); -// m_hsizer->Add(m_cc_presets_choice, 1, wxLEFT | wxRIGHT | wxTOP | wxALIGN_CENTER_VERTICAL, 3); + m_hsizer->Add(m_btn_panel, 0, wxALIGN_CENTER_VERTICAL); //Horizontal sizer to hold the tree and the selected page. m_hsizer = new wxBoxSizer(wxHORIZONTAL); sizer->Add(m_hsizer, 1, wxEXPAND, 0); -/* - - - //temporary left vertical sizer - m_left_sizer = new wxBoxSizer(wxVERTICAL); - m_hsizer->Add(m_left_sizer, 0, wxEXPAND | wxLEFT | wxTOP | wxBOTTOM, 3); - - // tree - m_presetctrl = new wxDataViewTreeCtrl(panel, wxID_ANY, wxDefaultPosition, wxSize(200, -1), wxDV_NO_HEADER); - m_left_sizer->Add(m_presetctrl, 1, wxEXPAND); - m_preset_icons = new wxImageList(16, 16, true, 1); - m_presetctrl->SetImageList(m_preset_icons); - m_preset_icons->Add(*new wxIcon(from_u8(Slic3r::var("flag-green-icon.png")), wxBITMAP_TYPE_PNG)); - m_preset_icons->Add(*new wxIcon(from_u8(Slic3r::var("flag-red-icon.png")), wxBITMAP_TYPE_PNG)); - - m_presetctrl->Bind(wxEVT_DATAVIEW_SELECTION_CHANGED, [this](wxCommandEvent& evt) - { - auto selected = m_presetctrl->GetItemText(m_presetctrl->GetSelection()); - if (selected != _(L("System presets")) && selected != _(L("Default presets"))) - { - std::string selected_string = selected.ToUTF8().data(); -#ifdef __APPLE__ -#else - select_preset(selected_string); -#endif - } - }); - -*/ - //left vertical sizer m_left_sizer = new wxBoxSizer(wxVERTICAL); m_hsizer->Add(m_left_sizer, 0, wxEXPAND | wxLEFT | wxTOP | wxBOTTOM, 3); @@ -290,6 +231,28 @@ PageShp Tab::add_options_page(const wxString& title, const std::string& icon, bo return page; } +void Tab::OnActivate() +{ +#ifdef __WXOSX__ + wxWindowUpdateLocker noUpdates(this); + + m_btn_panel->Fit(); + + Page* page = nullptr; + auto selection = m_treectrl->GetItemText(m_treectrl->GetSelection()); + for (auto p : m_pages) + if (p->title() == selection) + { + page = p.get(); + break; + } + if (page == nullptr) return; + page->Fit(); + m_hsizer->Layout(); + Refresh(); +#endif +} + void Tab::update_labels_colour() { Freeze(); @@ -1246,6 +1209,7 @@ void TabPrint::update() void TabPrint::OnActivate() { + Tab::OnActivate(); m_recommended_thin_wall_thickness_description_line->SetText( from_u8(PresetHints::recommended_thin_wall_thickness(*m_preset_bundle))); } @@ -1404,6 +1368,7 @@ void TabFilament::update() void TabFilament::OnActivate() { + Tab::OnActivate(); m_volumetric_speed_description_line->SetText(from_u8(PresetHints::maximum_volumetric_flow_description(*m_preset_bundle))); } @@ -2086,6 +2051,7 @@ void Tab::OnTreeSelChange(wxTreeEvent& event) #endif page->Show(); + page->Fit(); m_hsizer->Layout(); Refresh(); diff --git a/xs/src/slic3r/GUI/Tab.hpp b/xs/src/slic3r/GUI/Tab.hpp index d6bf2cf43..633f89750 100644 --- a/xs/src/slic3r/GUI/Tab.hpp +++ b/xs/src/slic3r/GUI/Tab.hpp @@ -119,6 +119,8 @@ protected: wxButton* m_undo_to_sys_btn; wxButton* m_question_btn; + wxPanel* m_btn_panel; + wxComboCtrl* m_cc_presets_choice; wxDataViewTreeCtrl* m_presetctrl; wxImageList* m_preset_icons; @@ -198,7 +200,7 @@ public: Tab() {} Tab(wxNotebook* parent, const wxString& title, const char* name, bool no_controller) : m_parent(parent), m_title(title), m_name(name), m_no_controller(no_controller) { - Create(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBK_LEFT | wxTAB_TRAVERSAL); + Create(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBK_LEFT | wxTAB_TRAVERSAL, name); get_tabs_list().push_back(this); } ~Tab(){ @@ -242,7 +244,7 @@ public: PageShp add_options_page(const wxString& title, const std::string& icon, bool is_extruder_pages = false); - virtual void OnActivate(){} + virtual void OnActivate(); virtual void on_preset_loaded(){} virtual void build() = 0; virtual void update() = 0; From 896d898124d71d4dac5bac9d86be78c41a83ae65 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Thu, 28 Jun 2018 17:52:20 +0200 Subject: [PATCH 095/198] Resizing panel to 1 px --- xs/src/slic3r/GUI/Tab.cpp | 33 +++++++++++++++++---------------- xs/src/slic3r/GUI/Tab.hpp | 7 ++++--- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 4186cd8db..e8323ded3 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -40,7 +40,7 @@ void Tab::create_preset_tab(PresetBundle *preset_bundle) m_preset_bundle = preset_bundle; // Vertical sizer to hold the choice menu and the rest of the page. -#ifdef __WXOSX__ +//#ifdef __WXOSX__ auto *main_sizer = new wxBoxSizer(wxVERTICAL); main_sizer->SetSizeHints(this); this->SetSizer(main_sizer); @@ -54,12 +54,12 @@ void Tab::create_preset_tab(PresetBundle *preset_bundle) m_tmp_panel->Layout(); main_sizer->Add(m_tmp_panel, 1, wxEXPAND | wxALL, 0); -#else - Tab *panel = this; - auto *sizer = new wxBoxSizer(wxVERTICAL); - sizer->SetSizeHints(panel); - panel->SetSizer(sizer); -#endif //__WXOSX__ +// #else +// Tab *panel = this; +// auto *sizer = new wxBoxSizer(wxVERTICAL); +// sizer->SetSizeHints(panel); +// panel->SetSizer(sizer); +// #endif //__WXOSX__ // preset chooser m_presets_choice = new wxBitmapComboBox(panel, wxID_ANY, "", wxDefaultPosition, wxSize(270, -1), 0, 0,wxCB_READONLY); @@ -295,11 +295,11 @@ PageShp Tab::add_options_page(const wxString& title, const std::string& icon, bo } } // Initialize the page. -#ifdef __WXOSX__ +//#ifdef __WXOSX__ auto panel = m_tmp_panel; -#else - auto panel = this; -#endif +// #else +// auto panel = this; +// #endif PageShp page(new Page(panel, title, icon_idx)); page->SetScrollbars(1, 1, 1, 1); page->Hide(); @@ -313,12 +313,13 @@ PageShp Tab::add_options_page(const wxString& title, const std::string& icon, bo void Tab::OnActivate() { -#ifdef __WXOSX__ +// #ifdef __WXOSX__ wxWindowUpdateLocker noUpdates(this); - auto sizer = GetSizer(); - m_tmp_panel->GetSizer()->SetMinSize(sizer->GetSize()); - /*m_tmp_panel->*/Fit(); + auto size = GetSizer()->GetSize(); + m_tmp_panel->GetSizer()->SetMinSize(size.x + m_size_move, size.y); + Fit(); + m_size_move *= -1; // Page* page = nullptr; // auto selection = m_treectrl->GetItemText(m_treectrl->GetSelection()); @@ -332,7 +333,7 @@ void Tab::OnActivate() // page->Fit(); // m_hsizer->Layout(); // Refresh(); -#endif // __WXOSX__ +// #endif // __WXOSX__ } void Tab::update_labels_colour() diff --git a/xs/src/slic3r/GUI/Tab.hpp b/xs/src/slic3r/GUI/Tab.hpp index 82670121c..4d14f9de1 100644 --- a/xs/src/slic3r/GUI/Tab.hpp +++ b/xs/src/slic3r/GUI/Tab.hpp @@ -102,6 +102,10 @@ using PageShp = std::shared_ptr; class Tab: public wxPanel { wxNotebook* m_parent; +//#ifdef __WXOSX__ + wxPanel* m_tmp_panel; + int m_size_move = -1; +//#endif // __WXOSX__ protected: std::string m_name; const wxString m_title; @@ -118,9 +122,6 @@ protected: wxButton* m_undo_btn; wxButton* m_undo_to_sys_btn; wxButton* m_question_btn; -#ifdef __WXOSX__ - wxPanel* m_tmp_panel; -#endif // __WXOSX__ wxComboCtrl* m_cc_presets_choice; wxDataViewTreeCtrl* m_presetctrl; wxImageList* m_preset_icons; From 9e4bea8cceacd0e074223be00c3cb84c0489dfa4 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Thu, 28 Jun 2018 18:14:34 +0200 Subject: [PATCH 096/198] Code cleaning --- xs/src/slic3r/GUI/Tab.cpp | 106 +++++--------------------------------- xs/src/slic3r/GUI/Tab.hpp | 4 +- 2 files changed, 15 insertions(+), 95 deletions(-) diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index e8323ded3..f41a14e93 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -40,7 +40,7 @@ void Tab::create_preset_tab(PresetBundle *preset_bundle) m_preset_bundle = preset_bundle; // Vertical sizer to hold the choice menu and the rest of the page. -//#ifdef __WXOSX__ +#ifdef __WXOSX__ auto *main_sizer = new wxBoxSizer(wxVERTICAL); main_sizer->SetSizeHints(this); this->SetSizer(main_sizer); @@ -54,51 +54,16 @@ void Tab::create_preset_tab(PresetBundle *preset_bundle) m_tmp_panel->Layout(); main_sizer->Add(m_tmp_panel, 1, wxEXPAND | wxALL, 0); -// #else -// Tab *panel = this; -// auto *sizer = new wxBoxSizer(wxVERTICAL); -// sizer->SetSizeHints(panel); -// panel->SetSizer(sizer); -// #endif //__WXOSX__ +#else + Tab *panel = this; + auto *sizer = new wxBoxSizer(wxVERTICAL); + sizer->SetSizeHints(panel); + panel->SetSizer(sizer); +#endif //__WXOSX__ // preset chooser m_presets_choice = new wxBitmapComboBox(panel, wxID_ANY, "", wxDefaultPosition, wxSize(270, -1), 0, 0,wxCB_READONLY); - /* - m_cc_presets_choice = new wxComboCtrl(panel, wxID_ANY, L(""), wxDefaultPosition, wxDefaultSize, wxCB_READONLY); - wxDataViewTreeCtrlComboPopup* popup = new wxDataViewTreeCtrlComboPopup; - if (popup != nullptr) - { - // FIXME If the following line is removed, the combo box popup list will not react to mouse clicks. - // On the other side, with this line the combo box popup cannot be closed by clicking on the combo button on Windows 10. -// m_cc_presets_choice->UseAltPopupWindow(); -// m_cc_presets_choice->EnablePopupAnimation(false); - m_cc_presets_choice->SetPopupControl(popup); - popup->SetStringValue(from_u8("Text1")); - - popup->Bind(wxEVT_DATAVIEW_SELECTION_CHANGED, [this, popup](wxCommandEvent& evt) - { - auto selected = popup->GetItemText(popup->GetSelection()); - if (selected != _(L("System presets")) && selected != _(L("Default presets"))) - { - m_cc_presets_choice->SetText(selected); - std::string selected_string = selected.ToUTF8().data(); -#ifdef __APPLE__ -#else - select_preset(selected_string); -#endif - } - }); - -// popup->Bind(wxEVT_KEY_DOWN, [popup](wxKeyEvent& evt) { popup->OnKeyEvent(evt); }); -// popup->Bind(wxEVT_KEY_UP, [popup](wxKeyEvent& evt) { popup->OnKeyEvent(evt); }); - - auto icons = new wxImageList(16, 16, true, 1); - popup->SetImageList(icons); - icons->Add(*new wxIcon(from_u8(Slic3r::var("flag-green-icon.png")), wxBITMAP_TYPE_PNG)); - icons->Add(*new wxIcon(from_u8(Slic3r::var("flag-red-icon.png")), wxBITMAP_TYPE_PNG)); - } -*/ auto color = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); //buttons @@ -189,37 +154,6 @@ void Tab::create_preset_tab(PresetBundle *preset_bundle) m_hsizer = new wxBoxSizer(wxHORIZONTAL); sizer->Add(m_hsizer, 1, wxEXPAND, 0); - -/* - - - //temporary left vertical sizer - m_left_sizer = new wxBoxSizer(wxVERTICAL); - m_hsizer->Add(m_left_sizer, 0, wxEXPAND | wxLEFT | wxTOP | wxBOTTOM, 3); - - // tree - m_presetctrl = new wxDataViewTreeCtrl(panel, wxID_ANY, wxDefaultPosition, wxSize(200, -1), wxDV_NO_HEADER); - m_left_sizer->Add(m_presetctrl, 1, wxEXPAND); - m_preset_icons = new wxImageList(16, 16, true, 1); - m_presetctrl->SetImageList(m_preset_icons); - m_preset_icons->Add(*new wxIcon(from_u8(Slic3r::var("flag-green-icon.png")), wxBITMAP_TYPE_PNG)); - m_preset_icons->Add(*new wxIcon(from_u8(Slic3r::var("flag-red-icon.png")), wxBITMAP_TYPE_PNG)); - - m_presetctrl->Bind(wxEVT_DATAVIEW_SELECTION_CHANGED, [this](wxCommandEvent& evt) - { - auto selected = m_presetctrl->GetItemText(m_presetctrl->GetSelection()); - if (selected != _(L("System presets")) && selected != _(L("Default presets"))) - { - std::string selected_string = selected.ToUTF8().data(); -#ifdef __APPLE__ -#else - select_preset(selected_string); -#endif - } - }); - -*/ - //left vertical sizer m_left_sizer = new wxBoxSizer(wxVERTICAL); m_hsizer->Add(m_left_sizer, 0, wxEXPAND | wxLEFT | wxTOP | wxBOTTOM, 3); @@ -295,11 +229,11 @@ PageShp Tab::add_options_page(const wxString& title, const std::string& icon, bo } } // Initialize the page. -//#ifdef __WXOSX__ +#ifdef __WXOSX__ auto panel = m_tmp_panel; -// #else -// auto panel = this; -// #endif +#else + auto panel = this; +#endif PageShp page(new Page(panel, title, icon_idx)); page->SetScrollbars(1, 1, 1, 1); page->Hide(); @@ -313,27 +247,14 @@ PageShp Tab::add_options_page(const wxString& title, const std::string& icon, bo void Tab::OnActivate() { -// #ifdef __WXOSX__ +#ifdef __WXOSX__ wxWindowUpdateLocker noUpdates(this); auto size = GetSizer()->GetSize(); m_tmp_panel->GetSizer()->SetMinSize(size.x + m_size_move, size.y); Fit(); m_size_move *= -1; - -// Page* page = nullptr; -// auto selection = m_treectrl->GetItemText(m_treectrl->GetSelection()); -// for (auto p : m_pages) -// if (p->title() == selection) -// { -// page = p.get(); -// break; -// } -// if (page == nullptr) return; -// page->Fit(); -// m_hsizer->Layout(); -// Refresh(); -// #endif // __WXOSX__ +#endif // __WXOSX__ } void Tab::update_labels_colour() @@ -2134,7 +2055,6 @@ void Tab::OnTreeSelChange(wxTreeEvent& event) #endif page->Show(); - page->Fit(); m_hsizer->Layout(); Refresh(); diff --git a/xs/src/slic3r/GUI/Tab.hpp b/xs/src/slic3r/GUI/Tab.hpp index 4d14f9de1..c755f91f1 100644 --- a/xs/src/slic3r/GUI/Tab.hpp +++ b/xs/src/slic3r/GUI/Tab.hpp @@ -102,10 +102,10 @@ using PageShp = std::shared_ptr; class Tab: public wxPanel { wxNotebook* m_parent; -//#ifdef __WXOSX__ +#ifdef __WXOSX__ wxPanel* m_tmp_panel; int m_size_move = -1; -//#endif // __WXOSX__ +#endif // __WXOSX__ protected: std::string m_name; const wxString m_title; From 2cbf5b75db3ce89171a9cb0e39f94c72816e3230 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Thu, 28 Jun 2018 18:30:22 +0200 Subject: [PATCH 097/198] Final Fix of tooltips on OSX showing on the first page of a parameter tab. --- xs/src/slic3r/GUI/Tab.cpp | 91 ++++++++++++++++++++------------------- xs/src/slic3r/GUI/Tab.hpp | 7 +-- 2 files changed, 51 insertions(+), 47 deletions(-) diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index b3b3c6139..f41a14e93 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -40,39 +40,54 @@ void Tab::create_preset_tab(PresetBundle *preset_bundle) m_preset_bundle = preset_bundle; // Vertical sizer to hold the choice menu and the rest of the page. +#ifdef __WXOSX__ + auto *main_sizer = new wxBoxSizer(wxVERTICAL); + main_sizer->SetSizeHints(this); + this->SetSizer(main_sizer); + + // Create additional panel to Fit() it from OnActivate() + // It's needed for tooltip showing on OSX + m_tmp_panel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBK_LEFT | wxTAB_TRAVERSAL); + auto panel = m_tmp_panel; + auto sizer = new wxBoxSizer(wxVERTICAL); + m_tmp_panel->SetSizer(sizer); + m_tmp_panel->Layout(); + + main_sizer->Add(m_tmp_panel, 1, wxEXPAND | wxALL, 0); +#else Tab *panel = this; auto *sizer = new wxBoxSizer(wxVERTICAL); sizer->SetSizeHints(panel); panel->SetSizer(sizer); +#endif //__WXOSX__ // preset chooser m_presets_choice = new wxBitmapComboBox(panel, wxID_ANY, "", wxDefaultPosition, wxSize(270, -1), 0, 0,wxCB_READONLY); + auto color = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); //buttons - m_btn_panel = new wxPanel(panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBK_LEFT | wxTAB_TRAVERSAL); - wxBitmap bmpMenu; bmpMenu = wxBitmap(from_u8(Slic3r::var("disk.png")), wxBITMAP_TYPE_PNG); - m_btn_save_preset = new wxBitmapButton(m_btn_panel, wxID_ANY, bmpMenu, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE); + m_btn_save_preset = new wxBitmapButton(panel, wxID_ANY, bmpMenu, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE); if (wxMSW) m_btn_save_preset->SetBackgroundColour(color); bmpMenu = wxBitmap(from_u8(Slic3r::var("delete.png")), wxBITMAP_TYPE_PNG); - m_btn_delete_preset = new wxBitmapButton(m_btn_panel, wxID_ANY, bmpMenu, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE); + m_btn_delete_preset = new wxBitmapButton(panel, wxID_ANY, bmpMenu, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE); if (wxMSW) m_btn_delete_preset->SetBackgroundColour(color); m_show_incompatible_presets = false; m_bmp_show_incompatible_presets.LoadFile(from_u8(Slic3r::var("flag-red-icon.png")), wxBITMAP_TYPE_PNG); m_bmp_hide_incompatible_presets.LoadFile(from_u8(Slic3r::var("flag-green-icon.png")), wxBITMAP_TYPE_PNG); - m_btn_hide_incompatible_presets = new wxBitmapButton(m_btn_panel, wxID_ANY, m_bmp_hide_incompatible_presets, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE); + m_btn_hide_incompatible_presets = new wxBitmapButton(panel, wxID_ANY, m_bmp_hide_incompatible_presets, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE); if (wxMSW) m_btn_hide_incompatible_presets->SetBackgroundColour(color); m_btn_save_preset->SetToolTip(_(L("Save current ")) + m_title); m_btn_delete_preset->SetToolTip(_(L("Delete this preset"))); m_btn_delete_preset->Disable(); - m_undo_btn = new wxButton(m_btn_panel, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT | wxNO_BORDER); - m_undo_to_sys_btn = new wxButton(m_btn_panel, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT | wxNO_BORDER); - m_question_btn = new wxButton(m_btn_panel, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT | wxNO_BORDER); + m_undo_btn = new wxButton(panel, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT | wxNO_BORDER); + m_undo_to_sys_btn = new wxButton(panel, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT | wxNO_BORDER); + m_question_btn = new wxButton(panel, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT | wxNO_BORDER); if (wxMSW) { m_undo_btn->SetBackgroundColour(color); m_undo_to_sys_btn->SetBackgroundColour(color); @@ -119,32 +134,26 @@ void Tab::create_preset_tab(PresetBundle *preset_bundle) m_modified_label_clr = get_label_clr_modified(); m_default_text_clr = get_label_clr_default(); - auto btn_sizer = new wxBoxSizer(wxHORIZONTAL); - m_btn_panel->SetSizer(btn_sizer); - m_btn_panel->Layout(); - - btn_sizer->Add(m_btn_save_preset, 0, wxALIGN_CENTER_VERTICAL); - btn_sizer->AddSpacer(4); - btn_sizer->Add(m_btn_delete_preset, 0, wxALIGN_CENTER_VERTICAL); - btn_sizer->AddSpacer(16); - btn_sizer->Add(m_btn_hide_incompatible_presets, 0, wxALIGN_CENTER_VERTICAL); - btn_sizer->AddSpacer(64); - btn_sizer->Add(m_undo_to_sys_btn, 0, wxALIGN_CENTER_VERTICAL); - btn_sizer->Add(m_undo_btn, 0, wxALIGN_CENTER_VERTICAL); - btn_sizer->AddSpacer(32); - btn_sizer->Add(m_question_btn, 0, wxALIGN_CENTER_VERTICAL); - m_hsizer = new wxBoxSizer(wxHORIZONTAL); sizer->Add(m_hsizer, 0, wxBOTTOM, 3); m_hsizer->Add(m_presets_choice, 1, wxLEFT | wxRIGHT | wxTOP | wxALIGN_CENTER_VERTICAL, 3); m_hsizer->AddSpacer(4); - m_hsizer->Add(m_btn_panel, 0, wxALIGN_CENTER_VERTICAL); + m_hsizer->Add(m_btn_save_preset, 0, wxALIGN_CENTER_VERTICAL); + m_hsizer->AddSpacer(4); + m_hsizer->Add(m_btn_delete_preset, 0, wxALIGN_CENTER_VERTICAL); + m_hsizer->AddSpacer(16); + m_hsizer->Add(m_btn_hide_incompatible_presets, 0, wxALIGN_CENTER_VERTICAL); + m_hsizer->AddSpacer(64); + m_hsizer->Add(m_undo_to_sys_btn, 0, wxALIGN_CENTER_VERTICAL); + m_hsizer->Add(m_undo_btn, 0, wxALIGN_CENTER_VERTICAL); + m_hsizer->AddSpacer(32); + m_hsizer->Add(m_question_btn, 0, wxALIGN_CENTER_VERTICAL); +// m_hsizer->Add(m_cc_presets_choice, 1, wxLEFT | wxRIGHT | wxTOP | wxALIGN_CENTER_VERTICAL, 3); //Horizontal sizer to hold the tree and the selected page. m_hsizer = new wxBoxSizer(wxHORIZONTAL); sizer->Add(m_hsizer, 1, wxEXPAND, 0); - //left vertical sizer m_left_sizer = new wxBoxSizer(wxVERTICAL); m_hsizer->Add(m_left_sizer, 0, wxEXPAND | wxLEFT | wxTOP | wxBOTTOM, 3); @@ -220,7 +229,12 @@ PageShp Tab::add_options_page(const wxString& title, const std::string& icon, bo } } // Initialize the page. - PageShp page(new Page(this, title, icon_idx)); +#ifdef __WXOSX__ + auto panel = m_tmp_panel; +#else + auto panel = this; +#endif + PageShp page(new Page(panel, title, icon_idx)); page->SetScrollbars(1, 1, 1, 1); page->Hide(); m_hsizer->Add(page.get(), 1, wxEXPAND | wxLEFT, 5); @@ -236,21 +250,11 @@ void Tab::OnActivate() #ifdef __WXOSX__ wxWindowUpdateLocker noUpdates(this); - m_btn_panel->Fit(); - - Page* page = nullptr; - auto selection = m_treectrl->GetItemText(m_treectrl->GetSelection()); - for (auto p : m_pages) - if (p->title() == selection) - { - page = p.get(); - break; - } - if (page == nullptr) return; - page->Fit(); - m_hsizer->Layout(); - Refresh(); -#endif + auto size = GetSizer()->GetSize(); + m_tmp_panel->GetSizer()->SetMinSize(size.x + m_size_move, size.y); + Fit(); + m_size_move *= -1; +#endif // __WXOSX__ } void Tab::update_labels_colour() @@ -1209,9 +1213,9 @@ void TabPrint::update() void TabPrint::OnActivate() { - Tab::OnActivate(); m_recommended_thin_wall_thickness_description_line->SetText( from_u8(PresetHints::recommended_thin_wall_thickness(*m_preset_bundle))); + Tab::OnActivate(); } void TabFilament::build() @@ -1368,8 +1372,8 @@ void TabFilament::update() void TabFilament::OnActivate() { - Tab::OnActivate(); m_volumetric_speed_description_line->SetText(from_u8(PresetHints::maximum_volumetric_flow_description(*m_preset_bundle))); + Tab::OnActivate(); } wxSizer* Tab::description_line_widget(wxWindow* parent, ogStaticText* *StaticText) @@ -2051,7 +2055,6 @@ void Tab::OnTreeSelChange(wxTreeEvent& event) #endif page->Show(); - page->Fit(); m_hsizer->Layout(); Refresh(); diff --git a/xs/src/slic3r/GUI/Tab.hpp b/xs/src/slic3r/GUI/Tab.hpp index 633f89750..c755f91f1 100644 --- a/xs/src/slic3r/GUI/Tab.hpp +++ b/xs/src/slic3r/GUI/Tab.hpp @@ -102,6 +102,10 @@ using PageShp = std::shared_ptr; class Tab: public wxPanel { wxNotebook* m_parent; +#ifdef __WXOSX__ + wxPanel* m_tmp_panel; + int m_size_move = -1; +#endif // __WXOSX__ protected: std::string m_name; const wxString m_title; @@ -118,9 +122,6 @@ protected: wxButton* m_undo_btn; wxButton* m_undo_to_sys_btn; wxButton* m_question_btn; - - wxPanel* m_btn_panel; - wxComboCtrl* m_cc_presets_choice; wxDataViewTreeCtrl* m_presetctrl; wxImageList* m_preset_icons; From ad4d95f60c8a38630ec87889068d5404d2beae8d Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Thu, 28 Jun 2018 18:47:18 +0200 Subject: [PATCH 098/198] AppController integration --- lib/Slic3r/GUI/MainFrame.pm | 13 + xs/CMakeLists.txt | 4 + .../clipper_backend/clipper_backend.hpp | 6 +- xs/src/libnest2d/libnest2d/common.hpp | 31 ++ xs/src/libnest2d/libnest2d/libnest2d.hpp | 2 + xs/src/libnest2d/tests/main.cpp | 377 +++++++++++++++++- xs/src/libslic3r/Model.cpp | 21 +- xs/src/libslic3r/Model.hpp | 3 +- xs/src/perlglue.cpp | 2 + xs/src/slic3r/AppController.cpp | 310 ++++++++++++++ xs/src/slic3r/AppController.hpp | 267 +++++++++++++ xs/src/slic3r/AppControllerWx.cpp | 295 ++++++++++++++ xs/src/slic3r/IProgressIndicator.hpp | 84 ++++ xs/src/xsinit.h | 1 + xs/xsp/AppController.xsp | 27 ++ xs/xsp/my.map | 2 + xs/xsp/typemap.xspt | 2 + 17 files changed, 1435 insertions(+), 12 deletions(-) create mode 100644 xs/src/slic3r/AppController.cpp create mode 100644 xs/src/slic3r/AppController.hpp create mode 100644 xs/src/slic3r/AppControllerWx.cpp create mode 100644 xs/src/slic3r/IProgressIndicator.hpp create mode 100644 xs/xsp/AppController.xsp diff --git a/lib/Slic3r/GUI/MainFrame.pm b/lib/Slic3r/GUI/MainFrame.pm index 2b93351f8..e7af03b6a 100644 --- a/lib/Slic3r/GUI/MainFrame.pm +++ b/lib/Slic3r/GUI/MainFrame.pm @@ -19,6 +19,7 @@ use Wx::Locale gettext => 'L'; our $qs_last_input_file; our $qs_last_output_file; our $last_config; +our $appController; # Events to be sent from a C++ Tab implementation: # 1) To inform about a change of a configuration value. @@ -31,6 +32,9 @@ sub new { my $self = $class->SUPER::new(undef, -1, $Slic3r::FORK_NAME . ' - ' . $Slic3r::VERSION, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE); Slic3r::GUI::set_main_frame($self); + + $appController = Slic3r::AppController->new(); + if ($^O eq 'MSWin32') { # Load the icon either from the exe, or from the ico file. my $iconfile = Slic3r::decode_path($FindBin::Bin) . '\slic3r.exe'; @@ -62,6 +66,15 @@ sub new { $self->{statusbar}->SetStatusText(L("Version ").$Slic3r::VERSION.L(" - Remember to check for updates at http://github.com/prusa3d/slic3r/releases")); $self->SetStatusBar($self->{statusbar}); + # Make the global status bar and its progress indicator available in C++ + $appController->set_global_progress_indicator( + $self->{statusbar}->{prog}->GetId(), + $self->{statusbar}->GetId(), + ); + + $appController->set_model($self->{plater}->{model}); + $appController->set_print($self->{plater}->{print}); + $self->{loaded} = 1; # initialize layout diff --git a/xs/CMakeLists.txt b/xs/CMakeLists.txt index 7e9c57a0a..c3821ffc9 100644 --- a/xs/CMakeLists.txt +++ b/xs/CMakeLists.txt @@ -240,6 +240,10 @@ add_library(libslic3r_gui STATIC ${LIBDIR}/slic3r/Utils/PresetUpdater.hpp ${LIBDIR}/slic3r/Utils/Time.cpp ${LIBDIR}/slic3r/Utils/Time.hpp + ${LIBDIR}/slic3r/IProgressIndicator.hpp + ${LIBDIR}/slic3r/AppController.hpp + ${LIBDIR}/slic3r/AppController.cpp + ${LIBDIR}/slic3r/AppControllerWx.cpp ) add_library(admesh STATIC diff --git a/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp index ef9a2b622..1306525c2 100644 --- a/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp +++ b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp @@ -142,6 +142,9 @@ inline void ShapeLike::offset(PolygonImpl& sh, TCoord distance) { using ClipperLib::etClosedPolygon; using ClipperLib::Paths; + // If the input is not at least a triangle, we can not do this algorithm + if(sh.Contour.size() <= 3) throw GeometryException(GeoErr::OFFSET); + ClipperOffset offs; Paths result; offs.AddPath(sh.Contour, jtMiter, etClosedPolygon); @@ -151,7 +154,8 @@ inline void ShapeLike::offset(PolygonImpl& sh, TCoord distance) { // it removes the last vertex as well so boost will not have a closed // polygon - assert(result.size() == 1); + if(result.size() != 1) throw GeometryException(GeoErr::OFFSET); + sh.Contour = result.front(); // recreate closed polygon diff --git a/xs/src/libnest2d/libnest2d/common.hpp b/xs/src/libnest2d/libnest2d/common.hpp index 9de75415b..da2e36fb1 100644 --- a/xs/src/libnest2d/libnest2d/common.hpp +++ b/xs/src/libnest2d/libnest2d/common.hpp @@ -205,5 +205,36 @@ inline Radians::Radians(const Degrees °s): Double( degs * Pi/180) {} inline double Radians::toDegrees() { return operator Degrees(); } +enum class GeoErr : std::size_t { + OFFSET, + MERGE, + NFP +}; + +static const std::string ERROR_STR[] = { + "Offsetting could not be done! An invalid geometry may have been added." + "Error while merging geometries!" + "No fit polygon cannaot be calculated." +}; + +class GeometryException: public std::exception { + + virtual const char * errorstr(GeoErr errcode) const { + return ERROR_STR[static_cast(errcode)].c_str(); + } + + GeoErr errcode_; +public: + + GeometryException(GeoErr code): errcode_(code) {} + + GeoErr errcode() const { return errcode_; } + + virtual const char * what() const override { + return errorstr(errcode_); + } +}; + + } #endif // LIBNEST2D_CONFIG_HPP diff --git a/xs/src/libnest2d/libnest2d/libnest2d.hpp b/xs/src/libnest2d/libnest2d/libnest2d.hpp index aa36bd1bf..60d9c1ff4 100644 --- a/xs/src/libnest2d/libnest2d/libnest2d.hpp +++ b/xs/src/libnest2d/libnest2d/libnest2d.hpp @@ -648,6 +648,8 @@ public: using IndexedPackGroup = _IndexedPackGroup; using PackGroup = _PackGroup; + using ResultType = PackGroup; + using ResultTypeIndexed = IndexedPackGroup; private: BinType bin_; diff --git a/xs/src/libnest2d/tests/main.cpp b/xs/src/libnest2d/tests/main.cpp index 20dab3529..db890cdca 100644 --- a/xs/src/libnest2d/tests/main.cpp +++ b/xs/src/libnest2d/tests/main.cpp @@ -74,10 +74,370 @@ void arrangeRectangles() { // {{0, 0}, {0, 20*SCALE}, {10*SCALE, 0}, {0, 0}} // }; + std::vector crasher = { + { + {-10836093, -2542602}, + {-10834392, -1849197}, + {-10826793, 1172203}, + {-10824993, 1884506}, + {-10823291, 2547500}, + {-10822994, 2642700}, + {-10807392, 2768295}, + {-10414295, 3030403}, + {-9677799, 3516204}, + {-9555896, 3531204}, + {-9445194, 3534698}, + {9353008, 3487297}, + {9463504, 3486999}, + {9574008, 3482902}, + {9695903, 3467399}, + {10684803, 2805702}, + {10814098, 2717803}, + {10832805, 2599502}, + {10836200, 2416801}, + {10819705, -2650299}, + {10800403, -2772300}, + {10670505, -2859596}, + {9800403, -3436599}, + {9678203, -3516197}, + {9556308, -3531196}, + {9445903, -3534698}, + {9084011, -3533798}, + {-9234294, -3487701}, + {-9462894, -3486999}, + {-9573497, -3483001}, + {-9695392, -3467300}, + {-9816898, -3387199}, + {-10429492, -2977798}, + {-10821193, -2714096}, + {-10836200, -2588195}, + {-10836093, -2542602}, + }, + { + {-3533699, -9084051}, + {-3487197, 9352449}, + {-3486797, 9462949}, + {-3482795, 9573547}, + {-3467201, 9695350}, + {-3386997, 9816949}, + {-2977699, 10429548}, + {-2713897, 10821249}, + {-2587997, 10836149}, + {-2542396, 10836149}, + {-2054698, 10834949}, + {2223503, 10824150}, + {2459800, 10823547}, + {2555002, 10823247}, + {2642601, 10822948}, + {2768301, 10807350}, + {3030302, 10414247}, + {3516099, 9677850}, + {3531002, 9555850}, + {3534502, 9445247}, + {3534301, 9334949}, + {3487300, -9353052}, + {3486904, -9463548}, + {3482801, -9574148}, + {3467302, -9695848}, + {2805601, -10684751}, + {2717802, -10814149}, + {2599403, -10832952}, + {2416801, -10836149}, + {-2650199, -10819749}, + {-2772197, -10800451}, + {-2859397, -10670450}, + {-3436401, -9800451}, + {-3515998, -9678350}, + {-3530998, -9556451}, + {-3534500, -9445848}, + {-3533699, -9084051}, + }, + { + {-3533798, -9084051}, + {-3487697, 9234249}, + {-3486999, 9462949}, + {-3482997, 9573547}, + {-3467296, 9695350}, + {-3387199, 9816949}, + {-2977798, 10429548}, + {-2714096, 10821249}, + {-2588199, 10836149}, + {-2542594, 10836149}, + {-2054798, 10834949}, + {2223701, 10824150}, + {2459903, 10823547}, + {2555202, 10823247}, + {2642704, 10822948}, + {2768302, 10807350}, + {3030403, 10414247}, + {3516204, 9677850}, + {3531204, 9555850}, + {3534702, 9445247}, + {3487300, -9353052}, + {3486999, -9463548}, + {3482902, -9574148}, + {3467403, -9695848}, + {2805702, -10684751}, + {2717803, -10814149}, + {2599502, -10832952}, + {2416801, -10836149}, + {-2650299, -10819749}, + {-2772296, -10800451}, + {-2859596, -10670450}, + {-3436595, -9800451}, + {-3516197, -9678350}, + {-3531196, -9556451}, + {-3534698, -9445848}, + {-3533798, -9084051}, + }, + { + {-49433151, 4289947}, + {-49407352, 4421947}, + {-49355751, 4534446}, + {-29789449, 36223850}, + {-29737350, 36307445}, + {-29512149, 36401447}, + {-29089149, 36511646}, + {-28894351, 36550342}, + {-18984951, 37803447}, + {-18857151, 37815151}, + {-18271148, 37768947}, + {-18146148, 37755146}, + {-17365447, 37643947}, + {-17116649, 37601146}, + {11243545, 29732448}, + {29276451, 24568149}, + {29497543, 24486148}, + {29654548, 24410953}, + {31574546, 23132640}, + {33732849, 21695148}, + {33881950, 21584445}, + {34019454, 21471950}, + {34623153, 20939151}, + {34751945, 20816951}, + {35249244, 20314647}, + {36681549, 18775447}, + {36766548, 18680446}, + {36794250, 18647144}, + {36893951, 18521953}, + {37365951, 17881946}, + {37440948, 17779247}, + {37529243, 17642444}, + {42233245, 10012245}, + {42307250, 9884048}, + {42452949, 9626548}, + {44258949, 4766647}, + {48122245, -5990951}, + {48160751, -6117950}, + {49381546, -17083953}, + {49412246, -17420953}, + {49429450, -18011253}, + {49436141, -18702651}, + {49438949, -20087953}, + {49262947, -24000852}, + {49172546, -24522455}, + {48847549, -25859151}, + {48623847, -26705650}, + {48120246, -28514953}, + {48067146, -28699455}, + {48017845, -28862453}, + {47941543, -29096954}, + {47892547, -29246852}, + {47813545, -29466651}, + {47758453, -29612955}, + {47307548, -30803253}, + {46926544, -31807151}, + {46891448, -31899551}, + {46672546, -32475852}, + {46502449, -32914852}, + {46414451, -33140853}, + {46294250, -33447650}, + {46080146, -33980255}, + {46039245, -34071853}, + {45970542, -34186653}, + {45904243, -34295955}, + {45786247, -34475650}, + {43063247, -37740955}, + {42989547, -37815151}, + {12128349, -36354953}, + {12101844, -36343955}, + {11806152, -36217453}, + {7052848, -34171649}, + {-3234352, -29743150}, + {-15684650, -24381851}, + {-16573852, -23998851}, + {-20328948, -22381254}, + {-20383052, -22357254}, + {-20511447, -22280651}, + {-42221252, -8719951}, + {-42317150, -8653255}, + {-42457851, -8528949}, + {-42600151, -8399852}, + {-47935852, -2722949}, + {-48230651, -2316852}, + {-48500850, -1713150}, + {-48516853, -1676551}, + {-48974651, -519649}, + {-49003852, -412551}, + {-49077850, -129650}, + {-49239753, 735946}, + {-49312652, 1188549}, + {-49349349, 1467647}, + {-49351650, 1513347}, + {-49438949, 4165744}, + {-49433151, 4289947}, + }, +// { +// {6000, 5851}, +// {-6000, -5851}, +// {6000, 5851}, +// }, + { + {-10836097, -2542396}, + {-10834396, -1848999}, + {-10826797, 1172000}, + {-10825000, 1884403}, + {-10823299, 2547401}, + {-10822998, 2642604}, + {-10807395, 2768299}, + {-10414299, 3030300}, + {-9677799, 3516101}, + {-9555896, 3531002}, + {-9445198, 3534500}, + {-9334899, 3534297}, + {9353000, 3487300}, + {9463499, 3486904}, + {9573999, 3482799}, + {9695901, 3467300}, + {10684803, 2805603}, + {10814102, 2717800}, + {10832803, 2599399}, + {10836200, 2416797}, + {10819700, -2650199}, + {10800401, -2772201}, + {10670499, -2859397}, + {9800401, -3436397}, + {9678201, -3515998}, + {9556303, -3530998}, + {9445901, -3534500}, + {9083999, -3533699}, + {-9352500, -3487201}, + {-9462898, -3486797}, + {-9573501, -3482799}, + {-9695396, -3467201}, + {-9816898, -3386997}, + {-10429500, -2977699}, + {-10821197, -2713897}, + {-10836196, -2588001}, + {-10836097, -2542396}, + }, + { + {-47073699, 26300853}, + {-47009803, 27392650}, + {-46855804, 28327953}, + {-46829402, 28427051}, + {-46764102, 28657550}, + {-46200401, 30466648}, + {-46066703, 30832347}, + {-45887104, 31247554}, + {-45663700, 31670848}, + {-45414802, 32080554}, + {-45273700, 32308956}, + {-45179702, 32431850}, + {-45057804, 32549350}, + {-34670803, 40990154}, + {-34539802, 41094348}, + {-34393600, 41184452}, + {-34284805, 41229953}, + {-34080402, 41267154}, + {17335296, 48077648}, + {18460296, 48153553}, + {18976600, 48182147}, + {20403999, 48148555}, + {20562301, 48131153}, + {20706001, 48102855}, + {20938796, 48053150}, + {21134101, 48010051}, + {21483192, 47920154}, + {21904701, 47806346}, + {22180099, 47670154}, + {22357795, 47581645}, + {22615295, 47423046}, + {22782295, 47294651}, + {24281791, 45908344}, + {24405296, 45784854}, + {41569297, 21952449}, + {41784301, 21638050}, + {41938491, 21393650}, + {42030899, 21245052}, + {42172996, 21015850}, + {42415298, 20607151}, + {42468299, 20504650}, + {42553100, 20320850}, + {42584594, 20250644}, + {42684997, 20004344}, + {42807098, 19672351}, + {42939002, 19255153}, + {43052299, 18693950}, + {45094100, 7846851}, + {45118400, 7684154}, + {47079101, -16562252}, + {47082000, -16705646}, + {46916297, -22172447}, + {46911598, -22294349}, + {46874893, -22358146}, + {44866996, -25470146}, + {30996795, -46852050}, + {30904998, -46933750}, + {30864791, -46945850}, + {9315696, -48169147}, + {9086494, -48182147}, + {8895500, -48160049}, + {8513496, -48099548}, + {8273696, -48057350}, + {8180198, -48039051}, + {7319801, -47854949}, + {6288299, -47569950}, + {6238498, -47554248}, + {5936199, -47453250}, + {-11930000, -41351551}, + {-28986402, -33654148}, + {-29111103, -33597148}, + {-29201803, -33544147}, + {-29324401, -33467845}, + {-29467000, -33352848}, + {-29606603, -33229351}, + {-31140401, -31849147}, + {-31264303, -31736450}, + {-31385803, -31625452}, + {-31829103, -31216148}, + {-32127403, -30935951}, + {-32253803, -30809648}, + {-32364803, -30672147}, + {-34225402, -28078847}, + {-35819404, -25762451}, + {-36304801, -25035346}, + {-36506103, -24696445}, + {-36574104, -24560146}, + {-36926700, -23768646}, + {-39767402, -17341148}, + {-39904102, -16960147}, + {-41008602, -11799850}, + {-43227401, -704147}, + {-43247303, -577148}, + {-47057403, 24847454}, + {-47077602, 25021648}, + {-47080101, 25128650}, + {-47082000, 25562953}, + {-47073699, 26300853}, + }, + }; + std::vector input; - input.insert(input.end(), prusaParts().begin(), prusaParts().end()); +// input.insert(input.end(), prusaParts().begin(), prusaParts().end()); // input.insert(input.end(), stegoParts().begin(), stegoParts().end()); // input.insert(input.end(), rects.begin(), rects.end()); + input.insert(input.end(), crasher.begin(), crasher.end()); Box bin(250*SCALE, 210*SCALE); @@ -90,7 +450,7 @@ void arrangeRectangles() { // pconf.rotations = {0.0, Pi/2.0, Pi, 3*Pi/2}; Packer::SelectionConfig sconf; sconf.allow_parallel = true; - sconf.force_parallel = false; + sconf.force_parallel = true; sconf.try_reverse_order = false; Packer arrange(bin, min_obj_distance, pconf, sconf); @@ -107,8 +467,17 @@ void arrangeRectangles() { Benchmark bench; bench.start(); - auto result = arrange.arrange(input.begin(), - input.end()); + Packer::ResultType result; + + try { + result = arrange.arrange(input.begin(), input.end()); + } catch(GeometryException& ge) { + std::cerr << "Geometry error: " << ge.what() << std::endl; + return ; + } catch(std::exception& e) { + std::cerr << "Exception: " << e.what() << std::endl; + return ; + } bench.stop(); diff --git a/xs/src/libslic3r/Model.cpp b/xs/src/libslic3r/Model.cpp index 743b253e3..a46600350 100644 --- a/xs/src/libslic3r/Model.cpp +++ b/xs/src/libslic3r/Model.cpp @@ -377,7 +377,8 @@ ShapeData2D projectModelFromTop(const Slic3r::Model &model) { * them). */ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, - bool first_bin_only) + bool first_bin_only, + std::function progressind) { using ArrangeResult = _IndexedPackGroup; @@ -435,7 +436,7 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, biggest = &item; } } - shapes.push_back(std::ref(it.second)); + if(it.second.vertexCount() > 3) shapes.push_back(std::ref(it.second)); }); Box bin; @@ -471,12 +472,19 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, Arranger arranger(bin, min_obj_distance, pcfg, scfg); arranger.useMinimumBoundigBoxRotation(); + arranger.progressIndicator(progressind); + std::cout << "Arranging model..." << std::endl; bench.start(); // Arrange and return the items with their respective indices within the // input sequence. - ArrangeResult result = - arranger.arrangeIndexed(shapes.begin(), shapes.end()); + + ArrangeResult result; + try { + result = arranger.arrangeIndexed(shapes.begin(), shapes.end()); + } catch(std::exception& e) { + std::cerr << "An exception occured: " << e.what() << std::endl; + } bench.stop(); std::cout << "Model arranged in " << bench.getElapsedSec() @@ -543,12 +551,13 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, /* arrange objects preserving their instance count but altering their instance positions */ -bool Model::arrange_objects(coordf_t dist, const BoundingBoxf* bb) +bool Model::arrange_objects(coordf_t dist, const BoundingBoxf* bb, + std::function progressind) { bool ret = false; if(bb != nullptr && bb->defined) { const bool FIRST_BIN_ONLY = false; - ret = arr::arrange(*this, dist, bb, FIRST_BIN_ONLY); + ret = arr::arrange(*this, dist, bb, FIRST_BIN_ONLY, progressind); } else { // get the (transformed) size of each instance so that we take // into account their different transformations when packing diff --git a/xs/src/libslic3r/Model.hpp b/xs/src/libslic3r/Model.hpp index 42b0a9edb..e7d1318f9 100644 --- a/xs/src/libslic3r/Model.hpp +++ b/xs/src/libslic3r/Model.hpp @@ -274,7 +274,8 @@ public: void center_instances_around_point(const Pointf &point); void translate(coordf_t x, coordf_t y, coordf_t z) { for (ModelObject *o : this->objects) o->translate(x, y, z); } TriangleMesh mesh() const; - bool arrange_objects(coordf_t dist, const BoundingBoxf* bb = NULL); + bool arrange_objects(coordf_t dist, const BoundingBoxf* bb = NULL, + std::function progressind = [](unsigned){}); // Croaks if the duplicated objects do not fit the print bed. void duplicate(size_t copies_num, coordf_t dist, const BoundingBoxf* bb = NULL); void duplicate_objects(size_t copies_num, coordf_t dist, const BoundingBoxf* bb = NULL); diff --git a/xs/src/perlglue.cpp b/xs/src/perlglue.cpp index 205eec218..c8aadc8c3 100644 --- a/xs/src/perlglue.cpp +++ b/xs/src/perlglue.cpp @@ -65,6 +65,8 @@ REGISTER_CLASS(PresetBundle, "GUI::PresetBundle"); REGISTER_CLASS(TabIface, "GUI::Tab"); REGISTER_CLASS(PresetUpdater, "PresetUpdater"); REGISTER_CLASS(OctoPrint, "OctoPrint"); +REGISTER_CLASS(AppController, "AppController"); +REGISTER_CLASS(PrintController, "PrintController"); SV* ConfigBase__as_hash(ConfigBase* THIS) { diff --git a/xs/src/slic3r/AppController.cpp b/xs/src/slic3r/AppController.cpp new file mode 100644 index 000000000..abc8c9736 --- /dev/null +++ b/xs/src/slic3r/AppController.cpp @@ -0,0 +1,310 @@ +#include "AppController.hpp" + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +namespace Slic3r { + +class AppControllerBoilerplate::PriMap { +public: + using M = std::unordered_map; + std::mutex m; + M store; + std::thread::id ui_thread; + + inline explicit PriMap(std::thread::id uit): ui_thread(uit) {} +}; + +AppControllerBoilerplate::AppControllerBoilerplate() + :progressind_(new PriMap(std::this_thread::get_id())) {} + +AppControllerBoilerplate::~AppControllerBoilerplate() { + progressind_.reset(); +} + +bool AppControllerBoilerplate::is_main_thread() const +{ + return progressind_->ui_thread == std::this_thread::get_id(); +} + +namespace GUI { +PresetBundle* get_preset_bundle(); +} + +static const PrintObjectStep STEP_SLICE = posSlice; +static const PrintObjectStep STEP_PERIMETERS = posPerimeters; +static const PrintObjectStep STEP_PREPARE_INFILL = posPrepareInfill; +static const PrintObjectStep STEP_INFILL = posInfill; +static const PrintObjectStep STEP_SUPPORTMATERIAL = posSupportMaterial; +static const PrintStep STEP_SKIRT = psSkirt; +static const PrintStep STEP_BRIM = psBrim; +static const PrintStep STEP_WIPE_TOWER = psWipeTower; + +void AppControllerBoilerplate::progress_indicator( + AppControllerBoilerplate::ProgresIndicatorPtr progrind) { + progressind_->m.lock(); + progressind_->store[std::this_thread::get_id()] = progrind; + progressind_->m.unlock(); +} + +void AppControllerBoilerplate::progress_indicator(unsigned statenum, + const std::string &title, + const std::string &firstmsg) +{ + progressind_->m.lock(); + progressind_->store[std::this_thread::get_id()] = + create_progress_indicator(statenum, title, firstmsg);; + progressind_->m.unlock(); +} + +AppControllerBoilerplate::ProgresIndicatorPtr +AppControllerBoilerplate::progress_indicator() { + + PriMap::M::iterator pret; + ProgresIndicatorPtr ret; + + progressind_->m.lock(); + if( (pret = progressind_->store.find(std::this_thread::get_id())) + == progressind_->store.end()) + { + progressind_->store[std::this_thread::get_id()] = ret = + global_progressind_; + } else ret = pret->second; + progressind_->m.unlock(); + + return ret; +} + +void PrintController::make_skirt() +{ + assert(print_ != nullptr); + + // prerequisites + for(auto obj : print_->objects) make_perimeters(obj); + for(auto obj : print_->objects) infill(obj); + for(auto obj : print_->objects) gen_support_material(obj); + + if(!print_->state.is_done(STEP_SKIRT)) { + print_->state.set_started(STEP_SKIRT); + print_->skirt.clear(); + if(print_->has_skirt()) print_->_make_skirt(); + + print_->state.set_done(STEP_SKIRT); + } +} + +void PrintController::make_brim() +{ + assert(print_ != nullptr); + + // prerequisites + for(auto obj : print_->objects) make_perimeters(obj); + for(auto obj : print_->objects) infill(obj); + for(auto obj : print_->objects) gen_support_material(obj); + make_skirt(); + + if(!print_->state.is_done(STEP_BRIM)) { + print_->state.set_started(STEP_BRIM); + + // since this method must be idempotent, we clear brim paths *before* + // checking whether we need to generate them + print_->brim.clear(); + + if(print_->config.brim_width > 0) print_->_make_brim(); + + print_->state.set_done(STEP_BRIM); + } +} + +void PrintController::make_wipe_tower() +{ + assert(print_ != nullptr); + + // prerequisites + for(auto obj : print_->objects) make_perimeters(obj); + for(auto obj : print_->objects) infill(obj); + for(auto obj : print_->objects) gen_support_material(obj); + make_skirt(); + make_brim(); + + if(!print_->state.is_done(STEP_WIPE_TOWER)) { + print_->state.set_started(STEP_WIPE_TOWER); + + // since this method must be idempotent, we clear brim paths *before* + // checking whether we need to generate them + print_->brim.clear(); + + if(print_->has_wipe_tower()) print_->_make_wipe_tower(); + + print_->state.set_done(STEP_WIPE_TOWER); + } +} + +void PrintController::slice(PrintObject *pobj) +{ + assert(pobj != nullptr && print_ != nullptr); + + if(pobj->state.is_done(STEP_SLICE)) return; + + pobj->state.set_started(STEP_SLICE); + + pobj->_slice(); + + auto msg = pobj->_fix_slicing_errors(); + if(!msg.empty()) report_issue(IssueType::WARN, msg); + + // simplify slices if required + if (print_->config.resolution) + pobj->_simplify_slices(scale_(print_->config.resolution)); + + + if(pobj->layers.empty()) + report_issue(IssueType::ERR, + "No layers were detected. You might want to repair your " + "STL file(s) or check their size or thickness and retry" + ); + + pobj->state.set_done(STEP_SLICE); +} + +void PrintController::make_perimeters(PrintObject *pobj) +{ + assert(pobj != nullptr); + + slice(pobj); + + auto&& prgind = progress_indicator(); + + if (!pobj->state.is_done(STEP_PERIMETERS)) { + pobj->_make_perimeters(); + } +} + +void PrintController::infill(PrintObject *pobj) +{ + assert(pobj != nullptr); + + make_perimeters(pobj); + + if (!pobj->state.is_done(STEP_PREPARE_INFILL)) { + pobj->state.set_started(STEP_PREPARE_INFILL); + + pobj->_prepare_infill(); + + pobj->state.set_done(STEP_PREPARE_INFILL); + } + + pobj->_infill(); +} + +void PrintController::gen_support_material(PrintObject *pobj) +{ + assert(pobj != nullptr); + + // prerequisites + slice(pobj); + + if(!pobj->state.is_done(STEP_SUPPORTMATERIAL)) { + pobj->state.set_started(STEP_SUPPORTMATERIAL); + + pobj->clear_support_layers(); + + if((pobj->config.support_material || pobj->config.raft_layers > 0) + && pobj->layers.size() > 1) { + pobj->_generate_support_material(); + } + + pobj->state.set_done(STEP_SUPPORTMATERIAL); + } +} + +void PrintController::slice() +{ + Slic3r::trace(3, "Starting the slicing process."); + + progress_indicator()->update(20u, "Generating perimeters"); + for(auto obj : print_->objects) make_perimeters(obj); + + progress_indicator()->update(60u, "Infilling layers"); + for(auto obj : print_->objects) infill(obj); + + progress_indicator()->update(70u, "Generating support material"); + for(auto obj : print_->objects) gen_support_material(obj); + + progress_indicator()->message_fmt("Weight: %.1fg, Cost: %.1f", + print_->total_weight, + print_->total_cost); + + progress_indicator()->state(85u); + + + progress_indicator()->update(88u, "Generating skirt"); + make_skirt(); + + + progress_indicator()->update(90u, "Generating brim"); + make_brim(); + + progress_indicator()->update(95u, "Generating wipe tower"); + make_wipe_tower(); + + progress_indicator()->update(100u, "Done"); + + // time to make some statistics.. + + Slic3r::trace(3, "Slicing process finished."); +} + +void IProgressIndicator::message_fmt( + const std::string &fmtstr, ...) { + std::stringstream ss; + va_list args; + va_start(args, fmtstr); + + auto fmt = fmtstr.begin(); + + while (*fmt != '\0') { + if (*fmt == 'd') { + int i = va_arg(args, int); + ss << i << '\n'; + } else if (*fmt == 'c') { + // note automatic conversion to integral type + int c = va_arg(args, int); + ss << static_cast(c) << '\n'; + } else if (*fmt == 'f') { + double d = va_arg(args, double); + ss << d << '\n'; + } + ++fmt; + } + + va_end(args); + message(ss.str()); +} + +void AppController::arrange_model() +{ + std::async(supports_asynch()? std::launch::async : std::launch::deferred, + [this](){ + auto pind = progress_indicator(); + + // my $bb = Slic3r::Geometry::BoundingBoxf->new_from_points($self->{config}->bed_shape); + // my $success = $self->{model}->arrange_objects(wxTheApp->{preset_bundle}->full_config->min_object_distance, $bb); + double dist = GUI::get_preset_bundle()->full_config().option("min_object_distance")->getFloat(); + + std::cout << dist << std::endl; + }); +} + +} diff --git a/xs/src/slic3r/AppController.hpp b/xs/src/slic3r/AppController.hpp new file mode 100644 index 000000000..1dc825526 --- /dev/null +++ b/xs/src/slic3r/AppController.hpp @@ -0,0 +1,267 @@ +#ifndef APPCONTROLLER_HPP +#define APPCONTROLLER_HPP + +#include +#include +#include +#include +#include + +#include "IProgressIndicator.hpp" + +namespace Slic3r { + +class Model; +class Print; +class PrintObject; + +/** + * @brief A boilerplate class for creating application logic. It should provide + * features as issue reporting and progress indication, etc... + * + * The lower lever UI independent classes can be manipulated with a subclass + * of this controller class. We can also catch any exceptions that lower level + * methods could throw and display appropriate errors and warnings. + * + * Note that the outer and the inner interface of this class is free from any + * UI toolkit dependencies. We can implement it with any UI framework or make it + * a cli client. + */ +class AppControllerBoilerplate { + class PriMap; // Some structure to store progress indication data +public: + + /// A Progress indicator object smart pointer + using ProgresIndicatorPtr = std::shared_ptr; + +private: + + // Pimpl data for thread safe progress indication features + std::unique_ptr progressind_; + +public: + + AppControllerBoilerplate(); + ~AppControllerBoilerplate(); + + using Path = std::string; + using PathList = std::vector; + + /// Common runtime issue types + enum class IssueType { + INFO, + WARN, + WARN_Q, // Warning with a question to continue + ERR, + FATAL + }; + + /** + * @brief Query some paths from the user. + * + * It should display a file chooser dialog in case of a UI application. + * @param title Title of a possible query dialog. + * @param extensions Recognized file extensions. + * @return Returns a list of paths choosed by the user. + */ + PathList query_destination_paths( + const std::string& title, + const std::string& extensions) const; + + /** + * @brief Same as query_destination_paths but works for directories only. + */ + PathList query_destination_dirs( + const std::string& title) const; + + /** + * @brief Same as query_destination_paths but returns only one path. + */ + Path query_destination_path( + const std::string& title, + const std::string& extensions, + const std::string& hint = "") const; + + /** + * @brief Report an issue to the user be it fatal or recoverable. + * + * In a UI app this should display some message dialog. + * + * @param issuetype The type of the runtime issue. + * @param description A somewhat longer description of the issue. + * @param brief A very brief description. Can be used for message dialog + * title. + */ + bool report_issue(IssueType issuetype, + const std::string& description, + const std::string& brief = ""); + + /** + * @brief Set up a progress indicator for the current thread. + * @param progrind An already created progress indicator object. + */ + void progress_indicator(ProgresIndicatorPtr progrind); + + /** + * @brief Create and set up a new progress indicator for the current thread. + * @param statenum The number of states for the given procedure. + * @param title The title of the procedure. + * @param firstmsg The message for the first subtask to be displayed. + */ + void progress_indicator(unsigned statenum, + const std::string& title, + const std::string& firstmsg = ""); + + /** + * @brief Return the progress indicator set up for the current thread. This + * can be empty as well. + * @return A progress indicator object implementing IProgressIndicator. If + * a global progress indicator is available for the current implementation + * than this will be set up for the current thread and returned. + */ + ProgresIndicatorPtr progress_indicator(); + + /** + * @brief A predicate telling the caller whether it is the thread that + * created the AppConroller object itself. This probably means that the + * execution is in the UI thread. Otherwise it returns false meaning that + * some worker thread called this function. + * @return Return true for the same caller thread that created this + * object and false for every other. + */ + bool is_main_thread() const; + + /** + * @brief The frontend supports asynch execution. + * + * A Graphic UI will support this, a CLI may not. This can be used in + * subclass methods to decide whether to start threads for block free UI. + * + * Note that even a progress indicator's update called regularly can solve + * the blocking UI problem in some cases even when an event loop is present. + * This is how wxWidgets gauge work but creating a separate thread will make + * the UI even more fluent. + * + * @return true if a job or method can be executed asynchronously, false + * otherwise. + */ + bool supports_asynch() const; + +protected: + + /** + * @brief Create a new progress indicator and return a smart pointer to it. + * @param statenum The number of states for the given procedure. + * @param title The title of the procedure. + * @param firstmsg The message for the first subtask to be displayed. + * @return Smart pointer to the created object. + */ + ProgresIndicatorPtr create_progress_indicator( + unsigned statenum, + const std::string& title, + const std::string& firstmsg = "") const; + + // This is a global progress indicator placeholder. In the Slic3r UI it can + // contain the progress indicator on the statusbar. + ProgresIndicatorPtr global_progressind_; +}; + +/** + * @brief Implementation of the printing logic. + */ +class PrintController: public AppControllerBoilerplate { + Print *print_ = nullptr; +protected: + + void make_skirt(); + void make_brim(); + void make_wipe_tower(); + + void make_perimeters(PrintObject *pobj); + void infill(PrintObject *pobj); + void gen_support_material(PrintObject *pobj); + +public: + + // Must be public for perl to use it + explicit inline PrintController(Print *print): print_(print) {} + + PrintController(const PrintController&) = delete; + PrintController(PrintController&&) = delete; + + using Ptr = std::unique_ptr; + + inline static Ptr create(Print *print) { + return PrintController::Ptr( new PrintController(print) ); + } + + /** + * @brief Slice one pront object. + * @param pobj The print object. + */ + void slice(PrintObject *pobj); + + /** + * @brief Slice the loaded print scene. + */ + void slice(); +}; + +/** + * @brief Top level controller. + */ +class AppController: public AppControllerBoilerplate { + Model *model_ = nullptr; + PrintController::Ptr printctl; +public: + + /** + * @brief Get the print controller object. + * + * @return Return a raw pointer instead of a smart one for perl to be able + * to use this function and access the print controller. + */ + PrintController * print_ctl() { return printctl.get(); } + + /** + * @brief Set a model object. + * + * @param model A raw pointer to the model object. This can be used from + * perl. + */ + void set_model(Model *model) { model_ = model; } + + /** + * @brief Set the print object from perl. + * + * This will create a print controller that will then be accessible from + * perl. + * @param print A print object which can be a perl-ish extension as well. + */ + void set_print(Print *print) { + printctl = PrintController::create(print); + printctl->progress_indicator(progress_indicator()); + } + + /** + * @brief Set up a global progress indicator. + * + * In perl we have a progress indicating status bar on the bottom of the + * window which is defined and created in perl. We can pass the ID-s of the + * gauge and the statusbar id and make a wrapper implementation of the + * IProgressIndicator interface so we can use this GUI widget from C++. + * + * This function should be called from perl. + * + * @param gauge_id The ID of the gague widget of the status bar. + * @param statusbar_id The ID of the status bar. + */ + void set_global_progress_indicator(unsigned gauge_id, + unsigned statusbar_id); + + void arrange_model(); +}; + +} + +#endif // APPCONTROLLER_HPP diff --git a/xs/src/slic3r/AppControllerWx.cpp b/xs/src/slic3r/AppControllerWx.cpp new file mode 100644 index 000000000..c54c02d55 --- /dev/null +++ b/xs/src/slic3r/AppControllerWx.cpp @@ -0,0 +1,295 @@ +#include "AppController.hpp" + +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +// This source file implements the UI dependent methods of the AppControllers. +// It will be clear what is needed to be reimplemented in case of a UI framework +// change or a CLI client creation. In this particular case we use wxWidgets to +// implement everything. + +namespace Slic3r { + +bool AppControllerBoilerplate::supports_asynch() const +{ + return true; +} + +AppControllerBoilerplate::PathList +AppControllerBoilerplate::query_destination_paths( + const std::string &title, + const std::string &extensions) const +{ + + wxFileDialog dlg(wxTheApp->GetTopWindow(), wxString(title) ); + dlg.SetWildcard(extensions); + + dlg.ShowModal(); + + wxArrayString paths; + dlg.GetPaths(paths); + + PathList ret(paths.size(), ""); + for(auto& p : paths) ret.push_back(p.ToStdString()); + + return ret; +} + +AppControllerBoilerplate::Path +AppControllerBoilerplate::query_destination_path( + const std::string &title, + const std::string &extensions, + const std::string& hint) const +{ + wxFileDialog dlg(wxTheApp->GetTopWindow(), title ); + dlg.SetWildcard(extensions); + + dlg.SetFilename(hint); + + Path ret; + + if(dlg.ShowModal() == wxID_OK) { + ret = Path(dlg.GetPath()); + } + + return ret; +} + +bool AppControllerBoilerplate::report_issue(IssueType issuetype, + const std::string &description, + const std::string &brief) +{ + auto icon = wxICON_INFORMATION; + auto style = wxOK|wxCENTRE; + switch(issuetype) { + case IssueType::INFO: break; + case IssueType::WARN: icon = wxICON_WARNING; break; + case IssueType::WARN_Q: icon = wxICON_WARNING; style |= wxCANCEL; break; + case IssueType::ERR: + case IssueType::FATAL: icon = wxICON_ERROR; + } + + auto ret = wxMessageBox(description, brief, icon | style); + return ret != wxCANCEL; +} + +wxDEFINE_EVENT(PROGRESS_STATUS_UPDATE_EVENT, wxCommandEvent); + +namespace { + +/* + * A simple thread safe progress dialog implementation that can be used from + * the main thread as well. + */ +class GuiProgressIndicator: + public IProgressIndicator, public wxEvtHandler { + + std::shared_ptr gauge_; + using Base = IProgressIndicator; + wxString message_; + int range_; wxString title_; + unsigned prc_ = 0; + bool is_asynch_ = false; + + const int id_ = wxWindow::NewControlId(); + + // status update handler + void _state( wxCommandEvent& evt) { + unsigned st = evt.GetInt(); + _state(st); + } + + // Status update implementation + void _state( unsigned st) { + if(st < max()) { + if(!gauge_) gauge_ = std::make_shared( + title_, message_, range_, wxTheApp->GetTopWindow(), + wxPD_APP_MODAL | wxPD_AUTO_HIDE + ); + + if(!gauge_->IsShown()) gauge_->ShowModal(); + Base::state(st); + gauge_->Update(static_cast(st), message_); + } + + if(st == max()) { + prc_++; + if(prc_ == Base::procedure_count()) { + gauge_.reset(); + prc_ = 0; + } + } + } + +public: + + /// Setting whether it will be used from the UI thread or some worker thread + inline void asynch(bool is) { is_asynch_ = is; } + + /// Get the mode of parallel operation. + inline bool asynch() const { return is_asynch_; } + + inline GuiProgressIndicator(int range, const std::string& title, + const std::string& firstmsg) : + range_(range), message_(_(firstmsg)), title_(_(title)) + { + Base::max(static_cast(range)); + Base::states(static_cast(range)); + + Bind(PROGRESS_STATUS_UPDATE_EVENT, + &GuiProgressIndicator::_state, + this, id_); + } + + virtual void cancel() override { + update(max(), "Abort"); + IProgressIndicator::cancel(); + } + + virtual void state(float val) override { + if( val >= 1.0) state(static_cast(val)); + } + + void state(unsigned st) { + // send status update event + if(is_asynch_) { + auto evt = new wxCommandEvent(PROGRESS_STATUS_UPDATE_EVENT, id_); + evt->SetInt(st); + wxQueueEvent(this, evt); + } else _state(st); + } + + virtual void message(const std::string & msg) override { + message_ = _(msg); + } + + virtual void messageFmt(const std::string& fmt, ...) { + va_list arglist; + va_start(arglist, fmt); + message_ = wxString::Format(_(fmt), arglist); + va_end(arglist); + } + + virtual void title(const std::string & title) override { + title_ = _(title); + } +}; +} + +AppControllerBoilerplate::ProgresIndicatorPtr +AppControllerBoilerplate::create_progress_indicator( + unsigned statenum, const std::string& title, + const std::string& firstmsg) const +{ + auto pri = + std::make_shared(statenum, title, firstmsg); + + // We set up the mode of operation depending of the creator thread's + // identity + pri->asynch(!is_main_thread()); + + return pri; +} + +namespace { + +// A wrapper progress indicator class around the statusbar created in perl. +class Wrapper: public IProgressIndicator, public wxEvtHandler { + wxGauge *gauge_; + wxStatusBar *stbar_; + using Base = IProgressIndicator; + std::string message_; + AppControllerBoilerplate& ctl_; + + void showProgress(bool show = true) { + gauge_->Show(show); + } + + void _state(unsigned st) { + if( st <= max() ) { + Base::state(st); + + if(!gauge_->IsShown()) showProgress(true); + + stbar_->SetStatusText(message_); + if(st == gauge_->GetRange()) { + gauge_->SetValue(0); + showProgress(false); + } else { + gauge_->SetValue(static_cast(st)); + } + } + } + + // status update handler + void _state( wxCommandEvent& evt) { + unsigned st = evt.GetInt(); _state(st); + } + + const int id_ = wxWindow::NewControlId(); + +public: + + inline Wrapper(wxGauge *gauge, wxStatusBar *stbar, + AppControllerBoilerplate& ctl): + gauge_(gauge), stbar_(stbar), ctl_(ctl) + { + Base::max(static_cast(gauge->GetRange())); + Base::states(static_cast(gauge->GetRange())); + + Bind(PROGRESS_STATUS_UPDATE_EVENT, + &Wrapper::_state, + this, id_); + } + + virtual void state(float val) override { + if(val >= 1.0) state(unsigned(val)); + } + + void state(unsigned st) { + if(!ctl_.is_main_thread()) { + auto evt = new wxCommandEvent(PROGRESS_STATUS_UPDATE_EVENT, id_); + evt->SetInt(st); + wxQueueEvent(this, evt); + } else _state(st); + } + + virtual void message(const std::string & msg) override { + message_ = msg; + } + + virtual void message_fmt(const std::string& fmt, ...) override { + va_list arglist; + va_start(arglist, fmt); + message_ = wxString::Format(_(fmt), arglist); + va_end(arglist); + } + + virtual void title(const std::string & /*title*/) override {} + +}; +} + +void AppController::set_global_progress_indicator( + unsigned gid, + unsigned sid) +{ + wxGauge* gauge = dynamic_cast(wxWindow::FindWindowById(gid)); + wxStatusBar* sb = dynamic_cast(wxWindow::FindWindowById(sid)); + + if(gauge && sb) { + global_progressind_ = std::make_shared(gauge, sb, *this); + } +} + +} diff --git a/xs/src/slic3r/IProgressIndicator.hpp b/xs/src/slic3r/IProgressIndicator.hpp new file mode 100644 index 000000000..73296697f --- /dev/null +++ b/xs/src/slic3r/IProgressIndicator.hpp @@ -0,0 +1,84 @@ +#ifndef IPROGRESSINDICATOR_HPP +#define IPROGRESSINDICATOR_HPP + +#include +#include + +namespace Slic3r { + +/** + * @brief Generic progress indication interface. + */ +class IProgressIndicator { +public: + using CancelFn = std::function; // Cancel functio signature. + +private: + float state_ = .0f, max_ = 1.f, step_; + CancelFn cancelfunc_ = [](){}; + unsigned proc_count_ = 1; + +public: + + inline virtual ~IProgressIndicator() {} + + /// Get the maximum of the progress range. + float max() const { return max_; } + + /// Get the current progress state + float state() const { return state_; } + + /// Set the maximum of hte progress range + virtual void max(float maxval) { max_ = maxval; } + + /// Set the current state of the progress. + virtual void state(float val) { state_ = val; } + + /** + * @brief Number of states int the progress. Can be used insted of giving a + * maximum value. + */ + virtual void states(unsigned statenum) { + step_ = max_ / statenum; + } + + /// Message shown on the next status update. + virtual void message(const std::string&) = 0; + + /// Title of the operaton. + virtual void title(const std::string&) = 0; + + /// Formatted message for the next status update. Works just like sprinf. + virtual void message_fmt(const std::string& fmt, ...); + + /// Set up a cancel callback for the operation if feasible. + inline void on_cancel(CancelFn func) { cancelfunc_ = func; } + + /** + * Explicitly shut down the progress indicator and call the associated + * callback. + */ + virtual void cancel() { cancelfunc_(); } + + /** + * \brief Set up how many subprocedures does the whole operation contain. + * + * This was neccesary from practical reasons. If the progress indicator is + * a dialog and we want to show the progress of a few sub operations than + * the dialog wont be closed and reopened each time a new sub operation is + * started. This is not a mandatory feature and can be ignored completely. + */ + inline void procedure_count(unsigned pc) { proc_count_ = pc; } + + /// Get the current procedure count + inline unsigned procedure_count() const { return proc_count_; } + + /// Convinience function to call message and status update in one function. + void update(float st, const std::string& msg) { + message(msg); state(st); + } +}; + +} + +#endif // IPROGRESSINDICATOR_HPP diff --git a/xs/src/xsinit.h b/xs/src/xsinit.h index 01c1293ac..9365f1979 100644 --- a/xs/src/xsinit.h +++ b/xs/src/xsinit.h @@ -80,6 +80,7 @@ extern "C" { #include #include #include +#include namespace Slic3r { diff --git a/xs/xsp/AppController.xsp b/xs/xsp/AppController.xsp new file mode 100644 index 000000000..1b653081d --- /dev/null +++ b/xs/xsp/AppController.xsp @@ -0,0 +1,27 @@ +%module{Slic3r::XS}; + +%{ +#include +#include "slic3r/AppController.hpp" +#include "libslic3r/Model.hpp" +#include "libslic3r/Print.hpp" +%} + +%name{Slic3r::PrintController} class PrintController { + + PrintController(Print *print); + + void slice(); +}; + +%name{Slic3r::AppController} class AppController { + + AppController(); + + PrintController *print_ctl(); + void set_model(Model *model); + void set_print(Print *print); + void set_global_progress_indicator(unsigned gauge_id, unsigned statusbar_id); + + void arrange_model(); +}; \ No newline at end of file diff --git a/xs/xsp/my.map b/xs/xsp/my.map index cc902acae..4a14f483f 100644 --- a/xs/xsp/my.map +++ b/xs/xsp/my.map @@ -216,6 +216,8 @@ Ref O_OBJECT_SLIC3R_T Clone O_OBJECT_SLIC3R_T AppConfig* O_OBJECT_SLIC3R +AppController* O_OBJECT_SLIC3R +PrintController* O_OBJECT_SLIC3R Ref O_OBJECT_SLIC3R_T GLShader* O_OBJECT_SLIC3R diff --git a/xs/xsp/typemap.xspt b/xs/xsp/typemap.xspt index 57eae1598..b576b1373 100644 --- a/xs/xsp/typemap.xspt +++ b/xs/xsp/typemap.xspt @@ -268,3 +268,5 @@ $CVar = (PrintObjectStep)SvUV($PerlVar); %}; }; +%typemap{AppController*}; +%typemap{PrintController*}; From d3b19382fe6a035438ca93bac495a99e51fbcb4f Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Thu, 28 Jun 2018 19:16:36 +0200 Subject: [PATCH 099/198] AppController reachable trough Plater.pm --- lib/Slic3r/GUI/MainFrame.pm | 2 ++ lib/Slic3r/GUI/Plater.pm | 8 ++++++-- xs/CMakeLists.txt | 1 + xs/src/slic3r/AppController.cpp | 11 +++++++---- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/lib/Slic3r/GUI/MainFrame.pm b/lib/Slic3r/GUI/MainFrame.pm index c38f324f4..2fdd7e11d 100644 --- a/lib/Slic3r/GUI/MainFrame.pm +++ b/lib/Slic3r/GUI/MainFrame.pm @@ -75,6 +75,8 @@ sub new { $appController->set_model($self->{plater}->{model}); $appController->set_print($self->{plater}->{print}); + $self->{plater}->{appController} = $appController; + $self->{loaded} = 1; # initialize layout diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 2b0a5a0d5..db51dfe38 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -45,6 +45,7 @@ use constant FILAMENT_CHOOSERS_SPACING => 0; use constant PROCESS_DELAY => 0.5 * 1000; # milliseconds my $PreventListEvents = 0; +our $appController; sub new { my ($class, $parent) = @_; @@ -1188,8 +1189,11 @@ sub arrange { $self->pause_background_process; - my $bb = Slic3r::Geometry::BoundingBoxf->new_from_points($self->{config}->bed_shape); - my $success = $self->{model}->arrange_objects(wxTheApp->{preset_bundle}->full_config->min_object_distance, $bb); + # my $bb = Slic3r::Geometry::BoundingBoxf->new_from_points($self->{config}->bed_shape); + # my $success = $self->{model}->arrange_objects(wxTheApp->{preset_bundle}->full_config->min_object_distance, $bb); + + $self->{appController}->arrange_model; + # ignore arrange failures on purpose: user has visual feedback and we don't need to warn him # when parts don't fit in print bed diff --git a/xs/CMakeLists.txt b/xs/CMakeLists.txt index 2ddedd90e..4beb67964 100644 --- a/xs/CMakeLists.txt +++ b/xs/CMakeLists.txt @@ -409,6 +409,7 @@ set(XS_XSP_FILES ${XSP_DIR}/TriangleMesh.xsp ${XSP_DIR}/Utils_OctoPrint.xsp ${XSP_DIR}/Utils_PresetUpdater.xsp + ${XSP_DIR}/AppController.xsp ${XSP_DIR}/XS.xsp ) foreach (file ${XS_XSP_FILES}) diff --git a/xs/src/slic3r/AppController.cpp b/xs/src/slic3r/AppController.cpp index abc8c9736..bd7a2e702 100644 --- a/xs/src/slic3r/AppController.cpp +++ b/xs/src/slic3r/AppController.cpp @@ -296,14 +296,17 @@ void IProgressIndicator::message_fmt( void AppController::arrange_model() { std::async(supports_asynch()? std::launch::async : std::launch::deferred, - [this](){ - auto pind = progress_indicator(); + [this]() + { +// auto pind = progress_indicator(); // my $bb = Slic3r::Geometry::BoundingBoxf->new_from_points($self->{config}->bed_shape); // my $success = $self->{model}->arrange_objects(wxTheApp->{preset_bundle}->full_config->min_object_distance, $bb); - double dist = GUI::get_preset_bundle()->full_config().option("min_object_distance")->getFloat(); +// double dist = GUI::get_preset_bundle()->full_config().option("min_object_distance")->getFloat(); - std::cout << dist << std::endl; +// std::cout << dist << std::endl; + + std::cout << "ITTT vagyok" << std::endl; }); } From 26b003073b48b56356e1d00fd5e064cca9f9b557 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Thu, 28 Jun 2018 20:13:01 +0200 Subject: [PATCH 100/198] Renamed the "compatible_printers_condition" and "inherits" vectors to "compatible_printers_condition_cummulative" and "inherits_cummulative" when storing to AMF/3MF/Config files. Improved escaping of strings stored / loaded from config files. --- xs/src/libslic3r/Config.cpp | 25 +++++++++++-- xs/src/libslic3r/GCode.cpp | 2 +- xs/src/libslic3r/PrintConfig.cpp | 24 +++++++----- xs/src/slic3r/GUI/Preset.cpp | 19 ++-------- xs/src/slic3r/GUI/Preset.hpp | 21 ++--------- xs/src/slic3r/GUI/PresetBundle.cpp | 59 ++++++++++++++---------------- xs/src/slic3r/GUI/Tab.cpp | 8 ++-- xs/src/slic3r/GUI/Tab.hpp | 2 +- 8 files changed, 76 insertions(+), 84 deletions(-) diff --git a/xs/src/libslic3r/Config.cpp b/xs/src/libslic3r/Config.cpp index 4218fbcf9..989a4ab82 100644 --- a/xs/src/libslic3r/Config.cpp +++ b/xs/src/libslic3r/Config.cpp @@ -20,6 +20,7 @@ namespace Slic3r { +// Escape \n, \r and \\ std::string escape_string_cstyle(const std::string &str) { // Allocate a buffer twice the input string length, @@ -28,9 +29,15 @@ std::string escape_string_cstyle(const std::string &str) char *outptr = out.data(); for (size_t i = 0; i < str.size(); ++ i) { char c = str[i]; - if (c == '\n' || c == '\r') { + if (c == '\r') { + (*outptr ++) = '\\'; + (*outptr ++) = 'r'; + } else if (c == '\n') { (*outptr ++) = '\\'; (*outptr ++) = 'n'; + } else if (c == '\\') { + (*outptr ++) = '\\'; + (*outptr ++) = '\\'; } else (*outptr ++) = c; } @@ -69,7 +76,10 @@ std::string escape_strings_cstyle(const std::vector &strs) if (c == '\\' || c == '"') { (*outptr ++) = '\\'; (*outptr ++) = c; - } else if (c == '\n' || c == '\r') { + } else if (c == '\r') { + (*outptr ++) = '\\'; + (*outptr ++) = 'r'; + } else if (c == '\n') { (*outptr ++) = '\\'; (*outptr ++) = 'n'; } else @@ -84,6 +94,7 @@ std::string escape_strings_cstyle(const std::vector &strs) return std::string(out.data(), outptr - out.data()); } +// Unescape \n, \r and \\ bool unescape_string_cstyle(const std::string &str, std::string &str_out) { std::vector out(str.size(), 0); @@ -94,8 +105,12 @@ bool unescape_string_cstyle(const std::string &str, std::string &str_out) if (++ i == str.size()) return false; c = str[i]; - if (c == 'n') + if (c == 'r') + (*outptr ++) = '\r'; + else if (c == 'n') (*outptr ++) = '\n'; + else + (*outptr ++) = c; } else (*outptr ++) = c; } @@ -134,7 +149,9 @@ bool unescape_strings_cstyle(const std::string &str, std::vector &o if (++ i == str.size()) return false; c = str[i]; - if (c == 'n') + if (c == 'r') + c = '\r'; + else if (c == 'n') c = '\n'; } buf.push_back(c); diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index b007fbea0..93f4bb3e7 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1422,7 +1422,7 @@ void GCode::append_full_config(const Print& print, std::string& str) for (const char *key : { "print_settings_id", "filament_settings_id", "printer_settings_id", "printer_model", "printer_variant", "default_print_profile", "default_filament_profile", - "compatible_printers_condition", "inherits" }) { + "compatible_printers_condition_cummulative", "inherits_cummulative" }) { const ConfigOption *opt = full_config.option(key); if (opt != nullptr) str += std::string("; ") + key + " = " + opt->serialize() + "\n"; diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 02961493e..88f028b45 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -147,15 +147,17 @@ PrintConfigDef::PrintConfigDef() def->label = L("Compatible printers"); def->default_value = new ConfigOptionStrings(); - // The following value is defined as a vector of strings, so it could - // collect the "inherits" values over the print and filaments profiles - // when storing into a project file (AMF, 3MF, Config ...) - def = this->add("compatible_printers_condition", coStrings); + def = this->add("compatible_printers_condition", coString); def->label = L("Compatible printers condition"); def->tooltip = L("A boolean expression using the configuration values of an active printer profile. " "If this expression evaluates to true, this profile is considered compatible " "with the active printer profile."); - def->default_value = new ConfigOptionStrings { "" }; + def->default_value = new ConfigOptionString(); + + // The following value is to be stored into the project file (AMF, 3MF, Config ...) + // and it contains a sum of "compatible_printers_condition" values over the print and filament profiles. + def = this->add("compatible_printers_condition_cummulative", coStrings); + def->default_value = new ConfigOptionStrings(); def = this->add("complete_objects", coBool); def->label = L("Complete individual objects"); @@ -822,15 +824,17 @@ PrintConfigDef::PrintConfigDef() def->min = 0; def->default_value = new ConfigOptionFloat(80); - // The following value is defined as a vector of strings, so it could - // collect the "inherits" values over the print and filaments profiles - // when storing into a project file (AMF, 3MF, Config ...) - def = this->add("inherits", coStrings); + def = this->add("inherits", coString); def->label = L("Inherits profile"); def->tooltip = L("Name of the profile, from which this profile inherits."); def->full_width = true; def->height = 50; - def->default_value = new ConfigOptionStrings { "" }; + def->default_value = new ConfigOptionString(); + + // The following value is to be stored into the project file (AMF, 3MF, Config ...) + // and it contains a sum of "inherits" values over the print and filament profiles. + def = this->add("inherits_cummulative", coStrings); + def->default_value = new ConfigOptionStrings(); def = this->add("interface_shells", coBool); def->label = L("Interface shells"); diff --git a/xs/src/slic3r/GUI/Preset.cpp b/xs/src/slic3r/GUI/Preset.cpp index c0b02d460..0d6239b2c 100644 --- a/xs/src/slic3r/GUI/Preset.cpp +++ b/xs/src/slic3r/GUI/Preset.cpp @@ -180,7 +180,7 @@ void Preset::normalize(DynamicPrintConfig &config) size_t n = (nozzle_diameter == nullptr) ? 1 : nozzle_diameter->values.size(); const auto &defaults = FullPrintConfig::defaults(); for (const std::string &key : Preset::filament_options()) { - if (key == "compatible_printers" || key == "compatible_printers_condition" || key == "inherits") + if (key == "compatible_printers") continue; auto *opt = config.option(key, false); assert(opt != nullptr); @@ -459,8 +459,8 @@ Preset& PresetCollection::load_external_preset( DynamicPrintConfig cfg(this->default_preset().config); cfg.apply_only(config, cfg.keys(), true); // Is there a preset already loaded with the name stored inside the config? - std::deque::iterator it = original_name.empty() ? m_presets.end() : this->find_preset_internal(original_name); - if (it != m_presets.end() && profile_print_params_same(it->config, cfg)) { + std::deque::iterator it = this->find_preset_internal(original_name); + if (it != m_presets.end() && it->name == original_name && profile_print_params_same(it->config, cfg)) { // The preset exists and it matches the values stored inside config. if (select) this->select_preset(it - m_presets.begin()); @@ -490,7 +490,7 @@ Preset& PresetCollection::load_external_preset( } new_name = name + suffix; it = this->find_preset_internal(new_name); - if (it == m_presets.end()) + if (it == m_presets.end() || it->name != new_name) // Unique profile name. Insert a new profile. break; if (profile_print_params_same(it->config, cfg)) { @@ -851,17 +851,6 @@ std::vector PresetCollection::dirty_options(const Preset *edited, c return changed; } -std::vector PresetCollection::system_equal_options() const -{ - const Preset *edited = &this->get_edited_preset(); - const Preset *reference = this->get_selected_preset_parent(); - std::vector equal; - if (edited != nullptr && reference != nullptr) { - equal = reference->config.equal(edited->config); - } - return equal; -} - // Select a new preset. This resets all the edits done to the currently selected preset. // If the preset with index idx does not exist, a first visible preset is selected. Preset& PresetCollection::select_preset(size_t idx) diff --git a/xs/src/slic3r/GUI/Preset.hpp b/xs/src/slic3r/GUI/Preset.hpp index 42ef6ceee..a2ee1d2eb 100644 --- a/xs/src/slic3r/GUI/Preset.hpp +++ b/xs/src/slic3r/GUI/Preset.hpp @@ -140,24 +140,12 @@ public: bool is_compatible_with_printer(const Preset &active_printer) const; // Returns the name of the preset, from which this preset inherits. - static std::string& inherits(DynamicPrintConfig &cfg) - { - auto option = cfg.option("inherits", true); - if (option->values.empty()) - option->values.emplace_back(std::string()); - return option->values.front(); - } + static std::string& inherits(DynamicPrintConfig &cfg) { return cfg.option("inherits", true)->value; } std::string& inherits() { return Preset::inherits(this->config); } const std::string& inherits() const { return Preset::inherits(const_cast(this)->config); } // Returns the "compatible_printers_condition". - static std::string& compatible_printers_condition(DynamicPrintConfig &cfg) - { - auto option = cfg.option("compatible_printers_condition", true); - if (option->values.empty()) - option->values.emplace_back(std::string()); - return option->values.front(); - } + static std::string& compatible_printers_condition(DynamicPrintConfig &cfg) { return cfg.option("compatible_printers_condition", true)->value; } std::string& compatible_printers_condition() { return Preset::compatible_printers_condition(this->config); } const std::string& compatible_printers_condition() const { return Preset::compatible_printers_condition(const_cast(this)->config); } @@ -343,8 +331,6 @@ public: // Compare the content of get_selected_preset() with get_edited_preset() configs, return the list of keys where they differ. std::vector current_different_from_parent_options(const bool is_printer_type = false) const { return dirty_options(&this->get_edited_preset(), this->get_selected_preset_parent(), is_printer_type); } - // Compare the content of get_selected_preset() with get_selected_preset_parent() configs, return the list of keys where they equal. - std::vector system_equal_options() const; // Update the choice UI from the list of presets. // If show_incompatible, all presets are shown, otherwise only the compatible presets are shown. @@ -380,9 +366,10 @@ private: PresetCollection(const PresetCollection &other); PresetCollection& operator=(const PresetCollection &other); - // Find a preset in the sorted list of presets. + // Find a preset position in the sorted list of presets. // The "-- default -- " preset is always the first, so it needs // to be handled differently. + // If a preset does not exist, an iterator is returned indicating where to insert a preset with the same name. std::deque::iterator find_preset_internal(const std::string &name) { Preset key(m_type, name); diff --git a/xs/src/slic3r/GUI/PresetBundle.cpp b/xs/src/slic3r/GUI/PresetBundle.cpp index c11816d06..db4e31173 100644 --- a/xs/src/slic3r/GUI/PresetBundle.cpp +++ b/xs/src/slic3r/GUI/PresetBundle.cpp @@ -59,9 +59,6 @@ PresetBundle::PresetBundle() : // "compatible_printers", "compatible_printers_condition", "inherits", // "print_settings_id", "filament_settings_id", "printer_settings_id", // "printer_vendor", "printer_model", "printer_variant", "default_print_profile", "default_filament_profile" - // - //FIXME Rename "compatible_printers" and "compatible_printers_condition", as they are defined in both print and filament profiles, - // therefore they are clashing when generating a a config file, G-code or AMF/3MF. // Create the ID config keys, as they are not part of the Static print config classes. this->prints.default_preset().config.optptr("print_settings_id", true); @@ -77,7 +74,7 @@ PresetBundle::PresetBundle() : this->printers.default_preset().config.optptr("printer_model", true); this->printers.default_preset().config.optptr("printer_variant", true); this->printers.default_preset().config.optptr("default_print_profile", true); - this->printers.default_preset().config.optptr("default_filament_profile", true); + this->printers.default_preset().config.option("default_filament_profile", true)->values = { "" }; this->printers.default_preset().inherits(); // Load the default preset bitmaps. @@ -411,7 +408,7 @@ DynamicPrintConfig PresetBundle::full_config() const std::vector filament_opts(num_extruders, nullptr); // loop through options and apply them to the resulting config. for (const t_config_option_key &key : this->filaments.default_preset().config.keys()) { - if (key == "compatible_printers" || key == "compatible_printers_condition" || key == "inherits") + if (key == "compatible_printers") continue; // Get a destination option. ConfigOption *opt_dst = out.option(key, false); @@ -462,8 +459,8 @@ DynamicPrintConfig PresetBundle::full_config() const if (nonempty) out.set_key_value(key, new ConfigOptionStrings(std::move(values))); }; - add_if_some_non_empty(std::move(compatible_printers_condition), "compatible_printers_condition"); - add_if_some_non_empty(std::move(inherits), "inherits"); + add_if_some_non_empty(std::move(compatible_printers_condition), "compatible_printers_condition_cummulative"); + add_if_some_non_empty(std::move(inherits), "inherits_cummulative"); return out; } @@ -544,17 +541,15 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool size_t num_extruders = std::min(config.option("nozzle_diameter" )->values.size(), config.option("filament_diameter")->values.size()); - // Make a copy of the "compatible_printers_condition" and "inherits" vectors, which + // Make a copy of the "compatible_printers_condition_cummulative" and "inherits_cummulative" vectors, which // accumulate values over all presets (print, filaments, printers). // These values will be distributed into their particular presets when loading. - auto *compatible_printers_condition = config.option("compatible_printers_condition", true); - auto *inherits = config.option("inherits", true); - std::vector compatible_printers_condition_values = std::move(compatible_printers_condition->values); - std::vector inherits_values = std::move(inherits->values); - if (compatible_printers_condition_values.empty()) - compatible_printers_condition_values.emplace_back(std::string()); - if (inherits_values.empty()) - inherits_values.emplace_back(std::string()); + std::vector compatible_printers_condition_values = std::move(config.option("compatible_printers_condition_cummulative", true)->values); + std::vector inherits_values = std::move(config.option("inherits_cummulative", true)->values); + std::string &compatible_printers_condition = Preset::compatible_printers_condition(config); + std::string &inherits = Preset::inherits(config); + compatible_printers_condition_values.resize(num_extruders + 2, std::string()); + inherits_values.resize(num_extruders + 2, std::string()); // 1) Create a name from the file name. // Keep the suffix (.ini, .gcode, .amf, .3mf etc) to differentiate it from the normal profiles. @@ -566,29 +561,25 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool PresetCollection &presets = (i_group == 0) ? this->prints : this->printers; // Split the "compatible_printers_condition" and "inherits" values one by one from a single vector to the print & printer profiles. size_t idx = (i_group == 0) ? 0 : num_extruders + 1; - inherits->values = { (idx < inherits_values.size()) ? inherits_values[idx] : "" }; - if (i_group == 0) - compatible_printers_condition->values = { compatible_printers_condition_values.front() }; + inherits = inherits_values[idx]; + compatible_printers_condition = compatible_printers_condition_values[idx]; if (is_external) presets.load_external_preset(name_or_path, name, - config.opt_string((i_group == 0) ? "print_settings_id" : "printer_settings_id"), + config.opt_string((i_group == 0) ? "print_settings_id" : "printer_settings_id", true), config); else presets.load_preset(presets.path_from_name(name), name, config).save(); } - // Update the "compatible_printers_condition" and "inherits" vectors, so their number matches the number of extruders. - compatible_printers_condition_values.erase(compatible_printers_condition_values.begin()); - inherits_values.erase(inherits_values.begin()); - compatible_printers_condition_values.resize(num_extruders, std::string()); - inherits_values.resize(num_extruders, std::string()); - compatible_printers_condition->values = std::move(compatible_printers_condition_values); - inherits->values = std::move(inherits_values); - // 3) Now load the filaments. If there are multiple filament presets, split them and load them. - const ConfigOptionStrings *old_filament_profile_names = config.option("filament_settings_id", false); - assert(old_filament_profile_names != nullptr); + auto old_filament_profile_names = config.option("filament_settings_id", true); + old_filament_profile_names->values.resize(num_extruders, std::string()); + config.option("default_filament_profile", true)->values.resize(num_extruders, std::string()); + if (num_extruders <= 1) { + // Split the "compatible_printers_condition" and "inherits" from the cummulative vectors to separate filament presets. + inherits = inherits_values[1]; + compatible_printers_condition = compatible_printers_condition_values[1]; if (is_external) this->filaments.load_external_preset(name_or_path, name, old_filament_profile_names->values.front(), config); else @@ -614,12 +605,16 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool // Load the configs into this->filaments and make them active. this->filament_presets.clear(); for (size_t i = 0; i < configs.size(); ++ i) { + DynamicPrintConfig &cfg = configs[i]; + // Split the "compatible_printers_condition" and "inherits" from the cummulative vectors to separate filament presets. + cfg.opt_string("compatible_printers_condition", true) = compatible_printers_condition_values[i + 1]; + cfg.opt_string("inherits", true) = inherits_values[i + 1]; // Load all filament presets, but only select the first one in the preset dialog. Preset *loaded = nullptr; if (is_external) loaded = &this->filaments.load_external_preset(name_or_path, name, (i < old_filament_profile_names->values.size()) ? old_filament_profile_names->values[i] : "", - std::move(configs[i]), i == 0); + std::move(cfg), i == 0); else { // Used by the config wizard when creating a custom setup. // Therefore this block should only be called for a single extruder. @@ -630,7 +625,7 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool sprintf(suffix, "%d", i); std::string new_name = name + suffix; loaded = &this->filaments.load_preset(this->filaments.path_from_name(new_name), - new_name, std::move(configs[i]), i == 0); + new_name, std::move(cfg), i == 0); loaded->save(); } this->filament_presets.emplace_back(loaded->name); diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index f89ddddcc..94f8cc3ea 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -803,7 +803,7 @@ void Tab::reload_compatible_printers_widget() bool has_any = !m_config->option("compatible_printers")->values.empty(); has_any ? m_compatible_printers_btn->Enable() : m_compatible_printers_btn->Disable(); m_compatible_printers_checkbox->SetValue(!has_any); - get_field("compatible_printers_condition", 0)->toggle(!has_any); + get_field("compatible_printers_condition")->toggle(!has_any); } void TabPrint::build() @@ -1014,7 +1014,7 @@ void TabPrint::build() }; optgroup->append_line(line, &m_colored_Label); - option = optgroup->get_option("compatible_printers_condition", 0); + option = optgroup->get_option("compatible_printers_condition"); option.opt.full_width = true; optgroup->append_single_option_line(option); @@ -1365,7 +1365,7 @@ void TabFilament::build() }; optgroup->append_line(line, &m_colored_Label); - option = optgroup->get_option("compatible_printers_condition", 0); + option = optgroup->get_option("compatible_printers_condition"); option.opt.full_width = true; optgroup->append_single_option_line(option); @@ -2240,7 +2240,7 @@ wxSizer* Tab::compatible_printers_widget(wxWindow* parent, wxCheckBox** checkbox // All printers have been made compatible with this preset. if ((*checkbox)->GetValue()) load_key_value("compatible_printers", std::vector {}); - get_field("compatible_printers_condition", 0)->toggle((*checkbox)->GetValue()); + get_field("compatible_printers_condition")->toggle((*checkbox)->GetValue()); update_changed_ui(); }) ); diff --git a/xs/src/slic3r/GUI/Tab.hpp b/xs/src/slic3r/GUI/Tab.hpp index d6bf2cf43..eccae4daa 100644 --- a/xs/src/slic3r/GUI/Tab.hpp +++ b/xs/src/slic3r/GUI/Tab.hpp @@ -172,7 +172,7 @@ protected: std::vector m_reload_dependent_tabs = {}; enum OptStatus { osSystemValue = 1, osInitValue = 2 }; std::map m_options_list; - int m_opt_status_value; + int m_opt_status_value = 0; t_icon_descriptions m_icon_descriptions = {}; From 082f88ad5ffb641c890a470a08bb8e8d1eaaf0ee Mon Sep 17 00:00:00 2001 From: bubnikv Date: Thu, 28 Jun 2018 21:46:23 +0200 Subject: [PATCH 101/198] gcc / clang did not like backslashes inside comments --- xs/src/libslic3r/Config.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xs/src/libslic3r/Config.cpp b/xs/src/libslic3r/Config.cpp index 989a4ab82..5db093c5c 100644 --- a/xs/src/libslic3r/Config.cpp +++ b/xs/src/libslic3r/Config.cpp @@ -20,7 +20,7 @@ namespace Slic3r { -// Escape \n, \r and \\ +// Escape \n, \r and backslash std::string escape_string_cstyle(const std::string &str) { // Allocate a buffer twice the input string length, @@ -94,7 +94,7 @@ std::string escape_strings_cstyle(const std::vector &strs) return std::string(out.data(), outptr - out.data()); } -// Unescape \n, \r and \\ +// Unescape \n, \r and backslash bool unescape_string_cstyle(const std::string &str, std::string &str_out) { std::vector out(str.size(), 0); From d4b0d1b773b345f4aa93ea09b5362ef8e65b5efb Mon Sep 17 00:00:00 2001 From: bubnikv Date: Fri, 29 Jun 2018 10:59:58 +0200 Subject: [PATCH 102/198] bumped up the version number --- xs/src/libslic3r/libslic3r.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/src/libslic3r/libslic3r.h b/xs/src/libslic3r/libslic3r.h index 4aef4d5c1..a5926debe 100644 --- a/xs/src/libslic3r/libslic3r.h +++ b/xs/src/libslic3r/libslic3r.h @@ -14,7 +14,7 @@ #include #define SLIC3R_FORK_NAME "Slic3r Prusa Edition" -#define SLIC3R_VERSION "1.40.0" +#define SLIC3R_VERSION "1.40.1-rc" #define SLIC3R_BUILD "UNKNOWN" typedef int32_t coord_t; From 16e42b0226fcda1c0d6d4c4dd934f2a2a4f38974 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Fri, 29 Jun 2018 11:29:23 +0200 Subject: [PATCH 103/198] Added tooltips for selected Preset --- xs/src/slic3r/GUI/Preset.cpp | 11 ++++++++--- xs/src/slic3r/GUI/PresetBundle.cpp | 7 +++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/xs/src/slic3r/GUI/Preset.cpp b/xs/src/slic3r/GUI/Preset.cpp index 68982185b..536c37002 100644 --- a/xs/src/slic3r/GUI/Preset.cpp +++ b/xs/src/slic3r/GUI/Preset.cpp @@ -601,6 +601,7 @@ void PresetCollection::update_platter_ui(wxBitmapComboBox *ui) // Otherwise fill in the list from scratch. ui->Freeze(); ui->Clear(); + size_t selected_preset_item = 0; const Preset &selected_preset = this->get_selected_preset(); // Show wide icons if the currently selected preset is not compatible with the current printer, @@ -641,7 +642,7 @@ void PresetCollection::update_platter_ui(wxBitmapComboBox *ui) ui->Append(wxString::FromUTF8((preset.name + (preset.is_dirty ? g_suffix_modified : "")).c_str()), (bmp == 0) ? (m_bitmap_main_frame ? *m_bitmap_main_frame : wxNullBitmap) : *bmp); if (i == m_idx_selected) - ui->SetSelection(ui->GetCount() - 1); + selected_preset_item = ui->GetCount() - 1; } else { @@ -658,10 +659,13 @@ void PresetCollection::update_platter_ui(wxBitmapComboBox *ui) for (std::map::iterator it = nonsys_presets.begin(); it != nonsys_presets.end(); ++it) { ui->Append(it->first, *it->second); if (it->first == selected) - ui->SetSelection(ui->GetCount() - 1); + selected_preset_item = ui->GetCount() - 1; } } - ui->Thaw(); + + ui->SetSelection(selected_preset_item); + ui->SetToolTip(ui->GetString(selected_preset_item)); + ui->Thaw(); } size_t PresetCollection::update_tab_ui(wxBitmapComboBox *ui, bool show_incompatible) @@ -719,6 +723,7 @@ size_t PresetCollection::update_tab_ui(wxBitmapComboBox *ui, bool show_incompati } } ui->SetSelection(selected_preset_item); + ui->SetToolTip(ui->GetString(selected_preset_item)); ui->Thaw(); return selected_preset_item; } diff --git a/xs/src/slic3r/GUI/PresetBundle.cpp b/xs/src/slic3r/GUI/PresetBundle.cpp index d36ef7b6f..5914637bb 100644 --- a/xs/src/slic3r/GUI/PresetBundle.cpp +++ b/xs/src/slic3r/GUI/PresetBundle.cpp @@ -1108,6 +1108,7 @@ void PresetBundle::update_platter_filament_ui(unsigned int idx_extruder, wxBitma // Fill in the list from scratch. ui->Freeze(); ui->Clear(); + size_t selected_preset_item = 0; const Preset *selected_preset = this->filaments.find_preset(this->filament_presets[idx_extruder]); // Show wide icons if the currently selected preset is not compatible with the current printer, // and draw a red flag in front of the selected preset. @@ -1159,7 +1160,7 @@ void PresetBundle::update_platter_filament_ui(unsigned int idx_extruder, wxBitma ui->Append(wxString::FromUTF8((preset.name + (preset.is_dirty ? Preset::suffix_modified() : "")).c_str()), (bitmap == 0) ? wxNullBitmap : *bitmap); if (selected) - ui->SetSelection(ui->GetCount() - 1); + selected_preset_item = ui->GetCount() - 1; } else { @@ -1178,9 +1179,11 @@ void PresetBundle::update_platter_filament_ui(unsigned int idx_extruder, wxBitma for (std::map::iterator it = nonsys_presets.begin(); it != nonsys_presets.end(); ++it) { ui->Append(it->first, *it->second); if (it->first == selected_str) - ui->SetSelection(ui->GetCount() - 1); + selected_preset_item = ui->GetCount() - 1; } } + ui->SetSelection(selected_preset_item); + ui->SetToolTip(ui->GetString(selected_preset_item)); ui->Thaw(); } From 5bf795ec6f2b746f1934f99eaa522a05c98a4fa9 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Fri, 29 Jun 2018 12:26:22 +0200 Subject: [PATCH 104/198] Overriddable infills that were not overridden are now printed according to infill_first --- xs/src/libslic3r/GCode.cpp | 2 +- xs/src/libslic3r/GCode/ToolOrdering.cpp | 112 ++++++++++++++++++------ xs/src/libslic3r/GCode/ToolOrdering.hpp | 5 +- xs/src/libslic3r/Print.cpp | 1 + 4 files changed, 90 insertions(+), 30 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 1271ee9ee..188993aeb 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1334,7 +1334,7 @@ void GCode::process_layer( if (objects_by_extruder_it == by_extruder.end()) continue; - // We are almost ready to print. However, we must go through all the object twice and only print the overridden extrusions first (infill/primeter wiping feature): + // We are almost ready to print. However, we must go through all the object twice and only print the overridden extrusions first (infill/perimeter wiping feature): for (int print_wipe_extrusions=layer_tools.wiping_extrusions.is_anything_overridden(); print_wipe_extrusions>=0; --print_wipe_extrusions) { for (ObjectByExtruder &object_by_extruder : objects_by_extruder_it->second) { const size_t layer_id = &object_by_extruder - objects_by_extruder_it->second.data(); diff --git a/xs/src/libslic3r/GCode/ToolOrdering.cpp b/xs/src/libslic3r/GCode/ToolOrdering.cpp index 598d3bcc6..1987a0dae 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.cpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.cpp @@ -381,13 +381,24 @@ void WipingExtrusions::set_extruder_override(const ExtrusionEntity* entity, unsi } +// Finds first non-soluble extruder on the layer +int WipingExtrusions::first_nonsoluble_extruder_on_layer(const PrintConfig& print_config, const LayerTools& lt) const +{ + for (auto extruders_it = lt.extruders.begin(); extruders_it != lt.extruders.end(); ++extruders_it) + if (!print_config.filament_soluble.get_at(*extruders_it)) + return (*extruders_it); + + return (-1); +} + // Finds last non-soluble extruder on the layer -bool WipingExtrusions::is_last_nonsoluble_on_layer(const PrintConfig& print_config, const LayerTools& lt, unsigned int extruder) const +int WipingExtrusions::last_nonsoluble_extruder_on_layer(const PrintConfig& print_config, const LayerTools& lt) const { for (auto extruders_it = lt.extruders.rbegin(); extruders_it != lt.extruders.rend(); ++extruders_it) if (!print_config.filament_soluble.get_at(*extruders_it)) - return (*extruders_it == extruder); - return false; + return (*extruders_it); + + return (-1); } @@ -416,7 +427,7 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, const LayerTo if (print.config.filament_soluble.get_at(new_extruder)) return volume_to_wipe; // Soluble filament cannot be wiped in a random infill - bool last_nonsoluble = is_last_nonsoluble_on_layer(print.config, layer_tools, new_extruder); + bool is_last_nonsoluble = ((int)new_extruder == last_nonsoluble_extruder_on_layer(print.config, layer_tools)); // we will sort objects so that dedicated for wiping are at the beginning: PrintObjectPtrs object_list = print.objects; @@ -430,15 +441,15 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, const LayerTo // this is controlled by the following variable: bool perimeters_done = false; - for (int i=0 ; i<(int)object_list.size() ; ++i) { - const auto& object = object_list[i]; - - if (!perimeters_done && (i+1==(int)object_list.size() || !object_list[i]->config.wipe_into_objects)) { // we passed the last dedicated object in list + for (int i=0 ; i<(int)object_list.size() + (perimeters_done ? 0 : 1); ++i) { + if (!perimeters_done && (i==(int)object_list.size() || !object_list[i]->config.wipe_into_objects)) { // we passed the last dedicated object in list perimeters_done = true; i=-1; // let's go from the start again continue; } + const auto& object = object_list[i]; + // Finds this layer: auto this_layer_it = std::find_if(object->layers.begin(), object->layers.end(), [&layer_tools](const Layer* lay) { return std::abs(layer_tools.print_z - lay->print_z)layers.end()) @@ -455,9 +466,8 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, const LayerTo continue; - if (((!print.config.infill_first ? perimeters_done : !perimeters_done) || !object->config.wipe_into_objects) && region.config.wipe_into_infill) { - const ExtrusionEntityCollection& eec = this_layer->regions[region_id]->fills; - for (const ExtrusionEntity* ee : eec.entities) { // iterate through all infill Collections + if ((!print.config.infill_first ? perimeters_done : !perimeters_done) || (!object->config.wipe_into_objects && region.config.wipe_into_infill)) { + for (const ExtrusionEntity* ee : this_layer->regions[region_id]->fills.entities) { // iterate through all infill Collections auto* fill = dynamic_cast(ee); if (!is_overriddable(*fill, print.config, *object, region)) @@ -466,15 +476,10 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, const LayerTo // What extruder would this normally be printed with? unsigned int correct_extruder = get_extruder(*fill, region); - bool force_override = false; - // If the extruder is not in layer tools - we MUST override it. This happens whenever all extrusions, that would normally - // be printed with this extruder on this layer are "dont care" (part of infill/perimeter wiping): - if (last_nonsoluble && std::find(layer_tools.extruders.begin(), layer_tools.extruders.end(), correct_extruder) == layer_tools.extruders.end()) - force_override = true; - if (!force_override && volume_to_wipe<=0) + if (volume_to_wipe<=0) continue; - if (!object->config.wipe_into_objects && !print.config.infill_first && !force_override) { + if (!object->config.wipe_into_objects && !print.config.infill_first) { // In this case we must check that the original extruder is used on this layer before the one we are overridding // (and the perimeters will be finished before the infill is printed): if ((!print.config.infill_first && region.config.wipe_into_infill)) { @@ -490,7 +495,7 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, const LayerTo } } - if (force_override || (!is_entity_overridden(fill, copy) && fill->total_volume() > min_infill_volume)) { // this infill will be used to wipe this extruder + if ((!is_entity_overridden(fill, copy) && fill->total_volume() > min_infill_volume)) { // this infill will be used to wipe this extruder set_extruder_override(fill, copy, new_extruder, num_of_copies); volume_to_wipe -= fill->total_volume(); } @@ -500,21 +505,15 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, const LayerTo // Now the same for perimeters - see comments above for explanation: if (object->config.wipe_into_objects && (print.config.infill_first ? perimeters_done : !perimeters_done)) { - const ExtrusionEntityCollection& eec = this_layer->regions[region_id]->perimeters; - for (const ExtrusionEntity* ee : eec.entities) { // iterate through all perimeter Collections + for (const ExtrusionEntity* ee : this_layer->regions[region_id]->perimeters.entities) { auto* fill = dynamic_cast(ee); if (!is_overriddable(*fill, print.config, *object, region)) continue; - // What extruder would this normally be printed with? - unsigned int correct_extruder = get_extruder(*fill, region); - bool force_override = false; - if (last_nonsoluble && std::find(layer_tools.extruders.begin(), layer_tools.extruders.end(), correct_extruder) == layer_tools.extruders.end()) - force_override = true; - if (!force_override && volume_to_wipe<=0) + if (volume_to_wipe<=0) continue; - if (force_override || (!is_entity_overridden(fill, copy) && fill->total_volume() > min_infill_volume)) { + if ((!is_entity_overridden(fill, copy) && fill->total_volume() > min_infill_volume)) { set_extruder_override(fill, copy, new_extruder, num_of_copies); volume_to_wipe -= fill->total_volume(); } @@ -528,6 +527,63 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, const LayerTo +// Called after all toolchanges on a layer were mark_infill_overridden. There might still be overridable entities, +// that were not actually overridden. If they are part of a dedicated object, printing them with the extruder +// they were initially assigned to might mean violating the perimeter-infill order. We will therefore go through +// them again and make sure we override it. +void WipingExtrusions::ensure_perimeters_infills_order(const Print& print, const LayerTools& layer_tools) +{ + unsigned int first_nonsoluble_extruder = first_nonsoluble_extruder_on_layer(print.config, layer_tools); + unsigned int last_nonsoluble_extruder = last_nonsoluble_extruder_on_layer(print.config, layer_tools); + + for (const PrintObject* object : print.objects) { + // Finds this layer: + auto this_layer_it = std::find_if(object->layers.begin(), object->layers.end(), [&layer_tools](const Layer* lay) { return std::abs(layer_tools.print_z - lay->print_z)layers.end()) + continue; + const Layer* this_layer = *this_layer_it; + unsigned int num_of_copies = object->_shifted_copies.size(); + + for (unsigned int copy = 0; copy < num_of_copies; ++copy) { // iterate through copies first, so that we mark neighbouring infills to minimize travel moves + for (size_t region_id = 0; region_id < object->print()->regions.size(); ++ region_id) { + const auto& region = *object->print()->regions[region_id]; + + if (!region.config.wipe_into_infill && !object->config.wipe_into_objects) + continue; + + for (const ExtrusionEntity* ee : this_layer->regions[region_id]->fills.entities) { // iterate through all infill Collections + auto* fill = dynamic_cast(ee); + + if (!is_overriddable(*fill, print.config, *object, region) + || is_entity_overridden(fill, copy) ) + continue; + + // This infill could have been overridden but was not - unless we do somthing, it could be + // printed before its perimeter, or not be printed at all (in case its original extruder has + // not been added to LayerTools + // Either way, we will now force-override it with something suitable: + set_extruder_override(fill, copy, (print.config.infill_first ? first_nonsoluble_extruder : last_nonsoluble_extruder), num_of_copies); + } + + // Now the same for perimeters - see comments above for explanation: + for (const ExtrusionEntity* ee : this_layer->regions[region_id]->perimeters.entities) { // iterate through all perimeter Collections + auto* fill = dynamic_cast(ee); + if (!is_overriddable(*fill, print.config, *object, region) + || is_entity_overridden(fill, copy) ) + continue; + + set_extruder_override(fill, copy, (print.config.infill_first ? last_nonsoluble_extruder : first_nonsoluble_extruder), num_of_copies); + } + } + } + } +} + + + + + + // Following function is called from process_layer and returns pointer to vector with information about which extruders should be used for given copy of this entity. // It first makes sure the pointer is valid (creates the vector if it does not exist) and contains a record for each copy diff --git a/xs/src/libslic3r/GCode/ToolOrdering.hpp b/xs/src/libslic3r/GCode/ToolOrdering.hpp index 862b58f67..ac6bb480c 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.hpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.hpp @@ -30,10 +30,13 @@ public: // marks them by the extruder id. Returns volume that remains to be wiped on the wipe tower: float mark_wiping_extrusions(const Print& print, const LayerTools& layer_tools, unsigned int new_extruder, float volume_to_wipe); + void ensure_perimeters_infills_order(const Print& print, const LayerTools& layer_tools); + bool is_overriddable(const ExtrusionEntityCollection& ee, const PrintConfig& print_config, const PrintObject& object, const PrintRegion& region) const; private: - bool is_last_nonsoluble_on_layer(const PrintConfig& print_config, const LayerTools& lt, unsigned int extruder) const; + int first_nonsoluble_extruder_on_layer(const PrintConfig& print_config, const LayerTools& lt) const; + int last_nonsoluble_extruder_on_layer(const PrintConfig& print_config, const LayerTools& lt) const; // This function is called from mark_wiping_extrusions and sets extruder that it should be printed with (-1 .. as usual) void set_extruder_override(const ExtrusionEntity* entity, unsigned int copy_id, int extruder, unsigned int num_of_copies); diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index fcbe74b85..fbbded7cb 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -1143,6 +1143,7 @@ void Print::_make_wipe_tower() current_extruder_id = extruder_id; } } + layer_tools.wiping_extrusions.ensure_perimeters_infills_order(*this, layer_tools); if (&layer_tools == &m_tool_ordering.back() || (&layer_tools + 1)->wipe_tower_partitions == 0) break; } From 952068f28259f0f0b4001059469bf158a8ee77af Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Fri, 29 Jun 2018 17:46:21 +0200 Subject: [PATCH 105/198] Autocenter finally disabled. Progress indication works. --- lib/Slic3r/GUI/Plater.pm | 3 +- xs/src/libslic3r/Model.cpp | 66 +++++++++++++++---------------- xs/src/libslic3r/Model.hpp | 1 - xs/src/slic3r/AppController.cpp | 60 ++++++++++++++++++++++------ xs/src/slic3r/AppController.hpp | 11 ++++-- xs/src/slic3r/AppControllerWx.cpp | 22 +++++++++-- 6 files changed, 108 insertions(+), 55 deletions(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index db51dfe38..5267499b4 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -1192,13 +1192,14 @@ sub arrange { # my $bb = Slic3r::Geometry::BoundingBoxf->new_from_points($self->{config}->bed_shape); # my $success = $self->{model}->arrange_objects(wxTheApp->{preset_bundle}->full_config->min_object_distance, $bb); + # Update is not implemented in C++ so we cannot call this for now $self->{appController}->arrange_model; # ignore arrange failures on purpose: user has visual feedback and we don't need to warn him # when parts don't fit in print bed # Force auto center of the aligned grid of of objects on the print bed. - $self->update(1); + $self->update(0); } sub split_object { diff --git a/xs/src/libslic3r/Model.cpp b/xs/src/libslic3r/Model.cpp index 1565296e4..c222dcf89 100644 --- a/xs/src/libslic3r/Model.cpp +++ b/xs/src/libslic3r/Model.cpp @@ -20,7 +20,7 @@ #include #include -#include +// #include namespace Slic3r { @@ -387,17 +387,17 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, // Create the arranger config auto min_obj_distance = static_cast(dist/SCALING_FACTOR); - Benchmark bench; + // Benchmark bench; - std::cout << "Creating model siluett..." << std::endl; + // std::cout << "Creating model siluett..." << std::endl; - bench.start(); + // bench.start(); // Get the 2D projected shapes with their 3D model instance pointers auto shapemap = arr::projectModelFromTop(model); - bench.stop(); + // bench.stop(); - std::cout << "Model siluett created in " << bench.getElapsedSec() - << " seconds. " << "Min object distance = " << min_obj_distance << std::endl; + // std::cout << "Model siluett created in " << bench.getElapsedSec() + // << " seconds. " << "Min object distance = " << min_obj_distance << std::endl; // std::cout << "{" << std::endl; // std::for_each(shapemap.begin(), shapemap.end(), @@ -436,7 +436,8 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, biggest = &item; } } - if(it.second.vertexCount() > 3) shapes.push_back(std::ref(it.second)); + /*if(it.second.vertexCount() > 3)*/ + shapes.push_back(std::ref(it.second)); }); Box bin; @@ -468,27 +469,27 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, scfg.try_reverse_order = false; scfg.force_parallel = true; + pcfg.alignment = Arranger::PlacementConfig::Alignment::CENTER; + + // TODO cannot use rotations until multiple objects of same geometry can + // handle different rotations + // arranger.useMinimumBoundigBoxRotation(); + pcfg.rotations = { 0.0 }; Arranger arranger(bin, min_obj_distance, pcfg, scfg); - arranger.useMinimumBoundigBoxRotation(); arranger.progressIndicator(progressind); - std::cout << "Arranging model..." << std::endl; - bench.start(); + // std::cout << "Arranging model..." << std::endl; + // bench.start(); // Arrange and return the items with their respective indices within the // input sequence. - ArrangeResult result; - try { - result = arranger.arrangeIndexed(shapes.begin(), shapes.end()); - } catch(std::exception& e) { - std::cerr << "An exception occured: " << e.what() << std::endl; - } + auto result = arranger.arrangeIndexed(shapes.begin(), shapes.end()); - bench.stop(); - std::cout << "Model arranged in " << bench.getElapsedSec() - << " seconds." << std::endl; + // bench.stop(); + // std::cout << "Model arranged in " << bench.getElapsedSec() + // << " seconds." << std::endl; auto applyResult = [&shapemap](ArrangeResult::value_type& group, @@ -505,29 +506,25 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, // appropriately auto off = item.translation(); Radians rot = item.rotation(); - Pointf foff(off.X*SCALING_FACTOR, + Pointf foff(off.X*SCALING_FACTOR + batch_offset, off.Y*SCALING_FACTOR); // write the tranformation data into the model instance inst_ptr->rotation = rot; inst_ptr->offset = foff; - inst_ptr->offset_z = -batch_offset; } }; - std::cout << "Applying result..." << std::endl; - bench.start(); + // std::cout << "Applying result..." << std::endl; + // bench.start(); if(first_bin_only) { applyResult(result.front(), 0); } else { const auto STRIDE_PADDING = 1.2; - const auto MIN_STRIDE = 100; - - auto h = STRIDE_PADDING * model.bounding_box().size().z; - h = h < MIN_STRIDE ? MIN_STRIDE : h; - Coord stride = static_cast(h); + Coord stride = static_cast(STRIDE_PADDING* + bin.width()*SCALING_FACTOR); Coord batch_offset = 0; for(auto& group : result) { @@ -539,9 +536,9 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, batch_offset += stride; } } - bench.stop(); - std::cout << "Result applied in " << bench.getElapsedSec() - << " seconds." << std::endl; + // bench.stop(); + // std::cout << "Result applied in " << bench.getElapsedSec() + // << " seconds." << std::endl; for(auto objptr : model.objects) objptr->invalidate_bounding_box(); @@ -556,8 +553,7 @@ bool Model::arrange_objects(coordf_t dist, const BoundingBoxf* bb, { bool ret = false; if(bb != nullptr && bb->defined) { - const bool FIRST_BIN_ONLY = false; - ret = arr::arrange(*this, dist, bb, FIRST_BIN_ONLY, progressind); + ret = arr::arrange(*this, dist, bb, false, progressind); } else { // get the (transformed) size of each instance so that we take // into account their different transformations when packing @@ -1266,7 +1262,7 @@ void ModelInstance::transform_mesh(TriangleMesh* mesh, bool dont_translate) cons mesh->rotate_z(this->rotation); // rotate around mesh origin mesh->scale(this->scaling_factor); // scale around mesh origin if (!dont_translate) - mesh->translate(this->offset.x, this->offset.y, this->offset_z); + mesh->translate(this->offset.x, this->offset.y, 0); } BoundingBoxf3 ModelInstance::transform_mesh_bounding_box(const TriangleMesh* mesh, bool dont_translate) const diff --git a/xs/src/libslic3r/Model.hpp b/xs/src/libslic3r/Model.hpp index 8fd225a83..3337f4d9a 100644 --- a/xs/src/libslic3r/Model.hpp +++ b/xs/src/libslic3r/Model.hpp @@ -206,7 +206,6 @@ public: double rotation; // Rotation around the Z axis, in radians around mesh center point double scaling_factor; Pointf offset; // in unscaled coordinates - double offset_z = 0; ModelObject* get_object() const { return this->object; } diff --git a/xs/src/slic3r/AppController.cpp b/xs/src/slic3r/AppController.cpp index bd7a2e702..06e2cd093 100644 --- a/xs/src/slic3r/AppController.cpp +++ b/xs/src/slic3r/AppController.cpp @@ -1,6 +1,7 @@ #include "AppController.hpp" #include +#include #include #include #include @@ -9,6 +10,7 @@ #include #include +#include #include #include #include @@ -58,14 +60,18 @@ void AppControllerBoilerplate::progress_indicator( progressind_->m.unlock(); } -void AppControllerBoilerplate::progress_indicator(unsigned statenum, - const std::string &title, - const std::string &firstmsg) +AppControllerBoilerplate::ProgresIndicatorPtr +AppControllerBoilerplate::progress_indicator( + unsigned statenum, + const std::string &title, + const std::string &firstmsg) { progressind_->m.lock(); - progressind_->store[std::this_thread::get_id()] = + auto ret = progressind_->store[std::this_thread::get_id()] = create_progress_indicator(statenum, title, firstmsg);; progressind_->m.unlock(); + + return ret; } AppControllerBoilerplate::ProgresIndicatorPtr @@ -266,6 +272,11 @@ void PrintController::slice() Slic3r::trace(3, "Slicing process finished."); } +const PrintConfig &PrintController::config() const +{ + return print_->config; +} + void IProgressIndicator::message_fmt( const std::string &fmtstr, ...) { std::stringstream ss; @@ -295,19 +306,46 @@ void IProgressIndicator::message_fmt( void AppController::arrange_model() { - std::async(supports_asynch()? std::launch::async : std::launch::deferred, + auto ftr = std::async( + supports_asynch()? std::launch::async : std::launch::deferred, [this]() { -// auto pind = progress_indicator(); + unsigned count = 0; + for(auto obj : model_->objects) count += obj->instances.size(); - // my $bb = Slic3r::Geometry::BoundingBoxf->new_from_points($self->{config}->bed_shape); - // my $success = $self->{model}->arrange_objects(wxTheApp->{preset_bundle}->full_config->min_object_distance, $bb); -// double dist = GUI::get_preset_bundle()->full_config().option("min_object_distance")->getFloat(); + auto pind = progress_indicator(); + auto pmax = pind->max(); -// std::cout << dist << std::endl; + // Set the range of the progress to the object count + pind->max(count); - std::cout << "ITTT vagyok" << std::endl; + auto dist = print_ctl()->config().min_object_distance(); + + BoundingBoxf bb(print_ctl()->config().bed_shape.values); + + pind->update(0, "Arranging objects..."); + + try { + model_->arrange_objects(dist, &bb, [pind, count](unsigned rem){ + pind->update(count - rem, "Arranging objects..."); + }); + } catch(std::exception& e) { + std::cerr << e.what() << std::endl; + report_issue(IssueType::ERR, + "Could not arrange model objects! " + "Some geometries may be invalid.", + "Exception occurred"); + } + + // Restore previous max value + pind->max(pmax); + pind->update(0, "Arranging done."); }); + + while( ftr.wait_for(std::chrono::milliseconds(10)) + != std::future_status::ready) { + process_events(); + } } } diff --git a/xs/src/slic3r/AppController.hpp b/xs/src/slic3r/AppController.hpp index 1dc825526..9b4ff913c 100644 --- a/xs/src/slic3r/AppController.hpp +++ b/xs/src/slic3r/AppController.hpp @@ -14,6 +14,7 @@ namespace Slic3r { class Model; class Print; class PrintObject; +class PrintConfig; /** * @brief A boilerplate class for creating application logic. It should provide @@ -108,9 +109,9 @@ public: * @param title The title of the procedure. * @param firstmsg The message for the first subtask to be displayed. */ - void progress_indicator(unsigned statenum, - const std::string& title, - const std::string& firstmsg = ""); + ProgresIndicatorPtr progress_indicator(unsigned statenum, + const std::string& title, + const std::string& firstmsg = ""); /** * @brief Return the progress indicator set up for the current thread. This @@ -147,6 +148,8 @@ public: */ bool supports_asynch() const; + void process_events(); + protected: /** @@ -205,6 +208,8 @@ public: * @brief Slice the loaded print scene. */ void slice(); + + const PrintConfig& config() const; }; /** diff --git a/xs/src/slic3r/AppControllerWx.cpp b/xs/src/slic3r/AppControllerWx.cpp index c54c02d55..836a48996 100644 --- a/xs/src/slic3r/AppControllerWx.cpp +++ b/xs/src/slic3r/AppControllerWx.cpp @@ -25,6 +25,11 @@ bool AppControllerBoilerplate::supports_asynch() const return true; } +void AppControllerBoilerplate::process_events() +{ + wxSafeYield(); +} + AppControllerBoilerplate::PathList AppControllerBoilerplate::query_destination_paths( const std::string &title, @@ -79,7 +84,7 @@ bool AppControllerBoilerplate::report_issue(IssueType issuetype, case IssueType::FATAL: icon = wxICON_ERROR; } - auto ret = wxMessageBox(description, brief, icon | style); + auto ret = wxMessageBox(_(description), _(brief), icon | style); return ret != wxCANCEL; } @@ -216,7 +221,7 @@ class Wrapper: public IProgressIndicator, public wxEvtHandler { } void _state(unsigned st) { - if( st <= max() ) { + if( st <= IProgressIndicator::max() ) { Base::state(st); if(!gauge_->IsShown()) showProgress(true); @@ -253,7 +258,14 @@ public: } virtual void state(float val) override { - if(val >= 1.0) state(unsigned(val)); + state(unsigned(val)); + } + + virtual void max(float val) override { + if(val > 1.0) { + gauge_->SetRange(static_cast(val)); + IProgressIndicator::max(val); + } } void state(unsigned st) { @@ -261,7 +273,9 @@ public: auto evt = new wxCommandEvent(PROGRESS_STATUS_UPDATE_EVENT, id_); evt->SetInt(st); wxQueueEvent(this, evt); - } else _state(st); + } else { + _state(st); + } } virtual void message(const std::string & msg) override { From 86726b15b4a63112c62ce7c9d96b2590509754a4 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Mon, 2 Jul 2018 10:45:06 +0200 Subject: [PATCH 106/198] Pull build fixes from libnest2d and allow reverse order checks in DJD placement for better quality results. --- .../libnest2d/clipper_backend/clipper_backend.hpp | 4 ++-- xs/src/libnest2d/libnest2d/common.hpp | 12 ++++++------ xs/src/libslic3r/Model.cpp | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp index 1306525c2..3f038faff 100644 --- a/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp +++ b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp @@ -143,7 +143,7 @@ inline void ShapeLike::offset(PolygonImpl& sh, TCoord distance) { using ClipperLib::Paths; // If the input is not at least a triangle, we can not do this algorithm - if(sh.Contour.size() <= 3) throw GeometryException(GeoErr::OFFSET); + if(sh.Contour.size() <= 3) throw GeometryException(GeomErr::OFFSET); ClipperOffset offs; Paths result; @@ -154,7 +154,7 @@ inline void ShapeLike::offset(PolygonImpl& sh, TCoord distance) { // it removes the last vertex as well so boost will not have a closed // polygon - if(result.size() != 1) throw GeometryException(GeoErr::OFFSET); + if(result.size() != 1) throw GeometryException(GeomErr::OFFSET); sh.Contour = result.front(); diff --git a/xs/src/libnest2d/libnest2d/common.hpp b/xs/src/libnest2d/libnest2d/common.hpp index da2e36fb1..b9c252977 100644 --- a/xs/src/libnest2d/libnest2d/common.hpp +++ b/xs/src/libnest2d/libnest2d/common.hpp @@ -205,7 +205,7 @@ inline Radians::Radians(const Degrees °s): Double( degs * Pi/180) {} inline double Radians::toDegrees() { return operator Degrees(); } -enum class GeoErr : std::size_t { +enum class GeomErr : std::size_t { OFFSET, MERGE, NFP @@ -219,18 +219,18 @@ static const std::string ERROR_STR[] = { class GeometryException: public std::exception { - virtual const char * errorstr(GeoErr errcode) const { + virtual const char * errorstr(GeomErr errcode) const BP2D_NOEXCEPT { return ERROR_STR[static_cast(errcode)].c_str(); } - GeoErr errcode_; + GeomErr errcode_; public: - GeometryException(GeoErr code): errcode_(code) {} + GeometryException(GeomErr code): errcode_(code) {} - GeoErr errcode() const { return errcode_; } + GeomErr errcode() const { return errcode_; } - virtual const char * what() const override { + virtual const char * what() const BP2D_NOEXCEPT override { return errorstr(errcode_); } }; diff --git a/xs/src/libslic3r/Model.cpp b/xs/src/libslic3r/Model.cpp index c222dcf89..76be84e46 100644 --- a/xs/src/libslic3r/Model.cpp +++ b/xs/src/libslic3r/Model.cpp @@ -467,7 +467,8 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, Arranger::PlacementConfig pcfg; Arranger::SelectionConfig scfg; - scfg.try_reverse_order = false; + scfg.try_reverse_order = true; + scfg.allow_parallel = true; scfg.force_parallel = true; pcfg.alignment = Arranger::PlacementConfig::Alignment::CENTER; From ddb494558628b708da5cf448f826b23bf624d550 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Mon, 2 Jul 2018 11:22:47 +0200 Subject: [PATCH 107/198] Fix crash on Linux when arranging --- lib/Slic3r/GUI/MainFrame.pm | 2 +- xs/src/slic3r/AppController.cpp | 22 +++++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/lib/Slic3r/GUI/MainFrame.pm b/lib/Slic3r/GUI/MainFrame.pm index 2fdd7e11d..77d7956c9 100644 --- a/lib/Slic3r/GUI/MainFrame.pm +++ b/lib/Slic3r/GUI/MainFrame.pm @@ -62,7 +62,7 @@ sub new { eval { Wx::ToolTip::SetAutoPop(32767) }; # initialize status bar - $self->{statusbar} = Slic3r::GUI::ProgressStatusBar->new($self, -1); + $self->{statusbar} = Slic3r::GUI::ProgressStatusBar->new($self, Wx::NewId); $self->{statusbar}->SetStatusText(L("Version ").$Slic3r::VERSION.L(" - Remember to check for updates at http://github.com/prusa3d/slic3r/releases")); $self->SetStatusBar($self->{statusbar}); diff --git a/xs/src/slic3r/AppController.cpp b/xs/src/slic3r/AppController.cpp index 06e2cd093..77296c74b 100644 --- a/xs/src/slic3r/AppController.cpp +++ b/xs/src/slic3r/AppController.cpp @@ -314,20 +314,26 @@ void AppController::arrange_model() for(auto obj : model_->objects) count += obj->instances.size(); auto pind = progress_indicator(); - auto pmax = pind->max(); - // Set the range of the progress to the object count - pind->max(count); + float pmax = 1.0; + + if(pind) { + pmax = pind->max(); + + // Set the range of the progress to the object count + pind->max(count); + + } auto dist = print_ctl()->config().min_object_distance(); BoundingBoxf bb(print_ctl()->config().bed_shape.values); - pind->update(0, "Arranging objects..."); + if(pind) pind->update(0, "Arranging objects..."); try { model_->arrange_objects(dist, &bb, [pind, count](unsigned rem){ - pind->update(count - rem, "Arranging objects..."); + if(pind) pind->update(count - rem, "Arranging objects..."); }); } catch(std::exception& e) { std::cerr << e.what() << std::endl; @@ -338,8 +344,10 @@ void AppController::arrange_model() } // Restore previous max value - pind->max(pmax); - pind->update(0, "Arranging done."); + if(pind) { + pind->max(pmax); + pind->update(0, "Arranging done."); + } }); while( ftr.wait_for(std::chrono::milliseconds(10)) From 07b28b2a8c1b20a4fca89c08719ae6421dc273a5 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Mon, 2 Jul 2018 13:51:50 +0200 Subject: [PATCH 108/198] Bug-fixes of the OSX crashing --- xs/src/slic3r/GUI/Tab.cpp | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index f41a14e93..ebbf4caff 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -183,7 +183,7 @@ void Tab::create_preset_tab(PresetBundle *preset_bundle) return; if (selected_item >= 0){ std::string selected_string = m_presets_choice->GetString(selected_item).ToUTF8().data(); - if (selected_string.find_first_of("-------") == 0 + if (selected_string.find("-------") == 0 /*selected_string == "------- System presets -------" || selected_string == "------- User presets -------"*/){ m_presets_choice->SetSelection(m_selected_preset_item); @@ -454,8 +454,13 @@ void Tab::update_changed_tree_ui() get_sys_and_mod_flags(opt_key, sys_page, modified_page); } } - if (title == _("Dependencies") && name() != "printer"){ - get_sys_and_mod_flags("compatible_printers", sys_page, modified_page); + if (title == _("Dependencies")){ + if (name() != "printer") + get_sys_and_mod_flags("compatible_printers", sys_page, modified_page); + else { + sys_page = m_presets->get_selected_preset_parent() ? true:false; + modified_page = false; + } } for (auto group : page->m_optgroups) { @@ -1863,6 +1868,8 @@ void Tab::load_current_preset() m_ttg_non_system = m_presets->get_selected_preset_parent() ? &m_ttg_value_unlock : &m_ttg_white_bullet_ns; m_tt_non_system = m_presets->get_selected_preset_parent() ? &m_tt_value_unlock : &m_ttg_white_bullet_ns; + m_undo_to_sys_btn->Enable(!preset.is_default); + // use CallAfter because some field triggers schedule on_change calls using CallAfter, // and we don't want them to be called after this update_dirty() as they would mark the // preset dirty again @@ -2529,28 +2536,33 @@ ConfigOptionsGroupShp Page::new_optgroup(const wxString& title, int noncommon_la if (noncommon_label_width >= 0) optgroup->label_width = noncommon_label_width; - optgroup->m_on_change = [this](t_config_option_key opt_key, boost::any value){ +#ifdef __WXOSX__ + auto tab = GetParent()->GetParent(); +#else + auto tab = GetParent(); +#endif + optgroup->m_on_change = [this, tab](t_config_option_key opt_key, boost::any value){ //! This function will be called from OptionGroup. //! Using of CallAfter is redundant. //! And in some cases it causes update() function to be recalled again //! wxTheApp->CallAfter([this, opt_key, value]() { - static_cast(GetParent())->update_dirty(); - static_cast(GetParent())->on_value_change(opt_key, value); + static_cast(tab)->update_dirty(); + static_cast(tab)->on_value_change(opt_key, value); //! }); }; - optgroup->m_get_initial_config = [this](){ - DynamicPrintConfig config = static_cast(GetParent())->m_presets->get_selected_preset().config; + optgroup->m_get_initial_config = [this, tab](){ + DynamicPrintConfig config = static_cast(tab)->m_presets->get_selected_preset().config; return config; }; - optgroup->m_get_sys_config = [this](){ - DynamicPrintConfig config = static_cast(GetParent())->m_presets->get_selected_preset_parent()->config; + optgroup->m_get_sys_config = [this, tab](){ + DynamicPrintConfig config = static_cast(tab)->m_presets->get_selected_preset_parent()->config; return config; }; - optgroup->have_sys_config = [this](){ - return static_cast(GetParent())->m_presets->get_selected_preset_parent() != nullptr; + optgroup->have_sys_config = [this, tab](){ + return static_cast(tab)->m_presets->get_selected_preset_parent() != nullptr; }; vsizer()->Add(optgroup->sizer, 0, wxEXPAND | wxALL, 10); From 617b5158bdc7dc9802e050f691fa2e7e4f3e643c Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Mon, 2 Jul 2018 17:18:09 +0200 Subject: [PATCH 109/198] Fix: Leak in Tab.cpp in serial port test --- xs/src/slic3r/GUI/Tab.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index ebbf4caff..8af00b2b6 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -1492,7 +1492,7 @@ void TabPrinter::build() sizer->Add(btn); btn->Bind(wxEVT_BUTTON, [this, parent](wxCommandEvent e){ - auto sender = new GCodeSender(); + auto sender = Slic3r::make_unique(); auto res = sender->connect( m_config->opt_string("serial_port"), m_config->opt_int("serial_speed") From c7f3014d260b5634883170543e79c57fd1ddf0c1 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Mon, 2 Jul 2018 20:25:37 +0200 Subject: [PATCH 110/198] Fix of "Slic3r 1.40.1-rc fails to retain the filament list on" https://github.com/prusa3d/Slic3r/issues/1020 --- xs/src/slic3r/GUI/PresetBundle.cpp | 40 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/xs/src/slic3r/GUI/PresetBundle.cpp b/xs/src/slic3r/GUI/PresetBundle.cpp index d36ef7b6f..0a280eee1 100644 --- a/xs/src/slic3r/GUI/PresetBundle.cpp +++ b/xs/src/slic3r/GUI/PresetBundle.cpp @@ -264,36 +264,38 @@ void PresetBundle::load_selections(const AppConfig &config) this->load_installed_printers(config); // Parse the initial print / filament / printer profile names. - std::string initial_print_profile_name = remove_ini_suffix(config.get("presets", "print")); - std::vector initial_filament_profile_names; - std::string initial_printer_profile_name = remove_ini_suffix(config.get("presets", "printer")); - - auto *nozzle_diameter = dynamic_cast(printers.get_selected_preset().config.option("nozzle_diameter")); - size_t num_extruders = nozzle_diameter->values.size(); - initial_filament_profile_names.emplace_back(remove_ini_suffix(config.get("presets", "filament"))); - this->set_filament_preset(0, initial_filament_profile_names.back()); - for (unsigned int i = 1; i < (unsigned int)num_extruders; ++ i) { - char name[64]; - sprintf(name, "filament_%d", i); - if (! config.has("presets", name)) - break; - initial_filament_profile_names.emplace_back(remove_ini_suffix(config.get("presets", name))); - this->set_filament_preset(i, initial_filament_profile_names.back()); - } + std::string initial_print_profile_name = remove_ini_suffix(config.get("presets", "print")); + std::string initial_filament_profile_name = remove_ini_suffix(config.get("presets", "filament")); + std::string initial_printer_profile_name = remove_ini_suffix(config.get("presets", "printer")); // Activate print / filament / printer profiles from the config. // If the printer profile enumerated by the config are not visible, select an alternate preset. // Do not select alternate profiles for the print / filament profiles as those presets // will be selected by the following call of this->update_compatible_with_printer(true). prints.select_preset_by_name_strict(initial_print_profile_name); - filaments.select_preset_by_name_strict(initial_filament_profile_names.front()); + filaments.select_preset_by_name_strict(initial_filament_profile_name); printers.select_preset_by_name(initial_printer_profile_name, true); + // Load the names of the other filament profiles selected for a multi-material printer. + auto *nozzle_diameter = dynamic_cast(printers.get_selected_preset().config.option("nozzle_diameter")); + size_t num_extruders = nozzle_diameter->values.size(); + this->filament_presets = { initial_filament_profile_name }; + for (unsigned int i = 1; i < (unsigned int)num_extruders; ++ i) { + char name[64]; + sprintf(name, "filament_%d", i); + if (! config.has("presets", name)) + break; + this->filament_presets.emplace_back(remove_ini_suffix(config.get("presets", name))); + } + // Do not define the missing filaments, so that the update_compatible_with_printer() will use the preferred filaments. + this->filament_presets.resize(num_extruders, ""); + // Update visibility of presets based on their compatibility with the active printer. // Always try to select a compatible print and filament preset to the current printer preset, // as the application may have been closed with an active "external" preset, which does not // exist. this->update_compatible_with_printer(true); + this->update_multi_material_filament_presets(); } // Export selections (current print, current filaments, current printer) into config.ini @@ -946,9 +948,7 @@ void PresetBundle::update_multi_material_filament_presets() for (size_t i = 0; i < std::min(this->filament_presets.size(), num_extruders); ++ i) this->filament_presets[i] = this->filaments.find_preset(this->filament_presets[i], true)->name; // Append the rest of filament presets. -// if (this->filament_presets.size() < num_extruders) - this->filament_presets.resize(num_extruders, this->filament_presets.empty() ? this->filaments.first_visible().name : this->filament_presets.back()); - + this->filament_presets.resize(num_extruders, this->filament_presets.empty() ? this->filaments.first_visible().name : this->filament_presets.back()); // Now verify if wiping_volumes_matrix has proper size (it is used to deduce number of extruders in wipe tower generator): std::vector old_matrix = this->project_config.option("wiping_volumes_matrix")->values; From 27b0926c1943f502527eb2c89c795437d987a22e Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Tue, 3 Jul 2018 10:22:55 +0200 Subject: [PATCH 111/198] Localization for app controller. --- xs/CMakeLists.txt | 1 + xs/src/slic3r/AppController.cpp | 77 +++++++++++++----------- xs/src/slic3r/AppController.hpp | 47 +++++++++------ xs/src/slic3r/AppControllerWx.cpp | 87 ++++++++++++++-------------- xs/src/slic3r/IProgressIndicator.hpp | 23 ++------ xs/src/slic3r/Strings.hpp | 10 ++++ 6 files changed, 134 insertions(+), 111 deletions(-) create mode 100644 xs/src/slic3r/Strings.hpp diff --git a/xs/CMakeLists.txt b/xs/CMakeLists.txt index 4beb67964..5544c5c2d 100644 --- a/xs/CMakeLists.txt +++ b/xs/CMakeLists.txt @@ -262,6 +262,7 @@ add_library(libslic3r_gui STATIC ${LIBDIR}/slic3r/AppController.hpp ${LIBDIR}/slic3r/AppController.cpp ${LIBDIR}/slic3r/AppControllerWx.cpp + ${LIBDIR}/slic3r/Strings.hpp ) add_library(admesh STATIC diff --git a/xs/src/slic3r/AppController.cpp b/xs/src/slic3r/AppController.cpp index 77296c74b..cd35077af 100644 --- a/xs/src/slic3r/AppController.cpp +++ b/xs/src/slic3r/AppController.cpp @@ -60,18 +60,23 @@ void AppControllerBoilerplate::progress_indicator( progressind_->m.unlock(); } -AppControllerBoilerplate::ProgresIndicatorPtr -AppControllerBoilerplate::progress_indicator( - unsigned statenum, - const std::string &title, - const std::string &firstmsg) +void AppControllerBoilerplate::progress_indicator(unsigned statenum, + const string &title, + const string &firstmsg) { progressind_->m.lock(); - auto ret = progressind_->store[std::this_thread::get_id()] = - create_progress_indicator(statenum, title, firstmsg);; + progressind_->store[std::this_thread::get_id()] = + create_progress_indicator(statenum, title, firstmsg); progressind_->m.unlock(); +} - return ret; +void AppControllerBoilerplate::progress_indicator(unsigned statenum, + const string &title) +{ + progressind_->m.lock(); + progressind_->store[std::this_thread::get_id()] = + create_progress_indicator(statenum, title); + progressind_->m.unlock(); } AppControllerBoilerplate::ProgresIndicatorPtr @@ -177,8 +182,8 @@ void PrintController::slice(PrintObject *pobj) if(pobj->layers.empty()) report_issue(IssueType::ERR, - "No layers were detected. You might want to repair your " - "STL file(s) or check their size or thickness and retry" + _(L("No layers were detected. You might want to repair your " + "STL file(s) or check their size or thickness and retry")) ); pobj->state.set_done(STEP_SLICE); @@ -235,50 +240,51 @@ void PrintController::gen_support_material(PrintObject *pobj) } } -void PrintController::slice() +void PrintController::slice(AppControllerBoilerplate::ProgresIndicatorPtr pri) { + auto st = pri->state(); + Slic3r::trace(3, "Starting the slicing process."); - progress_indicator()->update(20u, "Generating perimeters"); + pri->update(st+20, _(L("Generating perimeters"))); for(auto obj : print_->objects) make_perimeters(obj); - progress_indicator()->update(60u, "Infilling layers"); + pri->update(st+60, _(L("Infilling layers"))); for(auto obj : print_->objects) infill(obj); - progress_indicator()->update(70u, "Generating support material"); + pri->update(st+70, _(L("Generating support material"))); for(auto obj : print_->objects) gen_support_material(obj); - progress_indicator()->message_fmt("Weight: %.1fg, Cost: %.1f", - print_->total_weight, - print_->total_cost); - - progress_indicator()->state(85u); + pri->message_fmt(_(L("Weight: %.1fg, Cost: %.1f")), + print_->total_weight, print_->total_cost); + pri->state(st+85); - progress_indicator()->update(88u, "Generating skirt"); + pri->update(st+88, _(L("Generating skirt"))); make_skirt(); - progress_indicator()->update(90u, "Generating brim"); + pri->update(st+90, _(L("Generating brim"))); make_brim(); - progress_indicator()->update(95u, "Generating wipe tower"); + pri->update(st+95, _(L("Generating wipe tower"))); make_wipe_tower(); - progress_indicator()->update(100u, "Done"); + pri->update(st+100, _(L("Done"))); // time to make some statistics.. - Slic3r::trace(3, "Slicing process finished."); + Slic3r::trace(3, _(L("Slicing process finished."))); } -const PrintConfig &PrintController::config() const +void PrintController::slice() { - return print_->config; + auto pri = progress_indicator(); + slice(pri); } void IProgressIndicator::message_fmt( - const std::string &fmtstr, ...) { + const string &fmtstr, ...) { std::stringstream ss; va_list args; va_start(args, fmtstr); @@ -304,6 +310,11 @@ void IProgressIndicator::message_fmt( message(ss.str()); } +const PrintConfig &PrintController::config() const +{ + return print_->config; +} + void AppController::arrange_model() { auto ftr = std::async( @@ -329,24 +340,24 @@ void AppController::arrange_model() BoundingBoxf bb(print_ctl()->config().bed_shape.values); - if(pind) pind->update(0, "Arranging objects..."); + if(pind) pind->update(0, _(L("Arranging objects..."))); try { model_->arrange_objects(dist, &bb, [pind, count](unsigned rem){ - if(pind) pind->update(count - rem, "Arranging objects..."); + if(pind) pind->update(count - rem, _(L("Arranging objects..."))); }); } catch(std::exception& e) { std::cerr << e.what() << std::endl; report_issue(IssueType::ERR, - "Could not arrange model objects! " - "Some geometries may be invalid.", - "Exception occurred"); + _(L("Could not arrange model objects! " + "Some geometries may be invalid.")), + _(L("Exception occurred"))); } // Restore previous max value if(pind) { pind->max(pmax); - pind->update(0, "Arranging done."); + pind->update(0, _(L("Arranging done."))); } }); diff --git a/xs/src/slic3r/AppController.hpp b/xs/src/slic3r/AppController.hpp index 9b4ff913c..cece771cc 100644 --- a/xs/src/slic3r/AppController.hpp +++ b/xs/src/slic3r/AppController.hpp @@ -16,6 +16,7 @@ class Print; class PrintObject; class PrintConfig; + /** * @brief A boilerplate class for creating application logic. It should provide * features as issue reporting and progress indication, etc... @@ -45,7 +46,7 @@ public: AppControllerBoilerplate(); ~AppControllerBoilerplate(); - using Path = std::string; + using Path = string; using PathList = std::vector; /// Common runtime issue types @@ -66,20 +67,20 @@ public: * @return Returns a list of paths choosed by the user. */ PathList query_destination_paths( - const std::string& title, + const string& title, const std::string& extensions) const; /** * @brief Same as query_destination_paths but works for directories only. */ PathList query_destination_dirs( - const std::string& title) const; + const string& title) const; /** * @brief Same as query_destination_paths but returns only one path. */ Path query_destination_path( - const std::string& title, + const string& title, const std::string& extensions, const std::string& hint = "") const; @@ -94,8 +95,11 @@ public: * title. */ bool report_issue(IssueType issuetype, - const std::string& description, - const std::string& brief = ""); + const string& description, + const string& brief); + + bool report_issue(IssueType issuetype, + const string& description); /** * @brief Set up a progress indicator for the current thread. @@ -109,9 +113,12 @@ public: * @param title The title of the procedure. * @param firstmsg The message for the first subtask to be displayed. */ - ProgresIndicatorPtr progress_indicator(unsigned statenum, - const std::string& title, - const std::string& firstmsg = ""); + void progress_indicator(unsigned statenum, + const string& title, + const string& firstmsg); + + void progress_indicator(unsigned statenum, + const string& title); /** * @brief Return the progress indicator set up for the current thread. This @@ -161,8 +168,12 @@ protected: */ ProgresIndicatorPtr create_progress_indicator( unsigned statenum, - const std::string& title, - const std::string& firstmsg = "") const; + const string& title, + const string& firstmsg) const; + + ProgresIndicatorPtr create_progress_indicator( + unsigned statenum, + const string& title) const; // This is a global progress indicator placeholder. In the Slic3r UI it can // contain the progress indicator on the statusbar. @@ -184,6 +195,14 @@ protected: void infill(PrintObject *pobj); void gen_support_material(PrintObject *pobj); + /** + * @brief Slice one pront object. + * @param pobj The print object. + */ + void slice(PrintObject *pobj); + + void slice(ProgresIndicatorPtr pri); + public: // Must be public for perl to use it @@ -198,12 +217,6 @@ public: return PrintController::Ptr( new PrintController(print) ); } - /** - * @brief Slice one pront object. - * @param pobj The print object. - */ - void slice(PrintObject *pobj); - /** * @brief Slice the loaded print scene. */ diff --git a/xs/src/slic3r/AppControllerWx.cpp b/xs/src/slic3r/AppControllerWx.cpp index 836a48996..8dd6643d5 100644 --- a/xs/src/slic3r/AppControllerWx.cpp +++ b/xs/src/slic3r/AppControllerWx.cpp @@ -32,11 +32,11 @@ void AppControllerBoilerplate::process_events() AppControllerBoilerplate::PathList AppControllerBoilerplate::query_destination_paths( - const std::string &title, + const string &title, const std::string &extensions) const { - wxFileDialog dlg(wxTheApp->GetTopWindow(), wxString(title) ); + wxFileDialog dlg(wxTheApp->GetTopWindow(), title ); dlg.SetWildcard(extensions); dlg.ShowModal(); @@ -52,7 +52,7 @@ AppControllerBoilerplate::query_destination_paths( AppControllerBoilerplate::Path AppControllerBoilerplate::query_destination_path( - const std::string &title, + const string &title, const std::string &extensions, const std::string& hint) const { @@ -71,8 +71,8 @@ AppControllerBoilerplate::query_destination_path( } bool AppControllerBoilerplate::report_issue(IssueType issuetype, - const std::string &description, - const std::string &brief) + const string &description, + const string &brief) { auto icon = wxICON_INFORMATION; auto style = wxOK|wxCENTRE; @@ -84,10 +84,17 @@ bool AppControllerBoilerplate::report_issue(IssueType issuetype, case IssueType::FATAL: icon = wxICON_ERROR; } - auto ret = wxMessageBox(_(description), _(brief), icon | style); + auto ret = wxMessageBox(description, brief, icon | style); return ret != wxCANCEL; } +bool AppControllerBoilerplate::report_issue( + AppControllerBoilerplate::IssueType issuetype, + const string &description) +{ + return report_issue(issuetype, description, string()); +} + wxDEFINE_EVENT(PROGRESS_STATUS_UPDATE_EVENT, wxCommandEvent); namespace { @@ -99,11 +106,10 @@ namespace { class GuiProgressIndicator: public IProgressIndicator, public wxEvtHandler { - std::shared_ptr gauge_; + wxProgressDialog gauge_; using Base = IProgressIndicator; wxString message_; int range_; wxString title_; - unsigned prc_ = 0; bool is_asynch_ = false; const int id_ = wxWindow::NewControlId(); @@ -111,29 +117,15 @@ class GuiProgressIndicator: // status update handler void _state( wxCommandEvent& evt) { unsigned st = evt.GetInt(); + message_ = evt.GetString(); _state(st); } // Status update implementation void _state( unsigned st) { - if(st < max()) { - if(!gauge_) gauge_ = std::make_shared( - title_, message_, range_, wxTheApp->GetTopWindow(), - wxPD_APP_MODAL | wxPD_AUTO_HIDE - ); - - if(!gauge_->IsShown()) gauge_->ShowModal(); - Base::state(st); - gauge_->Update(static_cast(st), message_); - } - - if(st == max()) { - prc_++; - if(prc_ == Base::procedure_count()) { - gauge_.reset(); - prc_ = 0; - } - } + if(!gauge_.IsShown()) gauge_.ShowModal(); + Base::state(st); + gauge_.Update(static_cast(st), message_); } public: @@ -144,9 +136,12 @@ public: /// Get the mode of parallel operation. inline bool asynch() const { return is_asynch_; } - inline GuiProgressIndicator(int range, const std::string& title, - const std::string& firstmsg) : - range_(range), message_(_(firstmsg)), title_(_(title)) + inline GuiProgressIndicator(int range, const string& title, + const string& firstmsg) : + gauge_(title, firstmsg, range, wxTheApp->GetTopWindow(), + wxPD_APP_MODAL | wxPD_AUTO_HIDE), + message_(firstmsg), + range_(range), title_(title) { Base::max(static_cast(range)); Base::states(static_cast(range)); @@ -162,7 +157,7 @@ public: } virtual void state(float val) override { - if( val >= 1.0) state(static_cast(val)); + state(static_cast(val)); } void state(unsigned st) { @@ -170,31 +165,31 @@ public: if(is_asynch_) { auto evt = new wxCommandEvent(PROGRESS_STATUS_UPDATE_EVENT, id_); evt->SetInt(st); + evt->SetString(message_); wxQueueEvent(this, evt); } else _state(st); } - virtual void message(const std::string & msg) override { - message_ = _(msg); + virtual void message(const string & msg) override { + message_ = msg; } - virtual void messageFmt(const std::string& fmt, ...) { + virtual void messageFmt(const string& fmt, ...) { va_list arglist; va_start(arglist, fmt); - message_ = wxString::Format(_(fmt), arglist); + message_ = wxString::Format(wxString(fmt), arglist); va_end(arglist); } - virtual void title(const std::string & title) override { - title_ = _(title); + virtual void title(const string & title) override { + title_ = title; } }; } AppControllerBoilerplate::ProgresIndicatorPtr AppControllerBoilerplate::create_progress_indicator( - unsigned statenum, const std::string& title, - const std::string& firstmsg) const + unsigned statenum, const string& title, const string& firstmsg) const { auto pri = std::make_shared(statenum, title, firstmsg); @@ -206,6 +201,13 @@ AppControllerBoilerplate::create_progress_indicator( return pri; } +AppControllerBoilerplate::ProgresIndicatorPtr +AppControllerBoilerplate::create_progress_indicator(unsigned statenum, + const string &title) const +{ + return create_progress_indicator(statenum, title, string()); +} + namespace { // A wrapper progress indicator class around the statusbar created in perl. @@ -278,18 +280,18 @@ public: } } - virtual void message(const std::string & msg) override { + virtual void message(const string & msg) override { message_ = msg; } - virtual void message_fmt(const std::string& fmt, ...) override { + virtual void message_fmt(const string& fmt, ...) override { va_list arglist; va_start(arglist, fmt); - message_ = wxString::Format(_(fmt), arglist); + message_ = wxString::Format(fmt, arglist); va_end(arglist); } - virtual void title(const std::string & /*title*/) override {} + virtual void title(const string & /*title*/) override {} }; } @@ -305,5 +307,4 @@ void AppController::set_global_progress_indicator( global_progressind_ = std::make_shared(gauge, sb, *this); } } - } diff --git a/xs/src/slic3r/IProgressIndicator.hpp b/xs/src/slic3r/IProgressIndicator.hpp index 73296697f..704931574 100644 --- a/xs/src/slic3r/IProgressIndicator.hpp +++ b/xs/src/slic3r/IProgressIndicator.hpp @@ -3,6 +3,7 @@ #include #include +#include "Strings.hpp" namespace Slic3r { @@ -16,7 +17,6 @@ public: private: float state_ = .0f, max_ = 1.f, step_; CancelFn cancelfunc_ = [](){}; - unsigned proc_count_ = 1; public: @@ -43,13 +43,13 @@ public: } /// Message shown on the next status update. - virtual void message(const std::string&) = 0; + virtual void message(const string&) = 0; /// Title of the operaton. - virtual void title(const std::string&) = 0; + virtual void title(const string&) = 0; /// Formatted message for the next status update. Works just like sprinf. - virtual void message_fmt(const std::string& fmt, ...); + virtual void message_fmt(const string& fmt, ...); /// Set up a cancel callback for the operation if feasible. inline void on_cancel(CancelFn func) { cancelfunc_ = func; } @@ -60,21 +60,8 @@ public: */ virtual void cancel() { cancelfunc_(); } - /** - * \brief Set up how many subprocedures does the whole operation contain. - * - * This was neccesary from practical reasons. If the progress indicator is - * a dialog and we want to show the progress of a few sub operations than - * the dialog wont be closed and reopened each time a new sub operation is - * started. This is not a mandatory feature and can be ignored completely. - */ - inline void procedure_count(unsigned pc) { proc_count_ = pc; } - - /// Get the current procedure count - inline unsigned procedure_count() const { return proc_count_; } - /// Convinience function to call message and status update in one function. - void update(float st, const std::string& msg) { + void update(float st, const string& msg) { message(msg); state(st); } }; diff --git a/xs/src/slic3r/Strings.hpp b/xs/src/slic3r/Strings.hpp new file mode 100644 index 000000000..b267fe064 --- /dev/null +++ b/xs/src/slic3r/Strings.hpp @@ -0,0 +1,10 @@ +#ifndef STRINGS_HPP +#define STRINGS_HPP + +#include "GUI/GUI.hpp" + +namespace Slic3r { +using string = wxString; +} + +#endif // STRINGS_HPP From b682fb1829a870b5e95cecd9bf0a95967993ce99 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Tue, 3 Jul 2018 12:19:34 +0200 Subject: [PATCH 112/198] Enabled "delete preset" button after current profile saving --- xs/src/slic3r/GUI/Tab.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 8af00b2b6..9e0e4fc27 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -2134,6 +2134,8 @@ void Tab::save_preset(std::string name /*= ""*/) update_tab_ui(); // Update the selection boxes at the platter. on_presets_changed(); + // If current profile is saved, "delete preset" button have to be enabled + m_btn_delete_preset->Enable(true); if (m_name == "printer") static_cast(this)->m_initial_extruders_count = static_cast(this)->m_extruders_count; From 99f2d40b535c124ebdd39099ca2f3db8a48f88a0 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Tue, 3 Jul 2018 13:58:35 +0200 Subject: [PATCH 113/198] Remove progress indicators for individual threads. --- xs/src/slic3r/AppController.cpp | 68 ++++++++++----------------------- xs/src/slic3r/AppController.hpp | 35 ++++------------- 2 files changed, 28 insertions(+), 75 deletions(-) diff --git a/xs/src/slic3r/AppController.cpp b/xs/src/slic3r/AppController.cpp index cd35077af..151b7f880 100644 --- a/xs/src/slic3r/AppController.cpp +++ b/xs/src/slic3r/AppController.cpp @@ -18,26 +18,24 @@ namespace Slic3r { -class AppControllerBoilerplate::PriMap { +class AppControllerBoilerplate::PriData { public: - using M = std::unordered_map; std::mutex m; - M store; std::thread::id ui_thread; - inline explicit PriMap(std::thread::id uit): ui_thread(uit) {} + inline explicit PriData(std::thread::id uit): ui_thread(uit) {} }; AppControllerBoilerplate::AppControllerBoilerplate() - :progressind_(new PriMap(std::this_thread::get_id())) {} + :pri_data_(new PriData(std::this_thread::get_id())) {} AppControllerBoilerplate::~AppControllerBoilerplate() { - progressind_.reset(); + pri_data_.reset(); } bool AppControllerBoilerplate::is_main_thread() const { - return progressind_->ui_thread == std::this_thread::get_id(); + return pri_data_->ui_thread == std::this_thread::get_id(); } namespace GUI { @@ -53,50 +51,25 @@ static const PrintStep STEP_SKIRT = psSkirt; static const PrintStep STEP_BRIM = psBrim; static const PrintStep STEP_WIPE_TOWER = psWipeTower; -void AppControllerBoilerplate::progress_indicator( - AppControllerBoilerplate::ProgresIndicatorPtr progrind) { - progressind_->m.lock(); - progressind_->store[std::this_thread::get_id()] = progrind; - progressind_->m.unlock(); -} - -void AppControllerBoilerplate::progress_indicator(unsigned statenum, - const string &title, - const string &firstmsg) -{ - progressind_->m.lock(); - progressind_->store[std::this_thread::get_id()] = - create_progress_indicator(statenum, title, firstmsg); - progressind_->m.unlock(); -} - -void AppControllerBoilerplate::progress_indicator(unsigned statenum, - const string &title) -{ - progressind_->m.lock(); - progressind_->store[std::this_thread::get_id()] = - create_progress_indicator(statenum, title); - progressind_->m.unlock(); -} - AppControllerBoilerplate::ProgresIndicatorPtr -AppControllerBoilerplate::progress_indicator() { - - PriMap::M::iterator pret; +AppControllerBoilerplate::global_progress_indicator() { ProgresIndicatorPtr ret; - progressind_->m.lock(); - if( (pret = progressind_->store.find(std::this_thread::get_id())) - == progressind_->store.end()) - { - progressind_->store[std::this_thread::get_id()] = ret = - global_progressind_; - } else ret = pret->second; - progressind_->m.unlock(); + pri_data_->m.lock(); + ret = global_progressind_; + pri_data_->m.unlock(); return ret; } +void AppControllerBoilerplate::global_progress_indicator( + AppControllerBoilerplate::ProgresIndicatorPtr gpri) +{ + pri_data_->m.lock(); + global_progressind_ = gpri; + pri_data_->m.unlock(); +} + void PrintController::make_skirt() { assert(print_ != nullptr); @@ -195,8 +168,6 @@ void PrintController::make_perimeters(PrintObject *pobj) slice(pobj); - auto&& prgind = progress_indicator(); - if (!pobj->state.is_done(STEP_PERIMETERS)) { pobj->_make_perimeters(); } @@ -279,7 +250,8 @@ void PrintController::slice(AppControllerBoilerplate::ProgresIndicatorPtr pri) void PrintController::slice() { - auto pri = progress_indicator(); + auto pri = global_progress_indicator(); + if(!pri) pri = create_progress_indicator(100, L("Slicing")); slice(pri); } @@ -324,7 +296,7 @@ void AppController::arrange_model() unsigned count = 0; for(auto obj : model_->objects) count += obj->instances.size(); - auto pind = progress_indicator(); + auto pind = global_progress_indicator(); float pmax = 1.0; diff --git a/xs/src/slic3r/AppController.hpp b/xs/src/slic3r/AppController.hpp index cece771cc..e9252b50c 100644 --- a/xs/src/slic3r/AppController.hpp +++ b/xs/src/slic3r/AppController.hpp @@ -30,16 +30,16 @@ class PrintConfig; * a cli client. */ class AppControllerBoilerplate { - class PriMap; // Some structure to store progress indication data public: /// A Progress indicator object smart pointer using ProgresIndicatorPtr = std::shared_ptr; private: + class PriData; // Some structure to store progress indication data // Pimpl data for thread safe progress indication features - std::unique_ptr progressind_; + std::unique_ptr pri_data_; public: @@ -102,32 +102,14 @@ public: const string& description); /** - * @brief Set up a progress indicator for the current thread. - * @param progrind An already created progress indicator object. + * @brief Return the global progress indicator for the current controller. + * Can be empty as well. + * + * Only one thread should use the global indicator at a time. */ - void progress_indicator(ProgresIndicatorPtr progrind); + ProgresIndicatorPtr global_progress_indicator(); - /** - * @brief Create and set up a new progress indicator for the current thread. - * @param statenum The number of states for the given procedure. - * @param title The title of the procedure. - * @param firstmsg The message for the first subtask to be displayed. - */ - void progress_indicator(unsigned statenum, - const string& title, - const string& firstmsg); - - void progress_indicator(unsigned statenum, - const string& title); - - /** - * @brief Return the progress indicator set up for the current thread. This - * can be empty as well. - * @return A progress indicator object implementing IProgressIndicator. If - * a global progress indicator is available for the current implementation - * than this will be set up for the current thread and returned. - */ - ProgresIndicatorPtr progress_indicator(); + void global_progress_indicator(ProgresIndicatorPtr gpri); /** * @brief A predicate telling the caller whether it is the thread that @@ -258,7 +240,6 @@ public: */ void set_print(Print *print) { printctl = PrintController::create(print); - printctl->progress_indicator(progress_indicator()); } /** From c73f70292272553f6fb7c5a87b1542140047214a Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Tue, 3 Jul 2018 14:58:49 +0200 Subject: [PATCH 114/198] Filtering invalid geometries as per: SPE-337 --- xs/src/libslic3r/Model.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xs/src/libslic3r/Model.cpp b/xs/src/libslic3r/Model.cpp index 76be84e46..4b746fb7c 100644 --- a/xs/src/libslic3r/Model.cpp +++ b/xs/src/libslic3r/Model.cpp @@ -436,8 +436,8 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, biggest = &item; } } - /*if(it.second.vertexCount() > 3)*/ - shapes.push_back(std::ref(it.second)); + + if(it.second.vertexCount() > 3) shapes.push_back(std::ref(it.second)); }); Box bin; From 16ec625483326c609f264ee4e8086e0a9f38c509 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Tue, 3 Jul 2018 15:09:12 +0200 Subject: [PATCH 115/198] Eliminating signed comp warning --- xs/src/slic3r/AppControllerWx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/src/slic3r/AppControllerWx.cpp b/xs/src/slic3r/AppControllerWx.cpp index 8dd6643d5..4e116c7b9 100644 --- a/xs/src/slic3r/AppControllerWx.cpp +++ b/xs/src/slic3r/AppControllerWx.cpp @@ -229,7 +229,7 @@ class Wrapper: public IProgressIndicator, public wxEvtHandler { if(!gauge_->IsShown()) showProgress(true); stbar_->SetStatusText(message_); - if(st == gauge_->GetRange()) { + if(static_cast(st) == gauge_->GetRange()) { gauge_->SetValue(0); showProgress(false); } else { From b4666e81749befd3eb3e0afc5872f31509be2c37 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Tue, 3 Jul 2018 15:15:53 +0200 Subject: [PATCH 116/198] Tryfix for Mac build... --- .../clipper_backend/clipper_backend.hpp | 18 ++++++++++++------ xs/src/libnest2d/libnest2d/geometry_traits.hpp | 3 ++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp index 3f038faff..8fb458a15 100644 --- a/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp +++ b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp @@ -12,12 +12,10 @@ #include -namespace libnest2d { - -// Aliases for convinience -using PointImpl = ClipperLib::IntPoint; -using PolygonImpl = ClipperLib::PolyNode; -using PathImpl = ClipperLib::Path; +namespace ClipperLib { +using PointImpl = IntPoint; +using PolygonImpl = PolyNode; +using PathImpl = Path; inline PointImpl& operator +=(PointImpl& p, const PointImpl& pa ) { // This could be done with SIMD @@ -50,6 +48,14 @@ inline PointImpl operator-(const PointImpl& p1, const PointImpl& p2) { ret -= p2; return ret; } +} + +namespace libnest2d { + +// Aliases for convinience +using PointImpl = ClipperLib::IntPoint; +using PolygonImpl = ClipperLib::PolyNode; +using PathImpl = ClipperLib::Path; //extern HoleCache holeCache; diff --git a/xs/src/libnest2d/libnest2d/geometry_traits.hpp b/xs/src/libnest2d/libnest2d/geometry_traits.hpp index f4cfe31af..758bdd1bd 100644 --- a/xs/src/libnest2d/libnest2d/geometry_traits.hpp +++ b/xs/src/libnest2d/libnest2d/geometry_traits.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include "common.hpp" @@ -260,7 +261,7 @@ void setY(RawPoint& p, const TCoord& val) template inline Radians _Segment::angleToXaxis() const { - if(std::isnan(angletox_)) { + if(std::isnan(static_cast(angletox_))) { TCoord dx = getX(second()) - getX(first()); TCoord dy = getY(second()) - getY(first()); From f3591d2a854715dc1d063e637ad7a533baf55bb1 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Tue, 3 Jul 2018 16:39:13 +0200 Subject: [PATCH 117/198] Libnest2D test fix --- xs/src/libnest2d/tests/test.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/xs/src/libnest2d/tests/test.cpp b/xs/src/libnest2d/tests/test.cpp index 9aee6d799..9791688ee 100644 --- a/xs/src/libnest2d/tests/test.cpp +++ b/xs/src/libnest2d/tests/test.cpp @@ -424,9 +424,10 @@ R"raw( TEST(GeometryAlgorithms, BottomLeftStressTest) { using namespace libnest2d; + const Coord SCALE = 1000000; auto& input = prusaParts(); - Box bin(210, 250); + Box bin(210*SCALE, 250*SCALE); BottomLeftPlacer placer(bin); auto it = input.begin(); @@ -440,20 +441,20 @@ TEST(GeometryAlgorithms, BottomLeftStressTest) { bool valid = true; if(result.size() == 2) { - Item& r1 = result[0]; - Item& r2 = result[1]; + Item& r1 = result[0]; + Item& r2 = result[1]; valid = !Item::intersects(r1, r2) || Item::touches(r1, r2); valid = (valid && !r1.isInside(r2) && !r2.isInside(r1)); if(!valid) { std::cout << "error index: " << i << std::endl; exportSVG(result, bin, i); } -// ASSERT_TRUE(valid); + ASSERT_TRUE(valid); } else { std::cout << "something went terribly wrong!" << std::endl; + FAIL(); } - placer.clearItems(); it++; i++; From bdc9b9daddbea905e55e5b89ecd11dcd2dd87266 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Tue, 3 Jul 2018 16:46:52 +0200 Subject: [PATCH 118/198] Bumped up the version number. --- xs/src/libslic3r/libslic3r.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/src/libslic3r/libslic3r.h b/xs/src/libslic3r/libslic3r.h index a5926debe..253c340eb 100644 --- a/xs/src/libslic3r/libslic3r.h +++ b/xs/src/libslic3r/libslic3r.h @@ -14,7 +14,7 @@ #include #define SLIC3R_FORK_NAME "Slic3r Prusa Edition" -#define SLIC3R_VERSION "1.40.1-rc" +#define SLIC3R_VERSION "1.40.1-rc2" #define SLIC3R_BUILD "UNKNOWN" typedef int32_t coord_t; From d337fec8af9e17d0f6c953ca439fa73c81baba21 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Wed, 4 Jul 2018 10:21:44 +0200 Subject: [PATCH 119/198] Proper fix for SPE-324 --- xs/src/libslic3r/Model.cpp | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/xs/src/libslic3r/Model.cpp b/xs/src/libslic3r/Model.cpp index 4b746fb7c..16711ff90 100644 --- a/xs/src/libslic3r/Model.cpp +++ b/xs/src/libslic3r/Model.cpp @@ -331,20 +331,27 @@ ShapeData2D projectModelFromTop(const Slic3r::Model &model) { for(auto objinst : objptr->instances) { if(objinst) { Slic3r::TriangleMesh tmpmesh = rmesh; -// objinst->transform_mesh(&tmpmesh); ClipperLib::PolyNode pn; + + // TODO export the exact 2D projection auto p = tmpmesh.convex_hull(); + p.make_clockwise(); p.append(p.first_point()); pn.Contour = Slic3rMultiPoint_to_ClipperPath( p ); + // Efficient conversion to item. Item item(std::move(pn)); - item.rotation(objinst->rotation); - item.translation( { - ClipperLib::cInt(objinst->offset.x/SCALING_FACTOR), - ClipperLib::cInt(objinst->offset.y/SCALING_FACTOR) - }); - ret.emplace_back(objinst, item); + + // Invalid geometries would throw exceptions when arranging + if(item.vertexCount() > 3) { + item.rotation(objinst->rotation); + item.translation( { + ClipperLib::cInt(objinst->offset.x/SCALING_FACTOR), + ClipperLib::cInt(objinst->offset.y/SCALING_FACTOR) + }); + ret.emplace_back(objinst, item); + } } } } @@ -437,7 +444,8 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, } } - if(it.second.vertexCount() > 3) shapes.push_back(std::ref(it.second)); + shapes.push_back(std::ref(it.second)); + }); Box bin; @@ -463,15 +471,17 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, // Will use the DJD selection heuristic with the BottomLeft placement // strategy using Arranger = Arranger; + using PConf = Arranger::PlacementConfig; + using SConf = Arranger::SelectionConfig; - Arranger::PlacementConfig pcfg; - Arranger::SelectionConfig scfg; + PConf pcfg; + SConf scfg; scfg.try_reverse_order = true; scfg.allow_parallel = true; scfg.force_parallel = true; - pcfg.alignment = Arranger::PlacementConfig::Alignment::CENTER; + pcfg.alignment = PConf::Alignment::CENTER; // TODO cannot use rotations until multiple objects of same geometry can // handle different rotations From 4b9a504c0456b30c7dd4e22edb2bca52fa726a3a Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Wed, 4 Jul 2018 11:19:11 +0200 Subject: [PATCH 120/198] Solution for SPE-347 (scale is not fed into the arrange alg) --- xs/src/libslic3r/Model.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xs/src/libslic3r/Model.cpp b/xs/src/libslic3r/Model.cpp index 16711ff90..3e4c5daad 100644 --- a/xs/src/libslic3r/Model.cpp +++ b/xs/src/libslic3r/Model.cpp @@ -333,6 +333,8 @@ ShapeData2D projectModelFromTop(const Slic3r::Model &model) { Slic3r::TriangleMesh tmpmesh = rmesh; ClipperLib::PolyNode pn; + tmpmesh.scale(objinst->scaling_factor); + // TODO export the exact 2D projection auto p = tmpmesh.convex_hull(); From 0b914c5ea33eda8e609ad818c3306342bc7c99e9 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Wed, 4 Jul 2018 14:11:21 +0200 Subject: [PATCH 121/198] Customized object function for arrange algorithm to arrange into a circle. Now we optimize for smallest diameter of the circle around the arranged pile of items. This implies that we can forget about pack efficiency but the result will be better for the heat characteristics of the print bed. --- xs/src/libnest2d/libnest2d/libnest2d.hpp | 11 + .../libnest2d/libnest2d/placers/nfpplacer.hpp | 66 +- xs/src/libnest2d/tests/main.cpp | 787 ++++++++++-------- xs/src/libslic3r/Model.cpp | 18 +- 4 files changed, 508 insertions(+), 374 deletions(-) diff --git a/xs/src/libnest2d/libnest2d/libnest2d.hpp b/xs/src/libnest2d/libnest2d/libnest2d.hpp index 60d9c1ff4..c661dc599 100644 --- a/xs/src/libnest2d/libnest2d/libnest2d.hpp +++ b/xs/src/libnest2d/libnest2d/libnest2d.hpp @@ -687,6 +687,17 @@ public: selector_.configure(std::forward(sconfig)); } + void configure(const PlacementConfig& pconf) { pconfig_ = pconf; } + void configure(const SelectionConfig& sconf) { selector_.configure(sconf); } + void configure(const PlacementConfig& pconf, const SelectionConfig& sconf) { + pconfig_ = pconf; + selector_.configure(sconf); + } + void configure(const SelectionConfig& sconf, const PlacementConfig& pconf) { + pconfig_ = pconf; + selector_.configure(sconf); + } + /** * \brief Arrange an input sequence and return a PackGroup object with * the packed groups corresponding to the bins. diff --git a/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp b/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp index 7ad983b61..26a0a2048 100644 --- a/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp +++ b/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp @@ -28,6 +28,9 @@ struct NfpPConfig { /// Where to align the resulting packed pile Alignment alignment; + std::function&, double, double, double)> + object_function; + NfpPConfig(): rotations({0.0, Pi/2.0, Pi, 3*Pi/2}), alignment(Alignment::CENTER) {} }; @@ -213,7 +216,16 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer, const double norm_; const double penality_; - bool static wouldFit(const RawShape& chull, const RawShape& bin) { +public: + + using Pile = const Nfp::Shapes&; + + inline explicit _NofitPolyPlacer(const BinType& bin): + Base(bin), + norm_(std::sqrt(ShapeLike::area(bin))), + penality_(1e6*norm_) {} + + bool static inline wouldFit(const RawShape& chull, const RawShape& bin) { auto bbch = ShapeLike::boundingBox(chull); auto bbin = ShapeLike::boundingBox(bin); auto d = bbin.minCorner() - bbch.minCorner(); @@ -222,18 +234,16 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer, return ShapeLike::isInside(chullcpy, bbin); } - bool static wouldFit(const RawShape& chull, const Box& bin) + bool static inline wouldFit(const RawShape& chull, const Box& bin) { auto bbch = ShapeLike::boundingBox(chull); - return bbch.width() <= bin.width() && bbch.height() <= bin.height(); + return wouldFit(bbch, bin); } -public: - - inline explicit _NofitPolyPlacer(const BinType& bin): - Base(bin), - norm_(std::sqrt(ShapeLike::area(bin))), - penality_(1e6*norm_) {} + bool static inline wouldFit(const Box& bb, const Box& bin) + { + return bb.width() <= bin.width() && bb.height() <= bin.height(); + } PackResult trypack(Item& item) { @@ -291,21 +301,13 @@ public: pile_area += mitem.area(); } - // Our object function for placement - auto objfunc = [&] (double relpos) + auto _objfunc = config_.object_function? + config_.object_function : + [this](const Nfp::Shapes& pile, double occupied_area, + double /*norm*/, double penality) { - Vertex v = getNfpPoint(relpos); - auto d = v - iv; - d += startpos; - item.translation(d); - - pile.emplace_back(item.transformedShape()); - - double occupied_area = pile_area + item.area(); auto ch = ShapeLike::convexHull(pile); - pile.pop_back(); - // The pack ratio -- how much is the convex hull occupied double pack_rate = occupied_area/ShapeLike::area(ch); @@ -317,7 +319,27 @@ public: // (larger) values. auto score = std::sqrt(waste); - if(!wouldFit(ch, bin_)) score = 2*penality_ - score; + if(!wouldFit(ch, bin_)) score = 2*penality - score; + + return score; + }; + + // Our object function for placement + auto objfunc = [&] (double relpos) + { + Vertex v = getNfpPoint(relpos); + auto d = v - iv; + d += startpos; + item.translation(d); + + pile.emplace_back(item.transformedShape()); + + double occupied_area = pile_area + item.area(); + + double score = _objfunc(pile, occupied_area, + norm_, penality_); + + pile.pop_back(); return score; }; diff --git a/xs/src/libnest2d/tests/main.cpp b/xs/src/libnest2d/tests/main.cpp index db890cdca..88b958c07 100644 --- a/xs/src/libnest2d/tests/main.cpp +++ b/xs/src/libnest2d/tests/main.cpp @@ -76,360 +76,433 @@ void arrangeRectangles() { std::vector crasher = { { - {-10836093, -2542602}, - {-10834392, -1849197}, - {-10826793, 1172203}, - {-10824993, 1884506}, - {-10823291, 2547500}, - {-10822994, 2642700}, - {-10807392, 2768295}, - {-10414295, 3030403}, - {-9677799, 3516204}, - {-9555896, 3531204}, - {-9445194, 3534698}, - {9353008, 3487297}, - {9463504, 3486999}, - {9574008, 3482902}, - {9695903, 3467399}, - {10684803, 2805702}, - {10814098, 2717803}, - {10832805, 2599502}, - {10836200, 2416801}, - {10819705, -2650299}, - {10800403, -2772300}, - {10670505, -2859596}, - {9800403, -3436599}, - {9678203, -3516197}, - {9556308, -3531196}, - {9445903, -3534698}, - {9084011, -3533798}, - {-9234294, -3487701}, - {-9462894, -3486999}, - {-9573497, -3483001}, - {-9695392, -3467300}, - {-9816898, -3387199}, - {-10429492, -2977798}, - {-10821193, -2714096}, - {-10836200, -2588195}, - {-10836093, -2542602}, + {-5000000, 8954050}, + {5000000, 8954050}, + {5000000, -45949}, + {4972609, -568549}, + {3500000, -8954050}, + {-3500000, -8954050}, + {-4972609, -568549}, + {-5000000, -45949}, + {-5000000, 8954050}, }, { - {-3533699, -9084051}, - {-3487197, 9352449}, - {-3486797, 9462949}, - {-3482795, 9573547}, - {-3467201, 9695350}, - {-3386997, 9816949}, - {-2977699, 10429548}, - {-2713897, 10821249}, - {-2587997, 10836149}, - {-2542396, 10836149}, - {-2054698, 10834949}, - {2223503, 10824150}, - {2459800, 10823547}, - {2555002, 10823247}, - {2642601, 10822948}, - {2768301, 10807350}, - {3030302, 10414247}, - {3516099, 9677850}, - {3531002, 9555850}, - {3534502, 9445247}, - {3534301, 9334949}, - {3487300, -9353052}, - {3486904, -9463548}, - {3482801, -9574148}, - {3467302, -9695848}, - {2805601, -10684751}, - {2717802, -10814149}, - {2599403, -10832952}, - {2416801, -10836149}, - {-2650199, -10819749}, - {-2772197, -10800451}, - {-2859397, -10670450}, - {-3436401, -9800451}, - {-3515998, -9678350}, - {-3530998, -9556451}, - {-3534500, -9445848}, - {-3533699, -9084051}, + {-5000000, 8954050}, + {5000000, 8954050}, + {5000000, -45949}, + {4972609, -568549}, + {3500000, -8954050}, + {-3500000, -8954050}, + {-4972609, -568549}, + {-5000000, -45949}, + {-5000000, 8954050}, }, { - {-3533798, -9084051}, - {-3487697, 9234249}, - {-3486999, 9462949}, - {-3482997, 9573547}, - {-3467296, 9695350}, - {-3387199, 9816949}, - {-2977798, 10429548}, - {-2714096, 10821249}, - {-2588199, 10836149}, - {-2542594, 10836149}, - {-2054798, 10834949}, - {2223701, 10824150}, - {2459903, 10823547}, - {2555202, 10823247}, - {2642704, 10822948}, - {2768302, 10807350}, - {3030403, 10414247}, - {3516204, 9677850}, - {3531204, 9555850}, - {3534702, 9445247}, - {3487300, -9353052}, - {3486999, -9463548}, - {3482902, -9574148}, - {3467403, -9695848}, - {2805702, -10684751}, - {2717803, -10814149}, - {2599502, -10832952}, - {2416801, -10836149}, - {-2650299, -10819749}, - {-2772296, -10800451}, - {-2859596, -10670450}, - {-3436595, -9800451}, - {-3516197, -9678350}, - {-3531196, -9556451}, - {-3534698, -9445848}, - {-3533798, -9084051}, + {-5000000, 8954050}, + {5000000, 8954050}, + {5000000, -45949}, + {4972609, -568549}, + {3500000, -8954050}, + {-3500000, -8954050}, + {-4972609, -568549}, + {-5000000, -45949}, + {-5000000, 8954050}, }, { - {-49433151, 4289947}, - {-49407352, 4421947}, - {-49355751, 4534446}, - {-29789449, 36223850}, - {-29737350, 36307445}, - {-29512149, 36401447}, - {-29089149, 36511646}, - {-28894351, 36550342}, - {-18984951, 37803447}, - {-18857151, 37815151}, - {-18271148, 37768947}, - {-18146148, 37755146}, - {-17365447, 37643947}, - {-17116649, 37601146}, - {11243545, 29732448}, - {29276451, 24568149}, - {29497543, 24486148}, - {29654548, 24410953}, - {31574546, 23132640}, - {33732849, 21695148}, - {33881950, 21584445}, - {34019454, 21471950}, - {34623153, 20939151}, - {34751945, 20816951}, - {35249244, 20314647}, - {36681549, 18775447}, - {36766548, 18680446}, - {36794250, 18647144}, - {36893951, 18521953}, - {37365951, 17881946}, - {37440948, 17779247}, - {37529243, 17642444}, - {42233245, 10012245}, - {42307250, 9884048}, - {42452949, 9626548}, - {44258949, 4766647}, - {48122245, -5990951}, - {48160751, -6117950}, - {49381546, -17083953}, - {49412246, -17420953}, - {49429450, -18011253}, - {49436141, -18702651}, - {49438949, -20087953}, - {49262947, -24000852}, - {49172546, -24522455}, - {48847549, -25859151}, - {48623847, -26705650}, - {48120246, -28514953}, - {48067146, -28699455}, - {48017845, -28862453}, - {47941543, -29096954}, - {47892547, -29246852}, - {47813545, -29466651}, - {47758453, -29612955}, - {47307548, -30803253}, - {46926544, -31807151}, - {46891448, -31899551}, - {46672546, -32475852}, - {46502449, -32914852}, - {46414451, -33140853}, - {46294250, -33447650}, - {46080146, -33980255}, - {46039245, -34071853}, - {45970542, -34186653}, - {45904243, -34295955}, - {45786247, -34475650}, - {43063247, -37740955}, - {42989547, -37815151}, - {12128349, -36354953}, - {12101844, -36343955}, - {11806152, -36217453}, - {7052848, -34171649}, - {-3234352, -29743150}, - {-15684650, -24381851}, - {-16573852, -23998851}, - {-20328948, -22381254}, - {-20383052, -22357254}, - {-20511447, -22280651}, - {-42221252, -8719951}, - {-42317150, -8653255}, - {-42457851, -8528949}, - {-42600151, -8399852}, - {-47935852, -2722949}, - {-48230651, -2316852}, - {-48500850, -1713150}, - {-48516853, -1676551}, - {-48974651, -519649}, - {-49003852, -412551}, - {-49077850, -129650}, - {-49239753, 735946}, - {-49312652, 1188549}, - {-49349349, 1467647}, - {-49351650, 1513347}, - {-49438949, 4165744}, - {-49433151, 4289947}, - }, -// { -// {6000, 5851}, -// {-6000, -5851}, -// {6000, 5851}, -// }, - { - {-10836097, -2542396}, - {-10834396, -1848999}, - {-10826797, 1172000}, - {-10825000, 1884403}, - {-10823299, 2547401}, - {-10822998, 2642604}, - {-10807395, 2768299}, - {-10414299, 3030300}, - {-9677799, 3516101}, - {-9555896, 3531002}, - {-9445198, 3534500}, - {-9334899, 3534297}, - {9353000, 3487300}, - {9463499, 3486904}, - {9573999, 3482799}, - {9695901, 3467300}, - {10684803, 2805603}, - {10814102, 2717800}, - {10832803, 2599399}, - {10836200, 2416797}, - {10819700, -2650199}, - {10800401, -2772201}, - {10670499, -2859397}, - {9800401, -3436397}, - {9678201, -3515998}, - {9556303, -3530998}, - {9445901, -3534500}, - {9083999, -3533699}, - {-9352500, -3487201}, - {-9462898, -3486797}, - {-9573501, -3482799}, - {-9695396, -3467201}, - {-9816898, -3386997}, - {-10429500, -2977699}, - {-10821197, -2713897}, - {-10836196, -2588001}, - {-10836097, -2542396}, + {-5000000, 8954050}, + {5000000, 8954050}, + {5000000, -45949}, + {4972609, -568549}, + {3500000, -8954050}, + {-3500000, -8954050}, + {-4972609, -568549}, + {-5000000, -45949}, + {-5000000, 8954050}, }, { - {-47073699, 26300853}, - {-47009803, 27392650}, - {-46855804, 28327953}, - {-46829402, 28427051}, - {-46764102, 28657550}, - {-46200401, 30466648}, - {-46066703, 30832347}, - {-45887104, 31247554}, - {-45663700, 31670848}, - {-45414802, 32080554}, - {-45273700, 32308956}, - {-45179702, 32431850}, - {-45057804, 32549350}, - {-34670803, 40990154}, - {-34539802, 41094348}, - {-34393600, 41184452}, - {-34284805, 41229953}, - {-34080402, 41267154}, - {17335296, 48077648}, - {18460296, 48153553}, - {18976600, 48182147}, - {20403999, 48148555}, - {20562301, 48131153}, - {20706001, 48102855}, - {20938796, 48053150}, - {21134101, 48010051}, - {21483192, 47920154}, - {21904701, 47806346}, - {22180099, 47670154}, - {22357795, 47581645}, - {22615295, 47423046}, - {22782295, 47294651}, - {24281791, 45908344}, - {24405296, 45784854}, - {41569297, 21952449}, - {41784301, 21638050}, - {41938491, 21393650}, - {42030899, 21245052}, - {42172996, 21015850}, - {42415298, 20607151}, - {42468299, 20504650}, - {42553100, 20320850}, - {42584594, 20250644}, - {42684997, 20004344}, - {42807098, 19672351}, - {42939002, 19255153}, - {43052299, 18693950}, - {45094100, 7846851}, - {45118400, 7684154}, - {47079101, -16562252}, - {47082000, -16705646}, - {46916297, -22172447}, - {46911598, -22294349}, - {46874893, -22358146}, - {44866996, -25470146}, - {30996795, -46852050}, - {30904998, -46933750}, - {30864791, -46945850}, - {9315696, -48169147}, - {9086494, -48182147}, - {8895500, -48160049}, - {8513496, -48099548}, - {8273696, -48057350}, - {8180198, -48039051}, - {7319801, -47854949}, - {6288299, -47569950}, - {6238498, -47554248}, - {5936199, -47453250}, - {-11930000, -41351551}, - {-28986402, -33654148}, - {-29111103, -33597148}, - {-29201803, -33544147}, - {-29324401, -33467845}, - {-29467000, -33352848}, - {-29606603, -33229351}, - {-31140401, -31849147}, - {-31264303, -31736450}, - {-31385803, -31625452}, - {-31829103, -31216148}, - {-32127403, -30935951}, - {-32253803, -30809648}, - {-32364803, -30672147}, - {-34225402, -28078847}, - {-35819404, -25762451}, - {-36304801, -25035346}, - {-36506103, -24696445}, - {-36574104, -24560146}, - {-36926700, -23768646}, - {-39767402, -17341148}, - {-39904102, -16960147}, - {-41008602, -11799850}, - {-43227401, -704147}, - {-43247303, -577148}, - {-47057403, 24847454}, - {-47077602, 25021648}, - {-47080101, 25128650}, - {-47082000, 25562953}, - {-47073699, 26300853}, + {-5000000, 8954050}, + {5000000, 8954050}, + {5000000, -45949}, + {4972609, -568549}, + {3500000, -8954050}, + {-3500000, -8954050}, + {-4972609, -568549}, + {-5000000, -45949}, + {-5000000, 8954050}, + }, + { + {-5000000, 8954050}, + {5000000, 8954050}, + {5000000, -45949}, + {4972609, -568549}, + {3500000, -8954050}, + {-3500000, -8954050}, + {-4972609, -568549}, + {-5000000, -45949}, + {-5000000, 8954050}, + }, + { + {-9945219, -3065619}, + {-9781479, -2031780}, + {-9510560, -1020730}, + {-9135450, -43529}, + {-2099999, 14110899}, + {2099999, 14110899}, + {9135450, -43529}, + {9510560, -1020730}, + {9781479, -2031780}, + {9945219, -3065619}, + {10000000, -4110899}, + {9945219, -5156179}, + {9781479, -6190020}, + {9510560, -7201069}, + {9135450, -8178270}, + {8660249, -9110899}, + {8090169, -9988750}, + {7431449, -10802200}, + {6691309, -11542300}, + {5877850, -12201100}, + {5000000, -12771100}, + {4067369, -13246399}, + {3090169, -13621500}, + {2079119, -13892399}, + {1045279, -14056099}, + {0, -14110899}, + {-1045279, -14056099}, + {-2079119, -13892399}, + {-3090169, -13621500}, + {-4067369, -13246399}, + {-5000000, -12771100}, + {-5877850, -12201100}, + {-6691309, -11542300}, + {-7431449, -10802200}, + {-8090169, -9988750}, + {-8660249, -9110899}, + {-9135450, -8178270}, + {-9510560, -7201069}, + {-9781479, -6190020}, + {-9945219, -5156179}, + {-10000000, -4110899}, + {-9945219, -3065619}, + }, + { + {-9945219, -3065619}, + {-9781479, -2031780}, + {-9510560, -1020730}, + {-9135450, -43529}, + {-2099999, 14110899}, + {2099999, 14110899}, + {9135450, -43529}, + {9510560, -1020730}, + {9781479, -2031780}, + {9945219, -3065619}, + {10000000, -4110899}, + {9945219, -5156179}, + {9781479, -6190020}, + {9510560, -7201069}, + {9135450, -8178270}, + {8660249, -9110899}, + {8090169, -9988750}, + {7431449, -10802200}, + {6691309, -11542300}, + {5877850, -12201100}, + {5000000, -12771100}, + {4067369, -13246399}, + {3090169, -13621500}, + {2079119, -13892399}, + {1045279, -14056099}, + {0, -14110899}, + {-1045279, -14056099}, + {-2079119, -13892399}, + {-3090169, -13621500}, + {-4067369, -13246399}, + {-5000000, -12771100}, + {-5877850, -12201100}, + {-6691309, -11542300}, + {-7431449, -10802200}, + {-8090169, -9988750}, + {-8660249, -9110899}, + {-9135450, -8178270}, + {-9510560, -7201069}, + {-9781479, -6190020}, + {-9945219, -5156179}, + {-10000000, -4110899}, + {-9945219, -3065619}, + }, + { + {-9945219, -3065619}, + {-9781479, -2031780}, + {-9510560, -1020730}, + {-9135450, -43529}, + {-2099999, 14110899}, + {2099999, 14110899}, + {9135450, -43529}, + {9510560, -1020730}, + {9781479, -2031780}, + {9945219, -3065619}, + {10000000, -4110899}, + {9945219, -5156179}, + {9781479, -6190020}, + {9510560, -7201069}, + {9135450, -8178270}, + {8660249, -9110899}, + {8090169, -9988750}, + {7431449, -10802200}, + {6691309, -11542300}, + {5877850, -12201100}, + {5000000, -12771100}, + {4067369, -13246399}, + {3090169, -13621500}, + {2079119, -13892399}, + {1045279, -14056099}, + {0, -14110899}, + {-1045279, -14056099}, + {-2079119, -13892399}, + {-3090169, -13621500}, + {-4067369, -13246399}, + {-5000000, -12771100}, + {-5877850, -12201100}, + {-6691309, -11542300}, + {-7431449, -10802200}, + {-8090169, -9988750}, + {-8660249, -9110899}, + {-9135450, -8178270}, + {-9510560, -7201069}, + {-9781479, -6190020}, + {-9945219, -5156179}, + {-10000000, -4110899}, + {-9945219, -3065619}, + }, + { + {-9945219, -3065619}, + {-9781479, -2031780}, + {-9510560, -1020730}, + {-9135450, -43529}, + {-2099999, 14110899}, + {2099999, 14110899}, + {9135450, -43529}, + {9510560, -1020730}, + {9781479, -2031780}, + {9945219, -3065619}, + {10000000, -4110899}, + {9945219, -5156179}, + {9781479, -6190020}, + {9510560, -7201069}, + {9135450, -8178270}, + {8660249, -9110899}, + {8090169, -9988750}, + {7431449, -10802200}, + {6691309, -11542300}, + {5877850, -12201100}, + {5000000, -12771100}, + {4067369, -13246399}, + {3090169, -13621500}, + {2079119, -13892399}, + {1045279, -14056099}, + {0, -14110899}, + {-1045279, -14056099}, + {-2079119, -13892399}, + {-3090169, -13621500}, + {-4067369, -13246399}, + {-5000000, -12771100}, + {-5877850, -12201100}, + {-6691309, -11542300}, + {-7431449, -10802200}, + {-8090169, -9988750}, + {-8660249, -9110899}, + {-9135450, -8178270}, + {-9510560, -7201069}, + {-9781479, -6190020}, + {-9945219, -5156179}, + {-10000000, -4110899}, + {-9945219, -3065619}, + }, + { + {-9945219, -3065619}, + {-9781479, -2031780}, + {-9510560, -1020730}, + {-9135450, -43529}, + {-2099999, 14110899}, + {2099999, 14110899}, + {9135450, -43529}, + {9510560, -1020730}, + {9781479, -2031780}, + {9945219, -3065619}, + {10000000, -4110899}, + {9945219, -5156179}, + {9781479, -6190020}, + {9510560, -7201069}, + {9135450, -8178270}, + {8660249, -9110899}, + {8090169, -9988750}, + {7431449, -10802200}, + {6691309, -11542300}, + {5877850, -12201100}, + {5000000, -12771100}, + {4067369, -13246399}, + {3090169, -13621500}, + {2079119, -13892399}, + {1045279, -14056099}, + {0, -14110899}, + {-1045279, -14056099}, + {-2079119, -13892399}, + {-3090169, -13621500}, + {-4067369, -13246399}, + {-5000000, -12771100}, + {-5877850, -12201100}, + {-6691309, -11542300}, + {-7431449, -10802200}, + {-8090169, -9988750}, + {-8660249, -9110899}, + {-9135450, -8178270}, + {-9510560, -7201069}, + {-9781479, -6190020}, + {-9945219, -5156179}, + {-10000000, -4110899}, + {-9945219, -3065619}, + }, + { + {-9945219, -3065619}, + {-9781479, -2031780}, + {-9510560, -1020730}, + {-9135450, -43529}, + {-2099999, 14110899}, + {2099999, 14110899}, + {9135450, -43529}, + {9510560, -1020730}, + {9781479, -2031780}, + {9945219, -3065619}, + {10000000, -4110899}, + {9945219, -5156179}, + {9781479, -6190020}, + {9510560, -7201069}, + {9135450, -8178270}, + {8660249, -9110899}, + {8090169, -9988750}, + {7431449, -10802200}, + {6691309, -11542300}, + {5877850, -12201100}, + {5000000, -12771100}, + {4067369, -13246399}, + {3090169, -13621500}, + {2079119, -13892399}, + {1045279, -14056099}, + {0, -14110899}, + {-1045279, -14056099}, + {-2079119, -13892399}, + {-3090169, -13621500}, + {-4067369, -13246399}, + {-5000000, -12771100}, + {-5877850, -12201100}, + {-6691309, -11542300}, + {-7431449, -10802200}, + {-8090169, -9988750}, + {-8660249, -9110899}, + {-9135450, -8178270}, + {-9510560, -7201069}, + {-9781479, -6190020}, + {-9945219, -5156179}, + {-10000000, -4110899}, + {-9945219, -3065619}, + }, + { + {-9945219, -3065619}, + {-9781479, -2031780}, + {-9510560, -1020730}, + {-9135450, -43529}, + {-2099999, 14110899}, + {2099999, 14110899}, + {9135450, -43529}, + {9510560, -1020730}, + {9781479, -2031780}, + {9945219, -3065619}, + {10000000, -4110899}, + {9945219, -5156179}, + {9781479, -6190020}, + {9510560, -7201069}, + {9135450, -8178270}, + {8660249, -9110899}, + {8090169, -9988750}, + {7431449, -10802200}, + {6691309, -11542300}, + {5877850, -12201100}, + {5000000, -12771100}, + {4067369, -13246399}, + {3090169, -13621500}, + {2079119, -13892399}, + {1045279, -14056099}, + {0, -14110899}, + {-1045279, -14056099}, + {-2079119, -13892399}, + {-3090169, -13621500}, + {-4067369, -13246399}, + {-5000000, -12771100}, + {-5877850, -12201100}, + {-6691309, -11542300}, + {-7431449, -10802200}, + {-8090169, -9988750}, + {-8660249, -9110899}, + {-9135450, -8178270}, + {-9510560, -7201069}, + {-9781479, -6190020}, + {-9945219, -5156179}, + {-10000000, -4110899}, + {-9945219, -3065619}, + }, + { + {-9945219, -3065619}, + {-9781479, -2031780}, + {-9510560, -1020730}, + {-9135450, -43529}, + {-2099999, 14110899}, + {2099999, 14110899}, + {9135450, -43529}, + {9510560, -1020730}, + {9781479, -2031780}, + {9945219, -3065619}, + {10000000, -4110899}, + {9945219, -5156179}, + {9781479, -6190020}, + {9510560, -7201069}, + {9135450, -8178270}, + {8660249, -9110899}, + {8090169, -9988750}, + {7431449, -10802200}, + {6691309, -11542300}, + {5877850, -12201100}, + {5000000, -12771100}, + {4067369, -13246399}, + {3090169, -13621500}, + {2079119, -13892399}, + {1045279, -14056099}, + {0, -14110899}, + {-1045279, -14056099}, + {-2079119, -13892399}, + {-3090169, -13621500}, + {-4067369, -13246399}, + {-5000000, -12771100}, + {-5877850, -12201100}, + {-6691309, -11542300}, + {-7431449, -10802200}, + {-8090169, -9988750}, + {-8660249, -9110899}, + {-9135450, -8178270}, + {-9510560, -7201069}, + {-9781479, -6190020}, + {-9945219, -5156179}, + {-10000000, -4110899}, + {-9945219, -3065619}, + }, + { + {-18000000, -1000000}, + {-15000000, 22000000}, + {-11000000, 26000000}, + {11000000, 26000000}, + {15000000, 22000000}, + {18000000, -1000000}, + {18000000, -26000000}, + {-18000000, -26000000}, + {-18000000, -1000000}, }, }; @@ -445,14 +518,28 @@ void arrangeRectangles() { using Packer = Arranger; + Packer arrange(bin, min_obj_distance); + Packer::PlacementConfig pconf; pconf.alignment = NfpPlacer::Config::Alignment::CENTER; -// pconf.rotations = {0.0, Pi/2.0, Pi, 3*Pi/2}; + pconf.rotations = {0.0/*, Pi/2.0, Pi, 3*Pi/2*/}; + pconf.object_function = [&bin](NfpPlacer::Pile pile, double area, + double norm, double penality) { + + auto bb = ShapeLike::boundingBox(pile); + double score = (2*bb.width() + 2*bb.height()) / norm; + + if(!NfpPlacer::wouldFit(bb, bin)) score = 2*penality - score; + + return score; + }; + Packer::SelectionConfig sconf; sconf.allow_parallel = true; sconf.force_parallel = true; - sconf.try_reverse_order = false; - Packer arrange(bin, min_obj_distance, pconf, sconf); + sconf.try_reverse_order = true; + + arrange.configure(pconf, sconf); arrange.progressIndicator([&](unsigned r){ // svg::SVGWriter::Config conf; @@ -462,7 +549,7 @@ void arrangeRectangles() { // svgw.writePackGroup(arrange.lastResult()); // svgw.save("debout"); std::cout << "Remaining items: " << r << std::endl; - }).useMinimumBoundigBoxRotation(); + })/*.useMinimumBoundigBoxRotation()*/; Benchmark bench; diff --git a/xs/src/libslic3r/Model.cpp b/xs/src/libslic3r/Model.cpp index 3e4c5daad..a74c89d16 100644 --- a/xs/src/libslic3r/Model.cpp +++ b/xs/src/libslic3r/Model.cpp @@ -480,8 +480,8 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, SConf scfg; scfg.try_reverse_order = true; - scfg.allow_parallel = true; - scfg.force_parallel = true; + scfg.allow_parallel = false; + scfg.force_parallel = false; pcfg.alignment = PConf::Alignment::CENTER; @@ -489,6 +489,20 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, // handle different rotations // arranger.useMinimumBoundigBoxRotation(); pcfg.rotations = { 0.0 }; + + pcfg.object_function = [&bin]( + NfpPlacer::Pile pile, double /*area*/, double norm, double penality) + { + auto bb = ShapeLike::boundingBox(pile); + + // We will optimize to the diameter of the circle around the bounding box + double score = PointLike::distance(bb.minCorner(), bb.maxCorner()) / norm; + + if(!NfpPlacer::wouldFit(bb, bin)) score = 2*penality - score; + + return score; + }; + Arranger arranger(bin, min_obj_distance, pcfg, scfg); arranger.progressIndicator(progressind); From b26d1ef5bf243f6282195a380211be52d8f5b5ee Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Wed, 4 Jul 2018 14:36:14 +0200 Subject: [PATCH 122/198] Some comments --- xs/src/libslic3r/Model.cpp | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/xs/src/libslic3r/Model.cpp b/xs/src/libslic3r/Model.cpp index a74c89d16..6664020a3 100644 --- a/xs/src/libslic3r/Model.cpp +++ b/xs/src/libslic3r/Model.cpp @@ -476,13 +476,20 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, using PConf = Arranger::PlacementConfig; using SConf = Arranger::SelectionConfig; - PConf pcfg; - SConf scfg; + PConf pcfg; // Placement configuration + SConf scfg; // Selection configuration + // Try inserting groups of 2, and 3 items in all possible order. scfg.try_reverse_order = true; + + // If there are more items that could possibly fit into one bin, + // use multiple threads. (Potencially decreased pack efficiency) scfg.allow_parallel = false; + + // Use multiple threads whenever possible scfg.force_parallel = false; + // Align the arranged pile into the center of the bin pcfg.alignment = PConf::Alignment::CENTER; // TODO cannot use rotations until multiple objects of same geometry can @@ -490,28 +497,45 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, // arranger.useMinimumBoundigBoxRotation(); pcfg.rotations = { 0.0 }; + // Magic: we will specify what is the goal of arrangement... + // In this case we override the default object function because we + // (apparently) don't care about pack efficiency and all we care is that the + // larger items go into the center of the pile and smaller items orbit it + // so the resulting pile has a circle-like shape. + // This is good for the print bed's heat profile. + // As a side effect, the arrange procedure is a lot faster (we do not need + // to calculate the convex hulls) pcfg.object_function = [&bin]( - NfpPlacer::Pile pile, double /*area*/, double norm, double penality) + NfpPlacer::Pile pile, // The currently arranged pile + double /*area*/, // Sum area of items (not needed) + double norm, // A norming factor for physical dimensions + double penality) // Min penality in case of bad arrangement { auto bb = ShapeLike::boundingBox(pile); - // We will optimize to the diameter of the circle around the bounding box - double score = PointLike::distance(bb.minCorner(), bb.maxCorner()) / norm; + // We will optimize to the diameter of the circle around the bounding + // box and use the norming factor to get rid of the physical dimensions + double score = PointLike::distance(bb.minCorner(), + bb.maxCorner()) / norm; + // If it does not fit into the print bed we will beat it + // with a large penality if(!NfpPlacer::wouldFit(bb, bin)) score = 2*penality - score; return score; }; + // Create the arranger object Arranger arranger(bin, min_obj_distance, pcfg, scfg); + // Set the progress indicator for the arranger. arranger.progressIndicator(progressind); // std::cout << "Arranging model..." << std::endl; // bench.start(); + // Arrange and return the items with their respective indices within the // input sequence. - auto result = arranger.arrangeIndexed(shapes.begin(), shapes.end()); // bench.stop(); From fa86d776cb78135e4ae3e07793a89b19e22d1224 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Thu, 5 Jul 2018 15:27:48 +0200 Subject: [PATCH 123/198] Bumped up the version number to final. --- xs/src/libslic3r/libslic3r.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/src/libslic3r/libslic3r.h b/xs/src/libslic3r/libslic3r.h index 253c340eb..b0c144efe 100644 --- a/xs/src/libslic3r/libslic3r.h +++ b/xs/src/libslic3r/libslic3r.h @@ -14,7 +14,7 @@ #include #define SLIC3R_FORK_NAME "Slic3r Prusa Edition" -#define SLIC3R_VERSION "1.40.1-rc2" +#define SLIC3R_VERSION "1.40.1" #define SLIC3R_BUILD "UNKNOWN" typedef int32_t coord_t; From fcc781195b4286ae51bc350caf8168100b5a288e Mon Sep 17 00:00:00 2001 From: YuSanka Date: Mon, 9 Jul 2018 12:10:57 +0200 Subject: [PATCH 124/198] Added updating of the is_external value for edited_preset after loading preset from (.ini, .gcode, .amf, .3mf etc) --- xs/src/slic3r/GUI/Preset.hpp | 4 ++++ xs/src/slic3r/GUI/PresetBundle.cpp | 12 +++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/xs/src/slic3r/GUI/Preset.hpp b/xs/src/slic3r/GUI/Preset.hpp index 31fb69aa8..2b88a55db 100644 --- a/xs/src/slic3r/GUI/Preset.hpp +++ b/xs/src/slic3r/GUI/Preset.hpp @@ -336,6 +336,10 @@ public: // Generate a file path from a profile name. Add the ".ini" suffix if it is missing. std::string path_from_name(const std::string &new_name) const; + // update m_edited_preset.is_external value after loading preset for .ini, .gcode, .amf, .3mf + void update_edited_preset_is_external(bool is_external) { + m_edited_preset.is_external = is_external; } + protected: // Select a preset, if it exists. If it does not exist, select an invalid (-1) index. // This is a temporary state, which shall be fixed immediately by the following step. diff --git a/xs/src/slic3r/GUI/PresetBundle.cpp b/xs/src/slic3r/GUI/PresetBundle.cpp index 0a280eee1..070dc4791 100644 --- a/xs/src/slic3r/GUI/PresetBundle.cpp +++ b/xs/src/slic3r/GUI/PresetBundle.cpp @@ -505,8 +505,10 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool for (size_t i_group = 0; i_group < 2; ++ i_group) { PresetCollection &presets = (i_group == 0) ? this->prints : this->printers; Preset &preset = presets.load_preset(is_external ? name_or_path : presets.path_from_name(name), name, config); - if (is_external) + if (is_external) { preset.is_external = true; + presets.update_edited_preset_is_external(true); + } else preset.save(); } @@ -518,8 +520,10 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool if (num_extruders <= 1) { Preset &preset = this->filaments.load_preset( is_external ? name_or_path : this->filaments.path_from_name(name), name, config); - if (is_external) + if (is_external) { preset.is_external = true; + this->filaments.update_edited_preset_is_external(true); + } else preset.save(); this->filament_presets.clear(); @@ -553,8 +557,10 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool Preset &preset = this->filaments.load_preset( is_external ? name_or_path : this->filaments.path_from_name(new_name), new_name, std::move(configs[i]), i == 0); - if (is_external) + if (is_external) { preset.is_external = true; + this->filaments.update_edited_preset_is_external(true); + } else preset.save(); this->filament_presets.emplace_back(new_name); From bb80774e74b480ad1939c45b81be456ab9ba6083 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Mon, 9 Jul 2018 13:44:41 +0200 Subject: [PATCH 125/198] Infill purging - added fifth extruder into default setttings, cosmetic changes --- xs/src/libslic3r/GCode.cpp | 5 ++++- xs/src/libslic3r/GCode/ToolOrdering.cpp | 2 -- xs/src/libslic3r/PrintConfig.cpp | 8 ++++---- xs/src/slic3r/GUI/Tab.cpp | 2 -- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 188993aeb..10404c90c 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1334,8 +1334,11 @@ void GCode::process_layer( if (objects_by_extruder_it == by_extruder.end()) continue; - // We are almost ready to print. However, we must go through all the object twice and only print the overridden extrusions first (infill/perimeter wiping feature): + // We are almost ready to print. However, we must go through all the objects twice to print the the overridden extrusions first (infill/perimeter wiping feature): for (int print_wipe_extrusions=layer_tools.wiping_extrusions.is_anything_overridden(); print_wipe_extrusions>=0; --print_wipe_extrusions) { + if (print_wipe_extrusions == 0) + gcode+="; PURGING FINISHED\n"; + for (ObjectByExtruder &object_by_extruder : objects_by_extruder_it->second) { const size_t layer_id = &object_by_extruder - objects_by_extruder_it->second.data(); const PrintObject *print_object = layers[layer_id].object(); diff --git a/xs/src/libslic3r/GCode/ToolOrdering.cpp b/xs/src/libslic3r/GCode/ToolOrdering.cpp index 1987a0dae..219c1adfd 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.cpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.cpp @@ -427,8 +427,6 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, const LayerTo if (print.config.filament_soluble.get_at(new_extruder)) return volume_to_wipe; // Soluble filament cannot be wiped in a random infill - bool is_last_nonsoluble = ((int)new_extruder == last_nonsoluble_extruder_on_layer(print.config, layer_tools)); - // we will sort objects so that dedicated for wiping are at the beginning: PrintObjectPtrs object_list = print.objects; std::sort(object_list.begin(), object_list.end(), [](const PrintObject* a, const PrintObject* b) { return a->config.wipe_into_objects; }); diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index c28c1404e..3a932822f 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -344,6 +344,7 @@ PrintConfigDef::PrintConfigDef() def->enum_labels.push_back("2"); def->enum_labels.push_back("3"); def->enum_labels.push_back("4"); + def->enum_labels.push_back("5"); def = this->add("extruder_clearance_height", coFloat); def->label = L("Height"); @@ -1887,7 +1888,7 @@ PrintConfigDef::PrintConfigDef() def = this->add("wipe_into_infill", coBool); def->category = L("Extruders"); - def->label = L("Wiping into infill"); + def->label = L("Purging into infill"); def->tooltip = L("Wiping after toolchange will be preferentially done inside infills. " "This lowers the amount of waste but may result in longer print time " " due to additional travel moves."); @@ -1896,11 +1897,10 @@ PrintConfigDef::PrintConfigDef() def = this->add("wipe_into_objects", coBool); def->category = L("Extruders"); - def->label = L("Wiping into objects"); + def->label = L("Purging into objects"); def->tooltip = L("Objects will be used to wipe the nozzle after a toolchange to save material " "that would otherwise end up in the wipe tower and decrease print time. " - "Colours of the objects will be mixed as a result. (This setting is usually " - "used on per-object basis.)"); + "Colours of the objects will be mixed as a result."); def->cli = "wipe-into-objects!"; def->default_value = new ConfigOptionBool(false); diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 010934570..4b1d28f72 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -947,8 +947,6 @@ void TabPrint::build() optgroup->append_single_option_line("wipe_tower_width"); optgroup->append_single_option_line("wipe_tower_rotation_angle"); optgroup->append_single_option_line("wipe_tower_bridging"); - optgroup->append_single_option_line("wipe_into_infill"); - optgroup->append_single_option_line("wipe_into_objects"); optgroup = page->new_optgroup(_(L("Advanced"))); optgroup->append_single_option_line("interface_shells"); From 4c823b840fd59a94b8ffe3183e201305844af9e1 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Mon, 9 Jul 2018 14:43:32 +0200 Subject: [PATCH 126/198] Fix of previous commit --- xs/src/slic3r/GUI/Preset.cpp | 2 +- xs/src/slic3r/GUI/Tab.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xs/src/slic3r/GUI/Preset.cpp b/xs/src/slic3r/GUI/Preset.cpp index 84f685533..0ccf4d481 100644 --- a/xs/src/slic3r/GUI/Preset.cpp +++ b/xs/src/slic3r/GUI/Preset.cpp @@ -298,7 +298,7 @@ const std::vector& Preset::print_options() "perimeter_extrusion_width", "external_perimeter_extrusion_width", "infill_extrusion_width", "solid_infill_extrusion_width", "top_infill_extrusion_width", "support_material_extrusion_width", "infill_overlap", "bridge_flow_ratio", "clip_multipart_objects", "elefant_foot_compensation", "xy_size_compensation", "threads", "resolution", "wipe_tower", "wipe_tower_x", "wipe_tower_y", - "wipe_tower_width", "wipe_tower_rotation_angle", "wipe_tower_bridging", "wipe_into_infill", "wipe_into_objects", "compatible_printers", + "wipe_tower_width", "wipe_tower_rotation_angle", "wipe_tower_bridging", "compatible_printers", "compatible_printers_condition","inherits" }; return s_opts; diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 4b1d28f72..dbf892110 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -1235,7 +1235,7 @@ void TabPrint::update() get_field("standby_temperature_delta")->toggle(have_ooze_prevention); bool have_wipe_tower = m_config->opt_bool("wipe_tower"); - for (auto el : { "wipe_tower_x", "wipe_tower_y", "wipe_tower_width", "wipe_tower_rotation_angle", "wipe_into_infill", "wipe_tower_bridging"}) + for (auto el : { "wipe_tower_x", "wipe_tower_y", "wipe_tower_width", "wipe_tower_rotation_angle", "wipe_tower_bridging"}) get_field(el)->toggle(have_wipe_tower); m_recommended_thin_wall_thickness_description_line->SetText( From e44480d61f53d8b846f647cdacf2ef1c48735747 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Tue, 10 Jul 2018 13:02:43 +0200 Subject: [PATCH 127/198] Supports were printed twice if synchronized with object layers, added always-on settings in ObjectSettingDialog --- lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm | 17 +++++++++++++++-- xs/src/libslic3r/GCode.cpp | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm b/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm index 1ec0ce1cb..a20a241f7 100644 --- a/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm +++ b/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm @@ -322,7 +322,13 @@ sub selection_changed { } # get default values my $default_config = Slic3r::Config::new_from_defaults_keys(\@opt_keys); - + + # decide which settings will be shown by default + if ($itemData->{type} eq 'object') { + $config->set_ifndef('wipe_into_objects', 0); + $config->set_ifndef('wipe_into_infill', 0); + } + # append default extruder push @opt_keys, 'extruder'; $default_config->set('extruder', 0); @@ -330,7 +336,14 @@ sub selection_changed { $self->{settings_panel}->set_default_config($default_config); $self->{settings_panel}->set_config($config); $self->{settings_panel}->set_opt_keys(\@opt_keys); - $self->{settings_panel}->set_fixed_options([qw(extruder)]); + + # disable minus icon to remove the settings + if ($itemData->{type} eq 'object') { + $self->{settings_panel}->set_fixed_options([qw(extruder), qw(wipe_into_infill), qw(wipe_into_objects)]); + } else { + $self->{settings_panel}->set_fixed_options([qw(extruder)]); + } + $self->{settings_panel}->enable; } diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 10404c90c..f3813a56a 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1365,7 +1365,7 @@ void GCode::process_layer( m_avoid_crossing_perimeters.use_external_mp_once = true; m_last_obj_copy = this_object_copy; this->set_origin(unscale(copy.x), unscale(copy.y)); - if (object_by_extruder.support != nullptr) { + if (object_by_extruder.support != nullptr && !print_wipe_extrusions) { m_layer = layers[layer_id].support_layer; gcode += this->extrude_support( // support_extrusion_role is erSupportMaterial, erSupportMaterialInterface or erMixed for all extrusion paths. From 2454c566ff2e865f8034d7dc50256a87128084d0 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Tue, 10 Jul 2018 15:39:47 +0200 Subject: [PATCH 128/198] Changing number of copies invalidates the wipe tower (and thus forces recalculation of the purging extrusions) --- xs/src/libslic3r/PrintObject.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/xs/src/libslic3r/PrintObject.cpp b/xs/src/libslic3r/PrintObject.cpp index bd01ec3aa..7ac165864 100644 --- a/xs/src/libslic3r/PrintObject.cpp +++ b/xs/src/libslic3r/PrintObject.cpp @@ -93,6 +93,7 @@ bool PrintObject::set_copies(const Points &points) bool invalidated = this->_print->invalidate_step(psSkirt); invalidated |= this->_print->invalidate_step(psBrim); + invalidated |= this->_print->invalidate_step(psWipeTower); return invalidated; } From 1a2223a0a53d8cb96641fa142b3bf1f382a0d82d Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Wed, 11 Jul 2018 14:46:13 +0200 Subject: [PATCH 129/198] WipingExtrusions functions now don't need a reference to LayerTools --- xs/src/libslic3r/GCode.cpp | 8 ++++---- xs/src/libslic3r/GCode/ToolOrdering.cpp | 24 ++++++++++++++---------- xs/src/libslic3r/GCode/ToolOrdering.hpp | 19 ++++++++++++++----- xs/src/libslic3r/Print.cpp | 13 +++++++++++-- xs/src/libslic3r/Print.hpp | 11 +++-------- 5 files changed, 46 insertions(+), 29 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index f3813a56a..72294b7a3 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -1239,11 +1239,11 @@ void GCode::process_layer( continue; // This extrusion is part of certain Region, which tells us which extruder should be used for it: - int correct_extruder_id = get_extruder(*fill, region); entity_type=="infills" ? std::max(0, (is_solid_infill(fill->entities.front()->role()) ? region.config.solid_infill_extruder : region.config.infill_extruder) - 1) : + int correct_extruder_id = Print::get_extruder(*fill, region); entity_type=="infills" ? std::max(0, (is_solid_infill(fill->entities.front()->role()) ? region.config.solid_infill_extruder : region.config.infill_extruder) - 1) : std::max(region.config.perimeter_extruder.value - 1, 0); // Let's recover vector of extruder overrides: - const ExtruderPerCopy* entity_overrides = const_cast(layer_tools).wiping_extrusions.get_extruder_overrides(fill, correct_extruder_id, layer_to_print.object()->_shifted_copies.size()); + const ExtruderPerCopy* entity_overrides = const_cast(layer_tools).wiping_extrusions().get_extruder_overrides(fill, correct_extruder_id, layer_to_print.object()->_shifted_copies.size()); // Now we must add this extrusion into the by_extruder map, once for each extruder that will print it: for (unsigned int extruder : layer_tools.extruders) @@ -1335,7 +1335,7 @@ void GCode::process_layer( continue; // We are almost ready to print. However, we must go through all the objects twice to print the the overridden extrusions first (infill/perimeter wiping feature): - for (int print_wipe_extrusions=layer_tools.wiping_extrusions.is_anything_overridden(); print_wipe_extrusions>=0; --print_wipe_extrusions) { + for (int print_wipe_extrusions=const_cast(layer_tools).wiping_extrusions().is_anything_overridden(); print_wipe_extrusions>=0; --print_wipe_extrusions) { if (print_wipe_extrusions == 0) gcode+="; PURGING FINISHED\n"; @@ -1373,7 +1373,7 @@ void GCode::process_layer( m_layer = layers[layer_id].layer(); } for (ObjectByExtruder::Island &island : object_by_extruder.islands) { - const auto& by_region_specific = layer_tools.wiping_extrusions.is_anything_overridden() ? island.by_region_per_copy(copy_id, extruder_id, print_wipe_extrusions) : island.by_region; + const auto& by_region_specific = const_cast(layer_tools).wiping_extrusions().is_anything_overridden() ? island.by_region_per_copy(copy_id, extruder_id, print_wipe_extrusions) : island.by_region; if (print.config.infill_first) { gcode += this->extrude_infill(print, by_region_specific); diff --git a/xs/src/libslic3r/GCode/ToolOrdering.cpp b/xs/src/libslic3r/GCode/ToolOrdering.cpp index 219c1adfd..0fe7b0c4e 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.cpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.cpp @@ -143,7 +143,7 @@ void ToolOrdering::collect_extruders(const PrintObject &object) if (m_print_config_ptr) { // in this case complete_objects is false (see ToolOrdering constructors) something_nonoverriddable = false; for (const auto& eec : layerm->perimeters.entities) // let's check if there are nonoverriddable entities - if (!layer_tools.wiping_extrusions.is_overriddable(dynamic_cast(*eec), *m_print_config_ptr, object, region)) { + if (!layer_tools.wiping_extrusions().is_overriddable(dynamic_cast(*eec), *m_print_config_ptr, object, region)) { something_nonoverriddable = true; break; } @@ -169,7 +169,7 @@ void ToolOrdering::collect_extruders(const PrintObject &object) has_infill = true; if (m_print_config_ptr) { - if (!something_nonoverriddable && !layer_tools.wiping_extrusions.is_overriddable(*fill, *m_print_config_ptr, object, region)) + if (!something_nonoverriddable && !layer_tools.wiping_extrusions().is_overriddable(*fill, *m_print_config_ptr, object, region)) something_nonoverriddable = true; } } @@ -382,8 +382,9 @@ void WipingExtrusions::set_extruder_override(const ExtrusionEntity* entity, unsi // Finds first non-soluble extruder on the layer -int WipingExtrusions::first_nonsoluble_extruder_on_layer(const PrintConfig& print_config, const LayerTools& lt) const +int WipingExtrusions::first_nonsoluble_extruder_on_layer(const PrintConfig& print_config) const { + const LayerTools& lt = *m_layer_tools; for (auto extruders_it = lt.extruders.begin(); extruders_it != lt.extruders.end(); ++extruders_it) if (!print_config.filament_soluble.get_at(*extruders_it)) return (*extruders_it); @@ -392,8 +393,9 @@ int WipingExtrusions::first_nonsoluble_extruder_on_layer(const PrintConfig& prin } // Finds last non-soluble extruder on the layer -int WipingExtrusions::last_nonsoluble_extruder_on_layer(const PrintConfig& print_config, const LayerTools& lt) const +int WipingExtrusions::last_nonsoluble_extruder_on_layer(const PrintConfig& print_config) const { + const LayerTools& lt = *m_layer_tools; for (auto extruders_it = lt.extruders.rbegin(); extruders_it != lt.extruders.rend(); ++extruders_it) if (!print_config.filament_soluble.get_at(*extruders_it)) return (*extruders_it); @@ -405,7 +407,7 @@ int WipingExtrusions::last_nonsoluble_extruder_on_layer(const PrintConfig& print // Decides whether this entity could be overridden bool WipingExtrusions::is_overriddable(const ExtrusionEntityCollection& eec, const PrintConfig& print_config, const PrintObject& object, const PrintRegion& region) const { - if (print_config.filament_soluble.get_at(get_extruder(eec, region))) + if (print_config.filament_soluble.get_at(Print::get_extruder(eec, region))) return false; if (object.config.wipe_into_objects) @@ -420,8 +422,9 @@ bool WipingExtrusions::is_overriddable(const ExtrusionEntityCollection& eec, con // Following function iterates through all extrusions on the layer, remembers those that could be used for wiping after toolchange // and returns volume that is left to be wiped on the wipe tower. -float WipingExtrusions::mark_wiping_extrusions(const Print& print, const LayerTools& layer_tools, unsigned int new_extruder, float volume_to_wipe) +float WipingExtrusions::mark_wiping_extrusions(const Print& print, unsigned int new_extruder, float volume_to_wipe) { + const LayerTools& layer_tools = *m_layer_tools; const float min_infill_volume = 0.f; // ignore infill with smaller volume than this if (print.config.filament_soluble.get_at(new_extruder)) @@ -472,7 +475,7 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, const LayerTo continue; // What extruder would this normally be printed with? - unsigned int correct_extruder = get_extruder(*fill, region); + unsigned int correct_extruder = Print::get_extruder(*fill, region); if (volume_to_wipe<=0) continue; @@ -529,10 +532,11 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, const LayerTo // that were not actually overridden. If they are part of a dedicated object, printing them with the extruder // they were initially assigned to might mean violating the perimeter-infill order. We will therefore go through // them again and make sure we override it. -void WipingExtrusions::ensure_perimeters_infills_order(const Print& print, const LayerTools& layer_tools) +void WipingExtrusions::ensure_perimeters_infills_order(const Print& print) { - unsigned int first_nonsoluble_extruder = first_nonsoluble_extruder_on_layer(print.config, layer_tools); - unsigned int last_nonsoluble_extruder = last_nonsoluble_extruder_on_layer(print.config, layer_tools); + const LayerTools& layer_tools = *m_layer_tools; + unsigned int first_nonsoluble_extruder = first_nonsoluble_extruder_on_layer(print.config); + unsigned int last_nonsoluble_extruder = last_nonsoluble_extruder_on_layer(print.config); for (const PrintObject* object : print.objects) { // Finds this layer: diff --git a/xs/src/libslic3r/GCode/ToolOrdering.hpp b/xs/src/libslic3r/GCode/ToolOrdering.hpp index ac6bb480c..34304d712 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.hpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.hpp @@ -28,15 +28,17 @@ public: // This function goes through all infill entities, decides which ones will be used for wiping and // marks them by the extruder id. Returns volume that remains to be wiped on the wipe tower: - float mark_wiping_extrusions(const Print& print, const LayerTools& layer_tools, unsigned int new_extruder, float volume_to_wipe); + float mark_wiping_extrusions(const Print& print, unsigned int new_extruder, float volume_to_wipe); - void ensure_perimeters_infills_order(const Print& print, const LayerTools& layer_tools); + void ensure_perimeters_infills_order(const Print& print); bool is_overriddable(const ExtrusionEntityCollection& ee, const PrintConfig& print_config, const PrintObject& object, const PrintRegion& region) const; + void set_layer_tools_ptr(const LayerTools* lt) { m_layer_tools = lt; } + private: - int first_nonsoluble_extruder_on_layer(const PrintConfig& print_config, const LayerTools& lt) const; - int last_nonsoluble_extruder_on_layer(const PrintConfig& print_config, const LayerTools& lt) const; + int first_nonsoluble_extruder_on_layer(const PrintConfig& print_config) const; + int last_nonsoluble_extruder_on_layer(const PrintConfig& print_config) const; // This function is called from mark_wiping_extrusions and sets extruder that it should be printed with (-1 .. as usual) void set_extruder_override(const ExtrusionEntity* entity, unsigned int copy_id, int extruder, unsigned int num_of_copies); @@ -48,6 +50,7 @@ private: std::map> entity_map; // to keep track of who prints what bool something_overridden = false; + const LayerTools* m_layer_tools; // so we know which LayerTools object this belongs to }; @@ -80,8 +83,14 @@ public: size_t wipe_tower_partitions; coordf_t wipe_tower_layer_height; + WipingExtrusions& wiping_extrusions() { + m_wiping_extrusions.set_layer_tools_ptr(this); + return m_wiping_extrusions; + } + +private: // This object holds list of extrusion that will be used for extruder wiping - WipingExtrusions wiping_extrusions; + WipingExtrusions m_wiping_extrusions; }; diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index fbbded7cb..f8caa4786 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -1137,13 +1137,13 @@ void Print::_make_wipe_tower() float volume_to_wipe = wipe_volumes[current_extruder_id][extruder_id]; // total volume to wipe after this toolchange if (!first_layer) // unless we're on the first layer, try to assign some infills/objects for the wiping: - volume_to_wipe = layer_tools.wiping_extrusions.mark_wiping_extrusions(*this, layer_tools, extruder_id, wipe_volumes[current_extruder_id][extruder_id]); + volume_to_wipe = layer_tools.wiping_extrusions().mark_wiping_extrusions(*this, extruder_id, wipe_volumes[current_extruder_id][extruder_id]); wipe_tower.plan_toolchange(layer_tools.print_z, layer_tools.wipe_tower_layer_height, current_extruder_id, extruder_id, first_layer && extruder_id == m_tool_ordering.all_extruders().back(), volume_to_wipe); current_extruder_id = extruder_id; } } - layer_tools.wiping_extrusions.ensure_perimeters_infills_order(*this, layer_tools); + layer_tools.wiping_extrusions().ensure_perimeters_infills_order(*this); if (&layer_tools == &m_tool_ordering.back() || (&layer_tools + 1)->wipe_tower_partitions == 0) break; } @@ -1215,4 +1215,13 @@ void Print::set_status(int percent, const std::string &message) printf("Print::status %d => %s\n", percent, message.c_str()); } + +// Returns extruder this eec should be printed with, according to PrintRegion config +int Print::get_extruder(const ExtrusionEntityCollection& fill, const PrintRegion ®ion) +{ + return is_infill(fill.role()) ? std::max(0, (is_solid_infill(fill.entities.front()->role()) ? region.config.solid_infill_extruder : region.config.infill_extruder) - 1) : + std::max(region.config.perimeter_extruder.value - 1, 0); +} + + } diff --git a/xs/src/libslic3r/Print.hpp b/xs/src/libslic3r/Print.hpp index f90fb500f..3ea7ffb68 100644 --- a/xs/src/libslic3r/Print.hpp +++ b/xs/src/libslic3r/Print.hpp @@ -286,6 +286,9 @@ public: bool has_support_material() const; void auto_assign_extruders(ModelObject* model_object) const; + // Returns extruder this eec should be printed with, according to PrintRegion config: + static int get_extruder(const ExtrusionEntityCollection& fill, const PrintRegion ®ion); + void _make_skirt(); void _make_brim(); @@ -323,14 +326,6 @@ private: }; -// Returns extruder this eec should be printed with, according to PrintRegion config -static int get_extruder(const ExtrusionEntityCollection& fill, const PrintRegion ®ion) { - return is_infill(fill.role()) ? std::max(0, (is_solid_infill(fill.entities.front()->role()) ? region.config.solid_infill_extruder : region.config.infill_extruder) - 1) : - std::max(region.config.perimeter_extruder.value - 1, 0); -} - - - #define FOREACH_BASE(type, container, iterator) for (type::const_iterator iterator = (container).begin(); iterator != (container).end(); ++iterator) #define FOREACH_REGION(print, region) FOREACH_BASE(PrintRegionPtrs, (print)->regions, region) #define FOREACH_OBJECT(print, object) FOREACH_BASE(PrintObjectPtrs, (print)->objects, object) From 0e9ac1679f9bd925797836eae358633b29455ef1 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 12 Jul 2018 11:26:13 +0200 Subject: [PATCH 130/198] Keep fixed radius of rotate gizmo --- xs/src/slic3r/GUI/GLCanvas3D.cpp | 18 ++++++++++ xs/src/slic3r/GUI/GLCanvas3D.hpp | 1 + xs/src/slic3r/GUI/GLCanvas3DManager.cpp | 3 +- xs/src/slic3r/GUI/GLGizmo.cpp | 44 ++++++++++++++++++++++++- xs/src/slic3r/GUI/GLGizmo.hpp | 8 +++++ 5 files changed, 72 insertions(+), 2 deletions(-) diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index 0767b197f..010e4da95 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -1291,6 +1291,16 @@ void GLCanvas3D::Gizmos::update(const Pointf& mouse_pos) curr->update(mouse_pos); } +void GLCanvas3D::Gizmos::refresh() +{ + if (!m_enabled) + return; + + GLGizmoBase* curr = _get_current(); + if (curr != nullptr) + curr->refresh(); +} + GLCanvas3D::Gizmos::EType GLCanvas3D::Gizmos::get_current_type() const { return m_current; @@ -1321,6 +1331,9 @@ void GLCanvas3D::Gizmos::start_dragging() void GLCanvas3D::Gizmos::stop_dragging() { m_dragging = false; + GLGizmoBase* curr = _get_current(); + if (curr != nullptr) + curr->stop_dragging(); } float GLCanvas3D::Gizmos::get_scale() const @@ -2853,6 +2866,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) } update_gizmos_data(); + m_gizmos.refresh(); m_dirty = true; } } @@ -2942,6 +2956,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) } m_mouse.drag.start_position_3D = cur_pos; + m_gizmos.refresh(); m_dirty = true; } @@ -3002,6 +3017,9 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) m_on_update_geometry_info_callback.call(size.x, size.y, size.z, m_gizmos.get_scale()); } + if (volumes.size() > 1) + m_gizmos.refresh(); + m_dirty = true; } else if (evt.Dragging() && !gizmos_overlay_contains_mouse) diff --git a/xs/src/slic3r/GUI/GLCanvas3D.hpp b/xs/src/slic3r/GUI/GLCanvas3D.hpp index 34a329e9c..cc998226b 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.hpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.hpp @@ -365,6 +365,7 @@ public: bool overlay_contains_mouse(const GLCanvas3D& canvas, const Pointf& mouse_pos) const; bool grabber_contains_mouse() const; void update(const Pointf& mouse_pos); + void refresh(); EType get_current_type() const; diff --git a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp index 8520754d9..b74e8b87d 100644 --- a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp @@ -100,7 +100,8 @@ std::string GLCanvas3DManager::GLInfo::to_string(bool format_as_html, bool exten for (GLint i = 0; i < num_extensions; ++i) { const char* e = (const char*)::glGetStringi(GL_EXTENSIONS, i); - extensions_list.push_back(e); + if (e != nullptr) + extensions_list.push_back(e); } std::sort(extensions_list.begin(), extensions_list.end()); diff --git a/xs/src/slic3r/GUI/GLGizmo.cpp b/xs/src/slic3r/GUI/GLGizmo.cpp index 391a22f97..47b01e8a2 100644 --- a/xs/src/slic3r/GUI/GLGizmo.cpp +++ b/xs/src/slic3r/GUI/GLGizmo.cpp @@ -90,6 +90,7 @@ GLGizmoBase::EState GLGizmoBase::get_state() const void GLGizmoBase::set_state(GLGizmoBase::EState state) { m_state = state; + on_set_state(); } unsigned int GLGizmoBase::get_texture_id() const @@ -118,12 +119,22 @@ void GLGizmoBase::start_dragging() on_start_dragging(); } +void GLGizmoBase::stop_dragging() +{ + on_stop_dragging(); +} + void GLGizmoBase::update(const Pointf& mouse_pos) { if (m_hover_id != -1) on_update(mouse_pos); } +void GLGizmoBase::refresh() +{ + on_refresh(); +} + void GLGizmoBase::render(const BoundingBoxf3& box) const { on_render(box); @@ -134,8 +145,24 @@ void GLGizmoBase::render_for_picking(const BoundingBoxf3& box) const on_render_for_picking(box); } +void GLGizmoBase::on_set_state() +{ + // do nothing +} + void GLGizmoBase::on_start_dragging() { + // do nothing +} + +void GLGizmoBase::on_stop_dragging() +{ + // do nothing +} + +void GLGizmoBase::on_refresh() +{ + // do nothing } void GLGizmoBase::render_grabbers() const @@ -162,6 +189,7 @@ GLGizmoRotate::GLGizmoRotate() , m_angle_z(0.0f) , m_center(Pointf(0.0, 0.0)) , m_radius(0.0f) + , m_keep_radius(false) { } @@ -199,6 +227,11 @@ bool GLGizmoRotate::on_init() return true; } +void GLGizmoRotate::on_set_state() +{ + m_keep_radius = (m_state == On) ? false : true; +} + void GLGizmoRotate::on_update(const Pointf& mouse_pos) { Vectorf orig_dir(1.0, 0.0); @@ -220,13 +253,22 @@ void GLGizmoRotate::on_update(const Pointf& mouse_pos) m_angle_z = (float)theta; } +void GLGizmoRotate::on_refresh() +{ + m_keep_radius = false; +} + void GLGizmoRotate::on_render(const BoundingBoxf3& box) const { ::glDisable(GL_DEPTH_TEST); const Pointf3& size = box.size(); m_center = box.center(); - m_radius = Offset + ::sqrt(sqr(0.5f * size.x) + sqr(0.5f * size.y)); + if (!m_keep_radius) + { + m_radius = Offset + ::sqrt(sqr(0.5f * size.x) + sqr(0.5f * size.y)); + m_keep_radius = true; + } ::glLineWidth(2.0f); ::glColor3fv(BaseColor); diff --git a/xs/src/slic3r/GUI/GLGizmo.hpp b/xs/src/slic3r/GUI/GLGizmo.hpp index 5e6eb79c7..506b3972e 100644 --- a/xs/src/slic3r/GUI/GLGizmo.hpp +++ b/xs/src/slic3r/GUI/GLGizmo.hpp @@ -64,15 +64,20 @@ public: void set_hover_id(int id); void start_dragging(); + void stop_dragging(); void update(const Pointf& mouse_pos); + void refresh(); void render(const BoundingBoxf3& box) const; void render_for_picking(const BoundingBoxf3& box) const; protected: virtual bool on_init() = 0; + virtual void on_set_state(); virtual void on_start_dragging(); + virtual void on_stop_dragging(); virtual void on_update(const Pointf& mouse_pos) = 0; + virtual void on_refresh(); virtual void on_render(const BoundingBoxf3& box) const = 0; virtual void on_render_for_picking(const BoundingBoxf3& box) const = 0; @@ -96,6 +101,7 @@ class GLGizmoRotate : public GLGizmoBase mutable Pointf m_center; mutable float m_radius; + mutable bool m_keep_radius; public: GLGizmoRotate(); @@ -105,7 +111,9 @@ public: protected: virtual bool on_init(); + virtual void on_set_state(); virtual void on_update(const Pointf& mouse_pos); + virtual void on_refresh(); virtual void on_render(const BoundingBoxf3& box) const; virtual void on_render_for_picking(const BoundingBoxf3& box) const; From 63ab71358595c351e26e223bf60e69909272fabf Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 12 Jul 2018 12:15:30 +0200 Subject: [PATCH 131/198] Added debug output to investigate SPE-352 --- xs/src/slic3r/GUI/GLCanvas3DManager.cpp | 48 ++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp index b74e8b87d..62197cfc9 100644 --- a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp @@ -83,20 +83,38 @@ std::string GLCanvas3DManager::GLInfo::to_string(bool format_as_html, bool exten std::string b_end = format_as_html ? "" : ""; std::string line_end = format_as_html ? "
" : "\n"; +//################################################## DEbUG_OUTPUT ################################################################### + std::cout << ">>>>>>>>> GLCanvas3DManager::GLInfo::to_string() -> 1" << std::endl; +//################################################## DEbUG_OUTPUT ################################################################### + out << h2_start << "OpenGL installation" << h2_end << line_end; out << b_start << "GL version: " << b_end << (version.empty() ? "N/A" : version) << line_end; out << b_start << "Vendor: " << b_end << (vendor.empty() ? "N/A" : vendor) << line_end; out << b_start << "Renderer: " << b_end << (renderer.empty() ? "N/A" : renderer) << line_end; out << b_start << "GLSL version: " << b_end << (glsl_version.empty() ? "N/A" : glsl_version) << line_end; +//################################################## DEbUG_OUTPUT ################################################################### + std::cout << ">>>>>>>>> GLCanvas3DManager::GLInfo::to_string() -> 2" << std::endl; +//################################################## DEbUG_OUTPUT ################################################################### + if (extensions) { - out << h2_start << "Installed extensions:" << h2_end << line_end; +//################################################################################################################################### +// out << h2_start << "Installed extensions:" << h2_end << line_end; +//################################################################################################################################### + +//################################################## DEbUG_OUTPUT ################################################################### + std::cout << ">>>>>>>>> GLCanvas3DManager::GLInfo::to_string() -> 3" << std::endl; +//################################################## DEbUG_OUTPUT ################################################################### std::vector extensions_list; GLint num_extensions; ::glGetIntegerv(GL_NUM_EXTENSIONS, &num_extensions); - + +//################################################## DEbUG_OUTPUT ################################################################### + std::cout << ">>>>>>>>> GLCanvas3DManager::GLInfo::to_string() -> 4" << std::endl; +//################################################## DEbUG_OUTPUT ################################################################### + for (GLint i = 0; i < num_extensions; ++i) { const char* e = (const char*)::glGetStringi(GL_EXTENSIONS, i); @@ -104,13 +122,30 @@ std::string GLCanvas3DManager::GLInfo::to_string(bool format_as_html, bool exten extensions_list.push_back(e); } - std::sort(extensions_list.begin(), extensions_list.end()); - for (const std::string& ext : extensions_list) +//################################################## DEbUG_OUTPUT ################################################################### + std::cout << ">>>>>>>>> GLCanvas3DManager::GLInfo::to_string() -> 5" << std::endl; +//################################################## DEbUG_OUTPUT ################################################################### + +//################################################################################################################################### + if (!extensions_list.empty()) { - out << ext << line_end; + out << h2_start << "Installed extensions:" << h2_end << line_end; +//################################################################################################################################### + + std::sort(extensions_list.begin(), extensions_list.end()); + for (const std::string& ext : extensions_list) + { + out << ext << line_end; + } +//################################################################################################################################### } +//################################################################################################################################### } +//################################################## DEbUG_OUTPUT ################################################################### + std::cout << ">>>>>>>>> GLCanvas3DManager::GLInfo::to_string() -> 6" << std::endl; +//################################################## DEbUG_OUTPUT ################################################################### + return out.str(); } @@ -172,6 +207,9 @@ void GLCanvas3DManager::init_gl() { if (!m_gl_initialized) { +//################################################## DEbUG_OUTPUT ################################################################### + std::cout << ">>>>>>>>> glewInit()" << std::endl; +//################################################## DEbUG_OUTPUT ################################################################### glewInit(); m_gl_info.detect(); const AppConfig* config = GUI::get_app_config(); From 76d4b9dbb857e056024d9b9e964be5a285b98831 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 12 Jul 2018 13:10:18 +0200 Subject: [PATCH 132/198] Attempt to fix SPE-352 --- xs/src/slic3r/GUI/GLCanvas3DManager.cpp | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp index 62197cfc9..bf8d9a3ff 100644 --- a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp @@ -107,20 +107,28 @@ std::string GLCanvas3DManager::GLInfo::to_string(bool format_as_html, bool exten std::cout << ">>>>>>>>> GLCanvas3DManager::GLInfo::to_string() -> 3" << std::endl; //################################################## DEbUG_OUTPUT ################################################################### +//################################################################################################################################### std::vector extensions_list; - GLint num_extensions; - ::glGetIntegerv(GL_NUM_EXTENSIONS, &num_extensions); + std::string extensions_str = (const char*)::glGetString(GL_EXTENSIONS); + boost::split(extensions_list, extensions_str, boost::is_any_of(" "), boost::token_compress_off); + +// std::vector extensions_list; +// GLint num_extensions; +// ::glGetIntegerv(GL_NUM_EXTENSIONS, &num_extensions); +//################################################################################################################################### //################################################## DEbUG_OUTPUT ################################################################### std::cout << ">>>>>>>>> GLCanvas3DManager::GLInfo::to_string() -> 4" << std::endl; //################################################## DEbUG_OUTPUT ################################################################### - for (GLint i = 0; i < num_extensions; ++i) - { - const char* e = (const char*)::glGetStringi(GL_EXTENSIONS, i); - if (e != nullptr) - extensions_list.push_back(e); - } +//################################################################################################################################### +// for (GLint i = 0; i < num_extensions; ++i) +// { +// const char* e = (const char*)::glGetStringi(GL_EXTENSIONS, i); +// if (e != nullptr) +// extensions_list.push_back(e); +// } +//################################################################################################################################### //################################################## DEbUG_OUTPUT ################################################################### std::cout << ">>>>>>>>> GLCanvas3DManager::GLInfo::to_string() -> 5" << std::endl; From b2d9877cd54bf9e4d3c13ce584b848801e3dfba6 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 12 Jul 2018 13:34:39 +0200 Subject: [PATCH 133/198] Fixed crash on MAC when selecting system info --- xs/src/slic3r/GUI/GLCanvas3DManager.cpp | 37 ++++++++++++------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp index f817e7739..ec4ac1606 100644 --- a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp @@ -78,35 +78,32 @@ std::string GLCanvas3DManager::GLInfo::to_string(bool format_as_html, bool exten std::stringstream out; std::string h2_start = format_as_html ? "" : ""; - std::string h2_end = format_as_html ? "" : ""; - std::string b_start = format_as_html ? "" : ""; - std::string b_end = format_as_html ? "" : ""; + std::string h2_end = format_as_html ? "" : ""; + std::string b_start = format_as_html ? "" : ""; + std::string b_end = format_as_html ? "" : ""; std::string line_end = format_as_html ? "
" : "\n"; out << h2_start << "OpenGL installation" << h2_end << line_end; - out << b_start << "GL version: " << b_end << (version.empty() ? "N/A" : version) << line_end; - out << b_start << "Vendor: " << b_end << (vendor.empty() ? "N/A" : vendor) << line_end; - out << b_start << "Renderer: " << b_end << (renderer.empty() ? "N/A" : renderer) << line_end; - out << b_start << "GLSL version: " << b_end << (glsl_version.empty() ? "N/A" : glsl_version) << line_end; + out << b_start << "GL version: " << b_end << (version.empty() ? "N/A" : version) << line_end; + out << b_start << "Vendor: " << b_end << (vendor.empty() ? "N/A" : vendor) << line_end; + out << b_start << "Renderer: " << b_end << (renderer.empty() ? "N/A" : renderer) << line_end; + out << b_start << "GLSL version: " << b_end << (glsl_version.empty() ? "N/A" : glsl_version) << line_end; if (extensions) { - out << h2_start << "Installed extensions:" << h2_end << line_end; - std::vector extensions_list; - GLint num_extensions; - ::glGetIntegerv(GL_NUM_EXTENSIONS, &num_extensions); - - for (GLint i = 0; i < num_extensions; ++i) - { - const char* e = (const char*)::glGetStringi(GL_EXTENSIONS, i); - extensions_list.push_back(e); - } + std::string extensions_str = (const char*)::glGetString(GL_EXTENSIONS); + boost::split(extensions_list, extensions_str, boost::is_any_of(" "), boost::token_compress_off); - std::sort(extensions_list.begin(), extensions_list.end()); - for (const std::string& ext : extensions_list) + if (!extensions_list.empty()) { - out << ext << line_end; + out << h2_start << "Installed extensions:" << h2_end << line_end; + + std::sort(extensions_list.begin(), extensions_list.end()); + for (const std::string& ext : extensions_list) + { + out << ext << line_end; + } } } From 7caada244afe5e00f490d099bb8ee9b0c9b70005 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Fri, 13 Jul 2018 08:58:28 +0200 Subject: [PATCH 134/198] Attempt to fix SPE-356 --- lib/Slic3r/GUI/Plater.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index ef9ea3dfb..eb1586773 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -228,7 +228,7 @@ sub new { if (($preview != $self->{preview3D}) && ($preview != $self->{canvas3D})) { $preview->OnActivate if $preview->can('OnActivate'); } elsif ($preview == $self->{preview3D}) { - $self->{preview3D}->load_print; + $self->{preview3D}->reload_print; # sets the canvas as dirty to force a render at the 1st idle event (wxWidgets IsShownOnScreen() is buggy and cannot be used reliably) Slic3r::GUI::_3DScene::set_as_dirty($self->{preview3D}->canvas); } elsif ($preview == $self->{canvas3D}) { From cf1ccacd41e45b93319e7c2f4aaa05990a330865 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Fri, 13 Jul 2018 10:46:30 +0200 Subject: [PATCH 135/198] Perimeters test modified to skip lines M73 --- t/perimeters.t | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/perimeters.t b/t/perimeters.t index ee332616d..d0657cb23 100644 --- a/t/perimeters.t +++ b/t/perimeters.t @@ -175,7 +175,7 @@ use Slic3r::Test; if ($info->{extruding} && $info->{dist_XY} > 0) { $cur_loop ||= [ [$self->X, $self->Y] ]; push @$cur_loop, [ @$info{qw(new_X new_Y)} ]; - } else { + } elsif ($cmd ne 'M73') { # skips remaining time lines (M73) if ($cur_loop) { $has_cw_loops = 1 if Slic3r::Polygon->new(@$cur_loop)->is_clockwise; $cur_loop = undef; @@ -201,7 +201,7 @@ use Slic3r::Test; if ($info->{extruding} && $info->{dist_XY} > 0) { $cur_loop ||= [ [$self->X, $self->Y] ]; push @$cur_loop, [ @$info{qw(new_X new_Y)} ]; - } else { + } elsif ($cmd ne 'M73') { # skips remaining time lines (M73) if ($cur_loop) { $has_cw_loops = 1 if Slic3r::Polygon->new_scale(@$cur_loop)->is_clockwise; if ($self->F == $config->external_perimeter_speed*60) { @@ -306,7 +306,7 @@ use Slic3r::Test; if ($info->{extruding} && $info->{dist_XY} > 0 && ($args->{F} // $self->F) == $config->perimeter_speed*60) { $perimeters{$self->Z}++ if !$in_loop; $in_loop = 1; - } else { + } elsif ($cmd ne 'M73') { # skips remaining time lines (M73) $in_loop = 0; } }); @@ -430,7 +430,7 @@ use Slic3r::Test; push @seam_points, Slic3r::Point->new_scale($self->X, $self->Y); } $was_extruding = 1; - } else { + } elsif ($cmd ne 'M73') { # skips remaining time lines (M73) $was_extruding = 0; } }); From 06613e47925834b2a7056b5bb178a4da0e37da8c Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Fri, 13 Jul 2018 11:16:28 +0200 Subject: [PATCH 136/198] Fixed 3D preview not updated after g-code export --- lib/Slic3r/GUI/Plater.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 2b0a5a0d5..3f069c0e4 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -203,7 +203,7 @@ sub new { if (($preview != $self->{preview3D}) && ($preview != $self->{canvas3D})) { $preview->OnActivate if $preview->can('OnActivate'); } elsif ($preview == $self->{preview3D}) { - $self->{preview3D}->load_print; + $self->{preview3D}->reload_print; # sets the canvas as dirty to force a render at the 1st idle event (wxWidgets IsShownOnScreen() is buggy and cannot be used reliably) Slic3r::GUI::_3DScene::set_as_dirty($self->{preview3D}->canvas); } elsif ($preview == $self->{canvas3D}) { From 103c7eda8a7c9cceb39696f010dbff2d2800d622 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Fri, 13 Jul 2018 11:25:22 +0200 Subject: [PATCH 137/198] Trying to make sure infill_first (or otherwise) is respected --- xs/src/libslic3r/GCode/ToolOrdering.cpp | 54 ++++++++++++++++--------- xs/src/libslic3r/GCode/ToolOrdering.hpp | 2 + 2 files changed, 37 insertions(+), 19 deletions(-) diff --git a/xs/src/libslic3r/GCode/ToolOrdering.cpp b/xs/src/libslic3r/GCode/ToolOrdering.cpp index 0fe7b0c4e..46ba0731b 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.cpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.cpp @@ -15,6 +15,24 @@ namespace Slic3r { + +// Returns true in case that extruder a comes before b (b does not have to be present). False otherwise. +bool LayerTools::is_extruder_order(unsigned int a, unsigned int b) const +{ + if (a==b) + return false; + + for (auto extruder : extruders) { + if (extruder == a) + return true; + if (extruder == b) + return false; + } + + return false; +} + + // For the use case when each object is printed separately // (print.config.complete_objects is true). ToolOrdering::ToolOrdering(const PrintObject &object, unsigned int first_extruder, bool prime_multi_material) @@ -424,7 +442,7 @@ bool WipingExtrusions::is_overriddable(const ExtrusionEntityCollection& eec, con // and returns volume that is left to be wiped on the wipe tower. float WipingExtrusions::mark_wiping_extrusions(const Print& print, unsigned int new_extruder, float volume_to_wipe) { - const LayerTools& layer_tools = *m_layer_tools; + const LayerTools& lt = *m_layer_tools; const float min_infill_volume = 0.f; // ignore infill with smaller volume than this if (print.config.filament_soluble.get_at(new_extruder)) @@ -452,7 +470,7 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, unsigned int const auto& object = object_list[i]; // Finds this layer: - auto this_layer_it = std::find_if(object->layers.begin(), object->layers.end(), [&layer_tools](const Layer* lay) { return std::abs(layer_tools.print_z - lay->print_z)layers.begin(), object->layers.end(), [<](const Layer* lay) { return std::abs(lt.print_z - lay->print_z)layers.end()) continue; const Layer* this_layer = *this_layer_it; @@ -480,21 +498,11 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, unsigned int if (volume_to_wipe<=0) continue; - if (!object->config.wipe_into_objects && !print.config.infill_first) { + if (!object->config.wipe_into_objects && !print.config.infill_first && region.config.wipe_into_infill) // In this case we must check that the original extruder is used on this layer before the one we are overridding // (and the perimeters will be finished before the infill is printed): - if ((!print.config.infill_first && region.config.wipe_into_infill)) { - bool unused_yet = false; - for (unsigned i = 0; i < layer_tools.extruders.size(); ++i) { - if (layer_tools.extruders[i] == new_extruder) - unused_yet = true; - if (layer_tools.extruders[i] == correct_extruder) - break; - } - if (unused_yet) - continue; - } - } + if (!lt.is_extruder_order(region.config.perimeter_extruder - 1, new_extruder)) + continue; if ((!is_entity_overridden(fill, copy) && fill->total_volume() > min_infill_volume)) { // this infill will be used to wipe this extruder set_extruder_override(fill, copy, new_extruder, num_of_copies); @@ -534,13 +542,13 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, unsigned int // them again and make sure we override it. void WipingExtrusions::ensure_perimeters_infills_order(const Print& print) { - const LayerTools& layer_tools = *m_layer_tools; + const LayerTools& lt = *m_layer_tools; unsigned int first_nonsoluble_extruder = first_nonsoluble_extruder_on_layer(print.config); unsigned int last_nonsoluble_extruder = last_nonsoluble_extruder_on_layer(print.config); for (const PrintObject* object : print.objects) { // Finds this layer: - auto this_layer_it = std::find_if(object->layers.begin(), object->layers.end(), [&layer_tools](const Layer* lay) { return std::abs(layer_tools.print_z - lay->print_z)layers.begin(), object->layers.end(), [<](const Layer* lay) { return std::abs(lt.print_z - lay->print_z)layers.end()) continue; const Layer* this_layer = *this_layer_it; @@ -560,11 +568,19 @@ void WipingExtrusions::ensure_perimeters_infills_order(const Print& print) || is_entity_overridden(fill, copy) ) continue; - // This infill could have been overridden but was not - unless we do somthing, it could be + // This infill could have been overridden but was not - unless we do something, it could be // printed before its perimeter, or not be printed at all (in case its original extruder has // not been added to LayerTools // Either way, we will now force-override it with something suitable: - set_extruder_override(fill, copy, (print.config.infill_first ? first_nonsoluble_extruder : last_nonsoluble_extruder), num_of_copies); + if (print.config.infill_first + || lt.is_extruder_order(region.config.perimeter_extruder - 1, last_nonsoluble_extruder // !infill_first, but perimeter is already printed when last extruder prints + || std::find(lt.extruders.begin(), lt.extruders.end(), region.config.infill_extruder - 1) == lt.extruders.end()) // we have to force override - this could violate infill_first (FIXME) + ) + set_extruder_override(fill, copy, (print.config.infill_first ? first_nonsoluble_extruder : last_nonsoluble_extruder), num_of_copies); + else { + // In this case we can (and should) leave it to be printed normally. + // Force overriding would mean it gets printed before its perimeter. + } } // Now the same for perimeters - see comments above for explanation: diff --git a/xs/src/libslic3r/GCode/ToolOrdering.hpp b/xs/src/libslic3r/GCode/ToolOrdering.hpp index 34304d712..13e0212f1 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.hpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.hpp @@ -69,6 +69,8 @@ public: bool operator< (const LayerTools &rhs) const { return print_z - EPSILON < rhs.print_z; } bool operator==(const LayerTools &rhs) const { return std::abs(print_z - rhs.print_z) < EPSILON; } + bool is_extruder_order(unsigned int a, unsigned int b) const; + coordf_t print_z; bool has_object; bool has_support; From 256d44cc43aaf30e18f7fc3f3472d516cd3bd0c8 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Fri, 13 Jul 2018 11:26:59 +0200 Subject: [PATCH 138/198] Disabling reverse order checks in DJD selection. It causes unacceptable running times for large number of objects. --- xs/src/libslic3r/Model.cpp | 96 +++++++++++++++++++++++++++++++++++++- 1 file changed, 94 insertions(+), 2 deletions(-) diff --git a/xs/src/libslic3r/Model.cpp b/xs/src/libslic3r/Model.cpp index 6664020a3..c1d58f963 100644 --- a/xs/src/libslic3r/Model.cpp +++ b/xs/src/libslic3r/Model.cpp @@ -21,6 +21,7 @@ #include // #include +#include "SVG.hpp" namespace Slic3r { @@ -308,6 +309,86 @@ namespace arr { using namespace libnest2d; +std::string toString(const Model& model) { + std::stringstream ss; + + ss << "{\n"; + + for(auto objptr : model.objects) { + if(!objptr) continue; + + auto rmesh = objptr->raw_mesh(); + + for(auto objinst : objptr->instances) { + if(!objinst) continue; + + Slic3r::TriangleMesh tmpmesh = rmesh; + tmpmesh.scale(objinst->scaling_factor); + objinst->transform_mesh(&tmpmesh); + ExPolygons expolys = tmpmesh.horizontal_projection(); + for(auto& expoly_complex : expolys) { + + auto tmp = expoly_complex.simplify(1.0/SCALING_FACTOR); + if(tmp.empty()) continue; + auto expoly = tmp.front(); + expoly.contour.make_clockwise(); + for(auto& h : expoly.holes) h.make_counter_clockwise(); + + ss << "\t{\n"; + ss << "\t\t{\n"; + + for(auto v : expoly.contour.points) ss << "\t\t\t{" + << v.x << ", " + << v.y << "},\n"; + { + auto v = expoly.contour.points.front(); + ss << "\t\t\t{" << v.x << ", " << v.y << "},\n"; + } + ss << "\t\t},\n"; + + // Holes: + ss << "\t\t{\n"; +// for(auto h : expoly.holes) { +// ss << "\t\t\t{\n"; +// for(auto v : h.points) ss << "\t\t\t\t{" +// << v.x << ", " +// << v.y << "},\n"; +// { +// auto v = h.points.front(); +// ss << "\t\t\t\t{" << v.x << ", " << v.y << "},\n"; +// } +// ss << "\t\t\t},\n"; +// } + ss << "\t\t},\n"; + + ss << "\t},\n"; + } + } + } + + ss << "}\n"; + + return ss.str(); +} + +void toSVG(SVG& svg, const Model& model) { + for(auto objptr : model.objects) { + if(!objptr) continue; + + auto rmesh = objptr->raw_mesh(); + + for(auto objinst : objptr->instances) { + if(!objinst) continue; + + Slic3r::TriangleMesh tmpmesh = rmesh; + tmpmesh.scale(objinst->scaling_factor); + objinst->transform_mesh(&tmpmesh); + ExPolygons expolys = tmpmesh.horizontal_projection(); + svg.draw(expolys); + } + } +} + // A container which stores a pointer to the 3D object and its projected // 2D shape from top view. using ShapeData2D = @@ -480,15 +561,17 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, SConf scfg; // Selection configuration // Try inserting groups of 2, and 3 items in all possible order. - scfg.try_reverse_order = true; + scfg.try_reverse_order = false; // If there are more items that could possibly fit into one bin, // use multiple threads. (Potencially decreased pack efficiency) - scfg.allow_parallel = false; + scfg.allow_parallel = true; // Use multiple threads whenever possible scfg.force_parallel = false; + scfg.waste_increment = 0.01; + // Align the arranged pile into the center of the bin pcfg.alignment = PConf::Alignment::CENTER; @@ -605,6 +688,15 @@ bool Model::arrange_objects(coordf_t dist, const BoundingBoxf* bb, bool ret = false; if(bb != nullptr && bb->defined) { ret = arr::arrange(*this, dist, bb, false, progressind); +// std::fstream out("out.cpp", std::fstream::out); +// if(out.good()) { +// out << "const TestData OBJECTS = \n"; +// out << arr::toString(*this); +// } +// out.close(); +// SVG svg("out.svg"); +// arr::toSVG(svg, *this); +// svg.Close(); } else { // get the (transformed) size of each instance so that we take // into account their different transformations when packing From 75cf4e0947f8dc0a79ccea16f836d82d0022cf21 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Fri, 13 Jul 2018 11:32:50 +0200 Subject: [PATCH 139/198] Generate M73 lines for silent mode only for MK3 printers --- xs/src/libslic3r/GCode.cpp | 98 +----------- xs/src/libslic3r/GCode.hpp | 6 - xs/src/libslic3r/GCodeTimeEstimator.cpp | 191 +----------------------- xs/src/libslic3r/GCodeTimeEstimator.hpp | 31 +--- xs/src/libslic3r/Print.hpp | 3 - xs/src/libslic3r/PrintConfig.cpp | 6 - xs/src/libslic3r/PrintConfig.hpp | 2 + 7 files changed, 7 insertions(+), 330 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 9f3818104..434b76f6d 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -375,15 +375,10 @@ void GCode::do_export(Print *print, const char *path, GCodePreviewData *preview_ } fclose(file); -//################################################################################################################# m_normal_time_estimator.post_process_remaining_times(path_tmp, 60.0f); -//################################################################################################################# if (m_silent_time_estimator_enabled) -//############################################################################################################3 m_silent_time_estimator.post_process_remaining_times(path_tmp, 60.0f); -// GCodeTimeEstimator::post_process_elapsed_times(path_tmp, m_default_time_estimator.get_time(), m_silent_time_estimator.get_time()); -//############################################################################################################3 if (! this->m_placeholder_parser_failed_templates.empty()) { // G-code export proceeded, but some of the PlaceholderParser substitutions failed. @@ -415,10 +410,8 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) PROFILE_FUNC(); // resets time estimators -//####################################################################################################################################################################### m_normal_time_estimator.reset(); m_normal_time_estimator.set_dialect(print.config.gcode_flavor); - m_normal_time_estimator.set_remaining_times_enabled(false); m_normal_time_estimator.set_acceleration(print.config.machine_max_acceleration_extruding.values[0]); m_normal_time_estimator.set_retract_acceleration(print.config.machine_max_acceleration_retracting.values[0]); m_normal_time_estimator.set_minimum_feedrate(print.config.machine_min_extruding_rate.values[0]); @@ -436,51 +429,11 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) m_normal_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Z, print.config.machine_max_jerk_z.values[0]); m_normal_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::E, print.config.machine_max_jerk_e.values[0]); -// std::cout << "Normal" << std::endl; -// std::cout << "set_acceleration " << print.config.machine_max_acceleration_extruding.values[0] << std::endl; -// std::cout << "set_retract_acceleration " << print.config.machine_max_acceleration_retracting.values[0] << std::endl; -// std::cout << "set_minimum_feedrate " << print.config.machine_min_extruding_rate.values[0] << std::endl; -// std::cout << "set_minimum_travel_feedrate " << print.config.machine_min_travel_rate.values[0] << std::endl; -// std::cout << "set_axis_max_acceleration X " << print.config.machine_max_acceleration_x.values[0] << std::endl; -// std::cout << "set_axis_max_acceleration Y " << print.config.machine_max_acceleration_y.values[0] << std::endl; -// std::cout << "set_axis_max_acceleration Z " << print.config.machine_max_acceleration_z.values[0] << std::endl; -// std::cout << "set_axis_max_acceleration E " << print.config.machine_max_acceleration_e.values[0] << std::endl; -// std::cout << "set_axis_max_feedrate X " << print.config.machine_max_feedrate_x.values[0] << std::endl; -// std::cout << "set_axis_max_feedrate Y " << print.config.machine_max_feedrate_y.values[0] << std::endl; -// std::cout << "set_axis_max_feedrate Z " << print.config.machine_max_feedrate_z.values[0] << std::endl; -// std::cout << "set_axis_max_feedrate E " << print.config.machine_max_feedrate_e.values[0] << std::endl; -// std::cout << "set_axis_max_jerk X " << print.config.machine_max_jerk_x.values[0] << std::endl; -// std::cout << "set_axis_max_jerk Y " << print.config.machine_max_jerk_y.values[0] << std::endl; -// std::cout << "set_axis_max_jerk Z " << print.config.machine_max_jerk_z.values[0] << std::endl; -// std::cout << "set_axis_max_jerk E " << print.config.machine_max_jerk_e.values[0] << std::endl; - - -// m_default_time_estimator.reset(); -// m_default_time_estimator.set_dialect(print.config.gcode_flavor); -// m_default_time_estimator.set_acceleration(print.config.machine_max_acceleration_extruding.values[0]); -// m_default_time_estimator.set_retract_acceleration(print.config.machine_max_acceleration_retracting.values[0]); -// m_default_time_estimator.set_minimum_feedrate(print.config.machine_min_extruding_rate.values[0]); -// m_default_time_estimator.set_minimum_travel_feedrate(print.config.machine_min_travel_rate.values[0]); -// m_default_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::X, print.config.machine_max_acceleration_x.values[0]); -// m_default_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Y, print.config.machine_max_acceleration_y.values[0]); -// m_default_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Z, print.config.machine_max_acceleration_z.values[0]); -// m_default_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::E, print.config.machine_max_acceleration_e.values[0]); -// m_default_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::X, print.config.machine_max_feedrate_x.values[0]); -// m_default_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Y, print.config.machine_max_feedrate_y.values[0]); -// m_default_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Z, print.config.machine_max_feedrate_z.values[0]); -// m_default_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::E, print.config.machine_max_feedrate_e.values[0]); -// m_default_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::X, print.config.machine_max_jerk_x.values[0]); -// m_default_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Y, print.config.machine_max_jerk_y.values[0]); -// m_default_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Z, print.config.machine_max_jerk_z.values[0]); -// m_default_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::E, print.config.machine_max_jerk_e.values[0]); -//####################################################################################################################################################################### - - m_silent_time_estimator_enabled = (print.config.gcode_flavor == gcfMarlin) && print.config.silent_mode; + m_silent_time_estimator_enabled = (print.config.gcode_flavor == gcfMarlin) && print.config.silent_mode && boost::starts_with(print.config.printer_model.value, "MK3"); if (m_silent_time_estimator_enabled) { m_silent_time_estimator.reset(); m_silent_time_estimator.set_dialect(print.config.gcode_flavor); - m_silent_time_estimator.set_remaining_times_enabled(false); m_silent_time_estimator.set_acceleration(print.config.machine_max_acceleration_extruding.values[1]); m_silent_time_estimator.set_retract_acceleration(print.config.machine_max_acceleration_retracting.values[1]); m_silent_time_estimator.set_minimum_feedrate(print.config.machine_min_extruding_rate.values[1]); @@ -687,15 +640,6 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) _writeln(file, buf); } -//####################################################################################################################################################################### -// // before start gcode time estimation -// if (m_silent_time_estimator_enabled) -// { -// _write(file, m_default_time_estimator.get_elapsed_time_string().c_str()); -// _write(file, m_silent_time_estimator.get_elapsed_time_string().c_str()); -// } -//####################################################################################################################################################################### - // Write the custom start G-code _writeln(file, start_gcode); // Process filament-specific gcode in extruder order. @@ -900,34 +844,15 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) for (const std::string &end_gcode : print.config.end_filament_gcode.values) _writeln(file, this->placeholder_parser_process("end_filament_gcode", end_gcode, (unsigned int)(&end_gcode - &print.config.end_filament_gcode.values.front()), &config)); } -//####################################################################################################################################################################### -// // before end gcode time estimation -// if (m_silent_time_estimator_enabled) -// { -// _write(file, m_default_time_estimator.get_elapsed_time_string().c_str()); -// _write(file, m_silent_time_estimator.get_elapsed_time_string().c_str()); -// } -//####################################################################################################################################################################### _writeln(file, this->placeholder_parser_process("end_gcode", print.config.end_gcode, m_writer.extruder()->id(), &config)); } _write(file, m_writer.update_progress(m_layer_count, m_layer_count, true)); // 100% _write(file, m_writer.postamble()); // calculates estimated printing time -//####################################################################################################################################################################### - m_normal_time_estimator.set_remaining_times_enabled(true); m_normal_time_estimator.calculate_time(); -// m_default_time_estimator.calculate_time(); -//####################################################################################################################################################################### if (m_silent_time_estimator_enabled) -//####################################################################################################################################################################### - { - m_silent_time_estimator.set_remaining_times_enabled(true); -//####################################################################################################################################################################### m_silent_time_estimator.calculate_time(); -//####################################################################################################################################################################### - } -//####################################################################################################################################################################### // Get filament stats. print.filament_stats.clear(); @@ -935,20 +860,14 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) print.total_extruded_volume = 0.; print.total_weight = 0.; print.total_cost = 0.; -//####################################################################################################################################################################### print.estimated_normal_print_time = m_normal_time_estimator.get_time_dhms(); -// print.estimated_default_print_time = m_default_time_estimator.get_time_dhms(); -//####################################################################################################################################################################### print.estimated_silent_print_time = m_silent_time_estimator_enabled ? m_silent_time_estimator.get_time_dhms() : "N/A"; for (const Extruder &extruder : m_writer.extruders()) { double used_filament = extruder.used_filament(); double extruded_volume = extruder.extruded_volume(); double filament_weight = extruded_volume * extruder.filament_density() * 0.001; double filament_cost = filament_weight * extruder.filament_cost() * 0.001; -//####################################################################################################################################################################### print.filament_stats.insert(std::pair(extruder.id(), (float)used_filament)); -// print.filament_stats.insert(std::pair(extruder.id(), used_filament)); -//####################################################################################################################################################################### _write_format(file, "; filament used = %.1lfmm (%.1lfcm3)\n", used_filament, extruded_volume * 0.001); if (filament_weight > 0.) { print.total_weight = print.total_weight + filament_weight; @@ -962,10 +881,7 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) print.total_extruded_volume = print.total_extruded_volume + extruded_volume; } _write_format(file, "; total filament cost = %.1lf\n", print.total_cost); -//####################################################################################################################################################################### _write_format(file, "; estimated printing time (normal mode) = %s\n", m_normal_time_estimator.get_time_dhms().c_str()); -// _write_format(file, "; estimated printing time (default mode) = %s\n", m_default_time_estimator.get_time_dhms().c_str()); -//####################################################################################################################################################################### if (m_silent_time_estimator_enabled) _write_format(file, "; estimated printing time (silent mode) = %s\n", m_silent_time_estimator.get_time_dhms().c_str()); @@ -1534,15 +1450,6 @@ void GCode::process_layer( // printf("G-code after filter:\n%s\n", out.c_str()); _write(file, gcode); - -//####################################################################################################################################################################### -// // after layer time estimation -// if (m_silent_time_estimator_enabled) -// { -// _write(file, m_default_time_estimator.get_elapsed_time_string().c_str()); -// _write(file, m_silent_time_estimator.get_elapsed_time_string().c_str()); -// } -//####################################################################################################################################################################### } void GCode::apply_print_config(const PrintConfig &print_config) @@ -2201,10 +2108,7 @@ void GCode::_write(FILE* file, const char *what) // writes string to file fwrite(gcode, 1, ::strlen(gcode), file); // updates time estimator and gcode lines vector -//####################################################################################################################################################################### m_normal_time_estimator.add_gcode_block(gcode); -// m_default_time_estimator.add_gcode_block(gcode); -//####################################################################################################################################################################### if (m_silent_time_estimator_enabled) m_silent_time_estimator.add_gcode_block(gcode); } diff --git a/xs/src/libslic3r/GCode.hpp b/xs/src/libslic3r/GCode.hpp index d994e750f..163ade82f 100644 --- a/xs/src/libslic3r/GCode.hpp +++ b/xs/src/libslic3r/GCode.hpp @@ -133,10 +133,7 @@ public: m_last_height(GCodeAnalyzer::Default_Height), m_brim_done(false), m_second_layer_things_done(false), -//############################################################################################################3 m_normal_time_estimator(GCodeTimeEstimator::Normal), -// m_default_time_estimator(GCodeTimeEstimator::Default), -//############################################################################################################3 m_silent_time_estimator(GCodeTimeEstimator::Silent), m_silent_time_estimator_enabled(false), m_last_obj_copy(nullptr, Point(std::numeric_limits::max(), std::numeric_limits::max())) @@ -296,10 +293,7 @@ protected: std::pair m_last_obj_copy; // Time estimators -//############################################################################################################3 GCodeTimeEstimator m_normal_time_estimator; -// GCodeTimeEstimator m_default_time_estimator; -//############################################################################################################3 GCodeTimeEstimator m_silent_time_estimator; bool m_silent_time_estimator_enabled; diff --git a/xs/src/libslic3r/GCodeTimeEstimator.cpp b/xs/src/libslic3r/GCodeTimeEstimator.cpp index 15a346399..6e500bd4b 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.cpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.cpp @@ -12,7 +12,6 @@ static const float MMMIN_TO_MMSEC = 1.0f / 60.0f; static const float MILLISEC_TO_SEC = 0.001f; static const float INCHES_TO_MM = 25.4f; -//####################################################################################################################################################################### static const float NORMAL_FEEDRATE = 1500.0f; // from Prusa Firmware (Marlin_main.cpp) static const float NORMAL_ACCELERATION = 1500.0f; // Prusa Firmware 1_75mm_MK2 static const float NORMAL_RETRACT_ACCELERATION = 1500.0f; // Prusa Firmware 1_75mm_MK2 @@ -22,16 +21,6 @@ static const float NORMAL_AXIS_MAX_JERK[] = { 10.0f, 10.0f, 0.4f, 2.5f }; // fro static const float NORMAL_MINIMUM_FEEDRATE = 0.0f; // from Prusa Firmware (Configuration_adv.h) static const float NORMAL_MINIMUM_TRAVEL_FEEDRATE = 0.0f; // from Prusa Firmware (Configuration_adv.h) static const float NORMAL_EXTRUDE_FACTOR_OVERRIDE_PERCENTAGE = 1.0f; // 100 percent -//static const float DEFAULT_FEEDRATE = 1500.0f; // from Prusa Firmware (Marlin_main.cpp) -//static const float DEFAULT_ACCELERATION = 1500.0f; // Prusa Firmware 1_75mm_MK2 -//static const float DEFAULT_RETRACT_ACCELERATION = 1500.0f; // Prusa Firmware 1_75mm_MK2 -//static const float DEFAULT_AXIS_MAX_FEEDRATE[] = { 500.0f, 500.0f, 12.0f, 120.0f }; // Prusa Firmware 1_75mm_MK2 -//static const float DEFAULT_AXIS_MAX_ACCELERATION[] = { 9000.0f, 9000.0f, 500.0f, 10000.0f }; // Prusa Firmware 1_75mm_MK2 -//static const float DEFAULT_AXIS_MAX_JERK[] = { 10.0f, 10.0f, 0.2f, 2.5f }; // from Prusa Firmware (Configuration.h) -//static const float DEFAULT_MINIMUM_FEEDRATE = 0.0f; // from Prusa Firmware (Configuration_adv.h) -//static const float DEFAULT_MINIMUM_TRAVEL_FEEDRATE = 0.0f; // from Prusa Firmware (Configuration_adv.h) -//static const float DEFAULT_EXTRUDE_FACTOR_OVERRIDE_PERCENTAGE = 1.0f; // 100 percent -//####################################################################################################################################################################### static const float SILENT_FEEDRATE = 1500.0f; // from Prusa Firmware (Marlin_main.cpp) static const float SILENT_ACCELERATION = 1250.0f; // Prusa Firmware 1_75mm_MK25-RAMBo13a-E3Dv6full @@ -45,13 +34,6 @@ static const float SILENT_EXTRUDE_FACTOR_OVERRIDE_PERCENTAGE = 1.0f; // 100 perc static const float PREVIOUS_FEEDRATE_THRESHOLD = 0.0001f; -//############################################################################################################3 -//static const std::string ELAPSED_TIME_TAG_DEFAULT = ";_ELAPSED_TIME_DEFAULT: "; -//static const std::string ELAPSED_TIME_TAG_SILENT = ";_ELAPSED_TIME_SILENT: "; -// -//static const std::string REMAINING_TIME_CMD = "M73"; -//############################################################################################################3 - #if ENABLE_MOVE_STATS static const std::string MOVE_TYPE_STR[Slic3r::GCodeTimeEstimator::Block::Num_Types] = { @@ -278,98 +260,6 @@ namespace Slic3r { #endif // ENABLE_MOVE_STATS } -//############################################################################################################3 -// std::string GCodeTimeEstimator::get_elapsed_time_string() -// { -// calculate_time(); -// switch (_mode) -// { -// default: -// case Default: -// return ELAPSED_TIME_TAG_DEFAULT + std::to_string(get_time()) + "\n"; -// case Silent: -// return ELAPSED_TIME_TAG_SILENT + std::to_string(get_time()) + "\n"; -// } -// } -// -// bool GCodeTimeEstimator::post_process_elapsed_times(const std::string& filename, float default_time, float silent_time) -// { -// boost::nowide::ifstream in(filename); -// if (!in.good()) -// throw std::runtime_error(std::string("Remaining times estimation failed.\nCannot open file for reading.\n")); -// -// std::string path_tmp = filename + ".times"; -// -// FILE* out = boost::nowide::fopen(path_tmp.c_str(), "wb"); -// if (out == nullptr) -// throw std::runtime_error(std::string("Remaining times estimation failed.\nCannot open file for writing.\n")); -// -// std::string line; -// while (std::getline(in, line)) -// { -// if (!in.good()) -// { -// fclose(out); -// throw std::runtime_error(std::string("Remaining times estimation failed.\nError while reading from file.\n")); -// } -// -// // this function expects elapsed time for default and silent mode to be into two consecutive lines inside the gcode -// if (boost::contains(line, ELAPSED_TIME_TAG_DEFAULT)) -// { -// std::string default_elapsed_time_str = line.substr(ELAPSED_TIME_TAG_DEFAULT.length()); -// float elapsed_time = (float)atof(default_elapsed_time_str.c_str()); -// float remaining_time = default_time - elapsed_time; -// line = REMAINING_TIME_CMD + " P" + std::to_string((int)(100.0f * elapsed_time / default_time)); -// line += " R" + _get_time_minutes(remaining_time); -// -// std::string next_line; -// std::getline(in, next_line); -// if (!in.good()) -// { -// fclose(out); -// throw std::runtime_error(std::string("Remaining times estimation failed.\nError while reading from file.\n")); -// } -// -// if (boost::contains(next_line, ELAPSED_TIME_TAG_SILENT)) -// { -// std::string silent_elapsed_time_str = next_line.substr(ELAPSED_TIME_TAG_SILENT.length()); -// float elapsed_time = (float)atof(silent_elapsed_time_str.c_str()); -// float remaining_time = silent_time - elapsed_time; -// line += " Q" + std::to_string((int)(100.0f * elapsed_time / silent_time)); -// line += " S" + _get_time_minutes(remaining_time); -// } -// else -// // found horphaned default elapsed time, skip the remaining time line output -// line = next_line; -// } -// else if (boost::contains(line, ELAPSED_TIME_TAG_SILENT)) -// // found horphaned silent elapsed time, skip the remaining time line output -// continue; -// -// line += "\n"; -// fwrite((const void*)line.c_str(), 1, line.length(), out); -// if (ferror(out)) -// { -// in.close(); -// fclose(out); -// boost::nowide::remove(path_tmp.c_str()); -// throw std::runtime_error(std::string("Remaining times estimation failed.\nIs the disk full?\n")); -// } -// } -// -// fclose(out); -// in.close(); -// -// boost::nowide::remove(filename.c_str()); -// if (boost::nowide::rename(path_tmp.c_str(), filename.c_str()) != 0) -// throw std::runtime_error(std::string("Failed to rename the output G-code file from ") + path_tmp + " to " + filename + '\n' + -// "Is " + path_tmp + " locked?" + '\n'); -// -// return true; -// } -//############################################################################################################3 - -//################################################################################################################# bool GCodeTimeEstimator::post_process_remaining_times(const std::string& filename, float interval) { boost::nowide::ifstream in(filename); @@ -481,7 +371,6 @@ namespace Slic3r { return true; } -//################################################################################################################# void GCodeTimeEstimator::set_axis_position(EAxis axis, float position) { @@ -500,7 +389,6 @@ namespace Slic3r { void GCodeTimeEstimator::set_axis_max_jerk(EAxis axis, float jerk) { -//############################################################################################################3 if ((axis == X) || (axis == Y)) { switch (_mode) @@ -518,7 +406,7 @@ namespace Slic3r { } } } -//############################################################################################################3 + _state.axis[axis].max_jerk = jerk; } @@ -642,17 +530,6 @@ namespace Slic3r { return _state.e_local_positioning_type; } -//################################################################################################################# - bool GCodeTimeEstimator::are_remaining_times_enabled() const - { - return _state.remaining_times_enabled; - } - - void GCodeTimeEstimator::set_remaining_times_enabled(bool enable) - { - _state.remaining_times_enabled = enable; - } - int GCodeTimeEstimator::get_g1_line_id() const { return _state.g1_line_id; @@ -667,7 +544,6 @@ namespace Slic3r { { _state.g1_line_id = 0; } -//################################################################################################################# void GCodeTimeEstimator::add_additional_time(float timeSec) { @@ -690,22 +566,13 @@ namespace Slic3r { set_dialect(gcfRepRap); set_global_positioning_type(Absolute); set_e_local_positioning_type(Absolute); -//################################################################################################################# - set_remaining_times_enabled(false); -//################################################################################################################# switch (_mode) { default: -//############################################################################################################3 case Normal: -// case Default: -//############################################################################################################3 { -//############################################################################################################3 _set_default_as_normal(); -// _set_default_as_default(); -//############################################################################################################3 break; } case Silent: @@ -752,10 +619,8 @@ namespace Slic3r { set_additional_time(0.0f); -//############################################################################################################3 reset_g1_line_id(); _g1_line_ids.clear(); -//############################################################################################################3 } void GCodeTimeEstimator::_reset_time() @@ -768,12 +633,8 @@ namespace Slic3r { _blocks.clear(); } -//############################################################################################################3 void GCodeTimeEstimator::_set_default_as_normal() -// void GCodeTimeEstimator::_set_default_as_default() -//############################################################################################################3 { -//############################################################################################################3 set_feedrate(NORMAL_FEEDRATE); set_acceleration(NORMAL_ACCELERATION); set_retract_acceleration(NORMAL_RETRACT_ACCELERATION); @@ -788,41 +649,6 @@ namespace Slic3r { set_axis_max_acceleration(axis, NORMAL_AXIS_MAX_ACCELERATION[a]); set_axis_max_jerk(axis, NORMAL_AXIS_MAX_JERK[a]); } - -// std::cout << "Normal Default" << std::endl; -// std::cout << "set_acceleration " << NORMAL_ACCELERATION << std::endl; -// std::cout << "set_retract_acceleration " << NORMAL_RETRACT_ACCELERATION << std::endl; -// std::cout << "set_minimum_feedrate " << NORMAL_MINIMUM_FEEDRATE << std::endl; -// std::cout << "set_minimum_travel_feedrate " << NORMAL_MINIMUM_TRAVEL_FEEDRATE << std::endl; -// std::cout << "set_axis_max_acceleration X " << NORMAL_AXIS_MAX_ACCELERATION[X] << std::endl; -// std::cout << "set_axis_max_acceleration Y " << NORMAL_AXIS_MAX_ACCELERATION[Y] << std::endl; -// std::cout << "set_axis_max_acceleration Z " << NORMAL_AXIS_MAX_ACCELERATION[Z] << std::endl; -// std::cout << "set_axis_max_acceleration E " << NORMAL_AXIS_MAX_ACCELERATION[E] << std::endl; -// std::cout << "set_axis_max_feedrate X " << NORMAL_AXIS_MAX_FEEDRATE[X] << std::endl; -// std::cout << "set_axis_max_feedrate Y " << NORMAL_AXIS_MAX_FEEDRATE[Y] << std::endl; -// std::cout << "set_axis_max_feedrate Z " << NORMAL_AXIS_MAX_FEEDRATE[Z] << std::endl; -// std::cout << "set_axis_max_feedrate E " << NORMAL_AXIS_MAX_FEEDRATE[E] << std::endl; -// std::cout << "set_axis_max_jerk X " << NORMAL_AXIS_MAX_JERK[X] << std::endl; -// std::cout << "set_axis_max_jerk Y " << NORMAL_AXIS_MAX_JERK[Y] << std::endl; -// std::cout << "set_axis_max_jerk Z " << NORMAL_AXIS_MAX_JERK[Z] << std::endl; -// std::cout << "set_axis_max_jerk E " << NORMAL_AXIS_MAX_JERK[E] << std::endl; - - -// set_feedrate(DEFAULT_FEEDRATE); -// set_acceleration(DEFAULT_ACCELERATION); -// set_retract_acceleration(DEFAULT_RETRACT_ACCELERATION); -// set_minimum_feedrate(DEFAULT_MINIMUM_FEEDRATE); -// set_minimum_travel_feedrate(DEFAULT_MINIMUM_TRAVEL_FEEDRATE); -// set_extrude_factor_override_percentage(DEFAULT_EXTRUDE_FACTOR_OVERRIDE_PERCENTAGE); -// -// for (unsigned char a = X; a < Num_Axis; ++a) -// { -// EAxis axis = (EAxis)a; -// set_axis_max_feedrate(axis, DEFAULT_AXIS_MAX_FEEDRATE[a]); -// set_axis_max_acceleration(axis, DEFAULT_AXIS_MAX_ACCELERATION[a]); -// set_axis_max_jerk(axis, DEFAULT_AXIS_MAX_JERK[a]); -// } -//############################################################################################################3 } void GCodeTimeEstimator::_set_default_as_silent() @@ -859,10 +685,7 @@ namespace Slic3r { _time += get_additional_time(); -//########################################################################################################################## for (Block& block : _blocks) -// for (const Block& block : _blocks) -//########################################################################################################################## { if (block.st_synchronized) continue; @@ -873,9 +696,7 @@ namespace Slic3r { block_time += block.cruise_time(); block_time += block.deceleration_time(); _time += block_time; -//########################################################################################################################## - block.elapsed_time = are_remaining_times_enabled() ? _time : -1.0f; -//########################################################################################################################## + block.elapsed_time = _time; MovesStatsMap::iterator it = _moves_stats.find(block.move_type); if (it == _moves_stats.end()) @@ -887,9 +708,7 @@ namespace Slic3r { _time += block.acceleration_time(); _time += block.cruise_time(); _time += block.deceleration_time(); -//########################################################################################################################## - block.elapsed_time = are_remaining_times_enabled() ? _time : -1.0f; -//########################################################################################################################## + block.elapsed_time = _time; #endif // ENABLE_MOVE_STATS } } @@ -1027,9 +846,7 @@ namespace Slic3r { void GCodeTimeEstimator::_processG1(const GCodeReader::GCodeLine& line) { -//############################################################################################################3 increment_g1_line_id(); -//############################################################################################################3 // updates axes positions from line EUnits units = get_units(); @@ -1218,9 +1035,7 @@ namespace Slic3r { // adds block to blocks list _blocks.emplace_back(block); -//############################################################################################################3 _g1_line_ids.insert(G1LineIdToBlockIdMap::value_type(get_g1_line_id(), (unsigned int)_blocks.size() - 1)); -//############################################################################################################3 } void GCodeTimeEstimator::_processG4(const GCodeReader::GCodeLine& line) diff --git a/xs/src/libslic3r/GCodeTimeEstimator.hpp b/xs/src/libslic3r/GCodeTimeEstimator.hpp index ef074f073..0307b658e 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.hpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.hpp @@ -19,10 +19,7 @@ namespace Slic3r { public: enum EMode : unsigned char { -//####################################################################################################################################################################### Normal, -// Default, -//####################################################################################################################################################################### Silent }; @@ -79,11 +76,8 @@ namespace Slic3r { float additional_time; // s float minimum_feedrate; // mm/s float minimum_travel_feedrate; // mm/s - float extrude_factor_override_percentage; -//################################################################################################################# - bool remaining_times_enabled; + float extrude_factor_override_percentage; unsigned int g1_line_id; -//################################################################################################################# }; public: @@ -146,9 +140,7 @@ namespace Slic3r { FeedrateProfile feedrate; Trapezoid trapezoid; -//################################################################################################################# float elapsed_time; -//################################################################################################################# bool st_synchronized; @@ -244,25 +236,12 @@ namespace Slic3r { // Calculates the time estimate from the gcode contained in given list of gcode lines void calculate_time_from_lines(const std::vector& gcode_lines); -//############################################################################################################3 -// // Calculates the time estimate from the gcode lines added using add_gcode_line() or add_gcode_block() -// // and returns it in a formatted string -// std::string get_elapsed_time_string(); -//############################################################################################################3 - -//############################################################################################################3 -// // Converts elapsed time lines, contained in the gcode saved with the given filename, into remaining time commands -// static bool post_process_elapsed_times(const std::string& filename, float default_time, float silent_time); -//############################################################################################################3 - -//################################################################################################################# // Process the gcode contained in the file with the given filename, // placing in it new lines (M73) containing the remaining time, at the given interval in seconds // and saving the result back in the same file // This time estimator should have been already used to calculate the time estimate for the gcode // contained in the given file before to call this method bool post_process_remaining_times(const std::string& filename, float interval_sec); -//################################################################################################################# // Set current position on the given axis with the given value void set_axis_position(EAxis axis, float position); @@ -308,14 +287,9 @@ namespace Slic3r { void set_e_local_positioning_type(EPositioningType type); EPositioningType get_e_local_positioning_type() const; -//################################################################################################################# - bool are_remaining_times_enabled() const; - void set_remaining_times_enabled(bool enable); - int get_g1_line_id() const; void increment_g1_line_id(); void reset_g1_line_id(); -//################################################################################################################# void add_additional_time(float timeSec); void set_additional_time(float timeSec); @@ -340,10 +314,7 @@ namespace Slic3r { void _reset_time(); void _reset_blocks(); -//############################################################################################################3 void _set_default_as_normal(); -// void _set_default_as_default(); -//############################################################################################################3 void _set_default_as_silent(); void _set_blocks_st_synchronize(bool state); diff --git a/xs/src/libslic3r/Print.hpp b/xs/src/libslic3r/Print.hpp index 9fd59d690..eec5c2478 100644 --- a/xs/src/libslic3r/Print.hpp +++ b/xs/src/libslic3r/Print.hpp @@ -235,10 +235,7 @@ public: PrintRegionPtrs regions; PlaceholderParser placeholder_parser; // TODO: status_cb -//####################################################################################################################################################################### std::string estimated_normal_print_time; -// std::string estimated_default_print_time; -//####################################################################################################################################################################### std::string estimated_silent_print_time; double total_used_filament, total_extruded_volume, total_cost, total_weight; std::map filament_stats; diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 49568e0ab..387a5b241 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -936,10 +936,7 @@ PrintConfigDef::PrintConfigDef() def->sidetext = L("mm/s²"); def->min = 0; def->width = machine_limits_opt_width; -//################################################################################################################################## def->default_value = new ConfigOptionFloats{ 1500., 1250. }; -// def->default_value = new ConfigOptionFloats(1500., 1250.); -//################################################################################################################################## // M204 T... [mm/sec^2] def = this->add("machine_max_acceleration_retracting", coFloats); @@ -949,10 +946,7 @@ PrintConfigDef::PrintConfigDef() def->sidetext = L("mm/s²"); def->min = 0; def->width = machine_limits_opt_width; -//################################################################################################################################## def->default_value = new ConfigOptionFloats{ 1500., 1250. }; -// def->default_value = new ConfigOptionFloats(1500., 1250.); -//################################################################################################################################## def = this->add("max_fan_speed", coInts); def->label = L("Max"); diff --git a/xs/src/libslic3r/PrintConfig.hpp b/xs/src/libslic3r/PrintConfig.hpp index b28618624..aad27222e 100644 --- a/xs/src/libslic3r/PrintConfig.hpp +++ b/xs/src/libslic3r/PrintConfig.hpp @@ -666,6 +666,7 @@ public: ConfigOptionString output_filename_format; ConfigOptionFloat perimeter_acceleration; ConfigOptionStrings post_process; + ConfigOptionString printer_model; ConfigOptionString printer_notes; ConfigOptionFloat resolution; ConfigOptionFloats retract_before_travel; @@ -736,6 +737,7 @@ protected: OPT_PTR(output_filename_format); OPT_PTR(perimeter_acceleration); OPT_PTR(post_process); + OPT_PTR(printer_model); OPT_PTR(printer_notes); OPT_PTR(resolution); OPT_PTR(retract_before_travel); From 9966f8d88d300322be6cd55671803ed23646f373 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Fri, 13 Jul 2018 11:53:50 +0200 Subject: [PATCH 140/198] Respect perimeter-infill order for purging only objects --- xs/src/libslic3r/GCode/ToolOrdering.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/xs/src/libslic3r/GCode/ToolOrdering.cpp b/xs/src/libslic3r/GCode/ToolOrdering.cpp index 46ba0731b..f1dbbfc1e 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.cpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.cpp @@ -573,6 +573,7 @@ void WipingExtrusions::ensure_perimeters_infills_order(const Print& print) // not been added to LayerTools // Either way, we will now force-override it with something suitable: if (print.config.infill_first + || object->config.wipe_into_objects // in this case the perimeter is overridden, so we can override by the last one safely || lt.is_extruder_order(region.config.perimeter_extruder - 1, last_nonsoluble_extruder // !infill_first, but perimeter is already printed when last extruder prints || std::find(lt.extruders.begin(), lt.extruders.end(), region.config.infill_extruder - 1) == lt.extruders.end()) // we have to force override - this could violate infill_first (FIXME) ) From 3dfd6e64d90c74e8ee3b63087b0503019f819280 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Fri, 13 Jul 2018 13:16:38 +0200 Subject: [PATCH 141/198] Enabled inflill/object wiping for the first layer --- xs/src/libslic3r/Print.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index f8caa4786..79bca7e89 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -1136,8 +1136,8 @@ void Print::_make_wipe_tower() if ((first_layer && extruder_id == m_tool_ordering.all_extruders().back()) || extruder_id != current_extruder_id) { float volume_to_wipe = wipe_volumes[current_extruder_id][extruder_id]; // total volume to wipe after this toolchange - if (!first_layer) // unless we're on the first layer, try to assign some infills/objects for the wiping: - volume_to_wipe = layer_tools.wiping_extrusions().mark_wiping_extrusions(*this, extruder_id, wipe_volumes[current_extruder_id][extruder_id]); + // try to assign some infills/objects for the wiping: + volume_to_wipe = layer_tools.wiping_extrusions().mark_wiping_extrusions(*this, extruder_id, wipe_volumes[current_extruder_id][extruder_id]); wipe_tower.plan_toolchange(layer_tools.print_z, layer_tools.wipe_tower_layer_height, current_extruder_id, extruder_id, first_layer && extruder_id == m_tool_ordering.all_extruders().back(), volume_to_wipe); current_extruder_id = extruder_id; From d99b484ac6e67f00666530a1d7b78e7506e2ce6c Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Fri, 13 Jul 2018 14:41:49 +0200 Subject: [PATCH 142/198] Fixed update of sliders' texts into object settings dialog --- lib/Slic3r/GUI/OptionsGroup/Field.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/GUI/OptionsGroup/Field.pm b/lib/Slic3r/GUI/OptionsGroup/Field.pm index 4ef2ce2ca..1a53daeb5 100644 --- a/lib/Slic3r/GUI/OptionsGroup/Field.pm +++ b/lib/Slic3r/GUI/OptionsGroup/Field.pm @@ -552,8 +552,9 @@ sub BUILD { $sizer->Add($textctrl, 0, wxALIGN_CENTER_VERTICAL, 0); EVT_SLIDER($self->parent, $slider, sub { - if (! $self->disable_change_event) { - $self->textctrl->SetLabel($self->get_value); + if (! $self->disable_change_event) { + # wxTextCtrl::SetLabel() does not work on Linux, use wxTextCtrl::SetValue() instead + $self->textctrl->SetValue($self->get_value); $self->_on_change($self->option->opt_id); } }); From 6bcd735655f3d42e529a9e3340e78d90aa85faea Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Mon, 16 Jul 2018 16:07:29 +0200 Subject: [PATCH 143/198] Change to firstfit selection because DJD needs further testing. --- xs/CMakeLists.txt | 21 +- xs/src/libnest2d/CMakeLists.txt | 134 +- xs/src/libnest2d/cmake_modules/FindGMP.cmake | 35 + xs/src/libnest2d/{tests => examples}/main.cpp | 60 +- xs/src/libnest2d/libnest2d.h | 8 +- xs/src/libnest2d/libnest2d/boost_alg.hpp | 35 +- .../clipper_backend/clipper_backend.cpp | 134 +- .../clipper_backend/clipper_backend.hpp | 402 +++-- xs/src/libnest2d/libnest2d/common.hpp | 15 +- xs/src/libnest2d/libnest2d/geometries_io.hpp | 18 - xs/src/libnest2d/libnest2d/geometries_nfp.hpp | 223 --- .../libnest2d/libnest2d/geometry_traits.hpp | 56 +- .../libnest2d/geometry_traits_nfp.hpp | 258 +++ xs/src/libnest2d/libnest2d/libnest2d.hpp | 61 +- .../libnest2d/libnest2d/placers/nfpplacer.hpp | 172 +- .../libnest2d/selections/djd_heuristic.hpp | 113 +- .../libnest2d/libnest2d/selections/filler.hpp | 11 +- .../libnest2d/selections/firstfit.hpp | 18 +- xs/src/libnest2d/tests/CMakeLists.txt | 16 +- xs/src/libnest2d/tests/printer_parts.cpp | 650 +++++++ xs/src/libnest2d/tests/printer_parts.h | 28 + xs/src/libnest2d/tests/test.cpp | 102 +- xs/src/libnest2d/{tests => tools}/benchmark.h | 0 xs/src/libnest2d/tools/libnfpglue.cpp | 182 ++ xs/src/libnest2d/tools/libnfpglue.hpp | 44 + xs/src/libnest2d/tools/libnfporb/LICENSE | 674 +++++++ xs/src/libnest2d/tools/libnfporb/ORIGIN | 2 + xs/src/libnest2d/tools/libnfporb/README.md | 89 + .../libnest2d/tools/libnfporb/libnfporb.hpp | 1547 +++++++++++++++++ .../libnest2d/{tests => tools}/svgtools.hpp | 18 +- xs/src/libslic3r/Model.cpp | 17 +- 31 files changed, 4317 insertions(+), 826 deletions(-) create mode 100644 xs/src/libnest2d/cmake_modules/FindGMP.cmake rename xs/src/libnest2d/{tests => examples}/main.cpp (92%) delete mode 100644 xs/src/libnest2d/libnest2d/geometries_io.hpp delete mode 100644 xs/src/libnest2d/libnest2d/geometries_nfp.hpp create mode 100644 xs/src/libnest2d/libnest2d/geometry_traits_nfp.hpp rename xs/src/libnest2d/{tests => tools}/benchmark.h (100%) create mode 100644 xs/src/libnest2d/tools/libnfpglue.cpp create mode 100644 xs/src/libnest2d/tools/libnfpglue.hpp create mode 100644 xs/src/libnest2d/tools/libnfporb/LICENSE create mode 100644 xs/src/libnest2d/tools/libnfporb/ORIGIN create mode 100644 xs/src/libnest2d/tools/libnfporb/README.md create mode 100644 xs/src/libnest2d/tools/libnfporb/libnfporb.hpp rename xs/src/libnest2d/{tests => tools}/svgtools.hpp (89%) diff --git a/xs/CMakeLists.txt b/xs/CMakeLists.txt index 5544c5c2d..976943d64 100644 --- a/xs/CMakeLists.txt +++ b/xs/CMakeLists.txt @@ -724,29 +724,12 @@ add_custom_target(pot # ############################################################################## set(LIBNEST2D_UNITTESTS ON CACHE BOOL "Force generating unittests for libnest2d") -set(LIBNEST2D_BUILD_SHARED_LIB OFF CACHE BOOL "Disable build of shared lib.") - -if(LIBNEST2D_UNITTESTS) - # If we want the libnest2d unit tests we need to build and executable with - # all the libslic3r dependencies. This is needed because the clipper library - # in the slic3r project is hacked so that it depends on the slic3r sources. - # Unfortunately, this implies that the test executable is also dependent on - # the libslic3r target. - -# add_library(libslic3r_standalone STATIC ${LIBDIR}/libslic3r/utils.cpp) -# set(LIBNEST2D_TEST_LIBRARIES -# libslic3r libslic3r_standalone nowide libslic3r_gui admesh miniz -# ${Boost_LIBRARIES} clipper ${EXPAT_LIBRARIES} ${GLEW_LIBRARIES} -# polypartition poly2tri ${TBB_LIBRARIES} ${wxWidgets_LIBRARIES} -# ${CURL_LIBRARIES} -# ) -endif() add_subdirectory(${LIBDIR}/libnest2d) target_include_directories(libslic3r PUBLIC BEFORE ${LIBNEST2D_INCLUDES}) -# Add the binpack2d main sources and link them to libslic3r -target_link_libraries(libslic3r libnest2d_static) +message(STATUS "Libnest2D Libraries: ${LIBNEST2D_LIBRARIES}") +target_link_libraries(libslic3r ${LIBNEST2D_LIBRARIES}) # ############################################################################## # Installation diff --git a/xs/src/libnest2d/CMakeLists.txt b/xs/src/libnest2d/CMakeLists.txt index 7977066c1..e16733cdd 100644 --- a/xs/src/libnest2d/CMakeLists.txt +++ b/xs/src/libnest2d/CMakeLists.txt @@ -5,8 +5,7 @@ project(Libnest2D) enable_testing() if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) - # Update if necessary -# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -pedantic") + # Update if necessary set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long ") endif() @@ -20,39 +19,37 @@ option(LIBNEST2D_UNITTESTS "If enabled, googletest framework will be downloaded and the provided unit tests will be included in the build." OFF) option(LIBNEST2D_BUILD_EXAMPLES "If enabled, examples will be built." OFF) -option(LIBNEST2D_BUILD_SHARED_LIB "Build shared library." ON) -#set(LIBNEST2D_GEOMETRIES_TARGET "" CACHE STRING -# "Build libnest2d with geometry classes implemented by the chosen target.") - -#set(libnest2D_TEST_LIBRARIES "" CACHE STRING -# "Libraries needed to compile the test executable for libnest2d.") +set(LIBNEST2D_GEOMETRIES_BACKEND "clipper" CACHE STRING + "Build libnest2d with geometry classes implemented by the chosen backend.") +set(LIBNEST2D_OPTIMIZER_BACKEND "nlopt" CACHE STRING + "Build libnest2d with optimization features implemented by the chosen backend.") set(LIBNEST2D_SRCFILES - libnest2d/libnest2d.hpp # Templates only - libnest2d.h # Exports ready made types using template arguments - libnest2d/geometry_traits.hpp - libnest2d/geometries_io.hpp - libnest2d/common.hpp - libnest2d/optimizer.hpp - libnest2d/placers/placer_boilerplate.hpp - libnest2d/placers/bottomleftplacer.hpp - libnest2d/placers/nfpplacer.hpp - libnest2d/geometries_nfp.hpp - libnest2d/selections/selection_boilerplate.hpp - libnest2d/selections/filler.hpp - libnest2d/selections/firstfit.hpp - libnest2d/selections/djd_heuristic.hpp - libnest2d/optimizers/simplex.hpp - libnest2d/optimizers/subplex.hpp - libnest2d/optimizers/genetic.hpp - libnest2d/optimizers/nlopt_boilerplate.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/libnest2d.hpp # Templates only + ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d.h # Exports ready made types using template arguments + ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/geometry_traits.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/common.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/optimizer.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/placers/placer_boilerplate.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/placers/bottomleftplacer.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/placers/nfpplacer.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/geometry_traits_nfp.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/selections/selection_boilerplate.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/selections/filler.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/selections/firstfit.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/selections/djd_heuristic.hpp ) -if((NOT LIBNEST2D_GEOMETRIES_TARGET) OR (LIBNEST2D_GEOMETRIES_TARGET STREQUAL "")) - message(STATUS "libnest2D backend is default") +set(LIBNEST2D_LIBRARIES "") +set(LIBNEST2D_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}) + +if(LIBNEST2D_GEOMETRIES_BACKEND STREQUAL "clipper") + + # Clipper backend is not enough on its own, it still needs some functions + # from Boost geometry if(NOT Boost_INCLUDE_DIRS_FOUND) find_package(Boost 1.58 REQUIRED) # TODO automatic download of boost geometry headers @@ -60,56 +57,63 @@ if((NOT LIBNEST2D_GEOMETRIES_TARGET) OR (LIBNEST2D_GEOMETRIES_TARGET STREQUAL "" add_subdirectory(libnest2d/clipper_backend) - set(LIBNEST2D_GEOMETRIES_TARGET ${CLIPPER_LIBRARIES}) - include_directories(BEFORE ${CLIPPER_INCLUDE_DIRS}) include_directories(${Boost_INCLUDE_DIRS}) - list(APPEND LIBNEST2D_SRCFILES libnest2d/clipper_backend/clipper_backend.cpp - libnest2d/clipper_backend/clipper_backend.hpp - libnest2d/boost_alg.hpp) - -else() - message(STATUS "Libnest2D backend is: ${LIBNEST2D_GEOMETRIES_TARGET}") + list(APPEND LIBNEST2D_SRCFILES ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/clipper_backend/clipper_backend.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/clipper_backend/clipper_backend.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/boost_alg.hpp) + list(APPEND LIBNEST2D_LIBRARIES ${CLIPPER_LIBRARIES}) + list(APPEND LIBNEST2D_HEADERS ${CLIPPER_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS_FOUND}) endif() -message(STATUS "clipper lib is: ${LIBNEST2D_GEOMETRIES_TARGET}") +if(LIBNEST2D_OPTIMIZER_BACKEND STREQUAL "nlopt") + find_package(NLopt 1.4) + if(NOT NLopt_FOUND) + message(STATUS "NLopt not found so downloading " + "and automatic build is performed...") + include(DownloadNLopt) + endif() + find_package(Threads REQUIRED) -find_package(NLopt 1.4) -if(NOT NLopt_FOUND) - message(STATUS "NLopt not found so downloading and automatic build is performed...") - include(DownloadNLopt) -endif() -find_package(Threads REQUIRED) - -add_library(libnest2d_static STATIC ${LIBNEST2D_SRCFILES} ) -target_link_libraries(libnest2d_static PRIVATE ${LIBNEST2D_GEOMETRIES_TARGET} ${NLopt_LIBS}) -target_include_directories(libnest2d_static PUBLIC ${CMAKE_SOURCE_DIR} ${NLopt_INCLUDE_DIR}) -set_target_properties(libnest2d_static PROPERTIES PREFIX "") - -if(LIBNEST2D_BUILD_SHARED_LIB) - add_library(libnest2d SHARED ${LIBNEST2D_SRCFILES} ) - target_link_libraries(libnest2d PRIVATE ${LIBNEST2D_GEOMETRIES_TARGET} ${NLopt_LIBS}) - target_include_directories(libnest2d PUBLIC ${CMAKE_SOURCE_DIR} ${NLopt_INCLUDE_DIR}) - set_target_properties(libnest2d PROPERTIES PREFIX "") + list(APPEND LIBNEST2D_SRCFILES ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/optimizers/simplex.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/optimizers/subplex.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/optimizers/genetic.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/optimizers/nlopt_boilerplate.hpp) + list(APPEND LIBNEST2D_LIBRARIES ${NLopt_LIBS} Threads::Threads) + list(APPEND LIBNEST2D_HEADERS ${NLopt_INCLUDE_DIR}) endif() -set(LIBNEST2D_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}) - -get_directory_property(hasParent PARENT_DIRECTORY) -if(hasParent) - set(LIBNEST2D_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE) -endif() +# Currently we are outsourcing the non-convex NFP implementation from +# libnfporb and it needs libgmp to work +#find_package(GMP) +#if(GMP_FOUND) +# list(APPEND LIBNEST2D_LIBRARIES ${GMP_LIBRARIES}) +# list(APPEND LIBNEST2D_HEADERS ${GMP_INCLUDE_DIR}) +# add_definitions(-DLIBNFP_USE_RATIONAL) +#endif() if(LIBNEST2D_UNITTESTS) add_subdirectory(tests) endif() if(LIBNEST2D_BUILD_EXAMPLES) - add_executable(example tests/main.cpp - tests/svgtools.hpp + add_executable(example examples/main.cpp +# tools/libnfpglue.hpp +# tools/libnfpglue.cpp + tools/svgtools.hpp tests/printer_parts.cpp - tests/printer_parts.h) - target_link_libraries(example libnest2d_static Threads::Threads) - target_include_directories(example PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) + tests/printer_parts.h + ${LIBNEST2D_SRCFILES}) + + + target_link_libraries(example ${LIBNEST2D_LIBRARIES}) + target_include_directories(example PUBLIC ${LIBNEST2D_HEADERS}) +endif() + +get_directory_property(hasParent PARENT_DIRECTORY) +if(hasParent) + set(LIBNEST2D_INCLUDES ${LIBNEST2D_HEADERS} PARENT_SCOPE) + set(LIBNEST2D_LIBRARIES ${LIBNEST2D_LIBRARIES} PARENT_SCOPE) endif() diff --git a/xs/src/libnest2d/cmake_modules/FindGMP.cmake b/xs/src/libnest2d/cmake_modules/FindGMP.cmake new file mode 100644 index 000000000..db173bc90 --- /dev/null +++ b/xs/src/libnest2d/cmake_modules/FindGMP.cmake @@ -0,0 +1,35 @@ +# Try to find the GMP libraries: +# GMP_FOUND - System has GMP lib +# GMP_INCLUDE_DIR - The GMP include directory +# GMP_LIBRARIES - Libraries needed to use GMP + +if (GMP_INCLUDE_DIR AND GMP_LIBRARIES) + # Force search at every time, in case configuration changes + unset(GMP_INCLUDE_DIR CACHE) + unset(GMP_LIBRARIES CACHE) +endif (GMP_INCLUDE_DIR AND GMP_LIBRARIES) + +find_path(GMP_INCLUDE_DIR NAMES gmp.h) + +if(WIN32) + find_library(GMP_LIBRARIES NAMES libgmp.a gmp gmp.lib mpir mpir.lib) +else(WIN32) + if(STBIN) + message(STATUS "STBIN: ${STBIN}") + find_library(GMP_LIBRARIES NAMES libgmp.a gmp) + else(STBIN) + find_library(GMP_LIBRARIES NAMES libgmp.so gmp) + endif(STBIN) +endif(WIN32) + +if(GMP_INCLUDE_DIR AND GMP_LIBRARIES) + set(GMP_FOUND TRUE) +endif(GMP_INCLUDE_DIR AND GMP_LIBRARIES) + +if(GMP_FOUND) + message(STATUS "Configured GMP: ${GMP_LIBRARIES}") +else(GMP_FOUND) + message(STATUS "Could NOT find GMP") +endif(GMP_FOUND) + +mark_as_advanced(GMP_INCLUDE_DIR GMP_LIBRARIES) \ No newline at end of file diff --git a/xs/src/libnest2d/tests/main.cpp b/xs/src/libnest2d/examples/main.cpp similarity index 92% rename from xs/src/libnest2d/tests/main.cpp rename to xs/src/libnest2d/examples/main.cpp index 88b958c07..3d3f30b76 100644 --- a/xs/src/libnest2d/tests/main.cpp +++ b/xs/src/libnest2d/examples/main.cpp @@ -5,13 +5,11 @@ //#define DEBUG_EXPORT_NFP #include -#include -#include "printer_parts.h" -#include "benchmark.h" -#include "svgtools.hpp" -//#include -//#include +#include "tests/printer_parts.h" +#include "tools/benchmark.h" +#include "tools/svgtools.hpp" +//#include "tools/libnfpglue.hpp" using namespace libnest2d; using ItemGroup = std::vector>; @@ -37,10 +35,22 @@ std::vector& stegoParts() { return _parts(ret, STEGOSAUR_POLYGONS); } +std::vector& prusaExParts() { + static std::vector ret; + if(ret.empty()) { + ret.reserve(PRINTER_PART_POLYGONS_EX.size()); + for(auto& p : PRINTER_PART_POLYGONS_EX) { + ret.emplace_back(p.Contour, p.Holes); + } + } + return ret; +} + void arrangeRectangles() { using namespace libnest2d; const int SCALE = 1000000; +// const int SCALE = 1; std::vector rects = { {80*SCALE, 80*SCALE}, {60*SCALE, 90*SCALE}, @@ -506,38 +516,59 @@ void arrangeRectangles() { }, }; + std::vector proba = { + { + { {0, 0}, {20, 20}, {40, 0}, {0, 0} } + }, + { + { {0, 100}, {50, 60}, {100, 100}, {50, 0}, {0, 100} } + + }, + }; + std::vector input; // input.insert(input.end(), prusaParts().begin(), prusaParts().end()); +// input.insert(input.end(), prusaExParts().begin(), prusaExParts().end()); // input.insert(input.end(), stegoParts().begin(), stegoParts().end()); // input.insert(input.end(), rects.begin(), rects.end()); +// input.insert(input.end(), proba.begin(), proba.end()); input.insert(input.end(), crasher.begin(), crasher.end()); Box bin(250*SCALE, 210*SCALE); Coord min_obj_distance = 6*SCALE; - using Packer = Arranger; + using Placer = NfpPlacer; + using Packer = Arranger; Packer arrange(bin, min_obj_distance); Packer::PlacementConfig pconf; - pconf.alignment = NfpPlacer::Config::Alignment::CENTER; + pconf.alignment = Placer::Config::Alignment::CENTER; pconf.rotations = {0.0/*, Pi/2.0, Pi, 3*Pi/2*/}; - pconf.object_function = [&bin](NfpPlacer::Pile pile, double area, + pconf.object_function = [&bin](Placer::Pile pile, double area, double norm, double penality) { auto bb = ShapeLike::boundingBox(pile); - double score = (2*bb.width() + 2*bb.height()) / norm; + double diameter = PointLike::distance(bb.minCorner(), + bb.maxCorner()); + + // We will optimize to the diameter of the circle around the bounding + // box and use the norming factor to get rid of the physical dimensions + double score = diameter / norm; + + // If it does not fit into the print bed we will beat it + // with a large penality if(!NfpPlacer::wouldFit(bb, bin)) score = 2*penality - score; return score; }; Packer::SelectionConfig sconf; - sconf.allow_parallel = true; - sconf.force_parallel = true; - sconf.try_reverse_order = true; +// sconf.allow_parallel = false; +// sconf.force_parallel = false; +// sconf.try_reverse_order = true; arrange.configure(pconf, sconf); @@ -610,10 +641,9 @@ void arrangeRectangles() { svgw.save("out"); } - - int main(void /*int argc, char **argv*/) { arrangeRectangles(); // findDegenerateCase(); + return EXIT_SUCCESS; } diff --git a/xs/src/libnest2d/libnest2d.h b/xs/src/libnest2d/libnest2d.h index dff7009ee..1e0a98f6a 100644 --- a/xs/src/libnest2d/libnest2d.h +++ b/xs/src/libnest2d/libnest2d.h @@ -5,6 +5,10 @@ // for now we set it statically to clipper backend #include +// We include the stock optimizers for local and global optimization +#include // Local subplex for NfpPlacer +#include // Genetic for min. bounding box + #include #include #include @@ -31,7 +35,9 @@ using DJDHeuristic = strategies::_DJDHeuristic; using NfpPlacer = strategies::_NofitPolyPlacer; using BottomLeftPlacer = strategies::_BottomLeftPlacer; -using NofitPolyPlacer = strategies::_NofitPolyPlacer; + +//template +//using NofitPolyPlacer = strategies::_NofitPolyPlacer; } diff --git a/xs/src/libnest2d/libnest2d/boost_alg.hpp b/xs/src/libnest2d/libnest2d/boost_alg.hpp index 8cd126f68..a50b397d3 100644 --- a/xs/src/libnest2d/libnest2d/boost_alg.hpp +++ b/xs/src/libnest2d/libnest2d/boost_alg.hpp @@ -139,7 +139,7 @@ template<> struct indexed_access { }; /* ************************************************************************** */ -/* Segement concept adaptaion *********************************************** */ +/* Segment concept adaptaion ************************************************ */ /* ************************************************************************** */ template<> struct tag { @@ -461,21 +461,19 @@ inline bp2d::Shapes Nfp::merge(const bp2d::Shapes& shapes, } #endif -#ifndef DISABLE_BOOST_MINKOWSKI_ADD -template<> -inline PolygonImpl& Nfp::minkowskiAdd(PolygonImpl& sh, - const PolygonImpl& /*other*/) -{ - return sh; -} -#endif +//#ifndef DISABLE_BOOST_MINKOWSKI_ADD +//template<> +//inline PolygonImpl& Nfp::minkowskiAdd(PolygonImpl& sh, +// const PolygonImpl& /*other*/) +//{ +// return sh; +//} +//#endif #ifndef DISABLE_BOOST_SERIALIZE -template<> -inline std::string ShapeLike::serialize( +template<> inline std::string ShapeLike::serialize( const PolygonImpl& sh, double scale) { - std::stringstream ss; std::string style = "fill: none; stroke: black; stroke-width: 1px;"; @@ -484,14 +482,27 @@ inline std::string ShapeLike::serialize( using Polygonf = model::polygon; Polygonf::ring_type ring; + Polygonf::inner_container_type holes; ring.reserve(ShapeLike::contourVertexCount(sh)); for(auto it = ShapeLike::cbegin(sh); it != ShapeLike::cend(sh); it++) { auto& v = *it; ring.emplace_back(getX(v)*scale, getY(v)*scale); }; + + auto H = ShapeLike::holes(sh); + for(PathImpl& h : H ) { + Polygonf::ring_type hf; + for(auto it = h.begin(); it != h.end(); it++) { + auto& v = *it; + hf.emplace_back(getX(v)*scale, getY(v)*scale); + }; + holes.push_back(hf); + } + Polygonf poly; poly.outer() = ring; + poly.inners() = holes; auto svg_data = boost::geometry::svg(poly, style); ss << svg_data << std::endl; diff --git a/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.cpp b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.cpp index 746edf1f4..830d235a3 100644 --- a/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.cpp +++ b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.cpp @@ -1,112 +1,58 @@ -#include "clipper_backend.hpp" -#include +//#include "clipper_backend.hpp" +//#include -namespace libnest2d { +//namespace libnest2d { -namespace { +//namespace { -class SpinLock { - std::atomic_flag& lck_; -public: +//class SpinLock { +// std::atomic_flag& lck_; +//public: - inline SpinLock(std::atomic_flag& flg): lck_(flg) {} +// inline SpinLock(std::atomic_flag& flg): lck_(flg) {} - inline void lock() { - while(lck_.test_and_set(std::memory_order_acquire)) {} - } +// inline void lock() { +// while(lck_.test_and_set(std::memory_order_acquire)) {} +// } - inline void unlock() { lck_.clear(std::memory_order_release); } -}; +// inline void unlock() { lck_.clear(std::memory_order_release); } +//}; -class HoleCache { - friend struct libnest2d::ShapeLike; +//class HoleCache { +// friend struct libnest2d::ShapeLike; - std::unordered_map< const PolygonImpl*, ClipperLib::Paths> map; +// std::unordered_map< const PolygonImpl*, ClipperLib::Paths> map; - ClipperLib::Paths& _getHoles(const PolygonImpl* p) { - static std::atomic_flag flg = ATOMIC_FLAG_INIT; - SpinLock lock(flg); +// ClipperLib::Paths& _getHoles(const PolygonImpl* p) { +// static std::atomic_flag flg = ATOMIC_FLAG_INIT; +// SpinLock lock(flg); - lock.lock(); - ClipperLib::Paths& paths = map[p]; - lock.unlock(); +// lock.lock(); +// ClipperLib::Paths& paths = map[p]; +// lock.unlock(); - if(paths.size() != p->Childs.size()) { - paths.reserve(p->Childs.size()); +// if(paths.size() != p->Childs.size()) { +// paths.reserve(p->Childs.size()); - for(auto np : p->Childs) { - paths.emplace_back(np->Contour); - } - } +// for(auto np : p->Childs) { +// paths.emplace_back(np->Contour); +// } +// } - return paths; - } +// return paths; +// } - ClipperLib::Paths& getHoles(PolygonImpl& p) { - return _getHoles(&p); - } +// ClipperLib::Paths& getHoles(PolygonImpl& p) { +// return _getHoles(&p); +// } - const ClipperLib::Paths& getHoles(const PolygonImpl& p) { - return _getHoles(&p); - } -}; -} +// const ClipperLib::Paths& getHoles(const PolygonImpl& p) { +// return _getHoles(&p); +// } +//}; +//} -HoleCache holeCache; +//HoleCache holeCache; -template<> -std::string ShapeLike::toString(const PolygonImpl& sh) -{ - std::stringstream ss; - - for(auto p : sh.Contour) { - ss << p.X << " " << p.Y << "\n"; - } - - return ss.str(); -} - -template<> PolygonImpl ShapeLike::create( const PathImpl& path ) -{ - PolygonImpl p; - p.Contour = path; - - // Expecting that the coordinate system Y axis is positive in upwards - // direction - if(ClipperLib::Orientation(p.Contour)) { - // Not clockwise then reverse the b*tch - ClipperLib::ReversePath(p.Contour); - } - - return p; -} - -template<> PolygonImpl ShapeLike::create( PathImpl&& path ) -{ - PolygonImpl p; - p.Contour.swap(path); - - // Expecting that the coordinate system Y axis is positive in upwards - // direction - if(ClipperLib::Orientation(p.Contour)) { - // Not clockwise then reverse the b*tch - ClipperLib::ReversePath(p.Contour); - } - - return p; -} - -template<> -const THolesContainer& ShapeLike::holes( - const PolygonImpl& sh) -{ - return holeCache.getHoles(sh); -} - -template<> -THolesContainer& ShapeLike::holes(PolygonImpl& sh) { - return holeCache.getHoles(sh); -} - -} +//} diff --git a/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp index 8fb458a15..8cc27573a 100644 --- a/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp +++ b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp @@ -4,18 +4,36 @@ #include #include #include - +#include #include #include "../geometry_traits.hpp" -#include "../geometries_nfp.hpp" +#include "../geometry_traits_nfp.hpp" #include namespace ClipperLib { using PointImpl = IntPoint; -using PolygonImpl = PolyNode; using PathImpl = Path; +using HoleStore = std::vector; + +struct PolygonImpl { + PathImpl Contour; + HoleStore Holes; + + inline PolygonImpl() {} + + inline explicit PolygonImpl(const PathImpl& cont): Contour(cont) {} + inline explicit PolygonImpl(const HoleStore& holes): + Holes(holes) {} + inline PolygonImpl(const Path& cont, const HoleStore& holes): + Contour(cont), Holes(holes) {} + + inline explicit PolygonImpl(PathImpl&& cont): Contour(std::move(cont)) {} + inline explicit PolygonImpl(HoleStore&& holes): Holes(std::move(holes)) {} + inline PolygonImpl(Path&& cont, HoleStore&& holes): + Contour(std::move(cont)), Holes(std::move(holes)) {} +}; inline PointImpl& operator +=(PointImpl& p, const PointImpl& pa ) { // This could be done with SIMD @@ -53,11 +71,10 @@ inline PointImpl operator-(const PointImpl& p1, const PointImpl& p2) { namespace libnest2d { // Aliases for convinience -using PointImpl = ClipperLib::IntPoint; -using PolygonImpl = ClipperLib::PolyNode; -using PathImpl = ClipperLib::Path; - -//extern HoleCache holeCache; +using ClipperLib::PointImpl; +using ClipperLib::PathImpl; +using ClipperLib::PolygonImpl; +using ClipperLib::HoleStore; // Type of coordinate units used by Clipper template<> struct CoordType { @@ -124,12 +141,26 @@ inline double area(const PolygonImpl& sh) { template<> inline double area(const PolygonImpl& sh) { - return -ClipperLib::Area(sh.Contour); + double a = 0; + + std::for_each(sh.Holes.begin(), sh.Holes.end(), [&a](const PathImpl& h) + { + a -= ClipperLib::Area(h); + }); + + return -ClipperLib::Area(sh.Contour) + a; } template<> inline double area(const PolygonImpl& sh) { - return ClipperLib::Area(sh.Contour); + double a = 0; + + std::for_each(sh.Holes.begin(), sh.Holes.end(), [&a](const PathImpl& h) + { + a += ClipperLib::Area(h); + }); + + return ClipperLib::Area(sh.Contour) + a; } } @@ -149,140 +180,85 @@ inline void ShapeLike::offset(PolygonImpl& sh, TCoord distance) { using ClipperLib::Paths; // If the input is not at least a triangle, we can not do this algorithm - if(sh.Contour.size() <= 3) throw GeometryException(GeomErr::OFFSET); + if(sh.Contour.size() <= 3 || + std::any_of(sh.Holes.begin(), sh.Holes.end(), + [](const PathImpl& p) { return p.size() <= 3; }) + ) throw GeometryException(GeomErr::OFFSET); ClipperOffset offs; Paths result; offs.AddPath(sh.Contour, jtMiter, etClosedPolygon); + offs.AddPaths(sh.Holes, jtMiter, etClosedPolygon); offs.Execute(result, static_cast(distance)); - // I dont know why does the offsetting revert the orientation and - // it removes the last vertex as well so boost will not have a closed - // polygon + // Offsetting reverts the orientation and also removes the last vertex + // so boost will not have a closed polygon. - if(result.size() != 1) throw GeometryException(GeomErr::OFFSET); + bool found_the_contour = false; + for(auto& r : result) { + if(ClipperLib::Orientation(r)) { + // We don't like if the offsetting generates more than one contour + // but throwing would be an overkill. Instead, we should warn the + // caller about the inability to create correct geometries + if(!found_the_contour) { + sh.Contour = r; + ClipperLib::ReversePath(sh.Contour); + sh.Contour.push_back(sh.Contour.front()); + found_the_contour = true; + } else { + dout() << "Warning: offsetting result is invalid!"; + /* TODO warning */ + } + } else { + // TODO If there are multiple contours we can't be sure which hole + // belongs to the first contour. (But in this case the situation is + // bad enough to let it go...) + sh.Holes.push_back(r); + ClipperLib::ReversePath(sh.Holes.back()); + sh.Holes.back().push_back(sh.Holes.back().front()); + } + } +} - sh.Contour = result.front(); +//template<> // TODO make it support holes if this method will ever be needed. +//inline PolygonImpl Nfp::minkowskiDiff(const PolygonImpl& sh, +// const PolygonImpl& other) +//{ +// #define DISABLE_BOOST_MINKOWSKI_ADD - // recreate closed polygon - sh.Contour.push_back(sh.Contour.front()); +// ClipperLib::Paths solution; - if(ClipperLib::Orientation(sh.Contour)) { - // Not clockwise then reverse the b*tch - ClipperLib::ReversePath(sh.Contour); +// ClipperLib::MinkowskiDiff(sh.Contour, other.Contour, solution); + +// PolygonImpl ret; +// ret.Contour = solution.front(); + +// return sh; +//} + +// Tell libnest2d how to make string out of a ClipperPolygon object +template<> inline std::string ShapeLike::toString(const PolygonImpl& sh) { + std::stringstream ss; + + ss << "Contour {\n"; + for(auto p : sh.Contour) { + ss << "\t" << p.X << " " << p.Y << "\n"; + } + ss << "}\n"; + + for(auto& h : sh.Holes) { + ss << "Holes {\n"; + for(auto p : h) { + ss << "\t{\n"; + ss << "\t\t" << p.X << " " << p.Y << "\n"; + ss << "\t}\n"; + } + ss << "}\n"; } + return ss.str(); } -// TODO : make it convex hull right and faster than boost - -//#define DISABLE_BOOST_CONVEX_HULL -//inline TCoord cross( const PointImpl &O, -// const PointImpl &A, -// const PointImpl &B) -//{ -// return (A.X - O.X) * (B.Y - O.Y) - (A.Y - O.Y) * (B.X - O.X); -//} - -//template<> -//inline PolygonImpl ShapeLike::convexHull(const PolygonImpl& sh) -//{ -// auto& P = sh.Contour; -// PolygonImpl ret; - -// size_t n = P.size(), k = 0; -// if (n <= 3) return ret; - -// auto& H = ret.Contour; -// H.resize(2*n); -// std::vector indices(P.size(), 0); -// std::iota(indices.begin(), indices.end(), 0); - -// // Sort points lexicographically -// std::sort(indices.begin(), indices.end(), [&P](unsigned i1, unsigned i2){ -// auto& p1 = P[i1], &p2 = P[i2]; -// return p1.X < p2.X || (p1.X == p2.X && p1.Y < p2.Y); -// }); - -// // Build lower hull -// for (size_t i = 0; i < n; ++i) { -// while (k >= 2 && cross(H[k-2], H[k-1], P[i]) <= 0) k--; -// H[k++] = P[i]; -// } - -// // Build upper hull -// for (size_t i = n-1, t = k+1; i > 0; --i) { -// while (k >= t && cross(H[k-2], H[k-1], P[i-1]) <= 0) k--; -// H[k++] = P[i-1]; -// } - -// H.resize(k-1); -// return ret; -//} - -//template<> -//inline PolygonImpl ShapeLike::convexHull( -// const ShapeLike::Shapes& shapes) -//{ -// PathImpl P; -// PolygonImpl ret; - -// size_t n = 0, k = 0; -// for(auto& sh : shapes) { n += sh.Contour.size(); } - -// P.reserve(n); -// for(auto& sh : shapes) { P.insert(P.end(), -// sh.Contour.begin(), sh.Contour.end()); } - -// if (n <= 3) { ret.Contour = P; return ret; } - -// auto& H = ret.Contour; -// H.resize(2*n); -// std::vector indices(P.size(), 0); -// std::iota(indices.begin(), indices.end(), 0); - -// // Sort points lexicographically -// std::sort(indices.begin(), indices.end(), [&P](unsigned i1, unsigned i2){ -// auto& p1 = P[i1], &p2 = P[i2]; -// return p1.X < p2.X || (p1.X == p2.X && p1.Y < p2.Y); -// }); - -// // Build lower hull -// for (size_t i = 0; i < n; ++i) { -// while (k >= 2 && cross(H[k-2], H[k-1], P[i]) <= 0) k--; -// H[k++] = P[i]; -// } - -// // Build upper hull -// for (size_t i = n-1, t = k+1; i > 0; --i) { -// while (k >= t && cross(H[k-2], H[k-1], P[i-1]) <= 0) k--; -// H[k++] = P[i-1]; -// } - -// H.resize(k-1); -// return ret; -//} - -template<> -inline PolygonImpl& Nfp::minkowskiAdd(PolygonImpl& sh, - const PolygonImpl& other) -{ - #define DISABLE_BOOST_MINKOWSKI_ADD - - ClipperLib::Paths solution; - - ClipperLib::MinkowskiSum(sh.Contour, other.Contour, solution, true); - - assert(solution.size() == 1); - - sh.Contour = solution.front(); - - return sh; -} - -// Tell binpack2d how to make string out of a ClipperPolygon object -template<> std::string ShapeLike::toString(const PolygonImpl& sh); - template<> inline TVertexIterator ShapeLike::begin(PolygonImpl& sh) { @@ -313,34 +289,78 @@ template<> struct HolesContainer { using Type = ClipperLib::Paths; }; -template<> PolygonImpl ShapeLike::create( const PathImpl& path); +template<> inline PolygonImpl ShapeLike::create(const PathImpl& path, + const HoleStore& holes) { + PolygonImpl p; + p.Contour = path; -template<> PolygonImpl ShapeLike::create( PathImpl&& path); + // Expecting that the coordinate system Y axis is positive in upwards + // direction + if(ClipperLib::Orientation(p.Contour)) { + // Not clockwise then reverse the b*tch + ClipperLib::ReversePath(p.Contour); + } -template<> -const THolesContainer& ShapeLike::holes( - const PolygonImpl& sh); + p.Holes = holes; + for(auto& h : p.Holes) { + if(!ClipperLib::Orientation(h)) { + ClipperLib::ReversePath(h); + } + } -template<> -THolesContainer& ShapeLike::holes(PolygonImpl& sh); - -template<> -inline TContour& ShapeLike::getHole(PolygonImpl& sh, - unsigned long idx) -{ - return sh.Childs[idx]->Contour; + return p; } -template<> -inline const TContour& ShapeLike::getHole(const PolygonImpl& sh, - unsigned long idx) +template<> inline PolygonImpl ShapeLike::create( PathImpl&& path, + HoleStore&& holes) { + PolygonImpl p; + p.Contour.swap(path); + + // Expecting that the coordinate system Y axis is positive in upwards + // direction + if(ClipperLib::Orientation(p.Contour)) { + // Not clockwise then reverse the b*tch + ClipperLib::ReversePath(p.Contour); + } + + p.Holes.swap(holes); + + for(auto& h : p.Holes) { + if(!ClipperLib::Orientation(h)) { + ClipperLib::ReversePath(h); + } + } + + return p; +} + +template<> inline const THolesContainer& +ShapeLike::holes(const PolygonImpl& sh) { - return sh.Childs[idx]->Contour; + return sh.Holes; +} + +template<> inline THolesContainer& +ShapeLike::holes(PolygonImpl& sh) +{ + return sh.Holes; +} + +template<> inline TContour& +ShapeLike::getHole(PolygonImpl& sh, unsigned long idx) +{ + return sh.Holes[idx]; +} + +template<> inline const TContour& +ShapeLike::getHole(const PolygonImpl& sh, unsigned long idx) +{ + return sh.Holes[idx]; } template<> inline size_t ShapeLike::holeCount(const PolygonImpl& sh) { - return sh.Childs.size(); + return sh.Holes.size(); } template<> inline PathImpl& ShapeLike::getContour(PolygonImpl& sh) @@ -359,7 +379,7 @@ template<> inline void ShapeLike::translate(PolygonImpl& sh, const PointImpl& offs) { for(auto& p : sh.Contour) { p += offs; } - for(auto& hole : sh.Childs) for(auto& p : hole->Contour) { p += offs; } + for(auto& hole : sh.Holes) for(auto& p : hole) { p += offs; } } #define DISABLE_BOOST_ROTATE @@ -368,69 +388,77 @@ inline void ShapeLike::rotate(PolygonImpl& sh, const Radians& rads) { using Coord = TCoord; - auto cosa = rads.cos();//std::cos(rads); - auto sina = rads.sin(); //std::sin(rads); + auto cosa = rads.cos(); + auto sina = rads.sin(); for(auto& p : sh.Contour) { p = { static_cast(p.X * cosa - p.Y * sina), static_cast(p.X * sina + p.Y * cosa) - }; + }; } - for(auto& hole : sh.Childs) for(auto& p : hole->Contour) { + for(auto& hole : sh.Holes) for(auto& p : hole) { p = { - static_cast(p.X * cosa - p.Y * sina), - static_cast(p.X * sina + p.Y * cosa) - }; + static_cast(p.X * cosa - p.Y * sina), + static_cast(p.X * sina + p.Y * cosa) + }; } } #define DISABLE_BOOST_NFP_MERGE -template<> inline -Nfp::Shapes Nfp::merge(const Nfp::Shapes& shapes, - const PolygonImpl& sh) +template<> inline Nfp::Shapes +Nfp::merge(const Nfp::Shapes& shapes, const PolygonImpl& sh) { Nfp::Shapes retv; - ClipperLib::Clipper clipper; + ClipperLib::Clipper clipper(ClipperLib::ioReverseSolution); - bool closed = true; - -#ifndef NDEBUG -#define _valid() valid = + bool closed = true; bool valid = false; -#else -#define _valid() -#endif - _valid() clipper.AddPath(sh.Contour, ClipperLib::ptSubject, closed); + valid = clipper.AddPath(sh.Contour, ClipperLib::ptSubject, closed); - for(auto& hole : sh.Childs) { - _valid() clipper.AddPath(hole->Contour, ClipperLib::ptSubject, closed); - assert(valid); + for(auto& hole : sh.Holes) { + valid &= clipper.AddPath(hole, ClipperLib::ptSubject, closed); } for(auto& path : shapes) { - _valid() clipper.AddPath(path.Contour, ClipperLib::ptSubject, closed); - assert(valid); - for(auto& hole : path.Childs) { - _valid() clipper.AddPath(hole->Contour, ClipperLib::ptSubject, closed); - assert(valid); + valid &= clipper.AddPath(path.Contour, ClipperLib::ptSubject, closed); + + for(auto& hole : path.Holes) { + valid &= clipper.AddPath(hole, ClipperLib::ptSubject, closed); } } - ClipperLib::Paths rret; - clipper.Execute(ClipperLib::ctUnion, rret, ClipperLib::pftNonZero); - retv.reserve(rret.size()); - for(auto& p : rret) { - if(ClipperLib::Orientation(p)) { - // Not clockwise then reverse the b*tch - ClipperLib::ReversePath(p); + if(!valid) throw GeometryException(GeomErr::MERGE); + + ClipperLib::PolyTree result; + clipper.Execute(ClipperLib::ctUnion, result, ClipperLib::pftNonZero); + retv.reserve(result.Total()); + + std::function processHole; + + auto processPoly = [&retv, &processHole](ClipperLib::PolyNode *pptr) { + PolygonImpl poly(pptr->Contour); + poly.Contour.push_back(poly.Contour.front()); + for(auto h : pptr->Childs) { processHole(h, poly); } + retv.push_back(poly); + }; + + processHole = [&processPoly](ClipperLib::PolyNode *pptr, PolygonImpl& poly) { + poly.Holes.push_back(pptr->Contour); + poly.Holes.back().push_back(poly.Holes.back().front()); + for(auto c : pptr->Childs) processPoly(c); + }; + + auto traverse = [&processPoly] (ClipperLib::PolyNode *node) + { + for(auto ch : node->Childs) { + processPoly(ch); } - retv.emplace_back(); - retv.back().Contour = p; - retv.back().Contour.emplace_back(p.front()); - } + }; + + traverse(&result); return retv; } diff --git a/xs/src/libnest2d/libnest2d/common.hpp b/xs/src/libnest2d/libnest2d/common.hpp index b9c252977..18f313712 100644 --- a/xs/src/libnest2d/libnest2d/common.hpp +++ b/xs/src/libnest2d/libnest2d/common.hpp @@ -18,7 +18,6 @@ #define BP2D_CONSTEXPR constexpr #endif - /* * Debugging output dout and derr definition */ @@ -211,16 +210,16 @@ enum class GeomErr : std::size_t { NFP }; -static const std::string ERROR_STR[] = { - "Offsetting could not be done! An invalid geometry may have been added." - "Error while merging geometries!" - "No fit polygon cannaot be calculated." +const std::string ERROR_STR[] = { + "Offsetting could not be done! An invalid geometry may have been added.", + "Error while merging geometries!", + "No fit polygon cannot be calculated." }; class GeometryException: public std::exception { - virtual const char * errorstr(GeomErr errcode) const BP2D_NOEXCEPT { - return ERROR_STR[static_cast(errcode)].c_str(); + virtual const std::string& errorstr(GeomErr errcode) const BP2D_NOEXCEPT { + return ERROR_STR[static_cast(errcode)]; } GeomErr errcode_; @@ -231,7 +230,7 @@ public: GeomErr errcode() const { return errcode_; } virtual const char * what() const BP2D_NOEXCEPT override { - return errorstr(errcode_); + return errorstr(errcode_).c_str(); } }; diff --git a/xs/src/libnest2d/libnest2d/geometries_io.hpp b/xs/src/libnest2d/libnest2d/geometries_io.hpp deleted file mode 100644 index dbcae5256..000000000 --- a/xs/src/libnest2d/libnest2d/geometries_io.hpp +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef GEOMETRIES_IO_HPP -#define GEOMETRIES_IO_HPP - -#include "libnest2d.hpp" - -#include - -namespace libnest2d { - -template -std::ostream& operator<<(std::ostream& stream, const _Item& sh) { - stream << sh.toString() << "\n"; - return stream; -} - -} - -#endif // GEOMETRIES_IO_HPP diff --git a/xs/src/libnest2d/libnest2d/geometries_nfp.hpp b/xs/src/libnest2d/libnest2d/geometries_nfp.hpp deleted file mode 100644 index f3672d4fe..000000000 --- a/xs/src/libnest2d/libnest2d/geometries_nfp.hpp +++ /dev/null @@ -1,223 +0,0 @@ -#ifndef GEOMETRIES_NOFITPOLYGON_HPP -#define GEOMETRIES_NOFITPOLYGON_HPP - -#include "geometry_traits.hpp" -#include -#include - -namespace libnest2d { - -struct Nfp { - -template -using Shapes = typename ShapeLike::Shapes; - -template -static RawShape& minkowskiAdd(RawShape& sh, const RawShape& /*other*/) -{ - static_assert(always_false::value, - "Nfp::minkowskiAdd() unimplemented!"); - return sh; -} - -template -static Shapes merge(const Shapes& shc, const RawShape& sh) -{ - static_assert(always_false::value, - "Nfp::merge(shapes, shape) unimplemented!"); -} - -template -inline static TPoint referenceVertex(const RawShape& sh) -{ - return rightmostUpVertex(sh); -} - -template -static TPoint leftmostDownVertex(const RawShape& sh) { - - // find min x and min y vertex - auto it = std::min_element(ShapeLike::cbegin(sh), ShapeLike::cend(sh), - _vsort); - - return *it; -} - -template -static TPoint rightmostUpVertex(const RawShape& sh) { - - // find min x and min y vertex - auto it = std::max_element(ShapeLike::cbegin(sh), ShapeLike::cend(sh), - _vsort); - - return *it; -} - -template -static RawShape noFitPolygon(const RawShape& sh, const RawShape& other) { - auto isConvex = [](const RawShape& sh) { - - return true; - }; - - using Vertex = TPoint; - using Edge = _Segment; - - auto nfpConvexConvex = [] ( - const RawShape& sh, - const RawShape& cother) - { - RawShape other = cother; - - // Make the other polygon counter-clockwise - std::reverse(ShapeLike::begin(other), ShapeLike::end(other)); - - RawShape rsh; // Final nfp placeholder - std::vector edgelist; - - auto cap = ShapeLike::contourVertexCount(sh) + - ShapeLike::contourVertexCount(other); - - // Reserve the needed memory - edgelist.reserve(cap); - ShapeLike::reserve(rsh, static_cast(cap)); - - { // place all edges from sh into edgelist - auto first = ShapeLike::cbegin(sh); - auto next = first + 1; - auto endit = ShapeLike::cend(sh); - - while(next != endit) edgelist.emplace_back(*(first++), *(next++)); - } - - { // place all edges from other into edgelist - auto first = ShapeLike::cbegin(other); - auto next = first + 1; - auto endit = ShapeLike::cend(other); - - while(next != endit) edgelist.emplace_back(*(first++), *(next++)); - } - - // Sort the edges by angle to X axis. - std::sort(edgelist.begin(), edgelist.end(), - [](const Edge& e1, const Edge& e2) - { - return e1.angleToXaxis() > e2.angleToXaxis(); - }); - - // Add the two vertices from the first edge into the final polygon. - ShapeLike::addVertex(rsh, edgelist.front().first()); - ShapeLike::addVertex(rsh, edgelist.front().second()); - - auto tmp = std::next(ShapeLike::begin(rsh)); - - // Construct final nfp by placing each edge to the end of the previous - for(auto eit = std::next(edgelist.begin()); - eit != edgelist.end(); - ++eit) - { - auto d = *tmp - eit->first(); - auto p = eit->second() + d; - - ShapeLike::addVertex(rsh, p); - - tmp = std::next(tmp); - } - - // Now we have an nfp somewhere in the dark. We need to get it - // to the right position around the stationary shape. - // This is done by choosing the leftmost lowest vertex of the - // orbiting polygon to be touched with the rightmost upper - // vertex of the stationary polygon. In this configuration, the - // reference vertex of the orbiting polygon (which can be dragged around - // the nfp) will be its rightmost upper vertex that coincides with the - // rightmost upper vertex of the nfp. No proof provided other than Jonas - // Lindmark's reasoning about the reference vertex of nfp in his thesis - // ("No fit polygon problem" - section 2.1.9) - - auto csh = sh; // Copy sh, we will sort the verices in the copy - auto& cmp = _vsort; - std::sort(ShapeLike::begin(csh), ShapeLike::end(csh), cmp); - std::sort(ShapeLike::begin(other), ShapeLike::end(other), cmp); - - // leftmost lower vertex of the stationary polygon - auto& touch_sh = *(std::prev(ShapeLike::end(csh))); - // rightmost upper vertex of the orbiting polygon - auto& touch_other = *(ShapeLike::begin(other)); - - // Calculate the difference and move the orbiter to the touch position. - auto dtouch = touch_sh - touch_other; - auto top_other = *(std::prev(ShapeLike::end(other))) + dtouch; - - // Get the righmost upper vertex of the nfp and move it to the RMU of - // the orbiter because they should coincide. - auto&& top_nfp = rightmostUpVertex(rsh); - auto dnfp = top_other - top_nfp; - std::for_each(ShapeLike::begin(rsh), ShapeLike::end(rsh), - [&dnfp](Vertex& v) { v+= dnfp; } ); - - return rsh; - }; - - RawShape rsh; - - enum e_dispatch { - CONVEX_CONVEX, - CONCAVE_CONVEX, - CONVEX_CONCAVE, - CONCAVE_CONCAVE - }; - - int sel = isConvex(sh) ? CONVEX_CONVEX : CONCAVE_CONVEX; - sel += isConvex(other) ? CONVEX_CONVEX : CONVEX_CONCAVE; - - switch(sel) { - case CONVEX_CONVEX: - rsh = nfpConvexConvex(sh, other); break; - case CONCAVE_CONVEX: - break; - case CONVEX_CONCAVE: - break; - case CONCAVE_CONCAVE: - break; - } - - return rsh; -} - -template -static inline Shapes noFitPolygon(const Shapes& shapes, - const RawShape& other) -{ - assert(shapes.size() >= 1); - auto shit = shapes.begin(); - - Shapes ret; - ret.emplace_back(noFitPolygon(*shit, other)); - - while(++shit != shapes.end()) ret = merge(ret, noFitPolygon(*shit, other)); - - return ret; -} - -private: - -// Do not specialize this... -template -static inline bool _vsort(const TPoint& v1, - const TPoint& v2) -{ - using Coord = TCoord>; - Coord &&x1 = getX(v1), &&x2 = getX(v2), &&y1 = getY(v1), &&y2 = getY(v2); - auto diff = y1 - y2; - if(std::abs(diff) <= std::numeric_limits::epsilon()) - return x1 < x2; - - return diff < 0; -} - -}; - -} - -#endif // GEOMETRIES_NOFITPOLYGON_HPP diff --git a/xs/src/libnest2d/libnest2d/geometry_traits.hpp b/xs/src/libnest2d/libnest2d/geometry_traits.hpp index 758bdd1bd..dbd609201 100644 --- a/xs/src/libnest2d/libnest2d/geometry_traits.hpp +++ b/xs/src/libnest2d/libnest2d/geometry_traits.hpp @@ -328,23 +328,37 @@ enum class Formats { SVG }; -// This struct serves as a namespace. The only difference is that is can be +// This struct serves as a namespace. The only difference is that it can be // used in friend declarations. struct ShapeLike { template using Shapes = std::vector; + template + static RawShape create(const TContour& contour, + const THolesContainer& holes) + { + return RawShape(contour, holes); + } + + template + static RawShape create(TContour&& contour, + THolesContainer&& holes) + { + return RawShape(contour, holes); + } + template static RawShape create(const TContour& contour) { - return RawShape(contour); + return create(contour, {}); } template static RawShape create(TContour&& contour) { - return RawShape(contour); + return create(contour, {}); } // Optional, does nothing by default @@ -551,10 +565,44 @@ struct ShapeLike { } template - static std::pair isValid(const RawShape& /*sh*/) { + static std::pair isValid(const RawShape& /*sh*/) + { return {false, "ShapeLike::isValid() unimplemented!"}; } + template + static inline bool isConvex(const TContour& sh) + { + using Vertex = TPoint; + auto first = sh.begin(); + auto middle = std::next(first); + auto last = std::next(middle); + using CVrRef = const Vertex&; + + auto zcrossproduct = [](CVrRef k, CVrRef k1, CVrRef k2) { + auto dx1 = getX(k1) - getX(k); + auto dy1 = getY(k1) - getY(k); + auto dx2 = getX(k2) - getX(k1); + auto dy2 = getY(k2) - getY(k1); + return dx1*dy2 - dy1*dx2; + }; + + auto firstprod = zcrossproduct( *(std::prev(std::prev(sh.end()))), + *first, + *middle ); + + bool ret = true; + bool frsign = firstprod > 0; + while(last != sh.end()) { + auto &k = *first, &k1 = *middle, &k2 = *last; + auto zc = zcrossproduct(k, k1, k2); + ret &= frsign == (zc > 0); + ++first; ++middle; ++last; + } + + return ret; + } + // ************************************************************************* // No need to implement these // ************************************************************************* diff --git a/xs/src/libnest2d/libnest2d/geometry_traits_nfp.hpp b/xs/src/libnest2d/libnest2d/geometry_traits_nfp.hpp new file mode 100644 index 000000000..56e8527b4 --- /dev/null +++ b/xs/src/libnest2d/libnest2d/geometry_traits_nfp.hpp @@ -0,0 +1,258 @@ +#ifndef GEOMETRIES_NOFITPOLYGON_HPP +#define GEOMETRIES_NOFITPOLYGON_HPP + +#include "geometry_traits.hpp" +#include +#include + +namespace libnest2d { + +/// The complexity level of a polygon that an NFP implementation can handle. +enum class NfpLevel: unsigned { + CONVEX_ONLY, + ONE_CONVEX, + BOTH_CONCAVE, + ONE_CONVEX_WITH_HOLES, + BOTH_CONCAVE_WITH_HOLES +}; + +/// A collection of static methods for handling the no fit polygon creation. +struct Nfp { + +// Shorthand for a pile of polygons +template +using Shapes = typename ShapeLike::Shapes; + +/// Minkowski addition (not used yet) +template +static RawShape minkowskiDiff(const RawShape& sh, const RawShape& /*other*/) +{ + + + return sh; +} + +/** + * Merge a bunch of polygons with the specified additional polygon. + * + * \tparam RawShape the Polygon data type. + * \param shc The pile of polygons that will be unified with sh. + * \param sh A single polygon to unify with shc. + * + * \return A set of polygons that is the union of the input polygons. Note that + * mostly it will be a set containing only one big polygon but if the input + * polygons are disjuct than the resulting set will contain more polygons. + */ +template +static Shapes merge(const Shapes& shc, const RawShape& sh) +{ + static_assert(always_false::value, + "Nfp::merge(shapes, shape) unimplemented!"); +} + +/** + * A method to get a vertex from a polygon that always maintains a relative + * position to the coordinate system: It is always the rightmost top vertex. + * + * This way it does not matter in what order the vertices are stored, the + * reference will be always the same for the same polygon. + */ +template +inline static TPoint referenceVertex(const RawShape& sh) +{ + return rightmostUpVertex(sh); +} + +/** + * Get the vertex of the polygon that is at the lowest values (bottom) in the Y + * axis and if there are more than one vertices on the same Y coordinate than + * the result will be the leftmost (with the highest X coordinate). + */ +template +static TPoint leftmostDownVertex(const RawShape& sh) +{ + + // find min x and min y vertex + auto it = std::min_element(ShapeLike::cbegin(sh), ShapeLike::cend(sh), + _vsort); + + return *it; +} + +/** + * Get the vertex of the polygon that is at the highest values (top) in the Y + * axis and if there are more than one vertices on the same Y coordinate than + * the result will be the rightmost (with the lowest X coordinate). + */ +template +static TPoint rightmostUpVertex(const RawShape& sh) +{ + + // find min x and min y vertex + auto it = std::max_element(ShapeLike::cbegin(sh), ShapeLike::cend(sh), + _vsort); + + return *it; +} + +/// Helper function to get the NFP +template +static RawShape noFitPolygon(const RawShape& sh, const RawShape& other) +{ + NfpImpl nfp; + return nfp(sh, other); +} + +/** + * The "trivial" Cuninghame-Green implementation of NFP for convex polygons. + * + * You can use this even if you provide implementations for the more complex + * cases (Through specializing the the NfpImpl struct). Currently, no other + * cases are covered in the library. + * + * Complexity should be no more than linear in the number of edges of the input + * polygons. + * + * \tparam RawShape the Polygon data type. + * \param sh The stationary polygon + * \param cother The orbiting polygon + * \return Returns the NFP of the two input polygons which have to be strictly + * convex. The resulting NFP is proven to be convex as well in this case. + * + */ +template +static RawShape nfpConvexOnly(const RawShape& sh, const RawShape& cother) +{ + using Vertex = TPoint; using Edge = _Segment; + + RawShape other = cother; + + // Make the other polygon counter-clockwise + std::reverse(ShapeLike::begin(other), ShapeLike::end(other)); + + RawShape rsh; // Final nfp placeholder + std::vector edgelist; + + auto cap = ShapeLike::contourVertexCount(sh) + + ShapeLike::contourVertexCount(other); + + // Reserve the needed memory + edgelist.reserve(cap); + ShapeLike::reserve(rsh, static_cast(cap)); + + { // place all edges from sh into edgelist + auto first = ShapeLike::cbegin(sh); + auto next = first + 1; + auto endit = ShapeLike::cend(sh); + + while(next != endit) edgelist.emplace_back(*(first++), *(next++)); + } + + { // place all edges from other into edgelist + auto first = ShapeLike::cbegin(other); + auto next = first + 1; + auto endit = ShapeLike::cend(other); + + while(next != endit) edgelist.emplace_back(*(first++), *(next++)); + } + + // Sort the edges by angle to X axis. + std::sort(edgelist.begin(), edgelist.end(), + [](const Edge& e1, const Edge& e2) + { + return e1.angleToXaxis() > e2.angleToXaxis(); + }); + + // Add the two vertices from the first edge into the final polygon. + ShapeLike::addVertex(rsh, edgelist.front().first()); + ShapeLike::addVertex(rsh, edgelist.front().second()); + + auto tmp = std::next(ShapeLike::begin(rsh)); + + // Construct final nfp by placing each edge to the end of the previous + for(auto eit = std::next(edgelist.begin()); + eit != edgelist.end(); + ++eit) + { + auto d = *tmp - eit->first(); + auto p = eit->second() + d; + + ShapeLike::addVertex(rsh, p); + + tmp = std::next(tmp); + } + + // Now we have an nfp somewhere in the dark. We need to get it + // to the right position around the stationary shape. + // This is done by choosing the leftmost lowest vertex of the + // orbiting polygon to be touched with the rightmost upper + // vertex of the stationary polygon. In this configuration, the + // reference vertex of the orbiting polygon (which can be dragged around + // the nfp) will be its rightmost upper vertex that coincides with the + // rightmost upper vertex of the nfp. No proof provided other than Jonas + // Lindmark's reasoning about the reference vertex of nfp in his thesis + // ("No fit polygon problem" - section 2.1.9) + + auto csh = sh; // Copy sh, we will sort the verices in the copy + auto& cmp = _vsort; + std::sort(ShapeLike::begin(csh), ShapeLike::end(csh), cmp); + std::sort(ShapeLike::begin(other), ShapeLike::end(other), cmp); + + // leftmost lower vertex of the stationary polygon + auto& touch_sh = *(std::prev(ShapeLike::end(csh))); + // rightmost upper vertex of the orbiting polygon + auto& touch_other = *(ShapeLike::begin(other)); + + // Calculate the difference and move the orbiter to the touch position. + auto dtouch = touch_sh - touch_other; + auto top_other = *(std::prev(ShapeLike::end(other))) + dtouch; + + // Get the righmost upper vertex of the nfp and move it to the RMU of + // the orbiter because they should coincide. + auto&& top_nfp = rightmostUpVertex(rsh); + auto dnfp = top_other - top_nfp; + std::for_each(ShapeLike::begin(rsh), ShapeLike::end(rsh), + [&dnfp](Vertex& v) { v+= dnfp; } ); + + return rsh; +} + +// Specializable NFP implementation class. Specialize it if you have a faster +// or better NFP implementation +template +struct NfpImpl { + RawShape operator()(const RawShape& sh, const RawShape& other) { + static_assert(nfptype == NfpLevel::CONVEX_ONLY, + "Nfp::noFitPolygon() unimplemented!"); + + // Libnest2D has a default implementation for convex polygons and will + // use it if feasible. + return nfpConvexOnly(sh, other); + } +}; + +template struct MaxNfpLevel { + static const BP2D_CONSTEXPR NfpLevel value = NfpLevel::CONVEX_ONLY; +}; + +private: + +// Do not specialize this... +template +static inline bool _vsort(const TPoint& v1, + const TPoint& v2) +{ + using Coord = TCoord>; + Coord &&x1 = getX(v1), &&x2 = getX(v2), &&y1 = getY(v1), &&y2 = getY(v2); + auto diff = y1 - y2; + if(std::abs(diff) <= std::numeric_limits::epsilon()) + return x1 < x2; + + return diff < 0; +} + +}; + +} + +#endif // GEOMETRIES_NOFITPOLYGON_HPP diff --git a/xs/src/libnest2d/libnest2d/libnest2d.hpp b/xs/src/libnest2d/libnest2d/libnest2d.hpp index c661dc599..96316c344 100644 --- a/xs/src/libnest2d/libnest2d/libnest2d.hpp +++ b/xs/src/libnest2d/libnest2d/libnest2d.hpp @@ -9,9 +9,6 @@ #include #include "geometry_traits.hpp" -//#include "optimizers/subplex.hpp" -//#include "optimizers/simplex.hpp" -#include "optimizers/genetic.hpp" namespace libnest2d { @@ -52,6 +49,14 @@ class _Item { mutable RawShape offset_cache_; mutable bool offset_cache_valid_ = false; + enum class Convexity: char { + UNCHECKED, + TRUE, + FALSE + }; + + mutable Convexity convexity_ = Convexity::UNCHECKED; + public: /// The type of the shape which was handed over as the template argument. @@ -101,11 +106,14 @@ public: inline _Item(const std::initializer_list< Vertex >& il): sh_(ShapeLike::create(il)) {} - inline _Item(const TContour& contour): - sh_(ShapeLike::create(contour)) {} + inline _Item(const TContour& contour, + const THolesContainer& holes = {}): + sh_(ShapeLike::create(contour, holes)) {} - inline _Item(TContour&& contour): - sh_(ShapeLike::create(std::move(contour))) {} + inline _Item(TContour&& contour, + THolesContainer&& holes): + sh_(ShapeLike::create(std::move(contour), + std::move(holes))) {} /** * @brief Convert the polygon to string representation. The format depends @@ -117,7 +125,7 @@ public: return ShapeLike::toString(sh_); } - /// Iterator tho the first vertex in the polygon. + /// Iterator tho the first contour vertex in the polygon. inline Iterator begin() const { return ShapeLike::cbegin(sh_); @@ -129,7 +137,7 @@ public: return ShapeLike::cbegin(sh_); } - /// Iterator to the last element. + /// Iterator to the last contour vertex. inline Iterator end() const { return ShapeLike::cend(sh_); @@ -165,8 +173,7 @@ public: * @param idx The index of the requested vertex. * @param v The new vertex data. */ - inline void setVertex(unsigned long idx, - const Vertex& v ) + inline void setVertex(unsigned long idx, const Vertex& v ) { invalidateCache(); ShapeLike::vertex(sh_, idx) = v; @@ -191,11 +198,38 @@ public: return ret; } + inline bool isContourConvex() const { + bool ret = false; + + switch(convexity_) { + case Convexity::UNCHECKED: + ret = ShapeLike::isConvex(ShapeLike::getContour(transformedShape())); + convexity_ = ret? Convexity::TRUE : Convexity::FALSE; + break; + case Convexity::TRUE: ret = true; break; + case Convexity::FALSE:; + } + + return ret; + } + + inline bool isHoleConvex(unsigned holeidx) const { + return false; + } + + inline bool areHolesConvex() const { + return false; + } + /// The number of the outer ring vertices. inline size_t vertexCount() const { return ShapeLike::contourVertexCount(sh_); } + inline size_t holeCount() const { + return ShapeLike::holeCount(sh_); + } + /** * @brief isPointInside * @param p @@ -262,7 +296,7 @@ public: } } - inline RawShape transformedShape() const + inline const RawShape& transformedShape() const { if(tr_cache_valid_) return tr_cache_; @@ -271,7 +305,7 @@ public: if(has_translation_) ShapeLike::translate(cpy, translation_); tr_cache_ = cpy; tr_cache_valid_ = true; - return cpy; + return tr_cache_; } inline operator RawShape() const @@ -327,6 +361,7 @@ private: tr_cache_valid_ = false; area_cache_valid_ = false; offset_cache_valid_ = false; + convexity_ = Convexity::UNCHECKED; } }; diff --git a/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp b/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp index 26a0a2048..5ddb3a98d 100644 --- a/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp +++ b/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp @@ -5,9 +5,7 @@ #include #endif #include "placer_boilerplate.hpp" -#include "../geometries_nfp.hpp" -#include -//#include +#include "../geometry_traits_nfp.hpp" namespace libnest2d { namespace strategies { @@ -41,13 +39,13 @@ template class EdgeCache { using Coord = TCoord; using Edge = _Segment; - enum Corners { - BOTTOM, - LEFT, - RIGHT, - TOP, - NUM_CORNERS - }; +// enum Corners { +// BOTTOM, +// LEFT, +// RIGHT, +// TOP, +// NUM_CORNERS +// }; mutable std::vector corners_; @@ -72,43 +70,49 @@ template class EdgeCache { void fetchCorners() const { if(!corners_.empty()) return; - corners_ = std::vector(NUM_CORNERS, 0.0); + corners_ = distances_; + for(auto& d : corners_) { + d /= full_distance_; + } - std::vector idx_ud(emap_.size(), 0); - std::vector idx_lr(emap_.size(), 0); +// corners_ = std::vector(NUM_CORNERS, 0.0); - std::iota(idx_ud.begin(), idx_ud.end(), 0); - std::iota(idx_lr.begin(), idx_lr.end(), 0); +// std::vector idx_ud(emap_.size(), 0); +// std::vector idx_lr(emap_.size(), 0); - std::sort(idx_ud.begin(), idx_ud.end(), - [this](unsigned idx1, unsigned idx2) - { - const Vertex& v1 = emap_[idx1].first(); - const Vertex& v2 = emap_[idx2].first(); - auto diff = getY(v1) - getY(v2); - if(std::abs(diff) <= std::numeric_limits::epsilon()) - return getX(v1) < getX(v2); +// std::iota(idx_ud.begin(), idx_ud.end(), 0); +// std::iota(idx_lr.begin(), idx_lr.end(), 0); - return diff < 0; - }); +// std::sort(idx_ud.begin(), idx_ud.end(), +// [this](unsigned idx1, unsigned idx2) +// { +// const Vertex& v1 = emap_[idx1].first(); +// const Vertex& v2 = emap_[idx2].first(); - std::sort(idx_lr.begin(), idx_lr.end(), - [this](unsigned idx1, unsigned idx2) - { - const Vertex& v1 = emap_[idx1].first(); - const Vertex& v2 = emap_[idx2].first(); +// auto diff = getY(v1) - getY(v2); +// if(std::abs(diff) <= std::numeric_limits::epsilon()) +// return getX(v1) < getX(v2); - auto diff = getX(v1) - getX(v2); - if(std::abs(diff) <= std::numeric_limits::epsilon()) - return getY(v1) < getY(v2); +// return diff < 0; +// }); - return diff < 0; - }); +// std::sort(idx_lr.begin(), idx_lr.end(), +// [this](unsigned idx1, unsigned idx2) +// { +// const Vertex& v1 = emap_[idx1].first(); +// const Vertex& v2 = emap_[idx2].first(); - corners_[BOTTOM] = distances_[idx_ud.front()]/full_distance_; - corners_[TOP] = distances_[idx_ud.back()]/full_distance_; - corners_[LEFT] = distances_[idx_lr.front()]/full_distance_; - corners_[RIGHT] = distances_[idx_lr.back()]/full_distance_; +// auto diff = getX(v1) - getX(v2); +// if(std::abs(diff) <= std::numeric_limits::epsilon()) +// return getY(v1) < getY(v2); + +// return diff < 0; +// }); + +// corners_[BOTTOM] = distances_[idx_ud.front()]/full_distance_; +// corners_[TOP] = distances_[idx_ud.back()]/full_distance_; +// corners_[LEFT] = distances_[idx_lr.front()]/full_distance_; +// corners_[RIGHT] = distances_[idx_lr.back()]/full_distance_; } public: @@ -163,11 +167,11 @@ public: inline double circumference() const BP2D_NOEXCEPT { return full_distance_; } - inline double corner(Corners c) const BP2D_NOEXCEPT { - assert(c < NUM_CORNERS); - fetchCorners(); - return corners_[c]; - } +// inline double corner(Corners c) const BP2D_NOEXCEPT { +// assert(c < NUM_CORNERS); +// fetchCorners(); +// return corners_[c]; +// } inline const std::vector& corners() const BP2D_NOEXCEPT { fetchCorners(); @@ -176,18 +180,21 @@ public: }; -// Nfp for a bunch of polygons. If the polygons are convex, the nfp calculated -// for trsh can be the union of nfp-s calculated with each polygon +template +struct Lvl { static const NfpLevel value = lvl; }; + template -Nfp::Shapes nfp(const Container& polygons, const RawShape& trsh ) +Nfp::Shapes nfp( const Container& polygons, + const _Item& trsh, + Lvl) { using Item = _Item; Nfp::Shapes nfps; for(Item& sh : polygons) { - auto subnfp = Nfp::noFitPolygon(sh.transformedShape(), - trsh); + auto subnfp = Nfp::noFitPolygon( + sh.transformedShape(), trsh.transformedShape()); #ifndef NDEBUG auto vv = ShapeLike::isValid(sh.transformedShape()); assert(vv.first); @@ -202,6 +209,51 @@ Nfp::Shapes nfp(const Container& polygons, const RawShape& trsh ) return nfps; } +template +Nfp::Shapes nfp( const Container& polygons, + const _Item& trsh, + Level) +{ + using Item = _Item; + + Nfp::Shapes nfps, stationary; + + for(Item& sh : polygons) { + stationary = Nfp::merge(stationary, sh.transformedShape()); + } + + std::cout << "pile size: " << stationary.size() << std::endl; + for(RawShape& sh : stationary) { + + RawShape subnfp; +// if(sh.isContourConvex() && trsh.isContourConvex()) { +// subnfp = Nfp::noFitPolygon( +// sh.transformedShape(), trsh.transformedShape()); +// } else { + subnfp = Nfp::noFitPolygon( sh/*.transformedShape()*/, + trsh.transformedShape()); +// } + +// #ifndef NDEBUG +// auto vv = ShapeLike::isValid(sh.transformedShape()); +// assert(vv.first); + +// auto vnfp = ShapeLike::isValid(subnfp); +// assert(vnfp.first); +// #endif + +// auto vnfp = ShapeLike::isValid(subnfp); +// if(!vnfp.first) { +// std::cout << vnfp.second << std::endl; +// std::cout << ShapeLike::toString(subnfp) << std::endl; +// } + + nfps = Nfp::merge(nfps, subnfp); + } + + return nfps; +} + template class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer, RawShape, _Box>, NfpPConfig> { @@ -216,6 +268,8 @@ class _NofitPolyPlacer: public PlacerBoilerplate<_NofitPolyPlacer, const double norm_; const double penality_; + using MaxNfpLevel = Nfp::MaxNfpLevel; + public: using Pile = const Nfp::Shapes&; @@ -275,7 +329,7 @@ public: auto trsh = item.transformedShape(); - nfps = nfp(items_, trsh); + nfps = nfp(items_, item, Lvl()); auto iv = Nfp::referenceVertex(trsh); auto startpos = item.translation(); @@ -348,7 +402,7 @@ public: stopcr.max_iterations = 1000; stopcr.stoplimit = 0.01; stopcr.type = opt::StopLimitType::RELATIVE; - opt::TOptimizer solver(stopcr); + opt::TOptimizer solver(stopcr); double optimum = 0; double best_score = penality_; @@ -386,14 +440,8 @@ public: best_score = result.score; optimum = std::get<0>(result.optimum); } - } catch(std::exception& - #ifndef NDEBUG - e - #endif - ) { - #ifndef NDEBUG - std::cerr << "ERROR " << e.what() << std::endl; - #endif + } catch(std::exception& e) { + derr() << "ERROR: " << e.what() << "\n"; } }); } @@ -420,6 +468,10 @@ public: } ~_NofitPolyPlacer() { + clearItems(); + } + + inline void clearItems() { Nfp::Shapes m; m.reserve(items_.size()); @@ -458,6 +510,8 @@ public: auto d = cb - ci; for(Item& item : items_) item.translate(d); + + Base::clearItems(); } private: diff --git a/xs/src/libnest2d/libnest2d/selections/djd_heuristic.hpp b/xs/src/libnest2d/libnest2d/selections/djd_heuristic.hpp index 2d1ca08cb..dcc029251 100644 --- a/xs/src/libnest2d/libnest2d/selections/djd_heuristic.hpp +++ b/xs/src/libnest2d/libnest2d/selections/djd_heuristic.hpp @@ -180,6 +180,29 @@ public: }); }; + using ItemListIt = typename ItemList::iterator; + + auto largestPiece = [](ItemListIt it, ItemList& not_packed) { + return it == not_packed.begin()? std::next(it) : not_packed.begin(); + }; + + auto secondLargestPiece = [&largestPiece](ItemListIt it, + ItemList& not_packed) { + auto ret = std::next(largestPiece(it, not_packed)); + return ret == it? std::next(ret) : ret; + }; + + auto smallestPiece = [](ItemListIt it, ItemList& not_packed) { + auto last = std::prev(not_packed.end()); + return it == last? std::prev(it) : last; + }; + + auto secondSmallestPiece = [&smallestPiece](ItemListIt it, + ItemList& not_packed) { + auto ret = std::prev(smallestPiece(it, not_packed)); + return ret == it? std::prev(ret) : ret; + }; + auto tryOneByOne = // Subroutine to try adding items one by one. [&bin_area] (Placer& placer, ItemList& not_packed, @@ -208,31 +231,25 @@ public: }; auto tryGroupsOfTwo = // Try adding groups of two items into the bin. - [&bin_area, &check_pair, + [&bin_area, &check_pair, &largestPiece, &smallestPiece, try_reverse] (Placer& placer, ItemList& not_packed, double waste, double& free_area, double& filled_area) { - double item_area = 0, largest_area = 0, smallest_area = 0; - double second_largest = 0, second_smallest = 0; - + double item_area = 0; const auto endit = not_packed.end(); if(not_packed.size() < 2) return false; // No group of two items else { - largest_area = not_packed.front().get().area(); + double largest_area = not_packed.front().get().area(); auto itmp = not_packed.begin(); itmp++; - second_largest = itmp->get().area(); + double second_largest = itmp->get().area(); if( free_area - second_largest - largest_area > waste) return false; // If even the largest two items do not fill // the bin to the desired waste than we can end here. - - smallest_area = not_packed.back().get().area(); - itmp = endit; std::advance(itmp, -2); - second_smallest = itmp->get().area(); } bool ret = false; @@ -241,17 +258,12 @@ public: std::vector wrong_pairs; - double largest = second_largest; - double smallest= smallest_area; - while(it != endit && !ret && free_area - - (item_area = it->get().area()) - largest <= waste ) + while(it != endit && !ret && + free_area - (item_area = it->get().area()) - + largestPiece(it, not_packed)->get().area() <= waste) { - // if this is the last element, the next smallest is the - // previous item - auto itmp = it; std::advance(itmp, 1); - if(itmp == endit) smallest = second_smallest; - - if(item_area + smallest > free_area ) { it++; continue; } + if(item_area + smallestPiece(it, not_packed)->get().area() > + free_area ) { it++; continue; } auto pr = placer.trypack(*it); @@ -300,8 +312,6 @@ public: } if(!ret) it++; - - largest = largest_area; } if(ret) { not_packed.erase(it); not_packed.erase(it2); } @@ -311,6 +321,8 @@ public: auto tryGroupsOfThree = // Try adding groups of three items. [&bin_area, + &smallestPiece, &largestPiece, + &secondSmallestPiece, &secondLargestPiece, &check_pair, &check_triplet, try_reverse] (Placer& placer, ItemList& not_packed, double waste, @@ -341,11 +353,8 @@ public: // We need to determine in each iteration the largest, second // largest, smallest and second smallest item in terms of area. - auto first = not_packed.begin(); - Item& largest = it == first? *std::next(it) : *first; - - auto second = std::next(first); - Item& second_largest = it == second ? *std::next(it) : *second; + Item& largest = *largestPiece(it, not_packed); + Item& second_largest = *secondLargestPiece(it, not_packed); double area_of_two_largest = largest.area() + second_largest.area(); @@ -356,23 +365,22 @@ public: break; // Determine the area of the two smallest item. - auto last = std::prev(endit); - Item& smallest = it == last? *std::prev(it) : *last; - auto second_last = std::prev(last); - Item& second_smallest = it == second_last? *std::prev(it) : - *second_last; + Item& smallest = *smallestPiece(it, not_packed); + Item& second_smallest = *secondSmallestPiece(it, not_packed); // Check if there is enough free area for the item and the two // smallest item. double area_of_two_smallest = smallest.area() + second_smallest.area(); + if(it->get().area() + area_of_two_smallest > free_area) { + it++; continue; + } + auto pr = placer.trypack(*it); // Check for free area and try to pack the 1st item... - if(!pr || it->get().area() + area_of_two_smallest > free_area) { - it++; continue; - } + if(!pr) { it++; continue; } it2 = not_packed.begin(); double rem2_area = free_area - largest.area(); @@ -434,6 +442,8 @@ public: check_triplet(wrong_triplets, *it, *it2, *it3)) { it3++; continue; } + if(a3_sum > free_area) { it3++; continue; } + placer.accept(pr12); placer.accept(pr2); bool can_pack3 = placer.pack(*it3); @@ -558,13 +568,12 @@ public: &makeProgress] (Placer& placer, ItemList& not_packed, size_t idx) { - bool can_pack = true; - double filled_area = placer.filledArea(); double free_area = bin_area - filled_area; double waste = .0; + bool lasttry = false; - while(!not_packed.empty() && can_pack) { + while(!not_packed.empty() ) { {// Fill the bin up to INITIAL_FILL_PROPORTION of its capacity auto it = not_packed.begin(); @@ -585,29 +594,31 @@ public: // try pieses one by one while(tryOneByOne(placer, not_packed, waste, free_area, filled_area)) { - waste = 0; + if(lasttry) std::cout << "Lasttry monopack" << std::endl; + waste = 0; lasttry = false; makeProgress(placer, idx, 1); } // try groups of 2 pieses while(tryGroupsOfTwo(placer, not_packed, waste, free_area, filled_area)) { - waste = 0; + if(lasttry) std::cout << "Lasttry bipack" << std::endl; + waste = 0; lasttry = false; makeProgress(placer, idx, 2); } - // try groups of 3 pieses - while(tryGroupsOfThree(placer, not_packed, waste, free_area, - filled_area)) { - waste = 0; - makeProgress(placer, idx, 3); - } +// // try groups of 3 pieses +// while(tryGroupsOfThree(placer, not_packed, waste, free_area, +// filled_area)) { +// if(lasttry) std::cout << "Lasttry tripack" << std::endl; +// waste = 0; lasttry = false; +// makeProgress(placer, idx, 3); +// } - if(waste < free_area) waste += w; - else if(!not_packed.empty()) can_pack = false; + waste += w; + if(!lasttry && waste > free_area) lasttry = true; + else if(lasttry) break; } - - return can_pack; }; size_t idx = 0; @@ -633,7 +644,7 @@ public: }; // We will create jobs for each bin - std::vector> rets(bincount_guess); + std::vector> rets(bincount_guess); for(unsigned b = 0; b < bincount_guess; b++) { // launch the jobs rets[b] = std::async(std::launch::async, job, b); diff --git a/xs/src/libnest2d/libnest2d/selections/filler.hpp b/xs/src/libnest2d/libnest2d/selections/filler.hpp index 94e30fd5b..d0018dc73 100644 --- a/xs/src/libnest2d/libnest2d/selections/filler.hpp +++ b/xs/src/libnest2d/libnest2d/selections/filler.hpp @@ -32,17 +32,20 @@ public: { store_.clear(); - store_.reserve(last-first); + auto total = last-first; + store_.reserve(total); packed_bins_.emplace_back(); - auto makeProgress = [this](PlacementStrategyLike& placer) { + auto makeProgress = [this, &total]( + PlacementStrategyLike& placer) + { packed_bins_.back() = placer.getItems(); #ifndef NDEBUG packed_bins_.back().insert(packed_bins_.back().end(), placer.getDebugItems().begin(), placer.getDebugItems().end()); #endif - this->progress_(packed_bins_.back().size()); + this->progress_(--total); }; std::copy(first, last, std::back_inserter(store_)); @@ -64,7 +67,7 @@ public: while(it != store_.end()) { if(!placer.pack(*it)) { if(packed_bins_.back().empty()) ++it; - makeProgress(placer); +// makeProgress(placer); placer.clearItems(); packed_bins_.emplace_back(); } else { diff --git a/xs/src/libnest2d/libnest2d/selections/firstfit.hpp b/xs/src/libnest2d/libnest2d/selections/firstfit.hpp index cf8f6da0b..8a8a09f91 100644 --- a/xs/src/libnest2d/libnest2d/selections/firstfit.hpp +++ b/xs/src/libnest2d/libnest2d/selections/firstfit.hpp @@ -49,24 +49,28 @@ public: std::sort(store_.begin(), store_.end(), sortfunc); + auto total = last-first; + auto makeProgress = [this, &total](Placer& placer, size_t idx) { + packed_bins_[idx] = placer.getItems(); + this->progress_(--total); + }; + for(auto& item : store_ ) { bool was_packed = false; while(!was_packed) { - for(size_t j = 0; j < placers.size() && !was_packed; j++) - was_packed = placers[j].pack(item); + for(size_t j = 0; j < placers.size() && !was_packed; j++) { + if(was_packed = placers[j].pack(item)) + makeProgress(placers[j], j); + } if(!was_packed) { placers.emplace_back(bin); placers.back().configure(pconfig); + packed_bins_.emplace_back(); } } } - - std::for_each(placers.begin(), placers.end(), - [this](Placer& placer){ - packed_bins_.push_back(placer.getItems()); - }); } }; diff --git a/xs/src/libnest2d/tests/CMakeLists.txt b/xs/src/libnest2d/tests/CMakeLists.txt index 3af5e6f70..3777f3c56 100644 --- a/xs/src/libnest2d/tests/CMakeLists.txt +++ b/xs/src/libnest2d/tests/CMakeLists.txt @@ -35,13 +35,17 @@ else() set(GTEST_LIBS_TO_LINK ${GTEST_BOTH_LIBRARIES} Threads::Threads) endif() -add_executable(bp2d_tests test.cpp svgtools.hpp printer_parts.h printer_parts.cpp) -target_link_libraries(bp2d_tests libnest2d_static ${GTEST_LIBS_TO_LINK} ) +add_executable(bp2d_tests test.cpp + ../tools/svgtools.hpp +# ../tools/libnfpglue.hpp +# ../tools/libnfpglue.cpp + printer_parts.h + printer_parts.cpp + ${LIBNEST2D_SRCFILES} + ) +target_link_libraries(bp2d_tests ${LIBNEST2D_LIBRARIES} ${GTEST_LIBS_TO_LINK} ) + target_include_directories(bp2d_tests PRIVATE BEFORE ${LIBNEST2D_HEADERS} ${GTEST_INCLUDE_DIRS}) -if(DEFINED LIBNEST2D_TEST_LIBRARIES) - target_link_libraries(bp2d_tests ${LIBNEST2D_TEST_LIBRARIES}) -endif() - add_test(libnest2d_tests bp2d_tests) diff --git a/xs/src/libnest2d/tests/printer_parts.cpp b/xs/src/libnest2d/tests/printer_parts.cpp index 6d36bc1cd..bdc2a3d43 100644 --- a/xs/src/libnest2d/tests/printer_parts.cpp +++ b/xs/src/libnest2d/tests/printer_parts.cpp @@ -2523,3 +2523,653 @@ const TestData STEGOSAUR_POLYGONS = {84531845, 127391708}, }, }; + +const TestDataEx PRINTER_PART_POLYGONS_EX = +{ + { + { + {533726562, 142141690}, + {532359712, 143386134}, + {530141290, 142155145}, + {528649729, 160091460}, + {533659500, 157607547}, + {538669739, 160091454}, + {537178168, 142155145}, + {534959534, 143386102}, + {533726562, 142141690}, + }, + { + }, + }, + { + { + {118305840, 11603332}, + {118311095, 26616786}, + {113311095, 26611146}, + {109311095, 29604752}, + {109300760, 44608489}, + {109311095, 49631801}, + {113300790, 52636806}, + {118311095, 52636806}, + {118308782, 103636810}, + {223830940, 103636981}, + {236845321, 90642174}, + {236832882, 11630488}, + {232825251, 11616786}, + {210149075, 11616786}, + {211308596, 13625149}, + {209315325, 17080886}, + {205326885, 17080886}, + {203334352, 13629720}, + {204493136, 11616786}, + {118305840, 11603332}, + }, + { + }, + }, + { + { + {365619370, 111280336}, + {365609100, 198818091}, + {387109100, 198804367}, + {387109100, 203279701}, + {471129120, 203279688}, + {471128689, 111283937}, + {365619370, 111280336}, + }, + { + }, + }, + { + { + {479997525, 19177632}, + {477473010, 21975778}, + {475272613, 21969219}, + {475267479, 32995796}, + {477026388, 32995796}, + {483041428, 22582411}, + {482560272, 20318630}, + {479997525, 19177632}, + }, + { + }, + }, + { + { + {476809080, 4972372}, + {475267479, 4975778}, + {475272613, 16002357}, + {481018177, 18281994}, + {482638044, 15466085}, + {476809080, 4972372}, + }, + { + }, + }, + { + { + {424866064, 10276075}, + {415113411, 10277960}, + {411723180, 13685293}, + {410473354, 18784347}, + {382490868, 18784008}, + {380996185, 17286945}, + {380996185, 11278161}, + {375976165, 11284347}, + {375976165, 56389754}, + {375169018, 57784347}, + {371996185, 57784347}, + {371996185, 53779177}, + {364976165, 53784347}, + {364969637, 56791976}, + {369214608, 61054367}, + {371474507, 61054367}, + {371473155, 98298160}, + {378476349, 105317193}, + {407491306, 105307497}, + {413509785, 99284903}, + {413496185, 48304367}, + {419496173, 48315719}, + {422501887, 45292801}, + {422500504, 39363184}, + {420425079, 37284347}, + {419476165, 43284347}, + {413496185, 43284347}, + {413497261, 30797428}, + {418986175, 25308513}, + {424005230, 25315076}, + {428496185, 20815924}, + {428512720, 13948847}, + {424866064, 10276075}, + }, + { + }, + }, + { + { + {723893066, 37354349}, + {717673034, 37370791}, + {717673034, 44872138}, + {715673034, 44867768}, + {715673034, 46055353}, + {699219526, 40066777}, + {697880758, 37748547}, + {691985477, 37748293}, + {689014018, 42869257}, + {691985477, 48016003}, + {697575093, 48003007}, + {715671494, 54589493}, + {715656800, 87142158}, + {759954611, 87142158}, + {764193054, 82897328}, + {764193054, 79872138}, + {757173034, 79866968}, + {757173034, 83872138}, + {754419422, 83869509}, + {753193054, 81739327}, + {753193054, 37360571}, + {723893066, 37354349}, + }, + { + }, + }, + { + { + {85607478, 4227596}, + {61739211, 4230337}, + {61739211, 13231393}, + {58725066, 13231405}, + {58721589, 27731406}, + {58738375, 30262521}, + {61739211, 30251413}, + {61736212, 38251411}, + {70759231, 38254724}, + {70905600, 33317391}, + {73749222, 31251468}, + {76592843, 33317393}, + {76739211, 38254516}, + {86765007, 38251411}, + {86759599, 4231393}, + {85607478, 4227596}, + }, + { + }, + }, + { + { + {534839721, 53437770}, + {534839721, 60849059}, + {539898273, 63773857}, + {545461140, 63757881}, + {544859741, 53447836}, + {541839721, 53437862}, + {541710836, 56353878}, + {540193984, 57229659}, + {538859741, 53437862}, + {534839721, 53437770}, + }, + { + }, + }, + { + { + {756086230, 136598477}, + {732054387, 136605752}, + {732052489, 172629505}, + {756091994, 172627853}, + {756086230, 136598477}, + }, + { + }, + }, + { + { + {100337034, 79731391}, + {70296833, 79731391}, + {70311095, 92263567}, + {74329808, 96264260}, + {96344976, 96257215}, + {100344419, 92232243}, + {100337034, 79731391}, + }, + { + }, + }, + { + { + {102331115, 44216643}, + {67311095, 44217252}, + {67311095, 69250964}, + {74329808, 76264260}, + {96334594, 76251411}, + {103335261, 69241401}, + {103345839, 44231404}, + {102331115, 44216643}, + }, + { + }, + }, + { + { + {93849749, 109613798}, + {91771666, 111698636}, + {91772404, 174626800}, + {96782902, 179645338}, + {241790509, 179645349}, + {246800716, 174626800}, + {246802574, 111699755}, + {243934250, 109616385}, + {93849749, 109613798}, + }, + { + }, + }, + { + { + {15856630, 87966835}, + {8414359, 91273170}, + {5891847, 99010553}, + {8403012, 104668172}, + {13739106, 107763252}, + {13739106, 116209175}, + {17959116, 116219127}, + {17959127, 107763252}, + {23952579, 103855773}, + {25806388, 96944174}, + {22553953, 90543787}, + {15856630, 87966835}, + }, + { + }, + }, + { + { + {503922805, 110421794}, + {491110107, 123244292}, + {479598157, 123244304}, + {479601067, 149264312}, + {494260327, 149265241}, + {502929782, 157948320}, + {506490250, 155806171}, + {502950518, 155094962}, + {507193172, 150852294}, + {504364680, 148023895}, + {535816833, 116571757}, + {538656617, 119411542}, + {542887886, 115157558}, + {543594970, 118693080}, + {545330008, 116966050}, + {540309189, 110425901}, + {503922805, 110421794}, + }, + { + }, + }, + { + { + {519310433, 62560296}, + {515749982, 64702434}, + {519289696, 65413661}, + {515047062, 69656303}, + {517875553, 72484703}, + {486423431, 103936848}, + {483595031, 101108448}, + {479352325, 105351055}, + {478645233, 101815525}, + {476917724, 103520870}, + {481923478, 110077233}, + {518337308, 110084297}, + {531130127, 97264312}, + {542630127, 97281049}, + {542639167, 71244292}, + {527979906, 71243363}, + {519310433, 62560296}, + }, + { + }, + }, + { + { + {528658425, 14775300}, + {525975568, 24475413}, + {522556814, 29181341}, + {517517474, 32090757}, + {511736147, 32698600}, + {506200465, 30901018}, + {501879743, 27011092}, + {497782491, 14775300}, + {492372374, 15588397}, + {489384268, 20795320}, + {491253082, 28537271}, + {495185363, 34469052}, + {495178475, 43927542}, + {502032399, 55796416}, + {524402581, 55807400}, + {531706434, 44295318}, + {531205383, 34469052}, + {536679415, 23789946}, + {535868173, 17264403}, + {532873348, 15073849}, + {528658425, 14775300}, + }, + { + }, + }, + { + { + {481122222, 166062916}, + {478115710, 166824472}, + {477103577, 169063247}, + {477106058, 192070670}, + {478623652, 194687013}, + {525109130, 195083267}, + {525117792, 198086965}, + {535129140, 198091624}, + {535129150, 195083267}, + {539038502, 194940807}, + {540865280, 193308821}, + {541132038, 169100183}, + {539614599, 166459484}, + {481122222, 166062916}, + }, + { + }, + }, + { + { + {23771404, 13005453}, + {24774973, 19182457}, + {31971050, 18727127}, + {32556286, 58337520}, + {25390683, 58337566}, + {25063762, 54707065}, + {20168811, 54707252}, + {20171550, 62917175}, + {70810377, 202895528}, + {74314421, 205588631}, + {88674817, 205515176}, + {91837376, 203083756}, + {92280287, 199307207}, + {40674807, 15904975}, + {36849630, 13006690}, + {23771404, 13005453}, + }, + { + }, + }, + { + { + {336421201, 2986256}, + {331176570, 6498191}, + {327552287, 5825511}, + {324913825, 2988891}, + {316226154, 2989990}, + {313040282, 6275291}, + {313040282, 23489990}, + {307126391, 23490002}, + {307140289, 25510010}, + {313040282, 25510010}, + {313040282, 28989990}, + {307126391, 28990002}, + {307140289, 31015515}, + {313040282, 31010010}, + {313040282, 35989990}, + {304534809, 37529785}, + {304524991, 73488855}, + {308554680, 77518546}, + {324040282, 77510010}, + {324040295, 93025333}, + {334574441, 93010010}, + {334574441, 90989990}, + {332560302, 90989990}, + {332560302, 85010010}, + {334560302, 85010010}, + {334561237, 82010010}, + {338540282, 82010010}, + {339540282, 83760010}, + {338540293, 93020012}, + {348060655, 93014679}, + {356564448, 84500000}, + {356560555, 28989990}, + {347334198, 29039989}, + {347334198, 25510010}, + {356510304, 25521084}, + {356510315, 23478922}, + {347560302, 23489990}, + {347560302, 5775291}, + {344874443, 2989990}, + {336421201, 2986256}, + }, + { + }, + }, + { + { + {465152221, 31684687}, + {457606880, 31688302}, + {452659362, 35508617}, + {449044605, 34734089}, + {446478972, 31692751}, + {437784814, 31692957}, + {435521210, 33956565}, + {435532195, 65697616}, + {426028494, 65691361}, + {426025938, 85049712}, + {435532195, 95717636}, + {435524445, 103754026}, + {436995898, 105225463}, + {447552204, 105226323}, + {447552215, 103197497}, + {444552215, 103197616}, + {444552215, 99217636}, + {452032195, 99217636}, + {452032195, 105221758}, + {465588513, 105225463}, + {467059965, 103754026}, + {467052215, 95717636}, + {478053039, 84511285}, + {478056214, 65697616}, + {468552215, 65697616}, + {468563959, 33957323}, + {465152221, 31684687}, + }, + { + }, + }, + { + { + {764927063, 92658416}, + {762115426, 94171595}, + {762122741, 131696443}, + {786415417, 132779578}, + {793690904, 129904572}, + {797383202, 124822853}, + {798269157, 120142660}, + {796710161, 114090278}, + {793387498, 110215980}, + {796094093, 103892242}, + {794107594, 96994001}, + {787445494, 92840355}, + {764927063, 92658416}, + }, + { + }, + }, + { + { + {27496331, 123147467}, + {3202195, 124246400}, + {3203433, 205768600}, + {20223453, 205775606}, + {20223644, 163243606}, + {31297341, 162189074}, + {36789517, 155659691}, + {36967183, 150566416}, + {34468182, 145711036}, + {38465496, 140400171}, + {38952460, 132613091}, + {34771593, 126022444}, + {27496331, 123147467}, + }, + { + }, + }, + { + { + {797556553, 39197820}, + {791313598, 39199767}, + {789506233, 39864015}, + {789522521, 48199767}, + {775974570, 48195721}, + {774022521, 50129235}, + {774008720, 76258022}, + {775974570, 78223833}, + {789522521, 78219787}, + {789522521, 86576919}, + {797556547, 87221747}, + {797556553, 39197820}, + }, + { + }, + }, + { + { + {676593113, 129820144}, + {676565322, 164844636}, + {701599609, 164858650}, + {701599609, 129823260}, + {676593113, 129820144}, + }, + { + }, + }, + { + { + {727646871, 93121321}, + {709122741, 93122138}, + {709122741, 125656310}, + {718769809, 135145243}, + {721622937, 135156111}, + {724152429, 132626619}, + {723734126, 112688301}, + {725837154, 107378546}, + {728976138, 104430846}, + {735847924, 102664848}, + {741289364, 104430846}, + {745202882, 108599767}, + {746590596, 114642158}, + {751137173, 114644887}, + {756151199, 109641674}, + {756149037, 94634278}, + {754642761, 93122138}, + {727646871, 93121321}, + }, + { + }, + }, + { + { + {135915724, 185598906}, + {131396265, 193419009}, + {131399444, 197643260}, + {140399444, 197636810}, + {140399444, 199138818}, + {157419464, 197643916}, + {157422805, 193210743}, + {153046747, 185604789}, + {149044579, 185614655}, + {147324399, 189850396}, + {144168954, 191108901}, + {141187892, 189479768}, + {139917659, 185615382}, + {135915724, 185598906}, + }, + { + }, + }, + { + { + {312619110, 154485844}, + {309601817, 157488332}, + {309599764, 203494810}, + {313109244, 207010010}, + {352900849, 207019221}, + {359629120, 200302405}, + {359638705, 159501827}, + {354621096, 154487830}, + {312619110, 154485844}, + }, + { + }, + }, + { + { + {313120315, 98984639}, + {309609100, 102486971}, + {309596977, 148492024}, + {312591195, 151510010}, + {354608772, 151524494}, + {359629120, 146515788}, + {359638123, 105715491}, + {352907860, 98987790}, + {313120315, 98984639}, + }, + { + }, + }, + { + { + {657746643, 86246732}, + {651722477, 92270881}, + {651720052, 131280884}, + {653947196, 131280884}, + {659746643, 125487816}, + {659746643, 119273826}, + {663742413, 112352691}, + {671726623, 112352691}, + {675733721, 119283349}, + {684745297, 119298573}, + {689758503, 114263168}, + {689752066, 91272158}, + {684746643, 86260871}, + {657746643, 86246732}, + }, + { + }, + }, + { + { + {653940791, 39260871}, + {651720052, 39260871}, + {651726623, 78280611}, + {657746631, 84295035}, + {684746643, 84280891}, + {689752066, 79269604}, + {689746643, 56247942}, + {684745283, 51243184}, + {675733721, 51258413}, + {671726623, 58189071}, + {663742413, 58189071}, + {659746643, 51267936}, + {659746643, 45053950}, + {653940791, 39260871}, + }, + { + }, + }, + { + { + {442365208, 3053303}, + {436408500, 5694021}, + {434342552, 11072741}, + {436986326, 17009033}, + {442365367, 19073360}, + {448299202, 16431441}, + {450365150, 11052721}, + {448299202, 5694021}, + {442365208, 3053303}, + }, + { + }, + }, +}; diff --git a/xs/src/libnest2d/tests/printer_parts.h b/xs/src/libnest2d/tests/printer_parts.h index 41791a189..b9a4eb8fa 100644 --- a/xs/src/libnest2d/tests/printer_parts.h +++ b/xs/src/libnest2d/tests/printer_parts.h @@ -4,9 +4,37 @@ #include #include +#ifndef CLIPPER_BACKEND_HPP +namespace ClipperLib { +using PointImpl = IntPoint; +using PathImpl = Path; +using HoleStore = std::vector; + +struct PolygonImpl { + PathImpl Contour; + HoleStore Holes; + + inline PolygonImpl() {} + + inline explicit PolygonImpl(const PathImpl& cont): Contour(cont) {} + inline explicit PolygonImpl(const HoleStore& holes): + Holes(holes) {} + inline PolygonImpl(const Path& cont, const HoleStore& holes): + Contour(cont), Holes(holes) {} + + inline explicit PolygonImpl(PathImpl&& cont): Contour(std::move(cont)) {} + inline explicit PolygonImpl(HoleStore&& holes): Holes(std::move(holes)) {} + inline PolygonImpl(Path&& cont, HoleStore&& holes): + Contour(std::move(cont)), Holes(std::move(holes)) {} +}; +} +#endif + using TestData = std::vector; +using TestDataEx = std::vector; extern const TestData PRINTER_PART_POLYGONS; extern const TestData STEGOSAUR_POLYGONS; +extern const TestDataEx PRINTER_PART_POLYGONS_EX; #endif // PRINTER_PARTS_H diff --git a/xs/src/libnest2d/tests/test.cpp b/xs/src/libnest2d/tests/test.cpp index 9791688ee..b37274f84 100644 --- a/xs/src/libnest2d/tests/test.cpp +++ b/xs/src/libnest2d/tests/test.cpp @@ -3,8 +3,8 @@ #include #include "printer_parts.h" -#include -#include +#include +//#include "../tools/libnfpglue.hpp" std::vector& prusaParts() { static std::vector ret; @@ -622,26 +622,65 @@ std::vector nfp_testdata = { } }; -} +std::vector nfp_concave_testdata = { + { // ItemPair + { + { + {533726, 142141}, + {532359, 143386}, + {530141, 142155}, + {528649, 160091}, + {533659, 157607}, + {538669, 160091}, + {537178, 142155}, + {534959, 143386}, + {533726, 142141}, + } + }, + { + { + {118305, 11603}, + {118311, 26616}, + {113311, 26611}, + {109311, 29604}, + {109300, 44608}, + {109311, 49631}, + {113300, 52636}, + {118311, 52636}, + {118308, 103636}, + {223830, 103636}, + {236845, 90642}, + {236832, 11630}, + {232825, 11616}, + {210149, 11616}, + {211308, 13625}, + {209315, 17080}, + {205326, 17080}, + {203334, 13629}, + {204493, 11616}, + {118305, 11603}, + } + }, + } +}; -TEST(GeometryAlgorithms, nfpConvexConvex) { +template +void testNfp(const std::vector& testdata) { using namespace libnest2d; - const Coord SCALE = 1000000; - Box bin(210*SCALE, 250*SCALE); int testcase = 0; - auto& exportfun = exportSVG<1, Box>; + auto& exportfun = exportSVG; auto onetest = [&](Item& orbiter, Item& stationary){ testcase++; orbiter.translate({210*SCALE, 0}); - auto&& nfp = Nfp::noFitPolygon(stationary.rawShape(), - orbiter.transformedShape()); + auto&& nfp = Nfp::noFitPolygon(stationary.rawShape(), + orbiter.transformedShape()); auto v = ShapeLike::isValid(nfp); @@ -667,11 +706,9 @@ TEST(GeometryAlgorithms, nfpConvexConvex) { tmp.translate({dx, dy}); - bool notinside = !tmp.isInside(stationary); - bool notintersecting = !Item::intersects(tmp, stationary) || - Item::touches(tmp, stationary); + bool touching = Item::touches(tmp, stationary); - if(!(notinside && notintersecting)) { + if(!touching) { std::vector> inp = { std::ref(stationary), std::ref(tmp), std::ref(infp) }; @@ -679,23 +716,31 @@ TEST(GeometryAlgorithms, nfpConvexConvex) { exportfun(inp, bin, testcase*i++); } - ASSERT_TRUE(notintersecting); - ASSERT_TRUE(notinside); + ASSERT_TRUE(touching); } }; - for(auto& td : nfp_testdata) { + for(auto& td : testdata) { auto orbiter = td.orbiter; auto stationary = td.stationary; onetest(orbiter, stationary); } - for(auto& td : nfp_testdata) { + for(auto& td : testdata) { auto orbiter = td.stationary; auto stationary = td.orbiter; onetest(orbiter, stationary); } } +} + +TEST(GeometryAlgorithms, nfpConvexConvex) { + testNfp(nfp_testdata); +} + +//TEST(GeometryAlgorithms, nfpConcaveConcave) { +// testNfp(nfp_concave_testdata); +//} TEST(GeometryAlgorithms, pointOnPolygonContour) { using namespace libnest2d; @@ -718,6 +763,29 @@ TEST(GeometryAlgorithms, pointOnPolygonContour) { } } +TEST(GeometryAlgorithms, mergePileWithPolygon) { + using namespace libnest2d; + + Rectangle rect1(10, 15); + Rectangle rect2(15, 15); + Rectangle rect3(20, 15); + + rect2.translate({10, 0}); + rect3.translate({25, 0}); + + ShapeLike::Shapes pile; + pile.push_back(rect1.transformedShape()); + pile.push_back(rect2.transformedShape()); + + auto result = Nfp::merge(pile, rect3.transformedShape()); + + ASSERT_EQ(result.size(), 1); + + Rectangle ref(45, 15); + + ASSERT_EQ(ShapeLike::area(result.front()), ref.area()); +} + int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); diff --git a/xs/src/libnest2d/tests/benchmark.h b/xs/src/libnest2d/tools/benchmark.h similarity index 100% rename from xs/src/libnest2d/tests/benchmark.h rename to xs/src/libnest2d/tools/benchmark.h diff --git a/xs/src/libnest2d/tools/libnfpglue.cpp b/xs/src/libnest2d/tools/libnfpglue.cpp new file mode 100644 index 000000000..4cbdb5442 --- /dev/null +++ b/xs/src/libnest2d/tools/libnfpglue.cpp @@ -0,0 +1,182 @@ +//#ifndef NDEBUG +//#define NFP_DEBUG +//#endif + +#include "libnfpglue.hpp" +#include "tools/libnfporb/libnfporb.hpp" + +namespace libnest2d { + +namespace { +inline bool vsort(const libnfporb::point_t& v1, const libnfporb::point_t& v2) +{ + using Coord = libnfporb::coord_t; + Coord x1 = v1.x_, x2 = v2.x_, y1 = v1.y_, y2 = v2.y_; + auto diff = y1 - y2; +#ifdef LIBNFP_USE_RATIONAL + long double diffv = diff.convert_to(); +#else + long double diffv = diff.val(); +#endif + if(std::abs(diffv) <= + std::numeric_limits::epsilon()) + return x1 < x2; + + return diff < 0; +} + +TCoord getX(const libnfporb::point_t& p) { +#ifdef LIBNFP_USE_RATIONAL + return p.x_.convert_to>(); +#else + return static_cast>(std::round(p.x_.val())); +#endif +} + +TCoord getY(const libnfporb::point_t& p) { +#ifdef LIBNFP_USE_RATIONAL + return p.y_.convert_to>(); +#else + return static_cast>(std::round(p.y_.val())); +#endif +} + +libnfporb::point_t scale(const libnfporb::point_t& p, long double factor) { +#ifdef LIBNFP_USE_RATIONAL + auto px = p.x_.convert_to(); + auto py = p.y_.convert_to(); +#else + long double px = p.x_.val(); + long double py = p.y_.val(); +#endif + return libnfporb::point_t(px*factor, py*factor); +} + +} + +PolygonImpl _nfp(const PolygonImpl &sh, const PolygonImpl &cother) +{ + using Vertex = PointImpl; + + PolygonImpl ret; + +// try { + libnfporb::polygon_t pstat, porb; + + boost::geometry::convert(sh, pstat); + boost::geometry::convert(cother, porb); + + long double factor = 0.0000001;//libnfporb::NFP_EPSILON; + long double refactor = 1.0/factor; + + for(auto& v : pstat.outer()) v = scale(v, factor); +// std::string message; +// boost::geometry::is_valid(pstat, message); +// std::cout << message << std::endl; + for(auto& h : pstat.inners()) for(auto& v : h) v = scale(v, factor); + + for(auto& v : porb.outer()) v = scale(v, factor); +// message; +// boost::geometry::is_valid(porb, message); +// std::cout << message << std::endl; + for(auto& h : porb.inners()) for(auto& v : h) v = scale(v, factor); + + + // this can throw + auto nfp = libnfporb::generateNFP(pstat, porb, true); + + auto &ct = ShapeLike::getContour(ret); + ct.reserve(nfp.front().size()+1); + for(auto v : nfp.front()) { + v = scale(v, refactor); + ct.emplace_back(getX(v), getY(v)); + } + ct.push_back(ct.front()); + std::reverse(ct.begin(), ct.end()); + + auto &rholes = ShapeLike::holes(ret); + for(size_t hidx = 1; hidx < nfp.size(); ++hidx) { + if(nfp[hidx].size() >= 3) { + rholes.push_back({}); + auto& h = rholes.back(); + h.reserve(nfp[hidx].size()+1); + + for(auto& v : nfp[hidx]) { + v = scale(v, refactor); + h.emplace_back(getX(v), getY(v)); + } + h.push_back(h.front()); + std::reverse(h.begin(), h.end()); + } + } + + auto& cmp = vsort; + std::sort(pstat.outer().begin(), pstat.outer().end(), cmp); + std::sort(porb.outer().begin(), porb.outer().end(), cmp); + + // leftmost lower vertex of the stationary polygon + auto& touch_sh = scale(pstat.outer().back(), refactor); + // rightmost upper vertex of the orbiting polygon + auto& touch_other = scale(porb.outer().front(), refactor); + + // Calculate the difference and move the orbiter to the touch position. + auto dtouch = touch_sh - touch_other; + auto _top_other = scale(porb.outer().back(), refactor) + dtouch; + + Vertex top_other(getX(_top_other), getY(_top_other)); + + // Get the righmost upper vertex of the nfp and move it to the RMU of + // the orbiter because they should coincide. + auto&& top_nfp = Nfp::rightmostUpVertex(ret); + auto dnfp = top_other - top_nfp; + + std::for_each(ShapeLike::begin(ret), ShapeLike::end(ret), + [&dnfp](Vertex& v) { v+= dnfp; } ); + + for(auto& h : ShapeLike::holes(ret)) + std::for_each( h.begin(), h.end(), + [&dnfp](Vertex& v) { v += dnfp; } ); + +// } catch(std::exception& e) { +// std::cout << "Error: " << e.what() << "\nTrying with convex hull..." << std::endl; +// auto ch_stat = ShapeLike::convexHull(sh); +// auto ch_orb = ShapeLike::convexHull(cother); +// ret = Nfp::nfpConvexOnly(ch_stat, ch_orb); +// } + + return ret; +} + +PolygonImpl Nfp::NfpImpl::operator()( + const PolygonImpl &sh, const ClipperLib::PolygonImpl &cother) +{ + return _nfp(sh, cother);//nfpConvexOnly(sh, cother); +} + +PolygonImpl Nfp::NfpImpl::operator()( + const PolygonImpl &sh, const ClipperLib::PolygonImpl &cother) +{ + return _nfp(sh, cother); +} + +PolygonImpl Nfp::NfpImpl::operator()( + const PolygonImpl &sh, const ClipperLib::PolygonImpl &cother) +{ + return _nfp(sh, cother); +} + +PolygonImpl +Nfp::NfpImpl::operator()( + const PolygonImpl &sh, const ClipperLib::PolygonImpl &cother) +{ + return _nfp(sh, cother); +} + +PolygonImpl +Nfp::NfpImpl::operator()( + const PolygonImpl &sh, const ClipperLib::PolygonImpl &cother) +{ + return _nfp(sh, cother); +} + +} diff --git a/xs/src/libnest2d/tools/libnfpglue.hpp b/xs/src/libnest2d/tools/libnfpglue.hpp new file mode 100644 index 000000000..87b0e0833 --- /dev/null +++ b/xs/src/libnest2d/tools/libnfpglue.hpp @@ -0,0 +1,44 @@ +#ifndef LIBNFPGLUE_HPP +#define LIBNFPGLUE_HPP + +#include + +namespace libnest2d { + +PolygonImpl _nfp(const PolygonImpl& sh, const PolygonImpl& cother); + +template<> +struct Nfp::NfpImpl { + PolygonImpl operator()(const PolygonImpl& sh, const PolygonImpl& cother); +}; + +template<> +struct Nfp::NfpImpl { + PolygonImpl operator()(const PolygonImpl& sh, const PolygonImpl& cother); +}; + +template<> +struct Nfp::NfpImpl { + PolygonImpl operator()(const PolygonImpl& sh, const PolygonImpl& cother); +}; + +template<> +struct Nfp::NfpImpl { + PolygonImpl operator()(const PolygonImpl& sh, const PolygonImpl& cother); +}; + +template<> +struct Nfp::NfpImpl { + PolygonImpl operator()(const PolygonImpl& sh, const PolygonImpl& cother); +}; + +template<> struct Nfp::MaxNfpLevel { + static const BP2D_CONSTEXPR NfpLevel value = +// NfpLevel::CONVEX_ONLY; + NfpLevel::BOTH_CONCAVE_WITH_HOLES; +}; + +} + + +#endif // LIBNFPGLUE_HPP diff --git a/xs/src/libnest2d/tools/libnfporb/LICENSE b/xs/src/libnest2d/tools/libnfporb/LICENSE new file mode 100644 index 000000000..94a9ed024 --- /dev/null +++ b/xs/src/libnest2d/tools/libnfporb/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/xs/src/libnest2d/tools/libnfporb/ORIGIN b/xs/src/libnest2d/tools/libnfporb/ORIGIN new file mode 100644 index 000000000..788bfd9af --- /dev/null +++ b/xs/src/libnest2d/tools/libnfporb/ORIGIN @@ -0,0 +1,2 @@ +https://github.com/kallaballa/libnfp.git +commit hash a5cf9f6a76ddab95567fccf629d4d099b60237d7 \ No newline at end of file diff --git a/xs/src/libnest2d/tools/libnfporb/README.md b/xs/src/libnest2d/tools/libnfporb/README.md new file mode 100644 index 000000000..9698972be --- /dev/null +++ b/xs/src/libnest2d/tools/libnfporb/README.md @@ -0,0 +1,89 @@ +[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html) +##### If you give me a real good reason i might be willing to give you permission to use it under a different license for a specific application. Real good reasons include the following (non-exhausive): the greater good, educational purpose and money :) + +# libnfporb +Implementation of a robust no-fit polygon generation in a C++ library using an orbiting approach. + +__Please note:__ The paper this implementation is based it on has several bad assumptions that required me to "improvise". That means the code doesn't reflect the paper anymore and is running way slower than expected. At the moment I'm working on implementing a new approach based on this paper (using minkowski sums): https://eprints.soton.ac.uk/36850/1/CORMSIS-05-05.pdf + +## Description + +The no-fit polygon optimization makes it possible to check for overlap (or non-overlapping touch) of two polygons with only 1 point in polygon check (by providing the set of non-overlapping placements). +This library implements the orbiting approach to generate the no-fit polygon: Given two polygons A and B, A is the stationary one and B the orbiting one, B is slid as tightly as possibly around the edges of polygon A. During the orbiting a chosen reference point is tracked. By tracking the movement of the reference point a third polygon can be generated: the no-fit polygon. + +Once the no-fit polygon has been generated it can be used to test for overlap by only checking if the reference point is inside the NFP (overlap) outside the NFP (no overlap) or exactly on the edge of the NFP (touch). + +### Examples: + +The polygons: + +![Start of NFP](/images/start.png?raw=true) + +Orbiting: + +![State 1](/images/next0.png?raw=true) +![State 2](/images/next1.png?raw=true) +![State 3](/images/next2.png?raw=true) +![State 4](/images/next3.png?raw=true) + +![State 5](/images/next4.png?raw=true) +![State 6](/images/next5.png?raw=true) +![State 7](/images/next6.png?raw=true) +![State 8](/images/next7.png?raw=true) + +![State 9](/images/next8.png?raw=true) + +The resulting NFP is red: + +![nfp](/images/nfp.png?raw=true) + +Polygons can have concavities, holes, interlocks or might fit perfectly: + +![concavities](/images/concavities.png?raw=true) +![hole](/images/hole.png?raw=true) +![interlock](/images/interlock.png?raw=true) +![jigsaw](/images/jigsaw.png?raw=true) + +## The Approach +The approch of this library is highly inspired by the scientific paper [Complete and robust no-fit polygon generation +for the irregular stock cutting problem](https://pdfs.semanticscholar.org/e698/0dd78306ba7d5bb349d20c6d8f2e0aa61062.pdf) and by [Svgnest](http://svgnest.com) + +Note that is wasn't completely possible to implement it as suggested in the paper because it had several shortcomings that prevent complete NFP generation on some of my test cases. Especially the termination criteria (reference point returns to first point of NFP) proved to be wrong (see: test-case rect). Also tracking of used edges can't be performed as suggested in the paper since there might be situations where no edge of A is traversed (see: test-case doublecon). + +By default the library is using floating point as coordinate type but by defining the flag "LIBNFP_USE_RATIONAL" the library can be instructed to use infinite precision. + +## Build +The library has two dependencies: [Boost Geometry](http://www.boost.org/doc/libs/1_65_1/libs/geometry/doc/html/index.html) and [libgmp](https://gmplib.org). You need to install those first before building. Note that building is only required for the examples. The library itself is header-only. + + git clone https://github.com/kallaballa/libnfp.git + cd libnfp + make + sudo make install + +## Code Example + +```c++ +//uncomment next line to use infinite precision (slow) +//#define LIBNFP_USE_RATIONAL +#include "../src/libnfp.hpp" + +int main(int argc, char** argv) { + using namespace libnfp; + polygon_t pA; + polygon_t pB; + //read polygons from wkt files + read_wkt_polygon(argv[1], pA); + read_wkt_polygon(argv[2], pB); + + //generate NFP of polygon A and polygon B and check the polygons for validity. + //When the third parameters is false validity check is skipped for a little performance increase + nfp_t nfp = generateNFP(pA, pB, true); + + //write a svg containing pA, pB and NFP + write_svg("nfp.svg",{pA,pB},nfp); + return 0; +} +``` +Run the example program: + + examples/nfp data/crossing/A.wkt data/crossing/B.wkt diff --git a/xs/src/libnest2d/tools/libnfporb/libnfporb.hpp b/xs/src/libnest2d/tools/libnfporb/libnfporb.hpp new file mode 100644 index 000000000..8cb34567e --- /dev/null +++ b/xs/src/libnest2d/tools/libnfporb/libnfporb.hpp @@ -0,0 +1,1547 @@ +#ifndef NFP_HPP_ +#define NFP_HPP_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(_MSC_VER) && _MSC_VER <= 1800 || __cplusplus < 201103L + #define LIBNFP_NOEXCEPT + #define LIBNFP_CONSTEXPR +#elif __cplusplus >= 201103L + #define LIBNFP_NOEXCEPT noexcept + #define LIBNFP_CONSTEXPR constexpr +#endif + +#ifdef LIBNFP_USE_RATIONAL +#include +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef LIBNFP_USE_RATIONAL +namespace bm = boost::multiprecision; +#endif +namespace bg = boost::geometry; +namespace trans = boost::geometry::strategy::transform; + + +namespace libnfporb { +#ifdef NFP_DEBUG +#define DEBUG_VAL(x) std::cerr << x << std::endl; +#define DEBUG_MSG(title, value) std::cerr << title << ":" << value << std::endl; +#else +#define DEBUG_VAL(x) +#define DEBUG_MSG(title, value) +#endif + +using std::string; + +static LIBNFP_CONSTEXPR long double NFP_EPSILON=0.00000001; + +class LongDouble { +private: + long double val_; +public: + LongDouble() : val_(0) { + } + + LongDouble(const long double& val) : val_(val) { + } + + void setVal(const long double& v) { + val_ = v; + } + + long double val() const { + return val_; + } + + LongDouble operator/(const LongDouble& other) const { + return this->val_ / other.val_; + } + + LongDouble operator*(const LongDouble& other) const { + return this->val_ * other.val_; + } + + LongDouble operator-(const LongDouble& other) const { + return this->val_ - other.val_; + } + + LongDouble operator-() const { + return this->val_ * -1; + } + + LongDouble operator+(const LongDouble& other) const { + return this->val_ + other.val_; + } + + void operator/=(const LongDouble& other) { + this->val_ = this->val_ / other.val_; + } + + void operator*=(const LongDouble& other) { + this->val_ = this->val_ * other.val_; + } + + void operator-=(const LongDouble& other) { + this->val_ = this->val_ - other.val_; + } + + void operator+=(const LongDouble& other) { + this->val_ = this->val_ + other.val_; + } + + bool operator==(const int& other) const { + return this->operator ==(static_cast(other)); + } + + bool operator==(const LongDouble& other) const { + return this->operator ==(other.val()); + } + + bool operator==(const long double& other) const { + return this->val() == other; + } + + bool operator!=(const int& other) const { + return !this->operator ==(other); + } + + bool operator!=(const LongDouble& other) const { + return !this->operator ==(other); + } + + bool operator!=(const long double& other) const { + return !this->operator ==(other); + } + + bool operator<(const int& other) const { + return this->operator <(static_cast(other)); + } + + bool operator<(const LongDouble& other) const { + return this->operator <(other.val()); + } + + bool operator<(const long double& other) const { + return this->val() < other; + } + + bool operator>(const int& other) const { + return this->operator >(static_cast(other)); + } + + bool operator>(const LongDouble& other) const { + return this->operator >(other.val()); + } + + bool operator>(const long double& other) const { + return this->val() > other; + } + + bool operator>=(const int& other) const { + return this->operator >=(static_cast(other)); + } + + bool operator>=(const LongDouble& other) const { + return this->operator >=(other.val()); + } + + bool operator>=(const long double& other) const { + return this->val() >= other; + } + + bool operator<=(const int& other) const { + return this->operator <=(static_cast(other)); + } + + bool operator<=(const LongDouble& other) const { + return this->operator <=(other.val()); + } + + bool operator<=(const long double& other) const { + return this->val() <= other; + } +}; +} + + +namespace std { +template<> + struct numeric_limits + { + static const LIBNFP_CONSTEXPR bool is_specialized = true; + + static const LIBNFP_CONSTEXPR long double + min() LIBNFP_NOEXCEPT { return std::numeric_limits::min(); } + + static LIBNFP_CONSTEXPR long double + max() LIBNFP_NOEXCEPT { return std::numeric_limits::max(); } + +#if __cplusplus >= 201103L + static LIBNFP_CONSTEXPR long double + lowest() LIBNFP_NOEXCEPT { return -std::numeric_limits::lowest(); } +#endif + + static const LIBNFP_CONSTEXPR int digits = std::numeric_limits::digits; + static const LIBNFP_CONSTEXPR int digits10 = std::numeric_limits::digits10; +#if __cplusplus >= 201103L + static const LIBNFP_CONSTEXPR int max_digits10 + = std::numeric_limits::max_digits10; +#endif + static const LIBNFP_CONSTEXPR bool is_signed = true; + static const LIBNFP_CONSTEXPR bool is_integer = false; + static const LIBNFP_CONSTEXPR bool is_exact = false; + static const LIBNFP_CONSTEXPR int radix = std::numeric_limits::radix; + + static const LIBNFP_CONSTEXPR long double + epsilon() LIBNFP_NOEXCEPT { return libnfporb::NFP_EPSILON; } + + static const LIBNFP_CONSTEXPR long double + round_error() LIBNFP_NOEXCEPT { return 0.5L; } + + static const LIBNFP_CONSTEXPR int min_exponent = std::numeric_limits::min_exponent; + static const LIBNFP_CONSTEXPR int min_exponent10 = std::numeric_limits::min_exponent10; + static const LIBNFP_CONSTEXPR int max_exponent = std::numeric_limits::max_exponent; + static const LIBNFP_CONSTEXPR int max_exponent10 = std::numeric_limits::max_exponent10; + + + static const LIBNFP_CONSTEXPR bool has_infinity = std::numeric_limits::has_infinity; + static const LIBNFP_CONSTEXPR bool has_quiet_NaN = std::numeric_limits::has_quiet_NaN; + static const LIBNFP_CONSTEXPR bool has_signaling_NaN = has_quiet_NaN; + static const LIBNFP_CONSTEXPR float_denorm_style has_denorm + = std::numeric_limits::has_denorm; + static const LIBNFP_CONSTEXPR bool has_denorm_loss + = std::numeric_limits::has_denorm_loss; + + + static const LIBNFP_CONSTEXPR long double + infinity() LIBNFP_NOEXCEPT { return std::numeric_limits::infinity(); } + + static const LIBNFP_CONSTEXPR long double + quiet_NaN() LIBNFP_NOEXCEPT { return std::numeric_limits::quiet_NaN(); } + + static const LIBNFP_CONSTEXPR long double + signaling_NaN() LIBNFP_NOEXCEPT { return std::numeric_limits::signaling_NaN(); } + + + static const LIBNFP_CONSTEXPR long double + denorm_min() LIBNFP_NOEXCEPT { return std::numeric_limits::denorm_min(); } + + static const LIBNFP_CONSTEXPR bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + + static const LIBNFP_CONSTEXPR bool is_bounded = true; + static const LIBNFP_CONSTEXPR bool is_modulo = false; + + static const LIBNFP_CONSTEXPR bool traps = std::numeric_limits::traps; + static const LIBNFP_CONSTEXPR bool tinyness_before = + std::numeric_limits::tinyness_before; + static const LIBNFP_CONSTEXPR float_round_style round_style = + round_to_nearest; + }; +} + +namespace boost { +namespace numeric { + template<> + struct raw_converter> + { + typedef boost::numeric::conversion_traits::result_type result_type ; + typedef boost::numeric::conversion_traits::argument_type argument_type ; + + static result_type low_level_convert ( argument_type s ) { return s.val() ; } + } ; +} +} + +namespace libnfporb { + +#ifndef LIBNFP_USE_RATIONAL +typedef LongDouble coord_t; +#else +typedef bm::number rational_t; +typedef rational_t coord_t; +#endif + +bool equals(const LongDouble& lhs, const LongDouble& rhs); +#ifdef LIBNFP_USE_RATIONAL +bool equals(const rational_t& lhs, const rational_t& rhs); +#endif +bool equals(const long double& lhs, const long double& rhs); + +const coord_t MAX_COORD = 999999999999999999.0; +const coord_t MIN_COORD = std::numeric_limits::min(); + +class point_t { +public: + point_t() : x_(0), y_(0) { + } + point_t(coord_t x, coord_t y) : x_(x), y_(y) { + } + bool marked_ = false; + coord_t x_; + coord_t y_; + + point_t operator-(const point_t& other) const { + point_t result = *this; + bg::subtract_point(result, other); + return result; + } + + point_t operator+(const point_t& other) const { + point_t result = *this; + bg::add_point(result, other); + return result; + } + + bool operator==(const point_t& other) const { + return bg::equals(this, other); + } + + bool operator!=(const point_t& other) const { + return !this->operator ==(other); + } + + bool operator<(const point_t& other) const { + return boost::geometry::math::smaller(this->x_, other.x_) || (equals(this->x_, other.x_) && boost::geometry::math::smaller(this->y_, other.y_)); + } +}; + + + + +inline long double toLongDouble(const LongDouble& c) { + return c.val(); +} + +#ifdef LIBNFP_USE_RATIONAL +inline long double toLongDouble(const rational_t& c) { + return bm::numerator(c).convert_to() / bm::denominator(c).convert_to(); +} +#endif + +std::ostream& operator<<(std::ostream& os, const coord_t& p) { + os << toLongDouble(p); + return os; +} + +std::istream& operator>>(std::istream& is, LongDouble& c) { + long double val; + is >> val; + c.setVal(val); + return is; +} + +std::ostream& operator<<(std::ostream& os, const point_t& p) { + os << "{" << toLongDouble(p.x_) << "," << toLongDouble(p.y_) << "}"; + return os; +} +const point_t INVALID_POINT = {MAX_COORD, MAX_COORD}; + +typedef bg::model::segment segment_t; +} + +#ifdef LIBNFP_USE_RATIONAL +inline long double acos(const libnfporb::rational_t& r) { + return acos(libnfporb::toLongDouble(r)); +} +#endif + +inline long double acos(const libnfporb::LongDouble& ld) { + return acos(libnfporb::toLongDouble(ld)); +} + +#ifdef LIBNFP_USE_RATIONAL +inline long double sqrt(const libnfporb::rational_t& r) { + return sqrt(libnfporb::toLongDouble(r)); +} +#endif + +inline long double sqrt(const libnfporb::LongDouble& ld) { + return sqrt(libnfporb::toLongDouble(ld)); +} + +BOOST_GEOMETRY_REGISTER_POINT_2D(libnfporb::point_t, libnfporb::coord_t, cs::cartesian, x_, y_) + + +namespace boost { +namespace geometry { +namespace math { +namespace detail { + +template <> +struct square_root +{ + typedef libnfporb::LongDouble return_type; + + static inline libnfporb::LongDouble apply(libnfporb::LongDouble const& a) + { + return std::sqrt(a.val()); + } +}; + +#ifdef LIBNFP_USE_RATIONAL +template <> +struct square_root +{ + typedef libnfporb::rational_t return_type; + + static inline libnfporb::rational_t apply(libnfporb::rational_t const& a) + { + return std::sqrt(libnfporb::toLongDouble(a)); + } +}; +#endif + +template<> +struct abs + { + static libnfporb::LongDouble apply(libnfporb::LongDouble const& value) + { + libnfporb::LongDouble const zero = libnfporb::LongDouble(); + return value.val() < zero.val() ? -value.val() : value.val(); + } + }; + +template <> +struct equals +{ + template + static inline bool apply(libnfporb::LongDouble const& lhs, libnfporb::LongDouble const& rhs, Policy const& policy) + { + if(lhs.val() == rhs.val()) + return true; + + return bg::math::detail::abs::apply(lhs.val() - rhs.val()) <= policy.apply(lhs.val(), rhs.val()) * libnfporb::NFP_EPSILON; + } +}; + +template <> +struct smaller +{ + static inline bool apply(libnfporb::LongDouble const& lhs, libnfporb::LongDouble const& rhs) + { + if(lhs.val() == rhs.val() || bg::math::detail::abs::apply(lhs.val() - rhs.val()) <= libnfporb::NFP_EPSILON * std::max(lhs.val(), rhs.val())) + return false; + + return lhs < rhs; + } +}; +} +} +} +} + +namespace libnfporb { +inline bool smaller(const LongDouble& lhs, const LongDouble& rhs) { + return boost::geometry::math::detail::smaller::apply(lhs, rhs); +} + +inline bool larger(const LongDouble& lhs, const LongDouble& rhs) { + return smaller(rhs, lhs); +} + +bool equals(const LongDouble& lhs, const LongDouble& rhs) { + if(lhs.val() == rhs.val()) + return true; + + return bg::math::detail::abs::apply(lhs.val() - rhs.val()) <= libnfporb::NFP_EPSILON * std::max(lhs.val(), rhs.val()); +} + +#ifdef LIBNFP_USE_RATIONAL +inline bool smaller(const rational_t& lhs, const rational_t& rhs) { + return lhs < rhs; +} + +inline bool larger(const rational_t& lhs, const rational_t& rhs) { + return smaller(rhs, lhs); +} + +bool equals(const rational_t& lhs, const rational_t& rhs) { + return lhs == rhs; +} +#endif + +inline bool smaller(const long double& lhs, const long double& rhs) { + return lhs < rhs; +} + +inline bool larger(const long double& lhs, const long double& rhs) { + return smaller(rhs, lhs); +} + + +bool equals(const long double& lhs, const long double& rhs) { + return lhs == rhs; +} + +typedef bg::model::polygon polygon_t; +typedef std::vector nfp_t; +typedef bg::model::linestring linestring_t; + +typedef polygon_t::ring_type::size_type psize_t; + +typedef bg::model::d2::point_xy pointf_t; +typedef bg::model::segment segmentf_t; +typedef bg::model::polygon polygonf_t; + +polygonf_t::ring_type convert(const polygon_t::ring_type& r) { + polygonf_t::ring_type rf; + for(const auto& pt : r) { + rf.push_back(pointf_t(toLongDouble(pt.x_), toLongDouble(pt.y_))); + } + return rf; +} + +polygonf_t convert(polygon_t p) { + polygonf_t pf; + pf.outer() = convert(p.outer()); + + for(const auto& r : p.inners()) { + pf.inners().push_back(convert(r)); + } + + return pf; +} + +polygon_t nfpRingsToNfpPoly(const nfp_t& nfp) { + polygon_t nfppoly; + for (const auto& pt : nfp.front()) { + nfppoly.outer().push_back(pt); + } + + for (size_t i = 1; i < nfp.size(); ++i) { + nfppoly.inners().push_back({}); + for (const auto& pt : nfp[i]) { + nfppoly.inners().back().push_back(pt); + } + } + + return nfppoly; +} + +void write_svg(std::string const& filename,const std::vector& segments) { + std::ofstream svg(filename.c_str()); + + boost::geometry::svg_mapper mapper(svg, 100, 100, "width=\"200mm\" height=\"200mm\" viewBox=\"-250 -250 500 500\""); + for(const auto& seg : segments) { + segmentf_t segf({toLongDouble(seg.first.x_), toLongDouble(seg.first.y_)}, {toLongDouble(seg.second.x_), toLongDouble(seg.second.y_)}); + mapper.add(segf); + mapper.map(segf, "fill-opacity:0.5;fill:rgb(153,204,0);stroke:rgb(153,204,0);stroke-width:2"); + } +} + +void write_svg(std::string const& filename, const polygon_t& p, const polygon_t::ring_type& ring) { + std::ofstream svg(filename.c_str()); + + boost::geometry::svg_mapper mapper(svg, 100, 100, "width=\"200mm\" height=\"200mm\" viewBox=\"-250 -250 500 500\""); + auto pf = convert(p); + auto rf = convert(ring); + + mapper.add(pf); + mapper.map(pf, "fill-opacity:0.5;fill:rgb(153,204,0);stroke:rgb(153,204,0);stroke-width:2"); + mapper.add(rf); + mapper.map(rf, "fill-opacity:0.5;fill:rgb(153,204,0);stroke:rgb(153,204,0);stroke-width:2"); +} + +void write_svg(std::string const& filename, std::vector const& polygons) { + std::ofstream svg(filename.c_str()); + + boost::geometry::svg_mapper mapper(svg, 100, 100, "width=\"200mm\" height=\"200mm\" viewBox=\"-250 -250 500 500\""); + for (auto p : polygons) { + auto pf = convert(p); + mapper.add(pf); + mapper.map(pf, "fill-opacity:0.5;fill:rgb(153,204,0);stroke:rgb(153,204,0);stroke-width:2"); + } +} + +void write_svg(std::string const& filename, std::vector const& polygons, const nfp_t& nfp) { + polygon_t nfppoly; + for (const auto& pt : nfp.front()) { + nfppoly.outer().push_back(pt); + } + + for (size_t i = 1; i < nfp.size(); ++i) { + nfppoly.inners().push_back({}); + for (const auto& pt : nfp[i]) { + nfppoly.inners().back().push_back(pt); + } + } + std::ofstream svg(filename.c_str()); + + boost::geometry::svg_mapper mapper(svg, 100, 100, "width=\"200mm\" height=\"200mm\" viewBox=\"-250 -250 500 500\""); + for (auto p : polygons) { + auto pf = convert(p); + mapper.add(pf); + mapper.map(pf, "fill-opacity:0.5;fill:rgb(153,204,0);stroke:rgb(153,204,0);stroke-width:2"); + } + bg::correct(nfppoly); + auto nfpf = convert(nfppoly); + mapper.add(nfpf); + mapper.map(nfpf, "fill-opacity:0.5;fill:rgb(204,153,0);stroke:rgb(204,153,0);stroke-width:2"); + + for(auto& r: nfpf.inners()) { + if(r.size() == 1) { + mapper.add(r.front()); + mapper.map(r.front(), "fill-opacity:0.5;fill:rgb(204,153,0);stroke:rgb(204,153,0);stroke-width:2"); + } else if(r.size() == 2) { + segmentf_t seg(r.front(), *(r.begin()+1)); + mapper.add(seg); + mapper.map(seg, "fill-opacity:0.5;fill:rgb(204,153,0);stroke:rgb(204,153,0);stroke-width:2"); + } + } +} + +std::ostream& operator<<(std::ostream& os, const segment_t& seg) { + os << "{" << seg.first << "," << seg.second << "}"; + return os; +} + +bool operator<(const segment_t& lhs, const segment_t& rhs) { + return lhs.first < rhs.first || ((lhs.first == rhs.first) && (lhs.second < rhs.second)); +} + +bool operator==(const segment_t& lhs, const segment_t& rhs) { + return (lhs.first == rhs.first && lhs.second == rhs.second) || (lhs.first == rhs.second && lhs.second == rhs.first); +} + +bool operator!=(const segment_t& lhs, const segment_t& rhs) { + return !operator==(lhs,rhs); +} + +enum Alignment { + LEFT, + RIGHT, + ON +}; + +point_t normalize(const point_t& pt) { + point_t norm = pt; + coord_t len = bg::length(segment_t{{0,0},pt}); + + if(len == 0.0L) + return {0,0}; + + norm.x_ /= len; + norm.y_ /= len; + + return norm; +} + +Alignment get_alignment(const segment_t& seg, const point_t& pt){ + coord_t res = ((seg.second.x_ - seg.first.x_)*(pt.y_ - seg.first.y_) + - (seg.second.y_ - seg.first.y_)*(pt.x_ - seg.first.x_)); + + if(equals(res, 0)) { + return ON; + } else if(larger(res,0)) { + return LEFT; + } else { + return RIGHT; + } +} + +long double get_inner_angle(const point_t& joint, const point_t& end1, const point_t& end2) { + coord_t dx21 = end1.x_-joint.x_; + coord_t dx31 = end2.x_-joint.x_; + coord_t dy21 = end1.y_-joint.y_; + coord_t dy31 = end2.y_-joint.y_; + coord_t m12 = sqrt((dx21*dx21 + dy21*dy21)); + coord_t m13 = sqrt((dx31*dx31 + dy31*dy31)); + if(m12 == 0.0L || m13 == 0.0L) + return 0; + return acos( (dx21*dx31 + dy21*dy31) / (m12 * m13) ); +} + +struct TouchingPoint { + enum Type { + VERTEX, + A_ON_B, + B_ON_A + }; + Type type_; + psize_t A_; + psize_t B_; +}; + +struct TranslationVector { + point_t vector_; + segment_t edge_; + bool fromA_; + string name_; + + bool operator<(const TranslationVector& other) const { + return this->vector_ < other.vector_ || ((this->vector_ == other.vector_) && (this->edge_ < other.edge_)); + } +}; + +std::ostream& operator<<(std::ostream& os, const TranslationVector& tv) { + os << "{" << tv.edge_ << " -> " << tv.vector_ << "} = " << tv.name_; + return os; +} + + +void read_wkt_polygon(const string& filename, polygon_t& p) { + std::ifstream t(filename); + + std::string str; + t.seekg(0, std::ios::end); + str.reserve(t.tellg()); + t.seekg(0, std::ios::beg); + + str.assign((std::istreambuf_iterator(t)), + std::istreambuf_iterator()); + + str.pop_back(); + bg::read_wkt(str, p); + bg::correct(p); +} + +std::vector find_minimum_y(const polygon_t& p) { + std::vector result; + coord_t min = MAX_COORD; + auto& po = p.outer(); + for(psize_t i = 0; i < p.outer().size() - 1; ++i) { + if(smaller(po[i].y_, min)) { + result.clear(); + min = po[i].y_; + result.push_back(i); + } else if (equals(po[i].y_, min)) { + result.push_back(i); + } + } + return result; +} + +std::vector find_maximum_y(const polygon_t& p) { + std::vector result; + coord_t max = MIN_COORD; + auto& po = p.outer(); + for(psize_t i = 0; i < p.outer().size() - 1; ++i) { + if(larger(po[i].y_, max)) { + result.clear(); + max = po[i].y_; + result.push_back(i); + } else if (equals(po[i].y_, max)) { + result.push_back(i); + } + } + return result; +} + +psize_t find_point(const polygon_t::ring_type& ring, const point_t& pt) { + for(psize_t i = 0; i < ring.size(); ++i) { + if(ring[i] == pt) + return i; + } + return std::numeric_limits::max(); +} + +std::vector findTouchingPoints(const polygon_t::ring_type& ringA, const polygon_t::ring_type& ringB) { + std::vector touchers; + for(psize_t i = 0; i < ringA.size() - 1; i++) { + psize_t nextI = i+1; + for(psize_t j = 0; j < ringB.size() - 1; j++) { + psize_t nextJ = j+1; + if(ringA[i] == ringB[j]) { + touchers.push_back({TouchingPoint::VERTEX, i, j}); + } else if (ringA[nextI] != ringB[j] && bg::intersects(segment_t(ringA[i],ringA[nextI]), ringB[j])) { + touchers.push_back({TouchingPoint::B_ON_A, nextI, j}); + } else if (ringB[nextJ] != ringA[i] && bg::intersects(segment_t(ringB[j],ringB[nextJ]), ringA[i])) { + touchers.push_back({TouchingPoint::A_ON_B, i, nextJ}); + } + } + } + return touchers; +} + +//TODO deduplicate code +TranslationVector trimVector(const polygon_t::ring_type& rA, const polygon_t::ring_type& rB, const TranslationVector& tv) { + coord_t shortest = bg::length(tv.edge_); + TranslationVector trimmed = tv; + for(const auto& ptA : rA) { + point_t translated; + //for polygon A we invert the translation + trans::translate_transformer translate(-tv.vector_.x_, -tv.vector_.y_); + boost::geometry::transform(ptA, translated, translate); + linestring_t projection; + segment_t segproj(ptA, translated); + projection.push_back(ptA); + projection.push_back(translated); + std::vector intersections; + bg::intersection(rB, projection, intersections); + if(bg::touches(projection, rB) && intersections.size() < 2) { + continue; + } + + //find shortest intersection + coord_t len; + segment_t segi; + for(const auto& pti : intersections) { + segi = segment_t(ptA,pti); + len = bg::length(segi); + if(smaller(len, shortest)) { + trimmed.vector_ = ptA - pti; + trimmed.edge_ = segi; + shortest = len; + } + } + } + + for(const auto& ptB : rB) { + point_t translated; + + trans::translate_transformer translate(tv.vector_.x_, tv.vector_.y_); + boost::geometry::transform(ptB, translated, translate); + linestring_t projection; + segment_t segproj(ptB, translated); + projection.push_back(ptB); + projection.push_back(translated); + std::vector intersections; + bg::intersection(rA, projection, intersections); + if(bg::touches(projection, rA) && intersections.size() < 2) { + continue; + } + + //find shortest intersection + coord_t len; + segment_t segi; + for(const auto& pti : intersections) { + + segi = segment_t(ptB,pti); + len = bg::length(segi); + if(smaller(len, shortest)) { + trimmed.vector_ = pti - ptB; + trimmed.edge_ = segi; + shortest = len; + } + } + } + return trimmed; +} + +std::vector findFeasibleTranslationVectors(polygon_t::ring_type& ringA, polygon_t::ring_type& ringB, const std::vector& touchers) { + //use a set to automatically filter duplicate vectors + std::vector potentialVectors; + std::vector> touchEdges; + + for (psize_t i = 0; i < touchers.size(); i++) { + point_t& vertexA = ringA[touchers[i].A_]; + vertexA.marked_ = true; + + // adjacent A vertices + auto prevAindex = static_cast(touchers[i].A_ - 1); + auto nextAindex = static_cast(touchers[i].A_ + 1); + + prevAindex = (prevAindex < 0) ? static_cast(ringA.size() - 2) : prevAindex; // loop + nextAindex = (static_cast(nextAindex) >= ringA.size()) ? 1 : nextAindex; // loop + + point_t& prevA = ringA[prevAindex]; + point_t& nextA = ringA[nextAindex]; + + // adjacent B vertices + point_t& vertexB = ringB[touchers[i].B_]; + + auto prevBindex = static_cast(touchers[i].B_ - 1); + auto nextBindex = static_cast(touchers[i].B_ + 1); + + prevBindex = (prevBindex < 0) ? static_cast(ringB.size() - 2) : prevBindex; // loop + nextBindex = (static_cast(nextBindex) >= ringB.size()) ? 1 : nextBindex; // loop + + point_t& prevB = ringB[prevBindex]; + point_t& nextB = ringB[nextBindex]; + + if (touchers[i].type_ == TouchingPoint::VERTEX) { + segment_t a1 = { vertexA, nextA }; + segment_t a2 = { vertexA, prevA }; + segment_t b1 = { vertexB, nextB }; + segment_t b2 = { vertexB, prevB }; + + //swap the segment elements so that always the first point is the touching point + //also make the second segment always a segment of ringB + touchEdges.push_back({a1, b1}); + touchEdges.push_back({a1, b2}); + touchEdges.push_back({a2, b1}); + touchEdges.push_back({a2, b2}); +#ifdef NFP_DEBUG + write_svg("touchersV" + std::to_string(i) + ".svg", {a1,a2,b1,b2}); +#endif + + //TODO test parallel edges for floating point stability + Alignment al; + //a1 and b1 meet at start vertex + al = get_alignment(a1, b1.second); + if(al == LEFT) { + potentialVectors.push_back({b1.first - b1.second, b1, false, "vertex1"}); + } else if(al == RIGHT) { + potentialVectors.push_back({a1.second - a1.first, a1, true, "vertex2"}); + } else { + potentialVectors.push_back({a1.second - a1.first, a1, true, "vertex3"}); + } + + //a1 and b2 meet at start and end + al = get_alignment(a1, b2.second); + if(al == LEFT) { + //no feasible translation + } else if(al == RIGHT) { + potentialVectors.push_back({a1.second - a1.first, a1, true, "vertex4"}); + } else { + potentialVectors.push_back({a1.second - a1.first, a1, true, "vertex5"}); + } + + //a2 and b1 meet at end and start + al = get_alignment(a2, b1.second); + if(al == LEFT) { + //no feasible translation + } else if(al == RIGHT) { + potentialVectors.push_back({b1.first - b1.second, b1, false, "vertex6"}); + } else { + potentialVectors.push_back({b1.first - b1.second, b1, false, "vertex7"}); + } + } else if (touchers[i].type_ == TouchingPoint::B_ON_A) { + segment_t a1 = {vertexB, vertexA}; + segment_t a2 = {vertexB, prevA}; + segment_t b1 = {vertexB, prevB}; + segment_t b2 = {vertexB, nextB}; + + touchEdges.push_back({a1, b1}); + touchEdges.push_back({a1, b2}); + touchEdges.push_back({a2, b1}); + touchEdges.push_back({a2, b2}); +#ifdef NFP_DEBUG + write_svg("touchersB" + std::to_string(i) + ".svg", {a1,a2,b1,b2}); +#endif + potentialVectors.push_back({vertexA - vertexB, {vertexB, vertexA}, true, "bona"}); + } else if (touchers[i].type_ == TouchingPoint::A_ON_B) { + //TODO testme + segment_t a1 = {vertexA, prevA}; + segment_t a2 = {vertexA, nextA}; + segment_t b1 = {vertexA, vertexB}; + segment_t b2 = {vertexA, prevB}; +#ifdef NFP_DEBUG + write_svg("touchersA" + std::to_string(i) + ".svg", {a1,a2,b1,b2}); +#endif + touchEdges.push_back({a1, b1}); + touchEdges.push_back({a2, b1}); + touchEdges.push_back({a1, b2}); + touchEdges.push_back({a2, b2}); + potentialVectors.push_back({vertexA - vertexB, {vertexA, vertexB}, false, "aonb"}); + } + } + + //discard immediately intersecting translations + std::vector vectors; + for(const auto& v : potentialVectors) { + bool discarded = false; + for(const auto& sp : touchEdges) { + point_t normEdge = normalize(v.edge_.second - v.edge_.first); + point_t normFirst = normalize(sp.first.second - sp.first.first); + point_t normSecond = normalize(sp.second.second - sp.second.first); + + Alignment a1 = get_alignment({{0,0},normEdge}, normFirst); + Alignment a2 = get_alignment({{0,0},normEdge}, normSecond); + + if(a1 == a2 && a1 != ON) { + long double df = get_inner_angle({0,0},normEdge, normFirst); + long double ds = get_inner_angle({0,0},normEdge, normSecond); + + point_t normIn = normalize(v.edge_.second - v.edge_.first); + if (equals(df, ds)) { + TranslationVector trimmed = trimVector(ringA,ringB, v); + polygon_t::ring_type translated; + trans::translate_transformer translate(trimmed.vector_.x_, trimmed.vector_.y_); + boost::geometry::transform(ringB, translated, translate); + if (!(bg::intersects(translated, ringA) && !bg::overlaps(translated, ringA) && !bg::covered_by(translated, ringA) && !bg::covered_by(ringA, translated))) { + discarded = true; + break; + } + } else { + + if (normIn == normalize(v.vector_)) { + if (larger(ds, df)) { + discarded = true; + break; + } + } else { + if (smaller(ds, df)) { + discarded = true; + break; + } + } + } + } + } + if(!discarded) + vectors.push_back(v); + } + return vectors; +} + +bool find(const std::vector& h, const TranslationVector& tv) { + for(const auto& htv : h) { + if(htv.vector_ == tv.vector_) + return true; + } + return false; +} + +TranslationVector getLongest(const std::vector& tvs) { + coord_t len; + coord_t maxLen = MIN_COORD; + TranslationVector longest; + longest.vector_ = INVALID_POINT; + + for(auto& tv : tvs) { + len = bg::length(segment_t{{0,0},tv.vector_}); + if(larger(len, maxLen)) { + maxLen = len; + longest = tv; + } + } + return longest; +} + +TranslationVector selectNextTranslationVector(const polygon_t& pA, const polygon_t::ring_type& rA, const polygon_t::ring_type& rB, const std::vector& tvs, const std::vector& history) { + if(!history.empty()) { + TranslationVector last = history.back(); + std::vector historyCopy = history; + if(historyCopy.size() >= 2) { + historyCopy.erase(historyCopy.end() - 1); + historyCopy.erase(historyCopy.end() - 1); + if(historyCopy.size() > 4) { + historyCopy.erase(historyCopy.begin(), historyCopy.end() - 4); + } + + } else { + historyCopy.clear(); + } + DEBUG_MSG("last", last); + + psize_t laterI = std::numeric_limits::max(); + point_t previous = rA[0]; + point_t next; + + if(last.fromA_) { + for (psize_t i = 1; i < rA.size() + 1; ++i) { + if (i >= rA.size()) + next = rA[i % rA.size()]; + else + next = rA[i]; + + segment_t candidate( previous, next ); + if(candidate == last.edge_) { + laterI = i; + break; + } + previous = next; + } + + if (laterI == std::numeric_limits::max()) { + point_t later; + if (last.vector_ == (last.edge_.second - last.edge_.first)) { + later = last.edge_.second; + } else { + later = last.edge_.first; + } + + laterI = find_point(rA, later); + } + } else { + point_t later; + if (last.vector_ == (last.edge_.second - last.edge_.first)) { + later = last.edge_.second; + } else { + later = last.edge_.first; + } + + laterI = find_point(rA, later); + } + + if (laterI == std::numeric_limits::max()) { + throw std::runtime_error( + "Internal error: Can't find later point of last edge"); + } + + std::vector viableEdges; + previous = rA[laterI]; + for(psize_t i = laterI + 1; i < rA.size() + laterI + 1; ++i) { + if(i >= rA.size()) + next = rA[i % rA.size()]; + else + next = rA[i]; + + viableEdges.push_back({previous, next}); + previous = next; + } + +// auto rng = std::default_random_engine {}; +// std::shuffle(std::begin(viableEdges), std::end(viableEdges), rng); + + //search with consulting the history to prevent oscillation + std::vector viableTrans; + for(const auto& ve: viableEdges) { + for(const auto& tv : tvs) { + if((tv.fromA_ && (normalize(tv.vector_) == normalize(ve.second - ve.first))) && (tv.edge_ != last.edge_ || tv.vector_.x_ != -last.vector_.x_ || tv.vector_.y_ != -last.vector_.y_) && !find(historyCopy, tv)) { + viableTrans.push_back(tv); + } + } + for (const auto& tv : tvs) { + if (!tv.fromA_) { + point_t later; + if (tv.vector_ == (tv.edge_.second - tv.edge_.first) && (tv.edge_ != last.edge_ || tv.vector_.x_ != -last.vector_.x_ || tv.vector_.y_ != -last.vector_.y_) && !find(historyCopy, tv)) { + later = tv.edge_.second; + } else if (tv.vector_ == (tv.edge_.first - tv.edge_.second)) { + later = tv.edge_.first; + } else + continue; + + if (later == ve.first || later == ve.second) { + viableTrans.push_back(tv); + } + } + } + } + + if(!viableTrans.empty()) + return getLongest(viableTrans); + + //search again without the history + for(const auto& ve: viableEdges) { + for(const auto& tv : tvs) { + if((tv.fromA_ && (normalize(tv.vector_) == normalize(ve.second - ve.first))) && (tv.edge_ != last.edge_ || tv.vector_.x_ != -last.vector_.x_ || tv.vector_.y_ != -last.vector_.y_)) { + viableTrans.push_back(tv); + } + } + for (const auto& tv : tvs) { + if (!tv.fromA_) { + point_t later; + if (tv.vector_ == (tv.edge_.second - tv.edge_.first) && (tv.edge_ != last.edge_ || tv.vector_.x_ != -last.vector_.x_ || tv.vector_.y_ != -last.vector_.y_)) { + later = tv.edge_.second; + } else if (tv.vector_ == (tv.edge_.first - tv.edge_.second)) { + later = tv.edge_.first; + } else + continue; + + if (later == ve.first || later == ve.second) { + viableTrans.push_back(tv); + } + } + } + } + if(!viableTrans.empty()) + return getLongest(viableTrans); + + /* + //search again without the history and without checking last edge + for(const auto& ve: viableEdges) { + for(const auto& tv : tvs) { + if((tv.fromA_ && (normalize(tv.vector_) == normalize(ve.second - ve.first)))) { + return tv; + } + } + for (const auto& tv : tvs) { + if (!tv.fromA_) { + point_t later; + if (tv.vector_ == (tv.edge_.second - tv.edge_.first)) { + later = tv.edge_.second; + } else if (tv.vector_ == (tv.edge_.first - tv.edge_.second)) { + later = tv.edge_.first; + } else + continue; + + if (later == ve.first || later == ve.second) { + return tv; + } + } + } + }*/ + + if(tvs.size() == 1) + return *tvs.begin(); + + TranslationVector tv; + tv.vector_ = INVALID_POINT; + return tv; + } else { + return getLongest(tvs); + } +} + +bool inNfp(const point_t& pt, const nfp_t& nfp) { + for(const auto& r : nfp) { + if(bg::touches(pt, r)) + return true; + } + + return false; +} + +enum SearchStartResult { + FIT, + FOUND, + NOT_FOUND +}; + +SearchStartResult searchStartTranslation(polygon_t::ring_type& rA, const polygon_t::ring_type& rB, const nfp_t& nfp,const bool& inside, point_t& result) { + for(psize_t i = 0; i < rA.size() - 1; i++) { + psize_t index; + if (i >= rA.size()) + index = i % rA.size() + 1; + else + index = i; + + auto& ptA = rA[index]; + + if(ptA.marked_) + continue; + + ptA.marked_ = true; + + for(const auto& ptB: rB) { + point_t testTranslation = ptA - ptB; + polygon_t::ring_type translated; + boost::geometry::transform(rB, translated, trans::translate_transformer(testTranslation.x_, testTranslation.y_)); + + //check if the translated rB is identical to rA + bool identical = false; + for(const auto& ptT: translated) { + identical = false; + for(const auto& ptA: rA) { + if(ptT == ptA) { + identical = true; + break; + } + } + if(!identical) + break; + } + + if(identical) { + result = testTranslation; + return FIT; + } + + bool bInside = false; + for(const auto& ptT: translated) { + if(bg::within(ptT, rA)) { + bInside = true; + break; + } else if(!bg::touches(ptT, rA)) { + bInside = false; + break; + } + } + + if(((bInside && inside) || (!bInside && !inside)) && (!bg::overlaps(translated, rA) && !bg::covered_by(translated, rA) && !bg::covered_by(rA, translated)) && !inNfp(translated.front(), nfp)){ + result = testTranslation; + return FOUND; + } + + point_t nextPtA = rA[index + 1]; + TranslationVector slideVector; + slideVector.vector_ = nextPtA - ptA; + slideVector.edge_ = {ptA, nextPtA}; + slideVector.fromA_ = true; + TranslationVector trimmed = trimVector(rA, translated, slideVector); + polygon_t::ring_type translated2; + trans::translate_transformer trans(trimmed.vector_.x_, trimmed.vector_.y_); + boost::geometry::transform(translated, translated2, trans); + + //check if the translated rB is identical to rA + identical = false; + for(const auto& ptT: translated) { + identical = false; + for(const auto& ptA: rA) { + if(ptT == ptA) { + identical = true; + break; + } + } + if(!identical) + break; + } + + if(identical) { + result = trimmed.vector_ + testTranslation; + return FIT; + } + + bInside = false; + for(const auto& ptT: translated2) { + if(bg::within(ptT, rA)) { + bInside = true; + break; + } else if(!bg::touches(ptT, rA)) { + bInside = false; + break; + } + } + + if(((bInside && inside) || (!bInside && !inside)) && (!bg::overlaps(translated2, rA) && !bg::covered_by(translated2, rA) && !bg::covered_by(rA, translated2)) && !inNfp(translated2.front(), nfp)){ + result = trimmed.vector_ + testTranslation; + return FOUND; + } + } + } + return NOT_FOUND; +} + +enum SlideResult { + LOOP, + NO_LOOP, + NO_TRANSLATION +}; + +SlideResult slide(polygon_t& pA, polygon_t::ring_type& rA, polygon_t::ring_type& rB, nfp_t& nfp, const point_t& transB, bool inside) { + polygon_t::ring_type rifsB; + boost::geometry::transform(rB, rifsB, trans::translate_transformer(transB.x_, transB.y_)); + rB = std::move(rifsB); + +#ifdef NFP_DEBUG + write_svg("ifs.svg", pA, rB); +#endif + + bool startAvailable = true; + psize_t cnt = 0; + point_t referenceStart = rB.front(); + std::vector history; + + //generate the nfp for the ring + while(startAvailable) { + DEBUG_VAL(cnt); + //use first point of rB as reference + nfp.back().push_back(rB.front()); + if(cnt == 15) + std::cerr << ""; + + std::vector touchers = findTouchingPoints(rA, rB); + +#ifdef NFP_DEBUG + DEBUG_MSG("touchers", touchers.size()); + for(auto t : touchers) { + DEBUG_VAL(t.type_); + } +#endif + if(touchers.empty()) { + throw std::runtime_error("Internal error: No touching points found"); + } + std::vector transVectors = findFeasibleTranslationVectors(rA, rB, touchers); + +#ifdef NFP_DEBUG + DEBUG_MSG("collected vectors", transVectors.size()); + for(auto pt : transVectors) { + DEBUG_VAL(pt); + } +#endif + + if(transVectors.empty()) { + return NO_LOOP; + } + + TranslationVector next = selectNextTranslationVector(pA, rA, rB, transVectors, history); + + if(next.vector_ == INVALID_POINT) + return NO_TRANSLATION; + + DEBUG_MSG("next", next); + + TranslationVector trimmed = trimVector(rA, rB, next); + DEBUG_MSG("trimmed", trimmed); + + history.push_back(next); + + polygon_t::ring_type nextRB; + boost::geometry::transform(rB, nextRB, trans::translate_transformer(trimmed.vector_.x_, trimmed.vector_.y_)); + rB = std::move(nextRB); + +#ifdef NFP_DEBUG + write_svg("next" + std::to_string(cnt) + ".svg", pA,rB); +#endif + + ++cnt; + if(referenceStart == rB.front() || (inside && bg::touches(rB.front(), nfp.front()))) { + startAvailable = false; + } + } + return LOOP; +} + +void removeCoLinear(polygon_t::ring_type& r) { + assert(r.size() > 2); + psize_t nextI; + psize_t prevI = 0; + segment_t segment(r[r.size() - 2], r[0]); + polygon_t::ring_type newR; + + for (psize_t i = 1; i < r.size() + 1; ++i) { + if (i >= r.size()) + nextI = i % r.size() + 1; + else + nextI = i; + + if (get_alignment(segment, r[nextI]) != ON) { + newR.push_back(r[prevI]); + } + segment = {segment.second, r[nextI]}; + prevI = nextI; + } + + r = newR; +} + +void removeCoLinear(polygon_t& p) { + removeCoLinear(p.outer()); + for (auto& r : p.inners()) + removeCoLinear(r); +} + +nfp_t generateNFP(polygon_t& pA, polygon_t& pB, const bool checkValidity = true) { + removeCoLinear(pA); + removeCoLinear(pB); + + if(checkValidity) { + std::string reason; + if(!bg::is_valid(pA, reason)) + throw std::runtime_error("Polygon A is invalid: " + reason); + + if(!bg::is_valid(pB, reason)) + throw std::runtime_error("Polygon B is invalid: " + reason); + } + + nfp_t nfp; + +#ifdef NFP_DEBUG + write_svg("start.svg", {pA, pB}); +#endif + + DEBUG_VAL(bg::wkt(pA)) + DEBUG_VAL(bg::wkt(pB)); + + //prevent double vertex connections at start because we might come back the same way we go which would end the nfp prematurely + std::vector ptyaminI = find_minimum_y(pA); + std::vector ptybmaxI = find_maximum_y(pB); + + point_t pAstart; + point_t pBstart; + + if(ptyaminI.size() > 1 || ptybmaxI.size() > 1) { + //find right-most of A and left-most of B to prevent double connection at start + coord_t maxX = MIN_COORD; + psize_t iRightMost = 0; + for(psize_t& ia : ptyaminI) { + const point_t& candidateA = pA.outer()[ia]; + if(larger(candidateA.x_, maxX)) { + maxX = candidateA.x_; + iRightMost = ia; + } + } + + coord_t minX = MAX_COORD; + psize_t iLeftMost = 0; + for(psize_t& ib : ptybmaxI) { + const point_t& candidateB = pB.outer()[ib]; + if(smaller(candidateB.x_, minX)) { + minX = candidateB.x_; + iLeftMost = ib; + } + } + pAstart = pA.outer()[iRightMost]; + pBstart = pB.outer()[iLeftMost]; + } else { + pAstart = pA.outer()[ptyaminI.front()]; + pBstart = pB.outer()[ptybmaxI.front()]; + } + + nfp.push_back({}); + point_t transB = {pAstart - pBstart}; + + if(slide(pA, pA.outer(), pB.outer(), nfp, transB, false) != LOOP) { + throw std::runtime_error("Unable to complete outer nfp loop"); + } + + DEBUG_VAL("##### outer #####"); + point_t startTrans; + while(true) { + SearchStartResult res = searchStartTranslation(pA.outer(), pB.outer(), nfp, false, startTrans); + if(res == FOUND) { + nfp.push_back({}); + DEBUG_VAL("##### interlock start #####") + polygon_t::ring_type rifsB; + boost::geometry::transform(pB.outer(), rifsB, trans::translate_transformer(startTrans.x_, startTrans.y_)); + if(inNfp(rifsB.front(), nfp)) { + continue; + } + SlideResult sres = slide(pA, pA.outer(), pB.outer(), nfp, startTrans, true); + if(sres != LOOP) { + if(sres == NO_TRANSLATION) { + //no initial slide found -> jiggsaw + if(!inNfp(pB.outer().front(),nfp)) { + nfp.push_back({}); + nfp.back().push_back(pB.outer().front()); + } + } + } + DEBUG_VAL("##### interlock end #####"); + } else if(res == FIT) { + point_t reference = pB.outer().front(); + point_t translated; + trans::translate_transformer translate(startTrans.x_, startTrans.y_); + boost::geometry::transform(reference, translated, translate); + if(!inNfp(translated,nfp)) { + nfp.push_back({}); + nfp.back().push_back(translated); + } + break; + } else + break; + } + + + for(auto& rA : pA.inners()) { + while(true) { + SearchStartResult res = searchStartTranslation(rA, pB.outer(), nfp, true, startTrans); + if(res == FOUND) { + nfp.push_back({}); + DEBUG_VAL("##### hole start #####"); + slide(pA, rA, pB.outer(), nfp, startTrans, true); + DEBUG_VAL("##### hole end #####"); + } else if(res == FIT) { + point_t reference = pB.outer().front(); + point_t translated; + trans::translate_transformer translate(startTrans.x_, startTrans.y_); + boost::geometry::transform(reference, translated, translate); + if(!inNfp(translated,nfp)) { + nfp.push_back({}); + nfp.back().push_back(translated); + } + break; + } else + break; + } + } + +#ifdef NFP_DEBUG + write_svg("nfp.svg", {pA,pB}, nfp); +#endif + + return nfp; +} +} +#endif diff --git a/xs/src/libnest2d/tests/svgtools.hpp b/xs/src/libnest2d/tools/svgtools.hpp similarity index 89% rename from xs/src/libnest2d/tests/svgtools.hpp rename to xs/src/libnest2d/tools/svgtools.hpp index f0db85217..273ecabac 100644 --- a/xs/src/libnest2d/tests/svgtools.hpp +++ b/xs/src/libnest2d/tools/svgtools.hpp @@ -6,7 +6,6 @@ #include #include -#include namespace libnest2d { namespace svg { @@ -46,16 +45,19 @@ public: void writeItem(const Item& item) { if(svg_layers_.empty()) addLayer(); - Item tsh(item.transformedShape()); - if(conf_.origo_location == BOTTOMLEFT) - for(unsigned i = 0; i < tsh.vertexCount(); i++) { - auto v = tsh.vertex(i); + auto tsh = item.transformedShape(); + if(conf_.origo_location == BOTTOMLEFT) { auto d = static_cast( std::round(conf_.height*conf_.mm_in_coord_units) ); - setY(v, -getY(v) + d); - tsh.setVertex(i, v); + + auto& contour = ShapeLike::getContour(tsh); + for(auto& v : contour) setY(v, -getY(v) + d); + + auto& holes = ShapeLike::holes(tsh); + for(auto& h : holes) for(auto& v : h) setY(v, -getY(v) + d); + } - currentLayer() += ShapeLike::serialize(tsh.rawShape(), + currentLayer() += ShapeLike::serialize(tsh, 1.0/conf_.mm_in_coord_units) + "\n"; } diff --git a/xs/src/libslic3r/Model.cpp b/xs/src/libslic3r/Model.cpp index c1d58f963..fc49d68af 100644 --- a/xs/src/libslic3r/Model.cpp +++ b/xs/src/libslic3r/Model.cpp @@ -9,7 +9,6 @@ #include #include -#include #include #include "slic3r/GUI/GUI.hpp" @@ -412,7 +411,7 @@ ShapeData2D projectModelFromTop(const Slic3r::Model &model) { for(auto objinst : objptr->instances) { if(objinst) { Slic3r::TriangleMesh tmpmesh = rmesh; - ClipperLib::PolyNode pn; + ClipperLib::PolygonImpl pn; tmpmesh.scale(objinst->scaling_factor); @@ -553,25 +552,13 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, // Will use the DJD selection heuristic with the BottomLeft placement // strategy - using Arranger = Arranger; + using Arranger = Arranger; using PConf = Arranger::PlacementConfig; using SConf = Arranger::SelectionConfig; PConf pcfg; // Placement configuration SConf scfg; // Selection configuration - // Try inserting groups of 2, and 3 items in all possible order. - scfg.try_reverse_order = false; - - // If there are more items that could possibly fit into one bin, - // use multiple threads. (Potencially decreased pack efficiency) - scfg.allow_parallel = true; - - // Use multiple threads whenever possible - scfg.force_parallel = false; - - scfg.waste_increment = 0.01; - // Align the arranged pile into the center of the bin pcfg.alignment = PConf::Alignment::CENTER; From 266ff2ad937e7d2914ce04af85b08671f7c5bc60 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Mon, 16 Jul 2018 16:37:14 +0200 Subject: [PATCH 144/198] Build fix for linux --- xs/src/libnest2d/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xs/src/libnest2d/CMakeLists.txt b/xs/src/libnest2d/CMakeLists.txt index e16733cdd..db4f5d99f 100644 --- a/xs/src/libnest2d/CMakeLists.txt +++ b/xs/src/libnest2d/CMakeLists.txt @@ -81,7 +81,9 @@ if(LIBNEST2D_OPTIMIZER_BACKEND STREQUAL "nlopt") ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/optimizers/subplex.hpp ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/optimizers/genetic.hpp ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/optimizers/nlopt_boilerplate.hpp) - list(APPEND LIBNEST2D_LIBRARIES ${NLopt_LIBS} Threads::Threads) + list(APPEND LIBNEST2D_LIBRARIES ${NLopt_LIBS} + # Threads::Threads + ) list(APPEND LIBNEST2D_HEADERS ${NLopt_INCLUDE_DIR}) endif() From c34a713c8c05b7eb285219e5b90facc8e1ea300b Mon Sep 17 00:00:00 2001 From: bubnikv Date: Tue, 17 Jul 2018 10:41:17 +0200 Subject: [PATCH 145/198] Simplification of 1.40.1-rc2 fails to save the modified AMF settings #1035 --- xs/src/slic3r/GUI/Preset.cpp | 3 +++ xs/src/slic3r/GUI/Preset.hpp | 4 ---- xs/src/slic3r/GUI/PresetBundle.cpp | 15 ++++++--------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/xs/src/slic3r/GUI/Preset.cpp b/xs/src/slic3r/GUI/Preset.cpp index f3cedd693..e376a6ed2 100644 --- a/xs/src/slic3r/GUI/Preset.cpp +++ b/xs/src/slic3r/GUI/Preset.cpp @@ -505,6 +505,9 @@ Preset& PresetCollection::load_external_preset( // Insert a new profile. Preset &preset = this->load_preset(path, new_name, std::move(cfg), select); preset.is_external = true; + if (&this->get_selected_preset() == &preset) + this->get_edited_preset().is_external = true; + return preset; } diff --git a/xs/src/slic3r/GUI/Preset.hpp b/xs/src/slic3r/GUI/Preset.hpp index 5faee08f1..a2ee1d2eb 100644 --- a/xs/src/slic3r/GUI/Preset.hpp +++ b/xs/src/slic3r/GUI/Preset.hpp @@ -353,10 +353,6 @@ public: // Generate a file path from a profile name. Add the ".ini" suffix if it is missing. std::string path_from_name(const std::string &new_name) const; - // update m_edited_preset.is_external value after loading preset for .ini, .gcode, .amf, .3mf - void update_edited_preset_is_external(bool is_external) { - m_edited_preset.is_external = is_external; } - protected: // Select a preset, if it exists. If it does not exist, select an invalid (-1) index. // This is a temporary state, which shall be fixed immediately by the following step. diff --git a/xs/src/slic3r/GUI/PresetBundle.cpp b/xs/src/slic3r/GUI/PresetBundle.cpp index adca1b153..b9a010659 100644 --- a/xs/src/slic3r/GUI/PresetBundle.cpp +++ b/xs/src/slic3r/GUI/PresetBundle.cpp @@ -565,12 +565,11 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool size_t idx = (i_group == 0) ? 0 : num_extruders + 1; inherits = inherits_values[idx]; compatible_printers_condition = compatible_printers_condition_values[idx]; - if (is_external) { + if (is_external) presets.load_external_preset(name_or_path, name, config.opt_string((i_group == 0) ? "print_settings_id" : "printer_settings_id", true), config); - presets.update_edited_preset_is_external(true); - } else + else presets.load_preset(presets.path_from_name(name), name, config).save(); } @@ -583,10 +582,9 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool // Split the "compatible_printers_condition" and "inherits" from the cummulative vectors to separate filament presets. inherits = inherits_values[1]; compatible_printers_condition = compatible_printers_condition_values[1]; - if (is_external) { + if (is_external) this->filaments.load_external_preset(name_or_path, name, old_filament_profile_names->values.front(), config); - this->filaments.update_edited_preset_is_external(true); - } else + else this->filaments.load_preset(this->filaments.path_from_name(name), name, config).save(); this->filament_presets.clear(); this->filament_presets.emplace_back(name); @@ -615,12 +613,11 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool cfg.opt_string("inherits", true) = inherits_values[i + 1]; // Load all filament presets, but only select the first one in the preset dialog. Preset *loaded = nullptr; - if (is_external) { + if (is_external) loaded = &this->filaments.load_external_preset(name_or_path, name, (i < old_filament_profile_names->values.size()) ? old_filament_profile_names->values[i] : "", std::move(cfg), i == 0); - this->filaments.update_edited_preset_is_external(true); - } else { + else { // Used by the config wizard when creating a custom setup. // Therefore this block should only be called for a single extruder. char suffix[64]; From 08529189c90922d021eddb62f96c6f604eb6ef05 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Tue, 17 Jul 2018 10:50:15 +0200 Subject: [PATCH 146/198] Changed time estimator default values --- xs/src/libslic3r/GCodeTimeEstimator.cpp | 117 ++++++------------------ xs/src/libslic3r/GCodeTimeEstimator.hpp | 3 - 2 files changed, 28 insertions(+), 92 deletions(-) diff --git a/xs/src/libslic3r/GCodeTimeEstimator.cpp b/xs/src/libslic3r/GCodeTimeEstimator.cpp index 6e500bd4b..285ed37bd 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.cpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.cpp @@ -12,25 +12,15 @@ static const float MMMIN_TO_MMSEC = 1.0f / 60.0f; static const float MILLISEC_TO_SEC = 0.001f; static const float INCHES_TO_MM = 25.4f; -static const float NORMAL_FEEDRATE = 1500.0f; // from Prusa Firmware (Marlin_main.cpp) -static const float NORMAL_ACCELERATION = 1500.0f; // Prusa Firmware 1_75mm_MK2 -static const float NORMAL_RETRACT_ACCELERATION = 1500.0f; // Prusa Firmware 1_75mm_MK2 -static const float NORMAL_AXIS_MAX_FEEDRATE[] = { 500.0f, 500.0f, 12.0f, 120.0f }; // Prusa Firmware 1_75mm_MK2 -static const float NORMAL_AXIS_MAX_ACCELERATION[] = { 9000.0f, 9000.0f, 500.0f, 10000.0f }; // Prusa Firmware 1_75mm_MK2 -static const float NORMAL_AXIS_MAX_JERK[] = { 10.0f, 10.0f, 0.4f, 2.5f }; // from Prusa Firmware (Configuration.h) -static const float NORMAL_MINIMUM_FEEDRATE = 0.0f; // from Prusa Firmware (Configuration_adv.h) -static const float NORMAL_MINIMUM_TRAVEL_FEEDRATE = 0.0f; // from Prusa Firmware (Configuration_adv.h) -static const float NORMAL_EXTRUDE_FACTOR_OVERRIDE_PERCENTAGE = 1.0f; // 100 percent - -static const float SILENT_FEEDRATE = 1500.0f; // from Prusa Firmware (Marlin_main.cpp) -static const float SILENT_ACCELERATION = 1250.0f; // Prusa Firmware 1_75mm_MK25-RAMBo13a-E3Dv6full -static const float SILENT_RETRACT_ACCELERATION = 1250.0f; // Prusa Firmware 1_75mm_MK25-RAMBo13a-E3Dv6full -static const float SILENT_AXIS_MAX_FEEDRATE[] = { 200.0f, 200.0f, 12.0f, 120.0f }; // Prusa Firmware 1_75mm_MK25-RAMBo13a-E3Dv6full -static const float SILENT_AXIS_MAX_ACCELERATION[] = { 1000.0f, 1000.0f, 200.0f, 5000.0f }; // Prusa Firmware 1_75mm_MK25-RAMBo13a-E3Dv6full -static const float SILENT_AXIS_MAX_JERK[] = { 10.0f, 10.0f, 0.4f, 2.5f }; // from Prusa Firmware (Configuration.h) -static const float SILENT_MINIMUM_FEEDRATE = 0.0f; // from Prusa Firmware (Configuration_adv.h) -static const float SILENT_MINIMUM_TRAVEL_FEEDRATE = 0.0f; // from Prusa Firmware (Configuration_adv.h) -static const float SILENT_EXTRUDE_FACTOR_OVERRIDE_PERCENTAGE = 1.0f; // 100 percent +static const float DEFAULT_FEEDRATE = 1500.0f; // from Prusa Firmware (Marlin_main.cpp) +static const float DEFAULT_ACCELERATION = 1500.0f; // Prusa Firmware 1_75mm_MK2 +static const float DEFAULT_RETRACT_ACCELERATION = 1500.0f; // Prusa Firmware 1_75mm_MK2 +static const float DEFAULT_AXIS_MAX_FEEDRATE[] = { 500.0f, 500.0f, 12.0f, 120.0f }; // Prusa Firmware 1_75mm_MK2 +static const float DEFAULT_AXIS_MAX_ACCELERATION[] = { 9000.0f, 9000.0f, 500.0f, 10000.0f }; // Prusa Firmware 1_75mm_MK2 +static const float DEFAULT_AXIS_MAX_JERK[] = { 10.0f, 10.0f, 0.4f, 2.5f }; // from Prusa Firmware (Configuration.h) +static const float DEFAULT_MINIMUM_FEEDRATE = 0.0f; // from Prusa Firmware (Configuration_adv.h) +static const float DEFAULT_MINIMUM_TRAVEL_FEEDRATE = 0.0f; // from Prusa Firmware (Configuration_adv.h) +static const float DEFAULT_EXTRUDE_FACTOR_OVERRIDE_PERCENTAGE = 1.0f; // 100 percent static const float PREVIOUS_FEEDRATE_THRESHOLD = 0.0001f; @@ -389,24 +379,6 @@ namespace Slic3r { void GCodeTimeEstimator::set_axis_max_jerk(EAxis axis, float jerk) { - if ((axis == X) || (axis == Y)) - { - switch (_mode) - { - default: - case Normal: - { - jerk = std::min(jerk, NORMAL_AXIS_MAX_JERK[axis]); - break; - } - case Silent: - { - jerk = std::min(jerk, SILENT_AXIS_MAX_JERK[axis]); - break; - } - } - } - _state.axis[axis].max_jerk = jerk; } @@ -567,19 +539,19 @@ namespace Slic3r { set_global_positioning_type(Absolute); set_e_local_positioning_type(Absolute); - switch (_mode) + set_feedrate(DEFAULT_FEEDRATE); + set_acceleration(DEFAULT_ACCELERATION); + set_retract_acceleration(DEFAULT_RETRACT_ACCELERATION); + set_minimum_feedrate(DEFAULT_MINIMUM_FEEDRATE); + set_minimum_travel_feedrate(DEFAULT_MINIMUM_TRAVEL_FEEDRATE); + set_extrude_factor_override_percentage(DEFAULT_EXTRUDE_FACTOR_OVERRIDE_PERCENTAGE); + + for (unsigned char a = X; a < Num_Axis; ++a) { - default: - case Normal: - { - _set_default_as_normal(); - break; - } - case Silent: - { - _set_default_as_silent(); - break; - } + EAxis axis = (EAxis)a; + set_axis_max_feedrate(axis, DEFAULT_AXIS_MAX_FEEDRATE[a]); + set_axis_max_acceleration(axis, DEFAULT_AXIS_MAX_ACCELERATION[a]); + set_axis_max_jerk(axis, DEFAULT_AXIS_MAX_JERK[a]); } } @@ -633,42 +605,6 @@ namespace Slic3r { _blocks.clear(); } - void GCodeTimeEstimator::_set_default_as_normal() - { - set_feedrate(NORMAL_FEEDRATE); - set_acceleration(NORMAL_ACCELERATION); - set_retract_acceleration(NORMAL_RETRACT_ACCELERATION); - set_minimum_feedrate(NORMAL_MINIMUM_FEEDRATE); - set_minimum_travel_feedrate(NORMAL_MINIMUM_TRAVEL_FEEDRATE); - set_extrude_factor_override_percentage(NORMAL_EXTRUDE_FACTOR_OVERRIDE_PERCENTAGE); - - for (unsigned char a = X; a < Num_Axis; ++a) - { - EAxis axis = (EAxis)a; - set_axis_max_feedrate(axis, NORMAL_AXIS_MAX_FEEDRATE[a]); - set_axis_max_acceleration(axis, NORMAL_AXIS_MAX_ACCELERATION[a]); - set_axis_max_jerk(axis, NORMAL_AXIS_MAX_JERK[a]); - } - } - - void GCodeTimeEstimator::_set_default_as_silent() - { - set_feedrate(SILENT_FEEDRATE); - set_acceleration(SILENT_ACCELERATION); - set_retract_acceleration(SILENT_RETRACT_ACCELERATION); - set_minimum_feedrate(SILENT_MINIMUM_FEEDRATE); - set_minimum_travel_feedrate(SILENT_MINIMUM_TRAVEL_FEEDRATE); - set_extrude_factor_override_percentage(SILENT_EXTRUDE_FACTOR_OVERRIDE_PERCENTAGE); - - for (unsigned char a = X; a < Num_Axis; ++a) - { - EAxis axis = (EAxis)a; - set_axis_max_feedrate(axis, SILENT_AXIS_MAX_FEEDRATE[a]); - set_axis_max_acceleration(axis, SILENT_AXIS_MAX_ACCELERATION[a]); - set_axis_max_jerk(axis, SILENT_AXIS_MAX_JERK[a]); - } - } - void GCodeTimeEstimator::_set_blocks_st_synchronize(bool state) { for (Block& block : _blocks) @@ -896,13 +832,16 @@ namespace Slic3r { if (_curr.abs_axis_feedrate[a] > 0.0f) min_feedrate_factor = std::min(min_feedrate_factor, get_axis_max_feedrate((EAxis)a) / _curr.abs_axis_feedrate[a]); } - + block.feedrate.cruise = min_feedrate_factor * _curr.feedrate; - for (unsigned char a = X; a < Num_Axis; ++a) + if (min_feedrate_factor < 1.0f) { - _curr.axis_feedrate[a] *= min_feedrate_factor; - _curr.abs_axis_feedrate[a] *= min_feedrate_factor; + for (unsigned char a = X; a < Num_Axis; ++a) + { + _curr.axis_feedrate[a] *= min_feedrate_factor; + _curr.abs_axis_feedrate[a] *= min_feedrate_factor; + } } // calculates block acceleration diff --git a/xs/src/libslic3r/GCodeTimeEstimator.hpp b/xs/src/libslic3r/GCodeTimeEstimator.hpp index 0307b658e..9b1a38985 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.hpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.hpp @@ -314,9 +314,6 @@ namespace Slic3r { void _reset_time(); void _reset_blocks(); - void _set_default_as_normal(); - void _set_default_as_silent(); - void _set_blocks_st_synchronize(bool state); // Calculates the time estimate From 86ba75d69253ec443e29bb0ecb0b46c163f92d8e Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Tue, 17 Jul 2018 12:04:06 +0200 Subject: [PATCH 147/198] New objectfunction that makes a proper circle shaped pile on arrange. --- xs/src/libnest2d/CMakeLists.txt | 4 +- xs/src/libnest2d/examples/main.cpp | 21 +-- .../libnest2d/libnest2d/placers/nfpplacer.hpp | 103 ++++++-------- .../libnest2d/selections/djd_heuristic.hpp | 72 ++++++---- xs/src/libslic3r/Model.cpp | 134 ++++++------------ 5 files changed, 146 insertions(+), 188 deletions(-) diff --git a/xs/src/libnest2d/CMakeLists.txt b/xs/src/libnest2d/CMakeLists.txt index db4f5d99f..bfdb551fc 100644 --- a/xs/src/libnest2d/CMakeLists.txt +++ b/xs/src/libnest2d/CMakeLists.txt @@ -82,8 +82,8 @@ if(LIBNEST2D_OPTIMIZER_BACKEND STREQUAL "nlopt") ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/optimizers/genetic.hpp ${CMAKE_CURRENT_SOURCE_DIR}/libnest2d/optimizers/nlopt_boilerplate.hpp) list(APPEND LIBNEST2D_LIBRARIES ${NLopt_LIBS} - # Threads::Threads - ) +# Threads::Threads + ) list(APPEND LIBNEST2D_HEADERS ${NLopt_INCLUDE_DIR}) endif() diff --git a/xs/src/libnest2d/examples/main.cpp b/xs/src/libnest2d/examples/main.cpp index 3d3f30b76..4623a6add 100644 --- a/xs/src/libnest2d/examples/main.cpp +++ b/xs/src/libnest2d/examples/main.cpp @@ -84,7 +84,8 @@ void arrangeRectangles() { // {{0, 0}, {0, 20*SCALE}, {10*SCALE, 0}, {0, 0}} // }; - std::vector crasher = { + std::vector crasher = + { { {-5000000, 8954050}, {5000000, 8954050}, @@ -527,12 +528,12 @@ void arrangeRectangles() { }; std::vector input; -// input.insert(input.end(), prusaParts().begin(), prusaParts().end()); + input.insert(input.end(), prusaParts().begin(), prusaParts().end()); // input.insert(input.end(), prusaExParts().begin(), prusaExParts().end()); // input.insert(input.end(), stegoParts().begin(), stegoParts().end()); // input.insert(input.end(), rects.begin(), rects.end()); // input.insert(input.end(), proba.begin(), proba.end()); - input.insert(input.end(), crasher.begin(), crasher.end()); +// input.insert(input.end(), crasher.begin(), crasher.end()); Box bin(250*SCALE, 210*SCALE); @@ -545,18 +546,18 @@ void arrangeRectangles() { Packer::PlacementConfig pconf; pconf.alignment = Placer::Config::Alignment::CENTER; + pconf.starting_point = Placer::Config::Alignment::CENTER; pconf.rotations = {0.0/*, Pi/2.0, Pi, 3*Pi/2*/}; pconf.object_function = [&bin](Placer::Pile pile, double area, double norm, double penality) { auto bb = ShapeLike::boundingBox(pile); - double diameter = PointLike::distance(bb.minCorner(), - bb.maxCorner()); - - // We will optimize to the diameter of the circle around the bounding - // box and use the norming factor to get rid of the physical dimensions - double score = diameter / norm; + auto& sh = pile.back(); + auto rv = Nfp::referenceVertex(sh); + auto c = bin.center(); + auto d = PointLike::distance(rv, c); + double score = double(d)/norm; // If it does not fit into the print bed we will beat it // with a large penality @@ -568,7 +569,9 @@ void arrangeRectangles() { Packer::SelectionConfig sconf; // sconf.allow_parallel = false; // sconf.force_parallel = false; +// sconf.try_triplets = true; // sconf.try_reverse_order = true; +// sconf.waste_increment = 0.1; arrange.configure(pconf, sconf); diff --git a/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp b/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp index 5ddb3a98d..d6bd154db 100644 --- a/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp +++ b/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp @@ -26,11 +26,20 @@ struct NfpPConfig { /// Where to align the resulting packed pile Alignment alignment; + Alignment starting_point; + std::function&, double, double, double)> object_function; + /** + * @brief The quality of search for an optimal placement. + * This is a compromise slider between quality and speed. Zero is the + * fast and poor solution while 1.0 is the slowest but most accurate. + */ + float accuracy = 1.0; + NfpPConfig(): rotations({0.0, Pi/2.0, Pi, 3*Pi/2}), - alignment(Alignment::CENTER) {} + alignment(Alignment::CENTER), starting_point(Alignment::CENTER) {} }; // A class for getting a point on the circumference of the polygon (in log time) @@ -39,14 +48,6 @@ template class EdgeCache { using Coord = TCoord; using Edge = _Segment; -// enum Corners { -// BOTTOM, -// LEFT, -// RIGHT, -// TOP, -// NUM_CORNERS -// }; - mutable std::vector corners_; std::vector emap_; @@ -70,49 +71,9 @@ template class EdgeCache { void fetchCorners() const { if(!corners_.empty()) return; + // TODO Accuracy corners_ = distances_; - for(auto& d : corners_) { - d /= full_distance_; - } - -// corners_ = std::vector(NUM_CORNERS, 0.0); - -// std::vector idx_ud(emap_.size(), 0); -// std::vector idx_lr(emap_.size(), 0); - -// std::iota(idx_ud.begin(), idx_ud.end(), 0); -// std::iota(idx_lr.begin(), idx_lr.end(), 0); - -// std::sort(idx_ud.begin(), idx_ud.end(), -// [this](unsigned idx1, unsigned idx2) -// { -// const Vertex& v1 = emap_[idx1].first(); -// const Vertex& v2 = emap_[idx2].first(); - -// auto diff = getY(v1) - getY(v2); -// if(std::abs(diff) <= std::numeric_limits::epsilon()) -// return getX(v1) < getX(v2); - -// return diff < 0; -// }); - -// std::sort(idx_lr.begin(), idx_lr.end(), -// [this](unsigned idx1, unsigned idx2) -// { -// const Vertex& v1 = emap_[idx1].first(); -// const Vertex& v2 = emap_[idx2].first(); - -// auto diff = getX(v1) - getX(v2); -// if(std::abs(diff) <= std::numeric_limits::epsilon()) -// return getY(v1) < getY(v2); - -// return diff < 0; -// }); - -// corners_[BOTTOM] = distances_[idx_ud.front()]/full_distance_; -// corners_[TOP] = distances_[idx_ud.back()]/full_distance_; -// corners_[LEFT] = distances_[idx_lr.front()]/full_distance_; -// corners_[RIGHT] = distances_[idx_lr.back()]/full_distance_; + for(auto& d : corners_) d /= full_distance_; } public: @@ -167,12 +128,6 @@ public: inline double circumference() const BP2D_NOEXCEPT { return full_distance_; } -// inline double corner(Corners c) const BP2D_NOEXCEPT { -// assert(c < NUM_CORNERS); -// fetchCorners(); -// return corners_[c]; -// } - inline const std::vector& corners() const BP2D_NOEXCEPT { fetchCorners(); return corners_; @@ -400,7 +355,7 @@ public: opt::StopCriteria stopcr; stopcr.max_iterations = 1000; - stopcr.stoplimit = 0.01; + stopcr.stoplimit = 0.001; stopcr.type = opt::StopLimitType::RELATIVE; opt::TOptimizer solver(stopcr); @@ -518,11 +473,37 @@ private: void setInitialPosition(Item& item) { Box&& bb = item.boundingBox(); + Vertex ci, cb; - Vertex ci = bb.minCorner(); - Vertex cb = bin_.minCorner(); + switch(config_.starting_point) { + case Config::Alignment::CENTER: { + ci = bb.center(); + cb = bin_.center(); + break; + } + case Config::Alignment::BOTTOM_LEFT: { + ci = bb.minCorner(); + cb = bin_.minCorner(); + break; + } + case Config::Alignment::BOTTOM_RIGHT: { + ci = {getX(bb.maxCorner()), getY(bb.minCorner())}; + cb = {getX(bin_.maxCorner()), getY(bin_.minCorner())}; + break; + } + case Config::Alignment::TOP_LEFT: { + ci = {getX(bb.minCorner()), getY(bb.maxCorner())}; + cb = {getX(bin_.minCorner()), getY(bin_.maxCorner())}; + break; + } + case Config::Alignment::TOP_RIGHT: { + ci = bb.maxCorner(); + cb = bin_.maxCorner(); + break; + } + } - auto&& d = cb - ci; + auto d = cb - ci; item.translate(d); } diff --git a/xs/src/libnest2d/libnest2d/selections/djd_heuristic.hpp b/xs/src/libnest2d/libnest2d/selections/djd_heuristic.hpp index dcc029251..1d233cf35 100644 --- a/xs/src/libnest2d/libnest2d/selections/djd_heuristic.hpp +++ b/xs/src/libnest2d/libnest2d/selections/djd_heuristic.hpp @@ -41,11 +41,24 @@ public: struct Config { /** - * If true, the algorithm will try to place pair and driplets in all - * possible order. + * If true, the algorithm will try to place pair and triplets in all + * possible order. It will have a hugely negative impact on performance. */ bool try_reverse_order = true; + /** + * @brief try_pairs Whether to try pairs of items to pack. It will add + * a quadratic component to the complexity. + */ + bool try_pairs = true; + + /** + * @brief Whether to try groups of 3 items to pack. This could be very + * slow for large number of items (>100) as it adds a cubic component + * to the complexity. + */ + bool try_triplets = false; + /** * The initial fill proportion of the bin area that will be filled before * trying items one by one, or pairs or triplets. @@ -151,8 +164,8 @@ public: return std::any_of(wrong_pairs.begin(), wrong_pairs.end(), [&i1, &i2](const TPair& pair) { - Item& pi1 = std::get<0>(pair), pi2 = std::get<1>(pair); - Item& ri1 = i1, ri2 = i2; + Item& pi1 = std::get<0>(pair), &pi2 = std::get<1>(pair); + Item& ri1 = i1, &ri2 = i2; return (&pi1 == &ri1 && &pi2 == &ri2) || (&pi1 == &ri2 && &pi2 == &ri1); }); @@ -172,7 +185,7 @@ public: Item& pi1 = std::get<0>(tripl); Item& pi2 = std::get<1>(tripl); Item& pi3 = std::get<2>(tripl); - Item& ri1 = i1, ri2 = i2, ri3 = i3; + Item& ri1 = i1, &ri2 = i2, &ri3 = i3; return (&pi1 == &ri1 && &pi2 == &ri2 && &pi3 == &ri3) || (&pi1 == &ri1 && &pi2 == &ri3 && &pi3 == &ri2) || (&pi1 == &ri2 && &pi2 == &ri1 && &pi3 == &ri3) || @@ -348,6 +361,10 @@ public: // Will be true if a succesfull pack can be made. bool ret = false; + auto area = [](const ItemListIt& it) { + return it->get().area(); + }; + while (it != endit && !ret) { // drill down 1st level // We need to determine in each iteration the largest, second @@ -361,7 +378,7 @@ public: // Check if there is enough free area for the item and the two // largest item - if(free_area - it->get().area() - area_of_two_largest > waste) + if(free_area - area(it) - area_of_two_largest > waste) break; // Determine the area of the two smallest item. @@ -373,7 +390,7 @@ public: double area_of_two_smallest = smallest.area() + second_smallest.area(); - if(it->get().area() + area_of_two_smallest > free_area) { + if(area(it) + area_of_two_smallest > free_area) { it++; continue; } @@ -384,16 +401,18 @@ public: it2 = not_packed.begin(); double rem2_area = free_area - largest.area(); - double a2_sum = it->get().area() + it2->get().area(); + double a2_sum = 0; while(it2 != endit && !ret && - rem2_area - a2_sum <= waste) { // Drill down level 2 + rem2_area - (a2_sum = area(it) + area(it2)) <= waste) { + // Drill down level 2 + + if(a2_sum != area(it) + area(it2)) throw -1; if(it == it2 || check_pair(wrong_pairs, *it, *it2)) { it2++; continue; } - a2_sum = it->get().area() + it2->get().area(); if(a2_sum + smallest.area() > free_area) { it2++; continue; } @@ -429,14 +448,13 @@ public: // The 'smallest' variable now could be identical with // it2 but we don't bother with that - if(!can_pack2) { it2++; continue; } - it3 = not_packed.begin(); - double a3_sum = a2_sum + it3->get().area(); + double a3_sum = 0; while(it3 != endit && !ret && - free_area - a3_sum <= waste) { // 3rd level + free_area - (a3_sum = a2_sum + area(it3)) <= waste) { + // 3rd level if(it3 == it || it3 == it2 || check_triplet(wrong_triplets, *it, *it2, *it3)) @@ -560,8 +578,11 @@ public: if(do_parallel) dout() << "Parallel execution..." << "\n"; + bool do_pairs = config_.try_pairs; + bool do_triplets = config_.try_triplets; + // The DJD heuristic algorithm itself: - auto packjob = [INITIAL_FILL_AREA, bin_area, w, + auto packjob = [INITIAL_FILL_AREA, bin_area, w, do_triplets, do_pairs, &tryOneByOne, &tryGroupsOfTwo, &tryGroupsOfThree, @@ -573,7 +594,7 @@ public: double waste = .0; bool lasttry = false; - while(!not_packed.empty() ) { + while(!not_packed.empty()) { {// Fill the bin up to INITIAL_FILL_PROPORTION of its capacity auto it = not_packed.begin(); @@ -594,26 +615,25 @@ public: // try pieses one by one while(tryOneByOne(placer, not_packed, waste, free_area, filled_area)) { - if(lasttry) std::cout << "Lasttry monopack" << std::endl; waste = 0; lasttry = false; makeProgress(placer, idx, 1); } // try groups of 2 pieses - while(tryGroupsOfTwo(placer, not_packed, waste, free_area, + while(do_pairs && + tryGroupsOfTwo(placer, not_packed, waste, free_area, filled_area)) { - if(lasttry) std::cout << "Lasttry bipack" << std::endl; waste = 0; lasttry = false; makeProgress(placer, idx, 2); } -// // try groups of 3 pieses -// while(tryGroupsOfThree(placer, not_packed, waste, free_area, -// filled_area)) { -// if(lasttry) std::cout << "Lasttry tripack" << std::endl; -// waste = 0; lasttry = false; -// makeProgress(placer, idx, 3); -// } + // try groups of 3 pieses + while(do_triplets && + tryGroupsOfThree(placer, not_packed, waste, free_area, + filled_area)) { + waste = 0; lasttry = false; + makeProgress(placer, idx, 3); + } waste += w; if(!lasttry && waste > free_area) lasttry = true; diff --git a/xs/src/libslic3r/Model.cpp b/xs/src/libslic3r/Model.cpp index fc49d68af..f63722e52 100644 --- a/xs/src/libslic3r/Model.cpp +++ b/xs/src/libslic3r/Model.cpp @@ -19,7 +19,6 @@ #include #include -// #include #include "SVG.hpp" namespace Slic3r { @@ -308,7 +307,7 @@ namespace arr { using namespace libnest2d; -std::string toString(const Model& model) { +std::string toString(const Model& model, bool holes = true) { std::stringstream ss; ss << "{\n"; @@ -347,17 +346,17 @@ std::string toString(const Model& model) { // Holes: ss << "\t\t{\n"; -// for(auto h : expoly.holes) { -// ss << "\t\t\t{\n"; -// for(auto v : h.points) ss << "\t\t\t\t{" -// << v.x << ", " -// << v.y << "},\n"; -// { -// auto v = h.points.front(); -// ss << "\t\t\t\t{" << v.x << ", " << v.y << "},\n"; -// } -// ss << "\t\t\t},\n"; -// } + if(holes) for(auto h : expoly.holes) { + ss << "\t\t\t{\n"; + for(auto v : h.points) ss << "\t\t\t\t{" + << v.x << ", " + << v.y << "},\n"; + { + auto v = h.points.front(); + ss << "\t\t\t\t{" << v.x << ", " << v.y << "},\n"; + } + ss << "\t\t\t},\n"; + } ss << "\t\t},\n"; ss << "\t},\n"; @@ -476,58 +475,21 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, // Create the arranger config auto min_obj_distance = static_cast(dist/SCALING_FACTOR); - // Benchmark bench; - - // std::cout << "Creating model siluett..." << std::endl; - - // bench.start(); // Get the 2D projected shapes with their 3D model instance pointers auto shapemap = arr::projectModelFromTop(model); - // bench.stop(); - - // std::cout << "Model siluett created in " << bench.getElapsedSec() - // << " seconds. " << "Min object distance = " << min_obj_distance << std::endl; - -// std::cout << "{" << std::endl; -// std::for_each(shapemap.begin(), shapemap.end(), -// [] (ShapeData2D::value_type& it) -// { -// std::cout << "\t{" << std::endl; -// Item& item = it.second; -// for(auto& v : item) { -// std::cout << "\t\t" << "{" << getX(v) -// << ", " << getY(v) << "},\n"; -// } -// std::cout << "\t}," << std::endl; -// }); -// std::cout << "}" << std::endl; -// return true; bool hasbin = bb != nullptr && bb->defined; double area_max = 0; - Item *biggest = nullptr; // Copy the references for the shapes only as the arranger expects a // sequence of objects convertible to Item or ClipperPolygon std::vector> shapes; shapes.reserve(shapemap.size()); std::for_each(shapemap.begin(), shapemap.end(), - [&shapes, min_obj_distance, &area_max, &biggest,hasbin] + [&shapes, min_obj_distance, &area_max, hasbin] (ShapeData2D::value_type& it) { - if(!hasbin) { - Item& item = it.second; - item.addOffset(min_obj_distance); - auto b = ShapeLike::boundingBox(item.transformedShape()); - auto a = b.width()*b.height(); - if(area_max < a) { - area_max = static_cast(a); - biggest = &item; - } - } - shapes.push_back(std::ref(it.second)); - }); Box bin; @@ -545,9 +507,6 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, static_cast(bbb.max.x), static_cast(bbb.max.y) }); - } else { - // Just take the biggest item as bin... ? - bin = ShapeLike::boundingBox(biggest->transformedShape()); } // Will use the DJD selection heuristic with the BottomLeft placement @@ -562,20 +521,22 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, // Align the arranged pile into the center of the bin pcfg.alignment = PConf::Alignment::CENTER; + // Start placing the items from the center of the print bed + pcfg.starting_point = PConf::Alignment::CENTER; + // TODO cannot use rotations until multiple objects of same geometry can // handle different rotations // arranger.useMinimumBoundigBoxRotation(); pcfg.rotations = { 0.0 }; // Magic: we will specify what is the goal of arrangement... - // In this case we override the default object function because we - // (apparently) don't care about pack efficiency and all we care is that the - // larger items go into the center of the pile and smaller items orbit it - // so the resulting pile has a circle-like shape. - // This is good for the print bed's heat profile. - // As a side effect, the arrange procedure is a lot faster (we do not need - // to calculate the convex hulls) - pcfg.object_function = [&bin]( + // In this case we override the default object to make the larger items go + // into the center of the pile and smaller items orbit it so the resulting + // pile has a circle-like shape. This is good for the print bed's heat + // profile. We alse sacrafice a bit of pack efficiency for this to work. As + // a side effect, the arrange procedure is a lot faster (we do not need to + // calculate the convex hulls) + pcfg.object_function = [bin, hasbin]( NfpPlacer::Pile pile, // The currently arranged pile double /*area*/, // Sum area of items (not needed) double norm, // A norming factor for physical dimensions @@ -583,14 +544,25 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, { auto bb = ShapeLike::boundingBox(pile); - // We will optimize to the diameter of the circle around the bounding - // box and use the norming factor to get rid of the physical dimensions - double score = PointLike::distance(bb.minCorner(), - bb.maxCorner()) / norm; + // We get the current item that's being evaluated. + auto& sh = pile.back(); + + // We retrieve the reference point of this item + auto rv = Nfp::referenceVertex(sh); + + // We get the distance of the reference point from the center of the + // heat bed + auto c = bin.center(); + auto d = PointLike::distance(rv, c); + + // The score will be the normalized distance which will be minimized, + // effectively creating a circle shaped pile of items + double score = double(d)/norm; // If it does not fit into the print bed we will beat it - // with a large penality - if(!NfpPlacer::wouldFit(bb, bin)) score = 2*penality - score; + // with a large penality. If we would not do this, there would be only + // one big pile that doesn't care whether it fits onto the print bed. + if(hasbin && !NfpPlacer::wouldFit(bb, bin)) score = 2*penality - score; return score; }; @@ -601,18 +573,10 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, // Set the progress indicator for the arranger. arranger.progressIndicator(progressind); - // std::cout << "Arranging model..." << std::endl; - // bench.start(); - // Arrange and return the items with their respective indices within the // input sequence. auto result = arranger.arrangeIndexed(shapes.begin(), shapes.end()); - // bench.stop(); - // std::cout << "Model arranged in " << bench.getElapsedSec() - // << " seconds." << std::endl; - - auto applyResult = [&shapemap](ArrangeResult::value_type& group, Coord batch_offset) { @@ -636,8 +600,6 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, } }; - // std::cout << "Applying result..." << std::endl; - // bench.start(); if(first_bin_only) { applyResult(result.front(), 0); } else { @@ -657,9 +619,6 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, batch_offset += stride; } } - // bench.stop(); - // std::cout << "Result applied in " << bench.getElapsedSec() - // << " seconds." << std::endl; for(auto objptr : model.objects) objptr->invalidate_bounding_box(); @@ -674,16 +633,11 @@ bool Model::arrange_objects(coordf_t dist, const BoundingBoxf* bb, { bool ret = false; if(bb != nullptr && bb->defined) { + // Despite the new arrange is able to run without a specified bin, + // the perl testsuit still fails for this case. For now the safest + // thing to do is to use the new arrange only when a proper bin is + // specified. ret = arr::arrange(*this, dist, bb, false, progressind); -// std::fstream out("out.cpp", std::fstream::out); -// if(out.good()) { -// out << "const TestData OBJECTS = \n"; -// out << arr::toString(*this); -// } -// out.close(); -// SVG svg("out.svg"); -// arr::toSVG(svg, *this); -// svg.Close(); } else { // get the (transformed) size of each instance so that we take // into account their different transformations when packing From 50424e33c6645873ce423ca92527fa745d28a194 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Tue, 17 Jul 2018 16:35:48 +0200 Subject: [PATCH 148/198] Safety check for firstfit for larger objects than the print bed. --- xs/src/libnest2d/libnest2d/selections/firstfit.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xs/src/libnest2d/libnest2d/selections/firstfit.hpp b/xs/src/libnest2d/libnest2d/selections/firstfit.hpp index 8a8a09f91..2253a0dfe 100644 --- a/xs/src/libnest2d/libnest2d/selections/firstfit.hpp +++ b/xs/src/libnest2d/libnest2d/selections/firstfit.hpp @@ -55,6 +55,18 @@ public: this->progress_(--total); }; + // Safety test: try to pack each item into an empty bin. If it fails + // then it should be removed from the not_packed list + { auto it = store_.begin(); + while (it != store_.end()) { + Placer p(bin); + if(!p.pack(*it)) { + auto itmp = it++; + store_.erase(itmp); + } else it++; + } + } + for(auto& item : store_ ) { bool was_packed = false; while(!was_packed) { From 0660862058565ab3c4e3523ec554f38cb02987bc Mon Sep 17 00:00:00 2001 From: bubnikv Date: Tue, 17 Jul 2018 19:37:24 +0200 Subject: [PATCH 149/198] For the Marlin firmware, the machine envelope G-code is emitted based on the Slic3r printer profile. Also the bundled config has been updated, so that the machine envelope G-code values were removed and the new Slic3r printer profile values were updated with the former G-code values. Slic3r version has been bumped up to 1.41.0-alpha for the configuration files to work. --- resources/profiles/PrusaResearch.idx | 2 + resources/profiles/PrusaResearch.ini | 93 ++++++++++++++++------------ xs/src/libslic3r/GCode.cpp | 32 ++++++++++ xs/src/libslic3r/GCode.hpp | 1 + xs/src/libslic3r/PrintConfig.cpp | 8 +-- xs/src/libslic3r/libslic3r.h | 2 +- xs/src/slic3r/GUI/Tab.cpp | 15 +++-- 7 files changed, 105 insertions(+), 48 deletions(-) diff --git a/resources/profiles/PrusaResearch.idx b/resources/profiles/PrusaResearch.idx index 19a8ab17f..d050ef39c 100644 --- a/resources/profiles/PrusaResearch.idx +++ b/resources/profiles/PrusaResearch.idx @@ -1,3 +1,5 @@ +min_slic3r_version = 1.41.0-alpha +0.2.0-alpha min_slic3r_version = 1.40.0 0.1.6 Split the MK2.5 profile from the MK2S min_slic3r_version = 1.40.0-beta diff --git a/resources/profiles/PrusaResearch.ini b/resources/profiles/PrusaResearch.ini index e6d5d8187..7e2c78377 100644 --- a/resources/profiles/PrusaResearch.ini +++ b/resources/profiles/PrusaResearch.ini @@ -5,7 +5,7 @@ name = Prusa Research # Configuration version of this file. Config file will only be installed, if the config_version differs. # This means, the server may force the Slic3r configuration to be downgraded. -config_version = 0.1.6 +config_version = 0.2.0-alpha # Where to get the updates from? config_update_url = https://raw.githubusercontent.com/prusa3d/Slic3r-settings/master/live/PrusaResearch/ @@ -140,7 +140,7 @@ infill_extrusion_width = 0.25 perimeter_extrusion_width = 0.25 solid_infill_extrusion_width = 0.25 top_infill_extrusion_width = 0.25 -support_material_extrusion_width = 0.18 +support_material_extrusion_width = 0.2 support_material_interface_layers = 0 support_material_interface_spacing = 0.15 support_material_spacing = 1 @@ -155,6 +155,7 @@ infill_extrusion_width = 0.7 perimeter_extrusion_width = 0.65 solid_infill_extrusion_width = 0.65 top_infill_extrusion_width = 0.6 +support_material_extrusion_width = 0.55 [print:*soluble_support*] overhangs = 1 @@ -213,26 +214,18 @@ top_infill_extrusion_width = 0.4 [print:0.05mm ULTRADETAIL 0.25 nozzle] inherits = *0.05mm*; *0.25nozzle* compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK2.*/ and nozzle_diameter[0]==0.25 and num_extruders==1 -external_perimeter_extrusion_width = 0 -extrusion_width = 0.28 fill_density = 20% -first_layer_extrusion_width = 0.3 -infill_extrusion_width = 0 infill_speed = 20 max_print_speed = 100 -perimeter_extrusion_width = 0 perimeter_speed = 20 small_perimeter_speed = 15 -solid_infill_extrusion_width = 0 solid_infill_speed = 20 support_material_speed = 20 -top_infill_extrusion_width = 0 [print:0.05mm ULTRADETAIL 0.25 nozzle MK3] inherits = *0.05mm*; *0.25nozzle* compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and nozzle_diameter[0]==0.25 and num_extruders==1 fill_pattern = grid -top_infill_extrusion_width = 0.4 # XXXXXXXXXXXXXXXXXXXX # XXX--- 0.10mm ---XXX @@ -294,7 +287,6 @@ infill_speed = 200 max_print_speed = 200 perimeter_speed = 45 solid_infill_speed = 200 -top_infill_extrusion_width = 0.4 top_solid_infill_speed = 50 [print:0.10mm DETAIL 0.6 nozzle MK3] @@ -308,7 +300,6 @@ infill_speed = 200 max_print_speed = 200 perimeter_speed = 45 solid_infill_speed = 200 -top_infill_extrusion_width = 0.4 top_solid_infill_speed = 50 # XXXXXXXXXXXXXXXXXXXX @@ -358,7 +349,6 @@ perimeter_acceleration = 600 perimeter_speed = 25 small_perimeter_speed = 15 solid_infill_speed = 40 -support_material_extrusion_width = 0.2 top_solid_infill_speed = 30 [print:0.15mm OPTIMAL 0.6 nozzle] @@ -544,7 +534,6 @@ external_perimeter_extrusion_width = 0.6 external_perimeter_speed = 30 notes = Set your solluble extruder in Multiple Extruders > Support material/raft interface extruder perimeter_speed = 40 -support_material_extrusion_width = 0.55 support_material_interface_layers = 3 support_material_xy_spacing = 120% top_infill_extrusion_width = 0.57 @@ -912,6 +901,23 @@ end_gcode = G4 ; wait\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbe extruder_colour = #FFFF00 extruder_offset = 0x0 gcode_flavor = marlin +silent_mode = 0 +machine_max_acceleration_e = 10000 +machine_max_acceleration_extruding = 1500 +machine_max_acceleration_retracting = 1500 +machine_max_acceleration_x = 9000 +machine_max_acceleration_y = 9000 +machine_max_acceleration_z = 500 +machine_max_feedrate_e = 120 +machine_max_feedrate_x = 500 +machine_max_feedrate_y = 500 +machine_max_feedrate_z = 12 +machine_max_jerk_e = 2.5 +machine_max_jerk_x = 10 +machine_max_jerk_y = 10 +machine_max_jerk_z = 0.2 +machine_min_extruding_rate = 0 +machine_min_travel_rate = 0 layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z] max_layer_height = 0.25 min_layer_height = 0.07 @@ -935,7 +941,7 @@ retract_speed = 35 serial_port = serial_speed = 250000 single_extruder_multi_material = 0 -start_gcode = M115 U3.1.0 ; tell printer latest fw version\nM201 X9000 Y9000 Z500 E10000 ; sets maximum accelerations, mm/sec^2\nM203 X500 Y500 Z12 E120 ; sets maximum feedrates, mm/sec\nM204 S1500 T1500 ; sets acceleration (S) and retract acceleration (T)\nM205 X10 Y10 Z0.2 E2.5 ; sets the jerk limits, mm/sec\nM205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Y-3.0 F1000.0 ; go outside print area\nG92 E0.0\nG1 X60.0 E9.0 F1000.0 ; intro line\nG1 X100.0 E12.5 F1000.0 ; intro line\nG92 E0.0 +start_gcode = M115 U3.1.0 ; tell printer latest fw version\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Y-3.0 F1000.0 ; go outside print area\nG92 E0.0\nG1 X60.0 E9.0 F1000.0 ; intro line\nG1 X100.0 E12.5 F1000.0 ; intro line\nG92 E0.0 toolchange_gcode = use_firmware_retraction = 0 use_relative_e_distances = 1 @@ -971,7 +977,7 @@ printer_model = MK2SMM inherits = *multimaterial* end_gcode = G1 E-4 F2100.00000\nG91\nG1 Z1 F7200.000\nG90\nG1 X245 Y1\nG1 X240 E4\nG1 F4000\nG1 X190 E2.7 \nG1 F4600\nG1 X110 E2.8\nG1 F5200\nG1 X40 E3 \nG1 E-15.0000 F5000\nG1 E-50.0000 F5400\nG1 E-15.0000 F3000\nG1 E-12.0000 F2000\nG1 F1600\nG1 X0 Y1 E3.0000\nG1 X50 Y1 E-5.0000\nG1 F2000\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-3.0000\nG4 S0\nM107 ; turn off fan\n{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+30, max_print_height)}{endif} ; Move print head up\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nG28 X0 ; home X axis\nM84 ; disable motors\n\n printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK2\nPRINTER_HAS_BOWDEN -start_gcode = M115 U3.1.0 ; tell printer latest fw version\nM201 X9000 Y9000 Z500 E10000 ; sets maximum accelerations, mm/sec^2\nM203 X500 Y500 Z12 E120 ; sets maximum feedrates, mm/sec\nM204 S1500 T1500 ; sets acceleration (S) and retract acceleration (T)\nM205 X10 Y10 Z0.2 E2.5 ; sets the jerk limits, mm/sec\nM205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec\n; Start G-Code sequence START\nT?\nM104 S[first_layer_temperature]\nM140 S[first_layer_bed_temperature]\nM109 S[first_layer_temperature]\nM190 S[first_layer_bed_temperature]\nG21 ; set units to millimeters\nG90 ; use absolute coordinates\nM83 ; use relative distances for extrusion\nG28 W\nG80\nG92 E0.0\nM203 E100\nM92 E140\nG1 Z0.250 F7200.000\nG1 X50.0 E80.0 F1000.0\nG1 X160.0 E20.0 F1000.0\nG1 Z0.200 F7200.000\nG1 X220.0 E13 F1000.0\nG1 X240.0 E0 F1000.0\nG1 E-4 F1000.0\nG92 E0.0 +start_gcode = M115 U3.1.0 ; tell printer latest fw version\n; Start G-Code sequence START\nT?\nM104 S[first_layer_temperature]\nM140 S[first_layer_bed_temperature]\nM109 S[first_layer_temperature]\nM190 S[first_layer_bed_temperature]\nG21 ; set units to millimeters\nG90 ; use absolute coordinates\nM83 ; use relative distances for extrusion\nG28 W\nG80\nG92 E0.0\nM203 E100\nM92 E140\nG1 Z0.250 F7200.000\nG1 X50.0 E80.0 F1000.0\nG1 X160.0 E20.0 F1000.0\nG1 Z0.200 F7200.000\nG1 X220.0 E13 F1000.0\nG1 X240.0 E0 F1000.0\nG1 E-4 F1000.0\nG92 E0.0 default_print_profile = 0.15mm OPTIMAL default_filament_profile = Prusa PLA @@ -981,7 +987,7 @@ end_gcode = {if not has_wipe_tower}\n; Pull the filament into the cooling tubes. extruder_colour = #FFAA55;#5182DB;#4ECDD3;#FB7259 nozzle_diameter = 0.4,0.4,0.4,0.4 printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK2\nPRINTER_HAS_BOWDEN -start_gcode = M115 U3.1.0 ; tell printer latest fw version\nM201 X9000 Y9000 Z500 E10000 ; sets maximum accelerations, mm/sec^2\nM203 X500 Y500 Z12 E120 ; sets maximum feedrates, mm/sec\nM204 S1500 T1500 ; sets acceleration (S) and retract acceleration (T)\nM205 X10 Y10 Z0.2 E2.5 ; sets the jerk limits, mm/sec\nM205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec\n; Start G-Code sequence START\nT[initial_tool]\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG21 ; set units to millimeters\nG90 ; use absolute coordinates\nM83 ; use relative distances for extrusion\nG28 W\nG80\nG92 E0.0\nM203 E100 ; set max feedrate\nM92 E140 ; E-steps per filament milimeter\n{if not has_wipe_tower}\nG1 Z0.250 F7200.000\nG1 X50.0 E80.0 F1000.0\nG1 X160.0 E20.0 F1000.0\nG1 Z0.200 F7200.000\nG1 X220.0 E13 F1000.0\nG1 X240.0 E0 F1000.0\nG1 E-4 F1000.0\n{endif}\nG92 E0.0 +start_gcode = M115 U3.1.0 ; tell printer latest fw version\n; Start G-Code sequence START\nT[initial_tool]\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG21 ; set units to millimeters\nG90 ; use absolute coordinates\nM83 ; use relative distances for extrusion\nG28 W\nG80\nG92 E0.0\nM203 E100 ; set max feedrate\nM92 E140 ; E-steps per filament milimeter\n{if not has_wipe_tower}\nG1 Z0.250 F7200.000\nG1 X50.0 E80.0 F1000.0\nG1 X160.0 E20.0 F1000.0\nG1 Z0.200 F7200.000\nG1 X220.0 E13 F1000.0\nG1 X240.0 E0 F1000.0\nG1 E-4 F1000.0\n{endif}\nG92 E0.0 variable_layer_height = 0 default_print_profile = 0.15mm OPTIMAL default_filament_profile = Prusa PLA @@ -1005,7 +1011,7 @@ printer_variant = 0.25 default_print_profile = 0.10mm DETAIL 0.25 nozzle [printer:Original Prusa i3 MK2 0.6 nozzle] -inherits = *common*; *0.6nozzle* +inherits = *common* max_layer_height = 0.35 min_layer_height = 0.1 nozzle_diameter = 0.6 @@ -1020,7 +1026,7 @@ default_print_profile = 0.20mm NORMAL 0.6 nozzle inherits = *mm-single* [printer:Original Prusa i3 MK2 MM Single Mode 0.6 nozzle] -inherits = *mm-single*; *0.6nozzle* +inherits = *mm-single* nozzle_diameter = 0.6 printer_variant = 0.6 default_print_profile = 0.20mm NORMAL 0.6 nozzle @@ -1030,7 +1036,7 @@ inherits = *mm-multi* nozzle_diameter = 0.4,0.4,0.4,0.4 [printer:Original Prusa i3 MK2 MultiMaterial 0.6 nozzle] -inherits = *mm-multi*; *0.6nozzle* +inherits = *mm-multi* nozzle_diameter = 0.6,0.6,0.6,0.6 printer_variant = 0.6 default_print_profile = 0.20mm NORMAL 0.6 nozzle @@ -1042,17 +1048,17 @@ default_print_profile = 0.20mm NORMAL 0.6 nozzle [printer:Original Prusa i3 MK2.5] inherits = Original Prusa i3 MK2 printer_model = MK2.5 -start_gcode = M115 U3.2.1 ; tell printer latest fw version\nM201 X9000 Y9000 Z500 E10000 ; sets maximum accelerations, mm/sec^2\nM203 X500 Y500 Z12 E120 ; sets maximum feedrates, mm/sec\nM204 S1500 T1500 ; sets acceleration (S) and retract acceleration (T)\nM205 X10 Y10 Z0.2 E2.5 ; sets the jerk limits, mm/sec\nM205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Y-3.0 F1000.0 ; go outside print area\nG92 E0.0\nG1 X60.0 E9.0 F1000.0 ; intro line\nG1 X100.0 E12.5 F1000.0 ; intro line\nG92 E0.0 +start_gcode = M115 U3.2.1 ; tell printer latest fw version\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Y-3.0 F1000.0 ; go outside print area\nG92 E0.0\nG1 X60.0 E9.0 F1000.0 ; intro line\nG1 X100.0 E12.5 F1000.0 ; intro line\nG92 E0.0 [printer:Original Prusa i3 MK2.5 0.25 nozzle] inherits = Original Prusa i3 MK2 0.25 nozzle printer_model = MK2.5 -start_gcode = M115 U3.2.1 ; tell printer latest fw version\nM201 X9000 Y9000 Z500 E10000 ; sets maximum accelerations, mm/sec^2\nM203 X500 Y500 Z12 E120 ; sets maximum feedrates, mm/sec\nM204 S1500 T1500 ; sets acceleration (S) and retract acceleration (T)\nM205 X10 Y10 Z0.2 E2.5 ; sets the jerk limits, mm/sec\nM205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Y-3.0 F1000.0 ; go outside print area\nG92 E0.0\nG1 X60.0 E9.0 F1000.0 ; intro line\nG1 X100.0 E12.5 F1000.0 ; intro line\nG92 E0.0 +start_gcode = M115 U3.2.1 ; tell printer latest fw version\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Y-3.0 F1000.0 ; go outside print area\nG92 E0.0\nG1 X60.0 E9.0 F1000.0 ; intro line\nG1 X100.0 E12.5 F1000.0 ; intro line\nG92 E0.0 [printer:Original Prusa i3 MK2.5 0.6 nozzle] inherits = Original Prusa i3 MK2 0.6 nozzle printer_model = MK2.5 -start_gcode = M115 U3.2.1 ; tell printer latest fw version\nM201 X9000 Y9000 Z500 E10000 ; sets maximum accelerations, mm/sec^2\nM203 X500 Y500 Z12 E120 ; sets maximum feedrates, mm/sec\nM204 S1500 T1500 ; sets acceleration (S) and retract acceleration (T)\nM205 X10 Y10 Z0.2 E2.5 ; sets the jerk limits, mm/sec\nM205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Y-3.0 F1000.0 ; go outside print area\nG92 E0.0\nG1 X60.0 E9.0 F1000.0 ; intro line\nG1 X100.0 E12.5 F1000.0 ; intro line\nG92 E0.0 +start_gcode = M115 U3.2.1 ; tell printer latest fw version\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Y-3.0 F1000.0 ; go outside print area\nG92 E0.0\nG1 X60.0 E9.0 F1000.0 ; intro line\nG1 X100.0 E12.5 F1000.0 ; intro line\nG92 E0.0 # XXXXXXXXXXXXXXXXX # XXX--- MK3 ---XXX @@ -1061,38 +1067,47 @@ start_gcode = M115 U3.2.1 ; tell printer latest fw version\nM201 X9000 Y9000 Z50 [printer:Original Prusa i3 MK3] inherits = *common* end_gcode = G4 ; wait\nM221 S100\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+30, max_print_height)}{endif} ; Move print head up\nG1 X0 Y200; home X axis\nM84 ; disable motors +machine_max_acceleration_e = 9000,9000 +machine_max_acceleration_extruding = 1250,960 +machine_max_acceleration_retracting = 1250,1250 +machine_max_acceleration_x = 1000,1000 +machine_max_acceleration_y = 1000,1000 +machine_max_acceleration_z = 1000,1000 +machine_max_feedrate_e = 120,120 +machine_max_feedrate_x = 200,172 +machine_max_feedrate_y = 200,172 +machine_max_feedrate_z = 12,12 +machine_max_jerk_e = 1.5,1.5 +machine_max_jerk_x = 8,8 +machine_max_jerk_y = 8,8 +machine_max_jerk_z = 0.4,0.4 +machine_min_extruding_rate = 0,0 +machine_min_travel_rate = 0,0 +silent_mode = 1 printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK3\n retract_lift_below = 209 max_print_height = 210 -start_gcode = M115 U3.2.1 ; tell printer latest fw version\nM201 X1000 Y1000 Z200 E5000 ; sets maximum accelerations, mm/sec^2\nM203 X200 Y200 Z12 E120 ; sets maximum feedrates, mm/sec\nM204 S1250 T1250 ; sets acceleration (S) and retract acceleration (T)\nM205 X10 Y10 Z0.4 E2.5 ; sets the jerk limits, mm/sec\nM205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Y-3.0 F1000.0 ; go outside print area\nG92 E0.0\nG1 X60.0 E9.0 F1000.0 ; intro line\nG1 X100.0 E12.5 F1000.0 ; intro line\nG92 E0.0\nM221 S{if layer_height==0.05}100{else}95{endif} +start_gcode = M115 U3.3.0 ; tell printer latest fw version\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Y-3.0 F1000.0 ; go outside print area\nG92 E0.0\nG1 X60.0 E9.0 F1000.0 ; intro line\nG1 X100.0 E12.5 F1000.0 ; intro line\nG92 E0.0\nM221 S{if layer_height==0.05}100{else}95{endif} printer_model = MK3 default_print_profile = 0.15mm OPTIMAL MK3 [printer:Original Prusa i3 MK3 0.25 nozzle] -inherits = *common* +inherits = Original Prusa i3 MK3 nozzle_diameter = 0.25 -end_gcode = G4 ; wait\nM221 S100\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+30, max_print_height)}{endif} ; Move print head up\nG1 X0 Y200; home X axis\nM84 ; disable motors -printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK3\n -retract_lift_below = 209 -max_print_height = 210 -start_gcode = M115 U3.2.1 ; tell printer latest fw version\nM201 X1000 Y1000 Z200 E5000 ; sets maximum accelerations, mm/sec^2\nM203 X200 Y200 Z12 E120 ; sets maximum feedrates, mm/sec\nM204 S1250 T1250 ; sets acceleration (S) and retract acceleration (T)\nM205 X10 Y10 Z0.4 E2.5 ; sets the jerk limits, mm/sec\nM205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Y-3.0 F1000.0 ; go outside print area\nG92 E0.0\nG1 X60.0 E9.0 F1000.0 ; intro line\nG1 X100.0 E12.5 F1000.0 ; intro line\nG92 E0.0\nM221 S{if layer_height==0.05}100{else}95{endif} -printer_model = MK3 +max_layer_height = 0.1 +min_layer_height = 0.05 printer_variant = 0.25 default_print_profile = 0.10mm DETAIL 0.25 nozzle MK3 [printer:Original Prusa i3 MK3 0.6 nozzle] -inherits = *common* +inherits = Original Prusa i3 MK3 nozzle_diameter = 0.6 -end_gcode = G4 ; wait\nM221 S100\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+30, max_print_height)}{endif} ; Move print head up\nG1 X0 Y200; home X axis\nM84 ; disable motors -printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK3\n -retract_lift_below = 209 -max_print_height = 210 -start_gcode = M115 U3.2.1 ; tell printer latest fw version\nM201 X1000 Y1000 Z200 E5000 ; sets maximum accelerations, mm/sec^2\nM203 X200 Y200 Z12 E120 ; sets maximum feedrates, mm/sec\nM204 S1250 T1250 ; sets acceleration (S) and retract acceleration (T)\nM205 X10 Y10 Z0.4 E2.5 ; sets the jerk limits, mm/sec\nM205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Y-3.0 F1000.0 ; go outside print area\nG92 E0.0\nG1 X60.0 E9.0 F1000.0 ; intro line\nG1 X100.0 E12.5 F1000.0 ; intro line\nG92 E0.0\nM221 S{if layer_height==0.05}100{else}95{endif} -printer_model = MK3 +max_layer_height = 0.35 +min_layer_height = 0.1 printer_variant = 0.6 default_print_profile = 0.15mm OPTIMAL 0.6 nozzle MK3 # The obsolete presets will be removed when upgrading from the legacy configuration structure (up to Slic3r 1.39.2) to 1.40.0 and newer. [obsolete_presets] print="0.05mm DETAIL 0.25 nozzle";"0.05mm DETAIL MK3";"0.05mm DETAIL";"0.20mm NORMAL MK3";"0.35mm FAST MK3" -filament="ColorFabb Brass Bronze 1.75mm";"ColorFabb HT 1.75mm";"ColorFabb nGen 1.75mm";"ColorFabb Woodfil 1.75mm";"ColorFabb XT 1.75mm";"ColorFabb XT-CF20 1.75mm";"E3D PC-ABS 1.75mm";"Fillamentum ABS 1.75mm";"Fillamentum ASA 1.75mm";"Generic ABS 1.75mm";"Generic PET 1.75mm";"Generic PLA 1.75mm";"Prusa ABS 1.75mm";"Prusa HIPS 1.75mm";"Prusa PET 1.75mm";"Prusa PLA 1.75mm";"Taulman Bridge 1.75mm";"Taulman T-Glase 1.75mm" \ No newline at end of file +filament="ColorFabb Brass Bronze 1.75mm";"ColorFabb HT 1.75mm";"ColorFabb nGen 1.75mm";"ColorFabb Woodfil 1.75mm";"ColorFabb XT 1.75mm";"ColorFabb XT-CF20 1.75mm";"E3D PC-ABS 1.75mm";"Fillamentum ABS 1.75mm";"Fillamentum ASA 1.75mm";"Generic ABS 1.75mm";"Generic PET 1.75mm";"Generic PLA 1.75mm";"Prusa ABS 1.75mm";"Prusa HIPS 1.75mm";"Prusa PET 1.75mm";"Prusa PLA 1.75mm";"Taulman Bridge 1.75mm";"Taulman T-Glase 1.75mm" diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index e587c8e93..98b3b4061 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -613,6 +613,9 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) m_cooling_buffer->set_current_extruder(initial_extruder_id); + // Emit machine envelope limits for the Marlin firmware. + this->print_machine_envelope(file, print); + // Disable fan. if (! print.config.cooling.get_at(initial_extruder_id) || print.config.disable_fan_first_layers.get_at(initial_extruder_id)) _write(file, m_writer.set_fan(0, true)); @@ -968,6 +971,35 @@ static bool custom_gcode_sets_temperature(const std::string &gcode, const int mc return temp_set_by_gcode; } +// Print the machine envelope G-code for the Marlin firmware based on the "machine_max_xxx" parameters. +// Do not process this piece of G-code by the time estimator, it already knows the values through another sources. +void GCode::print_machine_envelope(FILE *file, Print &print) +{ + if (print.config.gcode_flavor.value == gcfMarlin) { + fprintf(file, "M201 X%d Y%d Z%d E%d ; sets maximum accelerations, mm/sec^2\n", + int(print.config.machine_max_acceleration_x.values.front() + 0.5), + int(print.config.machine_max_acceleration_y.values.front() + 0.5), + int(print.config.machine_max_acceleration_z.values.front() + 0.5), + int(print.config.machine_max_acceleration_e.values.front() + 0.5)); + fprintf(file, "M203 X%d Y%d Z%d E%d ; sets maximum feedrates, mm/sec\n", + int(print.config.machine_max_feedrate_x.values.front() + 0.5), + int(print.config.machine_max_feedrate_y.values.front() + 0.5), + int(print.config.machine_max_feedrate_z.values.front() + 0.5), + int(print.config.machine_max_feedrate_e.values.front() + 0.5)); + fprintf(file, "M204 S%d T%d ; sets acceleration (S) and retract acceleration (T), mm/sec^2\n", + int(print.config.machine_max_acceleration_extruding.values.front() + 0.5), + int(print.config.machine_max_acceleration_retracting.values.front() + 0.5)); + fprintf(file, "M205 X%.2lf Y%.2lf Z%.2lf E%.2lf ; sets the jerk limits, mm/sec\n", + print.config.machine_max_jerk_x.values.front(), + print.config.machine_max_jerk_y.values.front(), + print.config.machine_max_jerk_z.values.front(), + print.config.machine_max_jerk_e.values.front()); + fprintf(file, "M205 S%d T%d ; sets the minimum extruding and travel feed rate, mm/sec\n", + int(print.config.machine_min_extruding_rate.values.front() + 0.5), + int(print.config.machine_min_travel_rate.values.front() + 0.5)); + } +} + // Write 1st layer bed temperatures into the G-code. // Only do that if the start G-code does not already contain any M-code controlling an extruder temperature. // M140 - Set Extruder Temperature diff --git a/xs/src/libslic3r/GCode.hpp b/xs/src/libslic3r/GCode.hpp index 7bc525731..8b40385e6 100644 --- a/xs/src/libslic3r/GCode.hpp +++ b/xs/src/libslic3r/GCode.hpp @@ -327,6 +327,7 @@ protected: void _write_format(FILE* file, const char* format, ...); std::string _extrude(const ExtrusionPath &path, std::string description = "", double speed = -1); + void print_machine_envelope(FILE *file, Print &print); void _print_first_layer_bed_temperature(FILE *file, Print &print, const std::string &gcode, unsigned int first_printing_extruder_id, bool wait); void _print_first_layer_extruder_temperatures(FILE *file, Print &print, const std::string &gcode, unsigned int first_printing_extruder_id, bool wait); // this flag triggers first layer speeds diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index f541089a3..739d597cd 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -907,10 +907,10 @@ PrintConfigDef::PrintConfigDef() }; std::vector axes { // name, max_feedrate, max_acceleration, max_jerk - { "x", { 500., 200. }, { 9000., 1000. }, { 10., 10. } }, - { "y", { 500., 200. }, { 9000., 1000. }, { 10., 10. } }, - { "z", { 12., 12. }, { 500., 200. }, { 0.2, 0.4 } }, - { "e", { 120., 120. }, { 10000., 5000. }, { 2.5, 2.5 } } + { "x", { 500., 200. }, { 9000., 1000. }, { 10. , 10. } }, + { "y", { 500., 200. }, { 9000., 1000. }, { 10. , 10. } }, + { "z", { 12., 12. }, { 500., 200. }, { 0.2, 0.4 } }, + { "e", { 120., 120. }, { 10000., 5000. }, { 2.5, 2.5 } } }; for (const AxisDefault &axis : axes) { std::string axis_upper = boost::to_upper_copy(axis.name); diff --git a/xs/src/libslic3r/libslic3r.h b/xs/src/libslic3r/libslic3r.h index b0c144efe..e81b0c8af 100644 --- a/xs/src/libslic3r/libslic3r.h +++ b/xs/src/libslic3r/libslic3r.h @@ -14,7 +14,7 @@ #include #define SLIC3R_FORK_NAME "Slic3r Prusa Edition" -#define SLIC3R_VERSION "1.40.1" +#define SLIC3R_VERSION "1.41.0-alpha" #define SLIC3R_BUILD "UNKNOWN" typedef int32_t coord_t; diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 911ec0cbe..5bd2876e7 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -1900,11 +1900,18 @@ void TabPrinter::update(){ bool is_marlin_flavor = m_config->option>("gcode_flavor")->value == gcfMarlin; - const std::string &printer_model = m_config->opt_string("printer_model"); - bool can_use_silent_mode = printer_model.empty() ? false : printer_model == "MK3"; // "true" only for MK3 printers + { + Field *sm = get_field("silent_mode"); + if (! is_marlin_flavor) + // Disable silent mode for non-marlin firmwares. + get_field("silent_mode")->toggle(false); + if (is_marlin_flavor) + sm->enable(); + else + sm->disable(); + } - get_field("silent_mode")->toggle(can_use_silent_mode && is_marlin_flavor); - if (can_use_silent_mode && m_use_silent_mode != m_config->opt_bool("silent_mode")) { + if (m_use_silent_mode != m_config->opt_bool("silent_mode")) { m_rebuild_kinematics_page = true; m_use_silent_mode = m_config->opt_bool("silent_mode"); } From c596c05765f07b8984a1e2af431c545f4bda3a88 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Tue, 17 Jul 2018 20:37:15 +0200 Subject: [PATCH 150/198] With the Marlin flavor, a "machine envelope limits" G-code section is emitted, which breaks some of the automatic tests. Changed the default firmware flavor to RepRap, so that the automatic tests will run. --- xs/src/libslic3r/PrintConfig.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 739d597cd..7064e19fe 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -772,7 +772,7 @@ PrintConfigDef::PrintConfigDef() def->enum_labels.push_back("Machinekit"); def->enum_labels.push_back("Smoothie"); def->enum_labels.push_back(L("No extrusion")); - def->default_value = new ConfigOptionEnum(gcfMarlin); + def->default_value = new ConfigOptionEnum(gcfRepRap); def = this->add("infill_acceleration", coFloat); def->label = L("Infill"); From 3bebe9f95458ec3562696001bfb8d6540e9c1215 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Tue, 17 Jul 2018 21:31:54 +0200 Subject: [PATCH 151/198] Restored the "Fix STL through Netfabb" functionality, which has been lost during some merge process. --- lib/Slic3r/GUI/Plater.pm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 4d421dc4a..d0d4969e6 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -1702,6 +1702,34 @@ sub export_object_stl { $self->statusbar->SetStatusText(L("STL file exported to ").$output_file); } +sub fix_through_netfabb { + my ($self) = @_; + my ($obj_idx, $object) = $self->selected_object; + return if !defined $obj_idx; + my $model_object = $self->{model}->objects->[$obj_idx]; + my $model_fixed = Slic3r::Model->new; + Slic3r::GUI::fix_model_by_win10_sdk_gui($model_object, $self->{print}, $model_fixed); + + my @new_obj_idx = $self->load_model_objects(@{$model_fixed->objects}); + return if !@new_obj_idx; + + foreach my $new_obj_idx (@new_obj_idx) { + my $o = $self->{model}->objects->[$new_obj_idx]; + $o->clear_instances; + $o->add_instance($_) for @{$model_object->instances}; + #$o->invalidate_bounding_box; + + if ($o->volumes_count == $model_object->volumes_count) { + for my $i (0..($o->volumes_count-1)) { + $o->get_volume($i)->config->apply($model_object->get_volume($i)->config); + } + } + #FIXME restore volumes and their configs, layer_height_ranges, layer_height_profile, layer_height_profile_valid, + } + + $self->remove($obj_idx); +} + sub export_amf { my ($self) = @_; return if !@{$self->{objects}}; @@ -2280,6 +2308,11 @@ sub object_menu { $frame->_append_menu_item($menu, L("Export object as STL…"), L('Export this single object as STL file'), sub { $self->export_object_stl; }, undef, 'brick_go.png'); + if (Slic3r::GUI::is_windows10) { + $frame->_append_menu_item($menu, L("Fix STL through Netfabb"), L('Fix the model by sending it to a Netfabb cloud service through Windows 10 API'), sub { + $self->fix_through_netfabb; + }, undef, 'brick_go.png'); + } return $menu; } From d672a69554097aa445c710e5bfe84f4dbfa4a246 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Wed, 18 Jul 2018 09:37:25 +0200 Subject: [PATCH 152/198] Slice only objects contained into the print volume --- xs/src/libslic3r/GCode.cpp | 7 ++-- xs/src/libslic3r/GCode/ToolOrdering.cpp | 6 ++-- xs/src/libslic3r/Model.cpp | 48 +++++++++++++++++++++++++ xs/src/libslic3r/Model.hpp | 8 +++-- xs/src/libslic3r/Print.cpp | 27 ++++++++++---- xs/src/libslic3r/Print.hpp | 4 +++ xs/src/libslic3r/PrintObject.cpp | 17 ++++++++- xs/src/slic3r/GUI/GLCanvas3D.cpp | 4 +-- 8 files changed, 105 insertions(+), 16 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 98b3b4061..4345f2d07 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -776,9 +776,10 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) // Order objects using a nearest neighbor search. std::vector object_indices; Points object_reference_points; - for (PrintObject *object : print.objects) + PrintObjectPtrs printable_objects = print.get_printable_objects(); + for (PrintObject *object : printable_objects) object_reference_points.push_back(object->_shifted_copies.front()); - Slic3r::Geometry::chained_path(object_reference_points, object_indices); + Slic3r::Geometry::chained_path(object_reference_points, object_indices); // Sort layers by Z. // All extrusion moves with the same top layer height are extruded uninterrupted. std::vector>> layers_to_print = collect_layers_to_print(print); @@ -790,7 +791,7 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) // Verify, whether the print overaps the priming extrusions. BoundingBoxf bbox_print(get_print_extrusions_extents(print)); coordf_t twolayers_printz = ((layers_to_print.size() == 1) ? layers_to_print.front() : layers_to_print[1]).first + EPSILON; - for (const PrintObject *print_object : print.objects) + for (const PrintObject *print_object : printable_objects) bbox_print.merge(get_print_object_extrusions_extents(*print_object, twolayers_printz)); bbox_print.merge(get_wipe_tower_extrusions_extents(print, twolayers_printz)); BoundingBoxf bbox_prime(get_wipe_tower_priming_extrusions_extents(print)); diff --git a/xs/src/libslic3r/GCode/ToolOrdering.cpp b/xs/src/libslic3r/GCode/ToolOrdering.cpp index f1dbbfc1e..2a85319aa 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.cpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.cpp @@ -67,11 +67,13 @@ ToolOrdering::ToolOrdering(const PrintObject &object, unsigned int first_extrude ToolOrdering::ToolOrdering(const Print &print, unsigned int first_extruder, bool prime_multi_material) { m_print_config_ptr = &print.config; + + PrintObjectPtrs objects = print.get_printable_objects(); // Initialize the print layers for all objects and all layers. coordf_t object_bottom_z = 0.; { std::vector zs; - for (auto object : print.objects) { + for (auto object : objects) { zs.reserve(zs.size() + object->layers.size() + object->support_layers.size()); for (auto layer : object->layers) zs.emplace_back(layer->print_z); @@ -84,7 +86,7 @@ ToolOrdering::ToolOrdering(const Print &print, unsigned int first_extruder, bool } // Collect extruders reuqired to print the layers. - for (auto object : print.objects) + for (auto object : objects) this->collect_extruders(*object); // Reorder the extruders to minimize tool switches. diff --git a/xs/src/libslic3r/Model.cpp b/xs/src/libslic3r/Model.cpp index 2925251eb..bd95d9959 100644 --- a/xs/src/libslic3r/Model.cpp +++ b/xs/src/libslic3r/Model.cpp @@ -1235,6 +1235,54 @@ void ModelObject::split(ModelObjectPtrs* new_objects) return; } +void ModelObject::check_instances_printability(const BoundingBoxf3& print_volume) +{ + for (ModelVolume* vol : this->volumes) + { + if (!vol->modifier) + { + for (ModelInstance* inst : this->instances) + { + BoundingBoxf3 bb; + + double c = cos(inst->rotation); + double s = sin(inst->rotation); + + for (int f = 0; f < vol->mesh.stl.stats.number_of_facets; ++f) + { + const stl_facet& facet = vol->mesh.stl.facet_start[f]; + + for (int i = 0; i < 3; ++i) + { + // original point + const stl_vertex& v = facet.vertex[i]; + Pointf3 p((double)v.x, (double)v.y, (double)v.z); + + // scale + p.x *= inst->scaling_factor; + p.y *= inst->scaling_factor; + p.z *= inst->scaling_factor; + + // rotate Z + double x = p.x; + double y = p.y; + p.x = c * x - s * y; + p.y = s * x + c * y; + + // translate + p.x += inst->offset.x; + p.y += inst->offset.y; + + bb.merge(p); + + inst->is_printable = print_volume.contains(bb); + } + } + } + } + } +} + void ModelObject::print_info() const { using namespace std; diff --git a/xs/src/libslic3r/Model.hpp b/xs/src/libslic3r/Model.hpp index 5003f8330..08ba8487d 100644 --- a/xs/src/libslic3r/Model.hpp +++ b/xs/src/libslic3r/Model.hpp @@ -131,6 +131,7 @@ public: bool needed_repair() const; void cut(coordf_t z, Model* model) const; void split(ModelObjectPtrs* new_objects); + void check_instances_printability(const BoundingBoxf3& print_volume); // Print object statistics to console. void print_info() const; @@ -203,6 +204,9 @@ public: double scaling_factor; Pointf offset; // in unscaled coordinates + // whether or not this instance is contained in the print volume (set by Print::validate() using ModelObject::check_instances_printability()) + bool is_printable; + ModelObject* get_object() const { return this->object; } // To be called on an external mesh @@ -218,9 +222,9 @@ private: // Parent object, owning this instance. ModelObject* object; - ModelInstance(ModelObject *object) : rotation(0), scaling_factor(1), object(object) {} + ModelInstance(ModelObject *object) : rotation(0), scaling_factor(1), object(object), is_printable(false) {} ModelInstance(ModelObject *object, const ModelInstance &other) : - rotation(other.rotation), scaling_factor(other.scaling_factor), offset(other.offset), object(object) {} + rotation(other.rotation), scaling_factor(other.scaling_factor), offset(other.offset), object(object), is_printable(false) {} }; diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index d10d1a9dc..9c9f7f5bb 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -71,6 +71,13 @@ bool Print::reload_model_instances() return invalidated; } +PrintObjectPtrs Print::get_printable_objects() const +{ + PrintObjectPtrs printable_objects(this->objects); + printable_objects.erase(std::remove_if(printable_objects.begin(), printable_objects.end(), [](PrintObject* o) { return !o->is_printable(); }), printable_objects.end()); + return printable_objects; +} + PrintRegion* Print::add_region() { regions.push_back(new PrintRegion(this)); @@ -534,11 +541,17 @@ std::string Print::validate() const BoundingBoxf3 print_volume(Pointf3(unscale(bed_box_2D.min.x), unscale(bed_box_2D.min.y), 0.0), Pointf3(unscale(bed_box_2D.max.x), unscale(bed_box_2D.max.y), config.max_print_height)); // Allow the objects to protrude below the print bed, only the part of the object above the print bed will be sliced. print_volume.min.z = -1e10; + unsigned int printable_count = 0; for (PrintObject *po : this->objects) { - if (!print_volume.contains(po->model_object()->tight_bounding_box(false))) - return L("Some objects are outside of the print volume."); + po->model_object()->check_instances_printability(print_volume); + po->reload_model_instances(); + if (po->is_printable()) + ++printable_count; } + if (printable_count == 0) + return L("All objects are outside of the print volume."); + if (this->config.complete_objects) { // Check horizontal clearance. { @@ -858,8 +871,9 @@ void Print::_make_skirt() // prepended to the first 'n' layers (with 'n' = skirt_height). // $skirt_height_z in this case is the highest possible skirt height for safety. coordf_t skirt_height_z = 0.; - for (const PrintObject *object : this->objects) { - size_t skirt_layers = this->has_infinite_skirt() ? + PrintObjectPtrs printable_objects = get_printable_objects(); + for (const PrintObject *object : printable_objects) { + size_t skirt_layers = this->has_infinite_skirt() ? object->layer_count() : std::min(size_t(this->config.skirt_height.value), object->layer_count()); skirt_height_z = std::max(skirt_height_z, object->layers[skirt_layers-1]->print_z); @@ -867,7 +881,7 @@ void Print::_make_skirt() // Collect points from all layers contained in skirt height. Points points; - for (const PrintObject *object : this->objects) { + for (const PrintObject *object : printable_objects) { Points object_points; // Get object layers up to skirt_height_z. for (const Layer *layer : object->layers) { @@ -980,7 +994,8 @@ void Print::_make_brim() // Brim is only printed on first layer and uses perimeter extruder. Flow flow = this->brim_flow(); Polygons islands; - for (PrintObject *object : this->objects) { + PrintObjectPtrs printable_objects = get_printable_objects(); + for (PrintObject *object : printable_objects) { Polygons object_islands; for (ExPolygon &expoly : object->layers.front()->slices.expolygons) object_islands.push_back(expoly.contour); diff --git a/xs/src/libslic3r/Print.hpp b/xs/src/libslic3r/Print.hpp index 2217547ea..bcd61ea02 100644 --- a/xs/src/libslic3r/Print.hpp +++ b/xs/src/libslic3r/Print.hpp @@ -209,6 +209,8 @@ public: void combine_infill(); void _generate_support_material(); + bool is_printable() const { return !this->_shifted_copies.empty(); } + private: Print* _print; ModelObject* _model_object; @@ -257,6 +259,8 @@ public: void reload_object(size_t idx); bool reload_model_instances(); + PrintObjectPtrs get_printable_objects() const; + // methods for handling regions PrintRegion* get_region(size_t idx) { return regions.at(idx); } const PrintRegion* get_region(size_t idx) const { return regions.at(idx); } diff --git a/xs/src/libslic3r/PrintObject.cpp b/xs/src/libslic3r/PrintObject.cpp index 7ac165864..1d0a81cd2 100644 --- a/xs/src/libslic3r/PrintObject.cpp +++ b/xs/src/libslic3r/PrintObject.cpp @@ -102,7 +102,10 @@ bool PrintObject::reload_model_instances() Points copies; copies.reserve(this->_model_object->instances.size()); for (const ModelInstance *mi : this->_model_object->instances) - copies.emplace_back(Point::new_scale(mi->offset.x, mi->offset.y)); + { + if (mi->is_printable) + copies.emplace_back(Point::new_scale(mi->offset.x, mi->offset.y)); + } return this->set_copies(copies); } @@ -291,6 +294,9 @@ bool PrintObject::has_support_material() const void PrintObject::_prepare_infill() { + if (!this->is_printable()) + return; + // This will assign a type (top/bottom/internal) to $layerm->slices. // Then the classifcation of $layerm->slices is transfered onto // the $layerm->fill_surfaces by clipping $layerm->fill_surfaces @@ -1442,6 +1448,9 @@ void PrintObject::_simplify_slices(double distance) void PrintObject::_make_perimeters() { + if (!this->is_printable()) + return; + if (this->state.is_done(posPerimeters)) return; this->state.set_started(posPerimeters); @@ -1550,6 +1559,9 @@ void PrintObject::_make_perimeters() void PrintObject::_infill() { + if (!this->is_printable()) + return; + if (this->state.is_done(posInfill)) return; this->state.set_started(posInfill); @@ -1954,6 +1966,9 @@ void PrintObject::combine_infill() void PrintObject::_generate_support_material() { + if (!this->is_printable()) + return; + PrintObjectSupportMaterial support_material(this, PrintObject::slicing_parameters()); support_material.generate(*this); } diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index 208125a15..729c91cf3 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -2087,20 +2087,20 @@ void GLCanvas3D::reload_scene(bool force) { enable_warning_texture(true); _3DScene::generate_warning_texture(L("Detected object outside print volume")); - m_on_enable_action_buttons_callback.call(false); } else { enable_warning_texture(false); m_volumes.reset_outside_state(); _3DScene::reset_warning_texture(); - m_on_enable_action_buttons_callback.call(!m_model->objects.empty()); } + m_on_enable_action_buttons_callback.call(!m_model->objects.empty()); } else { enable_warning_texture(false); _3DScene::reset_warning_texture(); + m_on_enable_action_buttons_callback.call(false); } } From eb6936888ed50f1dfe0679cb59b64b48d8a40d16 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Wed, 18 Jul 2018 11:05:39 +0200 Subject: [PATCH 153/198] Filament following a soluble one must be wiped on the wipe tower --- xs/src/libslic3r/GCode/ToolOrdering.cpp | 6 +++--- xs/src/libslic3r/GCode/ToolOrdering.hpp | 2 +- xs/src/libslic3r/Print.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xs/src/libslic3r/GCode/ToolOrdering.cpp b/xs/src/libslic3r/GCode/ToolOrdering.cpp index f1dbbfc1e..3a28ec129 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.cpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.cpp @@ -440,13 +440,13 @@ bool WipingExtrusions::is_overriddable(const ExtrusionEntityCollection& eec, con // Following function iterates through all extrusions on the layer, remembers those that could be used for wiping after toolchange // and returns volume that is left to be wiped on the wipe tower. -float WipingExtrusions::mark_wiping_extrusions(const Print& print, unsigned int new_extruder, float volume_to_wipe) +float WipingExtrusions::mark_wiping_extrusions(const Print& print, unsigned int old_extruder, unsigned int new_extruder, float volume_to_wipe) { const LayerTools& lt = *m_layer_tools; const float min_infill_volume = 0.f; // ignore infill with smaller volume than this - if (print.config.filament_soluble.get_at(new_extruder)) - return volume_to_wipe; // Soluble filament cannot be wiped in a random infill + if (print.config.filament_soluble.get_at(old_extruder) || print.config.filament_soluble.get_at(new_extruder)) + return volume_to_wipe; // Soluble filament cannot be wiped in a random infill, neither the filament after it // we will sort objects so that dedicated for wiping are at the beginning: PrintObjectPtrs object_list = print.objects; diff --git a/xs/src/libslic3r/GCode/ToolOrdering.hpp b/xs/src/libslic3r/GCode/ToolOrdering.hpp index 13e0212f1..a7263abda 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.hpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.hpp @@ -28,7 +28,7 @@ public: // This function goes through all infill entities, decides which ones will be used for wiping and // marks them by the extruder id. Returns volume that remains to be wiped on the wipe tower: - float mark_wiping_extrusions(const Print& print, unsigned int new_extruder, float volume_to_wipe); + float mark_wiping_extrusions(const Print& print, unsigned int old_extruder, unsigned int new_extruder, float volume_to_wipe); void ensure_perimeters_infills_order(const Print& print); diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index 79bca7e89..25ee69cfe 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -1137,7 +1137,7 @@ void Print::_make_wipe_tower() float volume_to_wipe = wipe_volumes[current_extruder_id][extruder_id]; // total volume to wipe after this toolchange // try to assign some infills/objects for the wiping: - volume_to_wipe = layer_tools.wiping_extrusions().mark_wiping_extrusions(*this, extruder_id, wipe_volumes[current_extruder_id][extruder_id]); + volume_to_wipe = layer_tools.wiping_extrusions().mark_wiping_extrusions(*this, current_extruder_id, extruder_id, wipe_volumes[current_extruder_id][extruder_id]); wipe_tower.plan_toolchange(layer_tools.print_z, layer_tools.wipe_tower_layer_height, current_extruder_id, extruder_id, first_layer && extruder_id == m_tool_ordering.all_extruders().back(), volume_to_wipe); current_extruder_id = extruder_id; From 9d027a558e105aca8e664c3d0f1811197b833406 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 18 Jul 2018 11:58:02 +0200 Subject: [PATCH 154/198] Implemented clamping of the acceleration when extruding for the Marlin firmware, both for the G-code export and the time estimator. --- xs/src/libslic3r/GCode.cpp | 4 ++-- xs/src/libslic3r/GCodeTimeEstimator.cpp | 15 +++++++++++++-- xs/src/libslic3r/GCodeTimeEstimator.hpp | 6 ++++++ xs/src/libslic3r/GCodeWriter.cpp | 10 ++++++++-- xs/src/libslic3r/GCodeWriter.hpp | 5 ++++- 5 files changed, 33 insertions(+), 7 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 98b3b4061..b4ebe8b23 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -412,7 +412,7 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) // resets time estimators m_normal_time_estimator.reset(); m_normal_time_estimator.set_dialect(print.config.gcode_flavor); - m_normal_time_estimator.set_acceleration(print.config.machine_max_acceleration_extruding.values[0]); + m_normal_time_estimator.set_max_acceleration(print.config.machine_max_acceleration_extruding.values[0]); m_normal_time_estimator.set_retract_acceleration(print.config.machine_max_acceleration_retracting.values[0]); m_normal_time_estimator.set_minimum_feedrate(print.config.machine_min_extruding_rate.values[0]); m_normal_time_estimator.set_minimum_travel_feedrate(print.config.machine_min_travel_rate.values[0]); @@ -434,7 +434,7 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) { m_silent_time_estimator.reset(); m_silent_time_estimator.set_dialect(print.config.gcode_flavor); - m_silent_time_estimator.set_acceleration(print.config.machine_max_acceleration_extruding.values[1]); + m_silent_time_estimator.set_max_acceleration(print.config.machine_max_acceleration_extruding.values[1]); m_silent_time_estimator.set_retract_acceleration(print.config.machine_max_acceleration_retracting.values[1]); m_silent_time_estimator.set_minimum_feedrate(print.config.machine_min_extruding_rate.values[1]); m_silent_time_estimator.set_minimum_travel_feedrate(print.config.machine_min_travel_rate.values[1]); diff --git a/xs/src/libslic3r/GCodeTimeEstimator.cpp b/xs/src/libslic3r/GCodeTimeEstimator.cpp index 285ed37bd..2a4fbf6dd 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.cpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.cpp @@ -414,7 +414,7 @@ namespace Slic3r { void GCodeTimeEstimator::set_acceleration(float acceleration_mm_sec2) { - _state.acceleration = acceleration_mm_sec2; + _state.acceleration = std::min(_state.max_acceleration, acceleration_mm_sec2); } float GCodeTimeEstimator::get_acceleration() const @@ -422,6 +422,17 @@ namespace Slic3r { return _state.acceleration; } + void GCodeTimeEstimator::set_max_acceleration(float acceleration_mm_sec2) + { + _state.max_acceleration = acceleration_mm_sec2; + _state.acceleration = acceleration_mm_sec2; + } + + float GCodeTimeEstimator::get_max_acceleration() const + { + return _state.max_acceleration; + } + void GCodeTimeEstimator::set_retract_acceleration(float acceleration_mm_sec2) { _state.retract_acceleration = acceleration_mm_sec2; @@ -540,7 +551,7 @@ namespace Slic3r { set_e_local_positioning_type(Absolute); set_feedrate(DEFAULT_FEEDRATE); - set_acceleration(DEFAULT_ACCELERATION); + set_max_acceleration(DEFAULT_ACCELERATION); set_retract_acceleration(DEFAULT_RETRACT_ACCELERATION); set_minimum_feedrate(DEFAULT_MINIMUM_FEEDRATE); set_minimum_travel_feedrate(DEFAULT_MINIMUM_TRAVEL_FEEDRATE); diff --git a/xs/src/libslic3r/GCodeTimeEstimator.hpp b/xs/src/libslic3r/GCodeTimeEstimator.hpp index 9b1a38985..fe678884a 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.hpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.hpp @@ -72,6 +72,8 @@ namespace Slic3r { Axis axis[Num_Axis]; float feedrate; // mm/s float acceleration; // mm/s^2 + // hard limit for the acceleration, to which the firmware will clamp. + float max_acceleration; // mm/s^2 float retract_acceleration; // mm/s^2 float additional_time; // s float minimum_feedrate; // mm/s @@ -263,6 +265,10 @@ namespace Slic3r { void set_acceleration(float acceleration_mm_sec2); float get_acceleration() const; + // Maximum acceleration for the machine. The firmware simulator will clamp the M204 Sxxx to this maximum. + void set_max_acceleration(float acceleration_mm_sec2); + float get_max_acceleration() const; + void set_retract_acceleration(float acceleration_mm_sec2); float get_retract_acceleration() const; diff --git a/xs/src/libslic3r/GCodeWriter.cpp b/xs/src/libslic3r/GCodeWriter.cpp index cbe94f317..1041f602c 100644 --- a/xs/src/libslic3r/GCodeWriter.cpp +++ b/xs/src/libslic3r/GCodeWriter.cpp @@ -18,7 +18,9 @@ void GCodeWriter::apply_print_config(const PrintConfig &print_config) { this->config.apply(print_config, true); m_extrusion_axis = this->config.get_extrusion_axis(); - this->m_single_extruder_multi_material = print_config.single_extruder_multi_material.value; + m_single_extruder_multi_material = print_config.single_extruder_multi_material.value; + m_max_acceleration = (print_config.gcode_flavor.value == gcfMarlin) ? + print_config.machine_max_acceleration_extruding.value : 0; } void GCodeWriter::set_extruders(const std::vector &extruder_ids) @@ -85,7 +87,7 @@ std::string GCodeWriter::set_temperature(unsigned int temperature, bool wait, in } gcode << temperature; if (tool != -1 && - ( (this->multiple_extruders && ! this->m_single_extruder_multi_material) || + ( (this->multiple_extruders && ! m_single_extruder_multi_material) || FLAVOR_IS(gcfMakerWare) || FLAVOR_IS(gcfSailfish)) ) { gcode << " T" << tool; } @@ -170,6 +172,10 @@ std::string GCodeWriter::set_fan(unsigned int speed, bool dont_save) std::string GCodeWriter::set_acceleration(unsigned int acceleration) { + // Clamp the acceleration to the allowed maximum. + if (m_max_acceleration > 0 && acceleration > m_max_acceleration) + acceleration = m_max_acceleration; + if (acceleration == 0 || acceleration == m_last_acceleration) return std::string(); diff --git a/xs/src/libslic3r/GCodeWriter.hpp b/xs/src/libslic3r/GCodeWriter.hpp index 78e9c9323..f706b8768 100644 --- a/xs/src/libslic3r/GCodeWriter.hpp +++ b/xs/src/libslic3r/GCodeWriter.hpp @@ -18,7 +18,7 @@ public: GCodeWriter() : multiple_extruders(false), m_extrusion_axis("E"), m_extruder(nullptr), m_single_extruder_multi_material(false), - m_last_acceleration(0), m_last_fan_speed(0), + m_last_acceleration(0), m_max_acceleration(0), m_last_fan_speed(0), m_last_bed_temperature(0), m_last_bed_temperature_reached(true), m_lifted(0) {} @@ -74,6 +74,9 @@ private: bool m_single_extruder_multi_material; Extruder* m_extruder; unsigned int m_last_acceleration; + // Limit for setting the acceleration, to respect the machine limits set for the Marlin firmware. + // If set to zero, the limit is not in action. + unsigned int m_max_acceleration; unsigned int m_last_fan_speed; unsigned int m_last_bed_temperature; bool m_last_bed_temperature_reached; From 17df029c9d2223dd715eaf50ee77ec2c501df7f1 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 18 Jul 2018 12:04:56 +0200 Subject: [PATCH 155/198] Fixed a previous commit. --- xs/src/libslic3r/GCodeWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/src/libslic3r/GCodeWriter.cpp b/xs/src/libslic3r/GCodeWriter.cpp index 1041f602c..34e6b7ec3 100644 --- a/xs/src/libslic3r/GCodeWriter.cpp +++ b/xs/src/libslic3r/GCodeWriter.cpp @@ -20,7 +20,7 @@ void GCodeWriter::apply_print_config(const PrintConfig &print_config) m_extrusion_axis = this->config.get_extrusion_axis(); m_single_extruder_multi_material = print_config.single_extruder_multi_material.value; m_max_acceleration = (print_config.gcode_flavor.value == gcfMarlin) ? - print_config.machine_max_acceleration_extruding.value : 0; + print_config.machine_max_acceleration_extruding.values.front() : 0; } void GCodeWriter::set_extruders(const std::vector &extruder_ids) From f7390c7ad6ae69cfd6f391e5a9431dcf76c78f49 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 18 Jul 2018 14:00:42 +0200 Subject: [PATCH 156/198] The acceleration G-codes (M204 Sxxx) emited for Marlin are now clamped by the maximum acceleration when extruding. The machine envelope values are only set at the time estimator from the Printer parameters for the Marlin firmware. --- xs/src/libslic3r/GCode.cpp | 83 ++++++++++++++----------- xs/src/libslic3r/GCodeTimeEstimator.cpp | 13 +++- 2 files changed, 56 insertions(+), 40 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index b4ebe8b23..eb4146a67 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -412,45 +412,54 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) // resets time estimators m_normal_time_estimator.reset(); m_normal_time_estimator.set_dialect(print.config.gcode_flavor); - m_normal_time_estimator.set_max_acceleration(print.config.machine_max_acceleration_extruding.values[0]); - m_normal_time_estimator.set_retract_acceleration(print.config.machine_max_acceleration_retracting.values[0]); - m_normal_time_estimator.set_minimum_feedrate(print.config.machine_min_extruding_rate.values[0]); - m_normal_time_estimator.set_minimum_travel_feedrate(print.config.machine_min_travel_rate.values[0]); - m_normal_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::X, print.config.machine_max_acceleration_x.values[0]); - m_normal_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Y, print.config.machine_max_acceleration_y.values[0]); - m_normal_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Z, print.config.machine_max_acceleration_z.values[0]); - m_normal_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::E, print.config.machine_max_acceleration_e.values[0]); - m_normal_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::X, print.config.machine_max_feedrate_x.values[0]); - m_normal_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Y, print.config.machine_max_feedrate_y.values[0]); - m_normal_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Z, print.config.machine_max_feedrate_z.values[0]); - m_normal_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::E, print.config.machine_max_feedrate_e.values[0]); - m_normal_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::X, print.config.machine_max_jerk_x.values[0]); - m_normal_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Y, print.config.machine_max_jerk_y.values[0]); - m_normal_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Z, print.config.machine_max_jerk_z.values[0]); - m_normal_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::E, print.config.machine_max_jerk_e.values[0]); + m_silent_time_estimator_enabled = (print.config.gcode_flavor == gcfMarlin) && print.config.silent_mode; - m_silent_time_estimator_enabled = (print.config.gcode_flavor == gcfMarlin) && print.config.silent_mode && boost::starts_with(print.config.printer_model.value, "MK3"); - if (m_silent_time_estimator_enabled) - { - m_silent_time_estimator.reset(); - m_silent_time_estimator.set_dialect(print.config.gcode_flavor); - m_silent_time_estimator.set_max_acceleration(print.config.machine_max_acceleration_extruding.values[1]); - m_silent_time_estimator.set_retract_acceleration(print.config.machine_max_acceleration_retracting.values[1]); - m_silent_time_estimator.set_minimum_feedrate(print.config.machine_min_extruding_rate.values[1]); - m_silent_time_estimator.set_minimum_travel_feedrate(print.config.machine_min_travel_rate.values[1]); - m_silent_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::X, print.config.machine_max_acceleration_x.values[1]); - m_silent_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Y, print.config.machine_max_acceleration_y.values[1]); - m_silent_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Z, print.config.machine_max_acceleration_z.values[1]); - m_silent_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::E, print.config.machine_max_acceleration_e.values[1]); - m_silent_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::X, print.config.machine_max_feedrate_x.values[1]); - m_silent_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Y, print.config.machine_max_feedrate_y.values[1]); - m_silent_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Z, print.config.machine_max_feedrate_z.values[1]); - m_silent_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::E, print.config.machine_max_feedrate_e.values[1]); - m_silent_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::X, print.config.machine_max_jerk_x.values[1]); - m_silent_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Y, print.config.machine_max_jerk_y.values[1]); - m_silent_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Z, print.config.machine_max_jerk_z.values[1]); - m_silent_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::E, print.config.machine_max_jerk_e.values[1]); + // Until we have a UI support for the other firmwares than the Marlin, use the hardcoded default values + // and let the user to enter the G-code limits into the start G-code. + // If the following block is enabled for other firmwares than the Marlin, then the function + // this->print_machine_envelope(file, print); + // shall be adjusted as well to produce a G-code block compatible with the particular firmware flavor. + if (print.config.gcode_flavor.value == gcfMarlin) { + m_normal_time_estimator.set_max_acceleration(print.config.machine_max_acceleration_extruding.values[0]); + m_normal_time_estimator.set_retract_acceleration(print.config.machine_max_acceleration_retracting.values[0]); + m_normal_time_estimator.set_minimum_feedrate(print.config.machine_min_extruding_rate.values[0]); + m_normal_time_estimator.set_minimum_travel_feedrate(print.config.machine_min_travel_rate.values[0]); + m_normal_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::X, print.config.machine_max_acceleration_x.values[0]); + m_normal_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Y, print.config.machine_max_acceleration_y.values[0]); + m_normal_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Z, print.config.machine_max_acceleration_z.values[0]); + m_normal_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::E, print.config.machine_max_acceleration_e.values[0]); + m_normal_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::X, print.config.machine_max_feedrate_x.values[0]); + m_normal_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Y, print.config.machine_max_feedrate_y.values[0]); + m_normal_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Z, print.config.machine_max_feedrate_z.values[0]); + m_normal_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::E, print.config.machine_max_feedrate_e.values[0]); + m_normal_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::X, print.config.machine_max_jerk_x.values[0]); + m_normal_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Y, print.config.machine_max_jerk_y.values[0]); + m_normal_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Z, print.config.machine_max_jerk_z.values[0]); + m_normal_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::E, print.config.machine_max_jerk_e.values[0]); + + if (m_silent_time_estimator_enabled) + { + m_silent_time_estimator.reset(); + m_silent_time_estimator.set_dialect(print.config.gcode_flavor); + m_silent_time_estimator.set_max_acceleration(print.config.machine_max_acceleration_extruding.values[1]); + m_silent_time_estimator.set_retract_acceleration(print.config.machine_max_acceleration_retracting.values[1]); + m_silent_time_estimator.set_minimum_feedrate(print.config.machine_min_extruding_rate.values[1]); + m_silent_time_estimator.set_minimum_travel_feedrate(print.config.machine_min_travel_rate.values[1]); + m_silent_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::X, print.config.machine_max_acceleration_x.values[1]); + m_silent_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Y, print.config.machine_max_acceleration_y.values[1]); + m_silent_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Z, print.config.machine_max_acceleration_z.values[1]); + m_silent_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::E, print.config.machine_max_acceleration_e.values[1]); + m_silent_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::X, print.config.machine_max_feedrate_x.values[1]); + m_silent_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Y, print.config.machine_max_feedrate_y.values[1]); + m_silent_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Z, print.config.machine_max_feedrate_z.values[1]); + m_silent_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::E, print.config.machine_max_feedrate_e.values[1]); + m_silent_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::X, print.config.machine_max_jerk_x.values[1]); + m_silent_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Y, print.config.machine_max_jerk_y.values[1]); + m_silent_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Z, print.config.machine_max_jerk_z.values[1]); + m_silent_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::E, print.config.machine_max_jerk_e.values[1]); + } } + // resets analyzer m_analyzer.reset(); m_enable_analyzer = preview_data != nullptr; diff --git a/xs/src/libslic3r/GCodeTimeEstimator.cpp b/xs/src/libslic3r/GCodeTimeEstimator.cpp index 2a4fbf6dd..7c8540e66 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.cpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.cpp @@ -414,7 +414,10 @@ namespace Slic3r { void GCodeTimeEstimator::set_acceleration(float acceleration_mm_sec2) { - _state.acceleration = std::min(_state.max_acceleration, acceleration_mm_sec2); + _state.acceleration = (_state.max_acceleration == 0) ? + acceleration_mm_sec2 : + // Clamp the acceleration with the maximum. + std::min(_state.max_acceleration, acceleration_mm_sec2); } float GCodeTimeEstimator::get_acceleration() const @@ -425,7 +428,8 @@ namespace Slic3r { void GCodeTimeEstimator::set_max_acceleration(float acceleration_mm_sec2) { _state.max_acceleration = acceleration_mm_sec2; - _state.acceleration = acceleration_mm_sec2; + if (acceleration_mm_sec2 > 0) + _state.acceleration = acceleration_mm_sec2; } float GCodeTimeEstimator::get_max_acceleration() const @@ -551,7 +555,10 @@ namespace Slic3r { set_e_local_positioning_type(Absolute); set_feedrate(DEFAULT_FEEDRATE); - set_max_acceleration(DEFAULT_ACCELERATION); + // Setting the maximum acceleration to zero means that the there is no limit and the G-code + // is allowed to set excessive values. + set_max_acceleration(0); + set_acceleration(DEFAULT_ACCELERATION); set_retract_acceleration(DEFAULT_RETRACT_ACCELERATION); set_minimum_feedrate(DEFAULT_MINIMUM_FEEDRATE); set_minimum_travel_feedrate(DEFAULT_MINIMUM_TRAVEL_FEEDRATE); From d805c8ac3bcaa3310b2c3542da061657a192c3b3 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Wed, 18 Jul 2018 14:26:42 +0200 Subject: [PATCH 157/198] Disable slicing when one object crosses the print volume boundary --- xs/src/libslic3r/BoundingBox.hpp | 4 ++++ xs/src/libslic3r/Model.cpp | 11 ++++++++--- xs/src/libslic3r/Model.hpp | 26 +++++++++++++++++++------- xs/src/libslic3r/Print.cpp | 2 +- xs/src/libslic3r/PrintObject.cpp | 2 +- xs/src/slic3r/GUI/3DScene.cpp | 25 +++++++++++++++++++------ xs/src/slic3r/GUI/3DScene.hpp | 5 ++++- xs/src/slic3r/GUI/GLCanvas3D.cpp | 17 +++++++++++------ xs/xsp/GUI_3DScene.xsp | 4 ---- 9 files changed, 67 insertions(+), 29 deletions(-) diff --git a/xs/src/libslic3r/BoundingBox.hpp b/xs/src/libslic3r/BoundingBox.hpp index 1f71536ee..82a3edc18 100644 --- a/xs/src/libslic3r/BoundingBox.hpp +++ b/xs/src/libslic3r/BoundingBox.hpp @@ -103,6 +103,10 @@ public: bool contains(const BoundingBox3Base& other) const { return contains(other.min) && contains(other.max); } + + bool intersects(const BoundingBox3Base& other) const { + return (min.x < other.max.x) && (max.x > other.min.x) && (min.y < other.max.y) && (max.y > other.min.y) && (min.z < other.max.z) && (max.z > other.min.z); + } }; class BoundingBox : public BoundingBoxBase diff --git a/xs/src/libslic3r/Model.cpp b/xs/src/libslic3r/Model.cpp index bd95d9959..509fe6190 100644 --- a/xs/src/libslic3r/Model.cpp +++ b/xs/src/libslic3r/Model.cpp @@ -1235,7 +1235,7 @@ void ModelObject::split(ModelObjectPtrs* new_objects) return; } -void ModelObject::check_instances_printability(const BoundingBoxf3& print_volume) +void ModelObject::check_instances_print_volume_state(const BoundingBoxf3& print_volume) { for (ModelVolume* vol : this->volumes) { @@ -1274,10 +1274,15 @@ void ModelObject::check_instances_printability(const BoundingBoxf3& print_volume p.y += inst->offset.y; bb.merge(p); - - inst->is_printable = print_volume.contains(bb); } } + + if (print_volume.contains(bb)) + inst->print_volume_state = ModelInstance::PVS_Inside; + else if (print_volume.intersects(bb)) + inst->print_volume_state = ModelInstance::PVS_Partly_Outside; + else + inst->print_volume_state = ModelInstance::PVS_Fully_Outside; } } } diff --git a/xs/src/libslic3r/Model.hpp b/xs/src/libslic3r/Model.hpp index 08ba8487d..f5e97fb6a 100644 --- a/xs/src/libslic3r/Model.hpp +++ b/xs/src/libslic3r/Model.hpp @@ -131,7 +131,8 @@ public: bool needed_repair() const; void cut(coordf_t z, Model* model) const; void split(ModelObjectPtrs* new_objects); - void check_instances_printability(const BoundingBoxf3& print_volume); + + void check_instances_print_volume_state(const BoundingBoxf3& print_volume); // Print object statistics to console. void print_info() const; @@ -198,14 +199,23 @@ private: // Knows the affine transformation of an object. class ModelInstance { - friend class ModelObject; public: + enum EPrintVolumeState : unsigned char + { + PVS_Inside, + PVS_Partly_Outside, + PVS_Fully_Outside, + Num_BedStates + }; + + friend class ModelObject; + double rotation; // Rotation around the Z axis, in radians around mesh center point double scaling_factor; Pointf offset; // in unscaled coordinates - // whether or not this instance is contained in the print volume (set by Print::validate() using ModelObject::check_instances_printability()) - bool is_printable; + // flag showing the position of this instance with respect to the print volume (set by Print::validate() using ModelObject::check_instances_print_volume_state()) + EPrintVolumeState print_volume_state; ModelObject* get_object() const { return this->object; } @@ -217,14 +227,16 @@ public: BoundingBoxf3 transform_bounding_box(const BoundingBoxf3 &bbox, bool dont_translate = false) const; // To be called on an external polygon. It does not translate the polygon, only rotates and scales. void transform_polygon(Polygon* polygon) const; - + + bool is_printable() const { return print_volume_state == PVS_Inside; } + private: // Parent object, owning this instance. ModelObject* object; - ModelInstance(ModelObject *object) : rotation(0), scaling_factor(1), object(object), is_printable(false) {} + ModelInstance(ModelObject *object) : rotation(0), scaling_factor(1), object(object), print_volume_state(PVS_Inside) {} ModelInstance(ModelObject *object, const ModelInstance &other) : - rotation(other.rotation), scaling_factor(other.scaling_factor), offset(other.offset), object(object), is_printable(false) {} + rotation(other.rotation), scaling_factor(other.scaling_factor), offset(other.offset), object(object), print_volume_state(PVS_Inside) {} }; diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index 9c9f7f5bb..838cdfc9f 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -543,7 +543,7 @@ std::string Print::validate() const print_volume.min.z = -1e10; unsigned int printable_count = 0; for (PrintObject *po : this->objects) { - po->model_object()->check_instances_printability(print_volume); + po->model_object()->check_instances_print_volume_state(print_volume); po->reload_model_instances(); if (po->is_printable()) ++printable_count; diff --git a/xs/src/libslic3r/PrintObject.cpp b/xs/src/libslic3r/PrintObject.cpp index 1d0a81cd2..8888da76d 100644 --- a/xs/src/libslic3r/PrintObject.cpp +++ b/xs/src/libslic3r/PrintObject.cpp @@ -103,7 +103,7 @@ bool PrintObject::reload_model_instances() copies.reserve(this->_model_object->instances.size()); for (const ModelInstance *mi : this->_model_object->instances) { - if (mi->is_printable) + if (mi->is_printable()) copies.emplace_back(Point::new_scale(mi->offset.x, mi->offset.y)); } return this->set_copies(copies); diff --git a/xs/src/slic3r/GUI/3DScene.cpp b/xs/src/slic3r/GUI/3DScene.cpp index d8fe592e8..c927d6e1d 100644 --- a/xs/src/slic3r/GUI/3DScene.cpp +++ b/xs/src/slic3r/GUI/3DScene.cpp @@ -743,7 +743,7 @@ void GLVolumeCollection::render_legacy() const glDisable(GL_BLEND); } -bool GLVolumeCollection::check_outside_state(const DynamicPrintConfig* config) +bool GLVolumeCollection::check_outside_state(const DynamicPrintConfig* config, ModelInstance::EPrintVolumeState* out_state) { if (config == nullptr) return false; @@ -757,18 +757,31 @@ bool GLVolumeCollection::check_outside_state(const DynamicPrintConfig* config) // Allow the objects to protrude below the print bed print_volume.min.z = -1e10; - bool contained = true; + ModelInstance::EPrintVolumeState state = ModelInstance::PVS_Inside; + bool all_contained = true; + for (GLVolume* volume : this->volumes) { if ((volume != nullptr) && !volume->is_modifier) { - bool state = print_volume.contains(volume->transformed_bounding_box()); - contained &= state; - volume->is_outside = !state; + const BoundingBoxf3& bb = volume->transformed_bounding_box(); + bool contained = print_volume.contains(bb); + all_contained &= contained; + + volume->is_outside = !contained; + + if ((state == ModelInstance::PVS_Inside) && volume->is_outside) + state = ModelInstance::PVS_Fully_Outside; + + if ((state == ModelInstance::PVS_Fully_Outside) && volume->is_outside && print_volume.intersects(bb)) + state = ModelInstance::PVS_Partly_Outside; } } - return contained; + if (out_state != nullptr) + *out_state = state; + + return all_contained; } void GLVolumeCollection::reset_outside_state() diff --git a/xs/src/slic3r/GUI/3DScene.hpp b/xs/src/slic3r/GUI/3DScene.hpp index f7fc75db5..11a800c24 100644 --- a/xs/src/slic3r/GUI/3DScene.hpp +++ b/xs/src/slic3r/GUI/3DScene.hpp @@ -6,6 +6,7 @@ #include "../../libslic3r/Line.hpp" #include "../../libslic3r/TriangleMesh.hpp" #include "../../libslic3r/Utils.hpp" +#include "../../libslic3r/Model.hpp" #include "../../slic3r/GUI/GLCanvas3DManager.hpp" class wxBitmap; @@ -422,7 +423,9 @@ public: print_box_max[0] = max_x; print_box_max[1] = max_y; print_box_max[2] = max_z; } - bool check_outside_state(const DynamicPrintConfig* config); + // returns true if all the volumes are completely contained in the print volume + // returns the containment state in the given out_state, if non-null + bool check_outside_state(const DynamicPrintConfig* config, ModelInstance::EPrintVolumeState* out_state); void reset_outside_state(); void update_colors_by_extruder(const DynamicPrintConfig* config); diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index 729c91cf3..8eae6359b 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -1381,7 +1381,8 @@ void GLCanvas3D::Gizmos::render(const GLCanvas3D& canvas, const BoundingBoxf3& b ::glDisable(GL_DEPTH_TEST); - _render_current_gizmo(box); + if (box.radius() > 0.0) + _render_current_gizmo(box); ::glPushMatrix(); ::glLoadIdentity(); @@ -1657,7 +1658,7 @@ void GLCanvas3D::update_volumes_selection(const std::vector& selections) bool GLCanvas3D::check_volumes_outside_state(const DynamicPrintConfig* config) const { - return m_volumes.check_outside_state(config); + return m_volumes.check_outside_state(config, nullptr); } bool GLCanvas3D::move_volume_up(unsigned int id) @@ -2082,19 +2083,22 @@ void GLCanvas3D::reload_scene(bool force) // checks for geometry outside the print volume to render it accordingly if (!m_volumes.empty()) { - bool contained = m_volumes.check_outside_state(m_config); + ModelInstance::EPrintVolumeState state; + bool contained = m_volumes.check_outside_state(m_config, &state); + if (!contained) { enable_warning_texture(true); _3DScene::generate_warning_texture(L("Detected object outside print volume")); + m_on_enable_action_buttons_callback.call(state == ModelInstance::PVS_Fully_Outside); } else { enable_warning_texture(false); m_volumes.reset_outside_state(); _3DScene::reset_warning_texture(); + m_on_enable_action_buttons_callback.call(!m_model->objects.empty()); } - m_on_enable_action_buttons_callback.call(!m_model->objects.empty()); } else { @@ -3130,6 +3134,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) m_mouse.set_start_position_3D_as_invalid(); m_mouse.set_start_position_2D_as_invalid(); m_mouse.dragging = false; + m_dirty = true; } else if (evt.Moving()) { @@ -3272,7 +3277,7 @@ BoundingBoxf3 GLCanvas3D::_selected_volumes_bounding_box() const BoundingBoxf3 bb; for (const GLVolume* volume : m_volumes.volumes) { - if ((volume != nullptr) && volume->selected) + if ((volume != nullptr) && !volume->is_wipe_tower && volume->selected) bb.merge(volume->transformed_bounding_box()); } return bb; @@ -3549,7 +3554,7 @@ void GLCanvas3D::_render_objects() const { const BoundingBoxf3& bed_bb = m_bed.get_bounding_box(); m_volumes.set_print_box((float)bed_bb.min.x, (float)bed_bb.min.y, 0.0f, (float)bed_bb.max.x, (float)bed_bb.max.y, (float)m_config->opt_float("max_print_height")); - m_volumes.check_outside_state(m_config); + m_volumes.check_outside_state(m_config, nullptr); } // do not cull backfaces to show broken geometry, if any ::glDisable(GL_CULL_FACE); diff --git a/xs/xsp/GUI_3DScene.xsp b/xs/xsp/GUI_3DScene.xsp index 65dfc8e8e..e85a3b64e 100644 --- a/xs/xsp/GUI_3DScene.xsp +++ b/xs/xsp/GUI_3DScene.xsp @@ -105,10 +105,6 @@ void release_geometry(); void set_print_box(float min_x, float min_y, float min_z, float max_x, float max_y, float max_z); - bool check_outside_state(DynamicPrintConfig* config) - %code%{ - RETVAL = THIS->check_outside_state(config); - %}; void reset_outside_state(); void update_colors_by_extruder(DynamicPrintConfig* config); From 6f18e58d13e603774fe66d40c43b4944de6c8992 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Wed, 18 Jul 2018 14:38:02 +0200 Subject: [PATCH 158/198] Fixed compile on Linux and Mac --- xs/src/libslic3r/BoundingBox.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/src/libslic3r/BoundingBox.hpp b/xs/src/libslic3r/BoundingBox.hpp index 82a3edc18..5324dbe3b 100644 --- a/xs/src/libslic3r/BoundingBox.hpp +++ b/xs/src/libslic3r/BoundingBox.hpp @@ -105,7 +105,7 @@ public: } bool intersects(const BoundingBox3Base& other) const { - return (min.x < other.max.x) && (max.x > other.min.x) && (min.y < other.max.y) && (max.y > other.min.y) && (min.z < other.max.z) && (max.z > other.min.z); + return (this->min.x < other.max.x) && (this->max.x > other.min.x) && (this->min.y < other.max.y) && (this->max.y > other.min.y) && (this->min.z < other.max.z) && (this->max.z > other.min.z); } }; From a46bdb1d819e82634f9cba02034980c83cf29c8a Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 18 Jul 2018 14:52:19 +0200 Subject: [PATCH 159/198] Reworked the "Sliced info" box on the platter to only show the "silent mode" print time if it is available. --- lib/Slic3r/GUI/Plater.pm | 112 +++++++++++++++++++-------------------- 1 file changed, 54 insertions(+), 58 deletions(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index d0d4969e6..f59350eb9 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -194,7 +194,7 @@ sub new { $self->schedule_background_process; } else { # Hide the print info box, it is no more valid. - $self->{"print_info_box_show"}->(0); + $self->print_info_box_show(0); } }); @@ -292,9 +292,9 @@ sub new { $self->{right_panel} = Wx::Panel->new($self, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL); ### Scrolled Window for info boxes - my $scrolled_window_sizer = Wx::BoxSizer->new(wxVERTICAL); + my $scrolled_window_sizer = $self->{scrolled_window_sizer} = Wx::BoxSizer->new(wxVERTICAL); $scrolled_window_sizer->SetMinSize([310, -1]); - my $scrolled_window_panel = Wx::ScrolledWindow->new($self->{right_panel}, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL); + my $scrolled_window_panel = $self->{scrolled_window_panel} = Wx::ScrolledWindow->new($self->{right_panel}, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL); $scrolled_window_panel->SetSizer($scrolled_window_sizer); $scrolled_window_panel->SetScrollbars(1, 1, 1, 1); @@ -520,38 +520,9 @@ sub new { } } - my $print_info_sizer; - { - my $box = Wx::StaticBox->new($scrolled_window_panel, -1, L("Sliced Info")); - $print_info_sizer = Wx::StaticBoxSizer->new($box, wxVERTICAL); - $print_info_sizer->SetMinSize([300,-1]); - my $grid_sizer = Wx::FlexGridSizer->new(2, 2, 5, 5); - $grid_sizer->SetFlexibleDirection(wxHORIZONTAL); - $grid_sizer->AddGrowableCol(1, 1); - $grid_sizer->AddGrowableCol(3, 1); - $print_info_sizer->Add($grid_sizer, 0, wxEXPAND); - my @info = ( - fil_m => L("Used Filament (m)"), - fil_mm3 => L("Used Filament (mm³)"), - fil_g => L("Used Filament (g)"), - cost => L("Cost"), -#========================================================================================================================================== - normal_time => L("Estimated printing time (normal mode)"), -# default_time => L("Estimated printing time (default mode)"), -#========================================================================================================================================== - silent_time => L("Estimated printing time (silent mode)"), - ); - while (my $field = shift @info) { - my $label = shift @info; - my $text = Wx::StaticText->new($scrolled_window_panel, -1, "$label:", wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); - $text->SetFont($Slic3r::GUI::small_font); - $grid_sizer->Add($text, 0); - - $self->{"print_info_$field"} = Wx::StaticText->new($scrolled_window_panel, -1, "", wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); - $self->{"print_info_$field"}->SetFont($Slic3r::GUI::small_font); - $grid_sizer->Add($self->{"print_info_$field"}, 0); - } - } + my $print_info_sizer = $self->{print_info_sizer} = Wx::StaticBoxSizer->new( + Wx::StaticBox->new($scrolled_window_panel, -1, L("Sliced Info")), wxVERTICAL); + $print_info_sizer->SetMinSize([300,-1]); my $buttons_sizer = Wx::BoxSizer->new(wxHORIZONTAL); $self->{buttons_sizer} = $buttons_sizer; @@ -572,19 +543,8 @@ sub new { $right_sizer->Add($frequently_changed_parameters_sizer, 0, wxEXPAND | wxTOP, 0) if defined $frequently_changed_parameters_sizer; $right_sizer->Add($buttons_sizer, 0, wxEXPAND | wxBOTTOM, 5); $right_sizer->Add($scrolled_window_panel, 1, wxEXPAND | wxALL, 1); - # Callback for showing / hiding the print info box. - $self->{"print_info_box_show"} = sub { -# if ($right_sizer->IsShown(5) != $_[0]) { -# $right_sizer->Show(5, $_[0]); -# $self->Layout -# } - if ($scrolled_window_sizer->IsShown(2) != $_[0]) { - $scrolled_window_sizer->Show(2, $_[0]); - $scrolled_window_panel->Layout - } - }; # Show the box initially, let it be shown after the slicing is finished. - $self->{"print_info_box_show"}->(0); + $self->print_info_box_show(0); $self->{right_panel}->SetSizer($right_sizer); @@ -1300,7 +1260,7 @@ sub async_apply_config { $self->{canvas3D}->Refresh if Slic3r::GUI::_3DScene::is_layers_editing_enabled($self->{canvas3D}); # Hide the slicing results if the current slicing status is no more valid. - $self->{"print_info_box_show"}->(0) if $invalidated; + $self->print_info_box_show(0) if $invalidated; if (wxTheApp->{app_config}->get("background_processing")) { if ($invalidated) { @@ -1618,16 +1578,7 @@ sub on_export_completed { $self->{print_file} = undef; $self->{send_gcode_file} = undef; - $self->{"print_info_cost"}->SetLabel(sprintf("%.2f" , $self->{print}->total_cost)); - $self->{"print_info_fil_g"}->SetLabel(sprintf("%.2f" , $self->{print}->total_weight)); - $self->{"print_info_fil_mm3"}->SetLabel(sprintf("%.2f" , $self->{print}->total_extruded_volume)); -#========================================================================================================================================== - $self->{"print_info_normal_time"}->SetLabel($self->{print}->estimated_normal_print_time); -# $self->{"print_info_default_time"}->SetLabel($self->{print}->estimated_default_print_time); -#========================================================================================================================================== - $self->{"print_info_silent_time"}->SetLabel($self->{print}->estimated_silent_print_time); - $self->{"print_info_fil_m"}->SetLabel(sprintf("%.2f" , $self->{print}->total_used_filament / 1000)); - $self->{"print_info_box_show"}->(1); + $self->print_info_box_show(1); # this updates buttons status $self->object_list_changed; @@ -1637,6 +1588,51 @@ sub on_export_completed { $self->{preview3D}->reload_print if $self->{preview3D}; } +# Fill in the "Sliced info" box with the result of the G-code generator. +sub print_info_box_show { + my ($self, $show) = @_; + my $scrolled_window_panel = $self->{scrolled_window_panel}; + my $scrolled_window_sizer = $self->{scrolled_window_sizer}; + return if $scrolled_window_sizer->IsShown(2) == $show; + + if ($show) { + my $print_info_sizer = $self->{print_info_sizer}; + $print_info_sizer->Clear(1); + my $grid_sizer = Wx::FlexGridSizer->new(2, 2, 5, 5); + $grid_sizer->SetFlexibleDirection(wxHORIZONTAL); + $grid_sizer->AddGrowableCol(1, 1); + $grid_sizer->AddGrowableCol(3, 1); + $print_info_sizer->Add($grid_sizer, 0, wxEXPAND); + my @info = ( + L("Used Filament (m)") + => sprintf("%.2f" , $self->{print}->total_cost), + L("Used Filament (mm³)") + => sprintf("%.2f" , $self->{print}->total_weight), + L("Used Filament (g)"), + => sprintf("%.2f" , $self->{print}->total_extruded_volume), + L("Cost"), + => $self->{print}->estimated_normal_print_time, + L("Estimated printing time (normal mode)") + => $self->{print}->estimated_silent_print_time, + L("Estimated printing time (silent mode)") + => sprintf("%.2f" , $self->{print}->total_used_filament / 1000) + ); + while ( my $label = shift @info) { + my $value = shift @info; + next if $value eq "N/A"; + my $text = Wx::StaticText->new($scrolled_window_panel, -1, "$label:", wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); + $text->SetFont($Slic3r::GUI::small_font); + $grid_sizer->Add($text, 0); + my $field = Wx::StaticText->new($scrolled_window_panel, -1, $value, wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); + $field->SetFont($Slic3r::GUI::small_font); + $grid_sizer->Add($field, 0); + } + } + + $scrolled_window_sizer->Show(2, $show); + $scrolled_window_panel->Layout; +} + sub do_print { my ($self) = @_; From 3fac0d92cd93d3daf14c8e1ef1480f1bb5ad6ee5 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Wed, 18 Jul 2018 15:07:52 +0200 Subject: [PATCH 160/198] Unified opengl textures --- xs/src/slic3r/GUI/3DScene.cpp | 501 ++++++++++++++++++++++++-------- xs/src/slic3r/GUI/3DScene.hpp | 152 +++++++--- xs/src/slic3r/GUI/GLTexture.hpp | 16 +- xs/xsp/GUI_3DScene.xsp | 52 ---- 4 files changed, 501 insertions(+), 220 deletions(-) diff --git a/xs/src/slic3r/GUI/3DScene.cpp b/xs/src/slic3r/GUI/3DScene.cpp index d8fe592e8..2b50d20a8 100644 --- a/xs/src/slic3r/GUI/3DScene.cpp +++ b/xs/src/slic3r/GUI/3DScene.cpp @@ -540,8 +540,11 @@ double GLVolume::layer_height_texture_z_to_row_id() const void GLVolume::generate_layer_height_texture(PrintObject *print_object, bool force) { - GLTexture *tex = this->layer_height_texture.get(); - if (tex == nullptr) +//########################################################################################################################################3 + LayersTexture *tex = this->layer_height_texture.get(); +// GLTexture *tex = this->layer_height_texture.get(); +//########################################################################################################################################3 + if (tex == nullptr) // No layer_height_texture is assigned to this GLVolume, therefore the layer height texture cannot be filled. return; @@ -588,8 +591,11 @@ std::vector GLVolumeCollection::load_object( }; // Object will have a single common layer height texture for all volumes. - std::shared_ptr layer_height_texture = std::make_shared(); - +//########################################################################################################################################3 + std::shared_ptr layer_height_texture = std::make_shared(); +// std::shared_ptr layer_height_texture = std::make_shared(); +//########################################################################################################################################3 + std::vector volumes_idx; for (int volume_idx = 0; volume_idx < int(model_object->volumes.size()); ++ volume_idx) { const ModelVolume *model_volume = model_object->volumes[volume_idx]; @@ -1580,45 +1586,44 @@ _3DScene::LegendTexture _3DScene::s_legend_texture; _3DScene::WarningTexture _3DScene::s_warning_texture; GUI::GLCanvas3DManager _3DScene::s_canvas_mgr; -unsigned int _3DScene::TextureBase::finalize() -{ - if ((m_tex_id == 0) && !m_data.empty()) { - // sends buffer to gpu - ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - ::glGenTextures(1, &m_tex_id); - ::glBindTexture(GL_TEXTURE_2D, (GLuint)m_tex_id); - ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)m_tex_width, (GLsizei)m_tex_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)m_data.data()); - ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1); - ::glBindTexture(GL_TEXTURE_2D, 0); - m_data.clear(); - } - return (m_tex_width > 0 && m_tex_height > 0) ? m_tex_id : 0; -} - -void _3DScene::TextureBase::_destroy_texture() -{ - if (m_tex_id > 0) - { - ::glDeleteTextures(1, &m_tex_id); - m_tex_id = 0; - m_tex_height = 0; - m_tex_width = 0; - } - m_data.clear(); -} - +//########################################################################################################################################3 +//unsigned int _3DScene::TextureBase::finalize() +//{ +// if ((m_tex_id == 0) && !m_data.empty()) { +// // sends buffer to gpu +// ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); +// ::glGenTextures(1, &m_tex_id); +// ::glBindTexture(GL_TEXTURE_2D, (GLuint)m_tex_id); +// ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)m_tex_width, (GLsizei)m_tex_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)m_data.data()); +// ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); +// ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); +// ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1); +// ::glBindTexture(GL_TEXTURE_2D, 0); +// m_data.clear(); +// } +// return (m_tex_width > 0 && m_tex_height > 0) ? m_tex_id : 0; +//} +// +//void _3DScene::TextureBase::_destroy_texture() +//{ +// if (m_tex_id > 0) +// { +// ::glDeleteTextures(1, &m_tex_id); +// m_tex_id = 0; +// m_tex_height = 0; +// m_tex_width = 0; +// } +// m_data.clear(); +//} +//########################################################################################################################################3 const unsigned char _3DScene::WarningTexture::Background_Color[3] = { 9, 91, 134 }; const unsigned char _3DScene::WarningTexture::Opacity = 255; -// Generate a texture data, but don't load it into the GPU yet, as the GPU context may not yet be valid. +//########################################################################################################################################3 bool _3DScene::WarningTexture::generate(const std::string& msg) { - // Mark the texture as released, but don't release the texture from the GPU yet. - m_tex_width = m_tex_height = 0; - m_data.clear(); + reset(); if (msg.empty()) return false; @@ -1630,11 +1635,11 @@ bool _3DScene::WarningTexture::generate(const std::string& msg) // calculates texture size wxCoord w, h; memDC.GetTextExtent(msg, &w, &h); - m_tex_width = (unsigned int)w; - m_tex_height = (unsigned int)h; + m_width = (int)w; + m_height = (int)h; // generates bitmap - wxBitmap bitmap(m_tex_width, m_tex_height); + wxBitmap bitmap(m_width, m_height); #if defined(__APPLE__) || defined(_MSC_VER) bitmap.UseAlpha(); @@ -1652,38 +1657,107 @@ bool _3DScene::WarningTexture::generate(const std::string& msg) memDC.SelectObject(wxNullBitmap); // Convert the bitmap into a linear data ready to be loaded into the GPU. - { - wxImage image = bitmap.ConvertToImage(); - image.SetMaskColour(Background_Color[0], Background_Color[1], Background_Color[2]); + wxImage image = bitmap.ConvertToImage(); + image.SetMaskColour(Background_Color[0], Background_Color[1], Background_Color[2]); - // prepare buffer - m_data.assign(4 * m_tex_width * m_tex_height, 0); - for (unsigned int h = 0; h < m_tex_height; ++h) + // prepare buffer + std::vector data(4 * m_width * m_height, 0); + for (int h = 0; h < m_height; ++h) + { + int hh = h * m_width; + unsigned char* px_ptr = data.data() + 4 * hh; + for (int w = 0; w < m_width; ++w) { - unsigned int hh = h * m_tex_width; - unsigned char* px_ptr = m_data.data() + 4 * hh; - for (unsigned int w = 0; w < m_tex_width; ++w) - { - *px_ptr++ = image.GetRed(w, h); - *px_ptr++ = image.GetGreen(w, h); - *px_ptr++ = image.GetBlue(w, h); - *px_ptr++ = image.IsTransparent(w, h) ? 0 : Opacity; - } + *px_ptr++ = image.GetRed(w, h); + *px_ptr++ = image.GetGreen(w, h); + *px_ptr++ = image.GetBlue(w, h); + *px_ptr++ = image.IsTransparent(w, h) ? 0 : Opacity; } } + + // sends buffer to gpu + ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + ::glGenTextures(1, &m_id); + ::glBindTexture(GL_TEXTURE_2D, (GLuint)m_id); + ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)m_width, (GLsizei)m_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)data.data()); + ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1); + ::glBindTexture(GL_TEXTURE_2D, 0); + return true; } +//// Generate a texture data, but don't load it into the GPU yet, as the GPU context may not yet be valid. +//bool _3DScene::WarningTexture::generate(const std::string& msg) +//{ +// // Mark the texture as released, but don't release the texture from the GPU yet. +// m_tex_width = m_tex_height = 0; +// m_data.clear(); +// +// if (msg.empty()) +// return false; +// +// wxMemoryDC memDC; +// // select default font +// memDC.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); +// +// // calculates texture size +// wxCoord w, h; +// memDC.GetTextExtent(msg, &w, &h); +// m_tex_width = (unsigned int)w; +// m_tex_height = (unsigned int)h; +// +// // generates bitmap +// wxBitmap bitmap(m_tex_width, m_tex_height); +// +//#if defined(__APPLE__) || defined(_MSC_VER) +// bitmap.UseAlpha(); +//#endif +// +// memDC.SelectObject(bitmap); +// memDC.SetBackground(wxBrush(wxColour(Background_Color[0], Background_Color[1], Background_Color[2]))); +// memDC.Clear(); +// +// memDC.SetTextForeground(*wxWHITE); +// +// // draw message +// memDC.DrawText(msg, 0, 0); +// +// memDC.SelectObject(wxNullBitmap); +// +// // Convert the bitmap into a linear data ready to be loaded into the GPU. +// { +// wxImage image = bitmap.ConvertToImage(); +// image.SetMaskColour(Background_Color[0], Background_Color[1], Background_Color[2]); +// +// // prepare buffer +// m_data.assign(4 * m_tex_width * m_tex_height, 0); +// for (unsigned int h = 0; h < m_tex_height; ++h) +// { +// unsigned int hh = h * m_tex_width; +// unsigned char* px_ptr = m_data.data() + 4 * hh; +// for (unsigned int w = 0; w < m_tex_width; ++w) +// { +// *px_ptr++ = image.GetRed(w, h); +// *px_ptr++ = image.GetGreen(w, h); +// *px_ptr++ = image.GetBlue(w, h); +// *px_ptr++ = image.IsTransparent(w, h) ? 0 : Opacity; +// } +// } +// } +// return true; +//} +//########################################################################################################################################3 + const unsigned char _3DScene::LegendTexture::Squares_Border_Color[3] = { 64, 64, 64 }; const unsigned char _3DScene::LegendTexture::Background_Color[3] = { 9, 91, 134 }; const unsigned char _3DScene::LegendTexture::Opacity = 255; -// Generate a texture data, but don't load it into the GPU yet, as the GPU context may not yet be valid. +//########################################################################################################################################3 bool _3DScene::LegendTexture::generate(const GCodePreviewData& preview_data, const std::vector& tool_colors) { - // Mark the texture as released, but don't release the texture from the GPU yet. - m_tex_width = m_tex_height = 0; - m_data.clear(); + reset(); // collects items to render auto title = _(preview_data.get_legend_title()); @@ -1701,25 +1775,25 @@ bool _3DScene::LegendTexture::generate(const GCodePreviewData& preview_data, con // calculates texture size wxCoord w, h; memDC.GetTextExtent(title, &w, &h); - unsigned int title_width = (unsigned int)w; - unsigned int title_height = (unsigned int)h; + int title_width = (int)w; + int title_height = (int)h; - unsigned int max_text_width = 0; - unsigned int max_text_height = 0; + int max_text_width = 0; + int max_text_height = 0; for (const GCodePreviewData::LegendItem& item : items) { memDC.GetTextExtent(GUI::from_u8(item.text), &w, &h); - max_text_width = std::max(max_text_width, (unsigned int)w); - max_text_height = std::max(max_text_height, (unsigned int)h); + max_text_width = std::max(max_text_width, (int)w); + max_text_height = std::max(max_text_height, (int)h); } - m_tex_width = std::max(2 * Px_Border + title_width, 2 * (Px_Border + Px_Square_Contour) + Px_Square + Px_Text_Offset + max_text_width); - m_tex_height = 2 * (Px_Border + Px_Square_Contour) + title_height + Px_Title_Offset + items_count * Px_Square; + m_width = std::max(2 * Px_Border + title_width, 2 * (Px_Border + Px_Square_Contour) + Px_Square + Px_Text_Offset + max_text_width); + m_height = 2 * (Px_Border + Px_Square_Contour) + title_height + Px_Title_Offset + items_count * Px_Square; if (items_count > 1) - m_tex_height += (items_count - 1) * Px_Square_Contour; + m_height += (items_count - 1) * Px_Square_Contour; // generates bitmap - wxBitmap bitmap(m_tex_width, m_tex_height); + wxBitmap bitmap(m_width, m_height); #if defined(__APPLE__) || defined(_MSC_VER) bitmap.UseAlpha(); @@ -1732,15 +1806,15 @@ bool _3DScene::LegendTexture::generate(const GCodePreviewData& preview_data, con memDC.SetTextForeground(*wxWHITE); // draw title - unsigned int title_x = Px_Border; - unsigned int title_y = Px_Border; + int title_x = Px_Border; + int title_y = Px_Border; memDC.DrawText(title, title_x, title_y); // draw icons contours as background - unsigned int squares_contour_x = Px_Border; - unsigned int squares_contour_y = Px_Border + title_height + Px_Title_Offset; - unsigned int squares_contour_width = Px_Square + 2 * Px_Square_Contour; - unsigned int squares_contour_height = items_count * Px_Square + 2 * Px_Square_Contour; + int squares_contour_x = Px_Border; + int squares_contour_y = Px_Border + title_height + Px_Title_Offset; + int squares_contour_width = Px_Square + 2 * Px_Square_Contour; + int squares_contour_height = items_count * Px_Square + 2 * Px_Square_Contour; if (items_count > 1) squares_contour_height += (items_count - 1) * Px_Square_Contour; @@ -1752,15 +1826,15 @@ bool _3DScene::LegendTexture::generate(const GCodePreviewData& preview_data, con memDC.DrawRectangle(wxRect(squares_contour_x, squares_contour_y, squares_contour_width, squares_contour_height)); // draw items (colored icon + text) - unsigned int icon_x = squares_contour_x + Px_Square_Contour; - unsigned int icon_x_inner = icon_x + 1; - unsigned int icon_y = squares_contour_y + Px_Square_Contour; - unsigned int icon_y_step = Px_Square + Px_Square_Contour; + int icon_x = squares_contour_x + Px_Square_Contour; + int icon_x_inner = icon_x + 1; + int icon_y = squares_contour_y + Px_Square_Contour; + int icon_y_step = Px_Square + Px_Square_Contour; - unsigned int text_x = icon_x + Px_Square + Px_Text_Offset; - unsigned int text_y_offset = (Px_Square - max_text_height) / 2; + int text_x = icon_x + Px_Square + Px_Text_Offset; + int text_y_offset = (Px_Square - max_text_height) / 2; - unsigned int px_inner_square = Px_Square - 2; + int px_inner_square = Px_Square - 2; for (const GCodePreviewData::LegendItem& item : items) { @@ -1785,7 +1859,7 @@ bool _3DScene::LegendTexture::generate(const GCodePreviewData& preview_data, con memDC.DrawRectangle(wxRect(icon_x_inner, icon_y + 1, px_inner_square, px_inner_square)); // draw text - memDC.DrawText(GUI::from_u8(item.text), text_x, icon_y + text_y_offset); + memDC.DrawText(GUI::from_u8(item.text), text_x, icon_y + text_y_offset); // update y icon_y += icon_y_step; @@ -1794,28 +1868,177 @@ bool _3DScene::LegendTexture::generate(const GCodePreviewData& preview_data, con memDC.SelectObject(wxNullBitmap); // Convert the bitmap into a linear data ready to be loaded into the GPU. - { - wxImage image = bitmap.ConvertToImage(); - image.SetMaskColour(Background_Color[0], Background_Color[1], Background_Color[2]); + wxImage image = bitmap.ConvertToImage(); + image.SetMaskColour(Background_Color[0], Background_Color[1], Background_Color[2]); - // prepare buffer - m_data.assign(4 * m_tex_width * m_tex_height, 0); - for (unsigned int h = 0; h < m_tex_height; ++h) + // prepare buffer + std::vector data(4 * m_width * m_height, 0); + for (int h = 0; h < m_height; ++h) + { + int hh = h * m_width; + unsigned char* px_ptr = data.data() + 4 * hh; + for (int w = 0; w < m_width; ++w) { - unsigned int hh = h * m_tex_width; - unsigned char* px_ptr = m_data.data() + 4 * hh; - for (unsigned int w = 0; w < m_tex_width; ++w) - { - *px_ptr++ = image.GetRed(w, h); - *px_ptr++ = image.GetGreen(w, h); - *px_ptr++ = image.GetBlue(w, h); - *px_ptr++ = image.IsTransparent(w, h) ? 0 : Opacity; - } + *px_ptr++ = image.GetRed(w, h); + *px_ptr++ = image.GetGreen(w, h); + *px_ptr++ = image.GetBlue(w, h); + *px_ptr++ = image.IsTransparent(w, h) ? 0 : Opacity; } } + + // sends buffer to gpu + ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + ::glGenTextures(1, &m_id); + ::glBindTexture(GL_TEXTURE_2D, (GLuint)m_id); + ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)m_width, (GLsizei)m_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)data.data()); + ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1); + ::glBindTexture(GL_TEXTURE_2D, 0); + return true; } + +//// Generate a texture data, but don't load it into the GPU yet, as the GPU context may not yet be valid. +//bool _3DScene::LegendTexture::generate(const GCodePreviewData& preview_data, const std::vector& tool_colors) +//{ +// // Mark the texture as released, but don't release the texture from the GPU yet. +// m_tex_width = m_tex_height = 0; +// m_data.clear(); +// +// // collects items to render +// auto title = _(preview_data.get_legend_title()); +// const GCodePreviewData::LegendItemsList& items = preview_data.get_legend_items(tool_colors); +// +// unsigned int items_count = (unsigned int)items.size(); +// if (items_count == 0) +// // nothing to render, return +// return false; +// +// wxMemoryDC memDC; +// // select default font +// memDC.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); +// +// // calculates texture size +// wxCoord w, h; +// memDC.GetTextExtent(title, &w, &h); +// unsigned int title_width = (unsigned int)w; +// unsigned int title_height = (unsigned int)h; +// +// unsigned int max_text_width = 0; +// unsigned int max_text_height = 0; +// for (const GCodePreviewData::LegendItem& item : items) +// { +// memDC.GetTextExtent(GUI::from_u8(item.text), &w, &h); +// max_text_width = std::max(max_text_width, (unsigned int)w); +// max_text_height = std::max(max_text_height, (unsigned int)h); +// } +// +// m_tex_width = std::max(2 * Px_Border + title_width, 2 * (Px_Border + Px_Square_Contour) + Px_Square + Px_Text_Offset + max_text_width); +// m_tex_height = 2 * (Px_Border + Px_Square_Contour) + title_height + Px_Title_Offset + items_count * Px_Square; +// if (items_count > 1) +// m_tex_height += (items_count - 1) * Px_Square_Contour; +// +// // generates bitmap +// wxBitmap bitmap(m_tex_width, m_tex_height); +// +//#if defined(__APPLE__) || defined(_MSC_VER) +// bitmap.UseAlpha(); +//#endif +// +// memDC.SelectObject(bitmap); +// memDC.SetBackground(wxBrush(wxColour(Background_Color[0], Background_Color[1], Background_Color[2]))); +// memDC.Clear(); +// +// memDC.SetTextForeground(*wxWHITE); +// +// // draw title +// unsigned int title_x = Px_Border; +// unsigned int title_y = Px_Border; +// memDC.DrawText(title, title_x, title_y); +// +// // draw icons contours as background +// unsigned int squares_contour_x = Px_Border; +// unsigned int squares_contour_y = Px_Border + title_height + Px_Title_Offset; +// unsigned int squares_contour_width = Px_Square + 2 * Px_Square_Contour; +// unsigned int squares_contour_height = items_count * Px_Square + 2 * Px_Square_Contour; +// if (items_count > 1) +// squares_contour_height += (items_count - 1) * Px_Square_Contour; +// +// wxColour color(Squares_Border_Color[0], Squares_Border_Color[1], Squares_Border_Color[2]); +// wxPen pen(color); +// wxBrush brush(color); +// memDC.SetPen(pen); +// memDC.SetBrush(brush); +// memDC.DrawRectangle(wxRect(squares_contour_x, squares_contour_y, squares_contour_width, squares_contour_height)); +// +// // draw items (colored icon + text) +// unsigned int icon_x = squares_contour_x + Px_Square_Contour; +// unsigned int icon_x_inner = icon_x + 1; +// unsigned int icon_y = squares_contour_y + Px_Square_Contour; +// unsigned int icon_y_step = Px_Square + Px_Square_Contour; +// +// unsigned int text_x = icon_x + Px_Square + Px_Text_Offset; +// unsigned int text_y_offset = (Px_Square - max_text_height) / 2; +// +// unsigned int px_inner_square = Px_Square - 2; +// +// for (const GCodePreviewData::LegendItem& item : items) +// { +// // draw darker icon perimeter +// const std::vector& item_color_bytes = item.color.as_bytes(); +// wxImage::HSVValue dark_hsv = wxImage::RGBtoHSV(wxImage::RGBValue(item_color_bytes[0], item_color_bytes[1], item_color_bytes[2])); +// dark_hsv.value *= 0.75; +// wxImage::RGBValue dark_rgb = wxImage::HSVtoRGB(dark_hsv); +// color.Set(dark_rgb.red, dark_rgb.green, dark_rgb.blue, item_color_bytes[3]); +// pen.SetColour(color); +// brush.SetColour(color); +// memDC.SetPen(pen); +// memDC.SetBrush(brush); +// memDC.DrawRectangle(wxRect(icon_x, icon_y, Px_Square, Px_Square)); +// +// // draw icon interior +// color.Set(item_color_bytes[0], item_color_bytes[1], item_color_bytes[2], item_color_bytes[3]); +// pen.SetColour(color); +// brush.SetColour(color); +// memDC.SetPen(pen); +// memDC.SetBrush(brush); +// memDC.DrawRectangle(wxRect(icon_x_inner, icon_y + 1, px_inner_square, px_inner_square)); +// +// // draw text +// memDC.DrawText(GUI::from_u8(item.text), text_x, icon_y + text_y_offset); +// +// // update y +// icon_y += icon_y_step; +// } +// +// memDC.SelectObject(wxNullBitmap); +// +// // Convert the bitmap into a linear data ready to be loaded into the GPU. +// { +// wxImage image = bitmap.ConvertToImage(); +// image.SetMaskColour(Background_Color[0], Background_Color[1], Background_Color[2]); +// +// // prepare buffer +// m_data.assign(4 * m_tex_width * m_tex_height, 0); +// for (unsigned int h = 0; h < m_tex_height; ++h) +// { +// unsigned int hh = h * m_tex_width; +// unsigned char* px_ptr = m_data.data() + 4 * hh; +// for (unsigned int w = 0; w < m_tex_width; ++w) +// { +// *px_ptr++ = image.GetRed(w, h); +// *px_ptr++ = image.GetGreen(w, h); +// *px_ptr++ = image.GetBlue(w, h); +// *px_ptr++ = image.IsTransparent(w, h) ? 0 : Opacity; +// } +// } +// } +// return true; +//} +//########################################################################################################################################3 + void _3DScene::init_gl() { s_canvas_mgr.init_gl(); @@ -2223,36 +2446,60 @@ void _3DScene::generate_legend_texture(const GCodePreviewData& preview_data, con s_legend_texture.generate(preview_data, tool_colors); } -unsigned int _3DScene::get_legend_texture_width() -{ - return s_legend_texture.get_texture_width(); -} - -unsigned int _3DScene::get_legend_texture_height() -{ - return s_legend_texture.get_texture_height(); -} +//################################################################################################################################################### +//unsigned int _3DScene::get_legend_texture_width() +//{ +// return s_legend_texture.get_texture_width(); +//} +// +//unsigned int _3DScene::get_legend_texture_height() +//{ +// return s_legend_texture.get_texture_height(); +//} +//################################################################################################################################################### void _3DScene::reset_legend_texture() { - s_legend_texture.reset_texture(); +//################################################################################################################################################### + s_legend_texture.reset(); +// s_legend_texture.reset_texture(); +//################################################################################################################################################### } -unsigned int _3DScene::finalize_legend_texture() +//################################################################################################################################################### +unsigned int _3DScene::get_legend_texture_id() { - return s_legend_texture.finalize(); + return s_legend_texture.get_id(); } -unsigned int _3DScene::get_warning_texture_width() +int _3DScene::get_legend_texture_width() { - return s_warning_texture.get_texture_width(); + return s_legend_texture.get_width(); } -unsigned int _3DScene::get_warning_texture_height() +int _3DScene::get_legend_texture_height() { - return s_warning_texture.get_texture_height(); + return s_legend_texture.get_height(); } +//unsigned int _3DScene::finalize_legend_texture() +//{ +// return s_legend_texture.finalize(); +//} +//################################################################################################################################################### + +//################################################################################################################################################### +//unsigned int _3DScene::get_warning_texture_width() +//{ +// return s_warning_texture.get_texture_width(); +//} +// +//unsigned int _3DScene::get_warning_texture_height() +//{ +// return s_warning_texture.get_texture_height(); +//} +//################################################################################################################################################### + void _3DScene::generate_warning_texture(const std::string& msg) { s_warning_texture.generate(msg); @@ -2260,12 +2507,32 @@ void _3DScene::generate_warning_texture(const std::string& msg) void _3DScene::reset_warning_texture() { - s_warning_texture.reset_texture(); +//################################################################################################################################################### + s_warning_texture.reset(); +// s_warning_texture.reset_texture(); +//################################################################################################################################################### } -unsigned int _3DScene::finalize_warning_texture() +//################################################################################################################################################### +unsigned int _3DScene::get_warning_texture_id() { - return s_warning_texture.finalize(); + return s_warning_texture.get_id(); } +int _3DScene::get_warning_texture_width() +{ + return s_warning_texture.get_width(); +} + +int _3DScene::get_warning_texture_height() +{ + return s_warning_texture.get_height(); +} + +//unsigned int _3DScene::finalize_warning_texture() +//{ +// return s_warning_texture.finalize(); +//} +//################################################################################################################################################### + } // namespace Slic3r diff --git a/xs/src/slic3r/GUI/3DScene.hpp b/xs/src/slic3r/GUI/3DScene.hpp index f7fc75db5..a0ec1e289 100644 --- a/xs/src/slic3r/GUI/3DScene.hpp +++ b/xs/src/slic3r/GUI/3DScene.hpp @@ -7,6 +7,9 @@ #include "../../libslic3r/TriangleMesh.hpp" #include "../../libslic3r/Utils.hpp" #include "../../slic3r/GUI/GLCanvas3DManager.hpp" +//################################################################################################################################# +#include "../../slic3r/GUI/GLTexture.hpp" +//################################################################################################################################# class wxBitmap; class wxWindow; @@ -199,10 +202,16 @@ private: } }; -class GLTexture +//########################################################################################################################################3 +class LayersTexture +//class GLTexture +//########################################################################################################################################3 { public: - GLTexture() : width(0), height(0), levels(0), cells(0) {} +//########################################################################################################################################3 + LayersTexture() : width(0), height(0), levels(0), cells(0) {} +// GLTexture() : width(0), height(0), levels(0), cells(0) {} +//########################################################################################################################################3 // Texture data std::vector data; @@ -341,7 +350,10 @@ public: void release_geometry() { this->indexed_vertex_array.release_geometry(); } /************************************************ Layer height texture ****************************************************/ - std::shared_ptr layer_height_texture; +//########################################################################################################################################3 + std::shared_ptr layer_height_texture; +// std::shared_ptr layer_height_texture; +//########################################################################################################################################3 // Data to render this volume using the layer height texture LayerHeightTextureData layer_height_texture_data; @@ -437,62 +449,92 @@ private: class _3DScene { - class TextureBase - { - protected: - unsigned int m_tex_id; - unsigned int m_tex_width; - unsigned int m_tex_height; +//################################################################################################################################################### +// class TextureBase +// { +// protected: +// unsigned int m_tex_id; +// unsigned int m_tex_width; +// unsigned int m_tex_height; +// +// // generate() fills in m_data with the pixels, while finalize() moves the data to the GPU before rendering. +// std::vector m_data; +// +// public: +// TextureBase() : m_tex_id(0), m_tex_width(0), m_tex_height(0) {} +// virtual ~TextureBase() { _destroy_texture(); } +// +// // If not loaded, load the texture data into the GPU. Return a texture ID or 0 if the texture has zero size. +// unsigned int finalize(); +// +// unsigned int get_texture_id() const { return m_tex_id; } +// unsigned int get_texture_width() const { return m_tex_width; } +// unsigned int get_texture_height() const { return m_tex_height; } +// +// void reset_texture() { _destroy_texture(); } +// +// private: +// void _destroy_texture(); +// }; +//################################################################################################################################################### - // generate() fills in m_data with the pixels, while finalize() moves the data to the GPU before rendering. - std::vector m_data; - - public: - TextureBase() : m_tex_id(0), m_tex_width(0), m_tex_height(0) {} - virtual ~TextureBase() { _destroy_texture(); } - - // If not loaded, load the texture data into the GPU. Return a texture ID or 0 if the texture has zero size. - unsigned int finalize(); - - unsigned int get_texture_id() const { return m_tex_id; } - unsigned int get_texture_width() const { return m_tex_width; } - unsigned int get_texture_height() const { return m_tex_height; } - - void reset_texture() { _destroy_texture(); } - - private: - void _destroy_texture(); - }; - - class WarningTexture : public TextureBase +//################################################################################################################################################### + class WarningTexture : public GUI::GLTexture { static const unsigned char Background_Color[3]; static const unsigned char Opacity; public: - WarningTexture() : TextureBase() {} - - // Generate a texture data, but don't load it into the GPU yet, as the glcontext may not be valid yet. bool generate(const std::string& msg); }; - class LegendTexture : public TextureBase +// class WarningTexture : public TextureBase +// { +// static const unsigned char Background_Color[3]; +// static const unsigned char Opacity; +// +// public: +// WarningTexture() : TextureBase() {} +// +// // Generate a texture data, but don't load it into the GPU yet, as the glcontext may not be valid yet. +// bool generate(const std::string& msg); +// }; +//################################################################################################################################################### + +//################################################################################################################################################### + class LegendTexture : public GUI::GLTexture { - static const unsigned int Px_Title_Offset = 5; - static const unsigned int Px_Text_Offset = 5; - static const unsigned int Px_Square = 20; - static const unsigned int Px_Square_Contour = 1; - static const unsigned int Px_Border = Px_Square / 2; + static const int Px_Title_Offset = 5; + static const int Px_Text_Offset = 5; + static const int Px_Square = 20; + static const int Px_Square_Contour = 1; + static const int Px_Border = Px_Square / 2; static const unsigned char Squares_Border_Color[3]; static const unsigned char Background_Color[3]; static const unsigned char Opacity; public: - LegendTexture() : TextureBase() {} - - // Generate a texture data, but don't load it into the GPU yet, as the glcontext may not be valid yet. bool generate(const GCodePreviewData& preview_data, const std::vector& tool_colors); }; + +// class LegendTexture : public TextureBase +// { +// static const unsigned int Px_Title_Offset = 5; +// static const unsigned int Px_Text_Offset = 5; +// static const unsigned int Px_Square = 20; +// static const unsigned int Px_Square_Contour = 1; +// static const unsigned int Px_Border = Px_Square / 2; +// static const unsigned char Squares_Border_Color[3]; +// static const unsigned char Background_Color[3]; +// static const unsigned char Opacity; +// +// public: +// LegendTexture() : TextureBase() {} +// +// // Generate a texture data, but don't load it into the GPU yet, as the glcontext may not be valid yet. +// bool generate(const GCodePreviewData& preview_data, const std::vector& tool_colors); +// }; +//################################################################################################################################################### static LegendTexture s_legend_texture; static WarningTexture s_warning_texture; @@ -599,19 +641,33 @@ public: // generates the legend texture in dependence of the current shown view type static void generate_legend_texture(const GCodePreviewData& preview_data, const std::vector& tool_colors); - static unsigned int get_legend_texture_width(); - static unsigned int get_legend_texture_height(); +//################################################################################################################################################### +// static unsigned int get_legend_texture_width(); +// static unsigned int get_legend_texture_height(); +//################################################################################################################################################### static void reset_legend_texture(); - static unsigned int finalize_legend_texture(); +//################################################################################################################################################### + static unsigned int get_legend_texture_id(); + static int get_legend_texture_width(); + static int get_legend_texture_height(); +// static unsigned int finalize_legend_texture(); +//################################################################################################################################################### - static unsigned int get_warning_texture_width(); - static unsigned int get_warning_texture_height(); +//################################################################################################################################################### +// static unsigned int get_warning_texture_width(); +// static unsigned int get_warning_texture_height(); +//################################################################################################################################################### // generates a warning texture containing the given message static void generate_warning_texture(const std::string& msg); static void reset_warning_texture(); - static unsigned int finalize_warning_texture(); +//################################################################################################################################################### + static unsigned int get_warning_texture_id(); + static int get_warning_texture_width(); + static int get_warning_texture_height(); +// static unsigned int finalize_warning_texture(); +//################################################################################################################################################### static void thick_lines_to_verts(const Lines& lines, const std::vector& widths, const std::vector& heights, bool closed, double top_z, GLVolume& volume); static void thick_lines_to_verts(const Lines3& lines, const std::vector& widths, const std::vector& heights, bool closed, GLVolume& volume); diff --git a/xs/src/slic3r/GUI/GLTexture.hpp b/xs/src/slic3r/GUI/GLTexture.hpp index 70480c605..43f4ba66d 100644 --- a/xs/src/slic3r/GUI/GLTexture.hpp +++ b/xs/src/slic3r/GUI/GLTexture.hpp @@ -10,7 +10,10 @@ namespace GUI { class GLTexture { - private: +//################################################################################################################################################### + protected: +// private: +//################################################################################################################################################### unsigned int m_id; int m_width; int m_height; @@ -18,7 +21,10 @@ namespace GUI { public: GLTexture(); - ~GLTexture(); +//################################################################################################################################################### + virtual ~GLTexture(); +// ~GLTexture(); +//################################################################################################################################################### bool load_from_file(const std::string& filename, bool generate_mipmaps); void reset(); @@ -26,11 +32,15 @@ namespace GUI { unsigned int get_id() const; int get_width() const; int get_height() const; + const std::string& get_source() const; static void render_texture(unsigned int tex_id, float left, float right, float bottom, float top); - private: +//################################################################################################################################################### + protected: +// private: +//################################################################################################################################################### void _generate_mipmaps(wxImage& image); }; diff --git a/xs/xsp/GUI_3DScene.xsp b/xs/xsp/GUI_3DScene.xsp index 65dfc8e8e..59568ba79 100644 --- a/xs/xsp/GUI_3DScene.xsp +++ b/xs/xsp/GUI_3DScene.xsp @@ -627,64 +627,12 @@ register_on_update_geometry_info_callback(canvas, callback) SV *callback; CODE: _3DScene::register_on_update_geometry_info_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback); - -unsigned int -finalize_legend_texture() - CODE: - RETVAL = _3DScene::finalize_legend_texture(); - OUTPUT: - RETVAL - -unsigned int -get_legend_texture_width() - CODE: - RETVAL = _3DScene::get_legend_texture_width(); - OUTPUT: - RETVAL - -unsigned int -get_legend_texture_height() - CODE: - RETVAL = _3DScene::get_legend_texture_height(); - OUTPUT: - RETVAL void reset_legend_texture() CODE: _3DScene::reset_legend_texture(); -void -generate_warning_texture(std::string msg) - CODE: - _3DScene::generate_warning_texture(msg); - -unsigned int -finalize_warning_texture() - CODE: - RETVAL = _3DScene::finalize_warning_texture(); - OUTPUT: - RETVAL - -unsigned int -get_warning_texture_width() - CODE: - RETVAL = _3DScene::get_warning_texture_width(); - OUTPUT: - RETVAL - -unsigned int -get_warning_texture_height() - CODE: - RETVAL = _3DScene::get_warning_texture_height(); - OUTPUT: - RETVAL - -void -reset_warning_texture() - CODE: - _3DScene::reset_warning_texture(); - std::vector load_model_object(canvas, model_object, obj_idx, instance_idxs) SV *canvas; From b57418f81d47dc8269597303a5312b927dd236e1 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 18 Jul 2018 15:08:55 +0200 Subject: [PATCH 161/198] Reordered the fields on the new "Machine limits" page. --- xs/src/slic3r/GUI/Tab.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 5bd2876e7..5d1c51eb3 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -1742,27 +1742,27 @@ PageShp TabPrinter::build_kinematics_page() } std::vector axes{ "x", "y", "z", "e" }; - auto optgroup = page->new_optgroup(_(L("Maximum accelerations"))); - for (const std::string &axis : axes) { - append_option_line(optgroup, "machine_max_acceleration_" + axis); - } - - optgroup = page->new_optgroup(_(L("Maximum feedrates"))); + auto optgroup = page->new_optgroup(_(L("Maximum feedrates"))); for (const std::string &axis : axes) { append_option_line(optgroup, "machine_max_feedrate_" + axis); } - optgroup = page->new_optgroup(_(L("Starting Acceleration"))); + optgroup = page->new_optgroup(_(L("Maximum accelerations"))); + for (const std::string &axis : axes) { + append_option_line(optgroup, "machine_max_acceleration_" + axis); + } append_option_line(optgroup, "machine_max_acceleration_extruding"); append_option_line(optgroup, "machine_max_acceleration_retracting"); - optgroup = page->new_optgroup(_(L("Advanced"))); - append_option_line(optgroup, "machine_min_extruding_rate"); - append_option_line(optgroup, "machine_min_travel_rate"); + optgroup = page->new_optgroup(_(L("Jerk limits"))); for (const std::string &axis : axes) { append_option_line(optgroup, "machine_max_jerk_" + axis); } + optgroup = page->new_optgroup(_(L("Minimum feedrates"))); + append_option_line(optgroup, "machine_min_extruding_rate"); + append_option_line(optgroup, "machine_min_travel_rate"); + return page; } From 13ced87089bcab24ee3c9e59282130117de5e39a Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Wed, 18 Jul 2018 15:09:26 +0200 Subject: [PATCH 162/198] Fixed depth test when rendering the picking texture --- xs/src/slic3r/GUI/GLCanvas3D.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index 8eae6359b..9793e0f57 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -3446,6 +3446,7 @@ void GLCanvas3D::_picking_pass() const ::glDisable(GL_MULTISAMPLE); ::glDisable(GL_BLEND); + ::glEnable(GL_DEPTH_TEST); ::glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); From 7f267987cbb2dde3ff3204541bdf3768a723eaf7 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Wed, 18 Jul 2018 15:52:20 +0200 Subject: [PATCH 163/198] Code cleanup --- xs/src/slic3r/GUI/3DScene.cpp | 285 ------------------------------- xs/src/slic3r/GUI/3DScene.hpp | 92 +--------- xs/src/slic3r/GUI/GLCanvas3D.cpp | 4 +- xs/src/slic3r/GUI/GLTexture.hpp | 9 - 4 files changed, 4 insertions(+), 386 deletions(-) diff --git a/xs/src/slic3r/GUI/3DScene.cpp b/xs/src/slic3r/GUI/3DScene.cpp index bf69cb54e..565be4438 100644 --- a/xs/src/slic3r/GUI/3DScene.cpp +++ b/xs/src/slic3r/GUI/3DScene.cpp @@ -540,10 +540,7 @@ double GLVolume::layer_height_texture_z_to_row_id() const void GLVolume::generate_layer_height_texture(PrintObject *print_object, bool force) { -//########################################################################################################################################3 LayersTexture *tex = this->layer_height_texture.get(); -// GLTexture *tex = this->layer_height_texture.get(); -//########################################################################################################################################3 if (tex == nullptr) // No layer_height_texture is assigned to this GLVolume, therefore the layer height texture cannot be filled. return; @@ -591,10 +588,7 @@ std::vector GLVolumeCollection::load_object( }; // Object will have a single common layer height texture for all volumes. -//########################################################################################################################################3 std::shared_ptr layer_height_texture = std::make_shared(); -// std::shared_ptr layer_height_texture = std::make_shared(); -//########################################################################################################################################3 std::vector volumes_idx; for (int volume_idx = 0; volume_idx < int(model_object->volumes.size()); ++ volume_idx) { @@ -1599,41 +1593,9 @@ _3DScene::LegendTexture _3DScene::s_legend_texture; _3DScene::WarningTexture _3DScene::s_warning_texture; GUI::GLCanvas3DManager _3DScene::s_canvas_mgr; -//########################################################################################################################################3 -//unsigned int _3DScene::TextureBase::finalize() -//{ -// if ((m_tex_id == 0) && !m_data.empty()) { -// // sends buffer to gpu -// ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); -// ::glGenTextures(1, &m_tex_id); -// ::glBindTexture(GL_TEXTURE_2D, (GLuint)m_tex_id); -// ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)m_tex_width, (GLsizei)m_tex_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)m_data.data()); -// ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -// ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); -// ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1); -// ::glBindTexture(GL_TEXTURE_2D, 0); -// m_data.clear(); -// } -// return (m_tex_width > 0 && m_tex_height > 0) ? m_tex_id : 0; -//} -// -//void _3DScene::TextureBase::_destroy_texture() -//{ -// if (m_tex_id > 0) -// { -// ::glDeleteTextures(1, &m_tex_id); -// m_tex_id = 0; -// m_tex_height = 0; -// m_tex_width = 0; -// } -// m_data.clear(); -//} -//########################################################################################################################################3 - const unsigned char _3DScene::WarningTexture::Background_Color[3] = { 9, 91, 134 }; const unsigned char _3DScene::WarningTexture::Opacity = 255; -//########################################################################################################################################3 bool _3DScene::WarningTexture::generate(const std::string& msg) { reset(); @@ -1701,73 +1663,10 @@ bool _3DScene::WarningTexture::generate(const std::string& msg) return true; } -//// Generate a texture data, but don't load it into the GPU yet, as the GPU context may not yet be valid. -//bool _3DScene::WarningTexture::generate(const std::string& msg) -//{ -// // Mark the texture as released, but don't release the texture from the GPU yet. -// m_tex_width = m_tex_height = 0; -// m_data.clear(); -// -// if (msg.empty()) -// return false; -// -// wxMemoryDC memDC; -// // select default font -// memDC.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); -// -// // calculates texture size -// wxCoord w, h; -// memDC.GetTextExtent(msg, &w, &h); -// m_tex_width = (unsigned int)w; -// m_tex_height = (unsigned int)h; -// -// // generates bitmap -// wxBitmap bitmap(m_tex_width, m_tex_height); -// -//#if defined(__APPLE__) || defined(_MSC_VER) -// bitmap.UseAlpha(); -//#endif -// -// memDC.SelectObject(bitmap); -// memDC.SetBackground(wxBrush(wxColour(Background_Color[0], Background_Color[1], Background_Color[2]))); -// memDC.Clear(); -// -// memDC.SetTextForeground(*wxWHITE); -// -// // draw message -// memDC.DrawText(msg, 0, 0); -// -// memDC.SelectObject(wxNullBitmap); -// -// // Convert the bitmap into a linear data ready to be loaded into the GPU. -// { -// wxImage image = bitmap.ConvertToImage(); -// image.SetMaskColour(Background_Color[0], Background_Color[1], Background_Color[2]); -// -// // prepare buffer -// m_data.assign(4 * m_tex_width * m_tex_height, 0); -// for (unsigned int h = 0; h < m_tex_height; ++h) -// { -// unsigned int hh = h * m_tex_width; -// unsigned char* px_ptr = m_data.data() + 4 * hh; -// for (unsigned int w = 0; w < m_tex_width; ++w) -// { -// *px_ptr++ = image.GetRed(w, h); -// *px_ptr++ = image.GetGreen(w, h); -// *px_ptr++ = image.GetBlue(w, h); -// *px_ptr++ = image.IsTransparent(w, h) ? 0 : Opacity; -// } -// } -// } -// return true; -//} -//########################################################################################################################################3 - const unsigned char _3DScene::LegendTexture::Squares_Border_Color[3] = { 64, 64, 64 }; const unsigned char _3DScene::LegendTexture::Background_Color[3] = { 9, 91, 134 }; const unsigned char _3DScene::LegendTexture::Opacity = 255; -//########################################################################################################################################3 bool _3DScene::LegendTexture::generate(const GCodePreviewData& preview_data, const std::vector& tool_colors) { reset(); @@ -1912,146 +1811,6 @@ bool _3DScene::LegendTexture::generate(const GCodePreviewData& preview_data, con return true; } - -//// Generate a texture data, but don't load it into the GPU yet, as the GPU context may not yet be valid. -//bool _3DScene::LegendTexture::generate(const GCodePreviewData& preview_data, const std::vector& tool_colors) -//{ -// // Mark the texture as released, but don't release the texture from the GPU yet. -// m_tex_width = m_tex_height = 0; -// m_data.clear(); -// -// // collects items to render -// auto title = _(preview_data.get_legend_title()); -// const GCodePreviewData::LegendItemsList& items = preview_data.get_legend_items(tool_colors); -// -// unsigned int items_count = (unsigned int)items.size(); -// if (items_count == 0) -// // nothing to render, return -// return false; -// -// wxMemoryDC memDC; -// // select default font -// memDC.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); -// -// // calculates texture size -// wxCoord w, h; -// memDC.GetTextExtent(title, &w, &h); -// unsigned int title_width = (unsigned int)w; -// unsigned int title_height = (unsigned int)h; -// -// unsigned int max_text_width = 0; -// unsigned int max_text_height = 0; -// for (const GCodePreviewData::LegendItem& item : items) -// { -// memDC.GetTextExtent(GUI::from_u8(item.text), &w, &h); -// max_text_width = std::max(max_text_width, (unsigned int)w); -// max_text_height = std::max(max_text_height, (unsigned int)h); -// } -// -// m_tex_width = std::max(2 * Px_Border + title_width, 2 * (Px_Border + Px_Square_Contour) + Px_Square + Px_Text_Offset + max_text_width); -// m_tex_height = 2 * (Px_Border + Px_Square_Contour) + title_height + Px_Title_Offset + items_count * Px_Square; -// if (items_count > 1) -// m_tex_height += (items_count - 1) * Px_Square_Contour; -// -// // generates bitmap -// wxBitmap bitmap(m_tex_width, m_tex_height); -// -//#if defined(__APPLE__) || defined(_MSC_VER) -// bitmap.UseAlpha(); -//#endif -// -// memDC.SelectObject(bitmap); -// memDC.SetBackground(wxBrush(wxColour(Background_Color[0], Background_Color[1], Background_Color[2]))); -// memDC.Clear(); -// -// memDC.SetTextForeground(*wxWHITE); -// -// // draw title -// unsigned int title_x = Px_Border; -// unsigned int title_y = Px_Border; -// memDC.DrawText(title, title_x, title_y); -// -// // draw icons contours as background -// unsigned int squares_contour_x = Px_Border; -// unsigned int squares_contour_y = Px_Border + title_height + Px_Title_Offset; -// unsigned int squares_contour_width = Px_Square + 2 * Px_Square_Contour; -// unsigned int squares_contour_height = items_count * Px_Square + 2 * Px_Square_Contour; -// if (items_count > 1) -// squares_contour_height += (items_count - 1) * Px_Square_Contour; -// -// wxColour color(Squares_Border_Color[0], Squares_Border_Color[1], Squares_Border_Color[2]); -// wxPen pen(color); -// wxBrush brush(color); -// memDC.SetPen(pen); -// memDC.SetBrush(brush); -// memDC.DrawRectangle(wxRect(squares_contour_x, squares_contour_y, squares_contour_width, squares_contour_height)); -// -// // draw items (colored icon + text) -// unsigned int icon_x = squares_contour_x + Px_Square_Contour; -// unsigned int icon_x_inner = icon_x + 1; -// unsigned int icon_y = squares_contour_y + Px_Square_Contour; -// unsigned int icon_y_step = Px_Square + Px_Square_Contour; -// -// unsigned int text_x = icon_x + Px_Square + Px_Text_Offset; -// unsigned int text_y_offset = (Px_Square - max_text_height) / 2; -// -// unsigned int px_inner_square = Px_Square - 2; -// -// for (const GCodePreviewData::LegendItem& item : items) -// { -// // draw darker icon perimeter -// const std::vector& item_color_bytes = item.color.as_bytes(); -// wxImage::HSVValue dark_hsv = wxImage::RGBtoHSV(wxImage::RGBValue(item_color_bytes[0], item_color_bytes[1], item_color_bytes[2])); -// dark_hsv.value *= 0.75; -// wxImage::RGBValue dark_rgb = wxImage::HSVtoRGB(dark_hsv); -// color.Set(dark_rgb.red, dark_rgb.green, dark_rgb.blue, item_color_bytes[3]); -// pen.SetColour(color); -// brush.SetColour(color); -// memDC.SetPen(pen); -// memDC.SetBrush(brush); -// memDC.DrawRectangle(wxRect(icon_x, icon_y, Px_Square, Px_Square)); -// -// // draw icon interior -// color.Set(item_color_bytes[0], item_color_bytes[1], item_color_bytes[2], item_color_bytes[3]); -// pen.SetColour(color); -// brush.SetColour(color); -// memDC.SetPen(pen); -// memDC.SetBrush(brush); -// memDC.DrawRectangle(wxRect(icon_x_inner, icon_y + 1, px_inner_square, px_inner_square)); -// -// // draw text -// memDC.DrawText(GUI::from_u8(item.text), text_x, icon_y + text_y_offset); -// -// // update y -// icon_y += icon_y_step; -// } -// -// memDC.SelectObject(wxNullBitmap); -// -// // Convert the bitmap into a linear data ready to be loaded into the GPU. -// { -// wxImage image = bitmap.ConvertToImage(); -// image.SetMaskColour(Background_Color[0], Background_Color[1], Background_Color[2]); -// -// // prepare buffer -// m_data.assign(4 * m_tex_width * m_tex_height, 0); -// for (unsigned int h = 0; h < m_tex_height; ++h) -// { -// unsigned int hh = h * m_tex_width; -// unsigned char* px_ptr = m_data.data() + 4 * hh; -// for (unsigned int w = 0; w < m_tex_width; ++w) -// { -// *px_ptr++ = image.GetRed(w, h); -// *px_ptr++ = image.GetGreen(w, h); -// *px_ptr++ = image.GetBlue(w, h); -// *px_ptr++ = image.IsTransparent(w, h) ? 0 : Opacity; -// } -// } -// } -// return true; -//} -//########################################################################################################################################3 - void _3DScene::init_gl() { s_canvas_mgr.init_gl(); @@ -2459,27 +2218,11 @@ void _3DScene::generate_legend_texture(const GCodePreviewData& preview_data, con s_legend_texture.generate(preview_data, tool_colors); } -//################################################################################################################################################### -//unsigned int _3DScene::get_legend_texture_width() -//{ -// return s_legend_texture.get_texture_width(); -//} -// -//unsigned int _3DScene::get_legend_texture_height() -//{ -// return s_legend_texture.get_texture_height(); -//} -//################################################################################################################################################### - void _3DScene::reset_legend_texture() { -//################################################################################################################################################### s_legend_texture.reset(); -// s_legend_texture.reset_texture(); -//################################################################################################################################################### } -//################################################################################################################################################### unsigned int _3DScene::get_legend_texture_id() { return s_legend_texture.get_id(); @@ -2495,24 +2238,6 @@ int _3DScene::get_legend_texture_height() return s_legend_texture.get_height(); } -//unsigned int _3DScene::finalize_legend_texture() -//{ -// return s_legend_texture.finalize(); -//} -//################################################################################################################################################### - -//################################################################################################################################################### -//unsigned int _3DScene::get_warning_texture_width() -//{ -// return s_warning_texture.get_texture_width(); -//} -// -//unsigned int _3DScene::get_warning_texture_height() -//{ -// return s_warning_texture.get_texture_height(); -//} -//################################################################################################################################################### - void _3DScene::generate_warning_texture(const std::string& msg) { s_warning_texture.generate(msg); @@ -2520,13 +2245,9 @@ void _3DScene::generate_warning_texture(const std::string& msg) void _3DScene::reset_warning_texture() { -//################################################################################################################################################### s_warning_texture.reset(); -// s_warning_texture.reset_texture(); -//################################################################################################################################################### } -//################################################################################################################################################### unsigned int _3DScene::get_warning_texture_id() { return s_warning_texture.get_id(); @@ -2542,10 +2263,4 @@ int _3DScene::get_warning_texture_height() return s_warning_texture.get_height(); } -//unsigned int _3DScene::finalize_warning_texture() -//{ -// return s_warning_texture.finalize(); -//} -//################################################################################################################################################### - } // namespace Slic3r diff --git a/xs/src/slic3r/GUI/3DScene.hpp b/xs/src/slic3r/GUI/3DScene.hpp index 7ed8e2392..4103d59f3 100644 --- a/xs/src/slic3r/GUI/3DScene.hpp +++ b/xs/src/slic3r/GUI/3DScene.hpp @@ -8,9 +8,7 @@ #include "../../libslic3r/Utils.hpp" #include "../../libslic3r/Model.hpp" #include "../../slic3r/GUI/GLCanvas3DManager.hpp" -//################################################################################################################################# #include "../../slic3r/GUI/GLTexture.hpp" -//################################################################################################################################# class wxBitmap; class wxWindow; @@ -203,16 +201,10 @@ private: } }; -//########################################################################################################################################3 class LayersTexture -//class GLTexture -//########################################################################################################################################3 { public: -//########################################################################################################################################3 LayersTexture() : width(0), height(0), levels(0), cells(0) {} -// GLTexture() : width(0), height(0), levels(0), cells(0) {} -//########################################################################################################################################3 // Texture data std::vector data; @@ -351,10 +343,7 @@ public: void release_geometry() { this->indexed_vertex_array.release_geometry(); } /************************************************ Layer height texture ****************************************************/ -//########################################################################################################################################3 std::shared_ptr layer_height_texture; -// std::shared_ptr layer_height_texture; -//########################################################################################################################################3 // Data to render this volume using the layer height texture LayerHeightTextureData layer_height_texture_data; @@ -452,36 +441,6 @@ private: class _3DScene { -//################################################################################################################################################### -// class TextureBase -// { -// protected: -// unsigned int m_tex_id; -// unsigned int m_tex_width; -// unsigned int m_tex_height; -// -// // generate() fills in m_data with the pixels, while finalize() moves the data to the GPU before rendering. -// std::vector m_data; -// -// public: -// TextureBase() : m_tex_id(0), m_tex_width(0), m_tex_height(0) {} -// virtual ~TextureBase() { _destroy_texture(); } -// -// // If not loaded, load the texture data into the GPU. Return a texture ID or 0 if the texture has zero size. -// unsigned int finalize(); -// -// unsigned int get_texture_id() const { return m_tex_id; } -// unsigned int get_texture_width() const { return m_tex_width; } -// unsigned int get_texture_height() const { return m_tex_height; } -// -// void reset_texture() { _destroy_texture(); } -// -// private: -// void _destroy_texture(); -// }; -//################################################################################################################################################### - -//################################################################################################################################################### class WarningTexture : public GUI::GLTexture { static const unsigned char Background_Color[3]; @@ -491,20 +450,6 @@ class _3DScene bool generate(const std::string& msg); }; -// class WarningTexture : public TextureBase -// { -// static const unsigned char Background_Color[3]; -// static const unsigned char Opacity; -// -// public: -// WarningTexture() : TextureBase() {} -// -// // Generate a texture data, but don't load it into the GPU yet, as the glcontext may not be valid yet. -// bool generate(const std::string& msg); -// }; -//################################################################################################################################################### - -//################################################################################################################################################### class LegendTexture : public GUI::GLTexture { static const int Px_Title_Offset = 5; @@ -520,25 +465,6 @@ class _3DScene bool generate(const GCodePreviewData& preview_data, const std::vector& tool_colors); }; -// class LegendTexture : public TextureBase -// { -// static const unsigned int Px_Title_Offset = 5; -// static const unsigned int Px_Text_Offset = 5; -// static const unsigned int Px_Square = 20; -// static const unsigned int Px_Square_Contour = 1; -// static const unsigned int Px_Border = Px_Square / 2; -// static const unsigned char Squares_Border_Color[3]; -// static const unsigned char Background_Color[3]; -// static const unsigned char Opacity; -// -// public: -// LegendTexture() : TextureBase() {} -// -// // Generate a texture data, but don't load it into the GPU yet, as the glcontext may not be valid yet. -// bool generate(const GCodePreviewData& preview_data, const std::vector& tool_colors); -// }; -//################################################################################################################################################### - static LegendTexture s_legend_texture; static WarningTexture s_warning_texture; static GUI::GLCanvas3DManager s_canvas_mgr; @@ -644,33 +570,19 @@ public: // generates the legend texture in dependence of the current shown view type static void generate_legend_texture(const GCodePreviewData& preview_data, const std::vector& tool_colors); -//################################################################################################################################################### -// static unsigned int get_legend_texture_width(); -// static unsigned int get_legend_texture_height(); -//################################################################################################################################################### - static void reset_legend_texture(); -//################################################################################################################################################### + static unsigned int get_legend_texture_id(); static int get_legend_texture_width(); static int get_legend_texture_height(); -// static unsigned int finalize_legend_texture(); -//################################################################################################################################################### - -//################################################################################################################################################### -// static unsigned int get_warning_texture_width(); -// static unsigned int get_warning_texture_height(); -//################################################################################################################################################### // generates a warning texture containing the given message static void generate_warning_texture(const std::string& msg); static void reset_warning_texture(); -//################################################################################################################################################### + static unsigned int get_warning_texture_id(); static int get_warning_texture_width(); static int get_warning_texture_height(); -// static unsigned int finalize_warning_texture(); -//################################################################################################################################################### static void thick_lines_to_verts(const Lines& lines, const std::vector& widths, const std::vector& heights, bool closed, double top_z, GLVolume& volume); static void thick_lines_to_verts(const Lines3& lines, const std::vector& widths, const std::vector& heights, bool closed, GLVolume& volume); diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index 9793e0f57..694923d73 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -3594,7 +3594,7 @@ void GLCanvas3D::_render_warning_texture() const return; // If the warning texture has not been loaded into the GPU, do it now. - unsigned int tex_id = _3DScene::finalize_warning_texture(); + unsigned int tex_id = _3DScene::get_warning_texture_id(); if (tex_id > 0) { unsigned int w = _3DScene::get_warning_texture_width(); @@ -3627,7 +3627,7 @@ void GLCanvas3D::_render_legend_texture() const return; // If the legend texture has not been loaded into the GPU, do it now. - unsigned int tex_id = _3DScene::finalize_legend_texture(); + unsigned int tex_id = _3DScene::get_legend_texture_id(); if (tex_id > 0) { unsigned int w = _3DScene::get_legend_texture_width(); diff --git a/xs/src/slic3r/GUI/GLTexture.hpp b/xs/src/slic3r/GUI/GLTexture.hpp index 43f4ba66d..2e936161e 100644 --- a/xs/src/slic3r/GUI/GLTexture.hpp +++ b/xs/src/slic3r/GUI/GLTexture.hpp @@ -10,10 +10,7 @@ namespace GUI { class GLTexture { -//################################################################################################################################################### protected: -// private: -//################################################################################################################################################### unsigned int m_id; int m_width; int m_height; @@ -21,10 +18,7 @@ namespace GUI { public: GLTexture(); -//################################################################################################################################################### virtual ~GLTexture(); -// ~GLTexture(); -//################################################################################################################################################### bool load_from_file(const std::string& filename, bool generate_mipmaps); void reset(); @@ -37,10 +31,7 @@ namespace GUI { static void render_texture(unsigned int tex_id, float left, float right, float bottom, float top); -//################################################################################################################################################### protected: -// private: -//################################################################################################################################################### void _generate_mipmaps(wxImage& image); }; From 678be2b31702c41605b409f388189b1f40ab96c6 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 19 Jul 2018 11:24:04 +0200 Subject: [PATCH 164/198] Fixed update of rotate gizmo when selecting objects --- xs/src/slic3r/GUI/GLCanvas3D.cpp | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index 694923d73..c020f1ad1 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -1918,23 +1918,8 @@ void GLCanvas3D::update_gizmos_data() ModelInstance* model_instance = model_object->instances[0]; if (model_instance != nullptr) { - switch (m_gizmos.get_current_type()) - { - case Gizmos::Scale: - { - m_gizmos.set_scale(model_instance->scaling_factor); - break; - } - case Gizmos::Rotate: - { - m_gizmos.set_angle_z(model_instance->rotation); - break; - } - default: - { - break; - } - } + m_gizmos.set_scale(model_instance->scaling_factor); + m_gizmos.set_angle_z(model_instance->rotation); } } } From 5ff26bce5084d54f0c609ea8d7e9158af1b0d9a9 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 19 Jul 2018 11:39:51 +0200 Subject: [PATCH 165/198] Fixed update of gizmo when deleting all objects --- xs/src/slic3r/GUI/GLCanvas3D.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index c020f1ad1..ddc4feec9 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -1923,6 +1923,11 @@ void GLCanvas3D::update_gizmos_data() } } } + else + { + m_gizmos.set_scale(1.0f); + m_gizmos.set_angle_z(0.0f); + } } void GLCanvas3D::render() From 63fe2a9fb960ce6b74609dd0f5329f4c69b38bfb Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 19 Jul 2018 13:18:19 +0200 Subject: [PATCH 166/198] Warning and legend textures moved from _3DScene class to GLCanvas3D class --- xs/src/slic3r/GUI/3DScene.cpp | 272 +---------------------- xs/src/slic3r/GUI/3DScene.hpp | 41 ---- xs/src/slic3r/GUI/GLCanvas3D.cpp | 278 +++++++++++++++++++++++- xs/src/slic3r/GUI/GLCanvas3D.hpp | 35 +++ xs/src/slic3r/GUI/GLCanvas3DManager.cpp | 9 + xs/src/slic3r/GUI/GLCanvas3DManager.hpp | 2 + 6 files changed, 313 insertions(+), 324 deletions(-) diff --git a/xs/src/slic3r/GUI/3DScene.cpp b/xs/src/slic3r/GUI/3DScene.cpp index 565be4438..2ffd788eb 100644 --- a/xs/src/slic3r/GUI/3DScene.cpp +++ b/xs/src/slic3r/GUI/3DScene.cpp @@ -22,11 +22,6 @@ #include #include -#include -#include -#include -#include - #include #include "GUI.hpp" @@ -1589,228 +1584,8 @@ void _3DScene::point3_to_verts(const Point3& point, double width, double height, thick_point_to_verts(point, width, height, volume); } -_3DScene::LegendTexture _3DScene::s_legend_texture; -_3DScene::WarningTexture _3DScene::s_warning_texture; GUI::GLCanvas3DManager _3DScene::s_canvas_mgr; -const unsigned char _3DScene::WarningTexture::Background_Color[3] = { 9, 91, 134 }; -const unsigned char _3DScene::WarningTexture::Opacity = 255; - -bool _3DScene::WarningTexture::generate(const std::string& msg) -{ - reset(); - - if (msg.empty()) - return false; - - wxMemoryDC memDC; - // select default font - memDC.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); - - // calculates texture size - wxCoord w, h; - memDC.GetTextExtent(msg, &w, &h); - m_width = (int)w; - m_height = (int)h; - - // generates bitmap - wxBitmap bitmap(m_width, m_height); - -#if defined(__APPLE__) || defined(_MSC_VER) - bitmap.UseAlpha(); -#endif - - memDC.SelectObject(bitmap); - memDC.SetBackground(wxBrush(wxColour(Background_Color[0], Background_Color[1], Background_Color[2]))); - memDC.Clear(); - - memDC.SetTextForeground(*wxWHITE); - - // draw message - memDC.DrawText(msg, 0, 0); - - memDC.SelectObject(wxNullBitmap); - - // Convert the bitmap into a linear data ready to be loaded into the GPU. - wxImage image = bitmap.ConvertToImage(); - image.SetMaskColour(Background_Color[0], Background_Color[1], Background_Color[2]); - - // prepare buffer - std::vector data(4 * m_width * m_height, 0); - for (int h = 0; h < m_height; ++h) - { - int hh = h * m_width; - unsigned char* px_ptr = data.data() + 4 * hh; - for (int w = 0; w < m_width; ++w) - { - *px_ptr++ = image.GetRed(w, h); - *px_ptr++ = image.GetGreen(w, h); - *px_ptr++ = image.GetBlue(w, h); - *px_ptr++ = image.IsTransparent(w, h) ? 0 : Opacity; - } - } - - // sends buffer to gpu - ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - ::glGenTextures(1, &m_id); - ::glBindTexture(GL_TEXTURE_2D, (GLuint)m_id); - ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)m_width, (GLsizei)m_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)data.data()); - ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1); - ::glBindTexture(GL_TEXTURE_2D, 0); - - return true; -} - -const unsigned char _3DScene::LegendTexture::Squares_Border_Color[3] = { 64, 64, 64 }; -const unsigned char _3DScene::LegendTexture::Background_Color[3] = { 9, 91, 134 }; -const unsigned char _3DScene::LegendTexture::Opacity = 255; - -bool _3DScene::LegendTexture::generate(const GCodePreviewData& preview_data, const std::vector& tool_colors) -{ - reset(); - - // collects items to render - auto title = _(preview_data.get_legend_title()); - const GCodePreviewData::LegendItemsList& items = preview_data.get_legend_items(tool_colors); - - unsigned int items_count = (unsigned int)items.size(); - if (items_count == 0) - // nothing to render, return - return false; - - wxMemoryDC memDC; - // select default font - memDC.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); - - // calculates texture size - wxCoord w, h; - memDC.GetTextExtent(title, &w, &h); - int title_width = (int)w; - int title_height = (int)h; - - int max_text_width = 0; - int max_text_height = 0; - for (const GCodePreviewData::LegendItem& item : items) - { - memDC.GetTextExtent(GUI::from_u8(item.text), &w, &h); - max_text_width = std::max(max_text_width, (int)w); - max_text_height = std::max(max_text_height, (int)h); - } - - m_width = std::max(2 * Px_Border + title_width, 2 * (Px_Border + Px_Square_Contour) + Px_Square + Px_Text_Offset + max_text_width); - m_height = 2 * (Px_Border + Px_Square_Contour) + title_height + Px_Title_Offset + items_count * Px_Square; - if (items_count > 1) - m_height += (items_count - 1) * Px_Square_Contour; - - // generates bitmap - wxBitmap bitmap(m_width, m_height); - -#if defined(__APPLE__) || defined(_MSC_VER) - bitmap.UseAlpha(); -#endif - - memDC.SelectObject(bitmap); - memDC.SetBackground(wxBrush(wxColour(Background_Color[0], Background_Color[1], Background_Color[2]))); - memDC.Clear(); - - memDC.SetTextForeground(*wxWHITE); - - // draw title - int title_x = Px_Border; - int title_y = Px_Border; - memDC.DrawText(title, title_x, title_y); - - // draw icons contours as background - int squares_contour_x = Px_Border; - int squares_contour_y = Px_Border + title_height + Px_Title_Offset; - int squares_contour_width = Px_Square + 2 * Px_Square_Contour; - int squares_contour_height = items_count * Px_Square + 2 * Px_Square_Contour; - if (items_count > 1) - squares_contour_height += (items_count - 1) * Px_Square_Contour; - - wxColour color(Squares_Border_Color[0], Squares_Border_Color[1], Squares_Border_Color[2]); - wxPen pen(color); - wxBrush brush(color); - memDC.SetPen(pen); - memDC.SetBrush(brush); - memDC.DrawRectangle(wxRect(squares_contour_x, squares_contour_y, squares_contour_width, squares_contour_height)); - - // draw items (colored icon + text) - int icon_x = squares_contour_x + Px_Square_Contour; - int icon_x_inner = icon_x + 1; - int icon_y = squares_contour_y + Px_Square_Contour; - int icon_y_step = Px_Square + Px_Square_Contour; - - int text_x = icon_x + Px_Square + Px_Text_Offset; - int text_y_offset = (Px_Square - max_text_height) / 2; - - int px_inner_square = Px_Square - 2; - - for (const GCodePreviewData::LegendItem& item : items) - { - // draw darker icon perimeter - const std::vector& item_color_bytes = item.color.as_bytes(); - wxImage::HSVValue dark_hsv = wxImage::RGBtoHSV(wxImage::RGBValue(item_color_bytes[0], item_color_bytes[1], item_color_bytes[2])); - dark_hsv.value *= 0.75; - wxImage::RGBValue dark_rgb = wxImage::HSVtoRGB(dark_hsv); - color.Set(dark_rgb.red, dark_rgb.green, dark_rgb.blue, item_color_bytes[3]); - pen.SetColour(color); - brush.SetColour(color); - memDC.SetPen(pen); - memDC.SetBrush(brush); - memDC.DrawRectangle(wxRect(icon_x, icon_y, Px_Square, Px_Square)); - - // draw icon interior - color.Set(item_color_bytes[0], item_color_bytes[1], item_color_bytes[2], item_color_bytes[3]); - pen.SetColour(color); - brush.SetColour(color); - memDC.SetPen(pen); - memDC.SetBrush(brush); - memDC.DrawRectangle(wxRect(icon_x_inner, icon_y + 1, px_inner_square, px_inner_square)); - - // draw text - memDC.DrawText(GUI::from_u8(item.text), text_x, icon_y + text_y_offset); - - // update y - icon_y += icon_y_step; - } - - memDC.SelectObject(wxNullBitmap); - - // Convert the bitmap into a linear data ready to be loaded into the GPU. - wxImage image = bitmap.ConvertToImage(); - image.SetMaskColour(Background_Color[0], Background_Color[1], Background_Color[2]); - - // prepare buffer - std::vector data(4 * m_width * m_height, 0); - for (int h = 0; h < m_height; ++h) - { - int hh = h * m_width; - unsigned char* px_ptr = data.data() + 4 * hh; - for (int w = 0; w < m_width; ++w) - { - *px_ptr++ = image.GetRed(w, h); - *px_ptr++ = image.GetGreen(w, h); - *px_ptr++ = image.GetBlue(w, h); - *px_ptr++ = image.IsTransparent(w, h) ? 0 : Opacity; - } - } - - // sends buffer to gpu - ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - ::glGenTextures(1, &m_id); - ::glBindTexture(GL_TEXTURE_2D, (GLuint)m_id); - ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)m_width, (GLsizei)m_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)data.data()); - ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1); - ::glBindTexture(GL_TEXTURE_2D, 0); - - return true; -} - void _3DScene::init_gl() { s_canvas_mgr.init_gl(); @@ -2213,54 +1988,9 @@ void _3DScene::load_gcode_preview(wxGLCanvas* canvas, const GCodePreviewData* pr s_canvas_mgr.load_gcode_preview(canvas, preview_data, str_tool_colors); } -void _3DScene::generate_legend_texture(const GCodePreviewData& preview_data, const std::vector& tool_colors) -{ - s_legend_texture.generate(preview_data, tool_colors); -} - void _3DScene::reset_legend_texture() { - s_legend_texture.reset(); -} - -unsigned int _3DScene::get_legend_texture_id() -{ - return s_legend_texture.get_id(); -} - -int _3DScene::get_legend_texture_width() -{ - return s_legend_texture.get_width(); -} - -int _3DScene::get_legend_texture_height() -{ - return s_legend_texture.get_height(); -} - -void _3DScene::generate_warning_texture(const std::string& msg) -{ - s_warning_texture.generate(msg); -} - -void _3DScene::reset_warning_texture() -{ - s_warning_texture.reset(); -} - -unsigned int _3DScene::get_warning_texture_id() -{ - return s_warning_texture.get_id(); -} - -int _3DScene::get_warning_texture_width() -{ - return s_warning_texture.get_width(); -} - -int _3DScene::get_warning_texture_height() -{ - return s_warning_texture.get_height(); + s_canvas_mgr.reset_legend_texture(); } } // namespace Slic3r diff --git a/xs/src/slic3r/GUI/3DScene.hpp b/xs/src/slic3r/GUI/3DScene.hpp index 4103d59f3..a2ca1de7c 100644 --- a/xs/src/slic3r/GUI/3DScene.hpp +++ b/xs/src/slic3r/GUI/3DScene.hpp @@ -8,7 +8,6 @@ #include "../../libslic3r/Utils.hpp" #include "../../libslic3r/Model.hpp" #include "../../slic3r/GUI/GLCanvas3DManager.hpp" -#include "../../slic3r/GUI/GLTexture.hpp" class wxBitmap; class wxWindow; @@ -441,32 +440,6 @@ private: class _3DScene { - class WarningTexture : public GUI::GLTexture - { - static const unsigned char Background_Color[3]; - static const unsigned char Opacity; - - public: - bool generate(const std::string& msg); - }; - - class LegendTexture : public GUI::GLTexture - { - static const int Px_Title_Offset = 5; - static const int Px_Text_Offset = 5; - static const int Px_Square = 20; - static const int Px_Square_Contour = 1; - static const int Px_Border = Px_Square / 2; - static const unsigned char Squares_Border_Color[3]; - static const unsigned char Background_Color[3]; - static const unsigned char Opacity; - - public: - bool generate(const GCodePreviewData& preview_data, const std::vector& tool_colors); - }; - - static LegendTexture s_legend_texture; - static WarningTexture s_warning_texture; static GUI::GLCanvas3DManager s_canvas_mgr; public: @@ -568,22 +541,8 @@ public: static void load_wipe_tower_toolpaths(wxGLCanvas* canvas, const std::vector& str_tool_colors); static void load_gcode_preview(wxGLCanvas* canvas, const GCodePreviewData* preview_data, const std::vector& str_tool_colors); - // generates the legend texture in dependence of the current shown view type - static void generate_legend_texture(const GCodePreviewData& preview_data, const std::vector& tool_colors); static void reset_legend_texture(); - static unsigned int get_legend_texture_id(); - static int get_legend_texture_width(); - static int get_legend_texture_height(); - - // generates a warning texture containing the given message - static void generate_warning_texture(const std::string& msg); - static void reset_warning_texture(); - - static unsigned int get_warning_texture_id(); - static int get_warning_texture_width(); - static int get_warning_texture_height(); - static void thick_lines_to_verts(const Lines& lines, const std::vector& widths, const std::vector& heights, bool closed, double top_z, GLVolume& volume); static void thick_lines_to_verts(const Lines3& lines, const std::vector& widths, const std::vector& heights, bool closed, GLVolume& volume); static void extrusionentity_to_verts(const ExtrusionPath& extrusion_path, float print_z, GLVolume& volume); diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index ddc4feec9..684757c79 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -15,6 +15,10 @@ #include #include +#include +#include +#include +#include #include #include @@ -1457,6 +1461,224 @@ float GLCanvas3D::Gizmos::_get_total_overlay_height() const return height; } +const unsigned char GLCanvas3D::WarningTexture::Background_Color[3] = { 9, 91, 134 }; +const unsigned char GLCanvas3D::WarningTexture::Opacity = 255; + +bool GLCanvas3D::WarningTexture::generate(const std::string& msg) +{ + reset(); + + if (msg.empty()) + return false; + + wxMemoryDC memDC; + // select default font + memDC.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); + + // calculates texture size + wxCoord w, h; + memDC.GetTextExtent(msg, &w, &h); + m_width = (int)w; + m_height = (int)h; + + // generates bitmap + wxBitmap bitmap(m_width, m_height); + +#if defined(__APPLE__) || defined(_MSC_VER) + bitmap.UseAlpha(); +#endif + + memDC.SelectObject(bitmap); + memDC.SetBackground(wxBrush(wxColour(Background_Color[0], Background_Color[1], Background_Color[2]))); + memDC.Clear(); + + memDC.SetTextForeground(*wxWHITE); + + // draw message + memDC.DrawText(msg, 0, 0); + + memDC.SelectObject(wxNullBitmap); + + // Convert the bitmap into a linear data ready to be loaded into the GPU. + wxImage image = bitmap.ConvertToImage(); + image.SetMaskColour(Background_Color[0], Background_Color[1], Background_Color[2]); + + // prepare buffer + std::vector data(4 * m_width * m_height, 0); + for (int h = 0; h < m_height; ++h) + { + int hh = h * m_width; + unsigned char* px_ptr = data.data() + 4 * hh; + for (int w = 0; w < m_width; ++w) + { + *px_ptr++ = image.GetRed(w, h); + *px_ptr++ = image.GetGreen(w, h); + *px_ptr++ = image.GetBlue(w, h); + *px_ptr++ = image.IsTransparent(w, h) ? 0 : Opacity; + } + } + + // sends buffer to gpu + ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + ::glGenTextures(1, &m_id); + ::glBindTexture(GL_TEXTURE_2D, (GLuint)m_id); + ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)m_width, (GLsizei)m_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)data.data()); + ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1); + ::glBindTexture(GL_TEXTURE_2D, 0); + + return true; +} + +const unsigned char GLCanvas3D::LegendTexture::Squares_Border_Color[3] = { 64, 64, 64 }; +const unsigned char GLCanvas3D::LegendTexture::Background_Color[3] = { 9, 91, 134 }; +const unsigned char GLCanvas3D::LegendTexture::Opacity = 255; + +bool GLCanvas3D::LegendTexture::generate(const GCodePreviewData& preview_data, const std::vector& tool_colors) +{ + reset(); + + // collects items to render + auto title = _(preview_data.get_legend_title()); + const GCodePreviewData::LegendItemsList& items = preview_data.get_legend_items(tool_colors); + + unsigned int items_count = (unsigned int)items.size(); + if (items_count == 0) + // nothing to render, return + return false; + + wxMemoryDC memDC; + // select default font + memDC.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); + + // calculates texture size + wxCoord w, h; + memDC.GetTextExtent(title, &w, &h); + int title_width = (int)w; + int title_height = (int)h; + + int max_text_width = 0; + int max_text_height = 0; + for (const GCodePreviewData::LegendItem& item : items) + { + memDC.GetTextExtent(GUI::from_u8(item.text), &w, &h); + max_text_width = std::max(max_text_width, (int)w); + max_text_height = std::max(max_text_height, (int)h); + } + + m_width = std::max(2 * Px_Border + title_width, 2 * (Px_Border + Px_Square_Contour) + Px_Square + Px_Text_Offset + max_text_width); + m_height = 2 * (Px_Border + Px_Square_Contour) + title_height + Px_Title_Offset + items_count * Px_Square; + if (items_count > 1) + m_height += (items_count - 1) * Px_Square_Contour; + + // generates bitmap + wxBitmap bitmap(m_width, m_height); + +#if defined(__APPLE__) || defined(_MSC_VER) + bitmap.UseAlpha(); +#endif + + memDC.SelectObject(bitmap); + memDC.SetBackground(wxBrush(wxColour(Background_Color[0], Background_Color[1], Background_Color[2]))); + memDC.Clear(); + + memDC.SetTextForeground(*wxWHITE); + + // draw title + int title_x = Px_Border; + int title_y = Px_Border; + memDC.DrawText(title, title_x, title_y); + + // draw icons contours as background + int squares_contour_x = Px_Border; + int squares_contour_y = Px_Border + title_height + Px_Title_Offset; + int squares_contour_width = Px_Square + 2 * Px_Square_Contour; + int squares_contour_height = items_count * Px_Square + 2 * Px_Square_Contour; + if (items_count > 1) + squares_contour_height += (items_count - 1) * Px_Square_Contour; + + wxColour color(Squares_Border_Color[0], Squares_Border_Color[1], Squares_Border_Color[2]); + wxPen pen(color); + wxBrush brush(color); + memDC.SetPen(pen); + memDC.SetBrush(brush); + memDC.DrawRectangle(wxRect(squares_contour_x, squares_contour_y, squares_contour_width, squares_contour_height)); + + // draw items (colored icon + text) + int icon_x = squares_contour_x + Px_Square_Contour; + int icon_x_inner = icon_x + 1; + int icon_y = squares_contour_y + Px_Square_Contour; + int icon_y_step = Px_Square + Px_Square_Contour; + + int text_x = icon_x + Px_Square + Px_Text_Offset; + int text_y_offset = (Px_Square - max_text_height) / 2; + + int px_inner_square = Px_Square - 2; + + for (const GCodePreviewData::LegendItem& item : items) + { + // draw darker icon perimeter + const std::vector& item_color_bytes = item.color.as_bytes(); + wxImage::HSVValue dark_hsv = wxImage::RGBtoHSV(wxImage::RGBValue(item_color_bytes[0], item_color_bytes[1], item_color_bytes[2])); + dark_hsv.value *= 0.75; + wxImage::RGBValue dark_rgb = wxImage::HSVtoRGB(dark_hsv); + color.Set(dark_rgb.red, dark_rgb.green, dark_rgb.blue, item_color_bytes[3]); + pen.SetColour(color); + brush.SetColour(color); + memDC.SetPen(pen); + memDC.SetBrush(brush); + memDC.DrawRectangle(wxRect(icon_x, icon_y, Px_Square, Px_Square)); + + // draw icon interior + color.Set(item_color_bytes[0], item_color_bytes[1], item_color_bytes[2], item_color_bytes[3]); + pen.SetColour(color); + brush.SetColour(color); + memDC.SetPen(pen); + memDC.SetBrush(brush); + memDC.DrawRectangle(wxRect(icon_x_inner, icon_y + 1, px_inner_square, px_inner_square)); + + // draw text + memDC.DrawText(GUI::from_u8(item.text), text_x, icon_y + text_y_offset); + + // update y + icon_y += icon_y_step; + } + + memDC.SelectObject(wxNullBitmap); + + // Convert the bitmap into a linear data ready to be loaded into the GPU. + wxImage image = bitmap.ConvertToImage(); + image.SetMaskColour(Background_Color[0], Background_Color[1], Background_Color[2]); + + // prepare buffer + std::vector data(4 * m_width * m_height, 0); + for (int h = 0; h < m_height; ++h) + { + int hh = h * m_width; + unsigned char* px_ptr = data.data() + 4 * hh; + for (int w = 0; w < m_width; ++w) + { + *px_ptr++ = image.GetRed(w, h); + *px_ptr++ = image.GetGreen(w, h); + *px_ptr++ = image.GetBlue(w, h); + *px_ptr++ = image.IsTransparent(w, h) ? 0 : Opacity; + } + } + + // sends buffer to gpu + ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + ::glGenTextures(1, &m_id); + ::glBindTexture(GL_TEXTURE_2D, (GLuint)m_id); + ::glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)m_width, (GLsizei)m_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)data.data()); + ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1); + ::glBindTexture(GL_TEXTURE_2D, 0); + + return true; +} + GLGizmoBase* GLCanvas3D::Gizmos::_get_current() const { GizmosMap::const_iterator it = m_gizmos.find(m_current); @@ -2079,21 +2301,21 @@ void GLCanvas3D::reload_scene(bool force) if (!contained) { enable_warning_texture(true); - _3DScene::generate_warning_texture(L("Detected object outside print volume")); + _generate_warning_texture(L("Detected object outside print volume")); m_on_enable_action_buttons_callback.call(state == ModelInstance::PVS_Fully_Outside); } else { enable_warning_texture(false); m_volumes.reset_outside_state(); - _3DScene::reset_warning_texture(); + _reset_warning_texture(); m_on_enable_action_buttons_callback.call(!m_model->objects.empty()); } } else { enable_warning_texture(false); - _3DScene::reset_warning_texture(); + _reset_warning_texture(); m_on_enable_action_buttons_callback.call(false); } } @@ -2484,11 +2706,11 @@ void GLCanvas3D::load_gcode_preview(const GCodePreviewData& preview_data, const _load_gcode_unretractions(preview_data); if (m_volumes.empty()) - _3DScene::reset_legend_texture(); + reset_legend_texture(); else { - _3DScene::generate_legend_texture(preview_data, tool_colors); - + _generate_legend_texture(preview_data, tool_colors); + // removes empty volumes m_volumes.volumes.erase(std::remove_if(m_volumes.volumes.begin(), m_volumes.volumes.end(), [](const GLVolume* volume) { return volume->print_zs.empty(); }), m_volumes.volumes.end()); @@ -3176,6 +3398,14 @@ Point GLCanvas3D::get_local_mouse_position() const return Point(mouse_pos.x, mouse_pos.y); } +void GLCanvas3D::reset_legend_texture() +{ + if (!set_current()) + return; + + m_legend_texture.reset(); +} + bool GLCanvas3D::_is_shown_on_screen() const { return (m_canvas != nullptr) ? m_canvas->IsShownOnScreen() : false; @@ -3584,11 +3814,11 @@ void GLCanvas3D::_render_warning_texture() const return; // If the warning texture has not been loaded into the GPU, do it now. - unsigned int tex_id = _3DScene::get_warning_texture_id(); + unsigned int tex_id = m_warning_texture.get_id(); if (tex_id > 0) { - unsigned int w = _3DScene::get_warning_texture_width(); - unsigned int h = _3DScene::get_warning_texture_height(); + int w = m_warning_texture.get_width(); + int h = m_warning_texture.get_height(); if ((w > 0) && (h > 0)) { ::glDisable(GL_DEPTH_TEST); @@ -3617,11 +3847,11 @@ void GLCanvas3D::_render_legend_texture() const return; // If the legend texture has not been loaded into the GPU, do it now. - unsigned int tex_id = _3DScene::get_legend_texture_id(); + unsigned int tex_id = m_legend_texture.get_id(); if (tex_id > 0) { - unsigned int w = _3DScene::get_legend_texture_width(); - unsigned int h = _3DScene::get_legend_texture_height(); + int w = m_legend_texture.get_width(); + int h = m_legend_texture.get_height(); if ((w > 0) && (h > 0)) { ::glDisable(GL_DEPTH_TEST); @@ -4535,5 +4765,29 @@ std::vector GLCanvas3D::_parse_colors(const std::vector& col return output; } +void GLCanvas3D::_generate_legend_texture(const GCodePreviewData& preview_data, const std::vector& tool_colors) +{ + if (!set_current()) + return; + + m_legend_texture.generate(preview_data, tool_colors); +} + +void GLCanvas3D::_generate_warning_texture(const std::string& msg) +{ + if (!set_current()) + return; + + m_warning_texture.generate(msg); +} + +void GLCanvas3D::_reset_warning_texture() +{ + if (!set_current()) + return; + + m_warning_texture.reset(); +} + } // namespace GUI } // namespace Slic3r diff --git a/xs/src/slic3r/GUI/GLCanvas3D.hpp b/xs/src/slic3r/GUI/GLCanvas3D.hpp index cc998226b..d18ca0cab 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.hpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.hpp @@ -394,9 +394,35 @@ public: GLGizmoBase* _get_current() const; }; + class WarningTexture : public GUI::GLTexture + { + static const unsigned char Background_Color[3]; + static const unsigned char Opacity; + + public: + bool generate(const std::string& msg); + }; + + class LegendTexture : public GUI::GLTexture + { + static const int Px_Title_Offset = 5; + static const int Px_Text_Offset = 5; + static const int Px_Square = 20; + static const int Px_Square_Contour = 1; + static const int Px_Border = Px_Square / 2; + static const unsigned char Squares_Border_Color[3]; + static const unsigned char Background_Color[3]; + static const unsigned char Opacity; + + public: + bool generate(const GCodePreviewData& preview_data, const std::vector& tool_colors); + }; + private: wxGLCanvas* m_canvas; wxGLContext* m_context; + LegendTexture m_legend_texture; + WarningTexture m_warning_texture; wxTimer* m_timer; Camera m_camera; Bed m_bed; @@ -578,6 +604,8 @@ public: Size get_canvas_size() const; Point get_local_mouse_position() const; + void reset_legend_texture(); + private: bool _is_shown_on_screen() const; void _force_zoom_to_bed(); @@ -643,6 +671,13 @@ private: void _on_move(const std::vector& volume_idxs); void _on_select(int volume_idx); + // generates the legend texture in dependence of the current shown view type + void _generate_legend_texture(const GCodePreviewData& preview_data, const std::vector& tool_colors); + + // generates a warning texture containing the given message + void _generate_warning_texture(const std::string& msg); + void _reset_warning_texture(); + static std::vector _parse_colors(const std::vector& colors); }; diff --git a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp index 7a68cbc81..23a8f4c15 100644 --- a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp @@ -550,6 +550,15 @@ void GLCanvas3DManager::load_gcode_preview(wxGLCanvas* canvas, const GCodePrevie it->second->load_gcode_preview(*preview_data, str_tool_colors); } +void GLCanvas3DManager::reset_legend_texture() +{ + for (CanvasesMap::value_type& canvas : m_canvases) + { + if (canvas.second != nullptr) + canvas.second->reset_legend_texture(); + } +} + void GLCanvas3DManager::register_on_viewport_changed_callback(wxGLCanvas* canvas, void* callback) { CanvasesMap::iterator it = _get_canvas(canvas); diff --git a/xs/src/slic3r/GUI/GLCanvas3DManager.hpp b/xs/src/slic3r/GUI/GLCanvas3DManager.hpp index c813fd477..98205982f 100644 --- a/xs/src/slic3r/GUI/GLCanvas3DManager.hpp +++ b/xs/src/slic3r/GUI/GLCanvas3DManager.hpp @@ -137,6 +137,8 @@ public: void load_wipe_tower_toolpaths(wxGLCanvas* canvas, const std::vector& str_tool_colors); void load_gcode_preview(wxGLCanvas* canvas, const GCodePreviewData* preview_data, const std::vector& str_tool_colors); + void reset_legend_texture(); + void register_on_viewport_changed_callback(wxGLCanvas* canvas, void* callback); void register_on_double_click_callback(wxGLCanvas* canvas, void* callback); void register_on_right_click_callback(wxGLCanvas* canvas, void* callback); From feb0f7627939c92d9de44bfa5620a4eed22bddfd Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 19 Jul 2018 13:43:33 +0200 Subject: [PATCH 167/198] Better fix for gizmo update when deleting objects --- xs/src/slic3r/GUI/GLCanvas3D.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index 684757c79..716866e57 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -2264,8 +2264,12 @@ void GLCanvas3D::reload_scene(bool force) m_objects_volumes_idxs.push_back(load_object(*m_model, obj_idx)); } + // 1st call to reset if no objects left update_gizmos_data(); update_volumes_selection(m_objects_selections); + // 2nd call to restore if something selected + if (!m_objects_selections.empty()) + update_gizmos_data(); if (m_config->has("nozzle_diameter")) { From 1a6fdb668fcb96e370eb8bf80de011196c3b2787 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 19 Jul 2018 13:58:25 +0200 Subject: [PATCH 168/198] Fixed print info --- lib/Slic3r/GUI/Plater.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index f59350eb9..4a56ce632 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -1605,17 +1605,17 @@ sub print_info_box_show { $print_info_sizer->Add($grid_sizer, 0, wxEXPAND); my @info = ( L("Used Filament (m)") - => sprintf("%.2f" , $self->{print}->total_cost), + => sprintf("%.2f" , $self->{print}->total_used_filament / 1000), L("Used Filament (mm³)") - => sprintf("%.2f" , $self->{print}->total_weight), - L("Used Filament (g)"), => sprintf("%.2f" , $self->{print}->total_extruded_volume), + L("Used Filament (g)"), + => sprintf("%.2f" , $self->{print}->total_weight), L("Cost"), - => $self->{print}->estimated_normal_print_time, + => sprintf("%.2f" , $self->{print}->total_cost), L("Estimated printing time (normal mode)") - => $self->{print}->estimated_silent_print_time, + => $self->{print}->estimated_normal_print_time, L("Estimated printing time (silent mode)") - => sprintf("%.2f" , $self->{print}->total_used_filament / 1000) + => $self->{print}->estimated_silent_print_time ); while ( my $label = shift @info) { my $value = shift @info; From aaa592bab9be479ba90bea27c2b2fd36e12f724b Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 19 Jul 2018 16:06:46 +0200 Subject: [PATCH 169/198] Another fix in gizmos update --- xs/src/slic3r/GUI/GLCanvas3D.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index 716866e57..064a9adce 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -2128,7 +2128,7 @@ void GLCanvas3D::update_volumes_colors_by_extruder() void GLCanvas3D::update_gizmos_data() { - if (!m_gizmos.is_running()) + if (!m_gizmos.is_enabled()) return; int id = _get_first_selected_object_id(); @@ -3323,6 +3323,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) { deselect_volumes(); _on_select(-1); + update_gizmos_data(); } } else if (evt.LeftUp() && m_gizmos.is_dragging()) From ed0f073ef33540fbf3b78e2f7c0ceb3acce3e4d3 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Wed, 18 Jul 2018 16:37:44 +0200 Subject: [PATCH 170/198] Small objects can now fit inside free space surrounded by objects. --- xs/src/libnest2d/examples/main.cpp | 22 +- .../libnest2d/geometry_traits_nfp.hpp | 56 ++++- .../libnest2d/libnest2d/placers/nfpplacer.hpp | 227 ++++++++++++------ .../libnest2d/selections/firstfit.hpp | 4 +- xs/src/libslic3r/Model.cpp | 12 +- 5 files changed, 238 insertions(+), 83 deletions(-) diff --git a/xs/src/libnest2d/examples/main.cpp b/xs/src/libnest2d/examples/main.cpp index 4623a6add..e5a47161e 100644 --- a/xs/src/libnest2d/examples/main.cpp +++ b/xs/src/libnest2d/examples/main.cpp @@ -519,20 +519,28 @@ void arrangeRectangles() { std::vector proba = { { - { {0, 0}, {20, 20}, {40, 0}, {0, 0} } + Rectangle(100, 2) }, { - { {0, 100}, {50, 60}, {100, 100}, {50, 0}, {0, 100} } - + Rectangle(100, 2) + }, + { + Rectangle(100, 2) + }, + { + Rectangle(10, 10) }, }; + proba[0].rotate(Pi/3); + proba[1].rotate(Pi-Pi/3); + std::vector input; input.insert(input.end(), prusaParts().begin(), prusaParts().end()); // input.insert(input.end(), prusaExParts().begin(), prusaExParts().end()); -// input.insert(input.end(), stegoParts().begin(), stegoParts().end()); + input.insert(input.end(), stegoParts().begin(), stegoParts().end()); // input.insert(input.end(), rects.begin(), rects.end()); -// input.insert(input.end(), proba.begin(), proba.end()); + input.insert(input.end(), proba.begin(), proba.end()); // input.insert(input.end(), crasher.begin(), crasher.end()); Box bin(250*SCALE, 210*SCALE); @@ -569,9 +577,9 @@ void arrangeRectangles() { Packer::SelectionConfig sconf; // sconf.allow_parallel = false; // sconf.force_parallel = false; -// sconf.try_triplets = true; +// sconf.try_triplets = false; // sconf.try_reverse_order = true; -// sconf.waste_increment = 0.1; +// sconf.waste_increment = 0.005; arrange.configure(pconf, sconf); diff --git a/xs/src/libnest2d/libnest2d/geometry_traits_nfp.hpp b/xs/src/libnest2d/libnest2d/geometry_traits_nfp.hpp index 56e8527b4..581b6bed0 100644 --- a/xs/src/libnest2d/libnest2d/geometry_traits_nfp.hpp +++ b/xs/src/libnest2d/libnest2d/geometry_traits_nfp.hpp @@ -25,9 +25,60 @@ using Shapes = typename ShapeLike::Shapes; /// Minkowski addition (not used yet) template -static RawShape minkowskiDiff(const RawShape& sh, const RawShape& /*other*/) +static RawShape minkowskiDiff(const RawShape& sh, const RawShape& cother) { + using Vertex = TPoint; + //using Coord = TCoord; + using Edge = _Segment; + using sl = ShapeLike; + using std::signbit; + // Copy the orbiter (controur only), we will have to work on it + RawShape orbiter = sl::create(sl::getContour(cother)); + + // Make the orbiter reverse oriented + for(auto &v : sl::getContour(orbiter)) v = -v; + + // An egde with additional data for marking it + struct MarkedEdge { Edge e; Radians turn_angle; bool is_turning_point; }; + + // Container for marked edges + using EdgeList = std::vector; + + EdgeList A, B; + + auto fillEdgeList = [](EdgeList& L, const RawShape& poly) { + L.reserve(sl::contourVertexCount(poly)); + + auto it = sl::cbegin(poly); + auto nextit = std::next(it); + + L.emplace_back({Edge(*it, *nextit), 0, false}); + it++; nextit++; + + while(nextit != sl::cend(poly)) { + Edge e(*it, *nextit); + auto& L_prev = L.back(); + auto phi = L_prev.e.angleToXaxis(); + auto phi_prev = e.angleToXaxis(); + auto turn_angle = phi-phi_prev; + if(turn_angle > Pi) turn_angle -= 2*Pi; + L.emplace_back({ + e, + turn_angle, + signbit(turn_angle) != signbit(L_prev.turn_angle) + }); + it++; nextit++; + } + + L.front().turn_angle = L.front().e.angleToXaxis() - + L.back().e.angleToXaxis(); + + if(L.front().turn_angle > Pi) L.front().turn_angle -= 2*Pi; + }; + + fillEdgeList(A, sh); + fillEdgeList(B, orbiter); return sh; } @@ -193,6 +244,9 @@ static RawShape nfpConvexOnly(const RawShape& sh, const RawShape& cother) // Lindmark's reasoning about the reference vertex of nfp in his thesis // ("No fit polygon problem" - section 2.1.9) + // TODO: dont do this here. Cache the rmu and lmd in Item and get translate + // the nfp after this call + auto csh = sh; // Copy sh, we will sort the verices in the copy auto& cmp = _vsort; std::sort(ShapeLike::begin(csh), ShapeLike::end(csh), cmp); diff --git a/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp b/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp index d6bd154db..89848eb53 100644 --- a/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp +++ b/xs/src/libnest2d/libnest2d/placers/nfpplacer.hpp @@ -48,32 +48,89 @@ template class EdgeCache { using Coord = TCoord; using Edge = _Segment; - mutable std::vector corners_; + struct ContourCache { + mutable std::vector corners; + std::vector emap; + std::vector distances; + double full_distance = 0; + } contour_; - std::vector emap_; - std::vector distances_; - double full_distance_ = 0; + std::vector holes_; void createCache(const RawShape& sh) { - auto first = ShapeLike::cbegin(sh); - auto next = first + 1; - auto endit = ShapeLike::cend(sh); + { // For the contour + auto first = ShapeLike::cbegin(sh); + auto next = std::next(first); + auto endit = ShapeLike::cend(sh); - distances_.reserve(ShapeLike::contourVertexCount(sh)); + contour_.distances.reserve(ShapeLike::contourVertexCount(sh)); - while(next != endit) { - emap_.emplace_back(*(first++), *(next++)); - full_distance_ += emap_.back().length(); - distances_.push_back(full_distance_); + while(next != endit) { + contour_.emap.emplace_back(*(first++), *(next++)); + contour_.full_distance += contour_.emap.back().length(); + contour_.distances.push_back(contour_.full_distance); + } + } + + for(auto& h : ShapeLike::holes(sh)) { // For the holes + auto first = h.begin(); + auto next = std::next(first); + auto endit = h.end(); + + ContourCache hc; + hc.distances.reserve(endit - first); + + while(next != endit) { + hc.emap.emplace_back(*(first++), *(next++)); + hc.full_distance += hc.emap.back().length(); + hc.distances.push_back(hc.full_distance); + } + + holes_.push_back(hc); } } void fetchCorners() const { - if(!corners_.empty()) return; + if(!contour_.corners.empty()) return; // TODO Accuracy - corners_ = distances_; - for(auto& d : corners_) d /= full_distance_; + contour_.corners = contour_.distances; + for(auto& d : contour_.corners) d /= contour_.full_distance; + } + + void fetchHoleCorners(unsigned hidx) const { + auto& hc = holes_[hidx]; + if(!hc.corners.empty()) return; + + // TODO Accuracy + hc.corners = hc.distances; + for(auto& d : hc.corners) d /= hc.full_distance; + } + + inline Vertex coords(const ContourCache& cache, double distance) const { + assert(distance >= .0 && distance <= 1.0); + + // distance is from 0.0 to 1.0, we scale it up to the full length of + // the circumference + double d = distance*cache.full_distance; + + auto& distances = cache.distances; + + // Magic: we find the right edge in log time + auto it = std::lower_bound(distances.begin(), distances.end(), d); + auto idx = it - distances.begin(); // get the index of the edge + auto edge = cache.emap[idx]; // extrac the edge + + // Get the remaining distance on the target edge + auto ed = d - (idx > 0 ? *std::prev(it) : 0 ); + auto angle = edge.angleToXaxis(); + Vertex ret = edge.first(); + + // Get the point on the edge which lies in ed distance from the start + ret += { static_cast(std::round(ed*std::cos(angle))), + static_cast(std::round(ed*std::sin(angle))) }; + + return ret; } public: @@ -102,37 +159,36 @@ public: * @return Returns the coordinates of the point lying on the polygon * circumference. */ - inline Vertex coords(double distance) { - assert(distance >= .0 && distance <= 1.0); - - // distance is from 0.0 to 1.0, we scale it up to the full length of - // the circumference - double d = distance*full_distance_; - - // Magic: we find the right edge in log time - auto it = std::lower_bound(distances_.begin(), distances_.end(), d); - auto idx = it - distances_.begin(); // get the index of the edge - auto edge = emap_[idx]; // extrac the edge - - // Get the remaining distance on the target edge - auto ed = d - (idx > 0 ? *std::prev(it) : 0 ); - auto angle = edge.angleToXaxis(); - Vertex ret = edge.first(); - - // Get the point on the edge which lies in ed distance from the start - ret += { static_cast(std::round(ed*std::cos(angle))), - static_cast(std::round(ed*std::sin(angle))) }; - - return ret; + inline Vertex coords(double distance) const { + return coords(contour_, distance); } - inline double circumference() const BP2D_NOEXCEPT { return full_distance_; } + inline Vertex coords(unsigned hidx, double distance) const { + assert(hidx < holes_.size()); + return coords(holes_[hidx], distance); + } + + inline double circumference() const BP2D_NOEXCEPT { + return contour_.full_distance; + } + + inline double circumference(unsigned hidx) const BP2D_NOEXCEPT { + return holes_[hidx].full_distance; + } inline const std::vector& corners() const BP2D_NOEXCEPT { fetchCorners(); - return corners_; + return contour_.corners; } + inline const std::vector& + corners(unsigned holeidx) const BP2D_NOEXCEPT { + fetchHoleCorners(holeidx); + return holes_[holeidx].corners; + } + + inline unsigned holeCount() const BP2D_NOEXCEPT { return holes_.size(); } + }; template @@ -294,12 +350,20 @@ public: for(auto& nfp : nfps ) ecache.emplace_back(nfp); - auto getNfpPoint = [&ecache](double relpos) { - auto relpfloor = std::floor(relpos); - auto nfp_idx = static_cast(relpfloor); - if(nfp_idx >= ecache.size()) nfp_idx--; - auto p = relpos - relpfloor; - return ecache[nfp_idx].coords(p); + struct Optimum { + double relpos; + unsigned nfpidx; + int hidx; + Optimum(double pos, unsigned nidx): + relpos(pos), nfpidx(nidx), hidx(-1) {} + Optimum(double pos, unsigned nidx, int holeidx): + relpos(pos), nfpidx(nidx), hidx(holeidx) {} + }; + + auto getNfpPoint = [&ecache](const Optimum& opt) + { + return opt.hidx < 0? ecache[opt.nfpidx].coords(opt.relpos) : + ecache[opt.nfpidx].coords(opt.nfpidx, opt.relpos); }; Nfp::Shapes pile; @@ -310,6 +374,8 @@ public: pile_area += mitem.area(); } + // This is the kernel part of the object function that is + // customizable by the library client auto _objfunc = config_.object_function? config_.object_function : [this](const Nfp::Shapes& pile, double occupied_area, @@ -334,9 +400,8 @@ public: }; // Our object function for placement - auto objfunc = [&] (double relpos) + auto rawobjfunc = [&] (Vertex v) { - Vertex v = getNfpPoint(relpos); auto d = v - iv; d += startpos; item.translation(d); @@ -359,46 +424,74 @@ public: stopcr.type = opt::StopLimitType::RELATIVE; opt::TOptimizer solver(stopcr); - double optimum = 0; + Optimum optimum(0, 0); double best_score = penality_; - // double max_bound = 1.0*nfps.size(); - // Genetic should look like this: - /*auto result = solver.optimize_min(objfunc, - opt::initvals(0.0), - opt::bound(0.0, max_bound) - ); - - if(result.score < penality_) { - best_score = result.score; - optimum = std::get<0>(result.optimum); - }*/ - // Local optimization with the four polygon corners as // starting points for(unsigned ch = 0; ch < ecache.size(); ch++) { auto& cache = ecache[ch]; + auto contour_ofn = [&rawobjfunc, &getNfpPoint, ch] + (double relpos) + { + return rawobjfunc(getNfpPoint(Optimum(relpos, ch))); + }; + std::for_each(cache.corners().begin(), cache.corners().end(), - [ch, &solver, &objfunc, - &best_score, &optimum] - (double pos) + [ch, &contour_ofn, &solver, &best_score, + &optimum] (double pos) { try { - auto result = solver.optimize_min(objfunc, - opt::initvals(ch+pos), - opt::bound(ch, 1.0 + ch) + auto result = solver.optimize_min(contour_ofn, + opt::initvals(pos), + opt::bound(0, 1.0) ); if(result.score < best_score) { best_score = result.score; - optimum = std::get<0>(result.optimum); + optimum.relpos = std::get<0>(result.optimum); + optimum.nfpidx = ch; + optimum.hidx = -1; } } catch(std::exception& e) { derr() << "ERROR: " << e.what() << "\n"; } }); + + for(unsigned hidx = 0; hidx < cache.holeCount(); ++hidx) { + auto hole_ofn = + [&rawobjfunc, &getNfpPoint, ch, hidx] + (double pos) + { + Optimum opt(pos, ch, hidx); + return rawobjfunc(getNfpPoint(opt)); + }; + + std::for_each(cache.corners(hidx).begin(), + cache.corners(hidx).end(), + [&hole_ofn, &solver, &best_score, + &optimum, ch, hidx] + (double pos) + { + try { + auto result = solver.optimize_min(hole_ofn, + opt::initvals(pos), + opt::bound(0, 1.0) + ); + + if(result.score < best_score) { + best_score = result.score; + Optimum o(std::get<0>(result.optimum), + ch, hidx); + optimum = o; + } + } catch(std::exception& e) { + derr() << "ERROR: " << e.what() << "\n"; + } + }); + } } if( best_score < global_score ) { diff --git a/xs/src/libnest2d/libnest2d/selections/firstfit.hpp b/xs/src/libnest2d/libnest2d/selections/firstfit.hpp index 2253a0dfe..b6e80520c 100644 --- a/xs/src/libnest2d/libnest2d/selections/firstfit.hpp +++ b/xs/src/libnest2d/libnest2d/selections/firstfit.hpp @@ -56,7 +56,7 @@ public: }; // Safety test: try to pack each item into an empty bin. If it fails - // then it should be removed from the not_packed list + // then it should be removed from the list { auto it = store_.begin(); while (it != store_.end()) { Placer p(bin); @@ -72,7 +72,7 @@ public: while(!was_packed) { for(size_t j = 0; j < placers.size() && !was_packed; j++) { - if(was_packed = placers[j].pack(item)) + if((was_packed = placers[j].pack(item))) makeProgress(placers[j], j); } diff --git a/xs/src/libslic3r/Model.cpp b/xs/src/libslic3r/Model.cpp index 2925251eb..b2e439e5d 100644 --- a/xs/src/libslic3r/Model.cpp +++ b/xs/src/libslic3r/Model.cpp @@ -530,12 +530,12 @@ bool arrange(Model &model, coordf_t dist, const Slic3r::BoundingBoxf* bb, // arranger.useMinimumBoundigBoxRotation(); pcfg.rotations = { 0.0 }; - // Magic: we will specify what is the goal of arrangement... - // In this case we override the default object to make the larger items go - // into the center of the pile and smaller items orbit it so the resulting - // pile has a circle-like shape. This is good for the print bed's heat - // profile. We alse sacrafice a bit of pack efficiency for this to work. As - // a side effect, the arrange procedure is a lot faster (we do not need to + // Magic: we will specify what is the goal of arrangement... In this case + // we override the default object function to make the larger items go into + // the center of the pile and smaller items orbit it so the resulting pile + // has a circle-like shape. This is good for the print bed's heat profile. + // We alse sacrafice a bit of pack efficiency for this to work. As a side + // effect, the arrange procedure is a lot faster (we do not need to // calculate the convex hulls) pcfg.object_function = [bin, hasbin]( NfpPlacer::Pile pile, // The currently arranged pile From 4b8e10a05cba649a88d3c32e001bac0e4feeed3b Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Fri, 20 Jul 2018 12:05:08 +0200 Subject: [PATCH 171/198] Slightly faster time estimation --- xs/src/libslic3r/GCode.cpp | 4 ++-- xs/src/libslic3r/GCodeTimeEstimator.cpp | 9 ++++++--- xs/src/libslic3r/GCodeTimeEstimator.hpp | 5 ++++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 8e0862cf2..f0b37ade3 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -863,9 +863,9 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) _write(file, m_writer.postamble()); // calculates estimated printing time - m_normal_time_estimator.calculate_time(); + m_normal_time_estimator.calculate_time(false); if (m_silent_time_estimator_enabled) - m_silent_time_estimator.calculate_time(); + m_silent_time_estimator.calculate_time(false); // Get filament stats. print.filament_stats.clear(); diff --git a/xs/src/libslic3r/GCodeTimeEstimator.cpp b/xs/src/libslic3r/GCodeTimeEstimator.cpp index 7c8540e66..2b4d89b3d 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.cpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.cpp @@ -196,11 +196,14 @@ namespace Slic3r { } } - void GCodeTimeEstimator::calculate_time() + void GCodeTimeEstimator::calculate_time(bool start_from_beginning) { PROFILE_FUNC(); - _reset_time(); - _set_blocks_st_synchronize(false); + if (start_from_beginning) + { + _reset_time(); + _set_blocks_st_synchronize(false); + } _calculate_time(); #if ENABLE_MOVE_STATS diff --git a/xs/src/libslic3r/GCodeTimeEstimator.hpp b/xs/src/libslic3r/GCodeTimeEstimator.hpp index fe678884a..7e0cb4442 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.hpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.hpp @@ -227,7 +227,10 @@ namespace Slic3r { void add_gcode_block(const std::string &str) { this->add_gcode_block(str.c_str()); } // Calculates the time estimate from the gcode lines added using add_gcode_line() or add_gcode_block() - void calculate_time(); + // start_from_beginning: + // if set to true all blocks will be used to calculate the time estimate, + // if set to false only the blocks not yet processed will be used and the calculated time will be added to the current calculated time + void calculate_time(bool start_from_beginning); // Calculates the time estimate from the given gcode in string format void calculate_time_from_text(const std::string& gcode); From 95bd2bb8f978a7573a68cbb0094f075f3c47d6cc Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Fri, 20 Jul 2018 15:54:11 +0200 Subject: [PATCH 172/198] Faster time estimate for multimaterial --- xs/src/libslic3r/GCodeTimeEstimator.cpp | 38 ++++++++----------------- xs/src/libslic3r/GCodeTimeEstimator.hpp | 6 ++-- 2 files changed, 14 insertions(+), 30 deletions(-) diff --git a/xs/src/libslic3r/GCodeTimeEstimator.cpp b/xs/src/libslic3r/GCodeTimeEstimator.cpp index 2b4d89b3d..f8360688b 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.cpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.cpp @@ -79,7 +79,6 @@ namespace Slic3r { } GCodeTimeEstimator::Block::Block() - : st_synchronized(false) { } @@ -202,7 +201,7 @@ namespace Slic3r { if (start_from_beginning) { _reset_time(); - _set_blocks_st_synchronize(false); + _last_st_synchronized_block_id = -1; } _calculate_time(); @@ -614,6 +613,8 @@ namespace Slic3r { reset_g1_line_id(); _g1_line_ids.clear(); + + _last_st_synchronized_block_id = -1; } void GCodeTimeEstimator::_reset_time() @@ -626,14 +627,6 @@ namespace Slic3r { _blocks.clear(); } - void GCodeTimeEstimator::_set_blocks_st_synchronize(bool state) - { - for (Block& block : _blocks) - { - block.st_synchronized = state; - } - } - void GCodeTimeEstimator::_calculate_time() { _forward_pass(); @@ -642,10 +635,9 @@ namespace Slic3r { _time += get_additional_time(); - for (Block& block : _blocks) + for (int i = _last_st_synchronized_block_id + 1; i < (int)_blocks.size(); ++i) { - if (block.st_synchronized) - continue; + Block& block = _blocks[i]; #if ENABLE_MOVE_STATS float block_time = 0.0f; @@ -668,6 +660,8 @@ namespace Slic3r { block.elapsed_time = _time; #endif // ENABLE_MOVE_STATS } + + _last_st_synchronized_block_id = _blocks.size() - 1; } void GCodeTimeEstimator::_process_gcode_line(GCodeReader&, const GCodeReader::GCodeLine& line) @@ -1210,18 +1204,14 @@ namespace Slic3r { void GCodeTimeEstimator::_simulate_st_synchronize() { _calculate_time(); - _set_blocks_st_synchronize(true); } void GCodeTimeEstimator::_forward_pass() { if (_blocks.size() > 1) { - for (unsigned int i = 0; i < (unsigned int)_blocks.size() - 1; ++i) - { - if (_blocks[i].st_synchronized || _blocks[i + 1].st_synchronized) - continue; - + for (int i = _last_st_synchronized_block_id + 1; i < (int)_blocks.size() - 1; ++i) + { _planner_forward_pass_kernel(_blocks[i], _blocks[i + 1]); } } @@ -1231,11 +1221,8 @@ namespace Slic3r { { if (_blocks.size() > 1) { - for (int i = (int)_blocks.size() - 1; i >= 1; --i) + for (int i = (int)_blocks.size() - 1; i >= _last_st_synchronized_block_id + 2; --i) { - if (_blocks[i - 1].st_synchronized || _blocks[i].st_synchronized) - continue; - _planner_reverse_pass_kernel(_blocks[i - 1], _blocks[i]); } } @@ -1286,10 +1273,9 @@ namespace Slic3r { Block* curr = nullptr; Block* next = nullptr; - for (Block& b : _blocks) + for (int i = _last_st_synchronized_block_id + 1; i < (int)_blocks.size(); ++i) { - if (b.st_synchronized) - continue; + Block& b = _blocks[i]; curr = next; next = &b; diff --git a/xs/src/libslic3r/GCodeTimeEstimator.hpp b/xs/src/libslic3r/GCodeTimeEstimator.hpp index 7e0cb4442..2dfefda0b 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.hpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.hpp @@ -144,8 +144,6 @@ namespace Slic3r { Trapezoid trapezoid; float elapsed_time; - bool st_synchronized; - Block(); // Returns the length of the move covered by this block, in mm @@ -211,6 +209,8 @@ namespace Slic3r { BlocksList _blocks; // Map between g1 line id and blocks id, used to speed up export of remaining times G1LineIdToBlockIdMap _g1_line_ids; + // Index of the last block already st_synchronized + int _last_st_synchronized_block_id; float _time; // s #if ENABLE_MOVE_STATS @@ -323,8 +323,6 @@ namespace Slic3r { void _reset_time(); void _reset_blocks(); - void _set_blocks_st_synchronize(bool state); - // Calculates the time estimate void _calculate_time(); From 167060e4702609c135dae3d7943c32c108d9dd2d Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Fri, 20 Jul 2018 16:14:23 +0200 Subject: [PATCH 173/198] Added some profilling macros into GCodeTimeEstimator --- xs/src/Shiny/ShinyPrereqs.h | 3 +++ xs/src/Shiny/ShinyTools.c | 5 ++++- xs/src/libslic3r/GCodeTimeEstimator.cpp | 27 +++++++++++++++++++++++++ xs/src/libslic3r/PrintObject.cpp | 4 ++-- 4 files changed, 36 insertions(+), 3 deletions(-) diff --git a/xs/src/Shiny/ShinyPrereqs.h b/xs/src/Shiny/ShinyPrereqs.h index a392515c7..5a3044dbc 100644 --- a/xs/src/Shiny/ShinyPrereqs.h +++ b/xs/src/Shiny/ShinyPrereqs.h @@ -25,6 +25,9 @@ THE SOFTWARE. #ifndef SHINY_PREREQS_H #define SHINY_PREREQS_H + +#include + /*---------------------------------------------------------------------------*/ #ifndef FALSE diff --git a/xs/src/Shiny/ShinyTools.c b/xs/src/Shiny/ShinyTools.c index bfc0bcdf5..4058e2285 100644 --- a/xs/src/Shiny/ShinyTools.c +++ b/xs/src/Shiny/ShinyTools.c @@ -93,8 +93,11 @@ float ShinyGetTickInvFreq(void) { #elif SHINY_PLATFORM == SHINY_PLATFORM_POSIX +//#include +//#include + void ShinyGetTicks(shinytick_t *p) { - timeval time; + struct timeval time; gettimeofday(&time, NULL); *p = time.tv_sec * 1000000 + time.tv_usec; diff --git a/xs/src/libslic3r/GCodeTimeEstimator.cpp b/xs/src/libslic3r/GCodeTimeEstimator.cpp index f8360688b..5543b5cc9 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.cpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.cpp @@ -486,6 +486,7 @@ namespace Slic3r { GCodeFlavor GCodeTimeEstimator::get_dialect() const { + PROFILE_FUNC(); return _state.dialect; } @@ -536,6 +537,7 @@ namespace Slic3r { void GCodeTimeEstimator::add_additional_time(float timeSec) { + PROFILE_FUNC(); _state.additional_time += timeSec; } @@ -627,8 +629,10 @@ namespace Slic3r { _blocks.clear(); } + void GCodeTimeEstimator::_calculate_time() { + PROFILE_FUNC(); _forward_pass(); _reverse_pass(); _recalculate_trapezoids(); @@ -797,6 +801,7 @@ namespace Slic3r { void GCodeTimeEstimator::_processG1(const GCodeReader::GCodeLine& line) { + PROFILE_FUNC(); increment_g1_line_id(); // updates axes positions from line @@ -994,6 +999,7 @@ namespace Slic3r { void GCodeTimeEstimator::_processG4(const GCodeReader::GCodeLine& line) { + PROFILE_FUNC(); GCodeFlavor dialect = get_dialect(); float value; @@ -1015,31 +1021,37 @@ namespace Slic3r { void GCodeTimeEstimator::_processG20(const GCodeReader::GCodeLine& line) { + PROFILE_FUNC(); set_units(Inches); } void GCodeTimeEstimator::_processG21(const GCodeReader::GCodeLine& line) { + PROFILE_FUNC(); set_units(Millimeters); } void GCodeTimeEstimator::_processG28(const GCodeReader::GCodeLine& line) { + PROFILE_FUNC(); // TODO } void GCodeTimeEstimator::_processG90(const GCodeReader::GCodeLine& line) { + PROFILE_FUNC(); set_global_positioning_type(Absolute); } void GCodeTimeEstimator::_processG91(const GCodeReader::GCodeLine& line) { + PROFILE_FUNC(); set_global_positioning_type(Relative); } void GCodeTimeEstimator::_processG92(const GCodeReader::GCodeLine& line) { + PROFILE_FUNC(); float lengthsScaleFactor = (get_units() == Inches) ? INCHES_TO_MM : 1.0f; bool anyFound = false; @@ -1080,26 +1092,31 @@ namespace Slic3r { void GCodeTimeEstimator::_processM1(const GCodeReader::GCodeLine& line) { + PROFILE_FUNC(); _simulate_st_synchronize(); } void GCodeTimeEstimator::_processM82(const GCodeReader::GCodeLine& line) { + PROFILE_FUNC(); set_e_local_positioning_type(Absolute); } void GCodeTimeEstimator::_processM83(const GCodeReader::GCodeLine& line) { + PROFILE_FUNC(); set_e_local_positioning_type(Relative); } void GCodeTimeEstimator::_processM109(const GCodeReader::GCodeLine& line) { + PROFILE_FUNC(); // TODO } void GCodeTimeEstimator::_processM201(const GCodeReader::GCodeLine& line) { + PROFILE_FUNC(); GCodeFlavor dialect = get_dialect(); // see http://reprap.org/wiki/G-code#M201:_Set_max_printing_acceleration @@ -1120,6 +1137,7 @@ namespace Slic3r { void GCodeTimeEstimator::_processM203(const GCodeReader::GCodeLine& line) { + PROFILE_FUNC(); GCodeFlavor dialect = get_dialect(); // see http://reprap.org/wiki/G-code#M203:_Set_maximum_feedrate @@ -1144,6 +1162,7 @@ namespace Slic3r { void GCodeTimeEstimator::_processM204(const GCodeReader::GCodeLine& line) { + PROFILE_FUNC(); float value; if (line.has_value('S', value)) set_acceleration(value); @@ -1154,6 +1173,7 @@ namespace Slic3r { void GCodeTimeEstimator::_processM205(const GCodeReader::GCodeLine& line) { + PROFILE_FUNC(); if (line.has_x()) { float max_jerk = line.x(); @@ -1180,6 +1200,7 @@ namespace Slic3r { void GCodeTimeEstimator::_processM221(const GCodeReader::GCodeLine& line) { + PROFILE_FUNC(); float value_s; float value_t; if (line.has_value('S', value_s) && !line.has_value('T', value_t)) @@ -1188,6 +1209,7 @@ namespace Slic3r { void GCodeTimeEstimator::_processM566(const GCodeReader::GCodeLine& line) { + PROFILE_FUNC(); if (line.has_x()) set_axis_max_jerk(X, line.x() * MMMIN_TO_MMSEC); @@ -1203,11 +1225,13 @@ namespace Slic3r { void GCodeTimeEstimator::_simulate_st_synchronize() { + PROFILE_FUNC(); _calculate_time(); } void GCodeTimeEstimator::_forward_pass() { + PROFILE_FUNC(); if (_blocks.size() > 1) { for (int i = _last_st_synchronized_block_id + 1; i < (int)_blocks.size() - 1; ++i) @@ -1219,6 +1243,7 @@ namespace Slic3r { void GCodeTimeEstimator::_reverse_pass() { + PROFILE_FUNC(); if (_blocks.size() > 1) { for (int i = (int)_blocks.size() - 1; i >= _last_st_synchronized_block_id + 2; --i) @@ -1230,6 +1255,7 @@ namespace Slic3r { void GCodeTimeEstimator::_planner_forward_pass_kernel(Block& prev, Block& curr) { + PROFILE_FUNC(); // If the previous block is an acceleration block, but it is not long enough to complete the // full speed change within the block, we need to adjust the entry speed accordingly. Entry // speeds have already been reset, maximized, and reverse planned by reverse planner. @@ -1270,6 +1296,7 @@ namespace Slic3r { void GCodeTimeEstimator::_recalculate_trapezoids() { + PROFILE_FUNC(); Block* curr = nullptr; Block* next = nullptr; diff --git a/xs/src/libslic3r/PrintObject.cpp b/xs/src/libslic3r/PrintObject.cpp index 8888da76d..47495dad8 100644 --- a/xs/src/libslic3r/PrintObject.cpp +++ b/xs/src/libslic3r/PrintObject.cpp @@ -1183,8 +1183,8 @@ void PrintObject::_slice() this->typed_slices = false; -#if 0 - // Disable parallelization for debugging purposes. +#ifdef SLIC3R_PROFILE + // Disable parallelization so the Shiny profiler works static tbb::task_scheduler_init *tbb_init = nullptr; tbb_init = new tbb::task_scheduler_init(1); #endif From e19a74865b3d318f7001053a989f0a251d9890f6 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Fri, 20 Jul 2018 17:57:21 +0200 Subject: [PATCH 174/198] Bumped up the version number. --- xs/src/libslic3r/libslic3r.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/src/libslic3r/libslic3r.h b/xs/src/libslic3r/libslic3r.h index e81b0c8af..4e309fdaf 100644 --- a/xs/src/libslic3r/libslic3r.h +++ b/xs/src/libslic3r/libslic3r.h @@ -14,7 +14,7 @@ #include #define SLIC3R_FORK_NAME "Slic3r Prusa Edition" -#define SLIC3R_VERSION "1.41.0-alpha" +#define SLIC3R_VERSION "1.41.0-alpha1" #define SLIC3R_BUILD "UNKNOWN" typedef int32_t coord_t; From 88bf7c852cc25fb4573950e21370143024103f31 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Sat, 21 Jul 2018 09:32:45 +0200 Subject: [PATCH 175/198] Fixed upgrade of vendor profile from the application resources after an upgrade of the application. --- lib/Slic3r/GUI.pm | 3 ++- xs/src/slic3r/Utils/PresetUpdater.cpp | 21 ++++++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/lib/Slic3r/GUI.pm b/lib/Slic3r/GUI.pm index 80130fefe..cbfe0e5fe 100644 --- a/lib/Slic3r/GUI.pm +++ b/lib/Slic3r/GUI.pm @@ -169,7 +169,8 @@ sub OnInit { $self->update_ui_from_settings; }); - # The following event is emited by PresetUpdater (C++) + # The following event is emited by PresetUpdater (C++) to inform about + # the newer Slic3r application version avaiable online. EVT_COMMAND($self, -1, $VERSION_ONLINE_EVENT, sub { my ($self, $event) = @_; my $version = $event->GetString; diff --git a/xs/src/slic3r/Utils/PresetUpdater.cpp b/xs/src/slic3r/Utils/PresetUpdater.cpp index 1ce814b89..7ed963a16 100644 --- a/xs/src/slic3r/Utils/PresetUpdater.cpp +++ b/xs/src/slic3r/Utils/PresetUpdater.cpp @@ -326,6 +326,8 @@ Updates PresetUpdater::priv::get_config_updates() const continue; } + // Getting a recommended version from the latest index, wich may have been downloaded + // from the internet, or installed / updated from the installation resources. const auto recommended = idx.recommended(); if (recommended == idx.end()) { BOOST_LOG_TRIVIAL(error) << boost::format("No recommended version for vendor: %1%, invalid index?") % idx.vendor(); @@ -353,25 +355,34 @@ Updates PresetUpdater::priv::get_config_updates() const } auto path_src = cache_path / (idx.vendor() + ".ini"); + auto path_in_rsrc = rsrc_path / (idx.vendor() + ".ini"); if (! fs::exists(path_src)) { - auto path_in_rsrc = rsrc_path / (idx.vendor() + ".ini"); if (! fs::exists(path_in_rsrc)) { BOOST_LOG_TRIVIAL(warning) << boost::format("Index for vendor %1% indicates update, but bundle found in neither cache nor resources") - % idx.vendor();; + % idx.vendor(); continue; } else { path_src = std::move(path_in_rsrc); + path_in_rsrc.clear(); } } - const auto new_vp = VendorProfile::from_ini(path_src, false); + auto new_vp = VendorProfile::from_ini(path_src, false); + bool found = false; if (new_vp.config_version == recommended->config_version) { updates.updates.emplace_back(std::move(path_src), std::move(bundle_path), *recommended); - } else { + found = true; + } else if (! path_in_rsrc.empty() && fs::exists(path_in_rsrc)) { + new_vp = VendorProfile::from_ini(path_in_rsrc, false); + if (new_vp.config_version == recommended->config_version) { + updates.updates.emplace_back(std::move(path_in_rsrc), std::move(bundle_path), *recommended); + found = true; + } + } + if (! found) BOOST_LOG_TRIVIAL(warning) << boost::format("Index for vendor %1% indicates update (%2%) but the new bundle was found neither in cache nor resources") % idx.vendor() % recommended->config_version.to_string(); - } } } From 109b6fb79cef1f85004b6518fe656161040f1f8f Mon Sep 17 00:00:00 2001 From: bubnikv Date: Sat, 21 Jul 2018 15:46:54 +0200 Subject: [PATCH 176/198] Added the MK3 MMU2 printer into the profiles, added an image of the MK3 MMU2 to the wizard. --- .../icons/printers/PrusaResearch_MK3SMM.png | Bin 0 -> 41571 bytes resources/profiles/PrusaResearch.idx | 1 + resources/profiles/PrusaResearch.ini | 96 +++++++++++++++--- 3 files changed, 85 insertions(+), 12 deletions(-) create mode 100644 resources/icons/printers/PrusaResearch_MK3SMM.png diff --git a/resources/icons/printers/PrusaResearch_MK3SMM.png b/resources/icons/printers/PrusaResearch_MK3SMM.png new file mode 100644 index 0000000000000000000000000000000000000000..1068bfc105f02d13e374764352e61ce76087ecb0 GIT binary patch literal 41571 zcmb??Wm6p8^Y$Xag1ZHGhs8ZO1cELEhXodbOK=O2;BH~j8;8X`I3&3226qkaPVk5S zi{CeRPSu%fs(NZ_PS@$~Io(%BX?;}2!J@t6xw zi_S;gS9~4LCFn`7fa$7Y=m7xW_Wj>PO5?<(0s!a$stWJ*e6o)^eN&lLJ$LR_93Uqy zaZ&<|w^jA&m2m~K#44fSl==5`M%<`!Q`FpzCGE^PVzz=hZ?E~nlqe_AxxciOG+mb@ zWiZxZHKBs0k%_fF%qBNMKqnupk49r|bKA34{C5+6=>4z@ft8J6YYm?EMV(!4wq{9P zoH8t zyW+iebadora7HV-mcJ?Ly57^i_H-iB^?XhA_b(`V7oL*^g_e&9ST9WPjO!XV14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q8q}KeB)NAUL<-|vod+qbB?lr85(9E73t_MU36^IDGB`6N z$y!)Q7*r^VfA(VgAN`ZdH+4h4vDVFPYD#8P!?X?8+gx<`+LY^SnTPL~OQxZ?p(~ah zFL_!LS@z=<$HRh`rMKe3dS6z3e<KQi>F$CfW1I)uf zB_IG9JR?SnN;7TU(*OD8_ua;;*3I=C|7KR!`YD+Q%tOyh&aH?nds%k8!fC0bC9lIW zEu*NsTlIdatd~n#?p4cu*Ocj*YqLi-n_oGXp1$!7&%k(py=P0%jbVF#y}#aH@2~gQ n`|JJn{(67CzusSe{MP>ufr-YxM_?Xg00000NkvXXu0mjfvy{%t literal 0 HcmV?d00001 diff --git a/resources/profiles/PrusaResearch.idx b/resources/profiles/PrusaResearch.idx index d050ef39c..8b8e8951e 100644 --- a/resources/profiles/PrusaResearch.idx +++ b/resources/profiles/PrusaResearch.idx @@ -1,4 +1,5 @@ min_slic3r_version = 1.41.0-alpha +0.2.0-alpha1 0.2.0-alpha min_slic3r_version = 1.40.0 0.1.6 Split the MK2.5 profile from the MK2S diff --git a/resources/profiles/PrusaResearch.ini b/resources/profiles/PrusaResearch.ini index 7e2c78377..2f0761d15 100644 --- a/resources/profiles/PrusaResearch.ini +++ b/resources/profiles/PrusaResearch.ini @@ -5,7 +5,7 @@ name = Prusa Research # Configuration version of this file. Config file will only be installed, if the config_version differs. # This means, the server may force the Slic3r configuration to be downgraded. -config_version = 0.2.0-alpha +config_version = 0.2.0-alpha1 # Where to get the updates from? config_update_url = https://raw.githubusercontent.com/prusa3d/Slic3r-settings/master/live/PrusaResearch/ @@ -30,6 +30,10 @@ variants = 0.4; 0.25; 0.6 name = Original Prusa i3 MK2SMM variants = 0.4; 0.6 +[printer_model:MK3SMM] +name = Original Prusa i3 MK3SMM +variants = 0.4 + # All presets starting with asterisk, for example *common*, are intermediate and they will # not make it into the user interface. @@ -207,7 +211,7 @@ infill_extrusion_width = 0.5 [print:0.05mm ULTRADETAIL MK3] inherits = *0.05mm* -compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and nozzle_diameter[0]==0.4 +compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and nozzle_diameter[0]==0.4 and ! single_extruder_multi_material fill_pattern = grid top_infill_extrusion_width = 0.4 @@ -252,7 +256,7 @@ solid_infill_speed = 50 [print:0.10mm DETAIL MK3] inherits = *0.10mm* bridge_speed = 30 -compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and nozzle_diameter[0]==0.4 +compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and nozzle_diameter[0]==0.4 and ! single_extruder_multi_material external_perimeter_speed = 35 fill_pattern = grid infill_acceleration = 1500 @@ -358,7 +362,7 @@ compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and [print:0.15mm OPTIMAL MK3] inherits = *0.15mm* bridge_speed = 30 -compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and nozzle_diameter[0]==0.4 +compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and nozzle_diameter[0]==0.4 and ! single_extruder_multi_material external_perimeter_speed = 35 fill_pattern = grid infill_acceleration = 1500 @@ -426,6 +430,32 @@ perimeter_speed = 45 solid_infill_speed = 200 top_solid_infill_speed = 50 +[print:0.15mm OPTIMAL MK3 MMU2] +inherits = 0.15mm OPTIMAL MK3 +compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and single_extruder_multi_material +bottom_solid_layers = 4 +external_perimeter_speed = 40 +fill_density = 10% +infill_overlap = 15% +perimeter_speed = 60 +small_perimeter_speed = 20 +support_material_threshold = 20 +top_solid_layers = 5 + +[print:0.20mm FAST MK3 MMU2] +inherits = 0.20mm FAST MK3 +compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and single_extruder_multi_material +bridge_flow_ratio = 0.8 +external_perimeter_speed = 40 +fill_density = 15% +infill_overlap = 35% +infill_speed = 150 +perimeter_speed = 50 +small_perimeter_speed = 20 +solid_infill_speed = 150 +wipe_tower_x = 169 +wipe_tower_y = 137 + # XXXXXXXXXXXXXXXXXXXX # XXX--- 0.20mm ---XXX # XXXXXXXXXXXXXXXXXXXX @@ -445,7 +475,7 @@ top_solid_infill_speed = 70 [print:0.20mm FAST MK3] inherits = *0.20mm* bridge_speed = 30 -compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and nozzle_diameter[0]==0.4 +compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and nozzle_diameter[0]==0.4 and ! single_extruder_multi_material external_perimeter_speed = 35 fill_pattern = grid infill_acceleration = 1500 @@ -552,7 +582,8 @@ support_material_xy_spacing = 150% [filament:*common*] cooling = 1 compatible_printers = -compatible_printers_condition = +# For now, all but selected filaments are disabled for the MMU 2.0 +compatible_printers_condition = ! (printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and single_extruder_multi_material) end_filament_gcode = "; Filament-specific end gcode" extrusion_multiplier = 1 filament_loading_speed = 28 @@ -624,7 +655,8 @@ temperature = 255 inherits = *common* bed_temperature = 50 bridge_fan_speed = 100 -compatible_printers_condition = nozzle_diameter[0]>0.35 and num_extruders==1 +# For now, all but selected filaments are disabled for the MMU 2.0 +compatible_printers_condition = nozzle_diameter[0]>0.35 and num_extruders==1 && ! (printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and single_extruder_multi_material) cooling = 0 disable_fan_first_layers = 1 extrusion_multiplier = 1.2 @@ -642,7 +674,8 @@ temperature = 240 [filament:ColorFabb Brass Bronze] inherits = *PLA* -compatible_printers_condition = nozzle_diameter[0]>0.35 +# For now, all but selected filaments are disabled for the MMU 2.0 +compatible_printers_condition = nozzle_diameter[0]>0.35 and ! (printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and single_extruder_multi_material) extrusion_multiplier = 1.2 filament_colour = #804040 filament_max_volumetric_speed = 10 @@ -667,7 +700,8 @@ inherits = *PLA* [filament:ColorFabb Woodfil] inherits = *PLA* -compatible_printers_condition = nozzle_diameter[0]>0.35 +# For now, all but selected filaments are disabled for the MMU 2.0 +compatible_printers_condition = nozzle_diameter[0]>0.35 and ! (printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and single_extruder_multi_material) extrusion_multiplier = 1.2 filament_colour = #804040 filament_max_volumetric_speed = 10 @@ -748,7 +782,8 @@ temperature = 275 [filament:Fillamentum Timberfil] inherits = *PLA* -compatible_printers_condition = nozzle_diameter[0]>0.35 +# For now, all but selected filaments are disabled for the MMU 2.0 +compatible_printers_condition = nozzle_diameter[0]>0.35 and ! (printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and single_extruder_multi_material) extrusion_multiplier = 1.2 filament_colour = #804040 filament_max_volumetric_speed = 10 @@ -818,6 +853,17 @@ filament_notes = "List of manufacturers tested with standart PET print settings inherits = *PLA* filament_notes = "List of materials tested with standart PLA print settings for MK2:\n\nDas Filament\nEsun PLA\nEUMAKERS PLA\nFiberlogy HD-PLA\nFillamentum PLA\nFloreon3D\nHatchbox PLA\nPlasty Mladeč PLA\nPrimavalue PLA\nProto pasta Matte Fiber\nVerbatim PLA\nVerbatim BVOH" +[filament:Prusa PLA MMU2] +inherits = Prusa PLA +compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and single_extruder_multi_material +filament_cooling_final_speed = 50 +filament_cooling_initial_speed = 10 +filament_cooling_moves = 7 +filament_loading_speed = 14 +filament_ramming_parameters = "120 110 4.03226 4.12903 4.25806 4.41935 4.58065 4.80645 5.35484 6.29032 7.58065 9.09677 10.5806 11.8387 12.6452 12.9677| 0.05 4.01935 0.45 4.15483 0.95 4.50968 1.45 4.94516 1.95 6.79677 2.45 9.87102 2.95 12.4388 3.45 13.0839 3.95 7.6 4.45 7.6 4.95 7.6" +min_fan_speed = 85 +slowdown_below_layer_time = 10 + [filament:SemiFlex or Flexfill 98A] inherits = *FLEX* @@ -979,7 +1025,6 @@ end_gcode = G1 E-4 F2100.00000\nG91\nG1 Z1 F7200.000\nG90\nG1 X245 Y1\nG1 X240 E printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK2\nPRINTER_HAS_BOWDEN start_gcode = M115 U3.1.0 ; tell printer latest fw version\n; Start G-Code sequence START\nT?\nM104 S[first_layer_temperature]\nM140 S[first_layer_bed_temperature]\nM109 S[first_layer_temperature]\nM190 S[first_layer_bed_temperature]\nG21 ; set units to millimeters\nG90 ; use absolute coordinates\nM83 ; use relative distances for extrusion\nG28 W\nG80\nG92 E0.0\nM203 E100\nM92 E140\nG1 Z0.250 F7200.000\nG1 X50.0 E80.0 F1000.0\nG1 X160.0 E20.0 F1000.0\nG1 Z0.200 F7200.000\nG1 X220.0 E13 F1000.0\nG1 X240.0 E0 F1000.0\nG1 E-4 F1000.0\nG92 E0.0 default_print_profile = 0.15mm OPTIMAL -default_filament_profile = Prusa PLA [printer:*mm-multi*] inherits = *multimaterial* @@ -990,7 +1035,6 @@ printer_notes = Don't remove the following keywords! These keywords are used in start_gcode = M115 U3.1.0 ; tell printer latest fw version\n; Start G-Code sequence START\nT[initial_tool]\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG21 ; set units to millimeters\nG90 ; use absolute coordinates\nM83 ; use relative distances for extrusion\nG28 W\nG80\nG92 E0.0\nM203 E100 ; set max feedrate\nM92 E140 ; E-steps per filament milimeter\n{if not has_wipe_tower}\nG1 Z0.250 F7200.000\nG1 X50.0 E80.0 F1000.0\nG1 X160.0 E20.0 F1000.0\nG1 Z0.200 F7200.000\nG1 X220.0 E13 F1000.0\nG1 X240.0 E0 F1000.0\nG1 E-4 F1000.0\n{endif}\nG92 E0.0 variable_layer_height = 0 default_print_profile = 0.15mm OPTIMAL -default_filament_profile = Prusa PLA # XXXXXXXXXXXXXXXXX # XXX--- MK2 ---XXX @@ -1107,6 +1151,34 @@ min_layer_height = 0.1 printer_variant = 0.6 default_print_profile = 0.15mm OPTIMAL 0.6 nozzle MK3 +[printer:*mm2*] +inherits = Original Prusa i3 MK3 +single_extruder_multi_material = 1 +max_print_height = 200 +cooling_tube_length = 10 +cooling_tube_retraction = 30 +parking_pos_retraction = 85 +retract_length_toolchange = 3 +extra_loading_move = -13 +printer_model = MK3SMM +default_print_profile = 0.15mm OPTIMAL MK3 MMU2 +default_filament_profile = Prusa PLA MMU2 + +[printer:Original Prusa i3 MK3 MMU2 Single] +inherits = *mm2* +start_gcode = M107\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\nG21 ; set units to millimeters\n\n ; go outside print area\nG1 Y-3.0 F1000.0 \nG1 Z0.4 F1000\n; select extruder\nT?\n; initial load\nG1 X50 E15 F1073\nG1 X100 E10 F2000\nG1 Z0.3 F1000\n\nG92 E0.0\nG1 X240.0 E15.0 F2400.0 \nG1 Y-2.0 F1000.0\nG1 X100.0 E10 F1400.0 \nG1 Z0.20 F1000\nG1 X0.0 E4 F1000.0\n\nG92 E0.0\nM221 S{if layer_height<0.075}100{else}95{endif}\nG90 ; use absolute coordinates\nM83 ; use relative distances for extrusion\nG92 E0.0\n +end_gcode = G1 X0 Y210 F7200\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15.0000 F5800\nG1 E-20.0000 F5500\nG1 E10.0000 F3000\nG1 E-10.0000 F3100\nG1 E10.0000 F3150\nG1 E-10.0000 F3250\nG1 E10.0000 F3300\n\nM702 C\n\nG4 ; wait\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y200; home X axis\nM84 ; disable motors + +[printer:Original Prusa i3 MK3 MMU2] +inherits = *mm2* +# The 5x nozzle diameter defines the number of extruders. Other extruder parameters +# (for example the retract values) are duplicaed from the first value, so they do not need +# to be defined explicitely. +nozzle_diameter = 0.4,0.4,0.4,0.4,0.4 +extruder_colour = #FFFF00;#FFFFFF;#804040;#0000FF;#C0C0C0 +start_gcode = M107\n\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\nG21 ; set units to millimeters\nG90 ; use absolute coordinates\nM83 ; use relative distances for extrusion\nG92 E0.0\n +end_gcode = G1 E-15.0000 F3000\n\nM702 C\n\nG4 ; wait\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y200; home X axis\nM84 ; disable motors + # The obsolete presets will be removed when upgrading from the legacy configuration structure (up to Slic3r 1.39.2) to 1.40.0 and newer. [obsolete_presets] print="0.05mm DETAIL 0.25 nozzle";"0.05mm DETAIL MK3";"0.05mm DETAIL";"0.20mm NORMAL MK3";"0.35mm FAST MK3" From 68cd51435f2e5b830156534a144efe64bc019b7d Mon Sep 17 00:00:00 2001 From: bubnikv Date: Sat, 21 Jul 2018 17:39:26 +0200 Subject: [PATCH 177/198] Bumped up the version number. --- xs/src/libslic3r/libslic3r.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/src/libslic3r/libslic3r.h b/xs/src/libslic3r/libslic3r.h index 4e309fdaf..77006cebe 100644 --- a/xs/src/libslic3r/libslic3r.h +++ b/xs/src/libslic3r/libslic3r.h @@ -14,7 +14,7 @@ #include #define SLIC3R_FORK_NAME "Slic3r Prusa Edition" -#define SLIC3R_VERSION "1.41.0-alpha1" +#define SLIC3R_VERSION "1.41.0-alpha2" #define SLIC3R_BUILD "UNKNOWN" typedef int32_t coord_t; From 86caf83721870c41425e27e9165d38ba05381627 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Mon, 23 Jul 2018 08:57:00 +0200 Subject: [PATCH 178/198] Update objects' list after scaling using gizmo --- lib/Slic3r/GUI/Plater.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 4a56ce632..22b887baf 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -127,6 +127,8 @@ sub new { $range->[1] *= $variation; } $_->set_scaling_factor($scale) for @{ $model_object->instances }; + + $self->{list}->SetItem($obj_idx, 2, ($model_object->instances->[0]->scaling_factor * 100) . "%"); $object->transform_thumbnail($self->{model}, $obj_idx); #update print and start background processing From a0096cf563e5830b49a647c79c01ad3cc4195422 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Mon, 23 Jul 2018 09:42:02 +0200 Subject: [PATCH 179/198] Renamed the key MK3SMMU to MK3MMU2, added a generic PLA MMU2 material. --- ...ch_MK3SMM.png => PrusaResearch_MK3MM2.png} | Bin resources/profiles/PrusaResearch.idx | 1 + resources/profiles/PrusaResearch.ini | 23 ++++++++++++------ 3 files changed, 16 insertions(+), 8 deletions(-) rename resources/icons/printers/{PrusaResearch_MK3SMM.png => PrusaResearch_MK3MM2.png} (100%) diff --git a/resources/icons/printers/PrusaResearch_MK3SMM.png b/resources/icons/printers/PrusaResearch_MK3MM2.png similarity index 100% rename from resources/icons/printers/PrusaResearch_MK3SMM.png rename to resources/icons/printers/PrusaResearch_MK3MM2.png diff --git a/resources/profiles/PrusaResearch.idx b/resources/profiles/PrusaResearch.idx index 8b8e8951e..bdb372d81 100644 --- a/resources/profiles/PrusaResearch.idx +++ b/resources/profiles/PrusaResearch.idx @@ -1,4 +1,5 @@ min_slic3r_version = 1.41.0-alpha +0.2.0-alpha2 0.2.0-alpha1 0.2.0-alpha min_slic3r_version = 1.40.0 diff --git a/resources/profiles/PrusaResearch.ini b/resources/profiles/PrusaResearch.ini index 2f0761d15..fe403263d 100644 --- a/resources/profiles/PrusaResearch.ini +++ b/resources/profiles/PrusaResearch.ini @@ -5,7 +5,7 @@ name = Prusa Research # Configuration version of this file. Config file will only be installed, if the config_version differs. # This means, the server may force the Slic3r configuration to be downgraded. -config_version = 0.2.0-alpha1 +config_version = 0.2.0-alpha2 # Where to get the updates from? config_update_url = https://raw.githubusercontent.com/prusa3d/Slic3r-settings/master/live/PrusaResearch/ @@ -27,11 +27,11 @@ name = Original Prusa i3 MK2.5 variants = 0.4; 0.25; 0.6 [printer_model:MK2SMM] -name = Original Prusa i3 MK2SMM +name = Original Prusa i3 MK2S Multi Material Upgrade variants = 0.4; 0.6 -[printer_model:MK3SMM] -name = Original Prusa i3 MK3SMM +[printer_model:MK3MM2] +name = Original Prusa i3 MK3 Multi Material Upgrade 2.0 variants = 0.4 # All presets starting with asterisk, for example *common*, are intermediate and they will @@ -589,6 +589,9 @@ extrusion_multiplier = 1 filament_loading_speed = 28 filament_unloading_speed = 90 filament_toolchange_delay = 0 +filament_cooling_moves = 4 +filament_cooling_initial_speed = 2.2 +filament_cooling_final_speed = 3.4 filament_ramming_parameters = "120 100 6.6 6.8 7.2 7.6 7.9 8.2 8.7 9.4 9.9 10.0| 0.05 6.6 0.45 6.8 0.95 7.8 1.45 8.3 1.95 9.7 2.45 10 2.95 7.6 3.45 7.6 3.95 7.6 4.45 7.6 4.95 7.6" filament_cost = 0 filament_density = 0 @@ -853,7 +856,7 @@ filament_notes = "List of manufacturers tested with standart PET print settings inherits = *PLA* filament_notes = "List of materials tested with standart PLA print settings for MK2:\n\nDas Filament\nEsun PLA\nEUMAKERS PLA\nFiberlogy HD-PLA\nFillamentum PLA\nFloreon3D\nHatchbox PLA\nPlasty Mladeč PLA\nPrimavalue PLA\nProto pasta Matte Fiber\nVerbatim PLA\nVerbatim BVOH" -[filament:Prusa PLA MMU2] +[filament:*PLA MMU2*] inherits = Prusa PLA compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK3.*/ and single_extruder_multi_material filament_cooling_final_speed = 50 @@ -861,8 +864,12 @@ filament_cooling_initial_speed = 10 filament_cooling_moves = 7 filament_loading_speed = 14 filament_ramming_parameters = "120 110 4.03226 4.12903 4.25806 4.41935 4.58065 4.80645 5.35484 6.29032 7.58065 9.09677 10.5806 11.8387 12.6452 12.9677| 0.05 4.01935 0.45 4.15483 0.95 4.50968 1.45 4.94516 1.95 6.79677 2.45 9.87102 2.95 12.4388 3.45 13.0839 3.95 7.6 4.45 7.6 4.95 7.6" -min_fan_speed = 85 -slowdown_below_layer_time = 10 + +[filament:Generic PLA MMU2] +inherits = *PLA MMU2* + +[filament:Prusa PLA MMU2] +inherits = *PLA MMU2* [filament:SemiFlex or Flexfill 98A] inherits = *FLEX* @@ -1160,7 +1167,7 @@ cooling_tube_retraction = 30 parking_pos_retraction = 85 retract_length_toolchange = 3 extra_loading_move = -13 -printer_model = MK3SMM +printer_model = MK3MM2 default_print_profile = 0.15mm OPTIMAL MK3 MMU2 default_filament_profile = Prusa PLA MMU2 From df36de0d355672b83c4bad3f0997f5defeb2ec9c Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Mon, 23 Jul 2018 10:16:56 +0200 Subject: [PATCH 180/198] Fixed status of Slice now and Export G-Code buttons after object import --- lib/Slic3r/GUI/Plater.pm | 3 ++- xs/src/slic3r/GUI/3DScene.cpp | 2 +- xs/src/slic3r/GUI/3DScene.hpp | 2 +- xs/src/slic3r/GUI/GLCanvas3D.cpp | 6 ++++-- xs/src/slic3r/GUI/GLCanvas3D.hpp | 2 +- xs/src/slic3r/GUI/GLCanvas3DManager.cpp | 2 +- xs/src/slic3r/GUI/GLCanvas3DManager.hpp | 2 +- xs/xsp/GUI_3DScene.xsp | 2 +- 8 files changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 22b887baf..1c590a7f7 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -2102,7 +2102,8 @@ sub object_list_changed { my $export_in_progress = $self->{export_gcode_output_file} || $self->{send_gcode_file}; my $model_fits = $self->{canvas3D} ? Slic3r::GUI::_3DScene::check_volumes_outside_state($self->{canvas3D}, $self->{config}) : 1; - my $method = ($have_objects && ! $export_in_progress && $model_fits) ? 'Enable' : 'Disable'; + # $model_fits == 1 -> ModelInstance::PVS_Partly_Outside + my $method = ($have_objects && ! $export_in_progress && ($model_fits != 1)) ? 'Enable' : 'Disable'; $self->{"btn_$_"}->$method for grep $self->{"btn_$_"}, qw(reslice export_gcode print send_gcode); } diff --git a/xs/src/slic3r/GUI/3DScene.cpp b/xs/src/slic3r/GUI/3DScene.cpp index 2ffd788eb..62659033a 100644 --- a/xs/src/slic3r/GUI/3DScene.cpp +++ b/xs/src/slic3r/GUI/3DScene.cpp @@ -1651,7 +1651,7 @@ void _3DScene::update_volumes_selection(wxGLCanvas* canvas, const std::vector& selections); - static bool check_volumes_outside_state(wxGLCanvas* canvas, const DynamicPrintConfig* config); + static int check_volumes_outside_state(wxGLCanvas* canvas, const DynamicPrintConfig* config); static bool move_volume_up(wxGLCanvas* canvas, unsigned int id); static bool move_volume_down(wxGLCanvas* canvas, unsigned int id); diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index 064a9adce..722f1c112 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -1878,9 +1878,11 @@ void GLCanvas3D::update_volumes_selection(const std::vector& selections) } } -bool GLCanvas3D::check_volumes_outside_state(const DynamicPrintConfig* config) const +int GLCanvas3D::check_volumes_outside_state(const DynamicPrintConfig* config) const { - return m_volumes.check_outside_state(config, nullptr); + ModelInstance::EPrintVolumeState state; + m_volumes.check_outside_state(config, &state); + return (int)state; } bool GLCanvas3D::move_volume_up(unsigned int id) diff --git a/xs/src/slic3r/GUI/GLCanvas3D.hpp b/xs/src/slic3r/GUI/GLCanvas3D.hpp index d18ca0cab..a9a6117ec 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.hpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.hpp @@ -495,7 +495,7 @@ public: void deselect_volumes(); void select_volume(unsigned int id); void update_volumes_selection(const std::vector& selections); - bool check_volumes_outside_state(const DynamicPrintConfig* config) const; + int check_volumes_outside_state(const DynamicPrintConfig* config) const; bool move_volume_up(unsigned int id); bool move_volume_down(unsigned int id); diff --git a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp index 23a8f4c15..5e9048d54 100644 --- a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp @@ -237,7 +237,7 @@ void GLCanvas3DManager::update_volumes_selection(wxGLCanvas* canvas, const std:: it->second->update_volumes_selection(selections); } -bool GLCanvas3DManager::check_volumes_outside_state(wxGLCanvas* canvas, const DynamicPrintConfig* config) const +int GLCanvas3DManager::check_volumes_outside_state(wxGLCanvas* canvas, const DynamicPrintConfig* config) const { CanvasesMap::const_iterator it = _get_canvas(canvas); return (it != m_canvases.end()) ? it->second->check_volumes_outside_state(config) : false; diff --git a/xs/src/slic3r/GUI/GLCanvas3DManager.hpp b/xs/src/slic3r/GUI/GLCanvas3DManager.hpp index 98205982f..32aa712d3 100644 --- a/xs/src/slic3r/GUI/GLCanvas3DManager.hpp +++ b/xs/src/slic3r/GUI/GLCanvas3DManager.hpp @@ -75,7 +75,7 @@ public: void deselect_volumes(wxGLCanvas* canvas); void select_volume(wxGLCanvas* canvas, unsigned int id); void update_volumes_selection(wxGLCanvas* canvas, const std::vector& selections); - bool check_volumes_outside_state(wxGLCanvas* canvas, const DynamicPrintConfig* config) const; + int check_volumes_outside_state(wxGLCanvas* canvas, const DynamicPrintConfig* config) const; bool move_volume_up(wxGLCanvas* canvas, unsigned int id); bool move_volume_down(wxGLCanvas* canvas, unsigned int id); diff --git a/xs/xsp/GUI_3DScene.xsp b/xs/xsp/GUI_3DScene.xsp index 38c85c328..5c2f7df85 100644 --- a/xs/xsp/GUI_3DScene.xsp +++ b/xs/xsp/GUI_3DScene.xsp @@ -230,7 +230,7 @@ update_volumes_selection(canvas, selections) CODE: _3DScene::update_volumes_selection((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), selections); -bool +int check_volumes_outside_state(canvas, config) SV *canvas; DynamicPrintConfig *config; From 33175a02f37b588654ce7fe294b38863072e9aa5 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Mon, 23 Jul 2018 10:58:39 +0200 Subject: [PATCH 181/198] Added xml escape characters detection when exporting object and columes names to amf files --- xs/src/libslic3r/Format/AMF.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xs/src/libslic3r/Format/AMF.cpp b/xs/src/libslic3r/Format/AMF.cpp index 21d4b4d3b..be513166e 100644 --- a/xs/src/libslic3r/Format/AMF.cpp +++ b/xs/src/libslic3r/Format/AMF.cpp @@ -761,7 +761,7 @@ bool store_amf(const char *path, Model *model, Print* print, bool export_print_c for (const std::string &key : object->config.keys()) stream << " " << object->config.serialize(key) << "\n"; if (!object->name.empty()) - stream << " " << object->name << "\n"; + stream << " " << xml_escape(object->name) << "\n"; std::vector layer_height_profile = object->layer_height_profile_valid ? object->layer_height_profile : std::vector(); if (layer_height_profile.size() >= 4 && (layer_height_profile.size() % 2) == 0) { // Store the layer height profile as a single semicolon separated list. @@ -805,7 +805,7 @@ bool store_amf(const char *path, Model *model, Print* print, bool export_print_c for (const std::string &key : volume->config.keys()) stream << " " << volume->config.serialize(key) << "\n"; if (!volume->name.empty()) - stream << " " << volume->name << "\n"; + stream << " " << xml_escape(volume->name) << "\n"; if (volume->modifier) stream << " 1\n"; for (int i = 0; i < volume->mesh.stl.stats.number_of_facets; ++i) { From abe7a71f85d28ed4561ad357a3d59cae39f0eb1c Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Mon, 23 Jul 2018 11:43:06 +0200 Subject: [PATCH 182/198] ConfigWizard: Wrap printer model titles --- xs/src/slic3r/GUI/ConfigWizard.cpp | 37 ++++++++++++++-------- xs/src/slic3r/GUI/ConfigWizard_private.hpp | 1 + 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/xs/src/slic3r/GUI/ConfigWizard.cpp b/xs/src/slic3r/GUI/ConfigWizard.cpp index 2e315a70b..0c42168bb 100644 --- a/xs/src/slic3r/GUI/ConfigWizard.cpp +++ b/xs/src/slic3r/GUI/ConfigWizard.cpp @@ -65,22 +65,27 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, cons auto namefont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); namefont.SetWeight(wxFONTWEIGHT_BOLD); + // wxGrid appends widgets by rows, but we need to construct them in columns. + // These vectors are used to hold the elements so that they can be appended in the right order. + std::vector titles; + std::vector bitmaps; + std::vector variants_panels; + for (const auto &model : models) { - auto *panel = new wxPanel(this); - auto *col_sizer = new wxBoxSizer(wxVERTICAL); - panel->SetSizer(col_sizer); - - auto *title = new wxStaticText(panel, wxID_ANY, model.name, wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); - title->SetFont(namefont); - col_sizer->Add(title, 0, wxBOTTOM, 3); - auto bitmap_file = wxString::Format("printers/%s_%s.png", vendor.id, model.id); wxBitmap bitmap(GUI::from_u8(Slic3r::var(bitmap_file.ToStdString())), wxBITMAP_TYPE_PNG); - auto *bitmap_widget = new wxStaticBitmap(panel, wxID_ANY, bitmap); - col_sizer->Add(bitmap_widget, 0, wxBOTTOM, 3); - col_sizer->AddSpacer(20); + auto *title = new wxStaticText(this, wxID_ANY, model.name, wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); + title->SetFont(namefont); + title->Wrap(std::max((int)MODEL_MIN_WRAP, bitmap.GetWidth())); + titles.push_back(title); + auto *bitmap_widget = new wxStaticBitmap(this, wxID_ANY, bitmap); + bitmaps.push_back(bitmap_widget); + + auto *variants_panel = new wxPanel(this); + auto *variants_sizer = new wxBoxSizer(wxVERTICAL); + variants_panel->SetSizer(variants_sizer); const auto model_id = model.id; bool default_variant = true; // Mark the first variant as default in the GUI @@ -88,22 +93,26 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, cons const auto label = wxString::Format("%s %s %s %s", variant.name, _(L("mm")), _(L("nozzle")), (default_variant ? _(L("(default)")) : wxString())); default_variant = false; - auto *cbox = new Checkbox(panel, label, model_id, variant.name); + auto *cbox = new Checkbox(variants_panel, label, model_id, variant.name); const size_t idx = cboxes.size(); cboxes.push_back(cbox); bool enabled = appconfig_vendors.get_variant("PrusaResearch", model_id, variant.name); variants_checked += enabled; cbox->SetValue(enabled); - col_sizer->Add(cbox, 0, wxBOTTOM, 3); + variants_sizer->Add(cbox, 0, wxBOTTOM, 3); cbox->Bind(wxEVT_CHECKBOX, [this, idx](wxCommandEvent &event) { if (idx >= this->cboxes.size()) { return; } this->on_checkbox(this->cboxes[idx], event.IsChecked()); }); } - printer_grid->Add(panel); + variants_panels.push_back(variants_panel); } + for (auto title : titles) { printer_grid->Add(title, 0, wxBOTTOM, 3); } + for (auto bitmap : bitmaps) { printer_grid->Add(bitmap, 0, wxBOTTOM, 20); } + for (auto vp : variants_panels) { printer_grid->Add(vp); } + auto *all_none_sizer = new wxBoxSizer(wxHORIZONTAL); auto *sel_all = new wxButton(this, wxID_ANY, _(L("Select all"))); auto *sel_none = new wxButton(this, wxID_ANY, _(L("Select none"))); diff --git a/xs/src/slic3r/GUI/ConfigWizard_private.hpp b/xs/src/slic3r/GUI/ConfigWizard_private.hpp index 04319a1b4..c027f300d 100644 --- a/xs/src/slic3r/GUI/ConfigWizard_private.hpp +++ b/xs/src/slic3r/GUI/ConfigWizard_private.hpp @@ -27,6 +27,7 @@ namespace GUI { enum { WRAP_WIDTH = 500, + MODEL_MIN_WRAP = 150, DIALOG_MARGIN = 15, INDEX_MARGIN = 40, From 1c58c3e15340833555422c0aad2e9bef8c7c8507 Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Mon, 23 Jul 2018 12:34:07 +0200 Subject: [PATCH 183/198] PresetUpdater: Fix incompatible bundle requirements display --- xs/src/slic3r/Utils/PresetUpdater.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/xs/src/slic3r/Utils/PresetUpdater.cpp b/xs/src/slic3r/Utils/PresetUpdater.cpp index 7ed963a16..b5eab115b 100644 --- a/xs/src/slic3r/Utils/PresetUpdater.cpp +++ b/xs/src/slic3r/Utils/PresetUpdater.cpp @@ -541,10 +541,21 @@ bool PresetUpdater::config_update() const std::unordered_map incompats_map; for (const auto &incompat : updates.incompats) { auto vendor = incompat.name(); - auto restrictions = wxString::Format(_(L("requires min. %s and max. %s")), - incompat.version.min_slic3r_version.to_string(), - incompat.version.max_slic3r_version.to_string() - ); + + const auto min_slic3r = incompat.version.min_slic3r_version; + const auto max_slic3r = incompat.version.max_slic3r_version; + wxString restrictions; + if (min_slic3r != Semver::zero() && max_slic3r != Semver::inf()) { + restrictions = wxString::Format(_(L("requires min. %s and max. %s")), + min_slic3r.to_string(), + max_slic3r.to_string() + ); + } else if (min_slic3r != Semver::zero()) { + restrictions = wxString::Format(_(L("requires min. %s")), min_slic3r.to_string()); + } else { + restrictions = wxString::Format(_(L("requires max. %s")), max_slic3r.to_string()); + } + incompats_map.emplace(std::make_pair(std::move(vendor), std::move(restrictions))); } @@ -556,7 +567,7 @@ bool PresetUpdater::config_update() const BOOST_LOG_TRIVIAL(info) << "User wants to re-configure..."; p->perform_updates(std::move(updates)); GUI::ConfigWizard wizard(nullptr, GUI::ConfigWizard::RR_DATA_INCOMPAT); - if (! wizard.run(GUI::get_preset_bundle(), this)) { + if (! wizard.run(GUI::get_preset_bundle(), this)) { return false; } } else { From 0bd8affab9f7dce5dd1a73bc4390b88d8507a9c9 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Mon, 23 Jul 2018 13:54:43 +0200 Subject: [PATCH 184/198] Attempt to fix #1067 --- xs/src/slic3r/GUI/GLTexture.cpp | 9 ++++++--- xs/src/slic3r/GUI/GLTexture.hpp | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/xs/src/slic3r/GUI/GLTexture.cpp b/xs/src/slic3r/GUI/GLTexture.cpp index 2af555707..18c9f5dea 100644 --- a/xs/src/slic3r/GUI/GLTexture.cpp +++ b/xs/src/slic3r/GUI/GLTexture.cpp @@ -79,7 +79,8 @@ bool GLTexture::load_from_file(const std::string& filename, bool generate_mipmap if (generate_mipmaps) { // we manually generate mipmaps because glGenerateMipmap() function is not reliable on all graphics cards - _generate_mipmaps(image); + unsigned int levels_count = _generate_mipmaps(image); + ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1 + levels_count); ::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); } else @@ -149,14 +150,14 @@ void GLTexture::render_texture(unsigned int tex_id, float left, float right, flo ::glDisable(GL_BLEND); } -void GLTexture::_generate_mipmaps(wxImage& image) +unsigned int GLTexture::_generate_mipmaps(wxImage& image) { int w = image.GetWidth(); int h = image.GetHeight(); GLint level = 0; std::vector data(w * h * 4, 0); - while ((w > 1) && (h > 1)) + while ((w > 1) || (h > 1)) { ++level; @@ -183,6 +184,8 @@ void GLTexture::_generate_mipmaps(wxImage& image) ::glTexImage2D(GL_TEXTURE_2D, level, GL_RGBA, (GLsizei)w, (GLsizei)h, 0, GL_RGBA, GL_UNSIGNED_BYTE, (const void*)data.data()); } + + return (unsigned int)level; } } // namespace GUI diff --git a/xs/src/slic3r/GUI/GLTexture.hpp b/xs/src/slic3r/GUI/GLTexture.hpp index 2e936161e..3113fcab2 100644 --- a/xs/src/slic3r/GUI/GLTexture.hpp +++ b/xs/src/slic3r/GUI/GLTexture.hpp @@ -32,7 +32,7 @@ namespace GUI { static void render_texture(unsigned int tex_id, float left, float right, float bottom, float top); protected: - void _generate_mipmaps(wxImage& image); + unsigned int _generate_mipmaps(wxImage& image); }; } // namespace GUI From de085fdb6c2b575d2fa4f2ea84df7e3fa7cee5e5 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Mon, 23 Jul 2018 14:21:14 +0200 Subject: [PATCH 185/198] Power of two squared bed textures to try to fix #1067 --- resources/icons/bed/mk2_top.png | Bin 102340 -> 33621 bytes resources/icons/bed/mk3_top.png | Bin 85263 -> 190302 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/resources/icons/bed/mk2_top.png b/resources/icons/bed/mk2_top.png index 142050c3a26328237307af611062de60bf1fe3ab..cab4b966f86544dd5fa1f4736ee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+{w!0Gjp6hPD_a!=`#bNPKNYn9 zPG?oxGY`Ya7%D@wW!XUax<$qqyQ_CB8M!&Eaw;!mk0fNg31;6W!h4qHW6Tg1&Mdq~ zE}M?B??053PW5=R{FiRJWXX1=U_7Z;(29*$?F4I*!SRW7Dk-C#?wFX5K8LF|^YvgJ zQud1lnqbp(j^6)%kEIN2bObYf9sg?AuWRJ_ksLbxD+SB06SC>7K7!Lx=N>!u8$F(Q zaGArt)R!XP>z?L(+X3mg@d7I7BM_cS*)hucrqT z+w~pl)c$pTzP@AINZ^l{DL?3X$vf^nUs^n@#c?%!QG(zLA0zT;}eGs{E^SKT*K zi`{2Y`tYgbj*aONq>T8gAkQ_Y9{u_CKf&YQ)+zg^Otx4n z=Cj+Aoy(HfCL}$!i`HE9?`q=M?n*wgb=B)(jgens zz&zMcW*sSP%Vi1Pxh&pbQ!}%gl51Zlu5y^rc=p<2%t*w-ezPCFW|DtH-X4gfbOfmi zZ6K64?HTcF=aaDBXuG@jBwjh5+3^tMGzbdK%nn~+mKOR>iPF+tK36w}Rr6jBFrfLk zHW}1+ZTDJg{arS$*sb{I=8vUcc{lTKZY*vEi2xRu1Nk`k)jED#I<2(+d0zSFK>h7p zmp#+Ig%&SK#0VHAr*=jJ0INX@G2Bb}IaPe=lTMznerAUT1XLs)2n#1N>UHO*_$2A2 z`n=6k`|Ep*D`u}aFOFZcIro^WJ{N>Hp>triEsTA-HrIbgUwSW8eHULxrInIoxyl`oS;8S=$CEyY;rjHXJi4 v2;WP1`X2QOI;AyF=)_j9Kg From 1c6d3c9c695849fd879527a2891eb35e4cdfaaec Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Mon, 23 Jul 2018 14:39:50 +0200 Subject: [PATCH 186/198] Added xml escape characters detection when exporting object and volumes names to 3mf files --- xs/src/libslic3r/Format/3mf.cpp | 4 ++-- xs/src/libslic3r/Format/AMF.cpp | 28 +--------------------------- xs/src/libslic3r/Utils.hpp | 2 ++ xs/src/libslic3r/utils.cpp | 27 +++++++++++++++++++++++++++ 4 files changed, 32 insertions(+), 29 deletions(-) diff --git a/xs/src/libslic3r/Format/3mf.cpp b/xs/src/libslic3r/Format/3mf.cpp index 2c32db1a6..dd3500eba 100644 --- a/xs/src/libslic3r/Format/3mf.cpp +++ b/xs/src/libslic3r/Format/3mf.cpp @@ -1989,7 +1989,7 @@ namespace Slic3r { // stores object's name if (!obj->name.empty()) - stream << " <" << METADATA_TAG << " " << TYPE_ATTR << "=\"" << OBJECT_TYPE << "\" " << KEY_ATTR << "=\"name\" " << VALUE_ATTR << "=\"" << obj->name << "\"/>\n"; + stream << " <" << METADATA_TAG << " " << TYPE_ATTR << "=\"" << OBJECT_TYPE << "\" " << KEY_ATTR << "=\"name\" " << VALUE_ATTR << "=\"" << xml_escape(obj->name) << "\"/>\n"; // stores object's config data for (const std::string& key : obj->config.keys()) @@ -2012,7 +2012,7 @@ namespace Slic3r { // stores volume's name if (!volume->name.empty()) - stream << " <" << METADATA_TAG << " " << TYPE_ATTR << "=\"" << VOLUME_TYPE << "\" " << KEY_ATTR << "=\"" << NAME_KEY << "\" " << VALUE_ATTR << "=\"" << volume->name << "\"/>\n"; + stream << " <" << METADATA_TAG << " " << TYPE_ATTR << "=\"" << VOLUME_TYPE << "\" " << KEY_ATTR << "=\"" << NAME_KEY << "\" " << VALUE_ATTR << "=\"" << xml_escape(volume->name) << "\"/>\n"; // stores volume's modifier field if (volume->modifier) diff --git a/xs/src/libslic3r/Format/AMF.cpp b/xs/src/libslic3r/Format/AMF.cpp index be513166e..600aa6cd9 100644 --- a/xs/src/libslic3r/Format/AMF.cpp +++ b/xs/src/libslic3r/Format/AMF.cpp @@ -8,6 +8,7 @@ #include "../libslic3r.h" #include "../Model.hpp" #include "../GCode.hpp" +#include "../Utils.hpp" #include "../slic3r/GUI/PresetBundle.hpp" #include "AMF.hpp" @@ -686,33 +687,6 @@ bool load_amf(const char *path, PresetBundle* bundle, Model *model) return false; } -std::string xml_escape(std::string text) -{ - std::string::size_type pos = 0; - for (;;) - { - pos = text.find_first_of("\"\'&<>", pos); - if (pos == std::string::npos) - break; - - std::string replacement; - switch (text[pos]) - { - case '\"': replacement = """; break; - case '\'': replacement = "'"; break; - case '&': replacement = "&"; break; - case '<': replacement = "<"; break; - case '>': replacement = ">"; break; - default: break; - } - - text.replace(pos, 1, replacement); - pos += replacement.size(); - } - - return text; -} - bool store_amf(const char *path, Model *model, Print* print, bool export_print_config) { if ((path == nullptr) || (model == nullptr) || (print == nullptr)) diff --git a/xs/src/libslic3r/Utils.hpp b/xs/src/libslic3r/Utils.hpp index a501fa4d3..349222854 100644 --- a/xs/src/libslic3r/Utils.hpp +++ b/xs/src/libslic3r/Utils.hpp @@ -84,6 +84,8 @@ inline T next_highest_power_of_2(T v) return ++ v; } +extern std::string xml_escape(std::string text); + class PerlCallback { public: PerlCallback(void *sv) : m_callback(nullptr) { this->register_callback(sv); } diff --git a/xs/src/libslic3r/utils.cpp b/xs/src/libslic3r/utils.cpp index 13ec1d066..55164bbdd 100644 --- a/xs/src/libslic3r/utils.cpp +++ b/xs/src/libslic3r/utils.cpp @@ -387,4 +387,31 @@ unsigned get_current_pid() #endif } +std::string xml_escape(std::string text) +{ + std::string::size_type pos = 0; + for (;;) + { + pos = text.find_first_of("\"\'&<>", pos); + if (pos == std::string::npos) + break; + + std::string replacement; + switch (text[pos]) + { + case '\"': replacement = """; break; + case '\'': replacement = "'"; break; + case '&': replacement = "&"; break; + case '<': replacement = "<"; break; + case '>': replacement = ">"; break; + default: break; + } + + text.replace(pos, 1, replacement); + pos += replacement.size(); + } + + return text; +} + }; // namespace Slic3r From 3e65b4410befd56d8ed68732a4e125d75780d7fd Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Mon, 23 Jul 2018 14:19:40 +0200 Subject: [PATCH 187/198] PresetUpdater: Fix reloading of profiles after reconfigure and update Fix #1060 Fix #985 --- xs/src/slic3r/GUI/ConfigWizard.cpp | 1 - xs/src/slic3r/GUI/PresetBundle.cpp | 2 +- xs/src/slic3r/Utils/PresetUpdater.cpp | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/xs/src/slic3r/GUI/ConfigWizard.cpp b/xs/src/slic3r/GUI/ConfigWizard.cpp index 0c42168bb..da75f4f30 100644 --- a/xs/src/slic3r/GUI/ConfigWizard.cpp +++ b/xs/src/slic3r/GUI/ConfigWizard.cpp @@ -788,7 +788,6 @@ void ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *prese app_config->set("version_check", page_update->version_check ? "1" : "0"); app_config->set("preset_update", page_update->preset_update ? "1" : "0"); app_config->reset_selections(); - // ^ TODO: replace with appropriate printer selection preset_bundle->load_presets(*app_config); } else { for (ConfigWizardPage *page = page_firmware; page != nullptr; page = page->page_next()) { diff --git a/xs/src/slic3r/GUI/PresetBundle.cpp b/xs/src/slic3r/GUI/PresetBundle.cpp index b9a010659..58553e1bc 100644 --- a/xs/src/slic3r/GUI/PresetBundle.cpp +++ b/xs/src/slic3r/GUI/PresetBundle.cpp @@ -268,7 +268,7 @@ void PresetBundle::load_installed_printers(const AppConfig &config) } // Load selections (current print, current filaments, current printer) from config.ini -// This is done just once on application start up. +// This is done on application start up or after updates are applied. void PresetBundle::load_selections(const AppConfig &config) { // Update visibility of presets based on application vendor / model / variant configuration. diff --git a/xs/src/slic3r/Utils/PresetUpdater.cpp b/xs/src/slic3r/Utils/PresetUpdater.cpp index b5eab115b..c962a2c82 100644 --- a/xs/src/slic3r/Utils/PresetUpdater.cpp +++ b/xs/src/slic3r/Utils/PresetUpdater.cpp @@ -570,6 +570,7 @@ bool PresetUpdater::config_update() const if (! wizard.run(GUI::get_preset_bundle(), this)) { return false; } + GUI::load_current_presets(); } else { BOOST_LOG_TRIVIAL(info) << "User wants to exit Slic3r, bye..."; return false; @@ -599,7 +600,6 @@ bool PresetUpdater::config_update() const // Reload global configuration auto *app_config = GUI::get_app_config(); - app_config->reset_selections(); GUI::get_preset_bundle()->load_presets(*app_config); GUI::load_current_presets(); } else { From 1842520ea65d6952875fbe162fbbb76e4547262d Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Mon, 23 Jul 2018 15:04:21 +0200 Subject: [PATCH 188/198] ConfigWizard: Fix: Don't check the default printer if the wizard is requested by user or re-configure --- xs/src/slic3r/GUI/ConfigWizard.cpp | 9 ++++++--- xs/src/slic3r/GUI/ConfigWizard_private.hpp | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/xs/src/slic3r/GUI/ConfigWizard.cpp b/xs/src/slic3r/GUI/ConfigWizard.cpp index da75f4f30..9f736ded8 100644 --- a/xs/src/slic3r/GUI/ConfigWizard.cpp +++ b/xs/src/slic3r/GUI/ConfigWizard.cpp @@ -223,7 +223,7 @@ void ConfigWizardPage::enable_next(bool enable) { parent->p->enable_next(enable) // Wizard pages -PageWelcome::PageWelcome(ConfigWizard *parent) : +PageWelcome::PageWelcome(ConfigWizard *parent, bool check_first_variant) : ConfigWizardPage(parent, wxString::Format(_(L("Welcome to the Slic3r %s")), ConfigWizard::name()), _(L("Welcome"))), printer_picker(nullptr), others_buttons(new wxPanel(parent)), @@ -247,7 +247,10 @@ PageWelcome::PageWelcome(ConfigWizard *parent) : AppConfig &appconfig_vendors = this->wizard_p()->appconfig_vendors; printer_picker = new PrinterPicker(this, vendor_prusa->second, appconfig_vendors); - printer_picker->select_one(0, true); // Select the default (first) model/variant on the Prusa vendor + if (check_first_variant) { + // Select the default (first) model/variant on the Prusa vendor + printer_picker->select_one(0, true); + } printer_picker->Bind(EVT_PRINTER_PICK, [this, &appconfig_vendors](const PrinterPickerEvent &evt) { appconfig_vendors.set_variant(evt.vendor_id, evt.model_id, evt.variant_name, evt.enable); this->on_variant_checked(); @@ -839,7 +842,7 @@ ConfigWizard::ConfigWizard(wxWindow *parent, RunReason reason) : p->btnsizer->Add(p->btn_finish, 0, wxLEFT, BTN_SPACING); p->btnsizer->Add(p->btn_cancel, 0, wxLEFT, BTN_SPACING); - p->add_page(p->page_welcome = new PageWelcome(this)); + p->add_page(p->page_welcome = new PageWelcome(this, reason == RR_DATA_EMPTY || reason == RR_DATA_LEGACY)); p->add_page(p->page_update = new PageUpdate(this)); p->add_page(p->page_vendors = new PageVendors(this)); p->add_page(p->page_firmware = new PageFirmware(this)); diff --git a/xs/src/slic3r/GUI/ConfigWizard_private.hpp b/xs/src/slic3r/GUI/ConfigWizard_private.hpp index c027f300d..2c8f23cd3 100644 --- a/xs/src/slic3r/GUI/ConfigWizard_private.hpp +++ b/xs/src/slic3r/GUI/ConfigWizard_private.hpp @@ -104,7 +104,7 @@ struct PageWelcome: ConfigWizardPage wxPanel *others_buttons; wxCheckBox *cbox_reset; - PageWelcome(ConfigWizard *parent); + PageWelcome(ConfigWizard *parent, bool check_first_variant); virtual wxPanel* extra_buttons() { return others_buttons; } virtual void on_page_set(); From cac4b2915389cfb3ecfb04a9ebef7a995d47ed36 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Mon, 23 Jul 2018 15:58:08 +0200 Subject: [PATCH 189/198] Fixed crash when generating gcode of multimaterial objects with some object out of the bed --- xs/src/libslic3r/GCode.cpp | 44 ++++++++++++++----------- xs/src/libslic3r/GCode/ToolOrdering.cpp | 6 ++-- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index f0b37ade3..89a72a725 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -309,10 +309,12 @@ std::vector>> GCode::collec size_t object_idx; size_t layer_idx; }; - std::vector> per_object(print.objects.size(), std::vector()); + + PrintObjectPtrs printable_objects = print.get_printable_objects(); + std::vector> per_object(printable_objects.size(), std::vector()); std::vector ordering; - for (size_t i = 0; i < print.objects.size(); ++ i) { - per_object[i] = collect_layers_to_print(*print.objects[i]); + for (size_t i = 0; i < printable_objects.size(); ++i) { + per_object[i] = collect_layers_to_print(*printable_objects[i]); OrderingItem ordering_item; ordering_item.object_idx = i; ordering.reserve(ordering.size() + per_object[i].size()); @@ -337,8 +339,8 @@ std::vector>> GCode::collec std::pair> merged; // Assign an average print_z to the set of layers with nearly equal print_z. merged.first = 0.5 * (ordering[i].print_z + ordering[j-1].print_z); - merged.second.assign(print.objects.size(), LayerToPrint()); - for (; i < j; ++ i) { + merged.second.assign(printable_objects.size(), LayerToPrint()); + for (; i < j; ++i) { const OrderingItem &oi = ordering[i]; assert(merged.second[oi.object_idx].layer() == nullptr); merged.second[oi.object_idx] = std::move(per_object[oi.object_idx][oi.layer_idx]); @@ -472,9 +474,10 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) // How many times will be change_layer() called? // change_layer() in turn increments the progress bar status. m_layer_count = 0; + PrintObjectPtrs printable_objects = print.get_printable_objects(); if (print.config.complete_objects.value) { // Add each of the object's layers separately. - for (auto object : print.objects) { + for (auto object : printable_objects) { std::vector zs; zs.reserve(object->layers.size() + object->support_layers.size()); for (auto layer : object->layers) @@ -487,7 +490,7 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) } else { // Print all objects with the same print_z together. std::vector zs; - for (auto object : print.objects) { + for (auto object : printable_objects) { zs.reserve(zs.size() + object->layers.size() + object->support_layers.size()); for (auto layer : object->layers) zs.push_back(layer->print_z); @@ -506,8 +509,8 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) { // get the minimum cross-section used in the print std::vector mm3_per_mm; - for (auto object : print.objects) { - for (size_t region_id = 0; region_id < print.regions.size(); ++ region_id) { + for (auto object : printable_objects) { + for (size_t region_id = 0; region_id < print.regions.size(); ++region_id) { auto region = print.regions[region_id]; for (auto layer : object->layers) { auto layerm = layer->regions[region_id]; @@ -567,7 +570,7 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) _write(file, "\n"); } // Write some terse information on the slicing parameters. - const PrintObject *first_object = print.objects.front(); + const PrintObject *first_object = printable_objects.front(); const double layer_height = first_object->config.layer_height.value; const double first_layer_height = first_object->config.first_layer_height.get_abs_value(layer_height); for (size_t region_id = 0; region_id < print.regions.size(); ++ region_id) { @@ -596,13 +599,14 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) size_t initial_print_object_id = 0; bool has_wipe_tower = false; if (print.config.complete_objects.value) { - // Find the 1st printing object, find its tool ordering and the initial extruder ID. - for (; initial_print_object_id < print.objects.size(); ++initial_print_object_id) { - tool_ordering = ToolOrdering(*print.objects[initial_print_object_id], initial_extruder_id); - if ((initial_extruder_id = tool_ordering.first_extruder()) != (unsigned int)-1) - break; - } - } else { + // Find the 1st printing object, find its tool ordering and the initial extruder ID. + for (; initial_print_object_id < printable_objects.size(); ++initial_print_object_id) { + tool_ordering = ToolOrdering(*printable_objects[initial_print_object_id], initial_extruder_id); + if ((initial_extruder_id = tool_ordering.first_extruder()) != (unsigned int)-1) + break; + } + } + else { // Find tool ordering for all the objects at once, and the initial extruder ID. // If the tool ordering has been pre-calculated by Print class for wipe tower already, reuse it. tool_ordering = print.m_tool_ordering.empty() ? @@ -676,7 +680,7 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) // Collect outer contours of all objects over all layers. // Discard objects only containing thin walls (offset would fail on an empty polygon). Polygons islands; - for (const PrintObject *object : print.objects) + for (const PrintObject *object : printable_objects) for (const Layer *layer : object->layers) for (const ExPolygon &expoly : layer->slices.expolygons) for (const Point © : object->_shifted_copies) { @@ -724,7 +728,7 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) if (print.config.complete_objects.value) { // Print objects from the smallest to the tallest to avoid collisions // when moving onto next object starting point. - std::vector objects(print.objects); + std::vector objects(printable_objects); std::sort(objects.begin(), objects.end(), [](const PrintObject* po1, const PrintObject* po2) { return po1->size.z < po2->size.z; }); size_t finished_objects = 0; for (size_t object_id = initial_print_object_id; object_id < objects.size(); ++ object_id) { @@ -788,7 +792,7 @@ void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data) PrintObjectPtrs printable_objects = print.get_printable_objects(); for (PrintObject *object : printable_objects) object_reference_points.push_back(object->_shifted_copies.front()); - Slic3r::Geometry::chained_path(object_reference_points, object_indices); + Slic3r::Geometry::chained_path(object_reference_points, object_indices); // Sort layers by Z. // All extrusion moves with the same top layer height are extruded uninterrupted. std::vector>> layers_to_print = collect_layers_to_print(print); diff --git a/xs/src/libslic3r/GCode/ToolOrdering.cpp b/xs/src/libslic3r/GCode/ToolOrdering.cpp index 9b3f2694f..189a94d49 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.cpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.cpp @@ -451,10 +451,9 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, unsigned int return volume_to_wipe; // Soluble filament cannot be wiped in a random infill, neither the filament after it // we will sort objects so that dedicated for wiping are at the beginning: - PrintObjectPtrs object_list = print.objects; + PrintObjectPtrs object_list = print.get_printable_objects(); std::sort(object_list.begin(), object_list.end(), [](const PrintObject* a, const PrintObject* b) { return a->config.wipe_into_objects; }); - // We will now iterate through // - first the dedicated objects to mark perimeters or infills (depending on infill_first) // - second through the dedicated ones again to mark infills or perimeters (depending on infill_first) @@ -548,7 +547,8 @@ void WipingExtrusions::ensure_perimeters_infills_order(const Print& print) unsigned int first_nonsoluble_extruder = first_nonsoluble_extruder_on_layer(print.config); unsigned int last_nonsoluble_extruder = last_nonsoluble_extruder_on_layer(print.config); - for (const PrintObject* object : print.objects) { + PrintObjectPtrs printable_objects = print.get_printable_objects(); + for (const PrintObject* object : printable_objects) { // Finds this layer: auto this_layer_it = std::find_if(object->layers.begin(), object->layers.end(), [<](const Layer* lay) { return std::abs(lt.print_z - lay->print_z)layers.end()) From 077680b806c10b652c225ab04d329dac5bc4689b Mon Sep 17 00:00:00 2001 From: bubnikv Date: Tue, 24 Jul 2018 09:23:19 +0200 Subject: [PATCH 190/198] Fix of https://github.com/prusa3d/Slic3r/issues/1068 Fixed reloading of an object, which contains non-ASCII7 characters in its file name or path. --- lib/Slic3r/GUI/Plater.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 4a56ce632..56038ca9e 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -1665,7 +1665,7 @@ sub reload_from_disk { my $model_object = $self->{model}->objects->[$obj_idx]; #FIXME convert to local file encoding return if !$model_object->input_file - || !-e $model_object->input_file; + || !-e Slic3r::encode_path($model_object->input_file); my @new_obj_idx = $self->load_files([$model_object->input_file]); return if !@new_obj_idx; From 2df6e08eedf410a321e4f8c5a636804bd70162ed Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Tue, 24 Jul 2018 10:33:14 +0200 Subject: [PATCH 191/198] Reduced size of MK3 bed textures for compatibility with OpenGL 1.1 --- resources/icons/bed/mk3_bottom.png | Bin 174128 -> 23501 bytes resources/icons/bed/mk3_top.png | Bin 190302 -> 30647 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/resources/icons/bed/mk3_bottom.png b/resources/icons/bed/mk3_bottom.png index 072c14dae57753e48f59b33f090d1a7142971115..3f12e7efba0e992696dbb39f1c26b5195519b7dc 100644 GIT binary patch literal 23501 zcmY(r2{@Gh_Xa#;%~G9ra0-*sf zX&}cKz-B$Ddk1V791V1}Acxd{uj}6vz#gW1dRD#=2n#3m2MS3^;{iJv{ZK~QjN^IBfHkaJ;Scu$>K!KH3t+KpT{2cg@?5d8^;)Y zGT>N)10fabEyt~Q3@z8E46h!d<9J6G)i#E0i#5_agJtyeWNAk51mi{7@bOu171n3p zjO^+z{@XSy$f>m;uHF2-8CT!PZ%cL=Mey)_SacD=djo z1f~uNRlBZPx#(n07ORewnp;A1R-M?QyH_&3&%?>Z4UII=+%=4wz53Iy0Uh#HRmwJMj5{VnU;lNCL4=vTk~j|q;*(#fnJ zgw7omUjZNh$C zk_c=f>2i?$#s~}Ug7Yaeflkb(l9&69J=t*AVM@_-Af{Z)9g+s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|Jxj`eeoF00JZp704uaQdGI0Q}(U6viPUY zu}b$~pE632Xp!Hdc}Ip0A-;KP!;50(kylYKFT|)^J;;t8NCedddp1p*bGee`I zFWO(LL#xFH?yk9z^?k6#B?rWn=Rc=g?@*)a_zl>U1e6!Ud4b$V*PU(IesFBKJ#{w* z4m{8jQ$vWXyIxf;5>;U5Fs;cUxg$O>Z>J?yi8>z)_75ZL|q z2xG4sZJbL1LF4*0Zn+^g84Urzm5uApB5ihn49#$Lu;@sZX3Z3Z=f9myqqLh;*`&m0 zM$TWR0x&|^sf*`nD|x}yz+QYxTA%t%M{WqBZ0ElvcsokqIr}4uqURtz%G;vcTR*RX z_@dJVa)R9)K=@#;VP9M84C_VXy4^r_O3;7)4$BAqNXREkQ`hrW##%EKYke{Q{Uw65 h>uN(%FSYayr#RM9x}jAMoJ|3L;D`DTD(>06`ajgK+PnY& diff --git a/resources/icons/bed/mk3_top.png b/resources/icons/bed/mk3_top.png index 846ca53a5d73fdacdeb3ba14e1cf9a049c0a6e9d..b44007ad440da38ff179263ee1f2f4ec2f56e229 100644 GIT binary patch literal 30647 zcmY(r2Rv1e8$W(YWo3u#m6eRL%3cu}(LgBomc3eN*YRecnS5WXcu5uboB|2)6% zz?TzfEp=7YA@ZNJ+T2(06A~v4BUcoPj28JH0V?qgBmD5>!>ihAC#Oy_5}zVIUQ8E( zLUEw3sw&;^99pQgwlnGXIy|f$7JB3N`OMN3S4a&1S?h%X=b62QW*tItt=_X&$4j+` zIDS{tt1*-a3}uJ}WT+XW2@DY`8K)_RW*mRhoHWI2{YD#$>8BUa&#KX+6VRWMZ>ybq zb4a$?`B>HU)mE5X=Jq3$lBAma+M6|@IiF5bE5FU^afyI{0FI6zebO@frjJ58S7_5q zPoM_MI=)zOg^7u_iVABpG89O#;3n^jpIKX5`*7>_?T*yL?Nk+kmNV8gzT>#%!-M5% z+q=6=aq;n&IJLjG%m0mzyk~EJN>^cDoG&Y+Vsp&L`R8Zqz2W+OW;MlE_l)SheSB86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wg*9mPNiXFUc*QbvZll!3wt z0_ZrQIKV^2E!^ds#a4S7-mx#tXoUz`+h+qMnlCm}jzt=A z!&9aA&}Isi%Ul@&O~3{QN{NVl1h%P~b2{%SnGKvFG($}F3%PBZS9yk&M}W?W4Q#Xg z^?7fI>B6UDwQAOty!K+Ic#BcIca#5S9`sn8_rdp9=|O?ljxZP&rcI!qNf`a_xI@Z< zLUaAlWH&g8W4%=mKFD4BeL@DbWl;$1TP?$GSh5d#^9dZdh88 X-*Vfp^5q2)@(9% Date: Tue, 24 Jul 2018 10:50:03 +0200 Subject: [PATCH 192/198] Fix application shutdown on incompatible profile exit --- lib/Slic3r/GUI.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI.pm b/lib/Slic3r/GUI.pm index cbfe0e5fe..0b9596261 100644 --- a/lib/Slic3r/GUI.pm +++ b/lib/Slic3r/GUI.pm @@ -141,7 +141,7 @@ sub OnInit { $self->CallAfter(sub { eval { if (! $self->{preset_updater}->config_update()) { - exit 0; + $self->{mainframe}->Close; } }; if ($@) { From c5448514ace5bc5329554fb45365b961a903ec89 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Tue, 24 Jul 2018 11:20:29 +0200 Subject: [PATCH 193/198] Fixed an issue with MM and supports layering --- xs/src/libslic3r/GCode/ToolOrdering.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xs/src/libslic3r/GCode/ToolOrdering.hpp b/xs/src/libslic3r/GCode/ToolOrdering.hpp index a7263abda..4dcf6516a 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.hpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.hpp @@ -66,8 +66,10 @@ public: wipe_tower_partitions(0), wipe_tower_layer_height(0.) {} - bool operator< (const LayerTools &rhs) const { return print_z - EPSILON < rhs.print_z; } - bool operator==(const LayerTools &rhs) const { return std::abs(print_z - rhs.print_z) < EPSILON; } + // Changing these operators to epsilon version can make a problem in cases where support and object layers get close to each other. + // In case someone tries to do it, make sure you know what you're doing and test it properly (slice multiple objects at once with supports). + bool operator< (const LayerTools &rhs) const { return print_z < rhs.print_z; } + bool operator==(const LayerTools &rhs) const { return print_z == rhs.print_z; } bool is_extruder_order(unsigned int a, unsigned int b) const; From 21a59ce710e7cf7348e092baccb7a6fdab0c062a Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Tue, 24 Jul 2018 12:17:26 +0200 Subject: [PATCH 194/198] Shifted the MM priming lines inside a bit (for the out-of-bed detection) --- xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp index b49c2856b..f466fc4f6 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp @@ -490,7 +490,7 @@ WipeTower::ToolChangeResult WipeTowerPrusaMM::prime( // box_coordinates cleaning_box(xy(0.5f, - 1.5f), m_wipe_tower_width, wipe_area); const float prime_section_width = std::min(240.f / tools.size(), 60.f); - box_coordinates cleaning_box(xy(5.f, 0.f), prime_section_width, 100.f); + box_coordinates cleaning_box(xy(5.f, 0.01f + m_perimeter_width/2.f), prime_section_width, 100.f); PrusaMultiMaterial::Writer writer(m_layer_height, m_perimeter_width); writer.set_extrusion_flow(m_extrusion_flow) From b49bfadd87795d217af9a682ea79f2b4d8a40575 Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Tue, 24 Jul 2018 15:27:31 +0200 Subject: [PATCH 195/198] PresetUpdater: Fail harder on bundle version not present in index --- lib/Slic3r/GUI.pm | 4 ++-- xs/src/slic3r/Utils/PresetUpdater.cpp | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/Slic3r/GUI.pm b/lib/Slic3r/GUI.pm index 0b9596261..483fd36f9 100644 --- a/lib/Slic3r/GUI.pm +++ b/lib/Slic3r/GUI.pm @@ -145,8 +145,8 @@ sub OnInit { } }; if ($@) { - warn $@ . "\n"; - fatal_error(undef, $@); + show_error(undef, $@); + $self->{mainframe}->Close; } }); diff --git a/xs/src/slic3r/Utils/PresetUpdater.cpp b/xs/src/slic3r/Utils/PresetUpdater.cpp index c962a2c82..6e23ab421 100644 --- a/xs/src/slic3r/Utils/PresetUpdater.cpp +++ b/xs/src/slic3r/Utils/PresetUpdater.cpp @@ -322,8 +322,9 @@ Updates PresetUpdater::priv::get_config_updates() const const auto ver_current = idx.find(vp.config_version); if (ver_current == idx.end()) { - BOOST_LOG_TRIVIAL(error) << boost::format("Preset bundle (`%1%`) version not found in index: %2%") % idx.vendor() % vp.config_version.to_string(); - continue; + auto message = (boost::format("Preset bundle `%1%` version not found in index: %2%") % idx.vendor() % vp.config_version.to_string()).str(); + BOOST_LOG_TRIVIAL(error) << message; + throw std::runtime_error(message); } // Getting a recommended version from the latest index, wich may have been downloaded From 07ae905150d026b3fdd47dd609668cc36bf8880b Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Tue, 24 Jul 2018 15:47:13 +0200 Subject: [PATCH 196/198] Sync PrusaResearch.idx --- resources/profiles/PrusaResearch.idx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/resources/profiles/PrusaResearch.idx b/resources/profiles/PrusaResearch.idx index bdb372d81..522243e6b 100644 --- a/resources/profiles/PrusaResearch.idx +++ b/resources/profiles/PrusaResearch.idx @@ -1,8 +1,13 @@ min_slic3r_version = 1.41.0-alpha 0.2.0-alpha2 -0.2.0-alpha1 -0.2.0-alpha +0.2.0-alpha1 added initial profiles for the i3 MK3 Multi Material Upgrade 2.0 +0.2.0-alpha moved machine limits from the start G-code to the new print profile parameters min_slic3r_version = 1.40.0 +0.1.11 fw version changed to 3.3.1 +0.1.10 MK3 jerk and acceleration update +0.1.9 edited support extrusion width for 0.25 and 0.6 nozzles +0.1.8 extrusion width for 0,25, 0.6 and variable layer height fixes +0.1.7 Fixed errors in 0.25mm and 0.6mm profiles 0.1.6 Split the MK2.5 profile from the MK2S min_slic3r_version = 1.40.0-beta 0.1.5 fixed printer_variant fields for the i3 MK3 0.25 and 0.6mm nozzles From e0e6a238107b3614fde83d79a6e6056d0a378e2a Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Tue, 24 Jul 2018 15:53:17 +0200 Subject: [PATCH 197/198] PrusaResearch.idx: Comment 0.2.0-alpha2 --- resources/profiles/PrusaResearch.idx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/profiles/PrusaResearch.idx b/resources/profiles/PrusaResearch.idx index 522243e6b..5c06353ca 100644 --- a/resources/profiles/PrusaResearch.idx +++ b/resources/profiles/PrusaResearch.idx @@ -1,5 +1,5 @@ min_slic3r_version = 1.41.0-alpha -0.2.0-alpha2 +0.2.0-alpha2 Renamed the key MK3SMMU to MK3MMU2, added a generic PLA MMU2 material 0.2.0-alpha1 added initial profiles for the i3 MK3 Multi Material Upgrade 2.0 0.2.0-alpha moved machine limits from the start G-code to the new print profile parameters min_slic3r_version = 1.40.0 From dd724e9dab1c79b1e4d7e92940c4f33a28f18843 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Wed, 25 Jul 2018 09:19:20 +0200 Subject: [PATCH 198/198] M73 lines emitted to gcode only for Marlin firmare. Fixes #1071 --- xs/src/libslic3r/GCode.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 89a72a725..94634f4e4 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -377,10 +377,13 @@ void GCode::do_export(Print *print, const char *path, GCodePreviewData *preview_ } fclose(file); - m_normal_time_estimator.post_process_remaining_times(path_tmp, 60.0f); + if (print->config.gcode_flavor.value == gcfMarlin) + { + m_normal_time_estimator.post_process_remaining_times(path_tmp, 60.0f); - if (m_silent_time_estimator_enabled) - m_silent_time_estimator.post_process_remaining_times(path_tmp, 60.0f); + if (m_silent_time_estimator_enabled) + m_silent_time_estimator.post_process_remaining_times(path_tmp, 60.0f); + } if (! this->m_placeholder_parser_failed_templates.empty()) { // G-code export proceeded, but some of the PlaceholderParser substitutions failed.