Skip to content

alhermann/MyVox

Repository files navigation

MyVox

CI

Lightweight C++ CPU-based voxelizer. Reads .stl files and outputs .csv point clouds for use with Paraview or other tools. No external dependencies required.

Based on the VoxSurf algorithm (three-pass rasterization with robust voting-based fill).

Features

  • Zero external dependencies (self-contained C++11)
  • Binary STL input, CSV output
  • Configurable voxel resolution
  • Robust interior fill using majority voting from three orthogonal directions
  • Optional coordinate scaling to match original STL dimensions

Building

CMake (recommended)

git clone https://github.com/alhermann/MyVox.git
cd MyVox
cmake -B build_cmake -DCMAKE_BUILD_TYPE=Release
cmake --build build_cmake

The executable will be at build_cmake/MyVox.

Make (legacy)

cd build
make clean && make

Adjust the compiler in build/Makefile if needed (clang++ for macOS, g++ for Linux).

Usage

./MyVox <input.stl> <output.csv> [resolution]
  • input.stl - Path to a binary STL file
  • output.csv - Path for the CSV output (X,Y,Z columns)
  • resolution - Voxel grid resolution (default: 128)

Example

./MyVox ../sphere.stl output.csv 64

STL VOX

Testing

cd build_cmake
ctest --output-on-failure

This runs unit tests for the math/data classes and an integration test that voxelizes sphere.stl.

Install

cmake --install build_cmake --prefix /usr/local

About

Lightweight, simple, C++ Voxelizer based on the implementation of https://github.com/sylefeb/VoxSurf.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors