Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Winding number from libigl in DGtal #1697

Merged
merged 59 commits into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
c370f30
libigl.Cmake added
dcoeurjo May 29, 2023
1cde880
Merge branch 'master' into Winding
dcoeurjo Jun 5, 2023
13f43aa
LibIGL Test file
dcoeurjo Jun 14, 2023
e873fb3
Unit test for libigl deps
dcoeurjo Jun 15, 2023
7ac7f0f
files
dcoeurjo Jun 15, 2023
f646258
Fixing libIGL + cgal + DGtal deps
dcoeurjo Jun 15, 2023
13a00c9
Adding test
dcoeurjo Jun 15, 2023
1dcb67a
winding test
dcoeurjo Jul 25, 2023
33c624c
Merge branch 'master' into Winding
dcoeurjo Oct 22, 2023
55ff74a
Merge branch 'master' into Winding
dcoeurjo Oct 22, 2023
ef5094e
Cleaning up the cmake script.
dcoeurjo Oct 25, 2023
63ce113
Cleaning up
dcoeurjo Oct 25, 2023
957c407
Cleaning up
dcoeurjo Oct 25, 2023
a76486a
Fixing the example
dcoeurjo Oct 26, 2023
19782b5
Fixing the example
dcoeurjo Oct 26, 2023
1849c3c
libigl in bots
dcoeurjo Oct 27, 2023
406ff0c
libigl in bots
dcoeurjo Oct 27, 2023
551ca3d
libigl in bots
dcoeurjo Oct 27, 2023
96e279c
libigl in bots
dcoeurjo Oct 27, 2023
c84bb31
Disabling a test
dcoeurjo Oct 28, 2023
2765d4c
Merge branch 'Winding' of github.com:DGtal-team/DGtal into Winding
dcoeurjo Oct 28, 2023
8c9a64d
Fixing DGtalConfig.cmake
dcoeurjo Nov 13, 2023
8a2b596
Merge branch 'master' into Winding
dcoeurjo Nov 13, 2023
78dad6f
upgrade of the documentation
dcoeurjo Nov 14, 2023
17754f1
Merge branch 'Winding' of github.com:DGtal-team/DGtal into Winding
dcoeurjo Nov 14, 2023
65bcf9f
upgrade of the documentation
dcoeurjo Nov 14, 2023
b2457ef
upgrade of the documentation
dcoeurjo Nov 14, 2023
080a35a
Merge branch 'master' into Winding
dcoeurjo Nov 16, 2023
2bae8b9
Update doxy.config.in
dcoeurjo Nov 16, 2023
39f43e2
Merge branch 'master' into Winding
dcoeurjo Nov 16, 2023
0c1e9c3
Updating deploy URL
dcoeurjo Nov 16, 2023
9a6f5d6
Fixing conflict
dcoeurjo Nov 16, 2023
ab7366c
cleanup
dcoeurjo Nov 17, 2023
f0a7180
Merge branch 'master' into Winding
dcoeurjo Nov 20, 2023
17ee1fd
documentation
dcoeurjo Nov 24, 2023
7b98b38
LibIGL update
dcoeurjo Nov 26, 2023
28c5db3
Documentation
dcoeurjo Nov 27, 2023
547f6f2
Merge branch 'Winding' of github.com:DGtal-team/DGtal into Winding
dcoeurjo Nov 27, 2023
05b2d27
Documentation
dcoeurjo Nov 27, 2023
fefd6d2
Fixing Geodesic
dcoeurjo Nov 28, 2023
cd68da4
Winding number edit
dcoeurjo Nov 28, 2023
a887f7a
Merge branch 'master' into Winding
dcoeurjo Nov 30, 2023
3575f21
Editing cmake DGtalConfig scripts
dcoeurjo Dec 12, 2023
25f3ec5
Merge branch 'Winding' of github.com:DGtal-team/DGtal into Winding
dcoeurjo Dec 12, 2023
bebcc68
Fixing install path CPM
dcoeurjo Dec 12, 2023
9dda36d
bunny expoer
dcoeurjo Dec 14, 2023
369c250
Merge branch 'master' into Winding
dcoeurjo Dec 15, 2023
89074ef
doc typo
dcoeurjo Dec 19, 2023
493efbc
Merge branch 'master' into Winding
dcoeurjo Jan 28, 2024
a26a703
Merge branch 'master' into Winding
dcoeurjo Feb 1, 2024
6fc4de7
Merge branch 'master' into Winding
dcoeurjo Mar 3, 2024
3cb9157
Update examples/polyscope-examples/windingNumbersShape.cpp
dcoeurjo Mar 8, 2024
8541e2b
Editing
dcoeurjo Mar 8, 2024
96367e6
Update tests/shapes/testWindingNumbersShape.cpp
dcoeurjo Mar 8, 2024
1d487ca
Update tests/shapes/testWindingNumbersShape.cpp
dcoeurjo Mar 8, 2024
4f86801
Update tests/shapes/testWindingNumbersShape.cpp
dcoeurjo Mar 8, 2024
4e2d6df
Update tests/shapes/testlibigl.cpp
dcoeurjo Mar 8, 2024
a1195a0
Update WindingNumbersShape.h
dcoeurjo Mar 8, 2024
98042e3
Azure windows PythonTest disabled
dcoeurjo Mar 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
TESTBLACKLIST: "(testLinearStructure|testIntegerConverter|testArithmeticalDSSComputerOnSurfels)"
CONFIG_GLOBAL: -DBUILD_EXAMPLES=true -DBUILD_TESTING=true -DDGTAL_RANDOMIZED_TESTING_THRESHOLD=10 -DWITH_EIGEN=true
CONFIG_LINUX: -DWITH_OPENMP=true -DWITH_GMP=true -DWITH_FFTW3=true -DWARNING_AS_ERROR=ON -DWITH_HDF5=true -DWITH_QGLVIEWER=true -DWITH_CAIRO=true -DWITH_ITK=true -DDGTAL_ENABLE_FLOATING_POINT_EXCEPTIONS=true -DBUILD_POLYSCOPE_EXAMPLES=true
CONFIG_MAC: -DWITH_GMP=true -DBUILD_POLYSCOPE_EXAMPLES=true
CONFIG_LINUX: -DWITH_OPENMP=true -DWITH_GMP=true -DWITH_FFTW3=true -DWITH_CGAL=true -DWITH_LIBIGL=true -DWARNING_AS_ERROR=ON -DWITH_HDF5=true -DWITH_QGLVIEWER=true -DWITH_CAIRO=true -DWITH_ITK=true -DDGTAL_ENABLE_FLOATING_POINT_EXCEPTIONS=true -DBUILD_POLYSCOPE_EXAMPLES=true
CONFIG_MAC: -DWITH_GMP=true -DBUILD_POLYSCOPE_EXAMPLES=true -DWITH_CGAL=true -DWITH_LIBIGL=true
CONFIG_WINDOWS: -DWITH_OPENMP=true -DENABLE_CONAN=true #-DWITH_FFTW3=true #-DWITH_CAIRO=true #-DWITH_ITK=true -DWITH_GMP=true

jobs:
Expand All @@ -33,11 +33,11 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install zsh libqglviewer-dev-qt5 libboost-dev ninja-build libhdf5-serial-dev libboost-dev libcairo2-dev libgmp-dev libfftw3-dev libinsighttoolkit4-dev xorg-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev
sudo apt-get install zsh libqglviewer-dev-qt5 libboost-dev libcgal-dev ninja-build libhdf5-serial-dev libboost-dev libcairo2-dev libgmp-dev libfftw3-dev libinsighttoolkit4-dev xorg-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev

- name: Install macOS deps
if: matrix.os == 'macOS-latest'
run: brew install boost ninja gmp libomp
run: brew install boost ninja gmp libomp cgal

- name: Install conan
if: matrix.os == 'windows-latest'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/buildAndDocumentation-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ env:
BUILD_TYPE: Debug
TESTBLACKLIST: "(testLinearStructure|testIntegerConverter|testArithmeticalDSSComputerOnSurfels)"
CONFIG_GLOBAL: -DBUILD_EXAMPLES=true -DBUILD_TESTING=true -DDGTAL_RANDOMIZED_TESTING_THRESHOLD=10 -DWITH_EIGEN=true
CONFIG_LINUX: -DUSE_CCACHE=YES -DWITH_OPENMP=true -DWITH_GMP=true -DWITH_FFTW3=true -DWARNING_AS_ERROR=ON -DWITH_HDF5=true -DWITH_QGLVIEWER=true -DWITH_CAIRO=true -DWITH_ITK=true -DDGTAL_ENABLE_FLOATING_POINT_EXCEPTIONS=true -DBUILD_POLYSCOPE_EXAMPLES=true
CONFIG_MAC: -DUSE_CCACHE=YES -DWITH_GMP=true -DBUILD_POLYSCOPE_EXAMPLES=true
CONFIG_LINUX: -DUSE_CCACHE=YES -DWITH_OPENMP=true -DWITH_GMP=true -DWITH_CGAL=true -DWITH_LIBIGL=true -DWITH_FFTW3=true -DWARNING_AS_ERROR=ON -DWITH_HDF5=true -DWITH_QGLVIEWER=true -DWITH_CAIRO=true -DWITH_ITK=true -DDGTAL_ENABLE_FLOATING_POINT_EXCEPTIONS=true -DBUILD_POLYSCOPE_EXAMPLES=true
CONFIG_MAC: -DUSE_CCACHE=YES -DWITH_GMP=true -DBUILD_POLYSCOPE_EXAMPLES=true -DWITH_CGAL=true -DWITH_LIBIGL=true
CONFIG_WINDOWS: -DWITH_OPENMP=true -DENABLE_CONAN=true #-DWITH_FFTW3=true #-DWITH_CAIRO=true #-DWITH_ITK=true -DWITH_GMP=true

