dechatter 0.2.0 → 0.4.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/CHANGELOG.md +86 -1
- package/README.md +69 -14
- package/package.json +2 -1
- package/web/dechatter.zip +0 -0
- package/web/engine.js +3 -2
- package/web/index.html +13 -1
- package/web/stepper.js +402 -0
- package/web/units.js +43 -0
- package/web/widget.css +4 -0
- package/web/widget.js +497 -138
- package/web/wizard.js +7 -4
package/web/wizard.js
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
// 'advanced' section (the default is 'basic') have a sensible default or computed value and
|
|
5
5
|
// sit in a collapsed section.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
import { MM_PER_INCH, tidy } from './units.js';
|
|
8
|
+
|
|
8
9
|
const LENGTH_UNITS = {
|
|
9
10
|
length: { mm: 'mm', in: 'in' },
|
|
10
11
|
lengths: { mm: 'mm', in: 'in' },
|
|
@@ -36,8 +37,10 @@ const INFO = {
|
|
|
36
37
|
'cut.chip_load_mm': `Feed per tooth, held constant for the whole session: feed = chip load × flutes × rpm. The default comes from the work material, the cutter diameter and the machine weight. Chatter barely depends on it, so the default is fine for mapping; the chip-load sweep offered once the map converges finds how far the best cut can be pushed. Very light chip loads make narrow cuts rub and squeal, which can pass for chatter. ${FIXED}`,
|
|
37
38
|
'cut.speed_min_rpm': `The slowest test speed. Default: a quarter of the fastest, and no lower than the machine allows. ${FREE}`,
|
|
38
39
|
'cut.speed_max_rpm': `The fastest test speed. Default: the machine's top speed or the material's surface-speed limit for this cutter, whichever is lower. ${FREE}`,
|
|
39
|
-
'stock.length_mm': `Along X. Every pass cuts the full length. Work zero X is the left end. ${FIXED}`,
|
|
40
|
+
'stock.length_mm': `Along X. Every pass cuts the full length, or its lane's. Work zero X is the left end. ${FIXED}`,
|
|
40
41
|
'stock.width_mm': `Along Y: how much the test may cut back from the front face. Work zero Y is the front face as first mounted. ${FREE}`,
|
|
42
|
+
'stock.lanes': `Splits the stock length into equal lanes along X, used one after another from the end the cutter meets first. When a lane's face runs out of width, the next round moves to the next lane: a fresh face at Y0 at the same height above the vise jaws, with no remounting or re-zeroing. Each pass then cuts one lane and stops just short of the next. A later lane may only be cut back as far as the one before it, and each lane must be at least twice the cutter diameter long. Default: as many lanes as leave every cut at least the shortest cut to listen to (Planner step) at the fastest test speed; 1 on a short block. The session's first round settles the number. ${FIXED}`,
|
|
43
|
+
'planner.min_cut_s': 'Bounds the automatic number of lanes: each cut at the fastest test speed lasts at least this long. Longer cuts give steadier verdicts; shorter ones let more lanes fit. Default: 6 s.',
|
|
41
44
|
'program.coolant': `Coolant noise makes chatter harder to hear: none is best for detection. ${FIXED}`,
|
|
42
45
|
'program.dwell_s': `Before each cut the spindle runs in the air beside the stock, already at depth. That lets it reach speed and records the quiet sound each cut is compared with. Do not shorten it much. With a manual spindle, the time at each M0 stop comes on top. ${FIXED}`,
|
|
43
46
|
'program.clearance_mm': `The cutter plunges in the air this far beyond the end of the stock, and backs off this far from the face after each cut. The plunge must never touch the stock. ${FREE}`,
|
|
@@ -109,6 +112,7 @@ export const STEPS = [
|
|
|
109
112
|
fields: [
|
|
110
113
|
{ at: 'stock.length_mm', label: 'Stock length (X)', type: 'length', note: 'Every pass cuts the full length.' },
|
|
111
114
|
{ at: 'stock.width_mm', label: 'Stock width to use (Y)', type: 'length', note: 'Material the test may consume from the front face.' },
|
|
115
|
+
{ at: 'stock.lanes', section: 'advanced', label: 'Lanes along X', type: 'int', optional: true, placeholder: 'automatic', note: 'A fresh face without remounting, at the same height above the jaws.' },
|
|
112
116
|
{ at: 'program.coolant', section: 'advanced', label: 'Coolant', type: 'choice', options: [['none', 'none'], ['flood', 'flood'], ['mist', 'mist']], note: 'Coolant noise makes chatter harder to hear.' },
|
|
113
117
|
{ at: 'program.dwell_s', section: 'advanced', label: 'Pause at speed before each pass', type: 'number', unit: 's' },
|
|
114
118
|
{ at: 'program.clearance_mm', section: 'advanced', label: 'Clearance around the stock', type: 'length' },
|
|
@@ -129,12 +133,11 @@ export const STEPS = [
|
|
|
129
133
|
{ at: 'planner.stop_improvement', section: 'advanced', label: 'Stop when a cut would add less than', type: 'number', note: 'As a fraction of the best removal rate so far.' },
|
|
130
134
|
{ at: 'planner.chip_load_sweep_low', section: 'advanced', label: 'Chip-load sweep from', type: 'number', unit: '×', note: 'Times the session\'s chip load.' },
|
|
131
135
|
{ at: 'planner.chip_load_sweep_high', section: 'advanced', label: 'Chip-load sweep up to', type: 'number', unit: '×' },
|
|
136
|
+
{ at: 'planner.min_cut_s', section: 'advanced', label: 'Shortest cut to listen to', type: 'number', unit: 's', note: 'Sets how many lanes the stock is split into, when that is left empty.' },
|
|
132
137
|
],
|
|
133
138
|
},
|
|
134
139
|
];
|
|
135
140
|
|
|
136
|
-
// Enough decimals that a hundred-thousandth of an inch survives the trip to millimetres.
|
|
137
|
-
const tidy = (number) => Number(number.toFixed(5));
|
|
138
141
|
|
|
139
142
|
function shown(field, value, units) {
|
|
140
143
|
if (value === null || value === undefined) {
|