Skip to main content

A set of commandline tools for manipulating UFF files.

Project description

UFF Utils

UFF Utils is a command-line tool for inspecting and manipulating UFF files (e.g., take subsets, move, rotate, scale). For example, if you want to take a subset of every 1000th node, scale from m to mm, and inspect the resulting file, you can do:

uffutils subset in.uff subset.uff --step 1000
uffutils scale subset.uff scaled.uff --length 1000
uffutils inspect scaled.uff

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 --help

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 in.uff out.uff --ids "1,2,3"  # Only takes nodes 1, 2 and 3
uffutils subset in.uff out.uff --step 1000  # Takes every 1000th node, starting at 1 
uffutils subset in.uff out.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 in.uff out.uff `
    --selection "10,20,30,40,50"
    --step 2
    --max 2

The scale command

You can scale length:

uffutils scale in.uff out.uff --length 1000 

The move command

You can translate the data:

uffutils move in.uff out.uff --xyz 10.0 20.0 30.0 

The rotate command

You can rotate the data:

uffutils rotate in.uff out.uff --xyz 90 90 90 --origin 0 0 0

Combining operations in a single command

You can combine commands through piping, like so:

uffutils subset in.uff --step 100 | `
    uffutils scale --length 1000 | `
    uffutils move --xyz 10 20 30 | `
    uffutils rotate - out.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

uffutils-0.4.0.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uffutils-0.4.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file uffutils-0.4.0.tar.gz.

File metadata

  • Download URL: uffutils-0.4.0.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for uffutils-0.4.0.tar.gz
Algorithm Hash digest
SHA256 688d92168c667aad4e8b95fc1e72d3f9db30adc07413aab135439ded480f6286
MD5 563610c65349daaf61f10d5a0903a8a9
BLAKE2b-256 7181005b3dd45707910b9d7d3e916467d7c16f9bbd740f67db07393425bf2e11

See more details on using hashes here.

Provenance

The following attestation bundles were made for uffutils-0.4.0.tar.gz:

Publisher: python-publish.yml on janheindejong/uffutils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uffutils-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: uffutils-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for uffutils-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d0e01fb4ab43600d8201f645c2920d5616265d40f127aaacb8598b87e626da2
MD5 615fe2b2f141ebcef39772a62e74cdcf
BLAKE2b-256 8ab5efbdacd6a24f9ba6e389f71fae098a20b9c192a58971920ae649d10423ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for uffutils-0.4.0-py3-none-any.whl:

Publisher: python-publish.yml on janheindejong/uffutils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page