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 TV benches and bookcases with drawers, and height extensions

Youssef051db6cfe5b3
diff --git a/scripts/ikea/build.ts b/scripts/ikea/build.ts
index 5554770..41b4c4b 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", "sinkcab", "appliance", "shoerack", "clothesrack", "changing", "divider", "backbench", "junior", "lounge", "highchair", "cornercab", "cornerrobe", "usofa", "lounger", "swivel", "conference", "cornerdesk", "conftable", "lidbox", "shelfbench", "workbench"]);
+const LATER_KINDS = new Set<Kind>(["office", "chaise", "corner", "cot", "bunk", "loft", "dropleaf", "daybed", "mixed", "sliding", "slidecab", "bookrow", "cabrow", "section", "gateleg", "washstand", "sinkcab", "appliance", "shoerack", "clothesrack", "changing", "divider", "backbench", "junior", "lounge", "highchair", "cornercab", "cornerrobe", "usofa", "lounger", "swivel", "conference", "cornerdesk", "conftable", "lidbox", "shelfbench", "workbench", "extension"]);
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 e77f7d5..ac2d2b2 100644
--- a/scripts/ikea/check.ts
+++ b/scripts/ikea/check.ts
@@ -140,6 +140,10 @@ async function main() {
// a work bench when asked for, the family's shelving otherwise
expect("bror work bench", "bror-work-bench-110-x-55");
expect("bror", "bror-shelving-unit-85-x-190");
+ // a height extension unit or a TV bench with drawers when asked for, the family's own otherwise
+ expect("billy height extension unit", "billy-height-extension-unit-40-x-28-x-35");
+ expect("besta tv bench with drawers", "besta-tv-bench-drawers-120-x-42-x-48");
+ expect("besta tv bench", "besta-tv-bench-120-x-40");
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 b416184..fa96596 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", "sinkcab", "appliance", "shoerack", "clothesrack", "changing", "divider"]);
+const UPRIGHT = new Set<Kind>(["extension", "cube", "bookcase", "open", "chest", "nightstand", "wardrobe", "cabinet", "sideboard", "tv", "shoe", "wallcab", "wallshelf", "kitchen", "mixed", "sliding", "slidecab", "washstand", "sinkcab", "appliance", "shoerack", "clothesrack", "changing", "divider"]);
const FLAT = new Set<Kind>(["desk", "coffee", "side", "dining", "bar", "console", "kidstable", "trolley", "bench", "conftable"]);
/** Office chairs IKEA sells with armrests although the type doesn't say so. */
@@ -411,6 +411,21 @@ const RULES: Rule[] = [
[/^high cb w (\d) shelves$/, (m) => ({ kind: "cabinet", x: { doors: 0, shelves: Math.min(5, Number(m[1])) } })],
[/^sideboard basic unit$/, () => ({ kind: "sideboard" })],
[/^tv bench with plinth$/, () => ({ kind: "tv" })],
+ // a TV bench full of drawers
+ [/^tv bench with drawers$/, () => ({ kind: "tv", x: { rows: 1, cat: "TV bench with drawers" } })],
+ // a bookcase with a drawer at the bottom, open shelves above it
+ [/^bookcase with drawer$/, (_m, c) => ({ kind: "mixed", x: { doors: 0, rows: 1, shelves: (c.sz.n[2] ?? 100) > 150 ? 3 : 1 } })],
+ // BILLY with its height extension on top and doors: drawn as one tall bookcase with doors, like the others 237 cm high
+ [/^bookcase w (?:height extension ut\/drs|doors\/extension unit|hght ext ut\/pnl\/glss drs)$/, (_m, c) => ({ kind: "cabinet", x: (c.sz.n[0] ?? 80) <= 40 ? { doors: 1 } : {} })],
+ // height extension units: a short box on top of a bookcase or wardrobe, with doors in some
+ [/^height extension unit( with doors)?$/, (m) => ({ kind: "extension", x: m[1] ? { doors: 2 } : {} })],
+ // a media shelf: an open box on the wall
+ [/^media shelf$/, () => ({ kind: "wallcab", x: { doors: 0, shelves: 0, cat: "Media shelf" } })],
+ // METOD high cabinets full of drawers: 40 cm fronts from the bottom up, a 20 cm one at the top when there's room
+ [/^high cabinet with drawers$/, (_m, c) => {
+ const h = c.sz.n[2] ?? 200, k = Math.floor(h / 40);
+ return { kind: "kitchen", x: { z: h - 40 * k >= 20 ? `r${k}@${40 * k}+r1` : `r${k}`, cat: "High cabinet with drawers" } };
+ }],
[/^shelving unit\/bench$/, () => ({ kind: "open" })],
// a laptop table is a small desk
[/^laptop table$/, () => ({ kind: "desk" })],
diff --git a/scripts/ikea/slugs.json b/scripts/ikea/slugs.json
index 5a021d9..1612617 100644
--- a/scripts/ikea/slugs.json
+++ b/scripts/ikea/slugs.json
@@ -75,6 +75,7 @@
"BESTÅ|TV bench with doors, 240 × 42 × 38 cm": "besta-tv-bench-doors-240-x-42-x-38",
"BESTÅ|TV bench with doors, 240 × 42 × 40 cm": "besta-tv-bench-doors-240-x-42-x-40",
"BESTÅ|TV bench with doors, 240 × 42 × 76 cm": "besta-tv-bench-doors-240-x-42-x-76",
+ "BESTÅ|TV bench with drawers, 120 × 42 × 48 cm": "besta-tv-bench-drawers-120-x-42-x-48",
"BESTÅ|TV bench, 120 × 40 × 48 cm": "besta-tv-bench-120-x-40-x-48",
"BESTÅ|TV bench, 180 × 40 × 64 cm": "besta-tv-bench-180-x-40-x-64",
"BETESHÄST|Desk, 120 × 60 cm": "beteshast-desk-120-x-60",
@@ -83,6 +84,9 @@
"BILLY / HÖGADAL|Bookcase with doors, 80 × 30 × 106 cm": "billy-hogadal-bookcase-doors-80-x-30-x-106",
"BILLY / HÖGADAL|Bookcase with doors, 80 × 30 × 202 cm": "billy-hogadal-bookcase-doors-80-x-30-x-202",
"BILLY / HÖGBO|Bookcase with glass doors, 80 × 30 × 202 cm": "billy-hogbo-bookcase-glass-doors-80-x-30-x-202",
+ "BILLY / OXBERG|Bookcase w doors/extension unit, 80 × 30 × 237 cm": "billy-oxberg-bookcase-w-doors-extension-unit-80",
+ "BILLY / OXBERG|Bookcase w height extension ut/drs, 160 × 30 × 237 cm": "billy-oxberg-bookcase-w-height-extension-ut-drs",
+ "BILLY / OXBERG|Bookcase w hght ext ut/pnl/glss drs, 40 × 30 × 237 cm": "billy-oxberg-bookcase-w-hght-ext-ut-pnl-glss-drs",
"BILLY / OXBERG|Bookcase with door, 40 × 30 × 106 cm": "billy-oxberg-bookcase-door-40-x-30-x-106",
"BILLY / OXBERG|Bookcase with doors, 40 × 30 × 202 cm": "billy-oxberg-bookcase-doors-40-x-30-x-202",
"BILLY / OXBERG|Bookcase with doors, 40 × 41 × 202 cm": "billy-oxberg-bookcase-doors-40-x-41-x-202",
@@ -105,6 +109,8 @@
"BILLY / OXBERG|Bookcase, 200 × 30 × 237 cm": "billy-oxberg-bookcase-200-x-30-x-237",
"BILLY / OXBERG|Bookcase, 80 × 30 × 202 cm": "billy-oxberg-bookcase-80-x-30-x-202",
"BILLY / OXBERG|Bookcase, 80 × 30 × 237 cm": "billy-oxberg-bookcase-80-x-30-x-237",
+ "BILLY|Bookcase with drawer, 80 × 30 × 106 cm": "billy-bookcase-drawer-80-x-30-x-106",
+ "BILLY|Bookcase with drawer, 80 × 30 × 202 cm": "billy-bookcase-drawer-80-x-30-x-202",
"BILLY|Bookcase, 120 × 28 × 237 cm": "billy-bookcase-120-x-28-x-237",
"BILLY|Bookcase, 160 × 28 × 202 cm": "billy-bookcase-160-x-28-x-202",
"BILLY|Bookcase, 200 × 28 × 237 cm": "billy-bookcase-200-x-28-x-237",
@@ -114,6 +120,8 @@
"BILLY|Bookcase, 40 × 39 × 202 cm": "billy-bookcase-40-x-39-x-202",
"BILLY|Bookcase, 80 × 28 × 237 cm": "billy-bookcase-80-x-28-x-237",
"BILLY|Bookcase, 80 × 39 × 202 cm": "billy-bookcase-80-x-39-x-202",
+ "BILLY|Height extension unit, 40 × 28 × 35 cm": "billy-height-extension-unit-40-x-28-x-35",
+ "BILLY|Height extension unit, 80 × 28 × 35 cm": "billy-height-extension-unit-80-x-28-x-35",
"BINGSTA|Armchair": "bingsta-armchair",
"BJÖRKBERGET|Swivel chair": "bjorkberget-swivel-chair",
"BJÖRKSNÄS|Bed frame, Standard King, 150 × 200 cm": "bjorksnas-bed-frame-standard-king-150-x-200",
@@ -188,6 +196,7 @@
"EKET|Cabinet with 2 drawers, 35 × 35 × 35 cm": "eket-cabinet-2-drawers-35-x-35-x-35",
"EKET|Cabinet with 2 drawers, 70 × 35 × 35 cm": "eket-cabinet-2-drawers-70-x-35-x-35",
"EKET|Cabinet, 35 × 25 × 35 cm": "eket-cabinet-35-x-25-x-35",
+ "EKET|Media shelf, 70 × 35 × 35 cm": "eket-media-shelf-70-x-35-x-35",
"EKET|Wall cabinet with glass door, 35 × 25 × 35 cm": "eket-wall-cabinet-glass-door-35-x-25-x-35",
"EKET|Wall cb w 1 shlf/door, 35 × 35 × 70 cm": "eket-wall-cb-w-1-shlf-door-35-x-35-x-70",
"EKET|Wall cb with 2 doors, 70 × 35 × 70 cm": "eket-wall-cb-2-doors-70-x-35-x-70",
@@ -629,6 +638,7 @@
"LASTARE|Frame with doors, 80 × 42 × 200 cm": "lastare-frame-doors-80-x-42-x-200",
"LASTARE|Frame, 40 × 42 × 100 cm": "lastare-frame-40-x-42-x-100",
"LASTARE|Frame, 60 × 30 × 100 cm": "lastare-frame-60-x-30-x-100",
+ "LASTARE|Height extension unit with doors, 80 × 42 × 36 cm": "lastare-height-extension-unit-doors-80-x-42-x-36",
"LASTARE|Table, 100 × 42 × 74 cm": "lastare-table-100-x-42-x-74",
"LASTARE|Wall mounted frame with doors, 60 × 32 × 60 cm": "lastare-wall-mounted-frame-doors-60-x-32-x-60",
"LEDAMOT|Cabinet, 150 × 42 × 75 cm": "ledamot-cabinet-150-x-42-x-75",
@@ -739,6 +749,7 @@
"METOD / KNIVSHULT|High cabinet f built-in appliances, 60 × 60 × 240 cm": "metod-knivshult-high-cabinet-f-built-in-applianc-4",
"METOD / KNIVSHULT|High cabinet f oven+door/2 drawers, 60 × 60 × 240 cm": "metod-knivshult-high-cabinet-f-oven-door-2-drawe",
"METOD / KNIVSHULT|High cabinet w 2 drawers for oven, 60 × 60 × 140 cm": "metod-knivshult-high-cabinet-w-2-drawers-for-ove",
+ "METOD / KNIVSHULT|High cabinet with drawers, 60 × 60 × 140 cm": "metod-knivshult-high-cabinet-drawers-60-x-60-x-1",
"METOD / MAXIMERA|Base cab 4 frnts/4 drawers, 80 × 37 cm": "metod-maximera-base-cab-4-frnts-4-drawers-80-x-3",
"METOD / MAXIMERA|Base cab 4 frnts/4 drawers, 80 × 60 cm": "metod-maximera-base-cab-4-frnts-4-drawers-80-x-6",
"METOD / MAXIMERA|Base cab f hob/2 fronts/2 drawers, 60 × 60 cm": "metod-maximera-base-cab-f-hob-2-fronts-2-drawers",
@@ -778,6 +789,7 @@
"METOD / MAXIMERA|High cabinet f oven+door/2 drawers, 60 × 60 × 200 cm": "metod-maximera-high-cabinet-f-oven-door-2-drawer",
"METOD / MAXIMERA|High cabinet f oven+door/2 drawers, 60 × 60 × 240 cm": "metod-maximera-high-cabinet-f-oven-door-2-drawer-2",
"METOD / MAXIMERA|High cabinet w 2 drawers for oven, 60 × 60 × 140 cm": "metod-maximera-high-cabinet-w-2-drawers-for-oven",
+ "METOD / MAXIMERA|High cabinet with drawers, 40 × 60 × 200 cm": "metod-maximera-high-cabinet-drawers-40-x-60-x-20",
"METOD / MAXIMERA|Wall cab w 2 glass doors/2 drawers, 60 × 100 cm": "metod-maximera-wall-cab-w-2-glass-doors-2-drawer",
"METOD / MAXIMERA|Wall cab w 2 glass doors/2 drawers, 80 × 100 cm": "metod-maximera-wall-cab-w-2-glass-doors-2-drawer-2",
"METOD / MAXIMERA|Wall cabinet w 2 doors/2 drawers, 80 × 100 cm": "metod-maximera-wall-cabinet-w-2-doors-2-drawers",
diff --git a/src/data/ikea-items.ts b/src/data/ikea-items.ts
index 10e6ba8..3d8617d 100644
--- a/src/data/ikea-items.ts
+++ b/src/data/ikea-items.ts
@@ -85,6 +85,7 @@ besta-tv-bench-doors-120-x-42-x-74|39068334 09506095 99420506 99420479 79420480
besta-tv-bench-doors-240-x-42-x-38|09603572 39612155 59603579 19603581 99603624 89603573 59612159
besta-tv-bench-doors-240-x-42-x-40|29623135 49623144 49623139 29623140 89623137 69623143 19623145
besta-tv-bench-doors-240-x-42-x-76|89622958 39622965 59622969 99622967 59622974 89622963 79622968
+besta-tv-bench-drawers-120-x-42-x-48|79188320 09399180 99188343 39419940 39435860 99555656 99435862 99435857
beteshast-desk-120-x-60|80619804
billy-40x202|50263838 60477382 80508641 70477334 40594928
billy-80x106|30263844 90477385 30508648 00477337
@@ -98,6 +99,10 @@ billy-bookcase-40-x-28-x-237|49217734
billy-bookcase-40-x-39-x-202|10401931
billy-bookcase-80-x-28-x-237|59182201
billy-bookcase-80-x-39-x-202|90401932
+billy-bookcase-drawer-80-x-30-x-106|29487840
+billy-bookcase-drawer-80-x-30-x-202|39483808
+billy-height-extension-unit-40-x-28-x-35|90263860 00508664 80477395 60477358
+billy-height-extension-unit-80-x-28-x-35|40263853 60477396 00477361 30508667
billy-hogadal-bookcase-door-40-x-30-x-106|69562494
billy-hogadal-bookcase-door-40-x-30-x-202|29562491
billy-hogadal-bookcase-doors-80-x-30-x-106|79572204
@@ -125,6 +130,9 @@ billy-oxberg-bookcase-panel-glass-doors-120-x-30|79281790
billy-oxberg-bookcase-panel-glass-doors-160-x-30|79581859 39581861 79280738 79280724 49581865 19581862
billy-oxberg-bookcase-panel-glass-doors-80-x-30|69281776 69483326 29483328 89483325
billy-oxberg-bookcase-panel-glass-doors-80-x-41|69398837
+billy-oxberg-bookcase-w-doors-extension-unit-80|89483368 89483373 49483370 29483371
+billy-oxberg-bookcase-w-height-extension-ut-drs|89581905 49280754 69581906
+billy-oxberg-bookcase-w-hght-ext-ut-pnl-glss-drs|89287433
bingsta-armchair|10455655
bissa-shoe-cabinet-2-compartments|70530218 70530256
bissa-shoe-cabinet-3-compartments|10530259 10530221
@@ -210,6 +218,7 @@ eket-cabinet-2-drawers-35-x-35-x-35|30428920 20574592 30428915
eket-cabinet-2-drawers-70-x-35-x-35|00333947 80574594 80344923
eket-cabinet-35-x-25-x-35|70332124 40595522 30530574 40334558 90428842 50595526 00595524
eket-cabinet-combination-70-x-70|60333954 10574583 00334536 89435221 69435222
+eket-media-shelf-70-x-35-x-35|00576479 90582027 30582025
eket-wall-cabinet-glass-door-35-x-25-x-35|89602125 29336356 29533012 99336353 69602126 49602127 49336341
eket-wall-cb-2-doors-70-x-35-x-70|49581182
eket-wall-cb-w-1-shlf-door-35-x-35-x-70|39590380 19590376 99590382
@@ -691,6 +700,7 @@ lastare-frame-40-x-42-x-100|60596484 80596483 00596482
lastare-frame-60-x-30-x-100|60616241
lastare-frame-doors-60-x-42-x-100|90596468 30596471 10617484 10630353
lastare-frame-doors-80-x-42-x-200|90596473 70596474 50596470 70596469
+lastare-height-extension-unit-doors-80-x-42-x-36|30596490 90596487 70596488 30596485
lastare-table-100-x-42-x-74|20615837
lastare-wall-mounted-frame-doors-60-x-32-x-60|60616255
ledamot-cabinet-150-x-42-x-75|40544740
@@ -843,6 +853,7 @@ metod-knivshult-hi-cab-f-ov-w-dr-2-frnts-2-hi-dr|89588855 89588940 89588313 8958
metod-knivshult-hi-cab-w-2-doors-4-drawers-40-x|79588144 99588317 99587737 89588600 89588266 89587177 89586823
metod-knivshult-hi-cab-w-shlvs-4-drawers-dr-2-fr|09589552 89588860 89588822 79589704 69588564 59587838
metod-knivshult-high-cab-f-oven-w-door-3-drawers|99588138 99586945 99586747 89588676 89588087 89586875 79589902
+metod-knivshult-high-cabinet-drawers-60-x-60-x-1|99589878 89588775 89588110 89587163 59589597 59588593 49587155
metod-knivshult-high-cabinet-f-built-in-applianc|69589714 69588106 59587720 49587198 39589329 29587905
metod-knivshult-high-cabinet-f-built-in-applianc-2|89615608 69615609 49615610 29615611 29615606 09615607 99616283 79616284 59616280 49616285 39616281 19616282
metod-knivshult-high-cabinet-f-built-in-applianc-3|99587803 79589327 79588484 69587734 69587606 59587126 49587834 99616650 79616651 59616652 39616653 19616654 19616649 99617027 89617023 79617028 69617024 39617025 19617026
@@ -881,6 +892,7 @@ metod-maximera-hi-cab-f-ov-w-dr-2-frnts-2-hi-drw|99586257 99492367 99470092 9946
metod-maximera-hi-cab-w-2-doors-4-drawers-60-x-6|99466132 89557608 79507044 79486579 59604871 49507045 19518639
metod-maximera-hi-cab-w-shlvs-4-drawers-dr-2-frn|39377799 29507027 79509463 79355677 59507035 49507026 29493431
metod-maximera-high-cab-f-oven-w-door-3-drawers|99459966 99624424 99565392 99556769 99517155 99507062 99492621
+metod-maximera-high-cabinet-drawers-40-x-60-x-20|99507024 99473321 79518783 79362215 99628342 99628224 99606203
metod-maximera-high-cabinet-f-built-in-appliance|99538025 99509532 89518061 79578946 79558255 79557171 69254061
metod-maximera-high-cabinet-f-built-in-appliance-2|89507053 09466848 99606038 99605864 99604195 99565537 99538959 29615649 89615689 29615710 99615740 99615735 99615716 99615641 99616396 69616393 99616419 99616382 99616344 99616315 89616405
metod-maximera-high-cabinet-f-built-in-appliance-3|49616737 09616715 99616787 99616768 99616749 99616711 99616674 99617126 99617112 99617094 89617160 89617155 89617103 79617146
diff --git a/src/data/ikea-rows.ts b/src/data/ikea-rows.ts
index 4a0bfbd..4d87b06 100644
--- a/src/data/ikea-rows.ts
+++ b/src/data/ikea-rows.ts
@@ -75,6 +75,7 @@ BESTÅ|cabrow|TV bench with doors, 240 × 42 × 76 cm|240|76|42|knobs=none,n=2,o
BESTÅ|open|Shelving unit, 60 × 40 × 193 cm|60|193|40
BESTÅ|tv|TV bench, 120 × 40 × 48 cm|120|48|40|knobs=none,doors=0
BESTÅ|tv|TV bench with doors, 120 × 42 × 48 cm|120|48|42|knobs=none
+BESTÅ|tv|TV bench with drawers, 120 × 42 × 48 cm|120|48|42|rows=1,knobs=none,cat=TV bench with drawers
BESTÅ|tv|TV bench with doors, 120 × 42 × 74 cm|120|74|42|knobs=none
BESTÅ|tv|TV bench, 180 × 40 × 64 cm|180|64|40|knobs=none,doors=0
BESTÅ BURS|tv|TV bench, 180 × 41 × 49 cm|180|49|41
@@ -88,6 +89,10 @@ BILLY|bookcase|Bookcase, 120 × 28 × 237 cm|120|237|28
BILLY|bookrow|Bookcase, 160 × 28 × 202 cm|160|202|28|n=2,of=bookcase
BILLY|bookrow|Bookcase, 200 × 28 × 237 cm|200|237|28|of=bookcase,u=80+80+40
BILLY|bookrow|Bookcase, 240 × 28 × 106 cm|240|106|28|n=3,of=bookcase
+BILLY|extension|Height extension unit, 40 × 28 × 35 cm|40|35|28
+BILLY|extension|Height extension unit, 80 × 28 × 35 cm|80|35|28
+BILLY|mixed|Bookcase with drawer, 80 × 30 × 106 cm|80|106|30|rows=1,doors=0,shelves=1
+BILLY|mixed|Bookcase with drawer, 80 × 30 × 202 cm|80|202|30|rows=1,doors=0,shelves=3
BILLY / HÖGADAL|cabinet|Bookcase with door, 40 × 30 × 106 cm|40|106|30|doors=1
BILLY / HÖGADAL|cabinet|Bookcase with door, 40 × 30 × 202 cm|40|202|30|doors=1
BILLY / HÖGADAL|cabinet|Bookcase with doors, 80 × 30 × 106 cm|80|106|30
@@ -104,6 +109,7 @@ BILLY / OXBERG|cabinet|Bookcase with panel/glass door, 40 × 30 × 202 cm|40|202
BILLY / OXBERG|cabinet|Bookcase with doors, 40 × 41 × 202 cm|40|202|41
BILLY / OXBERG|cabinet|Bookcase with glass door, 40 × 41 × 202 cm|40|202|41|doors=1
BILLY / OXBERG|cabinet|Bookcase with panel/glass door, 40 × 41 × 202 cm|40|202|41|doors=1
+BILLY / OXBERG|cabinet|Bookcase w hght ext ut/pnl/glss drs, 40 × 30 × 237 cm|40|237|30|doors=1
BILLY / OXBERG|cabinet|Bookcase with glass door, 40 × 30 × 237 cm|40|237|30|doors=1
BILLY / OXBERG|cabinet|Bookcase with doors, 80 × 30 × 106 cm|80|106|30
BILLY / OXBERG|cabinet|Bookcase with doors, 80 × 30 × 202 cm|80|202|30
@@ -111,10 +117,12 @@ BILLY / OXBERG|cabinet|Bookcase with panel/glass doors, 80 × 30 × 202 cm|80|20
BILLY / OXBERG|cabinet|Bookcase with doors, 80 × 41 × 202 cm|80|202|41
BILLY / OXBERG|cabinet|Bookcase with glass-doors, 80 × 41 × 202 cm|80|202|41
BILLY / OXBERG|cabinet|Bookcase with panel/glass doors, 80 × 41 × 202 cm|80|202|41
+BILLY / OXBERG|cabinet|Bookcase w doors/extension unit, 80 × 30 × 237 cm|80|237|30
BILLY / OXBERG|cabinet|Bookcase with glass doors, 80 × 30 × 237 cm|80|237|30
BILLY / OXBERG|cabrow|Bookcase with glass-doors, 120 × 30 × 202 cm|120|202|30|of=cabinet,u=80+40
BILLY / OXBERG|cabrow|Bookcase with panel/glass doors, 120 × 30 × 202 cm|120|202|30|of=cabinet,u=80+40
BILLY / OXBERG|cabrow|Bookcase with panel/glass doors, 160 × 30 × 202 cm|160|202|30|n=2,of=cabinet
+BILLY / OXBERG|cabrow|Bookcase w height extension ut/drs, 160 × 30 × 237 cm|160|237|30|n=2,of=cabinet
BINGSTA|armchair|Armchair|75|90|80
BJÖRKBERGET|office|Swivel chair|60|105|64|arms=none
BJÖRKSNÄS|bed|Bed frame, Standard King, 150 × 200 cm|166|100|209|m=150
@@ -191,6 +199,7 @@ EKET|chest|Cabinet with 2 drawers, 70 × 35 × 35 cm|70|35|35|rows=2
EKET|nightstand|Cabinet with 2 drawers, 35 × 35 × 35 cm|35|35|35|rows=2
EKET|wallcab|Wall cabinet with glass door, 35 × 25 × 35 cm|35|35|25|knobs=none,doors=1
EKET|wallcab|Wall cb w 1 shlf/door, 35 × 35 × 70 cm|35|70|35|knobs=none,doors=1,shelves=1
+EKET|wallcab|Media shelf, 70 × 35 × 35 cm|70|35|35|knobs=none,doors=0,shelves=0,cat=Media shelf
EKET|wallcab|Wall cb with 2 doors, 70 × 35 × 70 cm|70|70|35|knobs=none,doors=2
EKET|wallshelf|Wall-mounted shelving unit, 35 × 25 × 35 cm|35|35|25
EKET|wallshelf|Wall-mounted shelving unit, 35 × 35 × 35 cm|35|35|35
@@ -631,6 +640,7 @@ LASTARE|cabinet|Frame with doors, 60 × 42 × 100 cm|60|100|42
LASTARE|cabinet|Frame with doors, 80 × 42 × 200 cm|80|200|42
LASTARE|chest|Chest of 4 drawers, 80 × 42 × 100 cm|80|100|42|rows=4
LASTARE|dining|Table, 100 × 42 × 74 cm|100|74|42
+LASTARE|extension|Height extension unit with doors, 80 × 42 × 36 cm|80|36|42|doors=2
LASTARE|wallcab|Wall mounted frame with doors, 60 × 32 × 60 cm|60|60|32
LEDAMOT|cabinet|Cabinet, 150 × 42 × 75 cm|150|75|42
LILLÅNÄS|chair|Chair|44|88|50
@@ -795,6 +805,7 @@ METOD / KNIVSHULT|kitchen|Hi cab w 2 doors/4 drawers, 40 × 60 × 220 cm|40|220|
METOD / KNIVSHULT|kitchen|Base cabinet with 2 drawers, 60 × 37 cm|60|80|37|z=r2
METOD / KNIVSHULT|kitchen|Base cabinet with 3 drawers, 60 × 60 cm|60|80|60|z=r3
METOD / KNIVSHULT|kitchen|Base cb 3 frnts/2 low/1 md/1 hi drw, 60 × 60 cm|60|80|60|z=r3
+METOD / KNIVSHULT|kitchen|High cabinet with drawers, 60 × 60 × 140 cm|60|140|60|z=r3@120+r1,cat=High cabinet with drawers
METOD / KNIVSHULT|kitchen|Hi cab w shlvs/4 drawers/dr/2 frnts, 60 × 60 × 220 cm|60|220|60|z=r2@80+d1s3
METOD / KNIVSHULT|kitchen|Base cab with 2 fronts/3 drawers, 80 × 37 cm|80|80|37|z=r2
METOD / KNIVSHULT|kitchen|Base cb 2 frnts/2 low/1 md/1 hi drw, 80 × 60 cm|80|80|60|z=r2
@@ -825,6 +836,7 @@ METOD / MAXIMERA|appliance|Base cab f hob/2 fronts/3 drawers, 80 × 60 cm|80|80|
METOD / MAXIMERA|appliance|Base cab f hob/3 fronts/3 drawers, 80 × 60 cm|80|80|60|use=hob,z=r3||metod-maximera-base-cab-f-hob-3-fronts-3-drawers-2
METOD / MAXIMERA|cornercab|Corner base cab w drawer and p-out, 128 × 68 cm|128|80|68|rows=1,blind=60,inner=pullout
METOD / MAXIMERA|cornercab|Corner base cab w drawer and shelf, 128 × 68 cm|128|80|68|rows=1,shelves=1,blind=60
+METOD / MAXIMERA|kitchen|High cabinet with drawers, 40 × 60 × 200 cm|40|200|60|z=r5,cat=High cabinet with drawers
METOD / MAXIMERA|kitchen|Base cabinet with 2 drawers, 60 × 37 cm|60|80|37|z=r2
METOD / MAXIMERA|kitchen|Base cabinet with 3 drawers, 60 × 60 cm|60|80|60|z=r3
METOD / MAXIMERA|kitchen|Base cb 2 fronts/2 high drawers, 60 × 60 cm|60|80|60|z=r2
diff --git a/src/lib/plan/cabinet.ts b/src/lib/plan/cabinet.ts
index af8de68..ccadaea 100644
--- a/src/lib/plan/cabinet.ts
+++ b/src/lib/plan/cabinet.ts
@@ -176,10 +176,30 @@ export function buildCabinet(b: PlanBuilder, s: ProductSpec) {
// a cabinet on castors rolls about: nothing to fix to the wall
if (ch) liftOntoCastors(b);
+ else if (s.cabinet?.onTop) onTopStep(b, s.cabinet.onTop, f.bottom, W, D, t);
else if (wall) f.hang();
else if (H >= 800) f.anchor();
}
+/** A height extension unit goes on top of the bookcase or cabinet it extends, screwed down through its bottom. */
+function onTopStep(b: PlanBuilder, what: string, bottom: string, W: number, D: number, t: number) {
+ b.step(
+ {
+ title: `Screw it onto the top of the ${what}`,
+ detail: `Line it up with the back and both sides, then screw down through its bottom into the ${what}.`,
+ tools: ["screwdriver"],
+ people: W > 600 ? 2 : 1,
+ kind: "screws",
+ warnings: W > 600 ? ["two"] : [],
+ },
+ () => {
+ const list: FitOpts[] = [];
+ for (const x of W > 600 ? [-W / 2 + 80, 0, W / 2 - 80] : [-W / 2 + 80, W / 2 - 80]) for (const z of [-D / 4, D / 4]) list.push({ on: bottom, at: [x, t, z], dir: [0, -1, 0], hole: false });
+ b.fits(HW.screwM, list, 0.08);
+ },
+ );
+}
+
/** Shoe cabinets like BISSA or HEMNES: stacked compartments with fronts that tip open from the bottom. */
function tiltCabinet(b: PlanBuilder, s: ProductSpec, p: CabinetParams) {
const W = s.size.w * 10, H = s.size.h * 10, D = s.size.d * 10;
diff --git a/src/lib/plan/drawers.ts b/src/lib/plan/drawers.ts
index 710409c..6aae713 100644
--- a/src/lib/plan/drawers.ts
+++ b/src/lib/plan/drawers.ts
@@ -277,6 +277,7 @@ export function buildDrawers(b: PlanBuilder, s: ProductSpec) {
// a drawer unit on castors rolls about: nothing to fix to the wall
if (ch) return liftOntoCastors(b);
+ if (s.drawers?.free) return;
f.anchor(f.top, H);
const last = b.steps[b.steps.length - 1];
last.detail = "Chests of drawers can tip over if they're not fixed. Wall screws aren't included: pick ones made for your wall.";
diff --git a/src/lib/plan/mixed.ts b/src/lib/plan/mixed.ts
index b9af19b..82b05a6 100644
--- a/src/lib/plan/mixed.ts
+++ b/src/lib/plan/mixed.ts
@@ -12,7 +12,7 @@ import { clamp } from "./math";
export function buildMixed(b: PlanBuilder, s: ProductSpec) {
const c = s.cabinet ?? {};
const p = {
- doors: c.doors === 1 ? 1 : 2,
+ doors: c.doors === 0 ? 0 : c.doors === 1 ? 1 : 2,
shelves: clamp(Math.round(c.shelves ?? 1), 0, 4),
rail: !!c.rail,
plinth: c.plinth ?? s.size.h > 100,
@@ -180,55 +180,58 @@ export function buildMixed(b: PlanBuilder, s: ProductSpec) {
const sgn = nd === 2 && i === 1 ? 1 : -1;
return { x: sgn * (W / 2 - 22), sgn };
};
- b.step(
- {
- title: nd > 1 ? "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);
- doors.forEach((d, i) => b.stage(d, [(i - (nd - 1) / 2) * (dwid + 80), t / 2, 0], [Math.PI / 2, 0, 0], [0, 160, 0]));
- b.then(0.1);
- const hinges: FitOpts[] = [];
- const screws: FitOpts[] = [];
- doors.forEach((d, i) => {
- const { x, sgn } = hingeX(i);
- for (const y of hingeYs) {
- hinges.push({ on: d, at: [x, y, D / 2], dir: [0, 0, 1], twist: sgn > 0 ? Math.PI : 0 });
- for (const dy2 of [-24, 24]) screws.push({ on: d, at: [x + sgn * 4, y + dy2, 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);
- },
- );
- b.step(
- {
- title: nd > 1 ? "Hang the doors" : "Hang the door",
- detail: "Slide each hinge arm onto its plate until it clicks.",
- kind: "doors",
- people: dht > 1500 ? 2 : 1,
- warnings: dht > 1500 ? ["two"] : [],
- },
- () => {
- b.stagger(0.35);
- doors.forEach((d) => b.add(d, [0, 0, 380]));
- },
- );
- b.step(
- {
- title: "Line up the doors",
- detail: "Turn the hinge screws a little until the gaps look even.",
- tools: ["screwdriver"],
- kind: "doors",
- },
- () => {},
- );
+ // a bookcase with a drawer: open shelves above it, no doors
+ if (nd > 0) {
+ b.step(
+ {
+ title: nd > 1 ? "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);
+ doors.forEach((d, i) => b.stage(d, [(i - (nd - 1) / 2) * (dwid + 80), t / 2, 0], [Math.PI / 2, 0, 0], [0, 160, 0]));
+ b.then(0.1);
+ const hinges: FitOpts[] = [];
+ const screws: FitOpts[] = [];
+ doors.forEach((d, i) => {
+ const { x, sgn } = hingeX(i);
+ for (const y of hingeYs) {
+ hinges.push({ on: d, at: [x, y, D / 2], dir: [0, 0, 1], twist: sgn > 0 ? Math.PI : 0 });
+ for (const dy2 of [-24, 24]) screws.push({ on: d, at: [x + sgn * 4, y + dy2, 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);
+ },
+ );
+ b.step(
+ {
+ title: nd > 1 ? "Hang the doors" : "Hang the door",
+ detail: "Slide each hinge arm onto its plate until it clicks.",
+ kind: "doors",
+ people: dht > 1500 ? 2 : 1,
+ warnings: dht > 1500 ? ["two"] : [],
+ },
+ () => {
+ b.stagger(0.35);
+ doors.forEach((d) => b.add(d, [0, 0, 380]));
+ },
+ );
+ b.step(
+ {
+ title: "Line up the doors",
+ detail: "Turn the hinge screws a little until the gaps look even.",
+ tools: ["screwdriver"],
+ kind: "doors",
+ },
+ () => {},
+ );
+ }
/* ---------- steps: the drawers ---------- */
const d0 = drawers[0];
@@ -290,7 +293,7 @@ export function buildMixed(b: PlanBuilder, s: ProductSpec) {
b.step(
{
title: bar ? "Screw on the handles" : "Screw on the knobs",
- detail: "Screw from the inside of each door and drawer. Snug is enough.",
+ detail: nd > 0 ? "Screw from the inside of each door and drawer. Snug is enough." : "Screw from inside the drawer. Snug is enough.",
tools: ["screwdriver"],
kind: "screws",
},
diff --git a/src/lib/products.ts b/src/lib/products.ts
index 1650ec8..c03c86b 100644
--- a/src/lib/products.ts
+++ b/src/lib/products.ts
@@ -74,7 +74,8 @@ export type Kind =
// the long tail of single pieces
| "lidbox"
| "shelfbench"
- | "workbench";
+ | "workbench"
+ | "extension";
export type X = {
rows?: number;
@@ -315,7 +316,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, sinkcab: 45, appliance: 50, shoerack: 25, clothesrack: 20, changing: 50, divider: 20, backbench: 35, junior: 25, lounge: 30, highchair: 15, cornercab: 45, cornerrobe: 150, usofa: 110, lounger: 35, swivel: 25, conference: 20, cornerdesk: 35, conftable: 30, lidbox: 30, shelfbench: 30, workbench: 45,
+ 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, appliance: 50, shoerack: 25, clothesrack: 20, changing: 50, divider: 20, backbench: 35, junior: 25, lounge: 30, highchair: 15, cornercab: 45, cornerrobe: 150, usofa: 110, lounger: 35, swivel: 25, conference: 20, cornerdesk: 35, conftable: 30, lidbox: 30, shelfbench: 30, workbench: 45, extension: 20,
};
const CATEGORY: Record<Kind, string> = {
@@ -324,7 +325,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", sinkcab: "Sink cabinet", appliance: "Appliance cabinet", shoerack: "Shoe rack", clothesrack: "Clothes rack", changing: "Changing table", divider: "Room divider", backbench: "Bench with backrest", junior: "Junior chair", lounge: "Lounge chair", highchair: "Highchair", cornercab: "Corner base cabinet", cornerrobe: "Corner wardrobe", usofa: "U-shaped sofa", lounger: "Sun lounger", swivel: "Swivel easy chair", conference: "Conference chair", cornerdesk: "Corner desk", conftable: "Conference table", lidbox: "Storage bench", shelfbench: "Bench with storage", workbench: "Work bench",
+ 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", appliance: "Appliance cabinet", shoerack: "Shoe rack", clothesrack: "Clothes rack", changing: "Changing table", divider: "Room divider", backbench: "Bench with backrest", junior: "Junior chair", lounge: "Lounge chair", highchair: "Highchair", cornercab: "Corner base cabinet", cornerrobe: "Corner wardrobe", usofa: "U-shaped sofa", lounger: "Sun lounger", swivel: "Swivel easy chair", conference: "Conference chair", cornerdesk: "Corner desk", conftable: "Conference table", lidbox: "Storage bench", shelfbench: "Bench with storage", workbench: "Work bench", extension: "Height extension unit",
};
export const KIND_ARCH: Record<Kind, Archetype> = {
@@ -332,7 +333,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", sinkcab: "cabinet", appliance: "cabinet", shoerack: "shelf", clothesrack: "shelf", changing: "drawers", divider: "shelf", backbench: "seat", junior: "seat", lounge: "seat", highchair: "seat", cornercab: "cabinet", cornerrobe: "cabinet", usofa: "sofa", lounger: "seat", swivel: "seat", conference: "seat", cornerdesk: "table", conftable: "table", lidbox: "cabinet", shelfbench: "table", workbench: "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", sinkcab: "cabinet", appliance: "cabinet", shoerack: "shelf", clothesrack: "shelf", changing: "drawers", divider: "shelf", backbench: "seat", junior: "seat", lounge: "seat", highchair: "seat", cornercab: "cabinet", cornerrobe: "cabinet", usofa: "sofa", lounger: "seat", swivel: "seat", conference: "seat", cornerdesk: "table", conftable: "table", lidbox: "cabinet", shelfbench: "table", workbench: "table", extension: "cabinet",
};
const round = (x: X) => (x.round ? { round: true } : {});
@@ -505,6 +506,8 @@ function specOf(kind: Kind, name: string, variant: string, w: number, h: number,
case "sideboard":
return { ...base, cabinet: { doors: 2, shelves: 1, rail: false, plinth: true, handles: x.knobs ?? "knob", thickness: 18 } };
case "tv":
+ // x.rows: a TV bench full of drawers, side by side when it's wide
+ if (x.rows) return { ...base, archetype: "drawers", minutes: x.min ?? 30 + 20 * x.rows * (w >= 100 ? 2 : 1), difficulty: 3, drawers: { cols: w >= 100 ? 2 : 1, rows: x.rows, knobs: x.knobs ?? "none", plinth: false, thickness: 16, free: true } };
return { ...base, cabinet: { doors: 2, shelves: 0, rail: false, plinth: false, handles: x.knobs ?? "knob", thickness: 16 } };
case "shoe":
return { ...base, cabinet: { fronts: "tilt", compartments: x.c ?? 2, doors: 0, shelves: 0, rail: false, plinth: false, handles: x.knobs ?? "knob", thickness: 16 } };
@@ -580,7 +583,7 @@ function specOf(kind: Kind, name: string, variant: string, w: number, h: number,
case "mixed": {
// x.rows: drawers, under the doors unless x.dtop (a kitchen base cabinet); x.rail: a wardrobe
const rows = x.rows ?? 1;
- const category = x.rail ? "Wardrobe with drawers" : CATEGORY.mixed;
+ const category = x.rail ? "Wardrobe with drawers" : x.doors === 0 ? "Bookcase with drawer" : CATEGORY.mixed;
const at = x.dtop ? { drawerAt: "top" as const } : {};
return { ...base, category, minutes: x.min ?? MIN.mixed + 20 * rows + (h > 150 ? 30 : 0), people: h > 150 ? 2 : 1, difficulty: 3, cabinet: { doors: x.doors ?? (w > 50 ? 2 : 1), shelves: x.shelves ?? (h > 150 ? 2 : 1), rail: !!x.rail, plinth: x.plinth ?? (h > 100 || !!x.dtop), handles: x.knobs ?? (x.dtop ? "bar" : "knob"), thickness: 18, drawers: rows, ...at } };
}
@@ -617,6 +620,9 @@ function specOf(kind: Kind, name: string, variant: string, w: number, h: number,
const minutes = x.min ?? MIN.cornercab + (door ? 15 : 0) + (x.inner ? 15 : 0) + (x.rows ? 30 : 0) + 5 * (x.shelves ?? 0);
return { ...base, category: hung ? "Corner wall cabinet" : CATEGORY.cornercab, minutes, people: w > 100 ? 2 : 1, difficulty: x.rows ? 3 : 2, cabinet: { doors: door ? 1 : 0, shelves: x.shelves ?? 0, rail: false, plinth: !hung, handles: x.knobs ?? "bar", thickness: 18, ...(hung ? { wall: true } : {}), corner } };
}
+ case "extension":
+ // a short box that stands on top of a bookcase or wardrobe: open, or with doors (x.doors)
+ return { ...base, minutes: x.min ?? MIN.extension + (x.doors ? 15 : 0), people: 1, difficulty: x.doors ? 2 : 1, cabinet: { doors: x.doors ?? 0, shelves: 0, rail: false, plinth: false, handles: x.knobs ?? (x.doors ? "knob" : "none"), thickness: 16, onTop: x.doors ? "cabinet" : "bookcase" } };
case "shelfbench":
// a bench or stool with a shelf under the seat, built like a table: rails under the seat, legs, the shelf between them
return { ...base, difficulty: 2, people: w > 100 ? 2 : 1, table: { attach: w > 70 ? "apron" : "plate", legs: "square", legSize: 45, topThickness: 30, shelf: true, seat: true, inner: true } };
@@ -712,5 +718,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], sinkcab: [60, 80, 60], appliance: [60, 200, 60], shoerack: [80, 40, 32], clothesrack: [100, 160, 46], changing: [80, 100, 55], divider: [150, 170, 25], backbench: [120, 86, 60], junior: [43, 91, 52], lounge: [72, 88, 80], highchair: [58, 90, 62], cornercab: [88, 80, 88], cornerrobe: [161, 201, 111], usofa: [306, 83, 241], lounger: [66, 87, 195], swivel: [78, 98, 80], conference: [60, 86, 60], cornerdesk: [140, 74, 130], conftable: [140, 74, 68], lidbox: [100, 48, 42], shelfbench: [110, 46, 38], workbench: [110, 90, 55],
+ 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], appliance: [60, 200, 60], shoerack: [80, 40, 32], clothesrack: [100, 160, 46], changing: [80, 100, 55], divider: [150, 170, 25], backbench: [120, 86, 60], junior: [43, 91, 52], lounge: [72, 88, 80], highchair: [58, 90, 62], cornercab: [88, 80, 88], cornerrobe: [161, 201, 111], usofa: [306, 83, 241], lounger: [66, 87, 195], swivel: [78, 98, 80], conference: [60, 86, 60], cornerdesk: [140, 74, 130], conftable: [140, 74, 68], lidbox: [100, 48, 42], shelfbench: [110, 46, 38], workbench: [110, 90, 55], extension: [80, 35, 28],
};
diff --git a/src/lib/search.ts b/src/lib/search.ts
index 6c210ae..7a156cc 100644
--- a/src/lib/search.ts
+++ b/src/lib/search.ts
@@ -29,6 +29,7 @@ const CATEGORY_WORDS: [Kind, string[]][] = [
["clothesrack", ["clothes rack", "clothes rail", "clothing rack", "clothing rail", "garment rack", "garment rail", "coat rack", "coat stand"]],
["shoerack", ["shoe rack", "shoe shelf", "shoe stand", "shoe bench", "open shoe storage"]],
["shoe", ["shoe", "shoes", "shoe cabinet", "shoe rack"]],
+ ["extension", ["height extension", "height extension unit", "extension unit", "top unit", "bookcase topper", "bookshelf topper", "wardrobe top unit", "closet top unit", "top cabinet for wardrobe"]],
["nightstand", ["nightstand", "bedside", "night stand"]],
["mixed", ["doors and drawers", "cabinet with drawers", "cupboard with drawers", "wardrobe with drawers", "armoire with drawers"]],
["chest", ["drawer", "drawers", "chest", "dresser"]],
@@ -81,7 +82,7 @@ const CATEGORY_WORDS: [Kind, string[]][] = [
];
const KIND_WORDS = new Map(CATEGORY_WORDS);
// rows, sections, and kinds drawn later than a family's other pieces, which only come first when asked for
-const LESSER = new Set<Kind>(["bookrow", "cabrow", "section", "sinkcab", "appliance", "washstand", "shoerack", "clothesrack", "changing", "divider", "backbench", "junior", "lounge", "highchair", "cornercab", "cornerrobe", "usofa", "lounger", "swivel", "conference", "cornerdesk", "conftable", "lidbox", "shelfbench", "workbench"]);
+const LESSER = new Set<Kind>(["bookrow", "cabrow", "section", "sinkcab", "appliance", "washstand", "shoerack", "clothesrack", "changing", "divider", "backbench", "junior", "lounge", "highchair", "cornercab", "cornerrobe", "usofa", "lounger", "swivel", "conference", "cornerdesk", "conftable", "lidbox", "shelfbench", "workbench", "extension"]);
export function kindOf(q: string): Kind | null {
const f = " " + fold(q) + " ";
diff --git a/src/lib/shorthand.ts b/src/lib/shorthand.ts
index 95c3c30..3b0aea3 100644
--- a/src/lib/shorthand.ts
+++ b/src/lib/shorthand.ts
@@ -22,6 +22,10 @@ const SHORTHAND: [RegExp, string][] = [
[/\bshlf\b/g, "shelf"],
[/\bshlvs?\b/g, "shelves"],
[/\bp-out\b/g, "pull-out"],
+ [/\bhght\b/g, "height"],
+ [/\bext ut\b/g, "extension unit"],
+ [/\bpnl\b/g, "panel"],
+ [/\bglss\b/g, "glass"],
];
export function spellOut(t: string) {
diff --git a/src/lib/types.ts b/src/lib/types.ts
index e616bbe..a594f0e 100644
--- a/src/lib/types.ts
+++ b/src/lib/types.ts
@@ -27,6 +27,7 @@ export interface DrawersParams {
thickness: number;
changing?: boolean; // a changing table: a changing top goes on last (size.h and size.d take it in)
castors?: boolean; // stands on castors (size.h takes them in)
+ free?: boolean; // low enough to stand free: not fixed to the wall (a TV bench with drawers)
modules?: number; // a modular chest (NORDLI): this many columns of `rows` slots, split by dividers
count?: number; // modular chests: drawers in the slots, from the bottom row up; the rest stay open
}
@@ -79,6 +80,7 @@ export interface CabinetParams {
corner?: CornerCab; // a kitchen corner cabinet
lid?: { soft?: boolean }; // a box with a lid on hinges instead (storage benches); a padded lid on a footstool
castors?: boolean; // stands on castors (size.h takes them in)
+ onTop?: "bookcase" | "cabinet"; // a height extension unit: fixed on top of the bookcase or cabinet it extends
}
/**