IKEA assembly, step by step: animated, manual-style 3D guides. Scan any paper manual with Together AI.
TypeScript
Draw hat racks and hat and coat stands
Youssef3803306416fc
diff --git a/scripts/ikea/build.ts b/scripts/ikea/build.tsindex 35b834a..f225c1a 100644--- a/scripts/ikea/build.ts+++ b/scripts/ikea/build.ts@@ -59,7 +59,7 @@ function hints(family: string, kind: Kind): Hint | undefined {/* ---------- matching against hand made entries ---------- */-const LATER_KINDS = new Set<Kind>(["office", "chaise", "corner", "cot", "bunk", "loft", "dropleaf", "daybed", "mixed", "sliding", "slidecab", "bookrow", "cabrow", "section", "gateleg", "washstand", "sinkcab", "appliance", "shoerack", "clothesrack", "changing", "divider", "backbench", "junior", "lounge", "highchair", "cornercab", "cornerrobe", "usofa", "lounger", "swivel", "conference", "cornerdesk", "conftable", "lidbox", "shelfbench", "workbench", "extension", "deskdraw", "boxdesk"]);+const LATER_KINDS = new Set<Kind>(["office", "chaise", "corner", "cot", "bunk", "loft", "dropleaf", "daybed", "mixed", "sliding", "slidecab", "bookrow", "cabrow", "section", "gateleg", "washstand", "sinkcab", "appliance", "shoerack", "clothesrack", "changing", "divider", "backbench", "junior", "lounge", "highchair", "cornercab", "cornerrobe", "usofa", "lounger", "swivel", "conference", "cornerdesk", "conftable", "lidbox", "shelfbench", "workbench", "extension", "deskdraw", "boxdesk", "hatrack", "coatstand"]);function baseMatch(name: string, draw: Draw): CatalogEntry | undefined {const fam = fold(name);diff --git a/scripts/ikea/check.ts b/scripts/ikea/check.tsindex ac2d2b2..6f2b969 100644--- a/scripts/ikea/check.ts+++ b/scripts/ikea/check.ts@@ -144,6 +144,10 @@ async function main() {expect("billy height extension unit", "billy-height-extension-unit-40-x-28-x-35");expect("besta tv bench with drawers", "besta-tv-bench-drawers-120-x-42-x-48");expect("besta tv bench", "besta-tv-bench-120-x-40");+ // a hat rack or a coat stand when asked for, the family's bench otherwise+ expect("tjusig hat rack", "tjusig-hat-rack-79");+ expect("nipasen coat stand", "nipasen-hat-and-coat-stand-181");+ expect("nipasen", "nipasen-bench-shoe-storage-79-x-35-x-52");if (articleNo("S292.975.72") !== "29297572") fail("article numbers with an S in front don't parse");for (const [no, slug] of [["60324520", "kallax-2x2"]] as const) {if (articleSlug(no) !== slug) fail(`article ${no} gave ${articleSlug(no)}, expected ${slug}`);diff --git a/scripts/ikea/classify.ts b/scripts/ikea/classify.tsindex 1e3bdd3..f00a9c2 100644--- a/scripts/ikea/classify.ts+++ b/scripts/ikea/classify.ts@@ -273,6 +273,8 @@ const RULES: Rule[] = [if (/drawer/.test(what)) x.rows = 1;return { kind: "cornercab", x };}],+ // a hat and coat stand is one piece, whatever its name says+ [/^(hat and coat stand|clothes stand|coat stand)$/, () => ({ kind: "coatstand" })],// things that are several products, or only part of one// an armchair that rocks as it swivels is one chair, whatever its name says[/^rocking and swivel armchair$/, () => ({ kind: "swivel", x: { rock: true } })],@@ -481,6 +483,8 @@ const RULES: Rule[] = [c.f.name === "KALLAX" ? "cube shelf with door inserts" : { kind: "tv", x: m[0] === "tv bench" && /^(BESTÅ|LACK)$/.test(c.f.name) ? { doors: 0 } : {} }],[/^(shoe rack|open shoe storage unit)$/, () => ({ kind: "shoerack" })],[/^room divider$/, () => ({ kind: "divider" })],+ // a hat rack on the wall: a shelf over a row of hooks (IKEA gives only the width)+ [/^hat rack$/, () => ({ kind: "hatrack" })],// changing tables: a chest of drawers or an open frame with shelves, and a changing top on it[/^changing table(?: with drawers|\/chest of drawers|\/bookshelf|\/desk)?$/, (m, c) =>c.f.spr ? "changing table sold as a combination" : { kind: "changing", x: /drawers/.test(m[0]) ? { rows: 3 } : { shelves: /desk/.test(m[0]) ? 1 : 2 } }],@@ -764,6 +768,15 @@ export function classify(f: Fact, hints: Hints): Verdict {else set(v[0], 80, v[1]);guessed.h = v.length === 2 && !x.hung && !CORNER_WH[family];if (hint?.x.knobs) x.knobs = hint.x.knobs;+ } else if (kind === "hatrack") {+ // IKEA gives the width, sometimes the depth and height+ if (v.length === 3) set(v[0], v[2], v[1]);+ else if (v.length >= 1) set(v[0]);+ } else if (kind === "coatstand") {+ // IKEA gives the height, sometimes the width of the feet after it+ if (v.length === 1) set(undefined, v[0]);+ else if (v.length === 2) set(v[1], v[0], v[1]);+ if (kids && guessed.w) [w, d] = [38, 38];} else if (kind === "deskdraw" || kind === "boxdesk") {// measured from above, or wide by deep by high; a dressing table's height takes in its mirrorif (v.length === 3) set(v[0], v[2], v[1]);diff --git a/scripts/ikea/slugs.json b/scripts/ikea/slugs.jsonindex 3a715e3..dcec77d 100644--- a/scripts/ikea/slugs.json+++ b/scripts/ikea/slugs.json@@ -11,6 +11,7 @@"ALEX|Drawer unit with 9 drawers, 36 × 116 cm": "alex-drawer-unit-9-drawers-36-x-116","ALEX|Storage unit, 36 × 70 cm": "alex-storage-unit-36-x-70","ÄLGANÄS|Clothes rack with shoe storage, 46 × 39 × 166 cm": "alganas-clothes-rack-shoe-storage-46-x-39-x-166",+ "ÄLGANÄS|Hat and coat stand, 173 × 33 cm": "alganas-hat-and-coat-stand-173-x-33","ÄLGANÄS|Shoe rack, 76 × 24 × 59 cm": "alganas-shoe-rack-76-x-24-x-59","ÅLHULT|Bench, 103 × 36 cm": "alhult-bench-103-x-36","ÅLHULT|Chair": "alhult-chair",@@ -145,6 +146,7 @@"BONDHOLMEN|Chair with armrests, outdoor": "bondholmen-chair-armrests-outdoor","BONDHOLMEN|Reclining chair, outdoor": "bondholmen-reclining-chair-outdoor","BONDHOLMEN|Table, outdoor, 235 × 90 cm": "bondholmen-table-outdoor-235-x-90",+ "BONDSKÄRET|Hat and coat stand, 175 cm": "bondskaret-hat-and-coat-stand-175","BORGEBY|Coffee table, 70 cm": "borgeby-coffee-table-70","BORGEBY|Side table, 46 cm": "borgeby-side-table-46","BRÄNNBOLL|Side table on castors, 69 × 39 cm": "brannboll-side-table-on-castors-69-x-39",@@ -209,6 +211,7 @@"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",+ "EKRAR|Hat and coat stand, 169 cm": "ekrar-hat-and-coat-stand-169","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",@@ -322,6 +325,7 @@"GREÅKER|Cabinet with drawers, 84 × 101 cm": "greaker-cabinet-drawers-84-x-101","GREJSIMOJS|Children's stool": "grejsimojs-children-s-stool","GREJSIMOJS|Children's table, 84 × 42 cm": "grejsimojs-children-s-table-84-x-42",+ "GREJSIMOJS|Clothes stand, 125 cm": "grejsimojs-clothes-stand-125","GREJSIMOJS|Pouffe with storage": "grejsimojs-pouffe-storage","GRILLSKÄR|Side table, outdoor, 30 × 61 cm": "grillskar-side-table-outdoor-30-x-61","GRÖNFJÄLL|Office chair with arm/headrest": "gronfjall-office-chair-arm-headrest",@@ -546,6 +550,7 @@"KALLAX|Shelving unit, 77 × 112 cm": "kallax-shelving-unit-77-x-112","KALLAX|Shelving unit, 77 × 41 cm": "kallax-shelving-unit-77-x-41","KALLSÖ|Bench with shoe storage, 80 × 38 × 56 cm": "kallso-bench-shoe-storage-80-x-38-x-56",+ "KALLSÖ|Hat rack, 80 cm": "kallso-hat-rack-80","KALLSÖ|Storage bench, 80 × 38 × 56 cm": "kallso-storage-bench-80-x-38-x-56","KARSKÄR|Chair": "karskar-chair","KARSKÄR|Extendable table, 160/220 × 90 cm": "karskar-extendable-table-160-220-x-90",@@ -935,6 +940,7 @@"NEIDEN|Bed frame, Standard Double, 135 × 190 cm": "neiden-bed-frame-standard-double-135-x-190","NEIDEN|Bed frame, Standard Single, 90 × 190 cm": "neiden-bed-frame-standard-single-90-x-190","NIPÅSEN|Bench with shoe storage, 79 × 35 × 52 cm": "nipasen-bench-shoe-storage-79-x-35-x-52",+ "NIPÅSEN|Hat and coat stand, 181 cm": "nipasen-hat-and-coat-stand-181","NISSAFORS|Trolley, 50.5 × 19 × 67 cm": "nissafors-trolley-50-5-x-19-x-67","NISSAFORS|Trolley, 50.5 × 30 × 83 cm": "nissafors-trolley-50-5-x-30-x-83","NORDKISA|Bedside table, 40 × 40 cm": "nordkisa-bedside-table-40-x-40",@@ -1362,6 +1368,7 @@"TINGBY|Side table on castors, 50 × 50 cm": "tingby-side-table-on-castors-50-x-50","TJÄRKIL|Extendable table, 180/235/290 × 100 cm": "tjarkil-extendable-table-180-235-290-x-100","TJUSIG|Bench with shoe storage, 108 × 34 × 50 cm": "tjusig-bench-shoe-storage-108-x-34-x-50",+ "TJUSIG|Hat rack, 79 cm": "tjusig-hat-rack-79","TJUSIG|Shoe rack, 79 × 32 × 37 cm": "tjusig-shoe-rack-79-x-32-x-37","TOBIAS|Chair": "tobias-chair","TOLKNING|Bench with storage, 120 cm": "tolkning-bench-storage-120",diff --git a/src/components/art/Hardware.tsx b/src/components/art/Hardware.tsxindex fee3234..976d442 100644--- a/src/components/art/Hardware.tsx+++ b/src/components/art/Hardware.tsx@@ -299,6 +299,21 @@ function draw(kind: HwKind, len: number, dia: number): Drawn {</g>),};+ case "hook":+ // lying down: the thread on the left, the plate, the stem and its ball+ return {+ w: len + 12,+ h: dia,+ scalable: true,+ node: (+ <g>+ <rect x={0} y={-2.5} width={12} height={5} rx={1} fill={METAL} {...stroke} />+ <rect x={12} y={-dia * 0.28} width={3} height={dia * 0.56} rx={1} fill={METAL} {...stroke} />+ <rect x={15} y={-4} width={len - 18} height={8} rx={3} fill={METAL} {...stroke} />+ <circle cx={len + 12 - dia * 0.42} cy={0} r={dia * 0.42} fill={METAL} {...stroke} />+ </g>+ ),+ };case "connector":// a flat strip with a screw hole at each endreturn {diff --git a/src/data/ikea-guard.ts b/src/data/ikea-guard.tsindex acb4140..144dddc 100644--- a/src/data/ikea-guard.ts+++ b/src/data/ikea-guard.ts@@ -1,3 +1,3 @@// Generated by scripts/ikea/build.ts from IKEA product data. Do not edit by hand.// Real IKEA names we can't draw that look like a typo of one we can (folded, no spaces)-export const IKEA_GUARD = "abrotten afjall alsken alvsta ananas angskorn arsjon asphult aspinge bagganas basingen batskar bengta blanda blaser boholmen bolmso borrby branas brogrund brunsta bullig burfjord byholma cissan dalskar duvholmen eklatera ekorre fagelon falskar farvik fiskbo florsjon forneby forsa forvaltare fossta frakta fridfull frihult frojda froson frost fyllen gamman gansjon gatebo gillstad godis gresla gronmes grossjon grusnarv grytas gubbarp hackas hallnas hallspar halved hammaron hamnskar hanga hassjon havsdun havsen havskal havsmal hejsta helgeo hilver hogvind holmared holmeja horred hultarp hutten ikeaps2002 ikeaps2014 ikeaps2017 isjakt jagmastare jallby jattestor kalken kallarp kallboda kallror kallsjon kallsup kasker klamtare klipplax knalla knixhult knoppang kolsjon konstruera kroksjon kvalmso kvittera ladmakare larkar latsas lersta lill lilla lillabo lillhult lindasen lohals lova lyckad macksjon majsjon mala maleras manalg martorp melodi molnas moppa morkulla navlinge nereby nissedal nogsta norden nydala opparyd ordning orskar piggal pinnarp pipranka plats plockar rahult ramsnas ramsta ranarp ransberg revskar ringsta rissla rockan runnen runskar saljen sandmott seglaro sidsjo sindal sindvik sjalso skalryta skarig skedstor skogsa skogskorn skogsnas skogsror smaata smalom smarra smaska smycka sonhult spantad sparka stelna stensta stensund stjarnhov storslinga strala strandad svalka svallet svansele svartho svartra sy tackan tacknan tallsparv tasjon terrsjo tisken tittebo tolken torared torkad tossig trogen troskning tvarfot tysnes uddarp undvika uppfora upplaga upplid uppvind utaker vagdal vagomrade vagsjon vallasan vasskar vathult vedbak veddinge vedhamn viggbo vilsta vindas voxtorp vresjon";+export const IKEA_GUARD = "abrotten afjall alsken alvsta ananas angskorn arsjon asphult aspinge bagganas basingen batskar bengta blanda blaser boholmen bolmso borrby branas brogrund brunsta bullig burfjord byholma cissan dalskar duvholmen eklatera ekorre fagelon falskar farvik fiskbo florsjon forneby forsa forvaltare fossta frakta fridfull frihult frojda froson frost fyllen gamman gansjon gatebo gillstad godis gresla gronmes grossjon grusnarv grytas gubbarp hackas hallnas hallspar halved hammaron hamnskar hanga hassjon havsdun havsen havskal havsmal hejsta hektar helgeo hilver hogvind holmared holmeja horred hultarp hutten ikeaps2002 ikeaps2014 ikeaps2017 isjakt jagmastare jallby jattestor kalken kallarp kallboda kallror kallsjon kallsup kasker klamtare klipplax knalla knixhult knoppang kolsjon konstruera kroksjon kvalmso kvittera ladmakare larkar latsas lersta lill lilla lillabo lillhult lindasen lohals lova lyckad macksjon majsjon mala maleras manalg martorp melodi molnas moppa morkulla navlinge nereby nissedal nogsta norden nydala opparyd ordning orskar piggal pinnarp pipranka plats plockar rahult ramsnas ramsta ranarp ransberg revskar ringsta rissla rockan runnen runskar saljen sandmott seglaro sidsjo sindal sindvik sjalso skalryta skarig skedstor skogsa skogskorn skogsnas skogsror smaata smalom smarra smaska smycka sonhult spantad sparka stelna stensta stensund stjarnhov storslinga strala strandad svalka svallet svansele svartho svartra sy tackan tacknan tallsparv tasjon terrsjo tisken tittebo tolken torared torkad tossig trogen troskning tvarfot tysnes uddarp undvika uppfora upplaga upplid uppvind utaker vagdal vagomrade vagsjon vallasan vasskar vathult vedbak veddinge vedhamn viggbo vilsta vindas voxtorp vresjon";diff --git a/src/data/ikea-items.ts b/src/data/ikea-items.tsindex c076ad8..119e834 100644--- a/src/data/ikea-items.ts+++ b/src/data/ikea-items.ts@@ -13,6 +13,7 @@ alex-drawer-unit-on-castors-36-x-76|59422220 69582680 39422221 29628029alex-drawer-unit-on-castors-67-x-66|80485423 50473544 20588891alex-storage-unit-36-x-70|50563752 70588898 50563790alganas-clothes-rack-shoe-storage-46-x-39-x-166|10585888+alganas-hat-and-coat-stand-173-x-33|90585894alganas-shoe-rack-76-x-24-x-59|20585883alhult-bench-103-x-36|60603093 40603094alhult-chair|50600801 40600774@@ -158,6 +159,7 @@ bondholmen-bench-backrest-outdoor|50558166bondholmen-chair-armrests-outdoor|10558173bondholmen-reclining-chair-outdoor|80558179bondholmen-table-outdoor-235-x-90|20558196+bondskaret-hat-and-coat-stand-175|40554381borgeby-coffee-table-70|70389356 30500355borgeby-side-table-46|40619882 80619880brannboll-side-table-on-castors-69-x-39|00586360@@ -231,6 +233,7 @@ ekholma-2-seat-sofa|79537404 69537409 99537403 19537398ekholma-2-seat-sofa-bed|19598565ekholma-3-seat-sofa|19537416 89537413 09537412 59537419ekholma-corner-sofa-4-seat-open-end|09563076 59563074 29563075 79563073+ekrar-hat-and-coat-stand-169|10415594ektorp-2-seat-sofa|59620729 49628684 09628681 09509027 99509018 59509015 89628677ektorp-3-seat-sofa|59619759 29509012 89509009 19509003 79509000 59628706 99628709ektorp-3-seat-sofa-chaise-longue|29628736 59628730 99628733 99509042 89509033 49509030 19509036@@ -347,6 +350,7 @@ grafjallet-wall-mounted-bedside-table-42-x-29-x|00603114greaker-cabinet-drawers-84-x-101|50501071grejsimojs-children-s-stool|60598973 50598959grejsimojs-children-s-table-84-x-42|70598963+grejsimojs-clothes-stand-125|10602996grejsimojs-pouffe-storage|60603644grillskar-side-table-outdoor-30-x-61|00523179gronfjall-office-chair-arm-headrest|89513921@@ -595,6 +599,7 @@ kallax-shelving-unit-underframe-147-x-94|29442677 39442686 89442679 79442689 594kallax-shelving-unit-underframe-77-x-164|69442642 89442655 19442654 99442645 79442646 49442643 29442615 79607557kallax-shelving-unit-underframe-77-x-94|89442617 59442628 49442619 69442618 79442627 09442616 29634983kallso-bench-shoe-storage-80-x-38-x-56|20599328+kallso-hat-rack-80|60599326kallso-storage-bench-80-x-38-x-56|80599325karskar-chair|00611251karskar-extendable-table-160-220-x-90|50611263@@ -1005,6 +1010,7 @@ nasinge-table-80-x-60|60587535 10587533neiden-bed-frame-standard-double-135-x-190|79248611neiden-bed-frame-standard-single-90-x-190|99248605nipasen-bench-shoe-storage-79-x-35-x-52|20586142+nipasen-hat-and-coat-stand-181|50586150nissafors-trolley-50-5-x-19-x-67|10602982 40602985nissafors-trolley-50-5-x-30-x-83|20399777 40585801 40465733 10606782nordkisa-bedside-table-40-x-40|60447677@@ -1447,6 +1453,7 @@ teodores-chair|99399835 19399839 90530627 20530621 90350937tingby-side-table-on-castors-50-x-50|20295930 00349444tjarkil-extendable-table-180-235-290-x-100|70630454tjusig-bench-shoe-storage-108-x-34-x-50|70152702 50152703+tjusig-hat-rack-79|40152633 20152634tjusig-shoe-rack-79-x-32-x-37|10152639 30152638tobias-chair|30635123 80349671 90532589tolkning-bench-storage-120|80512657diff --git a/src/data/ikea-rows.ts b/src/data/ikea-rows.tsindex f607099..bfe33f0 100644--- a/src/data/ikea-rows.ts+++ b/src/data/ikea-rows.ts@@ -12,6 +12,7 @@ ALEX|desk|Desk, 100 × 48 cm|100|74|48ALEX|desk|Desk, 132 × 58 cm|132|74|58ALEX|open|Storage unit, 36 × 70 cm|36|70|35ÄLGANÄS|clothesrack|Clothes rack with shoe storage, 46 × 39 × 166 cm|46|166|39|shelf=1+ÄLGANÄS|coatstand|Hat and coat stand, 173 × 33 cm|33|173|33ÄLGANÄS|shoerack|Shoe rack, 76 × 24 × 59 cm|76|59|24ÅLHULT|bench|Bench, 103 × 36 cm|103|45|36ÅLHULT|chair|Chair|44|88|50@@ -146,6 +147,7 @@ BONDHOLMEN|dining|Table, outdoor, 235 × 90 cm|235|74|90||outdoor gardenBONDHOLMEN|lounge|Reclining chair, outdoor|66|102|84||outdoor gardenBONDHOLMEN|sofa|2-seat sofa, outdoor, 139 × 81 × 73 cm|139|73|81|seats=2|outdoor gardenBONDHOLMEN|sofa|2-seat sofa, outdoor|170|85|92|seats=2|outdoor garden+BONDSKÄRET|coatstand|Hat and coat stand, 175 cm|45|175|45BORGEBY|coffee|Coffee table, 70 cm|70|45|70|round=1BORGEBY|side|Side table, 46 cm|46|50|46|round=1BRÄNNBOLL|side|Side table on castors, 69 × 39 cm|69|50|39@@ -210,6 +212,7 @@ EKHOLMA|corner|Corner sofa, 4-seat with open end|237|85|156|seats=4,arms=wide,coEKHOLMA|sofa|2-seat sofa|170|85|92|seats=2EKHOLMA|sofa|2-seat sofa-bed|170|85|92|seats=2EKHOLMA|sofa|3-seat sofa|230|85|92|seats=3+EKRAR|coatstand|Hat and coat stand, 169 cm|45|169|45EKTORP|armchair|Armchair|75|90|80EKTORP|chaise|3-seat sofa with chaise longue|218|88|156|seats=3,arms=wide,chaise=right,sd=88EKTORP|corner|Corner sofa, 4-seat|228|88|166|seats=4,arms=wide,corner=left,sd=88@@ -321,6 +324,7 @@ GRÅFJÄLLET|divider|Room divider, 150 × 175 cm|150|175|25GRÅFJÄLLET|nightstand|Bedside table, 45 × 36 × 59 cm|45|59|36|rows=1GRÅFJÄLLET|wallshelf|Wall-mounted bedside table, 42 × 29 × 31 cm|42|31|29GREÅKER|chest|Cabinet with drawers, 84 × 101 cm|84|101|48|rows=4+GREJSIMOJS|coatstand|Clothes stand, 125 cm|45|125|45GREJSIMOJS|kidstable|Children's table, 84 × 42 cm|84|48|42||kidsGREJSIMOJS|lidbox|Pouffe with storage|38|38|38|cat=Pouffe with storageGREJSIMOJS|stool|Children's stool|35|30|35||kids@@ -547,6 +551,7 @@ KALLAX|cube|Shelving unit with 10 inserts, 182 × 182 cm|182|182|39|ins=10KALLAX|cube|Shelving unit, 182 × 182 cm|182|182|39KALLAX|desk|Desk, 111 × 39 cm|111|74|39KALLSÖ|bench|Bench with shoe storage, 80 × 38 × 56 cm|80|56|38+KALLSÖ|hatrack|Hat rack, 80 cm|80|26|32KALLSÖ|lidbox|Storage bench, 80 × 38 × 56 cm|80|56|38KARSKÄR|chair|Chair|44|88|50KARSKÄR|dining|Extendable table, 160/220 × 90 cm|160|74|90@@ -936,6 +941,7 @@ NÄSINGE|dining|Table, 130 × 80 cm|130|74|80NEIDEN|bed|Bed frame, Standard Single, 90 × 190 cm|106|72|199|m=90,l=190,f=46NEIDEN|bed|Bed frame, Standard Double, 135 × 190 cm|151|72|199|m=135,l=190,f=46NIPÅSEN|bench|Bench with shoe storage, 79 × 35 × 52 cm|79|52|35+NIPÅSEN|coatstand|Hat and coat stand, 181 cm|45|181|45NISSAFORS|trolley|Trolley, 50.5 × 19 × 67 cm|51|67|19NISSAFORS|trolley|Trolley, 50.5 × 30 × 83 cm|51|83|30NORDKISA|desk|Dressing table, 76 × 47 cm|76|74|47@@ -1363,6 +1369,7 @@ TEGELÖN|dining|Table, outdoor, 216 × 86 cm|216|74|86||outdoor gardenTINGBY|side|Side table on castors, 50 × 50 cm|50|50|50TJÄRKIL|dining|Extendable table, 180/235/290 × 100 cm|180|74|100TJUSIG|bench|Bench with shoe storage, 108 × 34 × 50 cm|108|50|34+TJUSIG|hatrack|Hat rack, 79 cm|79|26|32TJUSIG|shoerack|Shoe rack, 79 × 32 × 37 cm|79|37|32TOBIAS|chair|Chair|44|88|50TOLKNING|divider|Room divider, 150 × 170 cm|150|170|25diff --git a/src/engine/drawable.ts b/src/engine/drawable.tsindex fe3f4b9..8bcb848 100644--- a/src/engine/drawable.ts+++ b/src/engine/drawable.ts@@ -264,6 +264,13 @@ export function hwDrawable(kind: HwKind, len: number, dia: number) {for (const x of [-1, 1]) addSolid(d, `fh:leaf:${len}:${dia}`, () => new THREE.BoxGeometry(len / 2 - 3, 1.6, dia), metal, { position: [x * (len / 4 + 1.5), 0.8, 0] });addSolid(d, `fh:pin:${dia}`, () => new THREE.CylinderGeometry(3, 3, dia, 12).rotateX(Math.PI / 2), metal, { hull: "radial", position: [0, 2.2, 0] });break;+ case "hook":+ // a coat peg: a thread into the wood, a round plate against it, a stem, and a ball on the end+ addSolid(d, "hk:thread", cyl(2.5, 12, 10), metal, { hull: "cyl", position: [0, -6, 0] });+ addSolid(d, `hk:plate:${dia}`, cyl(r * 0.55, 3, 20), metal, { hull: "cyl", position: [0, 1.5, 0] });+ addSolid(d, `hk:stem:${len}`, cyl(4, len - 12, 14), metal, { hull: "cyl", position: [0, 3 + (len - 12) / 2, 0] });+ addSolid(d, `hk:ball:${dia}`, () => new THREE.SphereGeometry(r * 0.42, 18, 12), metal, { hull: "radial", position: [0, len - 6, 0], edges: false });+ break;case "roller":// a sliding door's roller: a plate screwed to the door's edge, an arm, and a wheel that runs in the trackaddSolid(d, `ro:plate:${len}`, () => new THREE.BoxGeometry(len, 3, 14), metal, { position: [0, 1.5, 0] });diff --git a/src/lib/plan/builder.ts b/src/lib/plan/builder.tsindex 4cab18f..5d27722 100644--- a/src/lib/plan/builder.ts+++ b/src/lib/plan/builder.ts@@ -53,6 +53,7 @@ export const HW = {connector: { kind: "connector", len: 120, dia: 30 },roller: { kind: "roller", len: 44, dia: 26 },flatHinge: { kind: "flatHinge", len: 60, dia: 34 },+ hook: { kind: "hook", len: 55, dia: 22 },} satisfies Record<string, HwDef>;const HW_NAMES: Record<HwKind, string> = {@@ -77,6 +78,7 @@ const HW_NAMES: Record<HwKind, string> = {connector: "Connector",roller: "Door roller",flatHinge: "Flat hinge",+ hook: "Hook",};export function hwSpecText(kind: HwKind, len: number, dia: number) {diff --git a/src/lib/plan/shelf.ts b/src/lib/plan/shelf.tsindex 0c61351..39c9431 100644--- a/src/lib/plan/shelf.ts+++ b/src/lib/plan/shelf.ts@@ -6,6 +6,7 @@ import { buildChanging } from "./changing";import { buildRack } from "./rack";import { buildScreen } from "./screen";import { CASTOR_H } from "./castors";+import { buildCoatStand, buildHatRack } from "./stands";export function defaultsShelf(s: ProductSpec): ShelfParams {const p = s.shelf ?? {};@@ -27,6 +28,8 @@ export function buildShelf(b: PlanBuilder, s: ProductSpec) {if (s.shelf?.changing) return buildChanging(b, s, buildShelf);if (s.shelf?.style === "rack") return buildRack(b, s);if (s.shelf?.style === "screen") return buildScreen(b, s);+ if (s.shelf?.style === "hatrack") return buildHatRack(b, s);+ if (s.shelf?.style === "stand") return buildCoatStand(b, s);const p = defaultsShelf(s);if (p.style === "grid") return s.shelf?.underframe ? onUnderframe(b, s, p) : s.shelf?.inserts ? withInserts(b, s, p) : grid(b, s, p);if (s.shelf?.rail) return withRail(b, s, p);diff --git a/src/lib/plan/stands.ts b/src/lib/plan/stands.tsnew file mode 100644index 0000000..4e9112d--- /dev/null+++ b/src/lib/plan/stands.ts@@ -0,0 +1,154 @@+import type { PartPiece, ProductSpec, Vec3 } from "../types";+import { HW, PlanBuilder, type FitOpts } from "./builder";+import { anchorStep } from "./frame";+import { clamp } from "./math";++/**+ * A hat rack on the wall (TJUSIG, KALLSÖ): a back rail with a row of hooks, an end screwed onto each end of it,+ * and a shelf on top for hats. Built on the floor, hung on the wall last.+ */+export function buildHatRack(b: PlanBuilder, s: ProductSpec) {+ const W = s.size.w * 10, H = s.size.h * 10, D = s.size.d * 10;+ const t = 18, rh = 90;+ const railT = b.part("Back rail", [W - 2 * t, rh, t], { material: "wood" });+ const rail = b.place(railT, [0, rh / 2, -D / 2 + t / 2]);+ const endT = b.part("End", [t, H - t, D], { material: "wood" });+ const ends = [-1, 1].map((sx) => b.place(endT, [sx * (W / 2 - t / 2), (H - t) / 2, 0]));+ const shelfT = b.part("Shelf", [W, t, D], { material: "wood" });+ const shelf = b.place(shelfT, [0, H - t / 2, 0]);+ const nh = clamp(Math.round(W / 160), 3, 8);+ const hx = (i: number) => -W / 2 + t + ((W - 2 * t) * (i + 0.5)) / nh;++ b.step(+ {+ title: "Screw the ends onto the back rail",+ detail: "One at each end, flush with the back. Two screws through each end into the rail.",+ tools: ["screwdriver"],+ kind: "screws",+ },+ () => {+ b.add(rail, [0, 0, -200]);+ b.then(0.1);+ b.stagger(0.25);+ ends.forEach((k, i) => b.add(k, [(i === 0 ? -1 : 1) * 220, 0, 0]));+ b.then(0.1);+ const sc: FitOpts[] = [];+ for (const [i, k] of ends.entries()) for (const y of [rh * 0.3, rh * 0.7]) sc.push({ on: k, at: [(i === 0 ? -1 : 1) * (W / 2), y, -D / 2 + t / 2], dir: [i === 0 ? 1 : -1, 0, 0], mate: rail });+ b.fits(HW.screwM, sc, 0.1);+ },+ );++ b.step(+ {+ title: "Screw the shelf on top",+ detail: "Line it up with the back, then screw down into both ends.",+ tools: ["screwdriver"],+ kind: "screws",+ },+ () => {+ b.add(shelf, [0, 240, 0]);+ b.then(0.1);+ const sc: FitOpts[] = [];+ for (const sx of [-1, 1]) for (const z of [-D / 4, D / 4]) sc.push({ on: shelf, at: [sx * (W / 2 - t / 2), H, z], dir: [0, -1, 0], mate: ends[sx < 0 ? 0 : 1] });+ b.fits(HW.screwM, sc, 0.08);+ },+ );++ b.step(+ {+ title: "Screw in the hooks",+ detail: "Into the holes along the front of the back rail. Hand tight is enough.",+ kind: "screws",+ warnings: ["hand"],+ },+ () => {+ const list: FitOpts[] = Array.from({ length: nh }, (_, i) => ({ on: rail, at: [hx(i), rh / 2, -D / 2 + t] as Vec3, dir: [0, 0, -1] as Vec3 }));+ b.fits(HW.hook, list, 0.1);+ },+ );++ anchorStep(b, { W, D, top: shelf, y: H, backZ: -D / 2, tools: ["drill", "screwdriver", "pencil", "level"], hang: true });+}++/**+ * A hat and coat stand (EKRAR, NIPÅSEN, GREJSIMOJS): two feet that slot together in a cross, a pole in sections+ * screwed end to end on top of them, and hooks around the top.+ */+export function buildCoatStand(b: PlanBuilder, s: ProductSpec) {+ const H = s.size.h * 10;+ const B = clamp(Math.max(s.size.w, s.size.d) * 10, 300, 700);+ const fh = 40, fd = 50, pd = 38;+ const nSec = H > 1500 ? 3 : 2;+ const secL = (H - fh) / nSec;++ const footT = b.part("Foot", [B, fh, fd], { material: "wood" });+ const feet = [b.place(footT, [0, fh / 2, 0]), b.place(footT, [0, fh / 2, 0], [0, Math.PI / 2, 0])];+ const secT = b.part("Pole section", [pd, secL, pd], { shape: "cyl", material: "wood" });+ const secs = Array.from({ length: nSec }, (_, i) => b.place(secT, [0, fh + secL * (i + 0.5), 0]));+ const capPieces: PartPiece[] = [{ shape: "cyl", size: [pd + 14, 30, pd + 14], pos: [0, 0, 0] }];+ const cap = b.compound("Top cap", capPieces, { material: "wood" });+ const top = b.place(cap.type, [0, H - 15, 0]);+ const hooks = H > 1300 ? 8 : 6;+ const tall = H > 1500;++ b.step(+ {+ title: "Slot the feet together",+ detail: "One fits down into the notch in the other, in a cross. Then bolt the bottom of the pole on from underneath.",+ tools: ["allen"],+ kind: "bolts",+ },+ () => {+ b.stagger(0.3);+ b.add(feet[0], [0, 0, 220]);+ b.add(feet[1], [0, 220, 0]);+ b.then(0.1);+ b.add(secs[0], [0, 320, 0]);+ b.then(0.1);+ b.fit(HW.boltL, { on: feet[0], at: [0, 0, 0], dir: [0, 1, 0], mate: secs[0] });+ },+ );++ b.step(+ {+ title: nSec > 2 ? "Screw the other pole sections on" : "Screw the top section on",+ detail: "Each one screws onto the one below. Turn by hand until it's tight and the pole is straight.",+ kind: "join",+ people: tall ? 2 : 1,+ warnings: ["hand"],+ },+ () => {+ b.stagger(0.4);+ secs.slice(1).forEach((k) => b.add(k, [0, 300, 0], { spin: 2 }));+ },+ );++ b.step(+ {+ title: "Screw in the hooks",+ detail: "Into the holes around the top of the pole, then press the cap on.",+ kind: "screws",+ warnings: ["hand"],+ },+ () => {+ const list: FitOpts[] = Array.from({ length: hooks }, (_, i) => {+ const a = (i / hooks) * Math.PI * 2;+ const y = H - 60 - (i % 2) * 140;+ return { on: secs[nSec - 1], at: [Math.cos(a) * (pd / 2), y, Math.sin(a) * (pd / 2)] as Vec3, dir: [-Math.cos(a), 0, -Math.sin(a)] as Vec3 };+ });+ b.fits(HW.hook, list, 0.1);+ b.then(0.1);+ b.add(top, [0, 200, 0]);+ },+ );++ b.step(+ {+ title: "Check that it stands straight",+ detail: "On a flat floor. If it leans, tighten the bolt under the feet a little more.",+ tools: ["allen"],+ kind: "general",+ },+ () => {},+ );+}diff --git a/src/lib/products.ts b/src/lib/products.tsindex ba31d24..a4bcaa7 100644--- a/src/lib/products.ts+++ b/src/lib/products.ts@@ -77,7 +77,9 @@ export type Kind =| "workbench"| "extension"| "deskdraw"- | "boxdesk";+ | "boxdesk"+ | "hatrack"+ | "coatstand";export type X = {rows?: number;@@ -318,7 +320,7 @@ const MIN: Record<Kind, number> = {cube: 40, bookcase: 50, open: 40, chest: 90, nightstand: 40, desk: 25, coffee: 20, side: 15, dining: 40,bed: 100, wardrobe: 120, cabinet: 60, sideboard: 80, tv: 60, shoe: 45, chair: 25, stool: 12, bench: 20, sofa: 40, armchair: 30,wallshelf: 25, wallcab: 40, kitchen: 50, trolley: 25, bar: 35, console: 30, kidstable: 15, kidschair: 20,- office: 20, chaise: 55, corner: 70, cot: 35, bunk: 90, loft: 75, dropleaf: 40, daybed: 60, mixed: 50, sliding: 110, slidecab: 60, bookrow: 120, cabrow: 120, section: 25, gateleg: 50, washstand: 35, sinkcab: 45, appliance: 50, shoerack: 25, clothesrack: 20, changing: 50, divider: 20, backbench: 35, junior: 25, lounge: 30, highchair: 15, cornercab: 45, cornerrobe: 150, usofa: 110, lounger: 35, swivel: 25, conference: 20, cornerdesk: 35, conftable: 30, lidbox: 30, shelfbench: 30, workbench: 45, extension: 20, deskdraw: 40, boxdesk: 35,+ office: 20, chaise: 55, corner: 70, cot: 35, bunk: 90, loft: 75, dropleaf: 40, daybed: 60, mixed: 50, sliding: 110, slidecab: 60, bookrow: 120, cabrow: 120, section: 25, gateleg: 50, washstand: 35, sinkcab: 45, appliance: 50, shoerack: 25, clothesrack: 20, changing: 50, divider: 20, backbench: 35, junior: 25, lounge: 30, highchair: 15, cornercab: 45, cornerrobe: 150, usofa: 110, lounger: 35, swivel: 25, conference: 20, cornerdesk: 35, conftable: 30, lidbox: 30, shelfbench: 30, workbench: 45, extension: 20, deskdraw: 40, boxdesk: 35, hatrack: 20, coatstand: 15,};const CATEGORY: Record<Kind, string> = {@@ -327,7 +329,7 @@ const CATEGORY: Record<Kind, string> = {cabinet: "Cabinet", sideboard: "Sideboard", tv: "TV bench", shoe: "Shoe cabinet", chair: "Chair", stool: "Stool",bench: "Bench", sofa: "Sofa", armchair: "Armchair", wallshelf: "Wall shelf", wallcab: "Wall cabinet", kitchen: "Kitchen cabinet",trolley: "Trolley", bar: "Bar table", console: "Console table", kidstable: "Children's table", kidschair: "Children's chair",- office: "Office chair", chaise: "Sofa with chaise longue", corner: "Corner sofa", cot: "Cot", bunk: "Bunk bed", loft: "Loft bed", dropleaf: "Drop-leaf table", daybed: "Day-bed", mixed: "Cabinet with doors and drawers", sliding: "Wardrobe with sliding doors", slidecab: "Cabinet with sliding doors", bookrow: "Bookcase combination", cabrow: "Storage combination", section: "Sofa section", gateleg: "Gateleg table", washstand: "Wash-stand", sinkcab: "Sink cabinet", appliance: "Appliance cabinet", shoerack: "Shoe rack", clothesrack: "Clothes rack", changing: "Changing table", divider: "Room divider", backbench: "Bench with backrest", junior: "Junior chair", lounge: "Lounge chair", highchair: "Highchair", cornercab: "Corner base cabinet", cornerrobe: "Corner wardrobe", usofa: "U-shaped sofa", lounger: "Sun lounger", swivel: "Swivel easy chair", conference: "Conference chair", cornerdesk: "Corner desk", conftable: "Conference table", lidbox: "Storage bench", shelfbench: "Bench with storage", workbench: "Work bench", extension: "Height extension unit", deskdraw: "Desk with drawers", boxdesk: "Desk with storage",+ office: "Office chair", chaise: "Sofa with chaise longue", corner: "Corner sofa", cot: "Cot", bunk: "Bunk bed", loft: "Loft bed", dropleaf: "Drop-leaf table", daybed: "Day-bed", mixed: "Cabinet with doors and drawers", sliding: "Wardrobe with sliding doors", slidecab: "Cabinet with sliding doors", bookrow: "Bookcase combination", cabrow: "Storage combination", section: "Sofa section", gateleg: "Gateleg table", washstand: "Wash-stand", sinkcab: "Sink cabinet", appliance: "Appliance cabinet", shoerack: "Shoe rack", clothesrack: "Clothes rack", changing: "Changing table", divider: "Room divider", backbench: "Bench with backrest", junior: "Junior chair", lounge: "Lounge chair", highchair: "Highchair", cornercab: "Corner base cabinet", cornerrobe: "Corner wardrobe", usofa: "U-shaped sofa", lounger: "Sun lounger", swivel: "Swivel easy chair", conference: "Conference chair", cornerdesk: "Corner desk", conftable: "Conference table", lidbox: "Storage bench", shelfbench: "Bench with storage", workbench: "Work bench", extension: "Height extension unit", deskdraw: "Desk with drawers", boxdesk: "Desk with storage", hatrack: "Hat rack", coatstand: "Hat and coat stand",};export const KIND_ARCH: Record<Kind, Archetype> = {@@ -335,7 +337,7 @@ export const KIND_ARCH: Record<Kind, Archetype> = {side: "table", dining: "table", bed: "bed", wardrobe: "cabinet", cabinet: "cabinet", sideboard: "cabinet", tv: "cabinet",shoe: "cabinet", chair: "seat", stool: "seat", bench: "seat", sofa: "sofa", armchair: "sofa", wallshelf: "shelf", wallcab: "cabinet",kitchen: "cabinet", trolley: "table", bar: "table", console: "table", kidstable: "table", kidschair: "seat",- office: "seat", chaise: "sofa", corner: "sofa", cot: "bed", bunk: "bed", loft: "bed", dropleaf: "table", daybed: "bed", mixed: "cabinet", sliding: "cabinet", slidecab: "cabinet", bookrow: "shelf", cabrow: "cabinet", section: "sofa", gateleg: "table", washstand: "cabinet", sinkcab: "cabinet", appliance: "cabinet", shoerack: "shelf", clothesrack: "shelf", changing: "drawers", divider: "shelf", backbench: "seat", junior: "seat", lounge: "seat", highchair: "seat", cornercab: "cabinet", cornerrobe: "cabinet", usofa: "sofa", lounger: "seat", swivel: "seat", conference: "seat", cornerdesk: "table", conftable: "table", lidbox: "cabinet", shelfbench: "table", workbench: "table", extension: "cabinet", deskdraw: "table", boxdesk: "table",+ office: "seat", chaise: "sofa", corner: "sofa", cot: "bed", bunk: "bed", loft: "bed", dropleaf: "table", daybed: "bed", mixed: "cabinet", sliding: "cabinet", slidecab: "cabinet", bookrow: "shelf", cabrow: "cabinet", section: "sofa", gateleg: "table", washstand: "cabinet", sinkcab: "cabinet", appliance: "cabinet", shoerack: "shelf", clothesrack: "shelf", changing: "drawers", divider: "shelf", backbench: "seat", junior: "seat", lounge: "seat", highchair: "seat", cornercab: "cabinet", cornerrobe: "cabinet", usofa: "sofa", lounger: "seat", swivel: "seat", conference: "seat", cornerdesk: "table", conftable: "table", lidbox: "cabinet", shelfbench: "table", workbench: "table", extension: "cabinet", deskdraw: "table", boxdesk: "table", hatrack: "shelf", coatstand: "shelf",};const round = (x: X) => (x.round ? { round: true } : {});@@ -629,6 +631,12 @@ function specOf(kind: Kind, name: string, variant: string, w: number, h: number,const minutes = x.min ?? MIN.cornercab + (door ? 15 : 0) + (x.inner ? 15 : 0) + (x.rows ? 30 : 0) + 5 * (x.shelves ?? 0);return { ...base, category: hung ? "Corner wall cabinet" : CATEGORY.cornercab, minutes, people: w > 100 ? 2 : 1, difficulty: x.rows ? 3 : 2, cabinet: { doors: door ? 1 : 0, shelves: x.shelves ?? 0, rail: false, plinth: !hung, handles: x.knobs ?? "bar", thickness: 18, ...(hung ? { wall: true } : {}), corner } };}+ case "hatrack":+ // a back rail with hooks, an end at each side and a shelf on top, hung on the wall+ return { ...base, difficulty: 1, people: 1, shelf: { style: "hatrack" } };+ case "coatstand":+ // feet in a cross, a pole in sections, hooks around the top+ return { ...base, difficulty: 1, people: h > 1500 ? 2 : 1, shelf: { style: "stand" } };case "deskdraw":// x.rows drawers side by side under the top; x.mirror: a dressing table's mirror on the back of the topreturn { ...base, minutes: x.min ?? MIN.deskdraw + 20 * (x.rows ?? 2) + (x.mirror ? 15 : 0), people: w > 100 || x.mirror ? 2 : 1, difficulty: 2, table: { attach: "apron", legs: "square", legSize: 50, topThickness: 25, shelf: false, drawers: x.rows ?? 2, knobs: x.knobs ?? "knob", ...(x.mirror ? { mirror: 85 } : {}) } };@@ -733,5 +741,5 @@ export const KIND_DEFAULT_SIZE: Record<Kind, [number, number, number]> = {sideboard: [140, 85, 45], tv: [150, 50, 42], shoe: [60, 100, 28], chair: [44, 88, 50], stool: [35, 45, 35], bench: [100, 45, 38],sofa: [210, 85, 92], armchair: [75, 90, 80], wallshelf: [60, 60, 22], wallcab: [60, 60, 35], kitchen: [60, 80, 60], trolley: [50, 80, 40],bar: [120, 105, 60], console: [100, 79, 35], kidstable: [77, 48, 55], kidschair: [34, 60, 34],- office: [64, 105, 64], chaise: [226, 85, 160], corner: [233, 85, 171], cot: [130, 84, 68], bunk: [211, 160, 100], loft: [211, 195, 100], dropleaf: [134, 75, 80], daybed: [207, 83, 91], mixed: [80, 120, 40], sliding: [118, 200, 60], slidecab: [80, 110, 45], bookrow: [160, 202, 28], cabrow: [240, 48, 42], section: [192, 83, 92], gateleg: [151, 75, 90], washstand: [60, 83, 47], sinkcab: [60, 80, 60], appliance: [60, 200, 60], shoerack: [80, 40, 32], clothesrack: [100, 160, 46], changing: [80, 100, 55], divider: [150, 170, 25], backbench: [120, 86, 60], junior: [43, 91, 52], lounge: [72, 88, 80], highchair: [58, 90, 62], cornercab: [88, 80, 88], cornerrobe: [161, 201, 111], usofa: [306, 83, 241], lounger: [66, 87, 195], swivel: [78, 98, 80], conference: [60, 86, 60], cornerdesk: [140, 74, 130], conftable: [140, 74, 68], lidbox: [100, 48, 42], shelfbench: [110, 46, 38], workbench: [110, 90, 55], extension: [80, 35, 28], deskdraw: [120, 75, 50], boxdesk: [124, 52, 44],+ office: [64, 105, 64], chaise: [226, 85, 160], corner: [233, 85, 171], cot: [130, 84, 68], bunk: [211, 160, 100], loft: [211, 195, 100], dropleaf: [134, 75, 80], daybed: [207, 83, 91], mixed: [80, 120, 40], sliding: [118, 200, 60], slidecab: [80, 110, 45], bookrow: [160, 202, 28], cabrow: [240, 48, 42], section: [192, 83, 92], gateleg: [151, 75, 90], washstand: [60, 83, 47], sinkcab: [60, 80, 60], appliance: [60, 200, 60], shoerack: [80, 40, 32], clothesrack: [100, 160, 46], changing: [80, 100, 55], divider: [150, 170, 25], backbench: [120, 86, 60], junior: [43, 91, 52], lounge: [72, 88, 80], highchair: [58, 90, 62], cornercab: [88, 80, 88], cornerrobe: [161, 201, 111], usofa: [306, 83, 241], lounger: [66, 87, 195], swivel: [78, 98, 80], conference: [60, 86, 60], cornerdesk: [140, 74, 130], conftable: [140, 74, 68], lidbox: [100, 48, 42], shelfbench: [110, 46, 38], workbench: [110, 90, 55], extension: [80, 35, 28], deskdraw: [120, 75, 50], boxdesk: [124, 52, 44], hatrack: [80, 26, 32], coatstand: [45, 175, 45],};diff --git a/src/lib/search.ts b/src/lib/search.tsindex cd09a65..7c8ef4d 100644--- a/src/lib/search.ts+++ b/src/lib/search.ts@@ -26,6 +26,8 @@ const CATEGORY_WORDS: [Kind, string[]][] = [["lidbox", ["storage bench", "storage chest", "storage table", "storage ottoman", "storage footstool", "footstool with storage", "pouffe with storage", "pouf with storage", "storage pouffe", "storage pouf", "storage stool", "blanket box", "toy box", "toy chest", "bench with lid", "hope chest"]],["divider", ["room divider", "room dividers", "folding screen", "privacy screen", "partition screen", "room screen"]],["changing", ["changing table", "changing unit", "baby changing table", "changing station", "diaper changing table", "nappy changing table"]],+ ["coatstand", ["coat stand", "hat and coat stand", "hat stand", "clothes stand", "coat tree", "hall tree", "hat tree", "standing coat rack", "coat rack stand"]],+ ["hatrack", ["hat rack", "hat shelf", "wall coat rack", "coat rack with shelf", "wall hat rack", "hat and coat rack", "coat hooks with shelf"]],["clothesrack", ["clothes rack", "clothes rail", "clothing rack", "clothing rail", "garment rack", "garment rail", "coat rack", "coat stand"]],["shoerack", ["shoe rack", "shoe shelf", "shoe stand", "shoe bench", "open shoe storage"]],["shoe", ["shoe", "shoes", "shoe cabinet", "shoe rack"]],@@ -84,7 +86,7 @@ const CATEGORY_WORDS: [Kind, string[]][] = [];const KIND_WORDS = new Map(CATEGORY_WORDS);// rows, sections, and kinds drawn later than a family's other pieces, which only come first when asked for-const LESSER = new Set<Kind>(["bookrow", "cabrow", "section", "sinkcab", "appliance", "washstand", "shoerack", "clothesrack", "changing", "divider", "backbench", "junior", "lounge", "highchair", "cornercab", "cornerrobe", "usofa", "lounger", "swivel", "conference", "cornerdesk", "conftable", "lidbox", "shelfbench", "workbench", "extension", "deskdraw", "boxdesk"]);+const LESSER = new Set<Kind>(["bookrow", "cabrow", "section", "sinkcab", "appliance", "washstand", "shoerack", "clothesrack", "changing", "divider", "backbench", "junior", "lounge", "highchair", "cornercab", "cornerrobe", "usofa", "lounger", "swivel", "conference", "cornerdesk", "conftable", "lidbox", "shelfbench", "workbench", "extension", "deskdraw", "boxdesk", "hatrack", "coatstand"]);export function kindOf(q: string): Kind | null {const f = " " + fold(q) + " ";diff --git a/src/lib/types.ts b/src/lib/types.tsindex 833eb5a..28b791d 100644--- a/src/lib/types.ts+++ b/src/lib/types.ts@@ -3,7 +3,7 @@ export type Vec3 = [number, number, number];export type Archetype = "shelf" | "drawers" | "table" | "bed" | "cabinet" | "seat" | "sofa" | "custom";export interface ShelfParams {- style: "grid" | "bookcase" | "rack" | "screen"; // a rack: two uprights on feet with a rail across the top; a screen: hinged panels+ style: "grid" | "bookcase" | "rack" | "screen" | "hatrack" | "stand"; // a rack: two uprights on feet with a rail across the top; a screen: hinged panels; a hat rack on the wall; a coat standcols: number;rows: number;shelves: number; // adjustable shelves (bookcase)@@ -282,7 +282,8 @@ export type HwKind =| "gasLift"| "connector"| "roller"- | "flatHinge";+ | "flatHinge"+ | "hook";export interface HwType {id: string;