diff --git a/.gitmodules b/.gitmodules index 13b7796e..19936c8f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,6 +5,4 @@ [submodule "deps/eigen"] path = deps/eigen url = https://gitlab.com/libeigen/eigen.git -[submodule "deps/boost"] - path = deps/boost - url = https://github.com/diffCheckOrg/submodule-boost.git + branch = master diff --git a/CMakeLists.txt b/CMakeLists.txt index 215af0c9..707e8c73 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,7 +52,7 @@ download_submodule_project(eigen) add_subdirectory(deps/eigen) target_link_libraries(${SHARED_LIB_NAME} PUBLIC Eigen3::Eigen) -# Open3D (pre-built binaries) ----------------------------------------------------- +# Open3D (from system) ----------------------------------------------------- # The options need to be the same as Open3D's default # If Open3D is configured and built with custom options, you'll also need to # specify the same custom options. @@ -63,8 +63,6 @@ else() set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") endif() -download_submodule_project(open3d) -set(Open3D_DIR ${CMAKE_CURRENT_SOURCE_DIR}/deps/open3d/win/0_18/CMake) find_package(Open3D 0.18.0 REQUIRED) # print the version debug or release of the package @@ -87,9 +85,9 @@ if(WIN32) endif() endif() -# Boost (header only) ----------------------------------------------------- -download_submodule_project(boost) -target_link_directories(${SHARED_LIB_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/deps/boost/win/1_89/include/boost-1_85) +# Boost (from system) ----------------------------------------------------- +# download and install from https://sourceforge.net/projects/boost/files/boost-binaries/1.84.0/boost_1_84_0-msvc-14.3-64.exe/download +find_package(Boost REQUIRED) # print boost include dir message(STATUS "Boost include dir: ${Boost_INCLUDE_DIRS}") diff --git a/README.md b/README.md index e52940c5..33f330e9 100644 --- a/README.md +++ b/README.md @@ -47,10 +47,24 @@ gantt ## 3rd party libraries The project uses the following 3rd party libraries: -- `Open3d 0.18.0` for 3D point cloud processing as pre-build binaries ([store here](https://github.com/diffCheckOrg/submodule-open3d.git)) -- `Eigen` for linear algebra +- `Open3d 0.18.0` for 3D point cloud processing it needs to be installed from source [from here](https://github.com/isl-org/Open3D/releases/download/v0.18.0/open3d-devel-windows-amd64-0.18.0.zip), unzip the file and by following the instructions below: +```terminal +cd open3d +mkdir build +cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="C:\Program Files\Open3D" -S . -B build +cmake --build build --config Release --target ALL_BUILD +cmake --build build --config Release --target INSTALL +``` +- `Eigen` for linear algebra (needed by `Open3d`) - `CGAL` for general geometric processing and IO -- `Boost` for general utilities as pre-build binaries ([store here](https://github.com/diffCheckOrg/submodule-boost.git)) +- `Boost` for general utilities, it needs to be installed from source [from the repo](https://github.com/boostorg/boost) as such: +```terminal +git clone --recursive https://github.com/boostorg/boost.git +cd boost +cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="C:\Program Files\Boost" -S . -B build +cmake --build build --config Release --target ALL_BUILD +cmake --build build --config Release --target INSTALL +``` ## How to build c++ project To build and test the project, follow the following steps: @@ -58,7 +72,7 @@ To build and test the project, follow the following steps: ```terminal cmake/config.bat cmake/build.bat -./build/bin/Release/diffCheckApp.exe <-- for prototyping +./build/bin/diffCheckApp.exe <-- for prototyping ``` ## Prototype diffCheck in C++ diff --git a/cmake/config.bat b/cmake/config.bat index 45ee3eeb..941cbdbb 100644 --- a/cmake/config.bat +++ b/cmake/config.bat @@ -1 +1 @@ -cmake -S . -B build \ No newline at end of file +cmake -S . -B build -G "Visual Studio 16 2019" -A x64 \ No newline at end of file diff --git a/src/diffCheck.hh b/src/diffCheck.hh index 0c05498f..a402d367 100644 --- a/src/diffCheck.hh +++ b/src/diffCheck.hh @@ -1,6 +1,8 @@ #pragma once +// include CGAL + #include // diffCheck includes diff --git a/src/diffCheckApp.cc b/src/diffCheckApp.cc index 21f546a2..d3987bcd 100644 --- a/src/diffCheckApp.cc +++ b/src/diffCheckApp.cc @@ -1,7 +1,6 @@ #include "diffCheck.hh" - #include #include #include @@ -12,8 +11,6 @@ int main() { - std::shared_ptr dfPointCloudPtr = std::make_shared(); - std::shared_ptr dfPointCloudFromMeshPtr = std::make_shared(); std::shared_ptr dfPointCloudPtr = std::make_shared(); std::shared_ptr dfMeshPtr = std::make_shared(); @@ -21,13 +18,8 @@ int main() std::string pathMesh = R"(F:\diffCheck\assets\dataset\mesh_fromRh_unfixedLength.ply)"; // std::string pathMesh = R"(F:\diffCheck\temp\03_mesh.ply)"; - // create a sphere from o3d - auto mesh = open3d::geometry::TriangleMesh::CreateSphere(1.0, 4); - dfMeshPtr->LoadFromPLY(pathMesh); - - - dfMeshPtr->Cvt2DFMesh(mesh); + dfMeshPtr->LoadFromPLY(pathMesh); // dfPointCloudPtr->LoadFromPLY(pathCloud); std::shared_ptr vis = std::make_shared();