From c8ab814421779c4bee73bd040bc329147fcc7653 Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Thu, 21 May 2020 19:39:38 -0400 Subject: [PATCH 01/14] Use Conan to install dependencies --- CMakeLists.txt | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6bec6ea..fd132ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,11 @@ +project(MFIX-Parser + DESCRIPTION "Parser for CSG files for MFiX-Exa" + HOMEPAGE_URL "https://mfix.netl.doe.gov/gitlab/exa/mfix-parser" + LANGUAGES CXX + ) + +option(ENABLE_CSG "Build with CSG support" OFF) + ################################################################################ # CSG Parser ################################################################################ @@ -11,21 +19,29 @@ target_sources(csg PRIVATE src/csg/impl/matrix_functions.cpp ) +# Download automatically, you can also just copy the conan.cmake file +if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake") + message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan") + file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/master/conan.cmake" + "${CMAKE_BINARY_DIR}/conan.cmake") +endif() + +include(${CMAKE_BINARY_DIR}/conan.cmake) + +conan_cmake_run(REQUIRES + Catch2/2.6.0@catchorg/stable + cgal/5.0.2 + pegtl/2.8.1@taocpp/stable + BASIC_SETUP) + target_include_directories(csg PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/subprojects/PEGTL/include) + ${CONAN_INCLUDE_DIRS_PEGTL}) target_link_libraries(csg PRIVATE stdc++fs) target_compile_features(csg PRIVATE cxx_std_17) -SET(catch2_dir ${CMAKE_CURRENT_SOURCE_DIR}/subprojects/Catch2) - -if(NOT EXISTS "${catch2_dir}/CMakeLists.txt") - message(FATAL_ERROR "File ${catch2_dir}/CMakeLists.txt does not exist! The submodules were not downloaded! GIT_SUBMODULE was turned off or failed. Please update submodules and try again.") -endif() - -add_subdirectory(${catch2_dir} ${CMAKE_CURRENT_BINARY_DIR}/catch_build) -list(APPEND CMAKE_MODULE_PATH "${catch2_dir}/contrib/") +list(APPEND CMAKE_MODULE_PATH "${CONAN_LIB_DIRS_CATCH2}/cmake/Catch2") include(CTest) include(Catch) -- GitLab From 30e6608b49c95da1d7411ee2f9fc4f0280f3200a Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Thu, 21 May 2020 20:37:37 -0400 Subject: [PATCH 02/14] Use Conan from Meson --- conanfile.txt | 7 +++++++ meson.build | 8 ++++++-- src/csg/impl/csg.cpp | 13 +++++++++++++ src/csg/meson.build | 2 +- src/csg/tests/meson.build | 3 ++- src/inputs/meson.build | 2 +- src/inputs/tests/meson.build | 3 ++- 7 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 conanfile.txt diff --git a/conanfile.txt b/conanfile.txt new file mode 100644 index 0000000..b377da6 --- /dev/null +++ b/conanfile.txt @@ -0,0 +1,7 @@ +[requires] +Catch2/2.6.0@catchorg/stable +cgal/5.0.2 +pegtl/2.8.1@taocpp/stable + +[generators] +pkg_config diff --git a/meson.build b/meson.build index f6a472d..bc28bd3 100644 --- a/meson.build +++ b/meson.build @@ -2,8 +2,12 @@ project('mfix-parser', 'cpp', version : '0.1', default_options : ['warning_level=3', 'cpp_std=c++2a']) -tao_inc = include_directories('subprojects/PEGTL/include') -catch2_inc = include_directories('subprojects/Catch2/single_include') +run_command('conan', 'install', '--install-folder', meson.build_root(), meson.source_root(), check: true) + +pegtl = dependency('pegtl', method: 'pkg-config') +catch2 = dependency('Catch2', method: 'pkg-config') +cgal = dependency('cgal', method: 'pkg-config') + parser_inc = include_directories( 'src/csg', 'src/csg/impl', diff --git a/src/csg/impl/csg.cpp b/src/csg/impl/csg.cpp index 80fa8dd..b89a9c7 100644 --- a/src/csg/impl/csg.cpp +++ b/src/csg/impl/csg.cpp @@ -1,3 +1,9 @@ +#include +#include +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; +typedef K::Point_2 Point; +typedef CGAL::Polygon_2 Polygon_2; + #include #include #include @@ -15,6 +21,13 @@ bool has_ext(std::string filename, std::string extension) { } std::optional read_csg(std::string geom_file) { + + // Demonstrate use of CGAL + Point points[] = {Point(0, 0), Point(5.1, 0), Point(1, 1), Point(0.5, 6)}; + Polygon_2 pgn(points, points + 4); + std::cout << "The polygon is " << (pgn.is_simple() ? "" : "not ") << "simple." << std::endl; + std::cout << "The polygon is " << (pgn.is_convex() ? "" : "not ") << "convex." << std::endl; + if (!has_ext(geom_file, csg_ext)) { std::cout << "Filename: " << geom_file << " must has extension .csg" << std::endl; diff --git a/src/csg/meson.build b/src/csg/meson.build index f708196..a65bc68 100644 --- a/src/csg/meson.build +++ b/src/csg/meson.build @@ -5,7 +5,7 @@ lib_csg_parser = static_library( 'impl/levelset_2d.cpp', 'impl/parser.cpp', 'impl/matrix_functions.cpp', - include_directories: tao_inc, + dependencies: [pegtl, cgal], install : true) if get_option('cpp_std')=='c++2a' diff --git a/src/csg/tests/meson.build b/src/csg/tests/meson.build index 82895da..1d40c61 100644 --- a/src/csg/tests/meson.build +++ b/src/csg/tests/meson.build @@ -11,7 +11,8 @@ test_csg = executable( 'parser/primitives.t.cpp', 'parser/transform.t.cpp', 'parser/extrude.t.cpp', - include_directories: [parser_inc, catch2_inc], + include_directories: [parser_inc], + dependencies: [catch2, pegtl], link_with: lib_csg_parser, override_options: 'cpp_std=c++2a', ) diff --git a/src/inputs/meson.build b/src/inputs/meson.build index a435c0a..3e993c7 100644 --- a/src/inputs/meson.build +++ b/src/inputs/meson.build @@ -5,7 +5,7 @@ lib_inputs_parser = static_library( 'parser.cpp', 'solver.cpp', 'time.cpp', - include_directories: tao_inc, + dependencies: [pegtl], install : true) subdir('tests') diff --git a/src/inputs/tests/meson.build b/src/inputs/tests/meson.build index 2a9d2a8..0d0fa24 100644 --- a/src/inputs/tests/meson.build +++ b/src/inputs/tests/meson.build @@ -3,7 +3,8 @@ test_inputs = executable( 'parser.t.cpp', 'solver.t.cpp', 'main.cpp', - include_directories: [parser_inc, catch2_inc], + include_directories: [parser_inc], + dependencies: [catch2], link_with: lib_inputs_parser ) test('unit_test_inputs', test_inputs) -- GitLab From 45aa7b95c03cf7e0dde3a334baac5c798d75eeb3 Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Thu, 21 May 2020 20:40:11 -0400 Subject: [PATCH 03/14] Install conan --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aa2f601..8019549 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,7 @@ variables: test:all: script: - - python -m pip install meson ninja + - python -m pip install meson ninja conan - meson build - meson test -C build --print-errorlogs # - ninja -C build src/mfix-parser -- GitLab From eb97b0bcf56f706d7490d5c0818c8b525440cc0e Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Thu, 21 May 2020 20:42:18 -0400 Subject: [PATCH 04/14] Cleanup --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index d47eed4..ca548f4 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,3 @@ This has the MFIX-Exa repo as a submodule in order to test against existing ``in ## Run Tests > meson test -C build - -## Run on inputs file - -> ./build/src/mfix-parser subprojects/mfix/benchmarks/01-HCS/Size0001/inputs && echo "Parsing succeeded." -- GitLab From ec261a9f1542ff2ce2d41838fca0e2c52c5372d0 Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Thu, 21 May 2020 20:55:34 -0400 Subject: [PATCH 05/14] PKG_CONFIG_PATH --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8019549..a9457eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,7 @@ variables: test:all: script: - python -m pip install meson ninja conan - - meson build + - env PKG_CONFIG_PATH=$PWD/build meson build - meson test -C build --print-errorlogs # - ninja -C build src/mfix-parser # - find -name inputs |grep -v tutorials/wdf/mueller | xargs -l ./build/src/mfix-parser # FIXME: correct syntax error (= =) in file -- GitLab From d4ad3a2653ed1d964be44d3caa277405acbaa973 Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Thu, 21 May 2020 22:27:09 -0400 Subject: [PATCH 06/14] Upgrade Catch2 --- conanfile.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.txt b/conanfile.txt index b377da6..4b842af 100644 --- a/conanfile.txt +++ b/conanfile.txt @@ -1,5 +1,5 @@ [requires] -Catch2/2.6.0@catchorg/stable +catch2/2.12.1 cgal/5.0.2 pegtl/2.8.1@taocpp/stable -- GitLab From 7cdab2e1f4231fb4d36abeb658481a6796cc674b Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Thu, 21 May 2020 22:31:36 -0400 Subject: [PATCH 07/14] Upgrade conan --- CMakeLists.txt | 4 +++- meson.build | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fd132ac..d9e8175 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,5 @@ +cmake_minimum_required(VERSION 3.14) + project(MFIX-Parser DESCRIPTION "Parser for CSG files for MFiX-Exa" HOMEPAGE_URL "https://mfix.netl.doe.gov/gitlab/exa/mfix-parser" @@ -29,7 +31,7 @@ endif() include(${CMAKE_BINARY_DIR}/conan.cmake) conan_cmake_run(REQUIRES - Catch2/2.6.0@catchorg/stable + catch2/2.12.1 cgal/5.0.2 pegtl/2.8.1@taocpp/stable BASIC_SETUP) diff --git a/meson.build b/meson.build index bc28bd3..4cd3c59 100644 --- a/meson.build +++ b/meson.build @@ -5,7 +5,7 @@ project('mfix-parser', 'cpp', run_command('conan', 'install', '--install-folder', meson.build_root(), meson.source_root(), check: true) pegtl = dependency('pegtl', method: 'pkg-config') -catch2 = dependency('Catch2', method: 'pkg-config') +catch2 = dependency('catch2', method: 'pkg-config') cgal = dependency('cgal', method: 'pkg-config') parser_inc = include_directories( -- GitLab From 1f9f6c1806adbd120852ea0a837413f084e0be2a Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Fri, 22 May 2020 13:32:24 -0400 Subject: [PATCH 08/14] Run tests from CMake --- .gitlab-ci.yml | 14 +++++++++++--- CMakeLists.txt | 36 +++++++++++++++++------------------- src/csg/CMakeLists.txt | 16 ++++++++++++++++ src/csg/tests/CMakeLists.txt | 24 ++++++++++++++++++++++++ 4 files changed, 68 insertions(+), 22 deletions(-) create mode 100644 src/csg/CMakeLists.txt create mode 100644 src/csg/tests/CMakeLists.txt diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a9457eb..c8be356 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,12 +6,20 @@ variables: ###### Test jobs ##### -test:all: +test:meson: script: - python -m pip install meson ninja conan - env PKG_CONFIG_PATH=$PWD/build meson build - meson test -C build --print-errorlogs -# - ninja -C build src/mfix-parser -# - find -name inputs |grep -v tutorials/wdf/mueller | xargs -l ./build/src/mfix-parser # FIXME: correct syntax error (= =) in file + tags: + - mfix-exa + +test:cmake: + script: + - python -m pip install ninja conan + - cmake -S. -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Debug + - cmake --build build + - cd build + - ctest tags: - mfix-exa diff --git a/CMakeLists.txt b/CMakeLists.txt index d9e8175..7413896 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,20 +6,16 @@ project(MFIX-Parser LANGUAGES CXX ) -option(ENABLE_CSG "Build with CSG support" OFF) +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) -################################################################################ -# CSG Parser -################################################################################ -add_library(csg) - -target_sources(csg PRIVATE - src/csg/impl/parser.cpp - src/csg/impl/levelset_3d.cpp - src/csg/impl/levelset_2d.cpp - src/csg/impl/csg.cpp - src/csg/impl/matrix_functions.cpp - ) +find_program(CCACHE_FOUND ccache) +if(CCACHE_FOUND) + set( CMAKE_CXX_COMPILER_LAUNCHER ccache ) +endif() + +option(ENABLE_CSG "Build with CSG support" OFF) # Download automatically, you can also just copy the conan.cmake file if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake") @@ -32,18 +28,20 @@ include(${CMAKE_BINARY_DIR}/conan.cmake) conan_cmake_run(REQUIRES catch2/2.12.1 - cgal/5.0.2 + # cgal/5.0.2 pegtl/2.8.1@taocpp/stable BASIC_SETUP) +list(APPEND CMAKE_MODULE_PATH "${CONAN_LIB_DIRS_CATCH2}/cmake/Catch2") + +include(CTest) +include(Catch) + +add_subdirectory(src/csg) + target_include_directories(csg PRIVATE ${CONAN_INCLUDE_DIRS_PEGTL}) target_link_libraries(csg PRIVATE stdc++fs) target_compile_features(csg PRIVATE cxx_std_17) - -list(APPEND CMAKE_MODULE_PATH "${CONAN_LIB_DIRS_CATCH2}/cmake/Catch2") - -include(CTest) -include(Catch) diff --git a/src/csg/CMakeLists.txt b/src/csg/CMakeLists.txt new file mode 100644 index 0000000..6fa0bc7 --- /dev/null +++ b/src/csg/CMakeLists.txt @@ -0,0 +1,16 @@ +################################################################################ +# CSG Parser +################################################################################ +add_library(csg) + +target_sources(csg PRIVATE + impl/parser.cpp + impl/levelset_3d.cpp + impl/levelset_2d.cpp + impl/csg.cpp + impl/matrix_functions.cpp + ) + +target_include_directories(csg INTERFACE ${CMAKE_SOURCE_DIR}) + +add_subdirectory(tests) diff --git a/src/csg/tests/CMakeLists.txt b/src/csg/tests/CMakeLists.txt new file mode 100644 index 0000000..2e58252 --- /dev/null +++ b/src/csg/tests/CMakeLists.txt @@ -0,0 +1,24 @@ +################################################################################ +# CSG Parsing Tests +################################################################################ + +add_executable(unit_tests_csg EXCLUDE_FROM_ALL + levelset/boolean.t.cpp + levelset/primitives.t.cpp + levelset/transform.t.cpp + levelset/extrude.t.cpp + parser/boolean.t.cpp + parser/main.cpp + parser/nest.cpp + parser/other.t.cpp + parser/primitives.t.cpp + parser/transform.t.cpp + parser/extrude.t.cpp + ) + +target_include_directories(unit_tests_csg PRIVATE + .. + ../impl + ) + +target_link_libraries(unit_tests_csg csg) -- GitLab From fb6664dcd73c748c3c4dc44152eee641ebfeac75 Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Fri, 22 May 2020 13:39:41 -0400 Subject: [PATCH 09/14] Add CMake --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c8be356..496e704 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,7 +16,7 @@ test:meson: test:cmake: script: - - python -m pip install ninja conan + - python -m pip install cmake ninja conan - cmake -S. -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Debug - cmake --build build - cd build -- GitLab From 43489f3fcd7217d21f95236e4ede707a623281fd Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Fri, 22 May 2020 14:07:31 -0400 Subject: [PATCH 10/14] CMake tests --- .gitlab-ci.yml | 2 +- CMakeLists.txt | 4 +--- src/csg/CMakeLists.txt | 3 ++- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 496e704..89dc2b2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,7 +18,7 @@ test:cmake: script: - python -m pip install cmake ninja conan - cmake -S. -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Debug - - cmake --build build + - cmake --build build --target unit_tests_csg - cd build - ctest tags: diff --git a/CMakeLists.txt b/CMakeLists.txt index 7413896..511dcc0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ include(${CMAKE_BINARY_DIR}/conan.cmake) conan_cmake_run(REQUIRES catch2/2.12.1 - # cgal/5.0.2 + cgal/5.0.2 pegtl/2.8.1@taocpp/stable BASIC_SETUP) @@ -42,6 +42,4 @@ add_subdirectory(src/csg) target_include_directories(csg PRIVATE ${CONAN_INCLUDE_DIRS_PEGTL}) -target_link_libraries(csg PRIVATE stdc++fs) - target_compile_features(csg PRIVATE cxx_std_17) diff --git a/src/csg/CMakeLists.txt b/src/csg/CMakeLists.txt index 6fa0bc7..bfa0a04 100644 --- a/src/csg/CMakeLists.txt +++ b/src/csg/CMakeLists.txt @@ -12,5 +12,6 @@ target_sources(csg PRIVATE ) target_include_directories(csg INTERFACE ${CMAKE_SOURCE_DIR}) +target_link_libraries(csg PRIVATE stdc++fs ${CONAN_PKG_LIBS_CGAL}) -add_subdirectory(tests) +add_subdirectory(tests) \ No newline at end of file -- GitLab From 8829ec40f071480b8c87cec071f7865df9adf9de Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Fri, 22 May 2020 14:15:18 -0400 Subject: [PATCH 11/14] Add MPIR --- src/csg/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/csg/CMakeLists.txt b/src/csg/CMakeLists.txt index bfa0a04..68d417d 100644 --- a/src/csg/CMakeLists.txt +++ b/src/csg/CMakeLists.txt @@ -12,6 +12,10 @@ target_sources(csg PRIVATE ) target_include_directories(csg INTERFACE ${CMAKE_SOURCE_DIR}) -target_link_libraries(csg PRIVATE stdc++fs ${CONAN_PKG_LIBS_CGAL}) +target_link_libraries(csg PRIVATE + stdc++fs + ${CONAN_PKG_LIBS_CGAL} + ${CONAN_PKG_LIBS_MPIR} + ) add_subdirectory(tests) \ No newline at end of file -- GitLab From 621e46b4172ac0fe4a8eb7f11c1c26d7f0d5ac93 Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Fri, 22 May 2020 14:21:50 -0400 Subject: [PATCH 12/14] add CTest --- src/csg/tests/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/csg/tests/CMakeLists.txt b/src/csg/tests/CMakeLists.txt index 2e58252..e7282df 100644 --- a/src/csg/tests/CMakeLists.txt +++ b/src/csg/tests/CMakeLists.txt @@ -22,3 +22,7 @@ target_include_directories(unit_tests_csg PRIVATE ) target_link_libraries(unit_tests_csg csg) + +add_test(NAME run_csg_unittests + COMMAND ${CMAKE_COMMAND} -E env ${CMAKE_BINARY_DIR}/bin/unit_tests_csg + ) \ No newline at end of file -- GitLab From 722df152b78ede66ac33995b0077ccb3459f1d6c Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Fri, 22 May 2020 14:34:24 -0400 Subject: [PATCH 13/14] Fix meson --- src/csg/tests/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/csg/tests/meson.build b/src/csg/tests/meson.build index 1d40c61..b4f9e61 100644 --- a/src/csg/tests/meson.build +++ b/src/csg/tests/meson.build @@ -12,7 +12,7 @@ test_csg = executable( 'parser/transform.t.cpp', 'parser/extrude.t.cpp', include_directories: [parser_inc], - dependencies: [catch2, pegtl], + dependencies: [catch2, cgal], link_with: lib_csg_parser, override_options: 'cpp_std=c++2a', ) -- GitLab From 25f042c07436e80cdaf2d1ef3798bfe155f61a6a Mon Sep 17 00:00:00 2001 From: Deepak Rangarajan Date: Fri, 22 May 2020 15:38:03 -0400 Subject: [PATCH 14/14] remove demo example --- src/csg/impl/csg.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/csg/impl/csg.cpp b/src/csg/impl/csg.cpp index b89a9c7..80fa8dd 100644 --- a/src/csg/impl/csg.cpp +++ b/src/csg/impl/csg.cpp @@ -1,9 +1,3 @@ -#include -#include -typedef CGAL::Exact_predicates_inexact_constructions_kernel K; -typedef K::Point_2 Point; -typedef CGAL::Polygon_2 Polygon_2; - #include #include #include @@ -21,13 +15,6 @@ bool has_ext(std::string filename, std::string extension) { } std::optional read_csg(std::string geom_file) { - - // Demonstrate use of CGAL - Point points[] = {Point(0, 0), Point(5.1, 0), Point(1, 1), Point(0.5, 6)}; - Polygon_2 pgn(points, points + 4); - std::cout << "The polygon is " << (pgn.is_simple() ? "" : "not ") << "simple." << std::endl; - std::cout << "The polygon is " << (pgn.is_convex() ? "" : "not ") << "convex." << std::endl; - if (!has_ext(geom_file, csg_ext)) { std::cout << "Filename: " << geom_file << " must has extension .csg" << std::endl; -- GitLab