Skip to main content

compas_brep

Github Actions Build Status License PyPI Package latest release Made with COMPAS

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/

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

Metadata

Release files for compas-brep 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for compas-brep 0.3.1
File Size Uploaded
compas_brep-0.3.1.tar.gz 104.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for compas-brep 0.3.1
File Interpreter ABI Platform
compas_brep-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 227.9 kB

Release files / compas_brep-0.3.1.tar.gz

Download URL compas_brep-0.3.1.tar.gz
Size 104.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b4e7afe076d0ac193a8552be480b87c9f704f3f8e23542fbaffadebb3931d072
BLAKE2b-256 checksum
How to use checksums
d592a763eefe855204056c8a8e0976c4a8c5a1d1e08b6a81d9dad1e3b0212b5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 9, 2026.

Transparency log

Release files / compas_brep-0.3.1-py3-none-any.whl

Download URL compas_brep-0.3.1-py3-none-any.whl
Size 123.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
932f037385f0917653c713b1797dca47c478016deda46556bb0e3be4f103f79c
BLAKE2b-256 checksum
How to use checksums
7ebb8d06103bdfcce2060b54687279648877a6766c2330a9339cce2a3dd3b6f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 9, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.0

2 release files

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page