Skip to content

Mastercam stuff - #15

Merged
dementive merged 4 commits into
mainfrom
paul/tool_catalog
Sep 14, 2026
Merged

dementive merged 4 commits into
mainfrom
paul/tool_catalog

Conversation

@dementive

Copy link
Copy Markdown
Collaborator

Puts the changes from #13 onto main branch.

JustinSGray and others added 4 commits September 14, 2026 09:18
A `.TOOLDB` is a SQLite database carrying Mastercam's own 79-table schema,
and writing one is `@toolpath/tool-support/export/mastercam`, not this
application. `app/shared/mastercam-input.ts` is the seam.

It reads differently from the Fusion one on purpose. Fusion embeds a holder
inside the tool record, so one tool in two holders is two records; Mastercam
joins them relationally, so the order list goes in grouped — one entry per
distinct tool carrying one set-up per stack, one entry per distinct holder,
under the catalog's own guids. Six stacks sharing an ER32 chuck put one
holder in the file rather than six.

The one identifier this mints is the assembly's, per stack. An assembly's id
is derived upstream from its tool and holder, which cannot tell apart the
same tool in the same holder at two stickouts — those would collapse and the
second stickout would be lost. A minted guid costs a re-export a fresh set of
assemblies; the tools and holders under them keep their catalog guids.

`app/shared/export-input.ts` is what both formats read, extracted from
`fusion-input.ts` now that there is a second consumer. One dialog serves both,
`library-export-dialog.tsx` — only four strings differ between the two — and
`ExportReport.holderWarnings` is `warnings`, meaning the same quantity for
each: rows of the order list that reached the file.

The exporter is imported on the press rather than at the top of the route: it
carries 82 KB of pinned schema, and `vite.config.ts` pre-bundles the subpath
so that import is a fetch rather than a discovery.

`tool-support` moves to 0.6.0, which is what carries the Mastercam exporter.
That release also changed what a holder stating no gauge length means: the
Fusion exporter `filled`s it with the height of the shape it wrote rather than
`dropped`ing it, so it is no longer a warning. `fusion-input.test.ts` now pins
a stated gauge length its own dimensions contradict, which still is one, and
pins the silence on the case that stopped being.
`tool-support` 0.6.0 carries the Mastercam exporter, and `app-support` 0.1.6,
`tool-drawing` 1.0.3 and `tool-scraper` 3.0.3 each depend on `^0.6.0`. A 0.x
caret does not span a minor, so bumping `tool-support` alone left the older
three asking for 0.4.0 and the install carried two copies — the same split
`build: resolve the Toolpath packages onto one tool-support` closed before.

`pnpm-lock.yaml` resolves one copy again, and the suite now runs against the
published package rather than a local link.
The dialog says `aria-modal="true"`, which tells a screen reader the page
behind it is inert, and nothing kept that promise: Tab walked straight onto the
order list underneath while the reader still announced the dialog, and opening
it left the focus on the button behind the overlay.

The kit's `Dialog` is the component to reach for and does not fit — it is an
alert whose `confirm()` resolves to a boolean and closes on the press, where
this dialog reads a name back off an input and goes on showing a report
afterwards; its `@base-ui/react` primitive is not a dependency here. So the
focus is handled beside the markup it governs, and the component now says which
kit component it turned down and why.

The name takes the focus on open, Tab cycles within the dialog, and the opener
gets the focus back when it closes. Three tests pin those, because the markup
makes the claim whether or not the behaviour is there.
Write the order list as a Mastercam tool library
@dementive
dementive merged commit ab2e0d5 into main Sep 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants