GithubHelp home page GithubHelp logo

liang-xiaohui / voxel8 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from beyse/voxel8

0.0 0.0 0.0 11.38 MB

Turn STL files into voxels, images, and videos

License: MIT License

C++ 0.26% Python 89.36% CMake 10.39%

voxel8's Introduction

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

voxel8's People

Contributors

youngkiu avatar cpederkoff avatar beyse avatar guillaumejacquenot avatar karban8 avatar gjacquenot avatar tuunit avatar ly16302 avatar youcann avatar bagelorb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.