{"id":13831309,"url":"https://github.com/libfive/libfive","last_synced_at":"2025-05-15T10:05:35.841Z","repository":{"id":37493505,"uuid":"47858605","full_name":"libfive/libfive","owner":"libfive","description":"Infrastructure for solid modeling","archived":false,"fork":false,"pushed_at":"2025-05-04T15:10:34.000Z","size":7382,"stargazers_count":1501,"open_issues_count":113,"forks_count":158,"subscribers_count":51,"default_branch":"master","last_synced_at":"2025-05-11T07:58:17.971Z","etag":null,"topics":["3dprinting","cad","design","guile","scheme"],"latest_commit_sha":null,"homepage":"https://libfive.com","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libfive.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-12T00:57:35.000Z","updated_at":"2025-05-04T15:10:40.000Z","dependencies_parsed_at":"2024-02-14T15:50:40.239Z","dependency_job_id":"d703e631-637a-4b9a-927b-8f8a928446a8","html_url":"https://github.com/libfive/libfive","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libfive%2Flibfive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libfive%2Flibfive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libfive%2Flibfive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libfive%2Flibfive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libfive","download_url":"https://codeload.github.com/libfive/libfive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319718,"owners_count":22051072,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3dprinting","cad","design","guile","scheme"],"created_at":"2024-08-04T10:01:24.286Z","updated_at":"2025-05-15T10:05:30.764Z","avatar_url":"https://github.com/libfive.png","language":"C++","funding_links":[],"categories":["C++","CAD — Computer-Aided Design"],"sub_categories":["Programmatic \u0026 Script-Based CAD"],"readme":"# libfive\n*Infrastructure for solid modeling.*  \n[Homepage](https://libfive.com) | [API Examples](https://libfive.com/examples) | [Downloads](https://libfive.com/download)\n\n`libfive` is a framework for solid modeling using\n[functional representations](https://en.wikipedia.org/wiki/Function_representation).\n\nIt includes several layers, ranging from infrastructure to GUI:\n\n- The `libfive` shared library contains functions to build, manipulate, and render f-reps.\nA great deal of work has gone into the meshing algorithm,\nwhich produces watertight, manifold,\nhierarchical, feature-preserving triangle meshes.\nThe library is written in C++ and exposes a C API in `libfive.h`.\n- The `libfive` standard library is a library of common shapes, transforms, and CSG operations.\n  It is implemented in C++ and exposes a C API in `libfive/stdlib/stdlib.h`\n- The standard library is parsed and used to generate bindings for both\n  [Guile Scheme](https://www.gnu.org/software/guile/)\n  and [Python](https://python.org),\n  for use in the REPL or as part of larger applications.\n- **Studio** is a GUI application in the style of\n[OpenSCAD](http://www.openscad.org/).\nIt uses the Python and Guile bindings and allows for live-coding of solid models.\nThe interface also includes direct modeling,\nwhere the user can push and pull on the model's surface\nto change variables in the script.\n\n## Other projects using `libfive`\n### Language bindings\n- [Tovero](https://github.com/JMC-design/tovero): A 3D modeling system for Common Lisp\n- [`libfivepy`](https://gitlab.com/rcmz0/libfivepy): A Python CAD library (work in progress)\n- [Bindings for Unity](https://github.com/zalo/libfive-unity)\n- High level [Rust bindings](https://crates.io/crates/libfive)\n- Unpublished [Stanza](http://lbstanza.org/) bindings (email for details)\n\n### Viewers\n- [Inspekt3D](https://git.sr.ht/~morgansmith/inspekt3d): Lightweight pure-Guile viewer\n- [PyFive3D](https://gitlab.com/kavalogic-inc/pyfive3d): Lightweight pure-Python viewer (work in progress)\n- [C5H12 (Pentane)](https://gitlab.com/kavalogic-inc/C5H12): Lightweight C viewer\n\n### Research\n- [Massively Parallel Rendering of Complex Closed-Form Implicit Surfaces](https://www.mattkeeter.com/research/mpr/):\n  a technical paper extending `libfive` to render on the GPU\n  ([reference implementation](https://github.com/mkeeter/mpr/))\n\n## Community\nFor `libfive`-specific discussions, consider opening a topic in the\n[Github Discussions tab](https://github.com/libfive/libfive/discussions).\n\nThere's also a `libfive` subforum in the [SDF User Group Discourse](https://sdfug.discourse.group/),\nwhich is a good place for general discussion of modeling with signed distance\nfields.\n\n## License\n(c) 2015-2021 Matthew Keeter\n\nDifferent layers of this project are released under different licenses:\n- The `libfive` library, `libfive-stdlib` library, and Python bindings\n  are released under the\n  [Mozilla Public License, version 2](https://www.mozilla.org/en-US/MPL/2.0/).\n- `libfive-guile` and `Studio` are released under the\n  [GNU General Public License, version 2](https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html)\n  [or later](https://www.gnu.org/licenses/gpl-3.0-standalone.html).\n\n[Contact the author](matt.j.keeter@gmail.com)\nto discuss custom development, integration,\nor commercial support.\n\n## Compiling from source\n`libfive` and Studio are compatible with macOS, Linux, and Windows.\n\n### Dependencies\n#### libfive\n- [`cmake 1.65 or later`](https://cmake.org/)\n- [`pkg-config`](https://www.freedesktop.org/wiki/Software/pkg-config/)\n- [Eigen 3.3.x](http://eigen.tuxfamily.org/index.php?title=Main_Page)\n- [`libpng`](http://www.libpng.org/pub/png/libpng.html)\n- [Boost 1.65 or later](https://www.boost.org)\n\n#### Guile bindings (optional, macOS and Linux only)\n- [Guile 2.2.1 or later](https://www.gnu.org/software/guile/)\n\n#### Python bindings (optional)\n- [Python 3.7 or later](https://www.python.org/)\n\n#### Studio (optional, requires Guile or Python bindings)\n- [Qt 5.12 or later](https://www.qt.io)\n\nWhen `cmake` is first run,\nit will check for all dependencies and print details of what\nwill be build, e.g.\n\n```\nChecking dependencies:\n  libfive:              ✓\n  Guile bindings:       ✓\n  Python bindings:      ✓\n  Studio:               ✓   (Python + Guile)\n```\n\n### Mac\nWith `homebrew` installed, run\n```\nbrew install cmake pkg-config eigen libpng boost guile python3 qt\n```\nOmit `guile`, `python3`, or `qt` to avoid building bindings and/or the UI.\n\nThen, from the `libfive` folder, run something like:\n```\nmkdir build\ncd build\ncmake -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.12.0  ..\nmake\n```\n(adjust based on your Qt installation,\nand consider using [`ninja`](https://ninja-build.org/) for faster builds.\n\n### Ubuntu\n`libfive` should build out of the box on the latest Ubuntu LTS\n(currently 20.04).  If you find that's not the case, please open an issue!\n\nStart by installing dependencies through the package manager:\n```\nsudo apt-get install g++ cmake pkg-config libeigen3-dev libpng-dev libboost-all-dev guile-3.0-dev qtbase5-dev python3\n```\nOmit `guile-3.0-dev` and/or `qtbase5-dev` if you do not want Guile bindings and/or Studio to be built too.\n\nBuilding is similar as on Mac: clone the repository, then run something like\n```\nmkdir build\ncd build\ncmake ..\nmake -j4\n```\n\nOnce building is complete, run Studio with `./studio/Studio`.\n\nRunning `sudo make install` will install components to system-wide destinations,\ne.g. `/usr/local/bin/Studio` for the main executable.\nThis will let you invoke `Studio` from anywhere in the system,\nrather than just the `build` directory.\nIf you are using this workflow,\n`sudo make install` must be run after changes to the repository\nto update the system-wide installation of the executable and libraries.\n[`Studio.desktop`](https://github.com/libfive/libfive/blob/master/studio/deploy/linux/Studio.desktop)\nmay be used to put a shortcut on your desktop.\n\nIf you don't want the Python bindings installed under `/usr/lib`, you\ncan specify the install directory using the `cmake` variable\n`PYTHON_SITE_PACKAGES_DIR`, e.g.\n```\ncmake -DPYTHON_SITE_PACKAGES_DIR=/usr/local/lib/python3.9/dist-packages .\n```\n\nUbuntu releases before 20.04 are not officially supported;\nif you insist,\nthere are hints [here](https://github.com/libfive/libfive/blob/b4e0e0bbf8c740a313754062a205a98ac336a19c/README.md#before-2004)\nand a discussion of Python linking issues [here](https://github.com/libfive/libfive/issues/408).\n\n### Windows (VS2022)\nInstall [Git](https://git-scm.com/download/win),\nchoosing settings so that it can be invoked from a Windows _Command Prompt_\n(the defaults should be fine).\n\nInstall [VS2022](https://visualstudio.microsoft.com/vs/) (Community Edition),\nconfigured for \"Desktop development with C++\".\nYou only _need_ MSVC, Windows 10 SDK, and C++ CMake tools for Windows,\nso feel free to uncheck other optional packages in the right sidebar,\nthen run the installation!\n\nNext, install dependencies using `vcpkg`.\n\n(This step touches many files, so you may want to disable the\n_Antimalware Service Executable_,\nwhich will otherwise scan every single file and slow things down dramatically:\nin \"Windows Security → Virus \u0026 threat protection settings\",\nuncheck \"Real-time protection\".)\n\nIn a Windows _Command Prompt_:\n```\ngit.exe clone https://github.com/libfive/libfive\ncd libfive\ngit clone https://github.com/Microsoft/vcpkg.git\n.\\vcpkg\\bootstrap-vcpkg.bat\n.\\vcpkg\\vcpkg.exe install --triplet x64-windows eigen3 boost-container boost-bimap boost-interval boost-lockfree boost-functional boost-algorithm boost-math libpng qt5-base python3\n```\nGo get some coffee or something - this will take a while.\n\nOnce this is done installing,\nyou're ready to actually build `libfive` and Studio!\n```\nmkdir build\ncd build\n\u0026 \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\CMake\\bin\\cmake.exe\" -DCMAKE_TOOLCHAIN_FILE=\"..\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake\" -DVCPKG_TARGET_TRIPLET=\"x64-windows\" -G\"Visual Studio 17 2022\" ..\n\u0026 \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\CMake\\bin\\cmake.exe\" --build . --config Release --target Studio --\n.\\studio\\Release\\Studio.exe\n```\n\nAt this point, you can also double-click on `Studio.exe` to launch it,\nand create a shortcut to put it on your desktop.\n\n(don't move it out of the `build` directory,\nor the precarious house of cards that finds Python will come tumbling down)\n\nWhen changes are made, you _should_ only need to re-run the build step, i.e.\n```\n\u0026 \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\CMake\\bin\\cmake.exe\" --build . --config Release --target Studio --\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibfive%2Flibfive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibfive%2Flibfive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibfive%2Flibfive/lists"}