From 41e31c31b60280c89f03bc3f8348555285f9fe99 Mon Sep 17 00:00:00 2001 From: rtyr <36745189+rtyr@users.noreply.github.com> Date: Mon, 14 Feb 2022 09:33:40 +0100 Subject: [PATCH 1/3] Updated Anycubic Photon structure. --- resources/profiles/Anycubic.ini | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/resources/profiles/Anycubic.ini b/resources/profiles/Anycubic.ini index a67ba0962..821d87462 100644 --- a/resources/profiles/Anycubic.ini +++ b/resources/profiles/Anycubic.ini @@ -69,7 +69,7 @@ name = Photon Mono X variants = default technology = SLA family = PHOTON MONO -default_materials = Generic Blue Resin MONO @0.05 +default_materials = Generic Blue Resin @MONO 0.05 # All presets starting with asterisk, for example *common*, are intermediate and they will # not make it into the user interface. @@ -1940,15 +1940,14 @@ support_pillar_widening_factor = 0 supports_enable = 1 support_small_pillar_diameter_percent = 60% -[sla_print:0.05 ANYCUBIC SLA] +[sla_print:0.05 Normal @ANYCUBIC] inherits = *common print ANYCUBIC SLA* layer_height = 0.05 - ########### Materials [sla_material:*common ANYCUBIC SLA*] -compatible_printers_condition = family=="PHOTON MONO" +compatible_printers_condition = printer_notes=~/.*PHOTONMONOX.*/ compatible_prints_condition = layer_height == 0.05 exposure_time = 7 initial_exposure_time = 40 @@ -1959,13 +1958,14 @@ material_notes = LIFT_DISTANCE=8.0\nLIFT_SPEED=2.5\nRETRACT_SPEED=3.0\nBOTTOM_LI [sla_material:*common 0.05 ANYCUBIC SLA*] inherits = *common ANYCUBIC SLA* -[sla_material:Generic Blue Resin MONO @0.05] +[sla_material:Generic Blue Resin @MONO 0.05] inherits = *common 0.05 ANYCUBIC SLA* exposure_time = 2.5 initial_exposure_time = 40 material_type = Tough material_vendor = Generic material_colour = #6080EC +compatible_printers_condition = printer_notes=~/.*PHOTONMONOX.*/ ########## Printers @@ -1973,8 +1973,8 @@ material_colour = #6080EC printer_technology = SLA printer_model = PHOTON MONO X printer_variant = default -default_sla_material_profile = Generic Blue Resin MONO @0.05 -default_sla_print_profile = 0.05 ANYCUBIC SLA +default_sla_material_profile = Generic Blue Resin @MONO 0.05 +default_sla_print_profile = 0.05 Normal @ANYCUBIC thumbnails = 224x168 sla_archive_format = pwmx bed_shape = 1.48x1.02,193.48x1.02,193.48x121.02,1.48x121.02 @@ -1996,5 +1996,3 @@ printer_correction = 1,1,1 gamma_correction = 1 area_fill = 45 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_ANYCUBIC\nPRINTER_MODEL_PHOTONMONOX\n - - From 05087540334682dfe657f039fe7d94a5cc47e6cb Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Mon, 14 Feb 2022 09:53:59 +0100 Subject: [PATCH 2/3] SLA SVG export: Using string_view literals to avoid unnecessary std::string allocations and faster string additions (length of a string_view literal is known without having to iterate to the trailing NULL). --- src/libslic3r/Format/SL1_SVG.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/libslic3r/Format/SL1_SVG.cpp b/src/libslic3r/Format/SL1_SVG.cpp index 0ea230611..a7a8c9ed6 100644 --- a/src/libslic3r/Format/SL1_SVG.cpp +++ b/src/libslic3r/Format/SL1_SVG.cpp @@ -6,6 +6,8 @@ #include #include #include +#include +using namespace std::literals; namespace Slic3r { @@ -77,20 +79,23 @@ void append_svg(std::string &buf, const Polygon &poly) char intbuf[coord_t_bufsize]; - buf += std::string(" data; - constexpr const char finish[] = "\n"; + constexpr auto finish = "\n"sv; data.reserve(m_svg.size() + std::size(finish)); std::copy(m_svg.begin(), m_svg.end(), std::back_inserter(data)); - std::copy(finish, finish + std::size(finish) - 1, std::back_inserter(data)); + std::copy(finish.begin(), finish.end() - 1, std::back_inserter(data)); return sla::EncodedRaster{std::move(data), "svg"}; } From 5e78203241e343610e072f54e0f2498723087c3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hejl?= Date: Mon, 14 Feb 2022 10:47:39 +0100 Subject: [PATCH 3/3] Added missing includes (GCC11.1 without PCH). --- src/libslic3r/Format/pwmx.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libslic3r/Format/pwmx.cpp b/src/libslic3r/Format/pwmx.cpp index 99785b8d0..3be3c3d57 100644 --- a/src/libslic3r/Format/pwmx.cpp +++ b/src/libslic3r/Format/pwmx.cpp @@ -5,6 +5,9 @@ #include #include +#include +#include + #define TAG_INTRO "ANYCUBIC\0\0\0\0" #define TAG_HEADER "HEADER\0\0\0\0\0\0"