-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSteelWeightCalculator.html
284 lines (227 loc) · 13.1 KB
/
SteelWeightCalculator.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
<html>
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script src="common.js"></script>
<link href="common.css" rel="stylesheet" />
<style>
.bg-light {
background-color: #521307!important;
}
.cmnLink{
color: white !important;
text-transform: capitalize !important;
border: 1px solid darkred !important;
margin-left: 5px !important;
}
.navbar-toggler-icon {
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255,102,203, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 8h24M4 16h24M4 24h24'/%3E%3C/svg%3E") !important;
}
</style>
</head>
<body onload="Load()">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="#">
<span style="color: white;font-family: auto;text-shadow: 2px 0px cyan;font-size: 25px;">
<!-- W -->
</span>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon">
<i class="fas fa-bars" style="color:#fff; font-size:28px;"></i> </span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<!-- <ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link cmnLink" href="/Cement Calculation/CementConcreteCalculator.html">Cement Concrete <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link cmnLink" href="/Cement Calculation/PlasteringCalculator.html">Plastering <span class="sr-only"></span></a>
</li>
</ul> -->
</div>
</nav>
<script>
function FormReset(){
document.getElementById("myForm").reset();
}
function Load() {
Calculate();
}
var steelInkg = 0;
var WetVolumeofMixValue = 0;
var meter_cube_feet_cube = 0;
var unit =0;
var DryVolumeOfMortar = 0;
var GradeRatio = 0;
var CementinKgValue = 0;
var SandinTonValue = 0;
var GradeRatioVolume = 0;
var sandKG = 0;
var multiplyValue = 0;
function Calculate(){
unit = document.getElementById("unit").value;
if(INCHCMValidationSteel(unit) == true){
var conversition = 0;
if(unit == "1"){
conversition = 12;
SetLabelName("Feet","Inch");
}
if(unit == "2"){
conversition = 100;
SetLabelName("Meter","CM");
}
CementConcreteVolume(conversition);
}
}
function UnitChange(){
Calculate();
}
function CementConcreteVolume(conversition)
{
//(length*width*depth)
var Diameter = document.getElementById("Diameter").value;
var length = document.getElementById("length").value;
var length2 = document.getElementById("length2").value;
var Quantity = document.getElementById("Quantity").value;
Diameter = Diameter == ""?0:Diameter;
length = length == ""?0:length;
Quantity = Quantity == ""?0:Quantity;
Diameter = parseFloat(Diameter);
length = parseFloat(length);
length2 = parseFloat(length2);
Quantity = parseFloat(Quantity);
if(length == NaN){
alert("parsing failed");
return;
}
else{
if(isNaN(length2)){
length2 =0;
}
else{
length2 = length2/conversition;
}
var unit = document.getElementById("unit").value;
if(unit == "1"){
var feetToMeter = ((length+length2)/3.281);
steelInkg = (((Diameter*Diameter)/162.28)*(feetToMeter*Quantity));
document.getElementById("totalFeetCube").textContent=steelInkg.toFixed(4)+" Kgs";
var steelInTon = (steelInkg/1000);
document.getElementById("totalMeterCube").textContent=steelInTon.toFixed(4) +" Tons";
}if(unit == "2"){
steelInkg= ((Diameter*Diameter/162.28)*((length)*Quantity));
var steelInTon = (steelInkg/1000);
document.getElementById("totalFeetCube").textContent = steelInTon.toFixed(4) +" Tons";
document.getElementById("totalMeterCube").textContent = steelInkg.toFixed(4)+" Kgs";
}
}
}
function SetLabelName(label1Value, label2Value){
debugger
document.getElementById("label1").textContent = label1Value;
document.getElementById("label2").textContent = label2Value;
}
</script>
<!-- <div class="jumbotron" style="border-radius: 0;padding: 1rem 4rem !important; text-align: center; background: darkred; color: white; text-transform: capitalize;">
<h5 class="">civil-engineering-calculators!</h5>
</div> -->
<div class="row" style="margin-top: 15px; margin-left: 10px;margin-right: 10px;">
<div class="col-lg-5">
<div class="card">
<div style="padding: 10px; background: lavenderblush;">
<h6>Steel Weight Calculation</h6>
</div>
<div class="card-body">
<form id="myForm">
<div class="form-group row">
<label for="inputEmail3" class="col-sm-4 col-form-label">Unit</label>
<div class="col-sm-8">
<select onchange="UnitChange()" class="custom-select" id="unit">
<option>Please Select</option>
<option selected value="1">Feet/Inch</option>
<option value="2">Meter/CM</option>
</select>
</div>
</div>
<div class="form-group row">
<label for="inputPassword3" class="col-sm-4 col-form-label">Diameter </label>
<div class="col-sm-8">
<div class="input-group mb-3">
<input type="text" id="Diameter" value="2" class="form-control" placeholder="0" aria-label="0" aria-describedby="basic-addon2">
<div class="input-group-append">
<span class="input-group-text" id="labelDiameter">mm</span>
</div>
</div>
</div>
</div>
<div class="form-group row">
<label for="inputPassword3" class="col-sm-4 col-form-label">Length </label>
<div class="col-sm-4">
<div class="input-group mb-3">
<input type="text" id="length" value="15" class="form-control" placeholder="0" aria-label="0" aria-describedby="basic-addon2">
<div class="input-group-append">
<span class="input-group-text" id="label1"></span>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="input-group mb-3">
<input type="text" id="length2" class="form-control" placeholder="0" aria-label="0" aria-describedby="basic-addon2">
<div class="input-group-append">
<span class="input-group-text" id="label2"></span>
</div>
</div>
</div>
</div>
<div class="form-group row">
<label for="inputPassword3" class="col-sm-4 col-form-label">Quantity </label>
<div class="col-sm-8">
<input type="text" id="Quantity" value="1" class="form-control" placeholder="0" aria-label="0" aria-describedby="basic-addon2">
</div>
</div>
<div class="form-group row" style="text-align: right;">
<div class="col-sm-12 pull-right">
<button style="background-color: darkred !important;color: white;" type="button" class="btn" onclick="Calculate()">Calculate</button>
<button type="submit" onclick="FormReset()" class="btn btn-primary pull-right">Reset</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="card">
<div style="padding: 10px; background: #f1edef;">
<h6>Weight of steel in kgs/Tons</h6>
</div>
<div class="card-body" style="padding: 0 !important;">
<div style="padding: 10px;">
<div>
<span id="totalMeterCube">
</span>
</div>
<hr/>
<div>
<span id="totalFeetCube">
</span>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="card">
<div style="padding: 10px; background: #f1edef;">
<h6 class="Disclaimer">Disclaimer</h6>
</div>
<div class="card-body Disclaimer" style="padding: 10px !important;">
The weights calculated on this steel weight calculator page are for guidance only. They are calculated using average densities for the materials. The exact composition of the material will affect the weight of the actual piece.
</div>
</div>
</div>
</div>
</body>
</html>