Skip to content

NPS Guide — Slicer, Simulator & Codebase

One unified guide: the apps sections (Slicer, Simulator, Sharing, Reference) and the codebase section (a full map of the monorepo) under one theme and one search index. Two questions answered for every part of the UI:

  • How it is — verified against the code, with file:line citations.
  • How it should be — only what the repo itself states (beads, ADRs, docs); everything else is marked INFERENCE.

The Simulator is the active build; it comes first in this map.

flowchart LR
  subgraph Apps
    SM["**SimulatorApp**<br/>analysis + playback<br/>(active build)"]
    SL["SlicerApp<br/>slice params + preview"]
  end
  subgraph Shared["Shared (one implementation, both apps)"]
    SH["Nps.Shell<br/>chrome · panels · painters · viewport facade"]
    EH["Nps.EngineHost<br/>EngineSession · MeshController · NpsAbi"]
  end
  ENG["nps::Engine (C++) — one host border"]
  SM --> SH
  SL --> SH
  SH --> EH --> ENG
Slicer Simulator
Job load mesh, generate toolpath, preview, analyze same mesh/fields + playback simulation
Owns today slice params, warp grid label playback engine, timeline markers, background mesh
Reads next Slicer — how it is Simulator — how it is

The three findings that shape everything else

  1. The apps clone each other's glue. About 42–48 % of the two MainWindow code-behinds is near-verbatim orchestration (camera, toolbar, layer slider, overlay, findings). The chrome is properly shared in Nps.Shell; the glue is not — yet. See the duplication audit.
  2. The stated direction already exists. ADR 0002 (accepted): one Avalonia binary with ProductMode { Slicer, Simulator } and an IProductMode panel seam — decided, not yet implemented. See share vs split.
  3. The toolpath is a demo. GenerateDemoToolpathGenerateGcode is a demo, honestly labeled in both apps; the real slicer is future work behind a slice/ engine module. The docs never blur this line.

Reading the map

Section What you get
Simulator How it is, every interaction mapped, how it should be
Slicer Same three, from the slicer side
Sharing What is shared today, the duplication audit, and the share-vs-split plan — where to build once and where copying is correct
Codebase The full monorepo map: layers and contracts, engine modules, the C ABI, host/shell, user flows, data model, test coverage, quality gates, glossary
Reference UI → engine call table, the tooling decision, and how this site was verified

Working with this site

Built with Zensical (by the Material for MkDocs team). Everything is plain Markdown + Mermaid in docs/guide/docs/.

pip install zensical
zensical serve docs/guide   # live preview
zensical build docs/guide   # static site in docs/guide/site

Every claim carries a file:line citation. If code and docs disagree, the code wins — and the disagreement is called out rather than hidden. See how this site was verified.