compas_manifold
Robust, guaranteed-manifold mesh boolean operations for COMPAS, powered by the Manifold library and bound with nanobind.
Manifold uses its own robust geometric predicates and always returns a valid, watertight, oriented 2-manifold — no exact kernel to opt into, no precision crashes on degenerate input.
Quickstart
Needs uv and a C++17 compiler. Manifold is fetched and compiled automatically — no extra setup.
git clone https://github.com/petrasvestartas/compas_manifold.git
cd compas_manifold
uv venv --python 3.12
source .venv/Scripts/activate # Git Bash on Windows (Linux/macOS: source .venv/bin/activate)
uv pip install nanobind "scikit-build-core[pyproject]" cmake ninja
uv pip install --no-build-isolation -ve ".[dev]"
python docs/examples/example_booleans.py
Run the tests with pytest tests. More options in
docs/installation.md.
Usage
from compas.geometry import Box, Sphere, Polyhedron
from compas_manifold.booleans import (
boolean_union_mesh_mesh,
boolean_difference_mesh_mesh,
boolean_intersection_mesh_mesh,
split_mesh_mesh,
)
A = Box(2).to_vertices_and_faces(triangulated=True)
B = Sphere(1.0, point=[1, 1, 1]).to_vertices_and_faces(u=32, v=32, triangulated=True)
V, F = boolean_difference_mesh_mesh(A, B)
shape = Polyhedron(V.tolist(), F.tolist())
Whole-pipeline booleans (evaluated in C++)
Keep every intermediate mesh inside C++ and only return the final result:
from compas_manifold.booleans import boolean_chain
# rounded, drilled cube: cube ∩ sphere − cyl_x − cyl_y − cyl_z
V, F = boolean_chain(
[cube, sphere, cyl_x, cyl_y, cyl_z],
["intersection", "difference", "difference", "difference"],
)
| Function | Description |
|---|---|
boolean_union_mesh_mesh(A, B) |
Union of two meshes |
boolean_difference_mesh_mesh(A, B) |
Difference A - B |
boolean_intersection_mesh_mesh(A, B) |
Intersection of two meshes |
split_mesh_mesh(A, B) |
Split A with B |
boolean_*_mesh_mesh_with_polygons(A, B) |
(V, F, P) with coplanar-face ids (merge triangles into n-gons) |
merge_coplanar_faces / coplanar_polygons / coplanar_outline_edges |
recover polygonal faces (with holes) & clean outlines |
boolean_chain(meshes, operations) |
Left-folded chain of ops, in C++ |
boolean_batch(meshes, operation) |
Single op over many meshes (BatchBoolean) |
boolean_chain_with_face_source(meshes, operations) |
Chain + per-face source tracking |
boolean_difference_mesh_meshes(A, Bs) |
Subtract many cutters from A in one batch |
Documentation
License
compas_manifold is released under the Apache License 2.0, matching the
Manifold library it wraps. See
LICENSE.
Release files for compas-manifold 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| compas_manifold-0.1.0.tar.gz | 529.9 kB | Details |
Built distributions (wheels)
Total release size: 7.1 MB
Release files / compas_manifold-0.1.0.tar.gz
| Download URL | compas_manifold-0.1.0.tar.gz |
|---|---|
| Size | 529.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28484b9fb56af41efef964c99c0b4373b570b94055178181d0df2697c3de9d1d
|
|
BLAKE2b-256 checksum How to use checksums |
24f0051c2046363f2277d04b0a2d8882ebb877e586ecf917e1c4d5ad53693156
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency logRelease files / compas_manifold-0.1.0-cp312-abi3-win_amd64.whl
| Download URL | compas_manifold-0.1.0-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 243.4 kB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
b8fbfd7592db1079f6be62f9bdff121d1f17c34d9d680266fecbf058401e29a4
|
|
BLAKE2b-256 checksum How to use checksums |
e6da5fc990fa59b6f58976d785f933b5a39ec34bfcd38e269509cdfeed79b9f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency logRelease files / compas_manifold-0.1.0-cp312-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | compas_manifold-0.1.0-cp312-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 595.4 kB |
| Tags | CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
38199c7e921c2a883780f312f26066e61d0876a99413589ae4499a4fbbbad494
|
|
BLAKE2b-256 checksum How to use checksums |
7f885f356d45e013d6fb34438159ff72b67c8e3357d1f231c006328b147af834
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency logRelease files / compas_manifold-0.1.0-cp312-abi3-macosx_11_0_x86_64.whl
| Download URL | compas_manifold-0.1.0-cp312-abi3-macosx_11_0_x86_64.whl |
|---|---|
| Size | 423.6 kB |
| Tags | CPython 3.12 abi3 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
3d10ecd3f727a7e6bc6ab65c53cb21a6788e419f4017882466718675ce8130e4
|
|
BLAKE2b-256 checksum How to use checksums |
c6a3db72f72ba6279d8cd57c4c122460a746baf904cd647a133ad334e37f7862
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency logRelease files / compas_manifold-0.1.0-cp312-abi3-macosx_11_0_arm64.whl
| Download URL | compas_manifold-0.1.0-cp312-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 371.0 kB |
| Tags | CPython 3.12 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b9fb0c5cccb69269a6e57e5e3701abe18cc9eaec8605f3fad564d562d85808dd
|
|
BLAKE2b-256 checksum How to use checksums |
23dce296fb84282527d5b185036fad06e0df4913d3b2d6bdacc21215578a995a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency logRelease files / compas_manifold-0.1.0-cp311-cp311-win_amd64.whl
| Download URL | compas_manifold-0.1.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 245.5 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4a7bf835499a6fde7ab0b3f86efc80e1035c42e92339a22e10d785e72e877462
|
|
BLAKE2b-256 checksum How to use checksums |
b998677d9639e4fb35ff8afe9d4df1c9f9e9ca5a07a695147e1ce5c776b4c39c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency logRelease files / compas_manifold-0.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | compas_manifold-0.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 599.4 kB |
| Tags | CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
882ab933b4e44b63cb6ab5576921e091598e726a207dea715ff548b8e06a217d
|
|
BLAKE2b-256 checksum How to use checksums |
0bd0d719a8678f26ad0896b8127b48380dfdd13986f5e72fde52f8174a34bdeb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency logRelease files / compas_manifold-0.1.0-cp311-cp311-macosx_11_0_x86_64.whl
| Download URL | compas_manifold-0.1.0-cp311-cp311-macosx_11_0_x86_64.whl |
|---|---|
| Size | 425.6 kB |
| Tags | CPython 3.11 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
c684bdcd36e6aaa4c06cc5cc9247a56301a6150e1d1ee1f0c668d45f38afa712
|
|
BLAKE2b-256 checksum How to use checksums |
1e399ff1ef65d502949ef22669652bddf9cb6ccb8e29d15d24e1fc6f6b8734c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency logRelease files / compas_manifold-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | compas_manifold-0.1.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 373.2 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
3e00fbb0f08f9f1e6a168e2a2131779145befba21690bd43253f4b8fb712f8cb
|
|
BLAKE2b-256 checksum How to use checksums |
727f64e026e4eb23f7acd1ff2e0dd1a3b394c362c57ba7fb2307cc87ddfda144
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency logRelease files / compas_manifold-0.1.0-cp310-cp310-win_amd64.whl
| Download URL | compas_manifold-0.1.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 245.7 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
80985eed161168425f35a4ea519d4e1b2f9b80d93773e85abc8d5a31cf295e87
|
|
BLAKE2b-256 checksum How to use checksums |
c4dec86f3fc091597e33c898e76f6579f90e1038babeca4ecbfcbeb17d131ae5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency logRelease files / compas_manifold-0.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | compas_manifold-0.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 599.8 kB |
| Tags | CPython 3.10 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
cfb82d36c088464ec0b0e2d008c7200c91f9e994bc6c43c63bfbb8789d51b890
|
|
BLAKE2b-256 checksum How to use checksums |
a25297c32d24e39b5011246eb7205204cdb50d3e7350ffd7329f17a6943c5b70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency logRelease files / compas_manifold-0.1.0-cp310-cp310-macosx_11_0_x86_64.whl
| Download URL | compas_manifold-0.1.0-cp310-cp310-macosx_11_0_x86_64.whl |
|---|---|
| Size | 425.9 kB |
| Tags | CPython 3.10 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
101f56ac2c12129839bfcf8e3de2316e861828b0dc7de51237fa401b21a1110a
|
|
BLAKE2b-256 checksum How to use checksums |
51b3087770362aecdf82269590915ecc78c88f5cd30fe60414cb2afe153b127b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency logRelease files / compas_manifold-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | compas_manifold-0.1.0-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 373.5 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
222cde424ac2843185fa2624d97f566c4a757662c4440553b149c31aa38afc4a
|
|
BLAKE2b-256 checksum How to use checksums |
6c7362c6ebe26ffde530040596992c1b5919fbd938bf72bdca7b0f55c21c6ef9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency logRelease files / compas_manifold-0.1.0-cp39-cp39-win_amd64.whl
| Download URL | compas_manifold-0.1.0-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 245.9 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
776eb59323992accb1e0181bf5ae805ea62754f160bfeab1164485f441aa9d59
|
|
BLAKE2b-256 checksum How to use checksums |
76748adf7505bc016e5e5dc30e1e4302dab6b73cfd7c92bf5ba9d742fed5875a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency logRelease files / compas_manifold-0.1.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | compas_manifold-0.1.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 600.0 kB |
| Tags | CPython 3.9 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
61226fdadb1a01161b88f37ca224ee4f343fd2ff15012ef45ccd3ca2bffb4337
|
|
BLAKE2b-256 checksum How to use checksums |
9a272ee11a2d90a89cf87927fa7c490d02cc395e9553088118d5ee8c64756326
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency logRelease files / compas_manifold-0.1.0-cp39-cp39-macosx_11_0_x86_64.whl
| Download URL | compas_manifold-0.1.0-cp39-cp39-macosx_11_0_x86_64.whl |
|---|---|
| Size | 426.1 kB |
| Tags | CPython 3.9 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
eac03583ccc6d29ec80010f21baf243fb8971afa118510132c1d6503682efacb
|
|
BLAKE2b-256 checksum How to use checksums |
f3e22e56bff897ac4e26f6d19893d483104ad2507c9bdb762952b49767e1e710
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency logRelease files / compas_manifold-0.1.0-cp39-cp39-macosx_11_0_arm64.whl
| Download URL | compas_manifold-0.1.0-cp39-cp39-macosx_11_0_arm64.whl |
|---|---|
| Size | 373.7 kB |
| Tags | CPython 3.9 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
3d9b909543e2d280694bbaf2045d3d9bdaa0dbd12479e54acc22900371ae0e61
|
|
BLAKE2b-256 checksum How to use checksums |
fbd4d2111a5adcbe259fb05196a770a890a46427c1bf3f5f61ea974415d8cfee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency log