Skip to content

Turn STL files into voxels, images, and videos

License

Notifications You must be signed in to change notification settings

beyse/voxel8

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Voxel8

A fast STL slicer written in C++. It turns STL files into voxels.

Voxel8 is a fork of cpederkoff/stl-to-voxel with the goal of re-implementing the tool in C++ because speed matters!

Main Features

  • Convert stl files into a voxel representation
  • Output to (a series of) .pngs, .xyz, .svx
  • Command line interface

Repo Structure

The original Python code was moved to the subfolder python. The newly implemented C++ code is located in the subfolder cpp.

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

About

Turn STL files into voxels, images, and videos

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 89.3%
  • CMake 10.4%
  • C++ 0.3%