From 48c2e464cbba827abfff8ce081e0634cdb98cb43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Tue, 1 Jun 2021 12:47:22 +0200 Subject: [PATCH 1/7] PLY writer: Added option to choose if we want to write texture coordinates as uv or ply (Thanks to Ossi Saukko for the patch) --- Doc/changelog.docu | 1 + src/OpenMesh/Core/IO/Options.hh | 4 +++- src/OpenMesh/Core/IO/writer/PLYWriter.cc | 9 +++++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Doc/changelog.docu b/Doc/changelog.docu index 1b5e0bf2..9a9e8ebb 100644 --- a/Doc/changelog.docu +++ b/Doc/changelog.docu @@ -33,6 +33,7 @@
  • OM Writer: Removed debug output
  • OM Writer/Reader: Added support for (re)storing properties of type vector
  • OM Reader: Properties can now be restored from files without the need to create the properties beforehand. Custom types need to be registered for this to work using the OM_REGISTER_PROPERTY_TYPE macro.
  • +
  • PLY writer: Added option to choose if we want to write texture coordinates as uv or ply
  • Tools diff --git a/src/OpenMesh/Core/IO/Options.hh b/src/OpenMesh/Core/IO/Options.hh index 2e642180..347098af 100644 --- a/src/OpenMesh/Core/IO/Options.hh +++ b/src/OpenMesh/Core/IO/Options.hh @@ -111,7 +111,8 @@ public: ColorAlpha = 0x0800, ///< Has (r) / store (w) alpha values for colors ColorFloat = 0x1000, ///< Has (r) / store (w) float values for colors (currently only implemented for PLY and OFF files) Custom = 0x2000, ///< Has (r) custom properties (currently only implemented in PLY Reader ASCII version) - Status = 0x4000 ///< Has (r) / store (w) status properties + Status = 0x4000, ///< Has (r) / store (w) status properties + TexCoordST = 0x8000 ///< Write texture coordinates as ST instead of UV }; public: @@ -212,6 +213,7 @@ public: bool face_has_status() const { return check(Status); } bool color_has_alpha() const { return check(ColorAlpha); } bool color_is_float() const { return check(ColorFloat); } + bool use_st_coordinates() const { return check(TexCoordST); } /// Returns true if _rhs has the same options enabled. diff --git a/src/OpenMesh/Core/IO/writer/PLYWriter.cc b/src/OpenMesh/Core/IO/writer/PLYWriter.cc index 49db3ec6..dc9e864a 100644 --- a/src/OpenMesh/Core/IO/writer/PLYWriter.cc +++ b/src/OpenMesh/Core/IO/writer/PLYWriter.cc @@ -278,8 +278,13 @@ void _PLYWriter_::write_header(std::ostream& _out, BaseExporter& _be, Options& _ } if ( _opt.vertex_has_texcoord() ){ - _out << "property float u" << '\n'; - _out << "property float v" << '\n'; + if ( _opt.use_st_coordinates() ){ + _out << "property float s" << '\n'; + _out << "property float t" << '\n'; + } else { + _out << "property float u" << '\n'; + _out << "property float v" << '\n'; + } } if ( _opt.vertex_has_color() ){ From ee99f0bb048e682fa4b7935dbe8fc5d379f0c4db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Tue, 1 Jun 2021 14:03:05 +0200 Subject: [PATCH 2/7] Fixed cppcheck warning, variable shadowing --- src/OpenMesh/Core/IO/IOManager.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OpenMesh/Core/IO/IOManager.cc b/src/OpenMesh/Core/IO/IOManager.cc index 8b3a4193..bdc77859 100644 --- a/src/OpenMesh/Core/IO/IOManager.cc +++ b/src/OpenMesh/Core/IO/IOManager.cc @@ -241,13 +241,13 @@ find_writer(const std::string& _format) { using std::string; - string::size_type dot = _format.rfind('.'); + string::size_type dotpos = _format.rfind('.'); string ext; - if (dot == string::npos) + if (dotpos == string::npos) ext = _format; else - ext = _format.substr(dot+1,_format.length()-(dot+1)); + ext = _format.substr(dotpos+1,_format.length()-(dotpos+1)); std::set::const_iterator it = writer_modules_.begin(); std::set::const_iterator it_end = writer_modules_.end(); From d9679b512f0e1f614df196e974b96944e5086c7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Tue, 1 Jun 2021 14:10:25 +0200 Subject: [PATCH 3/7] Fixed cppcheck warning, overwrite --- src/OpenMesh/Core/IO/writer/OBJWriter.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenMesh/Core/IO/writer/OBJWriter.cc b/src/OpenMesh/Core/IO/writer/OBJWriter.cc index 681fbfb1..b83dde24 100644 --- a/src/OpenMesh/Core/IO/writer/OBJWriter.cc +++ b/src/OpenMesh/Core/IO/writer/OBJWriter.cc @@ -327,7 +327,7 @@ write(std::ostream& _out, BaseExporter& _be, Options _opt, std::streamsize _prec { if (useMatrial && _opt.check(Options::FaceColor) ){ - size_t material = std::numeric_limits::max(); + size_t material; //color with alpha if ( _opt.color_has_alpha() ){ From dbbfd31bb8f9de8ac445d7c94d360f37f205e2b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Tue, 1 Jun 2021 14:45:36 +0200 Subject: [PATCH 4/7] Output ldd for unittests --- CI/ci-linux-build.sh | 5 ++++- CI/ci-linux-test.sh | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CI/ci-linux-build.sh b/CI/ci-linux-build.sh index eb64b64d..8a3a5fca 100755 --- a/CI/ci-linux-build.sh +++ b/CI/ci-linux-build.sh @@ -58,6 +58,9 @@ else # build unittests make $MAKE_OPTIONS unittests + ldd Unittests/unittests + + # Creating System Library folder to contain all dependend libraries to run OpenFlipper if [ ! -d systemlib ]; then echo "Creating systemlib folder" @@ -72,4 +75,4 @@ else fi fi -cd .. \ No newline at end of file +cd .. diff --git a/CI/ci-linux-test.sh b/CI/ci-linux-test.sh index 063e3781..a435fcb3 100755 --- a/CI/ci-linux-test.sh +++ b/CI/ci-linux-test.sh @@ -58,6 +58,10 @@ echo "Running unittests $BUILD_TYPE version with vectorchecks enabled" echo "======================================================================" echo -e "${NC}" + +ldd ./unittests + + cd Unittests #execute tests From c63a90c1015ff9d342484452e65bcae93ed96647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Wed, 2 Jun 2021 08:50:47 +0200 Subject: [PATCH 5/7] Fixed order of test --- CI/ci-linux-test.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CI/ci-linux-test.sh b/CI/ci-linux-test.sh index a435fcb3..0fedf3ae 100755 --- a/CI/ci-linux-test.sh +++ b/CI/ci-linux-test.sh @@ -58,12 +58,10 @@ echo "Running unittests $BUILD_TYPE version with vectorchecks enabled" echo "======================================================================" echo -e "${NC}" +cd Unittests ldd ./unittests - -cd Unittests - #execute tests ./unittests --gtest_color=yes --gtest_output=xml:./report.xml From 919abd832608ea2a7d0ba1042f2a7c6e009c56a5 Mon Sep 17 00:00:00 2001 From: Jan Date: Fri, 4 Jun 2021 15:14:23 +0200 Subject: [PATCH 6/7] Fixed thanks changelog entry --- Doc/changelog.docu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/changelog.docu b/Doc/changelog.docu index 9a9e8ebb..385679c7 100644 --- a/Doc/changelog.docu +++ b/Doc/changelog.docu @@ -33,7 +33,7 @@
  • OM Writer: Removed debug output
  • OM Writer/Reader: Added support for (re)storing properties of type vector
  • OM Reader: Properties can now be restored from files without the need to create the properties beforehand. Custom types need to be registered for this to work using the OM_REGISTER_PROPERTY_TYPE macro.
  • -
  • PLY writer: Added option to choose if we want to write texture coordinates as uv or ply
  • +
  • PLY writer: Added option to choose if we want to write texture coordinates as uv or st (Thanks to Ossi Saukko from Centria Research and Development for the patch)
  • Tools From b73c35aae3a009fe1a13774c8e0edcc2d1b6f366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Tue, 21 Sep 2021 09:41:06 +0200 Subject: [PATCH 7/7] Macro rename from vci_qt5 to vci_qt and renamed qt5_install_path to qt_install_path --- CI/Windows.bat | 8 ++++---- CI/ci-linux-prepare.sh | 12 ++++++------ cmake-library | 2 +- src/OpenMesh/Apps/CMakeLists.txt | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CI/Windows.bat b/CI/Windows.bat index 903c74e8..1a1c9f22 100644 --- a/CI/Windows.bat +++ b/CI/Windows.bat @@ -25,12 +25,12 @@ IF "%BUILD_PLATFORM%" == "VS2015" ( IF "%ARCHITECTURE%" == "x64" ( set QT_INSTALL_PATH=E:\Qt\Qt5.6.0-vs2015-%STRING_ARCH%\5.6\msvc2015_64 - set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=E:\Qt\Qt5.6.0-vs2015-%STRING_ARCH%\5.6\msvc2015_64 + set QT_BASE_CONFIG=-DQT_INSTALL_PATH=E:\Qt\Qt5.6.0-vs2015-%STRING_ARCH%\5.6\msvc2015_64 ) IF "%ARCHITECTURE%" == "x32" ( set QT_INSTALL_PATH=E:\Qt\Qt5.6.0-vs2015-%STRING_ARCH%\5.6\msvc2015 - set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=E:\Qt\Qt5.6.0-vs2015-%STRING_ARCH%\5.6\msvc2015 + set QT_BASE_CONFIG=-DQT_INSTALL_PATH=E:\Qt\Qt5.6.0-vs2015-%STRING_ARCH%\5.6\msvc2015 ) ) @@ -43,7 +43,7 @@ IF "%BUILD_PLATFORM%" == "VS2017" ( IF "%ARCHITECTURE%" == "x64" ( set QT_INSTALL_PATH=E:\Qt\Qt5.10.1\5.10.1\msvc2017_64 - set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=E:\Qt\Qt5.10.1\5.10.1\msvc2017_64 + set QT_BASE_CONFIG=-DQT_INSTALL_PATH=E:\Qt\Qt5.10.1\5.10.1\msvc2017_64 ) ) @@ -57,7 +57,7 @@ IF "%BUILD_PLATFORM%" == "VS2019" ( IF "%ARCHITECTURE%" == "x64" ( set QT_INSTALL_PATH=E:\Qt\5.15.2\msvc2019_64 - set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=E:\Qt\5.15.2\msvc2019_64 + set QT_BASE_CONFIG=-DQT_INSTALL_PATH=E:\Qt\5.15.2\msvc2019_64 ) ) diff --git a/CI/ci-linux-prepare.sh b/CI/ci-linux-prepare.sh index 485057f5..a18fee41 100755 --- a/CI/ci-linux-prepare.sh +++ b/CI/ci-linux-prepare.sh @@ -42,27 +42,27 @@ fi if [ "$QTVERSION" == "qt5.13.0" ]; then echo "Using QT5.13.0"; BUILDPATH="$BUILDPATH-qt5.13.0" - OPTIONS="$OPTIONS -DQT5_INSTALL_PATH=~/sw/Qt/5.13.0/gcc_64" + OPTIONS="$OPTIONS -DQT_INSTALL_PATH=~/sw/Qt/5.13.0/gcc_64" elif [ "$QTVERSION" == "qt5.12.2" ]; then echo "Using QT5.12.2"; BUILDPATH="$BUILDPATH-qt5.12.2" - OPTIONS="$OPTIONS -DQT5_INSTALL_PATH=~/sw/Qt/5.12.2/gcc_64" + OPTIONS="$OPTIONS -DQT_INSTALL_PATH=~/sw/Qt/5.12.2/gcc_64" elif [ "$QTVERSION" == "qt5.11.2" ]; then echo "Using QT5.11.2"; BUILDPATH="$BUILDPATH-qt5.11.2" - OPTIONS="$OPTIONS -DQT5_INSTALL_PATH=~/sw/Qt/5.11.2/gcc_64" + OPTIONS="$OPTIONS -DQT_INSTALL_PATH=~/sw/Qt/5.11.2/gcc_64" elif [ "$QTVERSION" == "qt5.9.0" ]; then echo "Using QT5.9.0"; BUILDPATH="$BUILDPATH-qt5.9.0" - OPTIONS="$OPTIONS -DQT5_INSTALL_PATH=~/sw/Qt/5.9/gcc_64" + OPTIONS="$OPTIONS -DQT_INSTALL_PATH=~/sw/Qt/5.9/gcc_64" elif [ "$QTVERSION" == "qt5.13.2" ]; then echo "Using QT5.13.2"; BUILDPATH="$BUILDPATH-qt5.13.2" - OPTIONS="$OPTIONS -DQT5_INSTALL_PATH=~/sw/Qt/5.13.2/gcc_64" + OPTIONS="$OPTIONS -DQT_INSTALL_PATH=~/sw/Qt/5.13.2/gcc_64" elif [ "$QTVERSION" == "qt5.15.1" ]; then echo "Using QT5.15.1"; BUILDPATH="$BUILDPATH-qt5.15.1" - OPTIONS="$OPTIONS -DQT5_INSTALL_PATH=~/sw/Qt/5.15.1/gcc_64" + OPTIONS="$OPTIONS -DQT_INSTALL_PATH=~/sw/Qt/5.15.1/gcc_64" fi #===================================== diff --git a/cmake-library b/cmake-library index ab9edd27..484e5bd8 160000 --- a/cmake-library +++ b/cmake-library @@ -1 +1 @@ -Subproject commit ab9edd278c64b3a387f4d8eb39eb2c2a091d6481 +Subproject commit 484e5bd8377ef837c45ba22f6619c5a72368df41 diff --git a/src/OpenMesh/Apps/CMakeLists.txt b/src/OpenMesh/Apps/CMakeLists.txt index 2e17ab99..441b438f 100644 --- a/src/OpenMesh/Apps/CMakeLists.txt +++ b/src/OpenMesh/Apps/CMakeLists.txt @@ -48,7 +48,7 @@ if ( BUILD_APPS ) Qt5OpenGL Qt5Gui ) - vci_qt5 () + vci_qt () set(CMAKE_AUTOMOC ON) endif()