<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Noupoi.net</title><link href="https://www.noupoi.net/" rel="alternate"></link><link href="https://www.noupoi.net/feeds/all.atom.xml" rel="self"></link><id>https://www.noupoi.net/</id><updated>2020-07-11T10:20:00+01:00</updated><entry><title>Bottle cap thread calculator</title><link href="https://www.noupoi.net/bottle-cap-thread-calculator.html" rel="alternate"></link><published>2020-07-11T10:20:00+01:00</published><updated>2020-07-11T10:20:00+01:00</updated><author><name>Noupoi</name></author><id>tag:www.noupoi.net,2020-07-11:/bottle-cap-thread-calculator.html</id><summary type="html">&lt;p&gt;Specification calculator for plastic bottle cap threads for use in CAD modelling&lt;/p&gt;</summary><content type="html">&lt;p&gt;This tool calculates the thread specifications of bottle caps for modelling in CAD programs such as Fusion 360. &lt;/p&gt;
&lt;p&gt;This is intended for use with bottles that conform to &lt;a href="https://www.astm.org/Standards/D2911.htm"&gt;ASTM D2911&lt;/a&gt;,
also known as "GPI" or "SPI" thread finishes. &lt;/p&gt;
&lt;p&gt;(While ASTM charges $60 for the spec, the important parts can be found &lt;a href="https://www.sanleplastics.com/solution/plastic-bottle-cap-threads-specifications/"&gt;freely online&lt;/a&gt;.)&lt;/p&gt;
&lt;p&gt;This assumes that you are modelling the thread by creating a coil with a triangular cross section, then
cutting the tip of the triangle off with a cylindrical hole. &lt;/p&gt;
&lt;h3&gt;Calculator&lt;/h3&gt;
&lt;script type="text/javascript"&gt;
    var decimals = 3;
    var presets = {
        '': null,
        '13 - SP415': {tMax: 13.06, eMax: 11.53, threadWidth: 1.14, angleDeg: 3, angleArcmin: 11, tolerance: 0.2},
        '15 - SP415': {tMax: 14.76, eMax: 13.23, threadWidth: 1.14, angleDeg: 2, angleArcmin: 48, tolerance: 0.2},
        '18 - SP400, SP410, SP415': {tMax: 17.88, eMax: 15.75, threadWidth: 2.13, angleDeg: 3, angleArcmin: 30, tolerance: 0.2},
        '20 - SP400, SP410, SP415': {tMax: 19.89, eMax: 17.75, threadWidth: 2.13, angleDeg: 3, angleArcmin: 7, tolerance: 0.2},
        '22 - SP400, SP410, SP415': {tMax: 21.89, eMax: 19.76, threadWidth: 2.13, angleDeg: 2, angleArcmin: 49, tolerance: 0.2},
        '24 - SP400, SP410, SP415': {tMax: 23.87, eMax: 21.74, threadWidth: 2.13, angleDeg: 2, angleArcmin: 34, tolerance: 0.2},
        '28 - SP400, SP410, SP415': {tMax: 27.64, eMax: 25.25, threadWidth: 2.39, angleDeg: 2, angleArcmin: 57, tolerance: 0.2},
        '30 - SP400': {tMax: 28.62, eMax: 26.23, threadWidth: 2.39, angleDeg: 2, angleArcmin: 51, tolerance: 0.2},
        '33 - SP400, SP415': {tMax: 32.14, eMax: 29.74, threadWidth: 2.39, angleDeg: 2, angleArcmin: 31, tolerance: 0.2},
        '35 - SP400': {tMax: 34.64, eMax: 32.25, threadWidth: 2.39, angleDeg: 2, angleArcmin: 21, tolerance: 0.2},
        '38 - SP400': {tMax: 37.5, eMax: 35.1, threadWidth: 2.39, angleDeg: 2, angleArcmin: 9, tolerance: 0.2},
        '40 - SP400': {tMax: 40.13, eMax: 37.75, threadWidth: 2.39, angleDeg: 2, angleArcmin: 0, tolerance: 0.2},
        '43 - SP400': {tMax: 42, eMax: 39.62, threadWidth: 2.39, angleDeg: 1, angleArcmin: 55, tolerance: 0.2},
        '45 - SP400': {tMax: 44.2, eMax: 41.81, threadWidth: 2.39, angleDeg: 1, angleArcmin: 49, tolerance: 0.2},
        '48 - SP400': {tMax: 47.5, eMax: 45.11, threadWidth: 2.39, angleDeg: 1, angleArcmin: 41, tolerance: 0.2},
        '51 - SP400': {tMax: 50, eMax: 47.6, threadWidth: 2.39, angleDeg: 1, angleArcmin: 36, tolerance: 0.2},
        '53 - SP400': {tMax: 52.5, eMax: 50.11, threadWidth: 2.39, angleDeg: 1, angleArcmin: 31, tolerance: 0.2},
        '58 - SP400': {tMax: 56.5, eMax: 54.1, threadWidth: 2.39, angleDeg: 1, angleArcmin: 25, tolerance: 0.2},
        '60 - SP400': {tMax: 59.5, eMax: 57.1, threadWidth: 2.39, angleDeg: 1, angleArcmin: 20, tolerance: 0.2},
        '63 - SP400': {tMax: 62.51, eMax: 60.12, threadWidth: 2.39, angleDeg: 1, angleArcmin: 16, tolerance: 0.2},
        '66 - SP400': {tMax: 65.5, eMax: 63.12, threadWidth: 2.39, angleDeg: 1, angleArcmin: 13, tolerance: 0.2},
        '70 - SP400': {tMax: 69.5, eMax: 67, threadWidth: 2.39, angleDeg: 1, angleArcmin: 8, tolerance: 0.2},
        '75 - SP400': {tMax: 74, eMax: 71.6, threadWidth: 2.39, angleDeg: 1, angleArcmin: 4, tolerance: 0.2},
        '77 - SP400': {tMax: 77.1, eMax: 74.7, threadWidth: 2.39, angleDeg: 1, angleArcmin: 1, tolerance: 0.2},
        '83 - SP400': {tMax: 83, eMax: 80, threadWidth: 3.05, angleDeg: 1, angleArcmin: 9, tolerance: 0.2},
        '89 - SP400': {tMax: 89.18, eMax: 86.12, threadWidth: 3.05, angleDeg: 1, angleArcmin: 4, tolerance: 0.2},
        '100 - SP400': {tMax: 100, eMax: 96.95, threadWidth: 3.05, angleDeg: 0, angleArcmin: 59, tolerance: 0.2},
        '110 - SP400': {tMax: 110, eMax: 107, threadWidth: 3.05, angleDeg: 0, angleArcmin: 51, tolerance: 0.2},
        '120 - SP400': {tMax: 120, eMax: 117, threadWidth: 3.05, angleDeg: 0, angleArcmin: 47, tolerance: 0.2},
    };

    function populatePresets() {
        $.each(presets, function (name) {
            var option = new Option(name);
            $("#threadPreset").append(option);
        });
    }

    function loadPreset() {
        var selection = $("#threadPreset").val();
        var config = presets[selection];
        if (config) {
            $("#tMax").val(config.tMax);
            $("#eMax").val(config.eMax);
            $("#threadWidth").val(config.threadWidth);
            $("#angleDegrees").val(config.angleDeg);
            $("#angleArcmins").val(config.angleArcmin);
            $("#tolerance").val(config.tolerance);
        }

        calculate();
    }

    function getFloatById(id) {
        return parseFloat($("#" + id).val());
    }

    function getTanDeg(deg) {
        var rad = deg * Math.PI / 180;
        return Math.tan(rad);
    }

    function calculate() {
        var tMax = getFloatById("tMax");
        var eMax = getFloatById("eMax");
        var threadWidth = getFloatById("threadWidth");
        var angleDegrees = getFloatById("angleDegrees");
        var angleArcmins = getFloatById("angleArcmins");
        var tolerance = getFloatById("tolerance");

        var threadDiameter = tMax + tolerance;
        var pitch = getTanDeg(angleDegrees + angleArcmins / 60) * Math.PI * threadDiameter;
        var sectionHeight = getTanDeg(60) * threadWidth / 2;
        var holeDiameter = eMax + tolerance;

        $("#threadDiameter").val(threadDiameter.toFixed(decimals));
        $("#pitch").val(pitch.toFixed(decimals));
        $("#height").val(sectionHeight.toFixed(decimals));
        $("#holeDiameter").val(holeDiameter.toFixed(decimals));
    }

    window.onload = populatePresets;
