расчет фундамента для строительного сайта. Делал себе калькулятор для расчета материалов для фундамента, но я думаю для строительного сайта такой калькулятор идеально подходит. Точность расчетов возможно не идеально, это коэффициенты подогнать надо, кому надо
<script>
function calculateFoundation() {
const L = parseFloat(document.getElementById('length').value) || 0;
const W = parseFloat(document.getElementById('width').value) || 0;
const H = parseFloat(document.getElementById('height').value) || 0;
const C = parseFloat(document.getElementById('cushion').value) || 0;
const rebarD = parseFloat(document.getElementById('rebarD').value) || 12;
const stirrupStep = parseFloat(document.getElementById('stirrupStep').value) || 40;
if (L <= 0 || W <= 0 || H <= 0) {
alert("Проверьте введённые данные.");
return;
}
// Бетон (м³)
const concrete = (L * (W / 100) * (H / 100)).toFixed(1);
// Основная арматура: 4 прута (2 сверху, 2 снизу)
const mainRebarMeters = L * 4;
// Настил каждые 6 м → нахлёст 0.5 м
const laps = Math.floor(L / 6);
const lapLength = laps * 0.5 * 4; // 4 прута
const totalRebar = (mainRebarMeters + lapLength).toFixed(0);
// Хомуты
const stirrupCount = Math.ceil(L / (stirrupStep / 100));
// Периметр хомута (с защитным слоем 5 см)
const stirrupWidth = (W - 10) / 100;
const stirrupHeight = (H - 10) / 100;
const stirrupPerimeter = 2 * (stirrupWidth + stirrupHeight);
const stirrupTotalMeters = (stirrupCount * stirrupPerimeter).toFixed(1);
// Опалубка — 2 стены по высоте
const formworkArea = (2 * L * (H / 100)).toFixed(1); // м²
// Доска 25×150×6000 мм = 0.0225 м³ → площадь 0.9 м² на доску
const boards = Math.ceil(formworkArea / 0.9);
// ПГС-подушка
const cushionVol = (L * (W / 100) * (C / 100)).toFixed(1);
// Вязальная проволока: ~0.3 м на соединение, 2 соединения на хомут
const wireMeters = Math.ceil(stirrupCount * 2 * 0.4); // с запасом
const resultText = `
<div>• <strong>Бетон М250–М300</strong>: ${concrete} м³</div>
<div>• <strong>Арматура Ø${rebarD} мм</strong>: ~${totalRebar} пог. м (с учётом нахлёстов)</div>
<div>• <strong>Хомуты Ø8 мм</strong>: ~${stirrupCount} шт (или ${stirrupTotalMeters} пог. м)</div>
<div>• <strong>Опалубка (доска 25 мм)</strong>: ${formworkArea} м² → ~${boards} досок (6 м длиной)</div>
<div>• <strong>ПГС-подушка</strong>: ${cushionVol} м³</div>
<div>• <strong>Вязальная проволока</strong>: ~${wireMeters} м</div>
`;
document.getElementById('resultText').innerHTML = resultText;
document.getElementById('result').style.display = 'block';
}
</script>
<h3>🔢 Калькулятор ленточного фундамента</h3>
<div id="foundationCalc" style="
background: #252525;
border: 1px solid #444;
border-radius: 10px;
padding: 20px;
margin: 30px 0;
color: #e0e0e0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
max-width: 700px;
margin-left: auto;
margin-right: auto;
">
<h3 style="margin-top: 0; color: #4fc3f7;">🧱 Калькулятор материалов: ленточный фундамент</h3>
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; font-size: 14px;">
<div>
<label>Длина ленты (пог. м):<br>
<input type="number" id="length" value="30" min="1" step="0.1" style="width:100%; padding:6px; background:#333; color:#fff; border:1px solid #555; border-radius:4px;">
</label>
</div>
<div>
<label>Ширина фундамента (см):<br>
<input type="number" id="width" value="40" min="20" max="100" step="5" style="width:100%; padding:6px; background:#333; color:#fff; border:1px solid #555; border-radius:4px;">
</label>
</div>
<div>
<label>Высота фундамента (см):<br>
<input type="number" id="height" value="120" min="30" max="200" step="10" style="width:100%; padding:6px; background:#333; color:#fff; border:1px solid #555; border-radius:4px;">
</label>
</div>
<div>
<label>Глубина подушки (см):<br>
<input type="number" id="cushion" value="15" min="10" max="30" step="5" style="width:100%; padding:6px; background:#333; color:#fff; border:1px solid #555; border-radius:4px;">
</label>
</div>
<div>
<label>Диаметр арматуры (мм):<br>
<select id="rebarD" style="width:100%; padding:6px; background:#333; color:#fff; border:1px solid #555; border-radius:4px;">
<option value="10">10 мм</option>
<option value="12" selected>12 мм</option>
<option value="14">14 мм</option>
<option value="16">16 мм</option>
</select>
</label>
</div>
<div>
<label>Шаг хомутов (см):<br>
<input type="number" id="stirrupStep" value="40" min="20" max="60" step="10" style="width:100%; padding:6px; background:#333; color:#fff; border:1px solid #555; border-radius:4px;">
</label>
</div>
</div>
<button onclick="calculateFoundation()" style="
background: #1976d2;
color: white;
border: none;
padding: 10px 16px;
border-radius: 6px;
cursor: pointer;
font-weight: 600;
width: 100%;
transition: background 0.2s;
" onmouseover="this.style.background='#1565c0'" onmouseout="this.style.background='#1976d2'">
Рассчитать материалы
</button>
<div id="result" style="margin-top: 20px; display: none;">
<h4 style="color: #81c784; margin-bottom: 12px;">✅ Вам понадобится:</h4>
<div id="resultText" style="font-size: 14px; line-height: 1.5;"></div>
<p style="font-size: 12px; color: #aaa; margin-top: 16px;">
💡 Умножьте объёмы на актуальные цены в вашем регионе — и получите реальную смету.
</p>
</div>
Комментарии
Пока нет комментариев. Будьте первым!