BREP_instructions 0.4.1

Manufacturing instructions for next.BREP.io (Rust B-rep CAD) assemblies: the instructions document model, the step-order wizard, step editing, re-targeting to a new assembly revision, page layout and the self-contained HTML player.
Documentation
# BREP_instructions

Part of the [next.BREP.io](https://next.brep.io) Rust B-rep kernel: `cargo add BREP_instructions` ยท [licence summary](#licence)

Manufacturing instructions for BREP assemblies, as plain data with no kernel or GPU
dependency:

- **model**: the `instructions` block of an instructions document (`.ibrep`): the target
  assembly revision, the page template, front matter, and the step tree: a step holds
  the parts it adds, a view, tools, torque, callouts, insertion arrows, notes and its
  child steps (the group it installs, built first).
- **source**: reads the wizard's input (a `wizard::Level`) straight from an
  assembly document's JSON: its placements, embedded parts and their attributes
  (`Fastener`, `Torque`, `Serial_Tracked`), mates and exploded views, with
  sub-assemblies read the same way, recursively up to `source::MAX_DEPTH`
  levels (`source::level_from_document`).
- **wizard**: proposes a step order from an assembly's occurrence tree and mate graph:
  a sub-assembly as one step whose children build it, then mate order, with fasteners last.
- **edit**: merges, splits, reorders and updates steps, and derives each step's
  presentation (placed, being added, not yet placed).
- **retarget**: compares two revisions of the target assembly and folds the changes
  into the steps, held for the author's approval.
- **fields**: what the person doing the work records at a step: boxes to tick, choices,
  text, measurements with limits and serial numbers, any number per step, and the one
  rule every player and server applies to their values (required, in limits).
- **layout**: printed pages from a template (1, 2 or 4 steps per page, portrait or
  landscape, line-art or shaded pictures), with a cover, a parts list and a tools list.
- **record**: a step's fields as a paper form for the printed pages (a choice prints
  every option as its own box), paged by the layout and continued on Record pages.
- **player**: the interactive HTML player. `player/player.html` is a trusted template,
  and `PlayerData` is its data format. A server serves the template and the data
  separately (`served_html`), and an offline copy inlines the data into one
  self-contained file (`offline_html`). Beside the steps the data carries each step's
  view PMI and the assembly's tree with a thumbnail per part, for the page's Model and
  Parts tabs. The player runs in shop mode (step checklist and per-step sign-off)
  or customer mode (pictures first), and `PlayerData::motion_study` builds a
  player for a motion study instead of an instructions document.

## Features

- `schema` (off by default): derives JSON Schemas (`schemars`) for the
  instructions block's types, the step fields and the editing report types.

The crate depends on `serde` and `serde_json` only (plus `schemars` with
`schema`).

## Licence

In plain words: the crates are free to use as they are, including in a commercial project. If you
fix or change something in the kernel, send the change back as a pull request to
[github.com/mmiscool/next.BREP.io_RUST_BREP_KERNEL](https://github.com/mmiscool/next.BREP.io_RUST_BREP_KERNEL). If you do not want to share your
changes, buy a commercial licence from [Autodrop3d LLC](https://autodrop3d.com); with it you never
have to share your code back.

The exact terms are in `LICENSE.md`, shipped in the crate (`license-file` in the manifest) and at
[LICENSE.md](https://github.com/mmiscool/next.BREP.io_RUST_BREP_KERNEL/blob/master/LICENSE.md); if this summary and the file ever differ, the file wins.