Tube dimensions for a size
64-bitThe outside, wall and inside dimensions of one tube, in inches and millimeters.
id = od − 2 × wall; odMm = round(od × 25.4 × 1000) ÷ 1000; wallMm = wall × 25.4
25.4 is exact. Every tabled outside diameter is a multiple of 1/8 in, which is 3.175 mm, so rounding odMm to three decimals removes only binary noise and no real digits. The wall in millimeters is not rounded. The inside diameter subtracts two numbers of similar size once.
export function acrPipeSize(cls, size) {
const r = ACR[String(size)], i = col(cls);
if (!r || !i || r[i] === null) return null;
const od = r[0], wall = r[i], odMm = Math.round(od * 25.4 * 1000) / 1000;
return { mat: ACR_MATERIAL, cls, size: String(size), od, wall, id: od - 2 * wall, odMm, wallMm: wall * 25.4, dn: odMm, nps: od, label: 'Ø' + ACR_MM[size], ref: String(size), metric: true }; // i18n-ignore: a size mark
}