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 是 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 不会自己生成这些资源。
大小
21.6 MB
星标
2.1K
时长
1个月
提交 · 90 天