This commit is contained in:
		@@ -1,97 +0,0 @@
 | 
			
		||||
<script>
 | 
			
		||||
    function Calculate(obj)
 | 
			
		||||
{
 | 
			
		||||
	tail = 53.33 * obj.size.value;
 | 
			
		||||
	length1 = obj.dia.value;
 | 
			
		||||
	size =  obj.size.value;
 | 
			
		||||
	body = length1 - 5.56 * size;
 | 
			
		||||
	stretch = 1.2;
 | 
			
		||||
	if (size == .109) stretch = 1.1875;
 | 
			
		||||
	if (size == .125) stretch = 1.2;
 | 
			
		||||
	if (size == .15625) stretch = 1.2;
 | 
			
		||||
	if (size == .1875) stretch = 1.2;
 | 
			
		||||
	if (size >= .25) stretch = 1.2;
 | 
			
		||||
	head = 16 * size;
 | 
			
		||||
 | 
			
		||||
	obj.length.value = Math.round(8*(3.1416 * length1 * (1 + stretch)  +24 *  size + 2 * size))/8;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	obj.mark1.value = Math.round(8*3.1416 * length1 * stretch / 2)/8;
 | 
			
		||||
	obj.cur2.value = Math.round(8*(  length1 * 3.1416 / 2 ))/8;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	obj.idia.value = Math.round(8*(          1.865 * size         ))/8;// loop size
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
</script>
 | 
			
		||||
<form name="wscform"> 
 | 
			
		||||
    <table>
 | 
			
		||||
    <tr>
 | 
			
		||||
       <td valigh="top">Loop Diameter</td>
 | 
			
		||||
       <td><input type="text" name="dia" size="18" value="8" > Inches
 | 
			
		||||
       </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
 | 
			
		||||
    <tr>
 | 
			
		||||
       <td valigh="top">Line Size</td>
 | 
			
		||||
       <td>
 | 
			
		||||
       
 | 
			
		||||
       <select name="size">
 | 
			
		||||
           <option value=".109">7/64
 | 
			
		||||
           <option value=".125">1/8
 | 
			
		||||
           <option value=".15625">5/32
 | 
			
		||||
           <option value=".1875" selected> 3/16
 | 
			
		||||
           <option value=".25">1/4
 | 
			
		||||
           <option value=".3125">5/16
 | 
			
		||||
           <option value=".375">3/8
 | 
			
		||||
           <option value=".4375">7/16
 | 
			
		||||
           <option value=".500">1/2
 | 
			
		||||
       </select>
 | 
			
		||||
       Diameter of line
 | 
			
		||||
       </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    <tr>
 | 
			
		||||
       <td><input type="button" value="Calculate" onClick="Calculate(this.form)"></td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
       <td>Loop size</td>
 | 
			
		||||
       <td><input type="text" name="idia" size="18" value="0" readonly> OD of loop double braid</td>
 | 
			
		||||
    </tr>
 | 
			
		||||
        <!-- <tr>
 | 
			
		||||
       <td>Capacity</td>
 | 
			
		||||
       <td><input type="text" name="idia2" size="18" value="0" readonly> Max diameter of load</td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
       <td>Interior size</td>
 | 
			
		||||
       <td><input type="text" name="folded" size="18" value="0" readonly> inner stretched size</td>
 | 
			
		||||
    <tr> -->
 | 
			
		||||
       <td>Line Length</td>
 | 
			
		||||
       <td><input type="text" name="length" size="18" value="0" readonly> Total rope needed</td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
       <td>Mark</td>
 | 
			
		||||
       <td><input type="text" name="mark1" size="18" value="0" readonly>   From center mark</td>
 | 
			
		||||
    </tr>
 | 
			
		||||
   <tr>
 | 
			
		||||
       <td>Extended Length</td>
 | 
			
		||||
       <td><input type="text" name="cur2" size="18" value="0" readonly>  Tip to tip</td>
 | 
			
		||||
    </tr> 
 | 
			
		||||
 | 
			
		||||
    <!-- <tr>
 | 
			
		||||
       <td>Body</td>
 | 
			
		||||
       <td><input type="text" name="body" size="18" value="0" readonly> </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
       <td>Loop</td>
 | 
			
		||||
       <td><input type="text" name="loop" size="18" value="0" readonly>  </td>
 | 
			
		||||
    </tr> -->
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    </table>
 | 
			
		||||
</form> 
 | 
			
		||||
							
								
								
									
										57
									
								
								layouts/shortcodes/slice/calc_loop.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								layouts/shortcodes/slice/calc_loop.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,57 @@
 | 
			
		||||
<script>
 | 
			
		||||
function Calculate(obj)
 | 
			
		||||
{
 | 
			
		||||
    //All calculations in CM
 | 
			
		||||
    loop_dia 	  = obj.loop_dia.value;
 | 
			
		||||
    line_diameter = obj.line_diameter.value;
 | 
			
		||||
 | 
			
		||||
    //Stretch factor
 | 
			
		||||
    stretch = 1.2;
 | 
			
		||||
    if (line_diameter <= .25) stretch = 1.1875;
 | 
			
		||||
 | 
			
		||||
    //Calculate
 | 
			
		||||
    var idia            = 1.865 * line_diameter;
 | 
			
		||||
    var length          = Math.PI * loop_dia * (1 + stretch) + 26 * line_diameter;
 | 
			
		||||
    var mark            = Math.PI * loop_dia * stretch / 2;
 | 
			
		||||
    var length_extended = loop_dia * Math.PI / 2;
 | 
			
		||||
 | 
			
		||||
    //Assign and round
 | 
			
		||||
    obj.idia.value  		  = idia.toFixed(1) +"cm";
 | 
			
		||||
    obj.length.value 		  = length.toFixed(1) +"cm";
 | 
			
		||||
    obj.mark.value            = mark.toFixed(1) +"cm";
 | 
			
		||||
    obj.length_extended.value = length_extended.toFixed(1) +"cm";
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
<form>
 | 
			
		||||
    <div class="form-group">
 | 
			
		||||
        <label for="line_diameter">Line diameter</label>
 | 
			
		||||
        <select class="form-control form-control-lg" name="line_diameter" onChange="Calculate(this.form)">
 | 
			
		||||
             <option value=".2">2mm</option>
 | 
			
		||||
             <option value=".25">2.5mm</option>
 | 
			
		||||
             <option value=".3">3mm</option>
 | 
			
		||||
             <option value=".4" selected>4mm</option>
 | 
			
		||||
             <option value=".5">5mm</option>
 | 
			
		||||
             <option value=".6">6mm</option>
 | 
			
		||||
             <option value=".8">8mm</option>
 | 
			
		||||
             <option value="1.0">10mm</option>
 | 
			
		||||
             <option value="1.2">12mm</option>
 | 
			
		||||
         </select>
 | 
			
		||||
 | 
			
		||||
        <label for="loop_dia">Loop diameter (in centimeter)</label>
 | 
			
		||||
        <input type="number" min="0" step=".1" class="form-control form-control-lg" id="loop_dia" aria-describedby="emailHelp" placeholder="Enter loop diameter" onChange="Calculate(this.form)">
 | 
			
		||||
    </div>
 | 
			
		||||
        <hr>
 | 
			
		||||
    <div class="form-group">
 | 
			
		||||
        <label for="idia" class="col-sm-2 col-form-label">Loop size (Diameter of double braid)</label>
 | 
			
		||||
        <input type="text" readonly class="form-control-plaintext" id="idia">
 | 
			
		||||
     
 | 
			
		||||
        <label for="length" class="col-sm-2 col-form-label">Total rope needed</label>
 | 
			
		||||
        <input type="text" readonly class="form-control-plaintext" id="length">
 | 
			
		||||
 | 
			
		||||
        <label for="mark" class="col-sm-2 col-form-label">From center mark</label>
 | 
			
		||||
        <input type="text" readonly class="form-control-plaintext" id="mark">
 | 
			
		||||
     
 | 
			
		||||
        <label for="length_extended" class="col-sm-2 col-form-label">Tip to tip</label>
 | 
			
		||||
        <input type="text" readonly class="form-control-plaintext" id="length_extended">
 | 
			
		||||
    </div>
 | 
			
		||||
</form> 
 | 
			
		||||
		Reference in New Issue
	
	Block a user