GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Gherkin/HTMLPCBViewer at f7c9c9cc30ab15978693b209e2b41c49803f5bd9

BranchesTags
Open more actions menu

Latest commit

 

History

40 Commits
40 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
allegro-skills
allegro-skills
 
 
docker
docker
 
 
tests
tests
 
 
tools
tools
 
 
web
web
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
NOTICE
NOTICE
 
 
README.md
README.md
 
 
build_boards.py
build_boards.py
 
 
docker-compose.yml
docker-compose.yml
 
 
generate.py
generate.py
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
playwright.config.js
playwright.config.js
 
 

Repository files navigation

HTMLPCBViewer

A web PCB viewer for board bringup. Reads the JSON export format used by InteractiveHtmlBom and serves boards from an NGINX container.

The viewer is heavily based on InteractiveHtmlBom — same data format, similar look. The BOM side is gone; this is built around net tracing instead. Two-pane net search, highlight on hover, layer filtering, inner layers visible from both sides, keyboard shortcuts.

Rendering runs in a Web Worker on an OffscreenCanvas, so pan and zoom stay smooth on large boards.

Requirements

  • Allegro PCB Designer, for the export
  • Python 3
  • Docker, if you want the server

Export from Allegro

Copy an ibomConfig.json next to the .brd file, then in Allegro:

set telskill
load("jsonDecode.il")
load("exportJson.il")
exportJson( ?config "ibomConfig.json" )

The SKILL scripts are in allegro-skills/.

Build

Copy the exported JSON into a new folder under pcb-exports/, then:

python build_boards.py

This writes board payloads to pcb-viewer-data/. It skips files that have not changed; --force rebuilds everything.

The Docker build makes the viewer shell itself. To build it by hand (writes docker/viewer.html):

python generate.py --build-viewer

For a single file with the board data inlined and no server:

python generate.py board.json -o board.html

Serve

docker compose up -d --build

Or pull the published image (amd64 and arm64) instead of building:

docker run -p 1010:80 -v ./pcb-viewer-data:/usr/share/nginx/html/pcbs:ro ghcr.io/gherkin/htmlpcbviewer

CI publishes the image once all checks pass. Pushes to main publish latest, a v* tag publishes its version (v1.2.3 as 1.2.3). Every image is also tagged sha-<short commit>.

Boards come from the mounted pcb-viewer-data/ and open as /viewer/?data=/pcbs/<board>.json. To update a running server, zip pcb-viewer-data, copy it over and restart the container.

License

MIT, see LICENSE.

Derived from InteractiveHtmlBom (MIT) and includes code from it, from exportJson and from Split.js. NOTICE lists what came from where.

generate.py writes the license notices into every generated HTML file, since that file contains the whole viewer. Leave that block in place.

About

Web PCB viewer for board bringup. Reads InteractiveHtmlBom JSON exports from Allegro.

Topics

allegroelectronicshardwareinteractivehtmlbompcbpcb-viewer

Resources

Readme
License
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.