From dfd6ca899a37fabd2ed8f6ed526fd8e60575e01a Mon Sep 17 00:00:00 2001 From: rtyr <36745189+rtyr@users.noreply.github.com> Date: Thu, 17 Mar 2022 13:41:08 +0100 Subject: [PATCH 01/10] Sync with PrusaSlicer-settings --- resources/profiles/Ultimaker.idx | 1 + resources/profiles/Ultimaker.ini | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/profiles/Ultimaker.idx b/resources/profiles/Ultimaker.idx index a593d2fb4b..8e119931c1 100644 --- a/resources/profiles/Ultimaker.idx +++ b/resources/profiles/Ultimaker.idx @@ -1,2 +1,3 @@ min_slic3r_version = 2.4.0-beta0 +1.0.1 Updated start g-code. 1.0.0 Initial version diff --git a/resources/profiles/Ultimaker.ini b/resources/profiles/Ultimaker.ini index 363e0dec8a..1aeeab0a15 100644 --- a/resources/profiles/Ultimaker.ini +++ b/resources/profiles/Ultimaker.ini @@ -9,7 +9,7 @@ name = Ultimaker # Configuration version of this file. Config file will only be installed, if the config_version differs. # This means, the server may force the PrusaSlicer configuration to be downgraded. -config_version = 1.0.0 +config_version = 1.0.1 # Where to get the updates from? config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/Ultimaker/ @@ -396,5 +396,5 @@ printer_notes = Dont remove the following keywords! These keywords are used in t nozzle_diameter = 0.4 default_print_profile = 0.20mm NORMAL @ULTIMAKER2 default_filament_profile = Generic PLA @ULTIMAKER2 -start_gcode = ; Printer_Settings_ID: [printer_settings_id]\n\n; # # # # # # START Header\nG21 ; metric values\nG90 ; absolute positioning\nM82 ; set extruder to absolute mode\nM107 ; start with the fan off\n\nG28 X0 Y0 Z0 ; move X/Y/Z to endstops\nG1 X1 Y6 F15000 ; move X/Y to start position\nG1 Z35 F9000 ; move Z to start position\n\n; Heat up bed and nozzle\nM190 S{first_layer_bed_temperature[0] - 5} ; wait for bed temperature - 5\nM140 S[first_layer_bed_temperature] ; continue bed heating\nM109 S[first_layer_temperature] ; wait for nozzle temperature\n\nG92 E0 ; zero the extruded length\nG1 F150 E22 ; purge nozzle with filament\nG92 E0 ; zero the extruded length again\nG1 F75 E7 ; additional priming\nG92 E0 ; zero the extruded length again\n\n; # # # # # # END Header +start_gcode = start_gcode = ; Printer_Settings_ID: [printer_settings_id]\n\n; # # # # # # START Header\nG21 ; metric values\nG90 ; absolute positioning\nM82 ; set extruder to absolute mode\nM107 ; start with the fan off\n\nM140 S[first_layer_bed_temperature] ; start bed heating\n\nG28 X0 Y0 Z0 ; move X/Y/Z to endstops\nG1 X1 Y6 F15000 ; move X/Y to start position\nG1 Z35 F9000 ; move Z to start position\n\n; Wait for bed and nozzle temperatures\nM190 S{first_layer_bed_temperature[0] - 5} ; wait for bed temperature - 5\nM140 S[first_layer_bed_temperature] ; continue bed heating\nM109 S[first_layer_temperature] ; wait for nozzle temperature\n\n; Purge and prime\nM83 ; set extruder to relative mode\nG92 E0 ; reset extrusion distance\nG0 X0 Y1 F10000\nG1 F150 E20 Y10 ; compress the bowden tube\nG1 E-8 F1200\nG0 X30 Y1 F5000 \nG0 F1200 Z{first_layer_height/2} ; Cut the connection to priming blob\nG0 X100 F10000 ; disconnect with the prime blob\nG0 X50 ; Avoid the metal clip holding the Ultimaker glass plate\nG0 Z0.2 F720\nG1 E8 F1200\nG1 X80 E3 F1000 ; intro line 1\nG1 X110 E4 F1000 ; intro line 2\nG1 X140 F600 ; drag filament to decompress bowden tube\nG1 X100 F3200 ; wipe backwards a bit\nG1 X150 F3200 ; back to where there is no plastic: avoid dragging\nG92 E0 ; reset extruder reference\nM82 ; set extruder to absolute mode\n\n; # # # # # # END Header end_gcode = ; # # # # # # START Footer\nG91 ; relative coordinates\n;G1 E-1 F1200 ; retract the filament\nG1 Z+15 X-10 Y-10 E-7 F6000 ; move Z a bit\n; G1 X-10 Y-10 F6000 ; move XY a bit\nG1 E-5.5 F300 ; retract the filament\nG28 X0 Y0 ; move X/Y to min endstops, so the head is out of the way\nM104 S0 ; extruder heater off\nM140 S0 ; heated bed heater off (if you have it)\nM84 ; disable motors\n; # # # # # # END Footer\n From 99861f1b6ec3793025d528f0badb63e837f8c808 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Thu, 17 Mar 2022 14:20:35 +0100 Subject: [PATCH 02/10] SPE-1207 - Extensions in Open/Save/Export dialogs - alternative implementation for file_wildcards() --- src/libslic3r/Technologies.hpp | 2 ++ src/slic3r/GUI/GUI_App.cpp | 40 ++++++++++++++++++++++++++++++++++ src/slic3r/GUI/GUI_App.hpp | 4 ++++ src/slic3r/GUI/Plater.cpp | 8 ++++++- 4 files changed, 53 insertions(+), 1 deletion(-) diff --git a/src/libslic3r/Technologies.hpp b/src/libslic3r/Technologies.hpp index 635fc49943..2ce7079fe1 100644 --- a/src/libslic3r/Technologies.hpp +++ b/src/libslic3r/Technologies.hpp @@ -84,6 +84,8 @@ #define ENABLE_NEW_CAMERA_MOVEMENTS (1 && ENABLE_2_5_0_ALPHA1) // Enable modified rectangle selection #define ENABLE_NEW_RECTANGLE_SELECTION (1 && ENABLE_2_5_0_ALPHA1) +// Enable alternative version of file_wildcards() +#define ENABLE_ALTERNATIVE_FILE_WILDCARDS_GENERATOR (1 && ENABLE_2_5_0_ALPHA1) #endif // _prusaslicer_technologies_h_ diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 87913fb812..ee91994252 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -499,6 +499,44 @@ static const FileWildcards file_wildcards_by_type[FT_SIZE] = { /* FT_SL1 */ { "Masked SLA files"sv, { ".sl1"sv, ".sl1s"sv, ".pwmx"sv } }, }; +#if ENABLE_ALTERNATIVE_FILE_WILDCARDS_GENERATOR +wxString file_wildcards(FileType file_type) +{ + const FileWildcards& data = file_wildcards_by_type[file_type]; + std::string title; + std::string mask; + + // Generate cumulative first item + for (const std::string_view& ext : data.file_extensions) { + if (title.empty()) { + title = "*"; + title += ext; + mask = title; + } + else { + title += ", *"; + title += ext; + mask += ";*"; + mask += ext; + } + mask += ";*"; + mask += boost::to_upper_copy(std::string(ext)); + } + + wxString ret = GUI::format_wxstr("%s (%s)|%s", data.title, title, mask); + + // Adds an item for each of the extensions + if (data.file_extensions.size() > 1) { + for (const std::string_view& ext : data.file_extensions) { + title = "*"; + title += ext; + ret += GUI::format_wxstr("|%s (%s)|%s", data.title, title, title); + } + } + + return ret; +} +#else // This function produces a Win32 file dialog file template mask to be consumed by wxWidgets on all platforms. // The function accepts a custom extension parameter. If the parameter is provided, the custom extension // will be added as a fist to the list. This is important for a "file save" dialog on OSX, which strips @@ -551,8 +589,10 @@ wxString file_wildcards(FileType file_type, const std::string &custom_extension) mask += ";*"; mask += boost::to_upper_copy(std::string(ext)); } + return GUI::format_wxstr("%s (%s)|%s", data.title, title, mask); } +#endif // ENABLE_ALTERNATIVE_FILE_WILDCARDS_GENERATOR static std::string libslic3r_translate_callback(const char *s) { return wxGetTranslation(wxString(s, wxConvUTF8)).utf8_str().data(); } diff --git a/src/slic3r/GUI/GUI_App.hpp b/src/slic3r/GUI/GUI_App.hpp index 8b4177a8d7..f93728d2e3 100644 --- a/src/slic3r/GUI/GUI_App.hpp +++ b/src/slic3r/GUI/GUI_App.hpp @@ -71,7 +71,11 @@ enum FileType FT_SIZE, }; +#if ENABLE_ALTERNATIVE_FILE_WILDCARDS_GENERATOR +extern wxString file_wildcards(FileType file_type); +#else extern wxString file_wildcards(FileType file_type, const std::string &custom_extension = std::string{}); +#endif // ENABLE_ALTERNATIVE_FILE_WILDCARDS_GENERATOR enum ConfigMenuIDs { ConfigMenuWizard, diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index fc8ba23c51..daee3b0533 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -5919,11 +5919,17 @@ void Plater::export_gcode(bool prefer_removable) fs::path output_path; { - std::string ext = default_output_file.extension().string(); +#if !ENABLE_ALTERNATIVE_FILE_WILDCARDS_GENERATOR + std::string ext = default_output_file.extension().string(); +#endif // !ENABLE_ALTERNATIVE_FILE_WILDCARDS_GENERATOR wxFileDialog dlg(this, (printer_technology() == ptFFF) ? _L("Save G-code file as:") : _L("Save SL1 / SL1S file as:"), start_dir, from_path(default_output_file.filename()), +#if ENABLE_ALTERNATIVE_FILE_WILDCARDS_GENERATOR + GUI::file_wildcards((printer_technology() == ptFFF) ? FT_GCODE : FT_SL1), +#else GUI::file_wildcards((printer_technology() == ptFFF) ? FT_GCODE : FT_SL1, ext), +#endif // ENABLE_ALTERNATIVE_FILE_WILDCARDS_GENERATOR wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); if (dlg.ShowModal() == wxID_OK) { From 8d5dd759ada887ca733f2cb689eccd6df1a6c88c Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Thu, 17 Mar 2022 14:31:14 +0100 Subject: [PATCH 03/10] SPE-1208 - Fix for 3mf from another SW is loaded as a project and not as geometry --- src/slic3r/GUI/Plater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index daee3b0533..df593f1300 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -5566,7 +5566,7 @@ bool Plater::load_files(const wxArrayString& filenames) if (!model().objects.empty()) { if ((boost::algorithm::iends_with(filename, ".3mf") && !is_project_3mf(it->string())) || (boost::algorithm::iends_with(filename, ".amf") && !boost::algorithm::iends_with(filename, ".zip.amf"))) - load_type = LoadType::OpenProject; + load_type = LoadType::LoadGeometry; else { if (wxGetApp().app_config->get("show_drop_project_dialog") == "1") { ProjectDropDialog dlg(filename); From fb22612d0d422c6dfe88610a40fa207b7ad3ab1c Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Thu, 17 Mar 2022 15:12:03 +0100 Subject: [PATCH 04/10] Tech ENABLE_SPIRAL_VASE_LAYERS set as default --- src/libslic3r/GCode/GCodeProcessor.cpp | 14 -------------- src/libslic3r/GCode/GCodeProcessor.hpp | 4 ---- src/libslic3r/Technologies.hpp | 2 -- src/slic3r/GUI/GCodeViewer.cpp | 2 -- 4 files changed, 22 deletions(-) diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index 3bf7c4ffd3..0c9d495446 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -737,9 +737,7 @@ void GCodeProcessorResult::reset() { filament_diameters = std::vector(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_DIAMETER); filament_densities = std::vector(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_DENSITY); custom_gcode_per_print_z = std::vector(); -#if ENABLE_SPIRAL_VASE_LAYERS spiral_vase_layers = std::vector>>(); -#endif // ENABLE_SPIRAL_VASE_LAYERS time = 0; } #else @@ -755,9 +753,7 @@ void GCodeProcessorResult::reset() { filament_diameters = std::vector(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_DIAMETER); filament_densities = std::vector(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_DENSITY); custom_gcode_per_print_z = std::vector(); -#if ENABLE_SPIRAL_VASE_LAYERS spiral_vase_layers = std::vector>>(); -#endif // ENABLE_SPIRAL_VASE_LAYERS } #endif // ENABLE_GCODE_VIEWER_STATISTICS @@ -905,11 +901,9 @@ void GCodeProcessor::apply_config(const PrintConfig& config) m_result.max_print_height = config.max_print_height; -#if ENABLE_SPIRAL_VASE_LAYERS const ConfigOptionBool* spiral_vase = config.option("spiral_vase"); if (spiral_vase != nullptr) m_spiral_vase_active = spiral_vase->value; -#endif // ENABLE_SPIRAL_VASE_LAYERS #if ENABLE_Z_OFFSET_CORRECTION const ConfigOptionFloat* z_offset = config.option("z_offset"); @@ -1160,11 +1154,9 @@ void GCodeProcessor::apply_config(const DynamicPrintConfig& config) if (max_print_height != nullptr) m_result.max_print_height = max_print_height->value; -#if ENABLE_SPIRAL_VASE_LAYERS const ConfigOptionBool* spiral_vase = config.option("spiral_vase"); if (spiral_vase != nullptr) m_spiral_vase_active = spiral_vase->value; -#endif // ENABLE_SPIRAL_VASE_LAYERS #if ENABLE_Z_OFFSET_CORRECTION const ConfigOptionFloat* z_offset = config.option("z_offset"); @@ -1238,9 +1230,7 @@ void GCodeProcessor::reset() m_options_z_corrector.reset(); -#if ENABLE_SPIRAL_VASE_LAYERS m_spiral_vase_active = false; -#endif // ENABLE_SPIRAL_VASE_LAYERS #if ENABLE_GCODE_VIEWER_DATA_CHECKING m_mm3_per_mm_compare.reset(); @@ -1950,7 +1940,6 @@ void GCodeProcessor::process_tags(const std::string_view comment, bool producers // layer change tag if (comment == reserved_tag(ETags::Layer_Change)) { ++m_layer_id; -#if ENABLE_SPIRAL_VASE_LAYERS if (m_spiral_vase_active) { if (m_result.moves.empty()) m_result.spiral_vase_layers.push_back({ m_first_layer_height, { 0, 0 } }); @@ -1962,7 +1951,6 @@ void GCodeProcessor::process_tags(const std::string_view comment, bool producers m_result.spiral_vase_layers.push_back({ static_cast(m_end_position[Z]), { move_id, move_id } }); } } -#endif // ENABLE_SPIRAL_VASE_LAYERS return; } @@ -2772,10 +2760,8 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line) m_seams_detector.set_first_vertex(m_result.moves.back().position - m_extruder_offsets[m_extruder_id]); } -#if ENABLE_SPIRAL_VASE_LAYERS if (m_spiral_vase_active && !m_result.spiral_vase_layers.empty() && !m_result.moves.empty()) m_result.spiral_vase_layers.back().second.second = m_result.moves.size() - 1; -#endif // ENABLE_SPIRAL_VASE_LAYERS // store move store_move_vertex(type); diff --git a/src/libslic3r/GCode/GCodeProcessor.hpp b/src/libslic3r/GCode/GCodeProcessor.hpp index 25375f61b6..e04caa6e22 100644 --- a/src/libslic3r/GCode/GCodeProcessor.hpp +++ b/src/libslic3r/GCode/GCodeProcessor.hpp @@ -131,9 +131,7 @@ namespace Slic3r { std::vector filament_densities; PrintEstimatedStatistics print_statistics; std::vector custom_gcode_per_print_z; -#if ENABLE_SPIRAL_VASE_LAYERS std::vector>> spiral_vase_layers; -#endif // ENABLE_SPIRAL_VASE_LAYERS #if ENABLE_GCODE_VIEWER_STATISTICS int64_t time{ 0 }; @@ -559,9 +557,7 @@ namespace Slic3r { SeamsDetector m_seams_detector; OptionsZCorrector m_options_z_corrector; size_t m_last_default_color_id; -#if ENABLE_SPIRAL_VASE_LAYERS bool m_spiral_vase_active; -#endif // ENABLE_SPIRAL_VASE_LAYERS #if ENABLE_GCODE_VIEWER_STATISTICS std::chrono::time_point m_start_time; #endif // ENABLE_GCODE_VIEWER_STATISTICS diff --git a/src/libslic3r/Technologies.hpp b/src/libslic3r/Technologies.hpp index 2ce7079fe1..de54e65091 100644 --- a/src/libslic3r/Technologies.hpp +++ b/src/libslic3r/Technologies.hpp @@ -41,8 +41,6 @@ //================ #define ENABLE_2_4_1_RC 1 -// Enable detection of layers for spiral vase prints -#define ENABLE_SPIRAL_VASE_LAYERS (1 && ENABLE_2_4_1_RC) // Enable correction of toolpaths when z offset is set #define ENABLE_Z_OFFSET_CORRECTION (1 && ENABLE_2_4_1_RC) diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index d33004f494..5372d4565b 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -2313,7 +2313,6 @@ void GCodeViewer::load_toolpaths(const GCodeProcessorResult& gcode_result) sort_remove_duplicates(m_extruder_ids); m_extruder_ids.shrink_to_fit(); -#if ENABLE_SPIRAL_VASE_LAYERS // replace layers for spiral vase mode if (!gcode_result.spiral_vase_layers.empty()) { m_layers.reset(); @@ -2321,7 +2320,6 @@ void GCodeViewer::load_toolpaths(const GCodeProcessorResult& gcode_result) m_layers.append(layer.first, { layer.second.first, layer.second.second }); } } -#endif // ENABLE_SPIRAL_VASE_LAYERS // set layers z range if (!m_layers.empty()) From 493050a279038ef5d70273b352131e6eadd90a3d Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Thu, 17 Mar 2022 15:29:18 +0100 Subject: [PATCH 05/10] Removed redundant line of code --- src/slic3r/GUI/GUI_Preview.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/slic3r/GUI/GUI_Preview.cpp b/src/slic3r/GUI/GUI_Preview.cpp index 2cac5e3566..1488ffb2e5 100644 --- a/src/slic3r/GUI/GUI_Preview.cpp +++ b/src/slic3r/GUI/GUI_Preview.cpp @@ -1040,7 +1040,6 @@ void Preview::load_print_as_sla() if (IsShown()) { m_canvas->load_sla_preview(); m_left_sizer->Hide(m_bottom_toolbar_panel); - m_left_sizer->Hide(m_bottom_toolbar_panel); m_left_sizer->Layout(); Refresh(); From 45e4d905043b2321fed005e40e37b7527dd644a3 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Thu, 17 Mar 2022 15:44:03 +0100 Subject: [PATCH 06/10] GCodeViewer - Hide bottom toolbar when loading a new gcode file --- src/slic3r/GUI/GUI_Preview.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/slic3r/GUI/GUI_Preview.cpp b/src/slic3r/GUI/GUI_Preview.cpp index 1488ffb2e5..3eec8f823e 100644 --- a/src/slic3r/GUI/GUI_Preview.cpp +++ b/src/slic3r/GUI/GUI_Preview.cpp @@ -966,6 +966,11 @@ void Preview::load_print_as_fff(bool keep_z_range) Refresh(); zs = m_canvas->get_volumes_print_zs(true); } + else { + m_left_sizer->Hide(m_bottom_toolbar_panel); + m_left_sizer->Layout(); + Refresh(); + } if (!zs.empty() && !m_keep_current_preview_type) { unsigned int number_extruders = wxGetApp().is_editor() ? From b56874e9fe322ffc8a5029644bf889b3ca47a43f Mon Sep 17 00:00:00 2001 From: rtyr <36745189+rtyr@users.noreply.github.com> Date: Thu, 17 Mar 2022 23:07:01 +0100 Subject: [PATCH 07/10] Sync with PrusaSlicer-settings 1.0.2 --- resources/profiles/Ultimaker.idx | 1 + resources/profiles/Ultimaker.ini | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/profiles/Ultimaker.idx b/resources/profiles/Ultimaker.idx index 8e119931c1..605b87e071 100644 --- a/resources/profiles/Ultimaker.idx +++ b/resources/profiles/Ultimaker.idx @@ -1,3 +1,4 @@ min_slic3r_version = 2.4.0-beta0 +1.0.2 Fixed start g-code. 1.0.1 Updated start g-code. 1.0.0 Initial version diff --git a/resources/profiles/Ultimaker.ini b/resources/profiles/Ultimaker.ini index 1aeeab0a15..f3e30db400 100644 --- a/resources/profiles/Ultimaker.ini +++ b/resources/profiles/Ultimaker.ini @@ -9,7 +9,7 @@ name = Ultimaker # Configuration version of this file. Config file will only be installed, if the config_version differs. # This means, the server may force the PrusaSlicer configuration to be downgraded. -config_version = 1.0.1 +config_version = 1.0.2 # Where to get the updates from? config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/Ultimaker/ @@ -396,5 +396,5 @@ printer_notes = Dont remove the following keywords! These keywords are used in t nozzle_diameter = 0.4 default_print_profile = 0.20mm NORMAL @ULTIMAKER2 default_filament_profile = Generic PLA @ULTIMAKER2 -start_gcode = start_gcode = ; Printer_Settings_ID: [printer_settings_id]\n\n; # # # # # # START Header\nG21 ; metric values\nG90 ; absolute positioning\nM82 ; set extruder to absolute mode\nM107 ; start with the fan off\n\nM140 S[first_layer_bed_temperature] ; start bed heating\n\nG28 X0 Y0 Z0 ; move X/Y/Z to endstops\nG1 X1 Y6 F15000 ; move X/Y to start position\nG1 Z35 F9000 ; move Z to start position\n\n; Wait for bed and nozzle temperatures\nM190 S{first_layer_bed_temperature[0] - 5} ; wait for bed temperature - 5\nM140 S[first_layer_bed_temperature] ; continue bed heating\nM109 S[first_layer_temperature] ; wait for nozzle temperature\n\n; Purge and prime\nM83 ; set extruder to relative mode\nG92 E0 ; reset extrusion distance\nG0 X0 Y1 F10000\nG1 F150 E20 Y10 ; compress the bowden tube\nG1 E-8 F1200\nG0 X30 Y1 F5000 \nG0 F1200 Z{first_layer_height/2} ; Cut the connection to priming blob\nG0 X100 F10000 ; disconnect with the prime blob\nG0 X50 ; Avoid the metal clip holding the Ultimaker glass plate\nG0 Z0.2 F720\nG1 E8 F1200\nG1 X80 E3 F1000 ; intro line 1\nG1 X110 E4 F1000 ; intro line 2\nG1 X140 F600 ; drag filament to decompress bowden tube\nG1 X100 F3200 ; wipe backwards a bit\nG1 X150 F3200 ; back to where there is no plastic: avoid dragging\nG92 E0 ; reset extruder reference\nM82 ; set extruder to absolute mode\n\n; # # # # # # END Header +start_gcode = ; Printer_Settings_ID: [printer_settings_id]\n\n; # # # # # # START Header\nG21 ; metric values\nG90 ; absolute positioning\nM82 ; set extruder to absolute mode\nM107 ; start with the fan off\n\nM140 S[first_layer_bed_temperature] ; start bed heating\n\nG28 X0 Y0 Z0 ; move X/Y/Z to endstops\nG1 X1 Y6 F15000 ; move X/Y to start position\nG1 Z35 F9000 ; move Z to start position\n\n; Wait for bed and nozzle temperatures\nM190 S{first_layer_bed_temperature[0] - 5} ; wait for bed temperature - 5\nM140 S[first_layer_bed_temperature] ; continue bed heating\nM109 S[first_layer_temperature] ; wait for nozzle temperature\n\n; Purge and prime\nM83 ; set extruder to relative mode\nG92 E0 ; reset extrusion distance\nG0 X0 Y1 F10000\nG1 F150 E20 ; compress the bowden tube\nG1 E-8 F1200\nG0 X30 Y1 F5000 \nG0 F1200 Z{first_layer_height/2} ; Cut the connection to priming blob\nG0 X100 F10000 ; disconnect with the prime blob\nG0 X50 ; Avoid the metal clip holding the Ultimaker glass plate\nG0 Z0.2 F720\nG1 E8 F1200\nG1 X80 E3 F1000 ; intro line 1\nG1 X110 E4 F1000 ; intro line 2\nG1 X140 F600 ; drag filament to decompress bowden tube\nG1 X100 F3200 ; wipe backwards a bit\nG1 X150 F3200 ; back to where there is no plastic: avoid dragging\nG92 E0 ; reset extruder reference\nM82 ; set extruder to absolute mode\n\n; # # # # # # END Header end_gcode = ; # # # # # # START Footer\nG91 ; relative coordinates\n;G1 E-1 F1200 ; retract the filament\nG1 Z+15 X-10 Y-10 E-7 F6000 ; move Z a bit\n; G1 X-10 Y-10 F6000 ; move XY a bit\nG1 E-5.5 F300 ; retract the filament\nG28 X0 Y0 ; move X/Y to min endstops, so the head is out of the way\nM104 S0 ; extruder heater off\nM140 S0 ; heated bed heater off (if you have it)\nM84 ; disable motors\n; # # # # # # END Footer\n From a7d466dc7cb4da8cd3c5b6869b560fa8efc54fa8 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Fri, 18 Mar 2022 08:32:35 +0100 Subject: [PATCH 08/10] Tech ENABLE_Z_OFFSET_CORRECTION set as default --- src/libslic3r/GCode/GCodeProcessor.cpp | 14 -------------- src/libslic3r/GCode/GCodeProcessor.hpp | 2 -- src/libslic3r/Technologies.hpp | 9 --------- 3 files changed, 25 deletions(-) diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index 0c9d495446..43a5f1eb0a 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -905,11 +905,9 @@ void GCodeProcessor::apply_config(const PrintConfig& config) if (spiral_vase != nullptr) m_spiral_vase_active = spiral_vase->value; -#if ENABLE_Z_OFFSET_CORRECTION const ConfigOptionFloat* z_offset = config.option("z_offset"); if (z_offset != nullptr) m_z_offset = z_offset->value; -#endif // ENABLE_Z_OFFSET_CORRECTION } void GCodeProcessor::apply_config(const DynamicPrintConfig& config) @@ -1158,11 +1156,9 @@ void GCodeProcessor::apply_config(const DynamicPrintConfig& config) if (spiral_vase != nullptr) m_spiral_vase_active = spiral_vase->value; -#if ENABLE_Z_OFFSET_CORRECTION const ConfigOptionFloat* z_offset = config.option("z_offset"); if (z_offset != nullptr) m_z_offset = z_offset->value; -#endif // ENABLE_Z_OFFSET_CORRECTION } void GCodeProcessor::enable_stealth_time_estimator(bool enabled) @@ -1195,9 +1191,7 @@ void GCodeProcessor::reset() m_forced_height = 0.0f; m_mm3_per_mm = 0.0f; m_fan_speed = 0.0f; -#if ENABLE_Z_OFFSET_CORRECTION m_z_offset = 0.0f; -#endif // ENABLE_Z_OFFSET_CORRECTION m_extrusion_role = erNone; m_extruder_id = 0; @@ -2743,11 +2737,7 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line) // the threshold value = 0.0625f == 0.25 * 0.25 is arbitrary, we may find some smarter condition later if ((new_pos - *first_vertex).squaredNorm() < 0.0625f) { -#if ENABLE_Z_OFFSET_CORRECTION set_end_position(0.5f * (new_pos + *first_vertex) + m_z_offset * Vec3f::UnitZ()); -#else - set_end_position(0.5f * (new_pos + *first_vertex)); -#endif // ENABLE_Z_OFFSET_CORRECTION store_move_vertex(EMoveType::Seam); set_end_position(curr_pos); } @@ -3279,11 +3269,7 @@ void GCodeProcessor::store_move_vertex(EMoveType type) m_extrusion_role, m_extruder_id, m_cp_color.current, -#if ENABLE_Z_OFFSET_CORRECTION Vec3f(m_end_position[X], m_end_position[Y], m_processing_start_custom_gcode ? m_first_layer_height : m_end_position[Z] - m_z_offset) + m_extruder_offsets[m_extruder_id], -#else - Vec3f(m_end_position[X], m_end_position[Y], m_processing_start_custom_gcode ? m_first_layer_height : m_end_position[Z]) + m_extruder_offsets[m_extruder_id], -#endif // ENABLE_Z_OFFSET_CORRECTION static_cast(m_end_position[E] - m_start_position[E]), m_feedrate, m_width, diff --git a/src/libslic3r/GCode/GCodeProcessor.hpp b/src/libslic3r/GCode/GCodeProcessor.hpp index e04caa6e22..5ca8f0b026 100644 --- a/src/libslic3r/GCode/GCodeProcessor.hpp +++ b/src/libslic3r/GCode/GCodeProcessor.hpp @@ -540,9 +540,7 @@ namespace Slic3r { float m_forced_height; // mm float m_mm3_per_mm; float m_fan_speed; // percentage -#if ENABLE_Z_OFFSET_CORRECTION float m_z_offset; // mm -#endif // ENABLE_Z_OFFSET_CORRECTION ExtrusionRole m_extrusion_role; unsigned char m_extruder_id; ExtruderColors m_extruder_colors; diff --git a/src/libslic3r/Technologies.hpp b/src/libslic3r/Technologies.hpp index de54e65091..8e6a3cb86c 100644 --- a/src/libslic3r/Technologies.hpp +++ b/src/libslic3r/Technologies.hpp @@ -36,15 +36,6 @@ #define ENABLE_SMOOTH_NORMALS 0 -//================ -// 2.4.1.rc techs -//================ -#define ENABLE_2_4_1_RC 1 - -// Enable correction of toolpaths when z offset is set -#define ENABLE_Z_OFFSET_CORRECTION (1 && ENABLE_2_4_1_RC) - - //==================== // 2.5.0.alpha1 techs //==================== From f3d92bdeff0cb6f5c1685e9910a26418cef1e45e Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Fri, 18 Mar 2022 10:25:00 +0100 Subject: [PATCH 09/10] Fixup of 5de93c8 (incorrectly solved merge conflict) --- src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp index e8c2055f63..4007f0cb0b 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp @@ -154,7 +154,7 @@ void GLGizmoSlaSupports::render_points(const Selection& selection, bool picking) Geometry::Transformation transformation(vol->get_instance_transformation().get_matrix() * vol->get_volume_transformation().get_matrix()); const Transform3d& instance_scaling_matrix_inverse = transformation.get_matrix(true, true, false, true).inverse(); #if ENABLE_GL_SHADERS_ATTRIBUTES - const Transform3d instance_matrix = Geometry::assemble_transform(m_c->selection_info()->get_sla_shift() * Vec3d::UnitZ()) * vol->get_instance_transformation().get_matrix(); + const Transform3d instance_matrix = Geometry::assemble_transform(m_c->selection_info()->get_sla_shift() * Vec3d::UnitZ()) * transformation.get_matrix(); const Camera& camera = wxGetApp().plater()->get_camera(); const Transform3d& view_matrix = camera.get_view_matrix(); const Transform3d& projection_matrix = camera.get_projection_matrix(); From b094ea3c9aca7d91a505d3811c430f1861fe052b Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Fri, 18 Mar 2022 12:52:14 +0100 Subject: [PATCH 10/10] Added github issue template form --- .github/ISSUE_TEMPLATE/bug_report_form.yml | 65 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 9 +++ .github/ISSUE_TEMPLATE/feature_request.md | 20 +++++++ 3 files changed, 94 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report_form.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report_form.yml b/.github/ISSUE_TEMPLATE/bug_report_form.yml new file mode 100644 index 0000000000..7cbaddc49f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report_form.yml @@ -0,0 +1,65 @@ +name: Bug Report +description: File a bug report +body: + - type: markdown + attributes: + value: | + Before filing, please check if the issue already exists (either open or closed) by using the search bar on the issues page. If it does, comment there. Even if it's closed, we can reopen it based on your comment. + - type: textarea + id: what-happened + attributes: + label: Description of the bug + description: What happened? Please, enclose a screenshot whenever possible (even when you think the description is clear). What did you expect to happen? In case of 3D rendering issues, please attach the content of menu Help -> System Info dialog. + placeholder: | + What is the problem? + What did you expect? + You paste or drop screenshots here + validations: + required: true + - type: textarea + id: to_reproduce + attributes: + label: Project file & How to reproduce + description: "*Please* upload a ZIP archive containing the project file used when the problem arise. Please export it just before the problem occurs. Even if you did nothing and/or there is no object, export it! (it contains your current configuration)." + placeholder: | + `File`->`Export project as...` then zip it & drop it here + Also, if needed include the steps to reproduce the bug: + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error + validations: + required: true + - type: checkboxes + attributes: + label: Checklist of files included above + options: + - label: Project file + - label: Screenshot + validations: + required: true + - type: input + id: version + attributes: + label: Version of PrusaSlicer + description: What version of PrusaSlicer are you running? You can see the full version in `Help` -> `About PrusaSlicer`. + placeholder: e.g. 2.4.1-alpha2-win64 / 2.3.3-linux / 2.4.1-alpha0+61-win64-gcd2459455 ... + validations: + required: true + - type: input + id: os + attributes: + label: Operating system + description: with the version if possible + placeholder: e.g. Windows 7/8/10/11 ... , Ubuntu 22.04/Debian ... , macOS 10.15/11.1 ... + validations: + required: true + - type: input + id: printer + attributes: + label: Printer model + description: Please, fill this in even when it seems irrelevant. + placeholder: voron 2.4 with afterburner + validations: + required: true + diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000..d373b69eea --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,9 @@ +contact_links: + - name: PrusaSlicer Manual and Support + url: https://help.prusa3d.com/en/article/customer-support_2287/ + about: If you are not sure that what you are reporting is really a bug, please, consult the manual first. + - name: PrusaPrinters Forum + url: https://forum.prusaprinters.org/forum/prusaslicer/ + about: Please get in touch on our PrusaPrinters Community Forum! (Not an official support channel.) + +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000000..aed1846872 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe how it would work** +Be as descriptive as your skill level allows you. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or paint drawing about the feature request here.