usd-brep README

The project's README from github.com/NVIDIA-Omniverse/usd-brep. As one markdown file: README.md.

USD BRep

Standalone Omniverse repo containing USD BRep (NURBS boundary-representation solid modeling) libraries.

Requirements

All other build-time dependencies — OpenUSD, Python 3.12, pybind11, premake, and the repo_* tools — are pulled automatically via Packman when you build.

Using this repo

Prerequisites are listed under Requirements. Use ./repo.sh on Linux and macOS, ./repo.bat on Windows. macOS: macOS local development.

Build it

Run prebuild before building a fresh checkout or after deleting _build. It stages the omniSolid schema plugin in _build/schema/omniSolid/resources; repo build alone does not create these resources, which USD tools require at runtime.

# Linux
./prebuild.sh
./repo.sh build

# macOS
./prebuild.sh -p macos-universal
./repo.sh build -p macos-universal

# Windows
./prebuild.bat
./repo.bat build

Test it

./repo.sh test
./tests.sh linux-x86_64              # or macos-universal

Format it

./repo.sh format

Run the Python GUI

# Debug binaries by default (kernel Dump() echoes to the terminal).
uv run --locked --group gui python tools/scripts/smlib_gui.py

# Release binaries: add --release
uv run --locked --group gui python tools/scripts/smlib_gui.py --release

See tools/smlib_gui/README.md for smoke-test and troubleshooting commands.

Explore examples

Runnable compositions organized by API layer live under Examples.

macOS local development

Apple Silicon only: ./repo.sh build -p macos-universal. Build symlinks host Packman Python into _build/target-deps/python when available (SMLIB_PYTHON_ROOT to override).

Python-only (default): kernel, C++ tests, _smlib_tests, and _smlib_dev (imports need Tier 1 _omni_solid). No OpenUSD, OCCT, or _omni_solid.

./repo.sh build -p macos-universal -j10
./tests.sh macos-universal

Tier 1 (optional): local OpenUSD 3.12 staged via setup-macos-local-deps.sh.

export SMLIB_USD_ROOT=~/opt/usd-25.11-py312
./tools/scripts/setup-macos-local-deps.sh
./repo.sh build -p macos-universal -j10
./tests.sh macos-universal

Set PYTHONPATH="$PWD/_build/macos-universal/release" to import Python extensions. Packman OpenUSD/Python packages are not available on macOS. The macOS premake package ([email protected]+nv1-macos-universal, deps/host-deps.packman.xml) is not on the public Packman server either; supply it through a user-level Packman configuration. Avoid ./repo.sh build -x; delete _build, _compiler, and _repo to clean.

Contributing

This project is currently not accepting contributions.

Issues and bug reports are welcome through the project issue tracker, and security issues should be reported as described in SECURITY.md. See CONTRIBUTING.md for details.

License

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.

Heal USD BRep assets

usd.heal_file heals BrepArray definitions in the layers used by the current USD composition and writes the scene with the healed geometry, keeping its layers, references, native instancing, transforms and materials. External layers used only by unselected variants remain referenced but are not healed. Material subset opinions outside the BRep's defining prim spec are rejected rather than lost.

import usd_brep
usd_brep.usd.heal_file("input.usdc", "input_healed.usdc")

usd-brep (NVIDIA-Omniverse/usd-brep)

Searching Database…

这是什么?USD BRep 是 NVIDIA Omniverse 推出的一个独立的 C++ 和 Python 库,用于基于 NURBS 的边界表示(BRep)实体建模,专为配合 OpenUSD 使用而构建。
它是一个完整的 CAD 应用,还是需要嵌入我自己代码里的库?它是一个供你链接或导入的 C++/Python 库——这个仓库提供的是内核、C++ 测试、smlibtests/smlibdev 模块,以及一个用于冒烟测试的 Python 图形界面,而不是一个独立的建模应用。
我怎么构建它?用 Git LFS 克隆仓库,然后在 Linux/macOS 上运行 ./repo.sh,或在 Windows 上运行 ./repo.bat;在全新检出上要先运行 prebuild,把所需的 omniSolid schema 插件准备好,之后再调用 build。
构建之前我需要安装什么?你需要 Git LFS 来获取二进制测试文件;在 Windows 上需要安装 Visual Studio 2019/2022,并勾选 MSVC C++ 工作负载和 Windows SDK;在 Linux 上只需 build-essential。OpenUSD、Python 3.12、pybind11 和 premake 会在构建过程中通过 Packman 自动获取。
macOS 的支持和 Windows、Linux 一样完整吗?不一样——macOS 只支持 Apple Silicon,默认只构建 Python 部分(不含 OpenUSD/OCCT/omnisolid),而且其他平台使用的 Packman OpenUSD/Python/premake 包在 macOS 上完全没有提供。
usd.healfile 这个工具是做什么的?它用于修复 USD 组合各图层中的 BrepArray 定义,把修复了几何数据的场景写回,同时保持图层结构、引用、原生实例化、变换和材质原封不动。
omniSolid 是什么,为什么 prebuild 这一步很重要?omniSolid 是一个 USD schema 插件,让各种 USD 工具能在运行时识别 BRep 几何数据;prebuild 这一步会把它放置到 build/schema/omniSolid/resources,因为普通的 build 不会自己生成这些资源。
Size
19.3 MB
Stars
1.6K
Age
9d
Commits · 90 Days