libfive
Infrastructure for solid modeling.
(formerly known as mkeeter/ao)
About
- Project homepage (with demo videos!)
- API Examples
- Downloads
libfive
is a framework for solid modeling using
functional representations.
It includes several layers, ranging from infrastructure to GUI:
- The
libfive
shared library contains functions to build, manipulate, and render f-reps. A great deal of work has gone into the meshing algorithm, which produces watertight, manifold, hierarchical, feature-preserving triangle meshes. The library is written in C++ and exposes a C API inlibfive.h
. libfive-guile
is a Guile binding tolibfive
. It exposes a high-level API to construct shapes, and includes a standard library of shapes, transforms, and CSG operations.- Studio is a GUI application in the style of
OpenSCAD.
It wraps
libfive-guile
and allows for live-coding of solid models. The interface also includes direct modeling, where the user can push and pull on the model's surface to change variables in the script.
Compiling from source
The full system (libfive
+ libfive-guile
+ Studio)
has been successfully compiled on Mac and Linux.
There's also a third-party fork
here
that builds libfive
on Windows with MSVC.
Dependencies
On a Mac with homebrew
installed, run
brew install cmake pkg-config eigen libpng qt guile boost
On a Ubuntu machine, run
sudo apt-get install cmake pkg-config libeigen3-dev libpng-dev qtbase5-dev guile-2.2-dev libboost-all-dev
(untested; open an issue or PR if this doesn't work for you)
Qt and Guile are optional; if they aren't present, then
the Guile bindings and Studio will not be included in the build
(and cmake
will print a message to that effect).
Invocation
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.7.0 ..
make
Adjust based on your Qt installation path, and consider using ninja
for faster builds.
License
(c) 2015-2017 Matthew Keeter
Different layers of this project are released under different licenses:
- The
libfive
dynamic library is released under the LGPL, version 2 or later. libfive-guile
andStudio
are released under the GPL, version 2 or later.
Contact me to discuss custom development, integration, or commercial support.