Tectum v0.4.0 — mijlpaal gevelopbouw

Configurator voor Van Emous Mantelzorgwoningen: wanden, vloeren, units,
woningen (L-vorm), plat dak met dakrand, buitenverlichting, latwerk op
vochtdoek, trasraam, sandwichpanelen en PDF-tekenbladen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Machiel
2026-09-30 11:38:54 +02:00
co-authored by Claude Opus 5.5
commit c690e72d13
36 changed files with 9954 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
/*!
* Tectum
* Copyright © 2026 Machiel Heinen.
* Alle rechten voorbehouden. Gebruik uitsluitend met schriftelijke toestemming.
* Zie LICENTIE.md.
*/
// ============================================================
// core/canvas-labels.js — gedeelde stijl voor maat-labels in de 2D-canvassen
// (blauwe maatlijn + "X: 6000mm"-tekst, zoals het wand-vooraanzicht). Gebruikt
// door wand, vloer en unit, zodat alle labels er hetzelfde uitzien.
// Plain script (geen ES-module).
// ============================================================
const CANVAS_LABEL_COLOR = '#4da6ff';
// Tekent een maatlijn van (x1,y1) naar (x2,y2) plus tekst op (textX,textY).
// Een verticale lijn (x1 === x2) krijgt de tekst 90° gedraaid.
function drawCanvasDim(ctx, x1, y1, x2, y2, text, textX, textY) {
ctx.save();
ctx.strokeStyle = CANVAS_LABEL_COLOR;
ctx.fillStyle = CANVAS_LABEL_COLOR;
ctx.lineWidth = 1;
ctx.setLineDash([]);
ctx.font = '10px sans-serif';
ctx.textAlign = 'center';
ctx.textBaseline = 'alphabetic';
ctx.beginPath();
ctx.moveTo(x1, y1);
ctx.lineTo(x2, y2);
ctx.stroke();
if (Math.abs(x1 - x2) < 0.5 && Math.abs(y1 - y2) >= 0.5) {
ctx.translate(textX, textY);
ctx.rotate(-Math.PI / 2);
ctx.fillText(text, 0, 0);
} else {
ctx.fillText(text, textX, textY);
}
ctx.restore();
}