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.

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. 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.

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.1.4.tar.gz (74.3 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.1.4-py3-none-any.whl (92.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: compas_brep-0.1.4.tar.gz
  • Upload date:
  • Size: 74.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for compas_brep-0.1.4.tar.gz
Algorithm Hash digest
SHA256 fd51c6bfc40f3041130e283a7e3dfead55deb4b91859ff99ba031a09cdb7e225
MD5 e5c90a693107ec98253d3c16a875da7b
BLAKE2b-256 79bf322240a9a4795c145901e74bb06c0c20ea2da70fdba38ae0c915bf62b465

See more details on using hashes here.

File details

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

File metadata

  • Download URL: compas_brep-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 92.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for compas_brep-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 666f7cd3c6cc364e842a4727748ea981d007412eb131df63ed3b0688001b5cf2
MD5 65742ed7d0c4105c4431012445a07925
BLAKE2b-256 ecf85a5127f8309e4d8f38a28d419495068f75f15c0a9fe0585d317a05a7b98c

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

This release

0.1.4 This release

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