# HVDC learning scene — reproducible original sources

This bundle contains only the original HVDC generator, its shared geometry helpers,
the browser-asset optimization driver and a minimal dependency manifest. It contains
no private repository settings, credentials, inventory datasets or deployment files.

The scene is an educational visualization, not an installation design, insulation
coordination study, sag/tension calculation, thermal design or standards approval.
Scene distances are compressed and equipment enlarged. Its two insulated power
conductors form a symmetrical monopole; protective earthing is not a power return.
The MMC cutaway has six arms and six displayed half-bridge cells per arm. The
separate DAB cutaway explains a lower-power 48→96 V principle, not a proposed
transmission-scale converter. Its two visible primary and four visible secondary
turns match the illustrative primary/secondary ratio of 0.5; wire dimensions and
core dimensions are not a magnetic or thermal design.

## Generate from the extracted ZIP

Install Blender 5.x and Node.js 22.12 or later, extract the ZIP, and open a terminal
in its top-level folder (the folder containing `package.json`). The checked build
used Blender 5.2.1 LTS, Three.js 0.186.1 and glTF Transform CLI 4.5.1.

```sh
npm install
npm run models:hvdc
```

The driver finds the Windows Blender 5.2 or macOS standard installation, otherwise
uses `blender` on PATH. Set the executable explicitly when necessary.

PowerShell:

```powershell
$env:BLENDER = 'C:/Program Files/Blender Foundation/Blender 5.2/blender.exe'
npm run models:hvdc
```

Linux/macOS shell:

```sh
BLENDER=/absolute/path/to/blender npm run models:hvdc
```

Outputs:

- `public/downloads/hvdc-learning.blend`: original individually named editable
  objects, saved **before** browser merging. The separate converter teaching bench
  is offset behind the main system in this authoring file.
- `public/models/hvdc-overview.glb`: complete station/line equipment and separately
  named standard-bypass versus optional four-terminal interface connections.
- `public/models/hvdc-converter.glb`: independent `mmc_detail` and `dab_detail`
  groups. The browser shows one at a time and loads this asset only on request.
- `public/models/hvdc-manifest.json`: actual file hashes/geometry metrics, named
  stage/terminal/connection contracts, original-asset provenance and limitations.
- `public/downloads/hvdc-source.zip`: this same safe whitelisted source bundle.

To generate the editable scene and unoptimized GLBs without installing Node
dependencies, run Blender from the bundle root:

```sh
blender -b --factory-startup --python-exit-code 1 --python scripts/blender/hvdc.py
```

This command does not perform browser optimization or populate final asset metrics.
The Node driver performs `dedup`, `weld`, `quantize`, parses the real GLBs to measure
their geometry and writes the final manifest. Quantization uses native
`KHR_mesh_quantization`; no external WebAssembly decoder or textures are required.

For maintenance, `node scripts/build-hvdc.mjs --refresh-metadata` updates the
measured manifest and public source bundle from existing assets without rerunning
Blender or changing any GLB bytes. It does not regenerate geometry. The authoring
generator replaces saved file-browser directories with `//` before saving; local
home-folder browsing history must never be published in a downloadable scene.

## Authoring and browser conventions

The script documents positions in Three.js Y-up coordinates; Blender is Z-up.
`T(x,y,z)` converts to Blender `(x,-z,y)` and glTF converts back on export. Keep
parent-local transforms consistent. In particular, converted curve objects must
have their world matrices refreshed before static merging; the scoped `merge_web`
helper enforces that invariant.

Main selectable groups: `grid_send`, `transformer_send`, `converter_send`, `line`,
`dc_dc`, `converter_receive`, `transformer_receive`, `grid_receive`.

Mode A shows `bypass_connector` and hides `dc_dc`/`dc_dc_links`. Mode B does the
opposite; never show both connection paths as an operating circuit. The + and −
conductors remain distinct and neither is an earth electrode. Two DAB DC ports
and transformer windings remain galvanically separate.

`flowPaths` contains actual conductor paths in Y-up coordinates. Gold energy
arrows/pulses must be identified as a teaching aid, not electron velocity or
instantaneous AC current. Conventional negative-pole current would run opposite
the sending-to-receiving energy direction. The geometry does not rescale when an
electrical line-length control changes.

## Public source files

- [Generator](https://powerstationsworldwide.site/downloads/hvdc-source/scripts/blender/hvdc.py)
- [Geometry helpers](https://powerstationsworldwide.site/downloads/hvdc-source/scripts/blender/lib.py)
- [Coordinate/equipment helpers](https://powerstationsworldwide.site/downloads/hvdc-source/scripts/blender/components.py)
- [Build/optimization driver](https://powerstationsworldwide.site/downloads/hvdc-source/scripts/build-hvdc.mjs)
- [Minimal dependency manifest](https://powerstationsworldwide.site/downloads/hvdc-source/package.json)
- [Engineering model, assumptions and review report](https://powerstationsworldwide.site/downloads/hvdc-engineering.md)

All geometry and diagrams are original project-authored educational material, not
copied textbook illustrations or manufacturer replicas. Dependencies retain their
upstream licences; Three.js and its vendored fflate utility are MIT-licensed. The
page bibliography distinguishes checked primary documentation from textbook further
reading. No engineering certification or independent qualified approval is claimed.