&lt;/script&gt;

&lt;form class="pure-form pure-form-aligned"&gt;
    &lt;fieldset&gt;
        &lt;div class="pure-control-group"&gt;
            &lt;label for="threadPreset"&gt;Preset&lt;/label&gt;
            &lt;select id="threadPreset" onchange="loadPreset()"&gt;&lt;/select&gt;
        &lt;/div&gt;
    &lt;/fieldset&gt;
&lt;/form&gt;

&lt;form class="pure-form pure-form-aligned"&gt;
    &lt;fieldset&gt;
        &lt;legend&gt;Neck finish specifications&lt;/legend&gt;
        &lt;div class="pure-control-group"&gt;
            &lt;label for="tMax"&gt;T&lt;sub&gt;max&lt;/sub&gt;&lt;/label&gt;
            &lt;input type="text" id="tMax" placeholder="thread outside diameter"/&gt;
            &lt;!--            &lt;span class="pure-form-message-inline"&gt;This is a required field.&lt;/span&gt;--&gt;
        &lt;/div&gt;
        &lt;div class="pure-control-group"&gt;
            &lt;label for="eMax"&gt;E&lt;sub&gt;max&lt;/sub&gt;&lt;/label&gt;
            &lt;input type="text" id="eMax" placeholder="neck outside diameter"/&gt;
        &lt;/div&gt;
        &lt;div class="pure-control-group"&gt;
            &lt;label for="threadWidth"&gt;Thread width (&lt;i&gt;a&lt;/i&gt;)&lt;/label&gt;
            &lt;input type="text" id="threadWidth" placeholder="thread width"/&gt;
        &lt;/div&gt;
        &lt;div class="pure-control-group"&gt;
            &lt;label for="aligned_angle"&gt;Helix angle &amp;beta;&lt;/label&gt;
            &lt;span id="aligned_angle"&gt;
                &lt;input type="number" id="angleDegrees" placeholder="degrees"/&gt;
                &lt;span class="pure-form-message-inline"&gt;&amp;deg;&lt;/span&gt;
                &lt;input type="number" id="angleArcmins" placeholder="arcminutes"/&gt;
                &lt;span class="pure-form-message-inline"&gt;&amp;prime;&lt;/span&gt;
            &lt;/span&gt;
        &lt;/div&gt;
        &lt;div class="pure-control-group"&gt;
            &lt;label for="tolerance"&gt;Tolerance&lt;/label&gt;
            &lt;input type="text" id="tolerance" placeholder="tolerance"/&gt;
            &lt;span class="pure-form-message-inline"&gt;0.2 mm is suggested&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class="pure-controls"&gt;
            &lt;button type="button" class="pure-button pure-button-primary" onclick="calculate()"&gt;Calculate&lt;/button&gt;
        &lt;/div&gt;
    &lt;/fieldset&gt;
