{"id":51102842,"url":"https://github.com/jaysuk/duet-tool-align","last_synced_at":"2026-06-24T12:30:34.507Z","repository":{"id":365429235,"uuid":"1271968678","full_name":"jaysuk/duet-tool-align","owner":"jaysuk","description":"Automated camera-based tool-offset alignment (TAMV-style) for RepRapFirmware toolchangers, as a Duet Web Control 3.7 plugin.","archived":false,"fork":false,"pushed_at":"2026-06-17T08:56:21.000Z","size":64,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-17T10:27:29.105Z","etag":null,"topics":["duet3d","dwc-plugin","opencv","reprapfirmware","tamv","tool-alignment","toolchanger"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaysuk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-17T07:04:03.000Z","updated_at":"2026-06-17T08:56:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jaysuk/duet-tool-align","commit_stats":null,"previous_names":["jaysuk/duet-tool-align"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/jaysuk/duet-tool-align","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaysuk%2Fduet-tool-align","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaysuk%2Fduet-tool-align/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaysuk%2Fduet-tool-align/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaysuk%2Fduet-tool-align/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaysuk","download_url":"https://codeload.github.com/jaysuk/duet-tool-align/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaysuk%2Fduet-tool-align/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34733253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["duet3d","dwc-plugin","opencv","reprapfirmware","tamv","tool-alignment","toolchanger"],"created_at":"2026-06-24T12:30:33.744Z","updated_at":"2026-06-24T12:30:34.499Z","avatar_url":"https://github.com/jaysuk.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Duet Tool Align\n\nA [DuetWebControl](https://github.com/Duet3D/DuetWebControl) (DWC) plugin that performs **automated,\ncamera-based XY tool-offset alignment** for RepRapFirmware toolchangers — a fully in-browser take on\n[TAMV](https://github.com/HaythamB/TAMV) / [kTAMV](https://github.com/TypQxQ/kTAMV).\n\nA camera points up at the nozzle; the plugin uses computer vision (OpenCV.js, WASM) to find the\nnozzle tip, jogs each tool over the lens, and computes the per-tool `G10 X/Y` offsets automatically.\n\n\u003e **Compatibility:** requires the **Vue 3 / Vuetify 4 DWC** (3.7-alpha or later). It will **not**\n\u003e load on the older Vue 2 DWC (3.5 / 3.6).\n\n## How it works\n\n- **Frames** come from [duet-webcam-bridge](https://github.com/jaysuk/duet-webcam-bridge) (v0.5+,\n  which adds CORS headers so the browser can read camera pixels, and serves the OpenCV.js runtime at\n  `/opencv/`). Point the plugin at the bridge URL in its settings.\n- **Detection** runs OpenCV.js entirely in the browser — no second service to install.\n- **Calibration** jogs a small star of known moves and solves a pixel→mm transform.\n- **Alignment** iteratively centres each nozzle on the crosshair, records the machine XY, and derives\n  per-tool offsets from the chosen origin.\n\nScope is **XY only** (matching TAMV's core); Z offsets stay with your existing method.\n\n**📖 Full instructions: [docs/usage.md](docs/usage.md)** — setup, both offset workflows, detection\ntuning, the settings reference, and troubleshooting.\n\n## Two offset workflows\n\nSet the origin in **Settings → Reference**:\n\n- **Reference tool** (e.g. T0) — that tool is the origin; other tools are measured relative to it.\n  The common RRF-toolchanger convention.\n- **Carriage datum** (e.g. the E3D toolchanger switch) — a fixed carriage point is the origin; capture\n  it once and **every** tool (T0 included) is offset from it.\n\nSee [docs/usage.md §4–5](docs/usage.md#4-choosing-the-reference-origin) for step-by-step.\n\n## Install\n\n1. Download `DuetToolAlign-\u003cversion\u003e.zip` from [Releases](../../releases) (or build it — see below).\n2. In DWC: **Settings → General → Plugins → Install Plugin**, pick the ZIP, accept the prompt, **Start**.\n3. **Reload DWC**, open **Plugins → Tool Align**, set the **camera bridge URL**, set the **camera\n   position**, tune with **Detect**, then **Calibrate** → **Run full alignment**.\n\nRequires **[duet-webcam-bridge](https://github.com/jaysuk/duet-webcam-bridge) ≥ 0.5.1** (camera CORS +\nthe OpenCV.js runtime at `/opencv/`). It's also exposed as an **embeddable component**, so if\n[Flexible Layouts](https://github.com/jaysuk/Flexible-Layouts) is installed you can drop the\n*Auto Tool Align* panel straight into a grid.\n\n## Releasing\n\n`npm run release -- \u003cversion\u003e --push` bumps `plugin.json`+`package.json`, commits, tags `vX.Y.Z`, and\npushes; the [release workflow](.github/workflows/release.yml) then builds the ZIP against DWC and\npublishes a GitHub Release with generated notes. Updates are surfaced in-app (and in Flexible Layouts'\nunified update popup via the shared `dwc-plugin-runtime` hub).\n\n## Status\n\nThe pure CV/calibration/control maths and the motion/G-code orchestration are unit-tested\n(`npm test`). Single-tool detection/calibration/centring is exercisable on hardware; multi-tool\nsequences await a multi-tool machine. This started as a standalone plugin and is intended to fold into\nFlexible Layouts once proven — the offset maths (`src/util/toolAlign.ts`) is copied verbatim from FL\nto keep that merge trivial.\n\n## Building\n\nThe plugin is built against a local checkout of the Vue 3 DWC source (like Flexible Layouts).\n\n```bash\nnpm install                                          # once, in this repo\nnpm run build-plugin-pkg -- /path/to/duet-tool-align   # from your DWC checkout\n```\n\nOn Windows, edit `DWC_DIR` at the top of `build.bat` and run it — the installable ZIP lands in this\nfolder.\n\n- `npm test` — vitest unit tests (geometry, calibration, alignment loop, detection helpers,\n  orchestration G-code contract, widget mount).\n- `DWC_DIR=… npm run typecheck` — type-check against the DWC checkout.\n- `DWC_DIR=… npm run verify-build` — confirm it bundles into an installable ZIP.\n\nCI (`.github/workflows/ci.yml`) runs the unit tests plus a build + type-check against DWC on every\npush, via the shared [dwc-plugin-test-kit](https://github.com/jaysuk/dwc-plugin-test-kit) reusable\nworkflow.\n\n## License\n\nGPL-3.0-or-later\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaysuk%2Fduet-tool-align","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaysuk%2Fduet-tool-align","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaysuk%2Fduet-tool-align/lists"}