This repository contains an implementation of the method presented in "Feature-Preserving Offset Mesh Generation from Topology-Adapted Octrees". It generates offsets for triangle meshes and performs feature aware remeshing.
The code is based on CGAL and was tested with version 5.5.2. For the offsetting library requires slight modification of the Octrees package.
The code requires the following libraries to be installed:
- CGAL the results in the paper were produced with version 5.5.2 with slight modification to the Octrees package.
- GLOG
- CLI11
The Orthree in CGAL needs to be slightly modified:
- The
split()function in Orthtree must be public and all point handling (everything after node.split()) must be deleted. - The
split()andunsplit()functions in Orthtree/Node.h must be public.
Example input for command line interface voxeloffset_cli.
./build/src/voxeloffset_cli/Voxeloffset_cli -p "../../data/cube.off" -o "out.off" --debugout "debug_folder" -d --d1 10 --d2 12 -r 1 -n -q -j 0.1
Explanation:
-pprimal mesh-ooutput mesh--debugoutfolder for debug output--diagset offset radius relative to the bbox diagonal-dperform Dual Contouring--d0minimum octree subdivision level (can be 0)--d1maximum octree subdivision level (must be greater thand0)--d2octree subdivision level for removing non-manifold vertices (must be greater thand1)-rnumber of remeshing steps. For not performing remeshing, set this to 0--lminfactormultiplier for the minimal edge length--lmaxfactormultiplier for the maximal edge length-nnormalize input mesh to the unit cube-joffset radius
To compare against alpha wrapping, one can use the flag --alpha_wrap. The program will then only execute alpha wrapping and write the result to the given output file.
./build/src/voxeloffset_cli/Voxeloffset_cli -p "../../data/cube.off" --remeshinput "cube_offset.off" -o "out.off" --debugout "debug_folder" -r 1 -q -j 0.1
Explanation:
-pprimal mesh--remeshinputoffset mesh that should be remeshed-ooutput mesh--debugoutfolder for debug output-rnumber of remeshing steps.--lminfactormultiplier for the minimal edge length--lmaxfactormultiplier for the maximal edge length