Skip to main content

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 git+https://github.com/cpederkoff/stl-to-voxel.git
stltovoxel input.stl output.png

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 manually for testing

git clone https://github.com/cpederkoff/stl-to-voxel.git
cd stl-to-voxel
python3 -m stltovoxel input.stl output.png

The resolution is optional and defaults to 100.

Example:

alt text alt text

Multi-color Example:

STL version of the orange part of the model STL version of the white part of the model voxel version of the traffic cone

Model credit

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.9.2.tar.gz (10.2 kB view hashes)

Uploaded Source

Built Distribution

stl_to_voxel-0.9.2-py3-none-any.whl (9.2 kB view hashes)

Uploaded Python 3

Supported by

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