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 corner sofas and sofas with a chaise longue

Youssef814a7eb1c928
diff --git a/scripts/ikea/classify.ts b/scripts/ikea/classify.ts
index a62f015..24d6b2e 100644
--- a/scripts/ikea/classify.ts
+++ b/scripts/ikea/classify.ts
@@ -118,6 +118,24 @@ const RULES: Rule[] = [
return { kind: "office", x: { arms: arms ? "slim" : "none", seatH } };
}],
[/swivel|office chair|gaming chair|conference|desk chair|highchair|lounge|reclining|lounger|hammock|massage/, () => "office, swivel or lounge chair"],
+ // sofas with a chaise longue at one or both ends, and corner sofas (an L of sections)
+ [/^(?=.*\bsofa)(?=.*\b(corner|crnr|chaise))/, (m) => {
+ const t = m.input ?? "";
+ if (/u-shaped/.test(t)) return "U-shaped sofa";
+ const count = t.match(/(\d)(,5)?[- ]seat/);
+ const n = count ? Number(count[1]) + (count[2] ? 1 : 0) : undefined;
+ if (/corner|crnr/.test(t) && n !== undefined) {
+ if (n > 6) return "corner sofa with more than 6 seats";
+ // IKEA's corner sofas go either way round: draw the return on the left, where the view looks into the L
+ return { kind: "corner", x: { seats: n, corner: "left", open: /chaise|open end/.test(t) || undefined } };
+ }
+ // a corner sofa-bed with no seat count is three seats and a chaise longue (FRIHETEN)
+ const seats = n ?? 3;
+ const both = /chaise (longue|lng)s\b/.test(t);
+ if (seats > 5) return "sofa with more than 5 seats";
+ if (both && seats < 3) return "chaise longues with no sofa between";
+ return { kind: "chaise", x: { seats, chaise: both ? "both" : /\bleft\b/.test(t) ? "left" : "right" } };
+ }],
[/corner|chaise|u-shaped|crnr/, () => "corner or chaise longue sofa"],
[/section|add-on|armrest|backrest for|seat sec|modular (easy chair|chaise)/, () => "sofa or storage section"],
[/\b(bunk|loft)\b/, () => "bunk or loft bed"],
@@ -258,6 +276,28 @@ export function classify(f: Fact, hints: Hints): Verdict {
} else if (hint?.kind === kind) set(hint.w, hint.h, hint.d);
else if (kind !== "bench") return { skip: "no size given" };
if (guessed.h && hint?.kind === kind) h = hint.h;
+ } else if (kind === "chaise" || kind === "corner") {
+ // IKEA gives no size: seat width, depth and height from a straight sofa of the same family, else a typical one
+ const sofa = hints(family, "sofa");
+ const arms = sofa?.x.arms ?? "wide";
+ const armCm = arms === "wide" ? 17 : arms === "slim" ? 8 : 0;
+ const per = sofa?.kind === "sofa" && sofa.x.seats ? Math.min(75, Math.max(55, (sofa.w - 2 * Math.min(armCm, sofa.w * 0.12)) / sofa.x.seats)) : 64;
+ const sd = sofa?.kind === "sofa" && sofa.d <= 110 ? sofa.d : 92;
+ if (sofa?.kind === "sofa") h = sofa.h;
+ x.arms = arms;
+ x.sd = sd;
+ const n = x.seats ?? 3;
+ if (v.length) return { skip: "corner sofa measured in a way we can't place" };
+ if (kind === "chaise") {
+ [w, d] = [n * per + 2 * armCm, Math.min(175, Math.max(140, sd + 68))];
+ } else {
+ // the long side gets the extra seat; seats shrink a little if the L would be too big to draw
+ const n1 = Math.ceil((n - 1) / 2), n2 = n - 1 - n1;
+ const front = x.open || !n2 ? 0 : armCm;
+ const cw = Math.min(per, (318 - armCm - sd) / n1, n2 ? (238 - sd - front) / n2 : Infinity);
+ if (cw < 50) return { skip: "corner sofa too large" };
+ [w, d] = [armCm + n1 * cw + sd, sd + n2 * cw + front];
+ }
} else if (kind === "office") {
// IKEA gives no size for office chairs: a typical one, taller with a headrest, smaller for children
if (v.length === 3) set(v[0], v[2], v[1]);
diff --git a/scripts/ikea/slugs.json b/scripts/ikea/slugs.json
index 38958f1..9d0a77d 100644
--- a/scripts/ikea/slugs.json
+++ b/scripts/ikea/slugs.json
@@ -14,6 +14,7 @@
"ÅLHULT|Extendable table, 170/220 × 80 cm": "alhult-extendable-table-170-220-x-80",
"ÅLHULT|Table, 120 × 80 cm": "alhult-table-120-x-80",
"ÄLVDALEN|3-seat sofa-bed": "alvdalen-3-seat-sofa-bed",
+ "Ä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|High cabinet with door, 40 × 35 × 195 cm": "angsjon-high-cabinet-door-40-x-35-x-195",
@@ -22,6 +23,8 @@
"ANKARUDDEN|Chest of 6 drawers, 139 × 48 × 87 cm": "ankarudden-chest-6-drawers-139-x-48-x-87",
"ÄPPLARYD|2-seat sofa": "applaryd-2-seat-sofa",
"ÄPPLARYD|3-seat sofa": "applaryd-3-seat-sofa",
+ "ÄPPLARYD|3-seat sofa with chaise longue": "applaryd-3-seat-sofa-chaise-longue",
+ "ÄPPLARYD|4-seat sofa with chaise longue": "applaryd-4-seat-sofa-chaise-longue",
"ASKHOLMEN|Chair, outdoor": "askholmen-chair-outdoor",
"ASKHOLMEN|Table, outdoor, 143 × 75 cm": "askholmen-table-outdoor-143-x-75",
"ASKHOLMEN|Table, outdoor, 60 × 62 cm": "askholmen-table-outdoor-60-x-62",
@@ -34,6 +37,7 @@
"BAGGEBO|Shelving unit, 60 × 30 × 80 cm": "baggebo-shelving-unit-60-x-30-x-80",
"BAGGEBO|Sideboard, 78 × 92 cm": "baggebo-sideboard-78-x-92",
"BÅRSLÖV|3-seat sofa-bed": "barslov-3-seat-sofa-bed",
+ "BÅRSLÖV|3-seat sofa-bed with chaise longue": "barslov-3-seat-sofa-bed-chaise-longue",
"BÄSTBOLL|Gaming chair": "bastboll-gaming-chair",
"BEKVÄM|Kitchen trolley, 58 × 50 cm": "bekvam-kitchen-trolley-58-x-50",
"BEKVÄM|Step stool, 63 cm": "bekvam-step-stool-63",
@@ -142,8 +146,11 @@
"EKHOLMA|2-seat sofa": "ekholma-2-seat-sofa",
"EKHOLMA|2-seat sofa-bed": "ekholma-2-seat-sofa-bed",
"EKHOLMA|3-seat sofa": "ekholma-3-seat-sofa",
+ "EKHOLMA|Corner sofa, 4-seat with open end": "ekholma-corner-sofa-4-seat-open-end",
"EKTORP|2-seat sofa": "ektorp-2-seat-sofa",
+ "EKTORP|3-seat sofa with chaise longue": "ektorp-3-seat-sofa-chaise-longue",
"EKTORP|Armchair": "ektorp-armchair",
+ "EKTORP|Corner sofa, 4-seat": "ektorp-corner-sofa-4-seat",
"ELDBERGET / MALSKÄR|Swivel chair": "eldberget-malskar-swivel-chair",
"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",
@@ -186,6 +193,8 @@
"FÖRSÄLJARE|Sideboard, 140 × 46 × 78 cm": "forsaljare-sideboard-140-x-46-x-78",
"FÖRSIKTIG|Children's stool": "forsiktig-children-s-stool",
"FRIDHULT|Sofa-bed": "fridhult-sofa-bed",
+ "FRIHETEN / KLAGSHAMN|Corner sofa-bed with storage": "friheten-klagshamn-corner-sofa-bed-storage",
+ "FRIHETEN|Corner sofa-bed with storage": "friheten-corner-sofa-bed-storage",
"FRIIDROTT|Drawer unit on castors, 35 × 56 cm": "friidrott-drawer-unit-on-castors-35-x-56",
"FRÖSET|Easy chair": "froset-easy-chair",
"FRÖSJÖN|Shelving unit, 40 × 156 cm": "frosjon-shelving-unit-40-x-156",
@@ -211,6 +220,7 @@
"GLADSTAD|Upholstered bed frame, Standard King, 150 × 200 cm": "gladstad-upholstered-bed-frame-standard-king-150",
"GLENN|Bar stool, 66 cm": "glenn-bar-stool-66",
"GLOSTAD|3-seat sofa": "glostad-3-seat-sofa",
+ "GLOSTAD|3-seat sofa with chaise longue": "glostad-3-seat-sofa-chaise-longue",
"GODISHUS|Chest of 3 drawers, 60 × 40 × 60 cm": "godishus-chest-3-drawers-60-x-40-x-60",
"GRÅFJÄLLET|Bedside table, 45 × 36 × 59 cm": "grafjallet-bedside-table-45-x-36-x-59",
"GRÅFJÄLLET|Dressing table, 100 × 42 cm": "grafjallet-dressing-table-100-x-42",
@@ -290,6 +300,8 @@
"HYLTARP|2-seat sofa": "hyltarp-2-seat-sofa",
"HYLTARP|2-seat sofa-bed": "hyltarp-2-seat-sofa-bed",
"HYLTARP|3-seat sofa": "hyltarp-3-seat-sofa",
+ "HYLTARP|3-seat sofa w chaise longue, left": "hyltarp-3-seat-sofa-w-chaise-longue-left",
+ "HYLTARP|3-seat sofa w chaise longue, right": "hyltarp-3-seat-sofa-w-chaise-longue-right",
"IBBARBO|Stool": "ibbarbo-stool",
"IDANÄS|Bed frame with storage, Standard King, 150 × 200 cm": "idanas-bed-frame-storage-standard-king-150-x-200",
"IDANÄS|Bed frame, Standard Double, 135 × 190 cm": "idanas-bed-frame-standard-double-135-x-190",
@@ -337,7 +349,12 @@
"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",
+ "JÄTTEBO|2,5-seat mod sofa w chaise longue": "jattebo-2-5-seat-mod-sofa-w-chaise-longue",
"JÄTTEBO|3-seat modular sofa": "jattebo-3-seat-modular-sofa",
+ "JÄTTEBO|3,5-seat mod sofa w chaise longues": "jattebo-3-5-seat-mod-sofa-w-chaise-longues",
+ "JÄTTEBO|4-seat mod sofa w chaise longue": "jattebo-4-seat-mod-sofa-w-chaise-longue",
+ "JÄTTEBO|Mod crnr sofa 2,5-seat w chaise lng": "jattebo-mod-crnr-sofa-2-5-seat-w-chaise-lng",
+ "JÄTTEBO|Modular corner sofa, 6 seat": "jattebo-modular-corner-sofa-6-seat",
"JÄTTESTA|Coffee table, 80 × 80 cm": "jattesta-coffee-table-80-x-80",
"JÄTTESTA|Side table, 95 × 30 cm": "jattesta-side-table-95-x-30",
"JÄTTESTA|TV bench, 160 × 40 × 49 cm": "jattesta-tv-bench-160-x-40-x-49",
@@ -351,6 +368,7 @@
"JUTHOLMEN|3-seat modular sofa, outdoor, 210 × 73 cm": "jutholmen-3-seat-modular-sofa-outdoor-210-x-73",
"JUTHOLMEN|Easy chair, outdoor, 65 × 73 × 71 cm": "jutholmen-easy-chair-outdoor-65-x-73-x-71",
"JUTHOLMEN|Easy chair, outdoor, 65 × 73 × 83 cm": "jutholmen-easy-chair-outdoor-65-x-73-x-83",
+ "JUTHOLMEN|Modular corner sofa 3-seat, outdoor": "jutholmen-modular-corner-sofa-3-seat-outdoor",
"JUTTERSBO|Trolley, 36 × 36 cm": "juttersbo-trolley-36-x-36",
"KALLAX|Desk, 111 × 39 cm": "kallax-desk-111-x-39",
"KALLAX|Shelving unit, 112 × 147 cm": "kallax-shelving-unit-112-x-147",
@@ -369,7 +387,14 @@
"KILBERGET|Chest of 6 drawers, 144 × 78 cm": "kilberget-chest-6-drawers-144-x-78",
"KIVIK|1-seat sofa-bed": "kivik-1-seat-sofa-bed",
"KIVIK|2-seat sofa": "kivik-2-seat-sofa",
+ "KIVIK|3-seat sofa with chaise longue": "kivik-3-seat-sofa-chaise-longue",
"KIVIK|4-seat sofa": "kivik-4-seat-sofa",
+ "KIVIK|4-seat sofa with chaise longue": "kivik-4-seat-sofa-chaise-longue",
+ "KIVIK|Corner sofa, 4-seat": "kivik-corner-sofa-4-seat",
+ "KIVIK|Corner sofa, 5-seat": "kivik-corner-sofa-5-seat",
+ "KIVIK|Corner sofa, 5-seat w chaise longue": "kivik-corner-sofa-5-seat-w-chaise-longue",
+ "KIVIK|Corner sofa, 6-seat": "kivik-corner-sofa-6-seat",
+ "KIVIK|Corner sofa, 6-seat w chaise longue": "kivik-corner-sofa-6-seat-w-chaise-longue",
"KLACKENÄS|Sideboard, 120 × 97 cm": "klackenas-sideboard-120-x-97",
"KLEPPSTAD|Bed frame, Standard Double, 135 × 190 cm": "kleppstad-bed-frame-standard-double-135-x-190",
"KLEPPSTAD|Wardrobe with 3 doors, 117 × 55 × 176 cm": "kleppstad-wardrobe-3-doors-117-x-55-x-176",
@@ -425,7 +450,10 @@
"LAGKAPTEN / SPÄND|Desk, 200 × 60 cm": "lagkapten-spand-desk-200-x-60",
"LANDSKRONA|2-seat sofa": "landskrona-2-seat-sofa",
"LANDSKRONA|4-seat sofa": "landskrona-4-seat-sofa",
+ "LANDSKRONA|4-seat sofa with chaise longues": "landskrona-4-seat-sofa-chaise-longues",
"LANDSKRONA|Armchair": "landskrona-armchair",
+ "LANDSKRONA|Corner sofa, 5-seat": "landskrona-corner-sofa-5-seat",
+ "LANDSKRONA|Corner sofa, 6-seat": "landskrona-corner-sofa-6-seat",
"LANESUND|Bookcase, 121 × 37 × 152 cm": "lanesund-bookcase-121-x-37-x-152",
"LANESUND|Glass-door cabinet, 121 × 37 × 152 cm": "lanesund-glass-door-cabinet-121-x-37-x-152",
"LANESUND|Sideboard, 161 × 47 × 81 cm": "lanesund-sideboard-161-x-47-x-81",
@@ -445,8 +473,11 @@
"LILLBERGET|Chest of 6 drawers, 140 × 43 × 68 cm": "lillberget-chest-6-drawers-140-x-43-x-68",
"LILLEHEM|2-seat modular sofa": "lillehem-2-seat-modular-sofa",
"LILLEHEM|3-seat modular sofa": "lillehem-3-seat-modular-sofa",
+ "LILLEHEM|3-seat modular sofa w chaise longue": "lillehem-3-seat-modular-sofa-w-chaise-longue",
"LILLEHEM|4-seat modular sofa": "lillehem-4-seat-modular-sofa",
"LILLEHEM|Armchair": "lillehem-armchair",
+ "LILLEHEM|Modular corner sofa, 2-seat": "lillehem-modular-corner-sofa-2-seat",
+ "LILLEHEM|Modular corner sofa, 4 seat": "lillehem-modular-corner-sofa-4-seat",
"LILLESÄTER|3-seat sofa": "lillesater-3-seat-sofa",
"LILLESÄTER|4-seat sofa": "lillesater-4-seat-sofa",
"LINDÅKRA|2-seat sofa-bed": "lindakra-2-seat-sofa-bed",
@@ -490,6 +521,9 @@
"MANDAL|Bed frame with storage, 120 × 200 cm": "mandal-bed-frame-storage-120-x-200",
"MANNARP|2-seat sofa": "mannarp-2-seat-sofa",
"MANNARP|3-seat sofa": "mannarp-3-seat-sofa",
+ "MANNARP|3-seat sofa with chaise longue": "mannarp-3-seat-sofa-chaise-longue",
+ "MANNARP|4-seat sofa with chaise longue": "mannarp-4-seat-sofa-chaise-longue",
+ "MANNARP|4-seat sofa with chaise longues": "mannarp-4-seat-sofa-chaise-longues",
"MARIEDAMM|Table, 105 cm": "mariedamm-table-105",
"MARIEDAMM|Table, 180 × 100 cm": "mariedamm-table-180-x-100",
"MARKUS|Office chair": "markus-office-chair",
@@ -699,10 +733,13 @@
"SALTSJÖBADEN|2-seat sofa": "saltsjobaden-2-seat-sofa",
"SALTSJÖBADEN|2-seat sofa-bed": "saltsjobaden-2-seat-sofa-bed",
"SALTSJÖBADEN|3-seat sofa": "saltsjobaden-3-seat-sofa",
+ "SALTSJÖBADEN|3-seat sofa with chaise longue": "saltsjobaden-3-seat-sofa-chaise-longue",
"SALTSJÖBADEN|Armchair": "saltsjobaden-armchair",
+ "SALTSJÖBADEN|Corner sofa, 4-seat": "saltsjobaden-corner-sofa-4-seat",
"SANDSBERG|Chair": "sandsberg-chair",
"SEGERÖN|2-seat sofa, outdoor": "segeron-2-seat-sofa-outdoor",
"SEGERÖN|Coffee table, outdoor, 73 × 73 cm": "segeron-coffee-table-outdoor-73-x-73",
+ "SEGERÖN|Corner sofa, 3-seat": "segeron-corner-sofa-3-seat",
"SEGERÖN|Table, outdoor, 91 × 147 cm": "segeron-table-outdoor-91-x-147",
"SEGRARE|Desk sit/stand, 110 × 60 cm": "segrare-desk-sit-stand-110-x-60",
"SKÅLBODA|Armchair": "skalboda-armchair",
@@ -733,6 +770,8 @@
"SLÄKT|Bed frame, 90 × 200 cm": "slakt-bed-frame-90-x-200",
"SLATORP|2-seat sofa": "slatorp-2-seat-sofa",
"SLATORP|3-seat sofa": "slatorp-3-seat-sofa",
+ "SLATORP|3-seat sofa with chaise longue": "slatorp-3-seat-sofa-chaise-longue",
+ "SLATORP|4-seat sofa with chaise longues": "slatorp-4-seat-sofa-chaise-longues",
"SLATTUM|Upholstered bed frame, Standard Double, 135 × 190 cm": "slattum-upholstered-bed-frame-standard-double-13",
"SLATTUM|Upholstered bed frame, Standard Single, 90 × 190 cm": "slattum-upholstered-bed-frame-standard-single-90",
"SMÅGÖRA|Desk, 93 × 51 cm": "smagora-desk-93-x-51",
@@ -759,7 +798,10 @@
"SMYGA|Desk, 122 × 60 cm": "smyga-desk-122-x-60",
"SNIGLAR|Bed frame with slatted bed base, 70 × 160 cm": "sniglar-bed-frame-slatted-bed-base-70-x-160",
"SÖDERHAMN|2-seat sofa": "soderhamn-2-seat-sofa",
+ "SÖDERHAMN|4-seat sofa with chaise longue": "soderhamn-4-seat-sofa-chaise-longue",
"SÖDERHAMN|4-seat sofa-bed": "soderhamn-4-seat-sofa-bed",
+ "SÖDERHAMN|Corner sofa-bed, 6-seat": "soderhamn-corner-sofa-bed-6-seat",
+ "SÖDERHAMN|Corner sofa, 4-seat": "soderhamn-corner-sofa-4-seat",
"SOLUPPGÅNG|Stool, outdoor, 43 × 40 cm": "soluppgang-stool-outdoor-43-x-40",
"SOTENÄS|Armchair": "sotenas-armchair",
"STACKHOLMEN|Stool, outdoor, 48 × 35 × 43 cm": "stackholmen-stool-outdoor-48-x-35-x-43",
@@ -906,6 +948,8 @@
"UGGLERUM|Side table, 46 × 40 cm": "ugglerum-side-table-46-x-40",
"ULRIKSBERG|Armchair": "ulriksberg-armchair",
"UPPÅKRA|3-seat modular sofa": "uppakra-3-seat-modular-sofa",
+ "UPPÅKRA|Modular corner sofa, 3-seat": "uppakra-modular-corner-sofa-3-seat",
+ "UPPÅKRA|Modular corner sofa, 6 seat": "uppakra-modular-corner-sofa-6-seat",
"UTESPELARE|Gaming desk, 160 × 80 cm": "utespelare-gaming-desk-160-x-80",
"UTKLASSNING|Gaming chair": "utklassning-gaming-chair",
"UTMANING|Gaming desk sit/stand, 160 × 80 cm": "utmaning-gaming-desk-sit-stand-160-x-80",
@@ -962,8 +1006,16 @@
"VILTO|Step stool": "vilto-step-stool",
"VIMLE|2-seat sofa": "vimle-2-seat-sofa",
"VIMLE|2-seat sofa-bed": "vimle-2-seat-sofa-bed",
+ "VIMLE|3-seat sofa with chaise longue": "vimle-3-seat-sofa-chaise-longue",
+ "VIMLE|3-seat sofa-bed with chaise longue": "vimle-3-seat-sofa-bed-chaise-longue",
"VIMLE|4-seat sofa": "vimle-4-seat-sofa",
+ "VIMLE|4-seat sofa with chaise longue": "vimle-4-seat-sofa-chaise-longue",
"VIMLE|Armchair": "vimle-armchair",
+ "VIMLE|Corner sofa, 3-seat": "vimle-corner-sofa-3-seat",
+ "VIMLE|Corner sofa, 4-seat": "vimle-corner-sofa-4-seat",
+ "VIMLE|Corner sofa, 5-seat": "vimle-corner-sofa-5-seat",
+ "VIMLE|Corner sofa, 5-seat w chaise longue": "vimle-corner-sofa-5-seat-w-chaise-longue",
+ "VIMLE|Crnr sofa-bed, 5-seat w chaise lng": "vimle-crnr-sofa-bed-5-seat-w-chaise-lng",
"VINGSÖN|Wing chair, in/outdoor": "vingson-wing-chair-in-outdoor",
"VISINGSÖ|Table, 70 × 70 cm": "visingso-table-70-x-70",
"VISKAFORS|2-seat sofa": "viskafors-2-seat-sofa",
@@ -974,8 +1026,12 @@
"VITTSJÖ|Shelving unit, 100 × 93 cm": "vittsjo-shelving-unit-100-x-93",
"VITTSKÄR|2-seat modular sofa": "vittskar-2-seat-modular-sofa",
"VITTSKÄR|2-seat sofa": "vittskar-2-seat-sofa",
+ "VITTSKÄR|3-seat modular corner sofa": "vittskar-3-seat-modular-corner-sofa",
"VITTSKÄR|3-seat modular sofa": "vittskar-3-seat-modular-sofa",
"VITTSKÄR|3-seat sofa": "vittskar-3-seat-sofa",
+ "VITTSKÄR|3-seat sofa with chaise longue": "vittskar-3-seat-sofa-chaise-longue",
+ "VITTSKÄR|4-seat modular corner sofa": "vittskar-4-seat-modular-corner-sofa",
+ "VITTSKÄR|5-seat modular corner sofa": "vittskar-5-seat-modular-corner-sofa",
"VITTSKÄR|Coffee table, 110 × 58 cm": "vittskar-coffee-table-110-x-58",
"VITTSKÄR|Table, 264 × 96 cm": "vittskar-table-264-x-96",
"VRETSTORP|3-seat sofa-bed": "vretstorp-3-seat-sofa-bed",
diff --git a/src/data/ikea-items.ts b/src/data/ikea-items.ts
index 1c04e28..3c42d34 100644
--- a/src/data/ikea-items.ts
+++ b/src/data/ikea-items.ts
@@ -16,6 +16,7 @@ alhult-extendable-table-120-170-x-80|60597921 20600789
alhult-extendable-table-170-220-x-80|50600783 40597922
alhult-table-120-x-80|40600793 00597919
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-high-cabinet-door-40-x-35-x-195|80535079 40535081 60535080
@@ -24,6 +25,8 @@ ankarudden-chest-4-drawers-80-x-48-x-107|80627149
ankarudden-chest-6-drawers-139-x-48-x-87|20627147
applaryd-2-seat-sofa|00506231 20575073 60506233 60575066
applaryd-3-seat-sofa|80506246 10506235 20575087 30575077
+applaryd-3-seat-sofa-chaise-longue|79418057 89418066 79528174 79528169
+applaryd-4-seat-sofa-chaise-longue|49429533 69528179 39429538 09528182
askholmen-chair-outdoor|89576046 59529221 39576256 20557502
askholmen-table-outdoor-143-x-75|50535679
askholmen-table-outdoor-60-x-62|30557498
@@ -37,6 +40,7 @@ baggebo-shelving-unit-60-x-25-x-116|50481172
baggebo-shelving-unit-60-x-30-x-80|30621480
baggebo-sideboard-78-x-92|40553616
barslov-3-seat-sofa-bed|90541584 40541591
+barslov-3-seat-sofa-bed-chaise-longue|30541596 10541578
bastboll-gaming-chair|50586254
bekvam-kitchen-trolley-58-x-50|70240351
bekvam-step-stool|70569545 10225589 40178888 40463852
@@ -164,9 +168,12 @@ eket-wall-mounted-shelving-unit-35-x-35-x-35|49285817 99490274 79285830 59602037
ekholma-2-seat-sofa|79537404 69537409 99537403 19537398
ekholma-2-seat-sofa-bed|19598565
ekholma-3-seat-sofa|19537416 89537413 09537412 59537419
+ekholma-corner-sofa-4-seat-open-end|09563076 59563074 29563075 79563073
ektorp-2-seat-sofa|59620729 49628684 09628681 09509027 99509018 59509015 89628677
ektorp-3-seat-sofa|59619759 29509012 89509009 19509003 79509000 59628706 99628709
+ektorp-3-seat-sofa-chaise-longue|29628736 59628730 99628733 99509042 89509033 49509030 19509036
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-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
@@ -210,6 +217,8 @@ forsaljare-sideboard-140-x-46-x-78|90595888
forsiktig-children-s-stool|10591318
fridhult-sofa-bed|40355763 40575449
friheten-corner-sofa-bed|60551230 20551227
+friheten-corner-sofa-bed-storage|09133543 79517043 89517047 29133542
+friheten-klagshamn-corner-sofa-bed-storage|29444332 69520239 39520245
friidrott-drawer-unit-on-castors-35-x-56|60609071
froset-easy-chair|80425641 20429604 40423559
frosjon-shelving-unit-40-x-156|30574902
@@ -236,6 +245,7 @@ gladstad-upholstered-bed-frame-standard-king-150|40490469 60490468
glenn-bar-stool-66|60131734
glostad-2-seat-sofa|90489010
glostad-3-seat-sofa|80595940
+glostad-3-seat-sofa-chaise-longue|89578601
godishus-chest-3-drawers-60-x-40-x-60|80598095
grafjallet-bedside-table-45-x-36-x-59|20570221
grafjallet-dressing-table-100-x-42|30570225
@@ -328,6 +338,8 @@ hyllis-shelving-unit-60-x-27-x-74|30428326
hyltarp-2-seat-sofa|19489613 39514918 19514896 69514907 39489607 69514912 59489625
hyltarp-2-seat-sofa-bed|29489580 59514880 49514885 89514874 39514862 89489600 79489587
hyltarp-3-seat-sofa|09489637 39489631 69514945 79514940 49514951 09514929 89489643
+hyltarp-3-seat-sofa-w-chaise-longue-left|19489689 49515012 89489695 39515017 19515023 49489683 49489701
+hyltarp-3-seat-sofa-w-chaise-longue-right|59495829 19514995 29514990 79514978 29495835 09514967 09495841
ibbarbo-stool|40571535
idanas-bed-frame-standard-double-135-x-190|09390066 49390069 29390070 89390091 49390088 09390090 89390067
idanas-bed-frame-storage-standard-king-150-x-200|69390105 89390072 49390074 19390099 79390100 09390071 99390104
@@ -380,8 +392,13 @@ ivosjon-cabinet-doors-33-x-34-x-99|30569095 90609871
jakobsfors-coffee-table-80|90500121 50515167
janinge-chair|70246089
jarvfjallet-office-chair-armrests|20510642 00521854
+jattebo-2-5-seat-mod-sofa-w-chaise-longue|89469490 79617599 79618532 19471340 09617748 09617418 09490103 99607617 79607637 69607633 69490100 19607621
jattebo-2-seat-modular-sofa|09471411 09617705 29471410 29617634 99617428 09618620 89510404 69617707 59617623 59510410 49621183 49618623
+jattebo-3-5-seat-mod-sofa-w-chaise-longues|89485112 89617754 69618537 59617637 49617398 79471380 59485118 59469496 49617614 29617752 19617559 09618644
jattebo-3-seat-modular-sofa|09485130 79485136 29617629 99617697 79618626 69617571
+jattebo-4-seat-mod-sofa-w-chaise-longue|79485202 69617608 59618632 49485208 39617761 19617432 99617744 69617651 59510896 39617407 19618629 19510624
+jattebo-mod-crnr-sofa-2-5-seat-w-chaise-lng|99485178 99617758 69618617 29617605 29485172 59617425
+jattebo-modular-corner-sofa-6-seat|69485250 39485256 19617620 79617556 59618665 39617695
jattesta-coffee-table-80-x-80|30538792
jattesta-side-table-95-x-30|60538795
jattesta-tv-bench-160-x-40-x-49|70508934 50538852
@@ -395,6 +412,7 @@ jutholmen-3-seat-modular-sofa-outdoor|79579856
jutholmen-3-seat-modular-sofa-outdoor-210-x-73|99579860
jutholmen-easy-chair-outdoor-65-x-73-x-71|39579839
jutholmen-easy-chair-outdoor-65-x-73-x-83|39579844
+jutholmen-modular-corner-sofa-3-seat-outdoor|19579835 09579831
juttersbo-trolley-36-x-36|40498941
kallax-1x4|40275846 40324516 40477934 80653322 00275848
kallax-2x2|60324520 60275812 00477931 20653320 20275814 50305739 79552951 99552950 19552949 69634981 09579968 59552952 59602508 49602504 79602507
@@ -419,7 +437,14 @@ kilberget-chest-6-drawers-144-x-78|20609916
kivik-1-seat-sofa-bed|49470240 09482792 79470234 69500509 29500511 19470246
kivik-2-seat-sofa|29440598 79443047 69482826 89482825 59500468 39500469 79500472 70519517
kivik-3-seat-sofa|69440596 79443052 59482836 79482835 89500476 29500479 69500482 00519530 59443185
+kivik-3-seat-sofa-chaise-longue|59440587 79500486 69443057 49482846 69482845 39500493 29500484
kivik-4-seat-sofa|19443192
+kivik-4-seat-sofa-chaise-longue|99494390 69440582 69443062 69500496 89500495 49494383 39500501
+kivik-corner-sofa-4-seat|89440473 99482858 49443015 59500411 39500412 99500414 19443173
+kivik-corner-sofa-5-seat|99440477 69443019 49482865 89500419 29500422 09500418 89443179 49443176
+kivik-corner-sofa-5-seat-w-chaise-longue|69482874 19440481 89443023 39500426 19500427
+kivik-corner-sofa-6-seat|29443182
+kivik-corner-sofa-6-seat-w-chaise-longue|99482882 99443027 79500434 49500435 29440485
klackenas-sideboard-120-x-97|90506750
kleppstad-bed-frame-standard-double-135-x-190|40492675 20492681
kleppstad-wardrobe-2-doors-79-x-176|80437234
@@ -487,7 +512,10 @@ lagkapten-spand-desk-200-x-60|09568540 99571604
landskrona-2-seat-sofa|09270281 09270276 59415818 99270291 59416422 99270286 49415814 79270273 39270265
landskrona-3-seat-sofa|19270313 99270328 09416429 09415825 19270308 69416426 09270323 69270301 29270299 99272662 29272689 79272658 89415831 79416435 49416432 49415828 79272644 19031879 99031875 79272639 79489894 59489885 29491286 99491283
landskrona-4-seat-sofa|99270366 39270369 99270470 29270459 69420503 59415837 29415834 09032412 09270361 89032408 09270356
+landskrona-4-seat-sofa-chaise-longues|99554336 59554338 89554351 79554337 69554352 49554353 19554340 69554347 59554343 49554348 39554344
landskrona-armchair|69269722 09269720 29415787 69416394 19269164 99269725 49416390 19269201 99031781 99031776 99269202
+landskrona-corner-sofa-5-seat|29270063 79270065 49270076 99416397 59416399 49415791 39270072 69270042 79031843 89031847 69270037
+landskrona-corner-sofa-6-seat|29270218 29046272 09270219 09046268 49270222 69270221 89415794 79416402 69270235 59270231 39415796
lanesund-bookcase-121-x-37-x-152|20434827
lanesund-glass-door-cabinet-121-x-37-x-152|80466556
lanesund-sideboard-161-x-47-x-81|90466546
@@ -507,8 +535,11 @@ lillberget-chest-5-drawers-70-x-43-x-108|60630478
lillberget-chest-6-drawers-140-x-43-x-68|40630479
lillehem-2-seat-modular-sofa|59471282 79471276 39471264 29471288 39471259 09471270
lillehem-3-seat-modular-sofa|99617800 89617810 69617806 59617802 29617808 19617804
+lillehem-3-seat-modular-sofa-w-chaise-longue|99570384 69570385 49570386 39570382 29570387 19570383
lillehem-4-seat-modular-sofa|69536056 99536045 79536051 59536028 39536034 29536039
lillehem-armchair|89470323 89470295 69470300 39470306 19470312 09470317
+lillehem-modular-corner-sofa-2-seat|89536282 79536287 49536298 59536293 09536304 09536276
+lillehem-modular-corner-sofa-4-seat|69536155 79536150 49536161 19536172 19536167 09536144
lillesater-3-seat-sofa|40618496 00619073
lillesater-4-seat-sofa|29614273 89614265
lindakra-2-seat-sofa-bed|80582612 80629271
@@ -558,6 +589,9 @@ mammut-children-s-table-77-x-55|50365177 50581992 10581994
mandal-bed-frame-storage-120-x-200|10272076
mannarp-2-seat-sofa|49604032 69619155 39619152 39604004 99619149 19604000
mannarp-3-seat-sofa|59604041 09619158 49619161 89619164 59604036 09604048
+mannarp-3-seat-sofa-chaise-longue|59619170 89598675 19619167 79604064 99619173 89604068
+mannarp-4-seat-sofa-chaise-longue|39604080 69619179 09604072 29619176 19604076 09619182
+mannarp-4-seat-sofa-chaise-longues|89604092 99604096 79619188 69604088 39619185 19619191
mariedamm-table-105|70492645
mariedamm-table-180-x-100|20576124
marius-stool|90184047 10135659
@@ -775,11 +809,14 @@ saltmyran-3-seat-sofa|70618517 90618521
saltsjobaden-2-seat-sofa|69621422 79579187 19627493 89599905 69579183 49579179 09622537
saltsjobaden-2-seat-sofa-bed|99578587 69602739 59602706 79578588 19621434 09602723 39602731
saltsjobaden-3-seat-sofa|99627663 09579195 69627508 69627532 29579199 39622767 79622567
+saltsjobaden-3-seat-sofa-chaise-longue|99602144 09627568 59579211 99627564 39579207 19627544 29579203
saltsjobaden-armchair|29627647 79599581 59622733 39627623 19599602 19578572 99627639
+saltsjobaden-corner-sofa-4-seat|89627456 69622501 69627650 19578553 99627432 99622482 89578559
sandsberg-chair|30605423 10605424 90605260
sandsberg-table-110-x-67|29420393 59420400
segeron-2-seat-sofa-outdoor|29584860 29584855
segeron-coffee-table-outdoor-73-x-73|40510797
+segeron-corner-sofa-3-seat|89584621
segeron-table-outdoor-91-x-147|10510812 90510813
segrare-desk-sit-stand-110-x-60|40534703
skalboda-armchair|40555309 90554388 20582035
@@ -811,6 +848,8 @@ slakt-bed-frame-slatted-bed-base-90-x-200|79227755
slakt-bed-frame-storage-90-x-200|09612048
slatorp-2-seat-sofa|60594381 70594366 90594394
slatorp-3-seat-sofa|70594390 10594369 50594386
+slatorp-3-seat-sofa-chaise-longue|59577580 79577598 39577576
+slatorp-4-seat-sofa-chaise-longues|59577603
slattum-upholstered-bed-frame-standard-double-13|50571257 30571258
slattum-upholstered-bed-frame-standard-single-90|90578737
smagora-desk-93-x-51|90489883
@@ -839,6 +878,9 @@ sniglar-bed-frame-slatted-bed-base-70-x-160|19185433
soderhamn-2-seat-sofa|29305755
soderhamn-3-seat-sofa|39621635 09621632 69621629 79621638 09305704 29449693 39305694 19449698 59452108 69622110 39622102 29622107 09622113 19618672 49580069 99580062 39621386 79621389 19621392
soderhamn-4-seat-sofa-bed|89616448 69621375 49621381 49616247 39621372 29618676 69618679 69621361 69616270 39621367 09621364 09616428
+soderhamn-4-seat-sofa-chaise-longue|69449709 79621676 59621682 19621783 19621679
+soderhamn-corner-sofa-4-seat|09449665 79305847 99622038 79622044 39622041 09622047
+soderhamn-corner-sofa-bed-6-seat|59616275 89616453 69621403 29621400 09621397 09618682
soluppgang-stool-outdoor-43-x-40|70621303
songesand-nightstand|30367441
sotenas-armchair|60581915
@@ -994,6 +1036,8 @@ ugglerum-coffee-table-130-x-65|60627980
ugglerum-side-table-46-x-40|00627983
ulriksberg-armchair|90434310
uppakra-3-seat-modular-sofa|99620341 49620353 79620337 69620347 59620324 39620344 79620318 09620246 49620249 79620064 79620059 69620069 89620252 19620255 19619940 99619955 99619922 59619943 39619958 79619937 69619928 89619913 39619897 89620313 79619904 79619876 69620314 59619882 99619856 99619842 99619837 79619862 69619867 69619853 69619848 89619970 79619961 69619985 49619991 49619967 39619982 19619964
+uppakra-modular-corner-sofa-3-seat|99620553 89620558 79620573 69620564 49620579 29621358 29620556
+uppakra-modular-corner-sofa-6-seat|99620628 79620634 49620616 49620602 39620607 29620622 19620613 99620690 89620704 89620695 59620710 59620687 29620716 29620684 99620647 79620667 69620658 69620644 49620678 49620664 39620650
utespelare-gaming-desk-160-x-80|10571532 80507627
utklassning-gaming-chair|40629287 60629045
utmaning-gaming-desk-160-x-80|89571732
@@ -1051,8 +1095,16 @@ vilto-step-stool|60344453
vimle-2-seat-sofa|09634663 99634692 89631383 19634667 59634689 79398974 09398977 79400547 79400566 59501646 49400544 99501395 89503093 19306294
vimle-2-seat-sofa-bed|39477336 59638654 39638669 09638656 99638671 89638657 29638660 19638665 79638629 39638631 19638613 69638615 29638617 69638620 69537027
vimle-3-seat-sofa|89634819 19634813 69634844 49634816 29634841 59399111 99399114 79635112 09635115 69635122 49635415 29635138 59399031 09399043 99635187 69635198 69635184 29635204 39635190 79635211 29635195 49399022 79399025 09503105 99515953 69306263 49306645 49306688 79503102 79401325 19515952 19401328 59306254 89306667 49477369 99545219 19545261 69569396 59547871 59639210 99639208 89639195 79639191 39639193 09639199 99545281
+vimle-3-seat-sofa-bed-chaise-longue|19639245 09639241 89639256 89639242 49639239 39639254 29545246 19477356 69638941 99638949 79638945 69638955 29638943 19638953 09638939
+vimle-3-seat-sofa-chaise-longue|79635046 79635032 69635061 49635038 29635058 09635035 79401293 69503112 79399105 39424121 09401296 19399108 49401299
vimle-4-seat-sofa|99635267 89633749 69635264 59635293 39635270 19635290 09633753 69306710
+vimle-4-seat-sofa-chaise-longue|39399485 79399488 89401768 49401765 79503116
vimle-armchair|59502919 39477181 79501264 49477185 19501605 19476842 39477162 59477161 89502908 99501263 49501604
+vimle-corner-sofa-3-seat|59306758
+vimle-corner-sofa-4-seat|09635342 69635339 09635337 89635362 19635365 29399481 89399478 19401795 49501270 09401786 49306730 09306280 39306721
+vimle-corner-sofa-5-seat|79399577 49399668 89399586 59399583 59401802 69401811 29306750 89306766
+vimle-corner-sofa-5-seat-w-chaise-longue|79501278 69401830 09401833
+vimle-crnr-sofa-bed-5-seat-w-chaise-lng|89545248 59545202 59501298 19477380 09545228 49545269
vingson-wing-chair-in-outdoor|70503738
visingso-table-70-x-70|40569467
viskafors-2-seat-sofa|89443264 69443217 99443254 89443259 39443214 19443210
@@ -1065,8 +1117,12 @@ vittsjo-shelving-unit-100-x-93|90305803
vittsjo-shelving-unit-51-x-175|50214678
vittskar-2-seat-modular-sofa|09618880 29618884 69591123 79591066 89618876 99591065
vittskar-2-seat-sofa|39618888 49591077
+vittskar-3-seat-modular-corner-sofa|39618831 89591160
vittskar-3-seat-modular-sofa|59591128 59618892 39591148 69618896
vittskar-3-seat-sofa|69618900 99591131 89591136 89618904
+vittskar-3-seat-sofa-chaise-longue|39591252 89619324
+vittskar-4-seat-modular-corner-sofa|09619672 79591231
+vittskar-5-seat-modular-corner-sofa|19591248 39619680
vittskar-coffee-table-110-x-58|80575555
vittskar-table-264-x-96|30575162
vretstorp-3-seat-sofa-bed|89491245 19491239 69491251 49491233 39491257
diff --git a/src/data/ikea-rows.ts b/src/data/ikea-rows.ts
index e4cc61b..32a96ab 100644
--- a/src/data/ikea-rows.ts
+++ b/src/data/ikea-rows.ts
@@ -14,6 +14,7 @@ ALEX|open|Storage unit, 36 × 70 cm|36|70|35
ÅLHULT|dining|Extendable table, 120/170 × 80 cm|120|74|80
ÅLHULT|dining|Table, 120 × 80 cm|120|74|80
ÅLHULT|dining|Extendable table, 170/220 × 80 cm|170|74|80
+ÄLVDALEN|chaise|3-seat sofa-bed with chaise longue|226|85|160|seats=3,arms=wide,chaise=right,sd=92
ÄLVDALEN|sofa|3-seat sofa-bed|230|85|92|seats=3
ÄMMARYD|coffee|Coffee table, 98 × 59 cm|98|45|59
ÄMMARYD|side|Side table, 59 × 40 cm|59|50|40
@@ -21,6 +22,8 @@ ALEX|open|Storage unit, 36 × 70 cm|36|70|35
ÄNGSJÖN|wallcab|Wall cabinet with door, 40 × 15 × 95 cm|40|95|15|doors=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
+ÄPPLARYD|chaise|3-seat sofa with chaise longue|226|85|160|seats=3,arms=wide,chaise=right,sd=92
+ÄPPLARYD|chaise|4-seat sofa with chaise longue|290|85|160|seats=4,arms=wide,chaise=right,sd=92
ÄPPLARYD|sofa|2-seat sofa|170|85|92|seats=2
ÄPPLARYD|sofa|3-seat sofa|230|85|92|seats=3
ASKHOLMEN|chair|Chair, outdoor|44|88|50||outdoor garden
@@ -34,6 +37,7 @@ BAGGEBO|cabinet|Cabinet with door, 50 × 30 × 80 cm|50|80|30|doors=1
BAGGEBO|open|Shelving unit, 60 × 30 × 80 cm|60|80|30
BAGGEBO|open|Shelving unit, 60 × 25 × 116 cm|60|116|25
BAGGEBO|sideboard|Sideboard, 78 × 92 cm|78|92|45
+BÅRSLÖV|chaise|3-seat sofa-bed with chaise longue|226|85|160|seats=3,arms=wide,chaise=right,sd=92
BÅRSLÖV|sofa|3-seat sofa-bed|230|85|92|seats=3
BÄSTBOLL|office|Gaming chair|64|128|64|arms=slim,seatH=50
BEKVÄM|stool|Step stool, 63 cm|35|63|35
@@ -140,10 +144,13 @@ EKET|cabinet|Cabinet, 35 × 25 × 35 cm|35|35|25|knobs=none
EKET|wallcab|Wall cabinet with glass door, 35 × 25 × 35 cm|35|35|25|knobs=none,doors=1
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
+EKHOLMA|corner|Corner sofa, 4-seat with open end|237|85|156|seats=4,arms=wide,corner=left,open=1,sd=92
EKHOLMA|sofa|2-seat sofa|170|85|92|seats=2
EKHOLMA|sofa|2-seat sofa-bed|170|85|92|seats=2
EKHOLMA|sofa|3-seat sofa|230|85|92|seats=3
EKTORP|armchair|Armchair|75|90|80
+EKTORP|chaise|3-seat sofa with chaise longue|218|88|156|seats=3,arms=wide,chaise=right,sd=88
+EKTORP|corner|Corner sofa, 4-seat|228|88|166|seats=4,arms=wide,corner=left,sd=88
EKTORP|sofa|2-seat sofa|170|85|92|seats=2
ELDBERGET / MALSKÄR|office|Swivel chair|60|105|64|arms=none
ENHET|cabinet|High cabinet with door, 30 × 32 × 180 cm|30|180|32|doors=1
@@ -187,6 +194,8 @@ FÖRHÖJA|trolley|Kitchen trolley, 100 × 43 cm|100|80|43
FÖRSÄLJARE|sideboard|Sideboard, 140 × 46 × 78 cm|140|78|46
FÖRSIKTIG|stool|Children's stool|35|30|35||kids
FRIDHULT|sofa|Sofa-bed|230|85|92|seats=3
+FRIHETEN|chaise|Corner sofa-bed with storage|230|66|160|seats=3,arms=slim,chaise=right,sd=92
+FRIHETEN / KLAGSHAMN|chaise|Corner sofa-bed with storage|230|66|160|seats=3,arms=slim,chaise=right,sd=92
FRIIDROTT|chest|Drawer unit on castors, 35 × 56 cm|35|56|48|rows=4
FRÖSET|armchair|Easy chair|75|90|80
FRÖSJÖN|open|Shelving unit, 40 × 96 cm|40|96|35
@@ -211,6 +220,7 @@ GILLERSBERG|nightstand|Bedside table, 39 × 39 × 56 cm|39|56|39|rows=1
GLADHÖJDEN|desk|Desk sit/stand, 100 × 60 cm|100|74|60
GLADSTAD|bed|Upholstered bed frame, Standard King, 150 × 200 cm|166|100|209|m=150
GLENN|stool|Bar stool, 66 cm|35|66|35
+GLOSTAD|chaise|3-seat sofa with chaise longue|201|78|150|seats=3,arms=wide,chaise=right,sd=82
GLOSTAD|sofa|3-seat sofa|230|85|92|seats=3
GODISHUS|chest|Chest of 3 drawers, 60 × 40 × 60 cm|60|60|40|rows=3
GRÅFJÄLLET|desk|Dressing table, 100 × 42 cm|100|74|42
@@ -288,6 +298,8 @@ HORNAVAN|trolley|Trolley, 26 × 48 × 77 cm|26|77|48
HUVUDSPELARE|desk|Gaming desk, 140 × 80 cm|140|74|80
HUVUDSPELARE|office|Gaming chair|64|128|64|arms=slim,seatH=50
HYLLIS|open|Shelving unit, 60 × 27 × 74 cm|60|74|27||outdoor garden
+HYLTARP|chaise|3-seat sofa w chaise longue, left|226|85|160|seats=3,arms=wide,chaise=left,sd=92
+HYLTARP|chaise|3-seat sofa w chaise longue, right|226|85|160|seats=3,arms=wide,chaise=right,sd=92
HYLTARP|sofa|2-seat sofa|170|85|92|seats=2
HYLTARP|sofa|2-seat sofa-bed|170|85|92|seats=2
HYLTARP|sofa|3-seat sofa|230|85|92|seats=3
@@ -337,6 +349,11 @@ IVAR|open|Shelving unit, 89 × 50 × 226 cm|89|226|50
IVÖSJÖN|cabinet|Cabinet with doors, 33 × 34 × 99 cm|33|99|34
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
+JÄTTEBO|chaise|3,5-seat mod sofa w chaise longues|290|85|160|seats=4,arms=wide,chaise=both,sd=92
+JÄTTEBO|chaise|4-seat mod sofa w chaise longue|290|85|160|seats=4,arms=wide,chaise=right,sd=92
+JÄTTEBO|corner|Mod crnr sofa 2,5-seat w chaise lng|173|85|156|seats=3,arms=wide,corner=left,open=1,sd=92
+JÄTTEBO|corner|Modular corner sofa, 6 seat|301|85|237|seats=6,arms=wide,corner=left,sd=92
JÄTTEBO|sofa|2-seat modular sofa|170|85|92|seats=2
JÄTTEBO|sofa|3-seat modular sofa|230|85|92|seats=3
JÄTTESTA|coffee|Coffee table, 80 × 80 cm|80|45|80
@@ -348,6 +365,7 @@ JONAXEL|cabinet|Frame, 50 × 51 × 70 cm|50|70|51|doors=0
JUTEBODA|stool|Stool|35|45|35
JUTHOLMEN|armchair|Easy chair, outdoor, 65 × 73 × 71 cm|65|71|73||outdoor garden
JUTHOLMEN|armchair|Easy chair, outdoor, 65 × 73 × 83 cm|65|83|73||outdoor garden
+JUTHOLMEN|corner|Modular corner sofa 3-seat, outdoor|173|85|173|seats=3,arms=wide,corner=left,sd=92|outdoor garden
JUTHOLMEN|sofa|2-seat modular sofa, outdoor, 146 × 73 cm|146|85|73|seats=2|outdoor garden
JUTHOLMEN|sofa|2-seat modular sofa, outdoor|170|85|92|seats=2|outdoor garden
JUTHOLMEN|sofa|3-seat modular sofa, outdoor, 210 × 73 cm|210|85|73|seats=3|outdoor garden
@@ -368,6 +386,13 @@ KESNACKEN|stool|Bar stool, 66 cm|35|66|35
KILBERGET|chest|Chest of 5 drawers, 76 × 102 cm|76|102|48|rows=5
KILBERGET|chest|Chest of 3 drawers, 86 × 78 cm|86|78|48|rows=3
KILBERGET|chest|Chest of 6 drawers, 144 × 78 cm|144|78|48|rows=3,cols=2
+KIVIK|chaise|3-seat sofa with chaise longue|228|83|163|seats=3,arms=wide,chaise=right,sd=95
+KIVIK|chaise|4-seat sofa with chaise longue|293|83|163|seats=4,arms=wide,chaise=right,sd=95
+KIVIK|corner|Corner sofa, 5-seat|238|83|238|seats=5,arms=wide,corner=left,sd=95
+KIVIK|corner|Corner sofa, 4-seat|241|83|177|seats=4,arms=wide,corner=left,sd=95
+KIVIK|corner|Corner sofa, 5-seat w chaise longue|241|83|224|seats=5,arms=wide,corner=left,open=1,sd=95
+KIVIK|corner|Corner sofa, 6-seat|301|83|238|seats=6,arms=wide,corner=left,sd=95
+KIVIK|corner|Corner sofa, 6-seat w chaise longue|306|83|224|seats=6,arms=wide,corner=left,open=1,sd=95
KIVIK|sofa|1-seat sofa-bed|110|85|92|seats=1
KIVIK|sofa|2-seat sofa|170|85|92|seats=2
KIVIK|sofa|4-seat sofa|290|85|92|seats=4
@@ -425,6 +450,9 @@ LAGKAPTEN / SPÄND|desk|Desk, 120 × 60 cm|120|73|60|legs=round,attach=plate
LAGKAPTEN / SPÄND|desk|Desk, 140 × 60 cm|140|73|60|legs=round,attach=plate
LAGKAPTEN / SPÄND|desk|Desk, 200 × 60 cm|200|73|60|legs=round,attach=plate
LANDSKRONA|armchair|Armchair|75|90|80
+LANDSKRONA|chaise|4-seat sofa with chaise longues|267|89|157|seats=4,arms=slim,chaise=both,sd=89
+LANDSKRONA|corner|Corner sofa, 5-seat|222|89|222|seats=5,arms=slim,corner=left,sd=89
+LANDSKRONA|corner|Corner sofa, 6-seat|285|89|222|seats=6,arms=slim,corner=left,sd=89
LANDSKRONA|sofa|2-seat sofa|170|85|92|seats=2,arms=slim
LANDSKRONA|sofa|4-seat sofa|290|85|92|seats=4,arms=slim
LANESUND|bookcase|Bookcase, 121 × 37 × 152 cm|121|152|37
@@ -445,6 +473,9 @@ LILLBERGET|chest|Chest of 3 drawers, 70 × 43 × 68 cm|70|68|43|rows=3
LILLBERGET|chest|Chest of 5 drawers, 70 × 43 × 108 cm|70|108|43|rows=5
LILLBERGET|chest|Chest of 6 drawers, 140 × 43 × 68 cm|140|68|43|rows=3,cols=2
LILLEHEM|armchair|Armchair|75|90|80
+LILLEHEM|chaise|3-seat modular sofa w chaise longue|226|85|160|seats=3,arms=wide,chaise=right,sd=92
+LILLEHEM|corner|Modular corner sofa, 2-seat|173|85|92|seats=2,arms=wide,corner=left,sd=92
+LILLEHEM|corner|Modular corner sofa, 4 seat|237|85|173|seats=4,arms=wide,corner=left,sd=92
LILLEHEM|sofa|2-seat modular sofa|170|85|92|seats=2
LILLEHEM|sofa|3-seat modular sofa|230|85|92|seats=3
LILLEHEM|sofa|4-seat modular sofa|290|85|92|seats=4
@@ -489,6 +520,9 @@ MAMMUT|kidschair|Children's chair|34|60|34||kids
MAMMUT|kidstable|Children's table, 77 × 55 cm|77|48|55||kids
MAMMUT|stool|Children's stool|35|30|35||kids
MANDAL|bed|Bed frame with storage, 120 × 200 cm|136|100|209|m=120
+MANNARP|chaise|3-seat sofa with chaise longue|226|85|160|seats=3,arms=wide,chaise=right,sd=92
+MANNARP|chaise|4-seat sofa with chaise longue|290|85|160|seats=4,arms=wide,chaise=right,sd=92
+MANNARP|chaise|4-seat sofa with chaise longues|290|85|160|seats=4,arms=wide,chaise=both,sd=92
MANNARP|sofa|2-seat sofa|170|85|92|seats=2
MANNARP|sofa|3-seat sofa|230|85|92|seats=3
MARIEDAMM|dining|Table, 105 cm|105|74|105|round=1
@@ -698,11 +732,14 @@ SALNÖ / GRYTTOM|armchair|Armchair with cushion|75|90|80
SALTMYRAN|sofa|2-seat sofa|170|85|92|seats=2
SALTMYRAN|sofa|3-seat sofa|230|85|92|seats=3
SALTSJÖBADEN|armchair|Armchair|75|90|80
+SALTSJÖBADEN|chaise|3-seat sofa with chaise longue|226|85|160|seats=3,arms=wide,chaise=right,sd=92
+SALTSJÖBADEN|corner|Corner sofa, 4-seat|237|85|173|seats=4,arms=wide,corner=left,sd=92
SALTSJÖBADEN|sofa|2-seat sofa|170|85|92|seats=2
SALTSJÖBADEN|sofa|2-seat sofa-bed|170|85|92|seats=2
SALTSJÖBADEN|sofa|3-seat sofa|230|85|92|seats=3
SANDSBERG|chair|Chair|44|88|50
SEGERÖN|coffee|Coffee table, outdoor, 73 × 73 cm|73|45|73||outdoor garden
+SEGERÖN|corner|Corner sofa, 3-seat|173|85|173|seats=3,arms=wide,corner=left,sd=92|outdoor garden
SEGERÖN|dining|Table, outdoor, 91 × 147 cm|91|74|147||outdoor garden
SEGERÖN|sofa|2-seat sofa, outdoor|170|85|92|seats=2|outdoor garden
SEGRARE|desk|Desk sit/stand, 110 × 60 cm|110|74|60
@@ -732,6 +769,8 @@ SLÄKT|bed|Bed frame with 3 storage boxes, 90 × 200 cm|106|100|209|m=90
SLÄKT|bed|Bed frame with slatted bed base, 90 × 200 cm|106|100|209|m=90
SLÄKT|bed|Bed frame with storage, 90 × 200 cm|106|100|209|m=90
SLÄKT|bed|Bed frame, 90 × 200 cm|106|100|209|m=90
+SLATORP|chaise|3-seat sofa with chaise longue|226|85|160|seats=3,arms=wide,chaise=right,sd=92
+SLATORP|chaise|4-seat sofa with chaise longues|290|85|160|seats=4,arms=wide,chaise=both,sd=92
SLATORP|sofa|2-seat sofa|170|85|92|seats=2
SLATORP|sofa|3-seat sofa|230|85|92|seats=3
SLATTUM|bed|Upholstered bed frame, Standard Single, 90 × 190 cm|106|85|199|m=90,l=190,f=30
@@ -759,6 +798,9 @@ SMYGA|bed|Bed frame with storage, 90 × 200 cm|106|100|209|m=90
SMYGA|bed|Bed frame, 90 × 200 cm|106|100|209|m=90
SMYGA|desk|Desk, 122 × 60 cm|122|74|60||kids children
SNIGLAR|bed|Bed frame with slatted bed base, 70 × 160 cm|86|64|169|m=70,l=160,f=50
+SÖDERHAMN|chaise|4-seat sofa with chaise longue|259|69|167|seats=4,arms=slim,chaise=right,sd=99
+SÖDERHAMN|corner|Corner sofa, 4-seat|228|69|168|seats=4,arms=slim,corner=left,sd=99
+SÖDERHAMN|corner|Corner sofa-bed, 6-seat|289|69|228|seats=6,arms=slim,corner=left,sd=99
SÖDERHAMN|sofa|2-seat sofa|170|85|92|seats=2,arms=slim
SÖDERHAMN|sofa|4-seat sofa-bed|290|85|92|seats=4,arms=slim
SOLUPPGÅNG|stool|Stool, outdoor, 43 × 40 cm|43|40|43||outdoor garden
@@ -906,6 +948,8 @@ TYSSEDAL|nightstand|Bedside table, 51 × 40 cm|51|55|40|rows=1
UGGLERUM|coffee|Coffee table, 130 × 65 cm|130|45|65
UGGLERUM|side|Side table, 46 × 40 cm|46|50|40
ULRIKSBERG|armchair|Armchair|75|90|80
+UPPÅKRA|corner|Modular corner sofa, 3-seat|173|85|173|seats=3,arms=wide,corner=left,sd=92
+UPPÅKRA|corner|Modular corner sofa, 6 seat|301|85|237|seats=6,arms=wide,corner=left,sd=92
UPPÅKRA|sofa|3-seat modular sofa|230|85|92|seats=3
UTESPELARE|desk|Gaming desk, 160 × 80 cm|160|74|80
UTKLASSNING|office|Gaming chair|64|128|64|arms=slim,seatH=50
@@ -962,6 +1006,14 @@ VIKHAMMER|nightstand|Bedside table, 40 × 39 cm|40|55|39|rows=1
VILTO|open|Shelving unit, 46 × 150 cm|46|150|35
VILTO|stool|Step stool|35|50|35
VIMLE|armchair|Armchair|75|90|80
+VIMLE|chaise|3-seat sofa with chaise longue|241|83|166|seats=3,arms=wide,chaise=right,sd=98
+VIMLE|chaise|3-seat sofa-bed with chaise longue|241|83|166|seats=3,arms=wide,chaise=right,sd=98
+VIMLE|chaise|4-seat sofa with chaise longue|310|83|166|seats=4,arms=wide,chaise=right,sd=98
+VIMLE|corner|Corner sofa, 3-seat|184|83|184|seats=3,arms=wide,corner=left,sd=98
+VIMLE|corner|Corner sofa, 5-seat|238|83|238|seats=5,arms=wide,corner=left,sd=98
+VIMLE|corner|Corner sofa, 4-seat|253|83|184|seats=4,arms=wide,corner=left,sd=98
+VIMLE|corner|Corner sofa, 5-seat w chaise longue|253|83|236|seats=5,arms=wide,corner=left,open=1,sd=98
+VIMLE|corner|Crnr sofa-bed, 5-seat w chaise lng|253|83|236|seats=5,arms=wide,corner=left,open=1,sd=98
VIMLE|sofa|2-seat sofa|170|85|92|seats=2
VIMLE|sofa|2-seat sofa-bed|170|85|92|seats=2
VIMLE|sofa|4-seat sofa|290|85|92|seats=4
@@ -973,7 +1025,11 @@ VISTHUS|chest|Chest of 6 drawers, 63 × 49 × 126 cm|63|126|49|rows=6
VITTSJÖ|coffee|Coffee table, 75 cm|75|40|75|legs=square,shelf=1,round=1
VITTSJÖ|open|Shelving unit, 100 × 93 cm|100|93|36
VITTSJÖ|open|Shelving unit, 100 × 175 cm|100|175|36
+VITTSKÄR|chaise|3-seat sofa with chaise longue|226|85|160|seats=3,arms=wide,chaise=right,sd=92
VITTSKÄR|coffee|Coffee table, 110 × 58 cm|110|45|58||outdoor garden
+VITTSKÄR|corner|3-seat modular corner sofa|173|85|173|seats=3,arms=wide,corner=left,sd=92|outdoor garden
+VITTSKÄR|corner|4-seat modular corner sofa|237|85|173|seats=4,arms=wide,corner=left,sd=92|outdoor garden
+VITTSKÄR|corner|5-seat modular corner sofa|237|85|237|seats=5,arms=wide,corner=left,sd=92|outdoor garden
VITTSKÄR|dining|Table, 264 × 96 cm|264|74|96||outdoor garden
VITTSKÄR|sofa|2-seat modular sofa|170|85|92|seats=2|outdoor garden
VITTSKÄR|sofa|2-seat sofa|170|85|92|seats=2|outdoor garden
diff --git a/src/lib/ikea.ts b/src/lib/ikea.ts
index 9891610..7f6a7cd 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"] as const;
-const FLAGS = new Set<string>(["plinth", "shelf", "round"]);
-const WORDS = new Set<string>(["knobs", "arms", "legs", "attach"]);
+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"] as const;
+const FLAGS = new Set<string>(["plinth", "shelf", "round", "open"]);
+const WORDS = new Set<string>(["knobs", "arms", "legs", "attach", "chaise", "corner"]);
export function encodeX(x: X): string {
const out: string[] = [];
diff --git a/src/lib/plan/corner.ts b/src/lib/plan/corner.ts
new file mode 100644
index 0000000..487f7e2
--- /dev/null
+++ b/src/lib/plan/corner.ts
@@ -0,0 +1,342 @@
+import type { ProductSpec, Vec3 } from "../types";
+import { HW, PlanBuilder, type FitOpts } from "./builder";
+import { clamp } from "./math";
+
+/** One seat section on the floor: its footprint and how its seats run. */
+interface Section {
+ name: string;
+ x0: number;
+ x1: number;
+ z0: number;
+ z1: number;
+ seats: number;
+ /** seats run front to back (the return of a corner sofa) */
+ along: "x" | "z";
+ /** where it waits before it is pushed against the others, or none when it stays put */
+ slide?: Vec3;
+ frame?: string;
+ legs: string[];
+}
+
+/**
+ * Sofas with a chaise longue at one or both ends, and corner sofas (an L with a return on one side).
+ * The sections are laid out like the straight sofa: legs in upside down, turned over, then pushed together
+ * and bolted, armrests, backrests, and the cushions last.
+ */
+export function buildCornerSofa(b: PlanBuilder, s: ProductSpec) {
+ const p = s.sofa ?? {};
+ const W = s.size.w * 10, H = s.size.h * 10, D = s.size.d * 10;
+ const arms = p.arms ?? "wide";
+ const a = arms === "wide" ? Math.min(170, W * 0.12) : arms === "slim" ? 80 : 0;
+ const sd = clamp((p.depth ?? 92) * 10, 700, Math.min(1100, D - 300));
+ const legH = 110, baseTop = 300, seatT = 140;
+ const fh = baseTop - legH;
+ const backT = Math.min(200, sd * 0.22);
+ const armH = Math.min(H - 60, 640);
+ const hb = H - baseTop;
+ const bh = Math.max(240, H - baseTop - seatT - 40);
+ const N = clamp(Math.round(p.seats ?? 3), 2, 6);
+ const back = -D / 2;
+ const corner = p.corner !== undefined;
+ // a corner on the left is the right one mirrored
+ const sx = p.corner === "left" ? -1 : 1;
+ const X = (x: number) => sx * x;
+
+ /* ---------- sections ---------- */
+ const secs: Section[] = [];
+ const sectionName = (n: number) => `${n}-seat section`;
+ let frontArm = false;
+ if (!corner) {
+ const side = p.chaise ?? "right";
+ const nCh = side === "both" ? 2 : 1;
+ const cw = (W - 2 * a) / N;
+ const nm = N - nCh;
+ let x = -W / 2 + a;
+ const chaise = (dir: number) => {
+ secs.push({ name: "Chaise longue", x0: x, x1: x + cw, z0: back, z1: D / 2, seats: 1, along: "x", slide: [dir * 300, 0, 0], legs: [] });
+ x += cw;
+ };
+ if (side !== "right") chaise(-1);
+ if (nm > 0) secs.push({ name: sectionName(nm), x0: x, x1: x + nm * cw, z0: back, z1: back + sd, seats: nm, along: "x", legs: [] });
+ x += nm * cw;
+ if (side !== "left") chaise(1);
+ } else {
+ const n1 = Math.ceil((N - 1) / 2);
+ const nRet = N - 1 - n1;
+ // a corner with no seats in front of it is open there: no armrest across the seat
+ frontArm = !p.open && nRet > 0 && a > 0;
+ const aFront = frontArm ? a : 0;
+ secs.push({ name: sectionName(n1), x0: -W / 2 + a, x1: W / 2 - sd, z0: back, z1: back + sd, seats: n1, along: "x", slide: [-300, 0, 0], legs: [] });
+ secs.push({ name: "Corner section", x0: W / 2 - sd, x1: W / 2, z0: back, z1: back + sd, seats: 1, along: "x", legs: [] });
+ if (nRet > 0) secs.push({ name: sectionName(nRet), x0: W / 2 - sd, x1: W / 2, z0: back + sd, z1: D / 2 - aFront, seats: nRet, along: "z", slide: [0, 0, 300], legs: [] });
+ }
+
+ // parts of the same name and size are one part, however they are turned
+ const types = new Map<string, string>();
+ const soft = (name: string, size: Vec3) => {
+ const k = `${name}|${size.map(Math.round).join("x")}`;
+ if (!types.has(k)) types.set(k, b.part(name, size, { material: "soft" }));
+ return types.get(k)!;
+ };
+
+ // frames and legs
+ const legT = b.part("Leg", [42, legH, 42], { shape: "cyl", material: "wood" });
+ for (const sec of secs) {
+ const lx = sec.x1 - sec.x0, lz = sec.z1 - sec.z0;
+ const turned = sec.along === "z";
+ const cx = (sec.x0 + sec.x1) / 2, cz = (sec.z0 + sec.z1) / 2;
+ sec.frame = b.place(soft(sec.name, turned ? [lz, fh, lx] : [lx, fh, lz]), [X(cx), legH + fh / 2, cz], turned ? [0, Math.PI / 2, 0] : [0, 0, 0]);
+ const ix = Math.min(60, lx / 4), iz = Math.min(70, lz / 4);
+ const xs = [sec.x0 + ix, sec.x1 - ix];
+ const zs = [sec.z0 + iz, sec.z1 - iz];
+ if (lx > 2000) xs.splice(1, 0, cx);
+ if (lz > 2000) zs.splice(1, 0, cz);
+ for (const x of xs) for (const z of zs) sec.legs.push(b.place(legT, [X(x), legH / 2, z]));
+ }
+
+ // armrests: at the outer ends, and at the front of a corner sofa's return
+ const armKeys: { key: string; from: Vec3 }[] = [];
+ const ah = armH - legH + 40, ay = legH - 40 + ah / 2;
+ if (a > 0) {
+ const first = secs[0], last = secs[secs.length - 1];
+ // an armrest along a chaise longue is longer than the others
+ const typeFor = (d: number) => soft(Math.abs(d - sd) < 1 ? "Armrest" : "Chaise armrest", [a, ah, d]);
+ const depthOf = (sec: Section) => sec.z1 - sec.z0;
+ armKeys.push({ key: b.place(typeFor(depthOf(first)), [X(-W / 2 + a / 2), ay, (first.z0 + first.z1) / 2]), from: [X(-420), 0, 0] });
+ if (!corner) armKeys.push({ key: b.place(typeFor(depthOf(last)), [W / 2 - a / 2, ay, (last.z0 + last.z1) / 2]), from: [420, 0, 0] });
+ else if (frontArm) armKeys.push({ key: b.place(typeFor(sd), [X(W / 2 - sd / 2), ay, D / 2 - a / 2], [0, Math.PI / 2, 0]), from: [0, 0, 420] });
+ }
+
+ // backrests, along the back and down the outer side of a corner sofa's return
+ const backs: { key: string; bolts: FitOpts[] }[] = [];
+ const by = baseTop + hb / 2;
+ const boltY = baseTop + 60;
+ for (const sec of secs) {
+ if (sec.name === "Corner section") {
+ const c = b.compound(
+ "Corner backrest",
+ [
+ { shape: "box", size: [sd, hb, backT], pos: [X(W / 2 - sd / 2), by, back + backT / 2] },
+ { shape: "box", size: [backT, hb, sd - backT], pos: [X(W / 2 - backT / 2), by, back + backT + (sd - backT) / 2] },
+ ],
+ { material: "soft" },
+ );
+ const key = b.place(c.type, c.mid);
+ backs.push({ key, bolts: [{ on: key, at: [X(W / 2 - sd / 2), boltY, back], dir: [0, 0, 1], mate: sec.frame }, { on: key, at: [X(W / 2), boltY, back + sd / 2], dir: [X(-1), 0, 0], mate: sec.frame }] });
+ } else if (sec.along === "z") {
+ const len = sec.z1 - sec.z0;
+ const t = soft(`Backrest, ${sec.seats}-seat`, [len, hb, backT]);
+ const key = b.place(t, [X(W / 2 - backT / 2), by, (sec.z0 + sec.z1) / 2], [0, Math.PI / 2, 0]);
+ const n = len > 1600 ? 3 : 2;
+ backs.push({ key, bolts: Array.from({ length: n }, (_, i) => ({ on: key, at: [X(W / 2), boltY, sec.z0 + (len * (i + 1)) / (n + 1)] as Vec3, dir: [X(-1), 0, 0] as Vec3, mate: sec.frame })) });
+ } else {
+ const len = sec.x1 - sec.x0;
+ const t = soft(sec.name === "Chaise longue" ? "Chaise backrest" : `Backrest, ${sec.seats}-seat`, [len, hb, backT]);
+ const key = b.place(t, [X((sec.x0 + sec.x1) / 2), by, back + backT / 2]);
+ const n = len > 1600 ? 3 : len > 800 ? 2 : 1;
+ backs.push({ key, bolts: Array.from({ length: n }, (_, i) => ({ on: key, at: [X(sec.x0 + (len * (i + 1)) / (n + 1)), boltY, back] as Vec3, dir: [0, 0, 1] as Vec3, mate: sec.frame })) });
+ }
+ }
+
+ // cushions
+ const seatCs: string[] = [];
+ const backCs: string[] = [];
+ const cd = sd - backT - 16;
+ const zSeat = back + backT + 8 + cd / 2;
+ const zBack = back + backT + 80;
+ for (const sec of secs) {
+ if (sec.along === "x") {
+ const cw = (sec.x1 - sec.x0) / sec.seats;
+ const depth = sec.z1 - sec.z0 - backT - 16;
+ const isCorner = sec.name === "Corner section";
+ for (let i = 0; i < sec.seats; i++) {
+ const x = sec.x0 + cw * (i + 0.5);
+ if (isCorner) {
+ // the corner seat stops at the side backrest
+ const cx = W / 2 - backT - 8 - cd / 2;
+ seatCs.push(b.place(soft("Seat cushion", [cd, seatT, cd]), [X(cx), baseTop + seatT / 2, zSeat]));
+ backCs.push(b.place(soft("Back cushion", [sd - backT - 14, bh, 170]), [X(W / 2 - backT - (sd - backT) / 2), baseTop + seatT + bh / 2 - 6, zBack], [-0.16, 0, 0]));
+ continue;
+ }
+ const sz = sec.name === "Chaise longue" ? "Chaise cushion" : "Seat cushion";
+ seatCs.push(b.place(soft(sz, [cw - 8, seatT, depth]), [X(x), baseTop + seatT / 2, back + backT + 8 + depth / 2]));
+ backCs.push(b.place(soft("Back cushion", [cw - 14, bh, 170]), [X(x), baseTop + seatT + bh / 2 - 6, zBack], [-0.16, 0, 0]));
+ }
+ } else {
+ const cw = (sec.z1 - sec.z0) / sec.seats;
+ const cx = W / 2 - backT - 8 - cd / 2;
+ for (let i = 0; i < sec.seats; i++) {
+ const z = sec.z0 + cw * (i + 0.5);
+ seatCs.push(b.place(soft("Seat cushion", [cw - 8, seatT, cd]), [X(cx), baseTop + seatT / 2, z], [0, Math.PI / 2, 0]));
+ // thin across, leaning out against the side backrest
+ backCs.push(b.place(soft("Back cushion", [170, bh, cw - 14]), [X(W / 2 - backT - 80), baseTop + seatT + bh / 2 - 6, z], [0, 0, X(-0.16)]));
+ }
+ }
+ }
+
+ /* ---------- steps ---------- */
+ const at = (key: string) => b.partItem(key).final;
+ const moved = (pos: Vec3, off: Vec3): Vec3 => [pos[0] + off[0], pos[1] + off[1], pos[2] + off[2]];
+ const slid = (sec: Section) => (sec.slide ? ([X(sec.slide[0]), sec.slide[1], sec.slide[2]] as Vec3) : null);
+
+ b.step(
+ {
+ title: "Lay the sections upside down",
+ detail: "Put a blanket or the flattened box under them first.",
+ pose: "-y",
+ kind: "general",
+ people: 2,
+ warnings: ["two", "floor"],
+ },
+ () => {
+ b.stagger(0.3);
+ for (const sec of secs) {
+ const off = slid(sec);
+ if (off) b.stage(sec.frame!, moved(at(sec.frame!).pos, off), at(sec.frame!).rot, [0, 220, 0]);
+ else b.add(sec.frame!, [0, 220, 0]);
+ }
+ },
+ );
+ b.step(
+ {
+ title: "Screw in the legs",
+ detail: "Clockwise by hand until each one is snug.",
+ pose: "-y",
+ kind: "legs",
+ warnings: ["hand"],
+ },
+ () => {
+ b.stagger(0.14);
+ for (const sec of secs) {
+ const off = slid(sec);
+ for (const l of sec.legs) {
+ if (off) b.stage(l, moved(at(l).pos, off), [0, 0, 0], [0, -260, 0]);
+ else b.add(l, [0, -260, 0], { spin: 2 });
+ }
+ }
+ },
+ );
+ b.step(
+ {
+ title: "Turn them over together",
+ detail: "Lift them by the frame, never by the legs.",
+ pose: "+y",
+ kind: "flip",
+ people: 2,
+ warnings: ["two"],
+ },
+ () => {},
+ );
+
+ const sliders = secs.filter((x) => x.slide);
+ b.step(
+ {
+ title: corner ? (sliders.length > 1 ? "Join the sections to the corner" : "Join the section to the corner") : sliders.length > 1 ? "Join the chaise longues to the sofa" : "Join the chaise longue to the sofa",
+ detail: "Push them together, then bolt them through the frames.",
+ tools: ["allen"],
+ people: 2,
+ kind: "join",
+ warnings: ["two"],
+ },
+ () => {
+ b.stagger(0.35);
+ for (const sec of sliders) {
+ b.add(sec.frame!);
+ for (const l of sec.legs) b.add(l);
+ b.stagger(0);
+ }
+ b.then(0.1);
+ const bolts: FitOpts[] = [];
+ for (const sec of sliders) {
+ const fixed = corner ? secs[1] : secs.find((x) => !x.slide);
+ if (!fixed) continue;
+ const y = legH + 90;
+ if (sec.along === "z") {
+ // the return meets the corner along its back edge
+ for (const f of [0.3, 0.7]) bolts.push({ on: sec.frame, at: [X(sec.x0 + (sec.x1 - sec.x0) * f), y, sec.z0], dir: [0, 0, 1], mate: fixed.frame });
+ } else {
+ const right = sec.x0 >= fixed.x1 - 1;
+ const jx = right ? sec.x0 : sec.x1;
+ for (const f of [0.3, 0.7]) bolts.push({ on: sec.frame, at: [X(jx), y, back + sd * f], dir: [X(right ? 1 : -1), 0, 0], mate: fixed.frame });
+ }
+ }
+ b.fits(HW.boltL, bolts, 0.1);
+ },
+ );
+
+ if (armKeys.length) {
+ b.step(
+ {
+ title: armKeys.length > 1 ? "Bolt on the armrests" : "Bolt on the armrest",
+ detail: armKeys.length > 1 ? "Line up the holes, then bolt loosely. Tighten once both arms are on." : "Line up the holes, then bolt it on firmly.",
+ tools: ["allen"],
+ kind: "bolts",
+ warnings: armKeys.length > 1 ? ["loose"] : [],
+ },
+ () => {
+ b.stagger(0.3);
+ armKeys.forEach((k) => b.add(k.key, k.from));
+ b.then(0.1);
+ const bolts: FitOpts[] = [];
+ for (const k of armKeys) {
+ const pos = at(k.key).pos;
+ const turned = at(k.key).rot[1] !== 0;
+ if (!turned) {
+ const sgn = Math.sign(pos[0]);
+ const sec = sgn * sx < 0 ? secs[0] : secs[secs.length - 1];
+ const depth = (sec.z1 - sec.z0) / 2;
+ for (const f of [-0.5, 0.5]) bolts.push({ on: k.key, at: [pos[0] - (sgn * a) / 2, legH + 90, pos[2] + f * depth] as Vec3, dir: [sgn, 0, 0] as Vec3, mate: sec.frame });
+ } else {
+ const sec = secs[secs.length - 1];
+ for (const f of [-0.25, 0.25]) bolts.push({ on: k.key, at: [pos[0] + f * sd, legH + 90, pos[2] - a / 2] as Vec3, dir: [0, 0, 1] as Vec3, mate: sec.frame });
+ }
+ }
+ b.fits(HW.boltL, bolts, 0.1);
+ },
+ );
+ }
+
+ b.step(
+ {
+ title: "Attach the backrests",
+ detail: "Slide each one down behind the seat, then bolt it from the back.",
+ tools: ["allen"],
+ kind: "bolts",
+ people: 2,
+ warnings: ["two"],
+ },
+ () => {
+ b.stagger(0.3);
+ // the backrest of a return comes in from its side
+ for (const bk of backs) b.add(bk.key, at(bk.key).rot[1] !== 0 ? [X(420), 120, 0] : [0, 120, -420]);
+ b.then(0.1);
+ b.fits(
+ HW.boltL,
+ backs.flatMap((bk) => bk.bolts),
+ 0.1,
+ );
+ },
+ );
+ b.step(
+ {
+ title: "Drop in the seat cushions",
+ detail: "Zips face the back.",
+ kind: "cushions",
+ },
+ () => {
+ b.stagger(0.14);
+ seatCs.forEach((k) => b.add(k, [0, 320, 0]));
+ },
+ );
+ b.step(
+ {
+ title: "Add the back cushions",
+ detail: "Plump them up and lean them against the backrest.",
+ kind: "cushions",
+ },
+ () => {
+ b.stagger(0.14);
+ backCs.forEach((k) => b.add(k, at(k).rot[2] !== 0 ? [X(-360), 160, 0] : [0, 160, 360]));
+ },
+ );
+}
diff --git a/src/lib/plan/sofa.ts b/src/lib/plan/sofa.ts
index 87661e0..b40702e 100644
--- a/src/lib/plan/sofa.ts
+++ b/src/lib/plan/sofa.ts
@@ -1,6 +1,7 @@
import type { ProductSpec, SofaParams, Vec3 } from "../types";
import { HW, PlanBuilder, type FitOpts } from "./builder";
import { clamp } from "./math";
+import { buildCornerSofa } from "./corner";
export function defaultsSofa(s: ProductSpec): SofaParams {
const p = s.sofa ?? {};
@@ -13,6 +14,7 @@ export function defaultsSofa(s: ProductSpec): SofaParams {
/** Upholstered sofas and armchairs: legs on the base, arms and back bolted on, cushions last. */
export function buildSofa(b: PlanBuilder, s: ProductSpec) {
+ if (s.sofa?.chaise || s.sofa?.corner) return buildCornerSofa(b, s);
const p = defaultsSofa(s);
const W = s.size.w * 10, H = s.size.h * 10, D = s.size.d * 10;
const a = p.arms === "wide" ? Math.min(170, W * 0.12) : p.arms === "slim" ? 80 : 0;
diff --git a/src/lib/products.ts b/src/lib/products.ts
index 9c2315a..15f62dc 100644
--- a/src/lib/products.ts
+++ b/src/lib/products.ts
@@ -35,7 +35,9 @@ export type Kind =
| "kidstable"
| "kidschair"
// added later: new shapes of an existing archetype
- | "office";
+ | "office"
+ | "chaise"
+ | "corner";
export type X = {
rows?: number;
@@ -56,6 +58,10 @@ export type X = {
min?: number;
round?: boolean;
seatH?: number;
+ chaise?: "left" | "right" | "both";
+ corner?: "left" | "right";
+ open?: boolean;
+ sd?: number;
};
export type Row = [name: string, kind: Kind, variant: string, w: number, h: number, d: number, x?: X, keywords?: string];
@@ -229,7 +235,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,
+ office: 20, chaise: 55, corner: 70,
};
const CATEGORY: Record<Kind, string> = {
@@ -238,7 +244,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",
+ office: "Office chair", chaise: "Sofa with chaise longue", corner: "Corner sofa",
};
export const KIND_ARCH: Record<Kind, Archetype> = {
@@ -246,7 +252,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",
+ office: "seat", chaise: "sofa", corner: "sofa",
};
const round = (x: X) => (x.round ? { round: true } : {});
@@ -322,6 +328,12 @@ export function specFor(kind: Kind, name: string, variant: string, w: number, h:
case "office":
// x.arms: "slim" for armrests, "none" without
return { ...base, difficulty: 1, seat: { kind: "office", seat: "square", seatH: x.seatH ?? 48, backH: h, arms: (x.arms ?? "none") !== "none" } };
+ case "chaise":
+ case "corner": {
+ const sofa = { seats: x.seats ?? (kind === "corner" ? 4 : 3), arms: x.arms ?? "wide", legs: "round" as const, depth: x.sd ?? 92 };
+ const shape = kind === "corner" ? { corner: x.corner ?? "left", ...(x.open ? { open: true } : {}) } : { chaise: x.chaise ?? "right" };
+ return { ...base, people: 2, sofa: { ...sofa, ...shape } };
+ }
}
}
@@ -350,5 +362,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],
+ office: [64, 105, 64], chaise: [250, 85, 160], corner: [250, 85, 220],
};
diff --git a/src/lib/types.ts b/src/lib/types.ts
index 7142478..893a93f 100644
--- a/src/lib/types.ts
+++ b/src/lib/types.ts
@@ -67,6 +67,10 @@ export interface SofaParams {
seats: number;
arms: "wide" | "slim" | "none";
legs: "round" | "block";
+ chaise?: "left" | "right" | "both"; // a chaise longue at that end, seen from the front; size.d is its length
+ corner?: "left" | "right"; // an L: the return runs forward on that side; size.d is its length
+ open?: boolean; // corner sofas: no armrest at the front of the return
+ depth?: number; // cm, depth of the seat sections of a corner or chaise sofa
}
/** A product read from someone's own manual: parts as boxes in the assembled product, steps that add them. */