diff --git a/src/admesh/shared.cpp b/src/admesh/shared.cpp index 902bbfc9b..a8fbc2a87 100644 --- a/src/admesh/shared.cpp +++ b/src/admesh/shared.cpp @@ -30,6 +30,8 @@ #include "stl.h" +#include "libslic3r/LocalesUtils.hpp" + void stl_generate_shared_vertices(stl_file *stl, indexed_triangle_set &its) { // 3 indices to vertex per face @@ -127,6 +129,7 @@ void stl_generate_shared_vertices(stl_file *stl, indexed_triangle_set &its) bool its_write_off(const indexed_triangle_set &its, const char *file) { + Slic3r::CNumericLocalesSetter locales_setter; /* Open the file */ FILE *fp = boost::nowide::fopen(file, "w"); if (fp == nullptr) { @@ -146,6 +149,7 @@ bool its_write_off(const indexed_triangle_set &its, const char *file) bool its_write_vrml(const indexed_triangle_set &its, const char *file) { + Slic3r::CNumericLocalesSetter locales_setter; /* Open the file */ FILE *fp = boost::nowide::fopen(file, "w"); if (fp == nullptr) { @@ -188,7 +192,7 @@ bool its_write_vrml(const indexed_triangle_set &its, const char *file) bool its_write_obj(const indexed_triangle_set &its, const char *file) { - + Slic3r::CNumericLocalesSetter locales_setter; FILE *fp = boost::nowide::fopen(file, "w"); if (fp == nullptr) { BOOST_LOG_TRIVIAL(error) << "stl_write_obj: Couldn't open " << file << " for writing"; diff --git a/src/admesh/stlinit.cpp b/src/admesh/stlinit.cpp index 6aa2c4417..29131b1c7 100644 --- a/src/admesh/stlinit.cpp +++ b/src/admesh/stlinit.cpp @@ -32,6 +32,8 @@ #include "stl.h" +#include "libslic3r/LocalesUtils.hpp" + #ifndef SEEK_SET #error "SEEK_SET not defined" #endif @@ -232,6 +234,7 @@ static bool stl_read(stl_file *stl, FILE *fp, int first_facet, bool first) bool stl_open(stl_file *stl, const char *file) { + Slic3r::CNumericLocalesSetter locales_setter; stl->clear(); FILE *fp = stl_open_count_facets(stl, file); if (fp == nullptr) diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index f71921bec..285f07051 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -992,6 +992,9 @@ void GCodeViewer::export_toolpaths_to_obj(const char* filename) const // save materials file boost::filesystem::path mat_filename(filename); mat_filename.replace_extension("mtl"); + + CNumericLocalesSetter locales_setter; + FILE* fp = boost::nowide::fopen(mat_filename.string().c_str(), "w"); if (fp == nullptr) { BOOST_LOG_TRIVIAL(error) << "GCodeViewer::export_toolpaths_to_obj: Couldn't open " << mat_filename.string().c_str() << " for writing";