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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

compas_brep-0.2.1.tar.gz (100.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

compas_brep-0.2.1-py3-none-any.whl (120.0 kB view details)

Uploaded Python 3

File details

Details for the file compas_brep-0.2.1.tar.gz.

File metadata

  • Download URL: compas_brep-0.2.1.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

Hashes for compas_brep-0.2.1.tar.gz
Algorithm Hash digest
SHA256 c30b563a73bf784fe08114907d3ba70b1efec0715fc3257a63af26ba5a3d5625
MD5 0d8aec9cba11bf6fe6e7756066a27469
BLAKE2b-256 7058e1bf719b337d70beef863438a43120fbee66818bc1c721c643d7e5e7fcf7

See more details on using hashes here.

Provenance

The following attestation bundles were made for compas_brep-0.2.1.tar.gz:

Publisher: release.yml on gramaziokohler/compas_brep

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file compas_brep-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: compas_brep-0.2.1-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

Hashes for compas_brep-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b0b29bec56116c6678c6b44f211cdff9fa44a56401148569e68e54d1090db8b8
MD5 c1234b5fdc53cbaab7d814b23df384aa
BLAKE2b-256 f79b3bdf06b219a052398f28f5447ac6e8bc073479d873fd30ce05e77ea11563

See more details on using hashes here.

Provenance

The following attestation bundles were made for compas_brep-0.2.1-py3-none-any.whl:

Publisher: release.yml on gramaziokohler/compas_brep

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.3.0

2 files

0.2.2

2 files

This release

0.2.1 This release

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 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