usd-brep README

README проекта с github.com/NVIDIA-Omniverse/usd-brep. Одним файлом markdown: README.md.

USD BRep

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.

Repo contents

USD

Libraries and tools that work on BReps stored in USD files:

Kernel

The SMLib kernel, and tools that work on BReps in memory:

Agents

Guidance for coding agents, starting from AGENTS.md:

Documentation

nvidia-omniverse.github.io/usd-brep, including the Python and C++ API reference.

Quick start

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

Issues

Build from source

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.

Contributing

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.

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.

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

Ищем в базе…

Что это такое?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, поскольку обычная сборка сама эти ресурсы не создаёт.
Какие есть похожие проекты?QymCAD, SOMA, Amagine3D, openscad, Procedura, ingetrazo, Open3D, spirula-studio
Размер
21.6 MB
Звёзды
2.1K
Возраст
1 мес
Коммиты · 90 дней