Turn STL files into voxels, images, and videos
Project description
stl-to-voxel
Turn STL files into voxels, images, and videos
Main Features
- Convert stl files into a voxel representation
- Output to (a series of) .pngs, .xyz, .svx
- Command line interface
How to run
Run in command line
pip install stl-to-voxel
stltovoxel input.stl output.png
Generating a higher resolution
stltovoxel input.stl output.png --resolution 200
Specifying voxel size
stltovoxel input.stl output.png --voxel-size .5
Multiple materials
stltovoxel input1.stl input2.stl output.png --colors "red,green"
Hex color values are also supported
stltovoxel input1.stl input2.stl output.png --colors "#FF0000,#00FF00"
Integrate into your code
import stltovoxel
stltovoxel.convert_file('input.stl', 'output.png')
Run for development
cd stl-to-voxel
python3 -m stltovoxel input.stl output.png
See help
$ stltovoxel
usage: stltovoxel [-h] [--pad PAD] [--no-parallel] [--colors COLORS] [--resolution RESOLUTION |
--resolution-xyz RESOLUTION RESOLUTION RESOLUTION |
--voxel-size VOXEL_SIZE | --voxel-size-xyz VOXEL_SIZE VOXEL_SIZE VOXEL_SIZE] input [input ...] output
Run unit tests
cd stl-to-voxel
PYTHONPATH=./ python3 test/test_slice.py
The resolution is optional and defaults to 100.
Example:
Multi-color Example:
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
stl_to_voxel-0.10.0.tar.gz
(11.6 kB
view details)
Built Distribution
File details
Details for the file stl_to_voxel-0.10.0.tar.gz
.
File metadata
- Download URL: stl_to_voxel-0.10.0.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.5.0-1022-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3601ccf674c0bb4206c0d315d2114238ecc8438b2ecda235cdd879e344cb2d7 |
|
MD5 | 11a3bec613d5f9ea770494fe5a1dad2e |
|
BLAKE2b-256 | a85947983d24e537c8b92de550c6f4e5a9f378e4d8a8f3de416a67d2c399b089 |
File details
Details for the file stl_to_voxel-0.10.0-py3-none-any.whl
.
File metadata
- Download URL: stl_to_voxel-0.10.0-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.5.0-1022-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac59e8477218d7dfb4abdd74e4587977028d3c7fb837692e92670883bce0a00a |
|
MD5 | 535224647e2bdc2c38670cccde20d670 |
|
BLAKE2b-256 | 5fd783247d700ed0851456f758f2cc0f6ae358e71d07b09346fc8502c14f46a3 |