@toolpath/tool-scraper 2.3.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -8
- package/dist/families/emuge.d.ts +51 -3
- package/dist/families/emuge.js +105 -15
- package/dist/families/kennametal.d.ts +291 -2
- package/dist/families/kennametal.js +221 -22
- package/dist/families/maritool.d.ts +31 -0
- package/dist/families/maritool.js +31 -0
- package/dist/family.d.ts +28 -2
- package/dist/holding.d.ts +61 -3
- package/dist/holding.js +42 -1
- package/dist/identity.d.ts +1 -1
- package/dist/identity.js +3 -6
- package/dist/node/cli.js +46 -1
- package/dist/records.d.ts +29 -2
- package/dist/records.js +13 -1
- package/dist/vendors/emuge/records.d.ts +10 -0
- package/dist/vendors/emuge/records.js +12 -0
- package/dist/vendors/kennametal/catalog.d.ts +168 -0
- package/dist/vendors/kennametal/catalog.js +247 -0
- package/dist/vendors/kennametal/holding.js +50 -4
- package/dist/vendors/kennametal/index.d.ts +1 -0
- package/dist/vendors/kennametal/index.js +1 -0
- package/dist/vendors/kennametal/records.js +1 -0
- package/package.json +2 -2
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* and dropped under `records.ToolRecord`'s standing rule: add a field when
|
|
31
31
|
* something displays it, not before.
|
|
32
32
|
*/
|
|
33
|
-
import { CAD_COLUMN, COLLET_DESIGNATION_COLUMN, COLLET_SERIES_COLUMN } from '../../conventions.js';
|
|
33
|
+
import { CAD_COLUMN, COLLET_DESIGNATION_COLUMN, COLLET_SERIES_COLUMN, dimensionalColumn, } from '../../conventions.js';
|
|
34
34
|
import { familyBrand } from '../../family.js';
|
|
35
35
|
import { checkUnitAgreement, clampingMode, colletRecord, contactMode, dim, holderRecord, holdingFact, published, } from '../../holding.js';
|
|
36
36
|
import { consoleWarn } from '../../scrape.js';
|
|
@@ -44,7 +44,19 @@ import { CATALOG_NUMBER, MATERIAL_NUMBER } from './records.js';
|
|
|
44
44
|
* report rather than a gate.
|
|
45
45
|
*/
|
|
46
46
|
const HOLDER_LABELS = ['D1', 'L1', 'L2', 'L9', 'V', 'D2', 'D11'];
|
|
47
|
-
const COLLET_LABELS = ['CCCN', 'CCCX', 'D1', 'BDX', 'LF', 'L'];
|
|
47
|
+
const COLLET_LABELS = ['CCCN', 'CCCX', 'D1', 'BDX', 'LF', 'L', 'L9', 'S10'];
|
|
48
|
+
/**
|
|
49
|
+
* The square drive a tap collet's bore carries, across flats.
|
|
50
|
+
*
|
|
51
|
+
* Kennametal's own label, and it is what tells a tap collet from a round one —
|
|
52
|
+
* see {@link colletCapacity}. Local to this adapter rather than in
|
|
53
|
+
* `conventions.ts` for the reason that module states: a column two vendors
|
|
54
|
+
* write is neutral, and this one is published by Kennametal's tap families and
|
|
55
|
+
* by nothing else in the catalog.
|
|
56
|
+
*/
|
|
57
|
+
const SQUARE_LABEL = 'S10';
|
|
58
|
+
/** The vendor's own designation of the taps a tap collet is for. */
|
|
59
|
+
const TAP_RANGE_LABEL = 'Tap Range';
|
|
48
60
|
/** How a part names itself in a warning or a refusal. */
|
|
49
61
|
function subject(row) {
|
|
50
62
|
return `${row[CATALOG_NUMBER] ?? ''} (${row[MATERIAL_NUMBER] ?? ''})`;
|
|
@@ -85,6 +97,34 @@ function holder(row, family, options = {}) {
|
|
|
85
97
|
cadDxfUrl: null,
|
|
86
98
|
});
|
|
87
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* A collet's clamping capacity, from whichever pair of columns the family
|
|
102
|
+
* publishes.
|
|
103
|
+
*
|
|
104
|
+
* The ER collet families state `CCCN`/`CCCX` and that is what is read. **The
|
|
105
|
+
* tap families state neither**, and they are not incomplete rows: a square-drive
|
|
106
|
+
* collet holds one exact shank, and `D1` is it — `16ERTC025` publishes 6.477 mm,
|
|
107
|
+
* which is 0.255 in, the ANSI shank of a 1/4-20 tap. So the honest capacity is a
|
|
108
|
+
* zero-width band at `D1`, the same shape a sealed coolant-through collet
|
|
109
|
+
* already carries and `holding.checkCollet` already permits.
|
|
110
|
+
*
|
|
111
|
+
* Keyed on the vendor publishing a **square size** rather than on the family's
|
|
112
|
+
* `style` string: the square is Kennametal saying this part drives a tap, and a
|
|
113
|
+
* style is this package's config. A tap family that started publishing a real
|
|
114
|
+
* band would simply be read from it, which is the right answer either way.
|
|
115
|
+
*/
|
|
116
|
+
function colletCapacity(row, what, unit) {
|
|
117
|
+
const min = dim(row, 'CCCN', unit);
|
|
118
|
+
const max = dim(row, 'CCCX', unit);
|
|
119
|
+
if (min !== null || max !== null || dim(row, SQUARE_LABEL, unit) === null) {
|
|
120
|
+
return {
|
|
121
|
+
clampMin: published(min, what, 'CCCN clamping minimum'),
|
|
122
|
+
clampMax: published(max, what, 'CCCX clamping maximum'),
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
const exact = published(dim(row, 'D1', unit), what, 'D1 clamping diameter');
|
|
126
|
+
return { clampMin: exact, clampMax: exact };
|
|
127
|
+
}
|
|
88
128
|
/** One Kennametal or WIDIA collet row -> one {@link ColletRecord}. */
|
|
89
129
|
function collet(row, family, options = {}) {
|
|
90
130
|
const warn = options.warn ?? consoleWarn;
|
|
@@ -101,11 +141,17 @@ function collet(row, family, options = {}) {
|
|
|
101
141
|
series: published(row[COLLET_DESIGNATION_COLUMN], what, 'collet series'),
|
|
102
142
|
style: holdingFact(family, 'style', family.style),
|
|
103
143
|
nominal: dim(row, 'D1', unit),
|
|
104
|
-
|
|
105
|
-
clampMax: published(dim(row, 'CCCX', unit), what, 'CCCX clamping maximum'),
|
|
144
|
+
...colletCapacity(row, what, unit),
|
|
106
145
|
bodyDiameter: dim(row, 'BDX', unit),
|
|
107
146
|
functionalLength: dim(row, 'LF', unit),
|
|
108
147
|
overallLength: dim(row, 'L', unit),
|
|
148
|
+
clampingLength: dim(row, 'L9', unit),
|
|
149
|
+
// Verbatim, in the family's own unit, and never converted: it is two thread
|
|
150
|
+
// designations rather than a dimension. The metric families print it in the
|
|
151
|
+
// metric column and the ANSI ones in the inch column, and a row where the
|
|
152
|
+
// vendor filled neither says nothing rather than the wrong one.
|
|
153
|
+
tapRange: row[dimensionalColumn(TAP_RANGE_LABEL, unit)] || null,
|
|
154
|
+
squareSize: dim(row, SQUARE_LABEL, unit),
|
|
109
155
|
});
|
|
110
156
|
}
|
|
111
157
|
/** The toolholding half of the adapter contract `registry` looks up by brand. */
|
|
@@ -247,6 +247,7 @@ export function tapRecord(row, family, columns) {
|
|
|
247
247
|
coating: row[COATING] ?? '',
|
|
248
248
|
...materialGroups(row),
|
|
249
249
|
coolantThrough: fact(family, 'coolantThrough', family.coolantThrough),
|
|
250
|
+
threadMethod: fact(family, 'threadMethod', family.threadMethod),
|
|
250
251
|
geometry: {
|
|
251
252
|
DC: threadMajorDiameter(tdz, system),
|
|
252
253
|
TP: require_(row, columns, 'TP', unit, what),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toolpath/tool-scraper",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "Scrape cutting-tool geometry from vendor catalogs into records and CSVs",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
],
|
|
84
84
|
"dependencies": {
|
|
85
85
|
"htmlparser2": "12.0.0",
|
|
86
|
-
"@toolpath/tool-support": "^0.
|
|
86
|
+
"@toolpath/tool-support": "^0.3.0"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
89
|
"@types/node": "24.10.1",
|