-
Notifications
You must be signed in to change notification settings - Fork 0
/
VSharpAngle11.html
342 lines (289 loc) · 15.5 KB
/
VSharpAngle11.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>VSharpAngle</title>
</head>
<script src="http://code.jquery.com/jquery-latest.js" ></script>
<script src="https://code.jquery.com/jquery-3.3.1.js"></script>
<script src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js"></script>
<body>
<table>
<tr><th> -----Edge Angle----- </th></tr>
<tr><th> Enter Edge Bevel Width: </th>
<td><input id="width" onselect="measureAngle() ; "</td></tr>
<tr><th> Enter Edge Bevel Height </th>
<td><input id="height" onchange="measureAngle() ; "</td></tr>
<!-- <tr><th> ------------------------- </th></tr> -->
<tr><th> ----Elevate SharpMaker---- </th></tr>
<tr><th> Enter Desired Angle (Elevation)</th>
<td><input id="desiredAngle" onselect="sharpmakerElevation() ; "</td></tr>
<tr><th> Enter Sharpener Angle </th>
<td><input id="sharpenerAngle" onchange="sharpmakerElevation() ; "</td></tr>
<!-- <tr><th> ------------------------- </th></tr> -->
<tr><th> -----Rotate SharpMaker---- </th></tr>
<tr><th> Enter Desired Angle (Rotation) </th>
<td><input id="rotationAngle" onselect="sharpmakerRotation() ; "</td></tr>
<tr><th> Enter Sharpener Angle </th>
<td><input id="rotationSharpener" onchange="sharpmakerRotation() ; "</td></tr>
<!-- <tr><th> ------------------------- </th></tr> -->
<tr><th> -------Decenting Passes Counter------ </th></tr>
<tr><th> Enter Number of Passes </th>
<td><input id="numberOfPasses" onchange="passCount() ; "</td></tr>
<!-- <tr><th> ------------------------- </th></tr> -->
<tr><th> ---CATRA TCC Edge Retention------- </th></tr>
<tr><th> Enter Hardness </th>
<td><input id="Hardness" onselect="edgeRetention() ;"</td></tr>
<tr><th> Enter Inclusive Edge Angle </th>
<td><input id="edgeAngle" onchange="edgeRetention() ;"</td></tr>
<tr><th> Enter CrC </th>
<td><input id="CrC" onchange="edgeRetention() ;"</td></tr>
<tr><th> Enter CrCV </th>
<td><input id="CrCV" onchange="edgeRetention() ;"</td></tr>
<tr><th> Enter MC </th>
<td><input id="MC" onchange="edgeRetention() ;"</td></tr>
<tr><th> Enter M6C </th>
<td><input id="M6C" onchange="edgeRetention() ;"</td></tr>
<tr><th> Enter MN </th>
<td><input id="MN" onchange="edgeRetention() ;"</td></tr>
<tr><th> Enter CrN </th>
<td><input id="CrN" onchange="edgeRetention() ;"</td></tr>
<tr><th> Enter Fe3C6 </th>
<td><input id="Fe3C6" onchange="edgeRetention() ;"</td></tr>
<!-- <tr><th> ------------------------- </th></tr> -->
<table id="example" class="display" width="100%"></table>
<form name="demoForm">
<!--
-->
<h0> V-Sharp-Angle </h1>
Select Measure Angle, Elevation of Sharpmaker, Rotation of Sharpmaker, Pass Count
<select name="demoSelect" onchange="menuChoice() ">
<option value="zilch">Select:</option>
<option value="A">Measure Angle</option>
<option value="B">Elevation of Sharpmaker</option>
<option value="C">Rotation of Sharpmaker</option>
<option value="D">Pass Count</option>
<option value="E">Display Steels</option>
<option value="F">TCC Edge Retention</option>
</select>
</form>
<p id="firstP">
<p id="secondP">
<p id="thirdP">
<script>
function menuChoice() {
var theSelect = demoForm.demoSelect;
var firstP = document.getElementById('firstP' ) ;
// var secondP = document.getElementById('secondP');
// var thirdP = document.getElementById('thirdP');
// firstP.innerHTML = ('This option\'s index number is: ' + theSelect.selectedIndex);
// secondP.innerHTML = ('Its value is: ' + theSelect[theSelect.selectedIndex].value);
// thirdP.innerHTML = ('Its text is: ' + theSelect[theSelect.selectedIndex].text);
// var optionChoice = document.getElementById('secondP');
var optionChoice = theSelect.selectedIndex;
switch (optionChoice) {
case 1:
//document.write("Run Measure Angle");
measureAngle() ;
break;
case 2:
//document.write("Run Sharpmaker Elevation");
sharpmakerElevation() ;
break;CrC
case 3:
//document.write("Run Sharpmaker Rotation");
sharpmakerRotation() ;
break;
case 4:
//document.write("Pass Count");
passCount() ;
break;
case 5:
steelTable() ;
break;
case 6:
edgeRetention();
break;
default:
alert("Please Choose a Selection" ) ;
break;
}
}
function measureAngle() {
//alert("Run Measure Angle");
var width = document.getElementById("width" ) ;
var height = document.getElementById("height" ) ;
var ans;
var ang;
ans = (((width.value)/2)/height.value ) ;
ang = asin(ans ) ;
alert(Math.floor(rad2deg(ang)) + " - DPS" ) ;
}
function sharpmakerElevation() {
//alert("Run Sharpmaker Elevation");
var desiredAngle = document.getElementById("desiredAngle" ) ;
var sharpenerAngle = document.getElementById("sharpenerAngle" ) ;
var deg;
deg = ((desiredAngle.value - sharpenerAngle.value) * (0.125) ) ;
alert(deg) ;
}
function sharpmakerRotation() {
edgeAngle
//alert("Run Sharpmaker Rotation");
var rotationAngle = document.getElementById("rotationAngle" ) ;
var rotationSharpener = document.getElementById("rotationSharpener" ) ;
var deg = rad2deg(acos(dcsc(rotationSharpener.value)*dsin(rotationAngle.value)) ) ;
alert(Math.floor(deg)) ;
}
function passCount() {
//alert("Run Pass Count");
var x;
var y;
var total;
var xStrokes;
var startingNedgeAngleumber;
var numberOfPasses = document.getElementById("numberOfPasses" )
y = (numberOfPasses.value / 10 ) + 1;
x = (numberOfPasses.value * y ) ;
startingNumber = (numberOfPasses.value * 2 ) ;
total = ( x + 2 ) + startingNumber;
xStrokes = total * 2;
//console.log(xCrC);
//console.log(y);
//console.log(startingNumber);
//console.log(total);
alert(total) ;
}edgeAngle
function edgeRetention() {
var hardness;
var edgeAngle;
var CrC;
var CrCV;
var MC;
var M6C;
var MN;
var CrN;
var Fe3C6;
hardness = document.getElementById("Hardness" )
edgeAngle = document.getElementById("edgeAngle" )
CrC = document.getElementById("CrC" )
CrCV = document.getElementById("CrCV" )
MC = document.getElementById("MC" )
M6C = document.getElementById("M6C")
MN = document.getElementById("MN")
CrN = document.getElementById("CrN" )
Fe3C6 = document.getElementById("Fe3C6" )
var temp1 = (( -157 ) + (( 15.8 ) * (hardness)));
var TCC = (( -157 ) + (( 15.8 ) * ( hardness.value)) - (( 17.8 ) * ( edgeAngle.value )) + ((11.2) * (CrC.value)) + ( (14.6) * ( CrCV.value )) +((26.2) * (MC.value)) + ((9.5) * (M6C.value)) + ((20.9) * (MN.value)) + ((19.4) * (CrN.value)) + ((5.0) * (Fe3C6.value))) ;
//alert(TCC);
//alert(( -157 ) + (( 15.8 ) * ( hardness )) - (( 17.8 ) * ( edgeAngle )) + ((11.2) * (CrC)) + ( (14.6) * ( CrCV )) +((26.2) * (MC)) + ((9.5) * (M6C)) + ((20.9) * (MN)) + ((19.4) * (CrN)) + ((5.0) * (Fe3C6)))
//alert(hardness, edgeAngle, CrC, CrCV, MC, M6C, MN, CrN, Fe3C6) ;
//dOut(hardness);
//dOut(TCC);
alert(TCC);
}
function deg2rad(deg) {
return deg * Math.PI / 180;
}
function rad2deg(deg) {
return deg / (Math.PI / 180 ) ;
}
function dcos(deg) {
return Math.cos(deg * Math.PI / 180 ) ;
}
function dsin(deg) {
return Math.sin(deg * Math.PI / 180 ) ;
}
function asin(ans) {
return Math.asin(ans ) ;
}
function acos(ans) {
return Math.acos(ans ) ;
}
function dcsc(deg){
return 1/Math.sin(deg2rad(deg) ) ;
}
function dOut() {
$('#debuggerytextarea').append(Array.from(arguments) ) ;
return;
}
function CosOut(R) {
dOut('COS(R=', R, ') = ', dcos(R) ) ;
}
function SinOut(D, A) {
dOut('SIN(D=', D,
') / SIN(A=', A,
') = ', ( dsin(D) / dsin(A) )
);
}
function steelTable(){
var dataSet = [
["CPM M4", "-", "-", "-5.5-", "-5-", "-", "-", "-"],
["410", "-3-", "-", "-", "-", "-", "-", "-"],
["420", "-3-", "-", "-", "-", "-", "-","-"],
["AEB-L","-6-","-","-","-","-","-","-"],
["440C","-12-","-","-","-","-","-","-"],
["D2","-15.5-","-","-","-","-","-","-"],
["154CM","-17.5-","-","-","-","-","-","-"],
["ATS34","-17.5-","-","-","-","-","-","-"],
["CPM154","-17.5-","-","-","-","-","-","-"],
["ZDP-189","-36-","-","-","-","-","-","-"],
["Cruwear","-","-5.9-","-3.4-","-","-","-","-"],
["S35VN","-","-10.5","-3.5-","-","-","-","-"],
["BD 30P","-","-10.5-","-4-","-","-","-","-"],
["S30V","-","-10.5-","-4-","-","-","-","-"],
["S90V","-","-13-","-9-","-","-","-","-"],
["CTS 20CP","-","-13-","-9-","-","-","-","-"],
["S125V","-","-16","-12.5-","-","-","-","-"],
["BG42","-","-16-","-","-","-","-","-"],
["Elmax","-","-16","-2-","-","-","-","-"],
["20CV","-","-17.5-","-2.5-","-","-","-","-"],
["CTS-204P","-","-17.5-","-2.5-","-","-","-","-"],
["S60V","-","-21.5-","-2.1-","-","-","-","-"],
["Vanax 35","-","-","-","-","-9-","-","-"],
["Cronidur 30","-","-","-","-","-","-4.5-","-"],
["3V","-","-","-5.1","-","-","-","-","-"],
["Vandis 4E","-","-","-8.2-","-","-","-","-"],
["N690","-16-","-","-","-","-","-","-"],
["Rex 45","-","-","-2.5-","-5.3-","-","-","-"],
["5160","-","-","-","-","-","-","-0-"],
["1095","-","-","-","-","-","-","-3-"],
["O1","-","-","-","-","-","-","-3-"],
["O2","-","-","-","-","-","-","-3-"],
["52100","-","-","-","-","-","-","-6-"],
["File Steel","-","-","-","-","-","-","-6-"],
["A2","-6-","-","-","-","-","-","-"],
["19C27","-8-","-","-","-","-","-","-"],
["Niolox","-8-","-1-","-","-","-","-","-"],
["XHP/440V","-22-","-","-","-","-","-","-"],
["D7","-34-","-","-","-","-","-","-"],
["K190","-","-20-","-3-","-","-","-","-"],
["Vandis 8","-","-","-15-","-","-","-","-"],
["10V","-","-","-17.5","-","-","-","-"],
["Vanax","-","-","-","-","-13-","-","-"],
["15V","-","-","-23-","-","-","-","-"],
["Rex 121","-","-","-24.5-","-6-","-","-","-"],
];
$(document).ready(function() {
$('#example').DataTable( {
data: dataSet,
columns: [
{ title: "Steel" },
{ title: "CrC" },
{ title: "CrV" },
{ title: "MC" },
{ title: "M6C" },
{ title: "MN" },
{ title: "CrN" },
{ title: "FeC" }
]
} );
} );
}
// function Steels() {
// alert(' Steel| CrC | CrV | MC | M6C | MN | CrN | FeC | CPM M4 | - | - | 5.5 | 5 | - | - | - | 410 | 3 | - | - | - | - | - | - | 420 | 3 | - | - | - | - | - | - | AEB-L | 6 | - | - | - | - | - | - | DC53 | 8 | - | - | - | - | - | - | 440A | 10 | - | - | - | - | - | - | 440C | 12 | - | - | - | - | - | - | D2 | 15.5 | - | - | - | - | - | - | 154CM | 17.5 | - | - | - | - | - | - | ATS34 | 17.5 | - | - | - | - | - | - | CPM154 | 17.5 | - | - | - | - | - | - | ZDP-189 | 36 | - | - | - | - | - | - | Cruwear | - | 5.9 | 3.4 | - | - | - | - | S35VN | - | 10.5 | 3.5 | - | - | - | - | BD-30P | - | 10.5 | 4 | - | - | - | - | S30V | - | 10.5 | 4 | - | - | - | - | S45VN | - | 12.6 | 2.6 | - | - | - | - | S90V | - | 13 | 9 | - | - | - | - | CTS 20CP | - | 13 | 9 | - | - | - | - | S125V | - | 16 | 12.5 | - | - | - | - | BG42 | - | 16 | - | - | - | - | - Elmax | - | 16 | 2 | - | - | - | - | ');
// alert(' Steel| CrC | CrV | MC | M6C | MN | CrN | FeC | 20CV | - | 17.5 | 2.5 | - | - | - | - | CTS-204P | - | 17.5 | 2.5 | - | - | - | - | S60V | - | 21.5 | 2.1 | - | - | Vanax 35 | - | - | - | - | 9 | - | - | Cronidur 30| - | - | - | - | - | 4.5 | - | 3V | - | - | 5.1 | - | - | - | - | Vandis 4E | - | - | 8.2 | - | - | - | - | N690 | 16 | - | - | - | - | - | - | Rex 45 | - | - | 2.5 | 5.3 | - | - | - | 5160 | - | - | - | - | - | - | 0 | 1095 | - | - | - | - | - | - | 3 | O1 | - | - | - | - | - | - | 3 | O2 | - | - | - | - | - | - | 3 | 52100 | - | - | - | - | - | - | 6 | File Steel | - | - | - | - | - | - | 6 | A2 | 6 | - | - | - | - | - | - | 19C27 | 8 | - | - | - | - | - | - | Niolox | 8 | 1 | - | - | - | - | - | XHP/440V | 22 | - | - | - | - | - | - | D7 | 24 | - | - | - | - | - | - | K190 | - | 20 | 3 | - | - | - | - | ')
// alert(' Steel| CrC | CrV | MC | M6C | MN | CrN | FeC | Vandis 8 | - | - | 15 | - | - | - | - | 10V | - | - | 17.5 | - | - | - | - | Vanax | - | - | - | - | 13 | - | - | Nitrobe77 | - | - | - | - | 2 | 4 | - | 15V | - | - | 23 | - | - | - | - | Rex 121 | - | - | 24.5 | 6 | - | - | - | Steel | CrC | CrV | MC | M6C | MN | CrN | FeC | ' );
</script>
</body>
</html>