From a76678bbd725d5d6bec7af14765ddab0493cb144 Mon Sep 17 00:00:00 2001 From: Ivan Paden Date: Fri, 2 Jun 2023 22:36:32 +0200 Subject: [PATCH] STL export bugfix First empty line can break reading --- CHANGELOG.md | 4 ++++ src/io.cpp | 3 ++- src/main.cpp | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4996cb8..2ff539e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [0.4.1] - 2023-06-05 +### Fixed +- STL export bugfix + ## [0.4.0] - 2023-05-03 ### Added - (breaking) Support for many polygon formats (through GDAL) diff --git a/src/io.cpp b/src/io.cpp index e3c84dd..130e35a 100644 --- a/src/io.cpp +++ b/src/io.cpp @@ -384,9 +384,10 @@ void IO::output_stl(const OutputFeaturesPtr& allFeatures) { of.emplace_back(); of.back().open(Config::get().outputFileName + "_" + Config::get().outputSurfaces[i] + ".stl"); } - of.back() << "\nsolid " << Config::get().outputSurfaces[i]; + of.back() << "solid " << Config::get().outputSurfaces[i]; of.back() << fs[i]; of.back() << "\nendsolid " << Config::get().outputSurfaces[i]; + if (!Config::get().outputSeparately && i != fs.size() - 1) of.back() << "\n"; } for (auto& f : of) f.close(); } diff --git a/src/main.cpp b/src/main.cpp index b7d8bb7..a9c8d40 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -31,7 +31,7 @@ #include -std::string CITY4CFD_VERSION = "0.4.0"; +std::string CITY4CFD_VERSION = "0.4.1"; void printWelcome() { auto logo{