Skip to content

armgit / bygga

Public Imported from GitHub
0

IKEA assembly, step by step: animated, manual-style 3D guides. Scan any paper manual with Together AI.

TypeScript

Draw wash-stands

Youssef86814915c074
diff --git a/scripts/ikea/build.ts b/scripts/ikea/build.ts
index 01696df..9cc2d77 100644
--- a/scripts/ikea/build.ts
+++ b/scripts/ikea/build.ts
@@ -59,7 +59,7 @@ function hints(family: string, kind: Kind): Hint | undefined {
/* ---------- matching against hand made entries ---------- */
-const LATER_KINDS = new Set<Kind>(["office", "chaise", "corner", "cot", "bunk", "loft", "dropleaf", "daybed", "mixed", "sliding", "slidecab", "bookrow", "cabrow", "section", "gateleg"]);
+const LATER_KINDS = new Set<Kind>(["office", "chaise", "corner", "cot", "bunk", "loft", "dropleaf", "daybed", "mixed", "sliding", "slidecab", "bookrow", "cabrow", "section", "gateleg", "washstand"]);
function baseMatch(name: string, draw: Draw): CatalogEntry | undefined {
const fam = fold(name);
diff --git a/scripts/ikea/check.ts b/scripts/ikea/check.ts
index 4037644..2ee5bd3 100644
--- a/scripts/ikea/check.ts
+++ b/scripts/ikea/check.ts
@@ -113,6 +113,10 @@ async function main() {
expect("billy bookcase combination", "billy-bookcase-160-x-28-x-202");
expect("pax bergsbo", "pax-bergsbo-wardrobe");
expect("vihals gateleg table", "vihals-gateleg-table-39-95-151-x-90");
+ // a wash-stand when asked for, US words too, without taking the family's cabinets
+ expect("hemnes wash-stand", "hemnes-wash-stand-2-drawers-60-x-47-x-83");
+ expect("hemnes vanity", "hemnes-wash-stand-2-drawers-60-x-47-x-83");
+ expect("hemnes cabinet", "hemnes-glass-door-cabinet-90-x-197");
if (articleNo("S292.975.72") !== "29297572") fail("article numbers with an S in front don't parse");
for (const [no, slug] of [["60324520", "kallax-2x2"]] as const) {
if (articleSlug(no) !== slug) fail(`article ${no} gave ${articleSlug(no)}, expected ${slug}`);
diff --git a/scripts/ikea/classify.ts b/scripts/ikea/classify.ts
index 275a8d4..329ab37 100644
--- a/scripts/ikea/classify.ts
+++ b/scripts/ikea/classify.ts
@@ -73,7 +73,7 @@ export function measure(s: string): Size | null {
return { n: parts.map((p) => Number(p.split("/")[0])), ext: parts.some((p) => p.includes("/")), text: parts.join(" × ") + " cm" };
}
-const UPRIGHT = new Set<Kind>(["cube", "bookcase", "open", "chest", "nightstand", "wardrobe", "cabinet", "sideboard", "tv", "shoe", "wallcab", "wallshelf", "kitchen", "mixed", "sliding", "slidecab"]);
+const UPRIGHT = new Set<Kind>(["cube", "bookcase", "open", "chest", "nightstand", "wardrobe", "cabinet", "sideboard", "tv", "shoe", "wallcab", "wallshelf", "kitchen", "mixed", "sliding", "slidecab", "washstand"]);
const FLAT = new Set<Kind>(["desk", "coffee", "side", "dining", "bar", "console", "kidstable", "trolley", "bench"]);
/** Office chairs IKEA sells with armrests although the type doesn't say so. */
@@ -87,6 +87,9 @@ const GATE_STORAGE = new Set(["VIHALS"]);
const ROW_UNITS: Record<string, number> = { BILLY: 80, BESTÅ: 120, IVAR: 80, PAX: 100 };
/** PAX frames under a pair of sliding doors: 150 is two 75s, 200 two 100s. */
const PAX_SLIDE_UNITS = [100, 75];
+/** Wash-stands' own height in cm, to tell how thick a basin from the same box is; and the ones that stand on the floor. */
+const WASH_H: Record<string, number> = { HAVBÄCK: 63, ÄNGSJÖN: 63, TÄNNFORSEN: 63, HEMNES: 83, ENHET: 60, NYSJÖN: 65 };
+const WASH_FLOOR = new Set(["HEMNES", "NYSJÖN"]);
/** Day-beds' outer size (w, h, d) from IKEA's product pages: IKEA's measure is only the mattress size. */
const DAYBED_SIZE: Record<string, [number, number, number]> = { HEMNES: [210, 83, 91], BRIMNES: [205, 58, 87], FLEKKE: [207, 86, 91], VIHALS: [206, 75, 86] };
@@ -172,6 +175,25 @@ const RULES: Rule[] = [
[/^cabinet with (2 )?sliding (glass )?doors$/, (_m, c) =>
c.f.spr ? "cabinet with sliding doors sold as a combination" : c.f.name === "IDÅSEN" ? "steel office cabinet" : { kind: "slidecab", x: { slides: 2 } }],
[/sliding/, () => "sliding doors"],
+ // wash-stands: drawers or doors under a basin, on the wall or on the floor; a basin from the same box goes on top last
+ [/^(open )?(?:wash-?st(?:a)?n?d|wsh-stnd)(?: (?:w|with) (.+?))?(\/(?:deep )?wash-basin(?:\/tap)?)?$/, (m, c) => {
+ const fronts = m[2] ?? "";
+ const dr = fronts.match(/^(?:(\d) )?(drawers?|drw)$/);
+ const ds = fronts.match(/^(?:(\d) )?(doors?|drs)$/);
+ const sh = fronts.match(/^(\d) shelves$/);
+ const wide = (c.sz.n[0] ?? 60) > 45;
+ let z: string;
+ if (m[1]) z = sh ? `o${sh[1]}` : dr ? "o1+r1@18" : fronts ? "" : "o1";
+ else if (dr) z = `r${dr[1] ?? (/s$/.test(dr[2]) ? 2 : 1)}`;
+ else if (ds) z = `d${Number(ds[1] ?? (ds[2] === "door" ? 1 : 2)) > 1 && wide ? 2 : 1}`;
+ else z = fronts ? "" : "r2";
+ if (!z) return "wash-stand we can't read";
+ return { kind: "washstand", x: { z, basin: m[3] || c.multi ? 6 : undefined } };
+ }],
+ [/^wash-basin (?:base )?cabinet(?: w(?:ith)? (\d) doors)?$/, (m, c) =>
+ ({ kind: "washstand", x: { z: `d${m[1] ? Math.min(2, Number(m[1])) : (c.sz.n[0] ?? 60) > 50 ? 2 : 1}`, basin: c.multi ? 6 : undefined } })],
+ [/^base (?:cb|cabinet) f(?:or)? wash-?basin w(?:ith)? (\d) drawers$/, (m) => ({ kind: "washstand", x: { z: `r${m[1]}` } })],
+ [/^base frame for wash-?basin$/, () => ({ kind: "washstand", x: { z: "o" } })],
[/sink|wash-?basin|wash-?st|hob\b|oven|fridge|freezer|dishwasher|microwave|extractor|appliances|kitchenette|outdoor kitchen/, () => "appliance or sink unit"],
[/^(door\/)?drawer front|^drawer (without |with (framed )?(glass )?)front|^(high|medium|low) drawer with front|^fitting for mounting/, () => "door or drawer front sold alone"],
[/drawers?\b.*\b(doors?|fronts?|shelves|baskets?)\b|\b(doors?|fronts?|shelves|baskets?)\b.*\bdrawers?\b/, () => "mixed doors and drawers"],
@@ -317,6 +339,14 @@ export function classify(f: Fact, hints: Hints): Verdict {
const twin = kind === "mixed" || kind === "slidecab" ? "cabinet" : kind === "sliding" ? "wardrobe" : undefined;
const cab = twin ? hints(family, twin) : undefined;
if (guessed.d && cab && cab.kind === twin && Math.abs(cab.w - w) < 60) d = cab.d;
+ if (kind === "washstand") {
+ // the measure takes in a basin from the same box: whatever is above the wash-stand's own height is the basin
+ if (x.basin) {
+ const extra = WASH_H[family] ? h - WASH_H[family] : -1;
+ x.basin = extra >= 4 ? Math.min(16, extra) : 6;
+ }
+ if (h - (x.basin ?? 0) <= 70 && !WASH_FLOOR.has(family)) x.hung = true;
+ }
} else if (FLAT.has(kind)) {
if (v.length === 3) set(v[0], v[2], v[1]);
else if (v.length === 2) set(v[0], undefined, v[1]);
@@ -420,7 +450,7 @@ export function classify(f: Fact, hints: Hints): Verdict {
}
// parameters from the type name, the size and the family's hand made rows
- if (hint?.x.knobs && ["chest", "nightstand", "wardrobe", "cabinet", "sideboard", "tv", "shoe", "wallcab", "kitchen", "mixed"].includes(kind)) x.knobs = hint.x.knobs;
+ if (hint?.x.knobs && ["chest", "nightstand", "wardrobe", "cabinet", "sideboard", "tv", "shoe", "wallcab", "kitchen", "mixed", "washstand"].includes(kind)) x.knobs = hint.x.knobs;
if (kind === "chest" || kind === "nightstand") {
const total = x.rows ?? (kind === "nightstand" ? (h >= 60 ? 2 : 1) : Math.min(6, Math.max(2, Math.round(h / 14))));
if (kind === "chest" && total === 2 && w <= 60 && h <= 65) return finish("nightstand");
diff --git a/scripts/ikea/slugs.json b/scripts/ikea/slugs.json
index 8c19b2d..8c93832 100644
--- a/scripts/ikea/slugs.json
+++ b/scripts/ikea/slugs.json
@@ -18,8 +18,15 @@
"ÄLVDALEN|3-seat sofa-bed with chaise longue": "alvdalen-3-seat-sofa-bed-chaise-longue",
"ÄMMARYD|Coffee table, 98 × 59 cm": "ammaryd-coffee-table-98-x-59",
"ÄMMARYD|Side table, 59 × 40 cm": "ammaryd-side-table-59-x-40",
+ "ÄNGSJÖN / BACKSJÖN|Wash-stand/wash-basin, 102 × 49 × 71 cm": "angsjon-backsjon-wash-stand-wash-basin-102-x-49",
+ "ÄNGSJÖN / BACKSJÖN|Wash-stnd w drawer/wash-basin, 60 × 48 × 39 cm": "angsjon-backsjon-wash-stnd-w-drawer-wash-basin-6",
+ "ÄNGSJÖN / BACKSJÖN|Wash-stnd w drawers/wash-basin, 102 × 49 × 71 cm": "angsjon-backsjon-wash-stnd-w-drawers-wash-basin-2",
+ "ÄNGSJÖN / BACKSJÖN|Wash-stnd w drawers/wash-basin, 60 × 48 × 69 cm": "angsjon-backsjon-wash-stnd-w-drawers-wash-basin",
+ "ÄNGSJÖN / ORRSJÖN|Wash-stnd w drawers/wash-basin, 62 × 49 × 69 cm": "angsjon-orrsjon-wash-stnd-w-drawers-wash-basin-6",
"ÄNGSJÖN|High cabinet with door, 40 × 35 × 195 cm": "angsjon-high-cabinet-door-40-x-35-x-195",
"ÄNGSJÖN|Wall cabinet with door, 40 × 15 × 95 cm": "angsjon-wall-cabinet-door-40-x-15-x-95",
+ "ÄNGSJÖN|Wash-stand with drawer, 60 × 48 × 33 cm": "angsjon-wash-stand-drawer-60-x-48-x-33",
+ "ÄNGSJÖN|Wash-stand with drawers, 40 × 48 × 63 cm": "angsjon-wash-stand-drawers-40-x-48-x-63",
"ANKARUDDEN|Chest of 4 drawers, 80 × 48 × 107 cm": "ankarudden-chest-4-drawers-80-x-48-x-107",
"ANKARUDDEN|Chest of 6 drawers, 139 × 48 × 87 cm": "ankarudden-chest-6-drawers-139-x-48-x-87",
"ANKARUDDEN|Wardrobe with sliding doors, 98 × 60 × 190 cm": "ankarudden-wardrobe-sliding-doors-98-x-60-x-190",
@@ -141,6 +148,7 @@
"BUSLÄTT|Chair": "buslatt-chair",
"BUSUNGE|Extendable bed, 80 × 200 cm": "busunge-extendable-bed-80-x-200",
"BYÅS|TV bench, 160 × 42 × 45 cm": "byas-tv-bench-160-x-42-x-45",
+ "BYASJÖN|Wash-basin base cabinet, 66 × 37 × 59 cm": "byasjon-wash-basin-base-cabinet-66-x-37-x-59",
"DANDERYD|Dining table, 130 × 80 cm": "danderyd-dining-table-130-x-80",
"DANDERYD|Drop-leaf table, 74/134 × 80 cm": "danderyd-drop-leaf-table-74-134-x-80",
"DOCKSTA|Table, 103 cm": "docksta-table-103",
@@ -165,13 +173,22 @@
"EKTORP|Armchair": "ektorp-armchair",
"EKTORP|Corner sofa, 4-seat": "ektorp-corner-sofa-4-seat",
"ELDBERGET / MALSKÄR|Swivel chair": "eldberget-malskar-swivel-chair",
+ "ENHET / TVÄLLEN|Open wash-stand with 2 shelves, 64 × 43 × 65 cm": "enhet-tvallen-open-wash-stand-2-shelves-64-x-43",
+ "ENHET / TVÄLLEN|Wash-stnd w door/wash-basin, 44 × 43 × 65 cm": "enhet-tvallen-wash-stnd-w-door-wash-basin-44-x-4",
+ "ENHET / TVÄLLEN|Wash-stnd w doors/wash-basin, 64 × 33 × 65 cm": "enhet-tvallen-wash-stnd-w-doors-wash-basin-64-x",
+ "ENHET / TVÄLLEN|Wash-stnd w drawers/wash-basin, 64 × 43 × 65 cm": "enhet-tvallen-wash-stnd-w-drawers-wash-basin-64",
+ "ENHET|Base cb f washbasin w 2 drawers, 60 × 40 × 60 cm": "enhet-base-cb-f-washbasin-w-2-drawers-60-x-40-x",
"ENHET|Base fr w shelves, 40 × 60 × 75 cm": "enhet-base-fr-w-shelves-40-x-60-x-75",
"ENHET|Base fr w shelves, 60 × 40 × 60 cm": "enhet-base-fr-w-shelves-60-x-40-x-60",
+ "ENHET|Base frame for washbasin, 60 × 40 × 60 cm": "enhet-base-frame-for-washbasin-60-x-40-x-60",
"ENHET|High cabinet with door, 30 × 32 × 180 cm": "enhet-high-cabinet-door-30-x-32-x-180",
"ENHET|Mirror cabinet with door, 40 × 17 × 75 cm": "enhet-mirror-cabinet-door-40-x-17-x-75",
"ENHET|Mirror cabinet with doors, 60 × 17 × 75 cm": "enhet-mirror-cabinet-doors-60-x-17-x-75",
"ENHET|Mirror cabinet, 60 × 17 × 75 cm": "enhet-mirror-cabinet-60-x-17-x-75",
"ENHET|Wall cabinet with door, 60 × 32 × 75 cm": "enhet-wall-cabinet-door-60-x-32-x-75",
+ "ENHET|Wash-stand with door, 40 × 42 × 60 cm": "enhet-wash-stand-door-40-x-42-x-60",
+ "ENHET|Wash-stand with doors, 60 × 42 × 60 cm": "enhet-wash-stand-doors-60-x-42-x-60",
+ "ENHET|Wash-stand with drawers, 60 × 42 × 60 cm": "enhet-wash-stand-drawers-60-x-42-x-60",
"ENKROKEN|Desk, 85 × 56 × 75 cm": "enkroken-desk-85-x-56-x-75",
"ENSHOLM|Chair": "ensholm-chair",
"FABRIKÖR|Glass-door cabinet, 57 × 150 cm": "fabrikor-glass-door-cabinet-57-x-150",
@@ -295,8 +312,18 @@
"HAUGA|Table, 118 × 74 cm": "hauga-table-118-x-74",
"HAUGA|TV bench, 206 × 46 × 54 cm": "hauga-tv-bench-206-x-46-x-54",
"HAUGA|Wardrobe with sliding doors, 118 × 55 × 199 cm": "hauga-wardrobe-sliding-doors-118-x-55-x-199",
+ "HAVBÄCK / ORRSJÖN|Wash-stnd w doors/wash-basin, 82 × 49 × 71 cm": "havback-orrsjon-wash-stnd-w-doors-wash-basin-82",
+ "HAVBÄCK / ORRSJÖN|Wash-stnd w drawers/wash-basin, 42 × 34 × 69 cm": "havback-orrsjon-wash-stnd-w-drawers-wash-basin-4",
+ "HAVBÄCK / ORRSJÖN|Wash-stnd w drawers/wash-basin, 82 × 49 × 69 cm": "havback-orrsjon-wash-stnd-w-drawers-wash-basin-8",
+ "HAVBÄCK / ORRSJÖN|Wash-stnd w drawers/wash-basin, 82 × 49 × 71 cm": "havback-orrsjon-wash-stnd-w-drawers-wash-basin-8-2",
+ "HAVBÄCK / ORRSJÖN|Wash-stnd w drawers/wash-basin/tap, 82 × 49 × 71 cm": "havback-orrsjon-wash-stnd-w-drawers-wash-basin-t",
+ "HAVBÄCK / ORRSJÖN|Wash-stnd w drs/deep wash-basin/tap, 62 × 49 × 72 cm": "havback-orrsjon-wash-stnd-w-drs-deep-wash-basin",
+ "HAVBÄCK / VINDELÄLVEN|Wash-stnd w drawers/wash-basin, 82 × 49 × 77 cm": "havback-vindelalven-wash-stnd-w-drawers-wash-bas",
"HAVBÄCK|High cabinet with door, 40 × 35 × 195 cm": "havback-high-cabinet-door-40-x-35-x-195",
"HAVBÄCK|Wall cabinet with door, 40 × 15 × 95 cm": "havback-wall-cabinet-door-40-x-15-x-95",
+ "HAVBÄCK|Wash-stand with doors, 80 × 48 × 63 cm": "havback-wash-stand-doors-80-x-48-x-63",
+ "HAVBÄCK|Wash-stand with drawers, 40 × 33 × 63 cm": "havback-wash-stand-drawers-40-x-33-x-63",
+ "HAVBÄCK|Wash-stand with drawers, 60 × 48 × 63 cm": "havback-wash-stand-drawers-60-x-48-x-63",
"HAVSTA|Cabinet with plinth, 81 × 37 × 134 cm": "havsta-cabinet-plinth-81-x-37-x-134",
"HAVSTA|Cabinet with plinth, 81 × 47 × 89 cm": "havsta-cabinet-plinth-81-x-47-x-89",
"HAVSTA|Chest of 3 drawers, 81 × 47 × 89 cm": "havsta-chest-3-drawers-81-x-47-x-89",
@@ -308,10 +335,18 @@
"HAVSTEN|2-seat sofa, outdoor": "havsten-2-seat-sofa-outdoor",
"HAVSTEN|2-seat sofa, outdoor, 179 × 92 × 76 cm": "havsten-2-seat-sofa-outdoor-179-x-92-x-76",
"HAVSTEN|Armchair, outdoor": "havsten-armchair-outdoor",
+ "HEMNES / ORRSJÖN|Wash-stnd w drawers/wash-basin, 102 × 49 × 89 cm": "hemnes-orrsjon-wash-stnd-w-drawers-wash-basin-10",
+ "HEMNES / ORRSJÖN|Wash-stnd w drawers/wash-basin/tap, 62 × 49 × 89 cm": "hemnes-orrsjon-wash-stnd-w-drawers-wash-basin-ta",
+ "HEMNES / RUTSJÖN|Wash-stnd w drawers/wash-basin, 62 × 49 × 95 cm": "hemnes-rutsjon-wash-stnd-w-drawers-wash-basin-62",
+ "HEMNES / RUTSJÖN|Wash-stnd w drawers/wash-basin/tap, 82 × 49 × 95 cm": "hemnes-rutsjon-wash-stnd-w-drawers-wash-basin-ta",
+ "HEMNES / VÄSTERSJÖN|Open wash-stand w drawer/wash-basin, 82 × 48 × 90 cm": "hemnes-vastersjon-open-wash-stand-w-drawer-wash",
+ "HEMNES / VÄSTERSJÖN|Open wsh-stnd w drw/wash-basin/tap, 82 × 48 × 90 cm": "hemnes-vastersjon-open-wsh-stnd-w-drw-wash-basin",
"HEMNES|Day-bed frame with 3 drawers, 80 × 200 cm": "hemnes-day-bed-frame-3-drawers-80-x-200",
"HEMNES|Day-bed w 3 drawers/2 mattresses, 80 × 200 cm": "hemnes-day-bed-w-3-drawers-2-mattresses-80-x-200",
"HEMNES|Desk, 155 × 65 cm": "hemnes-desk-155-x-65",
"HEMNES|Glass-door cabinet with 3 drawers, 90 × 197 cm": "hemnes-glass-door-cabinet-3-drawers-90-x-197",
+ "HEMNES|Open wash-stand with 1 drawer, 82 × 48 × 76 cm": "hemnes-open-wash-stand-1-drawer-82-x-48-x-76",
+ "HEMNES|Wash-stand with 2 drawers, 60 × 47 × 83 cm": "hemnes-wash-stand-2-drawers-60-x-47-x-83",
"HERRÅKRA|Armchair": "herrakra-armchair",
"HÖGVED|Chair": "hogved-chair",
"HOL|Side table, 50 × 50 cm": "hol-side-table-50-x-50",
@@ -375,6 +410,7 @@
"IVAR|Shelving unit, 89 × 50 × 226 cm": "ivar-shelving-unit-89-x-50-x-226",
"IVAR|Wall cabinet with doors, 160 × 30 × 83 cm": "ivar-wall-cabinet-doors-160-x-30-x-83",
"IVÖSJÖN|Cabinet with doors, 33 × 34 × 99 cm": "ivosjon-cabinet-doors-33-x-34-x-99",
+ "IVÖSJÖN|Wash-basin base cabinet, 50 × 33 × 57 cm": "ivosjon-wash-basin-base-cabinet-50-x-33-x-57",
"JAKOBSFORS|Coffee table, 80 cm": "jakobsfors-coffee-table-80",
"JÄRVFJÄLLET|Office chair with armrests": "jarvfjallet-office-chair-armrests",
"JÄTTEBO|2-seat modular sofa": "jattebo-2-seat-modular-sofa",
@@ -673,8 +709,12 @@
"NORRMANSÖ|Table, outdoor, 220 × 100 cm": "norrmanso-table-outdoor-220-x-100",
"NORRMJÖLE|Table, 105 cm": "norrmjole-table-105",
"NYHAMN|3-seat sofa-bed": "nyhamn-3-seat-sofa-bed",
+ "NYSJÖN / BJÖRKÅN|Wash-basin base cabinet w 2 doors, 54 × 40 × 80 cm": "nysjon-bjorkan-wash-basin-base-cabinet-w-2-doors",
+ "NYSJÖN / BJÖRKÅN|Wash-stnd w door/wash-basin/tap, 54 × 40 × 88 cm": "nysjon-bjorkan-wash-stnd-w-door-wash-basin-tap-5",
"NYSJÖN|High cabinet, 30 × 190 cm": "nysjon-high-cabinet-30-x-190",
"NYSJÖN|Mirror cabinet, 50 × 60 cm": "nysjon-mirror-cabinet-50-x-60",
+ "NYSJÖN|Wash-basin base cabinet w 2 doors, 50 × 65 cm": "nysjon-wash-basin-base-cabinet-w-2-doors-50-x-65",
+ "NYSJÖN|Wash-basin cabinet, 50 × 83 cm": "nysjon-wash-basin-cabinet-50-x-83",
"OLSERÖD|Side table, 53 × 50 cm": "olserod-side-table-53-x-50",
"OMAR|Shelving unit, 46 × 36 × 181 cm": "omar-shelving-unit-46-x-36-x-181",
"OMAR|Shelving unit, 46 × 36 × 94 cm": "omar-shelving-unit-46-x-36-x-94",
@@ -946,9 +986,20 @@
"TALLSKÄR|Armchair, outdoor": "tallskar-armchair-outdoor",
"TALLSKÄR|Chair with armrests, outdoor": "tallskar-chair-armrests-outdoor",
"TÅNEBRO|Side table, 46 cm": "tanebro-side-table-46",
+ "TÄNNFORSEN / ORRSJÖN|Wash-stand/wash-basin, 102 × 49 × 71 cm": "tannforsen-orrsjon-wash-stand-wash-basin-102-x-4",
+ "TÄNNFORSEN / ORRSJÖN|Wash-stnd w doors/wash-basin, 82 × 49 × 71 cm": "tannforsen-orrsjon-wash-stnd-w-doors-wash-basin",
+ "TÄNNFORSEN / ORRSJÖN|Wash-stnd w drawers/wash-basin, 102 × 49 × 69 cm": "tannforsen-orrsjon-wash-stnd-w-drawers-wash-basi-2",
+ "TÄNNFORSEN / ORRSJÖN|Wash-stnd w drawers/wash-basin, 82 × 49 × 71 cm": "tannforsen-orrsjon-wash-stnd-w-drawers-wash-basi",
+ "TÄNNFORSEN / ORRSJÖN|Wash-stnd w drs/deep wash-basin/tap, 62 × 49 × 72 cm": "tannforsen-orrsjon-wash-stnd-w-drs-deep-wash-bas",
+ "TÄNNFORSEN / RUTSJÖN|Wash-stnd w doors/wash-basin, 82 × 49 × 74 cm": "tannforsen-rutsjon-wash-stnd-w-doors-wash-basin",
+ "TÄNNFORSEN / RUTSJÖN|Wash-stnd w drawers/wash-basin, 82 × 49 × 74 cm": "tannforsen-rutsjon-wash-stnd-w-drawers-wash-basi",
+ "TÄNNFORSEN / VÄSTERSJÖN|Wash-stnd w doors/wash-basin, 62 × 49 × 79 cm": "tannforsen-vastersjon-wash-stnd-w-doors-wash-bas",
+ "TÄNNFORSEN / VÄSTERSJÖN|Wash-stnd w drawers/wash-basin, 102 × 49 × 79 cm": "tannforsen-vastersjon-wash-stnd-w-drawers-wash-b",
"TÄNNFORSEN|High cabinet with door, 40 × 35 × 195 cm": "tannforsen-high-cabinet-door-40-x-35-x-195",
"TÄNNFORSEN|Mirror cabinet with doors, 80 × 15 × 95 cm": "tannforsen-mirror-cabinet-doors-80-x-15-x-95",
"TÄNNFORSEN|Wall cabinet with door, 40 × 15 × 95 cm": "tannforsen-wall-cabinet-door-40-x-15-x-95",
+ "TÄNNFORSEN|Wash-stand with doors, 80 × 48 × 63 cm": "tannforsen-wash-stand-doors-80-x-48-x-63",
+ "TÄNNFORSEN|Wash-stand with drawers, 80 × 48 × 63 cm": "tannforsen-wash-stand-drawers-80-x-48-x-63",
"TÄRNKULLEN|Upholstered bed frame, Standard Double, 135 × 190 cm": "tarnkullen-upholstered-bed-frame-standard-double",
"TÄRNÖ|Chair, outdoor": "tarno-chair-outdoor",
"TÄRNÖ|Stool, 30 × 42 cm": "tarno-stool-30-x-42",
diff --git a/src/data/ikea-guard.ts b/src/data/ikea-guard.ts
index 28ac37e..a2ae256 100644
--- a/src/data/ikea-guard.ts
+++ b/src/data/ikea-guard.ts
@@ -1,3 +1,3 @@
// Generated by scripts/ikea/build.ts from IKEA product data. Do not edit by hand.
// Real IKEA names we can't draw that look like a typo of one we can (folded, no spaces)
-export const IKEA_GUARD = "abrotten afjall alsken alvsta ananas angskorn arsjon asphult aspinge backsjon basingen batskar bengta boholmen bolmso borrby branas brogrund brunsta burfjord byasjon byholma cissan dalskar duvholmen eklatera ekorre fagelon falskar fardal farvik fiskbo florsjon forneby forsa forvaltare fossta frakta fridfull frihult frojda froson frost fyllen gamman gansjon gatebo gillstad godis gresla gronmes grossjon grusnarv grytas gubbarp hackas hallnas hallspar halved hammaron hamnskar hanga hassjon havsdun havsen havskal havsmal hejsta helgeo hilver hogvind holmared holmeja horred hultarp hutten ikeaps2002 ikeaps2014 ikeaps2017 isjakt jagmastare jallby jattestor kalken kallarp kallboda kallror kallsjon kallsup kasker klamtare klipplax knalla knixhult knoppang kolsjon konstruera kroksjon kvalmso kvittera laktare larkar latsas lersta lill lilla lillabo lillhult lindasen lohals lova lyckad macksjon majsjon mala maleras manalg martorp melodi molnas morkulla navlinge nereby nissedal nogsta norden nydala opparyd ordning orrsjon orskar pinnarp pipranka plats plockar rahult ramsnas ramsta ranarp ransberg revskar ringsta rissla rockan runnen runskar saljen seglaro sidsjo sindal sindvik sjalso skalryta skarig skedstor skogsa skogskorn skogsnas skogsror smaata smalom smarra smaska smycka sonhult spantad sparka stelna stensta stensund stjarnhov storslinga strala strandad svalka svallet svansele svartho svartra sy tackan tacknan tallsparv tasjon terrsjo tisken tittebo tolken torared torkad tossig trogen tvallen tvarfot tysnes uddarp undvika uppfora upplaga upplid uppvind utaker vagdal vagomrade vagsjon vallasan vasskar vathult vedbak veddinge vedhamn viggso vilsta voxtorp vresjon";
+export const IKEA_GUARD = "abrotten afjall alsken alvsta ananas angskorn arsjon asphult aspinge basingen batskar bengta boholmen bolmso borrby branas brogrund brunsta burfjord byholma cissan dalskar duvholmen eklatera ekorre fagelon falskar fardal farvik fiskbo florsjon forneby forsa forvaltare fossta frakta fridfull frihult frojda froson frost fyllen gamman gansjon gatebo gillstad godis gresla gronmes grossjon grusnarv grytas gubbarp hackas hallnas hallspar halved hammaron hamnskar hanga hassjon havsdun havsen havskal havsmal hejsta helgeo hilver hogvind holmared holmeja horred hultarp hutten ikeaps2002 ikeaps2014 ikeaps2017 isjakt jagmastare jallby jattestor kalken kallarp kallboda kallror kallsjon kallsup kasker klamtare klipplax knalla knixhult knoppang kolsjon konstruera kroksjon kvalmso kvittera laktare larkar latsas lersta lill lilla lillabo lillhult lindasen lohals lova lyckad macksjon majsjon mala maleras manalg martorp melodi molnas morkulla navlinge nereby nissedal nogsta norden nydala opparyd ordning orskar pinnarp pipranka plats plockar rahult ramsnas ramsta ranarp ransberg revskar ringsta rissla rockan runnen runskar saljen seglaro sidsjo sindal sindvik sjalso skalryta skarig skedstor skogsa skogskorn skogsnas skogsror smaata smalom smarra smaska smycka sonhult spantad sparka stelna stensta stensund stjarnhov storslinga strala strandad svalka svallet svansele svartho svartra sy tackan tacknan tallsparv tasjon terrsjo tisken tittebo tolken torared torkad tossig trogen tvarfot tysnes uddarp undvika uppfora upplaga upplid uppvind utaker vagdal vagomrade vagsjon vallasan vasskar vathult vedbak veddinge vedhamn viggso vilsta voxtorp vresjon";
diff --git a/src/data/ikea-items.ts b/src/data/ikea-items.ts
index 10b57f7..8708c1e 100644
--- a/src/data/ikea-items.ts
+++ b/src/data/ikea-items.ts
@@ -20,8 +20,15 @@ alvdalen-3-seat-sofa-bed|10530650 10530645
alvdalen-3-seat-sofa-bed-chaise-longue|70530666 70530671
ammaryd-coffee-table-98-x-59|00609125 40609128
ammaryd-side-table-59-x-40|80609126 70609122
+angsjon-backsjon-wash-stand-wash-basin-102-x-49|09629586 89629587 69629687 59629584
+angsjon-backsjon-wash-stnd-w-drawer-wash-basin-6|39629575 19629543 99629643 79629719 49629443 29629646
+angsjon-backsjon-wash-stnd-w-drawers-wash-basin|29629444 69629512 19629722 59629720 79629446 49629513 39629679
+angsjon-backsjon-wash-stnd-w-drawers-wash-basin-2|39629580 29629651 99629718 99629577 99629544 89629648 79629724
angsjon-high-cabinet-door-40-x-35-x-195|80535079 40535081 60535080
+angsjon-orrsjon-wash-stnd-w-drawers-wash-basin-6|39629641 19629717 09629647 99629723 59629683 59629447 49629787
angsjon-wall-cabinet-door-40-x-15-x-95|20535077 00535078 40535076
+angsjon-wash-stand-drawer-60-x-48-x-33|20535096 00535101 80535098 60535099 20535100 00535097
+angsjon-wash-stand-drawers-40-x-48-x-63|00535083 70535089 80535084 90535088 80531769 10535092 20535082
ankarudden-chest-4-drawers-80-x-48-x-107|80627149
ankarudden-chest-6-drawers-139-x-48-x-87|20627147
ankarudden-wardrobe-sliding-doors-98-x-60-x-190|50626250
@@ -161,6 +168,7 @@ buskbo-armchair|49615399 70434311
buslatt-chair|90601139
busunge-extendable-bed-80-x-200|70305700
byas-tv-bench-160-x-42-x-45|80227797
+byasjon-wash-basin-base-cabinet-66-x-37-x-59|40591519
danderyd-dining-table-130-x-80|40568726 20568727 10463858
danderyd-drop-leaf-table-74-134-x-80|10516121
docksta-table-103|19324995
@@ -188,13 +196,22 @@ ektorp-3-seat-sofa-chaise-longue|29628736 59628730 99628733 99509042 89509033 49
ektorp-armchair|79628654 69628635 69628640 79552102 59552103 89552106 29552109
ektorp-corner-sofa-4-seat|69628664 19628666 29508994 89508986 89508991 39508984 59508997
eldberget-malskar-swivel-chair|59331847
+enhet-base-cb-f-washbasin-w-2-drawers-60-x-40-x|80440509
enhet-base-fr-w-shelves-40-x-60-x-75|00448953 20448952 10448976 30448975
enhet-base-fr-w-shelves-60-x-40-x-60|60448974 80448973 40448951 60448950
+enhet-base-frame-for-washbasin-60-x-40-x-60|40464470 20464471
enhet-high-cabinet-door-30-x-32-x-180|10623036 30632054
enhet-mirror-cabinet-60-x-17-x-75|59336519 99336517 19336516 79336518
enhet-mirror-cabinet-door-40-x-17-x-75|30623040
enhet-mirror-cabinet-doors-60-x-17-x-75|50623044 80623047
+enhet-tvallen-open-wash-stand-2-shelves-64-x-43|99554671 09554661
+enhet-tvallen-wash-stnd-w-door-wash-basin-44-x-4|49613357
+enhet-tvallen-wash-stnd-w-doors-wash-basin-64-x|79613346 09613335 29623625
+enhet-tvallen-wash-stnd-w-drawers-wash-basin-64|49613343 19613354 99623622
enhet-wall-cabinet-door-60-x-32-x-75|40623025
+enhet-wash-stand-door-40-x-42-x-60|80623146
+enhet-wash-stand-doors-60-x-42-x-60|70623057 10632050 60623053
+enhet-wash-stand-drawers-60-x-42-x-60|80632056 50623020 20623012
enkroken-desk-85-x-56-x-75|50587079
ensholm-chair|10543737
fabrikor-glass-door-cabinet-57-x-150|00242278 50601424
@@ -324,7 +341,17 @@ hauga-tv-bench-206-x-46-x-54|80593385 50593382
hauga-wardrobe-70-x-199|20415046 60415054
hauga-wardrobe-sliding-doors-118-x-55-x-199|60456916 60407271
havback-high-cabinet-door-40-x-35-x-195|40535000 20535063 40535062
+havback-orrsjon-wash-stnd-w-doors-wash-basin-82|99629252 79629291 09629416 99629308 89629380 79629267 59629428
+havback-orrsjon-wash-stnd-w-drawers-wash-basin-4|09629299 59629391
+havback-orrsjon-wash-stnd-w-drawers-wash-basin-8|69629300 29629420 39629245 99629346 89629281 89629276 69629319
+havback-orrsjon-wash-stnd-w-drawers-wash-basin-8-2|99629370 99629327 99629285 89629422 89629304 79629248 49629283
+havback-orrsjon-wash-stnd-w-drawers-wash-basin-t|79522563 19522486
+havback-orrsjon-wash-stnd-w-drs-deep-wash-basin|69515346
+havback-vindelalven-wash-stnd-w-drawers-wash-bas|99622458 89622454 89622449 79622464 79622459 69622450 59622460
havback-wall-cabinet-door-40-x-15-x-95|60535056 40534996 40535057
+havback-wash-stand-doors-80-x-48-x-63|00535035 30535072 90535074 10535073 80535003 70535070
+havback-wash-stand-drawers-40-x-33-x-63|90591885 30591888
+havback-wash-stand-drawers-60-x-48-x-63|70535065 10535068 90535069 90531764 50535066 40535024 10535025
havsta-cabinet-doors-81-x-123|50529249 30529245 60529263 40529259 00529261
havsta-cabinet-plinth-81-x-37-x-134|29534667 39534662
havsta-cabinet-plinth-81-x-47-x-89|00529242 80529238
@@ -346,8 +373,16 @@ hemnes-day-bed-w-3-drawers-2-mattresses-80-x-200|49521503 79610220 59521499 4952
hemnes-desk-155-x-65|20535044
hemnes-glass-door-cabinet-3-drawers-90-x-197|50452297 00596161 50413507
hemnes-nightstand-2-drawers|50610739
+hemnes-open-wash-stand-1-drawer-82-x-48-x-76|30396698
+hemnes-orrsjon-wash-stnd-w-drawers-wash-basin-10|69654988 09654972 59654979
+hemnes-orrsjon-wash-stnd-w-drawers-wash-basin-ta|29546788 09546794 49546810
+hemnes-rutsjon-wash-stnd-w-drawers-wash-basin-62|69655006 49655007 09655014
+hemnes-rutsjon-wash-stnd-w-drawers-wash-basin-ta|49546853 79546837 29546830
hemnes-sideboard-157-x-88|70476259 80628667
hemnes-tv-bench-148-x-57|50413526
+hemnes-vastersjon-open-wash-stand-w-drawer-wash|19649391
+hemnes-vastersjon-open-wsh-stnd-w-drw-wash-basin|89568555
+hemnes-wash-stand-2-drawers-60-x-47-x-83|50217667 20217664 90217665
herrakra-armchair|20544717 80535545 80535550
hogved-chair|90606820
hol-side-table-50-x-50|70161320
@@ -418,6 +453,7 @@ ivar-shelving-unit-doors-89-x-30-x-124|39403473 89507883 59508087 09507858
ivar-shelving-unit-doors-89-x-30-x-179|89403461 19403474
ivar-wall-cabinet-doors-160-x-30-x-83|09417382
ivosjon-cabinet-doors-33-x-34-x-99|30569095 90609871
+ivosjon-wash-basin-base-cabinet-50-x-33-x-57|20597292
jakobsfors-coffee-table-80|90500121 50515167
janinge-chair|70246089
jarvfjallet-office-chair-armrests|20510642 00521854
@@ -745,8 +781,12 @@ norrmanso-chair-outdoor|40511080
norrmanso-table-outdoor-220-x-100|30500794
norrmjole-table-105|90620562 00620566 50620564
nyhamn-3-seat-sofa-bed|89494625 49555574 99555576 99494615 79555577 29494628 19555575
+nysjon-bjorkan-wash-basin-base-cabinet-w-2-doors|39556324
+nysjon-bjorkan-wash-stnd-w-door-wash-basin-tap-5|09556288
nysjon-high-cabinet-30-x-190|20470815
nysjon-mirror-cabinet-50-x-60|10470830
+nysjon-wash-basin-base-cabinet-w-2-doors-50-x-65|50470814
+nysjon-wash-basin-cabinet-50-x-83|60470408
odger-chair|60359996 50457313 70516552
olserod-side-table-53-x-50|20525356 40530917
omar-shelving-unit-46-x-36-x-181|89297192
@@ -1032,7 +1072,18 @@ tallskar-chair-armrests-outdoor|20575148
tanebro-side-table-46|60578970 60554988 60638182 70605162
tannforsen-high-cabinet-door-40-x-35-x-195|90535111
tannforsen-mirror-cabinet-doors-80-x-15-x-95|10535129 00555250 30535128
+tannforsen-orrsjon-wash-stand-wash-basin-102-x-4|89629827
+tannforsen-orrsjon-wash-stnd-w-doors-wash-basin|69629932 49629867
+tannforsen-orrsjon-wash-stnd-w-drawers-wash-basi|89629926 59629819 39629820 29629849 09629893
+tannforsen-orrsjon-wash-stnd-w-drawers-wash-basi-2|69629913 29629910 09629789
+tannforsen-orrsjon-wash-stnd-w-drs-deep-wash-bas|19515377
+tannforsen-rutsjon-wash-stnd-w-doors-wash-basin|29629892 39629801
+tannforsen-rutsjon-wash-stnd-w-drawers-wash-basi|49629891 09629850 99629817
+tannforsen-vastersjon-wash-stnd-w-doors-wash-bas|79629941 29629905
+tannforsen-vastersjon-wash-stnd-w-drawers-wash-b|99629940 39629844 29629811 09629845 09629812
tannforsen-wall-cabinet-door-40-x-15-x-95|50535108
+tannforsen-wash-stand-doors-80-x-48-x-63|60535122 20535124
+tannforsen-wash-stand-drawers-80-x-48-x-63|60535117 60531770 80535116 00535115
tarnkullen-upholstered-bed-frame-standard-double|69564351 79564355 39564376 19564377
tarno-chair-outdoor|90095428 09576328 09576314
tarno-stool-30-x-42|70603281
diff --git a/src/data/ikea-rows.ts b/src/data/ikea-rows.ts
index 56d4305..d06404c 100644
--- a/src/data/ikea-rows.ts
+++ b/src/data/ikea-rows.ts
@@ -21,6 +21,13 @@ ALEX|open|Storage unit, 36 × 70 cm|36|70|35
ÄMMARYD|side|Side table, 59 × 40 cm|59|50|40
ÄNGSJÖN|cabinet|High cabinet with door, 40 × 35 × 195 cm|40|195|35|doors=1
ÄNGSJÖN|wallcab|Wall cabinet with door, 40 × 15 × 95 cm|40|95|15|doors=1
+ÄNGSJÖN|washstand|Wash-stand with drawers, 40 × 48 × 63 cm|40|63|48|z=r2,hung=1
+ÄNGSJÖN|washstand|Wash-stand with drawer, 60 × 48 × 33 cm|60|33|48|z=r1,hung=1
+ÄNGSJÖN / BACKSJÖN|washstand|Wash-stnd w drawer/wash-basin, 60 × 48 × 39 cm|60|39|48|z=r1,basin=6,hung=1
+ÄNGSJÖN / BACKSJÖN|washstand|Wash-stnd w drawers/wash-basin, 60 × 48 × 69 cm|60|69|48|z=r2,basin=6,hung=1
+ÄNGSJÖN / BACKSJÖN|washstand|Wash-stand/wash-basin, 102 × 49 × 71 cm|102|71|49|z=r2,basin=8,hung=1
+ÄNGSJÖN / BACKSJÖN|washstand|Wash-stnd w drawers/wash-basin, 102 × 49 × 71 cm|102|71|49|z=r2,basin=8,hung=1||angsjon-backsjon-wash-stnd-w-drawers-wash-basin-2
+ÄNGSJÖN / ORRSJÖN|washstand|Wash-stnd w drawers/wash-basin, 62 × 49 × 69 cm|62|69|49|z=r2,basin=6,hung=1
ANKARUDDEN|chest|Chest of 4 drawers, 80 × 48 × 107 cm|80|107|48|rows=4
ANKARUDDEN|chest|Chest of 6 drawers, 139 × 48 × 87 cm|139|87|48|rows=3,cols=2
ANKARUDDEN|sliding|Wardrobe with sliding doors, 98 × 60 × 190 cm|98|190|60|slides=2
@@ -142,6 +149,7 @@ BUSKBO|armchair|Armchair|75|90|80
BUSLÄTT|chair|Chair|44|88|50
BUSUNGE|bed|Extendable bed, 80 × 200 cm|96|100|209|m=80
BYÅS|tv|TV bench, 160 × 42 × 45 cm|160|45|42
+BYASJÖN|washstand|Wash-basin base cabinet, 66 × 37 × 59 cm|66|59|37|z=d2,hung=1
DANDERYD|dining|Dining table, 130 × 80 cm|130|74|80
DANDERYD|dropleaf|Drop-leaf table, 74/134 × 80 cm|134|75|80|leaves=2,leaf=30
DOCKSTA|dining|Table, 103 cm|103|74|103|round=1
@@ -173,6 +181,15 @@ ENHET|wallcab|Mirror cabinet with door, 40 × 17 × 75 cm|40|75|17|doors=1
ENHET|wallcab|Mirror cabinet with doors, 60 × 17 × 75 cm|60|75|17
ENHET|wallcab|Mirror cabinet, 60 × 17 × 75 cm|60|75|17
ENHET|wallcab|Wall cabinet with door, 60 × 32 × 75 cm|60|75|32|doors=1
+ENHET|washstand|Wash-stand with door, 40 × 42 × 60 cm|40|60|42|z=d1,hung=1
+ENHET|washstand|Base cb f washbasin w 2 drawers, 60 × 40 × 60 cm|60|60|40|z=r2,hung=1
+ENHET|washstand|Base frame for washbasin, 60 × 40 × 60 cm|60|60|40|z=o,hung=1
+ENHET|washstand|Wash-stand with doors, 60 × 42 × 60 cm|60|60|42|z=d2,hung=1
+ENHET|washstand|Wash-stand with drawers, 60 × 42 × 60 cm|60|60|42|z=r2,hung=1
+ENHET / TVÄLLEN|washstand|Wash-stnd w door/wash-basin, 44 × 43 × 65 cm|44|65|43|z=d1,basin=5,hung=1
+ENHET / TVÄLLEN|washstand|Wash-stnd w doors/wash-basin, 64 × 33 × 65 cm|64|65|33|z=d2,basin=5,hung=1
+ENHET / TVÄLLEN|washstand|Open wash-stand with 2 shelves, 64 × 43 × 65 cm|64|65|43|z=o2,basin=5,hung=1
+ENHET / TVÄLLEN|washstand|Wash-stnd w drawers/wash-basin, 64 × 43 × 65 cm|64|65|43|z=r2,basin=5,hung=1
ENKROKEN|desk|Desk, 85 × 56 × 75 cm|85|75|56
ENSHOLM|chair|Chair|44|88|50||outdoor garden
FABRIKÖR|cabinet|Glass-door cabinet, 57 × 150 cm|57|150|41
@@ -298,6 +315,16 @@ HAUGA|sliding|Wardrobe with sliding doors, 118 × 55 × 199 cm|118|199|55|slides
HAUGA|tv|TV bench, 206 × 46 × 54 cm|206|54|46|knobs=bar
HAVBÄCK|cabinet|High cabinet with door, 40 × 35 × 195 cm|40|195|35|doors=1
HAVBÄCK|wallcab|Wall cabinet with door, 40 × 15 × 95 cm|40|95|15|doors=1
+HAVBÄCK|washstand|Wash-stand with drawers, 40 × 33 × 63 cm|40|63|33|z=r2,hung=1
+HAVBÄCK|washstand|Wash-stand with drawers, 60 × 48 × 63 cm|60|63|48|z=r2,hung=1
+HAVBÄCK|washstand|Wash-stand with doors, 80 × 48 × 63 cm|80|63|48|z=d2,hung=1
+HAVBÄCK / ORRSJÖN|washstand|Wash-stnd w drawers/wash-basin, 42 × 34 × 69 cm|42|69|34|z=r2,basin=6,hung=1
+HAVBÄCK / ORRSJÖN|washstand|Wash-stnd w drs/deep wash-basin/tap, 62 × 49 × 72 cm|62|72|49|z=d2,basin=9,hung=1
+HAVBÄCK / ORRSJÖN|washstand|Wash-stnd w drawers/wash-basin, 82 × 49 × 69 cm|82|69|49|z=r2,basin=6,hung=1
+HAVBÄCK / ORRSJÖN|washstand|Wash-stnd w doors/wash-basin, 82 × 49 × 71 cm|82|71|49|z=d2,basin=8,hung=1
+HAVBÄCK / ORRSJÖN|washstand|Wash-stnd w drawers/wash-basin, 82 × 49 × 71 cm|82|71|49|z=r2,basin=8,hung=1||havback-orrsjon-wash-stnd-w-drawers-wash-basin-8-2
+HAVBÄCK / ORRSJÖN|washstand|Wash-stnd w drawers/wash-basin/tap, 82 × 49 × 71 cm|82|71|49|z=r2,basin=8,hung=1
+HAVBÄCK / VINDELÄLVEN|washstand|Wash-stnd w drawers/wash-basin, 82 × 49 × 77 cm|82|77|49|z=r2,basin=14,hung=1
HAVSTA|cabinet|Cabinet with plinth, 81 × 47 × 89 cm|81|89|47
HAVSTA|cabinet|Cabinet with plinth, 81 × 37 × 134 cm|81|134|37
HAVSTA|cabinet|Glass-door cabinet with plinth, 81 × 37 × 134 cm|81|134|37
@@ -313,6 +340,14 @@ HEMNES|daybed|Day-bed frame with 3 drawers, 80 × 200 cm|210|83|91|rows=3,knobs=
HEMNES|daybed|Day-bed w 3 drawers/2 mattresses, 80 × 200 cm|210|83|91|rows=3,knobs=knob,m=80,under=pullout,mats=2
HEMNES|desk|Desk, 155 × 65 cm|155|74|65
HEMNES|mixed|Glass-door cabinet with 3 drawers, 90 × 197 cm|90|197|37|rows=3,knobs=knob
+HEMNES|washstand|Wash-stand with 2 drawers, 60 × 47 × 83 cm|60|83|47|knobs=knob,z=r2
+HEMNES|washstand|Open wash-stand with 1 drawer, 82 × 48 × 76 cm|82|76|48|knobs=knob,z=o1+r1@18
+HEMNES / ORRSJÖN|washstand|Wash-stnd w drawers/wash-basin/tap, 62 × 49 × 89 cm|62|89|49|knobs=knob,z=r2,basin=6
+HEMNES / ORRSJÖN|washstand|Wash-stnd w drawers/wash-basin, 102 × 49 × 89 cm|102|89|49|knobs=knob,z=r2,basin=6
+HEMNES / RUTSJÖN|washstand|Wash-stnd w drawers/wash-basin, 62 × 49 × 95 cm|62|95|49|knobs=knob,z=r2,basin=12
+HEMNES / RUTSJÖN|washstand|Wash-stnd w drawers/wash-basin/tap, 82 × 49 × 95 cm|82|95|49|knobs=knob,z=r2,basin=12
+HEMNES / VÄSTERSJÖN|washstand|Open wash-stand w drawer/wash-basin, 82 × 48 × 90 cm|82|90|48|knobs=knob,z=o1+r1@18,basin=7
+HEMNES / VÄSTERSJÖN|washstand|Open wsh-stnd w drw/wash-basin/tap, 82 × 48 × 90 cm|82|90|48|knobs=knob,z=o1+r1@18,basin=7
HERRÅKRA|armchair|Armchair|75|90|80
HÖGVED|chair|Chair|44|88|50
HOL|side|Side table, 50 × 50 cm|50|50|50
@@ -376,6 +411,7 @@ IVAR|open|Shelving unit, 89 × 30 × 226 cm|89|226|30
IVAR|open|Shelving unit, 89 × 50 × 226 cm|89|226|50
IVAR|slidecab|Cabinet with sliding doors, 80 × 30 × 60 cm|80|60|30|slides=2
IVÖSJÖN|cabinet|Cabinet with doors, 33 × 34 × 99 cm|33|99|34
+IVÖSJÖN|washstand|Wash-basin base cabinet, 50 × 33 × 57 cm|50|57|33|z=d1,hung=1
JAKOBSFORS|coffee|Coffee table, 80 cm|80|45|80|round=1
JÄRVFJÄLLET|office|Office chair with armrests|64|105|64|arms=slim
JÄTTEBO|chaise|2,5-seat mod sofa w chaise longue|226|85|160|seats=3,arms=wide,chaise=right,sd=92
@@ -676,6 +712,10 @@ NORRMJÖLE|dining|Table, 105 cm|105|74|105|round=1
NYHAMN|sofa|3-seat sofa-bed|230|85|92|seats=3
NYSJÖN|cabinet|High cabinet, 30 × 190 cm|30|190|40
NYSJÖN|wallcab|Mirror cabinet, 50 × 60 cm|50|60|35
+NYSJÖN|washstand|Wash-basin base cabinet w 2 doors, 50 × 65 cm|50|65|47|z=d2
+NYSJÖN|washstand|Wash-basin cabinet, 50 × 83 cm|50|83|47|z=d1
+NYSJÖN / BJÖRKÅN|washstand|Wash-basin base cabinet w 2 doors, 54 × 40 × 80 cm|54|80|40|z=d2,basin=15
+NYSJÖN / BJÖRKÅN|washstand|Wash-stnd w door/wash-basin/tap, 54 × 40 × 88 cm|54|88|40|z=d1,basin=16
OLSERÖD|side|Side table, 53 × 50 cm|53|50|50
OMAR|open|Shelving unit, 46 × 36 × 94 cm|46|94|36
OMAR|open|Shelving unit, 46 × 36 × 181 cm|46|181|36
@@ -950,6 +990,17 @@ TÅNEBRO|side|Side table, 46 cm|46|50|46|round=1
TÄNNFORSEN|cabinet|High cabinet with door, 40 × 35 × 195 cm|40|195|35|doors=1
TÄNNFORSEN|wallcab|Wall cabinet with door, 40 × 15 × 95 cm|40|95|15|doors=1
TÄNNFORSEN|wallcab|Mirror cabinet with doors, 80 × 15 × 95 cm|80|95|15
+TÄNNFORSEN|washstand|Wash-stand with doors, 80 × 48 × 63 cm|80|63|48|z=d2,hung=1
+TÄNNFORSEN|washstand|Wash-stand with drawers, 80 × 48 × 63 cm|80|63|48|z=r2,hung=1
+TÄNNFORSEN / ORRSJÖN|washstand|Wash-stnd w drs/deep wash-basin/tap, 62 × 49 × 72 cm|62|72|49|z=d2,basin=9,hung=1
+TÄNNFORSEN / ORRSJÖN|washstand|Wash-stnd w doors/wash-basin, 82 × 49 × 71 cm|82|71|49|z=d2,basin=8,hung=1
+TÄNNFORSEN / ORRSJÖN|washstand|Wash-stnd w drawers/wash-basin, 82 × 49 × 71 cm|82|71|49|z=r2,basin=8,hung=1
+TÄNNFORSEN / ORRSJÖN|washstand|Wash-stnd w drawers/wash-basin, 102 × 49 × 69 cm|102|69|49|z=r2,basin=6,hung=1||tannforsen-orrsjon-wash-stnd-w-drawers-wash-basi-2
+TÄNNFORSEN / ORRSJÖN|washstand|Wash-stand/wash-basin, 102 × 49 × 71 cm|102|71|49|z=r2,basin=8,hung=1
+TÄNNFORSEN / RUTSJÖN|washstand|Wash-stnd w doors/wash-basin, 82 × 49 × 74 cm|82|74|49|z=d2,basin=11,hung=1
+TÄNNFORSEN / RUTSJÖN|washstand|Wash-stnd w drawers/wash-basin, 82 × 49 × 74 cm|82|74|49|z=r2,basin=11,hung=1
+TÄNNFORSEN / VÄSTERSJÖN|washstand|Wash-stnd w doors/wash-basin, 62 × 49 × 79 cm|62|79|49|z=d2,basin=16,hung=1
+TÄNNFORSEN / VÄSTERSJÖN|washstand|Wash-stnd w drawers/wash-basin, 102 × 49 × 79 cm|102|79|49|z=r2,basin=16,hung=1
TÄRNKULLEN|bed|Upholstered bed frame, Standard Double, 135 × 190 cm|151|100|199|m=135,l=190
TÄRNÖ|chair|Chair, outdoor|44|88|50||outdoor garden
TÄRNÖ|dining|Table, outdoor, 55 × 54 cm|55|74|54||outdoor garden
diff --git a/src/lib/ikea.ts b/src/lib/ikea.ts
index bf6e7b4..1ed0ab7 100644
--- a/src/lib/ikea.ts
+++ b/src/lib/ikea.ts
@@ -23,9 +23,9 @@ export interface IkeaRow {
slug?: string;
}
-const X_KEYS = ["rows", "cols", "knobs", "plinth", "doors", "shelves", "c", "m", "l", "f", "seats", "arms", "legs", "attach", "shelf", "min", "round", "seatH", "chaise", "corner", "open", "sd", "drawer", "leaves", "leaf", "under", "mats", "dtop", "rail", "slides", "n", "of", "hinge"] as const;
-const FLAGS = new Set<string>(["plinth", "shelf", "round", "open", "drawer", "dtop", "rail", "hinge"]);
-const WORDS = new Set<string>(["knobs", "arms", "legs", "attach", "chaise", "corner", "under", "of"]);
+const X_KEYS = ["rows", "cols", "knobs", "plinth", "doors", "shelves", "c", "m", "l", "f", "seats", "arms", "legs", "attach", "shelf", "min", "round", "seatH", "chaise", "corner", "open", "sd", "drawer", "leaves", "leaf", "under", "mats", "dtop", "rail", "slides", "n", "of", "hinge", "use", "z", "basin", "hung"] as const;
+const FLAGS = new Set<string>(["plinth", "shelf", "round", "open", "drawer", "dtop", "rail", "hinge", "hung"]);
+const WORDS = new Set<string>(["knobs", "arms", "legs", "attach", "chaise", "corner", "under", "of", "use", "z"]);
export function encodeX(x: X): string {
const out: string[] = [];
diff --git a/src/lib/plan/cabinet.ts b/src/lib/plan/cabinet.ts
index b27b390..406f2db 100644
--- a/src/lib/plan/cabinet.ts
+++ b/src/lib/plan/cabinet.ts
@@ -2,6 +2,7 @@ import type { CabinetParams, ProductSpec, Vec3 } from "../types";
import { HW, PlanBuilder, type FitOpts } from "./builder";
import { FrameKit } from "./frame";
import { clamp } from "./math";
+import { buildFitted } from "./fitted";
import { buildMixed } from "./mixed";
import { buildSliding } from "./sliding";
@@ -21,6 +22,7 @@ export function defaultsCabinet(s: ProductSpec): CabinetParams {
}
export function buildCabinet(b: PlanBuilder, s: ProductSpec) {
+ if (s.cabinet?.fit) return buildFitted(b, s);
if (s.cabinet?.drawers) return buildMixed(b, s);
if (s.cabinet?.fronts === "sliding") return buildSliding(b, s);
const p = defaultsCabinet(s);
diff --git a/src/lib/plan/fitted.ts b/src/lib/plan/fitted.ts
new file mode 100644
index 0000000..2e3daf6
--- /dev/null
+++ b/src/lib/plan/fitted.ts
@@ -0,0 +1,446 @@
+import type { FitUse, FitZone, PartMaterial, PartPiece, ProductSpec, Vec3 } from "../types";
+import { HW, PlanBuilder, type FitOpts } from "./builder";
+import { FrameKit } from "./frame";
+import { clamp } from "./math";
+
+/** The last step: what goes in afterwards, and who connects it. The guide never covers plumbing, gas or electrics. */
+const READY: Record<FitUse, [string, string]> = {
+ basin: ["Ready for the basin", "Fit the basin, the tap and the drain following their own instructions, or ask a plumber."],
+ sink: ["Ready for the sink", "Fit the sink, the tap and the drain following their own instructions, or ask a plumber."],
+ hob: ["Ready for the hob", "The hob goes in the worktop above. Have a qualified electrician connect it, or a gas engineer for gas."],
+ oven: ["Ready for the oven", "Fit the oven following its own instructions. Have a qualified electrician connect it."],
+ ovenhob: ["Ready for the oven and hob", "Fit them following their own instructions. Have a qualified electrician connect them."],
+ fridge: ["Ready for the fridge", "Fit the fridge or freezer following its own instructions."],
+ microwave: ["Ready for the microwave", "Fit the microwave following its own instructions."],
+ hood: ["Ready for the extractor hood", "Fit the hood following its own instructions. Have a qualified electrician connect it."],
+ appliance: ["Ready for the appliances", "Fit each one following its own instructions. Have a qualified electrician connect them."],
+};
+
+interface Band {
+ z: FitZone;
+ lo: number; // mm, the band's share of the front
+ hi: number;
+}
+
+interface Drawer {
+ front: string;
+ sides: [string, string];
+ back: string;
+ bottom: string;
+ ys: number; // bottom of its slot
+ slotH: number;
+ sh: number; // height of its sides
+}
+
+interface Door {
+ key: string;
+ x: number;
+ sgn: number; // the hinge side: -1 left, 1 right
+ lo: number;
+ dh: number;
+ dw: number;
+}
+
+/**
+ * Cabinets built around something fitted afterwards: wash-stands under a basin, kitchen base cabinets under a sink or a hob,
+ * and cabinets with room for an oven, a fridge or a microwave. The front is split into bands from the bottom up: drawers,
+ * doors, a fixed front in front of a sink, an opening for the appliance, open shelves, or room for a sink's own front.
+ * Built like any cabinet: runners onto the sides while they lie flat, the carcass with a fixed shelf wherever a band ends,
+ * the back, then shelves, doors, fronts and drawers. A wash-stand is hung on the wall before its fronts go on.
+ * A basin that comes in the box goes on top last; otherwise a closing step says what is fitted separately, and by whom.
+ */
+export function buildFitted(b: PlanBuilder, s: ProductSpec) {
+ const c = s.cabinet ?? {};
+ const fit = c.fit!;
+ const basinH = fit.basin ? clamp(fit.basin, 3, 20) * 10 : 0;
+ // with a basin in the box the size is the whole thing: the cabinet is a little narrower and shallower than the basin
+ const W = (s.size.w - (basinH ? 2 : 0)) * 10, D = (s.size.d - (basinH ? 1 : 0)) * 10;
+ const H = s.size.h * 10 - basinH;
+ const t = clamp(c.thickness ?? 18, 12, 25);
+ const wall = !!c.wall;
+ const plinth = !wall && (c.plinth ?? true);
+ const base = plinth ? 70 : 0;
+ const handles = c.handles ?? "bar";
+ const lying = H > 1100;
+
+ /* ---------- bands ---------- */
+ const zones: FitZone[] = fit.zones.length ? fit.zones : [{ kind: "doors", h: 0 }];
+ const span = H - base;
+ const fixedSum = zones.reduce((a, z) => a + (z.h > 0 ? z.h * 10 : 0), 0);
+ const flex = zones.filter((z) => !(z.h > 0)).length;
+ const hs =
+ flex && span - fixedSum >= 120 * flex
+ ? zones.map((z) => (z.h > 0 ? z.h * 10 : (span - fixedSum) / flex))
+ : (() => {
+ // the bands don't fit as given (the plinth takes its share): shrink them all alike
+ const want = zones.map((z) => (z.h > 0 ? z.h * 10 : 400));
+ const sum = want.reduce((a, v) => a + v, 0);
+ return want.map((v) => (v * span) / sum);
+ })();
+ const bands: Band[] = [];
+ let yy = base;
+ zones.forEach((z, i) => {
+ bands.push({ z, lo: Math.round(yy), hi: Math.round(yy + hs[i]) });
+ yy += hs[i];
+ });
+ // a fixed shelf wherever one band ends and the next begins, except behind a front that only covers the sink
+ const shelfAt = (i: number) => {
+ const lo = bands[i].z.kind, up = bands[i + 1].z.kind;
+ return lo !== "front" && up !== "front" && up !== "apron" && !(lo === "drawers" && up === "drawers");
+ };
+ const fixed: number[] = [];
+ for (let i = 0; i < bands.length - 1; i++) if (shelfAt(i)) fixed.push(bands[i].hi);
+ /** The inside of a band: from the panel under it to the one over it. */
+ const inner = (i: number): [number, number] => [
+ i === 0 ? base + t : shelfAt(i - 1) ? bands[i].lo + t / 2 : bands[i].lo,
+ i === bands.length - 1 ? H - t : shelfAt(i) ? bands[i].hi - t / 2 : bands[i].hi,
+ ];
+
+ const f = new FrameKit(b, { W, H, D, t, base, plinth, fixed, back: true, pinRows: false, lying, rails: !!fit.rails, names: { fixed: "Fixed shelf" } });
+ const fz = D / 2 + t / 2; // fronts sit on the front edge of the carcass
+ const r1 = (n: number) => Math.round(n * 10) / 10;
+ const types = new Map<string, string>();
+ const typeOf = (name: string, size: Vec3, material?: PartMaterial) => {
+ const key = `${name}|${size.join(",")}`;
+ let id = types.get(key);
+ if (!id) types.set(key, (id = b.part(name, size, material ? { material } : {})));
+ return id;
+ };
+
+ /* ---------- drawers ---------- */
+ const runLen = Math.round((D - 60) / 10) * 10;
+ const runner = { kind: "runner" as const, len: runLen, dia: 20 };
+ const bw = W - 2 * t - 26;
+ const dd = D - 50;
+ const zBox = D / 2 - dd / 2;
+ const drawers: Drawer[] = [];
+ bands.forEach((bd, i) => {
+ if (bd.z.kind !== "drawers") return;
+ const n = clamp(Math.round(bd.z.n ?? 1), 1, 5);
+ const [lo, hi] = inner(i);
+ const slotH = (hi - lo) / n;
+ const fh = r1((bd.hi - bd.lo) / n - 4);
+ const sh = r1(clamp(slotH - 46, 60, 170));
+ const frT = typeOf("Drawer front", [W - 4, fh, t]);
+ const dsT = typeOf("Drawer side", [12, sh, dd]);
+ const dbT = typeOf("Drawer back", [bw - 24, sh - 22, 12]);
+ const dbtT = typeOf("Drawer bottom", [bw - 10, 3, dd - 8], "fiber");
+ for (let r = 0; r < n; r++) {
+ const ys = lo + r * slotH;
+ const sy = ys + 24 + sh / 2;
+ drawers.push({
+ ys,
+ slotH,
+ sh,
+ front: b.place(frT, [0, bd.lo + 2 + r * (fh + 4) + fh / 2, fz]),
+ sides: [b.place(dsT, [-bw / 2 + 6, sy, zBox]), b.place(dsT, [bw / 2 - 6, sy, zBox])],
+ back: b.place(dbT, [0, ys + 24 + 22 + (sh - 22) / 2, D / 2 - dd + 6]),
+ bottom: b.place(dbtT, [0, ys + 24 + 9, zBox - 2]),
+ });
+ }
+ });
+
+ /* ---------- doors and fixed fronts ---------- */
+ const doors: Door[] = [];
+ const fronts: string[] = [];
+ for (const bd of bands) {
+ const dh = r1(bd.hi - bd.lo - 4);
+ if (bd.z.kind === "doors") {
+ const nd = bd.z.n === 2 ? 2 : 1;
+ const dw = nd === 2 ? W / 2 - 3 : W - 4;
+ const T = typeOf("Door", [dw, dh, t]);
+ for (let i = 0; i < nd; i++) {
+ const x = nd === 2 ? (i === 0 ? -1 : 1) * (W / 4) : 0;
+ doors.push({ key: b.place(T, [x, bd.lo + 2 + dh / 2, fz]), x, sgn: nd === 2 && i === 1 ? 1 : -1, lo: bd.lo + 2, dh, dw });
+ }
+ } else if (bd.z.kind === "front") fronts.push(b.place(typeOf("Fixed front", [W - 4, dh, t]), [0, bd.lo + 2 + dh / 2, fz]));
+ }
+
+ /* ---------- shelves: open bands, and behind doors ---------- */
+ const shelfYs: number[] = [];
+ bands.forEach((bd, i) => {
+ const n = bd.z.kind === "open" ? (bd.z.n ?? 0) : bd.z.kind === "doors" ? (bd.z.shelves ?? 0) : 0;
+ if (!n) return;
+ const [lo, hi] = inner(i);
+ if (hi - lo < 150 * (n + 1)) return;
+ for (let k = 1; k <= n; k++) shelfYs.push(Math.round((lo + ((hi - lo) * k) / (n + 1)) / 32) * 32);
+ });
+
+ /* ---------- a basin in the box: a bowl with a deck at the back for the tap ---------- */
+ let basin: string | undefined;
+ if (basinH) {
+ const BW = s.size.w * 10, BD = s.size.d * 10;
+ const wt = 26, floor = 14, deck = 90;
+ const ht = basinH - floor, yw = floor + ht / 2;
+ const pieces: PartPiece[] = [
+ { shape: "box", size: [BW, floor, BD], pos: [0, floor / 2, 0] },
+ { shape: "box", size: [BW, ht, wt], pos: [0, yw, BD / 2 - wt / 2] },
+ { shape: "box", size: [BW, ht, deck], pos: [0, yw, -BD / 2 + deck / 2] },
+ { shape: "box", size: [wt, ht, BD - wt - deck], pos: [-BW / 2 + wt / 2, yw, (deck - wt) / 2] },
+ { shape: "box", size: [wt, ht, BD - wt - deck], pos: [BW / 2 - wt / 2, yw, (deck - wt) / 2] },
+ ];
+ const bc = b.compound("Wash-basin", pieces);
+ // the backs line up, so the basin's lip reaches past the front
+ basin = b.place(bc.type, [bc.mid[0], H + bc.mid[1], -D / 2 + BD / 2 + bc.mid[2]]);
+ }
+
+ /* ---------- steps: the carcass ---------- */
+ f.prepSides();
+ if (drawers.length) {
+ b.step(
+ {
+ title: drawers.length > 1 ? "Screw the drawer runners onto the sides" : "Screw the drawer runner onto each side",
+ detail: "The open end of each runner points to the front.",
+ tools: ["screwdriver"],
+ scene: "prep",
+ kind: "runners",
+ warnings: ["face"],
+ },
+ () => {
+ const list: FitOpts[] = [];
+ const screws: FitOpts[] = [];
+ f.sides.forEach((side, i) => {
+ const xi = i === 0 ? -W / 2 + t : W / 2 - t;
+ const into: Vec3 = [i === 0 ? -1 : 1, 0, 0];
+ for (const d of drawers) {
+ const y = d.ys + 14;
+ list.push({ on: side, at: [xi, y, D / 2 - runLen / 2 - 8], dir: into, hole: false });
+ for (const dz of [-runLen / 2 + 30, runLen / 2 - 30]) screws.push({ on: side, at: [xi + (i === 0 ? 12 : -12), y, D / 2 - runLen / 2 - 8 + dz], dir: into, hole: false });
+ }
+ });
+ b.fits(runner, list, 0.12);
+ b.then(0.1);
+ b.fits(HW.screwS, screws, 0.04);
+ },
+ );
+ }
+ f.join(H > 1500 ? 2 : 1);
+ f.otherSide(H > 1500 ? 2 : 1);
+ f.cams();
+ f.plinthStep();
+ f.backSteps();
+ f.standUp();
+
+ if (shelfYs.length) {
+ const shT = b.part("Shelf", [W - 2 * t - 3, t, D - 26]);
+ const shelves = shelfYs.map((y) => b.place(shT, [0, y + 3 + t / 2, 11]));
+ for (const y0 of shelfYs)
+ for (const dy of [-64, 0, 64])
+ for (const [i, side] of f.sides.entries()) {
+ const xi = i === 0 ? -W / 2 + t : W / 2 - t;
+ for (const z of [D / 2 - 40, -D / 2 + 40]) b.hole(side, [xi, y0 + dy, z], [i === 0 ? 1 : -1, 0, 0], 2.5);
+ }
+ b.step(
+ {
+ title: shelves.length > 1 ? "Add the shelf pins and shelves" : "Add the shelf pins and the shelf",
+ detail: "Pick any height you like. Use the same hole on all four corners.",
+ kind: "shelves",
+ },
+ () => {
+ const pins: FitOpts[] = [];
+ for (const y of shelfYs)
+ for (const [i, sd] of f.sides.entries()) {
+ const x = i === 0 ? -W / 2 + t : W / 2 - t;
+ for (const z of [D / 2 - 40, -D / 2 + 40]) pins.push({ on: sd, at: [x, y, z], dir: [i === 0 ? -1 : 1, 0, 0], hole: false });
+ }
+ b.fits(HW.pin, pins, 0.05);
+ b.then(0.2);
+ b.stagger(0.25);
+ shelves.forEach((k) => b.add(k, [0, 0, 420]));
+ },
+ );
+ }
+
+ // a wash-stand goes up empty, so it's light: the fronts go on once it hangs
+ if (wall && fit.hangFirst) f.hang();
+
+ /* ---------- doors ---------- */
+ if (doors.length) {
+ const many = doors.length > 1;
+ const hingeYs = (d: Door) => {
+ const hn = d.dh > 1500 ? 4 : d.dh > 900 ? 3 : 2;
+ return Array.from({ length: hn }, (_, i) => d.lo + 108 + (i * (d.dh - 216)) / (hn - 1));
+ };
+ const total = doors.reduce((a, d) => a + d.dw, 0) + 80 * (doors.length - 1);
+ b.step(
+ {
+ title: many ? "Press the hinges into the doors" : "Press the hinges into the door",
+ detail: "Two small screws hold each one.",
+ tools: ["screwdriver"],
+ scene: "doors",
+ kind: "hinges",
+ warnings: ["floor"],
+ },
+ () => {
+ b.stagger(0.2);
+ let x0 = -total / 2;
+ for (const d of doors) {
+ b.stage(d.key, [x0 + d.dw / 2, t / 2, 0], [Math.PI / 2, 0, 0], [0, 160, 0]);
+ x0 += d.dw + 80;
+ }
+ b.then(0.1);
+ const hinges: FitOpts[] = [];
+ const screws: FitOpts[] = [];
+ for (const d of doors) {
+ const x = d.sgn * (W / 2 - 22);
+ for (const y of hingeYs(d)) {
+ hinges.push({ on: d.key, at: [x, y, D / 2], dir: [0, 0, 1], twist: d.sgn > 0 ? Math.PI : 0 });
+ for (const dy of [-24, 24]) screws.push({ on: d.key, at: [x + d.sgn * 4, y + dy, D / 2], dir: [0, 0, 1], hole: false });
+ }
+ }
+ b.fits(HW.hinge, hinges, 0.1);
+ b.then(0.05);
+ b.fits(HW.screwS, screws, 0.03);
+ },
+ );
+ const tall = doors.some((d) => d.dh > 1500);
+ b.step(
+ {
+ title: many ? "Hang the doors" : "Hang the door",
+ detail: "Slide each hinge arm onto its plate until it clicks.",
+ kind: "doors",
+ people: tall ? 2 : 1,
+ warnings: tall ? ["two"] : [],
+ },
+ () => {
+ b.stagger(0.35);
+ doors.forEach((d) => b.add(d.key, [0, 0, 380]));
+ },
+ );
+ b.step(
+ {
+ title: many ? "Line up the doors" : "Line up the door",
+ detail: "Turn the hinge screws a little until the gaps look even.",
+ tools: ["screwdriver"],
+ kind: "doors",
+ },
+ () => {},
+ );
+ }
+
+ /* ---------- a fixed front, in front of the sink ---------- */
+ if (fronts.length) {
+ b.step(
+ {
+ title: "Screw on the fixed front",
+ detail: "It doesn't open. Screw it on from the inside, through the front rail.",
+ tools: ["screwdriver"],
+ kind: "screws",
+ },
+ () => {
+ b.stagger(0.3);
+ fronts.forEach((k) => b.add(k, [0, 0, 340]));
+ b.then(0.1);
+ const list: FitOpts[] = [];
+ for (const k of fronts) {
+ const y = b.partItem(k).final.pos[1];
+ for (const x of [-W / 2 + t + 60, W / 2 - t - 60]) list.push({ on: k, at: [x, y, D / 2], dir: [0, 0, 1], hole: false });
+ }
+ b.fits(HW.screwM, list, 0.12);
+ },
+ );
+ }
+
+ /* ---------- drawers ---------- */
+ if (drawers.length) {
+ const n = drawers.length;
+ const d0 = drawers[0];
+ const c0: Vec3 = [0, d0.ys + d0.slotH / 2, zBox];
+ const at = (k: string) => b.partItem(k).final.pos;
+ const rel = (k: string): Vec3 => [at(k)[0] - c0[0], at(k)[1] - c0[1], at(k)[2] - c0[2]];
+ const backScrews = (d: Drawer): FitOpts[] => {
+ const bp = at(d.back);
+ return d.sides.flatMap((sd, i) => {
+ const xo = at(sd)[0] + (i === 0 ? -6 : 6);
+ return [-(d.sh - 22) / 4, (d.sh - 22) / 4].map((dy) => ({ on: sd, at: [xo, bp[1] + dy, bp[2]] as Vec3, dir: [i === 0 ? 1 : -1, 0, 0] as Vec3 }));
+ });
+ };
+ b.step(
+ {
+ title: n > 1 ? "Put the drawers together" : "Put the drawer together",
+ detail: "Sides onto the front, slide the bottom in along the grooves, then screw on the back.",
+ tools: ["screwdriver"],
+ scene: "drawer",
+ pose: "-z",
+ repeat: n > 1 ? n : undefined,
+ kind: "drawer",
+ warnings: ["floor"],
+ },
+ () => {
+ b.stage(d0.front, rel(d0.front), [0, 0, 0], [0, 0, -160]);
+ b.then(0.1);
+ b.stagger(0.25);
+ for (const sd of d0.sides) b.stage(sd, rel(sd), [0, 0, 0], [0, 0, -300]);
+ b.then(0.1);
+ b.stage(d0.bottom, rel(d0.bottom), [0, 0, 0], [0, 0, -420]);
+ b.then(0.1);
+ b.stage(d0.back, rel(d0.back), [0, 0, 0], [0, 0, -260]);
+ b.then(0.15);
+ b.fits(HW.screwM, backScrews(d0), 0.12);
+ },
+ );
+ b.step(
+ {
+ title: n > 2 ? `Slide in all ${n} drawers` : n > 1 ? "Slide in both drawers" : "Slide in the drawer",
+ detail: "Rest the back on the runners, then push until it clicks closed.",
+ kind: "drawer",
+ weight: 0.8 + 0.5 * n,
+ },
+ () => {
+ for (const [i, d] of drawers.entries()) {
+ b.stagger(0);
+ for (const k of [d.front, d.sides[0], d.sides[1], d.back, d.bottom]) b.add(k, [0, 0, 520]);
+ if (i > 0) for (const o of backScrews(d)) b.preset(HW.screwM, o);
+ b.wait(0.22);
+ }
+ },
+ );
+ }
+
+ /* ---------- knobs or handles on every front ---------- */
+ const faces = doors.length + drawers.length + fronts.length;
+ if (handles !== "none" && faces) {
+ const bar = handles === "bar";
+ const one = faces === 1;
+ b.step(
+ {
+ title: bar ? (one ? "Screw on the handle" : "Screw on the handles") : one ? "Screw on the knob" : "Screw on the knobs",
+ detail: doors.length && (drawers.length || fronts.length) ? "Screw from the inside of each door and drawer. Snug is enough." : "Screw from the inside. Snug is enough.",
+ tools: ["screwdriver"],
+ kind: "screws",
+ },
+ () => {
+ const list: FitOpts[] = doors.map((d) => {
+ const x = d.x - d.sgn * (d.dw / 2 - 40);
+ // a wall cabinet opens from the bottom edge, a base cabinet from the top, a tall door at hand height
+ const y = wall && !fit.hangFirst ? d.lo + 80 : clamp(1000, d.lo + 80, d.lo + d.dh - 80);
+ return { on: d.key, at: [x, y, D / 2 + t], dir: [0, 0, -1], hole: false, twist: bar ? Math.PI / 2 : 0 };
+ });
+ for (const k of [...drawers.map((d) => d.front), ...fronts]) list.push({ on: k, at: [0, b.partItem(k).final.pos[1], D / 2 + t], dir: [0, 0, -1], hole: false });
+ b.fits(bar ? HW.handle : HW.knob, list, 0.1);
+ },
+ );
+ }
+
+ if (wall && !fit.hangFirst) f.hang();
+ else if (!wall && H >= 800) f.anchor();
+
+ /* ---------- the basin last, or what comes next ---------- */
+ if (basin) {
+ const big = W > 900;
+ b.step(
+ {
+ title: "Set the basin on top",
+ detail: "Lower it gently onto the frame and check that it sits level. Fit the tap and the drain following their own instructions, or ask a plumber.",
+ kind: "general",
+ people: big ? 2 : 1,
+ warnings: big ? ["two"] : [],
+ },
+ () => b.add(basin!, [0, 260, 0]),
+ );
+ } else {
+ const [title, detail] = READY[fit.use];
+ const apron = bands.some((bd) => bd.z.kind === "apron");
+ b.step({ title, detail: apron ? "The sink's own front fills the space at the top. " + detail : detail, kind: "general" }, () => {});
+ }
+}
diff --git a/src/lib/plan/frame.ts b/src/lib/plan/frame.ts
index 4395b8b..7f93578 100644
--- a/src/lib/plan/frame.ts
+++ b/src/lib/plan/frame.ts
@@ -18,6 +18,20 @@ export interface FrameOpts {
pinRows: boolean;
lying: boolean;
names?: { side?: string; top?: string; bottom?: string; fixed?: string };
+ /** two rails across the top, front and back, instead of a top panel: room for a basin, a sink or a hob */
+ rails?: boolean;
+}
+
+/** A panel joined between the sides. Rails are narrow, so they say where their dowels and bolts go. */
+interface Joint {
+ key: string;
+ y: number;
+ camDir: 1 | -1;
+ face: number;
+ zd?: number[];
+ zb?: number[];
+ /** a front rail: the back panel isn't nailed to it */
+ front?: boolean;
}
export class FrameKit {
@@ -29,7 +43,9 @@ export class FrameKit {
backPanel?: string;
pose: Pose;
innerW: number;
- joints: { key: string; y: number; camDir: 1 | -1; face: number }[] = [];
+ joints: Joint[] = [];
+ /** the front rail, when there are rails instead of a top; `top` is then the back one */
+ frontRail?: string;
pinYs: number[] = [];
constructor(
@@ -58,11 +74,21 @@ export class FrameKit {
this.sides = [b.place(sideT, [-sx, H / 2, 0]), b.place(sideT, [sx, H / 2, 0], [0, Math.PI, 0])];
const iw = W - 2 * t;
- const topT = b.part(o.names?.top ?? "Top panel", [iw, t, D]);
- this.top = b.place(topT, [0, H - t / 2, 0]);
+ if (o.rails) {
+ const rd = 100;
+ const railT = b.part(o.names?.top ?? "Top rail", [iw, t, rd]);
+ const zr = -D / 2 + rd / 2, zf = D / 2 - rd / 2;
+ this.top = b.place(railT, [0, H - t / 2, zr]);
+ this.frontRail = b.place(railT, [0, H - t / 2, zf]);
+ this.joints.push({ key: this.top, y: H - t / 2, camDir: 1, face: H - t, zd: [zr - 22], zb: [zr + 22] });
+ this.joints.push({ key: this.frontRail, y: H - t / 2, camDir: 1, face: H - t, zd: [zf + 22], zb: [zf - 22], front: true });
+ } else {
+ const topT = b.part(o.names?.top ?? "Top panel", [iw, t, D]);
+ this.top = b.place(topT, [0, H - t / 2, 0]);
+ }
const botT = b.part(o.names?.bottom ?? "Bottom panel", [iw, t, D]);
this.bottom = b.place(botT, [0, base + t / 2, 0]);
- this.joints.push({ key: this.top, y: H - t / 2, camDir: 1, face: H - t });
+ if (!o.rails) this.joints.push({ key: this.top, y: H - t / 2, camDir: 1, face: H - t });
this.joints.push({ key: this.bottom, y: base + t / 2, camDir: -1, face: base + t });
if (o.fixed.length) {
const fxT = b.part(o.names?.fixed ?? "Fixed shelf", [iw, t, D - 4]);
@@ -121,8 +147,8 @@ export class FrameKit {
const xi = i === 0 ? -W / 2 + t : W / 2 - t;
const into: Vec3 = [i === 0 ? -1 : 1, 0, 0];
for (const j of this.joints) {
- for (const z of [-this.zd, this.zd]) dowels.push({ on: side, at: [xi, j.y, z], dir: into, mate: j.key });
- for (const z of [-this.zb, this.zb]) bolts.push({ on: side, at: [xi, j.y, z], dir: into, mate: j.key, mateHole: 4 });
+ for (const z of j.zd ?? [-this.zd, this.zd]) dowels.push({ on: side, at: [xi, j.y, z], dir: into, mate: j.key });
+ for (const z of j.zb ?? [-this.zb, this.zb]) bolts.push({ on: side, at: [xi, j.y, z], dir: into, mate: j.key, mateHole: 4 });
}
if (this.plinth) dowels.push({ on: side, at: [xi, o.base / 2, D / 2 - t / 2 - 12], dir: into, mate: this.plinth });
});
@@ -186,7 +212,7 @@ export class FrameKit {
const list: Parameters<PlanBuilder["fits"]>[1] = [];
for (const j of this.joints) {
for (const x of [-W / 2 + t + 24, W / 2 - t - 24])
- for (const z of [-this.zb, this.zb]) list.push({ on: j.key, at: [x, j.face, z], dir: [0, j.camDir, 0] });
+ for (const z of j.zb ?? [-this.zb, this.zb]) list.push({ on: j.key, at: [x, j.face, z], dir: [0, j.camDir, 0] });
}
b.fits(HW.cam, list, 0.07);
},
@@ -257,6 +283,7 @@ export class FrameKit {
}
const nx = Math.max(2, Math.round((W - 2 * t) / 180));
for (const j of this.joints) {
+ if (j.front) continue;
for (const x of pts(-W / 2 + t + 40, W / 2 - t - 40, nx)) list.push({ on: j.key, at: [x, j.y, z], dir: [0, 0, 1], hole: false });
}
// corners first
diff --git a/src/lib/products.ts b/src/lib/products.ts
index 4f21d81..0427719 100644
--- a/src/lib/products.ts
+++ b/src/lib/products.ts
@@ -1,4 +1,4 @@
-import type { Archetype, ProductSpec } from "./types";
+import type { Archetype, FitUse, FitZone, ProductSpec } from "./types";
/**
* A wide offline index of real IKEA product names. Each row is a kind plus outer size (cm);
@@ -49,7 +49,8 @@ export type Kind =
| "bookrow"
| "cabrow"
| "section"
- | "gateleg";
+ | "gateleg"
+ | "washstand";
export type X = {
rows?: number;
@@ -85,6 +86,10 @@ export type X = {
n?: number;
of?: "bookcase" | "cabinet" | "tv" | "wardrobe" | "wallcab";
hinge?: boolean;
+ use?: FitUse;
+ z?: string;
+ basin?: number;
+ hung?: boolean;
};
export type Row = [name: string, kind: Kind, variant: string, w: number, h: number, d: number, x?: X, keywords?: string];
@@ -258,7 +263,7 @@ const MIN: Record<Kind, number> = {
cube: 40, bookcase: 50, open: 40, chest: 90, nightstand: 40, desk: 25, coffee: 20, side: 15, dining: 40,
bed: 100, wardrobe: 120, cabinet: 60, sideboard: 80, tv: 60, shoe: 45, chair: 25, stool: 12, bench: 20, sofa: 40, armchair: 30,
wallshelf: 25, wallcab: 40, kitchen: 50, trolley: 25, bar: 35, console: 30, kidstable: 15, kidschair: 20,
- office: 20, chaise: 55, corner: 70, cot: 35, bunk: 90, loft: 75, dropleaf: 40, daybed: 60, mixed: 50, sliding: 110, slidecab: 60, bookrow: 120, cabrow: 120, section: 25, gateleg: 50,
+ office: 20, chaise: 55, corner: 70, cot: 35, bunk: 90, loft: 75, dropleaf: 40, daybed: 60, mixed: 50, sliding: 110, slidecab: 60, bookrow: 120, cabrow: 120, section: 25, gateleg: 50, washstand: 35,
};
const CATEGORY: Record<Kind, string> = {
@@ -267,7 +272,7 @@ const CATEGORY: Record<Kind, string> = {
cabinet: "Cabinet", sideboard: "Sideboard", tv: "TV bench", shoe: "Shoe cabinet", chair: "Chair", stool: "Stool",
bench: "Bench", sofa: "Sofa", armchair: "Armchair", wallshelf: "Wall shelf", wallcab: "Wall cabinet", kitchen: "Kitchen cabinet",
trolley: "Trolley", bar: "Bar table", console: "Console table", kidstable: "Children's table", kidschair: "Children's chair",
- office: "Office chair", chaise: "Sofa with chaise longue", corner: "Corner sofa", cot: "Cot", bunk: "Bunk bed", loft: "Loft bed", dropleaf: "Drop-leaf table", daybed: "Day-bed", mixed: "Cabinet with doors and drawers", sliding: "Wardrobe with sliding doors", slidecab: "Cabinet with sliding doors", bookrow: "Bookcase combination", cabrow: "Storage combination", section: "Sofa section", gateleg: "Gateleg table",
+ office: "Office chair", chaise: "Sofa with chaise longue", corner: "Corner sofa", cot: "Cot", bunk: "Bunk bed", loft: "Loft bed", dropleaf: "Drop-leaf table", daybed: "Day-bed", mixed: "Cabinet with doors and drawers", sliding: "Wardrobe with sliding doors", slidecab: "Cabinet with sliding doors", bookrow: "Bookcase combination", cabrow: "Storage combination", section: "Sofa section", gateleg: "Gateleg table", washstand: "Wash-stand",
};
export const KIND_ARCH: Record<Kind, Archetype> = {
@@ -275,7 +280,7 @@ export const KIND_ARCH: Record<Kind, Archetype> = {
side: "table", dining: "table", bed: "bed", wardrobe: "cabinet", cabinet: "cabinet", sideboard: "cabinet", tv: "cabinet",
shoe: "cabinet", chair: "seat", stool: "seat", bench: "seat", sofa: "sofa", armchair: "sofa", wallshelf: "shelf", wallcab: "cabinet",
kitchen: "cabinet", trolley: "table", bar: "table", console: "table", kidstable: "table", kidschair: "seat",
- office: "seat", chaise: "sofa", corner: "sofa", cot: "bed", bunk: "bed", loft: "bed", dropleaf: "table", daybed: "bed", mixed: "cabinet", sliding: "cabinet", slidecab: "cabinet", bookrow: "shelf", cabrow: "cabinet", section: "sofa", gateleg: "table",
+ office: "seat", chaise: "sofa", corner: "sofa", cot: "bed", bunk: "bed", loft: "bed", dropleaf: "table", daybed: "bed", mixed: "cabinet", sliding: "cabinet", slidecab: "cabinet", bookrow: "shelf", cabrow: "cabinet", section: "sofa", gateleg: "table", washstand: "cabinet",
};
const round = (x: X) => (x.round ? { round: true } : {});
@@ -288,6 +293,50 @@ const ROW_CATEGORY: Record<NonNullable<X["of"]>, string> = {
wallcab: "Wall cabinet combination",
};
+const ZONE_KIND = { r: "drawers", d: "doors", f: "front", g: "gap", o: "open", a: "apron" } as const;
+
+/**
+ * A fitted cabinet's front from the bottom up, as "r2@80+g@60+d1": r drawers, d doors, f a fixed front, g an opening for
+ * an appliance, o open shelves, a room for a sink's own front. The digit is how many (s1 adds a shelf behind doors),
+ * @ the band's height in cm; a band without one shares out what is left.
+ */
+export function parseZones(z: string): FitZone[] {
+ const out: FitZone[] = [];
+ for (const tok of z.split("+")) {
+ const m = tok.match(/^([rdfgoa])(\d)?(?:s(\d))?(?:@(\d+))?$/);
+ if (!m) continue;
+ out.push({ kind: ZONE_KIND[m[1] as keyof typeof ZONE_KIND], h: Number(m[4] ?? 0), ...(m[2] ? { n: Number(m[2]) } : {}), ...(m[3] ? { shelves: Number(m[3]) } : {}) });
+ }
+ return out;
+}
+
+const FIT_USE: Partial<Record<Kind, FitUse>> = { washstand: "basin" };
+const FIT_FRONT: Partial<Record<Kind, string>> = { washstand: "r2" };
+
+/** Cabinets built around a basin, a sink or an appliance: x.z is the front, x.use what goes in, x.basin a basin in the box. */
+function fitted(kind: Kind, base: Omit<ProductSpec, "source">, w: number, h: number, x: X): Omit<ProductSpec, "source"> {
+ const use = x.use ?? FIT_USE[kind] ?? "appliance";
+ const zones = parseZones(x.z ?? FIT_FRONT[kind] ?? "d1");
+ const count = (k: FitZone["kind"]) => zones.reduce((a, q) => a + (q.kind === k ? (q.n ?? 1) : 0), 0);
+ const drawers = count("drawers"), doors = count("doors");
+ const hung = !!x.hung;
+ const tall = h > 150;
+ const fit = {
+ use,
+ zones,
+ ...(x.basin ? { basin: x.basin } : {}),
+ ...(["basin", "sink", "hob", "ovenhob"].includes(use) ? { rails: true } : {}),
+ ...(hung && use === "basin" ? { hangFirst: true } : {}),
+ };
+ return {
+ ...base,
+ minutes: x.min ?? MIN[kind] + 20 * drawers + 8 * doors + (tall ? 30 : 0) + (x.basin ? 10 : 0),
+ people: tall || w > 90 ? 2 : 1,
+ difficulty: drawers ? 3 : 2,
+ cabinet: { doors: 0, shelves: 0, rail: false, plinth: !hung, handles: x.knobs ?? "bar", thickness: 18, ...(hung ? { wall: true } : {}), fit },
+ };
+}
+
/** Turn a kind and a size into a full product spec. */
export function specFor(kind: Kind, name: string, variant: string, w: number, h: number, d: number, x: X = {}): Omit<ProductSpec, "source"> {
const big = h > 150 || w > 150;
@@ -400,6 +449,8 @@ export function specFor(kind: Kind, name: string, variant: string, w: number, h:
const seats = x.seats ?? 1;
return { ...base, minutes: x.min ?? MIN.section + 10 * seats, people: seats > 1 ? 2 : 1, sofa: { seats, arms: "none", legs: "round" } };
}
+ case "washstand":
+ return fitted(kind, base, w, h, x);
case "bookrow":
case "cabrow": {
// x.n units of kind x.of side by side, each drawn as its own guide would draw it
@@ -445,5 +496,5 @@ export const KIND_DEFAULT_SIZE: Record<Kind, [number, number, number]> = {
sideboard: [140, 85, 45], tv: [150, 50, 42], shoe: [60, 100, 28], chair: [44, 88, 50], stool: [35, 45, 35], bench: [100, 45, 38],
sofa: [210, 85, 92], armchair: [75, 90, 80], wallshelf: [60, 60, 22], wallcab: [60, 60, 35], kitchen: [60, 80, 60], trolley: [50, 80, 40],
bar: [120, 105, 60], console: [100, 79, 35], kidstable: [77, 48, 55], kidschair: [34, 60, 34],
- office: [64, 105, 64], chaise: [226, 85, 160], corner: [233, 85, 171], cot: [130, 84, 68], bunk: [211, 160, 100], loft: [211, 195, 100], dropleaf: [134, 75, 80], daybed: [207, 83, 91], mixed: [80, 120, 40], sliding: [118, 200, 60], slidecab: [80, 110, 45], bookrow: [160, 202, 28], cabrow: [240, 48, 42], section: [192, 83, 92], gateleg: [151, 75, 90],
+ office: [64, 105, 64], chaise: [226, 85, 160], corner: [233, 85, 171], cot: [130, 84, 68], bunk: [211, 160, 100], loft: [211, 195, 100], dropleaf: [134, 75, 80], daybed: [207, 83, 91], mixed: [80, 120, 40], sliding: [118, 200, 60], slidecab: [80, 110, 45], bookrow: [160, 202, 28], cabrow: [240, 48, 42], section: [192, 83, 92], gateleg: [151, 75, 90], washstand: [60, 83, 47],
};
diff --git a/src/lib/search.ts b/src/lib/search.ts
index 7203ecc..a100480 100644
--- a/src/lib/search.ts
+++ b/src/lib/search.ts
@@ -18,6 +18,7 @@ const CATEGORY_WORDS: [Kind, string[]][] = [
["office", ["office chair", "desk chair", "swivel chair", "gaming chair", "computer chair"]],
["bookrow", ["bookcase combination", "bookshelf combination"]],
["cabrow", ["tv bench combination", "tv unit combination", "media unit combination", "cabinet combination", "wardrobe combination", "closet combination", "wall cabinet combination"]],
+ ["washstand", ["wash stand", "washstand", "vanity", "vanity unit", "bathroom vanity", "basin unit", "basin cabinet", "wash basin cabinet", "washbasin cabinet", "bathroom cabinet", "sink vanity"]],
["shoe", ["shoe", "shoes", "shoe cabinet", "shoe rack"]],
["nightstand", ["nightstand", "bedside", "night stand"]],
["mixed", ["doors and drawers", "cabinet with drawers", "cupboard with drawers", "wardrobe with drawers", "armoire with drawers"]],
diff --git a/src/lib/types.ts b/src/lib/types.ts
index d3606e4..49e2f1e 100644
--- a/src/lib/types.ts
+++ b/src/lib/types.ts
@@ -64,6 +64,28 @@ export interface CabinetParams {
drawers?: number; // drawers as well as doors: full-width drawers, split from the doors by a fixed shelf
drawerAt?: "top" | "bottom"; // where the drawers are; under the doors unless it says top
slides?: number; // sliding doors: how many, running in two tracks
+ fit?: FitParams; // built around a basin, a sink or an appliance that is fitted afterwards
+}
+
+/** What a fitted cabinet is built around. The guide builds the cabinet only, and says so at the end. */
+export type FitUse = "basin" | "sink" | "hob" | "oven" | "ovenhob" | "fridge" | "microwave" | "hood" | "appliance";
+
+/** One band of a fitted cabinet's front, from the bottom up. */
+export interface FitZone {
+ // drawers, doors, a fixed front that doesn't open (in front of a sink), an opening for an appliance,
+ // open shelves, or room at the top for a sink's own front
+ kind: "drawers" | "doors" | "front" | "gap" | "open" | "apron";
+ h: number; // cm of the front; 0 shares out what is left
+ n?: number; // drawers in the band, doors side by side (1 or 2), or shelves when open
+ shelves?: number; // shelves behind the doors
+}
+
+export interface FitParams {
+ use: FitUse;
+ zones: FitZone[]; // from the bottom up
+ basin?: number; // cm: a wash-basin that comes in the box, this thick; size includes it, and it goes on top last
+ rails?: boolean; // two rails across the top instead of a top panel
+ hangFirst?: boolean; // hung on the wall before the fronts go on (wash-stands)
}
export interface SeatParams {