A free, cross-platform viewer for STL files built with Qt6 and OpenGL 3.3.
| Dependency | Minimum version |
|---|---|
| CMake | 3.16 |
| Qt | 6.0 |
| OpenGL | 3.3 core |
On Ubuntu/Debian:
sudo apt install cmake libgl-dev qt6-base-dev qt6-base-dev-toolsOn Fedora/RHEL:
sudo dnf install cmake mesa-libGL-devel \
qt6-qtbase-devel qt6-qtopengl-develOn macOS (Homebrew):
brew install cmake qt6On Windows, install Qt 6 via the online installer and CMake. Make sure the Qt bin/ directory is on your PATH.
git clone https://github.com/cravesoft/stlviewer.git
cd stlviewer
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallelThe executable is placed at build/stlviewer (Linux/macOS) or build\Release\stlviewer.exe (Windows).
sudo cmake --install buildAfter a successful build, run cpack from the build directory. The package format is auto-selected based on the platform.
cd build
cpack -G DEB
# produces stlviewer-x.x.x-Linux.deb
sudo dpkg -i stlviewer-x.x.x-Linux.debBuild on Windows (or cross-compile), then:
cd build
cpack -G NSIS
# produces stlviewer-x.x.x-win64.exeYou can override the generator on any platform with -G <generator>. Run cpack --help for the full list.
cmake -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build --parallel# Open one or more files from the command line
stlviewer model.stl
# Or launch with no arguments and use File → Open
stlviewer| Key | Action |
|---|---|
Ctrl+O |
Open file |
Ctrl+S |
Save |
Ctrl+Shift+S |
Save As |
Ctrl+I |
Save image |
Ctrl+Q |
Quit |
R |
Toggle rotate mode |
P |
Toggle pan mode |
W |
Toggle wireframe |
+ |
Zoom in |
- |
Zoom out |
1 |
Reset zoom |
MIT — see LICENSE.
