From 66d2be87566b195f888bc792a23eccd035d1bb92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Dumas?= Date: Thu, 3 Oct 2019 14:12:40 -0400 Subject: [PATCH 1/9] Add replicability instructions. --- .gitignore | 1 + scripts/README.md | 4 ++++ scripts/fig19.sh | 40 +++++++++++++++++++++++++++++++ scripts/morph.json | 60 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 105 insertions(+) create mode 100644 scripts/README.md create mode 100755 scripts/fig19.sh create mode 100644 scripts/morph.json diff --git a/.gitignore b/.gitignore index 6ab33f6..1771bfd 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ /cmake-build-* /build* /external* +/data diff --git a/scripts/README.md b/scripts/README.md new file mode 100644 index 0000000..d5506eb --- /dev/null +++ b/scripts/README.md @@ -0,0 +1,4 @@ +# Replicability Stamp + +To reproduce Figure 19 of the paper, simply run the bash script `./fig19.sh` from the terminal. +This will download the input data, compile and run the code. To produce the rendering in the paper, you will need to use [PyRenderer](https://github.com/qnzhou/PyRenderer) and Mitsuba. Those are available via docker. Make sure that [docker](https://docs.docker.com/storage/storagedriver/overlayfs-driver/) is configured with the `overlay2` driver enabled. Otherwise, you may simply open the resulting meshes from the `data/output/` folder that are produced by the script. diff --git a/scripts/fig19.sh b/scripts/fig19.sh new file mode 100755 index 0000000..c816609 --- /dev/null +++ b/scripts/fig19.sh @@ -0,0 +1,40 @@ +#! /bin/bash + +SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P )" +BUILD_DIR=${SCRIPT_DIR}/../build +DATA_DIR=${SCRIPT_DIR}/../data +OUTPUT_DIR=${SCRIPT_DIR}/../data/output + +CONTAINER="docker run -it --rm -v ${OUTPUT_DIR}:${OUTPUT_DIR} qnzhou/pyrender" + +# Step 1: Download data and compile the code + +mkdir -p ${DATA_DIR} +if [ ! -f ${DATA_DIR}/filigree.ply ]; then + wget https://github.com/geometryprocessing/voroffset/releases/download/1.0/filigree.ply -O ${DATA_DIR}/filigree.ply +fi + +mkdir -p ${BUILD_DIR} +if [ ! -f ${BUILD_DIR}/offset3d ]; then + pushd ${BUILD_DIR} + cmake .. + make -j 8 + popd +fi + +# Step 2: Run offset algorithm + +mkdir -p ${OUTPUT_DIR} + +${BUILD_DIR}/offset3d ${DATA_DIR}/filigree.ply -o ${OUTPUT_DIR}/morph_dexelized.obj -f -n 256 -r 3 -p 3 -x noop +${BUILD_DIR}/offset3d ${DATA_DIR}/filigree.ply -o ${OUTPUT_DIR}/morph_dilation.obj -f -n 256 -r 3 -p 3 -x dilation +${BUILD_DIR}/offset3d ${DATA_DIR}/filigree.ply -o ${OUTPUT_DIR}/morph_erosion.obj -f -n 256 -r 3 -p 3 -x erosion +${BUILD_DIR}/offset3d ${DATA_DIR}/filigree.ply -o ${OUTPUT_DIR}/morph_closing.obj -f -n 256 -r 3 -p 3 -x closing +${BUILD_DIR}/offset3d ${DATA_DIR}/filigree.ply -o ${OUTPUT_DIR}/morph_opening.obj -f -n 256 -r 3 -p 3 -x opening + +# Step 3: Render pretty pictures + +cp ${SCRIPT_DIR}/morph.json ${OUTPUT_DIR} +pushd ${OUTPUT_DIR} +${CONTAINER} bash -c ". /usr/local/mitsuba/setpath.sh; mkdir -p ${OUTPUT_DIR}; cd ${OUTPUT_DIR}; render.py --renderer mitsuba -S `pwd`/morph.json;" +popd diff --git a/scripts/morph.json b/scripts/morph.json new file mode 100644 index 0000000..577080d --- /dev/null +++ b/scripts/morph.json @@ -0,0 +1,60 @@ +{ + "views": [ + { + "type": "mesh_only", + "width": 1600, + "height": 1600, + "transparent_bg": true, + "background": "n", + "mesh": "morph_dexelized.obj", + "wire_frame": false, + "color": "gray", + "name": "morph_dexelized.png" + }, + { + "type": "mesh_only", + "width": 1600, + "height": 1600, + "transparent_bg": true, + "background": "n", + + "mesh": "morph_erosion.obj", + "wire_frame": false, + "color": "gray", + "name": "morph_erosion.png" + }, + { + "type": "mesh_only", + "width": 1600, + "height": 1600, + "transparent_bg": true, + "background": "n", + "mesh": "morph_dilation.obj", + "wire_frame": false, + "color": "gray", + "name": "morph_dilation.png" + }, + { + "type": "mesh_only", + "width": 1600, + "height": 1600, + "transparent_bg": true, + "background": "n", + "mesh": "morph_opening.obj", + "wire_frame": false, + "color": "gray", + "name": "morph_opening.png" + }, + { + "type": "mesh_only", + "width": 1600, + "height": 1600, + "transparent_bg": true, + "background": "n", + "mesh": "morph_closing.obj", + "wire_frame": false, + "color": "gray", + "name": "morph_closing.png" + } + ] +} From c8b4a38e67a4094c627739955a7d1c1409d29795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Dumas?= Date: Thu, 3 Oct 2019 14:15:46 -0400 Subject: [PATCH 2/9] Update instructions. --- README.md | 4 ++++ scripts/README.md | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5694c6b..3c0c20f 100644 --- a/README.md +++ b/README.md @@ -59,3 +59,7 @@ Options: -f,--force Overwrite output file -u,--radius_in_mm Radius is given in mm instead ``` + +### Replicability + +Head over to the [scripts/](scripts/) folder for further instructions. diff --git a/scripts/README.md b/scripts/README.md index d5506eb..176e556 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -1,4 +1,4 @@ -# Replicability Stamp +### Replicability To reproduce Figure 19 of the paper, simply run the bash script `./fig19.sh` from the terminal. This will download the input data, compile and run the code. To produce the rendering in the paper, you will need to use [PyRenderer](https://github.com/qnzhou/PyRenderer) and Mitsuba. Those are available via docker. Make sure that [docker](https://docs.docker.com/storage/storagedriver/overlayfs-driver/) is configured with the `overlay2` driver enabled. Otherwise, you may simply open the resulting meshes from the `data/output/` folder that are produced by the script. From 2eeb4cfa96e720983e86bdf87b9531df4b735b57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Dumas?= Date: Thu, 3 Oct 2019 14:58:32 -0400 Subject: [PATCH 3/9] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3c0c20f..48d7751 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Voroffset +[![Build Status](https://travis-ci.com/geometryprocessing/voroffset.svg?branch=master)](https://travis-ci.com/geometryprocessing/voroffset) + Discrete mesh offsetting based on half-space Voronoi diagrams and Power diagrams. ### Compilation From bf18cb773d62ac7b812318c4792580f7140ed359 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Dumas?= Date: Tue, 5 Nov 2019 08:15:08 -0500 Subject: [PATCH 4/9] Update instructions. --- README.md | 3 ++- scripts/README.md | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 48d7751..7a2530c 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,8 @@ Dependencies are downloaded automatically by CMake at configuration time. To com ```bash mkdir build cd build -cmake -j8 +cmake .. +make -j8 ``` ### Running the code diff --git a/scripts/README.md b/scripts/README.md index 176e556..2a53a38 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -2,3 +2,9 @@ To reproduce Figure 19 of the paper, simply run the bash script `./fig19.sh` from the terminal. This will download the input data, compile and run the code. To produce the rendering in the paper, you will need to use [PyRenderer](https://github.com/qnzhou/PyRenderer) and Mitsuba. Those are available via docker. Make sure that [docker](https://docs.docker.com/storage/storagedriver/overlayfs-driver/) is configured with the `overlay2` driver enabled. Otherwise, you may simply open the resulting meshes from the `data/output/` folder that are produced by the script. + +:warning: This script uses Docker, which might require to be run with sudo access. If you use a recent version (>= 19.3), you can add yourself to the `docker` group (root-equivalent) as documented [here](https://docs.docker.com/install/linux/docker-ce/ubuntu/): + +``` +sudo usermod -aG docker your-user +``` From 60b395ef206ceb80d51a4a1680e6d03fc0e2beb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Dumas?= Date: Tue, 5 Nov 2019 08:50:16 -0500 Subject: [PATCH 5/9] Update Travis. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index d479abf..f082928 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,7 @@ matrix: env: - MATRIX_EVAL="export CC=gcc-7 && CXX=g++-7 && CONFIG=Debug && NPROC=2" - os: osx + osx_image: xcode10.2 compiler: clang env: - MATRIX_EVAL="export CONFIG=Debug && NPROC=2" From 1fdab295c705ec532bf1428af7073a9477b51bde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Je=CC=81re=CC=81mie=20Dumas?= Date: Thu, 10 Mar 2022 09:22:05 -0800 Subject: [PATCH 6/9] Update Eigen mirror (fixes #3). --- cmake/VoroffsetDownloadExternal.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/VoroffsetDownloadExternal.cmake b/cmake/VoroffsetDownloadExternal.cmake index 135b4cf..e0a8b3c 100644 --- a/cmake/VoroffsetDownloadExternal.cmake +++ b/cmake/VoroffsetDownloadExternal.cmake @@ -26,8 +26,9 @@ endfunction() ## Eigen function(voroffset_download_eigen) voroffset_download_project(eigen - URL http://bitbucket.org/eigen/eigen/get/3.3.7.tar.gz - URL_MD5 f2a417d083fe8ca4b8ed2bc613d20f07 + GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git + GIT_TAG tags/3.3.7 + GIT_SHALLOW TRUE ) endfunction() From b5c72d1d5bb09be5baa4245d230e3034d7ebcb38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Je=CC=81re=CC=81mie=20Dumas?= Date: Thu, 10 Mar 2022 09:23:00 -0800 Subject: [PATCH 7/9] Indent. --- cmake/VoroffsetDownloadExternal.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/VoroffsetDownloadExternal.cmake b/cmake/VoroffsetDownloadExternal.cmake index e0a8b3c..6605b06 100644 --- a/cmake/VoroffsetDownloadExternal.cmake +++ b/cmake/VoroffsetDownloadExternal.cmake @@ -27,8 +27,8 @@ endfunction() function(voroffset_download_eigen) voroffset_download_project(eigen GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git - GIT_TAG tags/3.3.7 - GIT_SHALLOW TRUE + GIT_TAG tags/3.3.7 + GIT_SHALLOW TRUE ) endfunction() From 88a727c18fa62070bc0aaebfbe32c5968f735838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Dumas?= Date: Wed, 17 Jan 2024 07:27:58 -0800 Subject: [PATCH 8/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7a2530c..b504f90 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Dependencies are downloaded automatically by CMake at configuration time. To com mkdir build cd build cmake .. -make -j8 +cmake --build . -j8 ``` ### Running the code From ce7b61f6469975795455bd85fcf23e23ff1ba102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Dumas?= Date: Wed, 17 Jan 2024 07:28:36 -0800 Subject: [PATCH 9/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b504f90..a1e4f75 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Dependencies are downloaded automatically by CMake at configuration time. To com mkdir build cd build cmake .. -cmake --build . -j8 +cmake --build . -j8 --config Release ``` ### Running the code