compas_brep
A unified Brep wrapper for the COMPAS framework with pluggable OCC and Rhino backends. See Motivation for why.
Provides a single Brep class with a stable public interface. The backend (OCC or Rhino) is selected automatically at runtime based on what is importable — see Architecture. All inputs and outputs are COMPAS types — never backend types.
Examples in examples/ have mostly been copied from COMPAS OCC which is used as benchmark for this project.
Documentation
Full documentation: https://gramaziokohler.github.io/compas_brep/
- What is a Brep? — the shape model, in one page
- Architecture — what happens where
- Examples — runnable scripts by topic
- Adding a new operation — extending compas_brep across both backends
- API Reference
Installation
Base (no backend):
pip install compas_brep
With OCC backend:
pip install "compas_brep[occ]"
The Rhino backend is available automatically when running inside Rhino.
Usage
import os
from compas_brep import Brep, DATA
from compas_viewer import Viewer
brep = Brep.from_step(os.path.join(DATA, "box_with_holes.stp"))
for face in brep.faces:
print(face.surface) # Plane for flat faces, NurbsSurface for curved faces
viewer = Viewer()
viewer.scene.add(brep)
viewer.show()
Running tests
Install the OCC backend and run:
uv pip install "cadquery-ocp-novtk>=7.8"
pytest -m occ -q
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file compas_brep-0.2.2.tar.gz.
File metadata
- Download URL: compas_brep-0.2.2.tar.gz
- Upload date:
- Size: 100.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
809530ffe7cb928de267325b0b21588e2da542e9f4dba11cb4592eb7015b489b
|
|
| MD5 |
19ef89809a26cea15f16b98e9150e7f1
|
|
| BLAKE2b-256 |
65b04bc0ff5047e86a95847c410b46398c3c398148021534ea0d327cdb2e1423
|
Provenance
The following attestation bundles were made for compas_brep-0.2.2.tar.gz:
Publisher:
release.yml on gramaziokohler/compas_brep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
compas_brep-0.2.2.tar.gz -
Subject digest:
809530ffe7cb928de267325b0b21588e2da542e9f4dba11cb4592eb7015b489b - Sigstore transparency entry: 2582878763
- Sigstore integration time:
-
Permalink:
gramaziokohler/compas_brep@568d44417c299136c5fc542f0bbae9a16b5ce3d9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/gramaziokohler
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@568d44417c299136c5fc542f0bbae9a16b5ce3d9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file compas_brep-0.2.2-py3-none-any.whl.
File metadata
- Download URL: compas_brep-0.2.2-py3-none-any.whl
- Upload date:
- Size: 120.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c33f57e915781f1a209a045024e0229c8f1e0eb203dc47422aed29bf72c0a00
|
|
| MD5 |
40ecaacbfc096998fda8ad1b11a71493
|
|
| BLAKE2b-256 |
520b14b3539c77b62fd6c6def59f23f92db29166967205b26614a417901be696
|
Provenance
The following attestation bundles were made for compas_brep-0.2.2-py3-none-any.whl:
Publisher:
release.yml on gramaziokohler/compas_brep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
compas_brep-0.2.2-py3-none-any.whl -
Subject digest:
9c33f57e915781f1a209a045024e0229c8f1e0eb203dc47422aed29bf72c0a00 - Sigstore transparency entry: 2582878775
- Sigstore integration time:
-
Permalink:
gramaziokohler/compas_brep@568d44417c299136c5fc542f0bbae9a16b5ce3d9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/gramaziokohler
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@568d44417c299136c5fc542f0bbae9a16b5ce3d9 -
Trigger Event:
push
-
Statement type: