MIT License

项目介绍

unageek/kigumi 是一个托管在 GitHub 上的开源项目,主要使用 C++ 编写,采用 MIT License 许可证,目前获得 55 个 Star、9 次 Fork。

仓库全名
unageek/kigumi
开源许可证
MIT License
Star 数
55
Fork 数
9
未关闭 Issue
1

README 摘要

kigumi is a header-only C++ library for performing regularized Boolean set operations on 3D regions that are (partially) bounded by triangular meshes. With kigumi, you can, for example: 1. Compute the union of a terrain mesh and a water-surface mesh to simulate flooding. 2. Intersect that result with a box to produce a solid model ready for 3D printing. Features Perform Boolean operations between 3D regions…

完整内容见 GitHub 原始 README 或本页 。

常见问题

kigumi 用什么语言开发?

主要使用 C++ 编写,采用 MIT License 许可证,目前有 55 个 Star。

kigumi 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 kigumi 的源码?

可以直接克隆仓库:git clone https://github.com/unageek/kigumi.git,默认分支为 main;安装与运行步骤见仓库 README。

kigumi 最近还在维护吗?

仓库最近一次更新为 8月31日,当前有 1 个未关闭 Issue;Star 数为 55,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Fearless Boolean operations on triangle meshes 🛌💤

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
78
价值分
36
活跃状态
活跃

语言占比

Batchfile
C++
CMake
PowerShell
Shell

贡献者

README

kigumikigumi

kigumi is a header-only C++ library for performing regularized Boolean set operations on 3D regions that are (partially) bounded by triangular meshes.

With kigumi, you can, for example:

  1. Compute the union of a terrain mesh and a water-surface mesh to simulate flooding.
  2. Intersect that result with a box to produce a solid model ready for 3D printing.

Features

  • Perform Boolean operations between 3D regions (partially) bounded by triangular meshes.
  • Meshes can be open or closed, manifold or non-manifold.
  • Regions can be disjoint, hollow, or even nested.
  • Correctly handle special regions: the empty set and the universe.
  • Apply multiple Boolean operators simultaneously.
  • Attach custom data to mesh faces that propagate through Boolean operations.
  • Save regions without losing information in a portable binary format.

Benchmarks

Here are the timings (in seconds) for computing the Boolean intersection between two meshes, excluding I/O time.

Test case coref. (seq.) geogram (par.) kigumi (seq.)¹ kigumi (par.) libigl (par.)² manif. (seq.)³ manif. (par.) MCUT (par.)
Open 3.2 FAILED 2.4 0.6 FAILED FAILED FAILED FAILED
Open & closed FAILED 5.5 1.0 0.4 FAILED FAILED FAILED FAILED
Closed 27.2 FAILED 4.6 1.1 39.3 1.3 0.2 FAILED
Non-manifold FAILED FAILED 0.5 0.1 FAILED FAILED FAILED FAILED
Exactness Exact Exact Exact Exact Exact Approx. Approx. Approx.

¹ Ran with KIGUMI_NUM_THREADS=1. ² igl::copyleft::cgal::mesh_boolean with CGAL::Lazy_exact_nt<mpq_class> as the number type was used. ³ Configured with -DMANIFOLD_PAR=OFF.

Benchmarks were performed on a MacBook Pro (14-inch, M4, 2024) with a 16-core CPU. Programs were built with Homebrew Clang 22.1.1. Spotlight was disabled during benchmarking. The following commands were used:

./tools/gen_bench_meshes.sh
./tools/run_benches.sh

Documentation

API

The kigumi CLI

Requirements on input meshes

Boundary meshes must satisfy the following conditions for Boolean operations to work properly. If any of these conditions are not met, the result is undefined and may emit warnings, crash, or produce broken meshes.

  1. Meshes must not have degenerate (zero-area) faces.
  2. Meshes must not self-intersect, i.e., every pair of distinct faces must meet one of the following conditions:
    • They share an edge but do not intersect elsewhere.
    • They share a vertex but do not intersect elsewhere.
    • They do not intersect at all.
  3. Open meshes must be clipped with a common convex region.
  4. Faces that have more than three vertices should be interpreted as triangle fans.

Algorithm

An enhanced and optimized version of the algorithm described in the following paper is used:

  • Barki, H., Guennebaud, G., & Foufou, S. (2015). Exact, robust, and efficient regularized Booleans on general 3D meshes. Computers & Mathematics With Applications, 70(6), 1235–1254. https://doi.org/10.1016/j.camwa.2015.06.016

License

The code is available under the MIT License.

To use kigumi in your application, you need a library that implements an interface compatible with a subset of CGAL. The following CGAL packages and their dependencies are required:

Package License
2D and 3D Linear Geometry Kernel LGPL
2D Triangulations GPL or commercial

Green ComputingGreen Computing

Adopting highly optimized algorithms helps reduce CO₂ emissions.

评论

暂无评论