🔩 Calcolatore Filettature Metriche e UNC/UNF
Verifica gioco, accoppiamento corretto e interferenza tra vite e madrevite
📋 Dati di Input
📊 Risultati Calcolo
🔄 Conversione e Compatibilità
💪 Analisi Meccanica
📐 Rappresentazione Grafica
📋 Tabella Standard di Riferimento
Gioco al diametro medio: ' + clearance.toFixed(4) + ' mm
'; document.getElementById('diametersGrid').innerHTML = 'Vite - Ø Esterno' + boltMajor.toFixed(3) + ' mm
' +
'Vite - Ø Medio' + boltPitch.toFixed(3) + ' mm
' +
'Vite - Ø Nocciolo' + boltMinor.toFixed(3) + ' mm
' +
'Madrevite - Ø Interno' + nutMinor.toFixed(3) + ' mm
' +
'Madrevite - Ø Medio' + nutPitch.toFixed(3) + ' mm
' +
'Madrevite - Ø Esterno' + nutMajor.toFixed(3) + ' mm
';
const diamInch = (diamMM / 25.4).toFixed(4);
const pitchInch = (pitchMM / 25.4).toFixed(4);
let equivalent = 'Nessuna equivalenza diretta';
if (type === 'metric') {
const closest = uncThreads.reduce((prev, curr) =>
Math.abs(curr.decimal * 25.4 - diamMM) < Math.abs(prev.decimal * 25.4 - diamMM) ? curr : prev
);
equivalent = 'Equivalente approssimativo: ' + closest.size + '" - ' + closest.tpi + ' UNC';
} else {
const closestMetric = Object.keys(metricPitches).reduce((prev, curr) =>
Math.abs(curr - diamMM) < Math.abs(prev - diamMM) ? curr : prev
);
equivalent = 'Equivalente approssimativo: M' + closestMetric;
}
document.getElementById('conversionInfo').innerHTML =
'' +
'
' +
'Diametro in mm' + diamMM.toFixed(2) + ' mm
' +
'Diametro in pollici' + diamInch + '"
' +
'Passo in mm' + pitchMM.toFixed(3) + ' mm
' +
'TPI (threads per inch)' + tpi.toFixed(1) + '
' +
'💡 ' + equivalent + '
';
const stressArea = Math.PI / 4 * Math.pow((boltPitch + boltMinor) / 2, 2);
const shearArea = engLen > 0 ? Math.PI * boltMinor * engLen * 0.75 : 0;
let mechHTML = '' +
'
' +
'Area resistente trazione' + stressArea.toFixed(2) + ' mm²
';
if (engLen > 0) {
mechHTML += 'Area taglio (75% ingaggio)' + shearArea.toFixed(2) + ' mm²
' +
'Lunghezza ingaggio' + engLen.toFixed(1) + ' mm
';
}
mechHTML += '' + 'Nota: I calcoli assumono materiali standard. Consultare normative specifiche (ISO 898, ASME B1.1) per applicazioni critiche.' + '
'; document.getElementById('mechanicalInfo').innerHTML = mechHTML; drawThread(boltMajor, boltPitch, boltMinor, nutMajor, nutPitch, nutMinor, clearance, statusClass); generateStandardTable(type); document.getElementById('results').scrollIntoView({ behavior: 'smooth', block: 'start' }); } function drawThread(boltMajor, boltPitch, boltMinor, nutMajor, nutPitch, nutMinor, clearance, statusClass) { const canvas = document.getElementById('threadCanvas'); const ctx = canvas.getContext('2d'); ctx.clearRect(0, 0, canvas.width, canvas.height); const scale = 15; const centerX = canvas.width / 2; const centerY = canvas.height / 2; ctx.strokeStyle = '#2196F3'; ctx.lineWidth = 3; ctx.beginPath(); ctx.arc(centerX - 80, centerY, boltMajor * scale, 0, 2 * Math.PI); ctx.stroke(); ctx.strokeStyle = '#4CAF50'; ctx.lineWidth = 2; ctx.setLineDash([5, 5]); ctx.beginPath(); ctx.arc(centerX - 80, centerY, boltPitch * scale, 0, 2 * Math.PI); ctx.stroke(); ctx.strokeStyle = '#FF9800'; ctx.beginPath(); ctx.arc(centerX - 80, centerY, boltMinor * scale, 0, 2 * Math.PI); ctx.stroke(); ctx.setLineDash([]); ctx.strokeStyle = '#9C27B0'; ctx.lineWidth = 3; ctx.beginPath(); ctx.arc(centerX + 80, centerY, nutMajor * scale, 0, 2 * Math.PI); ctx.stroke(); ctx.strokeStyle = statusClass === 'status-ok' ? '#4CAF50' : (statusClass === 'status-warning' ? '#FF9800' : '#F44336'); ctx.lineWidth = 2; ctx.setLineDash([5, 5]); ctx.beginPath(); ctx.arc(centerX + 80, centerY, nutPitch * scale, 0, 2 * Math.PI); ctx.stroke(); ctx.strokeStyle = '#607D8B'; ctx.setLineDash([]); ctx.beginPath(); ctx.arc(centerX + 80, centerY, nutMinor * scale, 0, 2 * Math.PI); ctx.stroke(); ctx.fillStyle = '#333'; ctx.font = 'bold 14px Arial'; ctx.textAlign = 'center'; ctx.fillText('VITE', centerX - 80, centerY - boltMajor * scale - 15); ctx.fillText('MADREVITE', centerX + 80, centerY - nutMajor * scale - 15); ctx.font = '12px Arial'; ctx.fillText('Diam ' + boltMajor.toFixed(2), centerX - 80, centerY + boltMajor * scale + 20); ctx.fillText('Diam ' + nutMajor.toFixed(2), centerX + 80, centerY + nutMajor * scale + 20); ctx.strokeStyle = statusClass === 'status-ok' ? '#4CAF50' : '#F44336'; ctx.lineWidth = 2; ctx.beginPath(); ctx.moveTo(centerX - 80 + boltPitch * scale, centerY); ctx.lineTo(centerX + 80 - nutPitch * scale, centerY); ctx.stroke(); ctx.fillStyle = statusClass === 'status-ok' ? '#4CAF50' : '#F44336'; ctx.font = 'bold 11px Arial'; ctx.fillText('Gioco: ' + clearance.toFixed(3) + ' mm', centerX, centerY - 10); const legend = [ {color: '#2196F3', text: 'Diametro Esterno', dash: false}, {color: '#4CAF50', text: 'Diametro Medio', dash: true}, {color: '#FF9800', text: 'Diametro Nocciolo', dash: true} ]; ctx.textAlign = 'left'; ctx.font = '11px Arial'; legend.forEach(function(item, i) { ctx.strokeStyle = item.color; ctx.lineWidth = 2; if (item.dash) { ctx.setLineDash([5, 5]); } else { ctx.setLineDash([]); } ctx.beginPath(); ctx.moveTo(20, 30 + i * 20); ctx.lineTo(50, 30 + i * 20); ctx.stroke(); ctx.fillStyle = '#333'; ctx.fillText(item.text, 55, 34 + i * 20); }); ctx.setLineDash([]); } function generateStandardTable(type) { let tableHTML = '| Designazione | ' + 'Diametro (mm) | ' + 'Passo Grosso (mm) | ' + 'Passo Fine (mm) | ' + 'Ø Nocciolo (mm) | ' + '
|---|---|---|---|---|
| M3 | 3.0 | 0.5 | - | 2.39 |
| M4 | 4.0 | 0.7 | - | 3.14 |
| M5 | 5.0 | 0.8 | - | 4.02 |
| M6 | 6.0 | 1.0 | - | 4.77 |
| M8 | 8.0 | 1.25 | 1.0 | 6.47 |
| M10 | 10.0 | 1.5 | 1.25 | 8.16 |
| M12 | 12.0 | 1.75 | 1.5/1.25 | 9.85 |
| M14 | 14.0 | 2.0 | 1.5 | 11.55 |
| M16 | 16.0 | 2.0 | 1.5 | 13.55 |
| M20 | 20.0 | 2.5 | 2.0/1.5 | 16.93 |
| M24 | 24.0 | 3.0 | 2.0 | 20.32 |
| M30 | 30.0 | 3.5 | 2.0 | 25.71 |
| Designazione | ' + 'Diametro (pollici) | ' + 'TPI | ' + 'Passo (mm) | ' + 'Equiv. Metrico | ' + '
| 1/4-20 UNC | 0.250" | 20 | 1.270 | ≈ M6 |
| 5/16-18 UNC | 0.3125" | 18 | 1.411 | ≈ M8 |
| 3/8-16 UNC | 0.375" | 16 | 1.588 | ≈ M10 |
| 7/16-14 UNC | 0.4375" | 14 | 1.814 | ≈ M12 |
| 1/2-13 UNC | 0.500" | 13 | 1.954 | ≈ M12 |
| 9/16-12 UNC | 0.5625" | 12 | 2.117 | ≈ M14 |
| 5/8-11 UNC | 0.625" | 11 | 2.309 | ≈ M16 |
| 3/4-10 UNC | 0.750" | 10 | 2.540 | ≈ M20 |
| 7/8-9 UNC | 0.875" | 9 | 2.822 | ≈ M22 |
| 1-8 UNC | 1.000" | 8 | 3.175 | ≈ M24 |
| Designazione | ' + 'Diametro (pollici) | ' + 'TPI | ' + 'Passo (mm) | ' + 'Equiv. Metrico | ' + '
| 1/4-28 UNF | 0.250" | 28 | 0.907 | ≈ M6 fine |
| 5/16-24 UNF | 0.3125" | 24 | 1.058 | ≈ M8 fine |
| 3/8-24 UNF | 0.375" | 24 | 1.058 | ≈ M10 fine |
| 7/16-20 UNF | 0.4375" | 20 | 1.270 | ≈ M12 fine |
| 1/2-20 UNF | 0.500" | 20 | 1.270 | ≈ M12 fine |
| 9/16-18 UNF | 0.5625" | 18 | 1.411 | ≈ M14 fine |
| 5/8-18 UNF | 0.625" | 18 | 1.411 | ≈ M16 fine |
| 3/4-16 UNF | 0.750" | 16 | 1.588 | ≈ M20 fine |
| 7/8-14 UNF | 0.875" | 14 | 1.814 | ≈ M22 fine |
| 1-12 UNF | 1.000" | 12 | 2.117 | ≈ M24 fine |
