Turn STL files into voxels, images, and videos
- Convert stl files into a voxel representation
- Output to (a series of) .pngs, .xyz, .svx
- Command line interface
pip install stl-to-voxel
stltovoxel input.stl output.png
stltovoxel input.stl output.png --resolution 200
stltovoxel input.stl output.png --voxel-size .5
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"
import stltovoxel
stltovoxel.convert_file('input.stl', 'output.png')
cd stl-to-voxel
python3 -m stltovoxel input.stl output.png
cd stl-to-voxel
PYTHONPATH=./ python3 test/test_slice.py
The resolution is optional and defaults to 100.