&lt;/form&gt;

&lt;form class="pure-form pure-form-aligned"&gt;
    &lt;fieldset&gt;
        &lt;legend&gt;Cap thread parameters&lt;/legend&gt;
        &lt;div class="pure-control-group"&gt;
            &lt;label for="threadDiameter"&gt;Diameter&lt;/label&gt;
            &lt;input type="text" id="threadDiameter" value="" readonly=""/&gt;
        &lt;/div&gt;
        &lt;div class="pure-control-group"&gt;
            &lt;label for="pitch"&gt;Pitch&lt;/label&gt;
            &lt;input type="text" id="pitch" value="" readonly=""/&gt;
        &lt;/div&gt;
        &lt;div class="pure-control-group"&gt;
            &lt;label for="height"&gt;Section height&lt;/label&gt;
            &lt;input type="text" id="height" value="" readonly=""/&gt;
        &lt;/div&gt;
        &lt;div class="pure-control-group"&gt;
            &lt;label for="holeDiameter"&gt;Hole diameter&lt;/label&gt;
            &lt;input type="text" id="holeDiameter" value="" readonly=""/&gt;
            &lt;span class="pure-form-message-inline"&gt;Used to flatten the tip of the thread&lt;/span&gt;
        &lt;/div&gt;
    &lt;/fieldset&gt;
&lt;/form&gt;

&lt;h3&gt;References&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://www.mjspackaging.com/resources/training-technical-specs/neck-finish-information"&gt;How to identify the neck finish on a bottle&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=-BS9KR-B9U4"&gt;How to model a threaded cap in Fusion 360&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.premierformtools.co.uk/assets/pdf/DC18.pdf"&gt;Helix angle calcuation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="/static/thread_specs.xlsx"&gt;Preset calculation spreadsheet&lt;/a&gt;&lt;/p&gt;</content><category term="Tools"></category></entry><entry><title>Test post</title><link href="https://www.noupoi.net/test-post.html" rel="alternate"></link><published>2020-07-08T10:20:00+01:00</published><updated>2020-07-08T10:20:00+01:00</updated><author><name>Noupoi</name></author><id>tag:www.noupoi.net,2020-07-08:/test-post.html</id><content type="html">&lt;p&gt;This is a test post.&lt;/p&gt;</content><category term="Blog"></category></entry></feed>