Skip to content

feat(tool-scraper): scrape Kennametal's whole ER collet catalog - #97

Merged
JustinSGray merged 1 commit into
mainfrom
jsg-kennametal-collets
Sep 8, 2026
Merged

feat(tool-scraper): scrape Kennametal's whole ER collet catalog#97
JustinSGray merged 1 commit into
mainfrom
jsg-kennametal-collets

Conversation

@JustinSGray

Copy link
Copy Markdown
Contributor

Summary

  • Kennametal collet coverage goes from 2 families to 14 — 443 parts against 120 — across the
    standard, coolant-through and tap lines.
  • toolpath-scrape kennametal --collets walks the three ER collet categories and prints every
    family they link to with the configured CSV that claims its code, or (not configured).
  • A toolholding family may record its familyCode, so a re-scrape needs no browser.
  • ColletRecord gains clampingLength/clampingLengthMm (L9), squareSize (S10) and
    tapRange.
  • holderTakesTool refuses anything but a tap in a collet that publishes a square drive.

Two decisions worth a reviewer's attention:

  • checkCollet's nominal-inside-capacity gate was wrong, not just tight. Fourteen rows of
    the real catalog sit outside their own band; the sealed ER40 inch line does it on ten of
    twelve. 40ERSS1000 is designated one inch and clamps 0.9938 — in both unit columns, so it is
    the vendor stating an undersized sealed collet rather than one cell rounded differently.
    NOMINAL_SLACK is relative because the gap scales with the collet: widest legitimate 1.14 %,
    against the 96 % a cell in the wrong unit system is out by.
  • A tap collet publishes no capacity band, so its exact D1 becomes a zero-width one. The
    branch is keyed on the vendor publishing a square, not on the family's style.

The four collet kits (26 parts) are excluded — they publish a range string and no capacity, and
minting one would mean deriving a band from it. kennametal --collets lists them every run.

Public package release

  • I ran pnpm changeset and committed the generated Changeset.

@toolpath/tool-scraper minor and @toolpath/tool-support minor. Nothing is removed or
narrowed; holderTakesTool's new form argument is optional and every existing caller compiles.

Validation

  • pnpm check — green except two pre-existing tests/maritool-corpus.test.ts failures on
    this machine's corpus (BT30-ER25-60M and CAT40-ER25-3.0MD carry series ER25M, which
    the test's /^ER\d+$/ rejects). That CSV was scraped 2026-09-02 and nothing here touches
    MariTool; those assertions skip in CI, where the CSVs are not committed.
  • TOOLPATH_REQUIRE_CORPUS=1 pnpm --filter @toolpath/tool-scraper test over all fourteen
    newly scraped families: every row becomes a record, and each family's count matches the
    rows declared for it.
  • kennametal --collets against the live site: 20 families under 3 category trees, 4 not
    configured — the kits.

`COLLET_FAMILIES` holds fourteen Kennametal families where it held two — the
standard metric and inch lines, twelve coolant-through lines one per series per
unit, and the two tap-collet lines — covering 443 parts against 120.
`ToolholdingDefinition` carries a `familyCode`, so a re-scrape reads the code
out of config rather than out of a browser.
`kennametal --collets` walks the three ER collet category trees through the new
`vendors/kennametal/catalog.ts` and prints every family they link to with the
CSV whose `familyCode` claims it, or `(not configured)`. The listing component
is a page-indexed AEM GET whose `pageSize` counts families rather than parts;
`docs/KENNAMETAL_PRODUCT_LISTING.md` records the endpoint and the two response
shapes a walk has to handle.
`ColletRecord` carries `clampingLength` and its millimetre twin from `L9` — the
bore depth that is `@toolpath/tool-support`'s `Collet.clampLength`, which no
Kennametal collet filled before — plus `squareSize` from `S10` and the vendor's
verbatim `tapRange`.
A tap collet publishes no `CCCN`/`CCCX` at all. `colletCapacity` reads its `D1`
as a zero-width band, the shape a sealed collet already has, keyed on the
vendor publishing a square rather than on the family's style.
`checkCollet` allows a nominal size to sit `NOMINAL_SLACK` outside the capacity
it names. A designation is not a measurement: `40ERSS1000` is designated one
inch and clamps 0.9938 in both unit columns, and ten of that family's twelve
rows do the same. The bound is relative because the gap scales with the collet
— widest 1.14 % against the 96 % a cell in the wrong unit system is out by. A
square size at or past what the collet clamps is refused.
In `@toolpath/tool-support`, `Collet` carries an optional `squareSize` and
`holderTakesTool` reads it: a square bore drives a tap, so a shank-diameter
test alone would seat an end mill of that size in something holding it by
nothing. `holderTakesTool` takes an optional `form` for that test, and a collet
stating no square is unchanged. `TAP_FORMS` and `isTapForm` are exported.
@JustinSGray
JustinSGray merged commit 51d80cf into mainSep 8, 2026
2 checks passed
Sign up for freeto 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.

1 participant

@JustinSGray