/usdStl

An STL file format plugin for USD

Primary LanguageC++Apache License 2.0Apache-2.0

usdStl - A USD plugin for STL files

This repo contains a USD file format plugin to expose STL files.

3DBenchy in usdview

Build

Requirements

Build options

  • PXR_CONFIG_CMAKE: location of the pxrConfig.cmake exported symbols (usually located at the root of the USD distribution folder).

Build commands

# Generate the build files

cmake ../usdPly -DCMAKE_INSTALL_PREFIX=/tmp/usdStl -DPXR_CONFIG_CMAKE=~/opt/USD-v22.08-amd64-py39/pxrConfig.cmake

# Build and test usdPly

cmake --build .
cmake --build . --target test

# Installed files

# /tmp/usdStl
# ├── usdStl
# │   └── resources
# │       └── plugInfo.json
# └── usdStl.so

cmake --build . --target install

Running

Add the path to the installed pluginInfo.json to the environment variable PXR_PLUGINPATH_NAME then run usdview src/testenv/testUsdStl.usda. If everything is setup correctly a cube should be shown.

A STL cube in usdview

Acknowledgment