Skip to content

Commit 50ae041

Browse files
committed
Fixing few bugs
1 parent 4e0bd84 commit 50ae041

File tree

5 files changed

+18
-8
lines changed

5 files changed

+18
-8
lines changed

docs/installation.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,13 @@ of :program:`Den2Obj` using this module requires supplying an additional
6464
argument to CMake.
6565

6666
.. warning::
67-
The OpenVDB package in the latest Ubuntu LTS (22.04 LTS) is incompatible with the Thread Building Blocks (tbb) library. As a workaround, one is
68-
required to compile a newer OpenVDB. OpenVDB v8.2 has been tried and
69-
tested by us. If you are compiling for Ubuntu 22.04 LTS, please read the
70-
additional instructions to compile OpenVDB.
67+
A fairly recent version of OpenVDB is required for compatibility with
68+
modern dependencies. The version packaged in Ubuntu 22.04 LTS is
69+
incompatible with the current Thread Building Blocks (TBB) library.
70+
We have tested and verified compatibility with OpenVDB on Ubuntu 24.04 LTS.
71+
If you are working on Ubuntu 22.04 LTS, you might need to compile a recent
72+
version of OpenVDB from source. The instructions below are for Ubuntu
73+
24.04 LTS.
7174

7275
Ensure that the following libraries are installed by running::
7376

docs/user_interface.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ To perform the conversion, one executes::
7878

7979
./den2obj -i <path-to-scalarfield> -o <mesh-file> -t [-a <algo>]
8080

81+
For example, to convert `genus.d2o` to a `vdb` file, one runs::
82+
83+
./den2obj -i genus.d2o -o genus.vdb -t
84+
8185
.. note::
8286

8387
Creating `OpenVDB` files requires the OpenVDB module to be compiled. See

src/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ execute_process(
5252
SET(PROGNAME "DEN2OBJ")
5353
SET(VERSION_MAJOR "1")
5454
SET(VERSION_MINOR "2")
55-
SET(VERSION_MICRO "1")
55+
SET(VERSION_MICRO "2")
5656
message(STATUS "Writing configuration file in: ${CMAKE_CURRENT_SOURCE_DIR}/config.h")
5757
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/config.h @ONLY)
5858
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/den2obj.pc.in ${CMAKE_BINARY_DIR}/den2obj.pc @ONLY)
@@ -104,9 +104,9 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
104104

105105
# enable OpenVDB support
106106
if(MOD_OPENVDB)
107-
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMOD_OPENVDB -I/opt/openvdb/include")
108-
SET(OPENVDB_LIBS "/opt/openvdb/lib/libopenvdb.a" "tbb" "blosc" "-lz")
107+
SET(OPENVDB_LIBS "openvdb" "tbb" "blosc" "-lz")
109108
MESSAGE("Compiling with OpenVDB module")
109+
add_compile_definitions(MOD_OPENVDB)
110110
endif()
111111

112112
# Add sources

src/den2obj.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ int main(int argc, char* argv[]) {
7979
std::cout << "--------------------------------------------------------------" << std::endl;
8080
std::cout << "Compilation time: " << __DATE__ << " " << __TIME__ << std::endl;
8181
std::cout << "Git Hash: " << PROGRAM_GIT_HASH << std::endl;
82+
#ifdef MOD_OPENVDB
83+
std::cout << "Compiled with OpenVDB module" << std::endl;
84+
#endif
8285
std::cout << "--------------------------------------------------------------" << std::endl;
8386

8487
//**************************************

src/generator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ std::vector<fpt> Generator::genus2(fpt sz, size_t npts) const {
103103

104104
// build grid
105105
std::vector<fpt> f(npts*npts*npts);
106+
boost::timer::progress_display progress(npts);
106107
for(unsigned int i=0; i<npts; i++) { // loop over z
107108
const float z = xx[i];
108-
boost::timer::progress_display progress(npts);
109109
for(unsigned int j=0; j<npts; j++) { // loop over y
110110
const float y = xx[j];
111111
#pragma omp parallel for schedule(static)

0 commit comments

Comments
 (0)