diff options
author | Lukas Matena <lukasmatena@seznam.cz> | 2021-05-24 13:20:55 +0300 |
---|---|---|
committer | Lukas Matena <lukasmatena@seznam.cz> | 2021-05-24 13:22:00 +0300 |
commit | c05b8210f24c6d127778a8762ba1d5af1411e7fd (patch) | |
tree | 23da4b5b9c034cbfc9953ada2fc134de0f8e1790 /src/admesh | |
parent | 4a7f07852741d8109d74b67eddaa7d3027028301 (diff) |
Fixed several locales issues on file import/export
Diffstat (limited to 'src/admesh')
-rw-r--r-- | src/admesh/shared.cpp | 6 | ||||
-rw-r--r-- | src/admesh/stlinit.cpp | 3 |
2 files changed, 8 insertions, 1 deletions
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) |