Skip to content

ipadjen/wrapwrap

Repository files navigation

wrapwrap

Build Status

wrapwrap is the 3D Alpha Wrapping from CGAL wrapped in a simple command line application.

wankel_cad

It creates watertight and valid geometries from the input mesh. It fills holes and even simplifies geometries depending on wrapping parameters. Can be useful for CFD applications.

Also works with bad quality and missing data:

wankel_cad

More information about the algorithm and parameters can be found in CGAL's documentation.

Getting started

Windows users can download and run the binary wrapwrap.exe provided in the release. Unix (Linux/MacOS) users have to build from source.

To run the tool, type the following in the command line:

wrapwrap -i input_file.obj -alpha relative_alpha -offset relative_offset -o output_file.obj

Larger numbers result in better geometries, but with a time penalty. My suggestion is to start with around 500 for relative_alpha and 1200 for relative_offset and raise numbers until you are satisfied with the results. For quick checks and simplifications, try even lower values (e.g. 20-100 for alpha and 1000 for offset).

Supported formats: STL, OBJ, PLY, VTP, OFF.

Building from source

Dependencies

CGAL >= 5.0

Linux - Ubuntu/Debian

sudo apt-get install libcgal-dev 

Mac - Homebrew

brew install cgal

Build

With installed dependencies, clone the repo:

git clone https://github.com/ipadjen/wrapwrap.git

and build the code using cmake:

mkdir build && cd build
cmake ..
make
./wrapwrap