Pentos Slicer is a small Python 3.13 web UI for preparing a model, placing interactive slice planes, exporting oriented STL chunks, running PrusaSlicer, and merging the generated G-code with Pentos A/B transition moves.
The app uses Viser for the browser-based 3D interface
and trimesh for model loading and geometry operations.
|
|
| Place and orient interactive slice planes | Preview the generated multi-part toolpath |
- Python 3.13
uvprusa-sliceravailable onPATHwhen running the full slicing pipeline
Install the Python environment:
uv syncStart the local Viser app:
uv run python main.pyFor development, restart it automatically whenever a Python file changes:
./dev.shOpen the URL printed in the terminal, usually:
http://localhost:8080
Or build and run it with Docker:
docker build -t pentos-slicer .
docker run --rm -p 8080:8080 pentos-slicerAt most two models are sliced concurrently by default. Set
MAX_CONCURRENT_SLICES to a positive integer to change that limit.
Uploads are limited to 50 MB by default. Set MAX_UPLOAD_SIZE_MB to a positive
integer to change that limit.
- Upload a model (
.stl,.3mf,.obj, or.ply). - Add one or more slice planes.
- Move or rotate planes with the viewport gizmo or GUI controls.
- Click Slice.
- The app switches to a preview shell showing the generated G-code path.
- Click Back to Setup to return to the model and plane controls.
Sample models are available in samples/.
The Machine panel imports and exports versioned .json machine profiles.
The active profile is saved in the browser and restored on future visits. Profiles
contain machine geometry; the PrusaSlicer profile remains in pentos_config.ini.
{
"format": "pentos-machine",
"version": 1,
"name": "My Pentos",
"build_volume_mm": [90, 90, 90],
"machine_plate_center_mm": [113, 52, 0],
"rotation_center_machine_mm": [112, 51, 2]
}machine_plate_center_mm and rotation_center_machine_mm are in machine
coordinates. Pentos derives the slicer-local plate center, machine offset, and
local rotation center from these values.
main.pystarts the Viser server and mounts the application controller.models/stores shared application state, plane snapshots, and preview data.controllers/coordinates setup, preview, slicing, export, and navigation.views/contains the Viser UI, scene rendering, plane editor, and theme.services/contains model/project I/O, slicing, preview parsing, and Pentos-specific G-code workflows.gcode_tools/contains reusable G-code parsing and transformation utilities.machine.pystores machine geometry constants.samples/contains example models and saved Pentos scenes.
Generated runtime files are written to uploaded_models/, temp/, and
output/. These are local outputs and should not be committed.
AppController is the composition root. It creates the shared AppState,
services, screen controllers, and views:
- Models hold data independently of Viser and external processes.
- Controllers mutate application state and coordinate services.
- Services perform geometry, filesystem, slicing, parsing, and network work.
- Views create Viser handles, render state, and forward user actions.
Plane edits update controller-owned snapshots as they happen. Runtime plane IDs
are not included in version-1 .pentos manifests, so existing scenes remain
compatible.
Format touched Python files:
uv run ruff format .Run tests and a quick syntax check:
uv run pytest
uv run python -m compileall .For visible UI changes, run the app, load a sample model, add a plane, and exercise the setup-to-preview flow.
Pentos is licensed under the GNU General Public License v3.0.

