A set of commandline tools for manipulating UFF files.
Project description
UFFUtils
A Python-based command-line tool for manipulating UFF datasets.
Introduction
UFFUtils lets you inspect and manipulate UFF files. Let's look at an example.
Say you have some dataset - my_data.uff - that you want to reduce in size (e.g., by only taking every 1000th node), scale from mm to m, rotate around the y-axis by 90 degrees. With UFFUtils, you would do this in the following way:
uffutils subset my_data.uff --step 1000 `
uffutils scale --length 0.001 `
uffutils rotate - rotated.uff --angles 0 90 0
Congratulations! You now have a reduced, scaled and rotated version of your dataset!
For more functionality, see the description of each command below.
Installing
A good way to run UFF utils is through uv. Once you have installed uv, you can run uffutils like so:
uvx uffutils
No need for any additional software (e.g., Python); uv handles it for you.
Usage
The inspect command
The inspect command allows you to view the contents of a UFF file. Example usage:
uffutils inspect my_file.uff # Print nice overview
uffutils inspect my_file.uff --nodes # Print full list of nodes
The subset command
Allows you to create file with a subset of nodes, which is particularly useful if you want to downsize a UFF file. Usage:
uffutils subset input.uff output.uff --ids "1,2,3" # Only takes nodes 1, 2 and 3
uffutils subset input.uff output.uff --step 1000 # Takes every 1000th node, starting at 1
uffutils subset input.uff output.uff --max 100 # Takes the first 100 nodes
Operations can be combined. The following operation yields a file with nodes 10 and 30.
uffutils subset input.uff output.uff --selection "10,20,30,40,50" --step 2 --max 2
The scale command
You can scale length:
uffutils scale input.uff output.uff --length 1000
The move command
You can translate the data:
uffutils move input.uff output.uff --xyz 10.0 20.0 30.0
The rotate command
You can rotate the data:
uffutils rotate input.uff output.uff --angles 90 90 90
Combining commands
You can combine commands through piping, like so:
uffutils subset input.uff --step 100 | `
uffutils scale --length 1000 | `
uffutils move --xyz 10 20 30 | `
uffutils rotate - output.uff --xyz 90 0 0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uffutils-0.5.1.tar.gz.
File metadata
- Download URL: uffutils-0.5.1.tar.gz
- Upload date:
- Size: 40.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42286392b1673a2abfeb1b4e31973109af3871581f1ea1b586890631ee06d86e
|
|
| MD5 |
0ad98ce3cbbf44f92203ef9e90ec0721
|
|
| BLAKE2b-256 |
5f3cc5e63d2c9f41baf54ed0dc9a0d8e88cd1ec710a1ec6980f41de62da6fe43
|
Provenance
The following attestation bundles were made for uffutils-0.5.1.tar.gz:
Publisher:
python-publish.yml on janheindejong/uffutils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
uffutils-0.5.1.tar.gz -
Subject digest:
42286392b1673a2abfeb1b4e31973109af3871581f1ea1b586890631ee06d86e - Sigstore transparency entry: 301433404
- Sigstore integration time:
-
Permalink:
janheindejong/uffutils@12c115dd3184adfa9a6de8773618f9f801901f2d -
Branch / Tag:
refs/tags/0.5.1 - Owner: https://github.com/janheindejong
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@12c115dd3184adfa9a6de8773618f9f801901f2d -
Trigger Event:
release
-
Statement type:
File details
Details for the file uffutils-0.5.1-py3-none-any.whl.
File metadata
- Download URL: uffutils-0.5.1-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddfde98a931899060d931a40b05285b706b20930d5ac2e48ae5bb87fa02cbc50
|
|
| MD5 |
6215ddcd14c02833a57f9f285a831b47
|
|
| BLAKE2b-256 |
7aebcfcc1c3bbbb3ddeadcea1c82d30069adf6d78475ff9223b3585abbf73306
|
Provenance
The following attestation bundles were made for uffutils-0.5.1-py3-none-any.whl:
Publisher:
python-publish.yml on janheindejong/uffutils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
uffutils-0.5.1-py3-none-any.whl -
Subject digest:
ddfde98a931899060d931a40b05285b706b20930d5ac2e48ae5bb87fa02cbc50 - Sigstore transparency entry: 301433415
- Sigstore integration time:
-
Permalink:
janheindejong/uffutils@12c115dd3184adfa9a6de8773618f9f801901f2d -
Branch / Tag:
refs/tags/0.5.1 - Owner: https://github.com/janheindejong
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@12c115dd3184adfa9a6de8773618f9f801901f2d -
Trigger Event:
release
-
Statement type: