Chestnut Labs G-code Preview
    Preparing search index...

    Feature gallery

    What G-code Preview can actually do, shown rather than described. Every image is a real render of a real file from the tracked demo corpus, captured by tools/screenshots/ on a neutral slicer/CAD viewport — nothing mocked. This page is the visual companion to the capability model and the per-feature coverage matrix.

    New here? Start with the getting-started guide, then come back to browse the breadth.

    The core job: turn a sliced file into an interactive picture of the actual moves the machine makes.

    3DBenchy as extrusion tubes, colored by feature role 3DBenchy clipped to a mid-height layer band, exposing perimeters and infill
    Tube geometry, feature coloring. Lit 3D extrusion cross-sections, colored by what each move is. Layer-range clipping. Isolate any band of layers by index — a draw-range trim, no geometry rebuild.
    Calicat lower layers with retraction and de-retraction markers pinned on the path The calicat as flat single-pixel toolpath lines
    Retraction & de-retraction markers. Toggle markers for retractions, wipes, travel, and seams. Line geometry. Flat one-pixel paths — lighter for very large files or low-GPU devices.

    Segment scrub sweeping the draw-range through 3DBenchy — the toolpath drawing itself in exact print order. Scrubbing is a draw-range trim, so it stays smooth even on large models.

    Also here: segment scrub (step move-by-move), time scrub with an honest print-time estimate (labeled slicer estimate vs kinematic approximation), and source-line ↔ segment mapping — click a move to find its byte in the file, and back. See recipes.

    Hide by feature role (setFeatureRoleVisible) — e.g. hide brim/skirt to declutter a part preview, at the same framing:

    Brim + skirt shown Adhesion hidden
    A model with its skirt ring and brim shown The same view with the skirt and brim hidden, leaving just the model
    The pink skirt ring and brim frame the part. setFeatureRoleVisible(Skirt/Brim, false) leaves only the model.

    Color is analysis. Every mode is capability-gated — it colors from real data or explains why it can't.

    The calicat colored by feedrate, blue slow to red fast A variable-layer-height print colored blue for thin layers to red for thick
    By speed / feedrate. An auto-ranged ramp reveals slow corners and fast infill. By layer height. Spot variable-layer-height regions at a glance.

    Also: feature role, object, tool, M600 color change, the file's own filament colours, tool power (laser/spindle), and cut-vs-rapid for CNC. All share one renderer-agnostic ColorMode model across the 3D and 2D renderers.

    Feed the viewer your printer's telemetry and it maps the signal onto the toolpath at the confidence the signal deserves — the library's honesty rule made visible.

    Known position Approximated position
    Live progress with a byte-exact position marker and a ghosted remaining path Live progress from a coarse signal shown as an emphasis band over the current layer
    Byte-exact telemetry → a precise cut and an exact marker. A layer index or bare percentage → an uncertainty band, not a fake dot.

    A stale signal greys the overlay instead of freezing a lie; user scrub always wins over incoming telemetry; file-identity mismatches are detected and disclosed. See live progress & motion model.

    The calicat as lit 3D tubes A single layer drawn by the Canvas 2D renderer, no WebGL
    Tubes vs lines. Automatic quality selection, or force either. Canvas 2D fallback. A flat layer view with no WebGL and no Three.js — the 2D bundle never ships Three.

    Raising the top layer builds the model bottom to top — the same draw-range mechanism, and the visual of a progressive reveal.

    Underneath: quality modes (full / adaptive / fast), interaction-aware quality (drop detail while orbiting, restore on settle), a parallel geometry worker pool (byte-identical tubes off the main thread, degrading pool → serial → lines, all disclosed), progressive preview with a single clean hold reveal, staged preparation progress, and getRenderStats() diagnostics (backend, hardware-vs-software GPU, draw calls, timings — never fabricated). See workers, streaming & performance.

    The demo's Render diagnostics panel populated beside the render — backend 3d-webgl (WebGL 2), software ANGLE/SwiftShader GPU, geometry tubes, segment and draw counts, tube bytes, and timings

    getRenderStats() in context — every value read from the actual render, never fabricated; here reporting a software (SwiftShader) backend, 108,725 / 108,729 segments, 92 draw calls, and the build/first-frame timings.

    3DBenchy from the front, orthographic 3DBenchy from the top, orthographic 3DBenchy isometric, perspective
    Front (ortho) Top (ortho) Iso (perspective)

    Seven camera presets, orthographic/perspective, and a serializable camera state you can persist and restore.

    Object-aware framing (frameContent: 'object') fits the printed object — excluding skirt, prime line, and purge — instead of the whole machine volume:

    Whole-job framing Object-aware framing
    A small model framed together with its wide skirt ring, so the model sits small The same model framed tightly on the part, with the skirt excluded
    'all' fits everything, so the model is small inside its skirt. 'object' fits the part — the skirt/brim fall outside the frame.

    capture() returns the current view as a Blob (PNG/JPEG/WebP), including a transparent background for compositing onto cards, from the interactive viewer or the headless still.

    Sometimes you don't want the toolpath at all — you want a clean picture of what the object is. That's a separate presentation renderer over the source model (STL / 3MF).

    Two presentation stills: a neutral STL labeled materials unavailable beside a colored 3MF labeled materials known

    STL is a single neutral object; 3MF brings multi-object structure and per-object / per-triangle material colors — and when the source doesn't declare colors, the render says materials: 'unavailable' rather than inventing one. A 3MF project can hold several plates and many objects: render one plate at a time and narrow to a render scope (a plate, or a subset of objects) for a single thumbnail. Headless renderModelStill and interactive createModelViewer share the look. See the model-renderer README.

    A print on a round, delta-style build plate with a circular grid A print on a hexagonal build plate with the grid clipped to the polygon
    Circular / delta beds. The outline and grid follow the round shape. Polygonal beds. An arbitrary polygon outline, grid clipped to the shape.

    Rectangular stays the default and byte-identical; a shape on the build volume opts into round or polygonal. Bed geometry discovered from the file (its printer profile) is offered to the consumer, never force-applied over a bed you set.

    An Easel CNC carve colored by move kind, cut moves pink and rapid moves blue A CNC bolt circle plus frame computed by a parametric program
    Cut vs rapid. Non-extrusion toolpaths classify tool-engaged moves as Cut; color by cut-vs-rapid or tool power. Parametric programs (RS274NGC). Geometry the machine computes — a while-loop bolt circle + subroutine — resolved to the real toolpath.

    Canned drilling cycles (G81/G82/G83) expand; controller support is honesty-tiered (experimental until hardware-validated) but geometry always parses. Parametric execution is bounded and reports parametricProgram: 'known' only on a clean run. See parametric programs and the motion & position coverage.

    The whole viewer ships as drop-in Vue, React, Svelte, and Web Component components over one shared engine, plus a lower-level API (composable / hook / store / action) for building your own controls, and a headless renderStill for server thumbnails. See framework adapters.


    Missing a capability here? The coverage matrix tracks every user-facing feature and its documentation state — including the shots still on the to-capture list.