MONOS computes the straight skeleton of a given monotone polygon.
The algorithm is based on the following scientific work: https://doi.org/10.1016/j.ipl.2014.09.021 -- A simple algorithm for computing positively weighted straight skeletons of monotone polygons.
Reads GraphML (.graphml) format that describes a polygon. Writes .obj format with 3D coordinates which can be imported into programs like Blender.
- C++17 enabled complier (gcc,clang)
- CGAL (tested with version 5.0 -- https://doc.cgal.org/5.0/Manual/packages.html)
- Linux or Mac OS (for Mac OS use -DWITH_GUI=off)
- MPFR (6, https://www.mpfr.org)
- GMP (10, https://www.mpfr.org)
- BOOST (>= 1.67, with libboost_graph, libboost_regex, https://www.boost.org)
- libQT5Core
- libQT5Xml
- libQT5Gui
- libQT5Widgets
- libQT5Svg
- libQT5=openGL
- libGLX
In the CMakeLists.txt
in the main directory contains the following two options
that can be changed in order to remove the GUI (and QT requirements) or link against
the CGAL::Cartesian
kernel (faster but inexact). As stated default setting with GUI
and with exact arithmitic.
OPTION(WITH_GUI "Enable GUI (requires QT)" ON) # Enabled by default
OPTION(WITH_FP "Disable exact kernel but use rational kernel" OFF) # Disabled by default
git clone --recurse-submodules https://github.com/cgalab/monos
mkdir -p monos/build && cd monos/build
cmake ..
make -j 6
For the RELEASE
version use cmake -D CMAKE_BUILD_TYPE=Release ..
In case the repository is already checked out without the submodules enter use:
git submodule update --init --recursive
monos [--verbose][--timings][--normalize] --out <filename> <filename>
options | shortform | description |
---|---|---|
--help | --h | print help |
--verbose | --v | verbose mode, shows information about the computation |
--normalize | --n | write output normalized to the origin |
--out | --o | write output in wavefront obj format (3D coordinates) |
--timings | --t | print <vertex count>,<time spent in computation>,<memuse>,<filename> |
<filename> | input type is either wavefront obj or GML format |
Note, the --verbose
option is only available in the DEBUG
version.
Monos reads GraphML format. Using format-converter may common formats can be converted into GraphML.
- easyloggingpp -- https://github.com/cgalab/easyloggingpp
Directories cc
and gui
produces the binaraies for the CLI and the GUI version.
Tha main algorithm and library is in monos
sparated in src
and inc
directory.
File | Discription |
---|---|
Wavefront | Compute the Straight Skeleton of the two monotone chains. Holds the Nodes and Arcs that store the straight skeleton. |
Skeleton | Construct the Merge and joins the two skeletons. |
BasicInput, BGLGraph | Read the .graphml input file. |
In the test-data
directory are a few examples to test with monos.
Monos is licenced under GPLv3.