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 — это отдельная библиотека на C++ и Python от NVIDIA Omniverse для твердотельного моделирования на основе граничного представления (BRep) с использованием NURBS, созданная для работы с OpenUSD.
Это полноценное CAD-приложение или библиотека, которую я встраиваю в свой код?Это библиотека на C++/Python, которую вы подключаете при линковке или импортируете — в репозитории входит ядро, C++-тесты, модули smlibtests/smlibdev и Python-графический интерфейс для smoke-тестов, а не самостоятельное приложение для моделирования.
Как его собрать?Склонируйте репозиторий с Git LFS, затем запустите ./repo.sh на Linux/macOS или ./repo.bat на Windows; на свежей копии сначала выполните prebuild, чтобы подключить нужный плагин схемы omniSolid, и только потом вызывайте 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, а пакеты OpenUSD/Python/premake из Packman, которые используются на других платформах, там вообще недоступны.
Что делает инструмент usd.healfile?Он исправляет определения BrepArray во всех слоях USD-композиции и записывает сцену обратно с восстановленной геометрией, сохраняя без изменений структуру слоёв, ссылки, нативный инстансинг, трансформации и материалы.
Что такое omniSolid и почему важен шаг prebuild?omniSolid — это плагин схемы USD, который позволяет инструментам USD распознавать BRep-геометрию во время работы; шаг prebuild копирует его в build/schema/omniSolid/resources, поскольку обычная сборка сама эти ресурсы не создаёт.
Size
19.3 MB
Stars
1.7K
Age
11d
Commits · 90 Days