Single place to convert your 2D floor plans to 3d model (no LLM)
Python
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Quantities</title>
<link rel="stylesheet" href="/web/style.css?v=2">
<style>
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 20px 0 8px; }
.cards div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.cards b { display: block; font-size: 20px; }
.cards span { color: var(--muted); font-size: 13px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 28px 0 8px; }
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 14px; }
th, td { text-align: left; padding: 8px 12px; border-top: 1px solid var(--line); }
th { border-top: 0; font-size: 12px; color: var(--muted); font-weight: 600; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media print { .brand, #print { display: none; } .wrap { padding-top: 0; } body { background: #fff; } }
</style>
</head>
<body class="home">
<main class="wrap" style="max-width:900px">
<p class="brand"><a href="/" style="color:inherit;text-decoration:none">PlanTo3D</a> · <a href="/">Home</a></p>
<h1 id="title">Quantities</h1>
<p class="muted" id="sub">Loading…</p>
<button class="btn ghost" id="print" type="button">Print or save as PDF</button>
<div class="cards" id="cards"></div>
<h2>Floor finishes</h2><table id="finishes"></table>
<h2>Rooms</h2><table id="rooms"></table>
<h2>Doors and windows</h2><table id="openings"></table>
<h2>Furniture</h2><table id="furniture"></table>
<p class="muted" style="font-size:13px;margin-top:20px">Measured from the plan as it is saved now. Areas are inside the walls.
Wall paint and tiles leave out doors and windows; toilets are tiled to 7 ft and painted above. No allowance for waste or cutting.</p>
</main>
<script>
const $ = (id) => document.getElementById(id);
const job = new URLSearchParams(location.search).get('job');
const M2 = 0.09290304;
const area = (ft2) => `${(ft2 * M2).toFixed(1)} m² · ${Math.round(ft2)} sq ft`;
const ftin = (ft) => { const i = Math.round(ft * 12); return `${Math.floor(i / 12)}'${i % 12}"`; };
const NAMES = { bathtile: 'Bathroom tiles', tile: 'Tiles', turf: 'Grass', stair: 'Stair granite' };
const finish = (n) => NAMES[n] || n[0].toUpperCase() + n.slice(1);
// rows of text cells (textContent: room names come from the drawing); a cell starting with '#' is a number column
function table(id, head, rows) {
const tr = (cells, tag) => {
const r = document.createElement('tr');
for (const c of cells) {
const e = document.createElement(tag), num = String(c).startsWith('#');
e.textContent = num ? String(c).slice(1) : c;
if (num) e.className = 'n';
r.append(e);
}
return r;
};
$(id).replaceChildren(tr(head, 'th'), ...(rows.length ? rows : [['None']]).map((r) => tr(r, 'td')));
}
(async () => {
const [q, st] = await Promise.all([fetch(`/api/jobs/${job}/quantities`).then((r) => r.json()), fetch(`/api/jobs/${job}`).then((r) => r.json())]);
if (q.error) { $('sub').textContent = q.error; return; }
if (st.name) { $('title').textContent = `Quantities · ${st.name}`; document.title = `Quantities · ${st.name}`; }
$('sub').textContent = `${q.floors.length} floor${q.floors.length > 1 ? 's' : ''} · walls ${ftin(q.floor_height)} high`;
const floor = Object.values(q.finishes).reduce((a, b) => a + b, 0);
$('cards').replaceChildren(...[['Floor area', floor], ['Wall paint', q.paint], ['Ceiling paint', q.ceiling], ['Toilet wall tiles', q.tiles]]
.map(([t, v]) => { const d = document.createElement('div'); d.append(Object.assign(document.createElement('span'), { textContent: t }),
Object.assign(document.createElement('b'), { textContent: `${(v * M2).toFixed(1)} m²` }),
Object.assign(document.createElement('span'), { textContent: `${Math.round(v)} sq ft` })); return d; }));
table('finishes', ['Finish', '#Area'], Object.entries(q.finishes).map(([n, a]) => [finish(n), '#' + area(a)]));
const many = q.floors.length > 1;
table('rooms', [...(many ? ['Floor'] : []), 'Room', 'Floor finish', '#Floor', '#Wall paint', '#Wall tiles'],
q.floors.flatMap((f) => f.rooms.map((r) => [...(many ? [f.name] : []), r.name, finish(r.finish), '#' + area(r.area),
'#' + (r.paint ? area(r.paint) : '–'), '#' + (r.tiles ? area(r.tiles) : '–')])));
table('openings', ['Type', '#Width', '#Height', '#Count'], q.openings.map((o) =>
[finish(o.type), `#${ftin(o.width)} · ${(o.width * 0.3048).toFixed(2)} m`, `#${ftin(o.height)} · ${(o.height * 0.3048).toFixed(2)} m`, '#' + o.count]));
table('furniture', ['Item', '#Count'], q.furniture.map((f) => [f.name, '#' + f.count]));
})().catch(() => { $('sub').textContent = 'The quantities could not be loaded.'; });
$('print').onclick = () => print();
</script>
</body>
</html>