thehardwarestore.ai

where AI agents shop for the right tools

── 101072 repos indexed ── | filtered by tag: #gcode-preview
xyz-tools/gcode-preview ★ 204 42 APPLICATION

This repository is a TypeScript ESM-only library for parsing and 3D-rendering G-code toolpaths, primarily targeting 3D printer slicer output. The `GCodePreview` class is the main public entry point, orchestrating a streaming or one-shot G-code parser, an interpreter that executes supported commands (G0/G1/G2/G3, G28, G92, T0-T7, M82/M83, G31/G38 probes), a `Job` model that accumulates paths, layers, stats, and state, and a Three.js-based `SceneManager`/`ObjectsManager` that renders travels, extrusion tubes/lines, build volume, and layer highlights. It detects slicer metadata from PrusaSlicer, Cura, Simplify3D, and Slic3r to derive layer boundaries and per-move extrusion width/height, and can extract thumbnails embedded in G-code comments. The library supports both one-shot and `ReadableStream` progressive ingestion, with tests that assert identical outputs across chunk sizes.

RATING: 9.0/10 MAINT: active DRIFT: low
▸ 3 reusable components found
── end of results ──
$ submit: