项目的 README,来自 github.com/NVIDIA-Omniverse/usd-brep。合并为一个 markdown 文件:README.md。
Solid modeling for OpenUSD. USD BRep creates and edits
boundary-representation (BRep) solids and reads and writes them in USD as
BrepArray prims.
BRep faces and edges can be NURBS or analytic geometry. Plane, cylinder, cone, sphere and torus faces are written to USD as analytic surfaces. Edge curves are written as NURBS; analytic line, circle and ellipse edges in USD from other tools are read as analytic curves. Other SMLib types, such as parabolas and surfaces of revolution, are written as NURBS. See supported geometry for the SMLib class names.
Libraries and tools that work on BReps stored in USD files:
BrepArray prim, which stores BReps in
USD with their full topology and NURBS or analytic geometry; see the
proposal and its
problem statement.BrepArray prims into
SMLib BReps and writes SMLib BReps back to USD.BrepArray prim in a USD file.UsdGeomMesh for each BRep in the BrepArray
prims of a USD file.The SMLib kernel, and tools that work on BReps in memory:
Guidance for coding agents, starting from AGENTS.md:
nvidia-omniverse.github.io/usd-brep, including the Python and C++ API reference.
The Python package is on PyPI for CPython 3.12 on Linux (x86_64, aarch64) and Windows:
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")
To repair the BReps in an existing USD scene, usd.heal_file heals the BrepArray
geometry in the layers the scene uses and writes the scene with its layers,
references, instancing, transforms and materials kept:
usd_brep.usd.heal_file("input.usdc", "input_healed.usdc")
See the package README for the API's submodules and Examples for runnable examples in Python and C++.
To build the libraries, tests and tools yourself, see BUILDING.md. It covers requirements for Linux, Windows and macOS, building, testing, viewing BReps in usdview and the Python GUI.
This project is currently not accepting contributions.
Issues and bug reports are welcome through the issue tracker, and security
issues should be reported as described in SECURITY.md. See CONTRIBUTING.md for
details.
USD BRep is licensed under the Apache License, Version 2.0. See LICENSE for the terms governing use, reproduction, and distribution.
Copyright (c) 2020-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
repo.sh, repo.bat, and tools/repoman/repoman_bootstrapper.py are licensed
under the MIT License instead; see THIRD_PARTY_NOTICES.md for the full text.
For third-party notices and bundled components, see THIRD_PARTY_NOTICES.md.