IKEA assembly, step by step: animated, manual-style 3D guides. Scan any paper manual with Together AI.
TypeScript
Draw long sofas, sofa modules and modular easy chairs
Yousseff59682594960
diff --git a/scripts/ikea/classify.ts b/scripts/ikea/classify.tsindex 7a1d921..9686140 100644--- a/scripts/ikea/classify.ts+++ b/scripts/ikea/classify.ts@@ -280,7 +280,11 @@ const RULES: Rule[] = [[/^add-on corner unit with (\d) shelves$/, (m) => ({ kind: "cabinet", x: { doors: 0, shelves: Number(m[1]) } })],[/corner|chaise|u-shaped|crnr/, () => "corner or chaise longue sofa"],// a straight sofa section sold alone: a seat frame with legs, a backrest and cushions, no armrests- [/^(\d)-seat section( for modular sofa)?$/, (m) => ({ kind: "section", x: { seats: Number(m[1]) } })],+ [/^(\d)-seat (?:sofa-bed )?section( for modular sofa)?$/, (m) => ({ kind: "section", x: { seats: Number(m[1]) } })],+ // the same, as IKEA names them in other families: modules, half a seat wider for a "1.5-seat" one+ [/^(\d)(?:[.,]5)?-seat module$|^one-seat section$/, (m) => ({ kind: "section", x: { seats: Number(m[1] ?? 1) } })],+ // a modular easy chair: a one-seat section with an armrest on each side+ [/^modular easy chair$/, () => ({ kind: "section", x: { seats: 1, arms: "wide" } })],[/section|add-on|(?<!with )armrest|backrest for|seat sec|modular (easy chair|chaise)/, () => "sofa or storage section"],// bunk beds on four posts, and loft beds with room underneath (KURA turns over to be either)[/^(bunk bed frame|loft bed frame|loft bed|reversible bed)$/, (m, c) => {@@ -429,7 +433,7 @@ const RULES: Rule[] = [[/^(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;- return seats > 4 ? "sofa with more than 4 seats" : { kind: "sofa", x: { seats } };+ return seats > 6 ? "sofa with more than 6 seats" : { kind: "sofa", x: { seats } };}],// beds@@ -602,11 +606,14 @@ export function classify(f: Fact, hints: Hints): Verdict {}} else if (kind === "section") {// IKEA gives no size: seat width, depth and height from a straight sofa of the same family, else a typical one- if (v.length) return { skip: "sofa section measured in a way we can't place" };+ // a modular easy chair may come measured across+ if (v.length && !(x.arms && v.length === 1)) return { skip: "sofa section measured in a way we can't place" };const sofa = hints(family, "sofa");const armCm = sofa?.x.arms === "slim" ? 8 : sofa?.x.arms === "none" ? 0 : 17;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;w = (x.seats ?? 1) * per;+ if (/^\d[.,]5-seat/.test(t)) w += per / 2;+ if (x.arms) w = v.length ? v[0] : w + 2 * (sofa?.x.arms === "slim" ? 8 : 17);if (sofa?.kind === "sofa") [h, d] = [sofa.h, sofa.d <= 110 ? sofa.d : 92];// a chaise longue section reaches forward as far as the family's chaise wouldif (x.chaise) {@@ -662,6 +669,13 @@ export function classify(f: Fact, hints: Hints): Verdict {if (kind === "chair" && x.seatH && guessed.h) h = x.seatH + 32;if (kind === "lounge" && guessed.h && /reclin/.test(t)) [w, h, d] = [66, 102, 84];if (kind === "sofa" && guessed.w) w = (x.seats ?? 3) * 60 + 50;+ // more than four seats: two sections side by side, as wide as the family's own seats, or as wide as we draw+ if (kind === "sofa" && guessed.w && (x.seats ?? 3) > 4) w = Math.min(398, w);+ if (kind === "sofa" && guessed.w && (x.seats ?? 3) > 4 && hint?.kind === "sofa" && hint.x.seats) {+ const armCm = hint.x.arms === "wide" ? 17 : hint.x.arms === "slim" ? 8 : hint.x.arms === "none" ? 0 : 17;+ w = (x.seats ?? 3) * ((hint.w - 2 * armCm) / hint.x.seats) + 2 * armCm;+ [h, d] = [hint.h, hint.d];+ }if (kind === "armchair" && /wing|high-back/.test(t) && guessed.h) h = 104;if (kind === "armchair" && kids && guessed.w) [w, h, d] = [55, 68, 58];if (hint && guessed.w && guessed.h && hint.kind === kind && (kind !== "sofa" || hint.x.seats === x.seats)) {diff --git a/scripts/ikea/slugs.json b/scripts/ikea/slugs.jsonindex ae7970e..9561ae6 100644--- a/scripts/ikea/slugs.json+++ b/scripts/ikea/slugs.json@@ -458,6 +458,7 @@"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|4,5-seat mod sofa w chaise longue": "jattebo-4-5-seat-mod-sofa-w-chaise-longue",+ "JÄTTEBO|4,5-seat modular sofa": "jattebo-4-5-seat-modular-sofa","JÄTTEBO|Chaise longue module, left": "jattebo-chaise-longue-module-left","JÄTTEBO|Chaise longue module, right": "jattebo-chaise-longue-module-right","JÄTTEBO|Mod crnr sofa 2,5-seat w chaise lng": "jattebo-mod-crnr-sofa-2-5-seat-w-chaise-lng",@@ -478,6 +479,7 @@"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",+ "JUTHOLMEN|One-seat section, outdoor": "jutholmen-one-seat-section-outdoor","JUTTERSBO|Trolley, 36 × 36 cm": "juttersbo-trolley-36-x-36","KALLAX|Desk, 111 × 39 cm": "kallax-desk-111-x-39","KALLAX|Shelving unit with 10 inserts, 182 × 182 cm": "kallax-shelving-unit-10-inserts-182-x-182",@@ -581,6 +583,7 @@"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|5-seat sofa": "landskrona-5-seat-sofa","LANDSKRONA|Armchair": "landskrona-armchair","LANDSKRONA|Chaise longue, add-on unit": "landskrona-chaise-longue-add-on-unit","LANDSKRONA|Corner sofa, 5-seat": "landskrona-corner-sofa-5-seat",@@ -603,15 +606,20 @@"LILLBERGET|Chest of 3 drawers, 70 × 43 × 68 cm": "lillberget-chest-3-drawers-70-x-43-x-68","LILLBERGET|Chest of 5 drawers, 70 × 43 × 108 cm": "lillberget-chest-5-drawers-70-x-43-x-108","LILLBERGET|Chest of 6 drawers, 140 × 43 × 68 cm": "lillberget-chest-6-drawers-140-x-43-x-68",+ "LILLEHEM|1-seat module": "lillehem-1-seat-module","LILLEHEM|2-seat modular sofa": "lillehem-2-seat-modular-sofa",+ "LILLEHEM|2-seat module": "lillehem-2-seat-module","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|6-seat modular sofa": "lillehem-6-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",+ "LILLESÄTER|5-seat sofa": "lillesater-5-seat-sofa",+ "LILLESÄTER|6-seat sofa": "lillesater-6-seat-sofa","LINDÅKRA|2-seat sofa-bed": "lindakra-2-seat-sofa-bed","LINNEBÄCK|Easy chair": "linneback-easy-chair","LINNMON / ADILS|Table, 100 × 45 cm": "linnmon-adils-table-100-x-45",@@ -848,6 +856,7 @@"NÄMMARÖ|Chair with armrests, outdoor": "nammaro-chair-armrests-outdoor","NÄMMARÖ|Chair, outdoor": "nammaro-chair-outdoor","NÄMMARÖ|Lounge chair, outdoor": "nammaro-lounge-chair-outdoor",+ "NÄMMARÖ|Modular easy chair, 63 cm": "nammaro-modular-easy-chair-63","NÄMMARÖ|Reclining chair, outdoor": "nammaro-reclining-chair-outdoor","NÄMMARÖ|Stool, outdoor, 37 × 45 cm": "nammaro-stool-outdoor-37-x-45","NÄMMARÖ|Table, outdoor, 130 cm": "nammaro-table-outdoor-130",@@ -1082,6 +1091,7 @@"SEGERÖN|Corner section with cushion": "segeron-corner-section-cushion","SEGERÖN|Corner section, outdoor": "segeron-corner-section-outdoor","SEGERÖN|Corner sofa, 3-seat": "segeron-corner-sofa-3-seat",+ "SEGERÖN|One-seat section, outdoor": "segeron-one-seat-section-outdoor","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",@@ -1336,7 +1346,9 @@"UGGLERUM|Side table, 46 × 40 cm": "ugglerum-side-table-46-x-40","ULRIKSBERG|Armchair": "ulriksberg-armchair","ULVEVÄR|Chair with armrests, outdoor": "ulvevar-chair-armrests-outdoor",+ "UPPÅKRA|1.5-seat module": "uppakra-1-5-seat-module","UPPÅKRA|3-seat modular sofa": "uppakra-3-seat-modular-sofa",+ "UPPÅKRA|4,5-seat modular sofa": "uppakra-4-5-seat-modular-sofa","UPPÅKRA|Chaise longue module": "uppakra-chaise-longue-module","UPPÅKRA|Corner module": "uppakra-corner-module","UPPÅKRA|Modular corner sofa, 3-seat": "uppakra-modular-corner-sofa-3-seat",@@ -1414,6 +1426,7 @@"VIMLE|2-seat section": "vimle-2-seat-section","VIMLE|2-seat sofa": "vimle-2-seat-sofa","VIMLE|2-seat sofa-bed": "vimle-2-seat-sofa-bed",+ "VIMLE|2-seat sofa-bed section": "vimle-2-seat-sofa-bed-section","VIMLE|3-seat section": "vimle-3-seat-section","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",@@ -1450,6 +1463,7 @@"VITTSKÄR|Chair with armrests": "vittskar-chair-armrests","VITTSKÄR|Coffee table, 110 × 58 cm": "vittskar-coffee-table-110-x-58","VITTSKÄR|Modular chaise longue": "vittskar-modular-chaise-longue",+ "VITTSKÄR|Modular easy chair": "vittskar-modular-easy-chair","VITTSKÄR|Table, 264 × 96 cm": "vittskar-table-264-x-96","VITVAL|Bunk bed frame, 90 × 200 cm": "vitval-bunk-bed-frame-90-x-200","VITVAL|Loft bed frame, 90 × 200 cm": "vitval-loft-bed-frame-90-x-200",diff --git a/src/data/ikea-items.ts b/src/data/ikea-items.tsindex 7de0af6..f9b9484 100644--- a/src/data/ikea-items.ts+++ b/src/data/ikea-items.ts@@ -501,6 +501,7 @@ jattebo-2-seat-modular-sofa|09471411 09617705 29471410 29617634 99617428 0961862jattebo-3-5-seat-mod-sofa-w-chaise-longues|89485112 89617754 69618537 59617637 49617398 79471380 59485118 59469496 49617614 29617752 19617559 09618644jattebo-3-seat-modular-sofa|09485130 79485136 29617629 99617697 79618626 69617571jattebo-4-5-seat-mod-sofa-w-chaise-longue|59469482 99617843 89617693 19471397 09618540 79617410+jattebo-4-5-seat-modular-sofa|69618542 69617750 59485081 49617435 09617611 09485093 09485088jattebo-4-seat-mod-sofa-w-chaise-longue|79485202 69617608 59618632 49485208 39617761 19617432 99617744 69617651 59510896 39617407 19618629 19510624jattebo-chaise-longue-module-left|69485269 89617645 99485277 29617568 99617701 89618659 09485286 49618656 99617763 99471497 79617617 59617562 59471507jattebo-chaise-longue-module-right|09494573 99617602 99494578 49617746 19618653 19617413 39485303 39617596 59485302 29618662 89485310 39617756 29617422@@ -522,6 +523,7 @@ jutholmen-corner-section-outdoor|80469116jutholmen-easy-chair-outdoor-65-x-73-x-71|39579839jutholmen-easy-chair-outdoor-65-x-73-x-83|39579844jutholmen-modular-corner-sofa-3-seat-outdoor|19579835 09579831+jutholmen-one-seat-section-outdoor|40452189juttersbo-trolley-36-x-36|40498941kallax-1x4|40275846 40324516 40477934 80653322 00275848kallax-2x2|60324520 60275812 00477931 20653320 20275814 50305739 79552951 99552950 19552949 69634981 09579968 59552952 59602508 49602504 79602507@@ -643,6 +645,7 @@ landskrona-2-seat-sofa|09270281 09270276 59415818 99270291 59416422 99270286 494landskrona-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 99491283landskrona-4-seat-sofa|99270366 39270369 99270470 29270459 69420503 59415837 29415834 09032412 09270361 89032408 09270356landskrona-4-seat-sofa-chaise-longues|99554336 59554338 89554351 79554337 69554352 49554353 19554340 69554347 59554343 49554348 39554344+landskrona-5-seat-sofa|89269995 99416444 99415840 99269990 89269976 59416441 39415843 99046202 89269957 19046197 09269961landskrona-armchair|69269722 09269720 29415787 69416394 19269164 99269725 49416390 19269201 99031781 99031776 99269202landskrona-chaise-longue-add-on-unit|79270254 89416406 89270244 79415803 49270241 39415800 29416409 89270239 69270240 89124035 09124039landskrona-corner-sofa-5-seat|29270063 79270065 49270076 99416397 59416399 49415791 39270072 69270042 79031843 89031847 69270037@@ -665,15 +668,20 @@ lillanas-chair|50534769 30534765 10534766lillberget-chest-3-drawers-70-x-43-x-68|80630477lillberget-chest-5-drawers-70-x-43-x-108|60630478lillberget-chest-6-drawers-140-x-43-x-68|40630479+lillehem-1-seat-module|39552929 39471551 29471542 59471550 29552920 19552925lillehem-2-seat-modular-sofa|59471282 79471276 39471264 29471288 39471259 09471270+lillehem-2-seat-module|99536012 19536006 69536023 89536017 49535996 29536001 89577499 79577503 49577528 89577507 79577517 59577523lillehem-3-seat-modular-sofa|99617800 89617810 69617806 59617802 29617808 19617804lillehem-3-seat-modular-sofa-w-chaise-longue|99570384 69570385 49570386 39570382 29570387 19570383lillehem-4-seat-modular-sofa|69536056 99536045 79536051 59536028 39536034 29536039+lillehem-6-seat-modular-sofa|69536198 29536204 19536214 19536209 09536224 09536219lillehem-armchair|89470323 89470295 69470300 39470306 19470312 09470317lillehem-modular-corner-sofa-2-seat|89536282 79536287 49536298 59536293 09536304 09536276lillehem-modular-corner-sofa-4-seat|69536155 79536150 49536161 19536172 19536167 09536144lillesater-3-seat-sofa|40618496 00619073lillesater-4-seat-sofa|29614273 89614265+lillesater-5-seat-sofa|59614281 19614297+lillesater-6-seat-sofa|89614289 19614301lindakra-2-seat-sofa-bed|80582612 80629271linneback-easy-chair|40487235 20487222 10487227linnmon-adils-desk|29932181 09932177@@ -918,6 +926,7 @@ nammaro-chair|39610260 19610256nammaro-chair-armrests-outdoor|90511105 59610264 69610268nammaro-chair-outdoor|50503353nammaro-lounge-chair-outdoor|40510306+nammaro-modular-easy-chair-63|79584363 39529156 49621507 19611166 99575414 79607473nammaro-reclining-chair-outdoor|50510301nammaro-stool-outdoor-37-x-45|70510300nammaro-table-outdoor-130|50586701@@ -1159,6 +1168,7 @@ segeron-coffee-table-outdoor-73-x-73|40510797segeron-corner-section-cushion|59584726segeron-corner-section-outdoor|70510809segeron-corner-sofa-3-seat|89584621+segeron-one-seat-section-outdoor|50510805segeron-table-outdoor-91-x-147|10510812 90510813segrare-desk-sit-stand-110-x-60|40534703skalboda-armchair|40555309 90554388 20582035@@ -1424,7 +1434,9 @@ ugglerum-coffee-table-130-x-65|60627980ugglerum-side-table-46-x-40|00627983ulriksberg-armchair|90434310ulvevar-chair-armrests-outdoor|00608833+uppakra-1-5-seat-module|19619723 99619658 79619720 79619701 79619659 69619706 49619726 99619781 89619772 69619787 59619778 49619769 49619745 39619760 99619823 89619814 79619796 69619829 59619820 49619811 49619793uppakra-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-4-5-seat-modular-sofa|09620307 09620270 79620304 79620295 79620276 69620286 49620292 99620440 89620445 89620426 89620412 69620432 59620545 29620434 19620378 99620384 79620361 59620381 49620536 29620387 19620364uppakra-chaise-longue-module|39620457 89620474 89620469 79620460 69620489 69620451 59620480 89620501 79620530 79620498 69620516 59620507 39620513 39620495uppakra-corner-module|49620796 89620756 79620790 79620771 69620781 69620762 39620787uppakra-modular-corner-sofa-3-seat|99620553 89620558 79620573 69620564 49620579 29621358 29620556@@ -1502,6 +1514,7 @@ vimle-1-seat-section|89631528 69631534 29631531 89392392 69392393 59502896 89501vimle-2-seat-section|69631732 89631726 29631729 79392415 59502900 49392412 89392434 90465349vimle-2-seat-sofa|09634663 99634692 89631383 19634667 59634689 79398974 09398977 79400547 79400566 59501646 49400544 99501395 89503093 19306294vimle-2-seat-sofa-bed|39477336 59638654 39638669 09638656 99638671 89638657 29638660 19638665 79638629 39638631 19638613 69638615 29638617 69638620 69537027+vimle-2-seat-sofa-bed-section|19634648 99545224 29545265 79569391 79501377 39547872 19503082 79562120vimle-3-seat-section|79631699 09631693 69631713 39631696 89392453 09501601 69392454 40465356vimle-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 99545281vimle-3-seat-sofa-bed-chaise-longue|19639245 09639241 89639256 89639242 49639239 39639254 29545246 19477356 69638941 99638949 79638945 69638955 29638943 19638953 09638939@@ -1541,6 +1554,7 @@ vittskar-5-seat-modular-corner-sofa|19591248 39619680vittskar-chair-armrests|20575167vittskar-coffee-table-110-x-58|80575555vittskar-modular-chaise-longue|29591257 69618844 79618848 99591273 29618860 59591270 89591259 99618852+vittskar-modular-easy-chair|49618864 89590981vittskar-table-264-x-96|30575162vitval-bunk-bed-frame-90-x-200|80411272vitval-loft-bed-frame-90-x-200|10411242diff --git a/src/data/ikea-rows.ts b/src/data/ikea-rows.tsindex 0d7cba7..123270a 100644--- a/src/data/ikea-rows.ts+++ b/src/data/ikea-rows.ts@@ -463,6 +463,7 @@ JÄTTEBO|section|Chaise longue module, left|64|83|160|seats=1JÄTTEBO|section|Chaise longue module, right|64|83|160|seats=1JÄTTEBO|sofa|2-seat modular sofa|170|85|92|seats=2JÄTTEBO|sofa|3-seat modular sofa|230|85|92|seats=3+JÄTTEBO|sofa|4,5-seat modular sofa|350|85|92|seats=5JÄTTEBO|usofa|U-shaped sofa, 7-seat|365|83|237|seats=7,arms=wide,sd=92JÄTTESTA|coffee|Coffee table, 80 × 80 cm|80|45|80JÄTTESTA|side|Side table, 95 × 30 cm|95|50|30@@ -474,6 +475,7 @@ JUTEBODA|stool|Stool|35|45|35JUTHOLMEN|armchair|Easy chair, outdoor, 65 × 73 × 71 cm|65|71|73||outdoor gardenJUTHOLMEN|armchair|Easy chair, outdoor, 65 × 73 × 83 cm|65|83|73||outdoor gardenJUTHOLMEN|corner|Modular corner sofa 3-seat, outdoor|173|85|173|seats=3,arms=wide,corner=left,sd=92|outdoor garden+JUTHOLMEN|section|One-seat section, outdoor|64|83|92|seats=1|outdoor gardenJUTHOLMEN|section|Corner section, outdoor|92|83|92|seats=1,corner=left|outdoor gardenJUTHOLMEN|sofa|2-seat modular sofa, outdoor, 146 × 73 cm|146|85|73|seats=2|outdoor gardenJUTHOLMEN|sofa|2-seat modular sofa, outdoor|170|85|92|seats=2|outdoor garden@@ -586,6 +588,7 @@ LANDSKRONA|corner|Corner sofa, 6-seat|285|89|222|seats=6,arms=slim,corner=left,sLANDSKRONA|section|Chaise longue, add-on unit|63|89|157|seats=1LANDSKRONA|sofa|2-seat sofa|170|85|92|seats=2,arms=slimLANDSKRONA|sofa|4-seat sofa|290|85|92|seats=4,arms=slim+LANDSKRONA|sofa|5-seat sofa|329|89|89|seats=5,arms=slimLANESUND|bookcase|Bookcase, 121 × 37 × 152 cm|121|152|37LANESUND|cabinet|Glass-door cabinet, 121 × 37 × 152 cm|121|152|37LANESUND|sideboard|Sideboard, 161 × 47 × 81 cm|161|81|47@@ -608,11 +611,16 @@ LILLEHEM|armchair|Armchair|75|90|80LILLEHEM|chaise|3-seat modular sofa w chaise longue|226|85|160|seats=3,arms=wide,chaise=right,sd=92LILLEHEM|corner|Modular corner sofa, 2-seat|173|85|92|seats=2,arms=wide,corner=left,sd=92LILLEHEM|corner|Modular corner sofa, 4 seat|237|85|173|seats=4,arms=wide,corner=left,sd=92+LILLEHEM|section|1-seat module|64|83|92|seats=1+LILLEHEM|section|2-seat module|128|83|92|seats=2LILLEHEM|sofa|2-seat modular sofa|170|85|92|seats=2LILLEHEM|sofa|3-seat modular sofa|230|85|92|seats=3LILLEHEM|sofa|4-seat modular sofa|290|85|92|seats=4+LILLEHEM|sofa|6-seat modular sofa|398|85|92|seats=6LILLESÄTER|sofa|3-seat sofa|230|85|92|seats=3LILLESÄTER|sofa|4-seat sofa|290|85|92|seats=4+LILLESÄTER|sofa|5-seat sofa|350|85|92|seats=5+LILLESÄTER|sofa|6-seat sofa|398|85|92|seats=6LINDÅKRA|sofa|2-seat sofa-bed|170|85|92|seats=2LINNEBÄCK|armchair|Easy chair|75|90|80LINNMON / ADILS|dining|Table, 100 × 45 cm|100|74|45@@ -849,6 +857,7 @@ NÄMMARÖ|dining|Table, outdoor, 130 cm|130|74|130|round=1|outdoor gardenNÄMMARÖ|dining|Table, outdoor, 140 × 75 cm|140|74|75||outdoor gardenNÄMMARÖ|lounge|Reclining chair, outdoor|66|102|84||outdoor gardenNÄMMARÖ|lounge|Lounge chair, outdoor|72|88|80||outdoor garden+NÄMMARÖ|section|Modular easy chair, 63 cm|63|83|92|seats=1,arms=wide|outdoor gardenNÄMMARÖ|sofa|2-seat sofa, 126 cm|126|85|92|seats=2|outdoor gardenNÄMMARÖ|sofa|2-seat sofa, 147 cm|147|85|92|seats=2|outdoor gardenNÄMMARÖ|sofa|3-seat sofa, 264 cm|264|85|92|seats=3|outdoor garden@@ -1081,6 +1090,7 @@ SEGERÖN|chair|Chair with armrests, outdoor|44|88|50|arms=slim|outdoor gardenSEGERÖN|coffee|Coffee table, outdoor, 73 × 73 cm|73|45|73||outdoor gardenSEGERÖN|corner|Corner sofa, 3-seat|173|85|173|seats=3,arms=wide,corner=left,sd=92|outdoor gardenSEGERÖN|dining|Table, outdoor, 91 × 147 cm|91|74|147||outdoor garden+SEGERÖN|section|One-seat section, outdoor|64|83|92|seats=1|outdoor gardenSEGERÖN|section|Corner section with cushion|92|83|92|seats=1,corner=left|outdoor gardenSEGERÖN|section|Corner section, outdoor|92|83|92|seats=1,corner=left|outdoor gardenSEGERÖN|sofa|2-seat sofa, outdoor|170|85|92|seats=2|outdoor garden@@ -1341,7 +1351,9 @@ UPPÅKRA|corner|Modular corner sofa, 3-seat|173|85|173|seats=3,arms=wide,corner=UPPÅKRA|corner|Modular corner sofa, 6 seat|301|85|237|seats=6,arms=wide,corner=left,sd=92UPPÅKRA|section|Chaise longue module|64|83|160|seats=1UPPÅKRA|section|Corner module|92|83|92|seats=1,corner=left+UPPÅKRA|section|1.5-seat module|96|83|92|seats=1UPPÅKRA|sofa|3-seat modular sofa|230|85|92|seats=3+UPPÅKRA|sofa|4,5-seat modular sofa|350|85|92|seats=5UPPÅKRA|usofa|U-shaped sofa, 4,5-seat|301|83|173|seats=5,arms=wide,sd=92URBAN|junior|Junior chair|43|91|52||kids childrenUTESPELARE|desk|Gaming desk, 160 × 80 cm|160|74|80@@ -1424,6 +1436,7 @@ VIMLE|section|1-seat section|69|83|98|seats=1VIMLE|section|Chaise longue section|69|83|166|seats=1VIMLE|section|Corner section|98|83|98|seats=1,corner=leftVIMLE|section|2-seat section|138|83|98|seats=2+VIMLE|section|2-seat sofa-bed section|138|83|98|seats=2VIMLE|section|3-seat section|207|83|98|seats=3VIMLE|sofa|2-seat sofa|170|85|92|seats=2VIMLE|sofa|2-seat sofa-bed|170|85|92|seats=2@@ -1447,6 +1460,7 @@ VITTSKÄR|corner|5-seat modular corner sofa|237|85|237|seats=5,arms=wide,corner=VITTSKÄR|dining|Table, 264 × 96 cm|264|74|96||outdoor gardenVITTSKÄR|section|1-seat section for modular sofa|64|83|92|seats=1|outdoor gardenVITTSKÄR|section|Modular chaise longue|64|83|160|seats=1|outdoor garden+VITTSKÄR|section|Modular easy chair|98|83|92|seats=1,arms=wide|outdoor gardenVITTSKÄR|section|2-seat section for modular sofa|128|83|92|seats=2|outdoor gardenVITTSKÄR|sofa|2-seat modular sofa|170|85|92|seats=2|outdoor gardenVITTSKÄR|sofa|2-seat sofa|170|85|92|seats=2|outdoor gardendiff --git a/src/lib/plan/corner.ts b/src/lib/plan/corner.tsindex 2970257..a7a8834 100644--- a/src/lib/plan/corner.ts+++ b/src/lib/plan/corner.ts@@ -29,7 +29,9 @@ export function buildCornerSofa(b: PlanBuilder, s: ProductSpec) {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));+ // a long straight sofa: two sections side by side, as deep as the sofa+ const straight = p.corner === undefined && !p.chaise;+ const sd = straight ? D : 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);@@ -49,7 +51,13 @@ export function buildCornerSofa(b: PlanBuilder, s: ProductSpec) {const secs: Section[] = [];const sectionName = (n: number) => `${n}-seat section`;let frontArm = false;- if (!corner) {+ if (straight) {+ // the longer section first, the other pushed against its right-hand end+ const cw = (W - 2 * a) / N;+ const n0 = Math.ceil(N / 2);+ secs.push({ name: sectionName(n0), x0: -W / 2 + a, x1: -W / 2 + a + n0 * cw, z0: back, z1: D / 2, seats: n0, along: "x", legs: [] });+ secs.push({ name: sectionName(N - n0), x0: -W / 2 + a + n0 * cw, x1: W / 2 - a, z0: back, z1: D / 2, seats: N - n0, along: "x", slide: [300, 0, 0], legs: [] });+ } else if (!corner) {const side = p.chaise ?? "right";const nCh = side === "both" ? 2 : 1;const cw = (W - 2 * a) / N;@@ -233,7 +241,7 @@ export function buildCornerSofa(b: PlanBuilder, s: ProductSpec) {const sliders = secs.filter((x) => x.slide);b.step({- title: u ? "Join the sections together" : 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",+ title: u || straight ? "Join the sections together" : 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 screw a connector across each joint.",tools: ["screwdriver"],pose: "-y",diff --git a/src/lib/plan/sofa.ts b/src/lib/plan/sofa.tsindex b40702e..ce4ed13 100644--- a/src/lib/plan/sofa.ts+++ b/src/lib/plan/sofa.ts@@ -14,7 +14,8 @@ 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);+ // more than four seats: two sections joined, like a corner sofa without the corner+ if (s.sofa?.chaise || s.sofa?.corner || (s.sofa?.seats ?? 0) > 4) 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.tsindex 4e2593a..39228ea 100644--- a/src/lib/products.ts+++ b/src/lib/products.ts@@ -458,7 +458,13 @@ export function specFor(kind: Kind, name: string, variant: string, w: number, h:return { ...base, seat: { kind: "bench", seat: "square", seatH: h, splay: false } };case "sofa":case "armchair":- return { ...base, people: kind === "sofa" ? 2 : 1, sofa: { seats: x.seats ?? (kind === "armchair" ? 1 : Math.max(1, Math.round((w - 30) / 62))), arms: x.arms ?? "wide", legs: "round" } };+ return {+ ...base,+ people: kind === "sofa" ? 2 : 1,+ // more than four seats come as two sections joined together+ ...(kind === "sofa" && (x.seats ?? 0) > 4 ? { minutes: x.min ?? MIN.sofa + 30, difficulty: 3 as const } : {}),+ sofa: { seats: x.seats ?? (kind === "armchair" ? 1 : Math.max(1, Math.round((w - 30) / 62))), arms: x.arms ?? "wide", legs: "round" },+ };case "wallshelf":return { ...base, difficulty: 1, people: 1, shelf: { style: "bookcase", shelves: x.shelves ?? Math.max(0, Math.round(h / 35) - 1), fixedShelf: false, back: false, plinth: false, outer: 16, wall: true } };case "wallcab":@@ -528,7 +534,8 @@ export function specFor(kind: Kind, name: string, variant: string, w: number, h:const seats = x.seats ?? 1;// x.corner: a corner section, with a backrest along the back and down that sideif (x.corner) return { ...base, minutes: x.min ?? MIN.section + 15, people: 1, sofa: { seats: 1, arms: "none", legs: "round", corner: x.corner } };- return { ...base, minutes: x.min ?? MIN.section + 10 * seats, people: seats > 1 ? 2 : 1, sofa: { seats, arms: "none", legs: "round" } };+ // x.arms: a modular easy chair, a one-seat section with an armrest on each side+ return { ...base, minutes: x.min ?? MIN.section + 10 * seats + (x.arms ? 10 : 0), people: seats > 1 ? 2 : 1, sofa: { seats, arms: x.arms ?? "none", legs: "round" } };}case "washstand":case "sinkcab":