ZOYKUHot Board

nvidia-omniverse/usd-brepTài liệu kỹ thuật

USD BRep is a standalone C++ and Python library for NURBS-based boundary representation (BRep) solid modeling

Thông báo ngôn ngữ:Chưa có tài liệu tiếng Việt cho kho lưu trữ này. Đang hiển thị bản gốc tiếng Anh chính thức.
Cài đặt nhanh
git clone https://github.com/nvidia-omniverse/usd-brep.git

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:

  • USD BRep schema (omniSolid): defines the BrepArray prim, which stores BReps in USD with their full topology and NURBS or analytic geometry; see the proposal and its problem statement.
  • Import/export: reads BrepArray prims into SMLib BReps and writes SMLib BReps back to USD.
  • USD Validator: checks that the BReps in a USD file comply with the BRep schema.
  • Healer: heals the BReps across a whole USD scene, preserving layers, references, instancing, transforms and materials.
  • Geometry validator: runs AssertValid (see Kernel) on every BrepArray prim in a USD file.
  • Tessellator: writes a UsdGeomMesh for each BRep in the BrepArray prims of a USD file.
  • Viewers:
    • hdUsdBrep: Hydra plugin for viewing USD BReps in usdview.
    • view_usd: shows a USD file's BReps, tessellated, in a PyVista window.
    • smlib_gui: desktop app for opening, inspecting and editing USD and SMLib BReps.
  • Converters:
  • APIs: C++ and Python (USD).

Kernel

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

  • Kernel (SMLib): creates and edits BRep solids, with booleans, fillets, sweeps and offsets.
  • Healer: fixes common geometric and topological defects in BReps.
  • Tessellator: meshes BReps into triangles. The Hydra plugin uses it to draw BReps in usdview.
  • Geometry validator (AssertValid): checks the geometric quality and topological consistency of BReps in memory.
  • APIs: C++ and Python (SMLib).
  • Examples: runnable Python and C++ examples for each API layer.

Agents

Guidance for coding agents, starting from AGENTS.md:

  • Docs: the library's layers and key concepts, what each error code means and how to fix it.
  • Operations: a guide for each API area, such as booleans, fillets, tessellation, healing and USD import/export.
  • Skills: workflows for debugging kernel operations, using and maintaining the C++ and Python APIs, working with the USD schema and converters, choosing tests and writing bug reports.

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.

Bản sao tài liệu lưu trữ từ kho lưu trữ GitHub chính thức · Xem trên GitHub
Ngày đồng bộ: 2026-11-09