Files
visualizer/README.md
T
Vignesh Suresh a4b9a311dd 30.05
2026-05-30 15:19:12 +02:00

2.0 KiB

wired3d viewer

Interactive 3D viewer for the Beckhoff 5-axis metal-DED NC toolpaths produced by stl_slicer.py. It reads the machine NC dialect and renders a self-contained, offline-capable HTML page: a 3D toolpath scene (rapid moves + per-layer welds), an A/B tilt-angle chart, a statistics table, layer isolation, and a progressive-reveal print animation.

Layout

visualizer/
├── pyproject.toml            # package metadata + the `wired3d` console script
├── README.md
├── wired3d_viewer/           # the Python package
│   ├── __init__.py           # lightweight; no heavy imports
│   ├── __main__.py           # CLI: `python -m wired3d_viewer view|serve`
│   ├── parser.py             # NC dialect reader (standard library only)
│   ├── viewer.py             # Plotly figure builder + HTML writer
│   ├── server.py             # drag-and-drop local web front end
│   └── assets/
│       └── wired3d.avif      # logo, embedded into the HTML as a data URI

Install

pip install -e .          # installs plotly + numpy and the `wired3d` command

The package runs fine without installing too — just call the modules directly (see below). Only viewer/server need plotly + numpy; parser is pure standard library.

Usage

Render an NC file to a standalone HTML viewer:

python -m wired3d_viewer view path/to/part.nc     # writes <stem>_viewer.html
wired3d view path/to/part.nc                       # same, if installed

Start the drag-and-drop web front end (drop an .nc file or a folder onto the page):

python -m wired3d_viewer serve            # http://127.0.0.1:8765
python -m wired3d_viewer serve 9000       # custom port
wired3d serve                             # same, if installed

Parse only (no visualisation, no third-party deps):

from wired3d_viewer.parser import parse_nc, summarise
summarise(parse_nc("part.nc"))

Run the parser self-test:

python -m wired3d_viewer.parser