IKEA assembly, step by step: animated, manual-style 3D guides. Scan any paper manual with Together AI.
TypeScript
Draw kitchen base cabinets for a sink
Youssef3c9cfb6e2835
diff --git a/scripts/ikea/build.ts b/scripts/ikea/build.tsindex 9cc2d77..7273c75 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", "washstand"]);+const LATER_KINDS = new Set<Kind>(["office", "chaise", "corner", "cot", "bunk", "loft", "dropleaf", "daybed", "mixed", "sliding", "slidecab", "bookrow", "cabrow", "section", "gateleg", "washstand", "sinkcab"]);function baseMatch(name: string, draw: Draw): CatalogEntry | undefined {const fam = fold(name);diff --git a/scripts/ikea/check.ts b/scripts/ikea/check.tsindex 2ee5bd3..9cf9de9 100644--- a/scripts/ikea/check.ts+++ b/scripts/ikea/check.ts@@ -117,6 +117,9 @@ async function main() {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");+ // the same for a kitchen's sink cabinet+ expect("enhet sink cabinet", "enhet-base-cb-f-sink-60-x-60-x-75");+ expect("metod base cabinet", "metod-base-cabinet-shelves-60-x-60");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.tsindex 329ab37..08f960c 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", "washstand"]);+const UPRIGHT = new Set<Kind>(["cube", "bookcase", "open", "chest", "nightstand", "wardrobe", "cabinet", "sideboard", "tv", "shoe", "wallcab", "wallshelf", "kitchen", "mixed", "sliding", "slidecab", "washstand", "sinkcab"]);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. */@@ -118,8 +118,24 @@ const withDoors = (kind: Kind, t: string): Pick => {return typeof x === "string" ? x : { kind, x: x as X };};+/** METOD combinations whose second name is a drawer system: the fronts are drawers, not doors. */+const DRAWER_SYSTEM = /\b(MAXIMERA|KNIVSHULT)\b/;+const doorsFor = (c: Ctx) => ((c.sz.n[0] ?? 60) >= 80 ? 2 : 1);+/** Most specific first. A string result is the reason to skip. */const RULES: Rule[] = [+ // kitchen base cabinets for a sink: rails across the top, doors or drawers, and a fixed front that hides the sink+ // (IKEA writes some of these with a "+", which isn't a set here)+ [/^base cabinet for sink(?: \+ (\d) doors)?$/, (m, c) => ({ kind: "sinkcab", x: { z: `d${m[1] ? Math.min(2, Number(m[1])) : doorsFor(c)}` } })],+ [/^base cabinet f sink w (?:(\d) )?doors?\/front$/, (m) => ({ kind: "sinkcab", x: { z: `d${m[1] ? Math.min(2, Number(m[1])) : 1}@60+f@20` } })],+ [/^base cab f tallsjön sink$/, (_m, c) => ({ kind: "sinkcab", x: { z: DRAWER_SYSTEM.test(c.f.name) ? "r1@60+f@20" : `d${doorsFor(c)}@60+f@20` } })],+ // a sink with its own front (HAVSEN) fills the top of the cabinet+ [/^base cab f havsen (single|double) bowl sink$/, (m) => ({ kind: "sinkcab", x: { z: `d${m[1] === "double" ? 2 : 1}@60+a@20` } })],+ [/^base cb f havsen snk\/\d frnts\/(\d) drws$/, (m) => ({ kind: "sinkcab", x: { z: `r${m[1]}@60+a@20` } })],+ [/^base cab f sink\+(\d) fronts\/(\d) drawers$/, (m) => ({ kind: "sinkcab", x: { z: Number(m[1]) > Number(m[2]) ? `r${m[2]}@60+f@20` : `r${m[2]}` } })],+ [/^(?:base cab f sink\/waste sorting|sink cabinet with (?:door|organiser))$/, (_m, c) => ({ kind: "sinkcab", x: { z: `d${doorsFor(c)}` } })],+ // frames sold without fronts+ [/^base cb f (?:built-in appliances\/)?sink$/, () => ({ kind: "sinkcab", x: { z: "o" } })],// cabinets with doors and drawers: the drawers under the doors, or one drawer above the door of a kitchen base cabinet[/^(glass-door cabinet with|high cabinet w gls-drs and) (\d) drawers?$/, (m) => ({ kind: "mixed", x: { rows: Number(m[2]) } })],[/^wardrobe with (\d) doors and (\d) drawers$/, (m) => (Number(m[1]) > 2 ? "wardrobe with more than 2 doors and drawers" : { kind: "mixed", x: { doors: Number(m[1]) as 1 | 2, rows: Number(m[2]), rail: true } })],@@ -327,7 +343,7 @@ export function classify(f: Fact, hints: Hints): Verdict {if (sz.ext) return { skip: "corner or extendable unit" };if (v.length === 3) set(v[0], v[2], v[1]);else if (v.length === 2) {- if ((kind === "kitchen" || kind === "mixed") && /^base/.test(t)) set(v[0], 80, v[1]);+ if ((kind === "kitchen" || kind === "mixed" || kind === "sinkcab") && /^base/.test(t)) set(v[0], 80, v[1]);// bedside tables are measured from above, like tableselse if (kind === "nightstand" && /bedside|nightstand/.test(t)) set(v[0], hint?.kind === kind ? hint.h : 55, v[1]);else set(v[0], v[1]);@@ -450,7 +466,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", "washstand"].includes(kind)) x.knobs = hint.x.knobs;+ if (hint?.x.knobs && ["chest", "nightstand", "wardrobe", "cabinet", "sideboard", "tv", "shoe", "wallcab", "kitchen", "mixed", "washstand", "sinkcab"].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.jsonindex 8c93832..7e4b2a1 100644--- a/scripts/ikea/slugs.json+++ b/scripts/ikea/slugs.json@@ -177,6 +177,7 @@"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 sink, 60 × 60 × 75 cm": "enhet-base-cb-f-sink-60-x-60-x-75","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",@@ -185,6 +186,7 @@"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|Sink cabinet with door, 60 × 62 × 75 cm": "enhet-sink-cabinet-door-60-x-62-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",@@ -598,16 +600,38 @@"MARKUS|Office chair": "markus-office-chair","MARKUS|Office chair with armrests": "markus-office-chair-armrests","MATCHSPEL|Gaming chair": "matchspel-gaming-chair",+ "METOD / KNIVSHULT|Base cab f sink+2 fronts/2 drawers, 60 × 60 cm": "metod-knivshult-base-cab-f-sink-2-fronts-2-drawe",+ "METOD / KNIVSHULT|Base cab f sink+3 fronts/2 drawers, 80 × 60 cm": "metod-knivshult-base-cab-f-sink-3-fronts-2-drawe",+ "METOD / KNIVSHULT|Base cab f TALLSJÖN sink, 60 × 60 cm": "metod-knivshult-base-cab-f-tallsjon-sink-60-x-60",+ "METOD / KNIVSHULT|Base cab f TALLSJÖN sink, 80 × 60 cm": "metod-knivshult-base-cab-f-tallsjon-sink-80-x-60","METOD / KNIVSHULT|Base cabinet with drawer/2 doors, 80 × 60 cm": "metod-knivshult-base-cabinet-drawer-2-doors-80-x","METOD / KNIVSHULT|Base cabinet with drawer/door, 40 × 60 cm": "metod-knivshult-base-cabinet-drawer-door-40-x-60",+ "METOD / KNIVSHULT|Base cb f HAVSEN snk/3 frnts/2 drws, 60 × 60 cm": "metod-knivshult-base-cb-f-havsen-snk-3-frnts-2-d",+ "METOD / MAXIMERA|Base cab f sink+2 fronts/2 drawers, 60 × 60 cm": "metod-maximera-base-cab-f-sink-2-fronts-2-drawer",+ "METOD / MAXIMERA|Base cab f sink+3 fronts/2 drawers, 60 × 60 cm": "metod-maximera-base-cab-f-sink-3-fronts-2-drawer",+ "METOD / MAXIMERA|Base cab f sink+3 fronts/2 drawers, 80 × 60 cm": "metod-maximera-base-cab-f-sink-3-fronts-2-drawer-2",+ "METOD / MAXIMERA|Base cab f TALLSJÖN sink, 60 × 60 cm": "metod-maximera-base-cab-f-tallsjon-sink-60-x-60",+ "METOD / MAXIMERA|Base cab f TALLSJÖN sink, 80 × 60 cm": "metod-maximera-base-cab-f-tallsjon-sink-80-x-60","METOD / MAXIMERA|Base cabinet with drawer/2 doors, 80 × 60 cm": "metod-maximera-base-cabinet-drawer-2-doors-80-x","METOD / MAXIMERA|Base cabinet with drawer/door, 60 × 60 cm": "metod-maximera-base-cabinet-drawer-door-60-x-60",+ "METOD / MAXIMERA|Base cb f HAVSEN snk/3 frnts/2 drws, 60 × 60 cm": "metod-maximera-base-cb-f-havsen-snk-3-frnts-2-dr",+ "METOD|Base cab f HAVSEN double bowl sink, 80 × 60 cm": "metod-base-cab-f-havsen-double-bowl-sink-80-x-60",+ "METOD|Base cab f HAVSEN single bowl sink, 60 × 60 cm": "metod-base-cab-f-havsen-single-bowl-sink-60-x-60",+ "METOD|Base cab f sink/waste sorting, 40 × 60 cm": "metod-base-cab-f-sink-waste-sorting-40-x-60",+ "METOD|Base cab f TALLSJÖN sink, 60 × 60 cm": "metod-base-cab-f-tallsjon-sink-60-x-60",+ "METOD|Base cab f TALLSJÖN sink, 80 × 60 cm": "metod-base-cab-f-tallsjon-sink-80-x-60",+ "METOD|Base cabinet f sink w 2 doors/front, 80 × 60 cm": "metod-base-cabinet-f-sink-w-2-doors-front-80-x-6",+ "METOD|Base cabinet f sink w door/front, 60 × 60 cm": "metod-base-cabinet-f-sink-w-door-front-60-x-60",+ "METOD|Base cabinet for sink + 2 doors, 80 × 60 cm": "metod-base-cabinet-for-sink-2-doors-80-x-60",+ "METOD|Base cabinet for sink, 60 × 60 cm": "metod-base-cabinet-for-sink-60-x-60","METOD|Base cabinet with shelves, 60 × 60 cm": "metod-base-cabinet-shelves-60-x-60","METOD|Base cabinet with shelves/2 doors, 80 × 60 cm": "metod-base-cabinet-shelves-2-doors-80-x-60",+ "METOD|Base cb f built-in appliances/sink, 60 × 60 × 80 cm": "metod-base-cb-f-built-in-appliances-sink-60-x-60","METOD|High cabinet with shelves, 40 × 37 × 200 cm": "metod-high-cabinet-shelves-40-x-37-x-200","METOD|High cabinet with shelves, 60 × 60 × 140 cm": "metod-high-cabinet-shelves-60-x-60-x-140","METOD|High cabinet with shelves/2 doors, 60 × 60 × 220 cm": "metod-high-cabinet-shelves-2-doors-60-x-60-x-220","METOD|High cabinet, 60 × 60 × 200 cm": "metod-high-cabinet-60-x-60-x-200",+ "METOD|Sink cabinet with organiser, 60 × 60 × 80 cm": "metod-sink-cabinet-organiser-60-x-60-x-80","METOD|Top cabinet, 40 × 40 cm": "metod-top-cabinet-40-x-40","METOD|Top cabinet, 40 × 60 × 40 cm": "metod-top-cabinet-40-x-60-x-40","METOD|Wall cabinet w shelves/2 glass drs, 40 × 100 cm": "metod-wall-cabinet-w-shelves-2-glass-drs-40-x-10",diff --git a/src/data/ikea-items.ts b/src/data/ikea-items.tsindex 8708c1e..486a7a6 100644--- a/src/data/ikea-items.ts+++ b/src/data/ikea-items.ts@@ -196,6 +196,7 @@ ektorp-3-seat-sofa-chaise-longue|29628736 59628730 99628733 99509042 89509033 49ektorp-armchair|79628654 69628635 69628640 79552102 59552103 89552106 29552109ektorp-corner-sofa-4-seat|69628664 19628666 29508994 89508986 89508991 39508984 59508997eldberget-malskar-swivel-chair|59331847+enhet-base-cb-f-sink-60-x-60-x-75|50440426enhet-base-cb-f-washbasin-w-2-drawers-60-x-40-x|80440509enhet-base-fr-w-shelves-40-x-60-x-75|00448953 20448952 10448976 30448975enhet-base-fr-w-shelves-60-x-40-x-60|60448974 80448973 40448951 60448950@@ -204,6 +205,7 @@ enhet-high-cabinet-door-30-x-32-x-180|10623036 30632054enhet-mirror-cabinet-60-x-17-x-75|59336519 99336517 19336516 79336518enhet-mirror-cabinet-door-40-x-17-x-75|30623040enhet-mirror-cabinet-doors-60-x-17-x-75|50623044 80623047+enhet-sink-cabinet-door-60-x-62-x-75|00623032enhet-tvallen-open-wash-stand-2-shelves-64-x-43|99554671 09554661enhet-tvallen-wash-stnd-w-door-wash-basin-44-x-4|49613357enhet-tvallen-wash-stnd-w-doors-wash-basin-64-x|79613346 09613335 29623625@@ -667,16 +669,38 @@ marius-stool|90184047 10135659markus-office-chair|30261152 50521861markus-office-chair-armrests|79628041 59628037matchspel-gaming-chair|50571530 20507606+metod-base-cab-f-havsen-double-bowl-sink-80-x-60|89588209 59507139 39487118 99601111 99509103 99460371 89589039+metod-base-cab-f-havsen-single-bowl-sink-60-x-60|99473378 79507138 59458916 59455442 39589188 19487082 99464755+metod-base-cab-f-sink-waste-sorting-40-x-60|99586276 89587375 79587615 59586848 59586725 49588211 09589364+metod-base-cab-f-tallsjon-sink-60-x-60|99550989 99606279 99579025 99550710 99550593 89586489 89558655+metod-base-cab-f-tallsjon-sink-80-x-60|99587252 99578728 99565575 99550456 99550084 89557552 89551041+metod-base-cabinet-f-sink-w-2-doors-front-80-x-6|69469863 59557445 99517853 99473383 89586494 79587267 39587556+metod-base-cabinet-f-sink-w-door-front-60-x-60|39589598 59456328 29507145 49459186 29517781 19473382 99557165+metod-base-cabinet-for-sink-2-doors-80-x-60|99507137 39589584 99539001 79465708 69458732 99601366 99588826+metod-base-cabinet-for-sink-60-x-60|19507136 59589333 49455131 09486846 89589020 99600611 89465915metod-base-cabinet-shelves-2-doors-80-x-60|49507125 89507133 79465812 69507129 09538039 89517491 89458750metod-base-cabinet-shelves-60-x-60|49589630 79507124 19507122 99487295 89507128 89473369 59466394+metod-base-cb-f-built-in-appliances-sink-60-x-60|70213569 80591678 60591679 50215475metod-high-cabinet-60-x-60-x-200|60212565 90212559 90212564 70212560 10212558 50212561 50591694metod-high-cabinet-shelves-2-doors-60-x-60-x-220|09507311 29507310 19468936 69538753 99457241 79456817 49457597metod-high-cabinet-shelves-40-x-37-x-200|89507312 89507307 69507313 39461991 69538965 49487467 39455669metod-high-cabinet-shelves-60-x-60-x-140|79507317 29467658 19509418 59465002 09466259 99628219 99586484+metod-knivshult-base-cab-f-sink-2-fronts-2-drawe|69588366 89588290 39586745 99589623 99589576 99588906 89587747+metod-knivshult-base-cab-f-sink-3-fronts-2-drawe|99588591 89589077 89588412 89587865 89587785 59588786 59587678+metod-knivshult-base-cab-f-tallsjon-sink-60-x-60|99587704 79589520 49587018 39588457 19588694 19587963 09589651 79589431 79587781 69588984 59588102 39587962 29589235+metod-knivshult-base-cab-f-tallsjon-sink-80-x-60|79588224 69588333 69586843 59587414 49587674 09588152metod-knivshult-base-cabinet-drawer-2-doors-80-x|89586960 59588244 99587068 89589529 79588021 69588168 59589007metod-knivshult-base-cabinet-drawer-door-40-x-60|59589470 99588845 99588789 79589681 79587955 29589396 29587199+metod-knivshult-base-cb-f-havsen-snk-3-frnts-2-d|99586752 89587224 79589539 69587965 69587098+metod-maximera-base-cab-f-sink-2-fronts-2-drawer|39517653 99605996 99601390 99558971 99537907 99509160 99504049+metod-maximera-base-cab-f-sink-3-fronts-2-drawer|89473265 59624505 39486958 99586441 99578771 99537993 99506963 09577422 99600277 99579011 99557472 99538233 99538105 99304045+metod-maximera-base-cab-f-sink-3-fronts-2-drawer-2|99310008+metod-maximera-base-cab-f-tallsjon-sink-60-x-60|99550649 99550480 99550239 89557590 89550089 79550419 79550339 99600748 99576593+metod-maximera-base-cab-f-tallsjon-sink-80-x-60|19550318 99606199 99550828 99550116 89558542 89550305 89550126metod-maximera-base-cabinet-drawer-2-doors-80-x|79506997 79473317 59507021 09517414 99486979 79565680 79509298metod-maximera-base-cabinet-drawer-door-60-x-60|59473295 89504083 89473307 59539395 99556571 89507005 89486687+metod-maximera-base-cb-f-havsen-snk-3-frnts-2-dr|99504092 99624631 99565556 99509259+metod-sink-cabinet-organiser-60-x-60-x-80|89656316metod-top-cabinet-40-x-40|99518027 99456251 59539197 49464201 39507296 39473611 99587940metod-top-cabinet-40-x-60-x-40|60224078 10591733metod-wall-cabinet-2-doors-80-x-40|79507261 99473463 29611929 39469398 19518045 09588703 39587165diff --git a/src/data/ikea-rows.ts b/src/data/ikea-rows.tsindex d06404c..99d5e36 100644--- a/src/data/ikea-rows.ts+++ b/src/data/ikea-rows.ts@@ -177,6 +177,8 @@ ELDBERGET / MALSKÄR|office|Swivel chair|60|105|64|arms=noneENHET|cabinet|High cabinet with door, 30 × 32 × 180 cm|30|180|32|doors=1ENHET|kitchen|Base fr w shelves, 40 × 60 × 75 cm|40|75|60|doors=0ENHET|kitchen|Base fr w shelves, 60 × 40 × 60 cm|60|60|40|doors=0+ENHET|sinkcab|Base cb f sink, 60 × 60 × 75 cm|60|75|60|z=o+ENHET|sinkcab|Sink cabinet with door, 60 × 62 × 75 cm|60|75|62|z=d1ENHET|wallcab|Mirror cabinet with door, 40 × 17 × 75 cm|40|75|17|doors=1ENHET|wallcab|Mirror cabinet with doors, 60 × 17 × 75 cm|60|75|17ENHET|wallcab|Mirror cabinet, 60 × 17 × 75 cm|60|75|17@@ -605,6 +607,17 @@ METOD|kitchen|High cabinet with shelves, 60 × 60 × 140 cm|60|140|60|doors=0METOD|kitchen|High cabinet, 60 × 60 × 200 cm|60|200|60METOD|kitchen|High cabinet with shelves/2 doors, 60 × 60 × 220 cm|60|220|60METOD|kitchen|Base cabinet with shelves/2 doors, 80 × 60 cm|80|80|60+METOD|sinkcab|Base cab f sink/waste sorting, 40 × 60 cm|40|80|60|z=d1+METOD|sinkcab|Base cab f HAVSEN single bowl sink, 60 × 60 cm|60|80|60|z=d1@60+a@20+METOD|sinkcab|Base cab f TALLSJÖN sink, 60 × 60 cm|60|80|60|z=d1@60+f@20+METOD|sinkcab|Base cabinet f sink w door/front, 60 × 60 cm|60|80|60|z=d1@60+f@20+METOD|sinkcab|Base cabinet for sink, 60 × 60 cm|60|80|60|z=d1+METOD|sinkcab|Base cb f built-in appliances/sink, 60 × 60 × 80 cm|60|80|60|z=o+METOD|sinkcab|Sink cabinet with organiser, 60 × 60 × 80 cm|60|80|60|z=d1+METOD|sinkcab|Base cab f HAVSEN double bowl sink, 80 × 60 cm|80|80|60|z=d2@60+a@20+METOD|sinkcab|Base cab f TALLSJÖN sink, 80 × 60 cm|80|80|60|z=d2@60+f@20+METOD|sinkcab|Base cabinet f sink w 2 doors/front, 80 × 60 cm|80|80|60|z=d2@60+f@20+METOD|sinkcab|Base cabinet for sink + 2 doors, 80 × 60 cm|80|80|60|z=d2METOD|wallcab|Wall cabinet w shelves/glass door, 30 × 80 cm|30|80|35|doors=1METOD|wallcab|Top cabinet, 40 × 40 cm|40|40|35METOD|wallcab|Wall cabinet with glass door, 40 × 40 cm|40|40|35|doors=1@@ -621,8 +634,19 @@ METOD|wallcab|Wall cabinet with 2 glass doors, 80 × 40 cm|80|40|35METOD|wallcab|Wall cabinet with shelves/2 doors, 80 × 80 cm|80|80|35METOD / KNIVSHULT|mixed|Base cabinet with drawer/door, 40 × 60 cm|40|80|60|rows=1,doors=1,dtop=1METOD / KNIVSHULT|mixed|Base cabinet with drawer/2 doors, 80 × 60 cm|80|80|60|rows=1,doors=2,dtop=1+METOD / KNIVSHULT|sinkcab|Base cab f sink+2 fronts/2 drawers, 60 × 60 cm|60|80|60|z=r2+METOD / KNIVSHULT|sinkcab|Base cab f TALLSJÖN sink, 60 × 60 cm|60|80|60|z=r1@60+f@20+METOD / KNIVSHULT|sinkcab|Base cb f HAVSEN snk/3 frnts/2 drws, 60 × 60 cm|60|80|60|z=r2@60+a@20+METOD / KNIVSHULT|sinkcab|Base cab f sink+3 fronts/2 drawers, 80 × 60 cm|80|80|60|z=r2@60+f@20+METOD / KNIVSHULT|sinkcab|Base cab f TALLSJÖN sink, 80 × 60 cm|80|80|60|z=r1@60+f@20METOD / MAXIMERA|mixed|Base cabinet with drawer/door, 60 × 60 cm|60|80|60|rows=1,doors=1,dtop=1METOD / MAXIMERA|mixed|Base cabinet with drawer/2 doors, 80 × 60 cm|80|80|60|rows=1,doors=2,dtop=1+METOD / MAXIMERA|sinkcab|Base cab f sink+2 fronts/2 drawers, 60 × 60 cm|60|80|60|z=r2+METOD / MAXIMERA|sinkcab|Base cab f sink+3 fronts/2 drawers, 60 × 60 cm|60|80|60|z=r2@60+f@20+METOD / MAXIMERA|sinkcab|Base cab f TALLSJÖN sink, 60 × 60 cm|60|80|60|z=r1@60+f@20+METOD / MAXIMERA|sinkcab|Base cb f HAVSEN snk/3 frnts/2 drws, 60 × 60 cm|60|80|60|z=r2@60+a@20+METOD / MAXIMERA|sinkcab|Base cab f sink+3 fronts/2 drawers, 80 × 60 cm|80|80|60|z=r2@60+f@20||metod-maximera-base-cab-f-sink-3-fronts-2-drawer-2+METOD / MAXIMERA|sinkcab|Base cab f TALLSJÖN sink, 80 × 60 cm|80|80|60|z=r1@60+f@20MICKE|desk|Desk, 73 × 50 cm|73|75|50|legs=square,attach=apronMICKE|desk|Desk, 142 × 50 cm|142|75|50|legs=square,attach=apronMILLBERGET|office|Swivel chair|60|105|64|arms=nonediff --git a/src/lib/plan/fitted.ts b/src/lib/plan/fitted.tsindex 2e3daf6..ba2e9f0 100644--- a/src/lib/plan/fitted.ts+++ b/src/lib/plan/fitted.ts@@ -323,7 +323,7 @@ export function buildFitted(b: PlanBuilder, s: ProductSpec) {b.step({title: "Screw on the fixed front",- detail: "It doesn't open. Screw it on from the inside, through the front rail.",+ detail: "It doesn't open. Screw it on from the inside, just under the top rail.",tools: ["screwdriver"],kind: "screws",},@@ -333,10 +333,11 @@ export function buildFitted(b: PlanBuilder, s: ProductSpec) {b.then(0.1);const list: FitOpts[] = [];for (const k of fronts) {- const y = b.partItem(k).final.pos[1];+ const p = b.partItem(k).final.pos;+ const y = Math.min(p[1], H - t - 14);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);+ b.fits(HW.screwS, list, 0.12);},);}diff --git a/src/lib/products.ts b/src/lib/products.tsindex 0427719..da92787 100644--- a/src/lib/products.ts+++ b/src/lib/products.ts@@ -50,7 +50,8 @@ export type Kind =| "cabrow"| "section"| "gateleg"- | "washstand";+ | "washstand"+ | "sinkcab";export type X = {rows?: number;@@ -263,7 +264,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, washstand: 35,+ 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, sinkcab: 45,};const CATEGORY: Record<Kind, string> = {@@ -272,7 +273,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", washstand: "Wash-stand",+ 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", sinkcab: "Sink cabinet",};export const KIND_ARCH: Record<Kind, Archetype> = {@@ -280,7 +281,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", washstand: "cabinet",+ 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", sinkcab: "cabinet",};const round = (x: X) => (x.round ? { round: true } : {});@@ -310,8 +311,8 @@ export function parseZones(z: string): FitZone[] {return out;}-const FIT_USE: Partial<Record<Kind, FitUse>> = { washstand: "basin" };-const FIT_FRONT: Partial<Record<Kind, string>> = { washstand: "r2" };+const FIT_USE: Partial<Record<Kind, FitUse>> = { washstand: "basin", sinkcab: "sink" };+const FIT_FRONT: Partial<Record<Kind, string>> = { washstand: "r2", sinkcab: "d1@60+f@20" };/** 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"> {@@ -450,6 +451,7 @@ export function specFor(kind: Kind, name: string, variant: string, w: number, h:return { ...base, minutes: x.min ?? MIN.section + 10 * seats, people: seats > 1 ? 2 : 1, sofa: { seats, arms: "none", legs: "round" } };}case "washstand":+ case "sinkcab":return fitted(kind, base, w, h, x);case "bookrow":case "cabrow": {@@ -496,5 +498,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], washstand: [60, 83, 47],+ 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], sinkcab: [60, 80, 60],};diff --git a/src/lib/search.ts b/src/lib/search.tsindex a100480..8023c18 100644--- a/src/lib/search.ts+++ b/src/lib/search.ts@@ -19,6 +19,7 @@ const CATEGORY_WORDS: [Kind, string[]][] = [["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"]],+ ["sinkcab", ["sink cabinet", "sink base", "sink base cabinet", "sink unit", "kitchen sink cabinet", "under sink cabinet", "cabinet for sink", "sink cupboard"]],["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"]],