Libfive
Solid modeling framework for CAD using functional representations, with a meshing library, scripting bindings and an OpenSCAD-style GUI.
- GitHub stars
- 1.7k
- Last commit
- 10 mo ago

libfive is a framework for solid modeling built on functional representations, where a shape is defined by a mathematical function rather than a list of polygons. It is aimed at CAD users, programmers and researchers who want to design parts through code and then render or mesh them. It is organized in layers, from low-level infrastructure up to a graphical application.
The core shared library, written in C++ with a C API, builds, manipulates and renders these functions. Its meshing algorithm produces watertight, manifold, hierarchical, feature-preserving triangle meshes. A standard library adds common shapes, transforms and constructive solid geometry operations, and generates bindings for Guile Scheme and Python for use in a REPL or in larger programs. Studio, the GUI application, is in the style of OpenSCAD and supports live coding of models as well as direct modeling, where pushing and pulling on the surface changes script variables.
The ecosystem includes bindings for Common Lisp, Rust and Unity, several lightweight viewers, and a research paper on rendering implicit surfaces in parallel on the GPU. The repository metadata does not specify a license, so check the repository before use. Downloads, API documentation and examples are linked from the project homepage.
Key features
- Functional representation solid modeling
- Watertight feature-preserving mesh generation
- Standard library of shapes and CSG operations
- Guile Scheme and Python bindings
- Studio GUI with live coding
- Direct modeling by pushing and pulling surfaces