jobs:
Expand All @@ -34,11 +34,11 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install ccache zsh libqglviewer-dev-qt5 libboost-dev ninja-build libhdf5-serial-dev libboost-dev libcairo2-dev libgmp-dev libfftw3-dev libinsighttoolkit4-dev xorg-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev
sudo apt-get install ccache zsh libqglviewer-dev-qt5 libcgal-dev libboost-dev ninja-build libhdf5-serial-dev libboost-dev libcairo2-dev libgmp-dev libfftw3-dev libinsighttoolkit4-dev xorg-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev

- name: Install macOS deps
if: matrix.os == 'macOS-latest'
run: brew install boost ninja gmp libomp ccache
run: brew install boost ninja gmp libomp ccache cgal

- name: Install conan
if: matrix.os == 'windows-latest'
Expand Down
7 changes: 7 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@
[#1689](https://github.com/DGtal-team/DGtal/pull/1689))
- Faster build using CPM for dependency download and ccache with the cmake `USE_CCACHE=YES`option
(ccache must be installed). (David Coeurjolly, [#1696](https://github.com/DGtal-team/DGtal/pull/1696))
- Better documentation style using doxygen-awesome.css. (David Coeurjolly,
[#1697](https://github.com/DGtal-team/DGtal/pull/1697))

- *Geometry*
- New implicit shape from point cloud using LibIGL Winding Numbers. (David Coeurjolly,
[#1697](https://github.com/DGtal-team/DGtal/pull/1697))

## Changes
- *General*
Expand Down Expand Up @@ -68,6 +73,8 @@
[#1691](https://github.com/DGtal-team/DGtal/pull/1691))
- Cleanup of cmake targets when BUILD_TESTING is disabled (David Coeurjolly
[#1698](https://github.com/DGtal-team/DGtal/pull/1698))
- Cleanup of the cmake script for dependency discovery (David Coeurjolly,
[#1697](https://github.com/DGtal-team/DGtal/pull/1697))
- Cleaning up unnecessary ModuleSRC.cmake files (David Coeurjolly
[#1711](https://github.com/DGtal-team/DGtal/pull/1711))
- Fixing install path of CPM in the DGtalConfig.cmake.in (David Coeurjolly,
Expand Down
37 changes: 29 additions & 8 deletions cmake/CheckDGtalOptionalDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ option(WITH_ITK "With Insight Toolkit ITK." OFF)
option(WITH_CAIRO "With CairoGraphics." OFF)
option(WITH_HDF5 "With HDF5." OFF)
option(WITH_QGLVIEWER "With LibQGLViewer for 3D visualization (Qt5 required)." OFF)
option(WITH_PATATE "With Patate library for geometry processing (Eigen required)." OFF)
option(WITH_PATATE "With Patate library for geometry processing." OFF)
option(WITH_FFTW3 "With FFTW3 discrete Fourier Transform library." OFF)
option(WITH_LIBIGL "With libIGL (with copyleft/CGAL included)." OFF)

#----------------------------------
# Removing -frounding-math compile flag for clang
Expand Down Expand Up @@ -96,6 +97,14 @@ else (WITH_FFTW3)
message(STATUS " WITH_FFTW3 false (FFTW3 discrete Fourier transform library)")
endif()


if (WITH_LIBIGL)
set(LIST_OPTION ${LIST_OPTION} [FFTW3]\ )
message(STATUS " WITH_LIBIGL true (libIGL)")
else (WITH_LIBIGL)
message(STATUS " WITH_LIBIGL false (libIGL)")
endif()

message(STATUS "")
message(STATUS "Checking the dependencies: ")

Expand Down Expand Up @@ -327,10 +336,10 @@ endif()
# -----------------------------------------------------------------------------
set(CGAL_FOUND_DGTAL 0)
if(WITH_CGAL)
if(WITH_GMP AND WITH_EIGEN)
if(WITH_GMP)
message(STATUS "GMP and Eigen3 detected for CGAL.")
else()
message(FATAL_ERROR "CGAL needs GMP and Eigen3. You must activate WITH_GMP and WITH_EIGEN flags and have the associated package installed.")
message(FATAL_ERROR "CGAL needs GMP. You must activate the WITH_GMP flag and have the associated package installed.")
endif()

find_package(CGAL COMPONENTS Core)
Expand All @@ -354,11 +363,6 @@ endif()
# -----------------------------------------------------------------------------
set(PATATE_FOUND_DGTAL 0)
if(WITH_PATATE)
if(WITH_EIGEN)
message(STATUS "Eigen3 detected for PATATE.")
else()
message(FATAL_ERROR "PATATE needs Eigen3. You must activate WITH_EIGEN flags and have the associated package installed.")
endif()
find_package(Patate)
if(PATATE_FOUND)
target_include_directories(DGtal PUBLIC ${PATATE_INCLUDE_DIR})
Expand Down Expand Up @@ -406,4 +410,21 @@ if(WITH_FFTW3)

endif()

# -----------------------------------------------------------------------------
# Look for libigl.
# (They are not compulsory).
# -----------------------------------------------------------------------------
if(WITH_LIBIGL)
if (WITH_CGAL)
message(STATUS "DGtal/CGAL enabled.")
else()
message(FATAL_ERROR "LIBIGL requires CGAL. Please if the `WITH_CGAL=true` cmake flag.")
endif()
include(cmake/deps/libigl.cmake)
target_compile_definitions(DGtal PUBLIC -DWITH_LIBIGL)
set(DGtalLibDependencies ${DGtalLibDependencies} igl::core)
set(LIBIGL_FOUND_DGTAL 1)

endif()

message(STATUS "-------------------------------------------------------------------------------")
8 changes: 5 additions & 3 deletions cmake/DGtalConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ set(WITH_EIGEN 1)
include(eigen)
set(DGtalLibDependencies ${DGtalLibDependencies} Eigen3::Eigen)

if (@LIBIGL_FOUND_DGTAL@)
include(libigl)
set(WITH_LIBIGL 1)
set(DGtalLibDependencies ${DGtalLibDependencies} igl::core)
endif()

if(@GMP_FOUND_DGTAL@) #if GMP_FOUND_DGTAL
find_package(GMP REQUIRED
Expand Down Expand Up @@ -108,9 +113,6 @@ if(@OPENMP_FOUND_DGTAL@) #if OPENMP_FOUND_DGTAL
set(WITH_OPENMP 1)
endif()




if(@CGAL_FOUND_DGTAL@) #if CGAL_FOUND_DGTAL
find_dependency(CGAL COMPONENTS Core
@CGAL_HINTS@
Expand Down
1 change: 1 addition & 0 deletions cmake/DGtalConfigGenerator.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ set(_find_cmake_files
"${PROJECT_SOURCE_DIR}/cmake/FindQGLVIEWER.cmake"
"${PROJECT_SOURCE_DIR}/cmake/FindGMP.cmake"
"${PROJECT_SOURCE_DIR}/cmake/deps/eigen.cmake"
"${PROJECT_SOURCE_DIR}/cmake/deps/libigl.cmake"
"${PROJECT_SOURCE_DIR}/cmake/CPM.cmake"
)
file(COPY ${_find_cmake_files}
Expand Down
3 changes: 1 addition & 2 deletions cmake/GeneratorSpecific.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ if (BUILD_TESTING)
set(DGTAL_MYHEADERS "")
FILE(GLOB_RECURSE DGTAL_MYHEADERS ${CMAKE_CURRENT_SOURCE_DIR}/cmake/*.cmake.in)
add_custom_target(cmake.in SOURCES ${DGTAL_MYHEADERS})
set(DGTAL_MYHEADERS "")

set(DGTAL_MYHEADERS "")
FILE(GLOB_RECURSE DGTAL_MYHEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/DGtal//base/*h)
add_custom_target(_base SOURCES ${DGTAL_MYHEADERS})
set(DGTAL_MYHEADERS "")
Expand Down
29 changes: 29 additions & 0 deletions cmake/deps/libigl.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#
# Copyright 2019 Adobe. All rights reserved.
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
# OF ANY KIND, either express or implied. See the License for the specific language
# governing permissions and limitations under the License.
#
if(TARGET igl::core)
return()
endif()

message(STATUS "Third-party (external): creating target 'igl::core'")

include(eigen)
option(LIBIGL_INSTALL "Enable installation of libigl targets" ON)

include(CPM)
CPMAddPackage(
NAME libigl
GITHUB_REPOSITORY libigl/libigl
VERSION 2.5.0
OPTIONS LIBIGL_WITH_CGAL
)

set_target_properties(igl_core PROPERTIES FOLDER third_party/libigl)
Loading
Loading