Calcolatore Vita Utensile (Taylor)
📋 Carica valori predefiniti
📊 Risultati del Calcolo
⏱️ Durata Stimata Utensile (T)
— minuti
🔄 Variazione Vita Utensile al Variare di Vc
📉 Curva Vita Utensile (Vc vs T)
📚 Tabella Valori di Riferimento
| Materiale |
Utensile |
C (m/min×minn) |
n |
| Acciaio Dolce |
HSS |
100 |
0.125 |
| Acciaio Dolce |
Metallo Duro |
350 |
0.25 |
| Ghisa |
HSS |
80 |
0.10 |
| Ghisa |
Metallo Duro |
250 |
0.20 |
| Alluminio |
Metallo Duro |
800 |
0.30 |
| Titanio |
Metallo Duro |
150 |
0.20 |
| Acciaio Temprato |
Metallo Duro |
200 |
0.18 |
| Acciaio Temprato |
Ceramica |
400 |
0.35 |
`;
} else if (T > 30) {
suggestionHTML = `
✅
Velocità conservativa. La vita utensile è ottima (${T.toFixed(2)} min).
È possibile incrementare Vc per migliorare la produttività.
`;
} else {
suggestionHTML = `
ℹ️
Parametri equilibrati. La vita utensile stimata è ${T.toFixed(2)} minuti.
Valori ottimali per un buon compromesso tra produttività e durata utensile.
`;
}
document.getElementById('taylor-suggestion').innerHTML = suggestionHTML;
// Genera confronto velocità
generateComparison(Vc, C, n, T);
// Genera grafico
drawChart(C, n, Vc, T);
// Mostra risultati
document.getElementById('taylor-results').classList.add('active');
}
function generateComparison(Vc, C, n, T) {
const variations = [-20, -10, 0, 10, 20];
let html = '';
variations.forEach(variation => {
const newVc = Vc * (1 + variation / 100);
const newT = Math.pow(C / newVc, 1 / n);
const percentChange = ((newT - T) / T * 100).toFixed(1);
html += `
Vc ${variation >= 0 ? '+' : ''}${variation}%
${newT.toFixed(2)} min
${percentChange > 0 ? '+' : ''}${percentChange}%
`;
});
document.getElementById('taylor-comparison-grid').innerHTML = html;
}
function drawChart(C, n, currentVc, currentT) {
const canvas = document.getElementById('taylor-chart');
const ctx = canvas.getContext('2d');
const width = canvas.width;
const height = canvas.height;
const padding = 60;
// Pulisci canvas
ctx.clearRect(0, 0, width, height);
// Calcola range per il grafico
const VcMin = currentVc * 0.5;
const VcMax = currentVc * 1.5;
const steps = 100;
const VcStep = (VcMax - VcMin) / steps;
// Calcola valori T per ogni Vc
const points = [];
let TMax = 0;
for (let i = 0; i <= steps; i++) {
const Vc = VcMin + i * VcStep;
const T = Math.pow(C / Vc, 1 / n);
points.push({ Vc, T });
if (T > TMax) TMax = T;
}
const TMin = 0;
// Funzioni di scala
const scaleX = (Vc) => padding + ((Vc - VcMin) / (VcMax - VcMin)) * (width - 2 * padding);
const scaleY = (T) => height - padding - ((T - TMin) / (TMax - TMin)) * (height - 2 * padding);
// Disegna assi
ctx.strokeStyle = '#333';
ctx.lineWidth = 2;
ctx.beginPath();
ctx.moveTo(padding, height - padding);
ctx.lineTo(width - padding, height - padding);
ctx.moveTo(padding, height - padding);
ctx.lineTo(padding, padding);
ctx.stroke();
// Etichette assi
ctx.fillStyle = '#333';
ctx.font = 'bold 14px Arial';
ctx.textAlign = 'center';
ctx.fillText('Velocità di Taglio Vc (m/min)', width / 2, height - 15);
ctx.save();
ctx.translate(15, height / 2);
ctx.rotate(-Math.PI / 2);
ctx.fillText('Vita Utensile T (min)', 0, 0);
ctx.restore();
// Griglia
ctx.strokeStyle = '#e0e0e0';
ctx.lineWidth = 1;
ctx.setLineDash([5, 5]);
for (let i = 0; i <= 5; i++) {
const x = padding + (i / 5) * (width - 2 * padding);
ctx.beginPath();
ctx.moveTo(x, padding);
ctx.lineTo(x, height - padding);
ctx.stroke();
const Vc = VcMin + (i / 5) * (VcMax - VcMin);
ctx.fillStyle = '#666';
ctx.font = '12px Arial';
ctx.fillText(Vc.toFixed(0), x, height - padding + 20);
}
for (let i = 0; i <= 5; i++) {
const y = height - padding - (i / 5) * (height - 2 * padding);
ctx.beginPath();
ctx.moveTo(padding, y);
ctx.lineTo(width - padding, y);
ctx.stroke();
const T = TMin + (i / 5) * (TMax - TMin);
ctx.fillStyle = '#666';
ctx.textAlign = 'right';
ctx.fillText(T.toFixed(1), padding - 10, y + 5);
}
ctx.setLineDash([]);
// Disegna curva di Taylor
ctx.strokeStyle = '#667eea';
ctx.lineWidth = 3;
ctx.beginPath();
points.forEach((point, i) => {
const x = scaleX(point.Vc);
const y = scaleY(point.T);
if (i === 0) {
ctx.moveTo(x, y);
} else {
ctx.lineTo(x, y);
}
});
ctx.stroke();
// Evidenzia punto corrente
const currentX = scaleX(currentVc);
const currentY = scaleY(currentT);
ctx.fillStyle = '#ff4757';
ctx.beginPath();
ctx.arc(currentX, currentY, 8, 0, 2 * Math.PI);
ctx.fill();
// Linee tratteggiate al punto corrente
ctx.strokeStyle = '#ff4757';
ctx.lineWidth = 1;
ctx.setLineDash([5, 5]);
ctx.beginPath();
ctx.moveTo(currentX, currentY);
ctx.lineTo(currentX, height - padding);
ctx.moveTo(currentX, currentY);
ctx.lineTo(padding, currentY);
ctx.stroke();
ctx.setLineDash([]);
// Etichetta punto corrente
ctx.fillStyle = '#ff4757';
ctx.font = 'bold 12px Arial';
ctx.textAlign = 'center';
ctx.fillText(`(${currentVc.toFixed(1)}, ${currentT.toFixed(2)})`, currentX, currentY - 15);
}
function resetCalculator() {
document.getElementById('taylor-vc').value = '';
document.getElementById('taylor-c').value = '';
document.getElementById('taylor-n').value = '';
document.getElementById('taylor-t0').value = '1';
document.getElementById('taylor-material').value = '';
document.getElementById('taylor-tool').value = '';
document.getElementById('taylor-results').classList.remove('active');
}