From f27bd26fbf870f95aa5977c01b67642d90955883 Mon Sep 17 00:00:00 2001 From: supermerill Date: Wed, 11 Nov 2020 16:53:46 +0100 Subject: some fixes: win build doc, 3mf safety read, svg export without square fix color.ini file --- doc/How to build - Windows.md | 2 +- resources/ui_layout/colors.ini | 2 +- src/libslic3r/Format/3mf.cpp | 9 +++++---- src/libslic3r/SVG.cpp | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/How to build - Windows.md b/doc/How to build - Windows.md index 34b557654..3d6dc3220 100644 --- a/doc/How to build - Windows.md +++ b/doc/How to build - Windows.md @@ -16,7 +16,7 @@ msbuild /m ALL_BUILD.vcxproj and then build superslicer (in ./build): ``` -cmake .. -G "Visual Studio 16 2019" -A x64 -DCMAKE_PREFIX_PATH="PATH_TO_SuperSlicer\deps\destdir\usr\local" +cmake .. -G "Visual Studio 16 2019" -A x64 -DCMAKE_PREFIX_PATH="PATH_TO_SuperSlicer\deps\build\destdir\usr\local" msbuild /m /P:Configuration=Release INSTALL.vcxproj ``` You can also build it in visual studio, for that open the .sln. diff --git a/resources/ui_layout/colors.ini b/resources/ui_layout/colors.ini index 77dac8c4d..56c2b5f2c 100644 --- a/resources/ui_layout/colors.ini +++ b/resources/ui_layout/colors.ini @@ -7,7 +7,7 @@ Solid infill = D732D7 Top solid infill = FF1A1A Ironing = FF6868 Bridge infill = 9999FF -Internal Bridge infill = AAAADD +Internal bridge infill = AAAADD Thin wall = FFC000 Gap fill = FFFFFF Skirt = 845321 diff --git a/src/libslic3r/Format/3mf.cpp b/src/libslic3r/Format/3mf.cpp index 19837455e..446da363e 100644 --- a/src/libslic3r/Format/3mf.cpp +++ b/src/libslic3r/Format/3mf.cpp @@ -1219,8 +1219,8 @@ namespace Slic3r { pt::ptree tree = code.second; double print_z = tree.get (".print_z" ); - int extruder = tree.get (".extruder"); - std::string color = tree.get (".color" ); + int extruder = tree.get (".extruder", 0); + std::string color = tree.get (".color" ,"" ); CustomGCode::Type type; std::string extra; @@ -1228,7 +1228,7 @@ namespace Slic3r { { // It means that data was saved in old version (2.2.0 and older) of PrusaSlicer // read old data ... - std::string gcode = tree.get (".gcode"); + std::string gcode = tree.get (".gcode", ""); // ... and interpret them to the new data type = gcode == "M600" ? CustomGCode::ColorChange : gcode == "M601" ? CustomGCode::PausePrint : @@ -1239,7 +1239,7 @@ namespace Slic3r { else { type = static_cast(tree.get(".type")); - extra = tree.get(".extra"); + extra = tree.get(".extra", ""); } m_model->custom_gcode_per_print_z.gcodes.push_back(CustomGCode::Item{print_z, type, extruder, color, extra}) ; } @@ -2805,6 +2805,7 @@ bool _3MF_Exporter::_add_custom_gcode_per_print_z_file_to_archive( mz_zip_archiv code_tree.put(".print_z" , code.print_z ); code_tree.put(".type" , static_cast(code.type)); code_tree.put(".extruder" , code.extruder ); + code_tree.put(".color" , code.color ); code_tree.put(".info" , code.color ); code_tree.put(".extra" , code.extra ); diff --git a/src/libslic3r/SVG.cpp b/src/libslic3r/SVG.cpp index e753d1e17..ba654a14e 100644 --- a/src/libslic3r/SVG.cpp +++ b/src/libslic3r/SVG.cpp @@ -21,7 +21,7 @@ bool SVG::open(const char* afilename) " \n" " \n" ); - fprintf(this->f, "\n", 2000.f, 2000.f); + //fprintf(this->f, "\n", 2000.f, 2000.f); return true; } @@ -43,7 +43,7 @@ bool SVG::open(const char* afilename, const BoundingBox &bbox, const coord_t bbo " \n" " \n", h, w); - fprintf(this->f, "\n", w, h); + //fprintf(this->f, "\n", w, h); return true; } -- cgit v1.2.3