[140] Merge: Plandarstellung – Strichstärken-Rangfolge je Massstab, Symbole, Bemassung, Höhenlinien, Silhouette
This commit is contained in:
39 files changed
+492
-209
No files matched your search
@@ -6,4 +6,4 @@ polygon 1541
|
||||
rect 1
|
||||
svg 1
|
||||
text 4
|
||||
hash 99e90b8d7e720074
|
||||
hash 13c462eddf903040
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -4 0 23 18
|
||||
bytes 335733
|
||||
bytes 335698
|
||||
circle 14
|
||||
line 3490
|
||||
path 7
|
||||
@@ -7,4 +7,4 @@ polygon 84
|
||||
rect 1
|
||||
svg 1
|
||||
text 36
|
||||
hash ee49c09d752ec831
|
||||
hash b88ec245a30ce2f3
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -4 0 23 18
|
||||
bytes 339126
|
||||
bytes 339174
|
||||
circle 14
|
||||
line 3490
|
||||
path 7
|
||||
@@ -7,4 +7,4 @@ polygon 84
|
||||
rect 1
|
||||
svg 1
|
||||
text 36
|
||||
hash 6d7a49d4aa11cf99
|
||||
hash 24505c31de657c2a
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -41.5 0 95 63.6
|
||||
bytes 147364
|
||||
bytes 147365
|
||||
circle 16
|
||||
line 832
|
||||
path 68
|
||||
@@ -7,4 +7,4 @@ polygon 257
|
||||
rect 1
|
||||
svg 1
|
||||
text 121
|
||||
hash 45e68ce965a49c5d
|
||||
hash 6adf8da2a695b17a
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -41.5 0 95 63.6
|
||||
bytes 147796
|
||||
bytes 147696
|
||||
circle 16
|
||||
line 832
|
||||
path 68
|
||||
@@ -7,4 +7,4 @@ polygon 257
|
||||
rect 1
|
||||
svg 1
|
||||
text 121
|
||||
hash dea353f151ea1cc1
|
||||
hash c61e13454d30ac4f
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -4.055 0 25.109 23.11
|
||||
bytes 413037
|
||||
bytes 412951
|
||||
circle 14
|
||||
line 4009
|
||||
path 40
|
||||
@@ -7,4 +7,4 @@ polygon 226
|
||||
rect 1
|
||||
svg 1
|
||||
text 91
|
||||
hash 7d43d37dc2df5f36
|
||||
hash 95b660dfdb89c295
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -4.055 0 25.109 23.11
|
||||
bytes 416536
|
||||
bytes 416599
|
||||
circle 14
|
||||
line 4009
|
||||
path 40
|
||||
@@ -7,4 +7,4 @@ polygon 226
|
||||
rect 1
|
||||
svg 1
|
||||
text 91
|
||||
hash 63761ac76b26d6f6
|
||||
hash 5a80b44538371ebc
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -10.004 0 31.058 26.958
|
||||
bytes 83162
|
||||
bytes 83175
|
||||
circle 14
|
||||
line 481
|
||||
path 30
|
||||
@@ -7,4 +7,4 @@ polygon 107
|
||||
rect 1
|
||||
svg 1
|
||||
text 75
|
||||
hash 53f7fc8b03f80857
|
||||
hash 04995fa4a25c1dce
|
||||
@@ -1,5 +1,5 @@
|
||||
viewBox -10.004 0 31.058 26.958
|
||||
bytes 83325
|
||||
bytes 83420
|
||||
circle 14
|
||||
line 481
|
||||
path 30
|
||||
@@ -7,4 +7,4 @@ polygon 107
|
||||
rect 1
|
||||
svg 1
|
||||
text 75
|
||||
hash 46946bd19183e627
|
||||
hash 8debbdbb59223894
|
||||
@@ -1,9 +1,9 @@
|
||||
viewBox 4.457 0 21.343 17.778
|
||||
bytes 45659
|
||||
bytes 65056
|
||||
circle 3
|
||||
line 161
|
||||
line 376
|
||||
polygon 168
|
||||
rect 1
|
||||
svg 1
|
||||
text 3
|
||||
hash 4c4a94713688309d
|
||||
hash 85215eea3c7d1169
|
||||
@@ -4,4 +4,4 @@ line 31
|
||||
polygon 42
|
||||
rect 1
|
||||
svg 1
|
||||
hash c9caba6eee20fbd9
|
||||
hash 4b1f6e5269c6c321
|
||||
@@ -1,9 +1,9 @@
|
||||
viewBox -0.672 0 6.345 5.345
|
||||
bytes 15919
|
||||
bytes 15907
|
||||
line 67
|
||||
path 8
|
||||
polygon 61
|
||||
rect 1
|
||||
svg 1
|
||||
text 7
|
||||
hash 97bd11bea3bf9d08
|
||||
hash ad8766ed45e2dec9
|
||||
@@ -6,4 +6,4 @@ polygon 61
|
||||
rect 1
|
||||
svg 1
|
||||
text 7
|
||||
hash 7dfca568eb0b0d41
|
||||
hash 10fc1ef5859d46d9
|
||||
@@ -1,9 +1,9 @@
|
||||
viewBox -0.9 0 6.8 5.8
|
||||
bytes 7485
|
||||
bytes 7481
|
||||
line 35
|
||||
path 4
|
||||
polygon 23
|
||||
rect 1
|
||||
svg 1
|
||||
text 4
|
||||
hash b27877c94cb8dbfb
|
||||
hash 0b855c965139033b
|
||||
@@ -6,4 +6,4 @@ polygon 23
|
||||
rect 1
|
||||
svg 1
|
||||
text 4
|
||||
hash d614790cd50f9817
|
||||
hash 631f36b943fff8e6
|
||||
@@ -1,7 +1,7 @@
|
||||
viewBox 0.1 0 6.8 7.586
|
||||
bytes 7590
|
||||
line 35
|
||||
bytes 9686
|
||||
line 59
|
||||
polygon 31
|
||||
rect 1
|
||||
svg 1
|
||||
hash 58399ffc23652b9f
|
||||
hash 1626fed816bbf55f
|
||||
@@ -633,8 +633,8 @@ describe("2D-Zeichnung — Bemassung: Papier-mm statt Modellmass", () => {
|
||||
const lens = out
|
||||
.filter((p) => p.kind === "line")
|
||||
.map((p) => (p.kind === "line" ? Math.hypot(p.b.x - p.a.x, p.b.y - p.a.y) : 0));
|
||||
// Default 3 mm bei 1:50 = 0.15 m (der frühere feste Modellwert).
|
||||
expect(Math.min(...lens)).toBeCloseTo(0.15, 9);
|
||||
// Default 2 mm bei 1:50 = 0.1 m ([140], vorher 3 mm).
|
||||
expect(Math.min(...lens)).toBeCloseTo(0.1, 9);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -134,11 +134,11 @@ describe("generatePlan — Schichtfugen als stilisierbare Linien", () => {
|
||||
expect(joints[0].dash ?? null).toBeNull();
|
||||
});
|
||||
|
||||
it("fällt ohne Zuweisung auf die Haarlinie (0.02 mm) in Wandfarbe zurück", () => {
|
||||
it("fällt ohne Zuweisung auf die feine Fuge (0.09 mm, [140]) in Wandfarbe zurück", () => {
|
||||
const proj = cornerProject();
|
||||
proj.walls = [proj.walls[0]];
|
||||
const joints = jointLines(proj);
|
||||
expect(joints.length).toBe(1);
|
||||
expect(joints[0].weightMm).toBeCloseTo(0.02, 6);
|
||||
expect(joints[0].weightMm).toBeCloseTo(0.09, 6);
|
||||
});
|
||||
});
|
||||
@@ -12,6 +12,9 @@ import type { Primitive } from "./generatePlan/shared";
|
||||
|
||||
const ALL = new Set(flattenCategories(sampleProject.layers).map((c) => c.code));
|
||||
const on: Project = { ...sampleProject, scaleLineWeights: true };
|
||||
const off: Project = { ...sampleProject, scaleLineWeights: false };
|
||||
// [140] Kern `scale_weight`: nur der Anteil über 0.09 mm skaliert (1:200: Faktor √½).
|
||||
const scaledWeight = (w: number, f: number) => (w > 0.09 ? 0.09 + (w - 0.09) * f : w);
|
||||
const weights = (ps: Primitive[]) =>
|
||||
ps.flatMap((p) => (p.kind === "polygon" ? [p.strokeWidthMm] : "weightMm" in p && typeof p.weightMm === "number" ? [p.weightMm] : []));
|
||||
const plan = (p: Project, n: number, compact = false) =>
|
||||
@@ -19,18 +22,18 @@ const plan = (p: Project, n: number, compact = false) =>
|
||||
|
||||
describe("Strichstärken nach Massstab", () => {
|
||||
// Der Faktor selbst (Grenzen, ungültiger Massstab) ist im Kern geprüft (`plan/extras.rs`).
|
||||
it("Grundriss 1:200: jede Stärke × Faktor, aus → unverändert", () => {
|
||||
const base = weights(plan(sampleProject, 200).primitives);
|
||||
it("Grundriss 1:200: jede Stärke über dem Sockel × Faktor, aus → unverändert", () => {
|
||||
const base = weights(plan(off, 200).primitives);
|
||||
const scaled = weights(plan(on, 200).primitives);
|
||||
expect(scaled.length).toBe(base.length);
|
||||
const f = 0.5 ** 0.25;
|
||||
scaled.forEach((w, i) => expect(w).toBeCloseTo(base[i] * f, 9));
|
||||
expect(scaled).not.toEqual(base);
|
||||
scaled.forEach((w, i) => expect(w).toBeCloseTo(scaledWeight(base[i], Math.SQRT1_2), 9));
|
||||
});
|
||||
it("auch die kompakte Linien-Unterlage (GPU-Ansicht) wird skaliert", () => {
|
||||
const base = weights(plan(sampleProject, 200, true).primitives);
|
||||
const base = weights(plan(off, 200, true).primitives);
|
||||
const scaled = weights(plan(on, 200, true).primitives);
|
||||
expect(scaled.length).toBe(base.length);
|
||||
scaled.forEach((w, i) => expect(w).toBeCloseTo(base[i] * 0.5 ** 0.25, 9));
|
||||
scaled.forEach((w, i) => expect(w).toBeCloseTo(scaledWeight(base[i], Math.SQRT1_2), 9));
|
||||
});
|
||||
it("gleiche Eingabe → gleiche Inhalts-Hashes der Kern-Abschnitte (GPU-Cache), auch mit Massstab", () => {
|
||||
const line = {
|
||||
@@ -41,7 +44,7 @@ describe("Strichstärken nach Massstab", () => {
|
||||
const pl = generatePlan(p, "eg", ALL, undefined, "mittel", false, false, true, 200);
|
||||
return (pl.bufRuns ?? []).flatMap((r) => Array.from(r.buf.hashes!.subarray(r.from, r.to)));
|
||||
};
|
||||
const base = { ...sampleProject, drawings2d: [...sampleProject.drawings2d, line] };
|
||||
const base = { ...off, drawings2d: [...sampleProject.drawings2d, line] };
|
||||
const a = hashes(base);
|
||||
expect(a.length).toBeGreaterThan(0);
|
||||
expect(hashes(base)).toEqual(a);
|
||||
|
||||
@@ -340,11 +340,11 @@ describe("generatePlan — Linien-Übersteuerung je Kategorie (Opening.frameLine
|
||||
sillLine: { faces: "aussen", view: "auf" },
|
||||
};
|
||||
|
||||
it("ohne Übersteuerung: Stulp-/Sash-/Sims-Linien nutzen den Default (Opening.color bzw. Haarlinie)", () => {
|
||||
it("ohne Übersteuerung: Stulp-/Sash-/Sims-Linien nutzen den Default (Opening.color bzw. feine Linie 0.13, [140])", () => {
|
||||
const p = project({ ...baseWindow, typeId: "wt1" }, [twoSashType]);
|
||||
const stulp = linesOfClass(p, "window-stulp", "mittel");
|
||||
expect(stulp.length).toBeGreaterThan(0);
|
||||
for (const l of stulp) expect(l.kind === "line" && l.weightMm).toBeCloseTo(0.02, 6);
|
||||
for (const l of stulp) expect(l.kind === "line" && l.weightMm).toBeCloseTo(0.13, 6);
|
||||
});
|
||||
|
||||
it("frameLine übersteuert Farbe+Stärke der Laibungs-Blöcke (window-stulp, einflügliges Fenster ohne Flügelstoss)", () => {
|
||||
|
||||
Reference in new issue
Block a user