Skip to main content

USD BRep

Boundary representation (BRep) solid modeling, with native import and export of BRep data to and from OpenUSD.

pip install usd-brep
import usd_brep

sphere = usd_brep.primitives.create_sphere((0.0, 0.0, 0.0), 1.0)
box = usd_brep.primitives.create_box((0.0, 0.0, 0.0), 1.0, 1.0, 1.0)
cut = usd_brep.booleans.boolean_difference(sphere, box)  # a sphere missing one octant

usd_brep.usd.export_brep(cut, "cut.usda")
(brep,) = usd_brep.usd.import_breps("cut.usda")

Operations are grouped into submodule attributes — primitives, curves, surfaces, booleans, sweeps, fillets, offset, io, brep_ops, stitching, usd and more.

Requirements

OpenUSD

The wheel bundles the OpenUSD runtime it was built against (25.11), so no separate install is needed and nothing is imported into the pxr namespace. Stages are exchanged as files rather than as Python objects, so no OpenUSD object ever crosses between this package and your own.

It can share a process with a different OpenUSD version, which has its own versioned symbol namespace: usd-core 26.8 alongside this package is tested and works on Linux. Loading another build of the same version in one process is not supported -- the namespaces coincide, so the dynamic loader may bind either copy's symbols. usd-core 25.11 on PyPI is such a build: do not install it in the same environment, because importing both crashes.

Validation

pip install "usd-brep[validation]" adds usd-validation-nvidia, with PyPI usd-core as its OpenUSD, and registers the BrepArray schema rules (BrepUsdSchemaValidator) with it, so they run with the standard rules:

nvidia_usd_validate model.usda

The validation extra is not available on Linux aarch64, where PyPI has no usd-core.

The rules run in the validator's OpenUSD and do not import usd_brep. They use the omniSolid schema bundled in this wheel unless OMNISOLID_PLUGIN_PATH points to another copy. To run them without the plugin system, call brep_usdschema_validator.register_all(), or use brep_usdschema_validator.usdschema_validate_file().

Healing

usd-brep-heal input.usda output.usda heals the BrepArray prims in a scene and writes the result to a new file; it runs usd_brep.usd.heal_file.

Geometry validation

usd_brep.usd.validate_geometry_file runs the kernel's SmBrep::AssertValid on the Breps of each BrepArray prim (geometry and topology); prims that share instanced geometry are checked once. It does not check the BrepArray schema rules that brep_usdschema_validator checks. An invalid Brep is returned as a result (ok is False), not raised.

import usd_brep.usd

for result in usd_brep.usd.validate_geometry_file("model.usda"):
    print(result.prim_path, result.ok)
    for failure in result.failures:
        print(" ", failure)

usd-brep-validate-geometry model.usda [--level N] does the same from a shell. It prints a line per prim and exits 0 when every Brep is valid, 1 when any is invalid and 2 when the file cannot be checked.

License

Apache-2.0. See the LICENSE file included in the distribution.

Metadata

Release files for usd-brep 1.0.2

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

Built distributions (wheels)

Table of built distributions (wheels) for usd-brep 1.0.2
File Interpreter ABI Platform Actions
usd_brep-1.0.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for usd_brep-1.0.2-cp312-cp312-win_amd64.whl
usd_brep-1.0.2-cp312-cp312-manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64 Details for usd_brep-1.0.2-cp312-cp312-manylinux_2_34_x86_64.whl
usd_brep-1.0.2-cp312-cp312-manylinux_2_34_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ ARM64 Details for usd_brep-1.0.2-cp312-cp312-manylinux_2_34_aarch64.whl

Total release size: 198.4 MB

Release files / usd_brep-1.0.2-cp312-cp312-win_amd64.whl

Download URL usd_brep-1.0.2-cp312-cp312-win_amd64.whl
Size 17.6 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
22e0485f13200d504be3f8f4c4f877bb5e07e60ed8e9f8f51995fdd7f02a7475
BLAKE2b-256 checksum
How to use checksums
fd8558c2bac3eb8d153dc403784aa87520a4579616bf376e041cd332ca4d4bd6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / usd_brep-1.0.2-cp312-cp312-manylinux_2_34_x86_64.whl

Download URL usd_brep-1.0.2-cp312-cp312-manylinux_2_34_x86_64.whl
Size 91.6 MB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
84694999921aa3ec57b58a2bd1bf07e35cee70f92ff8c129bae3cc69069a0efc
BLAKE2b-256 checksum
How to use checksums
17c7e25602d7ffeb8e7626856b3d524657f1659609772ef6239a1660479ecbbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / usd_brep-1.0.2-cp312-cp312-manylinux_2_34_aarch64.whl

Download URL usd_brep-1.0.2-cp312-cp312-manylinux_2_34_aarch64.whl
Size 89.2 MB
Tags CPython 3.12 Linux glibc 2.34+ ARM64
SHA-256 checksum
How to use checksums
605eff60880f0afaedd6b96bb1b05f725149e64ee465ea64fe735bea0805c163
BLAKE2b-256 checksum
How to use checksums
05693ac44ad323bc55039f24a6a5a9c8847d6aaa5721d62bd10b93fcad2b9615
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for usd-brep 1.0.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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