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 benches with a backrest

Youssefc97d4d7f59db
diff --git a/scripts/ikea/build.ts b/scripts/ikea/build.ts
index c088667..47f0c55 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"]);
+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"]);
function baseMatch(name: string, draw: Draw): CatalogEntry | undefined {
const fam = fold(name);
diff --git a/scripts/ikea/classify.ts b/scripts/ikea/classify.ts
index 52b7306..bd35764 100644
--- a/scripts/ikea/classify.ts
+++ b/scripts/ikea/classify.ts
@@ -321,6 +321,8 @@ const RULES: Rule[] = [
[/^(bar stool with backrest|bar chair)$/, () => ({ kind: "chair", x: { seatH: 63 } })],
[/^(stool|bar stool|step stool|folding stool|children's stool|stool, \d+ steps?)$/, () => ({ kind: "stool" })],
[/^(bench|bench with shoe storage)$/, () => ({ kind: "bench" })],
+ // a bench with a backrest and armrests, built like a wide chair (IKEA gives no size: a typical garden bench)
+ [/^bench with backrest$/, (_m, c) => (c.f.spr ? "bench with backrest sold with cushions" : { kind: "backbench" })],
[/^(armchair|easy chair|wing chair|high-back armchair|low-back armchair|rocking-chair|children's armchair|armchair with cushion)$/, () => ({ kind: "armchair" })],
[/^((\d)(,5)?-seat (modular )?sofa(-bed)?|sofa|sofa-bed|loveseat)$/, (m) => {
const seats = m[2] ? Number(m[2]) + (m[3] ? 1 : 0) : 3;
diff --git a/scripts/ikea/slugs.json b/scripts/ikea/slugs.json
index 44050a9..75adb38 100644
--- a/scripts/ikea/slugs.json
+++ b/scripts/ikea/slugs.json
@@ -120,6 +120,7 @@
"BONDHOLMEN|2-seat sofa, outdoor": "bondholmen-2-seat-sofa-outdoor",
"BONDHOLMEN|2-seat sofa, outdoor, 139 × 81 × 73 cm": "bondholmen-2-seat-sofa-outdoor-139-x-81-x-73",
"BONDHOLMEN|Armchair, outdoor": "bondholmen-armchair-outdoor",
+ "BONDHOLMEN|Bench with backrest, outdoor": "bondholmen-bench-backrest-outdoor",
"BONDHOLMEN|Chair with armrests, outdoor": "bondholmen-chair-armrests-outdoor",
"BONDHOLMEN|Table, outdoor, 235 × 90 cm": "bondholmen-table-outdoor-235-x-90",
"BORGEBY|Coffee table, 70 cm": "borgeby-coffee-table-70",
@@ -774,6 +775,7 @@
"NÄMMARÖ|3-seat sofa, 264 cm": "nammaro-3-seat-sofa-264",
"NÄMMARÖ|Bar stool, outdoor": "nammaro-bar-stool-outdoor",
"NÄMMARÖ|Bar table, outdoor, 120 × 40 cm": "nammaro-bar-table-outdoor-120-x-40",
+ "NÄMMARÖ|Bench with backrest, outdoor": "nammaro-bench-backrest-outdoor",
"NÄMMARÖ|Bench, outdoor, 120 cm": "nammaro-bench-outdoor-120",
"NÄMMARÖ|Chair": "nammaro-chair",
"NÄMMARÖ|Chair with armrests, outdoor": "nammaro-chair-armrests-outdoor",
@@ -853,6 +855,7 @@
"OSKARSHAMN|Wing chair": "oskarshamn-wing-chair",
"ÖVNING|Trolley, 54 × 33 cm": "ovning-trolley-54-x-33",
"PÅHL|Desk, 96 × 58 cm": "pahl-desk-96-x-58",
+ "PÄRONHOLMEN|Bench with backrest, outdoor": "paronholmen-bench-backrest-outdoor",
"PAX / AULI|Wardrobe with sliding doors, 150 × 43 × 201 cm": "pax-auli-wardrobe-sliding-doors-150-x-43-x-201",
"PAX / AULI|Wardrobe with sliding doors, 150 × 66 × 201 cm": "pax-auli-wardrobe-sliding-doors-150-x-66-x-201",
"PAX / BERGSBO|Wardrobe": "pax-bergsbo-wardrobe",
diff --git a/src/data/ikea-items.ts b/src/data/ikea-items.ts
index c7287a8..81a1210 100644
--- a/src/data/ikea-items.ts
+++ b/src/data/ikea-items.ts
@@ -133,6 +133,7 @@ bolmen-step-stool|70574429
bondholmen-2-seat-sofa-outdoor|49583732
bondholmen-2-seat-sofa-outdoor-139-x-81-x-73|50558185
bondholmen-armchair-outdoor|19583724 60558161
+bondholmen-bench-backrest-outdoor|50558166
bondholmen-chair-armrests-outdoor|10558173
bondholmen-table-outdoor-235-x-90|20558196
borgeby-coffee-table-70|70389356 30500355
@@ -844,6 +845,7 @@ nammaro-2-seat-sofa-147|99579308 59611174 89610248 09607513 69621511 19575427
nammaro-3-seat-sofa-264|79649114 59576024 39579311 19610440 09649688 09643605
nammaro-bar-stool-outdoor|70510296
nammaro-bar-table-outdoor-120-x-40|10510303
+nammaro-bench-backrest-outdoor|30510302
nammaro-bench-outdoor-120|60510310
nammaro-chair|39610260 19610256
nammaro-chair-armrests-outdoor|90511105 59610264 69610268
@@ -926,6 +928,7 @@ ortrask-coffee-table-75-x-48|70635847
oskarshamn-wing-chair|90523622 30521678 50521663
ovning-trolley-54-x-33|00517003
pahl-desk-96-x-58|49619340
+paronholmen-bench-backrest-outdoor|90503799
pax-auli-wardrobe-sliding-doors-150-x-43-x-201|29561335 89561342 59561329 79561333 59561334 09561336
pax-auli-wardrobe-sliding-doors-150-x-66-x-201|99561351 59561305 79561314 09561317
pax-bergsbo-wardrobe|59502716
diff --git a/src/data/ikea-rows.ts b/src/data/ikea-rows.ts
index 21506a6..700a1e0 100644
--- a/src/data/ikea-rows.ts
+++ b/src/data/ikea-rows.ts
@@ -119,6 +119,7 @@ BOAXEL|open|Shelving unit, 62 × 40 × 201 cm|62|201|40
BOLLPOJKE|desk|Desk, 90 × 55 cm|90|74|55
BOLMEN|stool|Step stool|35|50|35
BONDHOLMEN|armchair|Armchair, outdoor|75|90|80||outdoor garden
+BONDHOLMEN|backbench|Bench with backrest, outdoor|120|86|60||outdoor garden
BONDHOLMEN|chair|Chair with armrests, outdoor|44|88|50|arms=slim|outdoor garden
BONDHOLMEN|dining|Table, outdoor, 235 × 90 cm|235|74|90||outdoor garden
BONDHOLMEN|sofa|2-seat sofa, outdoor, 139 × 81 × 73 cm|139|73|81|seats=2|outdoor garden
@@ -770,6 +771,7 @@ MYDAL|bunk|Bunk bed frame, 90 × 200 cm|211|160|100|m=90
MYLLRA|changing|Changing table with drawers, 85 × 79 × 97 cm|85|97|79|rows=3|kids children
MYLLRA|cot|Cot with drawer, 70 × 140 cm|150|86|78|m=70,l=140,drawer=1
NACKANÄS|dining|Table, 140 × 76 cm|140|74|76
+NÄMMARÖ|backbench|Bench with backrest, outdoor|120|86|60||outdoor garden
NÄMMARÖ|bar|Bar table, outdoor, 120 × 40 cm|120|105|40||outdoor garden
NÄMMARÖ|bench|Bench, outdoor, 120 cm|120|45|38||outdoor garden
NÄMMARÖ|chair|Chair|44|88|50||outdoor garden
@@ -854,6 +856,7 @@ ORRESLÄTT|armchair|Armchair|75|90|80
OSKARSHAMN|armchair|Wing chair|75|104|80
ÖVNING|trolley|Trolley, 54 × 33 cm|54|80|33||kids children
PÅHL|desk|Desk, 96 × 58 cm|96|74|58||kids children
+PÄRONHOLMEN|backbench|Bench with backrest, outdoor|120|86|60||outdoor garden
PAX|wardrobe|Wardrobe frame, 50 × 58 × 201 cm|50|201|58|doors=0,shelves=2
PAX|wardrobe|Wardrobe frame, 75 × 58 × 201 cm|75|201|58|doors=0,shelves=2
PAX / AULI|cabrow|Wardrobe with sliding doors, 150 × 43 × 201 cm|150|201|43|shelves=2,slides=2,n=2,of=wardrobe
diff --git a/src/lib/products.ts b/src/lib/products.ts
index 34632db..2509f5c 100644
--- a/src/lib/products.ts
+++ b/src/lib/products.ts
@@ -56,7 +56,8 @@ export type Kind =
| "shoerack"
| "clothesrack"
| "changing"
- | "divider";
+ | "divider"
+ | "backbench";
export type X = {
rows?: number;
@@ -271,7 +272,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,
+ 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,
};
const CATEGORY: Record<Kind, string> = {
@@ -280,7 +281,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",
+ 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",
};
export const KIND_ARCH: Record<Kind, Archetype> = {
@@ -288,7 +289,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",
+ 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",
};
const round = (x: X) => (x.round ? { round: true } : {});
@@ -392,6 +393,9 @@ export function specFor(kind: Kind, name: string, variant: string, w: number, h:
}
return { ...base, archetype: "shelf", minutes: x.min ?? MIN.changing, difficulty: 2, shelf: { style: "bookcase", shelves: x.shelves ?? 2, fixedShelf: false, back: false, plinth: false, outer: 18, changing: true } };
}
+ case "backbench":
+ // built like a wide chair with armrests: back legs that carry the backrest, front legs up to the armrests
+ return { ...base, people: w > 100 ? 2 : 1, seat: { kind: "chair", seat: "square", seatH: x.seatH ?? 45, backH: h, arms: true } };
case "divider":
// size.w is the width laid out flat; it stands folded into a zigzag
return { ...base, difficulty: 1, people: h > 160 ? 2 : 1, shelf: { style: "screen" } };
@@ -544,5 +548,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],
+ 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],
};
diff --git a/src/lib/search.ts b/src/lib/search.ts
index 55ef04f..7d6af23 100644
--- a/src/lib/search.ts
+++ b/src/lib/search.ts
@@ -62,6 +62,7 @@ const CATEGORY_WORDS: [Kind, string[]][] = [
["kidschair", ["children s chair", "childrens chair", "kids chair", "kid chair"]],
["chair", ["chair", "chairs"]],
["stool", ["stool", "stools"]],
+ ["backbench", ["bench with backrest", "garden bench", "bench with back", "outdoor bench", "park bench", "patio bench"]],
["bench", ["bench"]],
];
const KIND_WORDS = new Map(CATEGORY_WORDS);