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

Add 59 missing IKEA products

Youssefa02629a7d645
diff --git a/docs/manual-sweep.md b/docs/manual-sweep.md
index 3f6fff1..e7cc9ca 100644
--- a/docs/manual-sweep.md
+++ b/docs/manual-sweep.md
@@ -2,7 +2,7 @@
Every catalog guide is being rebuilt to follow its product's IKEA assembly manual: the same steps in the same order, the same parts, fittings and counts, the build poses the manual shows (lying on its back, upside down) and two people where it shows two. The drawings and words are our own.
-**Status: 2,139 of 2,166 guides (99%) are built from their manuals; every guide builds.** The 27 left have no manual anywhere (discontinued products); they keep the old builder.
+**Status: 2,198 of 2,225 guides (99%) are built from their manuals; every guide builds.** The 27 left have no manual anywhere (discontinued products); they keep the old builder.
On 29 October every guide was also checked for impossible moves: a part sliding across dowels or cam bolts instead of along them, and screws or bolts that end in thin air. Those were fixed family by family; what the check still reports (about 190 guides) was looked at and is a false alarm (a frame that moves in one piece, a screw into a handle or the floor).
@@ -14,6 +14,10 @@ On 29 October every guide was also checked for impossible moves: a part sliding
- New fitting kinds: clip, strap, nut, washer, stud, clamp, angle, foot, cap, spacer; fittings can carry their own name. New part material `glass`, half-disc pieces for split round tops.
- Product data: `src/data/fixes.ts` holds about 90 single-product corrections; `scripts/ikea/classify.ts` now reads corner sofas, bed frames, sofa-beds, office chairs and more from IKEA's measurements.
+## Products added on 29 October
+
+59 assemblable IKEA products had no guide (fold-out tables, loft and bunk beds with underbeds, KALLAX TV benches, gaming furniture, stands and racks). They are listed by article number in `ADDED` in `scripts/ikea/classify.ts`, so `npm run ikea:build` gives them rows, slugs and article numbers, and each has a guide from its manual in its family file. `scripts/ikea/skips.ts` lists what the listings still skip and why.
+
## To do next
- Record voice clips for the new step lines (`npm run voice -- --dry` first for the cost); until then, new lines are spoken live only for visitors with their own key.
diff --git a/scripts/ikea/build.ts b/scripts/ikea/build.ts
index b7ce2da..5f4b217 100644
--- a/scripts/ikea/build.ts
+++ b/scripts/ikea/build.ts
@@ -92,7 +92,7 @@ function baseMatch(name: string, draw: Draw): CatalogEntry | undefined {
const g = p ? { w: draw.guessed.w || p.w, h: draw.guessed.h || p.h, d: draw.guessed.d || p.d } : draw.guessed;
// a cube shelf with inserts or on an underframe is more than the hand made shelf of the same size, and a modular
// chest's drawers and open sections are its own
- if (draw.x.ins || draw.x.uf || draw.x.mods) return undefined;
+ if (draw.x.ins || draw.x.uf || draw.x.mods || draw.own) return undefined;
for (const e of BASE) {
if (fold(e.name) !== fam) continue;
if (e.archetype !== spec.archetype && e.category !== spec.category) continue;
@@ -100,6 +100,8 @@ function baseMatch(name: string, draw: Draw): CatalogEntry | undefined {
if (LATER_KINDS.has(draw.kind) && e.category !== spec.category) continue;
// IKEA's own name for what it is sets it apart from a hand made entry of another category
if (draw.x.cat && e.category !== spec.category) continue;
+ // an open wall shelf is not the cabinet with a door of the same size
+ if (draw.kind === "wallshelf" && e.category === "Cabinet") continue;
if (draw.kind === "bed") {
if (e.bed?.mattressW === draw.x.m && (e.bed?.mattressL ?? 200) === (draw.x.l ?? 200)) return e;
continue;
diff --git a/scripts/ikea/check.ts b/scripts/ikea/check.ts
index d2be2d7..a71ed9c 100644
--- a/scripts/ikea/check.ts
+++ b/scripts/ikea/check.ts
@@ -33,8 +33,10 @@ function finite(v: unknown): boolean {
function fits(plan: Plan) {
const { w, h, d } = plan.spec.size;
const sizeOf = new Map(plan.parts.map((p) => [p.id, p.size]));
+ // what the product hangs on or holds (an IVAR side unit, a mattress) isn't in the box and can reach past it
+ const extra = new Set(plan.parts.filter((p) => p.extra).map((p) => p.id));
for (const it of plan.items) {
- if (it.kind !== "part") continue;
+ if (it.kind !== "part" || extra.has(it.ref)) continue;
const s = sizeOf.get(it.ref);
if (!s || s.some((v) => !(v > 0))) return `part ${it.ref} has no size`;
const [x, y, z] = it.final.pos;
@@ -50,7 +52,7 @@ async function main() {
const label = `${e.slug} (${e.name} ${e.variant})`;
const { w, h, d } = e.size;
// a long modular sofa can run to nearly 5 m; a trolley for boxes is a platform 9 cm high
- if (!(w >= 15 && w <= (e.archetype === "sofa" ? 480 : 320) && h >= 8 && h <= 260 && d >= 12 && d <= (e.archetype === "sofa" ? 400 : 240))) fail(`${label}: size ${w}x${h}x${d} cm is out of range`);
+ if (!(w >= 15 && w <= (e.archetype === "sofa" ? 480 : 320) && h >= 8 && h <= 260 && d >= 8 && d <= (e.archetype === "sofa" ? 400 : 240))) fail(`${label}: size ${w}x${h}x${d} cm is out of range`);
try {
const plan = buildPlan(toSpec(e));
if (!plan.steps.length) fail(`${label}: no steps`);
diff --git a/scripts/ikea/classify.ts b/scripts/ikea/classify.ts
index 8763dfb..7aa9d2b 100644
--- a/scripts/ikea/classify.ts
+++ b/scripts/ikea/classify.ts
@@ -34,6 +34,8 @@ export interface Draw {
/** which of w/h/d the listing left out and the product page filled in: matching treats them as unknown, so a
* product keeps the guide (and the link) it had before its page was read */
paged?: { w: boolean; h: boolean; d: boolean };
+ /** one of the ADDED products: its own guide, never merged into a hand made entry */
+ own?: boolean;
}
export type Verdict = { draw: Draw } | { skip: string };
@@ -663,7 +665,84 @@ function chestShape(total: number, w: number, h: number): { rows: number; cols:
/** IKEA's top level ranges that hold no furniture: food, textiles, kitchenware, lamps, plants, decoration and so on. */
const NOT_FURNITURE = /^(fb|tl|kt|li|pp|de|wt|he|hs|lc|pt|sp)\d/;
+/**
+ * Products no rule above draws (fold-out tables, loft beds, stands, sliding doors...) that have a guide written from
+ * their manual in src/lib/plan/families. Keyed by one article number of the product; kind and outer size w, h, d in cm,
+ * which the product page's measurements replace when it has been read.
+ */
+const ADDED: Record<string, { kind: Kind; w: number; h: number; d: number; x?: X }> = {
+ "00579755": { kind: "bookcase", w: 80, h: 106, d: 33 }, // BILLY bookcase with foldable table
+ "10495133": { kind: "lounger", w: 310, h: 110, d: 110 }, // BOCKÖN hammock stand
+ "10269168": { kind: "open", w: 160, h: 95, d: 28 }, // BRIMNES headboard with storage
+ "60586258": { kind: "trolley", w: 56, h: 62, d: 40 }, // BRÄNNBOLL shelving unit on castors
+ "50219044": { kind: "desk", w: 140, h: 146, d: 74 }, // FREDDE gaming desk
+ "20575030": { kind: "daybed", w: 207, h: 81, d: 97, x: { m: 90 } }, // GLAMBERGET extendable bed
+ "80609683": { kind: "wallshelf", w: 110, h: 31, d: 12 }, // GULLABERG add-on unit
+ "40609680": { kind: "desk", w: 84, h: 85, d: 41 }, // GULLABERG gateleg desk
+ "70624603": { kind: "wallcab", w: 28, h: 37.5, d: 11 }, // HUSBYÅN wall cabinet
+ "20411982": { kind: "desk", w: 146, h: 70, d: 70 }, // IDÅSEN underframe sit/stand
+ "80360951": { kind: "slidecab", w: 120, h: 140, d: 45 }, // IDÅSEN cabinet with sliding glass doors
+ "40512466": { kind: "dropleaf", w: 80, h: 74, d: 91 }, // IVAR folding table
+ "79469527": { kind: "open", w: 89, h: 179, d: 30 }, // IVAR 1 section with foldable table
+ "69606577": { kind: "open", w: 134, h: 179, d: 95 }, // IVAR 2 sections with foldable table
+ "80562096": { kind: "tv", w: 147, h: 60, d: 39 }, // KALLAX TV bench
+ "19552176": { kind: "tv", w: 147, h: 78, d: 39 }, // KALLAX TV bench with underframe
+ "19278272": { kind: "cube", w: 77, h: 77, d: 39 }, // KALLAX shelving unit with doors
+ "90480401": { kind: "side", w: 44, h: 61, d: 44 }, // KVISTBRO storage table
+ "40539263": { kind: "dining", w: 150, h: 72, d: 146 }, // LERHOLMEN picnic table
+ "30587080": { kind: "desk", w: 90, h: 80, d: 39 }, // LÄNGDHOPP pull-out desk
+ "00492795": { kind: "desk", w: 120, h: 75, d: 58 }, // LÄRANDE desk with pull-out storage
+ "30180504": { kind: "dropleaf", w: 74, h: 74, d: 60 }, // NORBERG wall-mounted drop-leaf table
+ "80583433": { kind: "daybed", w: 193, h: 40, d: 80, x: { m: 80 } }, // NORRUDDEN guest bed
+ "69638111": { kind: "bench", w: 120, h: 63, d: 57 }, // PLATSA storage bench
+ "99614255": { kind: "cabinet", w: 180, h: 103, d: 42 }, // PLATSA cabinet with 5 doors
+ "20533337": { kind: "dropleaf", w: 63, h: 74, d: 40 }, // RESARÖ mobile drop-leaf table
+ "70228325": { kind: "kidstable", w: 79, h: 50, d: 89 }, // RESÖ children's picnic table
+ "60569744": { kind: "kidschair", w: 40, h: 50, d: 40 }, // SMÅSKRAKE child chair/table
+ "29437483": { kind: "loft", w: 207, h: 182, d: 99, x: { m: 90 } }, // SMÅSTAD loft bed
+ "70567805": { kind: "wallcab", w: 36, h: 20, d: 29 }, // STOMSÖ wall-mounted bedside table
+ "80371520": { kind: "stool", w: 40, h: 33, d: 38 }, // TROGEN children's step stool
+ "00575540": { kind: "side", w: 40, h: 74, d: 40 }, // VISINGSÖ plant stand
+ "90620005": { kind: "side", w: 45, h: 60, d: 45 }, // YXSTABY gaming side table on castors
+ "10620009": { kind: "stool", w: 40, h: 45, d: 40 }, // YXSTABY gaming thumbstick stool
+ "20512660": { kind: "nightstand", w: 40, h: 52, d: 40 }, // TOLKNING bedside table
+ "30253067": { kind: "bookcase", w: 33, h: 163, d: 28 }, // RÅGRUND shelving unit
+ "80624645": { kind: "shoerack", w: 60, h: 40, d: 27 }, // VASSKÄR shoe rack
+ "90600291": { kind: "shoerack", w: 58, h: 17, d: 27 }, // GREJIG shoe rack
+ "90609178": { kind: "bench", w: 90, h: 30, d: 30 }, // FLISAT children's bench
+ "30609181": { kind: "desk", w: 83, h: 70, d: 58 }, // FLISAT children's desk
+ "00290778": { kind: "wallshelf", w: 70, h: 16, d: 9 }, // FLISAT wall storage
+ "40586508": { kind: "tv", w: 179, h: 56, d: 42 }, // STOCKHOLM 2025 TV bench with sliding doors
+ "00439468": { kind: "wardrobe", w: 120, h: 186, d: 47, x: { doors: 1 } }, // NORDKISA open wardrobe with sliding door
+ "19302922": { kind: "bunk", w: 207, h: 161, d: 97, x: { m: 90 } }, // VITVAL bunk bed with underbed
+ "10448325": { kind: "daybed", w: 200, h: 25, d: 90, x: { m: 90 } }, // VITVAL underbed
+ "99239451": { kind: "daybed", w: 200, h: 25, d: 90, x: { m: 90 } }, // SLÄKT underbed with storage
+ "50603263": { kind: "dining", w: 187, h: 74, d: 187 }, // VITTSKÄR table
+ "39284998": { kind: "cabinet", w: 60, h: 202, d: 40 }, // BESTÅ cabinet unit
+ "99384693": { kind: "bar", w: 42, h: 90, d: 47 }, // BERGMUND bar stool with backrest
+ "59471786": { kind: "bar", w: 42, h: 90, d: 47 }, // BERGMUND bar stool with backrest (US)
+ "40582044": { kind: "stool", w: 40, h: 45, d: 40 }, // HAUGA stool (US)
+ "50606624": { kind: "chair", w: 46, h: 81, d: 53 }, // HÄGERNÄS chair (US)
+ "00534903": { kind: "bench", w: 110, h: 45, d: 35 }, // TÄRNÖ bench (US)
+ "90503346": { kind: "bar", w: 45, h: 100, d: 50 }, // SEGERÖN bar stool (US)
+ "10516772": { kind: "trolley", w: 54, h: 81, d: 40 }, // RULLEBÖR cart (US)
+ "20569227": { kind: "cabinet", w: 61, h: 60, d: 30 }, // TITTEBO roll-front cabinet (US)
+ "69329764": { kind: "armchair", w: 93, h: 83, d: 99 }, // SÖDERHAMN armchair (US)
+ "60427641": { kind: "lounger", w: 60, h: 95, d: 100 }, // KLÖVEN deck chair (US)
+ "40613903": { kind: "armchair", w: 84, h: 100, d: 95 }, // GRYTERYD recliner rocker (US)
+ "70632684": { kind: "armchair", w: 110, h: 85, d: 90 }, // VENNGARN 1.5-seat armchair (US)
+};
+
export function classify(f: Fact, hints: Hints): Verdict {
+ const added = f.items.map((i) => ADDED[i]).find(Boolean);
+ if (added) {
+ const page = f.m ? fromPage(added.kind, f.m) : null;
+ const w = page?.w ?? added.w, h = page?.h ?? added.h, d = page?.d ?? added.d;
+ const label = f.type.replace(/\s+/g, " ").trim();
+ const size = f.size.replace(/\s*x\s*/g, " × ").trim();
+ const outdoor = /outdoor/i.test(label);
+ return { draw: { kind: added.kind, x: { ...added.x, ...page?.x }, w: Math.round(w), h: Math.round(h), d: Math.round(d), label, size: /\d/.test(size) ? size : "", kw: outdoor ? ["outdoor", "garden"] : [], guessed: { w: false, h: false, d: false }, own: true } };
+ }
if (NOT_FURNITURE.test(f.cats[0] ?? "")) return { skip: "not furniture" };
const raw = f.type.replace(/\s+/g, " ").trim();
let t = raw.toLowerCase();
diff --git a/scripts/ikea/slugs.json b/scripts/ikea/slugs.json
index dd31c90..6b29d51 100644
--- a/scripts/ikea/slugs.json
+++ b/scripts/ikea/slugs.json
@@ -90,9 +90,11 @@
"BEKANT|Storage unit on castors, 41 × 101 cm": "bekant-storage-unit-on-castors-41-x-101",
"BEKVÄM|Kitchen trolley, 58 × 50 cm": "bekvam-kitchen-trolley-58-x-50",
"BEKVÄM|Step stool, 63 cm": "bekvam-step-stool-63",
+ "BERGMUND|Bar stool with backrest, 62 cm": "bergmund-bar-stool-backrest-62",
"BERGSHYTTAN|Bench, 210 × 38 cm": "bergshyttan-bench-210-x-38",
"BERGSHYTTAN|Table, 240 × 93 cm": "bergshyttan-table-240-x-93",
"BESTÅ BURS|TV bench, 180 × 41 × 49 cm": "besta-burs-tv-bench-180-x-41-x-49",
+ "BESTÅ|Cabinet unit, 60 × 40 × 202 cm": "besta-cabinet-unit-60-x-40-x-202",
"BESTÅ|Frame, 120 × 40 × 64 cm": "besta-frame-120-x-40-x-64",
"BESTÅ|Frame, 60 × 20 × 64 cm": "besta-frame-60-x-20-x-64",
"BESTÅ|Frame, 60 × 40 × 192 cm": "besta-frame-60-x-40-x-192",
@@ -145,6 +147,7 @@
"BILLY|Bookcase w hght ext ut/pnl/glss drs, 80 × 30 × 237 cm": "billy-bookcase-w-hght-ext-ut-pnl-glss-drs-80-x-3",
"BILLY|Bookcase with drawer, 80 × 30 × 106 cm": "billy-bookcase-drawer-80-x-30-x-106",
"BILLY|Bookcase with drawer, 80 × 30 × 202 cm": "billy-bookcase-drawer-80-x-30-x-202",
+ "BILLY|Bookcase with foldable table, 80 × 33/112 × 106 cm": "billy-bookcase-foldable-table-80-x-33-112-x-106",
"BILLY|Bookcase with glass doors, 80 × 30 × 202 cm": "billy-bookcase-glass-doors-80-x-30-x-202",
"BILLY|Bookcase, 120 × 28 × 237 cm": "billy-bookcase-120-x-28-x-237",
"BILLY|Bookcase, 160 × 28 × 202 cm": "billy-bookcase-160-x-28-x-202",
@@ -176,6 +179,7 @@
"BOASTAD|Wall shelf, 121.5 × 32 × 32 cm": "boastad-wall-shelf-121-5-x-32-x-32",
"BOASTAD|Wall shelf, 181 × 32 × 32 cm": "boastad-wall-shelf-181-x-32-x-32",
"BOAXEL|Shelving unit, 62 × 40 × 201 cm": "boaxel-shelving-unit-62-x-40-x-201",
+ "BOCKÖN|Hammock stand, outdoor": "bockon-hammock-stand-outdoor",
"BOLLPOJKE|Desk, 90 × 55 cm": "bollpojke-desk-90-x-55",
"BOLLSIDAN|Desk sit/stand, 120 × 70 cm": "bollsidan-desk-sit-stand-120-x-70",
"BOLLSIDAN|Laptop stand, 68 × 36 cm": "bollsidan-laptop-stand-68-x-36",
@@ -191,6 +195,7 @@
"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|Shelving unit on castors, 56 × 62 cm": "brannboll-shelving-unit-on-castors-56-x-62",
"BRÄNNBOLL|Side table on castors, 69 × 39 cm": "brannboll-side-table-on-castors-69-x-39",
"BRIMNES|Bed frame with storage, Standard Double, 135 × 190 cm": "brimnes-bed-frame-storage-standard-double-135-x",
"BRIMNES|Bedside table, 39 × 41 × 53 cm": "brimnes-bedside-table-39-x-41-x-53",
@@ -199,6 +204,7 @@
"BRIMNES|Day-bed frame with 2 drawers, 80 × 200 cm": "brimnes-day-bed-frame-2-drawers-80-x-200",
"BRIMNES|Day-bed w 2 drawers/2 mattresses, 80 × 200 cm": "brimnes-day-bed-w-2-drawers-2-mattresses-80-x-20",
"BRIMNES|Dressing table, 70 × 42 cm": "brimnes-dressing-table-70-x-42",
+ "BRIMNES|Headboard with storage compartment, Queen, 152 × 203 cm": "brimnes-headboard-storage-compartment-queen-152",
"BRIMNES|TV bench, 180 × 41 × 53 cm": "brimnes-tv-bench-180-x-41-x-53",
"BRIMNES|TV bench, 216 × 41 × 54 cm": "brimnes-tv-bench-216-x-41-x-54",
"BROR|Cabinet with 2 doors, 76 × 40 × 66 cm": "bror-cabinet-2-doors-76-x-40-x-66",
@@ -257,6 +263,7 @@
"EKET|Wall cb with 2 doors, 70 × 35 × 70 cm": "eket-wall-cb-2-doors-70-x-35-x-70",
"EKET|Wall-mounted shelving unit, 35 × 25 × 35 cm": "eket-wall-mounted-shelving-unit-35-x-25-x-35",
"EKET|Wall-mounted shelving unit, 35 × 35 × 35 cm": "eket-wall-mounted-shelving-unit-35-x-35-x-35",
+ "EKET|Wall-mounted shelving unit, 70 × 35 × 70 cm": "eket-wall-mounted-shelving-unit-70-x-35-x-70",
"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",
@@ -356,14 +363,18 @@
"FLINSHULT|Armchair": "flinshult-armchair",
"FLINTAN|Office chair": "flintan-office-chair",
"FLINTAN|Office chair with armrests": "flintan-office-chair-armrests",
+ "FLISAT|Children's bench": "flisat-children-s-bench",
+ "FLISAT|Children's desk": "flisat-children-s-desk",
"FLISAT|Children's stool": "flisat-children-s-stool",
"FLISAT|Children's table, 83 × 58 cm": "flisat-children-s-table-83-x-58",
"FLISAT|Open storage, 88 × 38 × 117 cm": "flisat-open-storage-88-x-38-x-117",
+ "FLISAT|Wall storage, 70 × 9 × 16 cm": "flisat-wall-storage-70-x-9-x-16",
"FÖRHÖJA|Kitchen trolley, 100 × 43 cm": "forhoja-kitchen-trolley-100-x-43",
"FÖRLUNDA|Pouffe": "forlunda-pouffe",
"FÖRSÄLJARE|Sideboard, 140 × 46 × 78 cm": "forsaljare-sideboard-140-x-46-x-78",
"FÖRSIKTIG|Children's stool": "forsiktig-children-s-stool",
"FRANKLIN|Bar stool with backrest, foldable, 63 cm": "franklin-bar-stool-backrest-foldable-63",
+ "FREDDE|Gaming desk, 140/185 × 74 × 146 cm": "fredde-gaming-desk-140-185-x-74-x-146",
"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",
@@ -401,6 +412,7 @@
"GLADSTAD|Upholstered bed, 2 storage boxes, Standard Double, 135 × 190 cm": "gladstad-upholstered-bed-2-storage-boxes-standar",
"GLADSTAD|Upholstered bed, 2 storage boxes, Twin, 97 × 191 cm": "gladstad-upholstered-bed-2-storage-boxes-twin-97",
"GLADSTAD|Upholstered bed, 4 storage boxes, Standard Double, 135 × 190 cm": "gladstad-upholstered-bed-4-storage-boxes-standar",
+ "GLAMBERGET|Extendable bed with storage": "glamberget-extendable-bed-storage",
"GLAMBERGET|Room divider, 150 × 150 cm": "glamberget-room-divider-150-x-150",
"GLAMBERGET|Wardrobe with 3 sliding doors, 117 × 63 × 150 cm": "glamberget-wardrobe-3-sliding-doors-117-x-63-x-1",
"GLENN|Bar stool, 66 cm": "glenn-bar-stool-66",
@@ -417,6 +429,7 @@
"GRÅFJÄLLET|Room divider, 150 × 175 cm": "grafjallet-room-divider-150-x-175",
"GRÅFJÄLLET|Wall-mounted bedside table, 42 × 29 × 31 cm": "grafjallet-wall-mounted-bedside-table-42-x-29-x",
"GREÅKER|Cabinet with drawers, 84 × 101 cm": "greaker-cabinet-drawers-84-x-101",
+ "GREJIG|Shoe rack, 58 × 27 × 17 cm": "grejig-shoe-rack-58-x-27-x-17",
"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",
@@ -438,6 +451,8 @@
"GRUNNARP|3-seat sofa-bed": "grunnarp-3-seat-sofa-bed",
"GRYSNA|Upholstered bed frame, 90 × 200 cm": "grysna-upholstered-bed-frame-90-x-200",
"GRYSNA|Upholstered bed frame, Twin, 97 × 191 cm": "grysna-upholstered-bed-frame-twin-97-x-191",
+ "GRYTERYD|Recliner rocker armchair": "gryteryd-recliner-rocker-armchair",
+ "GULLABERG|Add-on unit, 110 × 31 × 12 cm": "gullaberg-add-on-unit-110-x-31-x-12",
"GULLABERG|Bed frame with 2 storage boxes, Standard Double, 135 × 190 cm": "gullaberg-bed-frame-2-storage-boxes-standard-dou",
"GULLABERG|Bed frame with 2 storage boxes, Standard Single, 90 × 190 cm": "gullaberg-bed-frame-2-storage-boxes-standard-sin",
"GULLABERG|Bed frame with 2 storage boxes, Twin, 97 × 191 cm": "gullaberg-bed-frame-2-storage-boxes-twin-97-x-19",
@@ -451,6 +466,7 @@
"GULLABERG|Chest of 8 drawers, 168 × 48 × 100 cm": "gullaberg-chest-8-drawers-168-x-48-x-100",
"GULLABERG|Desk, 120 × 65 × 75 cm": "gullaberg-desk-120-x-65-x-75",
"GULLABERG|Desk, 155 × 65 × 75 cm": "gullaberg-desk-155-x-65-x-75",
+ "GULLABERG|Gateleg desk, 84 × 41/91 × 85 cm": "gullaberg-gateleg-desk-84-x-41-91-x-85",
"GULLABERG|Shoe cabinet with 2 compartments, 88 × 30 × 122 cm": "gullaberg-shoe-cabinet-2-compartments-88-x-30-x",
"GULLABERG|Shoe cabinet with 4 compartments, 105 × 22 × 107 cm": "gullaberg-shoe-cabinet-4-compartments-105-x-22-x",
"GULLABERG|Storage bench, 148 × 43 × 52 cm": "gullaberg-storage-bench-148-x-43-x-52",
@@ -474,6 +490,7 @@
"HAGAÅN|Open cabinet, 45.5 × 53.5 × 33.5 cm": "hagaan-open-cabinet-45-5-x-53-5-x-33-5",
"HAGAÅN|Wall open cabinet, 40 × 15 × 95 cm": "hagaan-wall-open-cabinet-40-x-15-x-95",
"HAGAÅN|Wall open cabinet, 45.5 × 15 × 94 cm": "hagaan-wall-open-cabinet-45-5-x-15-x-94",
+ "HÄGERNÄS|Chair": "hagernas-chair",
"HÄGERNÄS|Stool": "hagernas-stool",
"HÅKANSKÄR|Coffee table, 80 × 64 cm": "hakanskar-coffee-table-80-x-64",
"HAMMARN|Sofa-bed": "hammarn-sofa-bed",
@@ -489,6 +506,7 @@
"HAUGA|Drop-leaf table, 55/82/109 × 74 cm": "hauga-drop-leaf-table-55-82-109-x-74",
"HAUGA|Glass-door cabinet, 105 × 116 cm": "hauga-glass-door-cabinet-105-x-116",
"HAUGA|Sideboard, 140 × 46 × 84 cm": "hauga-sideboard-140-x-46-x-84",
+ "HAUGA|Stool": "hauga-stool",
"HAUGA|Table, 118 × 74 cm": "hauga-table-118-x-74",
"HAUGA|Table, 168 × 74 cm": "hauga-table-168-x-74",
"HAUGA|Table, 74 × 74 cm": "hauga-table-74-x-74",
@@ -569,6 +587,7 @@
"HOLMSTA|Armchair": "holmsta-armchair",
"HOLMSUND|Sleeper sectional, 3-seat": "holmsund-sleeper-sectional-3-seat",
"HORNAVAN|Trolley, 26 × 48 × 77 cm": "hornavan-trolley-26-x-48-x-77",
+ "HUSBYÅN|Wall cabinet, 28 × 11 × 37.5 cm": "husbyan-wall-cabinet-28-x-11-x-37-5",
"HUVUDSPELARE|Gaming chair": "huvudspelare-gaming-chair",
"HUVUDSPELARE|Gaming desk, 140 × 80 cm": "huvudspelare-gaming-desk-140-x-80",
"HYLLIS|Shelving unit, 60 × 27 × 74 cm": "hyllis-shelving-unit-60-x-27-x-74",
@@ -598,7 +617,9 @@
"IDANÄS|Upholstered bed frame, Twin, 97 × 191 cm": "idanas-upholstered-bed-frame-twin-97-x-191",
"IDANÄS|Upholstered ottoman bed, Standard King, 150 × 200 cm": "idanas-upholstered-ottoman-bed-standard-king-150",
"IDANÄS|Upholstered storage bed, Standard King, 150 × 200 cm": "idanas-upholstered-storage-bed-standard-king-150",
+ "IDÅSEN|Cabinet with sliding glass doors, 120 × 140 cm": "idasen-cabinet-sliding-glass-doors-120-x-140",
"IDÅSEN|Drawer unit on castors, 42 × 61 cm": "idasen-drawer-unit-on-castors-42-x-61",
+ "IDÅSEN|Underframe sit/stand f table tp, el, 146 × 70 cm": "idasen-underframe-sit-stand-f-table-tp-el-146-x",
"IKEA PS 2026|3-seat sofa-bed": "ikea-ps-2026-3-seat-sofa-bed",
"IKEA PS 2026|Bedside table, 30 × 30 × 50 cm": "ikea-ps-2026-bedside-table-30-x-30-x-50",
"IKEA PS 2026|Bench, 127 cm": "ikea-ps-2026-bench-127",
@@ -622,6 +643,8 @@
"INNDYR|Storage bench": "inndyr-storage-bench",
"INVALLNING|Trolley, 68 × 39 cm": "invallning-trolley-68-x-39",
"ISMANTORP|Armchair": "ismantorp-armchair",
+ "IVAR|1 sec/storage unit w foldable table, 89 × 30 × 179 cm": "ivar-1-sec-storage-unit-w-foldable-table-89-x-30",
+ "IVAR|2 sec/storage unit w foldable table, 134 × 95 × 179 cm": "ivar-2-sec-storage-unit-w-foldable-table-134-x-9",
"IVAR|2 sections/shelves, 134 × 30 × 179 cm": "ivar-2-sections-shelves-134-x-30-x-179",
"IVAR|2 sections/shelves, 134 × 50 × 179 cm": "ivar-2-sections-shelves-134-x-50-x-179",
"IVAR|2 sections/shelves, 134 × 50 × 226 cm": "ivar-2-sections-shelves-134-x-50-x-226",
@@ -635,6 +658,7 @@
"IVAR|Cabinet with doors, 160 × 30 × 83 cm": "ivar-cabinet-doors-160-x-30-x-83",
"IVAR|Cabinet with doors, 89 × 30 × 124 cm": "ivar-cabinet-doors-89-x-30-x-124",
"IVAR|Cabinet with sliding doors, 80 × 30 × 60 cm": "ivar-cabinet-sliding-doors-80-x-30-x-60",
+ "IVAR|Folding table, 80 × 30-91 cm": "ivar-folding-table-80-x-30-91",
"IVAR|Shelving unit with doors, 134 × 30 × 179 cm": "ivar-shelving-unit-doors-134-x-30-x-179",
"IVAR|Shelving unit with doors, 259 × 30 × 124 cm": "ivar-shelving-unit-doors-259-x-30-x-124",
"IVAR|Shelving unit with doors, 259 × 30 × 226 cm": "ivar-shelving-unit-doors-259-x-30-x-226",
@@ -697,6 +721,7 @@
"KALLAX|Shelving unit with 4 inserts, 147 × 77 cm": "kallax-shelving-unit-4-inserts-147-x-77",
"KALLAX|Shelving unit with 6 inserts, 112 × 147 cm": "kallax-shelving-unit-6-inserts-112-x-147",
"KALLAX|Shelving unit with 8 inserts, 147 × 147 cm": "kallax-shelving-unit-8-inserts-147-x-147",
+ "KALLAX|Shelving unit with doors, 77 × 77 cm": "kallax-shelving-unit-doors-77-x-77",
"KALLAX|Shelving unit with underframe, 147 × 129 cm": "kallax-shelving-unit-underframe-147-x-129",
"KALLAX|Shelving unit with underframe, 147 × 164 cm": "kallax-shelving-unit-underframe-147-x-164",
"KALLAX|Shelving unit with underframe, 147 × 59 cm": "kallax-shelving-unit-underframe-147-x-59",
@@ -708,6 +733,8 @@
"KALLAX|Shelving unit, 42 × 41 cm": "kallax-shelving-unit-42-x-41",
"KALLAX|Shelving unit, 77 × 112 cm": "kallax-shelving-unit-77-x-112",
"KALLAX|Shelving unit, 77 × 41 cm": "kallax-shelving-unit-77-x-41",
+ "KALLAX|Tv bench with underframe, 147 × 39 × 78 cm": "kallax-tv-bench-underframe-147-x-39-x-78",
+ "KALLAX|TV bench, 147 × 60 cm": "kallax-tv-bench-147-x-60",
"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",
@@ -743,6 +770,7 @@
"KLEPPSTAD|Wardrobe with sliding doors, 117 × 55 × 176 cm": "kleppstad-wardrobe-sliding-doors-117-x-55-x-176",
"KLIPPUGGLA|Bed frame with storage, 90 × 200 cm": "klippuggla-bed-frame-storage-90-x-200",
"KLIPPUGGLA|Bed frame with storage, Twin, 97 × 191 cm": "klippuggla-bed-frame-storage-twin-97-x-191",
+ "KLÖVEN|Deck chair, outdoor": "kloven-deck-chair-outdoor",
"KNARREVIK|Bedside table, 37 × 28 × 45 cm": "knarrevik-bedside-table-37-x-28-x-45",
"KNOXHULT|Corner base cabinet, 100 × 91 cm": "knoxhult-corner-base-cabinet-100-x-91",
"KNOXHULT|High cabinet with door, 60 × 31 × 153 cm": "knoxhult-high-cabinet-door-60-x-31-x-153",
@@ -774,6 +802,7 @@
"KUNGSFORS|Kitchen trolley, 60 × 40 cm": "kungsfors-kitchen-trolley-60-x-40",
"KURA|Reversible bed, 90 × 200 cm": "kura-reversible-bed-90-x-200",
"KURA|Reversible bed, Twin, 97 × 191 cm": "kura-reversible-bed-twin-97-x-191",
+ "KVISTBRO|Storage table, 44 cm": "kvistbro-storage-table-44",
"LACK|Console table, 140 × 39 cm": "lack-console-table-140-x-39",
"LACK|Side table, 35 × 35 cm": "lack-side-table-35-x-35",
"LACK|TV bench, 120 × 35 × 36 cm": "lack-tv-bench-120-x-35-x-36",
@@ -819,7 +848,9 @@
"LÅNGARYD|Sofa": "langaryd-sofa",
"LÅNGARYD|Sofa w chaise, left": "langaryd-sofa-w-chaise-left",
"LÅNGARYD|Sofa w chaise, right": "langaryd-sofa-w-chaise-right",
+ "LÄNGDHOPP|Pull-out desk, 90 × 39/71 cm": "langdhopp-pull-out-desk-90-x-39-71",
"LÅNGFJÄLL|Conference chair": "langfjall-conference-chair",
+ "LÄRANDE|Desk with pull-out storage unit, 120 × 58 cm": "larande-desk-pull-out-storage-unit-120-x-58",
"LASTARE|Bench, 90 × 42 × 48 cm": "lastare-bench-90-x-42-x-48",
"LASTARE|Chest of 4 drawers, 80 × 42 × 100 cm": "lastare-chest-4-drawers-80-x-42-x-100",
"LASTARE|Frame with doors, 60 × 42 × 100 cm": "lastare-frame-doors-60-x-42-x-100",
@@ -831,6 +862,7 @@
"LASTARE|Wall mounted frame with doors, 60 × 32 × 60 cm": "lastare-wall-mounted-frame-doors-60-x-32-x-60",
"LEDAMOT|Cabinet, 150 × 42 × 75 cm": "ledamot-cabinet-150-x-42-x-75",
"LENNART|Drawer unit": "lennart-drawer-unit",
+ "LERHOLMEN|Picnic table": "lerholmen-picnic-table",
"LILLÅNÄS|Bar stool, 63 cm": "lillanas-bar-stool-63",
"LILLÅNÄS|Chair": "lillanas-chair",
"LILLBERGET|Chest of 3 drawers, 70 × 43 × 68 cm": "lillberget-chest-3-drawers-70-x-43-x-68",
@@ -1167,8 +1199,10 @@
"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",
+ "NORBERG|Wall-mounted drop-leaf table, 74 × 60 cm": "norberg-wall-mounted-drop-leaf-table-74-x-60",
"NORDKISA|Bedside table, 40 × 40 cm": "nordkisa-bedside-table-40-x-40",
"NORDKISA|Dressing table, 76 × 47 cm": "nordkisa-dressing-table-76-x-47",
+ "NORDKISA|Open wardrobe with sliding door, 120 × 186 cm": "nordkisa-open-wardrobe-sliding-door-120-x-186",
"NORDKROKEN|Rocking and swivel armchair": "nordkroken-rocking-and-swivel-armchair",
"NORDLI|Bed frame with storage, 140 × 200 cm": "nordli-bed-frame-storage-140-x-200",
"NORDLI|Bed frame with storage, Queen, 152 × 203 cm": "nordli-bed-frame-storage-queen-152-x-203",
@@ -1223,6 +1257,7 @@
"NORRMANSÖ|Table, outdoor, 220 × 100 cm": "norrmanso-table-outdoor-220-x-100",
"NORRMJÖLE|Table, 105 cm": "norrmjole-table-105",
"NORRMJÖLE|Table, 170 × 97 cm": "norrmjole-table-170-x-97",
+ "NORRUDDEN|Guest bed, 80 × 193 cm": "norrudden-guest-bed-80-x-193",
"NYHAMN|3-seat sofa-bed": "nyhamn-3-seat-sofa-bed",
"NYSJÖN / BJÖRKÅN|Wash-basin base cabinet w 2 doors, 54 × 40 × 80 cm": "nysjon-bjorkan-wash-basin-base-cabinet-w-2-doors",
"NYSJÖN / BJÖRKÅN|Wash-stnd w door/wash-basin/tap, 54 × 40 × 88 cm": "nysjon-bjorkan-wash-stnd-w-door-wash-basin-tap-5",
@@ -1346,6 +1381,7 @@
"PINNTORP|Table, 85 cm": "pinntorp-table-85",
"PIPLÄRKA|Desk, 80 × 63 cm": "piplarka-desk-80-x-63",
"PLATSA|Bedside table, 60 × 42 × 83 cm": "platsa-bedside-table-60-x-42-x-83",
+ "PLATSA|Cabinet with 5 doors, 180 × 42 × 103 cm": "platsa-cabinet-5-doors-180-x-42-x-103",
"PLATSA|Chest of 2 drawers, 60 × 57 × 53 cm": "platsa-chest-2-drawers-60-x-57-x-53",
"PLATSA|Frame, 60 × 55 × 120 cm": "platsa-frame-60-x-55-x-120",
"PLATSA|Frame, 60 × 55 × 180 cm": "platsa-frame-60-x-55-x-180",
@@ -1357,6 +1393,7 @@
"PLATSA|Open shelving unit, 60 × 40 × 40 cm": "platsa-open-shelving-unit-60-x-40-x-40",
"PLATSA|Open shoe storage unit, 80 × 40 × 60 cm": "platsa-open-shoe-storage-unit-80-x-40-x-60",
"PLATSA|Shoe cabinet/storage, 120 × 42 × 123 cm": "platsa-shoe-cabinet-storage-120-x-42-x-123",
+ "PLATSA|Storage bench, 120 × 57 × 63 cm": "platsa-storage-bench-120-x-57-x-63",
"PLATSA|Wardrobe w 6 doors, 180 × 57 × 241 cm": "platsa-wardrobe-w-6-doors-180-x-57-x-241",
"PLATSA|Wardrobe w 6 doors, 240 × 57 × 221 cm": "platsa-wardrobe-w-6-doors-240-x-57-x-221",
"PLATSA|Wardrobe w 6 doors, 240 × 57 × 231 cm": "platsa-wardrobe-w-6-doors-240-x-57-x-231",
@@ -1384,6 +1421,7 @@
"RÅDMANSÖ|Wardrobe, 118 × 64 × 190 cm": "radmanso-wardrobe-118-x-64-x-190",
"RAGGBERG|Bench with shoe storage, 60 × 35 × 45 cm": "raggberg-bench-shoe-storage-60-x-35-x-45",
"RÅGRUND|Bench, 78 × 37 cm": "ragrund-bench-78-x-37",
+ "RÅGRUND|Shelving unit, 33 cm": "ragrund-shelving-unit-33",
"RÅGRUND|Shelving unit, 37 × 37 × 104 cm": "ragrund-shelving-unit-37-x-37-x-104",
"RÅGRUND|Trolley, 42 × 33 × 76 cm": "ragrund-trolley-42-x-33-x-76",
"RAKKESTAD|Wardrobe with 3 doors, 117 × 176 cm": "rakkestad-wardrobe-3-doors-117-x-176",
@@ -1407,6 +1445,8 @@
"RELATERA|Desk, 117 × 60 cm": "relatera-desk-117-x-60",
"RELATERA|Desk, 90 × 60 cm": "relatera-desk-90-x-60",
"RENBERGET|Swivel chair": "renberget-swivel-chair",
+ "RESARÖ|Mobile drop-leaf table w storage": "resaro-mobile-drop-leaf-table-w-storage",
+ "RESÖ|Children's picnic table": "reso-children-s-picnic-table",
"RIAN|Side table, 50 × 30 cm": "rian-side-table-50-x-30",
"RIDSPÖ|Desk, 140 × 70 cm": "ridspo-desk-140-x-70",
"RIGGA|Clothes rack": "rigga-clothes-rack",
@@ -1430,6 +1470,7 @@
"ROSENTORP|Swivel chair": "rosentorp-swivel-chair",
"RUDSTA|Glass-door cabinet, 42 × 37 × 155 cm": "rudsta-glass-door-cabinet-42-x-37-x-155",
"RUDSTA|Glass-door cabinet, 80 × 37 × 120 cm": "rudsta-glass-door-cabinet-80-x-37-x-120",
+ "RULLEBÖR|Trolley": "rullebor-trolley",
"SAGESUND|Upholstered bed frame, King, 193 × 203 cm": "sagesund-upholstered-bed-frame-king-193-x-203",
"SAGESUND|Upholstered bed frame, Standard Double, 135 × 190 cm": "sagesund-upholstered-bed-frame-standard-double-1",
"SÅGMÄSTARE|Cabinet, 83 × 36 × 128 cm": "sagmastare-cabinet-83-x-36-x-128",
@@ -1450,6 +1491,7 @@
"SANDKATT|Highchair with tray": "sandkatt-highchair-tray",
"SANDSBERG|Chair": "sandsberg-chair",
"SEGERÖN|2-seat sofa, outdoor": "segeron-2-seat-sofa-outdoor",
+ "SEGERÖN|Bar stool, outdoor": "segeron-bar-stool-outdoor",
"SEGERÖN|Chair with armrests, outdoor": "segeron-chair-armrests-outdoor",
"SEGERÖN|Coffee table, outdoor, 73 × 73 cm": "segeron-coffee-table-outdoor-73-x-73",
"SEGERÖN|Corner section with cushion": "segeron-corner-section-cushion",
@@ -1538,6 +1580,7 @@
"SLÄKT|Bed frame with storage, Twin, 97 × 191 cm": "slakt-bed-frame-storage-twin-97-x-191",
"SLÄKT|Bed frame, 90 × 200 cm": "slakt-bed-frame-90-x-200",
"SLÄKT|Ext bed frame with slatted bed base, 97 × 190 cm": "slakt-ext-bed-frame-slatted-bed-base-97-x-190",
+ "SLÄKT|Underbed with storage, 90 × 200 cm": "slakt-underbed-storage-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",
@@ -1553,6 +1596,7 @@
"SMÅGÖRA|Shelf unit, 29 × 88 cm": "smagora-shelf-unit-29-x-88",
"SMÅGÖRA|Wardrobe, 80 × 50 × 187 cm": "smagora-wardrobe-80-x-50-x-187",
"SMÄLLEN|Swivel chair": "smallen-swivel-chair",
+ "SMÅSKRAKE|Multi-functional child chair/table": "smaskrake-multi-functional-child-chair-table",
"SMÅSTAD / PLATSA|Bookcase, 60 × 57 × 123 cm": "smastad-platsa-bookcase-60-x-57-x-123",
"SMÅSTAD / PLATSA|Bookcase, 60 × 57 × 181 cm": "smastad-platsa-bookcase-60-x-57-x-181",
"SMÅSTAD / PLATSA|Cabinet, 60 × 57 × 63 cm": "smastad-platsa-cabinet-60-x-57-x-63",
@@ -1571,6 +1615,7 @@
"SMÅSTAD|Bench, 90 × 50 × 48 cm": "smastad-bench-90-x-50-x-48",
"SMÅSTAD|Changing table/desk, 90 × 79 × 100 cm": "smastad-changing-table-desk-90-x-79-x-100",
"SMÅSTAD|Desk, 90 × 79 × 100 cm": "smastad-desk-90-x-79-x-100",
+ "SMÅSTAD|Loft bed, Twin, 97 × 191 cm": "smastad-loft-bed-twin-97-x-191",
"SMÅSTAD|Wall cabinet, 60 × 32 × 60 cm": "smastad-wall-cabinet-60-x-32-x-60",
"SMÅSTAD|Wall storage, 60 × 30 × 60 cm": "smastad-wall-storage-60-x-30-x-60",
"SMÅSTAD|Wardrobe, 60 × 42 × 181 cm": "smastad-wardrobe-60-x-42-x-181",
@@ -1592,6 +1637,7 @@
"SÖDERHAMN|3-seat section": "soderhamn-3-seat-section",
"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|Armchair": "soderhamn-armchair",
"SÖDERHAMN|Corner section": "soderhamn-corner-section",
"SÖDERHAMN|Corner sofa-bed, 6-seat": "soderhamn-corner-sofa-bed-6-seat",
"SÖDERHAMN|Corner sofa, 4-seat": "soderhamn-corner-sofa-4-seat",
@@ -1639,9 +1685,11 @@
"STOCKHOLM 2025|Sideboard, 161 × 42 × 83 cm": "stockholm-2025-sideboard-161-x-42-x-83",
"STOCKHOLM 2025|Table, 115 cm": "stockholm-2025-table-115",
"STOCKHOLM 2025|Table, 230 × 90 cm": "stockholm-2025-table-230-x-90",
+ "STOCKHOLM 2025|TV bench with sliding doors, 179 × 42 × 56 cm": "stockholm-2025-tv-bench-sliding-doors-179-x-42-x",
"STOCKHOLM|Chair with armrests": "stockholm-chair-armrests",
"STOCKHOLM|Coffee table, 180 × 59 cm": "stockholm-coffee-table-180-x-59",
"STOCKHOLM|Three-seat sofa": "stockholm-three-seat-sofa",
+ "STOMSÖ|Wall-mounted bedside table, 36 × 29 × 20 cm": "stomso-wall-mounted-bedside-table-36-x-29-x-20",
"STORÅ|Loft bed frame, Full/Double, 137 × 191 cm": "stora-loft-bed-frame-full-double-137-x-191",
"STOREDAMM|Bench, 63 × 31 cm": "storedamm-bench-63-x-31",
"STOREDAMM|Shelf unit, 60 × 71 cm": "storedamm-shelf-unit-60-x-71",
@@ -1723,6 +1771,7 @@
"TÄRNKULLEN|Upholstered bed frame, Queen, 152 × 203 cm": "tarnkullen-upholstered-bed-frame-queen-152-x-203",
"TÄRNKULLEN|Upholstered bed frame, Standard Double, 135 × 190 cm": "tarnkullen-upholstered-bed-frame-standard-double",
"TÄRNKULLEN|Upholstered bed frame, Twin, 97 × 191 cm": "tarnkullen-upholstered-bed-frame-twin-97-x-191",
+ "TÄRNÖ|Bench, outdoor": "tarno-bench-outdoor",
"TÄRNÖ|Chair, outdoor": "tarno-chair-outdoor",
"TÄRNÖ|Stool, 30 × 42 cm": "tarno-stool-30-x-42",
"TÄRNÖ|Stool, outdoor": "tarno-stool-outdoor",
@@ -1740,11 +1789,13 @@
"TEGELÖN|Chair, in/outdoor": "tegelon-chair-in-outdoor",
"TEGELÖN|Table, outdoor, 216 × 86 cm": "tegelon-table-outdoor-216-x-86",
"TINGBY|Side table on castors, 50 × 50 cm": "tingby-side-table-on-castors-50-x-50",
+ "TITTEBO|Roll-front cabinet, 61 cm": "tittebo-roll-front-cabinet-61",
"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|Bedside table, 52 cm": "tolkning-bedside-table-52",
"TOLKNING|Bench with storage, 120 cm": "tolkning-bench-storage-120",
"TOLKNING|Pouf with storage": "tolkning-pouf-storage",
"TOLKNING|Room divider, 150 × 170 cm": "tolkning-room-divider-150-x-170",
@@ -1819,6 +1870,7 @@
"TROFAST|Frame, 99 × 44 × 56 cm": "trofast-frame-99-x-44-x-56",
"TROFAST|Wall storage, 93 × 30 cm": "trofast-wall-storage-93-x-30",
"TROFAST|Wall storage, 99 × 30 cm": "trofast-wall-storage-99-x-30",
+ "TROGEN|Children's step stool, 40 × 38 × 33 cm": "trogen-children-s-step-stool-40-x-38-x-33",
"TROTTEN|Cabinet with doors, 70 × 35 × 110 cm": "trotten-cabinet-doors-70-x-35-x-110",
"TROTTEN|Cabinet with doors, 70 × 35 × 173 cm": "trotten-cabinet-doors-70-x-35-x-173",
"TROTTEN|Cabinet with sliding doors, 80 × 55 × 110 cm": "trotten-cabinet-sliding-doors-80-x-55-x-110",
@@ -1884,11 +1936,13 @@
"VÄSMAN|Chair with armrests, outdoor": "vasman-chair-armrests-outdoor",
"VÄSMAN|Extendable table, outdoor, 135/190 × 74 cm": "vasman-extendable-table-outdoor-135-190-x-74",
"VASSHOLMEN|Chair, in/outdoor": "vassholmen-chair-in-outdoor",
+ "VASSKÄR|Shoe rack, 60 cm": "vasskar-shoe-rack-60",
"VATTENKAR|Desktop shelf, 49 × 15 cm": "vattenkar-desktop-shelf-49-x-15",
"VATTENKAR|Laptop/monitor stand, 52 × 26 cm": "vattenkar-laptop-monitor-stand-52-x-26",
"VEDBO|Armchair": "vedbo-armchair",
"VEDBO|High-back armchair": "vedbo-high-back-armchair",
"VEINGE|Easy chair": "veinge-easy-chair",
+ "VENNGARN|1.5-seat armchair": "venngarn-1-5-seat-armchair",
"VENNGARN|Loveseat": "venngarn-loveseat",
"VENNGARN|Sofa": "venngarn-sofa",
"VESKEN|Shelf unit, 37 × 23 × 101 cm": "vesken-shelf-unit-37-x-23-x-101",
@@ -1970,6 +2024,7 @@
"VINGSÖN|Wing chair, in/outdoor": "vingson-wing-chair-in-outdoor",
"VINLIDEN|Sofa with chaise": "vinliden-sofa-chaise",
"VISINGSÖ|Chair with armrests": "visingso-chair-armrests",
+ "VISINGSÖ|Plant stand, 74 cm": "visingso-plant-stand-74",
"VISINGSÖ|Table, 70 × 70 cm": "visingso-table-70-x-70",
"VISKAFORS|1,5-seat armchair": "viskafors-1-5-seat-armchair",
"VISKAFORS|2-seat sofa": "viskafors-2-seat-sofa",
@@ -1996,16 +2051,21 @@
"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, 187 cm": "vittskar-table-187",
"VITTSKÄR|Table, 264 × 96 cm": "vittskar-table-264-x-96",
+ "VITVAL|Bunk bed frame with underbed, 90 × 200 cm": "vitval-bunk-bed-frame-underbed-90-x-200",
"VITVAL|Bunk bed frame, 90 × 200 cm": "vitval-bunk-bed-frame-90-x-200",
"VITVAL|Bunk bed frame, Twin, 97 × 191 cm": "vitval-bunk-bed-frame-twin-97-x-191",
"VITVAL|Loft bed frame, 90 × 200 cm": "vitval-loft-bed-frame-90-x-200",
"VITVAL|Loft bed frame, Twin, 97 × 191 cm": "vitval-loft-bed-frame-twin-97-x-191",
+ "VITVAL|Underbed, 90 × 200 cm": "vitval-underbed-90-x-200",
"VOXLÖV|Chair": "voxlov-chair",
"VOXLÖV|Dining table, 180 × 90 cm": "voxlov-dining-table-180-x-90",
"VRETSTORP|3-seat sofa-bed": "vretstorp-3-seat-sofa-bed",
"VUKU|Wardrobe, 74 × 51 × 149 cm": "vuku-wardrobe-74-x-51-x-149",
"YNGVAR|Bar stool, 75 cm": "yngvar-bar-stool-75",
"YNGVAR|Chair": "yngvar-chair",
- "YXSTABY|Gaming monitor stand, 98 × 27 × 16 cm": "yxstaby-gaming-monitor-stand-98-x-27-x-16"
+ "YXSTABY|Gaming monitor stand, 98 × 27 × 16 cm": "yxstaby-gaming-monitor-stand-98-x-27-x-16",
+ "YXSTABY|Gaming side table on castors": "yxstaby-gaming-side-table-on-castors",
+ "YXSTABY|Gaming thumbstick stool": "yxstaby-gaming-thumbstick-stool"
}
diff --git a/src/data/fixes.ts b/src/data/fixes.ts
index 79fe181..aa107eb 100644
--- a/src/data/fixes.ts
+++ b/src/data/fixes.ts
@@ -117,6 +117,15 @@ export const FIXES: Record<string, Fix> = {
"alseda-stool": { size: [60, 18, 60] },
"forsiktig-children-s-stool": { size: [37, 13, 24] },
"sundvik-changing-table-chest-drawers-78-x-79-x-9": { size: [78, 99, 79] },
+ "bergmund-bar-stool-backrest-62": { size: [45, 97, 48] },
+ "langdhopp-pull-out-desk-90-x-39-71": { size: [90, 87, 39] },
+ "tittebo-roll-front-cabinet-61": { size: [61, 72, 30] },
+ "vitval-underbed-90-x-200": { size: [197, 20, 90] },
+ "yxstaby-gaming-thumbstick-stool": { size: [37.5, 44, 37.5] },
+ "ivar-2-sec-storage-unit-w-foldable-table-134-x-9": { size: [134, 179, 30] },
+ "smastad-loft-bed-twin-97-x-191": { size: [197, 182, 114] },
+ "resaro-mobile-drop-leaf-table-w-storage": { size: [123, 91, 64] },
+ "billy-bookcase-foldable-table-80-x-33-112-x-106": { size: [80, 106, 112] }, // drawn with the table open
"bolmen-step-stool": { size: [44, 25, 35] },
"sigfinn-monitor-stand-fixed-height": { size: [53, 10, 24] },
"smagora-changing-table-bookshelf-60-x-81-x-103": { size: [60, 103, 81] },
@@ -145,6 +154,7 @@ export const SAME: Record<string, string> = {
"tarva-chest-6-drawers": "tarva-6-drawer-dresser-151-x-92",
"tarva-nightstand": "tarva-nightstand-48-x-39-x-62",
"havsta-sideboard-100-x-89": "havsta-sideboard-basic-unit-121-x-47-x-89",
+ "eket-wall-mounted-shelving-unit-70-x-35-x-70": "eket-wall-cb-2-doors-70-x-35-x-70",
"brimnes-cabinet-doors-39-x-95": "brimnes-cabinet-doors-78-x-95",
"hemnes-glass-door-cabinet-90-x-197": "hemnes-glass-door-cabinet-3-drawers-90-x-197",
};
diff --git a/src/data/ikea-guard.ts b/src/data/ikea-guard.ts
index 488dd52..edc32ce 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 ananas angskorn arsjon asphult aspinge bagganas basingen bastisar bengta blanda blaser boholmen bolmso borrby branas brogrund brunsta bullig burfjord byholma center cissan dalskar duvholmen eklatera ekorre fagelon falskar farvik fiskbo florsjon forneby forsa forvaltare fossta frakta fridfull frihult frojda froslunda froson fyllen gamman gansjon gatebo gillstad godis gresla gronmes groryd grossjon grusnarv grytas gryteryd gubbarp hackas hallnas hallspar halved hammaron hamnskar hanga hassjon havsdun havsen havskal havsmal hejsta hektar helgeo 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 ledsjo len lenast lersta lill lilla lillabo lillhult lindasen loge lohals lova lyckad macksjon majsjon mala maleras manalg martorp melodi molnas moppa morkulla navlinge nereby nissedal nogsta norafors norden nydala opparyd ordning orskar piggal pinnarp pipranka plats plockar rahult ramsas ramsta ranarp ransberg revskar ringsta risnas rissla rockan runnen runskar saljen sandmott seglaro sindal sindvik skalryta skarig skedstor skogsa skogskorn skogsnas skogsror skorva smaata smalom smarra smaska smycka snorpa sonhult spantad sparka stelna stensta stensund stjarnhov storslinga strala strandad svalka svallet svansele svartho svartra sy tackan tacknan tallsparv tarnestad tasjon terrsjo tisken tittebo tokabo tolken torared torkad tossig trogen troskning tvarfot tysnes uddarp undvika upplaga upplid uppvind vagdal vagomrade vagsjon vallasan vasskar vathult vattentat vedbak veddinge vedhamn vemund viggbo vilsta vindas voxtorp vresjon";
+export const IKEA_GUARD = "abrotten afjall alsken ananas angskorn arende arsjon asphult aspinge bagganas basingen bastisar bengta blanda blaser boholmen bolmso borrby branas brogrund brunsta bullig burfjord byholma center cissan dalskar duvholmen eklatera ekorre elloven fagelon falskar farvik fiskbo florsjon forneby forsa forvaltare fossta frakta fridfull frihult frojda froslunda froson fyllen gamman gansjon gatebo gillstad godis gresla gronmes groryd grossjon grusnarv grytas gubbarp hackas hallnas hallspar halved hammaron hamnskar hanga hassjon havsdun havsen havskal havsmal hejsta hektar helgeo hogvind holmared holmeja horred hultarp hutten ikeaps2002 ikeaps2014 ikeaps2017 isjakt jagmastare jallby jattestor kalken kallarp kallboda kallror kallsjon kallsup kasker klamtare klipplax klosan kloving knalla knixhult knoppang kolsjon konstruera kroksjon kvalmso kvittera ladmakare larkar latsas ledsjo len lenast lersta lill lilla lillabo lillhult lindasen loge lohals lova lyckad macksjon majsjon mala maleras manalg martorp melodi molnas moppa morkulla navlinge nereby nissedal nogsta norafors norden nydala opparyd ordning orskar piggal pinnarp pipranka plats plockar rahult ramsas ramsta ranarp ransberg reko rensare revskar ringsta risnas rissla rockan rullbo runnen runskar saljen sandmott seglaro sindal sindvik skalryta skarande skarig skedstor skogsa skogskorn skogsnas skogsror skorva smaata smalom smarra smaska smycka snorpa sonhult spantad sparka stelna stensta stensund stjarnhov storslinga strala strandad svalka svallet svansele svartho svartra sy tackan tacknan tallsparv tarnestad tasjon terrsjo tisken tokabo tolken torared torkad tossig totebo troskning tvarfot tysnes uddarp undvika upplaga upplid uppvind vagdal vagomrade vagsjon vallasan vathult vattentat vedbak veddinge vedhamn vemund viggbo vilsta vindas voxtorp vresjon";
diff --git a/src/data/ikea-items.ts b/src/data/ikea-items.ts
index 610bb01..9f2c0b8 100644
--- a/src/data/ikea-items.ts
+++ b/src/data/ikea-items.ts
@@ -94,10 +94,12 @@ bekant-storage-unit-on-castors-41-x-101|20591370 60591373
bekvam-kitchen-trolley-58-x-50|70240351
bekvam-step-stool|70569545 10225589 40178888 40463852
bekvam-step-stool-63|90190411 90219829
-bergmund-chair|10452001 19481589 29481598 39481593 49481601 89384617 99388083 59387740 99384570 99388078 59387735 89384311 19385979 89388069 99384693 99384706 59384685
+bergmund-bar-stool-backrest-62|59471786 39471787
+bergmund-chair|10452001 19481589 29481598 39481593 49481601 89384617 99388083 59387740 99384570 99388078 59387735 89384311 19385979 89388069
bergshyttan-bench-210-x-38|00608239 30601651
bergshyttan-table-240-x-93|40608242 50601650
besta-burs-tv-bench-180-x-41-x-49|30269129
+besta-cabinet-unit-60-x-40-x-202|39284998 59508148 59285001 69284987
besta-frame-120-x-40-x-64|50245953 10245846 90247375 60245844 40247373 70245952 60538583
besta-frame-60-x-20-x-64|80247413 00245917 80247408 60245919 20245959 60245957 90538591
besta-frame-60-x-40-x-192|00247370 00245842 30245850 60247367 40245840 20245964 90245946
@@ -132,6 +134,7 @@ billy-bookcase-80-x-28-x-237|59182201
billy-bookcase-80-x-39-x-202|90401932
billy-bookcase-drawer-80-x-30-x-106|29487840
billy-bookcase-drawer-80-x-30-x-202|39483808
+billy-bookcase-foldable-table-80-x-33-112-x-106|00579755
billy-bookcase-glass-doors-80-x-30-x-202|20323805 00594925
billy-bookcase-w-hght-ext-ut-pnl-glss-drs-80-x-3|69581505
billy-height-extension-unit-40-x-28-x-35|90263860 00508664 80477395 60477358
@@ -189,6 +192,7 @@ boastad-tv-unit-181-5-x-42-x-45|10542752
boastad-wall-shelf-121-5-x-32-x-32|50527783
boastad-wall-shelf-181-x-32-x-32|00507018
boaxel-shelving-unit-62-x-40-x-201|09590126 09392616 89590127
+bockon-hammock-stand-outdoor|10495133
bollpojke-desk-90-x-55|00591366 00604161
bollsidan-desk-sit-stand-120-x-70|90609814
bollsidan-laptop-stand-68-x-36|30574370
@@ -204,6 +208,7 @@ bondholmen-table-outdoor-235-x-90|20558196
bondskaret-hat-and-coat-stand-175|40554381
borgeby-coffee-table-70|70389356 30500355
borgeby-side-table-46|40619882 80619880
+brannboll-shelving-unit-on-castors-56-x-62|60586258
brannboll-side-table-on-castors-69-x-39|00586360
brimnes-bed-frame-storage-standard-double-135-x|29006940 09006936 49031651 09031653
brimnes-bedside-table-39-x-41-x-53|10234942
@@ -214,6 +219,7 @@ brimnes-chest-4-drawers-78-x-46-x-124|90392046
brimnes-day-bed-frame-2-drawers-80-x-200|00228705
brimnes-day-bed-w-2-drawers-2-mattresses-80-x-20|59521159 09521152 29494497 59497338
brimnes-dressing-table-70-x-42|70290459
+brimnes-headboard-storage-compartment-queen-152|90269169 30269172 10269168
brimnes-tv-bench-120-x-53|40337694 50337698
brimnes-tv-bench-180-x-41-x-53|70409873 50409874
brimnes-tv-bench-216-x-41-x-54|60593089 00593092
@@ -272,13 +278,14 @@ eket-cabinet|69602131 69336359 79533019 59336374 49602132 29602133 19336371 9034
eket-cabinet-2-drawers-35-x-35-x-35|30428920 20574592 30428915
eket-cabinet-2-drawers-70-x-35-x-35|00333947 80574594 80344923
eket-cabinet-35-x-25-x-35|70332124 40595522 30530574 40334558 90428842 50595526 00595524
-eket-cabinet-combination-70-x-70|60333954 10574583 00334536 89285820 09581184 19285833 89435221 69435222
+eket-cabinet-combination-70-x-70|60333954 10574583 00334536 89285820 09581184 19285833
eket-media-shelf-70-x-35-x-35|00576479 90582027 30582025
eket-wall-cabinet-glass-door-35-x-25-x-35|89602125 29336356 29533012 99336353 69602126 49602127 49336341
eket-wall-cb-2-doors-70-x-35-x-70|49581182
eket-wall-cb-w-1-shlf-door-35-x-35-x-70|39590380 19590376 99590382
eket-wall-mounted-shelving-unit-35-x-25-x-35|39285808 19490273 39285827 29286257 49602033 89602031 69602032
eket-wall-mounted-shelving-unit-35-x-35-x-35|49285817 99490274 79285830 59602037 39286266 39602038 19602039
+eket-wall-mounted-shelving-unit-70-x-35-x-70|89435221 69435222
ekholma-2-seat-sofa|79537404 69537409 99537403 19537398
ekholma-2-seat-sofa-bed|19598565
ekholma-3-seat-sofa|19537416 89537413 09537412 59537419
@@ -379,14 +386,18 @@ flekke-day-bed-w-2-drawers-2-mattresses-80-x-200|39521457 49495943 29497349 0952
flinshult-armchair|40505022
flintan-office-chair|50489031 30492204
flintan-office-chair-armrests|49424470 79424464
+flisat-children-s-bench|90609178
+flisat-children-s-desk|30609181
flisat-children-s-stool|30596536
flisat-children-s-table-83-x-58|50298418
flisat-open-storage-88-x-38-x-117|60620120
+flisat-wall-storage-70-x-9-x-16|00290778 10617083 90614575
forhoja-kitchen-trolley-100-x-43|80035920
forlunda-pouffe|40572752 80572745
forsaljare-sideboard-140-x-46-x-78|90595888
forsiktig-children-s-stool|10591318
franklin-bar-stool-backrest-foldable-63|50406465 70404875
+fredde-gaming-desk-140-185-x-74-x-146|50219044 10451068
fridhult-sofa-bed|40355763 40575449
friheten-corner-sofa-bed|60551230 20551227
friheten-corner-sofa-bed-storage|09133543 79517043 89517047 29133542
@@ -425,6 +436,7 @@ gladstad-upholstered-bed-2-storage-boxes-twin-97|49406763
gladstad-upholstered-bed-4-storage-boxes-standar|49407022 29407023
gladstad-upholstered-bed-frame-standard-king-150|40490469 60490468
gladstad-upholstered-bed-frame-twin-97-x-191|00490471
+glamberget-extendable-bed-storage|20575030
glamberget-room-divider-150-x-150|90564735
glamberget-wardrobe-3-sliding-doors-117-x-63-x-1|20564512
glenn-bar-stool-66|60131734
@@ -442,6 +454,7 @@ grafjallet-dressing-table-100-x-42|30570225
grafjallet-room-divider-150-x-175|10570226
grafjallet-wall-mounted-bedside-table-42-x-29-x|00603114
greaker-cabinet-drawers-84-x-101|50501071
+grejig-shoe-rack-58-x-27-x-17|90600291
grejsimojs-children-s-stool|60598973 50598959
grejsimojs-children-s-table-84-x-42|70598963
grejsimojs-clothes-stand-125|10602996
@@ -462,6 +475,8 @@ grotan-table-80|80610422
grunnarp-3-seat-sofa-bed|70585084 90585078 30585081
grysna-upholstered-bed-frame-90-x-200|19628435
grysna-upholstered-bed-frame-twin-97-x-191|79628461
+gryteryd-recliner-rocker-armchair|40613903 20613904
+gullaberg-add-on-unit-110-x-31-x-12|80609683
gullaberg-bed-frame-2-storage-boxes-standard-dou|89614736 09614735 19614834 49614738 89614835 19630947 49614837
gullaberg-bed-frame-2-storage-boxes-standard-sin|89614699 69614803 49614700 59631011 89614802 09631018
gullaberg-bed-frame-2-storage-boxes-twin-97-x-19|29614701 09614702 89631019 49614804 39631012 19614805 00608102 80608117 29614485 09614580 69614582 19614495
@@ -475,6 +490,7 @@ gullaberg-chest-6-drawers-89-x-48-x-122|40609897 60609896
gullaberg-chest-8-drawers-168-x-48-x-100|20609902 40609901
gullaberg-desk-120-x-65-x-75|20609681
gullaberg-desk-155-x-65-x-75|50601669
+gullaberg-gateleg-desk-84-x-41-91-x-85|40609680
gullaberg-shoe-cabinet-2-compartments-88-x-30-x|50587692 40587697
gullaberg-shoe-cabinet-4-compartments-105-x-22-x|10587707 50587710
gullaberg-storage-bench-148-x-43-x-52|40573959 80573957
@@ -498,6 +514,7 @@ hagaan-open-cabinet-40-x-48-x-33|40535514 70534909 40535528 60535532
hagaan-open-cabinet-45-5-x-53-5-x-33-5|80535531 90535521 60535513 90535535
hagaan-wall-open-cabinet-40-x-15-x-95|70535522 70535536
hagaan-wall-open-cabinet-45-5-x-15-x-94|10535539 00535525
+hagernas-chair|50606624 00606626
hagernas-stool|80607014
hakanskar-coffee-table-80-x-64|70597162
hammarn-sofa-bed|00361493
@@ -515,6 +532,7 @@ hauga-chest-6-drawers|00581536 70581533
hauga-drop-leaf-table-55-82-109-x-74|20586000 80586002
hauga-glass-door-cabinet-105-x-116|80415048 30415055
hauga-sideboard-140-x-46-x-84|40621489 60621488
+hauga-stool|40582044 80582042
hauga-table-118-x-74|00576709 50576716
hauga-table-168-x-74|30576722 50576721
hauga-table-74-x-74|70576720 90576719
@@ -605,6 +623,7 @@ holmsta-armchair|90508551
holmsta-froknabo-armchair|99428809
holmsund-sleeper-sectional-3-seat|39516903 79516897 89516892 09516886
hornavan-trolley-26-x-48-x-77|70243873
+husbyan-wall-cabinet-28-x-11-x-37-5|70624603 60601640
huvudspelare-gaming-chair|30507601
huvudspelare-gaming-desk-140-x-80|90539166
hyllis-shelf-unit-60-x-140|00278578
@@ -637,8 +656,10 @@ idanas-upholstered-bed-frame-twin-97-x-191|90594940 10459677 69386575 59567289 1
idanas-upholstered-ottoman-bed-standard-king-150|40590949 10588090
idanas-upholstered-storage-bed-standard-king-150|20447194 60447192 70588105 00588104
idanas-wardrobe-121-x-211|60458835
+idasen-cabinet-sliding-glass-doors-120-x-140|80360951
idasen-desk-160-x-80|89281030 89280969
idasen-drawer-unit-on-castors-42-x-61|10320727 50397913
+idasen-underframe-sit-stand-f-table-tp-el-146-x|20411982
ikea-ps-2026-3-seat-sofa-bed|70620351
ikea-ps-2026-bedside-table-30-x-30-x-50|60619942
ikea-ps-2026-bench-127|30617893
@@ -662,6 +683,8 @@ ingolf-junior-chair|60353838
inndyr-storage-bench|90461214 60461215
invallning-trolley-68-x-39|10569398
ismantorp-armchair|60598218 10598225
+ivar-1-sec-storage-unit-w-foldable-table-89-x-30|79469527
+ivar-2-sec-storage-unit-w-foldable-table-134-x-9|69606577
ivar-2-sections-shelves-134-x-30-x-179|99590612
ivar-2-sections-shelves-134-x-50-x-179|49407055 19403935
ivar-2-sections-shelves-134-x-50-x-226|29407056
@@ -676,6 +699,7 @@ ivar-cabinet-doors-160-x-30-x-83|89508118 99508108
ivar-cabinet-doors-80-x-83|50531252 00531240 40033763 70033766
ivar-cabinet-doors-89-x-30-x-124|69508162 49508158
ivar-cabinet-sliding-doors-80-x-30-x-60|00494394
+ivar-folding-table-80-x-30-91|40512466
ivar-shelving-unit-80-x-30-x-166|69562823
ivar-shelving-unit-80-x-30-x-83|00522330
ivar-shelving-unit-89-x-179|49590577 99572571 29403845 79407054 89590599
@@ -749,12 +773,15 @@ kallax-shelving-unit-6-inserts-112-x-147|29278262 59278265 89278259
kallax-shelving-unit-77-x-112|50522417 70522421 90522420
kallax-shelving-unit-77-x-41|40395877 40311873 10477935 20395878 90301555
kallax-shelving-unit-8-inserts-147-x-147|69017475
+kallax-shelving-unit-doors-77-x-77|59197453 19278272 89278278
kallax-shelving-unit-underframe-147-x-129|79442694 99442711 39442691 19442710 99442706 79442707 19442692
kallax-shelving-unit-underframe-147-x-164|09442720 49442718 79442712 39442714 89442721 29442719 59442713
kallax-shelving-unit-underframe-147-x-59|29442663 39442672 99442674 39442667 19442668 09442664 59442666
kallax-shelving-unit-underframe-147-x-94|29442677 39442686 89442679 79442689 59442685 69442680 59442690 59552914 29552915 79552913 19552911 99552912 39552910 49607554
kallax-shelving-unit-underframe-77-x-164|69442642 89442655 19442654 99442645 79442646 49442643 29442615 79607557
kallax-shelving-unit-underframe-77-x-94|89442617 59442628 49442619 69442618 79442627 09442616 29634983
+kallax-tv-bench-147-x-60|80562096 70562087 10562090
+kallax-tv-bench-underframe-147-x-39-x-78|99552177 39552175 19552176
kallso-bench-shoe-storage-80-x-38-x-56|20599328
kallso-hat-rack-80|60599326
kallso-storage-bench-80-x-38-x-56|80599325
@@ -793,6 +820,7 @@ kleppstad-wardrobe-sliding-doors-117-x-55-x-176|90437238
klippan-2-seat-sofa|49625204 89246862 89561667 90399316
klippuggla-bed-frame-storage-90-x-200|19627346 09627827
klippuggla-bed-frame-storage-twin-97-x-191|29627826 69627829
+kloven-deck-chair-outdoor|60427641 80487380
knarrevik-bedside-table-37-x-28-x-45|00576318 20569977
knoxhult-corner-base-cabinet-100-x-91|00486129 70603974 30603985 00588788
knoxhult-high-cabinet-door-60-x-31-x-153|50604352 40604079 90604246 10604354
@@ -828,6 +856,7 @@ kullen-chest-2-drawers|80309241
kungsfors-kitchen-trolley-60-x-40|80334924
kura-reversible-bed-90-x-200|80253809
kura-reversible-bed-twin-97-x-191|80253814
+kvistbro-storage-table-44|90480401 30349452
kyrre-stool|60416925 10608130
lack-coffee-table|00104291 40431535 80449901
lack-coffee-table-90-x-55|40104294 50319029 90449905
@@ -878,7 +907,9 @@ langaryd-loveseat|89506039 29506042
langaryd-sofa|59506045 09506043
langaryd-sofa-w-chaise-left|39506051 19506047
langaryd-sofa-w-chaise-right|49506055 19506052
+langdhopp-pull-out-desk-90-x-39-71|30587080
langfjall-conference-chair|79252368 49177568 99567329 49567157
+larande-desk-pull-out-storage-unit-120-x-58|00492795
lastare-bench-90-x-42-x-48|70615665
lastare-chest-4-drawers-80-x-42-x-100|60599350 40599351 20599352
lastare-frame-40-x-42-x-100|60596484 80596483 00596482
@@ -890,6 +921,7 @@ lastare-table-100-x-42-x-74|20615837
lastare-wall-mounted-frame-doors-60-x-32-x-60|60616255
ledamot-cabinet-150-x-42-x-75|40544740
lennart-drawer-unit|30326177
+lerholmen-picnic-table|40539263
lillanas-bar-stool-63|80534796
lillanas-chair|50534769 30534765 10534766
lillberget-chest-3-drawers-70-x-43-x-68|80630477
@@ -1234,8 +1266,10 @@ nipasen-bench-shoe-storage-79-x-35-x-52|20586142
nipasen-hat-and-coat-stand-181|50586150
nissafors-trolley-50-5-x-19-x-67|10602982 40602985
nissafors-trolley-50-5-x-30-x-83|20399777 40585801 40465733 10606782
+norberg-wall-mounted-drop-leaf-table-74-x-60|30180504
nordkisa-bedside-table-40-x-40|60447677
nordkisa-dressing-table-76-x-47|20439472
+nordkisa-open-wardrobe-sliding-door-120-x-186|00439468
nordkroken-rocking-and-swivel-armchair|79616953 49616940
nordli-bed-frame-storage-140-x-200|40349847 00349849
nordli-bed-frame-storage-queen-152-x-203|50372781 00372788
@@ -1292,6 +1326,7 @@ norrmanso-chair-outdoor|40511080
norrmanso-table-outdoor-220-x-100|30500794
norrmjole-table-105|90620562 00620566 50620564
norrmjole-table-170-x-97|70620563 20620565
+norrudden-guest-bed-80-x-193|80583433
nyhamn-3-seat-sofa-bed|89494625 49555574 99555576 99494615 79555577 29494628 19555575
nysjon-bjorkan-wash-basin-base-cabinet-w-2-doors|39556324
nysjon-bjorkan-wash-stnd-w-door-wash-basin-tap-5|09556288
@@ -1417,6 +1452,7 @@ pinntorp-table-125-x-75|20635171 30529467
pinntorp-table-85|30637834
piplarka-desk-80-x-63|20579943
platsa-bedside-table-60-x-42-x-83|39585802
+platsa-cabinet-5-doors-180-x-42-x-103|99614255
platsa-chest-2-drawers-60-x-57-x-53|09277211 79487852 39555701
platsa-frame-60-x-55-x-120|50330946 30330947
platsa-frame-60-x-55-x-180|50330951 90330954
@@ -1428,6 +1464,7 @@ platsa-open-clothes-hanging-unit-80-x-40-x-180|60452602
platsa-open-shelving-unit-60-x-40-x-40|80452583
platsa-open-shoe-storage-unit-80-x-40-x-60|00452544
platsa-shoe-cabinet-storage-120-x-42-x-123|59615431
+platsa-storage-bench-120-x-57-x-63|69638111
platsa-wardrobe-2-doors-120-x-57-x-181|69615341
platsa-wardrobe-2-doors-120-x-57-x-191|49624916
platsa-wardrobe-2-doors-60-x-57-x-251|99623735
@@ -1456,6 +1493,7 @@ radmanso-tv-bench-176-x-48-x-66|40597818
radmanso-wardrobe-118-x-64-x-190|70593606
raggberg-bench-shoe-storage-60-x-35-x-45|20611127
ragrund-bench-78-x-37|60549416
+ragrund-shelving-unit-33|30253067
ragrund-shelving-unit-37-x-37-x-104|80549420
ragrund-trolley-42-x-33-x-76|20549418
rakkestad-wardrobe-2-doors-79-x-176|50453758
@@ -1480,6 +1518,8 @@ relatera-desk-90-x-60|69552857
relatera-desk-sit-stand-117-x-60|99552865
relatera-desk-sit-stand-90-x-60|49552863
renberget-swivel-chair|90503285
+resaro-mobile-drop-leaf-table-w-storage|20533337
+reso-children-s-picnic-table|70228325
rian-side-table-50-x-30|80343419
ridspo-desk-140-x-70|00485224
rigga-clothes-rack|50231630
@@ -1502,6 +1542,7 @@ rosentorp-stool|10618191
rosentorp-swivel-chair|40576547
rudsta-glass-door-cabinet-42-x-37-x-155|60434825 90601417
rudsta-glass-door-cabinet-80-x-37-x-120|50450137
+rullebor-trolley|10516772
sagesund-upholstered-bed-frame-king-193-x-203|00490391 69496480 09496510
sagesund-upholstered-bed-frame-standard-double-1|89496484 99496469 49496513 29496514
sagmastare-cabinet-83-x-36-x-128|90555364
@@ -1523,6 +1564,7 @@ sandkatt-highchair-tray|60616646
sandsberg-chair|30605423 10605424 90605260
sandsberg-table-110-x-67|29420393 59420400
segeron-2-seat-sofa-outdoor|29584860 29584855
+segeron-bar-stool-outdoor|90503346
segeron-chair-armrests-outdoor|29500813 89500805 50510810 10514754
segeron-coffee-table-outdoor-73-x-73|40510797
segeron-corner-section-cushion|59584726
@@ -1612,6 +1654,7 @@ slakt-bed-frame-slatted-bed-base-90-x-200|79227755
slakt-bed-frame-storage-90-x-200|09612048
slakt-bed-frame-storage-twin-97-x-191|49612051 99608424 59227775 19612043
slakt-ext-bed-frame-slatted-bed-base-97-x-190|69326548
+slakt-underbed-storage-90-x-200|99239451
slatorp-2-seat-sofa|60594381 70594366 90594394
slatorp-3-seat-sofa|70594390 10594369 50594386
slatorp-3-seat-sofa-chaise-longue|59577580 79577598 39577576
@@ -1627,9 +1670,11 @@ smagora-desk-93-x-51|90489883
smagora-shelf-unit-29-x-88|30465489
smagora-wardrobe-80-x-50-x-187|10460888
smallen-swivel-chair|00503435
+smaskrake-multi-functional-child-chair-table|60569744
smastad-bench-90-x-50-x-48|80433542
smastad-changing-table-desk-90-x-79-x-100|60594946
smastad-desk-90-x-79-x-100|29583224 59583227 99583193 69583217
+smastad-loft-bed-twin-97-x-191|09437479 99557641 09557669 29437483
smastad-platsa-bookcase-60-x-57-x-123|49387806 09396346 69544669 29544671
smastad-platsa-bookcase-60-x-57-x-181|19388039 09396426 69483265 79542641 19542644 79483298
smastad-platsa-cabinet-60-x-57-x-63|39389189
@@ -1667,6 +1712,7 @@ soderhamn-3-seat-section|29449645 29305618 09621608 09500531 69621605 39621602 1
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-armchair|79449577 69329764 49452062 09449651
soderhamn-corner-section|19305628 99449680 39452091 49449606 09500574 69621728 49621734
soderhamn-corner-sofa-4-seat|09449665 79305847 99622038 79622044 39622041 09622047
soderhamn-corner-sofa-bed-6-seat|59616275 89616453 69621403 29621400 09621397 09618682
@@ -1715,9 +1761,11 @@ stockholm-2025-side-table-55|90586558
stockholm-2025-sideboard-161-x-42-x-83|10586604
stockholm-2025-table-115|49579985
stockholm-2025-table-230-x-90|79579984
+stockholm-2025-tv-bench-sliding-doors-179-x-42-x|40586508
stockholm-chair-armrests|00621212 10621216
stockholm-coffee-table-180-x-59|70239710
stockholm-three-seat-sofa|00245050
+stomso-wall-mounted-bedside-table-36-x-29-x-20|70567805
stora-loft-bed-frame-full-double-137-x-191|80160867
storedamm-bench-63-x-31|20576162
storedamm-shelf-unit-60-x-71|30576166
@@ -1801,6 +1849,7 @@ tannforsen-wash-stand-drawers-80-x-48-x-63|60535117 60531770 80535116 00535115
tarnkullen-upholstered-bed-frame-queen-152-x-203|59564375 29564372 69569240 69564370 49569236 99569234 49564347 69608152 69564346 89564345 69608147 59608143 99608155
tarnkullen-upholstered-bed-frame-standard-double|69564351 79564355 39564376 19564377
tarnkullen-upholstered-bed-frame-twin-97-x-191|59564380 29569242 29564353 59608157 89569220 19608159
+tarno-bench-outdoor|00534903
tarno-chair-outdoor|90095428 09576328 09576314
tarno-stool-30-x-42|70603281
tarno-stool-outdoor|09621533 59621521
@@ -1819,11 +1868,13 @@ tegelon-chair-in-outdoor|20555918 00503807
tegelon-table-outdoor-216-x-86|30492143
teodores-chair|99399835 19399839 90530627 20530621 90350937
tingby-side-table-on-castors-50-x-50|20295930 00349444
+tittebo-roll-front-cabinet-61|20569227
tjarkil-extendable-table-180-235-290-x-100|70630454
tjusig-bench-shoe-storage-108-x-34-x-50|70152702 50152703
tjusig-hat-rack-79|40152633 20152634
tjusig-shoe-rack-79-x-32-x-37|10152639 30152638
tobias-chair|30635123 80349671 90532589
+tolkning-bedside-table-52|20512660
tolkning-bench-storage-120|80512657
tolkning-pouf-storage|90512666
tolkning-room-divider-150-x-170|60512663
@@ -1898,6 +1949,7 @@ trofast-frame-99-x-44-x-56|80153800 30565196
trofast-storage-frame-99-x-94|10091453 10615395
trofast-wall-storage-93-x-30|20308701
trofast-wall-storage-99-x-30|50171122
+trogen-children-s-step-stool-40-x-38-x-33|80371520
trones-shoe-cabinet-52-x-39|00397307 80397313
trotten-cabinet-doors-70-x-35-x-110|80623962
trotten-cabinet-doors-70-x-35-x-173|40474836 30474766
@@ -1963,11 +2015,13 @@ varmanso-table-outdoor-224-x-93|10515683
vasman-chair-armrests-outdoor|70563402 40211637
vasman-extendable-table-outdoor-135-190-x-74|30469034
vassholmen-chair-in-outdoor|30503740
+vasskar-shoe-rack-60|80624645
vattenkar-desktop-shelf-49-x-15|20541568 40541572
vattenkar-laptop-monitor-stand-52-x-26|80541565
vedbo-armchair|00423580 30424125
vedbo-high-back-armchair|70424133 70423591
veinge-easy-chair|30565158 80558570 50565162
+venngarn-1-5-seat-armchair|70632684 50632637 30641911
venngarn-loveseat|20613433 40632685 90641913
venngarn-sofa|20632686 70641914 70632636
vesken-shelf-unit-37-x-23-x-101|40307866 30450807
@@ -2050,6 +2104,7 @@ vimund-child-s-desk-chair|50531964
vingson-wing-chair-in-outdoor|70503738
vinliden-sofa-chaise|39304680
visingso-chair-armrests|60575542
+visingso-plant-stand-74|00575540
visingso-table-70-x-70|40569467
viskafors-1-5-seat-armchair|29443304 49443280 59443294 49443299 49443275 39443285
viskafors-2-seat-sofa|89443264 69443217 99443254 89443259 39443214 19443210
@@ -2078,15 +2133,20 @@ vittskar-chair-armrests|20575167
vittskar-coffee-table-110-x-58|80575555
vittskar-modular-chaise-longue|29591257 69618844 79618848 99591273 29618860 59591270 89591259 99618852
vittskar-modular-easy-chair|49618864 89590981
+vittskar-table-187|50603263
vittskar-table-264-x-96|30575162
vitval-bunk-bed-frame-90-x-200|80411272
vitval-bunk-bed-frame-twin-97-x-191|70411277
+vitval-bunk-bed-frame-underbed-90-x-200|19302922
vitval-loft-bed-frame-90-x-200|10411242
vitval-loft-bed-frame-twin-97-x-191|70411239
+vitval-underbed-90-x-200|10448325
voxlov-chair|50450236
voxlov-dining-table-180-x-90|40434322
vretstorp-3-seat-sofa-bed|89491245 19491239 69491251 49491233 39491257
vuku-wardrobe-74-x-51-x-149|80331973
yngvar-bar-stool-75|60400745
yngvar-chair|80417636
-yxstaby-gaming-monitor-stand-98-x-27-x-16|80620001`;
+yxstaby-gaming-monitor-stand-98-x-27-x-16|80620001
+yxstaby-gaming-side-table-on-castors|90620005
+yxstaby-gaming-thumbstick-stool|10620009 80628950`;
diff --git a/src/data/ikea-rows.ts b/src/data/ikea-rows.ts
index 02ec060..98dfac7 100644
--- a/src/data/ikea-rows.ts
+++ b/src/data/ikea-rows.ts
@@ -91,12 +91,14 @@ BÅTSKÄR|kitchen|Add-on unit with shelves, 120 × 70 cm|120|90|70|doors=0,shelv
BEKANT|cabinet|Storage unit on castors, 41 × 101 cm|41|101|45|doors=0,shelves=2,cat=Storage unit on castors,cast=1
BEKVÄM|stool|Step stool, 63 cm|44|63|35
BEKVÄM|trolley|Kitchen trolley, 58 × 50 cm|58|85|50
+BERGMUND|bar|Bar stool with backrest, 62 cm|42|90|47|us=1
BERGSHYTTAN|bench|Bench, 210 × 38 cm|210|46|38
BERGSHYTTAN|dining|Table, 240 × 93 cm|240|75|93
BESTÅ|cabinet|Frame, 60 × 20 × 64 cm|60|64|20|knobs=none,doors=0,shelves=0
BESTÅ|cabinet|Shelf unit with doors, 60 × 42 × 129 cm|60|129|42|knobs=none
BESTÅ|cabinet|Frame, 60 × 40 × 192 cm|60|192|40|knobs=none,doors=0,shelves=0
BESTÅ|cabinet|Shelf unit with doors, 60 × 42 × 193 cm|60|193|42|knobs=none
+BESTÅ|cabinet|Cabinet unit, 60 × 40 × 202 cm|60|202|40
BESTÅ|cabinet|Frame, 120 × 40 × 64 cm|120|64|40|knobs=none,doors=0,shelves=0
BESTÅ|cabinet|Shelf unit with doors, 120 × 42 × 64 cm|120|64|42|knobs=none
BESTÅ|cabrow|TV bench with doors, 240 × 42 × 38 cm|240|38|42|knobs=none,n=2,of=tv
@@ -114,6 +116,7 @@ BETESHÄST|desk|Desk, 120 × 60 cm|120|76|60
BILLY|bookcase|Bookcase, 40 × 28 × 106 cm|40|106|28
BILLY|bookcase|Bookcase, 40 × 39 × 202 cm|40|202|39
BILLY|bookcase|Bookcase, 40 × 28 × 237 cm|40|237|28
+BILLY|bookcase|Bookcase with foldable table, 80 × 33/112 × 106 cm|80|106|33
BILLY|bookcase|Bookcase, 80 × 39 × 202 cm|80|202|39
BILLY|bookcase|Bookcase, 80 × 28 × 237 cm|80|237|28
BILLY|bookcase|Bookcase, 120 × 28 × 237 cm|120|237|28
@@ -177,6 +180,7 @@ BOASTAD|tv|TV unit, 181.5 × 42 × 45 cm|182|45|42|us=1
BOASTAD|wallshelf|Wall shelf, 121.5 × 32 × 32 cm|122|32|32|us=1
BOASTAD|wallshelf|Wall shelf, 181 × 32 × 32 cm|181|32|32
BOAXEL|open|Shelving unit, 62 × 40 × 201 cm|62|201|40
+BOCKÖN|lounger|Hammock stand, outdoor|308|123|100||outdoor garden
BOLLPOJKE|desk|Desk, 90 × 55 cm|90|75|55
BOLLSIDAN|desk|Desk sit/stand, 120 × 70 cm|120|72|70|us=1
BOLLSIDAN|riser|Laptop stand, 68 × 36 cm|68|65|36
@@ -193,6 +197,7 @@ BONDSKÄRET|coatstand|Hat and coat stand, 175 cm|60|175|60
BORGEBY|coffee|Coffee table, 70 cm|70|42|70|round=1
BORGEBY|side|Side table, 46 cm|46|55|46|round=1
BRÄNNBOLL|side|Side table on castors, 69 × 39 cm|69|40|39
+BRÄNNBOLL|trolley|Shelving unit on castors, 56 × 62 cm|56|62|40
BRIMNES|bed|Bed frame with storage, Standard Double, 135 × 190 cm|141|47|196|m=135,l=190
BRIMNES|cabinet|Cabinet with doors, 78 × 95 cm|78|95|41
BRIMNES|chest|Chest of 4 drawers, 78 × 46 × 124 cm|78|124|46|rows=4,knobs=none
@@ -200,6 +205,7 @@ BRIMNES|daybed|Day-bed w 2 drawers/2 mattresses, 80 × 200 cm|205|57|86|rows=2,k
BRIMNES|daybed|Day-bed frame with 2 drawers, 80 × 200 cm|205|58|87|rows=2,knobs=none,m=80,under=pullout
BRIMNES|desk|Dressing table, 70 × 42 cm|70|77|42
BRIMNES|nightstand|Bedside table, 39 × 41 × 53 cm|39|53|41|rows=1,knobs=none
+BRIMNES|open|Headboard with storage compartment, Queen, 152 × 203 cm|158|111|28|us=1
BRIMNES|tv|TV bench, 180 × 41 × 53 cm|180|53|41|knobs=none
BRIMNES|tv|TV bench, 216 × 41 × 54 cm|216|54|41|knobs=none
BROR|bookrow|Shelving unit, 170 × 40 × 110 cm|170|110|40|of=open,u=85+85
@@ -258,6 +264,7 @@ EKET|wallcab|Media shelf, 70 × 35 × 35 cm|70|35|35|knobs=none,doors=0,shelves=
EKET|wallcab|Wall cb with 2 doors, 70 × 35 × 70 cm|70|70|35|knobs=none,doors=2
EKET|wallshelf|Wall-mounted shelving unit, 35 × 25 × 35 cm|35|35|25
EKET|wallshelf|Wall-mounted shelving unit, 35 × 35 × 35 cm|35|35|35
+EKET|wallshelf|Wall-mounted shelving unit, 70 × 35 × 70 cm|70|70|35
EKHOLMA|corner|Corner sofa, 4-seat with open end|236|94|195|seats=4,arms=wide,seatH=49,corner=left,open=1,sd=92,aw=9,bk=70,lg=15,sdp=55
EKHOLMA|sofa|2-seat sofa|167|94|85|seats=2,seatH=49,bk=70,lg=15,sdp=55
EKHOLMA|sofa|2-seat sofa-bed|189|100|105|seats=2,seatH=46,ah=70,bk=70,lg=7,sdp=55
@@ -357,14 +364,18 @@ FLEKKE|daybed|Day-bed w 2 drawers/2 mattresses, 80 × 200 cm|207|86|91|rows=2,m=
FLINSHULT|armchair|Armchair|84|91|95|seatH=51,us=1,ah=57,aw=12,lg=18,sdp=66
FLINTAN|office|Office chair with armrests|71|103|71|arms=slim,seatH=58
FLINTAN|office|Office chair|71|114|71|arms=none,seatH=58
+FLISAT|bench|Children's bench|61|47|36
+FLISAT|desk|Children's desk|97|59|65
FLISAT|kidstable|Children's table, 83 × 58 cm|83|48|58||kids
FLISAT|open|Open storage, 88 × 38 × 117 cm|88|117|38
FLISAT|stool|Children's stool|32|30|32||kids
+FLISAT|wallshelf|Wall storage, 70 × 9 × 16 cm|70|16|9
FÖRHÖJA|trolley|Kitchen trolley, 100 × 43 cm|100|90|43
FÖRLUNDA|pouffe|Pouffe|44|41|44|round=1
FÖRSÄLJARE|sideboard|Sideboard, 140 × 46 × 78 cm|140|78|46
FÖRSIKTIG|stool|Children's stool|37|30|24||kids
FRANKLIN|chair|Bar stool with backrest, foldable, 63 cm|50|95|44|seatH=63
+FREDDE|desk|Gaming desk, 140/185 × 74 × 146 cm|140|146|74
FRIDHULT|sofa|Sofa-bed|230|73|76|seats=3,seatH=37,sdp=52
FRIHETEN|chaise|Corner sofa-bed with storage|230|86|151|seats=3,arms=slim,seatH=44,chaise=right,sd=105,bk=66
FRIHETEN / KLAGSHAMN|chaise|Corner sofa-bed with storage|230|86|151|seats=3,arms=slim,seatH=44,chaise=right,sd=105,bk=66
@@ -402,6 +413,7 @@ GLADSTAD|bed|Upholstered bed, 2 storage boxes, Twin, 97 × 191 cm|104|95|202|m=9
GLADSTAD|bed|Upholstered bed, 2 storage boxes, Standard Double, 135 × 190 cm|142|95|202|m=135,l=190,f=33,cat=Bed frame
GLADSTAD|bed|Upholstered bed, 4 storage boxes, Standard Double, 135 × 190 cm|142|95|202|m=135,l=190,f=33,cat=Bed frame
GLADSTAD|bed|Upholstered bed frame, Standard King, 150 × 200 cm|157|95|212|m=150,f=33
+GLAMBERGET|daybed|Extendable bed with storage|201|35|97|m=90
GLAMBERGET|divider|Room divider, 150 × 150 cm|150|150|25
GLAMBERGET|sliding|Wardrobe with 3 sliding doors, 117 × 63 × 150 cm|117|150|63|slides=3
GLENN|stool|Bar stool, 66 cm|50|89|48
@@ -418,6 +430,7 @@ GRÅFJÄLLET|divider|Room divider, 150 × 175 cm|150|175|25
GRÅFJÄLLET|nightstand|Bedside table, 45 × 36 × 59 cm|45|59|36|rows=1
GRÅFJÄLLET|wallshelf|Wall-mounted bedside table, 42 × 29 × 31 cm|42|31|29
GREÅKER|chest|Cabinet with drawers, 84 × 101 cm|84|101|49|rows=4
+GREJIG|shoerack|Shoe rack, 58 × 27 × 17 cm|58|17|27
GREJSIMOJS|coatstand|Clothes stand, 125 cm|48|125|48
GREJSIMOJS|kidstable|Children's table, 84 × 42 cm|84|45|42||kids
GREJSIMOJS|lidbox|Pouffe with storage|57|24|32|cat=Pouffe with storage
@@ -438,6 +451,7 @@ GRÖTÅN|dining|Table, 105 cm|105|75|105|round=1
GRUNNARP|sofa|3-seat sofa-bed|232|87|89|seats=3,seatH=46,ah=62,lg=15,sdp=76
GRYSNA|bed|Upholstered bed frame, 90 × 200 cm|96|110|208|m=90,f=40
GRYSNA|bed|Upholstered bed frame, Twin, 97 × 191 cm|103|110|198|m=97,l=191,f=40,us=1
+GRYTERYD|armchair|Recliner rocker armchair|76|103|94|seatH=49,us=1,sdp=53
GULLABERG|bed|Bed frame, Standard Single, 90 × 190 cm|101|113|198|m=90,l=190,f=41
GULLABERG|bed|Bed frame with 2 storage boxes, Standard Single, 90 × 190 cm|102|113|198|m=90,l=190,f=41
GULLABERG|bed|Bed frame with 2 storage boxes, Twin, 97 × 191 cm|107|113|198|m=97,l=191,f=41,us=1
@@ -447,6 +461,7 @@ GULLABERG|bed|Bed frame with 4 storage boxes, Standard King, 150 × 200 cm|161|1
GULLABERG|chest|Chest of 6 drawers, 89 × 48 × 122 cm|89|122|48|rows=6
GULLABERG|chest|Chest of 3 drawers, 99 × 48 × 100 cm|99|100|48|rows=3
GULLABERG|chest|Chest of 8 drawers, 168 × 48 × 100 cm|168|100|48|rows=4,cols=2
+GULLABERG|desk|Gateleg desk, 84 × 41/91 × 85 cm|84|85|41
GULLABERG|desk|Desk, 120 × 65 × 75 cm|120|75|65
GULLABERG|desk|Desk, 155 × 65 × 75 cm|155|75|65
GULLABERG|lidbox|Storage bench, 148 × 43 × 52 cm|148|52|43
@@ -454,6 +469,7 @@ GULLABERG|nightstand|Bedside table, 38 × 40 × 75 cm|38|75|40|rows=2
GULLABERG|nightstand|Bedside table, 53 × 43 × 69 cm|53|69|43|rows=2
GULLABERG|shoe|Shoe cabinet with 2 compartments, 88 × 30 × 122 cm|88|122|30|c=2
GULLABERG|shoe|Shoe cabinet with 4 compartments, 105 × 22 × 107 cm|105|107|22|c=4
+GULLABERG|wallshelf|Add-on unit, 110 × 31 × 12 cm|110|12|31
GULLABERG|wardrobe|Wardrobe, 128 × 64 × 201 cm|128|201|64
GULLIVER|changing|Changing table, 82 × 54 × 93 cm|82|93|54|shelves=2|kids children
GULLIVER|cot|Cot, 60 × 120 cm|124|80|66|m=60,l=120
@@ -473,6 +489,7 @@ HAGAÅN|cabinet|Open cabinet, 40 × 48 × 33 cm|40|33|48|doors=0
HAGAÅN|cabinet|Open cabinet, 45.5 × 53.5 × 33.5 cm|46|34|54|doors=0,us=1
HAGAÅN|wallcab|Wall open cabinet, 40 × 15 × 95 cm|40|95|15|doors=0
HAGAÅN|wallcab|Wall open cabinet, 45.5 × 15 × 94 cm|46|94|15|doors=0,us=1
+HÄGERNÄS|chair|Chair|46|87|53|seatH=45,us=1
HÄGERNÄS|stool|Stool|32|45|32
HÅKANSKÄR|coffee|Coffee table, 80 × 64 cm|80|43|64
HAMMARN|sofa|Sofa-bed|230|78|85|seats=3,seatH=38,sdp=70
@@ -492,6 +509,7 @@ HAUGA|mixed|Chest of 3 drawers with shelf, 70 × 46 × 116 cm|70|116|46|rows=3,k
HAUGA|nightstand|Bedside table, 40 × 36 cm|40|63|36|rows=1,knobs=bar
HAUGA|sideboard|Sideboard, 140 × 46 × 84 cm|140|84|46|knobs=bar
HAUGA|sliding|Wardrobe with sliding doors, 118 × 55 × 199 cm|118|199|55|slides=2
+HAUGA|stool|Stool|32|45|32|us=1
HAUGA|tv|TV bench, 206 × 46 × 54 cm|206|54|46|knobs=bar
HAVBÄCK|cabinet|High cabinet with door, 40 × 35 × 195 cm|40|195|35|doors=1
HAVBÄCK|cabinet|High cabinet with doors, 45.5 × 38 × 195.5 cm|46|196|38|us=1
@@ -568,6 +586,7 @@ HOLMSTA|armchair|Armchair|62|73|75|seatH=33,sdp=57
HOLMSTA / FRÖKNABO|armchair|Armchair|75|90|80
HOLMSUND|corner|Sleeper sectional, 3-seat|230|96|90|seats=3,arms=wide,seatH=44,corner=left,sd=92,us=1,bk=66,sdp=60
HORNAVAN|trolley|Trolley, 26 × 48 × 77 cm|26|77|48
+HUSBYÅN|wallcab|Wall cabinet, 28 × 11 × 37.5 cm|28|38|11
HUVUDSPELARE|desk|Gaming desk, 140 × 80 cm|140|74|80
HUVUDSPELARE|office|Gaming chair|60|113|54|arms=slim,seatH=53
HYLLIS|open|Shelving unit, 60 × 27 × 74 cm|60|74|27||outdoor garden
@@ -598,6 +617,8 @@ IDANÄS|sideboard|Sideboard, 124 × 50 × 95 cm|124|95|50
IDANÄS|tv|TV bench, 162 × 40 × 63 cm|162|63|40
IDANÄS|wardrobe|Open wardrobe, 59 × 211 cm|59|211|49|doors=0
IDÅSEN|chest|Drawer unit on castors, 42 × 61 cm|42|61|47|rows=4
+IDÅSEN|desk|Underframe sit/stand f table tp, el, 146 × 70 cm|146|59|70
+IDÅSEN|slidecab|Cabinet with sliding glass doors, 120 × 140 cm|120|140|45
IKEA PS|cabinet|Cabinet, 119 × 63 cm|119|63|40
IKEA PS 2026|armchair|Easy chair|73|70|84|seatH=45,sdp=54
IKEA PS 2026|bench|Bench, 127 cm|127|54|35
@@ -639,14 +660,17 @@ IVAR|cabrow|Wall cabinet with doors, 160 × 30 × 83 cm|160|83|30|n=2,of=wallcab
IVAR|cabrow|Shelving unit with doors, 259 × 30 × 124 cm|259|124|30|of=cabinet,u=89+89+89
IVAR|cabrow|Shelving unit with doors, 259 × 30 × 226 cm|259|226|30|of=cabinet,u=89+89+89
IVAR|cube|Box shelf with divider, 83 × 30 × 25 cm|83|25|30|cat=Box shelf,t=18
+IVAR|dropleaf|Folding table, 80 × 30-91 cm|80|74|30
IVAR|open|Shelving unit, 80 × 30 × 83 cm|80|83|30
IVAR|open|Shelving unit, 80 × 30 × 166 cm|80|166|30
IVAR|open|Shelving unit with storage box, 89 × 30 × 124 cm|89|124|30|cat=Shelving unit with storage box,box=25
IVAR|open|Shelving unit, 89 × 30 × 124 cm|89|124|30
+IVAR|open|1 sec/storage unit w foldable table, 89 × 30 × 179 cm|89|179|30
IVAR|open|Shelving unit with storage box, 89 × 30 × 179 cm|89|179|30|cat=Shelving unit with storage box,box=25
IVAR|open|Shelving unit, 89 × 50 × 179 cm|89|179|50
IVAR|open|Shelving unit, 89 × 30 × 226 cm|89|226|30
IVAR|open|Shelving unit, 89 × 50 × 226 cm|89|226|50
+IVAR|open|2 sec/storage unit w foldable table, 134 × 95 × 179 cm|134|179|95
IVAR|slidecab|Cabinet with sliding doors, 80 × 30 × 60 cm|80|60|30|slides=2
IVÖSJÖN|cabinet|Cabinet with doors, 33 × 34 × 99 cm|33|99|34
IVÖSJÖN|washstand|Wash-basin base cabinet, 50 × 33 × 57 cm|50|57|33|z=d1,hung=1
@@ -689,6 +713,7 @@ JUTHOLMEN|sofa|3-seat modular sofa, outdoor, 210 × 73 cm|210|83|73|seats=3,seat
JUTTERSBO|trolley|Trolley, 36 × 36 cm|36|86|36
KALLAX|cube|Shelving unit, 42 × 41 cm|42|41|39
KALLAX|cube|Shelving unit, 77 × 41 cm|77|41|39
+KALLAX|cube|Shelving unit with doors, 77 × 77 cm|77|77|39
KALLAX|cube|Shelving unit with underframe, 77 × 94 cm|77|94|39|uf=17
KALLAX|cube|Shelving unit, 77 × 112 cm|77|112|39
KALLAX|cube|Shelving unit with 2 inserts, 77 × 147 cm|77|147|39|ins=2
@@ -707,6 +732,8 @@ KALLAX|cube|Shelving unit with underframe, 147 × 164 cm|147|164|39|uf=17
KALLAX|cube|Shelving unit with 10 inserts, 182 × 182 cm|182|182|39|ins=10
KALLAX|cube|Shelving unit, 182 × 182 cm|182|182|39
KALLAX|desk|Desk, 111 × 39 cm|111|77|39
+KALLAX|tv|TV bench, 147 × 60 cm|147|60|39
+KALLAX|tv|Tv bench with underframe, 147 × 39 × 78 cm|147|78|39
KALLSÖ|hatrack|Hat rack, 80 cm|80|26|32
KALLSÖ|lidbox|Storage bench, 80 × 38 × 56 cm|80|56|38
KALLSÖ|shelfbench|Bench with shoe storage, 80 × 38 × 56 cm|80|56|38
@@ -742,6 +769,7 @@ KLEPPSTAD|sliding|Wardrobe with sliding doors, 117 × 55 × 176 cm|117|176|55|sl
KLEPPSTAD|wardrobe|Wardrobe with 3 doors, 117 × 55 × 176 cm|117|176|55|doors=2
KLIPPUGGLA|bed|Bed frame with storage, 90 × 200 cm|96|89|206|m=90,f=71
KLIPPUGGLA|bed|Bed frame with storage, Twin, 97 × 191 cm|102|53|196|m=97,l=191,f=53,us=1
+KLÖVEN|lounger|Deck chair, outdoor|80|86|85|us=1|outdoor garden
KNARREVIK|nightstand|Bedside table, 37 × 28 × 45 cm|37|45|28|rows=1
KNOXHULT|cornercab|Corner base cabinet, 100 × 91 cm|100|91|61|shelves=1,blind=50
KNOXHULT|kitchen|High cabinet with door, 60 × 31 × 153 cm|60|153|31|doors=1
@@ -773,6 +801,7 @@ KRYLBO|office|Swivel chair|63|88|63|arms=none,seatH=58
KUNGSFORS|trolley|Kitchen trolley, 60 × 40 cm|60|90|40
KURA|loft|Reversible bed, Twin, 97 × 191 cm|199|116|105|m=97,l=191,us=1
KURA|loft|Reversible bed, 90 × 200 cm|209|116|99|m=90
+KVISTBRO|side|Storage table, 44 cm|44|42|44
LACK|console|Console table, 140 × 39 cm|140|65|39|us=1
LACK|side|Side table, 35 × 35 cm|35|35|35|legs=square,attach=screw
LACK|tv|TV bench, 90 × 36 × 45 cm|90|45|36|doors=0
@@ -817,7 +846,9 @@ LÅNGARYD|chaise|Sofa w chaise, left|280|85|162|seats=3,arms=wide,seatH=43,chais
LÅNGARYD|chaise|Sofa w chaise, right|280|85|162|seats=3,arms=wide,seatH=43,chaise=right,sd=92,us=1,ah=59,aw=17,bk=82,lg=15
LÅNGARYD|sofa|Loveseat|198|85|90|seats=2,seatH=43,us=1,ah=59,aw=17,bk=82,lg=15,sdp=63
LÅNGARYD|sofa|Sofa|242|85|90|seats=3,seatH=43,us=1,ah=59,aw=17,bk=82,lg=15,sdp=63
+LÄNGDHOPP|desk|Pull-out desk, 90 × 39/71 cm|90|75|39
LÅNGFJÄLL|conference|Conference chair|68|92|68|seatH=53
+LÄRANDE|desk|Desk with pull-out storage unit, 120 × 58 cm|120|74|58
LASTARE|bench|Bench, 90 × 42 × 48 cm|90|48|42
LASTARE|cabinet|Frame, 40 × 42 × 100 cm|40|100|42|doors=0,shelves=0
LASTARE|cabinet|Frame, 60 × 30 × 100 cm|60|100|30|doors=0,shelves=0
@@ -829,6 +860,7 @@ LASTARE|extension|Height extension unit with doors, 80 × 42 × 36 cm|80|36|42|d
LASTARE|wallcab|Wall mounted frame with doors, 60 × 32 × 60 cm|60|60|32
LEDAMOT|cabinet|Cabinet, 150 × 42 × 75 cm|150|75|42
LENNART|chest|Drawer unit|30|56|34|rows=4
+LERHOLMEN|dining|Picnic table|150|76|147
LILLÅNÄS|chair|Chair|48|87|54|seatH=47
LILLÅNÄS|stool|Bar stool, 63 cm|47|94|51
LILLBERGET|chest|Chest of 3 drawers, 70 × 43 × 68 cm|70|68|43|rows=3
@@ -1141,7 +1173,7 @@ NÄMMARÖ|chair|Chair with armrests, outdoor|56|78|62|arms=slim,seatH=42|outdoor
NÄMMARÖ|dining|Table, outdoor, 75 × 63 cm|75|75|63||outdoor garden
NÄMMARÖ|dining|Table, outdoor, 130 cm|130|75|130|round=1|outdoor garden
NÄMMARÖ|dining|Table, outdoor, 140 × 75 cm|140|75|75||outdoor garden
-NÄMMARÖ|dining|Table, outdoor, 200 × 75 cm|200|74|75|us=1|outdoor garden
+NÄMMARÖ|dining|Table, outdoor, 200 × 75 cm|200|75|75|us=1|outdoor garden
NÄMMARÖ|kitchen|Open kitchen unit, 80 × 62 cm|80|90|62|doors=0,shelves=1,cat=Outdoor kitchen unit|outdoor garden
NÄMMARÖ|lounge|Reclining chair, outdoor|60|105|71|seatH=42|outdoor garden
NÄMMARÖ|lounge|Lounge chair, outdoor|69|69|78|seatH=30|outdoor garden
@@ -1165,8 +1197,10 @@ NIPÅSEN|coatstand|Hat and coat stand, 181 cm|56|181|56
NIPÅSEN|shelfbench|Bench with shoe storage, 79 × 35 × 52 cm|79|52|35
NISSAFORS|trolley|Trolley, 50.5 × 19 × 67 cm|51|67|19
NISSAFORS|trolley|Trolley, 50.5 × 30 × 83 cm|51|83|30
+NORBERG|dropleaf|Wall-mounted drop-leaf table, 74 × 60 cm|74|74|60
NORDKISA|desk|Dressing table, 76 × 47 cm|76|76|47
NORDKISA|nightstand|Bedside table, 40 × 40 cm|40|67|40|rows=1
+NORDKISA|wardrobe|Open wardrobe with sliding door, 120 × 186 cm|120|186|47|doors=1
NORDKROKEN|swivel|Rocking and swivel armchair|72|83|85|seatH=44,rock=1
NORDLI|bed|Bed frame with storage, 140 × 200 cm|140|30|202|m=140,f=30
NORDLI|bed|Bed frame with storage, Queen, 152 × 203 cm|168|64|212|m=152,l=203,us=1
@@ -1221,6 +1255,7 @@ NORRMANSÖ|chair|Chair, outdoor|48|83|52|seatH=45|outdoor garden
NORRMANSÖ|dining|Table, outdoor, 220 × 100 cm|220|73|100||outdoor garden
NORRMJÖLE|dining|Table, 105 cm|105|75|105|round=1
NORRMJÖLE|dining|Table, 170 × 97 cm|170|75|97|us=1
+NORRUDDEN|daybed|Guest bed, 80 × 193 cm|193|30|80|m=80
NYHAMN|sofa|3-seat sofa-bed|200|90|97|seats=3,seatH=31,sdp=73
NYSJÖN|cabinet|High cabinet, 30 × 190 cm|30|190|27
NYSJÖN|wallcab|Mirror cabinet, 50 × 60 cm|50|60|13
@@ -1343,11 +1378,13 @@ PINNTORP|dining|Table, 85 cm|85|75|85|round=1
PINNTORP|dining|Table, 125 × 75 cm|125|75|75
PINNTORP|gateleg|Gateleg table, 67/124 × 75 cm|124|75|75|leaves=1,leaf=57
PIPLÄRKA|desk|Desk, 80 × 63 cm|80|70|63||kids children
+PLATSA|bench|Storage bench, 120 × 57 × 63 cm|120|63|57
PLATSA|cabinet|Frame, 60 × 55 × 40 cm|60|40|55|doors=0,shelves=0
PLATSA|cabinet|Frame, 60 × 55 × 60 cm|60|60|55|doors=0,shelves=0
PLATSA|cabinet|Frame, 60 × 55 × 120 cm|60|120|55|doors=0,shelves=0
PLATSA|cabinet|Frame, 60 × 55 × 180 cm|60|180|55|doors=0,shelves=0
PLATSA|cabinet|Frame, 80 × 40 × 180 cm|80|180|40|doors=0,shelves=0
+PLATSA|cabinet|Cabinet with 5 doors, 180 × 42 × 103 cm|180|103|42
PLATSA|cabrow|Wardrobe with 3 doors, 180 × 57 × 133 cm|180|133|57|doors=1,n=3,of=wardrobe
PLATSA|cabrow|Wardrobe with 3 doors, 180 × 57 × 181 cm|180|181|57|doors=1,n=3,of=wardrobe
PLATSA|cabrow|Wardrobe with 3 doors, 180 × 42 × 191 cm|180|191|42|doors=1,n=3,of=wardrobe
@@ -1382,6 +1419,7 @@ RÅDMANSÖ|tv|TV bench, 176 × 48 × 66 cm|176|66|48
RÅDMANSÖ|wardrobe|Wardrobe, 118 × 64 × 190 cm|118|190|64
RAGGBERG|shelfbench|Bench with shoe storage, 60 × 35 × 45 cm|60|45|35
RÅGRUND|bench|Bench, 78 × 37 cm|78|47|37
+RÅGRUND|bookcase|Shelving unit, 33 cm|33|163|28
RÅGRUND|open|Shelving unit, 37 × 37 × 104 cm|37|104|37
RÅGRUND|trolley|Trolley, 42 × 33 × 76 cm|42|76|33
RAKKESTAD|sliding|Wardrobe with sliding doors, 117 × 176 cm|117|176|55|slides=2
@@ -1405,6 +1443,8 @@ RELATERA|desk|Desk sit/stand, 90 × 60 cm|101|65|60
RELATERA|desk|Desk, 117 × 60 cm|117|75|60
RELATERA|desk|Desk sit/stand, 117 × 60 cm|128|65|60
RENBERGET|office|Swivel chair|59|108|65|arms=none,seatH=52
+RESARÖ|dropleaf|Mobile drop-leaf table w storage|63|91|64
+RESÖ|kidstable|Children's picnic table|92|49|89
RIAN|side|Side table, 50 × 30 cm|50|50|30
RIDSPÖ|desk|Desk, 140 × 70 cm|140|77|70
RIGGA|clothesrack|Clothes rack|111|175|51
@@ -1427,6 +1467,7 @@ ROSENTORP|office|Swivel chair|67|97|67|arms=none,seatH=57
ROSENTORP|stool|Stool|35|45|35
RUDSTA|cabinet|Glass-door cabinet, 42 × 37 × 155 cm|42|155|37
RUDSTA|cabinet|Glass-door cabinet, 80 × 37 × 120 cm|80|120|37
+RULLEBÖR|trolley|Trolley|34|94|45
SAGESUND|bed|Upholstered bed frame, Standard Double, 135 × 190 cm|150|100|213|m=135,l=190,f=42
SAGESUND|bed|Upholstered bed frame, King, 193 × 203 cm|199|100|225|m=193,l=203,f=42,us=1
SÅGMÄSTARE|cabinet|Cabinet, 83 × 36 × 128 cm|83|128|36
@@ -1446,6 +1487,7 @@ SALTSJÖBADEN|sofa|3-seat sofa|230|85|92|seats=3
SALTSJÖBADEN|swivel|Rocking and swivel armchair|78|98|80|rock=1
SANDKATT|highchair|Highchair with tray|60|91|68
SANDSBERG|chair|Chair|39|77|47|seatH=45
+SEGERÖN|bar|Bar stool, outdoor|53|82|53|us=1|outdoor garden
SEGERÖN|chair|Chair with armrests, outdoor|67|73|63|arms=slim,seatH=46|outdoor garden
SEGERÖN|coffee|Coffee table, outdoor, 73 × 73 cm|73|30|73||outdoor garden
SEGERÖN|corner|Corner sofa, 3-seat|214|76|152|seats=3,arms=wide,seatH=40,corner=left,sd=92,ah=69,bk=43|outdoor garden
@@ -1535,6 +1577,7 @@ SLÄKT|bed|Bed frame with storage, 90 × 200 cm|96|89|206|m=90,f=71
SLÄKT|bed|Bed frame, 90 × 200 cm|96|150|206|m=90,f=57
SLÄKT|bed|Bed frame with storage, Twin, 97 × 191 cm|103|106|196|m=97,l=191,f=71,us=1
SLÄKT|bed|Ext bed frame with slatted bed base, 97 × 190 cm|107|71|199|m=97,l=190,f=46,us=1
+SLÄKT|daybed|Underbed with storage, 90 × 200 cm|201|38|95|m=90
SLATORP|chaise|3-seat sofa with chaise longue|256|75|164|seats=3,arms=wide,seatH=40,chaise=right,sd=95,ah=63,lg=12
SLATORP|chaise|4-seat sofa with chaise longues|326|75|164|seats=4,arms=wide,seatH=40,chaise=both,sd=95,ah=63,aw=18,bk=40,lg=12
SLATORP|sofa|2-seat sofa|176|75|95|seats=2,seatH=40,ah=63,aw=18,bk=40,lg=12,sdp=54
@@ -1550,9 +1593,11 @@ SMÅGÖRA|desk|Desk, 93 × 51 cm|93|88|51||kids children
SMÅGÖRA|open|Shelf unit, 29 × 88 cm|29|88|25||kids children
SMÅGÖRA|wardrobe|Wardrobe, 80 × 50 × 187 cm|80|187|50
SMÄLLEN|office|Swivel chair|65|85|65|arms=none,seatH=52
+SMÅSKRAKE|kidschair|Multi-functional child chair/table|39|39|39|seatH=25
SMÅSTAD|bench|Bench, 90 × 50 × 48 cm|90|48|50||kids children
SMÅSTAD|changing|Changing table/desk, 90 × 79 × 100 cm|90|100|79|shelves=1|kids children
SMÅSTAD|desk|Desk, 90 × 79 × 100 cm|90|100|79||kids children
+SMÅSTAD|loft|Loft bed, Twin, 97 × 191 cm|207|182|99|m=90,us=1
SMÅSTAD|wallcab|Wall cabinet, 60 × 32 × 60 cm|60|60|32||kids children
SMÅSTAD|wallshelf|Wall storage, 60 × 30 × 60 cm|60|60|30||kids children
SMÅSTAD|wardrobe|Wardrobe, 60 × 42 × 181 cm|60|181|42||kids children
@@ -1584,6 +1629,7 @@ SNIGLAR|changing|Changing table, 72 × 53 cm|72|53|72|shelves=2,us=1|kids childr
SNIGLAR|changing|Changing table, 53 × 72 × 87 cm|72|87|53|shelves=2|kids children
SNIGLAR|cot|Cot, 60 × 120 cm|124|80|66|m=60,l=120
SNIGLAR|cot|Crib, 70 × 132 cm|137|84|74|m=70,l=132,us=1
+SÖDERHAMN|armchair|Armchair|105|83|99|seatH=40,us=1,bk=69,lg=14,sdp=48
SÖDERHAMN|chaise|4-seat sofa with chaise longue|285|83|151|seats=4,arms=slim,seatH=40,chaise=right,sd=99,aw=6,bk=69,lg=14
SÖDERHAMN|chaise|4-seat sofa-bed|319|83|151|seats=4,arms=slim,chaise=right,sd=110,lg=15
SÖDERHAMN|corner|Corner sofa, 4-seat|291|83|192|seats=4,arms=slim,seatH=40,corner=left,sd=99,aw=6,bk=69,lg=14,sdp=48
@@ -1637,6 +1683,8 @@ STOCKHOLM 2025|slidecab|Cabinet with sliding doors, 125 × 47 × 110 cm|125|110|
STOCKHOLM 2025|sofa|2-seat sofa|178|70|99|seats=2,seatH=40,aw=32,sdp=64
STOCKHOLM 2025|sofa|3-seat sofa|243|70|99|seats=3,seatH=40,aw=32,sdp=64
STOCKHOLM 2025|sofa|4-seat sofa|308|85|99|seats=4,seatH=40,aw=32,bk=70,sdp=64
+STOCKHOLM 2025|tv|TV bench with sliding doors, 179 × 42 × 56 cm|179|56|42
+STOMSÖ|wallcab|Wall-mounted bedside table, 36 × 29 × 20 cm|36|20|29
STORÅ|loft|Loft bed frame, Full/Double, 137 × 191 cm|203|214|147|m=137,l=191,us=1
STOREDAMM|bench|Bench, 63 × 31 cm|63|41|31
STOREDAMM|open|Shelf unit, 60 × 71 cm|60|71|28|us=1
@@ -1718,6 +1766,7 @@ TÄNNFORSEN / VÄSTERSJÖN|washstand|Wash-stnd w drawers/wash-basin, 102 × 49
TÄRNKULLEN|bed|Upholstered bed frame, Twin, 97 × 191 cm|121|114|200|m=97,l=191,f=41,us=1
TÄRNKULLEN|bed|Upholstered bed frame, Standard Double, 135 × 190 cm|154|112|199|m=135,l=190,f=41
TÄRNKULLEN|bed|Upholstered bed frame, Queen, 152 × 203 cm|176|114|212|m=152,l=203,f=41,us=1
+TÄRNÖ|bench|Bench, outdoor|100|82|46|us=1|outdoor garden
TÄRNÖ|chair|Chair, outdoor|39|79|40|seatH=45|outdoor garden
TÄRNÖ|dining|Table, outdoor, 55 × 54 cm|55|70|54||outdoor garden
TÄRNÖ|stool|Stool, 30 × 42 cm|30|42|30||outdoor garden
@@ -1735,6 +1784,7 @@ TAXÅSKLINT|bed|Bed frame, Standard Double, 135 × 190 cm|143|76|200|m=135,l=190
TEGELÖN|chair|Chair, in/outdoor|58|83|61|seatH=45|outdoor garden
TEGELÖN|dining|Table, outdoor, 216 × 86 cm|216|75|86||outdoor garden
TINGBY|side|Side table on castors, 50 × 50 cm|50|45|50
+TITTEBO|cabinet|Roll-front cabinet, 61 cm|61|60|30|us=1
TJÄRKIL|dining|Extendable table, 180/235/290 × 100 cm|180|75|100
TJUSIG|hatrack|Hat rack, 79 cm|79|25|32
TJUSIG|shelfbench|Bench with shoe storage, 108 × 34 × 50 cm|108|50|34
@@ -1742,6 +1792,7 @@ TJUSIG|shoerack|Shoe rack, 79 × 32 × 37 cm|79|37|32
TOBIAS|chair|Chair|55|82|56|seatH=44
TOLKNING|divider|Room divider, 150 × 170 cm|150|170|25
TOLKNING|lidbox|Pouf with storage|50|41|50|cat=Pouffe with storage,us=1
+TOLKNING|nightstand|Bedside table, 52 cm|52|70|52
TOLKNING|shelfbench|Bench with storage, 120 cm|120|46|37
TONSTAD|bed|Bed frame with storage, Standard Single, 90 × 190 cm|99|116|199|m=90,l=190,f=46
TONSTAD|bed|Bed frame, Standard Single, 90 × 190 cm|99|116|199|m=90,l=190,f=47
@@ -1813,6 +1864,7 @@ TROFAST|open|Frame, 94 × 44 × 91 cm|94|91|44||kids children
TROFAST|open|Frame, 99 × 44 × 56 cm|99|56|44||kids children
TROFAST|wallshelf|Wall storage, 93 × 30 cm|93|30|21||kids children
TROFAST|wallshelf|Wall storage, 99 × 30 cm|99|30|21||kids children
+TROGEN|stool|Children's step stool, 40 × 38 × 33 cm|40|33|38
TROTTEN|cabinet|Cabinet with doors, 70 × 35 × 110 cm|70|110|35
TROTTEN|cabinet|Cabinet with doors, 70 × 35 × 173 cm|70|173|35
TROTTEN|chest|Drawer unit, 34 × 56 cm|34|56|53|rows=4
@@ -1876,11 +1928,13 @@ VÄRMANSÖ|dining|Table, outdoor, 224 × 93 cm|224|75|93||outdoor garden
VÄSMAN|chair|Chair with armrests, outdoor|54|92|59|arms=slim,seatH=44|outdoor garden
VÄSMAN|dining|Extendable table, outdoor, 135/190 × 74 cm|135|75|74||outdoor garden
VASSHOLMEN|chair|Chair, in/outdoor|58|92|60|seatH=46|outdoor garden
+VASSKÄR|shoerack|Shoe rack, 60 cm|60|35|30
VATTENKAR|riser|Desktop shelf, 49 × 15 cm|49|36|15|cat=Desktop shelf
VATTENKAR|riser|Laptop/monitor stand, 52 × 26 cm|52|15|26
VEDBO|armchair|Armchair|73|75|65|seatH=44,lg=24,sdp=48
VEDBO|armchair|High-back armchair|80|108|85|seatH=44,sdp=48
VEINGE|armchair|Easy chair|76|79|92|seatH=41,sdp=49
+VENNGARN|armchair|1.5-seat armchair|126|96|109|seatH=53,us=1,aw=26,lg=8,sdp=70
VENNGARN|sofa|Loveseat|206|96|109|seats=2,seatH=53,us=1,ah=68,aw=26,lg=8,sdp=70
VENNGARN|sofa|Sofa|256|96|109|seats=3,seatH=53,us=1,ah=68,aw=26,bk=68,lg=8,sdp=70
VESKEN|open|Shelf unit, 37 × 23 × 101 cm|37|101|23
@@ -1963,6 +2017,7 @@ VINGSÖN|armchair|Wing chair, in/outdoor|104|144|87|seatH=31,sdp=62|outdoor gard
VINLIDEN|chaise|Sofa with chaise|233|108|162|seats=3,arms=wide,seatH=53,chaise=right,sd=92,us=1,ah=59,lg=9
VISINGSÖ|chair|Chair with armrests|60|83|53|arms=slim,seatH=46|outdoor garden
VISINGSÖ|dining|Table, 70 × 70 cm|70|74|70||outdoor garden
+VISINGSÖ|side|Plant stand, 74 cm|70|74|43
VISKAFORS|armchair|1,5-seat armchair|134|74|90|seatH=46,cat=Armchair,aw=22,lg=11,sdp=60
VISKAFORS|sofa|2-seat sofa|194|74|90|seats=2,seatH=46,aw=22,lg=11,sdp=60
VISKAFORS|sofa|3-seat sofa|224|74|90|seats=3,seatH=46,aw=22,lg=11,sdp=60
@@ -1980,6 +2035,7 @@ VITTSKÄR|coffee|Coffee table, 110 × 58 cm|110|44|58||outdoor garden
VITTSKÄR|corner|3-seat modular corner sofa|258|88|169|seats=3,arms=wide,seatH=48,corner=left,sd=92,ah=79,bk=79,sdp=64|outdoor garden
VITTSKÄR|corner|4-seat modular corner sofa|258|88|258|seats=4,arms=wide,seatH=48,corner=left,sd=92,bk=79,sdp=64|outdoor garden
VITTSKÄR|corner|5-seat modular corner sofa|338|79|258|seats=5,arms=wide,seatH=36,corner=left,sd=92,sdp=80|outdoor garden
+VITTSKÄR|dining|Table, 187 cm|187|74|187
VITTSKÄR|dining|Table, 264 × 96 cm|264|74|96||outdoor garden
VITTSKÄR|section|1-seat section for modular sofa|80|36|80|seats=1|outdoor garden
VITTSKÄR|section|Modular chaise longue|80|83|169|seats=1,seatH=36,bk=79|outdoor garden
@@ -1990,7 +2046,9 @@ VITTSKÄR|sofa|2-seat modular sofa|178|88|89|seats=2,seatH=48,sdp=64|outdoor gar
VITTSKÄR|sofa|3-seat modular sofa|240|79|89|seats=3,seatH=36,sdp=80|outdoor garden
VITTSKÄR|sofa|3-seat sofa|240|88|89|seats=3,seatH=48,sdp=64|outdoor garden
VITVAL|bunk|Bunk bed frame, Twin, 97 × 191 cm|197|162|103|m=97,l=191,us=1
+VITVAL|bunk|Bunk bed frame with underbed, 90 × 200 cm|207|162|97|m=90
VITVAL|bunk|Bunk bed frame, 90 × 200 cm|207|162|97|m=90
+VITVAL|daybed|Underbed, 90 × 200 cm|200|20|90|m=90
VITVAL|loft|Loft bed frame, Twin, 97 × 191 cm|197|195|103|m=97,l=191,us=1
VITVAL|loft|Loft bed frame, 90 × 200 cm|207|195|97|m=90
VOXLÖV|chair|Chair|43|85|53|seatH=46,us=1
@@ -1999,4 +2057,6 @@ VRETSTORP|sofa|3-seat sofa-bed|244|91|96|seats=3,seatH=46,sdp=52
VUKU|wardrobe|Wardrobe, 74 × 51 × 149 cm|74|149|51|us=1
YNGVAR|chair|Chair|53|71|51|seatH=46
YNGVAR|stool|Bar stool, 75 cm|53|99|51
-YXSTABY|riser|Gaming monitor stand, 98 × 27 × 16 cm|98|16|27|cat=Monitor stand`;
+YXSTABY|riser|Gaming monitor stand, 98 × 27 × 16 cm|98|16|27|cat=Monitor stand
+YXSTABY|side|Gaming side table on castors|50|55|50
+YXSTABY|stool|Gaming thumbstick stool|40|45|40`;
diff --git a/src/lib/plan/families/bergmund.ts b/src/lib/plan/families/bergmund.ts
index 99ab8a8..807b39f 100644
--- a/src/lib/plan/families/bergmund.ts
+++ b/src/lib/plan/families/bergmund.ts
@@ -1,5 +1,5 @@
import type { Family } from "./family";
-import type { CustomFix, CustomParams, CustomPart, PartItem, ProductSpec, Vec3 } from "../../types";
+import type { CustomFix, CustomParams, CustomPart, PartItem, PartPiece, ProductSpec, Vec3 } from "../../types";
import { buildCustom } from "../custom";
/**
@@ -99,9 +99,91 @@ function chair(s: ProductSpec): CustomParams {
};
}
+
+/**
+ * The bar stool with backrest, from its frame and cover manuals. Upside down on a rug, the left leg frame drops into
+ * the seat's corner brackets and takes one bolt, the right one (with the footrest) hooks on and takes another. On its
+ * side, the backrest slides in at the back, two bolts hold the back corners and two screws hold its tabs to the back
+ * legs. Stood up, all four bolts are tightened, then the cover goes on over the backrest and seat.
+ */
+function barStool(s: ProductSpec): CustomParams {
+ // IKEA: 45 wide, 48 deep, 97 high, seat 62 high and 37 deep (the catalogue size is off, so these are drawn)
+ const W = 450, D = 480, H = 970;
+ void s;
+ const L = 40, seatTop = 620, seatBot = 490, apron = 70, BT = 70;
+ const zb0 = -D / 2 + BT; // the backrest's front face, where the seat starts
+ const SD = D / 2 - zb0;
+ const sz0 = (D / 2 + zb0) / 2;
+ const legTop = seatBot + apron;
+ const xl = W / 2 - 20 - L / 2, zf = D / 2 - 20 - L / 2, zb = zb0 + 20 + L / 2;
+ const railY = 330, footY = 200;
+ const seat: PartPiece[] = [
+ { shape: "box", size: [W, seatTop - legTop, SD], pos: [0, (seatTop + legTop) / 2 - (seatTop + seatBot) / 2, 0] },
+ ...[-1, 1].map((g): PartPiece => ({ shape: "box", size: [20, apron, SD], pos: [g * (W / 2 - 10), seatBot + apron / 2 - (seatTop + seatBot) / 2, 0] })),
+ ...[-1, 1].map((g): PartPiece => ({ shape: "box", size: [W - 40, apron, 20], pos: [0, seatBot + apron / 2 - (seatTop + seatBot) / 2, g * (SD / 2 - 10)] })),
+ ];
+ const fm = legTop / 2;
+ const frame = (sx: number, foot: boolean): PartPiece[] => [
+ ...[zf, zb].map((z): PartPiece => ({ shape: "box", size: [L, legTop, L], pos: [0, 0, z - (zf + zb) / 2] })),
+ { shape: "box", size: [25, 40, zf - zb - L], pos: [0, railY - fm, 0] },
+ ...(foot ? [{ shape: "box", size: [2 * xl - L, 40, 25], pos: [-sx * xl, footY - fm, zf - (zf + zb) / 2] } as PartPiece] : []),
+ ];
+ const parts: CustomPart[] = [
+ { id: "SEAT", name: "Seat", size: [W, seatTop - seatBot, SD], pos: [0, (seatTop + seatBot) / 2, sz0], material: "soft", pieces: seat },
+ { id: "LF", name: "Left leg frame", size: [L, legTop, zf - zb + L], pos: [-xl, fm, (zf + zb) / 2], material: "wood", pieces: frame(-1, false) },
+ { id: "RF", name: "Right leg frame with footrest", size: [2 * xl + L, legTop, zf - zb + L], pos: [xl, fm, (zf + zb) / 2], material: "wood", pieces: frame(1, true) },
+ { id: "BACK", name: "Backrest", size: [W, H - seatBot + 30, BT], pos: [0, (H + seatBot - 30) / 2, zb0 - BT / 2], material: "soft" },
+ ];
+ // each bolt goes diagonally through the corner bracket inside the seat's frame into the inner corner of its leg
+ const bolt = (sx: number, z: number, sz: number, leg: string): CustomFix[] => {
+ const at: Vec3 = [sx * (xl - 42), legTop - 30, z - sz * 42], dir: Vec3 = [sx * Math.SQRT1_2, 0, sz * Math.SQRT1_2];
+ return [
+ fx("washer", [at], dir, "SEAT", { name: "Spring washer", len: 2, dia: 12, mate: leg }),
+ fx("washer", [at], dir, "SEAT", { len: 1.5, dia: 16, mate: leg }),
+ fx("bolt", [at], dir, "SEAT", { ...BOLT, mate: leg }),
+ ];
+ };
+ return {
+ parts,
+ steps: [
+ {
+ title: "Push the left leg frame into the seat",
+ detail: "Lay the seat upside down on a rug. Each leg's notched end drops down over the bracket in a corner.",
+ add: ["SEAT", "LF"],
+ pose: "-y",
+ warnings: ["floor"],
+ },
+ { title: "Bolt the front corner by hand", detail: "A spring washer and a washer on the bolt, then turn it in through the bracket with your fingers.", fix: bolt(-1, zf, 1, "LF"), warnings: ["loose"] },
+ { title: "Push the right leg frame in", detail: "Its legs drop into the other two corners and the footrest hooks onto the left front leg. Press it down until it clicks.", add: ["RF"] },
+ { title: "Bolt its front corner by hand", detail: "Washers first, fingers only for now.", fix: bolt(1, zf, 1, "RF"), warnings: ["loose"] },
+ {
+ title: "Slide the backrest in",
+ detail: "Lay the stool on its side. Push the backrest's two prongs into the back of the seat frame.",
+ add: ["BACK"],
+ pose: "+x",
+ from: { BACK: [0, 0, -300] },
+ },
+ { title: "Bolt the back corners by hand", detail: "Two more bolts, each with a spring washer and a washer.", fix: [...bolt(-1, zb, -1, "LF"), ...bolt(1, zb, -1, "RF")], warnings: ["loose"] },
+ {
+ title: "Screw the backrest to the back legs",
+ detail: "Check both tabs at its foot sit in the slots in the legs, then drive a screw through each with the bit.",
+ fix: [{ kind: "screw", count: 2, len: 50, dia: 5, on: "BACK", at: [-1, 1].map((g): Vec3 => [g * xl, seatBot - 10, -D / 2]), dir: [0, 0, 1] }],
+ tools: ["screwdriver"],
+ },
+ { title: "Stand it up and tighten the bolts", detail: "On a flat floor, tighten all four bolts firmly with the Allen key.", pose: "+y", tools: ["allen"], check: "square" },
+ { title: "Pull the cover over the backrest", detail: "Seams to the sides, then ease it down the back and over the seat." },
+ { title: "Tuck in and fasten the cover", detail: "Push the flaps into the gap between seat and backrest, then turn the stool over on a table and fasten the cover under the seat." },
+ ],
+ };
+}
+
const family: Family = {
names: ["BERGMUND"],
build(b, s) {
+ if (/bar-stool-backrest/.test(s.slug ?? "")) {
+ buildCustom(b, { ...s, custom: barStool(s) });
+ return true;
+ }
if (!/chair/i.test(`${s.variant} ${s.slug ?? ""}`) || /arm/i.test(s.variant)) return false;
const r = chair(s);
buildCustom(b, { ...s, custom: r });
diff --git a/src/lib/plan/families/besta.ts b/src/lib/plan/families/besta.ts
index 5e12d10..066fb98 100644
--- a/src/lib/plan/families/besta.ts
+++ b/src/lib/plan/families/besta.ts
@@ -698,7 +698,8 @@ function guideOf(s: ProductSpec): Guide | null {
const yb = legH || FOOT_H;
const f: Frame = { p: "A", cx: 0, W, H: Hf, D, yb, build, cols };
const g: Guide = { frames: [f], legH, doors: [], drawers: [], shelves: [], stops: [] };
- const doors = /doors?/i.test(s.variant) || (s.cabinet?.doors ?? 0) > 0;
+ // the cabinet unit is the open frame with shelves and legs: its doors are sold apart
+ const doors = !/^besta-cabinet-unit/.test(slug) && (/doors?/i.test(s.variant) || (s.cabinet?.doors ?? 0) > 0);
const drawers = /drawers/i.test(s.variant);
const hingeOf = (c: number): -1 | 1 => (cols > 1 && c === cols - 1 ? 1 : -1);
const inner = Hf - 2 * T;
diff --git a/src/lib/plan/families/billy.ts b/src/lib/plan/families/billy.ts
index 089ff0e..926b955 100644
--- a/src/lib/plan/families/billy.ts
+++ b/src/lib/plan/families/billy.ts
@@ -607,9 +607,270 @@ function drawerKit(k: Kit, u: Unit, f: Frame) {
);
}
+/* ---------- the bookcase with a foldable table ---------- */
+
+/**
+ * Its own manual, in two bags. The bookcase: a shelf box (top, fixed shelf and a board back between them) is
+ * built first, then it and a low back rail stand on one side lying on the floor and the other side goes on; it is
+ * fixed to the wall with two brackets under the fixed shelf. The rolling unit is a small open bookcase built the
+ * same way on its side, with a hardboard back held by push pins, castors at the front and back and a castor arm
+ * underneath. The table is two boards hinged together: rollers on the back board run in curved tracks in the
+ * bookcase sides, the front board is the unit's top. Drawn unfolded, as in the photo.
+ */
+function foldTable(k: Kit): boolean {
+ const { b } = k;
+ const W = 800, H = 1060, D = 325;
+ const Wi = W - 2 * T, xi = Wi / 2;
+ const zbk = -D / 2;
+ const sx2 = [-1, 1];
+
+ // the bookcase
+ const sideL = k.part("Side", [T, H, D], [-W / 2 + T / 2, H / 2, 0]);
+ const sideR = k.part("Side", [T, H, D], [W / 2 - T / 2, H / 2, 0]);
+ const yTop = H - T / 2, ySh = 790;
+ const top = k.part("Top", [Wi, T, D], [0, yTop, 0]);
+ const shelf = k.part("Fixed shelf", [Wi, T, D], [0, ySh, 0]);
+ const bY0 = ySh + T / 2, bY1 = H - T, zB = zbk + T / 2;
+ const back = k.part("Shelf back", [Wi, bY1 - bY0, T], [0, (bY0 + bY1) / 2, zB]);
+ const rail = k.part("Bottom rail", [Wi, PL, T], [0, PL / 2, zB]);
+
+ // the rolling unit, in front of the bookcase with the table unfolded
+ const UW = 760, UWi = UW - 2 * T, ux = UW / 2 - T / 2;
+ const uB = 659, uF = 939; // back (hardboard) and front
+ const uD = uF - (uB + 3), uz = (uB + 3 + uF) / 2;
+ const uTop = 728, uBot = 20;
+ const uSideL = k.part("Unit side", [T, uTop - uBot, uD], [-ux, (uTop + uBot) / 2, uz]);
+ const uSideR = k.part("Unit side", [T, uTop - uBot, uD], [ux, (uTop + uBot) / 2, uz]);
+ const rY0 = 58, zR = uF - 20 - T / 2, yR = rY0 + PL / 2;
+ const uRail = k.part("Castor rail", [UWi, PL, T], [0, yR, zR]);
+ const uBY = rY0 + PL + T / 2, uSY = 430;
+ const uBottom = k.part("Unit bottom", [UWi, T, uD], [0, uBY, uz]);
+ const uShelf = k.part("Unit shelf", [UWi, T, uD], [0, uSY, uz]);
+ const uBackP = k.part("Unit back", [UW, uTop - (uBY - T / 2), 3], [0, (uTop + uBY - T / 2) / 2, uB + 1.5], { material: "fiber" });
+
+ // the table: the back board's rollers sit just inside the bookcase sides, the front board is the unit's top
+ const yT = uTop + T / 2, lz0 = 140;
+ const leaf = k.part("Table back board", [UW, T, uB - lz0], [0, yT, (lz0 + uB) / 2]);
+ const front = k.part("Table front board", [UW, T, uF - uB], [0, yT, (uB + uF) / 2]);
+
+ const SCREW: HwDef = { kind: "screw", len: 12, dia: 5 };
+ const SMALL_DOWEL: HwDef = { kind: "dowel", len: 25, dia: 6 };
+ const BOLT: HwDef = { kind: "bolt", len: 12, dia: 6 };
+ const BRAKE: HwDef = { kind: "castor", len: 58, dia: 50, name: "Castor with brake" };
+ const WHEEL: HwDef = { kind: "castor", len: 58, dia: 44, name: "Back wheel" };
+ const ARM: HwDef = { kind: "castor", len: uBY - T / 2, dia: 60, name: "Castor arm" };
+ const ROLLER: HwDef = { kind: "plate", len: 4, dia: 50, name: "Roller plate" };
+ const WALLPLATE: HwDef = { kind: "plate", len: 3, dia: 40, name: "Wall plate" };
+ const COVER: HwDef = { kind: "cap", len: 30, dia: 50, name: "Bracket cover" };
+ const PLUG: HwDef = { kind: "plug", len: 20, dia: 6, name: "Expanding plug" };
+ const PUSH: HwDef = { kind: "pin", len: 22, dia: 4, name: "Locking pin" };
+
+ // a sub-assembly built in its own scene sits where it ends up, moved to the middle of that scene
+ const put = (key: string, shift: Vec3, from?: Vec3) => {
+ const p = b.partItem(key).final;
+ b.stage(key, [p.pos[0] + shift[0], p.pos[1] + shift[1], p.pos[2] + shift[2]], p.rot, from);
+ };
+ const flatRow = (list: [string, Vec3][]) => {
+ b.stagger(0.12);
+ list.forEach(([key, rot], i) => b.stage(key, [0, T / 2, (i - (list.length - 1) / 2) * 420], rot));
+ b.then(0.15);
+ };
+ const FLAT: Vec3 = [0, 0, 0], UPRIGHT: Vec3 = [Math.PI / 2, 0, 0], SIDEWAYS: Vec3 = [0, 0, Math.PI / 2];
+ const ends = (key: string, half: number, y: number, zs: number[], def: HwDef = HW.dowel): void =>
+ k.fits(def, sx2.flatMap((sx) => zs.map((z) => ({ on: key, at: [sx * half, y, z] as Vec3, dir: [-sx, 0, 0] as Vec3 }))));
+
+ /* bag 1: the bookcase */
+ const dz = D / 2 - 35, bz = D / 2 - 75;
+ const yBk = [bY0 + 32, bY1 - 32], yBkBolt = [bY0 + 82, bY1 - 82];
+ const xEdge = [-150, 150], xEdgeBolt = [-250, 250];
+ k.step({ title: "Tap the dowels into the top, the fixed shelf and the shelf back", detail: "Two into each end of all three, and two into each long edge of the shelf back.", kind: "dowels", tools: ["hammer"], scene: "pieces", warnings: ["floor"] }, () => {
+ flatRow([[top, FLAT], [shelf, FLAT], [back, UPRIGHT]]);
+ ends(top, xi, yTop, [-dz, dz]);
+ ends(shelf, xi, ySh, [-dz, dz]);
+ k.fits(HW.dowel, [
+ ...sx2.flatMap((sx) => yBk.map((y) => ({ on: back, at: [sx * xi, y, zB] as Vec3, dir: [-sx, 0, 0] as Vec3 }))),
+ ...xEdge.map((x) => ({ on: back, at: [x, bY1, zB] as Vec3, dir: [0, -1, 0] as Vec3 })),
+ ...xEdge.map((x) => ({ on: back, at: [x, bY0, zB] as Vec3, dir: [0, 1, 0] as Vec3 })),
+ ]);
+ });
+ k.step({ title: "Screw the cam bolts into the top and the fixed shelf", detail: "Two into each, in the holes near the back edge. Turn them in until they stop.", kind: "cams", tools: ["screwdriver"], scene: "pieces" }, () =>
+ k.fits(HW.camScrew, [
+ ...xEdgeBolt.map((x) => ({ on: top, at: [x, bY1, zB] as Vec3, dir: [0, 1, 0] as Vec3, mate: back })),
+ ...xEdgeBolt.map((x) => ({ on: shelf, at: [x, bY0, zB] as Vec3, dir: [0, -1, 0] as Vec3, mate: back })),
+ ]),
+ );
+ const box: Vec3 = [0, -(bY0 - T), 0];
+ k.step({ title: "Stand the shelf back on the fixed shelf", detail: "Along its back edge, onto the two dowels and the two cam bolts.", kind: "join", scene: "box" }, () => {
+ put(shelf, box);
+ b.then(0.15);
+ put(back, box, [0, 300, 0]);
+ });
+ k.step({ title: "Lower the top onto the shelf back", detail: "One of you at each end, every dowel and bolt into its hole.", kind: "join", scene: "box", people: 2 }, () => put(top, box, [0, 300, 0]));
+ k.step({ title: "Turn the cam locks in the shelf back", detail: "Four, two at the top and two at the bottom. Then turn the box over.", kind: "cams", tools: ["screwdriver"], scene: "box" }, () =>
+ k.fits(HW.cam, [bY1 - 25, bY0 + 25].flatMap((y) => xEdgeBolt.map((x) => ({ on: back, at: [x, y, zB + T / 2] as Vec3, dir: [0, 0, -1] as Vec3 })))),
+ );
+
+ // each side takes seven cam bolts: two each for the top and the fixed shelf, two for the shelf back, one for the rail
+ const yRailBolt = 38, yRailDowel = 16;
+ const joints: { piece: string; y: number; z: number; lock: (sx: number) => FitOpts }[] = [];
+ for (const [piece, y] of [[top, yTop], [shelf, ySh]] as const)
+ for (const z of [-bz, bz]) joints.push({ piece, y, z, lock: (sx) => ({ on: piece, at: [sx * (xi - 25), y - T / 2, z], dir: [0, 1, 0] }) });
+ for (const y of yBkBolt) joints.push({ piece: back, y, z: zB, lock: (sx) => ({ on: back, at: [sx * (xi - 25), y, zB + T / 2], dir: [0, 0, -1] }) });
+ joints.push({ piece: rail, y: yRailBolt, z: zB, lock: (sx) => ({ on: rail, at: [sx * (xi - 25), yRailBolt, zB + T / 2], dir: [0, 0, -1] }) });
+ const bolts = (sx: number): FitOpts[] => joints.map((j) => ({ on: sx < 0 ? sideL : sideR, at: [sx * xi, j.y, j.z] as Vec3, dir: [sx, 0, 0] as Vec3, mate: j.piece }));
+ const locks = (sx: number) => k.fits(HW.cam, joints.map((j) => j.lock(sx)));
+
+ k.step({ title: "Screw the cam bolts into both sides", detail: "Seven into each side. Turn them in until they stop.", kind: "cams", tools: ["screwdriver"], scene: "sides" }, () => {
+ flatRow([[sideL, SIDEWAYS], [sideR, SIDEWAYS]]);
+ k.fits(HW.camScrew, [...bolts(-1), ...bolts(1)]);
+ });
+ const up: Vec3 = [420, 0, 0];
+ k.step({ title: "Lay one side down and stand the shelf box on it", detail: "At the top end of the side, the shelf back along the back edge.", kind: "join", pose: "+x", warnings: ["floor"] }, () => {
+ b.add(sideL, [0, 0, 0]);
+ b.then(0.15);
+ b.stagger(0);
+ for (const key of [shelf, back, top]) b.add(key, up);
+ });
+ k.step({ title: "Tap the dowels into the bottom rail", detail: "One into each end.", kind: "dowels", tools: ["hammer"], scene: "rail", warnings: ["floor"] }, () => {
+ flatRow([[rail, UPRIGHT]]);
+ ends(rail, xi, yRailDowel, [zB]);
+ });
+ k.step({ title: "Stand the bottom rail on the side", detail: "At the bottom end, along the back edge.", kind: "join", pose: "+x" }, () => b.add(rail, up));
+ k.step({ title: "Turn the cam locks", detail: "Seven, arrow towards the bolt, then clockwise until each piece pulls tight to the side.", kind: "cams", tools: ["screwdriver"], pose: "+x" }, () => locks(-1));
+ k.step({ title: "Lower the other side on", detail: "Guide every dowel and cam bolt into its hole, then press it down evenly.", kind: "join", pose: "+x" }, () => b.add(sideR, [460, 0, 0]));
+ k.step({ title: "Turn the other cam locks", detail: "All seven, the same way as on the first side.", kind: "cams", tools: ["screwdriver"], pose: "+x" }, () => locks(1));
+
+ const yBr = 750, zBr = zbk + 28;
+ k.step(
+ { title: "Stand it against the wall and screw on the brackets", detail: "One inside each side, just under the fixed shelf at the back, with two screws.", kind: "screws", tools: ["screwdriver"], wall: true },
+ () => {
+ k.fits(named(b, HW.bracket, "Wall bracket"), sx2.map((sx) => ({ on: sx < 0 ? sideL : sideR, at: [sx * xi, yBr, zBr] as Vec3, dir: [sx, 0, 0] as Vec3, hole: false as const })));
+ k.fits(SCREW, sx2.flatMap((sx) => [zBr - 12, zBr + 12].map((z) => ({ on: sx < 0 ? sideL : sideR, at: [sx * xi, yBr, z] as Vec3, dir: [sx, 0, 0] as Vec3 }))));
+ },
+ );
+ k.step(
+ { title: "Fix the brackets to the wall", detail: `A wall plate on each bracket, then a screw through it into the wall. Use pan head screws. ${WALL_DETAIL}`, kind: "anchor", tools: ["drill", "screwdriver", "pencil"], wall: true, warnings: ["wall", "tip"] },
+ () => {
+ const at = (sx: number, dzz: number): FitOpts => ({ on: sx < 0 ? sideL : sideR, at: [sx * (xi - 20), yBr, zbk + dzz], dir: [0, 0, -1], hole: false });
+ k.fits(WALLPLATE, sx2.map((sx) => at(sx, 4)));
+ k.fits(HW.plug, sx2.map((sx) => at(sx, 0)));
+ k.fits(HW.wallScrew, sx2.map((sx) => at(sx, 6)));
+ },
+ );
+ k.step({ title: "Clip the covers over the brackets", detail: "One on each, pressed on until it sits flat.", kind: "general", wall: true }, () =>
+ k.fits(COVER, sx2.map((sx) => ({ on: sx < 0 ? sideL : sideR, at: [sx * (xi - 20), yBr, zBr], dir: [sx, 0, 0] as Vec3, hole: false as const }))),
+ );
+
+ /* bag 2: the rolling unit */
+ const uh = UWi / 2;
+ const udz = [uz - 105, uz + 105], ubz = [uz - 65, uz + 65];
+ const topDowelZ = [uz - 40, uz + 40], topBoltZ = [uz - 95, uz + 95];
+ const ushift: Vec3 = [0, 0, -uz];
+ const sideTopDowels = (side: string, sx: number) => k.fits(HW.dowel, topDowelZ.map((z) => ({ on: side, at: [sx * ux, uTop, z] as Vec3, dir: [0, -1, 0] as Vec3 })));
+ const uJoints: { piece: string; y: number; z: number; lock: (sx: number) => FitOpts }[] = [];
+ for (const [piece, y, face] of [[uBottom, uBY, -1], [uShelf, uSY, 1]] as const)
+ for (const z of ubz) uJoints.push({ piece, y, z, lock: (sx) => ({ on: piece, at: [sx * (uh - 25), y - (face * T) / 2, z], dir: [0, face, 0] }) });
+ uJoints.push({ piece: uRail, y: yR, z: zR, lock: (sx) => ({ on: uRail, at: [sx * (uh - 25), yR, zR - T / 2], dir: [0, 0, 1] }) });
+ const uBolts = (sx: number) => k.fits(HW.camScrew, uJoints.map((j) => ({ on: sx < 0 ? uSideL : uSideR, at: [sx * uh, j.y, j.z] as Vec3, dir: [sx, 0, 0] as Vec3, mate: j.piece })));
+ const uLocks = (sx: number) => k.fits(HW.cam, uJoints.map((j) => j.lock(sx)));
+
+ k.step({ title: "Tap the dowels into the unit's bottom, shelf and one side", detail: "Two into each end of the bottom and the shelf, two into the top end of the side.", kind: "dowels", tools: ["hammer"], scene: "unit-a", warnings: ["floor"] }, () => {
+ flatRow([[uBottom, FLAT], [uShelf, FLAT], [uSideL, SIDEWAYS]]);
+ ends(uBottom, uh, uBY, udz);
+ ends(uShelf, uh, uSY, udz);
+ sideTopDowels(uSideL, -1);
+ });
+ k.step({ title: "Screw the cam bolts into that side", detail: "Five: two for the bottom, two for the shelf and one for the castor rail.", kind: "cams", tools: ["screwdriver"], scene: "unit-a" }, () => uBolts(-1));
+ const uup: Vec3 = [380, 0, 0];
+ k.step({ title: "Lay the side down and stand the bottom and shelf on it", detail: "Cam bolts facing up, the cam lock holes towards the open front.", kind: "join", scene: "unit", pose: "+x", warnings: ["floor"] }, () => {
+ put(uSideL, ushift);
+ b.then(0.15);
+ put(uBottom, ushift, uup);
+ put(uShelf, ushift, uup);
+ });
+ k.step({ title: "Tap the small dowels into the castor rail", detail: "Two into each end. These are the short, thin dowels.", kind: "dowels", tools: ["hammer"], scene: "unit-rail", warnings: ["floor"] }, () => {
+ flatRow([[uRail, UPRIGHT]]);
+ k.fits(SMALL_DOWEL, sx2.flatMap((sx) => [yR - 20, yR + 20].map((y) => ({ on: uRail, at: [sx * uh, y, zR] as Vec3, dir: [-sx, 0, 0] as Vec3 }))));
+ });
+ const cx = uh - 45;
+ k.step({ title: "Bolt the castors with brakes onto the rail", detail: "One at each end, two bolts in each. Tighten them with the Allen key.", kind: "legs", tools: ["allen"], scene: "unit-rail" }, () => {
+ k.fits(BRAKE, sx2.map((sx) => ({ on: uRail, at: [sx * cx, rY0, zR] as Vec3, dir: [0, 1, 0] as Vec3, hole: false as const })));
+ k.fits(BOLT, sx2.flatMap((sx) => [-14, 14].map((d) => ({ on: uRail, at: [sx * cx + d, yR, zR + T / 2] as Vec3, dir: [0, 0, -1] as Vec3 }))));
+ });
+ k.step({ title: "Stand the castor rail on the side", detail: "At the bottom end of the front edge, castors pointing out.", kind: "join", scene: "unit", pose: "+x" }, () => put(uRail, ushift, uup));
+ k.step({ title: "Turn the cam locks", detail: "Five, until the bottom, shelf and rail pull tight to the side.", kind: "cams", tools: ["screwdriver"], scene: "unit", pose: "+x" }, () => uLocks(-1));
+ k.step({ title: "Tap two dowels into the other side", detail: "Into its top end.", kind: "dowels", tools: ["hammer"], scene: "unit-b", warnings: ["floor"] }, () => {
+ flatRow([[uSideR, SIDEWAYS]]);
+ sideTopDowels(uSideR, 1);
+ });
+ k.step({ title: "Screw the cam bolts into the other side", detail: "Five, the same holes as on the first side.", kind: "cams", tools: ["screwdriver"], scene: "unit-b" }, () => uBolts(1));
+ k.step({ title: "Lower the other side on", detail: "Every dowel and cam bolt into its hole, then press it down evenly.", kind: "join", scene: "unit", pose: "+x" }, () => put(uSideR, ushift, [420, 0, 0]));
+ k.step({ title: "Turn the other cam locks", detail: "All five, the same way.", kind: "cams", tools: ["screwdriver"], scene: "unit", pose: "+x" }, () => uLocks(1));
+ k.step({ title: "Lay it on its front and slide the back in", detail: "On a rug. Push the hardboard back in from the top until it stops at the bottom.", kind: "join", scene: "unit", pose: "-z", warnings: ["floor"] }, () => put(uBackP, ushift, [0, 650, 0]));
+ const wx = uh - 25, wz = uB + 3 + 40;
+ k.step({ title: "Screw the back wheels on", detail: "One inside each back corner at the bottom, two screws in each.", kind: "legs", tools: ["screwdriver"], scene: "unit", pose: "-z" }, () => {
+ k.fits(WHEEL, sx2.map((sx) => ({ on: sx < 0 ? uSideL : uSideR, at: [sx * wx, rY0, wz] as Vec3, dir: [0, 1, 0] as Vec3, hole: false as const })));
+ k.fits(SCREW, sx2.flatMap((sx) => [wz - 12, wz + 12].map((z) => ({ on: sx < 0 ? uSideL : uSideR, at: [sx * uh, rY0 - 14, z] as Vec3, dir: [sx, 0, 0] as Vec3 }))));
+ });
+ const pinAt: { x: number; y: number; mate: string }[] = [
+ ...sx2.flatMap((sx) => [250, 480, 690].map((y) => ({ x: sx * ux, y, mate: sx < 0 ? uSideL : uSideR }))),
+ ...[-250, 0, 250].map((x) => ({ x, y: uSY, mate: uShelf })),
+ ...[-250, 0, 250].map((x) => ({ x, y: uBY, mate: uBottom })),
+ ];
+ k.step({ title: "Fix the back with the push pins", detail: "Twelve: push a plug through each hole in the back, then press a pin into it.", kind: "general", scene: "unit", pose: "-z" }, () => {
+ k.fits(PLUG, pinAt.map((p) => ({ on: uBackP, at: [p.x, p.y, uB] as Vec3, dir: [0, 0, 1] as Vec3, mate: p.mate })));
+ k.fits(PUSH, pinAt.map((p) => ({ on: uBackP, at: [p.x, p.y, uB - 1] as Vec3, dir: [0, 0, 1] as Vec3, hole: false as const })));
+ });
+ const az = uB + 3 + 45, yUnder = uBY - T / 2;
+ k.step({ title: "Screw the castor arm under the bottom", detail: "In the middle at the back, four screws.", kind: "legs", tools: ["screwdriver"], scene: "unit", pose: "-z" }, () => {
+ k.fits(ARM, [{ on: uBottom, at: [0, yUnder, az], dir: [0, 1, 0], hole: false }]);
+ k.fits(SCREW, [-20, 20].flatMap((x) => [az - 15, az + 15].map((z) => ({ on: uBottom, at: [x, yUnder, z] as Vec3, dir: [0, 1, 0] as Vec3 }))));
+ });
+
+ /* the table top, upside down on a rug */
+ const tshift: Vec3 = [0, -(uTop), -(lz0 + uF) / 2];
+ const yU = uTop; // the boards' undersides
+ const rx = UW / 2 - 40, rz = lz0 + 35;
+ k.step({ title: "Screw the roller plates onto the back board", detail: "Underside up, one at each corner of the back edge, rollers facing out. Four screws in each.", kind: "screws", tools: ["screwdriver"], scene: "table", pose: "-y", warnings: ["floor"] }, () => {
+ put(leaf, tshift);
+ b.then(0.15);
+ k.fits(ROLLER, sx2.map((sx) => ({ on: leaf, at: [sx * rx, yU, rz] as Vec3, dir: [0, 1, 0] as Vec3, hole: false as const })));
+ k.fits(SCREW, sx2.flatMap((sx) => [-14, 14].flatMap((d) => [-14, 14].map((e) => ({ on: leaf, at: [sx * rx + d, yU, rz + e] as Vec3, dir: [0, 1, 0] as Vec3 })))));
+ });
+ k.step({ title: "Lay the front board against it", detail: "Underside up too, the long edges pushed together.", kind: "join", scene: "table", pose: "-y" }, () => put(front, tshift, [0, 0, 250]));
+ const hx = UW / 2 - 130;
+ k.step({ title: "Screw the hinges across the joint", detail: "Two hinges, eight screws in each: four into each board.", kind: "hinges", tools: ["screwdriver"], scene: "table", pose: "-y" }, () => {
+ k.fits(HW.hinge, sx2.map((sx) => ({ on: leaf, at: [sx * hx, yU, uB] as Vec3, dir: [0, 1, 0] as Vec3, hole: false as const })));
+ k.fits(SCREW, sx2.flatMap((sx) => [-16, 16].flatMap((d) => [-1, 1].flatMap((side) => [14, 34].map((e) => ({ on: side < 0 ? leaf : front, at: [sx * hx + d, yU, uB + side * e] as Vec3, dir: [0, 1, 0] as Vec3 }))))));
+ });
+ k.step({ title: "Screw the cam bolts into the front board", detail: "Four, two near each end. Keep your fingers clear of the hinges when you fold it.", kind: "cams", tools: ["screwdriver"], scene: "table", pose: "-y", warnings: ["hand"] }, () =>
+ k.fits(HW.camScrew, sx2.flatMap((sx) => topBoltZ.map((z) => ({ on: front, at: [sx * ux, yU, z] as Vec3, dir: [0, 1, 0] as Vec3, mate: sx < 0 ? uSideL : uSideR })))),
+ );
+
+ /* together */
+ const lift: Vec3 = [0, 90, 0];
+ k.step({ title: "Hook the table top into the tracks", detail: "Back board first: drop each roller into the top of the curved track inside the sides, then hold the front board up.", kind: "join" }, () => {
+ b.stagger(0);
+ put(leaf, lift, [0, 0, 400]);
+ put(front, lift, [0, 0, 400]);
+ });
+ k.step({ title: "Roll the unit in and lower the table onto it", detail: "Push the unit under the front board, then let the board down onto its dowels and cam bolts.", kind: "join" }, () => {
+ b.stagger(0);
+ for (const key of [uSideL, uSideR, uBottom, uShelf, uRail, uBackP]) b.add(key, [0, 0, 600]);
+ b.then(0.2);
+ b.add(leaf, lift);
+ b.add(front, lift);
+ });
+ k.step({ title: "Turn the cam locks under the table top", detail: "Four, two inside each side of the unit, until the front board pulls tight.", kind: "cams", tools: ["screwdriver"] }, () =>
+ k.fits(HW.cam, sx2.flatMap((sx) => topBoltZ.map((z) => ({ on: sx < 0 ? uSideL : uSideR, at: [sx * (ux - T / 2), uTop - 25, z] as Vec3, dir: [sx, 0, 0] as Vec3 })))),
+ );
+ return true;
+}
+
/* ---------- putting one unit together, in the manuals' order ---------- */
function build(b: PlanBuilder, s: ProductSpec): boolean {
+ if (/foldable table/i.test(s.variant)) return foldTable(new Kit(b));
const u = unitOf(s);
if (!u) return combo(b, s);
const k = new Kit(b);
diff --git a/src/lib/plan/families/bockon.ts b/src/lib/plan/families/bockon.ts
new file mode 100644
index 0000000..8d6fb35
--- /dev/null
+++ b/src/lib/plan/families/bockon.ts
@@ -0,0 +1,145 @@
+import type { Family } from "./family";
+import type { CustomFix, CustomParams, CustomPart, CustomStep, PartPiece, Vec3 } from "../../types";
+
+/**
+ * BOCKÖN hammock stand, read from its manual: a foot clicked and screwed onto each end of the two cross tubes, the
+ * centre tube pushed into their sockets and bolted, then the two curved arms slid onto the outer sockets and bolted
+ * by two people, and a U-hook through the tip of each arm held with two cap nuts. Steel tubes throughout.
+ */
+
+const fx = (kind: CustomFix["kind"], on: string, dir: Vec3, at: Vec3[], o: Partial<CustomFix> = {}): CustomFix => ({ kind, count: at.length, on, dir, at, ...o });
+const ALONG_X: Vec3 = [0, 0, Math.PI / 2];
+const ALONG_Z: Vec3 = [Math.PI / 2, 0, 0];
+
+/** One part drawn as pieces placed where they sit in the product; its box and centre are worked out from them. */
+function compound(id: string, name: string, abs: (PartPiece & { reach: Vec3 })[]): CustomPart {
+ const lo: Vec3 = [Infinity, Infinity, Infinity], hi: Vec3 = [-Infinity, -Infinity, -Infinity];
+ for (const p of abs)
+ for (let k = 0; k < 3; k++) {
+ lo[k] = Math.min(lo[k], p.pos[k] - p.reach[k]);
+ hi[k] = Math.max(hi[k], p.pos[k] + p.reach[k]);
+ }
+ const pos = [0, 1, 2].map((k) => (lo[k] + hi[k]) / 2) as Vec3;
+ const size = [0, 1, 2].map((k) => hi[k] - lo[k]) as Vec3;
+ const pieces = abs.map(({ reach: _r, ...p }) => ({ ...p, pos: [p.pos[0] - pos[0], p.pos[1] - pos[1], p.pos[2] - pos[2]] as Vec3 }));
+ return { id, name, size, pos, pieces, material: "metal" };
+}
+
+/** A tube from a to b in the x-y plane, as a piece with how far it reaches from its centre along each axis. */
+function tube(a: [number, number], b: [number, number], dia: number): PartPiece & { reach: Vec3 } {
+ const dx = b[0] - a[0], dy = b[1] - a[1];
+ const L = Math.hypot(dx, dy);
+ const ang = -Math.atan2(dx, dy);
+ const reach: Vec3 = [Math.abs(dx) / 2 + dia / 2, Math.abs(dy) / 2 + dia / 2, dia / 2];
+ return { shape: "cyl", size: [dia, L, dia], pos: [(a[0] + b[0]) / 2, (a[1] + b[1]) / 2, 0], rot: [0, 0, ang], reach };
+}
+
+function hammockStand(): CustomParams {
+ // the page: 308 long, 100 wide, 123 high
+ const L = 3080, Wd = 1000, H = 1230;
+ const d = 50, sd = 60, y = 45; // tube and socket diameters, tube centre height (on its feet)
+ const xc = 450; // the cross tubes
+ const sock = 80;
+ const xIn = xc - d / 2 - sock / 2, xOut = xc + d / 2 + sock / 2; // socket centres
+ const tipX = L / 2 - d / 2, tipY = H - d / 2, bendX = 760;
+ const cross = (sx: number) =>
+ compound(sx < 0 ? "C1" : "C2", "Cross tube", [
+ { shape: "cyl", size: [d, Wd, d], pos: [sx * xc, y, 0], rot: ALONG_Z, reach: [d / 2, d / 2, Wd / 2] },
+ { shape: "cyl", size: [sd, sock, sd], pos: [sx * xIn, y, 0], rot: ALONG_X, reach: [sock / 2, sd / 2, sd / 2] },
+ { shape: "cyl", size: [sd, sock, sd], pos: [sx * xOut, y, 0], rot: ALONG_X, reach: [sock / 2, sd / 2, sd / 2] },
+ ]);
+ const arm = (sx: number) =>
+ compound(sx < 0 ? "A1" : "A2", "Arm", [
+ tube([sx * (xc + d / 2 + 5), y], [sx * bendX, y], d),
+ tube([sx * (bendX - 20), y - 5], [sx * tipX, tipY], d),
+ ]);
+ const parts: CustomPart[] = [
+ cross(-1),
+ cross(1),
+ { id: "CT", name: "Centre tube", size: [2 * (xc - d / 2), d, d], pos: [0, y, 0], shape: "cyl", material: "metal" },
+ arm(-1),
+ arm(1),
+ ];
+ const zf = Wd / 2 - 45;
+ const feet = (sx: number): Vec3[] => [-1, 1].map((sz) => [sx * xc, 0, sz * zf]);
+ // bolts go in from the front and back of a socket, two each side, into the tube inside it
+ const sockBolts = (x: number): { at: Vec3; dir: Vec3 }[] => [-1, 1].flatMap((sz) => [-15, 15].map((dx) => ({ at: [x + dx, y, sz * (sd / 2)] as Vec3, dir: [0, 0, -sz] as Vec3 })));
+ const joint = (on: string, mate: string, x: number): CustomFix[] => {
+ const pts = sockBolts(x);
+ return [-1, 1].flatMap((sz) => {
+ const at = pts.filter((p) => Math.sign(p.at[2]) === sz).map((p) => p.at);
+ const dir: Vec3 = [0, 0, -sz];
+ return [
+ fx("washer", on, dir, at, { dia: 18 }),
+ fx("washer", on, dir, at, { dia: 12, name: "Spring washer" }),
+ fx("bolt", on, dir, at, { mate, len: 18, dia: 8 }),
+ ];
+ });
+ };
+ const hookAt = (sx: number): Vec3 => [sx * (tipX - 40), tipY + d / 2, 0];
+ const nuts = (sx: number): Vec3[] => [-12, 12].map((dx) => [sx * (tipX - 40) + dx, tipY - d / 2, 0]);
+ const steps: CustomStep[] = [
+ {
+ title: "Click the feet onto the cross tubes",
+ detail: "One on each end, pushed on until it clicks, with the screw hole facing down.",
+ add: ["C1", "C2"],
+ fix: [-1, 1].map((sx) => fx("foot", sx < 0 ? "C1" : "C2", [0, 1, 0], feet(sx), { len: 40, dia: 58, name: "Foot" })),
+ warnings: ["floor"],
+ },
+ {
+ title: "Screw the feet on",
+ detail: "One screw up through each foot into the tube.",
+ fix: [-1, 1].map((sx) => fx("screw", sx < 0 ? "C1" : "C2", [0, 1, 0], feet(sx).map(([x, , z]) => [x, 0, z + Math.sign(z) * 30] as Vec3), { len: 30, dia: 4 })),
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Push the cross tubes onto the centre tube",
+ detail: "Turn them so their smaller sockets face each other, feet down, and push one onto each end of the centre tube.",
+ add: ["CT"],
+ from: { CT: [0, 260, 0] },
+ },
+ {
+ title: "Bolt the centre tube in",
+ detail: "Four bolts at each end, each with a washer and a spring washer. Tighten them with the Allen key.",
+ fix: [...joint("C1", "CT", -xIn), ...joint("C2", "CT", xIn)],
+ tools: ["allen"],
+ },
+ {
+ title: "Slide an arm onto one end together",
+ detail: "One of you holds the arm up while the other pushes it into the outer socket, then four bolts with their washers.",
+ add: ["A1"],
+ from: { A1: [-500, 0, 0] },
+ fix: joint("C1", "A1", -xOut),
+ tools: ["allen"],
+ people: 2,
+ },
+ {
+ title: "Fit the other arm the same way",
+ detail: "Four more bolts with their washers.",
+ add: ["A2"],
+ from: { A2: [500, 0, 0] },
+ fix: joint("C2", "A2", xOut),
+ tools: ["allen"],
+ people: 2,
+ },
+ {
+ title: "Fit a hook at the top of each arm",
+ detail: "Push the U-hook down through the two holes near the tip and turn a cap nut onto each leg with the Allen key.",
+ fix: [-1, 1].flatMap((sx) => {
+ const on = sx < 0 ? "A1" : "A2";
+ return [fx("hook", on, [0, -1, 0], [hookAt(sx)], { len: 70, dia: 30, name: "U-hook" }), fx("nut", on, [0, 1, 0], nuts(sx), { len: 14, dia: 12, name: "Cap nut" })];
+ }),
+ tools: ["allen"],
+ },
+ ];
+ return { parts, steps };
+}
+
+const family: Family = {
+ names: ["BOCKÖN", "BOCKON"],
+ recipe(s) {
+ if (/hammock stand/i.test(s.variant)) return hammockStand();
+ return null;
+ },
+};
+export default family;
diff --git a/src/lib/plan/families/brannboll.ts b/src/lib/plan/families/brannboll.ts
index c1bbc76..74c3a91 100644
--- a/src/lib/plan/families/brannboll.ts
+++ b/src/lib/plan/families/brannboll.ts
@@ -2,7 +2,7 @@ import type { Family } from "./family";
import type { CustomFix, CustomParams, CustomPart, PartPiece, ProductSpec, Vec3 } from "../../types";
/**
- * BRÄNNBOLL, read from the side table's manual. Built upside down on the steel rim: the two leg frames push onto the
+ * BRÄNNBOLL. The side table, read from its manual: Built upside down on the steel rim: the two leg frames push onto the
* rim's four stubs and are locked with grub screws, the castors are bolted into the forked legs, then the board
* slides in onto the leg frames' crossbars and is screwed up from below and bolted to the rim's brackets.
*/
@@ -100,5 +100,78 @@ function recipe(s: ProductSpec): CustomParams {
};
}
-const family: Family = { names: ["BRÄNNBOLL"], recipe };
+
+/**
+ * The shelving unit on castors, from its own manual (the version with the slatted divider, as in the photo). Lying on
+ * its back, the divider's pegs go into the two boards, an end frame is bolted on at each side, then upside down the
+ * four castors are screwed into the tube ends and tightened with the spanner. Stood up, plugs close the spare holes.
+ */
+function shelving(s: ProductSpec): CustomParams {
+ const W = s.size.w * 10 || 560, D = s.size.d * 10 || 400, H = s.size.h * 10 || 620;
+ const T = 20, r = T / 2;
+ const fx0 = W / 2 - r, fz = D / 2 - r; // the end frames' tubes
+ const foot = 100; // the castors' height, up to the tube ends
+ const bt = 20, bw = 2 * (fx0 - r), bd = D - 20;
+ const lowY = foot + 70, topY = H - 70; // the boards' top faces
+ const bys = [lowY - bt / 2, topY - bt / 2];
+ const fh = H - foot, fm = foot + fh / 2;
+ const frame: PartPiece[] = [
+ ...[-1, 1].map((sz): PartPiece => ({ shape: "cyl", size: [T, fh - T, T], pos: [0, -T / 2, sz * fz] })),
+ { shape: "box", size: [T, T, D], pos: [0, fh / 2 - r, 0] }, // the handle over the top
+ ...bys.map((y): PartPiece => ({ shape: "box", size: [T, T, 2 * fz], pos: [0, y - fm, 0] })),
+ { shape: "box", size: [2, bys[1] - bys[0] - T, 2 * fz - T], pos: [0, (bys[0] + bys[1]) / 2 - fm, 0] }, // pegboard
+ ];
+ const board = (y: number): PartPiece[] => [
+ { shape: "box", size: [bw, bt - 6, bd], pos: [0, -3, 0] },
+ ...[-1, 1].map((sz): PartPiece => ({ shape: "box", size: [bw, 6, 3], pos: [0, bt / 2 - 3, sz * (bd / 2 - 1.5)] })),
+ ];
+ const vh = bys[1] - bys[0] - bt, vd = bd - 40;
+ const divider: PartPiece[] = [
+ ...[-1, 1].map((sz): PartPiece => ({ shape: "box", size: [10, vh, 10], pos: [0, 0, sz * (vd / 2 - 5)] })),
+ ...Array.from({ length: 14 }, (_, i): PartPiece => ({ shape: "cyl", size: [5, vd - 20, 5], pos: [0, -vh / 2 + 15 + (i * (vh - 30)) / 13, 0], rot: [Math.PI / 2, 0, 0] })),
+ ];
+ const parts: CustomPart[] = [
+ { id: "B", name: "Board", size: [bw, bt, bd], pos: [0, bys[0], 0], material: "metal", pieces: board(bys[0]) },
+ { id: "V", name: "Slatted divider", size: [10, vh, vd], pos: [0, (bys[0] + bys[1]) / 2, 0], material: "metal", pieces: divider },
+ { id: "T", name: "Board", size: [bw, bt, bd], pos: [0, bys[1], 0], material: "metal", pieces: board(bys[1]) },
+ { id: "E0", name: "End frame", size: [T, fh, D], pos: [-fx0, fm, 0], material: "metal", pieces: frame },
+ { id: "E1", name: "End frame", size: [T, fh, D], pos: [fx0, fm, 0], material: "metal", pieces: frame },
+ ];
+ const bz = fz - 70;
+ const bolts = (g: number): CustomFix =>
+ fx("bolt", bys.flatMap((y) => [-1, 1].map((sz): Vec3 => [g * (W / 2), y, sz * bz])), { len: 40, dia: 6, dir: [-g, 0, 0], on: g < 0 ? "E0" : "E1" });
+ const ends = (g: number): Vec3[] => [-1, 1].map((sz): Vec3 => [g * fx0, foot, sz * fz]);
+ return {
+ parts,
+ steps: [
+ {
+ title: "Fit the divider between the boards",
+ detail: "Lay it all on its back on a rug. The divider's four pegs push into the holes in the two boards.",
+ add: ["B", "V", "T"],
+ pose: "+z",
+ warnings: ["floor"],
+ },
+ { title: "Bolt on one end frame", detail: "Two bolts into each board. Check the bolt heads sit flush in their recesses.", add: ["E0"], fix: [bolts(-1)], tools: ["allen"] },
+ { title: "Bolt on the other end frame", detail: "Four more bolts the same way, then tighten all eight.", add: ["E1"], fix: [bolts(1)], tools: ["allen"] },
+ {
+ title: "Screw in the castors",
+ detail: "Turn the unit upside down. The two with brakes go at one end. Screw each one into a tube end by hand.",
+ fix: [
+ fx("castor", ends(1), { name: "Castor with brake", dir: UP, len: foot, dia: 75, on: "E1" }),
+ fx("castor", ends(-1), { dir: UP, len: foot, dia: 75, on: "E0" }),
+ ],
+ pose: "-y",
+ },
+ { title: "Tighten the castors", detail: "Hold each one and tighten its nut with the spanner.", tools: ["wrench"] },
+ {
+ title: "Plug the spare holes",
+ detail: "Stand it on its castors and push a plastic plug into each of the four empty holes in the end frames.",
+ fix: [-1, 1].map((g) => fx("cap", [-1, 1].map((sz): Vec3 => [g * (fx0 - 1), (bys[0] + bys[1]) / 2, sz * bz]), { name: "Plastic plug", dir: [-g, 0, 0], on: g < 0 ? "E0" : "E1" })),
+ pose: "+y",
+ },
+ ],
+ };
+}
+
+const family: Family = { names: ["BRÄNNBOLL"], recipe: (s) => (/shelving-unit/.test(s.slug ?? "") ? shelving(s) : recipe(s)) };
export default family;
diff --git a/src/lib/plan/families/brimnes.ts b/src/lib/plan/families/brimnes.ts
index 430e0d8..7f2b1ca 100644
--- a/src/lib/plan/families/brimnes.ts
+++ b/src/lib/plan/families/brimnes.ts
@@ -1099,10 +1099,153 @@ function dressingTable(b: PlanBuilder, s: ProductSpec) {
return true;
}
+/* ---------- headboard with storage compartment ---------- */
+
+/**
+ * The headboard, read from its manual. The front frame is built face down: long cam rods and big dowels join the
+ * legs and the middle stile to the top rail, the two filler panels slide down the grooves and the bottom rail closes
+ * them. Behind it go two open end boxes (a bottom, an inner side and a back each) and the long compartment between
+ * them, built on the rug and lowered onto dowels and cam bolts in the frame's back, with a divider in the middle.
+ * Stood up and fixed to the wall, the lid goes on top and a shelf slides into each end box.
+ */
+function headboardRecipe(s: ProductSpec): CustomParams {
+ const W = Math.round(s.size.w * 10) || 1580, H = Math.round(s.size.h * 10) || 1110, D = Math.round(s.size.d * 10) || 280;
+ const t = 18, zf = D / 2 - t / 2, zb = zf - t / 2; // the front frame and its back face
+ const lw = 110, rh = 110, xl = W / 2 - lw / 2, xin = W / 2 - lw; // legs and their inner edge
+ const yTr = H - rh / 2, yBr = 420 + rh / 2; // top and bottom rails
+ const yPan0 = 420 + rh, yPan1 = H - rh;
+ const bw = 290, xs = W / 2 - bw - t / 2, xe = W / 2 - bw / 2 + t / 4; // end boxes: inner side and the box's middle
+ const dz = D - 2 * t, zc = (zb + -D / 2) / 2 + t / 2; // box depth behind the frame and its centre
+ const zk = -D / 2 + t / 2; // backs
+ const y0 = 420, yLid = H - t; // the boxes stand on the bottom rail's level, under the lid
+ const yC = H - rh; // the compartment's floor, level with the top rail's lower edge
+ const P = (id: string, name: string, size: Vec3, pos: Vec3, material: CustomPart["material"] = "board"): CustomPart => ({ id, name, size, pos, material });
+ const parts: CustomPart[] = [
+ P("TR", "Top rail", [2 * xin, rh, t], [0, yTr, zf]),
+ ...[-1, 1].map((g, i) => P(`L${i}`, "Leg", [lw, H, t], [g * xl, H / 2, zf])),
+ P("ST", "Middle stile", [lw, yPan1 - yPan0, t], [0, (yPan0 + yPan1) / 2, zf]),
+ ...[-1, 1].map((g, i) => P(`F${i}`, "Filler panel", [xin - lw / 2, yPan1 - yPan0, 8], [g * (xin + lw / 2) / 2, (yPan0 + yPan1) / 2, zf], "fiber")),
+ P("BR", "Bottom rail", [2 * xin, rh, t], [0, yBr, zf]),
+ ...[-1, 1].flatMap((g, i) => [
+ P(`EB${i}`, "End box bottom", [bw - t, t, dz], [g * (xs + t / 2 + (bw - t) / 2), y0 + t / 2, zc]),
+ P(`ES${i}`, "End box side", [t, yLid - y0, dz], [g * xs, (y0 + yLid) / 2, zc]),
+ P(`EK${i}`, "End box back", [bw, yLid - y0, t], [g * (xs - t / 2 + bw / 2), (y0 + yLid) / 2, zk]),
+ ]),
+ P("CB", "Compartment bottom", [2 * xs - t, t, dz], [0, yC + t / 2, zc]),
+ P("CK", "Compartment back", [2 * (xs - t / 2) - 2 * t, yLid - yC - t, t], [0, (yC + t + yLid) / 2, zk]),
+ P("DV", "Divider", [t, yLid - yC - t, dz], [0, (yC + t + yLid) / 2, zc]),
+ P("LD", "Lid", [W, t, D - t], [0, H - t / 2, zc - t / 2 + t / 2]),
+ ...[-1, 1].map((g, i) => P(`SH${i}`, "Shelf", [bw - t, t, dz - 10], [g * (xs + t / 2 + (bw - t) / 2), 760, zc])),
+ ];
+ const fx = (kind: CustomFix["kind"], on: string | undefined, dir: Vec3, at: Vec3[], o: Partial<CustomFix> = {}): CustomFix => ({ kind, count: at.length, on, dir, at, ...o });
+ const ROD = { name: "Cam rod", len: 90, dia: 7 };
+ const BIG = { len: 40, dia: 10 };
+ const CB = { len: 34, dia: 6 };
+ const CAM = { dia: 15 };
+ const rodPts = (y: number, ym: number): Vec3[] => [[-xin, y, zf], [xin, y, zf], [0, ym, zf]];
+ const rodDirs = (y: number, ym: number, on: string) => [fx("camScrew", on, [-1, 0, 0], [rodPts(y, ym)[0]], ROD), fx("camScrew", on, [1, 0, 0], [rodPts(y, ym)[1]], ROD), fx("camScrew", on, [0, ym > y ? 1 : -1, 0], [rodPts(y, ym)[2]], ROD)];
+ const bigDowels = (y: number, ym: number, on: string, sy: number) => [
+ ...[-1, 1].map((g) => fx("dowel", on, [-g, 0, 0], [-35, 35].map((d) => [g * xin, y + d, zf] as Vec3), BIG)),
+ fx("dowel", on, [0, -sy, 0], [-35, 35].map((d) => [d, ym, zf] as Vec3), BIG),
+ ];
+ const locks = (y: number, ym: number): CustomFix[] => [
+ fx("cam", undefined, [0, 0, 1], [[-xin + 30, y, zb], [xin - 30, y, zb], [0, ym + (ym > y ? -30 : 30), zb], [-xl, y, zb], [xl, y, zb], [0, ym + (ym > y ? 40 : -40), zb]], CAM),
+ ];
+ const boxIds = ["EB0", "ES0", "EK0", "EB1", "ES1", "EK1", "CB", "CK"];
+ const UP: Vec3 = [0, 0, -700];
+ const fromUp = (ids: string[]) => Object.fromEntries(ids.map((id) => [id, UP]));
+ const frameBolts: Vec3[] = [
+ ...[-1, 1].flatMap((g) => [yBr, yTr].map((y): Vec3 => [g * xs, y, zb])),
+ ...[-1, 1].map((g): Vec3 => [g * (xs + bw / 2), y0 + t / 2, zb]),
+ ...[-420, 0, 420].map((x): Vec3 => [x === 0 ? 200 : x, yC + t / 2, zb]),
+ [0, yC + t + 40, zb],
+ ];
+ const steps: CustomStep[] = [
+ { title: "Fit the cam rods into the top rail", detail: "Lay it face down on a rug. One rod in each end and one in the middle of the lower edge.", add: ["TR"], fix: rodDirs(yTr, yPan1, "TR"), pose: "-z", warnings: ["floor"], tools: ["screwdriver"] },
+ {
+ title: "Join the legs and the stile to the top rail",
+ detail: "Two big dowels at each joint, then push the legs onto the ends and the stile onto the middle.",
+ add: ["L0", "L1", "ST"],
+ fix: bigDowels(yTr, yPan1, "TR", 1),
+ from: { L0: [-260, 0, 0], L1: [260, 0, 0], ST: [0, -260, 0] },
+ tools: ["hammer"],
+ },
+ { title: "Lock the top joints", detail: "Six cam locks, arrow to the rod, then clockwise.", fix: locks(yTr, yPan1), tools: ["screwdriver"] },
+ { title: "Slide the filler panels in", detail: "Down the grooves from the open end, smooth side facing down.", add: ["F0", "F1"], from: { F0: [0, -500, 0], F1: [0, -500, 0] } },
+ { title: "Fit the cam rods into the bottom rail", detail: "Three, the same way.", fix: rodDirs(yBr, yPan0, "BR"), wait: ["BR"], from: { BR: [0, -300, 0] }, tools: ["screwdriver"] },
+ { title: "Push on the bottom rail", detail: "Two big dowels at each joint, over the ends of the filler panels.", add: ["BR"], fix: bigDowels(yBr, yPan0, "BR", -1), from: { BR: [0, -300, 0] }, tools: ["hammer"] },
+ { title: "Lock the bottom joints", detail: "Six more cam locks.", fix: locks(yBr, yPan0), tools: ["screwdriver"] },
+ { title: "Screw cam bolts into the back of the frame", detail: "Ten, into the holes on the back of the rails, by hand.", fix: [fx("camScrew", undefined, [0, 0, 1], frameBolts, CB)], tools: ["screwdriver"] },
+ { title: "Screw cam bolts into the end box bottoms", detail: "Two in each, on the rug next to the frame.", fix: [-1, 1].map((g, i) => fx("camScrew", `EB${i}`, [g, 0, 0], [-80, 80].map((d) => [g * (xs + t / 2), y0 + t / 2, zc + d] as Vec3), CB)), wait: boxIds, from: fromUp(boxIds), tools: ["screwdriver"] },
+ { title: "Join the end boxes", detail: "The side onto the bottom's bolts, the back on two dowels.", fix: [-1, 1].map((g, i) => fx("dowel", `EK${i}`, [0, 0, -1], [y0 + 120, yLid - 120].map((y) => [g * xs, y, zk + t / 2] as Vec3), { mate: `ES${i}` })), tools: ["hammer"] },
+ { title: "Lock the end boxes", detail: "Four cam locks in the sides.", fix: [-1, 1].map((g, i) => fx("cam", `ES${i}`, [g, 0, 0], [-80, 80].map((d) => [g * (xs - t / 2), y0 + 40, zc + d] as Vec3), CAM)), tools: ["screwdriver"] },
+ {
+ title: "Screw cam bolts into the compartment panels",
+ detail: "Two in each end of the long bottom and the long back.",
+ fix: [-1, 1].flatMap((g) => [
+ fx("camScrew", "CB", [-g, 0, 0], [-70, 70].map((d) => [g * (xs - t / 2), yC + t / 2, zc + d] as Vec3), CB),
+ fx("camScrew", "CK", [-g, 0, 0], [yC + 40, yLid - 30].map((y) => [g * (xs - t / 2 - t), y, zk] as Vec3), CB),
+ ]),
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Put the compartment between the end boxes",
+ detail: "Two dowels join the bottom to the back, and eight go into the box sides.",
+ fix: [
+ fx("dowel", "CB", [0, 0, 1], [-300, 300].map((x) => [x, yC + t / 2, -D / 2 + t] as Vec3), { mate: "CK" }),
+ ...[-1, 1].map((g) => fx("dowel", "CB", [-g, 0, 0], [-110, -30, 30, 110].map((d) => [g * (xs - t / 2), yC + t / 2 + (Math.abs(d) < 50 ? 0 : 0), zc + d] as Vec3))),
+ ],
+ tools: ["hammer"],
+ },
+ { title: "Lock the compartment", detail: "Eight cam locks in the box sides.", fix: [-1, 1].map((g, i) => fx("cam", `ES${i}`, [-g, 0, 0], [-70, 70, -100, 100].map((d, k) => [g * (xs + t / 2), k < 2 ? yC + t / 2 : yC + 60, k < 2 ? zc + d : zk + 30] as Vec3), CAM)), tools: ["screwdriver"] },
+ {
+ title: "Lower the boxes onto the frame",
+ detail: "Two people. Eight dowels in the frame's back first, then lay the boxes on so the bolts and dowels find their holes.",
+ add: boxIds,
+ from: fromUp(boxIds),
+ fix: [fx("dowel", undefined, [0, 0, 1], [...[-1, 1].flatMap((g) => [yBr + 30, yTr - 30].map((y): Vec3 => [g * xs, y, zb])), ...[-1, 1].flatMap((g) => [-1, 1].map((k): Vec3 => [g * (xs + bw / 2) + k * 60, y0 + t / 2, zb]))], { mate: undefined })],
+ people: 2,
+ tools: ["hammer"],
+ },
+ { title: "Fit the divider", detail: "Two dowels in its bottom edge, then stand it in the middle of the compartment.", add: ["DV"], fix: [fx("dowel", "DV", [0, -1, 0], [-60, 60].map((d) => [0, yC + t, zc + d] as Vec3), { mate: "CB" })], from: { DV: [0, 0, -400] }, tools: ["hammer"] },
+ { title: "Lock the boxes to the frame", detail: "Ten cam locks inside the boxes and the compartment.", fix: [fx("cam", undefined, [0, -1, 0], frameBolts.map(([x, y]) => [x, y + (y > yC ? 0 : 0), zb - 30] as Vec3), CAM)], tools: ["screwdriver"] },
+ {
+ title: "Screw the wall brackets onto the backs",
+ detail: "One at the top of each end box back, two screws each.",
+ fix: [
+ fx("angle", undefined, [0, 0, 1], [-1, 1].map((g) => [g * (W / 2 - 80), yLid - 60, -D / 2] as Vec3), { name: "Wall bracket", len: 50, dia: 40 }),
+ fx("screw", undefined, [0, 0, 1], [-1, 1].flatMap((g) => [-15, 15].map((d) => [g * (W / 2 - 80) + d, yLid - 40, -D / 2] as Vec3)), { len: 14, dia: 4 }),
+ ],
+ tools: ["screwdriver"],
+ },
+ { title: "Tap the glides on and stand it up", detail: "One under each leg, then lift it upright together.", fix: [fx("glide", undefined, [0, 1, 0], [-1, 1].map((g) => [g * xl, 0, zf] as Vec3), { name: "Glide strip" })], pose: "+y", people: 2, tools: ["hammer"] },
+ {
+ title: "Fix it to the wall",
+ detail: "Screw the two keyhole plates to the wall, hook the brackets on and tighten. Wall screws aren't included: pick ones made for your wall.",
+ fix: [
+ fx("bracket", undefined, [0, 0, -1], [-1, 1].map((g) => [g * (W / 2 - 80), yLid - 60, -D / 2 - 2] as Vec3), { name: "Wall plate", len: 50, dia: 30 }),
+ fx("plug", undefined, [0, 0, -1], [-1, 1].map((g) => [g * (W / 2 - 80), yLid - 60, -D / 2 - 30] as Vec3)),
+ fx("screw", undefined, [0, 0, -1], [-1, 1].map((g) => [g * (W / 2 - 80), yLid - 60, -D / 2 + 10] as Vec3), { len: 50, dia: 5 }),
+ ],
+ wall: true,
+ warnings: ["wall", "tip"],
+ tools: ["drill", "screwdriver", "pencil", "level"],
+ },
+ { title: "Click the lid stays on", detail: "One on top of each end box side, near the front.", fix: [fx("clip", undefined, [0, -1, 0], [-1, 1].map((g) => [g * xs, yLid, zb - 40] as Vec3), { name: "Lid stay", len: 30, dia: 30 })] },
+ { title: "Screw cam bolts into the lid", detail: "Six on its underside.", fix: [fx("camScrew", "LD", [0, 1, 0], [-1, 1].flatMap((g) => [-80, 80].map((d) => [g * xs, yLid, zc + d] as Vec3)).concat([[0, yLid, zc - 60], [0, yLid, zc + 60]]), CB)], wait: ["LD"], from: { LD: [0, 300, 0] }, tools: ["screwdriver"] },
+ { title: "Lay the lid on", detail: "Two dowels in the divider take it; its bolts drop into the sides.", add: ["LD"], fix: [fx("dowel", "DV", [0, 1, 0], [[0, yLid, zc - 100], [0, yLid, zc + 100]], { mate: "LD" })], from: { LD: [0, 300, 0] }, tools: ["hammer"] },
+ { title: "Lock the lid", detail: "Six cam locks, in the box sides and the divider.", fix: [fx("cam", undefined, [1, 0, 0], [-1, 1].flatMap((g) => [-80, 80].map((d) => [g * xs - t / 2, yLid - 30, zc + d] as Vec3)).concat([[-t / 2, yLid - 30, zc - 60], [-t / 2, yLid - 30, zc + 60]]), CAM)], tools: ["screwdriver"] },
+ { title: "Push in the shelf pins", detail: "Four in each end box, all at the same height.", fix: [fx("pin", undefined, [1, 0, 0], [-1, 1].flatMap((g) => [-90, 90].flatMap((d) => [[g * (xs + t / 2), 760 - t / 2, zc + d] as Vec3, [g * (W / 2 - 4), 760 - t / 2, zk + t / 2 + 4] as Vec3])), { len: 12, dia: 5 })] },
+ { title: "Slide the shelves in", detail: "From the open ends, onto the pins.", add: ["SH0", "SH1"], from: { SH0: [-400, 0, 0], SH1: [400, 0, 0] } },
+ ];
+ return { parts, steps };
+}
+
/* ---------- the family ---------- */
function kindOf(s: ProductSpec) {
const v = `${s.variant} ${s.slug ?? ""}`.toLowerCase();
+ if (/headboard/.test(v)) return "headboard";
if (/wardrobe/.test(v)) return /3 doors|3-doors/.test(v) ? "wardrobe3" : "wardrobe2";
if (/chest of 3 drawers/.test(v)) return "chest3";
if (/chest of 4 drawers/.test(v)) return "chest4";
@@ -1144,6 +1287,9 @@ const family: Family = {
return bookcase(b, s);
case "cabinet":
return cabinet(b, s);
+ case "headboard":
+ buildCustom(b, { ...s, custom: headboardRecipe(s) });
+ return true;
default:
return false;
}
diff --git a/src/lib/plan/families/eket.ts b/src/lib/plan/families/eket.ts
index 6c8de40..ab4a9a1 100644
--- a/src/lib/plan/families/eket.ts
+++ b/src/lib/plan/families/eket.ts
@@ -34,7 +34,8 @@ function kindOf(s: ProductSpec): G | null {
const W = s.size.w * 10, H = s.size.h * 10, D = s.size.d * 10;
let kind: Kind | null = null;
let rail = false;
- if (/wall-mounted-shelving-unit/.test(slug)) (kind = "open"), (rail = true);
+ // the 70 x 70 one is the cabinet with two doors and a shelf, in white, on its rail
+ if (/wall-mounted-shelving-unit/.test(slug)) (kind = W >= 600 && H >= 600 ? "doors2" : "open"), (rail = true);
else if (/glass/.test(slug) || /glass/.test(v) || slug === "eket-cabinet") (kind = "glass"), (rail = true);
else if (/2-doors/.test(slug)) (kind = "doors2"), (rail = true);
else if (/shlf-door/.test(slug)) (kind = "door"), (rail = true);
diff --git a/src/lib/plan/families/flisat.ts b/src/lib/plan/families/flisat.ts
index 92740ef..204ffce 100644
--- a/src/lib/plan/families/flisat.ts
+++ b/src/lib/plan/families/flisat.ts
@@ -5,7 +5,8 @@ import type { CustomFix, CustomParams, CustomPart, CustomStep, PartPiece, Produc
* FLISAT, read from its manuals. The children's table is a frame with two lids: a middle bar on two dowels drops
* into the frame, four screws hold it from underneath, the legs (their bolts already fitted) turn in by hand and
* the lids lie in on top. The stool is just four splayed legs turned into the seat. The open storage is built from
- * ladder frames held by long bolts and shelves on dowels; see `storage`.
+ * ladder frames held by long bolts and shelves on dowels; see `storage`. The bench and desk share end frames with
+ * knob-bolted legs (`bench`, `desk`); the wall storage is a small box on cam locks (`wallStorage`).
*/
const r = (n: number) => Math.round(n * 10) / 10;
@@ -328,6 +329,318 @@ function storage(s: ProductSpec): CustomParams {
return { parts, steps };
}
+/**
+ * The height-adjustable bench and desk share one build: two end frames (glued rectangles), long rails on one dowel
+ * per end stood in one end frame lying on the rug, the other frame on top and screws through both frames. The
+ * outer legs come last, two green knob bolts each, in one of three rows of holes for the height.
+ */
+const lean = (y: number, top: number, foot: number, h: number) => foot - ((foot - top) * y) / h;
+
+/** One end frame: two posts on the legs' slant, a top bar and a bottom bar, as pieces of one part. */
+function endFrame(id: string, sx: -1 | 1, x: number, t: number, y0: number, y1: number, zAt: (y: number) => number, bars: { y: number; h: number }[], postTop = y1): CustomPart {
+ const cy = (y0 + y1) / 2;
+ const th = Math.atan2(zAt(y0) - zAt(postTop), postTop - y0);
+ const pieces: PartPiece[] = [-1, 1].map((sz) => ({
+ shape: "box" as const,
+ size: [t, Math.hypot(postTop - y0, zAt(y0) - zAt(postTop)), 40] as Vec3,
+ pos: [0, (y0 + postTop) / 2 - cy, sz * (zAt(y0) + zAt(postTop)) / 2] as Vec3,
+ rot: [-sz * th, 0, 0] as Vec3,
+ }));
+ for (const b of bars) pieces.push({ shape: "box", size: [t, b.h, 2 * zAt(b.y) + 30], pos: [0, b.y - cy, 0] });
+ return { id, name: "End frame", size: [t, y1 - y0, 2 * zAt(y0) + 40], pos: [sx * x, cy, 0], pieces, material: "wood" };
+}
+
+/** An outer leg on the slant, front (sz 1) or back (sz -1). */
+function slantLeg(id: string, sx: number, sz: number, x: number, h: number, top: number, foot: number, t = 30, d = 45): CustomPart {
+ const th = Math.atan2(foot - top, h);
+ return { id, name: "Leg", size: [t, Math.hypot(h, foot - top), d], pos: [sx * x, h / 2, sz * (top + foot) / 2], rot: [-sz * th, 0, 0], material: "wood" };
+}
+
+const KNOB = { name: "Knob bolt", len: 45, dia: 8 };
+
+function bench(s: ProductSpec): CustomParams {
+ const W = s.size.w * 10 || 610, H = s.size.h * 10 || 470, D = s.size.d * 10 || 360;
+ const LT = 30, FT = 24; // legs and end frames, thickness along x
+ const xl = W / 2 - LT / 2, xf = xl - LT / 2 - FT / 2, xi = xf - FT / 2; // leg, frame centres, frame inner face
+ const foot = D / 2 - 22, top = foot - 28;
+ const zAt = (y: number) => lean(y, top, foot, H);
+ const yS = H - 30, ST = 18; // seat top, the legs stand a little above it
+ const y0 = yS - 300; // bottom of the end frames
+ const yA = yS - ST - 35, zA = 125, yL = y0 + 30; // aprons under the seat, low rail
+ const parts: CustomPart[] = [
+ endFrame("E0", -1, xf, FT, y0, yS, zAt, [{ y: yS - 30, h: 60 }, { y: yL, h: 60 }]),
+ ...[-1, 1].map((sz, i): CustomPart => ({ id: `A${i}`, name: "Seat rail", size: [2 * xi, 70, 20], pos: [0, yA, sz * zA], material: "wood" })),
+ { id: "LR", name: "Low rail", size: [2 * xi, 60, 22], pos: [0, yL, 0], material: "wood" },
+ { id: "S", name: "Seat", size: [2 * xi, ST, 300], pos: [0, yS - ST / 2, 0], material: "board" },
+ endFrame("E1", 1, xf, FT, y0, yS, zAt, [{ y: yS - 30, h: 60 }, { y: yL, h: 60 }]),
+ ...[-1, 1].flatMap((sx, i) => [-1, 1].map((sz, j) => slantLeg(`G${i}${j}`, sx, sz, xl, H, top, foot))),
+ ];
+ const ends = (id: string, pts: [number, number][]) => [-1, 1].map((sx) => fx("dowel", id, [-sx, 0, 0], pts.map(([y, z]) => [sx * xi, y, z] as Vec3)));
+ const rails: [string, number, number][] = [["A0", yS - 25, -zA], ["A1", yS - 25, zA], ["LR", yL, 0]];
+ const screws = (sx: -1 | 1, f: string) => fx("bolt", f, [-sx, 0, 0], rails.map(([, y, z]) => [sx * (xf + FT / 2), y, z] as Vec3), { name: "Screw", len: 50, dia: 6 });
+ const legs = parts.filter((p) => p.name === "Leg").map((p) => p.id);
+ return {
+ parts,
+ steps: [
+ {
+ title: "Tap the dowels into the seat and the rails",
+ detail: "One in each end of the three rails, two in each end of the seat. Ten in all.",
+ fix: [...ends("S", [[yS - ST / 2, -80], [yS - ST / 2, 80]]), ...ends("A0", [[yA, -zA]]), ...ends("A1", [[yA, zA]]), ...ends("LR", [[yL, 0]])],
+ wait: ["S", "A0", "A1", "LR"],
+ tools: ["hammer"],
+ warnings: ["floor"],
+ },
+ {
+ title: "Stand the rails in one end frame",
+ detail: "Lay an end frame flat on the rug and push the two seat rails and the low rail onto its holes, standing straight up.",
+ add: ["E0", "A0", "A1", "LR"],
+ from: { A0: [320, 0, 0], A1: [320, 0, 0], LR: [320, 0, 0] },
+ pose: "+x",
+ },
+ { title: "Slide the seat in", detail: "Down between the seat rails, white side out, onto its two dowels.", add: ["S"], from: { S: [360, 0, 0] } },
+ { title: "Lay the other end frame on top", detail: "Line up the holes and press it down onto all the dowels.", add: ["E1"], from: { E1: [300, 0, 0] } },
+ { title: "Screw the top end frame on", detail: "Three screws, one into each rail, with the Allen key. Not a drill.", fix: [screws(1, "E1")], tools: ["allen"] },
+ { title: "Turn it over and screw the other frame", detail: "Three more screws, the same way.", fix: [screws(-1, "E0")], pose: "-x", tools: ["allen"] },
+ {
+ title: "Screw the seat rails to the seat",
+ detail: "Turn the bench upside down. Two long screws through each seat rail into the seat, by hand.",
+ fix: [fx("screw", "A0", [0, 1, 0], [-150, 150].flatMap((x) => [-zA, zA].map((z) => [x, yA - 35, z] as Vec3)), { len: 80, dia: 4, mate: "S" })].map((f) => ({ ...f, on: undefined })),
+ pose: "-y",
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Bolt on the legs at the height you want",
+ detail: "Stand it up. Two knob bolts through each leg into the end frame, all four legs in the same row of holes.",
+ add: legs,
+ from: Object.fromEntries(legs.map((id) => [id, [id[1] === "0" ? -200 : 200, 0, 0] as Vec3])),
+ fix: [-1, 1].flatMap((sx, i) => [-1, 1].map((sz) => fx("bolt", `E${i}`, [-sx, 0, 0], [y0 + 70, yS - 60].map((y) => [sx * (xl + LT / 2), y, sz * zAt(y)] as Vec3), KNOB))).map((f) => ({ ...f, on: undefined })),
+ pose: "+y",
+ },
+ ],
+ };
+}
+
+/**
+ * The desk: the same frame with four rails, then a tilting top built from a white board and a raised wooden edge
+ * on three sides. It hooks onto two pivot bolts at the front and rests on two rubber stops at the back; two swing
+ * arms prop it up when tilted and a strap stops it tipping too far. A rod for a paper roll lies in the back notches.
+ */
+function desk(s: ProductSpec): CustomParams {
+ const W = s.size.w * 10 || 970, H = s.size.h * 10 || 590, D = s.size.d * 10 || 650;
+ const LT = 30, FT = 24;
+ const xl = W / 2 - LT / 2, xf = xl - LT / 2 - FT / 2, xi = xf - FT / 2;
+ const foot = D / 2 - 25, top = foot - 65, hL = H - 30;
+ const zAt = (y: number) => lean(y, top, foot, hL);
+ const y0 = 150, yTb = 510, yBb = y0 + 30; // end frame bottom, top bar and bottom bar centres
+ const RW = 2 * xi, RT = 22;
+ const zLo = 200, zF = 200, zK = -zAt(H) - 10; // low rails, front top rail, back top rail
+ const yF = yTb, yK = 490;
+ const yB = 542, BT = 18, LH = 30, LW = 20; // the top: board and its raised edge
+ const xT = xi - 2, zT0 = -zAt(H) - 21, zT1 = D / 2 - 35;
+ const zTc = (zT0 + zT1) / 2, dT = zT1 - zT0;
+ const yE = yB + BT + LH / 2;
+ const xPiv = xi - 2 - LW / 2, zPiv = zAt(yE) - 4, yPiv = yE;
+ const parts: CustomPart[] = [
+ endFrame("E0", -1, xf, FT, y0, H, zAt, [{ y: yTb, h: 60 }, { y: yBb, h: 60 }]),
+ ...[-1, 1].map((sz, i): CustomPart => ({ id: `R${i}`, name: "Low rail", size: [RW, 60, RT], pos: [0, yBb, sz * zLo], material: "wood" })),
+ { id: "RK", name: "Back rail", size: [RW, 60, RT], pos: [0, yK, zK], material: "wood" },
+ { id: "RF", name: "Front rail", size: [RW, 60, RT], pos: [0, yF, zF], material: "wood" },
+ endFrame("E1", 1, xf, FT, y0, H, zAt, [{ y: yTb, h: 60 }, { y: yBb, h: 60 }]),
+ ...[-1, 1].map((sx, i): CustomPart => ({ id: `SA${i}`, name: "Swing arm", size: [20, 110, 36], pos: [sx * (xi - 10), yTb - 40, -120], material: "wood" })),
+ {
+ id: "T",
+ name: "Desk top",
+ size: [2 * xT, BT + LH, dT],
+ pos: [0, yB + (BT + LH) / 2, zTc],
+ material: "board",
+ // the white board with its raised wooden edge on three sides, built on the rug first
+ pieces: [
+ { shape: "box", size: [2 * xT, BT, dT], pos: [0, -LH / 2, 0] },
+ { shape: "box", size: [2 * xT - 2 * LW, LH, LW], pos: [0, BT / 2, -dT / 2 + LW / 2], material: "wood" },
+ ...[-1, 1].map((sx): PartPiece => ({ shape: "box", size: [LW, LH, dT], pos: [sx * (xT - LW / 2), BT / 2, 0], material: "wood" })),
+ ],
+ },
+ ...[-1, 1].flatMap((sx, i) => [-1, 1].map((sz, j) => slantLeg(`G${i}${j}`, sx, sz, xl, hL, top, foot))),
+ { id: "PR", name: "Paper roll rod", size: [2 * xT - 2 * LW, 24, 24], pos: [0, yB + BT + LH, zT0 + LW + 14], shape: "cyl", material: "wood" },
+ { id: "ST", name: "Strap", size: [40, 110, 3], pos: [0, (yK - 20 + yE + 8) / 2, zT0 - 1.5], material: "soft" },
+ ];
+ const ends = (id: string, y: number, z: number) => [-1, 1].map((sx) => fx("dowel", id, [-sx, 0, 0], [[sx * xi, y, z]]));
+ const big = (sx: -1 | 1, f: string) =>
+ fx("bolt", f, [-sx, 0, 0], ([[yBb, -zLo], [yBb, zLo], [yK, zK]] as const).map(([y, z]) => [sx * (xf + FT / 2), y, z] as Vec3), { name: "Screw", len: 50, dia: 6 });
+ const mid = (sx: -1 | 1, f: string) => fx("bolt", f, [-sx, 0, 0], [[sx * (xf + FT / 2), yF, zF]], { name: "Screw", len: 40, dia: 6 });
+ const legs = parts.filter((p) => p.name === "Leg").map((p) => p.id);
+ const lipScrews: Vec3[] = [
+ ...[-300, 0, 300].map((x): Vec3 => [x, yB, zT0 + LW / 2]),
+ ...[-1, 1].flatMap((sx) => [zT0 + 120, zTc, zT1 - 60].map((z): Vec3 => [sx * (xT - LW / 2), yB, z])),
+ ];
+ const lipDowels = [
+ fx("dowel", "T", [0, 1, 0], [-200, 200].map((x) => [x, yB + BT, zT0 + LW / 2] as Vec3)),
+ ...[-1, 1].map((sx) => fx("dowel", "T", [0, 1, 0], [zT0 + 200, zT1 - 120].map((z) => [sx * (xT - LW / 2), yB + BT, z] as Vec3))),
+ ];
+ const cones = [-1, 1].map((sx) => [sx * (xi - 60), yK + 30, zK] as Vec3);
+ return {
+ parts,
+ steps: [
+ {
+ title: "Stand the two low rails in one end frame",
+ detail: "Lay an end frame flat on the rug. A dowel in each end of both low rails, then push them into the bottom bar.",
+ add: ["E0", "R0", "R1"],
+ fix: [...ends("R0", yBb, -zLo), ...ends("R1", yBb, zLo)],
+ from: { R0: [320, 0, 0], R1: [320, 0, 0] },
+ pose: "+x",
+ tools: ["hammer"],
+ warnings: ["floor"],
+ },
+ { title: "Add the back rail", detail: "Two dowels in it, then push it into the top bar at the back.", add: ["RK"], fix: ends("RK", yK, zK), from: { RK: [320, 0, 0] } },
+ { title: "Add the front rail", detail: "The same way, into the top bar at the front.", add: ["RF"], fix: ends("RF", yF, zF), from: { RF: [320, 0, 0] } },
+ { title: "Lay the other end frame on top", detail: "Press it down onto all four dowels.", add: ["E1"], from: { E1: [300, 0, 0] } },
+ { title: "Screw the low rails and the back rail", detail: "Three of the big screws through the end frame, with the Allen key. Not a drill.", fix: [big(1, "E1")], tools: ["allen"] },
+ { title: "Screw the front rail", detail: "One of the two medium screws, into the front rail.", fix: [mid(1, "E1")], tools: ["allen"] },
+ { title: "Turn it over together", detail: "Two people, so the joints don't twist.", pose: "-x", people: 2 },
+ { title: "Screw the other end frame", detail: "Three big screws into the low rails and the back rail.", fix: [big(-1, "E0")], tools: ["allen"] },
+ { title: "Screw the front rail on this side", detail: "The last medium screw.", fix: [mid(-1, "E0")], tools: ["allen"] },
+ {
+ title: "Bolt the swing arms inside the end frames",
+ detail: "Stand the frame up. A barrel nut into the outside of each end frame, then a bolt through the arm into it. Leave the arms free to swing.",
+ add: ["SA0", "SA1"],
+ fix: [
+ ...[-1, 1].map((sx, i) => fx("nut", `E${i}`, [-sx, 0, 0], [[sx * (xf + FT / 2), yTb - 70, -120]], { name: "Barrel nut", len: 20, dia: 10 })),
+ ...[-1, 1].map((sx, i) => fx("bolt", `SA${i}`, [sx, 0, 0], [[sx * (xi - 20), yTb - 70, -120]], { mate: `E${i}`, len: 35, dia: 6 })),
+ ],
+ from: { SA0: [200, 0, 0], SA1: [-200, 0, 0] },
+ pose: "+y",
+ tools: ["allen"],
+ },
+ {
+ title: "Screw the rubber stops onto the back rail",
+ detail: "One near each end, a small washer under each long screw.",
+ fix: [
+ fx("cap", "RK", [0, -1, 0], cones.map(([x, y, z]) => [x, y + 20, z] as Vec3), { name: "Rubber stop", len: 20, dia: 30 }),
+ fx("screw", "RK", [0, -1, 0], cones.map(([x, y, z]) => [x, y + 22, z] as Vec3), { len: 50, dia: 4 }),
+ fx("washer", "RK", [0, -1, 0], cones.map(([x, y, z]) => [x, y + 22, z] as Vec3), { dia: 10 }),
+ ],
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Join the edges of the top",
+ detail: "Two dowels in each end of the back edge, then push the two side edges onto them.",
+ fix: [-1, 1].map((sx) => fx("dowel", "T", [-sx, 0, 0], [yE - 7, yE + 7].map((y) => [sx * (xT - LW), y, zT0 + LW / 2] as Vec3))),
+ wait: ["T"],
+ tools: ["hammer"],
+ },
+ { title: "Tap dowels into the edge", detail: "Six along the underside of the edge frame you just made.", fix: lipDowels, tools: ["hammer"] },
+ { title: "Lay the board on the edge frame", detail: "Turn the edge frame over, dowels down, and press it onto the board. Then turn the top face down on the rug, carefully." },
+ { title: "Screw the board to the edge frame", detail: "Nine screws up through the board, with the Allen key.", fix: [fx("screw", "T", [0, 1, 0], lipScrews, { len: 40, dia: 5 })], tools: ["allen"] },
+ {
+ title: "Push the barrel nuts into the top's sides",
+ detail: "One near the front of each side edge, its slot turned to take the bolt.",
+ fix: [-1, 1].map((sx) => fx("nut", "T", [sx, 0, 0], [[sx * (xT - LW), yPiv, zPiv]], { name: "Barrel nut", len: 20, dia: 10 })),
+ },
+ {
+ title: "Put washers on the pivot holes",
+ detail: "Press one onto the inside of each end frame, over the hole near the top front.",
+ fix: [-1, 1].map((sx, i) => fx("washer", `E${i}`, [sx, 0, 0], [[sx * xi, yPiv, zPiv]], { dia: 20 })),
+ },
+ { title: "Lower the top into the frame", detail: "Between the end frames, the raised edge at the back.", add: ["T"], from: { T: [0, 260, 0] } },
+ { title: "Hook the top onto the pivots", detail: "Slide it forward until the slots under its sides sit on both washers." },
+ {
+ title: "Bolt the top to the end frames",
+ detail: "One bolt through each end frame into the barrel nut. Firm, but the top must still tilt.",
+ fix: [-1, 1].map((sx, i) => fx("bolt", `E${i}`, [-sx, 0, 0], [[sx * (xf + FT / 2), yPiv, zPiv]], { mate: "T", len: 40, dia: 6 })),
+ tools: ["allen"],
+ },
+ {
+ title: "Tap a glide into each leg",
+ detail: "Into the hole in the foot end, with a hammer.",
+ fix: legs.map((id) => {
+ const p = parts.find((q) => q.id === id)!;
+ return fx("glide", id, [0, 1, 0], [[p.pos[0], 0, (id[2] === "0" ? -1 : 1) * foot]], { name: "Glide" });
+ }),
+ wait: legs,
+ tools: ["hammer"],
+ },
+ {
+ title: "Bolt on the legs at the height you want",
+ detail: "Two knob bolts through each leg into the end frame, all four legs in the same row of holes.",
+ add: legs,
+ from: Object.fromEntries(legs.map((id) => [id, [id[1] === "0" ? -200 : 200, 0, 0] as Vec3])),
+ fix: [-1, 1].flatMap((sx, i) => [-1, 1].map((sz) => fx("bolt", `E${i}`, [-sx, 0, 0], [y0 + 120, yTb - 80].map((y) => [sx * (xl + LT / 2), y, sz * zAt(y)] as Vec3), KNOB))).map((f) => ({ ...f, on: undefined })),
+ },
+ { title: "Lay the rod in the back notches", detail: "It holds a paper roll behind the raised edge.", add: ["PR"], from: { PR: [0, 160, 0] } },
+ { title: "Try the tilt", detail: "Lift the back of the top and swing the arms up under it to hold it. Lower it again to lay it flat." },
+ {
+ title: "Screw on the strap",
+ detail: "From the back edge of the top down to the back rail, a washer under each small screw. It stops the top tipping too far.",
+ add: ["ST"],
+ fix: [
+ fx("screw", "ST", [0, 0, 1], [[0, yE, zT0 - 3]], { len: 16, dia: 4, mate: "T" }),
+ fx("screw", "ST", [0, 0, 1], [[0, yK - 15, zT0 - 3]], { len: 16, dia: 4, mate: "RK" }),
+ fx("washer", "ST", [0, 0, 1], [[0, yE, zT0 - 3], [0, yK - 15, zT0 - 3]], { dia: 12 }),
+ ],
+ from: { ST: [0, 0, -120] },
+ tools: ["screwdriver"],
+ },
+ ],
+ };
+}
+
+/**
+ * The wall storage: two end pieces take two cam bolts each, the bottom (grooved for the back) and the back board
+ * take dowels, one end goes on, the back drops into the groove, the other end closes it and four cam locks pull it
+ * tight. Lying on its back, the front rail lies in the notches of the ends and a long screw holds each end. Two
+ * screws (not included) through the back hang it on the wall.
+ */
+function wallStorage(s: ProductSpec): CustomParams {
+ const W = s.size.w * 10 || 700, H = s.size.h * 10 || 160, D = s.size.d * 10 || 90;
+ const ET = 18, xi = W / 2 - ET, xe = W / 2 - ET / 2;
+ const KT = 12, zK = -D / 2 + KT / 2, BT = 18;
+ const yR = H - 32, zR = D / 2 - 16;
+ const parts: CustomPart[] = [
+ ...[-1, 1].map((sx, i): CustomPart => ({ id: `E${i}`, name: "End piece", size: [ET, H, D], pos: [sx * xe, H / 2, 0], material: "wood" })),
+ { id: "B", name: "Bottom", size: [2 * xi, BT, D - KT - 4], pos: [0, BT / 2, (D / 2 - 4 + -D / 2 + KT) / 2], material: "wood" },
+ { id: "K", name: "Back board", size: [2 * xi, H - 6, KT], pos: [0, (H + 6) / 2, zK], material: "wood" },
+ { id: "R", name: "Front rail", size: [W + 4, 20, 20], pos: [0, yR, zR], shape: "cyl", material: "wood" },
+ ];
+ const yKb = H / 2 + 20, zB = 8;
+ const cams = [-1, 1].map((sx, i) => fx("camScrew", `E${i}`, [sx, 0, 0], [[sx * xi, yKb, zK], [sx * xi, BT / 2, zB]], { len: 34, dia: 6 }));
+ const locks = (i: number) => {
+ const sx = i ? 1 : -1;
+ return [fx("cam", "K", [0, 0, 1], [[sx * (xi - 26), yKb, -D / 2]], { dia: 15 }), fx("cam", "B", [0, 1, 0], [[sx * (xi - 26), 0, zB]], { dia: 15 })];
+ };
+ return {
+ parts,
+ steps: [
+ { title: "Screw the cam bolts into the end pieces", detail: "Two in each, by hand with a screwdriver. Not a drill.", fix: cams, wait: ["E0", "E1"], tools: ["screwdriver"], warnings: ["floor"] },
+ { title: "Tap the dowels into the bottom", detail: "Two in each end.", fix: [-1, 1].map((sx) => fx("dowel", "B", [-sx, 0, 0], [-15, 25].map((z) => [sx * xi, BT / 2, z] as Vec3))), wait: ["B"], tools: ["hammer"] },
+ { title: "Push one end piece onto the bottom", detail: "Its notch at the top and the groove of the bottom towards the back.", add: ["B", "E0"], from: { E0: [-160, 0, 0] } },
+ { title: "Tap the dowels into the back board", detail: "One in each end.", fix: [-1, 1].map((sx) => fx("dowel", "K", [-sx, 0, 0], [[sx * xi, H - 30, zK]])), wait: ["K"], tools: ["hammer"] },
+ { title: "Fit the back board", detail: "Its lower edge in the groove of the bottom, its dowel and bolt into the end piece.", add: ["K"], from: { K: [260, 0, 0] } },
+ { title: "Put on the other end piece and lock it", detail: "Press it onto the dowels and bolts, then turn the four cam locks clockwise until they pull tight.", add: ["E1"], from: { E1: [160, 0, 0] }, fix: [...locks(0), ...locks(1)], tools: ["screwdriver"] },
+ {
+ title: "Screw in the front rail",
+ detail: "Turn it onto its back. Lay the rail in the notches and drive a long screw through each end into the end piece.",
+ add: ["R"],
+ from: { R: [0, 0, 120] },
+ fix: [-1, 1].map((sx) => fx("bolt", "R", [0, 0, -1], [[sx * xe, yR, zR + 10]], { name: "Screw", len: 40, dia: 5, mate: sx < 0 ? "E0" : "E1" })),
+ pose: "+z",
+ tools: ["allen"],
+ },
+ {
+ title: "Hang it on the wall",
+ detail: "Two screws through the back board. They aren't included: pick ones made for your wall, with heads that don't sink in.",
+ fix: [
+ fx("plug", "K", [0, 0, -1], [-1, 1].map((sx) => [sx * (xi - 60), H - 30, -D / 2 - 30] as Vec3)),
+ fx("screw", "K", [0, 0, -1], [-1, 1].map((sx) => [sx * (xi - 60), H - 30, -D / 2 + KT] as Vec3), { len: 50, dia: 5 }),
+ ].map((f) => ({ ...f, on: undefined })),
+ pose: "+y",
+ tools: ["screwdriver", "drill", "pencil", "level"],
+ wall: true,
+ warnings: ["wall"],
+ },
+ ],
+ };
+}
+
const family: Family = {
names: ["FLISAT"],
recipe(s) {
@@ -335,6 +648,9 @@ const family: Family = {
if (/children-s-table/.test(slug)) return table(s);
if (/children-s-stool/.test(slug)) return stool(s);
if (/open-storage/.test(slug)) return storage(s);
+ if (/children-s-bench/.test(slug)) return bench(s);
+ if (/children-s-desk/.test(slug)) return desk(s);
+ if (/wall-storage/.test(slug)) return wallStorage(s);
return null;
},
};
diff --git a/src/lib/plan/families/fredde.ts b/src/lib/plan/families/fredde.ts
new file mode 100644
index 0000000..0696755
--- /dev/null
+++ b/src/lib/plan/families/fredde.ts
@@ -0,0 +1,257 @@
+import type { Family } from "./family";
+import type { CustomFix, CustomParams, CustomPart, CustomStep, PartPiece, ProductSpec, Vec3 } from "../../types";
+
+/**
+ * FREDDE gaming desk, read from its manual. Built lying on its back on a rug: cam studs in both steel side frames,
+ * the low back rail bolted to one frame (bolt in the rail's end, a sleeve across the frame catches it), the back
+ * panel on the studs and cam-locked, the second frame, the two side panels with their shelves, the front rail lifted
+ * in by two people, then the desk top on dowels and cam bolts. Stood up by two people, the upper part goes on: hook-on
+ * brackets, the monitor shelf, the bars, the top shelf, side panels in the loops, the side shelves, cable grommets
+ * and four headphone hooks.
+ */
+
+const fx = (kind: CustomFix["kind"], on: string, dir: Vec3, at: Vec3[], o: Partial<CustomFix> = {}): CustomFix => ({ kind, count: at.length, on, dir, at, ...o });
+
+/** One part drawn as boxes placed where they sit in the product; its box and centre are worked out from them. */
+function compound(id: string, name: string, abs: PartPiece[]): CustomPart {
+ const lo: Vec3 = [Infinity, Infinity, Infinity], hi: Vec3 = [-Infinity, -Infinity, -Infinity];
+ for (const p of abs)
+ for (let k = 0; k < 3; k++) {
+ lo[k] = Math.min(lo[k], p.pos[k] - p.size[k] / 2);
+ hi[k] = Math.max(hi[k], p.pos[k] + p.size[k] / 2);
+ }
+ const pos = [0, 1, 2].map((k) => (lo[k] + hi[k]) / 2) as Vec3;
+ const size = [0, 1, 2].map((k) => hi[k] - lo[k]) as Vec3;
+ return { id, name, size, pos, material: "metal", pieces: abs.map((p) => ({ ...p, pos: [p.pos[0] - pos[0], p.pos[1] - pos[1], p.pos[2] - pos[2]] as Vec3 })) };
+}
+
+function gamingDesk(s: ProductSpec): CustomParams {
+ const W = s.size.w * 10, D = 740, H = 1460;
+ const t = 25, bt = 18; // steel tube, boards
+ const xf = W / 2 - 60, xi = xf - t / 2; // frame centre line, its inner face
+ const zF = D / 2 - 40, zB = -D / 2 + 25, zU = -160; // front leg, back leg, upper front post
+ const yD = 715, yTop = yD + 25; // desk underside and top
+ const frame = (sx: number, id: string) =>
+ compound(id, "Side frame", [
+ { shape: "box", size: [t, yD, t], pos: [sx * xf, yD / 2, zF] },
+ { shape: "box", size: [t, H, t], pos: [sx * xf, H / 2, zB] },
+ { shape: "box", size: [t, t, zF - zU + t], pos: [sx * xf, yD - t / 2, (zF + zU) / 2] },
+ { shape: "box", size: [t, H - yD, t], pos: [sx * xf, (H + yD) / 2, zU] },
+ { shape: "box", size: [t, t, zU - zB], pos: [sx * xf, H - t / 2, (zU + zB) / 2] },
+ ]);
+ const inner = 2 * xi;
+ const yR = 180, yBP = (490 + yD) / 2, hBP = yD - 490;
+ const kz0 = zB + t / 2, kd = 600; // the low shelves run forward from the back rail
+ const notchZ = zU + t / 2 + 5, nx = xi - 5;
+ const deskOutline: [number, number][] = [
+ [-nx, -D / 2 + 20], [nx, -D / 2 + 20], [nx, notchZ], [W / 2, notchZ], [W / 2, D / 2],
+ [150, D / 2], [110, D / 2 - 60], [-260, D / 2 - 60], [-300, D / 2], [-W / 2, D / 2], [-W / 2, notchZ], [-nx, notchZ],
+ ];
+ const dz = (-D / 2 + 20 + D / 2) / 2;
+ const yMS = 1000, yTS = 1380, sz = (zB + zU) / 2, sdp = zU - zB + 70;
+ const yBar = 1335;
+ const ssW = 270;
+ const parts: CustomPart[] = [
+ frame(-1, "SL"),
+ frame(1, "SR"),
+ { id: "RA", name: "Back rail", size: [inner, t, t], pos: [0, yR, zB], material: "metal" },
+ { id: "BP", name: "Back panel", size: [inner, hBP, bt], pos: [0, yBP, zB] },
+ { id: "PL", name: "Side panel", size: [bt, 420, zF - zB - t], pos: [-xi + bt / 2, 270, (zF + zB) / 2] },
+ { id: "KL", name: "Low shelf", size: [400, bt, kd], pos: [-xi + bt + 200, yR, kz0 + kd / 2] },
+ { id: "PR", name: "Side panel", size: [bt, 420, zF - zB - t], pos: [xi - bt / 2, 270, (zF + zB) / 2] },
+ { id: "KR", name: "Low shelf", size: [400, bt, kd], pos: [xi - bt - 200, yR, kz0 + kd / 2] },
+ { id: "RC", name: "Front rail", size: [inner, t, t], pos: [0, yD - t / 2 - 30, zF], material: "metal" },
+ { id: "DT", name: "Desk top", size: [W, 25, D - 20], pos: [0, yD + 12.5, dz], pieces: [{ shape: "slab", outline: deskOutline.map(([x, z]) => [x, z - dz]), round: 18, size: [W, 25, D - 20], pos: [0, 0, 0] }] },
+ { id: "CB", name: "Cable bar", size: [inner, 40, 20], pos: [0, yTop + 30, zB], material: "metal" },
+ { id: "MS", name: "Monitor shelf", size: [inner, bt, sdp], pos: [0, yMS, sz + 35] },
+ { id: "BB", name: "Back bar", size: [inner, t, t], pos: [0, yBar, zB], material: "metal" },
+ { id: "FB", name: "Front bar", size: [inner, t, t], pos: [0, yBar, zU], material: "metal" },
+ { id: "TS", name: "Top shelf", size: [inner, bt, sdp], pos: [0, yTS, sz + 35] },
+ ...[-1, 1].map((sx, i): CustomPart => ({ id: i ? "SPR" : "SPL", name: "Loop panel", size: [8, H - yTop - 2 * t, zU - zB - t], pos: [sx * xf, (H + yTop) / 2, sz] })),
+ ...[-1, 1].map((sx, i): CustomPart => ({ id: i ? "SSR" : "SSL", name: "Side shelf", size: [ssW, bt, 200], pos: [sx * (xf + t / 2 + ssW / 2), 1150, sz] })),
+ ];
+ for (const p of parts) p.material ??= "board";
+
+ const SIDE = (sx: number) => (sx < 0 ? "SL" : "SR");
+ const ys = [530, 660];
+ const panelYs = [150, 390];
+ // cam studs go into the frames: two at the back panel, four at the side panel (two in each leg)
+ const studsBP = (sx: number): Vec3[] => ys.map((y) => [sx * xi, y, zB]);
+ const studsP = (sx: number): { at: Vec3; dir: Vec3 }[] => [
+ ...panelYs.map((y) => ({ at: [sx * (xi - bt / 2), y, zF - t / 2] as Vec3, dir: [0, 0, 1] as Vec3 })),
+ ...panelYs.map((y) => ({ at: [sx * (xi - bt / 2), y, zB + t / 2] as Vec3, dir: [0, 0, -1] as Vec3 })),
+ ];
+ const studs = (sx: number): CustomFix[] => [
+ fx("camScrew", SIDE(sx), [sx, 0, 0], studsBP(sx), { mate: "BP", name: "Cam stud", len: 20 }),
+ ...[1, -1].map((dz2) => fx("camScrew", SIDE(sx), [0, 0, dz2], studsP(sx).filter((p) => p.dir[2] === dz2).map((p) => p.at), { mate: sx < 0 ? "PL" : "PR", name: "Cam stud", len: 20 })),
+ ];
+ const camBP = (sx: number) => fx("cam", "BP", [0, 0, -1], ys.map((y) => [sx * (xi - 30), y, zB + bt / 2] as Vec3));
+ const camP = (sx: number) => fx("cam", sx < 0 ? "PL" : "PR", [sx, 0, 0], studsP(sx).map((p) => [sx * (xi - bt), p.at[1], p.at[2] - p.dir[2] * 30] as Vec3));
+ const railBolt = (sx: number, rail: string, y: number, z: number) => fx("bolt", SIDE(sx), [-sx, 0, 0], [[sx * (xf + t / 2), y, z]], { mate: rail, len: 40, dia: 6 });
+ const sleeve = (sx: number, y: number, z: number) => fx("nut", SIDE(sx), [0, 0, -1], [[sx * xf, y, z + t / 2]], { name: "Sleeve", len: 25, dia: 10 });
+ const shelfScrews = (id: string, y: number): Vec3[] => [-1, 1].flatMap((sx) => [-1, 1].map((k) => [sx * (xi - 40), y - bt / 2, sz + 35 + k * 50] as Vec3));
+ const brackets = (y: number): Vec3[] => [-1, 1].map((sx) => [sx * (xi - 20), y - bt / 2, sz + 35]);
+ const steps: CustomStep[] = [
+ {
+ title: "Screw the cam studs into the side frames",
+ detail: "Lay both frames flat on a rug. Six in each frame: two in the back leg, four for the side panel.",
+ fix: [...studs(-1), ...studs(1)],
+ wait: ["SR"],
+ tools: ["screwdriver"],
+ pose: "+z",
+ warnings: ["floor"],
+ },
+ {
+ title: "Bolt the back rail to one frame",
+ detail: "Drop a bolt into the slot at the rail's end so its thread sticks out, then push the end into the frame's hole.",
+ add: ["SL", "RA"],
+ fix: [railBolt(-1, "RA", yR, zB)],
+ tools: ["allen"],
+ },
+ {
+ title: "Turn a sleeve onto the bolt",
+ detail: "Push the sleeve into the hole across the frame and turn it by hand until it catches the bolt.",
+ fix: [sleeve(-1, yR, zB)],
+ warnings: ["hand"],
+ },
+ { title: "Slide the back panel onto the studs", detail: "Holes for the cam locks facing up, its long edge along the back legs.", add: ["BP"] },
+ { title: "Lock the back panel to the frame", detail: "Two cam locks, turned clockwise until they pull tight.", fix: [camBP(-1)], tools: ["screwdriver"] },
+ {
+ title: "Put on the other frame",
+ detail: "Onto the free ends of the rail and the back panel. Bolt the rail the same way and turn a sleeve onto it.",
+ add: ["SR"],
+ fix: [railBolt(1, "RA", yR, zB), sleeve(1, yR, zB)],
+ tools: ["allen"],
+ },
+ { title: "Lock the back panel to the second frame", detail: "Two more cam locks.", fix: [camBP(1)], tools: ["screwdriver"] },
+ {
+ title: "Screw each low shelf to its side panel",
+ detail: "On a table, three long screws through each panel into the end of its shelf. One pair for each side.",
+ fix: [
+ fx("screw", "PL", [1, 0, 0], [-200, 0, 200].map((z) => [-xi, yR, kz0 + kd / 2 + z] as Vec3), { mate: "KL", len: 50, dia: 5 }),
+ fx("screw", "PR", [-1, 0, 0], [-200, 0, 200].map((z) => [xi, yR, kz0 + kd / 2 + z] as Vec3), { mate: "KR", len: 50, dia: 5 }),
+ ],
+ wait: ["PL", "KL", "PR", "KR"],
+ from: { PL: [0, 220, 260], KL: [0, 220, 260], PR: [0, 220, 260], KR: [0, 220, 260] },
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Fit the side panels into the frames",
+ detail: "Tilt each one in between the legs of its frame so the studs go into its edges, shelf facing in.",
+ add: ["PL", "KL", "PR", "KR"],
+ from: { PL: [0, 220, 260], KL: [0, 220, 260], PR: [0, 220, 260], KR: [0, 220, 260] },
+ },
+ { title: "Lock the side panels", detail: "Four cam locks in each, by the legs.", fix: [camP(-1), camP(1)], tools: ["screwdriver"] },
+ {
+ title: "Lift the front rail in together",
+ detail: "A bolt in each end and the two cable clips on it, then hold it between the front legs while the other pushes the ends home.",
+ add: ["RC"],
+ from: { RC: [0, 0, 260] },
+ fix: [railBolt(-1, "RC", yD - t / 2 - 30, zF), railBolt(1, "RC", yD - t / 2 - 30, zF), fx("clip", "RC", [0, 1, 0], [-1, 1].map((k) => [k * 300, yD - 30, zF] as Vec3), { name: "Cable clip", len: 30, dia: 20 })],
+ tools: ["allen"],
+ people: 2,
+ },
+ {
+ title: "Turn the sleeves onto the front rail's bolts",
+ detail: "One in each front leg. Then tighten both rails' bolts with the long Allen key.",
+ fix: [sleeve(-1, yD - t / 2 - 30, zF), sleeve(1, yD - t / 2 - 30, zF)],
+ tools: ["allen"],
+ },
+ {
+ title: "Get the desk top ready",
+ detail: "Lay it face down. Tap the two inserts in, then screw in the five cam bolts along its back edge.",
+ fix: [
+ fx("plug", "DT", [0, 1, 0], [-1, 1].map((sx) => [sx * xf, yD, 150] as Vec3), { name: "Insert", included: true, len: 12, dia: 10 }),
+ fx("camScrew", "DT", [0, 1, 0], [-500, -250, 0, 250, 500].map((x) => [x, yD, zB] as Vec3), { mate: "BP" }),
+ ],
+ wait: ["DT"],
+ tools: ["hammer", "screwdriver"],
+ },
+ { title: "Tap two dowels into the back panel", detail: "Into the holes along its top edge.", fix: [fx("dowel", "BP", [0, -1, 0], [-375, 375].map((x) => [x, yD, zB] as Vec3), { mate: "DT" })], tools: ["hammer"] },
+ { title: "Swing the desk top in", detail: "Its notches go round the upright tubes. Press it onto the dowels and cam bolts.", add: ["DT"] },
+ { title: "Lock the desk top", detail: "Five cam locks in the back panel, just under the top.", fix: [fx("cam", "BP", [0, 0, -1], [-500, -250, 0, 250, 500].map((x) => [x, yD - 30, zB + bt / 2] as Vec3))], tools: ["screwdriver"] },
+ {
+ title: "Screw the frames to the desk top",
+ detail: "One screw up through each frame's top tube into the insert.",
+ fix: [-1, 1].map((sx) => fx("screw", SIDE(sx), [0, 1, 0], [[sx * xf, yD - t, 150]], { mate: "DT", len: 40, dia: 6 })),
+ tools: ["allen"],
+ },
+ {
+ title: "Press the caps onto the leg ends",
+ detail: "One on the end of each of the four legs.",
+ fix: [-1, 1].map((sx) => fx("cap", SIDE(sx), [0, 1, 0], [zF, zB].map((z) => [sx * xf, 0, z] as Vec3), { name: "Leg cap", len: 8, dia: 30 })),
+ },
+ { title: "Stand it up together", detail: "Tip it up onto its legs between two of you.", pose: "+y", people: 2, warnings: ["two"] },
+ { title: "Tighten the rails", detail: "With two Allen keys, one on each side, tighten the bolts of the back rail." },
+ {
+ title: "Screw the low shelves to the back rail",
+ detail: "One long screw from the back through the rail into each shelf.",
+ fix: [-1, 1].map((sx) => fx("screw", "RA", [0, 0, 1], [[sx * (xi - bt - 200), yR, zB - t / 2]], { mate: sx < 0 ? "KL" : "KR", len: 70, dia: 5 })),
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Hook on the brackets for the monitor shelf",
+ detail: "One on the inside of each upright loop, in the slots at the height you want. Push it down until it locks.",
+ fix: [fx("angle", "SL", [0, 1, 0], brackets(yMS).slice(0, 1), { name: "Shelf bracket", len: 60, dia: 40 }), fx("angle", "SR", [0, 1, 0], brackets(yMS).slice(1), { name: "Shelf bracket", len: 60, dia: 40, twist: Math.PI })],
+ },
+ { title: "Hang the cable bar at the back", detail: "Its ends drop into the slots in the back legs, just over the desk.", add: ["CB"], from: { CB: [0, 200, 0] } },
+ { title: "Lay the monitor shelf on its brackets", detail: "Tilt it in between the loops, back edge first, and lower it on.", add: ["MS"], from: { MS: [0, 240, 120] } },
+ {
+ title: "Hook on the brackets for the top shelf",
+ detail: "Near the top of each loop, the same way.",
+ fix: [fx("angle", "SL", [0, 1, 0], brackets(yTS).slice(0, 1), { name: "Shelf bracket", len: 60, dia: 40 }), fx("angle", "SR", [0, 1, 0], brackets(yTS).slice(1), { name: "Shelf bracket", len: 60, dia: 40, twist: Math.PI })],
+ },
+ { title: "Drop in the back bar", detail: "Between the back legs, under the top shelf.", add: ["BB"], from: { BB: [0, 200, 0] } },
+ { title: "Drop in the front bar", detail: "Between the front posts of the loops, holes facing forward for the hooks.", add: ["FB"], from: { FB: [0, 200, 0] } },
+ { title: "Lay the top shelf on its brackets", detail: "Tilt it in over the bars and lower it on.", add: ["TS"], from: { TS: [0, 240, 120] } },
+ {
+ title: "Screw the shelves to their brackets",
+ detail: "Two screws up through each bracket.",
+ fix: [fx("screw", "MS", [0, 1, 0], shelfScrews("MS", yMS), { len: 14, dia: 4 }), fx("screw", "TS", [0, 1, 0], shelfScrews("TS", yTS), { len: 14, dia: 4 })],
+ tools: ["screwdriver"],
+ },
+ { title: "Hang the right loop panel", detail: "Two hooks on its edge go into the slots in the loop.", add: ["SPR"], from: { SPR: [200, 0, 0] } },
+ { title: "Hang the left loop panel", detail: "The same way on the other side.", add: ["SPL"], from: { SPL: [-200, 0, 0] } },
+ {
+ title: "Hook on the side shelf brackets",
+ detail: "On the outside of each loop, at the height you want.",
+ fix: [-1, 1].map((sx) => fx("angle", SIDE(sx), [0, 1, 0], [[sx * (xf + t / 2 + 20), 1150 - bt / 2, sz]], { name: "Side bracket", len: 60, dia: 40, twist: sx < 0 ? Math.PI : 0 })),
+ },
+ { title: "Lay the side shelves on", detail: "One on each bracket.", add: ["SSL", "SSR"] },
+ {
+ title: "Screw the side shelves on",
+ detail: "Two screws up through each bracket.",
+ fix: [-1, 1].map((sx, i) => fx("screw", i ? "SSR" : "SSL", [0, 1, 0], [-40, 40].map((k) => [sx * (xf + t / 2 + 60), 1150 - bt / 2, sz + k] as Vec3), { len: 14, dia: 4 })),
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Press in the large cable grommets",
+ detail: "Into the two holes at the back of the desk top.",
+ fix: [fx("cap", "DT", [0, -1, 0], [-1, 1].map((sx) => [sx * 450, yTop, -D / 2 + 90] as Vec3), { name: "Large grommet", len: 10, dia: 58 })],
+ },
+ {
+ title: "Press in the small cable grommets",
+ detail: "Into the holes near the front corners.",
+ fix: [fx("cap", "DT", [0, -1, 0], [[-W / 2 + 70, yTop, D / 2 - 70], [W / 2 - 110, yTop, D / 2 - 70]], { name: "Small grommet", len: 10, dia: 44 })],
+ },
+ {
+ title: "Screw the headphone hooks onto the front bar",
+ detail: "Four hooks, each held by a bolt from the back of the bar.",
+ fix: [
+ fx("knob", "FB", [0, 0, -1], [-450, -150, 150, 450].map((x) => [x, yBar, zU + t / 2] as Vec3), { name: "Headphone hook", len: 40, dia: 26 }),
+ fx("bolt", "FB", [0, 0, 1], [-450, -150, 150, 450].map((x) => [x, yBar, zU - t / 2] as Vec3), { len: 30, dia: 5 }),
+ ],
+ tools: ["allen"],
+ },
+ ];
+ return { parts, steps };
+}
+
+const family: Family = {
+ names: ["FREDDE"],
+ recipe(s) {
+ if (/gaming desk/i.test(s.variant)) return gamingDesk(s);
+ return null;
+ },
+};
+export default family;
diff --git a/src/lib/plan/families/glamberget.ts b/src/lib/plan/families/glamberget.ts
index e9a85e8..15a1996 100644
--- a/src/lib/plan/families/glamberget.ts
+++ b/src/lib/plan/families/glamberget.ts
@@ -16,10 +16,20 @@ import type { CustomFix, CustomParams, CustomPart, CustomStep, PartPiece, Produc
* in the divider, screws through the side), and the top is lowered on by two people and cam-locked. Door tracks press
* into the top and the bottom, two at the front and one at the back. Each door gets top guides, bottom rollers and a
* pine edge strip, the back door is hung first, then the two front doors. The clothes rail and two shelves go in last.
+ *
+ * Extendable bed with storage: the fixed frame is built lying on its back. Cam bolts and dowels go into the back
+ * rail, the end boards (dowels, connector bolts, slat stops) are bolted onto it, a slat ledge is screwed along it and
+ * the front rail goes on the ends' dowels. The two back legs are dowelled on and cam-locked to the back rail. Stood up,
+ * slat pins go in and thirteen slats are laid on. The pull-out part is a front rail with two legs on cam locks, a
+ * ledge, runner blocks and two steel slide brackets held under the end boards; its fourteen slats sit between the
+ * fixed ones, the last eight laid with it pulled out and tied by a steel strip. Two drawers on castors go underneath,
+ * each with a lid.
*/
const at = (kind: CustomFix["kind"], pts: Vec3[], dir: Vec3, on?: string, mate?: string, o: Partial<CustomFix> = {}): CustomFix => ({ kind, count: pts.length, at: pts, dir, on, mate, ...o });
+const box = (size: Vec3, pos: Vec3): PartPiece => ({ shape: "box", size, pos });
+
const GLIDE = { name: "Glide", len: 8, dia: 22 };
const ROD_L = { name: "Long threaded rod", len: 80, dia: 8 };
const ROD_S = { name: "Short threaded rod", len: 40, dia: 8 };
@@ -359,12 +369,300 @@ function wardrobe(s: ProductSpec): CustomParams {
return { parts, steps };
}
+
+function extendableBed(): CustomParams {
+ // IKEA: 201 long, 97 wide closed (183 pulled out), 35 high; mattress 190 x 90
+ const L = 2010, D = 970, H = 350;
+ const T = 22, yR0 = 170, yR = (yR0 + H) / 2, hR = H - yR0;
+ const zK = -D / 2 + T / 2; // back rail
+ const xE = L / 2 - 60 - T / 2; // end boards, inside the corner posts
+ const zF0 = D / 2 - 2 * T, zF = zF0 + T / 2; // fixed front rail
+ const zX = D / 2 - T / 2; // pull-out front rail
+ const eZ0 = -D / 2 + T, eL = zF0 - eZ0; // end boards from the back rail to the front rail
+ const xP = L / 2 - 30, postD = 80; // corner posts, 60 wide
+ const yLed = 235, yS = 257.5; // slat ledges and slats
+ const sZ0 = eZ0, sZ1 = zF0, sLen = sZ1 - sZ0, sZc = (sZ0 + sZ1) / 2;
+ const mainX = Array.from({ length: 13 }, (_, i) => -810 + 135 * i);
+ const extX = Array.from({ length: 14 }, (_, i) => -877.5 + 135 * i);
+ const xB = xE; // slide brackets, under the end boards
+ const zB0 = -380, zB1 = D / 2 - T - 30, yB0 = 140; // they reach the pull-out ledge
+ const yX0 = 140; // the pull-out rail reaches lower than the fixed one, so its ledge sits under the front rail
+ const dW = 870, dD = 810, dZ = -380 + dD / 2, dt = 18; // drawers
+ const dY0 = 20, dH = 120;
+ const drawers = [-1, 1].map((k) => ({ k, cx: k * (30 + dW / 2), n: k < 0 ? 1 : 2 }));
+
+ const parts: CustomPart[] = [
+ { id: "RK", name: "Back rail", size: [L, hR, T], pos: [0, yR, zK], material: "wood" },
+ ...[-1, 1].map((sx, i): CustomPart => ({ id: `E${i}`, name: "End board", size: [T, hR, eL], pos: [sx * xE, yR, eZ0 + eL / 2], material: "wood" })),
+ { id: "LK", name: "Slat ledge", size: [2 * xE - T, 30, 30], pos: [0, yLed, eZ0 + 15], material: "wood" },
+ {
+ id: "RF", name: "Front rail", size: [L, hR, T + 30], pos: [0, yR, zF - 15], material: "wood",
+ pieces: [box([L, hR, T], [0, 0, 15]), box([2 * xE - T, 30, 30], [0, yLed - yR, -T / 2 + 4])],
+ },
+ ...[-1, 1].map((sx, i): CustomPart => ({ id: `ML${i}`, name: "Back leg", size: [60, H, postD], pos: [sx * xP, H / 2, eZ0 + postD / 2], material: "wood" })),
+ ...mainX.map((x, i): CustomPart => ({ id: `MS${i}`, name: "Slat", size: [70, 15, sLen], pos: [x, yS, sZc], material: "wood" })),
+ { id: "X1", name: "Pull-out rail", size: [2 * (xP - 30), H - yX0, T], pos: [0, (H + yX0) / 2, zX], material: "wood" },
+ ...[-1, 1].map((sx, i): CustomPart => ({ id: `XL${i}`, name: "Pull-out leg", size: [60, H, T], pos: [sx * xP, H / 2, zX], material: "wood" })),
+ ...[-1, 1].map((sx, i): CustomPart => ({ id: `XP${i}`, name: "Runner block", size: [60, 20, T], pos: [sx * 880, yX0 - 10, zX], material: "wood" })),
+ { id: "LX", name: "Pull-out ledge", size: [2 * xE - T, 30, 30], pos: [0, yX0 + 15, zX - T / 2 - 15], material: "wood" },
+ ...[-1, 1].map((sx, i): CustomPart => ({ id: `MB${i}`, name: "Slide bracket", size: [30, 30, zB1 - zB0], pos: [sx * xB, yB0 + 15, (zB0 + zB1) / 2], material: "metal" })),
+ ...extX.map((x, i): CustomPart => ({ id: `XS${i}`, name: "Pull-out slat", size: [50, 15, sLen], pos: [x, yS, sZc], material: "wood" })),
+ { id: "ST", name: "Slat strip", size: [extX[13] - extX[0] + 50, 3, 30], pos: [0, yS + 9, sZc + 200], material: "metal" },
+ ];
+ for (const d of drawers) {
+ const yc = dY0 + dH / 2, xs = dW / 2 - dt / 2;
+ parts.push(
+ { id: `DF${d.n}`, name: "Drawer front", size: [dW, dH, dt], pos: [d.cx, yc, dZ + dD / 2 - dt / 2], material: "wood" },
+ { id: `DK${d.n}`, name: "Drawer back", size: [dW, dH, dt], pos: [d.cx, yc, dZ - dD / 2 + dt / 2], material: "wood" },
+ ...[-1, 1].map((sx, i): CustomPart => ({ id: `DS${d.n}${i}`, name: "Drawer side", size: [dt, dH, dD - 2 * dt], pos: [d.cx + sx * xs, yc, dZ], material: "wood" })),
+ { id: `DB${d.n}`, name: "Drawer bottom", size: [dW - 2 * dt, 4, dD - 2 * dt], pos: [d.cx, dY0 + 10, dZ], material: "fiber" },
+ { id: `DL${d.n}`, name: "Drawer lid", size: [dW, 12, dD], pos: [d.cx, dY0 + dH + 6, dZ], material: "wood" },
+ ...[-1, 1].map((sz, i): CustomPart => ({ id: `DC${d.n}${i}`, name: "Lid batten", size: [dW - 90, 20, 30], pos: [d.cx, dY0 + dH - 10, dZ + sz * (dD / 2 - 80)], material: "wood" })),
+ );
+ }
+
+ const both = (f: (sx: number, i: number) => CustomFix) => [-1, 1].map(f);
+ const ys3 = [200, 260, 320];
+ const pinPts = (xs: number[], zz: number[]) => xs.flatMap((x) => zz.map((z): Vec3 => [x, yS - 7.5, z]));
+ const PIN = { name: "Slat pin", len: 20, dia: 6 };
+ const STOP = { name: "Slat stop", len: 10, dia: 30 };
+ const CONN = { name: "Connector bolt", len: 30, dia: 6 };
+ const SHORT = { len: 15, dia: 4 };
+ const FLAT = { name: "Flat-head bolt", len: 30, dia: 6 };
+ const allDrawer = drawers.flatMap((d) => [`DF${d.n}`, `DK${d.n}`, `DS${d.n}0`, `DS${d.n}1`, `DB${d.n}`, `DL${d.n}`, `DC${d.n}0`, `DC${d.n}1`]);
+ const drawerJoint = (kind: "dowel" | "camScrew" | "cam", back: boolean) =>
+ drawers.flatMap((d) =>
+ [-1, 1].map((sx, i): CustomFix => {
+ const x = d.cx + sx * (dW / 2 - dt / 2);
+ const zf = dZ + (back ? -1 : 1) * (dD / 2 - dt); // the inner face of the front or back
+ const side = `DS${d.n}${i}`, end = `${back ? "DK" : "DF"}${d.n}`;
+ if (kind === "dowel") return at("dowel", [35, 65, 95, 125].map((y): Vec3 => [x, y, zf]), [0, 0, back ? -1 : 1], side, end);
+ if (kind === "camScrew") return at("camScrew", [50, 110].map((y): Vec3 => [x, y, zf]), [0, 0, back ? 1 : -1], end, side, { len: 24 });
+ return at("cam", [50, 110].map((y): Vec3 => [x - sx * dt / 2, y, zf + (back ? 30 : -30)]), [sx, 0, 0], side, undefined, { dia: 15 });
+ }),
+ );
+ const steps: CustomStep[] = [
+ {
+ title: "Twist four cam bolts into the back rail",
+ detail: "Lay the back rail flat on a rug, holes up. Two bolts near each end, in by hand until they stop.",
+ add: ["RK"],
+ fix: both((sx) => at("camScrew", [220, 300].map((y): Vec3 => [sx * xP, y, zK + T / 2]), [0, 0, 1], "RK", `ML${(sx + 1) / 2}`, { name: "Long cam bolt", len: 50 })),
+ tools: ["screwdriver"],
+ pose: "+z",
+ warnings: ["floor"],
+ },
+ { title: "Tap dowels into the back rail", detail: "Three at each end, in the holes for the end boards.", fix: both((sx, i) => at("dowel", ys3.map((y): Vec3 => [sx * xE, y, zK + T / 2]), [0, 0, 1], "RK", `E${i}`)), tools: ["hammer"] },
+ {
+ title: "Tap dowels into the front ends of the end boards",
+ detail: "Two in each board, in the end without the slat stop holes.",
+ fix: both((sx, i) => at("dowel", [200, 320].map((y): Vec3 => [sx * xE, y, zF0]), [0, 0, 1], `E${i}`, "RF")),
+ wait: ["E0", "E1"],
+ tools: ["hammer"],
+ },
+ {
+ title: "Screw connector bolts into the end boards",
+ detail: "Two in the same end of each board, turned in with the Allen key until only the head stands out.",
+ fix: both((sx, i) => at("connector", [240, 280].map((y): Vec3 => [sx * xE, y, zF0]), [0, 0, -1], `E${i}`, undefined, CONN)),
+ wait: ["E0", "E1"],
+ tools: ["allen"],
+ },
+ {
+ title: "Press slat stops onto the end boards",
+ detail: "Three along the top edge of each board.",
+ fix: both((sx, i) => at("clip", [-250, 0, 250].map((z): Vec3 => [sx * xE, H, z]), [0, -1, 0], `E${i}`, undefined, STOP)),
+ wait: ["E0", "E1"],
+ },
+ {
+ title: "Bolt the end boards to the back rail",
+ detail: "Stand them on the rail's dowels, slat stops on the inside top. Three bolts through the rail into each.",
+ add: ["E0", "E1"],
+ from: { E0: [0, 0, 300], E1: [0, 0, 300] },
+ fix: both((sx, i) => at("bolt", [180, 230, 290].map((y): Vec3 => [sx * xE, y, -D / 2]), [0, 0, 1], "RK", `E${i}`, FLAT)),
+ tools: ["allen"],
+ },
+ {
+ title: "Screw the slat ledge along the back rail",
+ detail: "Its holes for the slat pins face the front of the bed. Ten screws through the ledge into the rail.",
+ add: ["LK"],
+ fix: [at("screw", Array.from({ length: 10 }, (_, i): Vec3 => [Math.round(-850 + (1700 * i) / 9), yLed, eZ0 + 30]), [0, 0, -1], "LK", "RK", { len: 35, dia: 4 })],
+ tools: ["screwdriver"],
+ },
+ { title: "Tap a dowel into each end board", detail: "One more, between the two in the front end.", fix: both((sx, i) => at("dowel", [[sx * xE, 260, zF0]], [0, 0, 1], `E${i}`, "RF")), tools: ["hammer"] },
+ {
+ title: "Tap the long dowels into the front rail",
+ detail: "One near each end, on the side with the ledge.",
+ fix: both((sx, i) => at("dowel", [[sx * xE, 340, zF0]], [0, 0, -1], "RF", `E${i}`, { len: 40, dia: 10 })),
+ wait: ["RF"],
+ tools: ["hammer"],
+ },
+ { title: "Lay the front rail on the end boards", detail: "Ledge on the inside, holes over the dowels and connector bolts. Press it down evenly.", add: ["RF"], from: { RF: [0, 0, 300] } },
+ {
+ title: "Tap the long dowels into the back legs",
+ detail: "Two in each leg, the ones for the back rail.",
+ fix: both((sx, i) => at("dowel", [190, 330].map((y): Vec3 => [sx * xP, y, eZ0]), [0, 0, -1], `ML${i}`, "RK", { len: 40, dia: 10 })),
+ wait: ["ML0", "ML1"],
+ tools: ["hammer"],
+ },
+ {
+ title: "Push cam locks into the back legs",
+ detail: "Two in each, arrows pointing at the edge that meets the rail.",
+ fix: both((sx, i) => at("cam", [220, 300].map((y): Vec3 => [sx * (L / 2), y, eZ0 + 20]), [-sx, 0, 0], `ML${i}`, undefined, { dia: 25 })),
+ wait: ["ML0", "ML1"],
+ tools: ["screwdriver"],
+ },
+ { title: "Fit the back legs", detail: "Swing each one down onto the rail's dowels and cam bolts at the corners.", add: ["ML0", "ML1"], from: { ML0: [0, 0, 300], ML1: [0, 0, 300] } },
+ { title: "Turn the cam locks", detail: "Clockwise with the big Allen key until each leg is pulled tight to the rail.", tools: ["allen"] },
+ {
+ title: "Bolt the legs to the end boards",
+ detail: "Two connector bolts through each leg into the end of its board.",
+ fix: both((sx, i) => at("connector", [230, 290].map((y): Vec3 => [sx * (L / 2), y, eZ0 + 40]), [-sx, 0, 0], `ML${i}`, `E${i}`, CONN)),
+ tools: ["allen"],
+ },
+ {
+ title: "Stand the frame up and press in the slat pins",
+ detail: "Thirteen along the back ledge and thirteen along the front one.",
+ fix: [at("pin", pinPts(mainX, [eZ0 + 15, zF0 - 15]), [0, -1, 0], undefined, undefined, PIN)],
+ pose: "+y",
+ people: 2,
+ warnings: ["two"],
+ },
+ { title: "Lay the slats on the pins", detail: "Thirteen slats, curved side up. Leave the gaps between them even: the pull-out slats go there.", add: mainX.map((_, i) => `MS${i}`), from: Object.fromEntries(mainX.map((_, i) => [`MS${i}`, [0, 200, 0] as Vec3])) },
+ {
+ title: "Twist cam bolts into the pull-out rail",
+ detail: "It goes along the front of the bed. Two bolts in each end, in by hand.",
+ add: ["X1"],
+ from: { X1: [0, 0, 400] },
+ fix: both((sx, i) => at("camScrew", [220, 300].map((y): Vec3 => [sx * (xP - 30), y, zX]), [sx, 0, 0], "X1", `XL${i}`, { name: "Long cam bolt", len: 50 })),
+ tools: ["screwdriver"],
+ warnings: ["floor"],
+ },
+ { title: "Tap dowels into the pull-out rail", detail: "Two in each end.", fix: both((sx, i) => at("dowel", [190, 330].map((y): Vec3 => [sx * (xP - 30), y, zX]), [sx, 0, 0], "X1", `XL${i}`)), tools: ["hammer"] },
+ { title: "Press a slat stop onto each pull-out leg", detail: "On the top end.", fix: both((sx, i) => at("clip", [[sx * xP, H, zX]], [0, -1, 0], `XL${i}`, undefined, STOP)), wait: ["XL0", "XL1"] },
+ {
+ title: "Bolt the runner blocks under the rail",
+ detail: "One near each end, three bolts each.",
+ add: ["XP0", "XP1"],
+ fix: both((sx, i) => at("bolt", [-20, 0, 20].map((dx): Vec3 => [sx * 880 + dx, yX0 - 20, zX]), [0, 1, 0], `XP${i}`, "X1", FLAT)),
+ tools: ["allen"],
+ },
+ {
+ title: "Screw the ledge along the pull-out rail",
+ detail: "Low on the inside face, nine screws.",
+ add: ["LX"],
+ fix: [at("screw", Array.from({ length: 9 }, (_, i): Vec3 => [Math.round(-800 + 200 * i), yX0 + 15, zX - T / 2 - 30]), [0, 0, 1], "LX", "X1", { len: 35, dia: 4 })],
+ tools: ["screwdriver"],
+ },
+ { title: "Tap the long dowels into the pull-out legs", detail: "Two in each leg.", fix: both((sx, i) => at("dowel", [250, 280].map((y): Vec3 => [sx * (xP - 30), y, zX]), [-sx, 0, 0], `XL${i}`, "X1", { len: 40, dia: 10 })), wait: ["XL0", "XL1"], tools: ["hammer"] },
+ { title: "Push cam locks into the pull-out legs", detail: "Two in each, arrows towards the rail.", fix: both((sx, i) => at("cam", [220, 300].map((y): Vec3 => [sx * xP, y, D / 2]), [0, 0, -1], `XL${i}`, undefined, { dia: 25 })), wait: ["XL0", "XL1"], tools: ["screwdriver"] },
+ { title: "Fit the pull-out legs onto the rail", detail: "Push each one onto the dowels and cam bolts at an end.", add: ["XL0", "XL1"], from: { XL0: [-300, 0, 0], XL1: [300, 0, 0] } },
+ { title: "Turn the cam locks", detail: "Clockwise until the legs sit tight against the rail.", tools: ["allen"] },
+ {
+ title: "Clip the slide guides onto the brackets",
+ detail: "One plastic guide over the back end of each steel bracket.",
+ fix: both((sx, i) => at("clip", [[sx * xB, yB0 + 30, zB0 + 20]], [0, -1, 0], `MB${i}`, undefined, { name: "Slide guide", len: 30, dia: 30 })),
+ wait: ["MB0", "MB1"],
+ },
+ {
+ title: "Screw the brackets under the end boards",
+ detail: "Run each bracket along the bottom of an end board, guide at the back, two small screws each.",
+ add: ["MB0", "MB1"],
+ from: { MB0: [0, -200, 0], MB1: [0, -200, 0] },
+ fix: both((sx, i) => at("screw", [-300, 100].map((z): Vec3 => [sx * xB, yB0, z]), [0, 1, 0], `MB${i}`, `E${i}`, { len: 40, dia: 4 })),
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Press in pins and lay the first pull-out slats",
+ detail: "Six pins, then six slats in every other gap between the fixed ones.",
+ add: extX.filter((_, i) => i % 2 === 1 && i < 12).map((_, j) => `XS${2 * j + 1}`),
+ fix: [at("pin", pinPts(extX.filter((_, i) => i % 2 === 1 && i < 12), [zF0 - 15]), [0, -1, 0], undefined, undefined, PIN)],
+ },
+ {
+ title: "Join the pull-out rail to the brackets",
+ detail: "The brackets rest on its ledge. An angle bracket and a screw at each end, then four more screws along the brackets.",
+ fix: [
+ ...both((sx) => at("angle", [[sx * 900, yX0 + 30, zB1]], [0, 0, -1], "LX", undefined, { len: 30, dia: 30 })),
+ at("screw", [-1, 1].map((sx): Vec3 => [sx * 900, yX0, zB1 + 15]), [0, 1, 0], "LX", undefined, SHORT),
+ ...both((sx, i) => at("screw", [-200, 300].map((z): Vec3 => [sx * xB, yB0, z]), [0, 1, 0], `MB${i}`, undefined, SHORT)),
+ ],
+ tools: ["screwdriver"],
+ },
+ { title: "Pull the bed out", detail: "Draw the pull-out part forward to its full width, so the gaps between the slats open up." },
+ {
+ title: "Press in the last pins and lay the other slats",
+ detail: "Eight pins, then the eight remaining slats in the open gaps.",
+ add: extX.map((_, i) => i).filter((i) => !(i % 2 === 1 && i < 12)).map((i) => `XS${i}`),
+ fix: [at("pin", pinPts(extX.filter((_, i) => !(i % 2 === 1 && i < 12)), [zF0 - 15]), [0, -1, 0], undefined, undefined, PIN)],
+ },
+ {
+ title: "Screw the steel strip across the slats",
+ detail: "Eight screws, one into each of the slats you just laid, so they move together.",
+ add: ["ST"],
+ fix: [at("screw", extX.filter((_, i) => !(i % 2 === 1 && i < 12)).map((x): Vec3 => [x, yS + 10.5, sZc + 200]), [0, -1, 0], "ST", undefined, SHORT)],
+ tools: ["screwdriver"],
+ },
+ { title: "Push the bed back together", detail: "It slides in until the pull-out legs meet the fixed frame." },
+ {
+ title: "Twist cam bolts into the drawer fronts and backs",
+ detail: "Open the second bag. Four in each front and back, for both drawers.",
+ fix: [...drawerJoint("camScrew", false), ...drawerJoint("camScrew", true)],
+ wait: allDrawer,
+ tools: ["screwdriver"],
+ },
+ { title: "Tap dowels into the drawer sides", detail: "Four in each end of every side.", fix: [...drawerJoint("dowel", false), ...drawerJoint("dowel", true)], wait: allDrawer, tools: ["hammer"] },
+ {
+ title: "Join the sides to the fronts",
+ detail: "Lay each front face down and push both sides onto its cam bolts, grooves facing in.",
+ add: drawers.flatMap((d) => [`DF${d.n}`, `DS${d.n}0`, `DS${d.n}1`]),
+ from: Object.fromEntries(drawers.flatMap((d) => [`DF${d.n}`, `DS${d.n}0`, `DS${d.n}1`].map((id) => [id, [0, 0, 600] as Vec3]))),
+ fix: drawerJoint("cam", false),
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Slide in the drawer bottoms",
+ detail: "Into the grooves from the open end, smooth side up.",
+ add: drawers.map((d) => `DB${d.n}`),
+ from: Object.fromEntries(drawers.map((d) => [`DB${d.n}`, [0, 0, -500] as Vec3])),
+ },
+ {
+ title: "Fit the drawer backs",
+ detail: "Over the dowels at the open end, then turn the cam locks.",
+ add: drawers.map((d) => `DK${d.n}`),
+ from: Object.fromEntries(drawers.map((d) => [`DK${d.n}`, [0, 0, -300] as Vec3])),
+ fix: drawerJoint("cam", true),
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Screw four castors under each drawer",
+ detail: "One near each corner, two screws each.",
+ fix: drawers.flatMap((d) => {
+ const pts = [-1, 1].flatMap((sx) => [-1, 1].map((sz): Vec3 => [d.cx + sx * (dW / 2 - dt / 2), dY0, dZ + sz * (dD / 2 - 60)]));
+ return [
+ at("castor", pts, [0, 1, 0], `DS${d.n}0`, undefined, { len: 20, dia: 30 }),
+ at("screw", pts.flatMap((p) => [-15, 15].map((dz): Vec3 => [p[0], p[1], p[2] + dz])), [0, 1, 0], undefined, undefined, { len: 16, dia: 4 }),
+ ];
+ }),
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Screw the battens under the lids",
+ detail: "Two battens on each lid, three screws through the lid into each. Then turn the lids over onto the drawers, battens down inside.",
+ add: drawers.flatMap((d) => [`DL${d.n}`, `DC${d.n}0`, `DC${d.n}1`]),
+ from: Object.fromEntries(drawers.flatMap((d) => [`DL${d.n}`, `DC${d.n}0`, `DC${d.n}1`].map((id) => [id, [0, 250, 0] as Vec3]))),
+ fix: drawers.flatMap((d) => [-1, 1].map((sz, i) => at("screw", [-300, 0, 300].map((x): Vec3 => [d.cx + x, dY0 + dH + 12, dZ + sz * (dD / 2 - 80)]), [0, -1, 0], `DL${d.n}`, `DC${d.n}${i}`, { len: 35, dia: 4 }))),
+ tools: ["screwdriver"],
+ },
+ { title: "Push the drawers under the bed", detail: "From the front, between the legs. They roll out when the bed is pulled out too." },
+ ];
+ return { parts, steps };
+}
+
const family: Family = {
names: ["GLAMBERGET"],
recipe(s) {
const slug = s.slug ?? "";
if (/room-divider/.test(slug)) return divider(s);
if (/wardrobe-3-sliding-doors/.test(slug)) return wardrobe(s);
+ if (/extendable-bed/.test(slug)) return extendableBed();
return null;
},
};
diff --git a/src/lib/plan/families/grejig.ts b/src/lib/plan/families/grejig.ts
new file mode 100644
index 0000000..1d327ad
--- /dev/null
+++ b/src/lib/plan/families/grejig.ts
@@ -0,0 +1,75 @@
+import type { Family } from "./family";
+import type { PartPiece, ProductSpec, Vec3 } from "../../types";
+import type { PlanBuilder } from "../builder";
+
+/**
+ * GREJIG shoe rack, read from its manual: one steel wire shelf with a folding leg frame at each end, sold folded.
+ * Turned upside down, both leg frames swing out until they click; up to three racks stack on each other. Nothing
+ * to screw.
+ */
+
+/** Euler angles (x then z) that turn a part's y axis onto d. */
+function along(d: Vec3): Vec3 {
+ const n = Math.hypot(...d);
+ const [x, y, z] = [d[0] / n, d[1] / n, d[2] / n];
+ return [Math.atan2(z, y), 0, Math.atan2(-x, Math.hypot(y, z))];
+}
+
+function wire(a: Vec3, b: Vec3, dia: number): PartPiece {
+ const d: Vec3 = [b[0] - a[0], b[1] - a[1], b[2] - a[2]];
+ return { shape: "cyl", size: [dia, Math.hypot(...d), dia], pos: [(a[0] + b[0]) / 2, (a[1] + b[1]) / 2, (a[2] + b[2]) / 2], rot: along(d) };
+}
+
+function build(b: PlanBuilder, s: ProductSpec) {
+ const W = Math.round(s.size.w * 10) || 580, D = Math.round(s.size.d * 10) || 270, H = Math.round(s.size.h * 10) || 170;
+ const yS = H - 6; // the shelf's rim
+ const xr = W / 2 - 4, zr = D / 2 - 4;
+ const shelf: PartPiece[] = [
+ wire([-xr, yS, -zr], [xr, yS, -zr], 7),
+ wire([-xr, yS, zr], [xr, yS, zr], 7),
+ wire([-xr, yS, -zr], [-xr, yS, zr], 7),
+ wire([xr, yS, -zr], [xr, yS, zr], 7),
+ ];
+ for (let k = 1; k < 8; k++) {
+ const z = -zr + (2 * zr * k) / 8;
+ shelf.push(wire([-xr, yS - 3, z], [xr, yS - 3, z], 4));
+ }
+ for (let k = 1; k < 22; k++) {
+ const x = -xr + (2 * xr * k) / 22;
+ shelf.push(wire([x, yS + 2, -zr], [x, yS + 2, zr], 3));
+ }
+ const S = b.compound("Shelf", shelf, { material: "metal" });
+ const shelfKey = b.place(S.type, S.mid);
+ // each leg frame hangs from a hinge bar under the end of the shelf and splays in a little to its feet
+ const yH = yS - 10;
+ const legs = ([-1, 1] as const).map((g) => {
+ const xh = g * (W / 2 - 18), xf = g * (W / 2 - 40), zl = D / 2 - 16;
+ const pieces: PartPiece[] = [wire([xh, yH, -zl], [xh, yH, zl], 6), wire([xf, 5, -zl], [xf, 5, zl], 6)];
+ for (const sz of [-1, 1]) pieces.push(wire([xh, yH, sz * zl], [xf, 5, sz * zl], 6));
+ const L = b.compound("Leg frame", pieces, { material: "metal" });
+ const key = b.place(L.type, L.mid);
+ // folded flat under the shelf: turned a quarter about the hinge bar
+ const c = -g * (Math.PI / 2);
+ const v: Vec3 = [L.mid[0] - xh, L.mid[1] - yH, 0];
+ const folded: Vec3 = [xh + v[0] * Math.cos(c) - v[1] * Math.sin(c), yH + v[0] * Math.sin(c) + v[1] * Math.cos(c), L.mid[2]];
+ return { key, folded, rot: [0, 0, c] as Vec3 };
+ });
+ b.step({ title: "Lay the rack upside down", detail: "Lay it on a rug with the legs folded flat against the shelf.", kind: "general", pose: "-y", warnings: ["floor"] }, () => {
+ b.add(shelfKey);
+ for (const l of legs) b.stage(l.key, l.folded, l.rot);
+ });
+ b.step({ title: "Fold out both leg frames", detail: "Swing each one up until it clicks into place. Pull on it to check it's locked.", kind: "legs", pose: "-y" }, () => {
+ for (const l of legs) b.add(l.key);
+ });
+ b.step({ title: "Turn it over", detail: "Stand it on its feet. Up to three racks stack on top of each other, no more. Don't sit or stand on it.", kind: "general", pose: "+y" }, () => b.wait(0.4));
+ return true;
+}
+
+const family: Family = {
+ names: ["GREJIG"],
+ build(b, s) {
+ if (!/shoe rack/i.test(s.variant)) return false;
+ return build(b, s);
+ },
+};
+export default family;
diff --git a/src/lib/plan/families/gryteryd.ts b/src/lib/plan/families/gryteryd.ts
new file mode 100644
index 0000000..c726b24
--- /dev/null
+++ b/src/lib/plan/families/gryteryd.ts
@@ -0,0 +1,55 @@
+import type { Family } from "./family";
+import type { CustomParams, CustomPart, PartPiece, ProductSpec, Vec3 } from "../../types";
+
+/**
+ * GRYTERYD recliner rocker, from its manual. It comes nearly assembled: the seat with its arms, rocker base and
+ * footrest is one piece, the backrest another. The cable ties that hold the mechanism for transport are cut, the
+ * cover flap at the back of the seat is opened, the backrest is lowered onto its two brackets until both click, and
+ * the flap is closed again. There are no loose fittings.
+ */
+
+function recipe(_s: ProductSpec): CustomParams {
+ // IKEA: 29 7/8 x 40 1/2 x 37 in (76 x 103 x 94 cm), seat 49 cm high, 54 wide and 53 deep
+ const W = 760, H = 1030, D = 940;
+ const base = 60, armTop = 630, seatTop = 490, SW = 540;
+ const armW = (W - SW) / 2;
+ const by = (base + armTop) / 2;
+ const BT = 220, zBack = -D / 2 + BT / 2 + 20;
+ const seatZ0 = zBack + BT / 2, seatD = D / 2 - 20 - seatZ0;
+ const body: PartPiece[] = [
+ ...[-1, 1].map((g): PartPiece => ({ shape: "box", size: [armW, armTop - base, D], pos: [g * (W / 2 - armW / 2), 0, 0] })),
+ { shape: "box", size: [SW, seatTop - base, seatD], pos: [0, (seatTop + base) / 2 - by, seatZ0 + seatD / 2] },
+ { shape: "box", size: [SW, 300, BT], pos: [0, base + 150 - by, zBack] }, // the back of the seat frame, under the backrest
+ { shape: "box", size: [SW - 60, base, D - 300], pos: [0, base / 2 - by, 0], material: "metal" }, // the rocker base
+ ];
+ const backH = H - (base + 300);
+ const parts: CustomPart[] = [
+ { id: "A", name: "Seat with armrests", size: [W, armTop - base, D], pos: [0, by, 0], material: "soft", pieces: body },
+ { id: "B", name: "Backrest", size: [SW, backH, BT], pos: [0, base + 300 + backH / 2, zBack - 20], rot: [-0.1, 0, 0], material: "soft" },
+ ];
+ const brackets: Vec3[] = [-1, 1].map((g): Vec3 => [g * (SW / 2 - 60), base + 300, zBack - 20]);
+ return {
+ parts,
+ steps: [
+ {
+ title: "Cut the four cable ties",
+ detail: "Tip the seat forward and cut the ties that hold the mechanism for transport. Throw them away, and keep fingers clear of the mechanism.",
+ add: ["A"],
+ warnings: ["hand"],
+ },
+ { title: "Open the flap at the back", detail: "Pull the zip or hook at the back of the seat open, so the two brackets inside stand free." },
+ { title: "Lift the cover up off the brackets", detail: "Fold the loose cover at the back up and over the seat, out of the way." },
+ {
+ title: "Lower the backrest onto the brackets",
+ detail: "Hold it upright over the back of the seat and push it straight down until both brackets click into place.",
+ add: ["B"],
+ from: { B: [0, 400, 0] },
+ fix: [{ kind: "clip", name: "Backrest bracket", count: 2, at: brackets, dir: [0, -1, 0], on: "B", included: true }],
+ },
+ { title: "Close the flap", detail: "Pull the cover back down over the joint and close it underneath, then sit in it and try the recline lever." },
+ ],
+ };
+}
+
+const family: Family = { names: ["GRYTERYD"], recipe };
+export default family;
diff --git a/src/lib/plan/families/gullaberg.ts b/src/lib/plan/families/gullaberg.ts
index c8f9feb..c117770 100644
--- a/src/lib/plan/families/gullaberg.ts
+++ b/src/lib/plan/families/gullaberg.ts
@@ -1966,6 +1966,383 @@ function buildWardrobe(b: PlanBuilder, s: ProductSpec) {
return true;
}
+/* ---------- add-on unit ---------- */
+
+/*
+ * Add-on unit (desk riser with two drawers): each drawer housing is two sides with runners and cam bolts, a back and
+ * a rail on dowels, locked with cams. The top lies face down, both housings stand upside down on it and long screws
+ * go down through their sides into the top; glides cover the screw heads. The drawers are built on their fronts
+ * (cam bolts, sides on dowels, bottom down the grooves, the back on push-in dowels), take a knob, and are screwed to
+ * the pulled-out runners.
+ */
+
+const ADDON_SCREW: HwDef = { kind: "screw", len: 115, dia: 5 };
+const ADDON_GLIDE: HwDef = { kind: "glide", len: 6, dia: 16, name: "Glide" };
+const ADDON_CAM: HwDef = { kind: "cam", len: 10, dia: 12 };
+const PUSH_DOWEL: HwDef = { kind: "dowel", len: 30, dia: 8, name: "Push-in dowel" };
+const ADDON_RUN_SCREW: HwDef = { kind: "screw", len: 12, dia: 4 };
+const DRAWER_FIX: HwDef = { kind: "screw", len: 14, dia: 4 };
+const ADDON_KNOB_SCREW: HwDef = { kind: "screw", len: 22, dia: 4 };
+
+function buildAddOn(b: PlanBuilder) {
+ // IKEA's page: 110 wide, 12 high, 31 deep
+ const W = 1100, H = 120, TT = 18, zB = -155, zT = 135;
+ const yT = H - TT, st = 16, hw = 280, hd = 280;
+ const top = b.place(b.part("Top", [W, TT, zT - zB]), [0, yT + TT / 2, (zB + zT) / 2]);
+ const xs = [-1, 1].map((g) => g * (W / 2 - hw / 2)); // housing centres
+ const xi = hw / 2 - st; // centre to the inside of a side
+ const sideT = b.part("Side panel", [st, yT, hd]);
+ const zs = zB + hd / 2;
+ const sides = xs.flatMap((x) => [b.place(sideT, [x - xi - st / 2, yT / 2, zs]), b.place(sideT, [x + xi + st / 2, yT / 2, zs])]);
+ const backT = b.part("Back panel", [2 * xi, yT, st]);
+ const backs = xs.map((x) => b.place(backT, [x, yT / 2, zB + st / 2]));
+ const railT = b.part("Rail", [2 * xi, 20, 50]);
+ const zR = 20;
+ const rails = xs.map((x) => b.place(railT, [x, 10, zR]));
+ const sideOf = (h: number, g: number) => sides[h * 2 + (g < 0 ? 0 : 1)];
+
+ // drawers: a front between the sides, the box riding on the runners
+ const fw = 2 * xi - 4, fh = 80, ft = 16, zF = zs + hd / 2 - 5, zIn = zF - ft;
+ const ds = 12, dd = 230, dh = 60, dy0 = 30, rt = 13;
+ const dx = xi - rt - ds / 2;
+ const frontT = b.part("Drawer front", [fw, fh, ft]);
+ const fronts = xs.map((x) => b.place(frontT, [x, 20 + fh / 2, zF - ft / 2]));
+ const dsT = b.part("Drawer side", [ds, dh, dd]);
+ const dSides = xs.flatMap((x) => [b.place(dsT, [x - dx, dy0 + dh / 2, zIn - dd / 2]), b.place(dsT, [x + dx, dy0 + dh / 2, zIn - dd / 2])]);
+ const botT = b.part("Drawer bottom", [2 * dx - 4, 3, dd - 14], { material: "fiber" });
+ const dBots = xs.map((x) => b.place(botT, [x, dy0 + 8, zIn - dd / 2 - 4]));
+ const dBackT = b.part("Drawer back", [2 * dx - ds, dh - 12, ds]);
+ const dBacks = xs.map((x) => b.place(dBackT, [x, dy0 + 12 + (dh - 12) / 2, zIn - dd + ds / 2]));
+ const dSide = (h: number, g: number) => dSides[h * 2 + (g < 0 ? 0 : 1)];
+
+ const runLen = 240, yRun = dy0 + 20, zRun = zIn - 5 - runLen / 2;
+ const each = (f: (h: number, g: number, x: number) => FitOpts[]) => [0, 1].flatMap((h) => [-1, 1].flatMap((g) => f(h, g, xs[h])));
+ const runners = each((h, g, x) => [{ on: sideOf(h, g), at: [x + g * xi, yRun, zRun], dir: [g, 0, 0], hole: false }]);
+ const runScrews = each((h, g, x) => [zIn - 30, zIn - runLen + 20].map((z): FitOpts => ({ on: sideOf(h, g), at: [x + g * (xi - 4), yRun, z], dir: [g, 0, 0] })));
+ // the back and the rail: a dowel in each of their ends, one in the side beside it, and a cam bolt in the side
+ const zBk = zB + st / 2;
+ const joint = (h: number, back: boolean) => (back ? backs[h] : rails[h]);
+ const boltPts = each((h, g, x) => [true, false].map((bk): FitOpts => ({ on: sideOf(h, g), at: [x + g * xi, bk ? yT / 2 : 10, bk ? zBk : zR - 12], dir: [g, 0, 0], mate: joint(h, bk), mateHole: 4 })));
+ const boardDowels = each((h, g, x) => [true, false].map((bk): FitOpts => ({ on: joint(h, bk), at: [x + g * xi, bk ? yT * 0.8 : 10, bk ? zBk : zR + 12], dir: [-g, 0, 0], mate: sideOf(h, g) })));
+ const sideDowels = each((h, g, x) => [true, false].map((bk): FitOpts => ({ on: sideOf(h, g), at: [x + g * xi, bk ? yT * 0.2 : 10, bk ? zBk : zR], dir: [g, 0, 0], mate: joint(h, bk) })));
+ const cams = each((h, g, x) => [
+ { on: backs[h], at: [x + g * (xi - 30), yT / 2, zB + st], dir: [0, 0, -1] },
+ { on: rails[h], at: [x + g * (xi - 30), 0, zR - 12], dir: [0, 1, 0] },
+ ]);
+ const scr = each((h, g, x) => [zB + 30, zs + hd / 2 - 30].map((z): FitOpts => ({ on: sideOf(h, g), at: [x + g * (xi + st / 2), 0, z], dir: [0, 1, 0], mate: top })));
+
+ step(b, { title: "Screw the runners into the sides", detail: "Lay the four sides on a rug, inside up. Two screws hold each runner.", tools: ["screwdriver"], scene: "prep", kind: "runners", warnings: ["floor"] }, () => {
+ b.stagger(0.15);
+ sides.forEach((k, i) => lay(b, [k], b.partItem(k).final.pos, [(i - 1.5) * 330, st / 2, 0], [0, 0, (i % 2 ? -1 : 1) * Math.PI / 2]));
+ b.then(0.15);
+ b.fits(runnerDef(runLen), runners, 0.15);
+ b.then(0.1);
+ b.fits(ADDON_RUN_SCREW, runScrews, 0.05);
+ });
+ step(b, { title: "Screw the cam bolts into the sides", detail: "Two in each side, by hand until they stop.", tools: ["screwdriver"], scene: "prep", kind: "cams" }, () => b.fits(HW.camScrew, boltPts, 0.06));
+ step(b, { title: "Tap the dowels into the backs and the rails", detail: "One in each end.", tools: ["hammer"], scene: "boards", kind: "dowels" }, () => {
+ b.stagger(0.15);
+ [...backs, ...rails].forEach((k, i) => lay(b, [k], b.partItem(k).final.pos, [0, i < 2 ? st / 2 : 10, (i - 1.5) * 160], i < 2 ? [-Math.PI / 2, 0, 0] : [0, 0, 0]));
+ b.then(0.15);
+ b.fits(HW.dowel, boardDowels, 0.05);
+ });
+ step(b, { title: "Tap the dowels into the sides", detail: "Two in each side, next to the cam bolts.", tools: ["hammer"], scene: "prep", kind: "dowels" }, () => b.fits(HW.dowel, sideDowels, 0.05));
+ step(b, { title: "Push the sides onto the back and the rail", detail: "Upside down, cam bolts towards the boards. Build both housings.", pose: "-y", kind: "join" }, () => {
+ b.stagger(0.1);
+ for (const k of [...backs, ...rails]) b.add(k, [0, -160, 0]);
+ b.then(0.15);
+ b.stagger(0.15);
+ for (const h of [0, 1]) for (const g of [-1, 1]) b.add(sideOf(h, g), [g * 220, 0, 0]);
+ });
+ step(b, { title: "Lock the cam locks", detail: "Arrow towards the bolt, then turn clockwise until it pulls tight.", tools: ["screwdriver"], pose: "-y", kind: "cams" }, () => b.fits(HW.cam, cams, 0.1));
+ step(b, { title: "Stand both housings on the top", detail: "Lay the top face down on the rug and set the housings on it, upside down, flush with the ends and the back.", pose: "-y", kind: "join", warnings: ["floor"] }, () => b.add(top, [0, 260, 0]));
+ step(b, { title: "Screw the housings to the top", detail: "Eight long screws, down through the sides into the top.", tools: ["screwdriver"], pose: "-y", kind: "screws" }, () => b.fits(ADDON_SCREW, scr, 0.08));
+ step(b, { title: "Press the glides over the screw heads", detail: "One in each hole; the unit stands on them.", pose: "-y", kind: "legs" }, () =>
+ b.fits(ADDON_GLIDE, scr.map((f): FitOpts => ({ on: f.on, at: f.at, dir: f.dir, hole: false })), 0.06),
+ );
+
+ // drawers, built on their fronts beside the unit
+ const c0 = (h: number): Vec3 => [xs[h], dy0 + dh / 2, zIn - dd / 2];
+ const st0 = (k: string, h: number, from: Vec3, shift: Vec3 = [0, 0, 0]) => lay(b, [k], c0(h), [(h ? 1 : -1) * 220 + shift[0], shift[1], shift[2]], [0, 0, 0], from);
+ const dy = dy0 + dh / 2;
+ const per = (f: (h: number, g: number) => FitOpts[]) => [0, 1].flatMap((h) => [-1, 1].flatMap((g) => f(h, g)));
+ const dfit = {
+ bolts: per((h, g) => [{ on: fronts[h], at: [xs[h] + g * dx, dy, zIn], dir: [0, 0, 1], mate: dSide(h, g), mateHole: 4 }]),
+ dowels: per((h, g) => [{ on: dSide(h, g), at: [xs[h] + g * dx, dy0 + 14, zIn], dir: [0, 0, -1], mate: fronts[h] }]),
+ cams: per((h, g) => [{ on: dSide(h, g), at: [xs[h] + g * (dx - ds / 2), dy, zIn - 25], dir: [g, 0, 0] }]),
+ pins: per((h, g) => [dy0 + 22, dy0 + dh - 10].map((y): FitOpts => ({ on: dSide(h, g), at: [xs[h] + g * (dx + ds / 2), y, zIn - dd + ds / 2], dir: [-g, 0, 0], mate: dBacks[h] }))),
+ knobs: xs.map((x, h): FitOpts => ({ on: fronts[h], at: [x, 60, zF], dir: [0, 0, -1], hole: false })),
+ knobScrews: xs.map((x, h): FitOpts => ({ on: fronts[h], at: [x, 60, zIn - 4], dir: [0, 0, 1] })),
+ fix: per((h, g) => [{ on: dSide(h, g), at: [xs[h] + g * (dx + ds / 2 + rt - 1), yRun, zIn - 60], dir: [-g, 0, 0] }]),
+ };
+ const dstep = (title: string, detail: string, body: () => void, x: { tools?: ToolId[]; kind?: StepKind; pose?: Pose } = {}) =>
+ step(b, { title, detail, tools: x.tools, scene: "drawer", pose: x.pose ?? "-z", kind: x.kind ?? "drawer" }, body);
+ dstep("Screw the cam bolts into the drawer fronts", "Lay each front face down on the rug. Two bolts each.", () => {
+ b.stagger(0.2);
+ for (const h of [0, 1]) st0(fronts[h], h, [0, 0, -160]);
+ b.then(0.15);
+ b.fits(HW.camScrew, dfit.bolts, 0.1);
+ }, { tools: ["screwdriver"], kind: "cams" });
+ dstep("Tap a dowel into each drawer side", "In the front end, below the cam bolt hole.", () => {
+ b.stagger(0.15);
+ for (const h of [0, 1]) for (const g of [-1, 1]) st0(dSide(h, g), h, [0, 0, -200], [g * 60, 0, -180]);
+ b.then(0.15);
+ b.fits(HW.dowel, dfit.dowels, 0.1);
+ }, { tools: ["hammer"], kind: "dowels" });
+ dstep("Stand the sides on the front and lock them", "Grooves facing in. Turn each cam lock clockwise until it pulls tight.", () => {
+ b.stagger(0.15);
+ for (const h of [0, 1]) for (const g of [-1, 1]) st0(dSide(h, g), h, [0, 0, -180]);
+ b.then(0.15);
+ b.fits(ADDON_CAM, dfit.cams, 0.1);
+ }, { tools: ["screwdriver"], kind: "cams" });
+ dstep("Slide the bottom down the grooves", "The smooth side faces into the drawer.", () => {
+ b.stagger(0.2);
+ for (const h of [0, 1]) st0(dBots[h], h, [0, 0, -400]);
+ }, { kind: "join" });
+ dstep("Put the back on and hammer in the push-in dowels", "The back drops in over the bottom. Two dowels through each side into the back.", () => {
+ b.stagger(0.2);
+ for (const h of [0, 1]) st0(dBacks[h], h, [0, 0, -240]);
+ b.then(0.15);
+ b.fits(PUSH_DOWEL, dfit.pins, 0.08);
+ }, { tools: ["hammer"], kind: "dowels" });
+ dstep("Screw on the knobs", "The screw goes in from inside the drawer.", () => {
+ b.fits(HW.knob, dfit.knobs, 0.2);
+ b.then(0.05);
+ b.fits(ADDON_KNOB_SCREW, dfit.knobScrews, 0.15);
+ }, { tools: ["screwdriver"], kind: "screws", pose: "+y" });
+ step(b, { title: "Turn the unit over and pull out the runners", detail: "Stand it on its glides and pull each runner all the way out.", kind: "flip" });
+ step(b, { title: "Screw the drawers onto the runners", detail: "Rest each drawer on its runners, then one screw on each side through the runner.", tools: ["screwdriver"], kind: "drawer" }, () => {
+ b.stagger(0.04);
+ for (const h of [0, 1]) for (const k of [fronts[h], dSide(h, -1), dSide(h, 1), dBots[h], dBacks[h]]) b.add(k, [0, 0, 320]);
+ b.then(0.2);
+ b.fits(DRAWER_FIX, dfit.fix, 0.1);
+ });
+ step(b, { title: "Push the drawers in", detail: "They run in until the fronts sit flush with the housings.", kind: "drawer" });
+ return true;
+}
+
+/* ---------- gateleg desk ---------- */
+
+/*
+ * Gateleg desk: the desk shelf takes dowels, an angle bracket and the two leaf hinges underneath; the cubby back
+ * stands on it on cam bolts. Lying on its side, the shelf goes onto one leg frame (cam bolts, cams), the front rail
+ * goes in on dowels and is screwed to the bracket; on its back, the low back rail and the first frame are bolted
+ * through the legs into barrel nuts, then the second frame goes on and is bolted the same way. The grommet and the
+ * top dowels go in, two people turn it upside down onto the top, long screws go through the shelf and the cubby
+ * back into the top and the glides are tapped in. The two gate frames are dowelled and bolted, take their hinges
+ * and glides, and are hinged to the front legs; the leaf takes its bumpers and stops and is screwed to the hinges.
+ */
+
+const GATE_BOLT: HwDef = { kind: "bolt", len: 90, dia: 6 };
+const GATE_NUT: HwDef = { kind: "nut", len: 12, dia: 10, name: "Barrel nut" };
+const GATE_LONG_SCREW: HwDef = { kind: "screw", len: 125, dia: 5 };
+const GATE_BRACKET_SCREW: HwDef = { kind: "screw", len: 12, dia: 5 };
+const GATE_HINGE_SCREW: HwDef = { kind: "screw", len: 14, dia: 5 };
+const GATE_BIG_HINGE: HwDef = { kind: "flatHinge", len: 70, dia: 50 };
+const GATE_HINGE: HwDef = { kind: "flatHinge", len: 50, dia: 30, name: "Gate hinge" };
+const GATE_GLIDE: HwDef = { kind: "glide", len: 12, dia: 30, name: "Glide" };
+const GATE_SMALL_GLIDE: HwDef = { kind: "glide", len: 8, dia: 20, name: "Glide" };
+const GATE_BUMPER: HwDef = { kind: "glide", len: 10, dia: 24, name: "Bumper" };
+const GATE_BUMPER_SCREW: HwDef = { kind: "screw", len: 16, dia: 3.5 };
+const GATE_STOP: HwDef = { kind: "clip", len: 40, dia: 20, name: "Stop" };
+const GROMMET: HwDef = { kind: "cap", len: 10, dia: 60, name: "Cable grommet" };
+
+function buildGateleg(b: PlanBuilder) {
+ // closed it is 84 x 85 x 41; drawn open, with the leaf up on the gate legs (91 deep)
+ const W = 840, H = 850, TT = 18, L = 40;
+ const zB = -455, zF = -45, zL = 455; // back, front of the fixed part, front of the leaf
+ const xL = W / 2 - L / 2; // leg centre
+ const xi = xL - L / 2; // inside face of the frames
+ const yTop = H - TT, yS = 720, ST = 18; // underside of the top, of the shelf
+ const zFL = zF - L / 2, zBL = zB + L / 2; // front and back leg centres
+ const railY = [700, 760], strY = [200, 250];
+ const frameT = b.compound("Leg frame", [
+ { shape: "box", size: [L, yTop, L], pos: [0, yTop / 2, zFL], material: "wood" },
+ { shape: "box", size: [L, yTop, L], pos: [0, yTop / 2, zBL], material: "wood" },
+ { shape: "box", size: [L, railY[1] - railY[0], zFL - zBL - L], pos: [0, (railY[0] + railY[1]) / 2, (zFL + zBL) / 2], material: "wood" },
+ { shape: "box", size: [L, strY[1] - strY[0], zFL - zBL - L], pos: [0, (strY[0] + strY[1]) / 2, (zFL + zBL) / 2], material: "wood" },
+ ], { material: "wood" });
+ const frames = [-1, 1].map((g) => b.place(frameT.type, [g * xL, frameT.mid[1], frameT.mid[2]]));
+ const shelf = b.place(b.part("Desk shelf", [2 * xi, ST, zF - zB]), [0, yS + ST / 2, (zB + zF) / 2]);
+ const zSt = zB + 9, yS1 = yS + ST;
+ const strip = b.place(b.part("Cubby back", [2 * xi, yTop - yS1, 18]), [0, (yS1 + yTop) / 2, zSt]);
+ const zR1 = zF - 10, zR2 = zB + 30;
+ const rail1 = b.place(b.part("Front rail", [2 * xi, 60, 20], { material: "wood" }), [0, yS - 30, zR1]);
+ const rail2 = b.place(b.part("Back rail", [2 * xi, 50, 20], { material: "wood" }), [0, 225, zR2]);
+ const top = b.place(b.part("Top", [W, TT, zF - zB]), [0, yTop + TT / 2, (zB + zF) / 2]);
+ const leaf = b.place(b.part("Leaf", [W, TT, zL - zF]), [0, yS + ST / 2, (zF + zL) / 2]);
+ // gate frames: an outer leg under the leaf's front corner, a short stile hinged to the front leg, two cross bars
+ const gH = yS - 10, zO = zL - L / 2 - 20, zSt2 = zF + L / 2, bar = [[650, 690], [180, 220]];
+ const gLegT = b.part("Gate leg", [L, gH, L], { material: "wood" });
+ const gStileT = b.part("Gate stile", [L, 540, L], { material: "wood" });
+ const gBarT = b.part("Gate bar", [L, L, zO - zSt2 - L], { material: "wood" });
+ const gates = [-1, 1].map((g) => ({
+ g,
+ leg: b.place(gLegT, [g * xL, gH / 2, zO]),
+ stile: b.place(gStileT, [g * xL, 690 - 270, zSt2]),
+ bars: bar.map(([y0, y1]) => b.place(gBarT, [g * xL, (y0 + y1) / 2, (zO + zSt2) / 2])),
+ }));
+ const fr = (g: number) => frames[g < 0 ? 0 : 1];
+ const sides = (f: (g: number) => FitOpts[]) => [-1, 1].flatMap(f);
+
+ // fittings
+ const shelfDowels = [
+ ...sides((g) => [zB + 80, zF - 80].map((z): FitOpts => ({ on: shelf, at: [g * xi, yS + ST / 2, z], dir: [-g, 0, 0], mate: fr(g) }))),
+ ...[-250, 250].map((x): FitOpts => ({ on: shelf, at: [x, yS1, zSt], dir: [0, -1, 0], mate: strip })),
+ ];
+ const bracketAt: Vec3 = [0, yS, zR1 - 22];
+ const bracketScrews = [-12, 12].map((x): FitOpts => ({ on: shelf, at: [x, yS - 2, bracketAt[2] - 10], dir: [0, 1, 0] }));
+ const railScrews = [-12, 12].map((x): FitOpts => ({ on: rail1, at: [x, yS - 30, zR1 - 12], dir: [0, 0, 1] }));
+ const hx = [-250, 250];
+ const shelfHinge = hx.flatMap((x) => [-20, 20].flatMap((dx) => [-35, -15].map((dz): FitOpts => ({ on: shelf, at: [x + dx, yS - 2, zF + dz], dir: [0, 1, 0] }))));
+ const leafHinge = hx.flatMap((x) => [-20, 20].flatMap((dx) => [15, 35].map((dz): FitOpts => ({ on: leaf, at: [x + dx, yS - 2, zF + dz], dir: [0, 1, 0] }))));
+ const stripBolts = [-150, 150].map((x): FitOpts => ({ on: strip, at: [x, yS1, zSt], dir: [0, 1, 0], mate: shelf, mateHole: 4 }));
+ const stripCams = [-150, 150].map((x): FitOpts => ({ on: shelf, at: [x, yS + ST / 2, zB], dir: [0, 0, 1] }));
+ const stripDowels = sides((g) => [yS1 + 25, yTop - 25].map((y): FitOpts => ({ on: strip, at: [g * xi, y, zSt], dir: [-g, 0, 0], mate: fr(g) })));
+ const frameBolts = sides((g) => [zB + 150, zF - 150].map((z): FitOpts => ({ on: fr(g), at: [g * xi, yS + ST / 2, z], dir: [g, 0, 0], mate: shelf, mateHole: 4 })));
+ const frameCams = (g: number) => [zB + 150, zF - 150].map((z): FitOpts => ({ on: shelf, at: [g * (xi - 30), yS1, z], dir: [0, -1, 0] }));
+ const railDowels = [rail1, rail2].flatMap((r, i) => sides((g): FitOpts[] => [{ on: r, at: [g * xi, i ? 238 : yS - 15, i ? zR2 : zR1], dir: [-g, 0, 0], mate: fr(g) }]));
+ // three bolts through each frame: into the front rail, the back rail and the cubby back, each into a barrel nut
+ const bolts = (g: number): FitOpts[] => [
+ { on: fr(g), at: [g * (xi + L), yS - 42, zR1], dir: [-g, 0, 0], mate: rail1 },
+ { on: fr(g), at: [g * (xi + L), 212, zR2], dir: [-g, 0, 0], mate: rail2 },
+ { on: fr(g), at: [g * (xi + L), (yS1 + yTop) / 2, zSt], dir: [-g, 0, 0], mate: strip },
+ ];
+ const nuts = (g: number): FitOpts[] => [
+ { on: rail1, at: [g * (xi - 40), yS - 60, zR1], dir: [0, 1, 0], hole: 5 },
+ { on: rail2, at: [g * (xi - 40), 200, zR2], dir: [0, 1, 0], hole: 5 },
+ { on: strip, at: [g * (xi - 40), (yS1 + yTop) / 2, zB], dir: [0, 0, 1], hole: 5 },
+ ];
+ const topDowels = [
+ ...sides((g) => [zFL, zBL].map((z): FitOpts => ({ on: fr(g), at: [g * xL, yTop, z], dir: [0, -1, 0], mate: top }))),
+ ...[-200, 200].map((x): FitOpts => ({ on: strip, at: [x, yTop, zSt], dir: [0, -1, 0], mate: top })),
+ ];
+ const longScrews = [-330, -60, 60, 330].map((x): FitOpts => ({ on: shelf, at: [x, yS, zSt], dir: [0, 1, 0], mate: top }));
+ const glides = sides((g) => [zFL, zBL].map((z): FitOpts => ({ on: fr(g), at: [g * xL, 0, z], dir: [0, 1, 0], hole: false })));
+ const gateDowels = gates.flatMap((t) => t.bars.flatMap((k, j) => [
+ { on: k, at: [t.g * xL, (bar[j][0] + bar[j][1]) / 2 + 8, zO - L / 2], dir: [0, 0, -1], mate: t.leg } as FitOpts,
+ { on: k, at: [t.g * xL, (bar[j][0] + bar[j][1]) / 2 + 8, zSt2 + L / 2], dir: [0, 0, 1], mate: t.stile } as FitOpts,
+ ]));
+ const gateBolts = gates.flatMap((t) => t.bars.flatMap((k, j) => [
+ { on: t.leg, at: [t.g * xL, (bar[j][0] + bar[j][1]) / 2 - 8, zO + L / 2], dir: [0, 0, -1], mate: k } as FitOpts,
+ { on: t.stile, at: [t.g * xL, (bar[j][0] + bar[j][1]) / 2 - 8, zSt2 - L / 2], dir: [0, 0, 1], mate: k } as FitOpts,
+ ]));
+ const gateNuts = gates.flatMap((t) => t.bars.flatMap((k, j) => [zO - L / 2 - 40, zSt2 + L / 2 + 40].map((z): FitOpts => ({ on: k, at: [t.g * xL, bar[j][0], z], dir: [0, 1, 0], hole: 5 }))));
+ const hy = [260, 600];
+ const gateHinges = gates.flatMap((t) => hy.map((y): FitOpts => ({ on: t.stile, at: [t.g * (xL + L / 2), y, zF], dir: [-t.g, 0, 0], hole: false })));
+ const gateHingeScrews = gates.flatMap((t) => hy.flatMap((y) => [-15, 15].map((dy): FitOpts => ({ on: t.stile, at: [t.g * (xL + L / 2 + 1), y + dy, zF + 14], dir: [-t.g, 0, 0] }))));
+ const legHingeScrews = gates.flatMap((t) => hy.flatMap((y) => [-15, 15].map((dy): FitOpts => ({ on: fr(t.g), at: [t.g * (xL + L / 2 + 1), y + dy, zF - 14], dir: [-t.g, 0, 0] }))));
+ const gateGlides = gates.map((t): FitOpts => ({ on: t.leg, at: [t.g * xL, 0, zO], dir: [0, 1, 0], hole: false }));
+ const bumpers = gates.map((t): FitOpts => ({ on: leaf, at: [t.g * xL, yS - 1, zO], dir: [0, 1, 0], hole: false }));
+ const bumperScrews = gates.map((t): FitOpts => ({ on: leaf, at: [t.g * xL, yS - 8, zO], dir: [0, 1, 0] }));
+ const stops = gates.map((t): FitOpts => ({ on: leaf, at: [t.g * (xi - 25), yS, zO - 30], dir: [0, 1, 0], hole: false }));
+
+ const flatOn = (k: string, at: Vec3, rot: Vec3 = [0, 0, 0]) => lay(b, [k], b.partItem(k).final.pos, at, rot);
+ step(b, { title: "Tap the dowels into the desk shelf", detail: "Lay it upside down on a rug. Two in each end and two along the back edge.", tools: ["hammer"], pose: "-y", kind: "dowels", warnings: ["floor"] }, () => {
+ b.add(shelf, [0, -200, 0]);
+ b.then(0.15);
+ b.fits(HW.dowel, shelfDowels, 0.06);
+ });
+ step(b, { title: "Screw the angle bracket under the shelf", detail: "In the middle, near the front edge. Use the short screws.", tools: ["screwdriver"], pose: "-y", kind: "screws" }, () => {
+ b.fit(HW.angle, { on: shelf, at: bracketAt, dir: [0, 1, 0], hole: false });
+ b.then(0.1);
+ b.fits(GATE_BRACKET_SCREW, bracketScrews, 0.1);
+ });
+ step(b, { title: "Screw the leaf hinges to the shelf", detail: "Knuckles along the front edge. Four screws each.", tools: ["screwdriver"], pose: "-y", kind: "hinges" }, () => {
+ b.fits(GATE_BIG_HINGE, hx.map((x): FitOpts => ({ on: shelf, at: [x, yS, zF], dir: [0, 1, 0], hole: false })), 0.15);
+ b.then(0.1);
+ b.fits(GATE_HINGE_SCREW, shelfHinge, 0.04);
+ });
+ step(b, { title: "Screw the cam bolts into the cubby back", detail: "Two in its bottom edge.", tools: ["screwdriver"], scene: "strip", kind: "cams" }, () => {
+ flatOn(strip, [0, 9, 0], [-Math.PI / 2, 0, 0]);
+ b.then(0.15);
+ b.fits(HW.camScrew, stripBolts, 0.1);
+ });
+ step(b, { title: "Tap the dowels into the cubby back", detail: "Two in each end.", tools: ["hammer"], scene: "strip", kind: "dowels" }, () => b.fits(HW.dowel, stripDowels, 0.06));
+ step(b, { title: "Stand the cubby back on the shelf", detail: "Turn the shelf over. The back goes on the dowels and bolts along its back edge.", kind: "join" }, () => b.add(strip, [0, 220, 0]));
+ step(b, { title: "Lock the cubby back", detail: "Two cam locks in the back edge of the shelf, turned clockwise until tight.", tools: ["screwdriver"], kind: "cams" }, () => b.fits(HW.cam, stripCams, 0.12));
+ step(b, { title: "Screw the cam bolts into the leg frames", detail: "Two in each frame, on the inside of the upper rail.", tools: ["screwdriver"], scene: "frames", kind: "cams" }, () => {
+ b.stagger(0.2);
+ frames.forEach((k, i) => flatOn(k, [0, L / 2, (i ? 1 : -1) * 260], [0, 0, (i ? 1 : -1) * Math.PI / 2]));
+ b.then(0.15);
+ b.fits(HW.camScrew, frameBolts, 0.08);
+ });
+ step(b, { title: "Lay a leg frame down and stand the shelf in it", detail: "Frame flat on the rug, bolts up. The shelf and the cubby back go onto its dowels and bolts.", pose: "+x", kind: "join", warnings: ["floor"] }, () => b.add(frames[0], [-260, 0, 0]));
+ step(b, { title: "Lock the shelf to the frame", detail: "Two cam locks, turned clockwise until tight.", tools: ["screwdriver"], pose: "+x", kind: "cams" }, () => b.fits(HW.cam, frameCams(-1), 0.12));
+ step(b, { title: "Tap the dowels into the two rails", detail: "One in each end.", tools: ["hammer"], scene: "rails", kind: "dowels" }, () => {
+ b.stagger(0.15);
+ flatOn(rail1, [0, 30, 120]);
+ flatOn(rail2, [0, 25, -120]);
+ b.then(0.15);
+ b.fits(HW.dowel, railDowels, 0.08);
+ });
+ step(b, { title: "Stand the front rail in the frame", detail: "Under the front of the shelf, its dowels in the front leg.", pose: "+x", kind: "join" }, () => b.add(rail1, [260, 0, 0]));
+ step(b, { title: "Screw the bracket to the front rail", detail: "Two screws through the bracket into the rail.", tools: ["screwdriver"], pose: "+x", kind: "screws" }, () => b.fits(GATE_BRACKET_SCREW, railScrews, 0.1));
+ step(b, { title: "Turn it onto its back and bolt the frame", detail: "Fit the back rail on its dowels, then three bolts through the frame into barrel nuts. Slot up on each nut.", tools: ["allen", "flathead"], pose: "+z", kind: "bolts" }, () => {
+ b.add(rail2, [260, 0, 0]);
+ b.then(0.15);
+ b.fits(GATE_NUT, nuts(-1), 0.1);
+ b.then(0.1);
+ b.fits(GATE_BOLT, bolts(-1), 0.12);
+ });
+ step(b, { title: "Put the other leg frame on", detail: "Onto the dowels and bolts of the shelf, the cubby back and both rails at once.", pose: "+z", kind: "join" }, () => b.add(frames[1], [300, 0, 0]));
+ step(b, { title: "Lock the shelf to the second frame", detail: "Two cam locks, turned clockwise until tight.", tools: ["screwdriver"], pose: "+z", kind: "cams" }, () => b.fits(HW.cam, frameCams(1), 0.12));
+ step(b, { title: "Bolt the second frame", detail: "Three bolts into barrel nuts, like the first frame.", tools: ["allen", "flathead"], pose: "+z", kind: "bolts" }, () => {
+ b.fits(GATE_NUT, nuts(1), 0.1);
+ b.then(0.1);
+ b.fits(GATE_BOLT, bolts(1), 0.12);
+ });
+ step(b, { title: "Press the cable grommet into the shelf", detail: "Into the round hole.", pose: "+z", kind: "general" }, () => b.fit(GROMMET, { on: shelf, at: [220, yS1, -280], dir: [0, -1, 0], hole: false }));
+ step(b, { title: "Tap the dowels into the tops of the legs", detail: "One in each leg and two in the top edge of the cubby back.", tools: ["hammer"], pose: "+z", kind: "dowels" }, () => b.fits(HW.dowel, topDowels, 0.08));
+ step(b, { title: "Turn it upside down onto the top", detail: "Lay the top face down on the rug. Lift the frame together and lower it onto the top's holes.", pose: "-y", people: 2, kind: "flip", warnings: ["two", "floor"] }, () => b.add(top, [0, 300, 0]));
+ step(b, { title: "Screw the shelf to the top", detail: "Four long screws through the shelf and the cubby back into the top.", tools: ["screwdriver"], pose: "-y", kind: "screws" }, () => b.fits(GATE_LONG_SCREW, longScrews, 0.1));
+ step(b, { title: "Tap the glides into the legs", detail: "One in the end of each leg.", tools: ["hammer"], pose: "-y", kind: "legs" }, () => b.fits(GATE_GLIDE, glides, 0.1));
+
+ // the gate frames, built flat on their sides
+ const gPivot = (g: number): Vec3 => [g * xL, 360, (zO + zSt2) / 2];
+ const gStage = (k: string, g: number) => lay(b, [k], gPivot(g), [0, L / 2, g * 300], [0, 0, Math.PI / 2]);
+ step(b, { title: "Tap the dowels into the gate bars", detail: "One in each end of the four short bars.", tools: ["hammer"], scene: "gates", kind: "dowels", repeat: 2 }, () => {
+ b.stagger(0.12);
+ for (const t of gates) for (const k of t.bars) gStage(k, t.g);
+ b.then(0.15);
+ b.fits(HW.dowel, gateDowels, 0.05);
+ });
+ step(b, { title: "Bolt the gate frames together", detail: "Push the bars onto the leg and the stile, then a bolt into a barrel nut at each joint.", tools: ["allen", "flathead"], scene: "gates", kind: "bolts", repeat: 2 }, () => {
+ b.stagger(0.12);
+ for (const t of gates) for (const k of [t.leg, t.stile]) gStage(k, t.g);
+ b.then(0.15);
+ b.fits(GATE_NUT, gateNuts, 0.06);
+ b.then(0.1);
+ b.fits(GATE_BOLT, gateBolts, 0.08);
+ });
+ step(b, { title: "Screw the hinges to the stiles", detail: "Two hinges on each stile, two screws in each.", tools: ["screwdriver"], scene: "gates", kind: "hinges", repeat: 2 }, () => {
+ b.fits(GATE_HINGE, gateHinges, 0.12);
+ b.then(0.1);
+ b.fits(GATE_HINGE_SCREW, gateHingeScrews, 0.05);
+ });
+ step(b, { title: "Tap a glide into each gate leg", detail: "Into the bottom end of the long leg.", tools: ["hammer"], scene: "gates", kind: "legs" }, () => b.fits(GATE_SMALL_GLIDE, gateGlides, 0.15));
+ step(b, { title: "Hinge the gate frames to the front legs", detail: "Turn the desk upright. Hold each frame against the front leg and screw the hinges on, two screws each.", tools: ["screwdriver"], kind: "hinges" }, () => {
+ b.stagger(0.04);
+ for (const t of gates) for (const k of [t.leg, t.stile, ...t.bars]) b.add(k, [t.g * 240, 0, 0]);
+ b.then(0.2);
+ b.fits(GATE_HINGE_SCREW, legHingeScrews, 0.05);
+ });
+ step(b, { title: "Screw the bumpers under the leaf", detail: "Lay the leaf face down. One near each front corner, where the gate legs meet it.", tools: ["screwdriver"], scene: "leaf", pose: "-y", kind: "screws" }, () => {
+ flatOn(leaf, [0, ST / 2, 0]);
+ b.then(0.15);
+ b.fits(GATE_BUMPER, bumpers, 0.12);
+ b.then(0.05);
+ b.fits(GATE_BUMPER_SCREW, bumperScrews, 0.1);
+ });
+ step(b, { title: "Press in the stops", detail: "One on each side, just inside the bumpers. They keep the gate legs from swinging too far.", scene: "leaf", pose: "-y", kind: "general" }, () => b.fits(GATE_STOP, stops, 0.12));
+ step(b, { title: "Screw the leaf to the hinges", detail: "Swing the gate legs out, rest the leaf on them and screw it to the two hinges, four screws each.", tools: ["screwdriver"], kind: "hinges" }, () => {
+ b.add(leaf, [0, 260, 0]);
+ b.then(0.2);
+ b.fits(GATE_HINGE_SCREW, leafHinge, 0.04);
+ });
+ return true;
+}
+
const family: Family = {
names: ["GULLABERG"],
build(b, s) {
@@ -1976,6 +2353,8 @@ const family: Family = {
if (/^gullaberg-wardrobe/.test(slug)) return buildWardrobe(b, s);
if (/^gullaberg-shoe-cabinet/.test(slug)) return buildShoe(b, s);
if (/^gullaberg-desk/.test(slug)) return buildDesk(b, s);
+ if (/^gullaberg-add-on-unit/.test(slug)) return buildAddOn(b);
+ if (/^gullaberg-gateleg-desk/.test(slug)) return buildGateleg(b);
if (/^gullaberg-storage-bench/.test(slug)) return buildChest(b, s, BENCH);
const table = /^gullaberg-bedside-table/.exec(slug);
if (table) return buildTable(b, s, /door/i.test(s.variant) || s.size.w < 45);
diff --git a/src/lib/plan/families/hagernas.ts b/src/lib/plan/families/hagernas.ts
index eae4f31..a390100 100644
--- a/src/lib/plan/families/hagernas.ts
+++ b/src/lib/plan/families/hagernas.ts
@@ -100,11 +100,133 @@ function recipe(s: ProductSpec): CustomParams {
};
}
+/*
+ * HÄGERNÄS chair, read from its manual. Two side frames (back leg, front leg, seat rail and low stretcher, glued at
+ * the factory) and four cross pieces: the top back rail, the middle back slat and the front and back seat rails.
+ * Seat brackets screw into the seat rails by hand, sixteen dowels go into the ends of the cross pieces, which stand
+ * in one side frame lying on the rug; the other frame goes on top and three long bolts go through each frame.
+ * Upside down on a table the middle stretcher drops in between the low stretchers on two more bolts, then the frame
+ * is lowered onto the seat and the four brackets are screwed to it.
+ * IKEA's sizes: seat 40 x 41 cm, 45 high, the chair 87 high.
+ */
+function chairRecipe(s: ProductSpec): CustomParams {
+ const W = Math.round(s.size.w * 10) || 460, D = Math.round(s.size.d * 10) || 530, H = Math.round(s.size.h * 10) || 870;
+ const L = 38, rt = 20, rh = 70, T = 20;
+ const seatW = W - 30, frameW = seatW - 30;
+ const xl = frameW / 2 - L / 2; // side frame centres
+ const inner = frameW - 2 * L; // between the frames
+ const yS = 450 - T; // underside of the seat, top of the front legs and seat rails
+ const zF = D / 2 - 15 - L / 2; // front legs, the seat overhangs them a little
+ const zB = -D / 2 + 110; // back legs at the seat
+ const zFoot = -D / 2 + L / 2; // back legs splay back to the floor
+ const lean = 40; // the back leans back a little above the seat
+ const thLo = Math.atan2(zB - zFoot, yS), lenLo = Math.hypot(zB - zFoot, yS);
+ const thUp = Math.atan2(lean, H - yS), lenUp = Math.hypot(lean, H - yS);
+ const zAt = (y: number) => (y <= yS ? zFoot + ((zB - zFoot) * y) / yS : zB - (lean * (y - yS)) / (H - yS));
+ const yR = yS - rh / 2, yLow = 150;
+ const fc: Vec3 = [0, H / 2, 0];
+ const rel = (p: PartPiece): PartPiece => ({ ...p, pos: [p.pos[0] - fc[0], p.pos[1] - fc[1], p.pos[2] - fc[2]] });
+ const frame: PartPiece[] = [
+ { shape: "box", size: [L, lenLo, L], pos: [0, yS / 2, (zFoot + zB) / 2], rot: [thLo, 0, 0] },
+ { shape: "box", size: [L, lenUp, L], pos: [0, (yS + H) / 2, zB - lean / 2], rot: [-thUp, 0, 0] },
+ { shape: "box", size: [L, yS, L], pos: [0, yS / 2, zF] },
+ { shape: "box", size: [rt, rh, zF - zB - L], pos: [0, yR, (zF + zB) / 2] },
+ { shape: "box", size: [rt, 40, zF - zAt(yLow) - L], pos: [0, yLow, (zF + zAt(yLow)) / 2] },
+ ].map((p) => rel(p as PartPiece));
+ const yTR = H - 70, yMS = 640;
+ const zFR = zF - L / 2 + rt / 2 + 4, zBR = zB;
+ const zMX = (zF + zAt(yLow)) / 2;
+ const parts: CustomPart[] = [
+ ...[-1, 1].map((sx, i): CustomPart => ({ id: `F${i}`, name: "Side frame", size: [L, H, D], pos: [sx * xl, fc[1], fc[2]], pieces: frame, material: "wood" })),
+ { id: "TR", name: "Top back rail", size: [inner, 100, 22], pos: [0, yTR, zAt(yTR)], rot: [-thUp, 0, 0], material: "wood" },
+ { id: "MS", name: "Back slat", size: [inner, 70, 20], pos: [0, yMS, zAt(yMS)], rot: [-thUp, 0, 0], material: "wood" },
+ { id: "BR", name: "Back seat rail", size: [inner, rh, rt], pos: [0, yR, zBR], material: "wood" },
+ { id: "FR", name: "Front seat rail", size: [inner, rh, rt], pos: [0, yR, zFR], material: "wood" },
+ { id: "MX", name: "Middle stretcher", size: [frameW - rt, 40, rt], pos: [0, yLow, zMX], material: "wood" },
+ { id: "S", name: "Seat", size: [seatW, T, D / 2 - (zB + L / 2)], pos: [0, yS + T / 2, (D / 2 + zB + L / 2) / 2], material: "wood" },
+ ];
+ const bx = [-90, 90];
+ const brackets = [
+ fix("stud", bx.map((x): Vec3 => [x, yS - 12, zFR - rt / 2]), [0, 0, 1], { on: "FR", len: 20, dia: 20, name: "Seat bracket" }),
+ fix("stud", bx.map((x): Vec3 => [x, yS - 12, zBR + rt / 2]), [0, 0, -1], { on: "BR", len: 20, dia: 20, name: "Seat bracket" }),
+ ];
+ const ends: [string, number, number][] = [["TR", yTR, 30], ["MS", yMS, 18], ["BR", yR, 20], ["FR", yR, 20]];
+ const dowels = ends.flatMap(([id, y, k]) =>
+ [-1, 1].map((sx) => fix("dowel", [-k, k].map((dy): Vec3 => [sx * (inner / 2), y + dy, zAt(y + dy) + (id === "FR" ? zFR - zAt(y) : id === "BR" ? zBR - zAt(y) : 0)]), [-sx, 0, 0], { on: id })),
+ );
+ const side = (sx: number, i: number) =>
+ fix("bolt", ([[yTR, zAt(yTR)], [yR, zBR], [yR, zFR]] as const).map(([y, z]): Vec3 => [sx * (frameW / 2), y, z]), [-sx, 0, 0], { on: `F${i}`, len: 70, dia: 6 });
+ const screws: Vec3[] = [
+ ...bx.map((x): Vec3 => [x, yS, zFR - rt / 2 - 14]),
+ ...bx.map((x): Vec3 => [x, yS, zBR + rt / 2 + 14]),
+ ];
+ return {
+ parts,
+ steps: [
+ {
+ title: "Screw the seat brackets into the seat rails",
+ detail: "Lay the two seat rails on a rug. Two brackets in each, turned in by hand until they sit tight.",
+ fix: brackets,
+ wait: ["FR", "BR"],
+ warnings: ["floor"],
+ },
+ {
+ title: "Stand the back and seat rails in one side frame",
+ detail: "Lay a side frame on the rug, holes up. Two dowels in each end of the four rails, then push them into the frame, the brackets facing in.",
+ add: ["F0", "TR", "MS", "BR", "FR"],
+ fix: dowels,
+ from: { TR: [300, 0, 0], MS: [300, 0, 0], BR: [300, 0, 0], FR: [300, 0, 0] },
+ pose: "+x",
+ tools: ["hammer"],
+ },
+ {
+ title: "Lay the other side frame on and bolt it",
+ detail: "Onto the dowels. Three long bolts through the frame into the rails, tightened with the Allen key.",
+ add: ["F1"],
+ fix: [side(1, 1)],
+ from: { F1: [320, 0, 0] },
+ tools: ["allen"],
+ },
+ {
+ title: "Turn the chair over and bolt the first side",
+ detail: "Three more long bolts, the same way.",
+ fix: [side(-1, 0)],
+ pose: "-x",
+ tools: ["allen"],
+ },
+ {
+ title: "Bolt in the middle stretcher",
+ detail: "Turn the chair upside down on a table with a cloth on it. Press the stretcher down between the low side rails and put a long bolt in from each side.",
+ add: ["MX"],
+ fix: [-1, 1].map((sx, i) => fix("bolt", [[sx * (xl + rt / 2), yLow, zMX]], [-sx, 0, 0], { on: `F${i}`, mate: "MX", len: 70, dia: 6 })),
+ from: { MX: [0, -250, 0] },
+ pose: "-y",
+ tools: ["allen"],
+ },
+ {
+ title: "Lower the frame onto the seat",
+ detail: "Lay the seat face down on the cloth and turn the frame onto it. Check it overhangs the same on both sides.",
+ add: ["S"],
+ from: { S: [0, 250, 0] },
+ },
+ {
+ title: "Screw the brackets to the seat",
+ detail: "One screw through each of the four brackets into the seat.",
+ fix: [fix("screw", screws, [0, 1, 0], { len: 16, dia: 4, mate: "S" })],
+ tools: ["screwdriver"],
+ },
+ { title: "Stand it up", detail: "Tighten the bolts again after a couple of weeks.", pose: "+y" },
+ ],
+ };
+}
+
const family: Family = {
names: ["HÄGERNÄS", "HAGERNAS"],
recipe(s) {
- if (!/stool/i.test(`${s.slug ?? ""} ${s.variant}`)) return null;
- return recipe(s);
+ const t = `${s.slug ?? ""} ${s.variant}`;
+ if (/stool/i.test(t)) return recipe(s);
+ if (/chair/i.test(t)) return chairRecipe(s);
+ return null;
},
};
export default family;
diff --git a/src/lib/plan/families/hauga.ts b/src/lib/plan/families/hauga.ts
index 894d4e7..b0a12e9 100644
--- a/src/lib/plan/families/hauga.ts
+++ b/src/lib/plan/families/hauga.ts
@@ -597,6 +597,145 @@ function chair(b: PlanBuilder, s: ProductSpec) {
return true;
}
+/*
+ * The stool: two aprons take their dowels and a seat clip each on a rug, the two ready-made side frames (two legs and
+ * a rail) take two clips each. Upside down, the aprons go into one side frame, the other side frame goes on and four
+ * bolts pull it together. Upright, four dowels go into the leg tops; then it is lowered upside down onto the seat
+ * lying face down, and the six clips are screwed to the seat.
+ */
+function stool(b: PlanBuilder, s: ProductSpec) {
+ // IKEA: 32 x 32, 45 high
+ const W = 320, D = 320, H = s.size.h * 10 || 450;
+ const st = 20, SY = H - st; // seat underside
+ const lw = 38, xl = W / 2 - lw / 2; // legs
+ const rt = 18, rh = 80, ry = SY - rh / 2, xr = W / 2 - 5 - rt / 2; // rails and aprons, a little in from the legs' faces
+ const inner = W / 2 - lw; // the aprons run between the legs
+ const side = (sx: number): Part => ({
+ id: sx < 0 ? "F0" : "F1",
+ name: "Side frame",
+ mat: "wood",
+ size: [lw, SY, D],
+ pos: [sx * xl, SY / 2, 0],
+ pieces: [
+ ...[-1, 1].map((sz): PartPiece => ({ shape: "box", size: [lw, SY, lw], pos: [0, 0, sz * xl] })),
+ { shape: "box", size: [rt, rh, 2 * inner], pos: [sx * (xr - xl), ry - SY / 2, 0] },
+ ],
+ });
+ // the seat has a hand slot near the back
+ const slot = { x: 60, z0: -95, z1: -70 };
+ const seat: Part = {
+ id: "SEAT",
+ name: "Seat",
+ mat: "wood",
+ size: [W, st, D],
+ pos: [0, SY + st / 2, 0],
+ pieces: [
+ { shape: "box", size: [W, st, D / 2 - slot.z1], pos: [0, 0, (slot.z1 + D / 2) / 2] },
+ { shape: "box", size: [W, st, slot.z0 + D / 2], pos: [0, 0, (-D / 2 + slot.z0) / 2] },
+ ...[-1, 1].map((sx): PartPiece => ({ shape: "box", size: [W / 2 - slot.x, st, slot.z1 - slot.z0], pos: [sx * (W / 2 + slot.x) / 2, 0, (slot.z0 + slot.z1) / 2] })),
+ ],
+ };
+ const parts: Part[] = [
+ side(-1),
+ side(1),
+ { id: "A0", name: "Apron", mat: "wood", size: [2 * inner, rh, rt], pos: [0, ry, -xr] },
+ { id: "A1", name: "Apron", mat: "wood", size: [2 * inner, rh, rt], pos: [0, ry, xr] },
+ seat,
+ ];
+ const byId = new Map(parts.map((p) => [p.id, p]));
+ const aprons = ["A0", "A1"], frames = ["F0", "F1"];
+ const fi = (x: number) => (x < 0 ? "F0" : "F1");
+ const dowels: Fx = {
+ def: CHAIR_DOWEL,
+ at: aprons.flatMap((id) => [-1, 1].flatMap((sx) => [ry - 22, ry + 22].map((y): Vec3 => [sx * inner, y, byId.get(id)!.pos[2]]))),
+ dir: (p) => [-Math.sign(p[0]), 0, 0],
+ on: (p) => (p[2] < 0 ? "A0" : "A1"),
+ mate: (p) => fi(p[0]),
+ };
+ const fi2 = xr - rt / 2; // inner faces of the aprons and rails
+ const apronClips: Fx = { def: SEAT_CLIP, at: [-1, 1].map((sz): Vec3 => [0, SY, sz * fi2]), dir: [0, 1, 0], on: (p) => (p[2] < 0 ? "A0" : "A1"), hole: false, twist: (p) => (p[2] < 0 ? 0 : Math.PI) };
+ const frameClips: Fx = {
+ def: SEAT_CLIP,
+ at: [-1, 1].flatMap((sx) => [-60, 60].map((z): Vec3 => [sx * fi2, SY, z])),
+ dir: [0, 1, 0],
+ on: (p) => fi(p[0]),
+ hole: false,
+ twist: (p) => (p[0] < 0 ? Math.PI / 2 : -Math.PI / 2),
+ };
+ const clipScrews: Fx = {
+ def: CLIP_SCREW,
+ at: [...apronClips.at.map((p): Vec3 => [p[0] + 8, SY - 2, p[2] - Math.sign(p[2]) * 12]), ...frameClips.at.map((p): Vec3 => [p[0] - Math.sign(p[0]) * 12, SY - 2, p[2] + 8])],
+ dir: [0, 1, 0],
+ on: (p) => (Math.abs(p[2]) > Math.abs(p[0]) ? (p[2] < 0 ? "A0" : "A1") : fi(p[0])),
+ mate: "SEAT",
+ };
+ // upside down the floor is level with the seat top: parts laid out flat lie just under it
+ const flat = (id: string, at: Vec3, rot: Vec3): Op => ({ stage: [id], pivot: byId.get(id)!.pos, at, rot, from: [0, -160, 0] });
+ const free = (ids: string[], off: Vec3): Op => ({ stage: ids, pivot: [0, 0, 0], at: off, from: [0, 0, 0] });
+ run(b, parts, [
+ {
+ title: "Tap the dowels into the two aprons",
+ detail: "Lay them flat on a rug. Two dowels into each end.",
+ pose: "-y",
+ tools: ["hammer"],
+ warnings: ["floor"],
+ ops: [flat("A0", [0, H - rt / 2, -110], [Math.PI / 2, 0, 0]), flat("A1", [0, H - rt / 2, 110], [Math.PI / 2, 0, 0]), { fit: dowels }],
+ },
+ {
+ title: "Push a seat clip into each apron",
+ detail: "Into the hole in the middle of the top edge, the tab pointing inwards.",
+ pose: "-y",
+ ops: [{ fit: apronClips }],
+ },
+ {
+ title: "Push two seat clips into each side frame",
+ detail: "Into the holes along the top edge of the rail, tabs pointing inwards.",
+ pose: "-y",
+ repeat: 2,
+ ops: [flat("F0", [-420, H - lw / 2, 0], [0, 0, Math.PI / 2]), flat("F1", [420, H - lw / 2, 0], [0, 0, -Math.PI / 2]), { fit: frameClips }],
+ },
+ {
+ title: "Push the aprons into a side frame",
+ detail: "Stand a side frame upside down on the rug and press both aprons onto its dowels.",
+ pose: "-y",
+ ops: [{ add: ["F0"] }, free(aprons, [220, 0, 0]), { add: aprons }],
+ },
+ {
+ title: "Put the other side frame on and bolt it",
+ detail: "Press it onto the free dowels, then two bolts through each frame into the aprons.",
+ pose: "-y",
+ tools: ["allen"],
+ ops: [
+ free(["F1"], [260, 0, 0]),
+ { add: ["F1"] },
+ { fit: { def: CHAIR_BOLT, at: [-1, 1].flatMap((sx) => [-1, 1].map((sz): Vec3 => [sx * (W / 2), ry, sz * xr])), dir: (p) => [-Math.sign(p[0]), 0, 0], on: (p) => fi(p[0]), mate: (p) => (p[2] < 0 ? "A0" : "A1") } },
+ ],
+ },
+ {
+ title: "Turn it over and tap a dowel into each leg",
+ detail: "Into the hole in the top of each leg.",
+ tools: ["hammer"],
+ ops: [{ fit: { def: CHAIR_DOWEL, at: [-1, 1].flatMap((sx) => [-1, 1].map((sz): Vec3 => [sx * xl, SY, sz * xl])), dir: [0, -1, 0], on: (p) => fi(p[0]), mate: "SEAT" } }],
+ },
+ {
+ title: "Lower the frame onto the seat",
+ detail: "Lay the seat face down on the rug, turn the frame upside down and lower it so the four dowels go into the seat.",
+ pose: "-y",
+ warnings: ["face"],
+ // the frame is held up while the seat is laid down under it, then the seat is added where it lies
+ ops: [free([...frames, ...aprons], [0, -320, 0]), { stage: ["SEAT"], pivot: [0, 0, 0], at: [0, 1, 0], from: [0, 0, 380] }, free([...frames, ...aprons], [0, 0, 0]), { add: ["SEAT"] }],
+ },
+ {
+ title: "Screw the clips to the seat",
+ detail: "One screw up through each of the six clips. Then tighten the four bolts once more.",
+ pose: "-y",
+ tools: ["screwdriver", "allen"],
+ ops: [{ fit: clipScrews }],
+ },
+ ]);
+ return true;
+}
+
/* ---------- the click-together cases ---------- */
/*
@@ -1955,6 +2094,7 @@ function build(b: PlanBuilder, s: ProductSpec) {
const slug = s.slug ?? "";
if (/^hauga-table-/.test(slug)) return table(b, s);
if (slug === "hauga-chair") return chair(b, s);
+ if (slug === "hauga-stool") return stool(b, s);
if (/^hauga-drop-leaf-table/.test(slug)) return dropLeaf(b, s);
if (slug === "hauga-chest-3-drawers") return chest3(b, s);
if (slug === "hauga-chest-6-drawers") return chest6(b, s);
diff --git a/src/lib/plan/families/husbyan.ts b/src/lib/plan/families/husbyan.ts
new file mode 100644
index 0000000..d78a1fd
--- /dev/null
+++ b/src/lib/plan/families/husbyan.ts
@@ -0,0 +1,72 @@
+import type { Family } from "./family";
+import type { CustomFix, CustomParams, CustomPart, CustomStep, PartPiece, Vec3 } from "../../types";
+
+/**
+ * HUSBYÅN wall cabinet comes fully assembled: a steel box with its door, lock and three loose shelves. Its manual
+ * hangs it on two wall screws through the back (marked with a level, screws not included), or stands it on four
+ * felt pads instead, and shows the shelves lifting out to move them.
+ */
+
+const fx = (kind: CustomFix["kind"], on: string, dir: Vec3, at: Vec3[], o: Partial<CustomFix> = {}): CustomFix => ({ kind, count: at.length, on, dir, at, ...o });
+
+function wallCabinet(): CustomParams {
+ // the page: 28 wide, 37.5 high, 11 deep
+ const W = 280, H = 375, D = 110;
+ const t = 6, dt = 16, bd = D - dt; // sheet, door, body depth
+ const zb = -D / 2 + bd / 2;
+ const body: PartPiece[] = [
+ { shape: "box", size: [W, H, t], pos: [0, 0, -bd / 2 + t / 2] },
+ ...[-1, 1].map((sx): PartPiece => ({ shape: "box", size: [t, H, bd - t], pos: [(sx * (W - t)) / 2, 0, t / 2] })),
+ ...[-1, 1].map((sy): PartPiece => ({ shape: "box", size: [W - 2 * t, t, bd - t], pos: [0, (sy * (H - t)) / 2, t / 2] })),
+ ];
+ const door: PartPiece[] = [
+ { shape: "slab", outline: [[-W / 2, -H / 2], [W / 2, -H / 2], [W / 2, H / 2], [-W / 2, H / 2]], round: 26, size: [W, dt, H], pos: [0, 0, 0], rot: [Math.PI / 2, 0, 0] },
+ ];
+ const shelfYs = [1, 2, 3].map((k) => t + ((H - 2 * t) * k) / 4);
+ const parts: CustomPart[] = [
+ { id: "B", name: "Cabinet", size: [W, H, bd], pos: [0, H / 2, zb], pieces: body, material: "metal" },
+ { id: "DR", name: "Door", size: [W, H, dt], pos: [0, H / 2, D / 2 - dt / 2], pieces: door, material: "metal" },
+ ...shelfYs.map((y, i): CustomPart => ({ id: `S${i}`, name: "Shelf", size: [W - 2 * t - 2, t, bd - t - 10], pos: [0, y, zb + t / 2 + 5], material: "metal" })),
+ ];
+ const back = -D / 2 + t;
+ const holes: Vec3[] = [-1, 1].map((sx) => [sx * (W / 2 - 50), H - 50, back]);
+ const steps: CustomStep[] = [
+ {
+ title: "Unpack it and open the door",
+ detail: "It comes fully put together. Unlock it with the key and swing the door open.",
+ add: ["B", "DR", "S0", "S1", "S2"],
+ fix: [fx("knob", "DR", [0, 0, -1], [[W / 2 - 30, H / 2, D / 2]], { name: "Key", len: 30, dia: 22 })],
+ },
+ { title: "Move the shelves if you like", detail: "Tilt each shelf up at the front and lift it out, then rest it on the next ledge." },
+ {
+ title: "Mark the wall through the back",
+ detail: "Hold it against the wall, level it, and mark through the two holes near the top of the back.",
+ tools: ["level", "pencil"],
+ wall: true,
+ warnings: ["wall"],
+ },
+ {
+ title: "Screw it to the wall",
+ detail: "Drill, then two screws through the holes into the wall. Their heads must be at least 25 mm across. Wall screws aren't included: pick ones made for your wall.",
+ fix: [fx("plug", "B", [0, 0, -1], holes.map(([x, y]) => [x, y, -D / 2] as Vec3)), fx("screw", "B", [0, 0, -1], holes, { len: 50, dia: 5 })],
+ tools: ["drill", "screwdriver"],
+ wall: true,
+ warnings: ["wall"],
+ },
+ {
+ title: "Or stand it on its pads",
+ detail: "To stand it on a shelf instead of hanging it, lay it on its back and press the four felt pads under its corners.",
+ fix: [fx("glide", "B", [0, 1, 0], [-1, 1].flatMap((sx) => [-1, 1].map((sz) => [sx * (W / 2 - 30), 0, zb + sz * (bd / 2 - 20)] as Vec3)), { len: 3, dia: 16 })],
+ },
+ ];
+ return { parts, steps };
+}
+
+const family: Family = {
+ names: ["HUSBYÅN", "HUSBYAN"],
+ recipe(s) {
+ if (/wall cabinet/i.test(s.variant)) return wallCabinet();
+ return null;
+ },
+};
+export default family;
diff --git a/src/lib/plan/families/idasen.ts b/src/lib/plan/families/idasen.ts
index 06a6da0..d045b6b 100644
--- a/src/lib/plan/families/idasen.ts
+++ b/src/lib/plan/families/idasen.ts
@@ -14,6 +14,13 @@ import { buildCustom } from "../custom";
* upside down the castors and the back panel. Each drawer is a steel box of three sheets hooked together, with a
* bottom dropped in, set on its front and screwed, then the runner couplings, label holder and handle go on; the
* deep file drawer also gets a support wheel. Both slide onto the runners last.
+ * The sit/stand underframe with motors, from its manual: the beam slides together and is bolted at length upside
+ * down, the motor columns and end brackets go on its ends, the A legs slide over the columns' feet and are bolted,
+ * the feet go in and it is turned over; the cables plug into the control box, the cable net goes under the top
+ * (sold separately), the top is screwed to the brackets and the control panel under its front edge.
+ * The cabinet with sliding glass doors, from its manual: steel panels that click together standing, the sides onto
+ * the two leg frames, the top pressed on, four rivets, the two back halves slid in, the floor panel, grommets, the
+ * wall fittings, twelve shelf clips and three shelves, then the two glass doors hung in their tracks.
*/
const TOP_T = 25;
@@ -129,6 +136,259 @@ function desk(s: ProductSpec): CustomParams {
return { parts, steps };
}
+// ---------- the sit/stand underframe with motors ----------
+
+function sitStand(s: ProductSpec): CustomParams {
+ const W = s.size.w * 10, H = s.size.h * 10, D = s.size.d * 10;
+ const yU = H; // underside of the top, at the lowest height
+ const yB = yU - BEAM_H / 2;
+ const xc = W / 2 - 130;
+ const xe = xc + 40;
+ const xj = 320;
+ const CD = 70; // the motor columns
+ const parts: CustomPart[] = [
+ { id: "BEAM_L", name: "Beam end", size: [xe - xj, BEAM_H - 4, BEAM_D - 6], pos: [-(xe + xj) / 2, yB, 0], material: "metal" },
+ { id: "BEAM_C", name: "Beam centre", size: [2 * xj, BEAM_H, BEAM_D], pos: [0, yB, 0], material: "metal" },
+ { id: "BEAM_R", name: "Beam end", size: [xe - xj, BEAM_H - 4, BEAM_D - 6], pos: [(xe + xj) / 2, yB, 0], material: "metal" },
+ ];
+ const cols = ["COL_L", "COL_R"], brackets = ["BR_L", "BR_R"], legs = ["LEG_L", "LEG_R"];
+ const yS1 = 360; // the top of the A legs' sleeves
+ const colY0 = yS1 - 60, colY1 = yB - BEAM_H / 2;
+ [-1, 1].forEach((sx, i) =>
+ parts.push({
+ id: cols[i],
+ name: "Motor column",
+ size: [CD + 10, colY1 - colY0, CD + 10],
+ pos: [sx * xc, (colY0 + colY1) / 2, 0],
+ material: "metal",
+ // the column steps in where its inner tube comes out
+ pieces: [
+ { shape: "cyl", size: [CD + 10, (colY1 - colY0) * 0.55, CD + 10], pos: [0, -(colY1 - colY0) * 0.225, 0] },
+ { shape: "cyl", size: [CD, (colY1 - colY0) * 0.45, CD], pos: [0, (colY1 - colY0) * 0.275, 0] },
+ ],
+ }),
+ );
+ const brD = D - 120;
+ [-1, 1].forEach((sx, i) => parts.push({ id: brackets[i], name: "End bracket", size: [40, 12, brD], pos: [sx * (xe + 20), yU - 6, 0], material: "metal" }));
+ // each A leg: a sleeve round the column's foot, two struts down to the feet and a bar across low down
+ const zFoot = D / 2 - 60, yBar = 120;
+ const ang = Math.atan2(zFoot, yS1 - 20);
+ const strutLen = Math.hypot(zFoot, yS1 - 20);
+ const legC: Vec3 = [0, (yS1 + 15) / 2, 0];
+ const legPieces: PartPiece[] = [
+ { shape: "cyl", size: [CD + 24, 120, CD + 24], pos: [0, yS1 - 60 - legC[1], 0] },
+ ...[-1, 1].map((sz): PartPiece => ({ shape: "box", size: [40, strutLen, 40], pos: [0, (yS1 + 20) / 2 - legC[1], (sz * zFoot) / 2], rot: [-sz * ang, 0, 0] })),
+ { shape: "box", size: [32, 32, 2 * zFoot * ((yS1 - yBar) / (yS1 - 20))], pos: [0, yBar - legC[1], 0] },
+ ];
+ [-1, 1].forEach((sx, i) => parts.push({ id: legs[i], name: "A leg", size: [64, yS1 - 15, 2 * zFoot + 60], pos: [sx * xc, legC[1], 0], pieces: legPieces, material: "metal" }));
+ const TW = 1600, TD = 800;
+ parts.push({ id: "TOP", name: "Table top", size: [TW, TOP_T, TD], pos: [0, yU + TOP_T / 2, 0], material: "board", extra: true });
+ const netW = 2 * xc - 300, netD = 200, netH = 60, zNet = -(BEAM_D / 2 + 30 + netD / 2);
+ parts.push({
+ id: "NET",
+ name: "Cable net",
+ size: [netW, netH, netD],
+ pos: [0, yU - netH / 2, zNet],
+ pieces: [
+ { shape: "box", size: [netW, 3, netD], pos: [0, -netH / 2 + 1.5, 0] },
+ ...[-1, 1].map((sz): PartPiece => ({ shape: "box", size: [netW, netH, 3], pos: [0, 0, (sz * (netD - 3)) / 2] })),
+ ],
+ material: "metal",
+ });
+ const joints = [-1, 1].flatMap((j) => [j * (xj - 40), j * (xj + 40)].flatMap((x) => [yB - 10, yB + 10].map((y): Vec3 => [x, y, BEAM_D / 2])));
+ const colBolts = (sx: number, i: number) =>
+ [-1, 1].map((sz) => fx("bolt", [xc - 20, xc + 20].map((x): Vec3 => [sx * x, yB, sz * (BEAM_D / 2 - 3)]), [0, 0, -sz], i ? "BEAM_R" : "BEAM_L", { len: 12, dia: 6, mate: cols[i] }));
+ const netPts = [-0.4, 0, 0.4].flatMap((t) => [-1, 1].map((sz): Vec3 => [t * netW, yU, zNet + (sz * (netD - 10)) / 2]));
+ const feet = [-1, 1].flatMap((sx) => [-1, 1].map((sz): Vec3 => [sx * xc, 0, sz * zFoot]));
+ const steps: CustomStep[] = [
+ { title: "Slide the beam together", detail: "On a rug, upside down. Push the two ends into the middle section.", add: ["BEAM_C", "BEAM_L", "BEAM_R"], from: { BEAM_L: [-260, 0, 0], BEAM_R: [260, 0, 0] }, pose: "-y", warnings: ["floor"] },
+ {
+ title: "Bolt it at the length for the top",
+ detail: "Eight bolts through the joints, each with a nut inside. The holes for a 160 x 80 top are the outer ones; a 120 x 70 top takes four.",
+ fix: [fx("bolt", joints, [0, 0, -1], "BEAM_C", { len: 16, dia: 6 }), fx("nut", joints.map((p): Vec3 => [p[0], p[1], -BEAM_D / 2]), [0, 0, -1], "BEAM_C", { dia: 10 })],
+ tools: ["allen"],
+ },
+ { title: "Push the motor columns into the beam ends", detail: "Turn the beam the other way up first. Each column's bracket slides into an end, the cable side to the back.", add: cols, from: { COL_L: [-260, 0, 0], COL_R: [260, 0, 0] } },
+ { title: "Bolt the columns to the beam", detail: "Four bolts for each, two through each side of the beam end.", fix: [...colBolts(-1, 0), ...colBolts(1, 1)], tools: ["allen"] },
+ {
+ title: "Screw on the end brackets",
+ detail: "One across each end of the beam, two screws each.",
+ add: brackets,
+ fix: [-1, 1].map((sx, i) => fx("screw", [-20, 20].map((z): Vec3 => [sx * (xe + 20), yU, z]), [0, -1, 0], brackets[i], { len: 10, dia: 6, mate: i ? "BEAM_R" : "BEAM_L" })),
+ tools: ["screwdriver"],
+ },
+ { title: "Push the A legs onto the columns", detail: "Over the end of each column as far as they go.", add: legs, from: { LEG_L: [0, -300, 0], LEG_R: [0, -300, 0] } },
+ {
+ title: "Bolt each leg to its column",
+ detail: "Two bolts in each, through the top of the leg's sleeve.",
+ fix: [-1, 1].map((sx, i) => fx("bolt", [-15, 15].map((x): Vec3 => [sx * xc + x, yS1 - 120, 0]), [0, 1, 0], legs[i], { len: 16, dia: 8, mate: cols[i] })),
+ tools: ["allen"],
+ },
+ { title: "Screw in the feet and turn it over", detail: "One foot into each end of the legs, by hand. Then turn the frame onto its feet together.", fix: [fx("foot", feet, [0, 1, 0], undefined, { dia: 60, len: 20 })], people: 2, warnings: ["two"] },
+ {
+ title: "Plug the motor cables into the control box",
+ detail: "Each column's cable into its socket in the control box in the beam, until it clicks.",
+ fix: [fx("connector", [-1, 1].map((sx): Vec3 => [sx * 120, yB, -BEAM_D / 2]), [0, 0, 1], "BEAM_C", { name: "Motor cable", len: 20, dia: 12 })],
+ pose: "+y",
+ },
+ { title: "Plug in the power supply", detail: "Its cable into the control box, then clip the box's cover shut. Use the plug for your country.", fix: [fx("connector", [[0, yB, -BEAM_D / 2]], [0, 0, 1], "BEAM_C", { name: "Power supply", len: 40, dia: 30 })] },
+ { title: "Clip the cable into the beam", detail: "Press it into the clips along the beam so nothing hangs loose." },
+ {
+ title: "Fit the cable net under the top",
+ detail: "Lay the top face down on a rug. Push in the six holders, hook the net on and tap in the six pins.",
+ fix: [fx("clip", netPts, [0, 1, 0], "NET", { name: "Net holder", mate: "TOP" }), fx("nail", netPts.map((p): Vec3 => [p[0] + 25, p[1], p[2]]), [0, 1, 0], "NET", { name: "Pin", len: 14, dia: 5, mate: "TOP" })],
+ wait: ["TOP", "NET"],
+ tools: ["hammer"],
+ warnings: ["floor"],
+ },
+ { title: "Raise the frame a little", detail: "Plug it into the wall and press the up switch on the control cable until the columns rise." },
+ { title: "Lay the top on the frame", detail: "Face up, centred on the end brackets. Lift it together.", add: ["TOP", "NET"], from: { TOP: [0, 300, 0], NET: [0, 300, 0] }, people: 2, warnings: ["two"] },
+ {
+ title: "Screw the top to the end brackets",
+ detail: "Four screws up through each bracket.",
+ fix: [-1, 1].map((sx, i) => fx("screw", [-1, 1].flatMap((sz) => [brD / 2 - 30, brD / 2 - 90].map((z): Vec3 => [sx * (xe + 20), yU - 12, sz * z])), [0, 1, 0], brackets[i], { len: 20, dia: 6, mate: "TOP" })),
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Screw the control panel under the front edge",
+ detail: "Two wood screws, where your right hand falls.",
+ fix: [
+ fx("connector", [[W / 2 - 300, yU, TD / 2 - 60]], [0, 1, 0], "TOP", { name: "Control panel", len: 25, dia: 60 }),
+ fx("screw", [[W / 2 - 320, yU - 20, TD / 2 - 60], [W / 2 - 280, yU - 20, TD / 2 - 60]], [0, 1, 0], undefined, { len: 30, dia: 4, name: "Wood screw", mate: "TOP" }),
+ ],
+ tools: ["screwdriver"],
+ },
+ { title: "Reset it and level the feet", detail: "Hold the down switch until it stops at the bottom and jogs. Then turn the feet so it stands steady. It takes 75 kg at most." },
+ ];
+ return { parts, steps };
+}
+
+// ---------- the cabinet with sliding glass doors ----------
+
+/** A glass door: a slim steel frame round a pane, built where it hangs. */
+function glassDoor(id: string, x0: number, x1: number, y0: number, y1: number, z: number): CustomPart {
+ const w = x1 - x0, h = y1 - y0, f = 30, t = 18;
+ return {
+ id,
+ name: "Glass door",
+ size: [w, h, t],
+ pos: [(x0 + x1) / 2, (y0 + y1) / 2, z],
+ material: "glass",
+ pieces: [
+ { shape: "box", size: [w - 2 * f, h - 2 * f, 5], pos: [0, 0, 0] },
+ { shape: "box", size: [w, f, t], pos: [0, h / 2 - f / 2, 0], material: "metal" },
+ { shape: "box", size: [w, f, t], pos: [0, -h / 2 + f / 2, 0], material: "metal" },
+ { shape: "box", size: [f, h - 2 * f, t], pos: [-w / 2 + f / 2, 0, 0], material: "metal" },
+ { shape: "box", size: [f, h - 2 * f, t], pos: [w / 2 - f / 2, 0, 0], material: "metal" },
+ ],
+ };
+}
+
+function cabinet(s: ProductSpec): CustomParams {
+ const W = s.size.w * 10, H = s.size.h * 10, D = s.size.d * 10;
+ const LEG = 100, ST = 20; // legs, steel panels
+ const yB = LEG + 40; // top of the base rails
+ const xs = W / 2 - ST / 2;
+ const legFrame = (id: string, z: number): CustomPart => ({
+ id,
+ name: "Leg frame",
+ size: [W, yB, 30],
+ pos: [0, yB / 2, z],
+ material: "metal",
+ pieces: [
+ { shape: "box", size: [W - 60, 40, 30], pos: [0, yB / 2 - 20, 0] },
+ ...[-1, 1].map((g): PartPiece => ({ shape: "box", size: [30, yB, 30], pos: [g * (W / 2 - 15), 0, 0] })),
+ ],
+ });
+ const shelfYs = [0.3, 0.52, 0.74].map((f) => Math.round(yB + f * (H - yB)));
+ const yD0 = yB + 25, yD1 = H - 30; // the doors
+ const parts: CustomPart[] = [
+ legFrame("FL", D / 2 - 15),
+ ...[-1, 1].map((g, i): CustomPart => ({ id: i ? "SR" : "SL", name: "Side panel", size: [ST, H - ST - LEG, D], pos: [g * xs, (LEG + H - ST) / 2, 0], material: "metal" })),
+ legFrame("BL", -D / 2 + 15),
+ { id: "TOP", name: "Top", size: [W, ST, D], pos: [0, H - ST / 2, 0], material: "metal" },
+ ...[-1, 1].map((g, i): CustomPart => ({ id: i ? "BK2" : "BK1", name: "Back panel", size: [W / 2 - ST, H - ST - yB, 3], pos: [(g * W) / 4 - g * (ST / 2), (yB + H - ST) / 2, -D / 2 + 3], material: "metal" })),
+ { id: "FLR", name: "Floor panel", size: [W - 2 * ST, 20, D - 40], pos: [0, yB + 10, 0], material: "metal" },
+ ...shelfYs.map((y, i): CustomPart => ({ id: `SH${i + 1}`, name: "Shelf", size: [W - 2 * ST - 6, 20, D - 90], pos: [0, y + 10, -20], material: "metal" })),
+ glassDoor("D1", -W / 2 + ST, 30, yD0, yD1, D / 2 - 45),
+ glassDoor("D2", -30, W / 2 - ST, yD0, yD1, D / 2 - 15),
+ ];
+ const sides = ["SL", "SR"];
+ const both = [-1, 1];
+ const steps: CustomStep[] = [
+ { title: "Click a side panel onto the front leg frame", detail: "On a rug. Hook the panel's bottom corner over the leg and press until it clicks.", add: ["FL", "SL"], from: { SL: [0, 300, 0] }, warnings: ["floor"] },
+ { title: "Click on the other side panel", detail: "The same way at the other end of the frame.", add: ["SR"], from: { SR: [0, 300, 0] } },
+ { title: "Click in the back leg frame", detail: "Push it onto the back corners of both sides until both ends click. The rail goes at the bottom.", add: ["BL"], from: { BL: [0, 0, -300] } },
+ { title: "Press the top on", detail: "Lower it onto the sides and press down at all four corners until they click.", add: ["TOP"], from: { TOP: [0, 300, 0] }, people: 2, warnings: ["two"] },
+ {
+ title: "Push in the four rivets",
+ detail: "Through the bottom of each side into the leg frames, two each side.",
+ fix: sides.map((id, i) => fx("clip", both.map((sz): Vec3 => [both[i] * (W / 2 - ST), LEG + 20, sz * (D / 2 - 15)]), [both[i], 0, 0], id, { name: "Plastic rivet", len: 14, dia: 8 })),
+ },
+ { title: "Slide in the right back panel", detail: "Into the grooves at the back, its edge into the side's slot.", add: ["BK2"], from: { BK2: [0, 0, -300] } },
+ { title: "Slide in the left back panel", detail: "The same on the other side, until the two halves meet.", add: ["BK1"], from: { BK1: [0, 0, -300] } },
+ { title: "Press the back panels up under the top", detail: "Push the top edge into the rail under the top at four places." },
+ { title: "Hook the backs to the top rail", detail: "Bend the two tabs in the middle over the rail." },
+ { title: "Hook the outer corners", detail: "The two tabs at the ends, the same way." },
+ { title: "Drop in the floor panel", detail: "Lay it on the base rails and press it down at the back until both sides click.", add: ["FLR"], from: { FLR: [0, 0, 400] } },
+ {
+ title: "Fit the cable grommets",
+ detail: "The round one into the hole in the floor panel, the two oval ones into the holes in the back.",
+ fix: [
+ fx("cap", [[W / 4, yB + 20, -D / 2 + 80]], [0, -1, 0], "FLR", { name: "Round grommet", len: 6, dia: 60 }),
+ fx("cap", both.map((g): Vec3 => [(g * W) / 4, H - 200, -D / 2 + 1]), [0, 0, -1], undefined, { name: "Oval grommet", len: 6, dia: 50 }),
+ ],
+ },
+ {
+ title: "Fit the wall fittings on the back",
+ detail: "Clip a fitting into each hole at the top of the back. If it won't go on a wall, push the two caps into the holes instead.",
+ fix: [fx("bracket", both.map((g): Vec3 => [g * (W / 2 - 100), H - 70, -D / 2]), [0, 0, 1], "TOP", { name: "Wall fitting", len: 10, dia: 40 })],
+ },
+ { title: "Stand it against the wall and level it", detail: "Turn the feet under the legs until it stands level and the doors will run true.", warnings: ["tip"] },
+ {
+ title: "Screw it to the wall",
+ detail: "Mark through the fittings, drill, then one screw in each. Plugs and screws for your wall are not included.",
+ fix: [
+ fx("plug", both.map((g): Vec3 => [g * (W / 2 - 100), H - 70, -D / 2 - 10]), [0, 0, -1], undefined, { len: 40, dia: 8 }),
+ fx("screw", both.map((g): Vec3 => [g * (W / 2 - 100), H - 70, -D / 2 + 2]), [0, 0, -1], undefined, { len: 50, dia: 5 }),
+ ],
+ wall: true,
+ warnings: ["wall", "tip"],
+ tools: ["drill", "screwdriver"],
+ },
+ {
+ title: "Hook in the shelf clips",
+ detail: "Twelve clips, four for each shelf at the same height on both sides.",
+ fix: sides.map((id, i) => fx("pin", shelfYs.flatMap((y) => [-D / 2 + 60, D / 2 - 110].map((z): Vec3 => [both[i] * (W / 2 - ST), y - 5, z])), [both[i], 0, 0], id, { name: "Shelf clip", len: 16, dia: 6 })),
+ },
+ { title: "Lay in the three shelves", detail: "Tilt each one in and rest it on its four clips.", add: shelfYs.map((_, i) => `SH${i + 1}`), from: Object.fromEntries(shelfYs.map((_, i) => [`SH${i + 1}`, [0, 0, 400] as Vec3])) },
+ {
+ title: "Screw a guide onto each door",
+ detail: "Lay the doors on a rug. One guide on the top of each, one screw.",
+ fix: [
+ fx("clip", [[-W / 4, yD1, D / 2 - 45], [W / 4, yD1, D / 2 - 15]], [0, -1, 0], undefined, { name: "Door guide", len: 10, dia: 30 }),
+ fx("screw", [[-W / 4, yD1 + 4, D / 2 - 45]], [0, -1, 0], "D1", { len: 14, dia: 4 }),
+ fx("screw", [[W / 4, yD1 + 4, D / 2 - 15]], [0, -1, 0], "D2", { len: 14, dia: 4 }),
+ ],
+ wait: ["D1", "D2"],
+ tools: ["screwdriver"],
+ warnings: ["floor"],
+ },
+ { title: "Unlock the rollers", detail: "Slide the four roller catches at the bottom of the doors to open." },
+ {
+ title: "Hang the doors",
+ detail: "Top first into the top track, then lower the rollers into the bottom track. The back one first.",
+ add: ["D1", "D2"],
+ from: { D1: [0, 0, 300], D2: [0, 0, 300] },
+ people: 2,
+ warnings: ["two"],
+ },
+ { title: "Lock the rollers", detail: "Push the catches up on both doors until they click." },
+ { title: "Slide the doors to check", detail: "They should run the full width and click shut at the ends." },
+ ];
+ return { parts, steps };
+}
+
// ---------- the drawer unit on castors ----------
const SHELL = 18; // side shells
@@ -271,6 +531,8 @@ function buildUnit(b: PlanBuilder, s: ProductSpec) {
const family: Family = {
names: ["IDÅSEN", "IDASEN"],
recipe(s) {
+ if (/sliding glass doors/i.test(s.variant)) return cabinet(s);
+ if (/^underframe sit\/stand/i.test(s.variant)) return sitStand(s);
if (s.archetype !== "table" || !/desk/i.test(`${s.variant} ${s.slug ?? ""}`)) return null;
// the sit/stand desk with a motor has its own manual
if (/sit|stand|electric/i.test(s.variant)) return null;
diff --git a/src/lib/plan/families/index.ts b/src/lib/plan/families/index.ts
index ee064b5..3f10666 100644
--- a/src/lib/plan/families/index.ts
+++ b/src/lib/plan/families/index.ts
@@ -48,6 +48,7 @@ import f_blastasen from "./blastasen";
import f_bleckberget from "./bleckberget";
import f_boastad from "./boastad";
import f_boaxel from "./boaxel";
+import f_bockon from "./bockon";
import f_bollpojke from "./bollpojke";
import f_bollsidan from "./bollsidan";
import f_bolmen from "./bolmen";
@@ -109,6 +110,7 @@ import f_forlunda from "./forlunda";
import f_forsaljare from "./forsaljare";
import f_forsiktig from "./forsiktig";
import f_franklin from "./franklin";
+import f_fredde from "./fredde";
import f_fridhult from "./fridhult";
import f_friheten from "./friheten";
import f_friidrott from "./friidrott";
@@ -135,6 +137,7 @@ import f_godishus from "./godishus";
import f_gonatt from "./gonatt";
import f_grafjallet from "./grafjallet";
import f_greaker from "./greaker";
+import f_grejig from "./grejig";
import f_grejsimojs from "./grejsimojs";
import f_grillskar from "./grillskar";
import f_groeryd from "./groeryd";
@@ -143,6 +146,7 @@ import f_gronsta from "./gronsta";
import f_grotan from "./grotan";
import f_grunnarp from "./grunnarp";
import f_grysna from "./grysna";
+import f_gryteryd from "./gryteryd";
import f_gullaberg from "./gullaberg";
import f_gulliver from "./gulliver";
import f_gullvalla from "./gullvalla";
@@ -174,6 +178,7 @@ import f_holmerud from "./holmerud";
import f_holmsta from "./holmsta";
import f_holmsund from "./holmsund";
import f_hornavan from "./hornavan";
+import f_husbyan from "./husbyan";
import f_huvudspelare from "./huvudspelare";
import f_hyllis from "./hyllis";
import f_hyltarp from "./hyltarp";
@@ -214,6 +219,7 @@ import f_klackenas from "./klackenas";
import f_kleppstad from "./kleppstad";
import f_klippan from "./klippan";
import f_klippuggla from "./klippuggla";
+import f_kloven from "./kloven";
import f_knarrevik from "./knarrevik";
import f_knoxhult from "./knoxhult";
import f_kolbjorn from "./kolbjorn";
@@ -229,6 +235,7 @@ import f_krylbo from "./krylbo";
import f_kullen from "./kullen";
import f_kungsfors from "./kungsfors";
import f_kura from "./kura";
+import f_kvistbro from "./kvistbro";
import f_kyrre from "./kyrre";
import f_lack from "./lack";
import f_lacko from "./lacko";
@@ -239,10 +246,13 @@ import f_landskrona from "./landskrona";
import f_lanespelare from "./lanespelare";
import f_lanesund from "./lanesund";
import f_langaryd from "./langaryd";
+import f_langdhopp from "./langdhopp";
import f_langfjall from "./langfjall";
+import f_larande from "./larande";
import f_lastare from "./lastare";
import f_ledamot from "./ledamot";
import f_lennart from "./lennart";
+import f_lerholmen from "./lerholmen";
import f_lillanas from "./lillanas";
import f_lillberget from "./lillberget";
import f_lillehem from "./lillehem";
@@ -302,6 +312,7 @@ import f_nasinge from "./nasinge";
import f_neiden from "./neiden";
import f_nipasen from "./nipasen";
import f_nissafors from "./nissafors";
+import f_norberg from "./norberg";
import f_nordkisa from "./nordkisa";
import f_nordkroken from "./nordkroken";
import f_nordli from "./nordli";
@@ -310,6 +321,7 @@ import f_nordviken from "./nordviken";
import f_norraker from "./norraker";
import f_norrmanso from "./norrmanso";
import f_norrmjole from "./norrmjole";
+import f_norrudden from "./norrudden";
import f_nyhamn from "./nyhamn";
import f_nysjon from "./nysjon";
import f_odger from "./odger";
@@ -346,6 +358,8 @@ import f_rast from "./rast";
import f_ravsten from "./ravsten";
import f_relatera from "./relatera";
import f_renberget from "./renberget";
+import f_resaro from "./resaro";
+import f_reso from "./reso";
import f_rian from "./rian";
import f_ridspo from "./ridspo";
import f_rigga from "./rigga";
@@ -356,6 +370,7 @@ import f_rocksjon from "./rocksjon";
import f_ronninge from "./ronninge";
import f_rosentorp from "./rosentorp";
import f_rudsta from "./rudsta";
+import f_rullebor from "./rullebor";
import f_sagesund from "./sagesund";
import f_sagmastare from "./sagmastare";
import f_salno from "./salno";
@@ -384,6 +399,7 @@ import f_slatorp from "./slatorp";
import f_slattum from "./slattum";
import f_smagora from "./smagora";
import f_smallen from "./smallen";
+import f_smaskrake from "./smaskrake";
import f_smastad from "./smastad";
import f_smedstorp from "./smedstorp";
import f_smorkull from "./smorkull";
@@ -404,6 +420,7 @@ import f_stig from "./stig";
import f_stigbygel from "./stigbygel";
import f_stjarno from "./stjarno";
import f_stockholm from "./stockholm";
+import f_stomso from "./stomso";
import f_stora from "./stora";
import f_storedamm from "./storedamm";
import f_storemolla from "./storemolla";
@@ -431,6 +448,7 @@ import f_tegelon from "./tegelon";
import f_teodores from "./teodores";
import f_terje from "./terje";
import f_tingby from "./tingby";
+import f_tittebo from "./tittebo";
import f_tjarkil from "./tjarkil";
import f_tjusig from "./tjusig";
import f_tobias from "./tobias";
@@ -447,6 +465,7 @@ import f_tranno from "./tranno";
import f_travsport from "./travsport";
import f_treasjon from "./treasjon";
import f_trofast from "./trofast";
+import f_trogen from "./trogen";
import f_trones from "./trones";
import f_trotten from "./trotten";
import f_tuffing from "./tuffing";
@@ -474,6 +493,7 @@ import f_vangsta from "./vangsta";
import f_varmanso from "./varmanso";
import f_vasman from "./vasman";
import f_vassholmen from "./vassholmen";
+import f_vasskar from "./vasskar";
import f_vattenkar from "./vattenkar";
import f_vedbo from "./vedbo";
import f_veinge from "./veinge";
@@ -503,4 +523,4 @@ import f_vuku from "./vuku";
import f_yngvar from "./yngvar";
import f_yxstaby from "./yxstaby";
-export const FAMILIES: Family[] = [f_agam, f_agen, f_albert, f_alefjall, f_alex, f_alganas, f_alhult, f_alseda, f_alskvard, f_alvdalen, f_alvsta, f_ammaryd, f_anfallare, f_angsjon, f_ankarudden, f_antilop, f_applaryd, f_arsunda, f_askholmen, f_asperod, f_aterloga, f_baggboda, f_baggebo, f_balkarp, f_baltsar, f_barslov, f_bastboll, f_batskar, f_bekant, f_bekvam, f_bergmund, f_bergshyttan, f_besta, f_beteshast, f_billy, f_bingsta, f_bissa, f_bjorkasen, f_bjorkberget, f_bjorksnas, f_bladdra, f_blaliden, f_blames, f_blankhallan, f_blastasen, f_bleckberget, f_boastad, f_boaxel, f_bollpojke, f_bollsidan, f_bolmen, f_bondholmen, f_bondskaret, f_borgeby, f_brannboll, f_brimnes, f_bror, f_brusali, f_brytning, f_burvik, f_buskbo, f_buslatt, f_busunge, f_byas, f_byasjon, f_centerhalv, f_dagnar, f_dalfred, f_danderyd, f_docksta, f_domsten, f_dubbla, f_duvskar, f_dyvlinge, f_ekedalen, f_ekenabben, f_ekenaset, f_ekero, f_eket, f_ekholma, f_ekolsund, f_ekrar, f_ektorp, f_eldberget, f_emmislov, f_enhet, f_enkroken, f_ensholm, f_esseboda, f_fabrikor, f_fagelfjallet, f_fagerbacken, f_fargsattare, f_farjkarl, f_fejan, f_finnala, f_fjaderharv, f_fjalkinge, f_fjallberget, f_fjallbo, f_flekke, f_flinshult, f_flintan, f_flisat, f_forhoja, f_forlunda, f_forsaljare, f_forsiktig, f_franklin, f_fridhult, f_friheten, f_friidrott, f_froset, f_frosjon, f_froskelas, f_frost, f_frosvi, f_frotorp, f_fryksas, f_fyresdal, f_galant, f_gamlehult, f_garnanas, f_gavle, f_gersby, f_gillersberg, f_gladhojden, f_gladstad, f_glamberget, f_glenn, f_glostad, f_godishus, f_gonatt, f_grafjallet, f_greaker, f_grejsimojs, f_grillskar, f_groeryd, f_gronfjall, f_gronsta, f_grotan, f_grunnarp, f_grysna, f_gullaberg, f_gulliver, f_gullvalla, f_gultarp, f_gunde, f_gunrik, f_gursken, f_guttane, f_haddarp, f_hagaan, f_hagernas, f_hakanskar, f_hammarn, f_hattefjall, f_hattholmen, f_hauga, f_havback, f_havberg, f_havsta, f_havsten, f_hejne, f_helmer, f_hemlingby, f_hemnes, f_herrakra, f_hogved, f_hol, f_holmerud, f_holmsta, f_holmsund, f_hornavan, f_huvudspelare, f_hyllis, f_hyltarp, f_ibbarbo, f_idanas, f_idasen, f_ikea, f_ingo, f_ingolf, f_inndyr, f_invallning, f_ismantorp, f_ivar, f_ivosjon, f_jakobsfors, f_jall, f_janinge, f_jarrestad, f_jarvfjallet, f_jattebo, f_jattesta, f_jolpen, f_jonaxel, f_juteboda, f_jutholmen, f_juttersbo, f_kallax, f_kallso, f_karskar, f_kattil, f_kattunge, f_kesnacken, f_kilberget, f_kivik, f_kjellarne, f_kjuge, f_klackenas, f_kleppstad, f_klippan, f_klippuggla, f_knarrevik, f_knoxhult, f_kolbjorn, f_kompishang, f_konstrunda, f_koppang, f_kragsta, f_kritter, f_krokholmen, f_kronikor, f_kronoren, f_krylbo, f_kullen, f_kungsfors, f_kura, f_kyrre, f_lack, f_lacko, f_lagkapten, f_laiva, f_laktare, f_landskrona, f_lanespelare, f_lanesund, f_langaryd, f_langfjall, f_lastare, f_ledamot, f_lennart, f_lillanas, f_lillberget, f_lillehem, f_lillesater, f_lindakra, f_linneback, f_linnmon, f_lisabo, f_listerby, f_lixhult, f_loberget, f_lommarp, f_loparbana, f_loshult, f_lote, f_lovbacken, f_lubban, f_lustebo, f_lyckan, f_lycksele, f_mabarsskar, f_mackapar, f_malm, f_malmkoping, f_malomrade, f_mammut, f_mandal, f_mannarp, f_marenas, f_mariedamm, f_marius, f_markus, f_matchspel, f_mellgrund, f_metod, f_micke, f_millberget, f_milsbo, f_minnen, f_mittplan, f_mittzon, f_mofalla, f_moppe, f_morabo, f_morbylanga, f_mortfors, f_mossjon, f_mulig, f_mullsjo, f_muskan, f_mydal, f_myllra, f_nackanas, f_nalmakare, f_nammaro, f_nasinge, f_neiden, f_nipasen, f_nissafors, f_nordkisa, f_nordkroken, f_nordli, f_nordmansskar, f_nordviken, f_norraker, f_norrmanso, f_norrmjole, f_nyhamn, f_nysjon, f_odger, f_olserod, f_omar, f_ommjange, f_onnestad, f_orfjall, f_orreslatt, f_ortrask, f_oskarshamn, f_ostavall, f_ovning, f_pahl, f_panget, f_paronholmen, f_pax, f_perjohan, f_persbol, f_pinntorp, f_piplarka, f_platsa, f_plojker, f_poang, f_racknas, f_radmanso, f_raggberg, f_ragrund, f_rakkestad, f_ramnefjall, f_ramsnas, f_raskog, f_rast, f_ravsten, f_relatera, f_renberget, f_rian, f_ridspo, f_rigga, f_rimforsa, f_risholmen, f_risor, f_rocksjon, f_ronninge, f_rosentorp, f_rudsta, f_sagesund, f_sagmastare, f_salno, f_saltmyran, f_saltsjobaden, f_sandkatt, f_sandsberg, f_segeron, f_segrare, f_sektion, f_sidsjo, f_sigfinn, f_sjalso, f_skalboda, f_skalsta, f_skansnas, f_skapafors, f_skarpo, f_skogson, f_skogsta, f_skonaback, f_skruvby, f_skruvsta, f_slakt, f_slatorp, f_slattum, f_smagora, f_smallen, f_smastad, f_smedstorp, f_smorkull, f_smyga, f_sniglar, f_soderhamn, f_soluppgang, f_songesand, f_sotenas, f_spiksmed, f_stackholmen, f_stall, f_stefan, f_stegesund, f_stein, f_stensele, f_stig, f_stigbygel, f_stjarno, f_stockholm, f_stora, f_storedamm, f_storemolla, f_storklinta, f_strandmon, f_strandon, f_styrspel, f_sundbron, f_sundso, f_sundvik, f_sunnersta, f_svarta, f_syntorp, f_syvde, f_tallasen, f_tallskar, f_tanebro, f_tannforsen, f_tarnkullen, f_tarno, f_tarsele, f_tarva, f_taxasklint, f_tegelon, f_teodores, f_terje, f_tingby, f_tjarkil, f_tjusig, f_tobias, f_tolkning, f_tonstad, f_torald, f_tornsborg, f_tornviken, f_torparo, f_torsjo, f_tossberg, f_tranered, f_tranno, f_travsport, f_treasjon, f_trofast, f_trones, f_trotten, f_tuffing, f_tufjord, f_tullsta, f_tunsta, f_tvaro, f_tyssedal, f_ugglerum, f_ulriksberg, f_ulvevar, f_uppakra, f_uppfora, f_uppland, f_urban, f_utaker, f_utespelare, f_utklassning, f_utmaning, f_utter, f_vadholma, f_valnas, f_valtorp, f_vangsta, f_varmanso, f_vasman, f_vassholmen, f_vattenkar, f_vedbo, f_veinge, f_venngarn, f_vesken, f_vevelstad, f_viggso, f_vihals, f_vikhammer, f_vildgas, f_vilhatten, f_vilto, f_vimle, f_vimund, f_vingson, f_vinliden, f_visingso, f_viskafors, f_visthus, f_vitteryd, f_vittsjo, f_vittskar, f_vitval, f_voxlov, f_vretstorp, f_vuku, f_yngvar, f_yxstaby];
+export const FAMILIES: Family[] = [f_agam, f_agen, f_albert, f_alefjall, f_alex, f_alganas, f_alhult, f_alseda, f_alskvard, f_alvdalen, f_alvsta, f_ammaryd, f_anfallare, f_angsjon, f_ankarudden, f_antilop, f_applaryd, f_arsunda, f_askholmen, f_asperod, f_aterloga, f_baggboda, f_baggebo, f_balkarp, f_baltsar, f_barslov, f_bastboll, f_batskar, f_bekant, f_bekvam, f_bergmund, f_bergshyttan, f_besta, f_beteshast, f_billy, f_bingsta, f_bissa, f_bjorkasen, f_bjorkberget, f_bjorksnas, f_bladdra, f_blaliden, f_blames, f_blankhallan, f_blastasen, f_bleckberget, f_boastad, f_boaxel, f_bockon, f_bollpojke, f_bollsidan, f_bolmen, f_bondholmen, f_bondskaret, f_borgeby, f_brannboll, f_brimnes, f_bror, f_brusali, f_brytning, f_burvik, f_buskbo, f_buslatt, f_busunge, f_byas, f_byasjon, f_centerhalv, f_dagnar, f_dalfred, f_danderyd, f_docksta, f_domsten, f_dubbla, f_duvskar, f_dyvlinge, f_ekedalen, f_ekenabben, f_ekenaset, f_ekero, f_eket, f_ekholma, f_ekolsund, f_ekrar, f_ektorp, f_eldberget, f_emmislov, f_enhet, f_enkroken, f_ensholm, f_esseboda, f_fabrikor, f_fagelfjallet, f_fagerbacken, f_fargsattare, f_farjkarl, f_fejan, f_finnala, f_fjaderharv, f_fjalkinge, f_fjallberget, f_fjallbo, f_flekke, f_flinshult, f_flintan, f_flisat, f_forhoja, f_forlunda, f_forsaljare, f_forsiktig, f_franklin, f_fredde, f_fridhult, f_friheten, f_friidrott, f_froset, f_frosjon, f_froskelas, f_frost, f_frosvi, f_frotorp, f_fryksas, f_fyresdal, f_galant, f_gamlehult, f_garnanas, f_gavle, f_gersby, f_gillersberg, f_gladhojden, f_gladstad, f_glamberget, f_glenn, f_glostad, f_godishus, f_gonatt, f_grafjallet, f_greaker, f_grejig, f_grejsimojs, f_grillskar, f_groeryd, f_gronfjall, f_gronsta, f_grotan, f_grunnarp, f_grysna, f_gryteryd, f_gullaberg, f_gulliver, f_gullvalla, f_gultarp, f_gunde, f_gunrik, f_gursken, f_guttane, f_haddarp, f_hagaan, f_hagernas, f_hakanskar, f_hammarn, f_hattefjall, f_hattholmen, f_hauga, f_havback, f_havberg, f_havsta, f_havsten, f_hejne, f_helmer, f_hemlingby, f_hemnes, f_herrakra, f_hogved, f_hol, f_holmerud, f_holmsta, f_holmsund, f_hornavan, f_husbyan, f_huvudspelare, f_hyllis, f_hyltarp, f_ibbarbo, f_idanas, f_idasen, f_ikea, f_ingo, f_ingolf, f_inndyr, f_invallning, f_ismantorp, f_ivar, f_ivosjon, f_jakobsfors, f_jall, f_janinge, f_jarrestad, f_jarvfjallet, f_jattebo, f_jattesta, f_jolpen, f_jonaxel, f_juteboda, f_jutholmen, f_juttersbo, f_kallax, f_kallso, f_karskar, f_kattil, f_kattunge, f_kesnacken, f_kilberget, f_kivik, f_kjellarne, f_kjuge, f_klackenas, f_kleppstad, f_klippan, f_klippuggla, f_kloven, f_knarrevik, f_knoxhult, f_kolbjorn, f_kompishang, f_konstrunda, f_koppang, f_kragsta, f_kritter, f_krokholmen, f_kronikor, f_kronoren, f_krylbo, f_kullen, f_kungsfors, f_kura, f_kvistbro, f_kyrre, f_lack, f_lacko, f_lagkapten, f_laiva, f_laktare, f_landskrona, f_lanespelare, f_lanesund, f_langaryd, f_langdhopp, f_langfjall, f_larande, f_lastare, f_ledamot, f_lennart, f_lerholmen, f_lillanas, f_lillberget, f_lillehem, f_lillesater, f_lindakra, f_linneback, f_linnmon, f_lisabo, f_listerby, f_lixhult, f_loberget, f_lommarp, f_loparbana, f_loshult, f_lote, f_lovbacken, f_lubban, f_lustebo, f_lyckan, f_lycksele, f_mabarsskar, f_mackapar, f_malm, f_malmkoping, f_malomrade, f_mammut, f_mandal, f_mannarp, f_marenas, f_mariedamm, f_marius, f_markus, f_matchspel, f_mellgrund, f_metod, f_micke, f_millberget, f_milsbo, f_minnen, f_mittplan, f_mittzon, f_mofalla, f_moppe, f_morabo, f_morbylanga, f_mortfors, f_mossjon, f_mulig, f_mullsjo, f_muskan, f_mydal, f_myllra, f_nackanas, f_nalmakare, f_nammaro, f_nasinge, f_neiden, f_nipasen, f_nissafors, f_norberg, f_nordkisa, f_nordkroken, f_nordli, f_nordmansskar, f_nordviken, f_norraker, f_norrmanso, f_norrmjole, f_norrudden, f_nyhamn, f_nysjon, f_odger, f_olserod, f_omar, f_ommjange, f_onnestad, f_orfjall, f_orreslatt, f_ortrask, f_oskarshamn, f_ostavall, f_ovning, f_pahl, f_panget, f_paronholmen, f_pax, f_perjohan, f_persbol, f_pinntorp, f_piplarka, f_platsa, f_plojker, f_poang, f_racknas, f_radmanso, f_raggberg, f_ragrund, f_rakkestad, f_ramnefjall, f_ramsnas, f_raskog, f_rast, f_ravsten, f_relatera, f_renberget, f_resaro, f_reso, f_rian, f_ridspo, f_rigga, f_rimforsa, f_risholmen, f_risor, f_rocksjon, f_ronninge, f_rosentorp, f_rudsta, f_rullebor, f_sagesund, f_sagmastare, f_salno, f_saltmyran, f_saltsjobaden, f_sandkatt, f_sandsberg, f_segeron, f_segrare, f_sektion, f_sidsjo, f_sigfinn, f_sjalso, f_skalboda, f_skalsta, f_skansnas, f_skapafors, f_skarpo, f_skogson, f_skogsta, f_skonaback, f_skruvby, f_skruvsta, f_slakt, f_slatorp, f_slattum, f_smagora, f_smallen, f_smaskrake, f_smastad, f_smedstorp, f_smorkull, f_smyga, f_sniglar, f_soderhamn, f_soluppgang, f_songesand, f_sotenas, f_spiksmed, f_stackholmen, f_stall, f_stefan, f_stegesund, f_stein, f_stensele, f_stig, f_stigbygel, f_stjarno, f_stockholm, f_stomso, f_stora, f_storedamm, f_storemolla, f_storklinta, f_strandmon, f_strandon, f_styrspel, f_sundbron, f_sundso, f_sundvik, f_sunnersta, f_svarta, f_syntorp, f_syvde, f_tallasen, f_tallskar, f_tanebro, f_tannforsen, f_tarnkullen, f_tarno, f_tarsele, f_tarva, f_taxasklint, f_tegelon, f_teodores, f_terje, f_tingby, f_tittebo, f_tjarkil, f_tjusig, f_tobias, f_tolkning, f_tonstad, f_torald, f_tornsborg, f_tornviken, f_torparo, f_torsjo, f_tossberg, f_tranered, f_tranno, f_travsport, f_treasjon, f_trofast, f_trogen, f_trones, f_trotten, f_tuffing, f_tufjord, f_tullsta, f_tunsta, f_tvaro, f_tyssedal, f_ugglerum, f_ulriksberg, f_ulvevar, f_uppakra, f_uppfora, f_uppland, f_urban, f_utaker, f_utespelare, f_utklassning, f_utmaning, f_utter, f_vadholma, f_valnas, f_valtorp, f_vangsta, f_varmanso, f_vasman, f_vassholmen, f_vasskar, f_vattenkar, f_vedbo, f_veinge, f_venngarn, f_vesken, f_vevelstad, f_viggso, f_vihals, f_vikhammer, f_vildgas, f_vilhatten, f_vilto, f_vimle, f_vimund, f_vingson, f_vinliden, f_visingso, f_viskafors, f_visthus, f_vitteryd, f_vittsjo, f_vittskar, f_vitval, f_voxlov, f_vretstorp, f_vuku, f_yngvar, f_yxstaby];
diff --git a/src/lib/plan/families/ivar.ts b/src/lib/plan/families/ivar.ts
index e962a5a..206a27a 100644
--- a/src/lib/plan/families/ivar.ts
+++ b/src/lib/plan/families/ivar.ts
@@ -1,7 +1,8 @@
import type { Family } from "./family";
-import type { CustomFix, CustomPart, CustomStep, HwKind, PartPiece, ProductSpec, Vec3 } from "../../types";
+import type { CustomFix, CustomPart, CustomStep, HwKind, PartItem, PartPiece, ProductSpec, Vec3 } from "../../types";
import { HW, type HwDef, type PlanBuilder } from "../builder";
import { buildCustom } from "../custom";
+import { rotate } from "../math";
/**
* IVAR, read from its manuals.
@@ -973,6 +974,357 @@ function boxUnit(s: ProductSpec): Recipe & { back: Vec3[] } {
};
}
+/* ---------------- parts built beside the shelving ---------------- */
+
+/**
+ * A recipe draws every part where it ends up. Parts the manual builds on the floor first (a frame laid flat, a
+ * cabinet on its back) are moved there afterwards: from the step titled `at`, each segment shows the group turned
+ * by `rot` about `pivot` and set down with the pivot at `to`; a segment without `to` brings it home.
+ */
+type Seg = { at: string; rot?: Vec3; pivot?: Vec3; to?: Vec3 };
+type Move = { ids: string[]; segs: Seg[] };
+
+function restage(b: PlanBuilder, parts: CustomPart[], moves: Move[]) {
+ const items = b.items.filter((i): i is PartItem => i.kind === "part");
+ const stepOf = (t: string) => b.steps.findIndex((x) => x.title === t);
+ for (const m of moves) {
+ const marks = m.segs.map((g) => ({ ...g, n: stepOf(g.at) })).filter((g) => g.n >= 0).sort((a, c) => a.n - c.n);
+ for (const id of m.ids) {
+ const it = items[parts.findIndex((p) => p.id === id)];
+ if (!it) continue;
+ marks.forEach((g, k) => {
+ const end = marks[k + 1]?.n ?? Infinity;
+ const f = it.final;
+ let pos = f.pos, rot = f.rot;
+ if (g.to) {
+ const r = g.rot ?? [0, 0, 0], c = g.pivot ?? [0, 0, 0];
+ const q = rotate([f.pos[0] - c[0], f.pos[1] - c[1], f.pos[2] - c[2]], r);
+ pos = [q[0] + g.to[0], q[1] + g.to[1], q[2] + g.to[2]];
+ // only one turn is ever about y or z, and those parts aren't turned themselves, so the angles just add
+ rot = [f.rot[0] + r[0], f.rot[1] + r[1], f.rot[2] + r[2]];
+ }
+ const inSeg = it.states.filter((x) => x.step >= g.n && x.step < end);
+ for (const x of inSeg) Object.assign(x, { pos, rot });
+ const before = it.states.filter((x) => x.step < g.n);
+ if (!inSeg.some((x) => x.step === g.n) && before.length) {
+ it.states.push({ ...before[before.length - 1], step: g.n, pos, rot, from: undefined, delay: 0.15 });
+ it.states.sort((a, c) => a.step - c.step);
+ }
+ });
+ }
+ }
+}
+
+/* ---------------- folding table, hung on a side unit ---------------- */
+
+const FT = 18; // the table's panels
+const FTOP = 750; // table height
+
+/**
+ * The folding table on a section between two ladders `W` wide (outside), centred on `cx`. Its leg frame is two posts
+ * and two rails on dowels and bolts, hinged to the front upright on the `sx` side; the top is hinged to a back strip
+ * that lies on four brackets in the uprights. `up` names the section's uprights: [left back, left front, right back, right front].
+ */
+function foldingTable(W: number, D: number, cx: number, sx: 1 | -1, up: [string, string, string, string], pre = "f") {
+ const id = (k: string) => pre + k;
+ const xi = W / 2 - UX; // the uprights' inner faces
+ const zu = D / 2 - UZ / 2;
+ const fx0 = cx + sx * (xi - 20); // the leg frame, just inside the upright
+ const z0 = D / 2, zt = D / 2 + 630; // the top, from the front of the uprights
+ const fw = 30, fd = 44; // frame sections
+ const zr = z0 + fd / 2, zf = zt - 30; // back post, front leg
+ const yT = FTOP - FT; // underside of the top
+ const railL = zf - zr - fd, railZ = (zr + zf) / 2;
+ const yTop = yT - fd / 2, yBot = 82;
+ const parts: CustomPart[] = [
+ box(id("T"), "Table top", [800, FT, 630], [cx, FTOP - FT / 2, (z0 + zt) / 2], { material: "wood" }),
+ box(id("K"), "Back strip", [2 * xi, FT, D], [cx, FTOP - FT / 2, 0], { material: "wood" }),
+ box(id("LT"), "Frame rail", [fw, fd, railL], [fx0, yTop, railZ], { material: "wood" }),
+ box(id("LB"), "Frame rail", [fw, fd, railL], [fx0, yBot, railZ], { material: "wood" }),
+ box(id("LR"), "Back post", [fw, yT - 40, fd], [fx0, 40 + (yT - 40) / 2, zr], { material: "wood" }),
+ box(id("LF"), "Leg", [fw, yT - 15, fd], [fx0, 15 + (yT - 15) / 2, zf], { material: "wood" }),
+ ];
+ const ends = (rail: string, y: number) => [
+ { post: id("LR"), z: zr + fd / 2, dir: [0, 0, 1] as Vec3, rail, y },
+ { post: id("LF"), z: zf - fd / 2, dir: [0, 0, -1] as Vec3, rail, y },
+ ];
+ const joints = [...ends(id("LT"), yTop), ...ends(id("LB"), yBot)];
+ const hy = [yT - 90, 160]; // hinge brackets on the back post
+ const ux = cx + sx * xi;
+ const front = sx > 0 ? up[3] : up[1];
+ const SCR = { len: 16, dia: 4 };
+ const BIG = { name: "Frame bolt", len: 110, dia: 6 };
+ const hingeAt = [-1, 1].map((k) => cx + k * 280);
+ const steps: CustomStep[] = [
+ {
+ title: "Lay out the two frame rails",
+ detail: "On a rug, next to the shelving. The table's leg frame is built flat.",
+ add: [id("LT"), id("LB")],
+ warnings: ["floor"],
+ },
+ {
+ title: "Tap in the dowels and push the posts on",
+ detail: "Two dowels into each end of both rails, then press the back post and the leg onto them.",
+ fix: joints.map((j) => fx("dowel", [-14, 14].map((dy) => [fx0, j.y + dy, j.z] as Vec3), j.dir.map((v) => -v) as Vec3, j.rail, { mate: j.post, len: 30, dia: 8 })),
+ add: [id("LR"), id("LF")],
+ tools: ["hammer"],
+ },
+ {
+ title: "Bolt the frame together",
+ detail: "A barrel nut into each rail end, slot towards the bolt, then a long bolt through the post into it.",
+ fix: [
+ ...joints.map((j) => fx("nut", [[fx0 - sx * (fw / 2), j.y, j.z + j.dir[2] * 40]], [sx, 0, 0], j.rail, { name: "Barrel nut", len: 14, dia: 10 })),
+ ...joints.map((j) => fx("bolt", [[fx0, j.y, j.z - j.dir[2] * fd]], j.dir, j.post, { ...BIG, mate: j.rail })),
+ ],
+ tools: ["flathead", "allen"],
+ },
+ {
+ title: "Screw the levelling foot into the leg",
+ detail: "Into the bottom of the leg, by hand. You can level the table with it later.",
+ fix: [fx("foot", [[fx0, 15, zf]], [0, 1, 0], id("LF"), { name: "Levelling foot", len: 15, dia: 30 })],
+ },
+ {
+ title: "Screw the stop pin into the top rail",
+ detail: "Into the hole in the inside face, near the leg.",
+ fix: [fx("stud", [[fx0 - sx * (fw / 2), yTop, zf - 90]], [sx, 0, 0], id("LT"), { name: "Stop pin", len: 30, dia: 8 })],
+ tools: ["allen"],
+ },
+ {
+ title: "Screw the hinge brackets onto the back post",
+ detail: "On its outer face, one near each end, two screws each.",
+ fix: [
+ fx("hinge", hy.map((y) => [fx0 + sx * (fw / 2), y, zr] as Vec3), [-sx, 0, 0], id("LR"), { name: "Hinge bracket", len: 40, dia: 30 }),
+ fx("screw", hy.flatMap((y) => [y - 22, y + 22].map((yy) => [fx0 + sx * (fw / 2), yy, zr] as Vec3)), [-sx, 0, 0], id("LR"), SCR),
+ ],
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Screw the hinges to the back strip",
+ detail: "Lay the top and the back strip face down, edge to edge. Two hinges, four screws each into the strip.",
+ add: [id("K"), id("T")],
+ fix: [
+ fx("hinge", hingeAt.map((x) => [x, yT, z0] as Vec3), [0, 1, 0], id("K"), { name: "Table hinge", len: 60, dia: 40 }),
+ fx("screw", hingeAt.flatMap((x) => [-18, 18].flatMap((dx) => [z0 - 12, z0 - 30].map((z) => [x + dx, yT, z] as Vec3))), [0, 1, 0], id("K"), SCR),
+ ],
+ tools: ["screwdriver"],
+ warnings: ["floor"],
+ },
+ {
+ title: "Screw the stop block under the top",
+ detail: "Two screws. It sits against the stop pin when the leg frame is swung out.",
+ fix: [
+ fx("clip", [[fx0 - sx * 45, yT, zf - 90]], [0, 1, 0], id("T"), { name: "Stop block", len: 25, dia: 40 }),
+ fx("screw", [-1, 1].map((k) => [fx0 - sx * 45, yT - 25, zf - 90 + k * 10] as Vec3), [0, 1, 0], id("T"), { len: 40, dia: 4 }),
+ ],
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Screw the hinges to the top",
+ detail: "Four screws through each hinge into the top.",
+ fix: [fx("screw", hingeAt.flatMap((x) => [-18, 18].flatMap((dx) => [z0 + 12, z0 + 30].map((z) => [x + dx, yT, z] as Vec3))), [0, 1, 0], id("T"), SCR)],
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Clear the shelf at table height",
+ detail: "If a shelf sits where the table goes, take it out and pull its pins; put it lower, under the table, on its own pins.",
+ },
+ {
+ title: "Hang the leg frame on the front upright",
+ detail: "Hold the frame against the inside of the upright, between holes 2 and 6 from the top of the table, and screw both hinge brackets on.",
+ fix: [fx("screw", hy.flatMap((y) => [y - 22, y + 22].map((yy) => [ux, yy, zr - fd / 2 - 8] as Vec3)), [sx, 0, 0], front, SCR)],
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Hook the support brackets into the uprights",
+ detail: "One on the inside of each upright, at the height of the strip, and a screw in each.",
+ fix: [
+ ...up.map((u, i) => {
+ const x = cx + (i < 2 ? -1 : 1) * xi, z = (i % 2 ? 1 : -1) * zu;
+ return fx("angle", [[x, yT, z]], [i < 2 ? -1 : 1, 0, 0], u, { name: "Support bracket", len: 40, dia: 30 });
+ }),
+ ...up.map((u, i) => fx("screw", [[cx + (i < 2 ? -1 : 1) * xi, yT - 30, (i % 2 ? 1 : -1) * zu]], [i < 2 ? -1 : 1, 0, 0], u, SCR)),
+ ],
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Lay the table on together",
+ detail: "One of you lowers the strip onto the brackets, the other guides the top down onto the leg frame, stop block behind the pin.",
+ people: 2,
+ },
+ {
+ title: "Screw the strip to the brackets",
+ detail: "A sleeve up into each bracket from below and a screw down through the strip into it.",
+ fix: [
+ fx("nut", [-1, 1].flatMap((k) => [-1, 1].map((z) => [cx + k * (xi - 15), yT - 12, z * zu] as Vec3)), [0, 1, 0], id("K"), { name: "Sleeve", len: 12, dia: 8 }),
+ fx("screw", [-1, 1].flatMap((k) => [-1, 1].map((z) => [cx + k * (xi - 15), FTOP, z * zu] as Vec3)), [0, -1, 0], id("K"), SCR),
+ ],
+ tools: ["screwdriver"],
+ },
+ ];
+ const frame = [id("LT"), id("LB"), id("LR"), id("LF")];
+ const fc: Vec3 = [fx0, (15 + yT) / 2, railZ];
+ const moves: Move[] = [
+ { ids: frame, segs: [{ at: steps[0].title, rot: [0, 0, sx * Math.PI / 2], pivot: fc, to: [cx, fw / 2, D / 2 + 1500] }, { at: "Hang the leg frame on the front upright" }] },
+ { ids: [id("K"), id("T")], segs: [{ at: "Screw the hinges to the back strip", rot: [Math.PI, 0, 0], pivot: [cx, FTOP - FT / 2, z0], to: [cx, FT / 2, D / 2 + 800] }, { at: "Lay the table on together" }] },
+ ];
+ return { parts, steps, moves };
+}
+
+/** A side unit 89 x 30 x 179 for a folding table: a bottom shelf, one above the table's height and one at the top. */
+function tableUnit(s: ProductSpec, ys: number[], brace: [number, number]) {
+ const spec = { ...s, size: { w: 89, h: 179, d: 30 } };
+ return sideUnit(spec, { ys, brace });
+}
+
+/** Folding table alone: it hangs on a side unit you already have, drawn here but not in the box. */
+function foldingAlone(s: ProductSpec): Recipe & { moves: Move[] } {
+ const u = tableUnit(s, [110, 1120, 1720], [160, 680]);
+ const t = foldingTable(u.W, u.D, 0, 1, ["U00", "U01", "U10", "U11"]);
+ const parts = [...u.parts.map((p) => ({ ...p, extra: true })), ...t.parts];
+ const steps: CustomStep[] = [
+ { title: "Start from your IVAR side unit", detail: "The table hangs on a side unit 89 cm wide and 30 deep, built and strapped to the wall. It isn't in this box.", add: u.parts.map((p) => p.id) },
+ ...t.steps,
+ ];
+ return { parts, steps, moves: t.moves };
+}
+
+/** Side unit, then the pine cabinet with doors hung in its top half, then the folding table under it. */
+function unitWithTable(s: ProductSpec): Recipe & { moves: Move[]; back: Vec3[] } {
+ const u = tableUnit(s, [110], [160, 680]);
+ const y0 = u.H - 60 - 830;
+ const cab = pineCabinet({ ...s, size: { ...s.size, d: 30 } }, y0, false, "c");
+ const t = foldingTable(u.W, u.D, 0, 1, ["U00", "U01", "U10", "U11"]);
+ const xi = u.W / 2 - UX, zu = u.zUp(1);
+ const SCR = { len: 16, dia: 4 };
+ const ups = ["U00", "U01", "U10", "U11"];
+ const upAt = (i: number) => ({ x: (i < 2 ? -1 : 1) * xi, z: (i % 2 ? 1 : -1) * zu, dir: [i < 2 ? -1 : 1, 0, 0] as Vec3 });
+ const cabSteps = cab.steps.map((st) => (st.pose === "+z" ? { ...st, pose: undefined, detail: "Lay them on a rug in front of the shelving. " + (st.detail ?? "") } : st));
+ const plates = cabSteps.findIndex((st) => st.title.startsWith("Screw the hinge plates"));
+ const mount: CustomStep[] = [
+ {
+ title: "Screw the cabinet brackets to the uprights",
+ detail: "One on the inside of each upright, level with the bottom of the cabinet, a screw in each.",
+ fix: [
+ ...ups.map((id, i) => fx("angle", [[upAt(i).x, y0, upAt(i).z]], upAt(i).dir, id, { name: "Cabinet bracket", len: 30, dia: 30 })),
+ ...ups.map((id, i) => fx("screw", [[upAt(i).x, y0 - 25, upAt(i).z]], upAt(i).dir, id, SCR)),
+ ],
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Lift the cabinet in onto the brackets",
+ detail: "Together, from the front. Then a screw up through each front bracket into the cabinet.",
+ fix: [-1, 1].map((sx) => fx("screw", [[sx * (400 - 9), y0 - 4, zu]], [0, 1, 0], sx < 0 ? "cS0" : "cS1", SCR)),
+ people: 2,
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Fix the top of the cabinet to the back uprights",
+ detail: "A bracket on each back upright at the cabinet's top, screwed to the upright and down into the cabinet.",
+ fix: [
+ ...[0, 2].map((i) => fx("angle", [[upAt(i).x, y0 + 830, upAt(i).z]], upAt(i).dir, ups[i], { name: "Cabinet bracket", len: 30, dia: 30 })),
+ ...[0, 2].map((i) => fx("screw", [[upAt(i).x, y0 + 830 - 25, upAt(i).z]], upAt(i).dir, ups[i], SCR)),
+ ...[-1, 1].map((sx) => fx("screw", [[sx * (400 - 9), y0 + 834, -zu]], [0, -1, 0], sx < 0 ? "cS0" : "cS1", SCR)),
+ ],
+ tools: ["screwdriver"],
+ },
+ ];
+ const steps: CustomStep[] = [...u.steps, ...cabSteps.slice(0, plates + 1), ...mount, ...cabSteps.slice(plates + 1), ...t.steps];
+ const carcass = ["cT", "cB", "cS0", "cS1", "cK"];
+ const cc: Vec3 = [0, y0 + 415, 0];
+ const moves: Move[] = [
+ ...t.moves,
+ {
+ ids: carcass,
+ segs: [
+ { at: cabSteps[0].title, rot: [-Math.PI / 2, 0, 0], pivot: cc, to: [0, 150, u.D / 2 + 600] },
+ { at: cabSteps[plates].title, pivot: cc, to: [0, 415, u.D / 2 + 600] },
+ { at: "Lift the cabinet in onto the brackets" },
+ ],
+ },
+ {
+ ids: ["cD0", "cD1"],
+ segs: [{ at: "Screw the hinges onto the doors", rot: [Math.PI / 2, 0, 0], pivot: [0, y0 + 415, u.D / 2 + FT / 2], to: [0, FT / 2, u.D / 2 + 600] }, { at: "Click the doors onto the hinge plates" }],
+ },
+ ];
+ return { parts: [...u.parts, ...cab.parts, ...t.parts], steps, moves, back: u.back };
+}
+
+/** Two sections on three ladders, 42 and 83 cm shelves, with the folding table in the wide one. */
+function twoSectionsWithTable(s: ProductSpec): Recipe & { moves: Move[]; back: Vec3[] } {
+ const H = 1790, D = 300, W = 1340;
+ const bays = [420, 830];
+ const lx = [-W / 2 + UX / 2, -W / 2 + UX * 1.5 + bays[0], W / 2 - UX / 2]; // ladder centres
+ const ys = rungYs(H);
+ const zUp = (sz: number) => sz * (D / 2 - UZ / 2);
+ const parts: CustomPart[] = [];
+ lx.forEach((x, l) => {
+ [-1, 1].forEach((sz, u) => parts.push(box(`U${l}${u}`, "Upright", [UX, H, UZ], [x, H / 2, zUp(sz)], { material: "wood" })));
+ ys.forEach((y, k) => parts.push(box(`R${l}${k}`, "Rung", [RUNG, 45, D - 2 * UZ], [x, y, 0], { material: "wood" })));
+ });
+ const shelfYs = [[110, 500, 900, 1300, 1720], [110, 1250, 1720]];
+ const shelves: { id: string; bay: number; y: number }[] = [];
+ shelfYs.forEach((list, bay) => list.forEach((y, i) => {
+ const id = `S${bay}${i}`;
+ shelves.push({ id, bay, y });
+ parts.push(box(id, "Shelf", [bays[bay], ST, D], [(lx[bay] + lx[bay + 1]) / 2, y, 0], { material: "wood" }));
+ }));
+ const braceY: [number, number][] = [[940, 1260], [160, 680]];
+ braceY.forEach(([ya, yb], bay) => {
+ const span = lx[bay + 1] - lx[bay], rise = yb - ya, len = Math.hypot(span, rise), ang = Math.atan2(rise, span);
+ const rods: PartPiece[] = [-1, 1].map((k) => ({ shape: "box", size: [len, 4, 4], pos: [0, 0, 0], rot: [0, 0, k * ang] }));
+ parts.push(box(`X${bay}`, "Cross brace", [span, rise, 4], [(lx[bay] + lx[bay + 1]) / 2, (ya + yb) / 2, -D / 2 - 2], { pieces: rods, material: "metal" }));
+ });
+ const out = [-1, -1, 1]; // the face the pegs go in from
+ const pegs = (l: number, u: number) => fx("dowel", ys.map((y) => [lx[l] + out[l] * (UX / 2), y, zUp(u ? 1 : -1)] as Vec3), [-out[l], 0, 0], `U${l}${u}`, { len: PEG.len, dia: PEG.dia });
+ const rungs = (l: number) => ys.map((_, k) => `R${l}${k}`);
+ // one fix per upright face: the custom builder keeps at most 24 fixes a step
+ const pins = [0, 1].flatMap((bay) =>
+ [0, 1].flatMap((side) => [0, 1].map((u) => {
+ const l = bay + side, sx = side ? 1 : -1;
+ const at = shelves.filter((sh) => sh.bay === bay).map((sh) => [lx[l] - sx * (UX / 2), sh.y - ST / 2 - 3, zUp(u ? 1 : -1)] as Vec3);
+ return fx("pin", at, [sx, 0, 0], `U${l}${u}`, { dia: 6 });
+ })),
+ );
+ const ladder = (l: number) => [`U${l}0`, `U${l}1`, ...rungs(l)];
+ const t = foldingTable(bays[1] + 2 * UX, D, (lx[1] + lx[2]) / 2, 1, ["U10", "U11", "U20", "U21"]);
+ const steps: CustomStep[] = [
+ {
+ title: "Knock the rungs into an upright",
+ detail: "Lay the upright on a rug, holes up. Tap each rung's tongue into its slot, with a scrap of wood under the hammer.",
+ add: ["U00", ...rungs(0)],
+ tools: ["hammer"],
+ pose: "+x",
+ warnings: ["floor"],
+ },
+ { title: "Knock the pegs in", detail: "Pointed end first, through the upright and the rung's tongue, until they sit flush.", fix: [pegs(0, 0)], tools: ["hammer"] },
+ { title: "Knock the second upright onto the rungs", detail: "Turn the ladder over first so the pegged upright lies on the rug.", add: ["U01"], tools: ["hammer"] },
+ { title: "Peg the second upright", detail: "The same as the first, one peg at each rung.", fix: [pegs(0, 1)], tools: ["hammer"] },
+ { title: "Build the middle side unit the same way", detail: "Rungs into one upright, pegs, then the second upright and its pegs.", add: ladder(1), fix: [pegs(1, 0), pegs(1, 1)], tools: ["hammer"] },
+ { title: "Build the third side unit the same way", detail: "The last ladder, built the same way.", add: ladder(2), fix: [pegs(2, 0), pegs(2, 1)], tools: ["hammer"], pose: "-x" },
+ {
+ title: "Stand the three side units up and put the shelves in",
+ detail: "Narrow shelves on the left, wide ones on the right. Four pins level for each shelf, then press it down onto them until it clicks.",
+ add: shelves.map((x) => x.id),
+ fix: pins,
+ people: 2,
+ pose: "+y",
+ warnings: ["two"],
+ },
+ {
+ title: "Screw on the cross braces",
+ detail: "One across the back of each section, a screw into the back upright at each of its four ends.",
+ add: ["X0", "X1"],
+ fix: braceY.map(([ya, yb], bay) => fx("screw", [bay, bay + 1].flatMap((l) => [ya, yb].map((y) => [lx[l], y, -D / 2 - 3] as Vec3)), [0, 0, 1], `X${bay}`, { len: 16, dia: 4 })),
+ tools: ["screwdriver"],
+ people: 2,
+ check: "square",
+ },
+ ...t.steps,
+ ];
+ const moves: Move[] = [...t.moves, { ids: ladder(1), segs: [{ at: "Build the middle side unit the same way", to: [lx[0] - lx[1], 0, 700] }, { at: "Stand the three side units up and put the shelves in" }] }];
+ return { parts: [...parts, ...t.parts], steps, moves, back: [0, 1, 2].map((l) => parts.find((p) => p.id === `U${l}0`)!.pos) };
+}
+
/* ---------------- which guide is which ---------------- */
const MESH = /ivar-cabinet-doors-(80-x-83|160-x-30-x-83)/;
@@ -985,8 +1337,9 @@ const SLIDING = /ivar-cabinet-sliding-doors-/;
const BOX_SHELF = /ivar-box-shelf-divider-/;
const BOX_UNIT = /ivar-shelving-unit-storage-box-/;
-function run(b: PlanBuilder, s: ProductSpec, r: Recipe & { back?: Vec3[] }) {
+function run(b: PlanBuilder, s: ProductSpec, r: Recipe & { back?: Vec3[]; moves?: Move[] }) {
buildCustom(b, { ...s, custom: { parts: r.parts, steps: r.steps } });
+ if (r.moves) restage(b, r.parts, r.moves);
if (r.back) strapStep(b, s, r.back);
return true;
}
@@ -1004,6 +1357,9 @@ const family: Family = {
if (SLIDING.test(slug)) return run(b, s, slidingCabinet(s));
if (BOX_SHELF.test(slug)) return run(b, s, boxShelf(s));
if (BOX_UNIT.test(slug)) return run(b, s, boxUnit(s));
+ if (slug === "ivar-folding-table-80-x-30-91") return run(b, s, foldingAlone(s));
+ if (slug === "ivar-1-sec-storage-unit-w-foldable-table-89-x-30") return run(b, s, unitWithTable(s));
+ if (slug === "ivar-2-sec-storage-unit-w-foldable-table-134-x-9") return run(b, s, twoSectionsWithTable(s));
if (s.archetype !== "shelf" || s.shelf?.style !== "bookcase") return false;
const u = sideUnit(s);
return run(b, s, { parts: u.parts, steps: u.steps, back: u.back });
diff --git a/src/lib/plan/families/kallax.ts b/src/lib/plan/families/kallax.ts
index 1a48611..549fa5b 100644
--- a/src/lib/plan/families/kallax.ts
+++ b/src/lib/plan/families/kallax.ts
@@ -343,13 +343,16 @@ function underframeSteps(b: PlanBuilder, g: Grid) {
}
/** Inserts with a door, from their own manual: the folded insert into its cube, hinge plates, door on its hinges, knob. */
-function insertRecipe(g: Grid, n: number): CustomParams {
+function insertRecipe(g: Grid, n: number, bottomUp = false): CustomParams {
const { W, H, D, U, T, ti, cols, rows } = g;
const cw = (W - 2 * T - (cols - 1) * ti) / cols, ch = (H - 2 * T - (rows - 1) * ti) / rows;
const cx = (c: number) => -W / 2 + T + c * (cw + ti) + cw / 2;
const cy = (r: number) => U + H - T - r * (ch + ti) - ch / 2; // r from the top
// the middle rows fill first, as in IKEA's photos
- const order = Array.from({ length: rows }, (_, r) => r).sort((a, b) => Math.abs(a - (rows - 1) / 2) - Math.abs(b - (rows - 1) / 2) || a - b);
+ // (the unit sold "with doors" has them in the bottom row)
+ const order = bottomUp
+ ? Array.from({ length: rows }, (_, r) => rows - 1 - r)
+ : Array.from({ length: rows }, (_, r) => r).sort((a, b) => Math.abs(a - (rows - 1) / 2) - Math.abs(b - (rows - 1) / 2) || a - b);
const cells = order.flatMap((r) => Array.from({ length: cols }, (_, c) => [c, r] as const)).slice(0, n);
const wt = 8, dt = 16;
const bd = D - dt - 2;
@@ -591,6 +594,145 @@ function deskRecipe(s: ProductSpec): CustomParams {
return { parts, steps };
}
+/**
+ * The TV bench, from its own manual: two big cubes over four small ones. Built lying on its back like the frames: the
+ * bottom bolted to one side, three small dividers on dowels, the long shelf, two long dowels through it for the top
+ * divider, the top (with its wall brackets already screwed under it) and the last side. With an underframe it is
+ * turned upside down for the underframe's manual instead of getting its felt pads.
+ */
+function tvBench(s: ProductSpec): { recipe: CustomParams; grid: Grid } {
+ const U = /underframe/i.test(s.variant) ? s.size.h * 10 - 596 : 0;
+ const W = s.size.w * 10, H = s.size.h * 10 - U, D = s.size.d * 10;
+ const T = 40, ti = 16;
+ const cw = (W - 2 * T - 3 * ti) / 4; // the small cubes are square
+ const yB = U + T, yS = yB + cw + ti / 2, yT = U + H - T; // inside of the bottom, middle of the shelf, underside of the top
+ const vx = (c: number) => -W / 2 + T + c * cw + (c - 1) * ti + ti / 2;
+ const parts: CustomPart[] = [
+ { id: "B", name: "Top and bottom", size: [W, T, D], pos: [0, U + T / 2, 0] },
+ { id: "TP", name: "Top and bottom", size: [W, T, D], pos: [0, U + H - T / 2, 0] },
+ { id: "SL", name: "Side panel", size: [T, H - 2 * T, D], pos: [-W / 2 + T / 2, U + H / 2, 0] },
+ { id: "SR", name: "Side panel", size: [T, H - 2 * T, D], pos: [W / 2 - T / 2, U + H / 2, 0] },
+ ...[1, 2, 3].map((c): CustomPart => ({ id: `V${c}`, name: "Small divider", size: [ti, cw, D], pos: [vx(c), yB + cw / 2, 0] })),
+ { id: "SH", name: "Long shelf", size: [W - 2 * T, ti, D], pos: [0, yS, 0] },
+ { id: "VU", name: "Top divider", size: [ti, yT - yS - ti / 2, D], pos: [0, (yS + ti / 2 + yT) / 2, 0] },
+ ];
+ for (const p of parts) p.material = "board";
+ const zs = D / 2 - 75;
+ const pair = (x: number, y: number): Vec3[] => [[x, y, -zs], [x, y, zs]];
+ const fx = (kind: CustomFix["kind"], on: string, dir: Vec3, at: Vec3[], o: Partial<CustomFix> = {}): CustomFix => ({ kind, count: at.length, on, dir, at, ...o });
+ const bolt = { len: BOLT.len, dia: BOLT.dia };
+ const xL = -W / 2 + T / 2, xR = W / 2 - T / 2;
+ const brackets: Vec3[] = [-1, 1].map((sx) => [sx * (W / 2 - T - 60), yT, -D / 2 + 16]);
+ const steps: CustomStep[] = [
+ {
+ title: "Bolt the bottom to a side",
+ detail: "Lay both on a rug on their long edges, holes facing in. Turn the two bolts in with the Allen key, not too tight yet.",
+ add: ["B", "SL"],
+ fix: [fx("bolt", "B", [0, 1, 0], pair(xL, U), { mate: "SL", ...bolt })],
+ tools: ["allen"],
+ pose: "+z",
+ warnings: ["floor"],
+ },
+ {
+ title: "Tap dowels into the four dividers",
+ detail: "Two short dowels into one end of each. Keep the two long dowels for later.",
+ fix: [
+ ...[1, 2, 3].map((c) => fx("dowel", `V${c}`, [0, -1, 0], pair(vx(c), yB), { mate: "B" })),
+ fx("dowel", "VU", [0, 1, 0], pair(0, yT), { mate: "TP" }),
+ ],
+ wait: ["V1", "V2", "V3", "VU"],
+ tools: ["hammer"],
+ },
+ { title: "Push the three small dividers onto the bottom", detail: "Dowel ends into the holes in the bottom, evenly spaced.", add: ["V1", "V2", "V3"] },
+ {
+ title: "Tap dowels into the two outer dividers",
+ detail: "Two in the free end of each. The middle one stays plain: it gets the long dowels.",
+ fix: [1, 3].map((c) => fx("dowel", `V${c}`, [0, 1, 0], pair(vx(c), yS - ti / 2), { mate: "SH" })),
+ tools: ["hammer"],
+ },
+ {
+ title: "Tap dowels into the ends of the long shelf",
+ detail: "Two short dowels in each end.",
+ fix: [fx("dowel", "SH", [-1, 0, 0], pair(-W / 2 + T, yS), { mate: "SL" }), fx("dowel", "SH", [1, 0, 0], pair(W / 2 - T, yS), { mate: "SR" })],
+ wait: ["SH"],
+ tools: ["hammer"],
+ },
+ {
+ title: "Fit the long shelf",
+ detail: "Its end goes into the side first, then swing it down onto the dividers' dowels.",
+ add: ["SH"],
+ from: { SH: [360, 360, 0] },
+ },
+ {
+ title: "Tap the two long dowels through the shelf",
+ detail: "In the middle, over the plain divider. They go right through into its end.",
+ fix: [fx("dowel", "SH", [0, 1, 0], pair(0, yS + ti / 2), { mate: "VU", len: 60, name: "Long dowel" })],
+ tools: ["hammer"],
+ },
+ { title: "Push the top divider onto the long dowels", detail: "Plain end first, dowelled end out.", add: ["VU"] },
+ {
+ title: "Screw the wall brackets onto the top",
+ detail: "Lay the top beside the frame. One bracket at each end of the back edge, two screws in each.",
+ fix: [
+ fx("bracket", "TP", [0, 1, 0], brackets, { len: 60, dia: 40 }),
+ fx("screw", "TP", [0, 1, 0], brackets.flatMap(([x, y, z]) => [[x - 12, y, z + 10], [x + 12, y, z + 10]] as Vec3[]), { len: 14, dia: 3.5 }),
+ ],
+ wait: ["TP"],
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Bolt on the top",
+ detail: "Press it onto the top divider's dowels, then two bolts into the first side.",
+ add: ["TP"],
+ fix: [fx("bolt", "TP", [0, -1, 0], pair(xL, U + H), { mate: "SL", ...bolt })],
+ tools: ["allen"],
+ },
+ {
+ title: "Bolt on the other side",
+ detail: "Onto the shelf's dowels, then four bolts through the top and the bottom. Tighten all the bolts now.",
+ add: ["SR"],
+ fix: [fx("bolt", "TP", [0, -1, 0], pair(xR, U + H), { mate: "SR", ...bolt }), fx("bolt", "B", [0, 1, 0], pair(xR, U), { mate: "SR", ...bolt })],
+ tools: ["allen"],
+ check: "square",
+ },
+ ];
+ if (!U) {
+ const pads: Vec3[] = [-D / 2 + 40, D / 2 - 40].flatMap((z) => [-W / 2 + 40, 0, W / 2 - 40].map((x) => [x, 0, z] as Vec3));
+ steps.push({ title: "Stick the felt pads under it", detail: "Turn it over and press six pads on: three along the front, three along the back.", fix: [fx("glide", "B", [0, 1, 0], pads, { len: PAD.len, dia: PAD.dia })], pose: "-y" });
+ steps.push({ title: "Stand it up together", detail: "Lift it upright between two of you, don't pull it up by one end.", pose: "+y", people: 2, warnings: ["two"] });
+ } else steps.push({ title: "Turn it upside down", detail: "On the rug, so the bottom faces up for the underframe.", pose: "-y" });
+ const grid: Grid = { W, H, D, U, T, ti, cols: 4, rows: 2, lying: true, ct: 2, rt: 4, Wt: H, Ht: W, pattern: "big" };
+ return { recipe: { parts, steps }, grid };
+}
+
+/** The TV bench's wall fixing: mark through the brackets, two screws in the wall, the wall plates hooked on, covers. */
+function benchWall(b: PlanBuilder, g: Grid, topPos: Vec3) {
+ const top = keyAt(b, topPos);
+ if (!top) return;
+ const yTop = g.U + g.H - g.T, backZ = -g.D / 2;
+ const xs = [-1, 1].map((sx) => sx * (g.W / 2 - g.T - 60));
+ b.step(
+ {
+ title: "Fix it to the wall",
+ detail: "Mark through the brackets with it in place, then two screws in the wall. Hook the plates on, adjust them and snap the covers on. Wall screws aren't included: pick ones made for your wall.",
+ tools: ["screwdriver", "drill", "pencil", "level"],
+ kind: "anchor",
+ wall: true,
+ warnings: ["wall", "tip"],
+ },
+ () => {
+ b.stagger(0.1);
+ for (const x of xs) b.fit(HW.plug, { at: [x, yTop - 30, backZ], dir: [0, 0, -1] });
+ b.then(0.05);
+ for (const x of xs) b.fit(HW.wallScrew, { at: [x, yTop - 30, backZ + 2], dir: [0, 0, -1] });
+ b.then(0.1);
+ for (const x of xs) b.fit({ kind: "clip", len: 4, dia: 30, name: "Wall plate" }, { on: top, at: [x, yTop - 30, backZ + 8], dir: [0, 0, -1], hole: false });
+ b.then(0.1);
+ for (const x of xs) b.fit(COVER, { on: top, at: [x, yTop - 30, backZ + 40], dir: [0, 0, -1], hole: false });
+ },
+ );
+}
+
const family: Family = {
names: ["KALLAX"],
build(b, s) {
@@ -598,14 +740,22 @@ const family: Family = {
buildCustom(b, { ...s, custom: deskRecipe(s) });
return true;
}
+ if (/^kallax-tv-bench/.test(s.slug ?? "")) {
+ const { recipe, grid } = tvBench(s);
+ buildCustom(b, { ...s, custom: recipe });
+ if (grid.U) underframeSteps(b, grid);
+ benchWall(b, grid, recipe.parts.find((p) => p.id === "TP")!.pos);
+ return true;
+ }
const g = gridOf(s);
if (!g) return false;
const { recipe, topId } = frameRecipe(s, g);
buildCustom(b, { ...s, custom: recipe });
if (g.U) underframeSteps(b, g);
wallStep(b, g, recipe.parts.find((p) => p.id === topId)!.pos);
- const n = Math.round(s.shelf?.inserts ?? 0);
- if (n > 0) buildCustom(b, { ...s, custom: insertRecipe(g, Math.min(n, g.cols * g.rows)) });
+ const doors = /with doors/i.test(s.variant);
+ const n = Math.round(s.shelf?.inserts ?? (doors ? 2 : 0));
+ if (n > 0) buildCustom(b, { ...s, custom: insertRecipe(g, Math.min(n, g.cols * g.rows), doors) });
return true;
},
};
diff --git a/src/lib/plan/families/kloven.ts b/src/lib/plan/families/kloven.ts
new file mode 100644
index 0000000..12f8c04
--- /dev/null
+++ b/src/lib/plan/families/kloven.ts
@@ -0,0 +1,207 @@
+import type { Family } from "./family";
+import type { CustomParams, CustomPart, CustomStep, PartPiece, Vec3 } from "../../types";
+
+/**
+ * KLÖVEN deck chair, read from its manual. It comes as five pieces: the seat (two sloping runners, the front rail and
+ * the seat slats, already joined), the two front legs, the back (its slats on two cross bars, the upper one ending in
+ * the arm supports) and the two armrests. Glides go under the runners and legs first. With the seat on its side, each
+ * leg goes on over two dowels and is bolted through into barrel nuts in the front rail. Stood up, the back is bolted
+ * down onto the runners, the armrests go over a dowel on each arm support and are screwed from below, and an angle
+ * bracket under each armrest holds it to the top of its leg.
+ */
+
+const SLOPE = 0.3217; // the runners fall about 18 degrees from the front to the floor at the back
+const LEAN = 0.38; // the back leans back about 22 degrees
+const RC: [number, number] = [175, -25]; // runner centre (y, z)
+const RX = 290, RT = 24, RH = 90, RL = 800;
+const cs = Math.cos(SLOPE), sn = Math.sin(SLOPE);
+/** A point on a runner in its own frame (height across it, distance along it) to the chair's (y, z). */
+const onRunner = (yl: number, t: number): [number, number] => [RC[0] + yl * cs + t * sn, RC[1] - yl * sn + t * cs];
+const SLANT: Vec3 = [-SLOPE, 0, 0];
+const DOWN_RUNNER: Vec3 = [0, -cs, sn]; // straight into the runner's top edge
+
+const LEG = { x: RX + RT / 2 + 12, z: 300, d: 80, h: 600 };
+const ARM = { x: 330, w: 130, t: 20, y: 600, z0: -340, z1: 400 };
+const APRON = { z: 320, y: 290, h: 110, t: 22 };
+
+/** A part from pieces placed in the finished chair, centred on their bounds (rotated boxes counted by their corners). */
+function compound(id: string, name: string, pieces: PartPiece[], material: CustomPart["material"]): CustomPart {
+ const lo: Vec3 = [Infinity, Infinity, Infinity], hi: Vec3 = [-Infinity, -Infinity, -Infinity];
+ for (const p of pieces) {
+ const a = -(p.rot?.[0] ?? 0);
+ for (const sx of [-1, 1])
+ for (const sy of [-1, 1])
+ for (const sz of [-1, 1]) {
+ const y = (sy * p.size[1]) / 2, z = (sz * p.size[2]) / 2;
+ const q: Vec3 = [p.pos[0] + (sx * p.size[0]) / 2, p.pos[1] + y * Math.cos(a) + z * Math.sin(a), p.pos[2] - y * Math.sin(a) + z * Math.cos(a)];
+ for (let i = 0; i < 3; i++) {
+ lo[i] = Math.min(lo[i], q[i]);
+ hi[i] = Math.max(hi[i], q[i]);
+ }
+ }
+ }
+ const pos: Vec3 = [(lo[0] + hi[0]) / 2, (lo[1] + hi[1]) / 2, (lo[2] + hi[2]) / 2];
+ const size: Vec3 = [hi[0] - lo[0], hi[1] - lo[1], hi[2] - lo[2]];
+ return { id, name, size, pos, material, pieces: pieces.map((p) => ({ ...p, pos: [p.pos[0] - pos[0], p.pos[1] - pos[1], p.pos[2] - pos[2]] })) };
+}
+
+function seat(): CustomPart {
+ const pieces: PartPiece[] = [];
+ for (const sx of [-1, 1]) pieces.push({ shape: "box", size: [RT, RH, RL], pos: [sx * RX, RC[0], RC[1]], rot: SLANT, material: "wood" });
+ pieces.push({ shape: "box", size: [2 * RX - RT, APRON.h, APRON.t], pos: [0, APRON.y, APRON.z], material: "wood" });
+ // the seat slats lie across the runners' top edges
+ for (const t of [340, 256, 172, 88, 4]) {
+ const [y, z] = onRunner(RH / 2 + 9, t);
+ pieces.push({ shape: "box", size: [2 * RX + RT, 18, 70], pos: [0, y, z], rot: SLANT, material: "wood" });
+ }
+ return compound("S", "Seat", pieces, "wood");
+}
+
+const BAR_T = -120; // where the back's lower bar sits along the runners
+function back(): { part: CustomPart; bolts: Vec3[]; support: number } {
+ const pieces: PartPiece[] = [];
+ const [by, bz] = onRunner(RH / 2 + 20, BAR_T);
+ pieces.push({ shape: "box", size: [2 * RX + RT, 40, 70], pos: [0, by, bz], rot: SLANT, material: "wood" });
+ // five slats stand on the lower bar, leaning back, the middle one tallest for the rounded top
+ const tl = Math.tan(LEAN);
+ const y0 = by - 10, z0 = bz + 45;
+ const lens = [690, 725, 742, 725, 690];
+ lens.forEach((len, i) => {
+ const h = len * Math.cos(LEAN);
+ pieces.push({ shape: "box", size: [95, len, 20], pos: [(i - 2) * 110, y0 + h / 2, z0 - (h / 2) * tl], rot: [-LEAN, 0, 0], material: "wood" });
+ });
+ // the upper bar runs behind the slats and ends in the two arm supports under the armrests
+ const ys = ARM.y - 20;
+ const zs = z0 - (ys - y0) * tl - 10 / Math.cos(LEAN) - 22;
+ pieces.push({ shape: "box", size: [2 * ARM.x - ARM.w, 40, 40], pos: [0, ys, zs], material: "wood" });
+ for (const sx of [-1, 1]) pieces.push({ shape: "box", size: [ARM.w, 40, 90], pos: [sx * ARM.x, ys, zs], material: "wood" });
+ const bolts: Vec3[] = [];
+ for (const sx of [-1, 1])
+ for (const dt of [-20, 20]) {
+ const [y, z] = onRunner(RH / 2 + 40, BAR_T + dt);
+ bolts.push([sx * RX, y, z]);
+ }
+ return { part: compound("B", "Back", pieces, "wood"), bolts, support: zs };
+}
+
+function chair(): CustomParams {
+ const S = seat();
+ const { part: B, bolts, support } = back();
+ const legs = [-1, 1].map((sx, i): CustomPart => ({ id: `L${i + 1}`, name: "Front leg", size: [RT, LEG.h, LEG.d], pos: [sx * LEG.x, LEG.h / 2, LEG.z], material: "wood" }));
+ const arms = [-1, 1].map(
+ (sx, i): CustomPart => ({ id: `A${i + 1}`, name: "Armrest", size: [ARM.w, ARM.t, ARM.z1 - ARM.z0], pos: [sx * ARM.x, ARM.y + ARM.t / 2, (ARM.z0 + ARM.z1) / 2], material: "wood" }),
+ );
+ const parts = [S, ...legs, B, ...arms];
+ const [ry, rz] = onRunner(-RH / 2, -RL / 2 + 30);
+ const glides: Vec3[] = [
+ [-RX, ry, rz],
+ [RX, ry, rz],
+ [-LEG.x, 0, LEG.z],
+ [LEG.x, 0, LEG.z],
+ ];
+ const outer = RX + RT / 2;
+ const dowelZ = LEG.z - 25;
+ const dowels = (sx: number): Vec3[] => [-18, 18].map((dy): Vec3 => [sx * outer, onRunner(0, (dowelZ - RC[1]) / cs)[0] + dy, dowelZ]);
+ const legBolts = (sx: number): Vec3[] => [APRON.y - 28, APRON.y + 28].map((y): Vec3 => [sx * (outer + RT), y, APRON.z]);
+ const nuts = (sx: number): Vec3[] => [APRON.y - 28, APRON.y + 28].map((y): Vec3 => [sx * (RX - RT / 2 - 40), y, APRON.z - APRON.t / 2]);
+ const legStep = (i: number, sx: number, other: boolean): CustomStep => ({
+ title: other ? "Bolt on the other leg" : "Bolt the leg onto the dowels",
+ detail: "Turn a barrel nut into the hole in the back of the front rail, slot showing, so the long bolt can catch it. Tighten with the Allen key.",
+ add: [`L${i}`],
+ from: { [`L${i}`]: [sx * 260, 0, 0] },
+ fix: [
+ { kind: "nut", name: "Barrel nut", count: 2, len: 14, dia: 10, at: nuts(sx), dir: [0, 0, 1], on: "S" },
+ { kind: "bolt", count: 2, len: 100, dia: 6, at: legBolts(sx), dir: [-sx, 0, 0], on: `L${i}`, mate: "S" },
+ ],
+ tools: ["allen"],
+ });
+ const steps: CustomStep[] = [
+ {
+ title: "Tap the glides under the runners and legs",
+ detail: "One at the back end of each runner and one at the foot of each leg. Tap their pins in gently with a hammer.",
+ add: ["S"],
+ wait: ["L1", "L2"],
+ fix: [
+ { kind: "glide", name: "Glide", count: 2, len: 6, dia: 30, at: glides.slice(0, 2), dir: [0, 1, 0], on: "S" },
+ { kind: "glide", name: "Glide", count: 1, len: 6, dia: 30, at: [glides[2]], dir: [0, 1, 0], on: "L1" },
+ { kind: "glide", name: "Glide", count: 1, len: 6, dia: 30, at: [glides[3]], dir: [0, 1, 0], on: "L2" },
+ ],
+ tools: ["hammer"],
+ warnings: ["floor"],
+ },
+ {
+ title: "Lay the seat on its side and tap in two dowels",
+ detail: "On a rug, so the slats don't scratch. The dowels go into the side of the runner by the front rail.",
+ pose: "+x",
+ fix: [{ kind: "dowel", count: 2, len: 30, dia: 8, at: dowels(1), dir: [-1, 0, 0], on: "S", mate: "L2" }],
+ tools: ["hammer"],
+ warnings: ["floor"],
+ },
+ legStep(2, 1, false),
+ {
+ title: "Turn it over and tap in two more dowels",
+ detail: "The same place on the other runner.",
+ pose: "-x",
+ fix: [{ kind: "dowel", count: 2, len: 30, dia: 8, at: dowels(-1), dir: [1, 0, 0], on: "S", mate: "L1" }],
+ tools: ["hammer"],
+ },
+ legStep(1, -1, true),
+ {
+ title: "Stand it up and bolt the back onto the runners",
+ detail: "Set the bar at the foot of the back on the runners behind the seat. Two bolts on each side, into the runners.",
+ pose: "+y",
+ add: ["B"],
+ from: { B: [0, 260, -120] },
+ fix: [{ kind: "bolt", count: 4, len: 60, dia: 6, at: bolts, dir: DOWN_RUNNER, on: "B", mate: "S" }],
+ tools: ["allen"],
+ },
+ {
+ title: "Tap a dowel into each arm support",
+ detail: "Into the middle hole on top of the blocks that stick out from the back.",
+ fix: [{ kind: "dowel", count: 2, len: 30, dia: 8, at: [-1, 1].map((sx): Vec3 => [sx * ARM.x, ARM.y, support]), on: "B", mate: "A1" }],
+ tools: ["hammer"],
+ },
+ {
+ title: "Screw the armrests onto the arm supports",
+ detail: "Lay each armrest over its dowel and the top of its leg, then drive two screws up through the support into it.",
+ add: ["A1", "A2"],
+ fix: [
+ {
+ kind: "screw",
+ count: 4,
+ len: 45,
+ dia: 5,
+ at: [-1, 1].flatMap((sx) => [-25, 25].map((dx): Vec3 => [sx * ARM.x + dx, ARM.y - 40, support])),
+ dir: [0, 1, 0],
+ on: "B",
+ },
+ ],
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Screw an angle bracket inside each leg",
+ detail: "Its long side flat against the leg, the short one under the armrest. Check the bracket faces the right way before you screw.",
+ fix: [-1, 1].flatMap((sx, i) => [
+ { kind: "angle" as const, count: 1, len: 40, dia: 30, at: [[sx * (outer + 1), ARM.y - 22, LEG.z] as Vec3], dir: [0, 1, 0] as Vec3, on: `L${i + 1}` },
+ { kind: "screw" as const, count: 1, len: 16, dia: 4, at: [[sx * (outer - 2), ARM.y - 30, LEG.z] as Vec3], dir: [sx, 0, 0] as Vec3, on: `L${i + 1}` },
+ ]),
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Screw the brackets up into the armrests",
+ detail: "One screw each. Then check every bolt is tight and the chair stands steady.",
+ fix: [-1, 1].map((sx, i) => ({ kind: "screw" as const, count: 1, len: 16, dia: 4, at: [[sx * (outer - 12), ARM.y - 3, LEG.z] as Vec3], dir: [0, 1, 0] as Vec3, mate: `A${i + 1}` })),
+ tools: ["screwdriver"],
+ },
+ ];
+ return { parts, steps };
+}
+
+const family: Family = {
+ names: ["KLÖVEN"],
+ recipe(s) {
+ if (!/deck chair/i.test(s.variant) && !/deck-chair/.test(s.slug ?? "")) return null;
+ return chair();
+ },
+};
+export default family;
diff --git a/src/lib/plan/families/kvistbro.ts b/src/lib/plan/families/kvistbro.ts
new file mode 100644
index 0000000..ae215eb
--- /dev/null
+++ b/src/lib/plan/families/kvistbro.ts
@@ -0,0 +1,75 @@
+import type { Family } from "./family";
+import type { CustomParams, CustomPart, PartPiece, ProductSpec, Vec3 } from "../../types";
+
+/**
+ * KVISTBRO storage table, read from its manual: a round steel wire basket, wider at the top, and a loose lid. The
+ * basket is turned upside down and four felt pads are stuck under its bottom ring, then it is turned over and the
+ * lid laid on. IKEA: 44 across, 42 high.
+ */
+
+/** Euler angles (x then z) that turn a part's y axis onto d. */
+function along(d: Vec3): Vec3 {
+ const n = Math.hypot(...d);
+ const [x, y, z] = [d[0] / n, d[1] / n, d[2] / n];
+ return [Math.atan2(z, y), 0, Math.atan2(-x, Math.hypot(y, z))];
+}
+
+/** A wire from a to b, as a piece placed from the part's centre c. */
+function wire(a: Vec3, b: Vec3, c: Vec3, dia = 6): PartPiece {
+ const d: Vec3 = [b[0] - a[0], b[1] - a[1], b[2] - a[2]];
+ return { shape: "cyl", size: [dia, Math.hypot(...d), dia], pos: [(a[0] + b[0]) / 2 - c[0], (a[1] + b[1]) / 2 - c[1], (a[2] + b[2]) / 2 - c[2]], rot: along(d) };
+}
+
+const at = (r: number, t: number, y: number): Vec3 => [r * Math.cos(t), y, r * Math.sin(t)];
+
+/** A ring of wire, as short straight pieces. */
+function ring(r: number, y: number, c: Vec3, n = 28, dia = 6): PartPiece[] {
+ return Array.from({ length: n }, (_, k) => wire(at(r, (2 * Math.PI * k) / n, y), at(r, (2 * Math.PI * (k + 1)) / n, y), c, dia));
+}
+
+function recipe(s: ProductSpec): CustomParams {
+ const D = Math.round(s.size.w * 10) || 440, H = Math.round(s.size.h * 10) || 420;
+ const LT = 18; // lid
+ const HB = H - LT; // basket
+ const rT = D / 2 - 8, rB = rT * 0.76; // the basket tapers to its foot
+ const c: Vec3 = [0, HB / 2, 0];
+ const rAt = (y: number) => rB + ((rT - rB) * y) / HB;
+ const pieces: PartPiece[] = [...ring(rT, HB - 4, c, 32, 8), ...ring(rB, 4, c, 28, 8), ...ring(rAt(HB * 0.18), HB * 0.18, c, 28, 4)];
+ // the diamond mesh: wires leaning both ways round the basket
+ const n = 18;
+ for (let k = 0; k < n; k++)
+ for (const g of [-1, 1]) {
+ const t0 = (2 * Math.PI * k) / n;
+ pieces.push(wire(at(rB, t0, 4), at(rT, t0 + (g * 2 * Math.PI) / n * 1.5, HB - 4), c, 4));
+ }
+ // the floor: a small ring in the middle and spokes out to the foot ring
+ pieces.push(...ring(60, 6, c, 14, 5));
+ for (let k = 0; k < 8; k++) pieces.push(wire(at(60, (Math.PI * k) / 4, 6), at(rB, (Math.PI * k) / 4, 6), c, 4));
+ const parts: CustomPart[] = [
+ { id: "B", name: "Basket", size: [2 * rT + 8, HB, 2 * rT + 8], pos: c, material: "metal", pieces },
+ { id: "L", name: "Lid", size: [D, LT, D], pos: [0, HB + LT / 2, 0], shape: "cyl", material: "board" },
+ ];
+ const pads: Vec3[] = [0, 1, 2, 3].map((k) => at(rB, Math.PI / 4 + (Math.PI * k) / 2, 0));
+ return {
+ parts,
+ steps: [
+ {
+ title: "Stick the felt pads under the basket",
+ detail: "Turn the basket upside down. Peel off four pads and press one onto the bottom ring at each quarter.",
+ add: ["B"],
+ fix: [{ kind: "glide", count: 4, at: pads, dir: [0, 1, 0], on: "B", len: 3, dia: 20 }],
+ pose: "-y",
+ },
+ { title: "Turn it over and lay the lid on", detail: "The lid just rests in the top ring. Lift it by the slot to get inside.", add: ["L"], from: { L: [0, 220, 0] }, pose: "+y" },
+ ],
+ };
+}
+
+const family: Family = {
+ names: ["KVISTBRO"],
+ recipe(s) {
+ if (!/storage table/i.test(s.variant)) return null;
+ return recipe(s);
+ },
+};
+export default family;
diff --git a/src/lib/plan/families/langdhopp.ts b/src/lib/plan/families/langdhopp.ts
new file mode 100644
index 0000000..e3f5e52
--- /dev/null
+++ b/src/lib/plan/families/langdhopp.ts
@@ -0,0 +1,120 @@
+import type { Family } from "./family";
+import type { CustomFix, CustomParams, CustomPart, ProductSpec, Vec3 } from "../../types";
+
+/**
+ * LÄNGDHOPP pull-out desk, from its manual. Everything is built upside down on a rug. The sides get their glides,
+ * cam bolts and runners, the back rail slides onto one side and the other side goes on, both locked with cams. Dowels
+ * and cam bolts go into the sides and the top, and the frame is lowered onto the top. The pull-out desk's two legs
+ * take their plates, are bolted under its board and get castors, then it slides in on the runners and is screwed to
+ * them. Stood up, the lower desk pulls out in front.
+ */
+
+const fx = (kind: CustomFix["kind"], at: Vec3[], dir: Vec3, on: string, o: Partial<CustomFix> = {}): CustomFix => ({ kind, count: at.length, at, dir, on, ...o });
+
+function recipe(_s: ProductSpec): CustomParams {
+ // IKEA: 90 wide, 39 deep (71 pulled out), 87 high; the pull-out desk is 75 high
+ const W = 900, D = 390, H = 870;
+ const t = 18, sx = W / 2 - t / 2, ix = W / 2 - t; // the sides, their inner faces
+ const top = H - t;
+ const railH = 100, ry = top - railH / 2, rz = -D / 2 + t / 2;
+ const RW = 13, runY = 715, rx = ix - RW / 2; // runners on the sides' inner faces
+ const pw = 2 * (ix - RW), pd = D - 20, py = 741, pz = -10; // the pull-out board, its top at 75 cm
+ const L = 30, wheel = 50, lx = pw / 2 - 30, lz = pz + pd / 2 - 25, lTop = py - t / 2;
+ const parts: CustomPart[] = [
+ { id: "SL", name: "Side panel", size: [t, top, D], pos: [-sx, top / 2, 0], material: "board" },
+ { id: "SR", name: "Side panel", size: [t, top, D], pos: [sx, top / 2, 0], material: "board" },
+ { id: "RL", name: "Runner", size: [RW, 35, D - 40], pos: [-rx, runY, 0], material: "metal" },
+ { id: "RR", name: "Runner", size: [RW, 35, D - 40], pos: [rx, runY, 0], material: "metal" },
+ { id: "BR", name: "Back rail", size: [2 * ix, railH, t], pos: [0, ry, rz], material: "board" },
+ { id: "TOP", name: "Top", size: [W, t, D], pos: [0, H - t / 2, 0], material: "board" },
+ { id: "PB", name: "Pull-out board", size: [pw, t, pd], pos: [0, py, pz], material: "board" },
+ { id: "LL", name: "Leg", size: [L, lTop - wheel, L], pos: [-lx, (lTop + wheel) / 2, lz], material: "metal" },
+ { id: "LR", name: "Leg", size: [L, lTop - wheel, L], pos: [lx, (lTop + wheel) / 2, lz], material: "metal" },
+ ];
+ const side = (g: number) => (g < 0 ? "SL" : "SR");
+ const railCams = (g: number): Vec3[] => [ry - 30, ry + 30].map((y): Vec3 => [g * (ix - 34), y, rz + t / 2]);
+ const topZ = [-110, 110];
+ const out = { from: { PB: [0, 0, 600] as Vec3, LL: [0, 0, 600] as Vec3, LR: [0, 0, 600] as Vec3 } };
+ return {
+ parts,
+ steps: [
+ {
+ title: "Press the glides into the sides",
+ detail: "Lay both sides on a rug, inside up. Two glides into the holes in each side's bottom edge.",
+ add: ["SL", "SR"],
+ fix: [-1, 1].map((g) => fx("glide", [-120, 120].map((z): Vec3 => [g * sx, 0, z]), [0, 1, 0], side(g))),
+ pose: "-y",
+ warnings: ["floor"],
+ wait: ["SR"],
+ },
+ {
+ title: "Screw in the cam bolts for the back rail",
+ detail: "Two in each side, by hand or with a screwdriver, until they stop.",
+ fix: [-1, 1].map((g) => fx("camScrew", [ry - 30, ry + 30].map((y): Vec3 => [g * ix, y, rz]), [g, 0, 0], side(g), { mate: "BR" })),
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Screw the runners to the sides",
+ detail: "The fixed half of each runner, two screws each. Slide the inner half along to reach the second hole.",
+ add: ["RL", "RR"],
+ fix: [-1, 1].map((g) => fx("screw", [-120, 120].map((z): Vec3 => [g * (ix - RW), runY, z]), [g, 0, 0], g < 0 ? "RL" : "RR", { len: 16, dia: 4, mate: side(g) })),
+ tools: ["screwdriver"],
+ wait: ["RR"],
+ },
+ { title: "Slide the back rail onto one side", detail: "Its holes go over the two cam bolts.", add: ["BR"], from: { BR: [400, 0, 0] } },
+ { title: "Lock it with two cams", detail: "Turn each cam clockwise until it grips the bolt.", fix: [fx("cam", railCams(-1), [0, 0, -1], "BR")], tools: ["screwdriver"] },
+ { title: "Put the other side on", detail: "Its runner faces in. Push it onto the rail's other end.", add: ["SR", "RR"], from: { SR: [400, 0, 0], RR: [400, 0, 0] } },
+ { title: "Lock that end with two cams", detail: "The same way.", fix: [fx("cam", railCams(1), [0, 0, -1], "BR")], tools: ["screwdriver"] },
+ {
+ title: "Tap dowels into the sides",
+ detail: "Two into the top edge of each side.",
+ fix: [-1, 1].map((g) => fx("dowel", [-60, 60].map((z): Vec3 => [g * sx, top, z]), [0, -1, 0], side(g), { len: 30, dia: 8, mate: "TOP" })),
+ tools: ["hammer"],
+ },
+ {
+ title: "Screw the cam bolts into the top",
+ detail: "Lay the top face down on the rug. Four cam bolts into the holes near its ends, by hand.",
+ fix: [-1, 1].map((g) => fx("camScrew", topZ.map((z): Vec3 => [g * sx, top, z]), [0, 1, 0], "TOP", { mate: side(g) })),
+ wait: ["TOP"],
+ },
+ {
+ title: "Push the big cams into the sides",
+ detail: "Four, near the top of the sides, arrows pointing to the edge.",
+ fix: [-1, 1].map((g) => fx("cam", topZ.map((z): Vec3 => [g * ix, top - 34, z]), [-g, 0, 0], side(g))),
+ },
+ {
+ title: "Lower the frame onto the top",
+ detail: "Dowels and bolts into their holes, then turn the four cams with the long Allen key until they grip.",
+ add: ["TOP"],
+ from: { TOP: [0, 300, 0] },
+ tools: ["allen"],
+ },
+ { title: "Press the cover caps on", detail: "Over the four cams in the back rail.", fix: [fx("cap", [...railCams(-1), ...railCams(1)].map((p): Vec3 => [p[0], p[1], p[2] + 1]), [0, 0, -1], "BR")] },
+ {
+ title: "Screw a plate onto each leg",
+ detail: "One flat screw through each plate into the top of the leg.",
+ fix: [-1, 1].flatMap((g) => [fx("plate", [[g * lx, lTop, lz]], [0, -1, 0], g < 0 ? "LL" : "LR"), fx("screw", [[g * lx, lTop + 2, lz]], [0, -1, 0], g < 0 ? "LL" : "LR", { len: 12, dia: 5 })]),
+ tools: ["allen"],
+ wait: ["LL", "LR", "PB"],
+ },
+ {
+ title: "Bolt the legs under the pull-out board",
+ detail: "At its front corners, two bolts through each plate.",
+ fix: [-1, 1].map((g) => fx("bolt", [-1, 1].map((k): Vec3 => [g * lx + k * 22, lTop - 2, lz]), [0, 1, 0], g < 0 ? "LL" : "LR", { len: 14, dia: 6, mate: "PB" })),
+ tools: ["allen"],
+ },
+ { title: "Click the castors into the legs", detail: "Push one into each leg end until it clicks.", fix: [-1, 1].map((g) => fx("castor", [[g * lx, wheel, lz]], [0, 1, 0], g < 0 ? "LL" : "LR", { len: wheel, dia: 40 })) },
+ { title: "Slide the pull-out desk in", detail: "Board face down, its edges onto the runners' inner halves, legs at the front.", add: ["PB", "LL", "LR"], ...out },
+ {
+ title: "Screw the runners to the board",
+ detail: "Three screws through each runner into the board's edge.",
+ fix: [-1, 1].map((g) => fx("screw", [-140, 0, 100].map((z): Vec3 => [g * (ix - 2), py, z]), [-g, 0, 0], g < 0 ? "RL" : "RR", { len: 18, dia: 4, mate: "PB" })),
+ tools: ["allen"],
+ },
+ { title: "Turn the desk over", detail: "Stand it on its glides and castors, then pull the lower desk out to check it runs smoothly.", pose: "+y", people: 2, warnings: ["two"] },
+ ],
+ };
+}
+
+const family: Family = { names: ["LÄNGDHOPP", "LANGDHOPP"], recipe };
+export default family;
diff --git a/src/lib/plan/families/larande.ts b/src/lib/plan/families/larande.ts
new file mode 100644
index 0000000..6881858
--- /dev/null
+++ b/src/lib/plan/families/larande.ts
@@ -0,0 +1,157 @@
+import type { Family } from "./family";
+import type { CustomFix, CustomParams, CustomPart, CustomStep, ProductSpec, Vec3 } from "../../types";
+
+/**
+ * LÄRANDE desk with pull-out storage unit, read from its manual. First the pull-out unit, built lying on its big
+ * front panel: six short strips stand on it on dowels and cam bolts, the bottom (with two castors) and two shelves
+ * slide into their grooves and the back panel goes on with plastic pins and cam locks. Then the open pedestal: two
+ * sides with the drawer runners and a short back panel on cam locks, plastic feet underneath. The steel leg frame
+ * takes two cross tubes on long bolts, which bolt into the pedestal's inner side; a top panel is screwed onto the
+ * pedestal, the desk top goes on with dowels and cam locks, and six bolts hold it to the steel frame. Last the unit
+ * hooks onto the runners. Drawn with the pedestal on the left, the manual's first way round.
+ */
+
+type Kind = CustomFix["kind"];
+const fx = (kind: Kind, on: string | undefined, dir: Vec3, at: Vec3[], o: Partial<CustomFix> = {}): CustomFix => ({ kind, count: at.length, on, dir, at, ...o });
+const CAM_BOLT = { len: 34, dia: 6 };
+
+function recipe(s: ProductSpec): CustomParams {
+ const W = Math.round(s.size.w * 10) || 1200, D = Math.round(s.size.d * 10) || 580, H = Math.round(s.size.h * 10) || 740;
+ const T = 18, TT = 20, yT = H - TT; // boards, the desk top and its underside
+ const yP = yT - T; // the pedestal's top panel sits on the sides
+ const xo = -W / 2 + T / 2, pw = 406, xi = -W / 2 + pw - T / 2; // pedestal sides
+ const dz = D - 20, yF0 = 10; // pedestal depth, on its feet
+ const ux = (xo + xi) / 2, uw = xi - xo - T - 8; // the unit between the sides
+ const zF = dz / 2 - T / 2, zK = zF - T / 2 - 409 - T / 2; // unit front and back panels
+ const sl = zF - T / 2 - (zK + T / 2), sz = (zF - T / 2 + zK + T / 2) / 2; // strips run from front to back
+ const ys = [60, 280, 480]; // undersides of the unit's bottom and shelves
+ const xs = [-1, 1].map((k) => ux + k * (uw / 2 - T / 2)); // the strips
+ const pwIn = uw - 2 * T; // panels between the strips
+ const R = 12.5; // steel tube radius
+ const xR = W / 2 - 20 - R, zR = dz / 2 - 30;
+ const yBar = [yT - 30, 250];
+ const zBar = -zR;
+ const parts: CustomPart[] = [
+ { id: "F", name: "Front panel", size: [uw, 660, T], pos: [ux, 20 + 330, zF], material: "board" },
+ ...ys.flatMap((y, i) => xs.map((x, j): CustomPart => ({ id: `L${i}${j}`, name: "Strip", size: [T, 60, sl], pos: [x, y + 21, sz], material: "board" }))),
+ { id: "B", name: "Bottom", size: [pwIn, T, sl], pos: [ux, ys[0] + T / 2, sz], material: "board" },
+ ...[1, 2].map((k): CustomPart => ({ id: `S${k}`, name: "Shelf", size: [pwIn, T, sl], pos: [ux, ys[k] + T / 2, sz], material: "board" })),
+ { id: "K", name: "Back panel", size: [uw, 520, T], pos: [ux, ys[0] + 260, zK], material: "board" },
+ { id: "PO", name: "Outer side", size: [T, yP - yF0, dz], pos: [xo, (yP + yF0) / 2, 0], material: "board" },
+ { id: "PI", name: "Inner side", size: [T, yP - yF0, dz], pos: [xi, (yP + yF0) / 2, 0], material: "board" },
+ { id: "PB", name: "Pedestal back", size: [xi - xo - T, 300, T], pos: [ux, yP - 150, -dz / 2 + T / 2], material: "board" },
+ {
+ id: "FR",
+ name: "Leg frame",
+ size: [2 * R, yT, 2 * zR + 2 * R],
+ pos: [xR, yT / 2, 0],
+ shape: "box",
+ material: "metal",
+ pieces: [
+ ...[-1, 1].map((k) => ({ shape: "cyl" as const, size: [2 * R, yT, 2 * R] as Vec3, pos: [0, 0, k * zR] as Vec3 })),
+ ...[R, yT - R].map((y) => ({ shape: "cyl" as const, size: [2 * R, 2 * zR, 2 * R] as Vec3, pos: [0, y - yT / 2, 0] as Vec3, rot: [Math.PI / 2, 0, 0] as Vec3 })),
+ ],
+ },
+ ...yBar.map((y, i): CustomPart => ({ id: `CB${i}`, name: "Cross tube", size: [xR - R - (xi + T / 2), 2 * R, 2 * R], pos: [(xR - R + xi + T / 2) / 2, y, zBar], shape: "cyl", material: "metal" })),
+ { id: "P", name: "Pedestal top", size: [pw, T, dz], pos: [-W / 2 + pw / 2, yP + T / 2, 0], material: "board" },
+ { id: "T", name: "Desk top", size: [W, TT, D], pos: [0, yT + TT / 2, 0], material: "board" },
+ ];
+ const strips = (i: number) => [0, 1].map((j) => `L${i}${j}`);
+ const stripY = (i: number) => ys[i] + 21;
+ const camBolts = fx("camScrew", "F", [0, 0, 1], ys.flatMap((_, i) => xs.map((x) => [x, stripY(i), zF - T / 2] as Vec3)), CAM_BOLT);
+ const stripDowels = (i: number) => xs.map((x, j) => fx("dowel", `L${i}${j}`, [0, 0, 1], [-20, 20].map((d) => [x, stripY(i) + d, zF - T / 2] as Vec3), { mate: "F" }));
+ const stripLocks = (i: number) => xs.map((x, j) => fx("cam", `L${i}${j}`, [j ? -1 : 1, 0, 0], [[x - (j ? -1 : 1) * (T / 2), stripY(i), zF - T / 2 - 26]], { dia: 12 }));
+ const backLocks = ys.flatMap((_, i) => xs.map((x, j) => fx("cam", `L${i}${j}`, [j ? -1 : 1, 0, 0], [[x - (j ? -1 : 1) * (T / 2), stripY(i), zK + T / 2 + 26]], { dia: 12 })));
+ const sideBolts = [fx("camScrew", "PO", [-1, 0, 0], [yP - 60, yP - 240].map((y) => [xo + T / 2, y, -dz / 2 + T / 2] as Vec3), CAM_BOLT), fx("camScrew", "PI", [1, 0, 0], [yP - 60, yP - 240].map((y) => [xi - T / 2, y, -dz / 2 + T / 2] as Vec3), CAM_BOLT)];
+ const topScrews = fx("screw", "P", [0, -1, 0], [xo, xi].flatMap((x) => [-200, 0, 200].map((z) => [x, yP + T, z] as Vec3)), { len: 50, dia: 5 });
+ const topDowels = fx("dowel", "P", [0, 1, 0], [-W / 2 + 90, -W / 2 + 316].flatMap((x) => [-180, 0, 180].map((z) => [x, yT, z] as Vec3)), { mate: "T" });
+ const deskCams = [-W / 2 + 90, -W / 2 + 316].flatMap((x) => [-120, 120].map((z): Vec3 => [x, yT, z]));
+ const frameBolts: Vec3[] = [...[-200, 0, 200].map((z): Vec3 => [xR, yT - 2 * R, z]), ...[-80, 160, 400].map((x): Vec3 => [x, yT - 2 * R, zBar])];
+ const steps: CustomStep[] = [
+ { title: "Screw the cam bolts into the front panel", detail: "Lay the big front panel of the unit face down on a rug. Six bolts, by hand.", add: ["F"], fix: [camBolts], pose: "-z", tools: ["screwdriver"], warnings: ["floor"] },
+ { title: "Tap the dowels into two strips", detail: "Two in one end of each.", fix: stripDowels(0), wait: strips(0), from: Object.fromEntries(strips(0).map((id) => [id, [0, 0, -300] as Vec3])), tools: ["hammer"] },
+ { title: "Stand the two strips on the front panel", detail: "At the bottom end, grooves facing each other.", add: strips(0), from: Object.fromEntries(strips(0).map((id) => [id, [0, 0, -300] as Vec3])) },
+ { title: "Lock the two strips", detail: "Cam lock in, arrow to the bolt, then turn clockwise.", fix: stripLocks(0), tools: ["screwdriver"] },
+ { title: "Tap the dowels into the bottom", detail: "Two in each side edge.", fix: [-1, 1].map((k) => fx("dowel", "B", [-k, 0, 0], [-120, 120].map((d) => [ux + k * (pwIn / 2), ys[0] + T / 2, sz + d] as Vec3))), wait: ["B"], tools: ["hammer"] },
+ {
+ title: "Screw the castors under the bottom",
+ detail: "Near the back edge, two screws each.",
+ fix: [
+ fx("castor", "B", [0, 1, 0], [-1, 1].map((k) => [ux + k * 110, ys[0], zK + 80] as Vec3), { len: 60, dia: 50 }),
+ fx("screw", "B", [0, 1, 0], [-1, 1].flatMap((k) => [-15, 15].map((d) => [ux + k * 110 + d, ys[0], zK + 80] as Vec3)), { len: 14, dia: 4 }),
+ ],
+ tools: ["screwdriver"],
+ },
+ { title: "Slide the bottom in", detail: "Down the grooves of the two strips, castors facing out.", add: ["B"], from: { B: [0, 0, -380] } },
+ { title: "Tap the dowels into four more strips", detail: "Two in one end of each, like before.", fix: [...stripDowels(1), ...stripDowels(2)], wait: [...strips(1), ...strips(2)], from: Object.fromEntries([...strips(1), ...strips(2)].map((id) => [id, [0, 0, -300] as Vec3])), tools: ["hammer"] },
+ { title: "Stand the four strips on the front panel", detail: "Two pairs, grooves facing each other.", add: [...strips(1), ...strips(2)], from: Object.fromEntries([...strips(1), ...strips(2)].map((id) => [id, [0, 0, -300] as Vec3])) },
+ { title: "Lock the four strips", detail: "Four cam locks.", fix: [...stripLocks(1), ...stripLocks(2)], tools: ["screwdriver"] },
+ { title: "Slide in the two shelves", detail: "Down the grooves, smooth side up.", add: ["S1", "S2"], from: { S1: [0, 0, -380], S2: [0, 0, -380] } },
+ {
+ title: "Put the back panel on",
+ detail: "Lay it over the ends of the strips and push a plastic pin through each of its six holes.",
+ add: ["K"],
+ from: { K: [0, 0, -260] },
+ fix: [fx("pin", "K", [0, 0, 1], ys.flatMap((_, i) => xs.map((x) => [x, stripY(i), zK - T / 2] as Vec3)), { name: "Plastic pin", len: 30, dia: 6 })],
+ },
+ { title: "Lock the back panel", detail: "Six cam locks in the strips, turned until they grip the pins.", fix: backLocks, tools: ["screwdriver"] },
+ { title: "Stand it up and push in the glides", detail: "Two under the bottom edge of the front panel.", fix: [fx("glide", "F", [0, 1, 0], [-1, 1].map((k) => [ux + k * 140, 20, zF] as Vec3), { name: "Glide" })], pose: "+y" },
+ { title: "Clip the handle on", detail: "Over the cut-out in the top edge of the front panel. Press it down until it sits flat.", fix: [fx("handle", "F", [0, -1, 0], [[ux, 680, zF]], { len: 40, dia: 60 })] },
+ { title: "Screw the cam bolts into the pedestal sides", detail: "Two near the back of each side, by hand.", fix: sideBolts, wait: ["PO", "PI"], from: { PO: [-300, 0, 0], PI: [300, 0, 0] }, tools: ["screwdriver"] },
+ {
+ title: "Screw the runners onto the sides",
+ detail: "One on the inside of each side, near the bottom, two screws each.",
+ fix: [
+ fx("runner", "PO", [-1, 0, 0], [[xo + T / 2, 45, 0]], { len: 400, dia: 30 }),
+ fx("runner", "PI", [1, 0, 0], [[xi - T / 2, 45, 0]], { len: 400, dia: 30 }),
+ fx("screw", "PO", [-1, 0, 0], [-120, 120].map((z) => [xo + T / 2 + 6, 45, z] as Vec3), { len: 12, dia: 4 }),
+ fx("screw", "PI", [1, 0, 0], [-120, 120].map((z) => [xi - T / 2 - 6, 45, z] as Vec3), { len: 12, dia: 4 }),
+ ],
+ tools: ["screwdriver"],
+ },
+ { title: "Tap the dowels into the pedestal back", detail: "One in each end.", fix: [-1, 1].map((k) => fx("dowel", "PB", [-k, 0, 0], [[ux + k * ((xi - xo - T) / 2), yP - 150, -dz / 2 + T / 2]])), wait: ["PB"], from: { PB: [0, 0, -300] }, tools: ["hammer"] },
+ { title: "Join the sides with the back", detail: "Push the back onto one side, then press the other side on.", add: ["PB", "PO", "PI"], from: { PB: [0, 0, -300], PO: [-300, 0, 0], PI: [300, 0, 0] } },
+ { title: "Lock the back", detail: "Four cam locks in the back panel.", fix: [-1, 1].map((k) => fx("cam", "PB", [0, 0, -1], [yP - 60, yP - 240].map((y) => [ux + k * ((xi - xo - T) / 2 - 26), y, -dz / 2 + T] as Vec3), { dia: 15 })), tools: ["screwdriver"] },
+ { title: "Push the feet into the sides", detail: "Two under each side.", fix: [fx("glide", "PO", [0, 1, 0], [-1, 1].map((k) => [xo, yF0, k * (dz / 2 - 40)] as Vec3), { name: "Foot" }), fx("glide", "PI", [0, 1, 0], [-1, 1].map((k) => [xi, yF0, k * (dz / 2 - 40)] as Vec3), { name: "Foot" })] },
+ { title: "Screw the plate onto the inner side", detail: "On the outside of the inner side, at the back, two screws.", fix: [fx("plate", "PI", [-1, 0, 0], [[xi + T / 2, (yBar[0] + yBar[1]) / 2, zBar]], { len: 60, dia: 40 }), fx("screw", "PI", [-1, 0, 0], [yBar[0] - 60, yBar[1] + 60].map((y) => [xi + T / 2, y, zBar] as Vec3), { len: 12, dia: 4 })], tools: ["screwdriver"] },
+ { title: "Stick the felt pads under the leg frame", detail: "One under each end of the bottom tube.", fix: [fx("glide", "FR", [0, 1, 0], [-1, 1].map((k) => [xR, 0, k * (zR - 40)] as Vec3), { name: "Felt pad" })], wait: ["FR"], from: { FR: [300, 0, 0] } },
+ {
+ title: "Bolt the cross tubes to the leg frame",
+ detail: "The flat ends against the frame, then a long bolt through the back tube into each.",
+ add: ["FR", "CB0", "CB1"],
+ from: { FR: [300, 0, 0], CB0: [0, 0, -250], CB1: [0, 0, -250] },
+ fix: [fx("bolt", "FR", [-1, 0, 0], yBar.map((y) => [xR + R, y, zBar] as Vec3), { len: 90, dia: 6 })],
+ tools: ["allen"],
+ },
+ { title: "Bolt the tubes to the pedestal", detail: "From inside the pedestal, one bolt through the inner side into each tube.", fix: [fx("bolt", "PI", [1, 0, 0], yBar.map((y) => [xi - T / 2, y, zBar] as Vec3), { len: 40, dia: 6, mate: undefined })], tools: ["allen"] },
+ { title: "Screw the top panel onto the pedestal", detail: "Six screws down into the sides.", add: ["P"], from: { P: [0, 240, 0] }, fix: [topScrews], tools: ["allen"] },
+ { title: "Tap the dowels into the top panel", detail: "Six, along both sides.", fix: [topDowels], tools: ["hammer"] },
+ { title: "Screw the cam bolts into the desk top", detail: "Lay it face down. Four bolts on the pedestal end.", fix: [fx("camScrew", "T", [0, 1, 0], deskCams, CAM_BOLT)], wait: ["T"], from: { T: [0, 300, 0] }, tools: ["screwdriver"] },
+ { title: "Lay the desk top on", detail: "Two people. Onto the dowels and bolts, then over the steel frame.", add: ["T"], from: { T: [0, 300, 0] }, people: 2 },
+ { title: "Lock the desk top", detail: "Four cam locks under the pedestal top.", fix: [fx("cam", "P", [0, 1, 0], deskCams.map(([x, , z]) => [x, yP, z + 40] as Vec3), { dia: 15 })], tools: ["screwdriver"] },
+ { title: "Bolt the steel frame to the top", detail: "Six bolts up through the frame's top tube and the cross tube.", fix: [fx("bolt", undefined, [0, 1, 0], frameBolts, { len: 35, dia: 6, mate: "T" })], tools: ["allen"] },
+ { title: "Pull the runners out", detail: "All the way to the front." },
+ { title: "Hook the unit onto the runners", detail: "Back end first, then lower the front until both hooks catch, and push it in." },
+ {
+ title: "Screw the unit to the runners",
+ detail: "A bracket at the front of each runner, two screws each.",
+ fix: [
+ fx("angle", "B", [-1, 0, 0], [[xo + T / 2 + 2, 60, zF - 40]], { len: 30, dia: 20 }),
+ fx("angle", "B", [1, 0, 0], [[xi - T / 2 - 2, 60, zF - 40]], { len: 30, dia: 20 }),
+ fx("screw", "F", [0, 0, 1], [xo + T / 2 + 10, xi - T / 2 - 10].flatMap((x) => [50, 70].map((y) => [x, y, zF - T / 2 - 4] as Vec3)), { len: 12, dia: 4 }),
+ ],
+ tools: ["screwdriver"],
+ },
+ { title: "Press the caps into the side", detail: "Over the two holes on the outside of the pedestal.", fix: [fx("cap", "PO", [1, 0, 0], [-1, 1].map((k) => [-W / 2, yP - 150, k * 200] as Vec3), { len: 8, dia: 14 })] },
+ ];
+ return { parts, steps };
+}
+
+const family: Family = {
+ names: ["LÄRANDE", "LARANDE"],
+ recipe(s: ProductSpec) {
+ if (!/pull-out-storage/.test(s.slug ?? "")) return null;
+ return recipe(s);
+ },
+};
+export default family;
diff --git a/src/lib/plan/families/lerholmen.ts b/src/lib/plan/families/lerholmen.ts
new file mode 100644
index 0000000..21a4831
--- /dev/null
+++ b/src/lib/plan/families/lerholmen.ts
@@ -0,0 +1,303 @@
+import type { Family } from "./family";
+import type { CustomFix, CustomPart, CustomStep, HwItem, HwKind, PartItem, PartPiece, ProductSpec, Vec3 } from "../../types";
+import type { PlanBuilder } from "../builder";
+import { buildCustom } from "../custom";
+
+/**
+ * LERHOLMEN, read from the picnic table's manual. The two middle battens take their dowels lying flat, are turned
+ * over and each gets a diagonal strut bolted on. The top is four slatted panels pinned together, upside down; the
+ * battens are pressed onto it, the two long rails slide onto the batten ends and are bolted down. Each end frame
+ * slides on over the rails and its strut and is bolted to the top, the rails and the strut; then two people turn it
+ * over. Each bench is two halves pinned together and two rails bolted underneath, built upside down beside the table,
+ * then turned over, lowered between the end frames and bolted to them.
+ */
+
+const fx = (kind: HwKind, at: Vec3[], dir: Vec3, on: string, more: Partial<CustomFix> = {}): CustomFix => ({ kind, count: at.length, at, dir, on, ...more });
+const DOWEL = { len: 40, dia: 10 };
+const BOLT = { len: 80, dia: 6 };
+const LONG = { len: 90, dia: 6 };
+const SHORT = { len: 60, dia: 6 };
+const NUT = { name: "Barrel nut", len: 14, dia: 10 };
+const PIN = { name: "Steel pin", len: 50, dia: 8 };
+const WASHER = { len: 2, dia: 16 };
+
+const L = 1500, H = 760, D = 750; // top: 150 x 75, 76 high
+const ST = 20; // slats
+const topY = H - ST / 2;
+const batX = 42.5, batY = 710, batD = 625; // the two middle battens, 4 cm apart
+const railZ = 335, railY = 705, frameX = L / 2 - 22.5, frameIn = frameX - 22.5;
+const postY = 470; // where the struts meet the end frames' middle posts
+const benchY = 450, benchZ = 610, benchRailY = 410, cz = 85; // bench rails sit cz either side of the bench middle
+
+const slats = (len: number, width: number, n: number): PartPiece[] => {
+ const w = 55, gap = (width - n * w) / (n - 1);
+ return Array.from({ length: n }, (_, i) => ({ shape: "box", size: [len, ST, w], pos: [0, 0, -width / 2 + w / 2 + i * (w + gap)] }));
+};
+
+function parts(): CustomPart[] {
+ const out: CustomPart[] = [];
+ // top panels: P0 back left, P1 back right, P2 front left, P3 front right
+ [[-1, -1], [1, -1], [-1, 1], [1, 1]].forEach(([sx, sz], i) =>
+ out.push({ id: `P${i}`, name: "Top panel", size: [L / 2, ST, D / 2], pos: [(sx * L) / 4, topY, (sz * D) / 4], material: "wood", pieces: slats(L / 2, D / 2, 6) }),
+ );
+ [-1, 1].forEach((sx, i) => out.push({ id: `B${i}`, name: "Batten", size: [45, 60, batD], pos: [sx * batX, batY, 0], material: "wood" }));
+ // S0 runs from the right-hand batten out to the right end frame, S1 to the left
+ const x0 = batX + 22.5, dx = frameIn - x0, dy = batY - 5 - postY;
+ [1, -1].forEach((sx, i) =>
+ out.push({ id: `S${i}`, name: "Strut", size: [Math.hypot(dx, dy), 45, 45], pos: [sx * (x0 + dx / 2), postY + dy / 2, 0], rot: [0, 0, -sx * Math.atan2(dy, dx)], material: "wood" }),
+ );
+ [1, -1].forEach((sz, i) => out.push({ id: `R${i}`, name: "Long rail", size: [2 * frameIn, 70, 45], pos: [0, railY, sz * railZ], material: "wood" }));
+ // an end frame comes in one piece: the bar under the top, two legs, a middle post and the long bench arm
+ const fh = H - ST;
+ [1, -1].forEach((sx, i) =>
+ out.push({
+ id: `F${i}`, name: "End frame", size: [45, fh, 1470], pos: [sx * frameX, fh / 2, 0], material: "wood",
+ pieces: [
+ { shape: "box", size: [45, 70, D], pos: [0, railY - fh / 2, 0] },
+ ...[-1, 1].map((z): PartPiece => ({ shape: "box", size: [45, 670, 70], pos: [0, 335 - fh / 2, z * 320] })),
+ { shape: "box", size: [45, 230, 70], pos: [0, 555 - fh / 2, 0] },
+ { shape: "box", size: [45, 60, 1470], pos: [0, benchRailY - fh / 2, 0] },
+ ],
+ }),
+ );
+ [1, -1].forEach((sz, k) => {
+ [1, -1].forEach((sx, j) => out.push({ id: `Q${k}${j}`, name: "Bench half", size: [L / 2, ST, 250], pos: [(sx * L) / 4, benchY, sz * benchZ], material: "wood", pieces: slats(L / 2, 250, 4) }));
+ [1, -1].forEach((o, j) => out.push({ id: `C${k}${j}`, name: "Bench rail", size: [2 * frameIn, 60, 45], pos: [0, benchRailY, sz * benchZ + o * cz], material: "wood" }));
+ });
+ return out;
+}
+
+function steps(): CustomStep[] {
+ const pinsBetween = (host: string, mate: string, at: Vec3[], dir: Vec3) => [
+ fx("pin", at, dir, host, { ...PIN, mate }),
+ fx("washer", at, dir, host, WASHER),
+ ];
+ const panelAt = (x: number, z: number) => `P${(x > 0 ? 1 : 0) + (z > 0 ? 2 : 0)}`;
+ const battenDowels = [0, 1].map((i) => {
+ const x = (i ? 1 : -1) * batX;
+ return [
+ ...[-150, 150].map((z) => fx("dowel", [[x, batY + 30, z]], [0, -1, 0], `B${i}`, { ...DOWEL, mate: panelAt(x, z) })),
+ ...[1, -1].map((sz) => fx("dowel", [695, 725].map((y) => [x, y, (sz * batD) / 2] as Vec3), [0, 0, -sz], `B${i}`, { ...DOWEL, mate: sz > 0 ? "R0" : "R1" })),
+ ];
+ }).flat();
+ const strutY = (x: number) => batY - 5 - ((batY - 5 - postY) * (Math.abs(x) - batX - 22.5)) / (frameIn - batX - 22.5);
+ const aside: Vec3 = [0, 0, -700];
+ const end = (i: number): CustomStep[] => {
+ const sx = i ? -1 : 1, F = `F${i}`, S = `S${i}`;
+ const out = sx * (frameX + 22.5);
+ return [
+ {
+ title: i ? "Slide the other end frame on" : "Slide an end frame on",
+ detail: "Over the ends of both rails, with the strut's dowel going into the hole in the middle post.",
+ add: [F],
+ people: 2,
+ },
+ {
+ title: "Bolt the frame to the top",
+ detail: "Two bolts down through the bar that lies on the top.",
+ fix: [-150, 150].map((z) => fx("bolt", [[sx * frameX, railY - 35, z]], [0, 1, 0], F, { ...BOLT, mate: panelAt(sx, z) })),
+ },
+ {
+ title: "Bolt the frame to the rails",
+ detail: "A barrel nut into each rail, slot facing the bolt, then a bolt through the frame into it.",
+ fix: [
+ ...[0, 1].map((r) => fx("nut", [[sx * (frameIn - 40), railY - 35, (r ? -1 : 1) * railZ]], [0, 1, 0], `R${r}`, NUT)),
+ ...[0, 1].map((r) => fx("bolt", [[out, railY, (r ? -1 : 1) * railZ]], [-sx, 0, 0], F, { ...LONG, mate: `R${r}` })),
+ ],
+ tools: ["flathead"],
+ },
+ {
+ title: "Bolt the middle post to the strut",
+ detail: "One bolt through the post into the end of the strut.",
+ fix: [fx("bolt", [[out, postY, 0]], [-sx, 0, 0], F, { ...LONG, mate: S })],
+ },
+ ];
+ };
+ const benches = [0, 1];
+ const bz = (k: number) => (k ? -1 : 1) * benchZ;
+ return [
+ {
+ title: "Tap the dowels into the two battens",
+ detail: "Lay them flat on a rug. Two dowels go into the wide face of each and two into each end.",
+ fix: battenDowels,
+ wait: ["B0", "B1"],
+ from: { B0: aside, B1: aside },
+ pose: "-y",
+ tools: ["hammer"],
+ warnings: ["floor"],
+ },
+ {
+ title: "Turn the battens over",
+ detail: "Dowels down, with the countersunk bolt holes facing each other.",
+ },
+ {
+ title: "Bolt a strut to each batten",
+ detail: "Put a barrel nut into the end of the strut, then a short bolt through the batten into it. The strut's notch faces up.",
+ fix: [0, 1].flatMap((i) => {
+ const sx = i ? -1 : 1, x = sx * (batX + 22.5 + 40);
+ return [
+ fx("nut", [[x, strutY(x), 22.5]], [0, 0, -1], `S${i}`, NUT),
+ fx("bolt", [[sx * (batX - 22.5), batY - 5, 0]], [sx, 0, 0], `B${i ? 0 : 1}`, { ...SHORT, mate: `S${i}` }),
+ ];
+ }),
+ wait: ["S0", "S1"],
+ from: { S0: aside, S1: aside },
+ tools: ["flathead", "allen"],
+ },
+ {
+ title: "Lay a top panel upside down",
+ detail: "On the rug, slats down.",
+ add: ["P0"],
+ },
+ {
+ title: "Pin two more panels to it",
+ detail: "Push a steel pin with a washer into each hole in the edges, then press the panels together.",
+ fix: [
+ ...pinsBetween("P0", "P1", [-280, -95].map((z) => [0, topY, z] as Vec3), [-1, 0, 0]),
+ ...pinsBetween("P0", "P2", [-560, -190].map((x) => [x, topY, 0] as Vec3), [0, 0, -1]),
+ ],
+ add: ["P1", "P2"],
+ from: { P1: [300, 0, 0], P2: [0, 0, 300] },
+ },
+ {
+ title: "Pin on the last panel",
+ detail: "Four more pins and washers, then press it into the corner.",
+ fix: [
+ ...pinsBetween("P1", "P3", [190, 560].map((x) => [x, topY, 0] as Vec3), [0, 0, -1]),
+ ...pinsBetween("P2", "P3", [95, 280].map((z) => [0, topY, z] as Vec3), [-1, 0, 0]),
+ ],
+ add: ["P3"],
+ from: { P3: [220, 0, 220] },
+ },
+ {
+ title: "Press the battens onto the middle of the top",
+ detail: "Struts pointing out to the ends. Press them down until the dowels are all the way in.",
+ add: ["B0", "B1", "S0", "S1"],
+ },
+ {
+ title: "Tap a dowel into the end of each strut",
+ fix: [0, 1].map((i) => fx("dowel", [[(i ? -1 : 1) * frameIn, postY, 0]], [i ? 1 : -1, 0, 0], `S${i}`, { ...DOWEL, mate: `F${i}` })),
+ tools: ["hammer"],
+ },
+ {
+ title: "Slide the long rails onto the batten ends",
+ detail: "One along each long edge of the top.",
+ add: ["R0", "R1"],
+ },
+ {
+ title: "Bolt the rails to the top",
+ detail: "Four bolts down through each rail.",
+ fix: [0, 1].map((r) => fx("bolt", [-550, -200, 200, 550].map((x) => [x, railY - 35, (r ? -1 : 1) * railZ] as Vec3), [0, 1, 0], `R${r}`, BOLT)),
+ },
+ ...end(0),
+ ...end(1),
+ {
+ title: "Turn the table over together",
+ detail: "Two of you, lifting by the end frames.",
+ pose: "+y",
+ people: 2,
+ },
+ {
+ title: "Pin the two halves of each bench together",
+ detail: "Upside down beside the table: a steel pin and a washer in each of the two holes, then press the halves together.",
+ fix: benches.flatMap((k) => pinsBetween(`Q${k}0`, `Q${k}1`, [-60, 60].map((dz) => [0, benchY, bz(k) + dz] as Vec3), [1, 0, 0])),
+ wait: benches.flatMap((k) => [`Q${k}0`, `Q${k}1`]),
+ },
+ {
+ title: "Tap the dowels into the bench rails",
+ detail: "One into each end of every rail.",
+ fix: benches.flatMap((k) => [0, 1].map((j) => fx("dowel", [1, -1].map((sx) => [sx * frameIn, benchRailY + 15, bz(k) + (j ? -cz : cz)] as Vec3), [-1, 0, 0], `C${k}${j}`, DOWEL))),
+ wait: benches.flatMap((k) => [`C${k}0`, `C${k}1`]),
+ tools: ["hammer"],
+ },
+ {
+ title: "Bolt the rails under each bench",
+ detail: "Lay two rails along each bench, ends flush with the bench's ends, and turn in eight bolts. Then turn the bench over.",
+ fix: benches.flatMap((k) => [0, 1].map((j) => fx("bolt", [-600, -220, 220, 600].map((x) => [x, benchRailY - 30, bz(k) + (j ? -cz : cz)] as Vec3), [0, 1, 0], `C${k}${j}`, BOLT))),
+ },
+ {
+ title: "Lower the benches between the end frames",
+ detail: "Tilt each bench a little so the dowels at one end find their holes, then the other, and let it rest on the bench arms.",
+ add: benches.flatMap((k) => [`Q${k}0`, `Q${k}1`, `C${k}0`, `C${k}1`]),
+ people: 2,
+ },
+ {
+ title: "Bolt the benches to the end frames",
+ detail: "A barrel nut into each rail end, then a bolt through the frame into it: eight in all.",
+ fix: [
+ ...benches.flatMap((k) => [0, 1].map((j) => fx("nut", [1, -1].map((sx) => [sx * (frameIn - 40), benchRailY - 30, bz(k) + (j ? -cz : cz)] as Vec3), [0, 1, 0], `C${k}${j}`, NUT))),
+ ...[0, 1].map((i) => fx("bolt", benches.flatMap((k) => [cz, -cz].map((dz) => [(i ? -1 : 1) * (frameX + 22.5), benchRailY - 15, bz(k) + dz] as Vec3)), [i ? 1 : -1, 0, 0], `F${i}`, LONG)),
+ ],
+ tools: ["flathead", "allen"],
+ },
+ ];
+}
+
+/* ---------------- moving the parts built beside the table ---------------- */
+
+// turned upside down about x through c, then moved so that c lands on to
+const flip = (p: Vec3, c: Vec3, to: Vec3): Vec3 => [p[0] - c[0] + to[0], -(p[1] - c[1]) + to[1], -(p[2] - c[2]) + to[2]];
+const flipRot = (r: Vec3): Vec3 => [r[0] + Math.PI, r[1], r[2]];
+
+function restage(b: PlanBuilder, list: CustomPart[], stepList: CustomStep[]) {
+ const items = b.items.filter((i): i is PartItem => i.kind === "part");
+ const item = (id: string) => items[list.findIndex((p) => p.id === id)];
+ const stepOf = (title: string) => b.steps.findIndex((s) => s.title === stepList.find((x) => x.title.startsWith(title))?.title);
+ const stateAt = (it: PartItem, n: number) => it.states.find((s) => s.step === n);
+ const insert = (it: PartItem, st: PartItem["states"][number]) => {
+ it.states.push(st);
+ it.states.sort((a, x) => a.step - x.step);
+ };
+ const hwAt = (n: number) => b.items.filter((i): i is HwItem => i.kind === "hw" && i.step === n);
+
+ // the battens take their dowels face up, then are turned over beside the top
+ const s1 = stepOf("Tap the dowels into the two"), s2 = stepOf("Turn the battens over");
+ const bc: Vec3 = [0, batY, 0], away: Vec3 = [0, 0, -1120];
+ for (const id of ["B0", "B1"]) {
+ const it = item(id), st = stateAt(it, s1);
+ if (!st) continue;
+ const plain = st.pos;
+ st.pos = flip(it.final.pos, bc, [bc[0] + away[0], bc[1] + 20, bc[2] + away[2]]);
+ st.rot = flipRot(it.final.rot);
+ insert(it, { ...st, step: s2, pos: plain, rot: it.final.rot, from: undefined, delay: 0.2 });
+ }
+
+ // each bench is built upside down on the floor beside its side of the table
+ const sp = stepOf("Pin the two halves"), sd = stepOf("Tap the dowels into the bench"), sr = stepOf("Bolt the rails under");
+ [0, 1].forEach((k) => {
+ const sz = k ? -1 : 1;
+ const c: Vec3 = [0, 420, sz * benchZ], to: Vec3 = [0, 40, sz * 1400];
+ const pinsDone = Math.max(0, ...hwAt(sp).map((h) => h.delay)) + 0.5;
+ [`Q${k}0`, `Q${k}1`].forEach((id, j) => {
+ const it = item(id), st = stateAt(it, sp);
+ if (!st) return;
+ st.pos = flip(it.final.pos, c, to);
+ st.rot = flipRot(it.final.rot);
+ // the second half is pushed on over the pins
+ if (j) Object.assign(st, { from: [-320, 0, 0] as Vec3, delay: pinsDone });
+ else st.from = [0, 220, 0];
+ });
+ [`C${k}0`, `C${k}1`].forEach((id) => {
+ const it = item(id), st = stateAt(it, sd);
+ if (!st) return;
+ const onBench = flip(it.final.pos, c, to);
+ st.pos = [onBench[0], 30, onBench[2] + sz * 380];
+ st.rot = flipRot(it.final.rot);
+ st.from = [0, 220, 0];
+ insert(it, { ...st, step: sr, pos: onBench, from: undefined, delay: 0.15 });
+ });
+ });
+ // the rails are laid on before their bolts go in
+ for (const h of hwAt(sr)) h.delay += 0.9;
+}
+
+function build(b: PlanBuilder, s: ProductSpec): boolean {
+ if (!/picnic/i.test(s.variant)) return false;
+ const list = parts(), stepList = steps();
+ buildCustom(b, { ...s, custom: { parts: list, steps: stepList } });
+ restage(b, list, stepList);
+ return true;
+}
+
+const family: Family = { names: ["LERHOLMEN"], build };
+export default family;
diff --git a/src/lib/plan/families/norberg.ts b/src/lib/plan/families/norberg.ts
new file mode 100644
index 0000000..1ea6e79
--- /dev/null
+++ b/src/lib/plan/families/norberg.ts
@@ -0,0 +1,119 @@
+import type { Family } from "./family";
+import type { CustomFix, CustomParams, CustomPart, CustomStep, PartPiece, ProductSpec, Vec3 } from "../../types";
+
+/**
+ * NORBERG wall-mounted drop-leaf table, read from its manual: two steel angles screwed under the narrow wall strip,
+ * the strip held level on the wall and the holes drilled, three hinges joining the strip to the top (all upside down
+ * on the floor), the leg holder under the top, the whole thing screwed to the wall, then the leg's pivot fixed to
+ * the wall below it, its cap on, and the leg swung up into the holder and locked.
+ */
+
+const fx = (kind: CustomFix["kind"], on: string, dir: Vec3, at: Vec3[], o: Partial<CustomFix> = {}): CustomFix => ({ kind, count: at.length, on, dir, at, ...o });
+
+function dropLeaf(s: ProductSpec): CustomParams {
+ // the page: 74 wide, 60 deep; the top at table height, the leg's pivot 43 cm under it
+ const W = s.size.w * 10, D = 600, Y = 740, T = 18;
+ const zW = -D / 2; // the wall
+ const sd = 100; // the strip's depth
+ const yU = Y - T; // underside of the top
+ const zJ = zW + sd; // where the strip meets the top
+ const aw = W / 2 - 10; // each angle's length
+ const pivot: [number, number] = [Y - 430, zW + 15], tip: [number, number] = [yU - 20, -40];
+ const dy = tip[0] - pivot[0], dz = tip[1] - pivot[1], L = Math.hypot(dy, dz);
+ const legC: Vec3 = [0, (pivot[0] + tip[0]) / 2, (pivot[1] + tip[1]) / 2];
+ const legLo: Vec3 = [-30, pivot[0] - 40, zW], legHi: Vec3 = [30, tip[0] + 10, tip[1] + 15];
+ const legPos: Vec3 = [0, (legLo[1] + legHi[1]) / 2, (legLo[2] + legHi[2]) / 2];
+ const rel = (v: Vec3): Vec3 => [v[0] - legPos[0], v[1] - legPos[1], v[2] - legPos[2]];
+ const leg: PartPiece[] = [
+ { shape: "box", size: [26, L, 16], pos: rel(legC), rot: [Math.atan2(dz, dy), 0, 0] },
+ { shape: "box", size: [60, 70, 6], pos: rel([0, pivot[0], zW + 3]) },
+ ];
+ const angle: PartPiece[] = [
+ { shape: "box", size: [aw, 3, 30], pos: [0, 30 - 1.5, 0] },
+ { shape: "box", size: [aw, 60, 3], pos: [0, 0, -15 + 1.5] },
+ ];
+ const parts: CustomPart[] = [
+ { id: "WS", name: "Wall strip", size: [W, T, sd], pos: [0, Y - T / 2, zW + sd / 2] },
+ ...[-1, 1].map((sx, i): CustomPart => ({ id: `A${i}`, name: "Wall angle", size: [aw, 60, 30], pos: [(sx * W) / 4, yU - 30, zW + 15], pieces: angle, material: "metal" })),
+ { id: "TP", name: "Table top", size: [W, T, D - sd], pos: [0, Y - T / 2, zJ + (D - sd) / 2] },
+ { id: "LH", name: "Leg holder", size: [70, 20, 40], pos: [0, yU - 10, tip[1] + 5] },
+ { id: "LG", name: "Leg", size: [legHi[0] - legLo[0], legHi[1] - legLo[1], legHi[2] - legLo[2]], pos: legPos, pieces: leg, material: "metal" },
+ ];
+ for (const p of parts) p.material ??= "board";
+ const hx = [-W / 2 + 100, 0, W / 2 - 100];
+ const hingeScrews = (side: -1 | 1): Vec3[] => hx.flatMap((x) => [-14, 14].map((dx) => [x + dx, yU - 2, zJ + side * 18] as Vec3));
+ const angleScrews: Vec3[] = [-1, 1].flatMap((sx) => [-1, 0, 1].map((k) => [(sx * W) / 4 + (k * aw) / 3, yU - 3, zW + 18] as Vec3));
+ const wallAt: Vec3[] = [-1, 1].flatMap((sx) => [-1, 1].map((k) => [(sx * W) / 4 + (k * aw) / 3, yU - 35, zW + 3] as Vec3));
+ const legWall: Vec3[] = [-18, 18].map((dx) => [dx, pivot[0] - 20, zW + 6]);
+ const steps: CustomStep[] = [
+ {
+ title: "Screw the two angles under the wall strip",
+ detail: "Lay the strip upside down on a rug. Each angle's upright edge goes along the back, three screws in each.",
+ add: ["WS", "A0", "A1"],
+ fix: [fx("screw", "A0", [0, 1, 0], angleScrews.slice(0, 3), { len: 15, dia: 4 }), fx("screw", "A1", [0, 1, 0], angleScrews.slice(3), { len: 15, dia: 4 })],
+ tools: ["screwdriver"],
+ pose: "-y",
+ warnings: ["floor"],
+ },
+ {
+ title: "Mark and drill the wall",
+ detail: "Hold the strip against the wall at the height you want, level it, mark the four holes in the angles, and drill.",
+ tools: ["level", "pencil", "drill"],
+ pose: "+y",
+ wall: true,
+ warnings: ["wall"],
+ },
+ {
+ title: "Screw the hinges onto the strip",
+ detail: "Upside down on the rug again. Three hinges along its front edge, two screws in each.",
+ fix: [fx("flatHinge", "WS", [0, 1, 0], hx.map((x) => [x, yU, zJ] as Vec3), { name: "Hinge", len: 60, dia: 34 }), fx("screw", "WS", [0, 1, 0], hingeScrews(-1), { len: 15, dia: 4 })],
+ tools: ["screwdriver"],
+ pose: "-y",
+ },
+ { title: "Lay the table top against the strip", detail: "Upside down too, its back edge tight against the strip under the hinges.", add: ["TP"], from: { TP: [0, 0, 300] } },
+ { title: "Screw the hinges to the top", detail: "Two screws in each hinge.", fix: [fx("screw", "TP", [0, 1, 0], hingeScrews(1), { len: 15, dia: 4 })], tools: ["screwdriver"] },
+ {
+ title: "Screw the leg holder under the top",
+ detail: "In the middle, over the marks, with its open end towards the wall. Two screws.",
+ add: ["LH"],
+ fix: [fx("screw", "LH", [0, 1, 0], [-22, 22].map((dx) => [dx, yU - 20, tip[1] + 5] as Vec3), { len: 15, dia: 4 })],
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Screw it to the wall together",
+ detail: "One of you holds the top up against the wall while the other screws through the four holes. Wall screws aren't included: pick ones made for your wall.",
+ fix: [fx("plug", "A0", [0, 0, -1], wallAt.map(([x, y]) => [x, y, zW] as Vec3)), fx("screw", "A0", [0, 0, -1], wallAt, { len: 50, dia: 5 })],
+ tools: ["screwdriver"],
+ pose: "+y",
+ people: 2,
+ wall: true,
+ warnings: ["wall", "two"],
+ },
+ {
+ title: "Fix the leg's pivot to the wall",
+ detail: "Hang the leg straight down under the middle of the top, check it's upright with the level, mark, drill and screw its bracket on with two screws.",
+ add: ["LG"],
+ from: { LG: [0, 0, 220] },
+ fix: [fx("plug", "LG", [0, 0, -1], legWall.map(([x, y]) => [x, y, zW] as Vec3)), fx("screw", "LG", [0, 0, -1], legWall, { len: 50, dia: 5 })],
+ tools: ["level", "pencil", "drill", "screwdriver"],
+ wall: true,
+ warnings: ["wall"],
+ },
+ {
+ title: "Push the cap onto the top of the leg",
+ fix: [fx("cap", "LG", [0, -1, 0], [[0, tip[0] + 10, tip[1]]], { len: 12, dia: 26, name: "Leg cap" })],
+ },
+ { title: "Raise the top and swing the leg up", detail: "Lift the top level, swing the leg out and up, and let its end drop into the holder." },
+ { title: "Lock the leg", detail: "Turn the catch on the holder over the end of the leg. To fold the table, turn it back and lower the top." },
+ ];
+ return { parts, steps };
+}
+
+const family: Family = {
+ names: ["NORBERG"],
+ recipe(s) {
+ if (/drop-leaf table/i.test(s.variant)) return dropLeaf(s);
+ return null;
+ },
+};
+export default family;
diff --git a/src/lib/plan/families/nordkisa.ts b/src/lib/plan/families/nordkisa.ts
index 097aa2f..ac654c3 100644
--- a/src/lib/plan/families/nordkisa.ts
+++ b/src/lib/plan/families/nordkisa.ts
@@ -9,6 +9,13 @@ import type { CustomFix, CustomParams, CustomPart, CustomStep, PartPiece, Produc
* back and divider are dowelled and screwed onto the shelf, the side frames and back stretcher are screwed on, the
* feet go in, and the top (with cam pins) is dowelled on the right way up and held by cam locks. Both drawers are
* open at both ends: two sides screwed to two ends, the bottom slid into the grooves.
+ *
+ * Open wardrobe with sliding door: built lying on its back. Slatted shelves are dowelled and screwed between the
+ * left ladder frame and the middle one, the slatted back of the closed side goes underneath, two plain shelves and
+ * the slatted bench shelf go in, then the right frame. The bottom is dowelled and screwed onto the frames' ends and
+ * the leg frame (two end frames joined by two long rails, feet screwed in) is screwed under it. Stood up by two, the
+ * rest of the screws go in, the clothes rail hangs between the middle and right frames, the top goes on dowels, the
+ * door is hooked into its track and the top is screwed down. A strap ties it to the wall.
*/
const at = (kind: CustomFix["kind"], pts: Vec3[], dir: Vec3, on?: string, mate?: string, o: Partial<CustomFix> = {}): CustomFix => ({ kind, count: pts.length, at: pts, dir, on, mate, ...o });
@@ -243,12 +250,275 @@ function dressingTable(): CustomParams {
return { parts, steps };
}
+
+/** A flat panel of slats between two edge bars: slats along `along` ("x" across, "y" up), the bars at its ends. */
+function slatted(size: Vec3, along: "x" | "y" | "z", n: number): PartPiece[] {
+ const [w, h, d] = size;
+ if (along === "y") {
+ // a standing back: bars top and bottom, slats upright
+ const g = (w - 20) / n;
+ return [
+ box([w, 30, d], [0, h / 2 - 15, 0]),
+ box([w, 30, d], [0, -h / 2 + 15, 0]),
+ ...Array.from({ length: n }, (_, i) => box([g * 0.55, h - 60, d * 0.7], [-w / 2 + 10 + g * (i + 0.5), 0, 0])),
+ ];
+ }
+ // a shelf: bars front and back, slats running side to side
+ const g = (d - 60) / n;
+ return [
+ box([w, h, 30], [0, 0, -d / 2 + 15]),
+ box([w, h, 30], [0, 0, d / 2 - 15]),
+ ...Array.from({ length: n }, (_, i) => box([w, h * 0.7, g * 0.55], [0, 0, -d / 2 + 30 + g * (i + 0.5)])),
+ ];
+}
+
+/** A ladder frame: two stiles, front and back, with rungs between them. */
+function ladder(id: string, name: string, x: number, y0: number, y1: number, zl: number, rungs: number[]): CustomPart {
+ const h = y1 - y0, yc = (y0 + y1) / 2, P = 30;
+ return {
+ id,
+ name,
+ size: [P, h, 2 * zl + P],
+ pos: [x, yc, 0],
+ material: "wood",
+ pieces: [...SIDES.map((sz) => box([P, h, P], [0, 0, sz * zl])), ...rungs.map((y) => box([P, P, 2 * zl - P], [0, y - yc, 0]))],
+ };
+}
+
+function openWardrobe(): CustomParams {
+ // IKEA: 120 wide, 47 deep, 186 high; the door covers the closed left side
+ const W = 1200, D = 470, H = 1860;
+ const T = 20, P = 30;
+ const yB = 150, yF0 = yB + T, yF1 = H - T; // bottom board on the legs, frames between bottom and top
+ const zl = 205; // stile centres
+ const xL = -W / 2 + P / 2, xM = 55, xR = W / 2 - P / 2;
+ const li = xL + P / 2, mi = xM - P / 2, mo = xM + P / 2, ri = xR - P / 2; // inner faces
+ const yA = 1420, yS = 1050, yC = 680, yP1 = 400, yP2 = 1700; // shelf centres
+ const ends = [yF0 + P / 2, yF1 - P / 2];
+ const sw = mi - li, sx = (li + mi) / 2; // the closed side's inside
+ const rw = ri - mo, rx = (mo + ri) / 2;
+ const sd = 2 * zl; // shelves reach the middle of the stiles, the back sits behind them
+ const zBk = -(sd / 2) - 7.5;
+ const hBk = (yF1 - yF0) / 2;
+ const yRail = 1800, hx0 = mo + 15, hx1 = ri - 15;
+ const legX = W / 2 - 30, legZ = D / 2 - 40, LG = 40;
+ const doorW = mi - (xL - P / 2) + 10, doorH = yF1 - yF0 - 30, zDoor = zl + P / 2 + 13;
+ const shelf = (id: string, name: string, w: number, x: number, y: number, slats: boolean): CustomPart => ({
+ id, name, size: [w, T, sd], pos: [x, y, 0], material: "wood", ...(slats ? { pieces: slatted([w, T, sd], "z", 8) } : {}),
+ });
+ const legFrame = (id: string, s: number): CustomPart => ({
+ id, name: "Leg frame", size: [LG, yB, 2 * legZ + LG], pos: [s * legX, yB / 2, 0], material: "wood",
+ pieces: [...SIDES.map((sz) => box([LG, yB, LG], [0, 0, sz * legZ])), box([LG, 40, 2 * legZ - LG], [0, yB / 2 - 20, 0])],
+ });
+ const parts: CustomPart[] = [
+ ladder("FL", "Left frame", xL, yF0, yF1, zl, [...ends, yC, yS, yA]),
+ shelf("SA", "Slatted shelf", sw, sx, yA, true),
+ shelf("SB", "Slatted shelf", sw, sx, yS, true),
+ ladder("FM", "Middle frame", xM, yF0, yF1, zl, [...ends, yC, yS, yA]),
+ shelf("SC", "Slatted shelf", sw, sx, yC, true),
+ { id: "BK1", name: "Slatted back", size: [sw, hBk, 15], pos: [sx, yF0 + hBk / 2, zBk], material: "wood", pieces: slatted([sw, hBk, 15], "y", 12) },
+ { id: "BK2", name: "Slatted back", size: [sw, hBk, 15], pos: [sx, yF0 + hBk * 1.5, zBk], material: "wood", pieces: slatted([sw, hBk, 15], "y", 12) },
+ shelf("P1", "Plain shelf", sw, sx, yP1, false),
+ shelf("P2", "Plain shelf", sw, sx, yP2, false),
+ shelf("RB", "Slatted bench shelf", rw, rx, yC, true),
+ ladder("FR", "Right frame", xR, yF0, yF1, zl, [...ends, yC, 1250, 1500]),
+ { id: "BT", name: "Bottom", size: [W, T, D], pos: [0, yB + T / 2, 0], material: "wood" },
+ legFrame("LF1", -1),
+ legFrame("LF2", 1),
+ ...SIDES.map((sz, i): CustomPart => ({ id: `LR${i}`, name: "Long rail", size: [2 * legX - LG, 50, 25], pos: [0, yB - 25, sz * legZ], material: "wood" })),
+ ...SIDES.map((s, i): CustomPart => ({ id: `CH${i}`, name: "Rail holder", size: [30, 45, 30], pos: [s < 0 ? mo + 15 : ri - 15, yF1 - 22.5, 0], material: "wood" })),
+ { id: "CR", name: "Clothes rail", size: [25, hx1 - hx0 - 30, 25], pos: [rx, yRail, 0], shape: "cyl", material: "wood", rot: [0, 0, Math.PI / 2] },
+ { id: "TP", name: "Top", size: [W, T, D], pos: [0, H - T / 2, 0], material: "wood" },
+ { id: "DR", name: "Sliding door", size: [doorW, doorH, 22], pos: [(xL - P / 2 + mi + 10) / 2, yF0 + 15 + doorH / 2, zDoor], material: "wood", pieces: slatted([doorW, doorH, 22], "y", 16) },
+ ];
+ // the long Allen screws, through a frame's stile into the end of a shelf
+ const zs = zl - 7;
+ const thru = (frame: "FL" | "FM" | "FR", into: string, y: number, zz: number[] = [-zs, zs], fromRight = false): CustomFix => {
+ const x = frame === "FL" ? xL - P / 2 : frame === "FR" ? xR + P / 2 : fromRight ? mo : mi;
+ const dir: Vec3 = frame === "FL" || (frame === "FM" && !fromRight) ? [1, 0, 0] : [-1, 0, 0];
+ return at("bolt", zz.map((z): Vec3 => [x, y, z]), dir, frame, into, BOLT);
+ };
+ const endDowels = (id: string, y: number, zz: number[]) => [
+ at("dowel", zz.map((z): Vec3 => [li, y, z]), [-1, 0, 0], id, "FL"),
+ at("dowel", zz.map((z): Vec3 => [mi, y, z]), [1, 0, 0], id, "FM"),
+ ];
+ const fx = [xL, xM, xR];
+ const topPts = (y: number) => fx.flatMap((x) => [-zl, 0, zl].map((z): Vec3 => [x, y, z]));
+ const steps: CustomStep[] = [
+ { title: "Tap dowels into the ends of a slatted shelf", detail: "Three in each end. Peel off any protective film first.", fix: endDowels("SA", yA, [-120, 0, 120]), wait: ["SA"], tools: ["hammer"] },
+ { title: "Tap dowels into the second slatted shelf", detail: "Two in each end, the bars of the slats facing the same way as on the first.", fix: endDowels("SB", yS, [-100, 100]), wait: ["SB"], tools: ["hammer"] },
+ {
+ title: "Screw the first shelf to the left frame",
+ detail: "Lay the frame on its back edge on a rug. Check the slats face up and the holes face in, then two long screws through the stiles.",
+ add: ["FL", "SA"],
+ fix: [thru("FL", "SA", yA)],
+ tools: ["allen"],
+ pose: "+z",
+ warnings: ["floor"],
+ },
+ { title: "Tap dowels into the third slatted shelf", detail: "Two in each end.", fix: endDowels("SC", yC, [-100, 100]), wait: ["SC"], tools: ["hammer"] },
+ { title: "Fit the middle frame onto the shelf", detail: "Press it onto the dowels and drive two screws through its stiles.", add: ["FM"], fix: [thru("FM", "SA", yA, undefined, true)], tools: ["allen"] },
+ {
+ title: "Slide in the other two slatted shelves",
+ detail: "Ease each one between the frames onto the dowels in the left frame, then four screws through the left frame.",
+ add: ["SB", "SC"],
+ fix: [thru("FL", "SB", yS), thru("FL", "SC", yC)],
+ tools: ["allen"],
+ },
+ {
+ title: "Join the two halves of the slatted back",
+ detail: "Four dowels in the edge of one half, then press the other half on so they make one long panel.",
+ add: ["BK1", "BK2"],
+ fix: [at("dowel", [-220, -75, 75, 220].map((dx): Vec3 => [sx + dx, yF0 + hBk, zBk]), [0, 1, 0], "BK1", "BK2")],
+ wait: ["BK1", "BK2"],
+ tools: ["hammer"],
+ },
+ { title: "Slide the back under the frame", detail: "Lift the frame a little and slide the back in under it, slats down, so it sits between the two frames.", add: ["BK1", "BK2"], from: { BK1: [0, 0, -260], BK2: [0, 0, -260] }, people: 2, warnings: ["two"] },
+ {
+ title: "Tap dowels into the plain shelves",
+ detail: "Four along the back edge of each one: they go into the slatted back.",
+ fix: [at("dowel", [-200, -70, 70, 200].map((dx): Vec3 => [sx + dx, yP1, -sd / 2]), [0, 0, -1], "P1", "BK1"), at("dowel", [-200, -70, 70, 200].map((dx): Vec3 => [sx + dx, yP2, -sd / 2]), [0, 0, -1], "P2", "BK2")],
+ wait: ["P1", "P2"],
+ tools: ["hammer"],
+ },
+ {
+ title: "Fit the plain shelves",
+ detail: "Lower each one onto the back's dowels, the holes in its ends towards the frames, then two screws through the left frame into each.",
+ add: ["P1", "P2"],
+ from: { P1: [0, 0, 250], P2: [0, 0, 250] },
+ fix: [thru("FL", "P1", yP1), thru("FL", "P2", yP2)],
+ tools: ["allen"],
+ },
+ { title: "Slide in the slatted bench shelf", detail: "On the other side of the middle frame, at the height of the lowest slatted shelf.", add: ["RB"], from: { RB: [300, 0, 0] } },
+ {
+ title: "Screw on the right frame",
+ detail: "Two screws through it into the bench shelf, two through the middle frame into the bench and two into the shelf beside it.",
+ add: ["FR"],
+ fix: [thru("FR", "RB", yC), thru("FM", "RB", yC), thru("FM", "SB", yS, undefined, true)],
+ tools: ["allen"],
+ },
+ {
+ title: "Tap dowels into the frames' bottom ends",
+ detail: "Two in each frame.",
+ fix: fx.map((x, i) => at("dowel", [-100, 100].map((z): Vec3 => [x, yF0, z]), [0, -1, 0], ["FL", "FM", "FR"][i], "BT")),
+ tools: ["hammer"],
+ },
+ { title: "Swing the bottom onto the dowels", detail: "Hold it upright against the frames' ends and push it on evenly.", add: ["BT"], from: { BT: [0, -250, 0] } },
+ {
+ title: "Screw the bottom to the frames",
+ detail: "Nine long screws through the bottom, three into each frame.",
+ fix: [at("bolt", topPts(yB), [0, 1, 0], "BT", undefined, BOLT)],
+ tools: ["allen"],
+ },
+ {
+ title: "Join the leg frames with the long rails",
+ detail: "Four screws, one through each leg into the end of a rail. The holes for the dowels face up.",
+ add: ["LF1", "LF2", "LR0", "LR1"],
+ wait: ["LF1", "LF2", "LR0", "LR1"],
+ fix: SIDES.map((s, i) => at("bolt", SIDES.map((sz): Vec3 => [s * (legX + LG / 2), yB - 25, sz * legZ]), [-s, 0, 0], `LF${i}`, undefined, BOLT)),
+ tools: ["allen"],
+ },
+ {
+ title: "Screw a foot into each leg",
+ detail: "By hand, all the way in. Turn them later to level the wardrobe.",
+ fix: [at("foot", SIDES.flatMap((s) => SIDES.map((sz): Vec3 => [s * legX, 0, sz * legZ])), [0, 1, 0], undefined, undefined, { len: 14, dia: 30 })],
+ },
+ {
+ title: "Turn the base over and tap in the dowels",
+ detail: "Two in the top of each leg frame and two in each long rail.",
+ fix: [
+ ...SIDES.map((s, i) => at("dowel", [-120, 120].map((z): Vec3 => [s * legX, yB, z]), [0, 1, 0], `LF${i}`, "BT")),
+ ...SIDES.map((sz, i) => at("dowel", [-300, 300].map((x): Vec3 => [x, yB, sz * legZ]), [0, 1, 0], `LR${i}`, "BT")),
+ ],
+ tools: ["hammer"],
+ },
+ { title: "Push the base onto the bottom", detail: "Its dowels go into the holes in the bottom.", add: ["LF1", "LF2", "LR0", "LR1"], from: { LF1: [0, -300, 0], LF2: [0, -300, 0], LR0: [0, -300, 0], LR1: [0, -300, 0] } },
+ {
+ title: "Screw the base to the bottom",
+ detail: "Ten screws up through the rails into the bottom. Then stand the wardrobe up together.",
+ fix: [
+ ...SIDES.map((s, i) => at("bolt", [-80, 80].map((z): Vec3 => [s * legX, yB - 40, z]), [0, 1, 0], `LF${i}`, "BT", BOLT)),
+ ...SIDES.map((sz, i) => at("bolt", [-400, 0, 400].map((x): Vec3 => [x, yB - 40, sz * legZ]), [0, 1, 0], `LR${i}`, "BT", BOLT)),
+ ],
+ tools: ["allen"],
+ people: 2,
+ warnings: ["two"],
+ },
+ {
+ title: "Stand it up and drive the last screws",
+ detail: "Seven more: through the middle frame into the shelves beside it, and one through the left frame into the foot of the back.",
+ fix: [
+ thru("FM", "SC", yC, undefined, true),
+ thru("FM", "P1", yP1, undefined, true),
+ thru("FM", "P2", yP2, undefined, true),
+ at("bolt", [[xL - P / 2, yF0 + 15, zBk]], [1, 0, 0], "FL", "BK1", BOLT),
+ ],
+ tools: ["allen"],
+ pose: "+y",
+ people: 2,
+ warnings: ["two"],
+ },
+ {
+ title: "Screw the clothes rail between its holders",
+ detail: "One screw through each holder into an end of the rail.",
+ add: ["CH0", "CH1", "CR"],
+ wait: ["CH0", "CH1", "CR"],
+ fix: SIDES.map((s, i) => at("bolt", [[s < 0 ? mo : ri, yRail, 0]], [-s, 0, 0], `CH${i}`, "CR", BOLT)),
+ tools: ["allen"],
+ },
+ {
+ title: "Screw the rail to the frames",
+ detail: "The holders go against the top rungs of the middle and right frames. One screw through each frame.",
+ add: ["CH0", "CH1", "CR"],
+ from: { CH0: [0, -250, 0], CH1: [0, -250, 0], CR: [0, -250, 0] },
+ fix: [at("bolt", [[xM - P / 2, yF1 - 15, 0]], [1, 0, 0], "FM", "CH0", BOLT), at("bolt", [[xR + P / 2, yF1 - 15, 0]], [-1, 0, 0], "FR", "CH1", BOLT)],
+ tools: ["allen"],
+ },
+ {
+ title: "Tap dowels into the tops of the frames",
+ detail: "Two in each frame.",
+ fix: fx.map((x, i) => at("dowel", [-100, 100].map((z): Vec3 => [x, yF1, z]), [0, 1, 0], ["FL", "FM", "FR"][i], "TP")),
+ tools: ["hammer"],
+ },
+ { title: "Lay the top on", detail: "Press it down onto the dowels, front edge over the door's side.", add: ["TP"] },
+ {
+ title: "Hook the door into the top",
+ detail: "Tilt the door in at the front of the closed side, lift its two hooks into the track under the top and let it hang. Its foot goes in the guide at the bottom.",
+ add: ["DR"],
+ from: { DR: [0, 0, 300] },
+ fix: [at("hook", [-1, 1].map((k): Vec3 => [(xL - P / 2 + mi + 10) / 2 + k * (doorW / 2 - 80), yF1 - 15, zDoor]), [0, 1, 0], "DR", undefined, { name: "Door hook", len: 20, dia: 20 })],
+ warnings: ["hand"],
+ },
+ {
+ title: "Screw the top down",
+ detail: "Nine screws down through the top into the frames. Use a step stool, not the wardrobe, to reach.",
+ fix: [at("bolt", topPts(H), [0, -1, 0], "TP", undefined, BOLT)],
+ tools: ["allen"],
+ },
+ {
+ title: "Tie it to the wall",
+ detail: "Screw the strap under the top at the back, then to the wall with a plug and screw. Wall screws and plugs depend on your wall.",
+ fix: [
+ at("strap", [[xM, H - T - 10, -D / 2 - 2]], [0, 0, -1], "TP", undefined, { len: 110, dia: 20 }),
+ at("screw", [[xM, H - T, -D / 2 + 30]], [0, 1, 0], "TP", undefined, { len: 12, dia: 4, included: true }),
+ at("washer", [[xM, H - T - 10, -D / 2 - 3], [xM, H - T - 10, -D / 2 - 6]], [0, 0, -1], undefined, undefined, { dia: 12 }),
+ at("plug", [[xM, H - T - 10, -D / 2 - 40]], [0, 0, -1]),
+ at("screw", [[xM, H - T - 10, -D / 2 - 6]], [0, 0, -1], undefined, undefined, { len: 50, dia: 5 }),
+ ],
+ tools: ["screwdriver", "drill", "pencil"],
+ warnings: ["wall", "tip"],
+ },
+ ];
+ return { parts, steps };
+}
+
const family: Family = {
names: ["NORDKISA"],
recipe(s: ProductSpec) {
const slug = s.slug ?? "";
if (/bedside-table/.test(slug)) return bedside();
if (/dressing-table/.test(slug)) return dressingTable();
+ if (/open-wardrobe/.test(slug)) return openWardrobe();
return null;
},
};
diff --git a/src/lib/plan/families/norrudden.ts b/src/lib/plan/families/norrudden.ts
new file mode 100644
index 0000000..dc828fc
--- /dev/null
+++ b/src/lib/plan/families/norrudden.ts
@@ -0,0 +1,109 @@
+import type { Family } from "./family";
+import type { PartPiece, ProductSpec, Vec3 } from "../../types";
+import type { PlanBuilder } from "../builder";
+
+/**
+ * NORRUDDEN guest bed, read from its manual: it comes in one piece, a steel frame in two halves hinged in the
+ * middle, folded with its mattress inside and the leg frames folded flat. The four castors go on the hinge plates at
+ * the fold, each with a washer and a cap nut. The leg frames of the top half swing out until their four latches
+ * click, the bundle is turned over and the other half's legs swing out, the strap is undone and the top half is
+ * lifted up and laid out flat. To store it, the same in reverse: fold it, strap it and stand it on its castors.
+ * IKEA: 80 x 193, 30 high.
+ */
+
+/** Euler angles (x then z) that turn a part's y axis onto d. */
+function along(d: Vec3): Vec3 {
+ const n = Math.hypot(...d);
+ const [x, y, z] = [d[0] / n, d[1] / n, d[2] / n];
+ return [Math.atan2(z, y), 0, Math.atan2(-x, Math.hypot(y, z))];
+}
+
+function rod(a: Vec3, b: Vec3, dia: number): PartPiece {
+ const d: Vec3 = [b[0] - a[0], b[1] - a[1], b[2] - a[2]];
+ return { shape: "cyl", size: [dia, Math.hypot(...d), dia], pos: [(a[0] + b[0]) / 2, (a[1] + b[1]) / 2, (a[2] + b[2]) / 2], rot: along(d) };
+}
+
+/** Where a point ends up turned by c about the z axis through pivot p. */
+function spin(v: Vec3, p: [number, number], c: number): Vec3 {
+ const x = v[0] - p[0], y = v[1] - p[1];
+ return [p[0] + x * Math.cos(c) - y * Math.sin(c), p[1] + x * Math.sin(c) + y * Math.cos(c), v[2]];
+}
+
+function build(b: PlanBuilder, s: ProductSpec) {
+ const L = Math.round(s.size.w * 10) || 1930, Wd = Math.round(s.size.d * 10) || 800, H = Math.round(s.size.h * 10) || 300;
+ const h = L / 2;
+ const MT = 100; // mattress
+ const yR = H - MT - 25; // the frame's side rails
+ const zr = Wd / 2 - 15;
+ const xLeg = h - 230; // the leg frames hang from the rails this far out from the middle
+ const yHinge = yR - 12;
+ const half = (g: 1 | -1) => {
+ const pieces: PartPiece[] = [
+ ...[-1, 1].map((sz): PartPiece => ({ shape: "box", size: [h - 10, 25, 25], pos: [(g * h) / 2, yR, sz * zr] })),
+ { shape: "box", size: [25, 25, 2 * zr + 25], pos: [g * (h - 17), yR, 0] },
+ { shape: "box", size: [h - 40, 4, 2 * zr - 20], pos: [(g * h) / 2, yR + 12, 0] },
+ // the hinge plates at the fold, which take the castors
+ ...[-1, 1].map((sz): PartPiece => ({ shape: "box", size: [90, 80, 5], pos: [g * 50, yR - 45, sz * (zr + 15)] })),
+ { shape: "box", size: [h - 6, MT, Wd - 10], pos: [(g * h) / 2, H - MT / 2, 0], material: "soft" },
+ ];
+ return b.compound(g < 0 ? "Head half" : "Foot half", pieces, { material: "metal" });
+ };
+ const legs = (g: 1 | -1) => {
+ const xt = g * xLeg, xf = g * (xLeg + 70), zl = zr - 20;
+ const pieces: PartPiece[] = [rod([xt, yHinge, -zl], [xt, yHinge, zl], 18), rod([xf, 10, -zl], [xf, 10, zl], 18)];
+ for (const sz of [-1, 1]) pieces.push(rod([xt, yHinge, sz * zl], [xf, 10, sz * zl], 18));
+ return b.compound("Leg frame", pieces, { material: "metal" });
+ };
+ const HH = half(-1), HF = half(1), LH = legs(-1), LF = legs(1);
+ const kH = b.place(HH.type, HH.mid), kF = b.place(HF.type, HF.mid);
+ const kLH = b.place(LH.type, LH.mid), kLF = b.place(LF.type, LF.mid);
+ // the foot half folds over onto the head half, mattress to mattress, about the hinge at the mattress's top
+ const fold: [number, number] = [0, H];
+ const legFold = (m: Vec3, g: number): { pos: Vec3; c: number } => ({ pos: spin(m, [g * xLeg, yHinge], (g * Math.PI) / 2), c: (g * Math.PI) / 2 });
+ const lhFolded = legFold(LH.mid, -1);
+ const lfFlat = legFold(LF.mid, 1);
+ const fFolded = spin(HF.mid, fold, Math.PI);
+ const fUp = spin(HF.mid, fold, Math.PI / 2);
+ // castors: two on each half's hinge plates, stems through from the fold side
+ const yC = yR - 55;
+ const castorAt = (g: number, sz: number): Vec3 => [g * 75, yC, sz * (zr + 18)];
+ b.step({ title: "Fit the castors to the folded bed", detail: "Lay it flat on a rug. Each castor's stem goes through a hinge plate at the fold, then a washer and a cap nut, tightened with the spanner.", kind: "legs", tools: ["wrench"], warnings: ["floor"] }, () => {
+ b.add(kH);
+ b.stage(kF, fFolded, [0, 0, Math.PI]);
+ b.stage(kLH, lhFolded.pos, [0, 0, lhFolded.c]);
+ b.stage(kLF, spin(lfFlat.pos, fold, Math.PI), [0, 0, lfFlat.c + Math.PI]);
+ b.then(0.1);
+ for (const [g, part] of [[-1, kH], [1, kF]] as const)
+ for (const sz of [-1, 1]) {
+ const p = castorAt(g, sz);
+ const dir: Vec3 = [-g, 0, 0];
+ b.fit({ kind: "castor", len: 50, dia: 45 }, { on: part, at: p, dir, hole: false });
+ b.fit({ kind: "washer", len: 2, dia: 16 }, { on: part, at: [p[0] - g * 8, p[1], p[2]], dir });
+ b.fit({ kind: "nut", len: 8, dia: 13, name: "Cap nut" }, { on: part, at: [p[0] - g * 12, p[1], p[2]], dir });
+ }
+ });
+ b.step({ title: "Swing out the legs on the top half", detail: "Lift each leg frame up until both latches click. Keep fingers clear of the hinges.", kind: "legs", warnings: ["hand"] }, () => {
+ b.stage(kLF, spin(LF.mid, fold, Math.PI), [0, 0, Math.PI]);
+ });
+ b.step({ title: "Turn it over and swing out the other legs", detail: "Stand it on the legs you just opened, then lift the other leg frame until its latches click.", kind: "legs", pose: "-y", warnings: ["hand"] }, () => b.add(kLH));
+ b.step({ title: "Undo the strap", detail: "Pull open the strap that holds the two halves together.", kind: "general", pose: "+y" }, () => b.wait(0.4));
+ b.step({ title: "Lift the top half up", detail: "Hold it by its end and swing it up over the hinge.", kind: "general" }, () => {
+ b.stage(kF, fUp, [0, 0, Math.PI / 2]);
+ b.stage(kLF, spin(LF.mid, fold, Math.PI / 2), [0, 0, Math.PI / 2]);
+ });
+ b.step({ title: "Lay it out flat", detail: "Lower it on the other side until it stands on its legs. Straighten the mattress.", kind: "general" }, () => {
+ b.add(kF);
+ b.add(kLF);
+ });
+ b.step({ title: "Fold it away when it's not in use", detail: "Lift one half over onto the other, close the strap, press the latches and fold the legs flat, then stand it on its castors.", kind: "general" }, () => b.wait(0.4));
+ return true;
+}
+
+const family: Family = {
+ names: ["NORRUDDEN"],
+ build(b, s) {
+ if (!/guest bed/i.test(s.variant)) return false;
+ return build(b, s);
+ },
+};
+export default family;
diff --git a/src/lib/plan/families/platsa.ts b/src/lib/plan/families/platsa.ts
index 811593a..a437b61 100644
--- a/src/lib/plan/families/platsa.ts
+++ b/src/lib/plan/families/platsa.ts
@@ -130,6 +130,15 @@ function comboOf(slug: string, W: number, H: number, D: number): Layout | null {
...[-1200, -600, 600, 1200].map((x, i) => col(x, i + 1)),
];
return { W, H, D, df: D - DOOR, frames: fs.map((f, i) => ({ ...f, id: `F${i}` })), legs: false, feet: true, top: false, wallLast: true };
+ } else if (slug === "platsa-cabinet-5-doors-180-x-42-x-103") {
+ // a 60 frame, two 40 frames stacked, and a 40 frame on a 60 frame, a door on each, a SPILDRA top on each column
+ cols = [
+ { hs: [600], o: [{ door: "L", inside: sh(300) }] },
+ { hs: [400, 400], o: [{ door: "L" }, { door: "L" }] },
+ { hs: [600, 400], o: [{ door: "L", inside: sh(200, 400) }, { door: "L", inside: sh(200) }] },
+ ];
+ feet = true;
+ tops = [[0, 0], [1, 1], [2, 1]];
} else return null;
const y0 = feet ? FEET : leg;
const x0 = -W / 2 + 300;
@@ -201,6 +210,14 @@ function layoutOf(s: ProductSpec): Layout | null {
];
return { W, H, D, df: D - DOOR, frames: ids(fs), legs: false, top: true, wallLast: false };
}
+ if (slug === "platsa-storage-bench-120-x-57-x-63") {
+ // two 60 frames side by side on adjustable feet under one SPILDRA top: a shelf on the left, a shelf and a basket on the right
+ const fs = [
+ ...col(-300, 600, [600], () => ({ door: "L", inside: [{ kind: "shelf", y: 300 }] }), FEET),
+ ...col(300, 600, [600], () => ({ door: "R", inside: [{ kind: "shelf", y: 340 }, { kind: "basket", y: 60 }] }), FEET),
+ ];
+ return { W, H, D, df: D - DOOR, frames: ids(fs), legs: false, feet: true, top: true, wallLast: false };
+ }
if (slug === "platsa-chest-2-drawers-60-x-57-x-53") {
return { W, H, D, df: D - DOOR, frames: ids(col(0, 600, [400], () => ({ drawers: 2 }), LEG)), legs: true, top: true, wallLast: false };
}
diff --git a/src/lib/plan/families/ragrund.ts b/src/lib/plan/families/ragrund.ts
index cf47660..b810e56 100644
--- a/src/lib/plan/families/ragrund.ts
+++ b/src/lib/plan/families/ragrund.ts
@@ -8,6 +8,8 @@ import type { CustomFix, CustomParams, CustomPart, CustomStep, PartPiece, Produc
* slatted shelf goes in between the legs on four more long bolts.
* Shelving unit: lying on its back, the four shelves stand on one ready-made side ladder with two bolts at each
* end, the other ladder goes on top the same way, and stood up a bracket under the top shelf holds it to the wall.
+ * Tall 33 cm unit: a deep lower section (two ladders, four shelves) and a shallow upper one (two short ladders,
+ * three narrow shelves) are bolted up lying down, joined with two bolts, stood up and strapped to the wall.
* Trolley: lying on its front, the three slatted shelves stand on the front frame with two bolts each, the two
* top bars with one bolt each, the back frame goes on with eight more, then a castor is screwed to each post end.
*/
@@ -143,6 +145,95 @@ function shelving(s: ProductSpec): CustomParams {
return { parts, steps };
}
+/* ---------------------------------------------------------------- tall shelving unit (33 cm) */
+
+/**
+ * The tall 33 cm unit is two sections: a deep lower one of two ladders and four shelves, and a shallow upper one of
+ * two short ladders and three narrow shelves that stands on the lower top shelf at the back. All 30 bolts are the same.
+ */
+function tower(s: ProductSpec): CustomParams {
+ const W = Math.round(s.size.w * 10) || 330, H = Math.round(s.size.h * 10) || 1630, D = Math.round(s.size.d * 10) || 280;
+ const P = 28, ST = 18, UT = 15, BL = 50;
+ const BOLT = { kind: "bolt" as const, name: "Allen bolt", len: BL, dia: 6 };
+ const px = W / 2 - P / 2, pz = D / 2 - P / 2, iw = W - 2 * P;
+ const HL = Math.round(H * 0.62); // the lower section's posts
+ const tops = [160, Math.round(HL * 0.49), Math.round(HL * 0.735), HL - 20]; // lower shelves, bottom up
+ const sy = (i: number) => tops[i] - ST / 2;
+ const ladder = (h: number, d: number, rungs: number[], rh: number[]): PartPiece[] => [
+ ...[-1, 1].map((z): PartPiece => ({ shape: "box", size: [P, h, P], pos: [0, 0, z * (d / 2 - P / 2)] })),
+ ...rungs.map((y, i): PartPiece => ({ shape: "box", size: [20, rh[i], d - 2 * P], pos: [0, y - h / 2, 0] })),
+ ];
+ const lower = ladder(HL, D, [40, HL - 35], [30, 30]);
+ // the upper section, as wide as the space between the lower posts and a little under half as deep
+ const UW = iw, UD = 130, uy0 = tops[3], UH = H - uy0;
+ const ux = UW / 2 - P / 2, uz = -D / 2 + UD / 2, uzp = UD / 2 - P / 2, uiw = UW - 2 * P;
+ const utops = [uy0 + Math.round(UH * 0.33), uy0 + Math.round(UH * 0.66), H - 10];
+ const upper = ladder(UH, UD, [20, UH - 40], [40, 30]);
+ const parts: CustomPart[] = [
+ { id: "L", name: "Side ladder", size: [P, HL, D], pos: [-px, HL / 2, 0], material: "wood", pieces: lower },
+ ...tops.map((_, i): CustomPart => ({ id: `S${i}`, name: "Shelf", size: [iw, ST, D], pos: [0, sy(i), 0], material: "wood" })),
+ { id: "R", name: "Side ladder", size: [P, HL, D], pos: [px, HL / 2, 0], material: "wood", pieces: lower },
+ { id: "UL", name: "Short ladder", size: [P, UH, UD], pos: [-ux, uy0 + UH / 2, uz], material: "wood", pieces: upper },
+ ...utops.map((t, i): CustomPart => ({ id: `U${i}`, name: "Narrow shelf", size: [uiw, UT, UD], pos: [0, t - UT / 2, uz], material: "wood" })),
+ { id: "UR", name: "Short ladder", size: [P, UH, UD], pos: [ux, uy0 + UH / 2, uz], material: "wood", pieces: upper },
+ ];
+ const lowerBolts = (g: number, shelves: number[]): CustomFix => ({
+ ...BOLT,
+ count: shelves.length * 2,
+ on: g < 0 ? "L" : "R",
+ at: shelves.flatMap((i) => [-1, 1].map((z) => pt(g * (W / 2), sy(i), z * pz))),
+ dir: [-g, 0, 0],
+ });
+ const upperBolts = (g: number): CustomFix => ({
+ ...BOLT,
+ count: 6,
+ on: g < 0 ? "UL" : "UR",
+ at: utops.flatMap((t) => [-1, 1].map((z) => pt(g * (UW / 2), t - UT / 2, uz + z * uzp))),
+ dir: [-g, 0, 0],
+ });
+ const sb = tops[3] - ST; // under the lower top shelf
+ const steps: CustomStep[] = [
+ {
+ title: "Stand the top shelf on a side ladder",
+ detail: "Lay one long ladder flat on a rug and stand the shelf up at its top end, holes lined up with the posts.",
+ add: ["L", "S3"],
+ pose: "+x",
+ warnings: ["floor"],
+ },
+ { title: "Bolt the shelf to the ladder", detail: "Two bolts through the posts, with the Allen key.", fix: [lowerBolts(-1, [3])], tools: ["allen"] },
+ { title: "Bolt on the other three shelves", detail: "Two bolts in each, the bottom shelf at the far end of the ladder.", add: ["S2", "S1", "S0"], fix: [lowerBolts(-1, [2, 1, 0])], tools: ["allen"] },
+ { title: "Bolt on the other side ladder", detail: "Lower it onto the shelves and drive in eight bolts.", add: ["R"], fix: [lowerBolts(1, [0, 1, 2, 3])], tools: ["allen"], check: "square" },
+ {
+ title: "Put the upper section together",
+ detail: "The short ladders and the three narrow shelves, two bolts at each shelf end.",
+ add: ["UL", "U0", "U1", "U2", "UR"],
+ fix: [upperBolts(-1), upperBolts(1)],
+ tools: ["allen"],
+ },
+ {
+ title: "Bolt the upper section on",
+ detail: "It sits on the top shelf of the lower section at the back. One bolt up through the shelf into each short ladder.",
+ fix: [{ ...BOLT, count: 2, on: "S3", at: [-1, 1].map((g) => pt(g * ux, sb, uz)), dir: [0, 1, 0] }],
+ tools: ["allen"],
+ },
+ { title: "Stand it up", detail: "Lift it with a helper onto its feet, close to the wall.", pose: "+y", people: 2 },
+ {
+ title: "Fix it to the wall",
+ detail: "Mark the underside of the lower top shelf on the wall, screw the strap to the wall 30 mm below, then screw the strap up into the shelf. Wall screws and plugs aren't included.",
+ fix: [
+ { kind: "strap", count: 1, on: "S3", at: [pt(0, sb, -D / 2 + 25)], dir: [0, 1, 0] },
+ { kind: "screw", count: 1, len: 16, dia: 4, included: true, on: "S3", at: [pt(0, sb, -D / 2 + 30)], dir: [0, 1, 0] },
+ { kind: "plug", count: 1, at: [pt(0, sb - 30, -D / 2 - 20)], dir: [0, 0, -1] },
+ { ...W_SCREW, count: 1, at: [pt(0, sb - 30, -D / 2 - 4)], dir: [0, 0, -1] },
+ ],
+ tools: ["screwdriver", "drill", "pencil", "tape"],
+ wall: true,
+ warnings: ["wall", "tip"],
+ },
+ ];
+ return { parts, steps };
+}
+
/* ---------------------------------------------------------------- trolley */
function trolley(s: ProductSpec): CustomParams {
@@ -207,6 +298,7 @@ const family: Family = {
recipe(s) {
const slug = s.slug ?? "";
if (/^ragrund-bench/.test(slug)) return bench(s);
+ if (slug === "ragrund-shelving-unit-33") return tower(s);
if (/^ragrund-shelving-unit/.test(slug)) return shelving(s);
if (/^ragrund-trolley/.test(slug)) return trolley(s);
return null;
diff --git a/src/lib/plan/families/resaro.ts b/src/lib/plan/families/resaro.ts
new file mode 100644
index 0000000..19aa009
--- /dev/null
+++ b/src/lib/plan/families/resaro.ts
@@ -0,0 +1,193 @@
+import type { Family } from "./family";
+import type { CustomFix, CustomParams, CustomPart, CustomStep, PartPiece, ProductSpec, Vec3 } from "../../types";
+
+/**
+ * RESARÖ mobile drop-leaf table, read from its manual. A pine cart: two ladder side frames joined by four rails on
+ * dowels and long bolts into barrel nuts, built lying on its side on a rug. The lower panel (its leaf already hinged
+ * on) and two grey shelves go in between, the other side frame closes it, then a wheel on each side frame and two
+ * plastic feet at the other end. Standing up, a swing arm on two pivot brackets holds the upper leaf; two box panels
+ * stand on the lower panel and the top (its leaf hinged on too) locks onto them and the posts with ten cam locks.
+ * Lying on its back again, a gate leg frame is hinged to the end under the lower leaf.
+ * Drawn with both leaves up, as on IKEA's photo: 41 cm long folded, 123 cm open.
+ */
+
+type Kind = CustomFix["kind"];
+const fx = (kind: Kind, on: string | undefined, dir: Vec3, at: Vec3[], o: Partial<CustomFix> = {}): CustomFix => ({ kind, count: at.length, on, dir, at, ...o });
+
+const BOLT = { len: 80, dia: 6 }; // the long Allen bolts
+const NUT = { name: "Barrel nut", len: 14, dia: 10 };
+const CAM_BOLT = { len: 34, dia: 6 };
+const CAM = { dia: 15 };
+
+function recipe(s: ProductSpec): CustomParams {
+ const H = 910, L = 410, DZ = 640; // top height, the cart's length and the leaves' width
+ const PT = 18, PW = 36, LZ = 225; // panels, posts, the ladders' outer faces
+ const zl = LZ - 15, zi = LZ - 30; // ladder centre and inner face
+ const xp = L / 2 - PW / 2, xpi = xp - PW / 2; // posts and their inner faces
+ const y0 = 20, yTop = H - PT; // posts from just above the floor to under the top
+ const yP1 = 700; // the lower panel's underside
+ const yRl = 100, yRh = yP1 - 40; // cross rails
+ const ladder = (id: string, sz: -1 | 1): CustomPart => {
+ const cy = (y0 + yTop) / 2;
+ const slat = (y: number, h = 40): PartPiece => ({ shape: "box", size: [2 * xpi, h, 18], pos: [0, y - cy, 0] });
+ return {
+ id,
+ name: "Side frame",
+ size: [L, yTop - y0, 30],
+ pos: [0, cy, sz * zl],
+ material: "wood",
+ pieces: [
+ ...[-1, 1].map((sx): PartPiece => ({ shape: "box", size: [PW, yTop - y0, 30], pos: [sx * xp, 0, 0] })),
+ slat(yRl, 60),
+ ...[230, 360, 490, 620].map((y) => slat(y)),
+ slat(yTop - 30, 60),
+ ],
+ };
+ };
+ const rails = [-1, 1].flatMap((sx) => [yRl, yRh].map((y) => [sx, y] as const));
+ const yS = [140, 420]; // shelves' undersides
+ const yB0 = yP1 + PT, boxH = yTop - yB0, zb = zi - 9;
+ const parts: CustomPart[] = [
+ ladder("LA", -1),
+ ...rails.map(([sx, y], i): CustomPart => ({ id: `R${i}`, name: "Rail", size: [PW, 60, 2 * zi], pos: [sx * xp, y, 0], material: "wood" })),
+ { id: "P1", name: "Lower panel", size: [L, PT, DZ], pos: [0, yP1 + PT / 2, 0], material: "wood" },
+ { id: "L1", name: "Lower leaf", size: [L, PT, DZ], pos: [-L, yP1 + PT / 2, 0], material: "wood" },
+ ...yS.map((y, i): CustomPart => ({ id: `S${i}`, name: "Shelf", size: [2 * xpi, PT, 2 * zi], pos: [0, y + PT / 2, 0], material: "board" })),
+ ladder("LB", 1),
+ ...[-1, 1].map((sz, i): CustomPart => ({ id: `W${i}`, name: "Wheel", size: [120, 30, 120], pos: [xp, 60, sz * (LZ + 15)], shape: "cyl", rot: [Math.PI / 2, 0, 0], material: "metal" })),
+ { id: "AR", name: "Leaf support", size: [240, 50, 22], pos: [L / 2 + 120, yTop - 40, zl], material: "wood" },
+ ...[-1, 1].map((sz, i): CustomPart => ({ id: `B${i}`, name: "Box panel", size: [2 * xpi, boxH, 18], pos: [0, yB0 + boxH / 2, sz * zb], material: "wood" })),
+ { id: "P2", name: "Top", size: [L, PT, DZ], pos: [0, H - PT / 2, 0], material: "wood" },
+ { id: "L2", name: "Upper leaf", size: [L, PT, DZ], pos: [L, H - PT / 2, 0], material: "wood" },
+ {
+ id: "G",
+ name: "Gate leg frame",
+ size: [380, yP1, 36],
+ pos: [-L / 2 - 190, yP1 / 2, zl],
+ material: "wood",
+ pieces: [
+ { shape: "box", size: [36, yP1 - 40, 36], pos: [190 - 18, 20, 0] },
+ { shape: "box", size: [36, yP1, 36], pos: [-190 + 18, 0, 0] },
+ { shape: "box", size: [380 - 72, 50, 30], pos: [0, 100 - yP1 / 2, 0] },
+ { shape: "box", size: [380 - 72, 50, 30], pos: [0, yP1 / 2 - 45, 0] },
+ ],
+ },
+ ];
+
+ const railIds = rails.map((_, i) => `R${i}`);
+ const railDowels = rails.flatMap(([sx, y], i) =>
+ [-1, 1].map((sz) => fx("dowel", `R${i}`, [0, 0, -sz], [-15, 15].map((dy) => [sx * xp, y + dy, sz * zi] as Vec3))),
+ );
+ const railBolts = (sz: -1 | 1, id: string) => [
+ fx("bolt", id, [0, 0, -sz], rails.map(([sx, y]) => [sx * xp, y, sz * LZ] as Vec3), BOLT),
+ fx("nut", undefined, [0, -1, 0], rails.map(([sx, y]) => [sx * xp, y + 30, sz * (zi - 40)] as Vec3), NUT),
+ ];
+ const wheel = (i: number) => {
+ const sz = i ? 1 : -1;
+ return [
+ fx("bolt", `W${i}`, [0, 0, -sz], [[xp, 60, sz * (LZ + 30)]], { name: "Axle bolt", len: 50, dia: 8, mate: i ? "LB" : "LA" }),
+ fx("washer", `W${i}`, [0, 0, -sz], [[xp, 60, sz * (LZ + 1)]], { dia: 24 }),
+ ];
+ };
+ const block = (on: string, y: number): CustomFix[] => [
+ fx("connector", on, [0, 1, 0], [[100, y, 0]], { name: "Stop block", len: 40, dia: 60 }),
+ fx("screw", on, [0, 1, 0], [[85, y - 20, 0], [115, y - 20, 0]], { len: 30, dia: 4 }),
+ ];
+ const shelfDowels = yS.flatMap((y, i) => [-1, 1].map((sz) => fx("dowel", `S${i}`, [0, 0, -sz], [-100, 100].map((x) => [x, y + PT / 2, sz * zi] as Vec3))));
+ const postTops = [-1, 1].flatMap((sx) => [-1, 1].map((sz): Vec3 => [sx * xp, yTop, sz * zl]));
+ const boxBolts = [-1, 1].map((sz, i) => fx("camScrew", "P2", [0, 1, 0], [-110, 0, 110].map((x) => [x, yTop, sz * zb] as Vec3), { ...CAM_BOLT, mate: `B${i}` }));
+ const hingeYs = [160, yP1 - 120];
+ const hingeScrews = (into: "G" | "LA", sx: -1 | 1) =>
+ fx("screw", undefined, [sx, 0, 0], hingeYs.flatMap((y) => [-12, 12].map((dz) => [-L / 2 - sx * 4, y, zl + dz] as Vec3)), { len: 14, dia: 4, name: "Hinge screw", mate: into === "G" ? "G" : "LA" });
+
+ const steps: CustomStep[] = [
+ {
+ title: "Screw the stop block under the lower panel",
+ detail: "The lower panel comes with its leaf hinged on. Lay them face down on a rug and screw the block on, two screws.",
+ fix: block("P1", yP1),
+ wait: ["P1", "L1"],
+ tools: ["screwdriver"],
+ warnings: ["floor"],
+ },
+ { title: "Screw the cam bolts into the lower panel", detail: "Two, one over each end rail, by hand.", fix: [fx("camScrew", "P1", [0, 1, 0], [[-xp, yP1, 0], [xp, yP1, 0]], CAM_BOLT)], tools: ["screwdriver"] },
+ { title: "Tap the dowels into the rails", detail: "Two in each end of the four short rails, sixteen in all.", fix: railDowels, wait: railIds, from: Object.fromEntries(railIds.map((id) => [id, [0, 0, 320] as Vec3])), tools: ["hammer"] },
+ {
+ title: "Stand the rails in one side frame",
+ detail: "Lay a side frame flat on the rug, posts along the floor, and push the rails onto it: two at each end.",
+ add: ["LA", ...railIds],
+ from: Object.fromEntries(railIds.map((id) => [id, [0, 0, 320] as Vec3])),
+ pose: "+z",
+ },
+ {
+ title: "Bolt the rails to the side frame",
+ detail: "A barrel nut into each rail, its slot facing the bolt, then a long bolt through the post into it.",
+ fix: railBolts(-1, "LA"),
+ tools: ["allen", "flathead"],
+ },
+ { title: "Bolt a wheel onto the side frame", detail: "On the outside of the post, at the end with the holes. A washer between the wheel and the bolt head.", add: ["W0"], fix: wheel(0), from: { W0: [0, 0, -160] }, tools: ["allen"] },
+ { title: "Lay the lower panel in", detail: "Over the top rails, its leaf hanging out at the end without the wheel.", add: ["P1", "L1"], from: { P1: [0, 280, 0], L1: [0, 280, 0] } },
+ { title: "Lock the lower panel's cam locks", detail: "Into the holes in the rails, arrow to the bolt, then turn clockwise.", fix: [fx("cam", "R1", [1, 0, 0], [[-xp - PW / 2, yRh + 10, 0]], CAM), fx("cam", "R3", [-1, 0, 0], [[xp + PW / 2, yRh + 10, 0]], CAM)], tools: ["screwdriver"] },
+ { title: "Tap the dowels into the shelves", detail: "Two in each end of both grey shelves.", fix: shelfDowels, wait: ["S0", "S1"], from: { S0: [0, 0, 340], S1: [0, 0, 340] }, tools: ["hammer"] },
+ { title: "Stand the shelves in", detail: "Onto the dowel holes in the side frame, the lower one near the bottom.", add: ["S0", "S1"], from: { S0: [0, 0, 340], S1: [0, 0, 340] } },
+ { title: "Tap two dowels into the lower panel", detail: "Into its edge facing up.", fix: [fx("dowel", "P1", [0, 0, -1], [[-100, yP1 + PT / 2, zi], [100, yP1 + PT / 2, zi]])], tools: ["hammer"] },
+ {
+ title: "Lay the other side frame on",
+ detail: "Press it onto all the dowels, then two bolts into barrel nuts in the lower panel.",
+ add: ["LB"],
+ from: { LB: [0, 0, 300] },
+ fix: [
+ fx("nut", "P1", [0, -1, 0], [[-xp + 40, yP1 + PT, zi - 30], [xp - 40, yP1 + PT, zi - 30]], { ...NUT, len: 10, dia: 8 }),
+ fx("bolt", "LB", [0, 0, -1], [[-xp + 40, yP1 + PT / 2, LZ], [xp - 40, yP1 + PT / 2, LZ]], { len: 60, dia: 6, mate: "P1" }),
+ ],
+ tools: ["allen"],
+ },
+ { title: "Bolt the rails to this side frame", detail: "Four more barrel nuts and long bolts, the same way.", fix: railBolts(1, "LB"), tools: ["allen", "flathead"] },
+ { title: "Bolt on the other wheel", detail: "At the same end as the first.", add: ["W1"], fix: wheel(1), from: { W1: [0, 0, 160] }, tools: ["allen"] },
+ { title: "Tap the feet into the other end", detail: "One into the bottom of each post at the end without wheels.", fix: [fx("glide", "LA", [0, 1, 0], [-1, 1].map((sz) => [-xp, y0, sz * zl] as Vec3), { name: "Foot" })], tools: ["hammer"] },
+ {
+ title: "Stand it up and fit the pivot brackets",
+ detail: "On the post at the wheel end, near the top: one bracket pointing down, one pointing up.",
+ fix: [fx("hinge", "LB", [-1, 0, 0], [[L / 2, yTop - 10, zl], [L / 2, yTop - 70, zl]], { name: "Pivot bracket", len: 30, dia: 30 })],
+ pose: "+y",
+ },
+ { title: "Fit the leaf support", detail: "Its pins go into the brackets. Four small screws hold the brackets.", add: ["AR"], fix: [fx("screw", "LB", [-1, 0, 0], [yTop - 10, yTop - 70].flatMap((y) => [-8, 8].map((dz) => [L / 2 + 6, y, zl + dz] as Vec3)), { len: 12, dia: 4 })], from: { AR: [160, 0, 0] }, tools: ["screwdriver"] },
+ { title: "Swing the support in", detail: "Turn it flat against the side frame until the leaf is up." },
+ { title: "Screw cam bolts into the tops of the posts", detail: "One in each of the four posts, by hand.", fix: [fx("camScrew", "LA", [0, -1, 0], postTops, CAM_BOLT)].map((f) => ({ ...f, on: undefined })), tools: ["screwdriver"] },
+ { title: "Tap the dowels into the box panels", detail: "Four along the bottom edge of each.", fix: [0, 1].map((i) => fx("dowel", `B${i}`, [0, -1, 0], [-120, -40, 40, 120].map((x) => [x, yB0, (i ? 1 : -1) * zb] as Vec3), { mate: "P1" })), wait: ["B0", "B1"], tools: ["hammer"] },
+ { title: "Stand the box panels on the lower panel", detail: "One inside each side frame, the handle holes at the top.", add: ["B0", "B1"], from: { B0: [0, 260, 0], B1: [0, 260, 0] } },
+ { title: "Screw the stop block under the top", detail: "The top comes with the other leaf hinged on. Two screws, like the first one.", fix: block("P2", yTop), wait: ["P2", "L2"], tools: ["screwdriver"] },
+ { title: "Screw cam bolts into the top", detail: "Six on the underside, three over each box panel.", fix: boxBolts, tools: ["screwdriver"] },
+ { title: "Lay the top on", detail: "Onto the posts and box panels, its leaf at the wheel end.", add: ["P2", "L2"], from: { P2: [0, 260, 0], L2: [0, 260, 0] } },
+ {
+ title: "Lock all ten cam locks",
+ detail: "Four in the top over the posts, three in each box panel. Arrow to the bolt, then clockwise.",
+ fix: [
+ fx("cam", "P2", [0, -1, 0], postTops.map(([x, , z]) => [x, H, z] as Vec3), CAM),
+ ...[-1, 1].map((sz, i) => fx("cam", `B${i}`, [0, 0, sz], [-110, 0, 110].map((x) => [x, yTop - 26, sz * (zb - 9)] as Vec3), CAM)),
+ ],
+ tools: ["screwdriver"],
+ },
+ { title: "Lay it on its back and open the lower leaf", detail: "Two people. Swing the leaf out flat.", pose: "+z", people: 2 },
+ {
+ title: "Hinge the gate leg frame on",
+ detail: "Screw the two hinges to the frame, then to the end of the cart under the lower leaf.",
+ add: ["G"],
+ from: { G: [-220, 0, 0] },
+ fix: [fx("hinge", "G", [1, 0, 0], hingeYs.map((y) => [-L / 2 - 1, y, zl] as Vec3), { len: 50, dia: 30 }), hingeScrews("G", -1)],
+ tools: ["screwdriver"],
+ },
+ { title: "Screw the hinges to the cart", detail: "Two screws in each hinge, into the post.", fix: [hingeScrews("LA", 1)], tools: ["screwdriver"] },
+ { title: "Tap the catch into the gate leg", detail: "At its free end, so it clicks against the leaf.", fix: [fx("clip", "G", [0, -1, 0], [[-L / 2 - 362, yP1, zl]], { name: "Catch", len: 20, dia: 30 })], tools: ["hammer"] },
+ { title: "Swing the gate leg in and stand it up", detail: "Fold the leaves down when you don't need them; the gate leg folds flat against the end.", pose: "+y", people: 2 },
+ ];
+ return { parts, steps };
+}
+
+const family: Family = {
+ names: ["RESARÖ", "RESARO"],
+ recipe(s: ProductSpec) {
+ if (!/drop-leaf/.test(s.slug ?? "")) return null;
+ return recipe(s);
+ },
+};
+export default family;
diff --git a/src/lib/plan/families/reso.ts b/src/lib/plan/families/reso.ts
new file mode 100644
index 0000000..c0ed357
--- /dev/null
+++ b/src/lib/plan/families/reso.ts
@@ -0,0 +1,127 @@
+import type { Family } from "./family";
+import type { CustomFix, CustomPart, CustomParams, HwKind, PartPiece, ProductSpec, Vec3 } from "../../types";
+
+/**
+ * RESÖ, read from the children's picnic table's manual. Each end frame is two splayed legs bolted across a bench
+ * beam, built lying flat. The slatted top comes in one piece: it is laid upside down, the two frames are stood on
+ * it and bolted to its end battens, every bolt is tightened, and it is turned over for the two benches, screwed
+ * down onto the beam ends.
+ */
+
+const fx = (kind: HwKind, at: Vec3[], dir: Vec3, on: string, more: Partial<CustomFix> = {}): CustomFix => ({ kind, count: at.length, at, dir, on, ...more });
+const BOLT = { len: 50, dia: 6 };
+const SCREW = { len: 40, dia: 4 };
+
+function recipe(s: ProductSpec): CustomParams | null {
+ if (!/picnic/i.test(s.variant)) return null;
+ // IKEA: 92 long, 89 wide with the benches, 49 high
+ const L = 920, H = 490;
+ const slat = 18, gap = 12, sw = 90, topW = 5 * sw + 4 * gap;
+ const bat = 40, batY = H - slat - bat / 2; // battens under the top, along its ends and middle
+ const batX = L / 2 - 50 - bat / 2;
+ const legT = 30, legW = 70, legX = batX + bat / 2 + legT / 2;
+ const zb = 300, zt = 150, yt = H - slat - 10; // a leg runs from the floor at zb up to zt under the top
+ const legZ = (y: number) => zb - ((zb - zt) * y) / yt;
+ const legLen = Math.hypot(zb - zt, yt), tilt = Math.atan2(zb - zt, yt);
+ const benchY = 280, bw = 90, bgap = 8, benchIn = 257, benchZ = benchIn + bw + bgap / 2;
+ const beamH = 70, beamY = benchY - slat - beamH / 2, beamX = legX - legT / 2 - 15, beamD = 2 * (benchIn + 2 * bw + bgap);
+ const topY = H - (slat + bat) / 2;
+ const top: CustomPart = {
+ id: "T", name: "Table top", size: [L, slat + bat, topW], pos: [0, topY, 0], material: "wood",
+ pieces: [
+ ...[0, 1, 2, 3, 4].map((i): PartPiece => ({ shape: "box", size: [L, slat, sw], pos: [0, (slat + bat) / 2 - slat / 2, -topW / 2 + sw / 2 + i * (sw + gap)] })),
+ ...[-batX, 0, batX].map((x): PartPiece => ({ shape: "box", size: [bat, bat, topW - 20], pos: [x, -slat / 2, 0] })),
+ ],
+ };
+ const parts: CustomPart[] = [top];
+ const frames = [1, -1].map((sx, k) => {
+ const beam = `B${k}`, legs = [`L${k}0`, `L${k}1`];
+ parts.push({ id: beam, name: "Bench beam", size: [legT, beamH, beamD], pos: [sx * beamX, beamY, 0], material: "wood" });
+ [1, -1].forEach((sz, j) =>
+ parts.push({ id: legs[j], name: "Leg", size: [legT, legLen, legW], pos: [sx * legX, yt / 2, (sz * (zb + zt)) / 2], rot: [-sz * tilt, 0, 0], material: "wood" }),
+ );
+ return { sx, beam, legs };
+ });
+ const benches = [1, -1].map((sz, k) => {
+ const id = `S${k}`;
+ parts.push({
+ id, name: "Bench", size: [L, slat, 2 * bw + bgap], pos: [0, benchY - slat / 2, sz * benchZ], material: "wood",
+ pieces: [-1, 1].map((o): PartPiece => ({ shape: "box", size: [L, slat, bw], pos: [0, 0, (o * (bw + bgap)) / 2] })),
+ });
+ return { sz, id };
+ });
+ const out = (sx: number) => sx * (legX + legT / 2);
+ const beamBolts = (f: (typeof frames)[number]) =>
+ f.legs.map((leg, j) => {
+ const sz = j === 0 ? 1 : -1;
+ return fx("bolt", [beamY - 18, beamY + 18].map((y) => [out(f.sx), y, sz * legZ(y)] as Vec3), [-f.sx, 0, 0], leg, { ...BOLT, mate: f.beam });
+ });
+ const topBolts = frames.flatMap((f) =>
+ f.legs.map((leg, j) => {
+ const y = batY;
+ return fx("bolt", [[out(f.sx), y, (j === 0 ? 1 : -1) * legZ(y)]], [-f.sx, 0, 0], leg, { ...BOLT, mate: "T" });
+ }),
+ );
+ // five screws down through the two bench boards into each beam end
+ const benchScrews = benches.map((b) => {
+ const outer = b.sz * (benchZ + (bw + bgap) / 2), inner = b.sz * (benchZ - (bw + bgap) / 2);
+ const row = (x: number): Vec3[] => [...[-25, 0, 25].map((dz) => [x, benchY, outer + dz] as Vec3), ...[-20, 20].map((dz) => [x, benchY, inner + dz] as Vec3)];
+ return fx("screw", frames.flatMap((f) => row(f.sx * beamX)), [0, -1, 0], b.id, { ...SCREW });
+ });
+ // both frames wait at the same height while lying flat: the second one is moved across to the first one's side
+ const aside = (f: (typeof frames)[number]) =>
+ Object.fromEntries([f.beam, ...f.legs].map((id) => [id, (f.sx > 0 ? [0, 0, 700] : [(2 * beamX) / 1.6, 0, -700]) as Vec3]));
+ const onto = Object.fromEntries(frames.flatMap((f) => [f.beam, ...f.legs]).map((id) => [id, [0, -360, 0] as Vec3]));
+ return {
+ parts,
+ steps: [
+ ...frames.map((f, k) => ({
+ title: k === 0 ? "Bolt two legs across a bench beam" : "Build the second end frame the same way",
+ detail: k === 0
+ ? "Lay the beam flat and the two legs over it, splayed like an A with the beam across them. Two bolts through each leg, by hand for now."
+ : "Two legs over the other beam, two bolts through each.",
+ fix: beamBolts(f),
+ wait: [f.beam, ...f.legs],
+ from: aside(f),
+ tools: ["allen" as const],
+ pose: (f.sx > 0 ? "+x" : "-x") as "+x" | "-x",
+ })),
+ {
+ title: "Lay the table top upside down",
+ detail: "On the flattened box or a rug, battens up.",
+ add: ["T"],
+ pose: "-y",
+ warnings: ["floor"],
+ },
+ {
+ title: "Stand the end frames on and bolt them to the top",
+ detail: "Each frame goes against an end batten, beam out. One bolt through each leg into the batten.",
+ add: [...frames.flatMap((f) => [f.beam, ...f.legs])],
+ from: onto,
+ fix: topBolts,
+ people: 2,
+ },
+ {
+ title: "Tighten every bolt",
+ detail: "All twelve, now the frames sit square on the top.",
+ tools: ["allen"],
+ },
+ {
+ title: "Turn it over",
+ detail: "Two of you, lifting by the top and the frames, not one leg.",
+ pose: "+y",
+ people: 2,
+ },
+ {
+ title: "Screw the benches onto the beams",
+ detail: "Each bench rests on the two beam ends on its side. Five screws down into each beam end.",
+ add: benches.map((b) => b.id),
+ fix: benchScrews,
+ tools: ["screwdriver"],
+ },
+ ],
+ };
+}
+
+const family: Family = { names: ["RESÖ", "RESO"], recipe };
+export default family;
diff --git a/src/lib/plan/families/rullebor.ts b/src/lib/plan/families/rullebor.ts
new file mode 100644
index 0000000..673c37e
--- /dev/null
+++ b/src/lib/plan/families/rullebor.ts
@@ -0,0 +1,78 @@
+import type { Family } from "./family";
+import type { CustomParams, CustomPart, CustomStep, PartPiece, Vec3 } from "../../types";
+
+/**
+ * RULLEBÖR trolley comes fully assembled and folded flat. Its manual only unfolds it: the lower grid swings out until
+ * it stops and both catches lock, the two wheels swing out to the sides, and the foot plate folds down until it clicks.
+ * Folding it away is the same in reverse. Nothing is screwed and there are no fittings.
+ */
+
+const ALONG_X: Vec3 = [0, 0, Math.PI / 2];
+
+function trolley(): CustomParams {
+ // the page: 34 wide, 94 high, 45 deep
+ const W = 340, H = 940;
+ const xu = 120, zf = -100, t = 22; // uprights and frame tubes
+ const wd = 160, ww = 40, zw = -150; // wheels
+ const frame: PartPiece[] = [
+ ...[-1, 1].map((sx): PartPiece => ({ shape: "cyl", size: [t, H - 70, t], pos: [sx * xu, (H + 70) / 2 - H / 2, 0] })),
+ { shape: "cyl", size: [t, 2 * xu, t], pos: [0, H / 2 - t / 2, 0], rot: ALONG_X },
+ ...[0.42, 0.66].map((k): PartPiece => ({ shape: "cyl", size: [14, 2 * xu, 14], pos: [0, H * k - H / 2, 0], rot: ALONG_X })),
+ { shape: "box", size: [110, 26, 30], pos: [0, H / 2 - 90, 0] }, // the grip
+ { shape: "cyl", size: [26, 2 * (W / 2 - ww), 26], pos: [0, wd / 2 - H / 2, -40], rot: ALONG_X }, // the axle
+ ];
+ const gw = 2 * xu - t, gh = 300;
+ const grid: PartPiece[] = [
+ ...[-1, 1].map((sx): PartPiece => ({ shape: "box", size: [10, gh, 10], pos: [(sx * gw) / 2, 0, 0] })),
+ ...[0, 1, 2, 3, 4].map((i): PartPiece => ({ shape: "box", size: [gw, 6, 6], pos: [0, -gh / 2 + 5 + ((gh - 10) * i) / 4, 0] })),
+ ...[-1, 0, 1].map((k): PartPiece => ({ shape: "box", size: [6, gh, 6], pos: [(k * gw) / 3, 0, 0] })),
+ ];
+ const pd = 300, pw = 2 * xu;
+ const plate: PartPiece[] = [
+ ...[-1, 1].map((sx): PartPiece => ({ shape: "box", size: [12, 14, pd], pos: [(sx * pw) / 2, 0, 0] })),
+ { shape: "box", size: [pw, 14, 12], pos: [0, 0, pd / 2 - 6] },
+ ...[1, 2, 3, 4, 5].map((i): PartPiece => ({ shape: "box", size: [pw, 5, 5], pos: [0, 2, -pd / 2 + (pd * i) / 6] })),
+ ...[-1, 0, 1].map((k): PartPiece => ({ shape: "box", size: [5, 5, pd], pos: [(k * pw) / 3, 2, 0] })),
+ ];
+ const parts: CustomPart[] = [
+ { id: "F", name: "Frame", size: [2 * xu + t, H, 40], pos: [0, H / 2, zf], pieces: frame, material: "metal" },
+ { id: "G", name: "Grid", size: [gw + 10, gh, 10], pos: [0, 120 + gh / 2, zf + 30], pieces: grid, material: "metal" },
+ ...[-1, 1].map((sx, i): CustomPart => ({ id: `W${i}`, name: "Wheel", size: [ww, wd, wd], pos: [sx * (W / 2 - ww / 2), wd / 2, zw], pieces: [{ shape: "cyl", size: [wd, ww, wd], pos: [0, 0, 0], rot: ALONG_X }], material: "soft" })),
+ { id: "P", name: "Foot plate", size: [pw + 12, 14, pd], pos: [0, 12, zf + 20 + pd / 2], pieces: plate, material: "metal" },
+ ];
+ const steps: CustomStep[] = [
+ {
+ title: "Unpack it",
+ detail: "It comes fully put together and folded flat. Stand it up on its frame: there's nothing to screw.",
+ add: ["F"],
+ },
+ {
+ title: "Swing the grid out",
+ detail: "Pull its bottom away from the frame until it stops, about 15 cm out, and both catches lock.",
+ add: ["G"],
+ from: { G: [0, 0, -40] },
+ },
+ {
+ title: "Swing the wheels out",
+ detail: "Turn each wheel out to the side until it clicks into place.",
+ add: ["W0", "W1"],
+ from: { W0: [70, 0, 60], W1: [-70, 0, 60] },
+ },
+ {
+ title: "Fold the foot plate down",
+ detail: "Lower it until both catches click. To fold it away, press the catches and do it all in reverse.",
+ add: ["P"],
+ from: { P: [0, 160, -150] },
+ },
+ ];
+ return { parts, steps };
+}
+
+const family: Family = {
+ names: ["RULLEBÖR", "RULLEBOR"],
+ recipe(s) {
+ if (/trolley/i.test(s.variant)) return trolley();
+ return null;
+ },
+};
+export default family;
diff --git a/src/lib/plan/families/segeron.ts b/src/lib/plan/families/segeron.ts
index 840d47c..6b8ef4a 100644
--- a/src/lib/plan/families/segeron.ts
+++ b/src/lib/plan/families/segeron.ts
@@ -677,9 +677,106 @@ function table(b: PlanBuilder, s: ProductSpec, o: TableOpt): boolean {
return true;
}
+/* ---------- the bar stool: four legs under a cross plate, a foot ring, the swivel seat ---------- */
+
+/** A round tube from a to b, any direction. */
+function tube(a: Vec3, b: Vec3, dia: number): PartPiece {
+ const d: Vec3 = [b[0] - a[0], b[1] - a[1], b[2] - a[2]];
+ const len = Math.hypot(...d);
+ const u = d.map((v) => v / len);
+ return cyl(dia, len, [(a[0] + b[0]) / 2, (a[1] + b[1]) / 2, (a[2] + b[2]) / 2], [Math.atan2(u[2], u[1]), 0, Math.asin(-u[0])]);
+}
+
+function barStool(b: PlanBuilder, s: ProductSpec): boolean {
+ // IKEA's page: 53 cm across the feet, 82 cm to the top of the back rim, seat 74 cm high
+ const FOOT = 250, TOPR = 70, BEND = 560, LEGD = 25;
+ const PLATE = 666; // underside of the cross plate, on the leg tops
+ const SEATY = 740;
+ const RINGY = 300;
+ const at = (y: number) => (y >= BEND ? TOPR : TOPR + ((FOOT - TOPR) * (BEND - y)) / BEND); // leg offset from the middle
+ const corners: [number, number][] = [[-1, -1], [1, -1], [1, 1], [-1, 1]];
+ const legT = b.compound("Leg", [
+ tube([0, PLATE, 0], [0, BEND, 0], LEGD),
+ tube([0, BEND, 0], [FOOT - TOPR, 0, FOOT - TOPR], LEGD),
+ cyl(28, 14, [FOOT - TOPR, 7, FOOT - TOPR], undefined, "fiber"),
+ ], { material: "metal" });
+ // each leg is the same tube turned to its corner
+ const legs = corners.map(([sx, sz]) => {
+ const yaw = Math.atan2(sx, sz) - Math.PI / 4;
+ const mid = ry(legT.mid, yaw);
+ return b.place(legT.type, plus(mid, [sx * TOPR, 0, sz * TOPR]), [0, yaw, 0]);
+ });
+ const diag = (r: number) => corners.map(([sx, sz]): [number, number] => [(sx * r) / Math.SQRT2, (sz * r) / Math.SQRT2]);
+ const arm = 2 * 165;
+ const plateT = b.compound("Cross plate", [
+ box([arm, 4, 34], [0, PLATE + 2, 0], "metal", [0, Math.PI / 4, 0]),
+ box([arm, 4, 34], [0, PLATE + 2, 0], "metal", [0, -Math.PI / 4, 0]),
+ ], { material: "metal" });
+ const plate = b.place(plateT.type, plateT.mid);
+ // the foot ring sits inside the legs, held off them by the spacer bolts
+ const legR = at(RINGY) * Math.SQRT2;
+ const ringR = legR - LEGD / 2 - 14 - 11;
+ const segs = 40;
+ const ringT = b.compound("Foot ring", Array.from({ length: segs }, (_, i) => {
+ // each short tube runs a little past its neighbours so the ring reads as one
+ const a0 = ((i - 0.06) / segs) * 2 * Math.PI, a1 = ((i + 1.06) / segs) * 2 * Math.PI;
+ return tube([ringR * Math.cos(a0), RINGY, ringR * Math.sin(a0)], [ringR * Math.cos(a1), RINGY, ringR * Math.sin(a1)], 22);
+ }), { material: "metal" });
+ const ring = b.place(ringT.type, ringT.mid);
+ // the swivel under the woven seat, the seat pan and its rim, high at the back
+ const rim: PartPiece[] = [];
+ for (let i = 0; i < 40; i++) {
+ const a = (i / 40) * 2 * Math.PI;
+ const back = Math.max(0, -Math.cos(a)); // 1 at the back (-z), 0 at the sides and front
+ const h = 25 + 75 * back * back;
+ rim.push(box([34, h, 26], [195 * Math.sin(a), SEATY - 10 + h / 2, 195 * Math.cos(a)], "fiber", [0, a, 0]));
+ }
+ const seatT = b.compound("Seat", [
+ cyl(150, 8, [0, PLATE + 8, 0], undefined, "metal"),
+ cyl(270, 26, [0, PLATE + 25, 0], undefined, "metal"),
+ cyl(380, 22, [0, SEATY - 11, 0], undefined, "fiber"),
+ ...rim,
+ ], { material: "fiber" });
+ const seat = b.place(seatT.type, seatT.mid);
+
+ const BOLT: HwDef = { kind: "bolt", len: 16, dia: 6 };
+ const SPACER: HwDef = { kind: "bolt", len: 30, dia: 8, name: "Spacer bolt" };
+ const W: HwDef = { kind: "washer", len: 1.5, dia: 16 };
+ const step = stepper(b);
+ step({ title: "Stand the legs on a rug and lay the cross plate on top", detail: "Put a bolt with a spring washer and a washer through each hole into a leg. Only turn them in part way for now.", kind: "bolts", tools: ["allen"], warnings: ["floor"] }, () => {
+ legs.forEach((k, i) => {
+ if (i) b.then(0.08);
+ b.add(k, [corners[i][0] * 120, 0, corners[i][1] * 120]);
+ });
+ b.then(0.2);
+ b.add(plate, [0, 200, 0]);
+ b.then(0.2);
+ bolted(b, BOLT, [SPRING, W], diag(TOPR * Math.SQRT2).map(([x, z], i): FitOpts => ({ on: plate, at: [x, PLATE + 4, z], dir: [0, -1, 0], mate: legs[i] })));
+ });
+ step({ title: "Lift the foot ring up between the legs", detail: "From below, up to the holes in the legs. Screw a spacer bolt through each leg into the ring, with the Allen key.", kind: "bolts", tools: ["allen"] }, () => {
+ b.add(ring, [0, -RINGY + 20, 0]);
+ b.then(0.2);
+ const r = at(RINGY) * Math.SQRT2 + LEGD / 2;
+ b.fits(SPACER, corners.map(([sx, sz], i): FitOpts => {
+ const u: Vec3 = [sx / Math.SQRT2, 0, sz / Math.SQRT2];
+ return { on: legs[i], at: [u[0] * r, RINGY, u[2] * r], dir: [-u[0], 0, -u[2]], mate: ring };
+ }), 0.08);
+ });
+ step({ title: "Tighten the four bolts in the plate", detail: "Now that the ring holds the legs square, turn them until the spring washers are flat.", kind: "general", tools: ["allen"] });
+ step({ title: "Turn the legs over onto the seat", detail: "Lay the seat upside down on the rug and set the plate on the swivel, the holes lined up. A bolt with a spring washer and a washer in each corner.", pose: "-y", kind: "bolts", tools: ["allen"], warnings: ["floor"] }, () => {
+ b.add(seat, [0, 0, 600]);
+ b.then(0.2);
+ bolted(b, BOLT, [SPRING, W], diag(160).map(([x, z]): FitOpts => ({ on: plate, at: [x, PLATE, z], dir: [0, 1, 0], mate: seat })));
+ });
+ step({ title: "Stand the stool up", detail: "Turn the seat to check it swivels freely.", pose: "+y", kind: "standup" });
+ void s;
+ return true;
+}
+
function build(b: PlanBuilder, s: ProductSpec): boolean {
const slug = s.slug ?? "";
if (/chair-armrests/.test(slug)) return chair(b, s);
+ if (/bar-stool/.test(slug)) return barStool(b, s);
if (/sun-lounger/.test(slug)) return lounger(b, s);
if (/coffee-table/.test(slug)) return table(b, s, { railH: 50, stripsX: 1, stripsC: 1, seq: [{ lay: 1, clips: "both" }, { lay: 1, clips: "both" }, { lay: 3, clips: "both" }, { lay: 2 }, { lay: 1 }, { clips: "last" }] });
if (/segeron-table-outdoor/.test(slug))
diff --git a/src/lib/plan/families/slakt.ts b/src/lib/plan/families/slakt.ts
index 53a09ba..6b6cef8 100644
--- a/src/lib/plan/families/slakt.ts
+++ b/src/lib/plan/families/slakt.ts
@@ -11,6 +11,7 @@ import { buildCustom } from "../custom";
* the headboard. The bed with storage is a cam-locked unit (open shelves at the head, four drawers) between the
* headboard and footboard, with the side rails on top, the drawers on runners and a padded headboard hung on brackets.
* The extendable bed is a head section and a foot section on legs that slide together and are bolted at length.
+ * The underbed with storage has its own manual (see underbed below).
*/
/* ---------- helpers: mm, x across the bed, y up, z from the head (-) to the foot (+) ---------- */
@@ -460,6 +461,275 @@ function storageBed(twin: boolean, padTop: number): CustomParams {
return { parts, steps };
}
+/* ---------- the underbed with storage (x along its length, front at +z) ---------- */
+
+/**
+ * The underbed, from its own manual: a long middle rail screwed onto the middle divider, the two ends on its ends,
+ * dowels in the back edges and the back panel screwed on lying front down; then turned onto its back, the cam locks,
+ * angle brackets, dowels and the top front rail on cam bolts, a bolt through each end, the bottom front rail and six
+ * castors. Stood up: corner braces, the runners, the metal slat rail, the catches that hook it to the bed, two
+ * cam-locked drawers on runners, the two support bars, the slatted base and its four stops.
+ */
+function underbed(s: ProductSpec): CustomParams {
+ const L = Math.round(s.size.w * 10) || 2010, D = Math.round(s.size.d * 10) || 950, H = Math.round(s.size.h * 10) || 380;
+ const t = 18, y0 = 50; // castors under the boards
+ const xi = L / 2 - t; // inside of the ends
+ const zbi = -D / 2 + t; // inside of the back
+ const zf = D / 2 - t; // back of the top front rail
+ const yC0 = 320, yC1 = 350; // the middle rail, on the divider
+ const yTF = 300; // the top front rail's lower edge
+ const dz0 = -150, dz1 = zf; // the drawers' boxes, front to back
+ const bayW = xi - t / 2;
+ const both = [-1, 1] as const;
+ const bay = (g: number) => g * (t / 2 + bayW / 2);
+ const drawer = (g: number): CustomPart => {
+ const c = bay(g), sx = bayW / 2 - 26;
+ return compound(g < 0 ? "DR1" : "DR2", "Drawer", [
+ pc([c - bayW / 2 + 2, c + bayW / 2 - 2, y0 + 6, yTF - 4, zf, D / 2]),
+ pc([c - sx - 12, c - sx, 95, 290, dz0 + 12, dz1]),
+ pc([c + sx, c + sx + 12, 95, 290, dz0 + 12, dz1]),
+ pc([c - sx - 12, c + sx + 12, 95, 290, dz0, dz0 + 12]),
+ pc([c - sx, c, 95, 100, dz0 + 12, dz1]),
+ pc([c, c + sx, 95, 100, dz0 + 12, dz1]),
+ ], "board");
+ };
+ const parts: CustomPart[] = [
+ box("MR", "Middle rail", [-xi, xi, yC0, yC1, -30, 30]),
+ box("MD", "Middle divider", [-t / 2, t / 2, y0, yC0, zbi, zf - 40]),
+ box("E1", "End panel", [-L / 2, -xi, y0, H, -D / 2, zf]),
+ box("E2", "End panel", [xi, L / 2, y0, H, -D / 2, zf]),
+ box("BK", "Back panel", [-xi, xi, y0, H, -D / 2, zbi]),
+ box("TF", "Top front rail", [-L / 2, L / 2, yTF, H, zf, D / 2]),
+ box("BF", "Bottom front rail", [-xi, xi, y0, y0 + 35, zf - 40, zf]),
+ box("SR", "Slat rail", [-xi + 20, xi - 20, yC1, yC1 + 8, -20, 20], "metal"),
+ ...both.map((g, i): CustomPart => compound(`BAR${i + 1}`, "Support bar", [pc([g * 500 - 15, g * 500 + 15, yC1 + 8, yC1 + 16, zbi, zf]), pc([g * 500 - 15, g * 500 + 15, yC1 - 30, yC1 + 8, zbi, zbi + 4])], "metal")),
+ drawer(-1),
+ drawer(1),
+ compound("SB", "Slatted bed base", spread(-xi + 40, xi - 40, 19).map((x) => pc([x - 30, x + 30, yC1 + 16, yC1 + 30, zbi + 6, zf - 6])), "wood"),
+ ];
+ const ends = ["E1", "E2"];
+ const drawers = ["DR1", "DR2"];
+ const yM = (yC0 + yC1) / 2;
+ // runners: on the ends and both faces of the divider, screwed through into them
+ const faces = [[-xi, -1, "E1"], [-t / 2, 1, "MD"], [t / 2, -1, "MD"], [xi, 1, "E2"]] as const;
+ const zr = (dz0 + dz1) / 2;
+ const castorAt: [number, number, string][] = [[-xi + 30, -1, "E1"], [t / 2 + 30, -1, "MD"], [xi - 30, 1, "E2"]];
+ const steps: CustomStep[] = [
+ {
+ title: "Screw the middle rail onto the divider",
+ detail: "Lay the rail on the divider's top edge, with its rows of holes facing up, and turn in two connector screws with the Allen key.",
+ add: ["MD", "MR"],
+ fix: [fx("screw", [-200, 200].map((z): Vec3 => [0, yC1, z * 0.1]), DOWN, { len: 50, dia: 7, name: "Connector screw", on: "MR", mate: "MD" })],
+ pose: "-z",
+ tools: ["allen"],
+ kind: "screws",
+ },
+ {
+ title: "Fit a cam bolt and a dowel in each end panel",
+ detail: "Lay the end panels on a rug. Into the holes inside each, level with the middle rail.",
+ fix: ends.flatMap((id, i) => {
+ const x = i ? xi : -xi, d: Vec3 = [i ? -1 : 1, 0, 0];
+ return [fx(CAMBOLT.kind, [[x, yM, -15]], d, { ...CAMBOLT, on: id, mate: "MR" }), fx(DOWEL.kind, [[x, yM, 15]], d, { ...DOWEL, on: id, mate: "MR" })];
+ }),
+ wait: ends,
+ warnings: ["floor"],
+ kind: "dowels",
+ },
+ { title: "Push the end panels onto the rail", detail: "One on each end of the middle rail, the cam bolt and dowel into its holes.", add: ends, from: { E1: [-250, 0, 0], E2: [250, 0, 0] }, kind: "join" },
+ {
+ title: "Tap three dowels into the back edges",
+ detail: "One into the back edge of each end panel and the divider.",
+ fix: [fx(DOWEL.kind, [[-L / 2 + 9, 200, -D / 2], [0, 200, zbi], [L / 2 - 9, 200, -D / 2]], [0, 0, 1], { ...DOWEL })],
+ tools: ["hammer"],
+ kind: "dowels",
+ },
+ {
+ title: "Screw the back panel on",
+ detail: "Lay it over the back edges, onto the dowels. Six long screws, two into each panel, with the Allen key. Then turn the frame onto its back.",
+ add: ["BK"],
+ fix: [fx("screw", [-L / 2 + 9, 0, L / 2 - 9].flatMap((x) => [110, 280].map((y): Vec3 => [x, y, -D / 2])), [0, 0, 1], { len: 100, dia: 7, name: "Long screw", on: "BK" })],
+ from: { BK: [0, 0, -260] },
+ tools: ["allen"],
+ kind: "screws",
+ },
+ {
+ title: "Lock the end panels to the middle rail",
+ detail: "Turn the two cam locks in the rail's ends.",
+ fix: [fx(CAM.kind, both.map((g): Vec3 => [g * (xi - 30), yC1, -15]), DOWN, { ...CAM, on: "MR" })],
+ pose: "+z",
+ tools: ["screwdriver"],
+ kind: "cams",
+ },
+ {
+ title: "Screw in the two angle brackets",
+ detail: "One in each back corner, four screws each: two into the end panel and two into the back.",
+ fix: [
+ fx("angle", both.map((g): Vec3 => [g * (xi - 2), 200, zbi + 2]), [0, 0, -1], { len: 40, dia: 40, name: "Angle bracket", on: "BK" }),
+ ...both.map((g, i) => fx("screw", [180, 220].map((y): Vec3 => [g * (xi - 3), y, zbi + 28]), [g, 0, 0], { len: 16, dia: 4, on: ends[i] })),
+ fx("screw", both.flatMap((g) => [180, 220].map((y): Vec3 => [g * (xi - 28), y, zbi - 3])), [0, 0, -1], { len: 16, dia: 4, on: "BK" }),
+ ],
+ tools: ["screwdriver"],
+ kind: "screws",
+ },
+ {
+ title: "Tap six dowels into the front edges",
+ detail: "Three along the top of each end panel's front edge, ready for the top front rail.",
+ fix: [fx(BIG_DOWEL.kind, both.flatMap((g) => [yTF + 15, yTF + 40, H - 15].map((y): Vec3 => [g * (L / 2 - 9), y, zf])), [0, 0, -1], { ...BIG_DOWEL, len: 30, dia: 10 })],
+ tools: ["hammer"],
+ kind: "dowels",
+ },
+ {
+ title: "Screw four cam bolts into the top front rail",
+ detail: "Into its back face, two near each end.",
+ fix: both.map((g, i) => fx(CAMBOLT.kind, [yTF + 28, H - 28].map((y): Vec3 => [g * (L / 2 - 9), y, zf]), [0, 0, 1], { ...CAMBOLT, on: "TF", mate: ends[i] })),
+ wait: ["TF"],
+ kind: "cams",
+ },
+ {
+ title: "Lay the top front rail on and lock it",
+ detail: "Onto the dowels and cam bolts, then turn the four cam locks inside the end panels.",
+ add: ["TF"],
+ from: { TF: [0, 0, 220] },
+ fix: ends.map((id, i) => fx(CAM.kind, [yTF + 28, H - 28].map((y): Vec3 => [i ? xi : -xi, y, zf - 30]), [i ? 1 : -1, 0, 0], { ...CAM, on: id })),
+ tools: ["screwdriver"],
+ kind: "cams",
+ },
+ {
+ title: "Bolt the ends to the middle rail",
+ detail: "One bolt through each end panel into the end of the rail, with the Allen key.",
+ fix: ends.map((id, i) => fx("bolt", [[i ? L / 2 : -L / 2, yM, 0]], [i ? -1 : 1, 0, 0], { len: 60, dia: 6, on: id, mate: "MR" })),
+ tools: ["allen"],
+ kind: "bolts",
+ },
+ {
+ title: "Fit the bottom front rail",
+ detail: "Slide it in between the end panels, then three connector screws: one through each end and one into the divider.",
+ add: ["BF"],
+ from: { BF: [0, 0, 200] },
+ fix: [
+ ...ends.map((id, i) => fx("screw", [[i ? L / 2 : -L / 2, y0 + 17, zf - 20]], [i ? -1 : 1, 0, 0], { len: 50, dia: 7, name: "Connector screw", on: id, mate: "BF" })),
+ fx("screw", [[0, y0 + 17, zf]], [0, 0, -1], { len: 50, dia: 7, name: "Connector screw", on: "BF", mate: "MD" }),
+ ],
+ tools: ["allen"],
+ kind: "screws",
+ },
+ {
+ title: "Screw on the six castors",
+ detail: "Two on each end panel and two on the divider, at the front and the back, two screws each.",
+ fix: [
+ fx("castor", castorAt.flatMap(([x]) => both.map((sz): Vec3 => [x, y0, sz * (D / 2 - 110)])), UP, { len: y0, dia: 45 }),
+ ...castorAt.map(([x, g, id]) => fx("screw", both.flatMap((sz) => [-20, 20].map((dz): Vec3 => [x - g * 28 + g * 4, y0 + 20, sz * (D / 2 - 110) + dz])), [g, 0, 0], { len: 16, dia: 5, on: id })),
+ ],
+ tools: ["screwdriver"],
+ kind: "screws",
+ },
+ {
+ title: "Stand it up and screw in the corner braces",
+ detail: "One across each back corner at the top, four screws each.",
+ fix: [
+ fx("angle", both.map((g): Vec3 => [g * (xi - 40), yC1 - 10, zbi + 40]), DOWN, { len: 8, dia: 90, name: "Corner brace" }),
+ ...both.map((g, i) => fx("screw", [zbi + 50, zbi + 90].map((z): Vec3 => [g * (xi - 3), yC1 - 15, z]), [g, 0, 0], { len: 16, dia: 4, on: ends[i] })),
+ fx("screw", both.flatMap((g) => [g * (xi - 50), g * (xi - 90)].map((x): Vec3 => [x, yC1 - 15, zbi + 3])), [0, 0, -1], { len: 16, dia: 4, on: "BK" }),
+ ],
+ pose: "+y",
+ tools: ["screwdriver"],
+ kind: "screws",
+ },
+ {
+ title: "Screw in the drawer runners",
+ detail: "One on each side of both drawer spaces, three screws each. The left and right ones are marked.",
+ fix: [
+ ...faces.map(([x, g, id]) => fx("runner", [[x, 110, zr]], [g, 0, 0], { len: dz1 - dz0 - 20, dia: 20, name: "Drawer runner", on: id })),
+ ...faces.map(([x, g, id]) => fx("screw", [-200, 0, 200].map((dz): Vec3 => [x - g * 4, 110, zr + dz]), [g, 0, 0], { len: 12, dia: 4, on: id })),
+ ],
+ tools: ["screwdriver"],
+ kind: "runners",
+ },
+ {
+ title: "Screw the slat rail along the middle rail",
+ detail: "Eight screws, by hand only so the rail stays straight.",
+ add: ["SR"],
+ fix: [fx("screw", spread(-xi + 80, xi - 80, 8).map((x): Vec3 => [x, yC1 + 8, 0]), DOWN, { len: 16, dia: 4, on: "SR", mate: "MR" })],
+ tools: ["screwdriver"],
+ kind: "screws",
+ },
+ {
+ title: "Fit the two catches on the back",
+ detail: "Press a catch plate into each hole near the top of the back panel and clip its cover over it.",
+ fix: [
+ fx("plate", both.map((g): Vec3 => [g * (xi - 200), H - 50, -D / 2]), [0, 0, 1], { len: 6, dia: 50, name: "Catch plate", on: "BK" }),
+ fx("cap", both.map((g): Vec3 => [g * (xi - 200), H - 50, -D / 2 - 6]), [0, 0, 1], { len: 6, dia: 60, name: "Catch cover", on: "BK" }),
+ ],
+ kind: "general",
+ },
+ {
+ title: "Fit the cam bolts in the drawer fronts",
+ detail: "Lay both fronts face down on a rug. Four cam bolts in each, two at each end.",
+ fix: drawers.map((id, i) => fx(CAMBOLT.kind, both.flatMap((sx) => [130, 250].map((y): Vec3 => [bay(i ? 1 : -1) + sx * (bayW / 2 - 20), y, zf])), [0, 0, 1], { ...CAMBOLT, on: id })),
+ wait: drawers,
+ pose: "+y",
+ warnings: ["floor"],
+ kind: "cams",
+ },
+ {
+ title: "Join the sides and back, then lock the front on",
+ detail: "Two dowels join the back to the sides. Stand the sides on the front's cam bolts and turn four cam locks.",
+ fix: [
+ ...drawers.map((id, i) => fx(DOWEL.kind, both.map((sx): Vec3 => [bay(i ? 1 : -1) + sx * (bayW / 2 - 20), 190, dz0 + 12]), [0, 0, -1], { ...DOWEL, on: id })),
+ ...drawers.flatMap((id, i) => both.map((sx) => fx(CAM.kind, [130, 250].map((y): Vec3 => [bay(i ? 1 : -1) + sx * (bayW / 2 - 20), y, zf - 30]), [-sx, 0, 0], { ...CAM, on: id }))),
+ ],
+ tools: ["screwdriver"],
+ kind: "cams",
+ },
+ {
+ title: "Screw the back to the sides",
+ detail: "Four long screws in each drawer, two through each end of the back.",
+ fix: drawers.map((id, i) => fx("screw", both.flatMap((sx) => [140, 240].map((y): Vec3 => [bay(i ? 1 : -1) + sx * (bayW / 2 - 20), y, dz0])), [0, 0, 1], { len: 40, dia: 5, on: id })),
+ tools: ["screwdriver"],
+ kind: "screws",
+ },
+ { title: "Slide in the drawer bottoms", detail: "Two halves in each drawer, along the grooves from the back, until they meet in the middle.", kind: "drawer" },
+ {
+ title: "Screw the runners onto the drawers",
+ detail: "Three screws on each side. The parts are marked left and right.",
+ fix: drawers.flatMap((id, i) => both.map((sx) => fx("screw", [-200, 0, 200].map((dz): Vec3 => [bay(i ? 1 : -1) + sx * (bayW / 2 - 14), 110, zr + dz]), [-sx, 0, 0], { len: 12, dia: 4, on: id }))),
+ tools: ["screwdriver"],
+ kind: "runners",
+ },
+ {
+ title: "Hook in the first support bar",
+ detail: "Across the frame from the back panel to the front rail, then one screw through its tab into the back.",
+ add: ["BAR1"],
+ fix: [fx("screw", [[-500, yC1 - 15, zbi + 4]], [0, 0, -1], { len: 14, dia: 5, on: "BAR1", mate: "BK" })],
+ tools: ["screwdriver"],
+ kind: "screws",
+ },
+ {
+ title: "Hook in the second support bar",
+ detail: "The same way in the other half.",
+ add: ["BAR2"],
+ fix: [fx("screw", [[500, yC1 - 15, zbi + 4]], [0, 0, -1], { len: 14, dia: 5, on: "BAR2", mate: "BK" })],
+ tools: ["screwdriver"],
+ kind: "screws",
+ },
+ { title: "Slide in the drawers", detail: "Rest each one on its runners and push it in until it closes.", add: drawers, from: { DR1: [0, 0, 700], DR2: [0, 0, 700] }, kind: "drawer" },
+ {
+ title: "Screw the caps into the catches",
+ detail: "One cap and one grub screw in each catch, with the small Allen key. They set how high it hooks onto the bed.",
+ fix: [
+ fx("cap", both.map((g): Vec3 => [g * (xi - 200), H - 30, -D / 2 - 10]), [0, -1, 0], { len: 6, dia: 12, name: "Catch cap", on: "BK" }),
+ fx("screw", both.map((g): Vec3 => [g * (xi - 200), H - 50, -D / 2 - 5]), [0, 0, 1], { len: 10, dia: 5, name: "Grub screw", on: "BK" }),
+ ],
+ tools: ["allen"],
+ kind: "screws",
+ },
+ { title: "Lay the slatted base on", detail: "Curved side up, the slats across the frame.", add: ["SB"], kind: "slats" },
+ { title: "Clip on the four slat stops", detail: "One over each end slat at the corners, so the base can't slide.", fix: [fx(STOP.kind, both.flatMap((g) => both.map((sz): Vec3 => [g * (xi - 40), yC1 + 30, sz * (D / 2 - 80)])), DOWN, { ...STOP, name: "Slat stop", on: "SB" })], kind: "slats" },
+ { title: "Slide it under the bed and lock the catches", detail: "Push it in under the SLÄKT bed, then turn the two catches so they hook onto the bed's frame.", warnings: ["hand"], kind: "general" },
+ ];
+ return { parts, steps };
+}
+
/* ---------- the extendable bed (head section and foot section) ---------- */
function extendable(): CustomParams {
@@ -582,6 +852,7 @@ function aim(c: CustomParams): CustomParams {
}
function recipe(s: ProductSpec): CustomParams | null {
+ if (/^underbed/i.test(s.variant)) return underbed(s);
const r = pick(s);
return r && aim(r);
}
diff --git a/src/lib/plan/families/smaskrake.ts b/src/lib/plan/families/smaskrake.ts
new file mode 100644
index 0000000..e9b231d
--- /dev/null
+++ b/src/lib/plan/families/smaskrake.ts
@@ -0,0 +1,69 @@
+import type { Family } from "./family";
+import type { CustomFix, CustomParams, CustomPart, PartPiece, ProductSpec, Vec3 } from "../../types";
+
+/**
+ * SMÅSKRAKE (child's chair that turns over into a lower chair or a table), from its manual. Three dowels go into the
+ * seat's back edge and the seat is pressed down onto the backrest lying flat. With it on its side, a steel side frame
+ * is laid on and bolted to both boards with four bolts; turned over, the other frame takes four more.
+ */
+
+const T = 20; // tube
+
+function recipe(_s: ProductSpec): CustomParams {
+ // IKEA: 39 x 39 x 39 (one size), seat 16 cm high this way up (25 cm turned over)
+ const W = 390, H = 390, D = 390;
+ const BT = 18, fx0 = W / 2 - T / 2, fz = D / 2 - T / 2;
+ const bw = 2 * (fx0 - T / 2); // the boards fit between the frames
+ const seatTop = 160, sy = seatTop - BT / 2;
+ const zb = -D / 2 + T / 2; // the backrest, in line with the frames' back tubes
+ const seatZ0 = zb + BT / 2, seatD = D / 2 - seatZ0;
+ const bars = [sy, sy - 70]; // the two bars along each side frame
+ const frame: PartPiece[] = [
+ ...[-1, 1].map((g): PartPiece => ({ shape: "cyl", size: [T, H - T, T], pos: [0, 0, g * fz] })),
+ ...[T / 2, H - T / 2].map((y): PartPiece => ({ shape: "cyl", size: [T, D, T], pos: [0, y - H / 2, 0], rot: [Math.PI / 2, 0, 0] })),
+ ...bars.map((y): PartPiece => ({ shape: "cyl", size: [T, 2 * fz - T, T], pos: [0, y - H / 2, 0], rot: [Math.PI / 2, 0, 0] })),
+ ];
+ const parts: CustomPart[] = [
+ { id: "B", name: "Backrest", size: [bw, H - T, BT], pos: [0, H / 2, zb], material: "wood" },
+ { id: "S", name: "Seat", size: [bw, BT, seatD], pos: [0, sy, seatZ0 + seatD / 2], material: "wood" },
+ { id: "FR", name: "Side frame", size: [T, H, D], pos: [fx0, H / 2, 0], material: "metal", pieces: frame },
+ { id: "FL", name: "Side frame", size: [T, H, D], pos: [-fx0, H / 2, 0], material: "metal", pieces: frame },
+ ];
+ // two bolts through the bar into the seat's end, two through the back tube into the backrest's end
+ const bolts = (g: number): CustomFix[] => [
+ { kind: "bolt", count: 2, len: 40, dia: 6, on: g > 0 ? "FR" : "FL", mate: "S", at: [-40, 120].map((z): Vec3 => [g * (W / 2), sy, z]), dir: [-g, 0, 0] },
+ { kind: "bolt", count: 2, len: 40, dia: 6, on: g > 0 ? "FR" : "FL", mate: "B", at: [230, 330].map((y): Vec3 => [g * (W / 2), y, zb]), dir: [-g, 0, 0] },
+ ];
+ return {
+ parts,
+ steps: [
+ {
+ title: "Tap the dowels into the seat",
+ detail: "Three, into the holes along its back edge.",
+ add: ["S"],
+ fix: [{ kind: "dowel", count: 3, len: 30, dia: 8, on: "S", mate: "B", at: [-110, 0, 110].map((x): Vec3 => [x, sy, seatZ0]), dir: [0, 0, -1] }],
+ pose: "+z",
+ warnings: ["floor"],
+ wait: ["S"],
+ },
+ {
+ title: "Press the seat onto the backrest",
+ detail: "Lay the backrest flat on a rug and push the seat's dowels straight down into its holes.",
+ add: ["B", "S"],
+ },
+ {
+ title: "Bolt on one side frame",
+ detail: "Turn it onto its side, lay the frame on and drive in four bolts with the key. Push each one in by hand first so it starts straight.",
+ add: ["FR"],
+ fix: bolts(1),
+ tools: ["allen"],
+ pose: "+x",
+ },
+ { title: "Turn it over and bolt on the other frame", detail: "Four more bolts the same way, then tighten all eight.", add: ["FL"], fix: bolts(-1), tools: ["allen"], pose: "-x" },
+ { title: "Stand it up", detail: "This way up it's a low chair. Turn it over for a higher seat, or onto its back for a small table.", pose: "+y" },
+ ],
+ };
+}
+
+const family: Family = { names: ["SMÅSKRAKE", "SMASKRAKE"], recipe };
+export default family;
diff --git a/src/lib/plan/families/smastad.ts b/src/lib/plan/families/smastad.ts
index 82e4d54..85fa467 100644
--- a/src/lib/plan/families/smastad.ts
+++ b/src/lib/plan/families/smastad.ts
@@ -1,5 +1,5 @@
import type { Family } from "./family";
-import type { CustomFix, CustomParams, CustomPart, CustomStep, Pose, ProductSpec, StepKind, ToolId, Vec3, WarnId } from "../../types";
+import type { CustomFix, CustomParams, CustomPart, CustomStep, PartMaterial, Pose, ProductSpec, StepKind, ToolId, Vec3, WarnId } from "../../types";
import { HW, type FitOpts, type HwDef, type PlanBuilder } from "../builder";
import { buildCustom } from "../custom";
@@ -17,6 +17,13 @@ import { buildCustom } from "../custom";
* table/desk is its own frame (bottom, shelf and divider, then the sides lying on its back, two backs, four feet),
* screwed to the wall, with a rimmed tray that slides onto two brackets: high for changing, low for the desk, which
* also gets two KONSTRUERA drawers.
+ * The loft bed follows its three manuals in turn. The storage (wardrobe and bookcase in one) is built lying on its
+ * wardrobe side and stood up by two. The bed frame is built upside down beside it: the end panel's two halves join
+ * on connectors, steel rails go on the back guard and front rail, then the guard, two cross boards and the rail are
+ * bolted on; the end guard is cam-locked on the storage and the frame is turned over onto it. A back rail, the front
+ * guard, ten bolts into the storage top and the ladder (rungs on dowels, screwed and cam-locked to the bed and the
+ * storage) finish it. The desk cabinet is built upside down, its top bolted on, then it is carried in under the bed
+ * and locked to the back rail. KONSTRUERA drawers, HJÄLPA rails and soft-closing hinges follow their own manuals.
*/
const FEET = 10; // LÄTTHET adjustable feet under a PLATSA frame
@@ -70,6 +77,7 @@ function keyAt(b: PlanBuilder, pos: Vec3) {
type StepOpts = { title: string; detail?: string; kind?: StepKind; tools?: ToolId[]; pose?: Pose; scene?: string; people?: 1 | 2; repeat?: number; warnings?: WarnId[]; wall?: boolean };
const step = (b: PlanBuilder, o: StepOpts, body: () => void = () => {}) =>
b.step({ kind: "general", ...o, warnings: o.warnings ?? (o.people === 2 ? ["two"] : []) }, body);
+const stepOf = step;
/* ---------- what each frame guide holds ---------- */
@@ -916,6 +924,623 @@ function changingRecipe(s: ProductSpec, desk: boolean): CustomParams {
return { parts, steps: [...steps, ...drawerSteps] };
}
+/* ---------- the loft bed: storage, bed frame, ladder, desk, then drawers, rails and doors, each in its manual's order ---------- */
+
+// the storage, bed and desk boxes
+const L_CONBOLT: HwDef = { kind: "camScrew", len: 40, dia: 8, name: "Connector bolt" };
+const L_DOWEL: HwDef = { kind: "dowel", len: 40, dia: 8 };
+const L_DOWEL_S: HwDef = HW.dowel;
+const L_CONNECTOR: HwDef = { kind: "connector", len: 14, dia: 50, name: "Panel connector" };
+const L_CONCAP: HwDef = { kind: "cap", len: 4, dia: 52 };
+const L_RSCREW: HwDef = { kind: "screw", len: 16, dia: 4 };
+const L_BOLT: HwDef = { kind: "bolt", len: 90, dia: 6 };
+const L_BARREL: HwDef = { kind: "nut", len: 16, dia: 12, name: "Barrel nut" };
+const L_HEXNUT: HwDef = { kind: "nut", len: 5, dia: 8, name: "Hex nut" };
+const L_BOLT_S: HwDef = { kind: "bolt", len: 30, dia: 6 };
+const L_SLEEVE: HwDef = { kind: "nut", len: 18, dia: 10, name: "Sleeve nut" };
+const L_BOLT_M: HwDef = { kind: "bolt", len: 60, dia: 6 };
+const L_CAMBOLT: HwDef = { kind: "camScrew", len: 36, dia: 7 };
+const L_CAM: HwDef = { kind: "cam", len: 14, dia: 20 };
+const L_CAM_S: HwDef = { kind: "cam", len: 12, dia: 16 };
+const L_LAG: HwDef = { kind: "screw", len: 70, dia: 6 };
+const L_PAD: HwDef = { kind: "glide", len: 6, dia: 30, name: "Glide" };
+const L_GRIP_O: HwDef = { kind: "handle", len: 110, dia: 30, name: "Hand grip, outer half" };
+const L_GRIP_I: HwDef = { kind: "handle", len: 100, dia: 26, name: "Hand grip, inner half" };
+const L_STRIP: HwDef = { kind: "glide", len: 2, dia: 90, name: "Anti-slip strip" };
+const L_CAP_M: HwDef = { kind: "cap", len: 8, dia: 14 };
+const L_CAP_S: HwDef = { kind: "cap", len: 8, dia: 10 };
+const L_CAP_T: HwDef = { kind: "cap", len: 6, dia: 7, name: "Hole plug" };
+const L_GROMMET: HwDef = { kind: "cap", len: 20, dia: 70, name: "Cable outlet" };
+// HJÄLPA rails
+const L_HSCREW: HwDef = { kind: "screw", len: 13, dia: 4 };
+const L_HWASHER: HwDef = { kind: "washer", len: 1.5, dia: 14 };
+
+type Ext = [number, number, number, number, number, number]; // x0 x1 y0 y1 z0 z1
+const midOf = (e: Ext): Vec3 => [(e[0] + e[1]) / 2, (e[2] + e[3]) / 2, (e[4] + e[5]) / 2];
+const dimsOf = (e: Ext): Vec3 => [e[1] - e[0], e[3] - e[2], e[5] - e[4]];
+
+// a KONSTRUERA drawer in its frame: u across (left to right seen from the front), v up, w out of the front (0 at the frame's front)
+interface DrawerSpec {
+ id: string;
+ axis: "z" | "x"; // the way its front faces
+ c: number; // centre across the front (x for a front facing z, z for one facing x)
+ wf: number; // the frame's front plane
+ iw0: number; // room between the frame's sides
+ dd: number; // box depth
+ yb: number; // underside of the box
+ bh: number; // box height
+ fy: [number, number]; // the front's bottom and top
+ fw: number; // front width
+ sides: [string, string]; // frame parts the rails screw to, left then right seen from the front
+ runW?: number[]; // where the rail screws go along the rail (w), when the side isn't one whole panel
+}
+
+function loftBed(b: PlanBuilder, s: ProductSpec) {
+ const L = s.size.w * 10, D = s.size.d * 10, HT = s.size.h * 10;
+ const T = 18, LAD = 130, SD = 570, HS = 1420;
+ const xL = -L / 2, xR = L / 2, xs0 = xR - SD; // the storage stands under the right end, its front facing out (+x)
+ const zB = -D / 2, zF = D / 2 - LAD; // the frame's back and front; the ladder stands in front of it
+ const zW0 = zB + T, zW1 = zW0 + 600, zD1 = zW1 + T, zK = zF - T; // wardrobe, divider, bookcase
+ const zm = (zB + zF) / 2;
+ const types = new Map<string, string>();
+ const keys = new Map<string, string>();
+ const part = (id: string, name: string, e: Ext, material: PartMaterial = "board", extra?: boolean) => {
+ const size = dimsOf(e);
+ const tk = `${name}|${size.join("x")}|${material}`;
+ if (!types.has(tk)) types.set(tk, b.part(name, size, { material, extra }));
+ keys.set(id, b.place(types.get(tk)!, midOf(e)));
+ };
+ // the two L-shaped steel rails: one flange screwed to the guard, the other carries the mattress
+ const railPieces = (x0: number, x1: number) => [
+ { shape: "box" as const, size: [x1 - x0, 30, 3] as Vec3, pos: [(x0 + x1) / 2, 1450, zW0 + 1.5] as Vec3 },
+ { shape: "box" as const, size: [x1 - x0, 3, 30] as Vec3, pos: [(x0 + x1) / 2, 1436.5, zW0 + 15] as Vec3 },
+ ];
+ const railT = b.compound("Bed rail", railPieces(xL + T, xs0), { material: "metal" });
+ keys.set("MRb", b.place(railT.type, railT.mid));
+ keys.set("MRf", b.place(railT.type, [railT.mid[0], railT.mid[1], zK - (railT.mid[2] - zW0)], [0, Math.PI, 0]));
+ const k = (id: string) => keys.get(id)!;
+ const fin = (id: string) => b.partItem(k(id)).final.pos;
+ const put = (ids: string[], from?: Vec3) => ids.forEach((id) => b.add(k(id), from));
+ const show = (ids: string[], from?: Vec3, off: Vec3 = [0, 0, 0], rot?: Vec3) =>
+ ids.forEach((id) => {
+ const it = b.partItem(k(id));
+ const p = it.final.pos;
+ b.stage(k(id), [p[0] + off[0], p[1] + off[1], p[2] + off[2]], rot ?? it.final.rot, from);
+ });
+ const fit = (def: HwDef, host: string, pts: Vec3[], dir: Vec3, mate?: string, more: Partial<FitOpts> = {}) =>
+ b.fits(def, pts.map((at): FitOpts => ({ on: k(host), at, dir, ...(mate ? { mate: k(mate) } : {}), ...more })), 0.07);
+ const xsAt = (a: number, c: number, n: number) => spread(a, c, n);
+ // a pose lasts until a later step in the same scene changes it, as in the manual
+ const poses = new Map<string, Pose>();
+ const step = (bb: PlanBuilder, o: StepOpts, body: () => void = () => {}) => {
+ const sc = o.scene ?? "main";
+ const pose = o.pose ?? poses.get(sc) ?? "+y";
+ poses.set(sc, pose);
+ return stepOf(bb, { ...o, pose }, body);
+ };
+
+ /* --- parts, where they sit in the finished bed --- */
+ // storage: three full-height sides along z, the wardrobe at the back, the bookcase at the front
+ part("SBK", "Storage side", [xs0, xR, 0, HS, zB, zW0]);
+ part("SDV", "Storage divider", [xs0, xR, 0, HS, zW1, zD1]);
+ part("SBO", "Storage side", [xs0, xR, 0, HS, zK, zF]);
+ part("WT", "Wardrobe top and bottom", [xs0, xR, HS - T, HS, zW0, zW1]);
+ part("WB", "Wardrobe top and bottom", [xs0, xR, 46, 64, zW0, zW1]);
+ part("WS", "Drawer shelf", [xs0, xR, 200, 218, zW0, zW1]);
+ part("BT", "Bookcase top and bottom", [xs0, xR, HS - T, HS, zD1, zK]);
+ part("BB", "Bookcase top and bottom", [xs0, xR, 46, 64, zD1, zK]);
+ const cub = (HS - T - 64 - 3 * T) / 4;
+ const shelfY = [0, 1, 2].map((i) => 64 + (i + 1) * cub + i * T);
+ shelfY.forEach((y, i) => part(`BS${i}`, "Bookcase shelf", [xs0, xR, y, y + T, zD1, zK]));
+ part("PR0", "Plinth rail", [xs0 + 40, xs0 + 58, 0, 46, zD1, zK]);
+ part("PR1", "Plinth rail", [xR - 78, xR - 60, 0, 46, zD1, zK]);
+ // bed frame
+ part("EL1", "End panel half", [xL, xL + T, 0, HT, zB, zm]);
+ part("EL2", "End panel half", [xL, xL + T, 0, HT, zm, zF]);
+ part("BG", "Back guard rail", [xL + T, xR, HS, HT, zB, zW0]);
+ part("FR", "Front rail", [xL + T, xR, HS, HS + 120, zK, zF]);
+ part("CB1", "Cross board", [xs0, xs0 + 120, HS, HS + T, zW0, zK]);
+ part("CB2", "Cross board", [xR - T - 120, xR - T, HS, HS + T, zW0, zK]);
+ part("EG", "End guard rail", [xR - T, xR, HS, HT, zW0, zK]);
+ part("BS", "Back rail", [xL + T, xs0, 592, 712, zB, zW0]);
+ part("FG", "Front guard rail", [xL + T, xs0 + 38, HS + 120, HT, zK, zF]);
+ // ladder
+ const lx = [xs0 + 10, xs0 + 470];
+ part("LRa", "Ladder side", [lx[0], lx[0] + 28, 0, HT, zF, zF + LAD], "board");
+ part("LRb", "Ladder side", [lx[1] - 28, lx[1], 0, HT, zF, zF + LAD], "board");
+ const rungY = [240, 480, 720, 960, 1200];
+ rungY.forEach((y, i) => part(`RG${i}`, "Rung", [lx[0] + 28, lx[1] - 28, y - 12, y + 12, zF + 10, zF + LAD - 10]));
+ // desk: a cabinet against the end panel, open on its left where the end panel closes it, and a top to the storage
+ const xc0 = xL + T, xc1 = xc0 + 600, zc0 = zW0, zc1 = zB + 600;
+ part("CT", "Cabinet top and bottom", [xc0, xc1, 694, 712, zc0, zc1]);
+ part("CBt", "Cabinet top and bottom", [xc0, xc1, 8, 26, zc0, zc1]);
+ part("CR", "Cabinet side", [xc1 - T, xc1, 26, 694, zc0, zc1]);
+ part("CK", "Cabinet back", [xc0 + T, xc1 - T, 26, 694, zc0, zc0 + T]);
+ part("CS1", "Cabinet upright", [xc0, xc0 + T, 26, 694, zc1 - 80, zc1]);
+ part("CS2", "Cabinet upright", [xc0, xc0 + T, 26, 694, zc0, zc0 + 80]);
+ part("DT", "Desk top", [xL + T, xs0, 712, 730, zB, zc1]);
+ part("MAT", "Your mattress", [xL + T + 22, xL + T + 22 + 1890, 1440, 1640, zW0 + 2, zK - 2], "soft", true);
+
+ /* ===== the storage (its own manual), lying on its wardrobe side, bookcase side up ===== */
+ const xe = [xs0 + 60, xR - 60];
+ step(b, { title: "Screw the cam bolts into the storage side and divider", detail: "Lay them on a rug. Four in the side, eight in the divider: four on each face.", pose: "+z", tools: ["screwdriver"], warnings: ["floor"], kind: "bolts" }, () => {
+ put(["SBK"]);
+ show(["SDV"], undefined, [0, 0, 700]);
+ b.then(0.15);
+ fit(L_CAMBOLT, "SBK", [...xe.map((x): Vec3 => [x, HS - 9, zW0]), ...xe.map((x): Vec3 => [x, 55, zW0])], [0, 0, 1]);
+ fit(L_CAMBOLT, "SDV", [...xe.map((x): Vec3 => [x, HS - 9, zW1]), ...xe.map((x): Vec3 => [x, 55, zW1])], [0, 0, -1]);
+ fit(L_CAMBOLT, "SDV", [...xe.map((x): Vec3 => [x, HS - 9, zD1]), ...xe.map((x): Vec3 => [x, 55, zD1])], [0, 0, 1]);
+ });
+ step(b, { title: "Tap four dowels into the wardrobe top", detail: "Two into each end.", tools: ["hammer"], kind: "dowels" }, () => {
+ show(["WT"], undefined, [0, 0, 650]);
+ b.then(0.15);
+ fit(L_DOWEL_S, "WT", [xs0 + 160, xR - 160].map((x): Vec3 => [x, HS - 9, zW0]), [0, 0, -1], "SBK");
+ fit(L_DOWEL_S, "WT", [xs0 + 160, xR - 160].map((x): Vec3 => [x, HS - 9, zW1]), [0, 0, 1], "SDV");
+ });
+ step(b, { title: "Stand the top on the side", detail: "Onto its dowels and bolts, at the end of the side, the holes facing in.", kind: "join" }, () => put(["WT"]));
+ step(b, { title: "Stand the bottom on the side", detail: "At the other end, over its two bolts.", kind: "join" }, () => put(["WB"], [0, 0, 500]));
+ step(b, { title: "Lock the bottom with two small cam locks", detail: "Turn each one until it pulls the bottom tight against the side.", tools: ["screwdriver"], kind: "cams" }, () =>
+ fit(L_CAM_S, "WB", xe.map((x): Vec3 => [x, 64, zW0 + 30]), [0, -1, 0]),
+ );
+ step(b, { title: "Screw the side to the top", detail: "Two long screws through the side into the top, with the Allen key.", tools: ["allen"], kind: "screws" }, () =>
+ fit(L_LAG, "SBK", [xs0 + 280, xR - 280].map((x): Vec3 => [x, HS - 9, zB]), [0, 0, 1], "WT"),
+ );
+ step(b, { title: "Lock the top with two cam locks", detail: "Arrow towards the bolt, then turn until tight.", tools: ["screwdriver"], kind: "cams" }, () =>
+ fit(L_CAM, "WT", xe.map((x): Vec3 => [x, HS - T, zW0 + 30]), [0, 1, 0]),
+ );
+ step(b, { title: "Lay the divider on", detail: "Lower it onto the top and bottom, its bolts going into their holes.", people: 2, kind: "join" }, () => put(["SDV"]));
+ step(b, { title: "Lock the divider with four cam locks", detail: "Two in the top, two in the bottom.", tools: ["screwdriver"], kind: "cams" }, () => {
+ fit(L_CAM, "WT", xe.map((x): Vec3 => [x, HS - T, zW1 - 30]), [0, 1, 0]);
+ fit(L_CAM, "WB", xe.map((x): Vec3 => [x, 64, zW1 - 30]), [0, -1, 0]);
+ });
+ step(b, { title: "Put the bookcase top on and lock it", detail: "Onto the bolts at the divider's top end, then two small cam locks.", tools: ["screwdriver"], kind: "cams" }, () => {
+ put(["BT"], [0, 0, 400]);
+ b.then(0.1);
+ fit(L_CAM_S, "BT", xe.map((x): Vec3 => [x, HS - T, zD1 + 30]), [0, 1, 0]);
+ });
+ // the KONSTRUERA rails for the storage drawer go in now, while the compartment is open
+ const sdr: DrawerSpec = { id: "SD", axis: "x", c: (zW0 + zW1) / 2, wf: xR, iw0: zW1 - zW0, dd: SD - 60, yb: 86, bh: 100, fy: [50, 198], fw: 610, sides: ["SDV", "SBK"] };
+ drawerRails(b, sdr, keys, "Screw the drawer rails into the bottom compartment", "Read the drawer's own leaflet: one rail on each side, three screws in each, just above the bottom.", [sdr], "+z");
+ step(b, { title: "Slide in the drawer shelf", detail: "From the open front, into the slot above the rails.", kind: "join" }, () => put(["WS"], [500, 0, 0]));
+ step(b, { title: "Put the bookcase bottom on and lock it", detail: "Onto the bolts at the bottom end, then two cam locks.", tools: ["screwdriver"], kind: "cams" }, () => {
+ put(["BB"], [0, 0, 400]);
+ b.then(0.1);
+ fit(L_CAM, "BB", xe.map((x): Vec3 => [x, 64, zD1 + 30]), [0, -1, 0]);
+ });
+ step(b, { title: "Screw the side to the drawer shelf", detail: "One long screw through the side into the shelf.", tools: ["allen"], kind: "screws" }, () =>
+ fit(L_LAG, "SBK", [[(xs0 + xR) / 2, 209, zB]], [0, 0, 1], "WS"),
+ );
+ step(b, { title: "Screw six cam bolts into the divider", detail: "For the three bookcase shelves, two each.", tools: ["screwdriver"], kind: "bolts" }, () =>
+ fit(L_CAMBOLT, "SDV", shelfY.flatMap((y) => xe.map((x): Vec3 => [x, y + 9, zD1])), [0, 0, 1]),
+ );
+ step(b, { title: "Stand the three shelves on the divider", detail: "Push each one down over its two bolts.", kind: "join" }, () => put(["BS0", "BS1", "BS2"], [0, 0, 400]));
+ step(b, { title: "Lock the shelves with six cam locks", tools: ["screwdriver"], kind: "cams" }, () =>
+ shelfY.forEach((y, i) => fit(L_CAM, `BS${i}`, xe.map((x): Vec3 => [x, y + T, zD1 + 30]), [0, 1, 0])),
+ );
+ step(b, { title: "Tap dowels into the plinth rails and stand them in", detail: "Two in each end of both rails, then stand them under the bookcase bottom, one at each edge.", tools: ["hammer"], kind: "dowels" }, () => {
+ show(["PR0", "PR1"], undefined, [0, 0, 450]);
+ b.then(0.1);
+ for (const id of ["PR0", "PR1"]) {
+ const x = fin(id)[0];
+ fit(L_DOWEL_S, id, [12, 34].map((y): Vec3 => [x, y, zD1]), [0, 0, -1], "SDV");
+ fit(L_DOWEL_S, id, [12, 34].map((y): Vec3 => [x, y, zK]), [0, 0, 1], "SBO");
+ }
+ });
+ step(b, { title: "Put the plinth rails in", detail: "Their dowels into the divider.", kind: "join" }, () => put(["PR0", "PR1"]));
+ step(b, { title: "Screw ten cam bolts into the other side", detail: "Two for the top, the bottom and each shelf.", tools: ["screwdriver"], kind: "bolts" }, () => {
+ show(["SBO"], undefined, [0, 0, 700]);
+ b.then(0.1);
+ fit(L_CAMBOLT, "SBO", [HS - 9, 55, ...shelfY.map((y) => y + 9)].flatMap((y) => xe.map((x): Vec3 => [x, y, zK])), [0, 0, -1]);
+ });
+ step(b, { title: "Lay the side on", detail: "Together: lower it over all ten bolts and the plinth rails' dowels.", people: 2, kind: "join" }, () => put(["SBO"]));
+ step(b, { title: "Lock the side with ten cam locks", tools: ["screwdriver"], kind: "cams" }, () => {
+ fit(L_CAM, "BT", xe.map((x): Vec3 => [x, HS - T, zK - 30]), [0, 1, 0]);
+ fit(L_CAM, "BB", xe.map((x): Vec3 => [x, 64, zK - 30]), [0, -1, 0]);
+ shelfY.forEach((y, i) => fit(L_CAM, `BS${i}`, xe.map((x): Vec3 => [x, y + T, zK - 30]), [0, 1, 0]));
+ });
+ step(b, { title: "Tap the glides into the bottom edges", detail: "Six: two under each side.", tools: ["hammer"] }, () =>
+ (["SBK", "SDV", "SBO"] as const).forEach((id) => fit(L_PAD, id, [xs0 + 80, xR - 80].map((x): Vec3 => [x, 0, fin(id)[2]]), [0, 1, 0], undefined, { hole: false })),
+ );
+ step(b, { title: "Stand the storage up together", detail: "Lift it from the top end while the other person keeps the bottom on the floor. Stand it where the bed's right end will be.", pose: "+y", people: 2, kind: "standup" });
+
+ /* ===== the loft bed frame (its manual, ladder on the right), built in its own space, then lifted onto the storage ===== */
+ const fr = (o: StepOpts, body: () => void = () => {}) => step(b, { scene: "frame", ...o }, body);
+ const elY = [400, HT - 400];
+ fr({ title: "Screw the connector bolts into an end panel half", detail: "Lay both halves on a rug. Two bolts into the long edge of one, with the spanner.", pose: "+x", tools: ["wrench"], warnings: ["floor"], kind: "bolts" }, () => {
+ show(["EL1"]);
+ show(["EL2"], undefined, [0, 0, 700]);
+ b.then(0.15);
+ fit(L_CONBOLT, "EL1", elY.map((y): Vec3 => [xL + 9, y, zm]), [0, 0, 1]);
+ });
+ fr({ title: "Tap five dowels into the same edge", tools: ["hammer"], kind: "dowels" }, () =>
+ fit(L_DOWEL, "EL1", [300, 650, 900, 1150, 1500].map((y): Vec3 => [xL + 9, y, zm]), [0, 0, 1], "EL2"),
+ );
+ fr({ title: "Press in the connectors and join the halves", detail: "Push the two round connectors into the other half, then fold it over onto the bolts and dowels.", kind: "join" }, () => {
+ fit(L_CONNECTOR, "EL2", elY.map((y): Vec3 => [xL + T, y, zm + 40]), [-1, 0, 0], undefined, { hole: false });
+ b.then(0.1);
+ show(["EL2"]);
+ });
+ fr({ title: "Turn the connectors to pull the halves together", detail: "With the long Allen key, until the joint closes. Push the halves together while you turn.", tools: ["allen"] });
+ fr({ title: "Click on the connector covers", kind: "general" }, () => fit(L_CONCAP, "EL2", elY.map((y): Vec3 => [xL + T + 1, y, zm + 40]), [-1, 0, 0], undefined, { hole: false }));
+ const railX = xsAt(xL + T + 80, xs0 - 80, 9);
+ fr({ title: "Lay the steel rails on the back guard and the front rail", detail: "On a rug, with the flange along the bottom edge on the inside. The holes line up with the ones in the boards.", pose: "+y", warnings: ["floor"], kind: "join" }, () => {
+ show(["BG", "MRb"], undefined, [0, -1300, 900]);
+ show(["FR", "MRf"], undefined, [0, -1300, 1500]);
+ });
+ fr({ title: "Fix each rail with one screw", detail: "In the middle, by hand with the screwdriver. Don't use a drill.", tools: ["screwdriver"], kind: "screws" }, () => {
+ fit(L_RSCREW, "MRb", [[railX[4], 1450, zW0 + 3]], [0, 0, -1], "BG");
+ fit(L_RSCREW, "MRf", [[railX[4], 1450, zK - 3]], [0, 0, 1], "FR");
+ });
+ fr({ title: "Screw the rails on with sixteen screws", detail: "Eight more in each rail, by hand.", tools: ["screwdriver"], kind: "screws" }, () => {
+ const rest = railX.filter((_, i) => i !== 4).concat([(railX[0] + railX[1]) / 2, (railX[7] + railX[8]) / 2]).slice(0, 8);
+ fit(L_RSCREW, "MRb", rest.map((x): Vec3 => [x, 1450, zW0 + 3]), [0, 0, -1], "BG");
+ fit(L_RSCREW, "MRf", rest.map((x): Vec3 => [x, 1450, zK - 3]), [0, 0, 1], "FR");
+ });
+ const nutsAt = (host: string, pts: Vec3[], dir: Vec3) => {
+ fit(L_BARREL, host, pts, dir, undefined, { hole: false });
+ fit(L_HEXNUT, host, pts, dir, undefined, { hole: false });
+ };
+ const gY = [HS + 60, HT - 60];
+ fr({ title: "Bolt the back guard to the end panel", detail: "Stand the end panel upside down. A nut in each barrel nut, the barrel nuts into the guard, then two long bolts through the panel.", pose: "-y", people: 2, tools: ["allen"], kind: "bolts" }, () => {
+ show(["BG", "MRb"]);
+ b.then(0.1);
+ nutsAt("BG", gY.map((y): Vec3 => [xL + T + 50, y, zW0]), [0, 0, -1]);
+ fit(L_BOLT, "EL1", gY.map((y): Vec3 => [xL, y, zB + 9]), [1, 0, 0], "BG");
+ });
+ const cbX = ["CB1", "CB2"].map((id) => fin(id)[0]);
+ fr({ title: "Bolt the two cross boards to the back guard", detail: "A sleeve nut down into each board's end, then a short bolt through the guard into it.", tools: ["allen"], kind: "bolts" }, () => {
+ show(["CB1", "CB2"], [0, -400, 0]);
+ b.then(0.1);
+ ["CB1", "CB2"].forEach((id, i) => {
+ fit(L_SLEEVE, id, [[cbX[i], HS + T, zW0 + 22]], [0, -1, 0], undefined, { hole: false });
+ fit(L_BOLT_S, "BG", [[cbX[i], HS + 9, zB]], [0, 0, 1], id);
+ });
+ });
+ fr({ title: "Bolt the front rail to the end panel", detail: "Slide it in along the cross boards. Barrel nuts with their nuts into the rail, then two long bolts through the panel.", tools: ["allen"], kind: "bolts" }, () => {
+ show(["FR", "MRf"]);
+ b.then(0.1);
+ nutsAt("FR", [[xL + T + 50, HS + 30, zK], [xL + T + 50, HS + 90, zK]], [0, 0, 1]);
+ fit(L_BOLT, "EL2", [[xL, HS + 30, zF - 9], [xL, HS + 90, zF - 9]], [1, 0, 0], "FR");
+ });
+ fr({ title: "Bolt the cross boards to the front rail", detail: "Sleeve nuts and short bolts again, through the rail.", tools: ["allen"], kind: "bolts" }, () =>
+ ["CB1", "CB2"].forEach((id, i) => {
+ fit(L_SLEEVE, id, [[cbX[i], HS + T, zK - 22]], [0, -1, 0], undefined, { hole: false });
+ fit(L_BOLT_S, "FR", [[cbX[i], HS + 9, zF]], [0, 0, -1], id);
+ }),
+ );
+ const fgDowelX = xL + T + 300;
+ fr({ title: "Tap a dowel into the front rail", detail: "The long one, into the hole near the end panel. The front guard sits on it later.", tools: ["hammer"], kind: "dowels" }, () =>
+ fit(L_DOWEL_S, "FR", [[fgDowelX, HS + 120, zF - 9]], [0, 1, 0], "FG"),
+ );
+ fr({ title: "Tap the glides into the end panel", detail: "Four into its bottom edge, two in each half.", tools: ["hammer"] }, () => {
+ fit(L_PAD, "EL1", [zB + 60, zm - 60].map((z): Vec3 => [xL + 9, 0, z]), [0, 1, 0], undefined, { hole: false });
+ fit(L_PAD, "EL2", [zm + 60, zF - 60].map((z): Vec3 => [xL + 9, 0, z]), [0, 1, 0], undefined, { hole: false });
+ });
+ // back to the storage
+ const egX = xR - 9;
+ step(b, { title: "Screw four cam bolts into the top of the storage", detail: "Two into the side at the back, two into the tops at the front edge.", pose: "+y", tools: ["screwdriver"], kind: "bolts" }, () => {
+ fit(L_CAMBOLT, "SBK", [xs0 + 150, xR - 150].map((x): Vec3 => [x, HS, zB + 9]), [0, 1, 0], "BG");
+ fit(L_CAMBOLT, "WT", [[egX, HS, -300]], [0, 1, 0], "EG");
+ fit(L_CAMBOLT, "BT", [[egX, HS, 250]], [0, 1, 0], "EG");
+ });
+ step(b, { title: "Stand the end guard on the storage", detail: "Along the front edge of the top, over the two bolts there.", kind: "join" }, () => put(["EG"], [0, 300, 0]));
+ step(b, { title: "Lock the end guard with two cam locks", tools: ["screwdriver"], kind: "cams" }, () =>
+ fit(L_CAM, "EG", [[xR - T, HS + 34, -300], [xR - T, HS + 34, 250]], [1, 0, 0]),
+ );
+ const frameIds = ["EL1", "EL2", "BG", "MRb", "FR", "MRf", "CB1", "CB2"];
+ step(b, { title: "Turn the frame over onto the storage together", detail: "Lift it over and lower it so the back guard drops onto the storage's bolts and the cross boards rest on its top. Mind your fingers.", people: 2, warnings: ["two", "hand"], kind: "join" }, () => put(frameIds, [0, 600, 0]));
+ step(b, { title: "Lock the back guard with two small cam locks", detail: "From behind the bed.", tools: ["screwdriver"], kind: "cams" }, () =>
+ fit(L_CAM_S, "BG", [xs0 + 150, xR - 150].map((x): Vec3 => [x, HS + 30, zB]), [0, 0, 1]),
+ );
+ step(b, { title: "Bolt the guards to the end guard", detail: "Four barrel nuts with their nuts into the end guard, then two long bolts through the back guard and two through the front rail.", tools: ["allen"], kind: "bolts" }, () => {
+ nutsAt("EG", [[xR - T, HS + 200, zW0 + 50], [xR - T, HS + 320, zW0 + 50], [xR - T, HS + 30, zK - 50], [xR - T, HS + 90, zK - 50]], [1, 0, 0]);
+ fit(L_BOLT, "BG", [[egX, HS + 200, zB], [egX, HS + 320, zB]], [0, 0, 1], "EG");
+ fit(L_BOLT, "FR", [[egX, HS + 30, zF], [egX, HS + 90, zF]], [0, 0, -1], "EG");
+ });
+ const bsY = [625, 680];
+ step(b, { title: "Screw two cam bolts into the storage for the back rail", detail: "Into the back side's edge, facing the end panel.", tools: ["screwdriver"], kind: "bolts" }, () =>
+ fit(L_CAMBOLT, "SBK", bsY.map((y): Vec3 => [xs0, y, zB + 9]), [-1, 0, 0], "BS"),
+ );
+ step(b, { title: "Swing the back rail in", detail: "Low at the back, between the end panel and the storage. Fit its right end over the bolts first.", kind: "join" }, () => put(["BS"], [0, 0, -500]));
+ step(b, { title: "Screw the back rail to the end panel", detail: "Two long screws through the end panel, with the Allen key.", tools: ["allen"], kind: "screws" }, () =>
+ fit(L_LAG, "EL1", bsY.map((y): Vec3 => [xL, y, zB + 9]), [1, 0, 0], "BS"),
+ );
+ step(b, { title: "Lock the back rail with two small cam locks", tools: ["screwdriver"], kind: "cams" }, () =>
+ fit(L_CAM_S, "BS", bsY.map((y): Vec3 => [xs0 - 30, y, zW0]), [0, 0, -1]),
+ );
+ const fgBoltX = xsAt(xL + T + 200, xs0 - 200, 3);
+ step(b, { title: "Bolt the front guard onto the front rail", detail: "Stand it on the rail over the dowel, then three bolts up through the rail.", tools: ["allen"], kind: "bolts" }, () => {
+ put(["FG"], [0, 400, 0]);
+ b.then(0.1);
+ fit(L_BOLT_M, "FR", fgBoltX.map((x): Vec3 => [x, HS + 80, zF - 9]), [0, 1, 0], "FG");
+ });
+ step(b, { title: "Screw the front guard to the end panel", detail: "Two long screws through the end panel.", tools: ["allen"], kind: "screws" }, () =>
+ fit(L_LAG, "EL2", [HS + 220, HT - 80].map((y): Vec3 => [xL, y, zF - 9]), [1, 0, 0], "FG"),
+ );
+ const cbBolts = [-450, -250, -50, 150, 300].map((z) => z * (D / 1140));
+ step(b, { title: "Bolt the cross boards to the storage", detail: "Ten short bolts down through the boards, a sleeve nut up into each from inside the storage.", tools: ["allen"], kind: "bolts" }, () => {
+ ["CB1", "CB2"].forEach((id, i) => fit(L_BOLT_S, id, cbBolts.map((z): Vec3 => [cbX[i], HS + T, z]), [0, -1, 0]));
+ b.then(0.1);
+ ["CB1", "CB2"].forEach((_, i) =>
+ cbBolts.forEach((z) => fit(L_SLEEVE, z < zW1 ? "WT" : "BT", [[cbX[i], HS - T, z]], [0, 1, 0], undefined, { hole: false })),
+ );
+ });
+ // ladder, built lying on the floor
+ const ld = (o: StepOpts, body: () => void = () => {}) => step(b, { scene: "ladder", ...o }, body);
+ const ladIds = ["LRa", "LRb", ...rungY.map((_, i) => `RG${i}`)];
+ const zl = zF + LAD / 2;
+ // seven in each side: one per rung end, two for the top and bottom rungs
+ const rungDowels = (host: string, x: number, dir: Vec3) =>
+ rungY.forEach((y, i) => fit(L_DOWEL, host, (i === 0 || i === rungY.length - 1 ? [zl - 30, zl + 30] : [zl]).map((z): Vec3 => [x, y, z]), dir, `RG${i}`));
+ ld({ title: "Tap fourteen dowels into the ladder sides", detail: "Lay both sides on a rug, seven in each: one per rung end, two for the top and bottom rungs. Don't hammer them all the way.", pose: "+x", tools: ["hammer"], warnings: ["floor"], kind: "dowels" }, () => {
+ show(["LRa"]);
+ show(["LRb"], undefined, [lx[0] - (lx[1] - 28), 0, 400]);
+ b.then(0.1);
+ rungDowels("LRa", lx[0] + 28, [1, 0, 0]);
+ rungDowels("LRb", lx[1] - 28, [-1, 0, 0]);
+ });
+ ld({ title: "Stand the rungs in and put the other side on", detail: "All five rungs into one side, then turn the other side over onto them. Three long screws through it.", tools: ["allen"], kind: "join" }, () => {
+ b.stagger(0.12);
+ show(rungY.map((_, i) => `RG${i}`), [300, 0, 0]);
+ b.then(0.1);
+ show(["LRb"]);
+ b.then(0.1);
+ [0, 2, 4].forEach((i) => fit(L_LAG, "LRb", [[lx[1], rungY[i], zl]], [-1, 0, 0], `RG${i}`));
+ });
+ ld({ title: "Turn it over and screw two cam bolts into the top", detail: "Into the back edge of the left side, above the bed.", pose: "-x", tools: ["screwdriver"], kind: "bolts" }, () =>
+ fit(L_CAMBOLT, "LRa", [HS + 180, HS + 330].map((y): Vec3 => [lx[0] + 14, y, zF]), [0, 0, -1], "FG"),
+ );
+ ld({ title: "Screw the other side to the rungs", detail: "Three long screws.", tools: ["allen"], kind: "screws" }, () =>
+ [1, 2, 3].forEach((i) => fit(L_LAG, "LRa", [[lx[0], rungY[i], zl]], [1, 0, 0], `RG${i}`)),
+ );
+ ld({ title: "Tap a glide into the foot of each side", tools: ["hammer"] }, () => {
+ fit(L_PAD, "LRa", [[lx[0] + 14, 0, zl]], [0, 1, 0], undefined, { hole: false });
+ fit(L_PAD, "LRb", [[lx[1] - 14, 0, zl]], [0, 1, 0], undefined, { hole: false });
+ });
+ ld({ title: "Click the hand grips into the tops", detail: "One half from each side of the slot in each ladder side, pressed together until they click.", kind: "general" }, () => {
+ const gy = HT - 150;
+ fit(L_GRIP_O, "LRa", [[lx[0], gy, zl]], [1, 0, 0], undefined, { hole: false });
+ fit(L_GRIP_O, "LRb", [[lx[1], gy, zl]], [-1, 0, 0], undefined, { hole: false });
+ fit(L_GRIP_I, "LRa", [[lx[0] + 28, gy, zl]], [-1, 0, 0], undefined, { hole: false });
+ fit(L_GRIP_I, "LRb", [[lx[1] - 28, gy, zl]], [1, 0, 0], undefined, { hole: false });
+ });
+ step(b, { title: "Stand the ladder against the bed and screw it on", detail: "In front of the storage, against the end of the front guard. Two long screws from inside the bed through the front rail.", pose: "+y", tools: ["allen"], kind: "screws" }, () => {
+ put(ladIds, [0, 0, 500]);
+ b.then(0.1);
+ fit(L_LAG, "FR", [[lx[0] + 14, HS + 60, zK]], [0, 0, 1], "LRa");
+ fit(L_LAG, "FR", [[lx[1] - 14, HS + 60, zK]], [0, 0, 1], "LRb");
+ });
+ step(b, { title: "Lock the ladder with two cam locks", detail: "In the front guard, from inside the bed.", tools: ["screwdriver"], kind: "cams" }, () =>
+ fit(L_CAM, "FG", [HS + 180, HS + 330].map((y): Vec3 => [lx[0] + 14, y, zK]), [0, 0, 1]),
+ );
+ step(b, { title: "Screw the storage to the ladder", detail: "Four long screws from inside the bookcase, through its side into both ladder sides.", tools: ["allen"], kind: "screws" }, () =>
+ (["LRa", "LRb"] as const).forEach((id, j) => fit(L_LAG, "SBO", [300, 900].map((y): Vec3 => [j ? lx[1] - 14 : lx[0] + 14, y, zK]), [0, 0, 1], id)),
+ );
+ step(b, { title: "Stick the anti-slip strips on the rungs", detail: "Clean each rung, peel off the backing and press a strip on from the middle out.", kind: "general" }, () =>
+ rungY.forEach((y, i) => fit(L_STRIP, `RG${i}`, [[(lx[0] + lx[1]) / 2, y + 12, zl]], [0, -1, 0], undefined, { hole: false })),
+ );
+ step(b, { title: "Lay your mattress in", detail: "No thicker than the mark on the guard, so the guards stay high enough.", kind: "general" }, () => put(["MAT"], [0, 500, 0]));
+
+ /* ===== the desk (its manual: cabinet on the left, top along the back) ===== */
+ const dk = (o: StepOpts, body: () => void = () => {}) => step(b, { scene: "desk", ...o }, body);
+ const cz = [zc0 + 120, zc1 - 120];
+ const cx = [xc0 + 150, xc1 - 150];
+ dk({ title: "Screw eight cam bolts into the cabinet top and bottom", detail: "On a rug, four in each: two for the side, two for the back.", pose: "-y", tools: ["screwdriver"], warnings: ["floor"], kind: "bolts" }, () => {
+ show(["CT"]);
+ show(["CBt"], undefined, [760, 686, 0]);
+ b.then(0.1);
+ fit(L_CAMBOLT, "CT", cz.map((z): Vec3 => [xc1 - 9, 694, z]), [0, -1, 0], "CR");
+ fit(L_CAMBOLT, "CT", cx.map((x): Vec3 => [x, 694, zc0 + 9]), [0, -1, 0], "CK");
+ fit(L_CAMBOLT, "CBt", cz.map((z): Vec3 => [xc1 - 9, 26, z]), [0, 1, 0], "CR");
+ fit(L_CAMBOLT, "CBt", cx.map((x): Vec3 => [x, 26, zc0 + 9]), [0, 1, 0], "CK");
+ });
+ dk({ title: "Stand the side and the back on the top", detail: "The cabinet is built upside down. The side's row of holes faces in.", kind: "join" }, () => show(["CR", "CK"], [0, -400, 0]));
+ dk({ title: "Lock the side with two cam locks", tools: ["screwdriver"], kind: "cams" }, () => fit(L_CAM_S, "CR", cz.map((z): Vec3 => [xc1 - T, 694 - 30, z]), [1, 0, 0]));
+ dk({ title: "Tap in eight dowels and stand the uprights on", detail: "Two in each end of both uprights, then stand them at the open side, one at the front and one at the back.", tools: ["hammer"], kind: "dowels" }, () => {
+ for (const id of ["CS1", "CS2"]) {
+ const z = fin(id)[2];
+ fit(L_DOWEL_S, id, [z - 20, z + 20].map((zz): Vec3 => [xc0 + 9, 694, zz]), [0, 1, 0], "CT");
+ fit(L_DOWEL_S, id, [z - 20, z + 20].map((zz): Vec3 => [xc0 + 9, 26, zz]), [0, -1, 0], "CBt");
+ }
+ b.then(0.1);
+ show(["CS1", "CS2"], [0, -400, 0]);
+ });
+ dk({ title: "Lay the bottom on and lock the back", detail: "Over the bolts and dowels, then two cam locks in the back.", tools: ["screwdriver"], kind: "cams" }, () => {
+ show(["CBt"]);
+ b.then(0.1);
+ fit(L_CAM_S, "CK", cx.map((x): Vec3 => [x, 694 - 30, zc0 + T]), [0, 0, -1]);
+ });
+ dk({ title: "Turn it on its back and lock the bottom", detail: "Four cam locks: two in the side, two in the back.", pose: "+z", tools: ["screwdriver"], kind: "cams" }, () => {
+ fit(L_CAM_S, "CR", cz.map((z): Vec3 => [xc1 - T, 26 + 30, z]), [1, 0, 0]);
+ fit(L_CAM_S, "CK", cx.map((x): Vec3 => [x, 26 + 30, zc0 + T]), [0, 0, -1]);
+ });
+ dk({ title: "Tap the glides into the bottom, then stand it up", detail: "Four, near the corners.", tools: ["hammer"] }, () =>
+ fit(L_PAD, "CBt", [xc0 + 60, xc1 - 60].flatMap((x) => [zc0 + 60, zc1 - 60].map((z): Vec3 => [x, 8, z])), [0, 1, 0], undefined, { hole: false }),
+ );
+ const dtB: Vec3[] = [...cx.flatMap((x) => [zc0 + 120, zc1 - 120].map((z): Vec3 => [x, 712, z]))];
+ const dtS: Vec3[] = [xs0 - 500, xs0 - 120].map((x): Vec3 => [x, 712, zB + 9]);
+ dk({ title: "Screw six cam bolts into the desk top", detail: "Lay it face down on a rug: four for the cabinet, two for the back rail.", pose: "+y", tools: ["screwdriver"], warnings: ["floor"], kind: "bolts" }, () => {
+ show(["DT"], undefined, [0, -712, 900], [Math.PI, 0, 0]);
+ b.then(0.1);
+ fit(L_CAMBOLT, "DT", dtB, [0, -1, 0], "CT");
+ fit(L_CAMBOLT, "DT", dtS, [0, -1, 0]);
+ });
+ dk({ title: "Lay the desk top on the cabinet", detail: "Turn it over, rest its edge on the cabinet and fold it down onto the bolts, flush with the cabinet at the left.", kind: "join" }, () => show(["DT"]));
+ dk({ title: "Lock the desk top with four cam locks", detail: "In the cabinet's top, at the front and back edges.", tools: ["screwdriver"], kind: "cams" }, () => {
+ fit(L_CAM_S, "CT", cx.map((x): Vec3 => [x, 703, zc1]), [0, 0, -1]);
+ fit(L_CAM_S, "CT", cx.map((x): Vec3 => [x, 703, zc0]), [0, 0, 1]);
+ });
+ dk({ title: "Press in the cable outlet", detail: "Into the round hole at the back of the top.", kind: "general" }, () => fit(L_GROMMET, "DT", [[xs0 - 300, 730, zB + 120]], [0, -1, 0], undefined, { hole: false }));
+ const deskIds = ["CT", "CBt", "CR", "CK", "CS1", "CS2", "DT"];
+ step(b, { title: "Carry the desk in under the bed together", detail: "Cabinet against the end panel. Lower the top's back edge onto the back rail so its two bolts drop into the holes. Mind your fingers.", people: 2, warnings: ["two", "hand"], kind: "join" }, () => put(deskIds, [0, 120, 0]));
+ step(b, { title: "Lock the desk top to the back rail", detail: "Two small cam locks in the rail.", tools: ["screwdriver"], kind: "cams" }, () => fit(L_CAM_S, "BS", dtS.map((p): Vec3 => [p[0], 712 - 30, zW0]), [0, 0, -1]));
+ step(b, { title: "Screw the desk top to the storage", detail: "Two long screws from inside the wardrobe through the side into the end of the top.", tools: ["allen"], kind: "screws" }, () =>
+ fit(L_LAG, "SBK", [[xs0 + 30, 721, zB + 5], [xs0 + 30, 721, zB + 13]], [-1, 0, 0], "DT"),
+ );
+ step(b, { title: "Cap the holes in the back guard", detail: "Six caps into the holes you didn't use.", kind: "general" }, () =>
+ fit(L_CAP_M, "BG", xsAt(xL + 300, xs0 - 200, 6).map((x): Vec3 => [x, HS + 250, zW0]), [0, 0, -1], undefined, { hole: false }),
+ );
+ step(b, { title: "Cap the holes in the end panel and the cabinet", detail: "Ten caps into the empty holes on this side of the bed.", kind: "general" }, () => {
+ fit(L_CAP_S, "EL1", [700, 1000, 1300].map((y): Vec3 => [xL + T, y, zB + 200]), [-1, 0, 0], undefined, { hole: false });
+ fit(L_CAP_S, "EL2", [700, 1000, 1300].map((y): Vec3 => [xL + T, y, zF - 200]), [-1, 0, 0], undefined, { hole: false });
+ fit(L_CAP_S, "CR", [[xc1, 200, zc0 + 100], [xc1, 450, zc0 + 100], [xc1, 200, zc1 - 100], [xc1, 450, zc1 - 100]], [-1, 0, 0], undefined, { hole: false });
+ });
+ step(b, { title: "Plug the small holes in the storage", detail: "Six small plugs and two caps in the holes the desk didn't use.", kind: "general" }, () => {
+ fit(L_CAP_T, "SBK", [300, 500, 900, 1100, 1250, 1350].map((y): Vec3 => [xs0 + 40, y, zW0]), [0, 0, -1], undefined, { hole: false });
+ fit(L_CAP_S, "SBK", [[xs0 + 40, 820, zB], [xs0 + 40, 1000, zB]], [0, 0, 1], undefined, { hole: false });
+ });
+
+ /* ===== KONSTRUERA drawers: two in the desk cabinet, one under the wardrobe ===== */
+ const ddr = (i: number, fy: [number, number], yb: number): DrawerSpec => ({
+ id: `DD${i}`, axis: "z", c: (xc0 + xc1) / 2, wf: zc1, iw0: xc1 - xc0 - 2 * T, dd: 520, yb, bh: 230, fy, fw: 596, sides: ["CS1", "CR"], runW: [-30, -62, -520],
+ });
+ const desk = [ddr(0, [96, 393], 60), ddr(1, [396, 693], 420)];
+ drawerRails(b, desk[0], keys, "Screw the drawer rails into the desk cabinet", "Two rails for each drawer, three screws in each, in the holes the drawer leaflet points to.", desk);
+ drawerSet(b, desk, "ddrawer", "-z");
+ drawerSet(b, [sdr], "sdrawer", "-x");
+
+ /* ===== HJÄLPA rails in the wardrobe ===== */
+ const zr = (zW0 + zW1) / 2;
+ part("SRa", "Rail bracket", [xs0 + 50, xs0 + 74, HS - T - 70, HS - T, zr - 15, zr + 15], "metal");
+ part("SRb", "Rail bracket", [xR - 74, xR - 50, HS - T - 70, HS - T, zr - 15, zr + 15], "metal");
+ const rod = (id: string, name: string, len: number, pos: Vec3, rot: Vec3) => keys.set(id, b.place(b.part(name, [25, len, 25], { shape: "cyl", material: "metal" }), pos, rot));
+ rod("SRr", "Suspension rail", SD - 60, [(xs0 + xR) / 2, HS - T - 58, zr], [0, 0, Math.PI / 2]);
+ rod("ARr", "Adjustable clothes rail", zW1 - zW0, [(xs0 + xR) / 2, 832, zr], [Math.PI / 2, 0, 0]);
+ step(b, { title: "Screw the rail brackets under the wardrobe top", detail: "Two screws through washers into each, front to back in the middle of the wardrobe.", tools: ["screwdriver"], kind: "screws" }, () => {
+ put(["SRa", "SRb"], [0, -200, 0]);
+ b.then(0.1);
+ for (const id of ["SRa", "SRb"]) {
+ const x = fin(id)[0];
+ fit(L_HWASHER, id, [-8, 8].map((dz): Vec3 => [x, HS - T - 2, zr + dz]), [0, 1, 0], undefined, { hole: false });
+ fit(L_HSCREW, id, [-8, 8].map((dz): Vec3 => [x, HS - T - 4, zr + dz]), [0, 1, 0], "WT");
+ }
+ });
+ step(b, { title: "Hang the suspension rail in the brackets", detail: "Lift it in and let both ends drop into the hooks.", kind: "join" }, () => put(["SRr"], [0, -150, 0]));
+ step(b, { title: "Fit the adjustable clothes rail", detail: "Pull it out until both ends touch the sides at the height you want, then one screw through each end.", tools: ["screwdriver"], kind: "screws" }, () => {
+ put(["ARr"], [300, 0, 0]);
+ b.then(0.1);
+ fit(L_HSCREW, "ARr", [[(xs0 + xR) / 2, 832, zW0 + 8]], [0, 0, -1]);
+ fit(L_HSCREW, "ARr", [[(xs0 + xR) / 2, 832, zW1 - 8]], [0, 0, 1]);
+ });
+
+ /* ===== doors on HJÄLPA soft-closing hinges ===== */
+ const doorZ: [number, number][] = [[zB + 2, zB + 306], [zB + 308, zB + 612]];
+ doorZ.forEach(([a, c], i) => part(`DR${i}`, "Door", [xR + 1, xR + 19, 219, 1419, a, c]));
+ const hingeAt = (i: number) => [330, 1300].map((y): Vec3 => [xR + 1, y, i ? doorZ[1][1] - 25 : doorZ[0][0] + 25]);
+ step(b, { title: "Screw the hinges into the doors", detail: "Lay the doors face down on a rug. Press each hinge into its cup and tighten its two screws.", scene: "doors", tools: ["screwdriver"], warnings: ["floor"], kind: "hinges" }, () => {
+ doorZ.forEach((_, i) => show([`DR${i}`], undefined, [-(xR + 10), -810, i ? 60 : -60], [0, 0, -Math.PI / 2]));
+ b.then(0.15);
+ doorZ.forEach((_, i) => fit(HW.hinge, `DR${i}`, hingeAt(i), [1, 0, 0], undefined, { twist: i ? -Math.PI / 2 : Math.PI / 2 }));
+ });
+ step(b, { title: "Hang the doors", detail: "Hold each door to the storage, hook its hinges onto the plates on the side and the divider and tighten the screws.", tools: ["screwdriver"], kind: "doors" }, () => {
+ b.stagger(0.3);
+ put(["DR0", "DR1"], [400, 0, 0]);
+ });
+ step(b, { title: "Adjust the doors", detail: "Turn the hinge screws until the gap between the doors is even and both close flush.", tools: ["screwdriver"] });
+}
+
+/** The rails a KONSTRUERA drawer runs on, screwed into its frame: one step for every drawer given. */
+function drawerRails(b: PlanBuilder, d0: DrawerSpec, keys: Map<string, string>, title: string, detail: string, list: DrawerSpec[] = [d0], pose: Pose = "+y") {
+ step(b, { title, detail, tools: ["screwdriver"], kind: "runners", pose }, () => {
+ for (const d of list) {
+ const g = drawerGeo(d);
+ const len = Math.round((d.dd - 10) / 10) * 10;
+ const runW = d.runW ?? spread(g.wBack + 40, g.wFront - 40, 3);
+ [-1, 1].forEach((sx, j) => {
+ b.fit({ kind: "runner", len, dia: 20 }, { on: keys.get(d.sides[j])!, at: g.P(sx * (d.iw0 / 2), d.yb - 2, g.wm), dir: g.Dn(sx, 0, 0), hole: false, twist: d.axis === "x" ? Math.PI / 2 : undefined });
+ b.fits(D_SCREW, runW.map((w): FitOpts => ({ on: keys.get(d.sides[j])!, at: g.P(sx * (d.iw0 / 2 - 6), d.yb - 2, w), dir: g.Dn(sx, 0, 0) })), 0.04);
+ });
+ }
+ });
+}
+
+function drawerGeo(d: DrawerSpec) {
+ const P = (u: number, v: number, w: number): Vec3 => (d.axis === "z" ? [d.c + u, v, d.wf + w] : [d.wf + w, v, d.c - u]);
+ const Dn = (du: number, dv: number, dw: number): Vec3 => (d.axis === "z" ? [du, dv, dw] : [dw, dv, -du]);
+ const E = (u0: number, u1: number, v0: number, v1: number, w0: number, w1: number): Ext =>
+ d.axis === "z" ? [d.c + u0, d.c + u1, v0, v1, d.wf + w0, d.wf + w1] : [d.wf + w0, d.wf + w1, v0, v1, d.c - u1, d.c - u0];
+ const bw = d.iw0 - 26, iw = bw - 24, wFront = -6, wBack = wFront - d.dd, wm = (wFront + wBack) / 2;
+ return { P, Dn, E, bw, iw, wFront, wBack, wm };
+}
+
+/** KONSTRUERA drawers of one size: each box built standing on its front panel, runners on upside down, slid in, front clicked on. */
+function drawerSet(b: PlanBuilder, list: DrawerSpec[], scene: string, pose: Pose) {
+ const types = new Map<string, string>();
+ const made = list.map((d) => {
+ const g = drawerGeo(d);
+ const mk = (name: string, e: Ext, material: PartMaterial = "board") => {
+ const size = dimsOf(e);
+ const tk = `${name}|${size.join("x")}`;
+ if (!types.has(tk)) types.set(tk, b.part(name, size, { material }));
+ return b.place(types.get(tk)!, midOf(e));
+ };
+ const { iw, bw, wFront, wBack } = g;
+ const y0 = d.yb, y1 = d.yb + d.bh;
+ const k = {
+ IF: mk("Drawer front panel", g.E(-iw / 2, iw / 2, y0, y1, wFront - 16, wFront)),
+ SL: mk("Drawer side", g.E(-bw / 2, -bw / 2 + 12, y0, y1, wBack, wFront)),
+ SR: mk("Drawer side", g.E(bw / 2 - 12, bw / 2, y0, y1, wBack, wFront)),
+ BT: mk("Drawer bottom", g.E(-(iw + 10) / 2, (iw + 10) / 2, y0 + 8.5, y0 + 11.5, wBack + 16, wFront - 16), "fiber"),
+ BK: mk("Drawer back", g.E(-iw / 2, iw / 2, y0 + 14, y1, wBack, wBack + 16)),
+ FR: mk("Drawer front", g.E(-d.fw / 2, d.fw / 2, d.fy[0] + 2, d.fy[1] - 2, 1, 21)),
+ };
+ return { d, g, k };
+ });
+ const rep = list.length > 1 ? list.length : undefined;
+ const ds = (o: StepOpts, body: () => void) => step(b, { kind: "drawer", scene, pose, repeat: rep, ...o }, body);
+ const at = (key: string) => b.partItem(key).final.pos;
+ const st = (key: string, from?: Vec3) => b.stage(key, at(key), b.partItem(key).final.rot, from);
+ ds({ title: "Press the stops into the drawer front panel", detail: "Lay it on a rug, inside face up. Push each stop into its hole and slide it along until it locks.", warnings: ["floor"] }, () => {
+ for (const { g, k } of made) st(k.IF, g.Dn(0, 0, 200));
+ b.then(0.15);
+ for (const { d, g, k } of made) b.fits(D_STOP, [-1, 1].map((sx): FitOpts => ({ on: k.IF, at: g.P(sx * (g.iw / 2 - 60), d.yb + 6, g.wFront - 16), dir: g.Dn(0, 0, 1), hole: false })), 0.1);
+ });
+ ds({ title: "Push the sides onto the front panel", detail: "Grooves facing in and down. Press each side onto the fittings until it clicks.", kind: "join" }, () => {
+ b.stagger(0.2);
+ for (const { g, k } of made) {
+ st(k.SL, g.Dn(0, 0, -300));
+ st(k.SR, g.Dn(0, 0, -300));
+ }
+ });
+ ds({ title: "Slide in the drawer bottom", detail: "Along the grooves in both sides, all the way down to the front panel." }, () => {
+ for (const { g, k } of made) st(k.BT, g.Dn(0, 0, -420));
+ });
+ ds({ title: "Lay the back on and lock it", detail: "Two pins through each side into the back, then turn the cam locks in the back until they pull tight.", tools: ["screwdriver"], kind: "cams" }, () => {
+ for (const { g, k } of made) st(k.BK, g.Dn(0, 0, -260));
+ b.then(0.15);
+ for (const { d, g, k } of made)
+ b.fits(D_PIN, [-1, 1].flatMap((sx) => [0.3, 0.75].map((f): FitOpts => ({ on: sx < 0 ? k.SL : k.SR, at: g.P(sx * (g.bw / 2 - 12), d.yb + d.bh * f, g.wBack + 8), dir: g.Dn(-sx, 0, 0), mate: k.BK }))), 0.08);
+ b.then(0.05);
+ for (const { d, g, k } of made)
+ b.fits(D_CAM, [-1, 1].flatMap((sx) => [0.3, 0.75].map((f): FitOpts => ({ on: k.BK, at: g.P(sx * (g.iw / 2 - 28), d.yb + d.bh * f, g.wBack), dir: g.Dn(0, 0, 1) }))), 0.1);
+ });
+ ds({ title: "Screw the bottom to the back", detail: "Two small screws through the bottom into the back.", tools: ["screwdriver"], kind: "screws" }, () => {
+ for (const { d, g, k } of made) b.fits(D_SMALL, [-1, 1].map((sx): FitOpts => ({ on: k.BT, at: g.P(sx * (g.iw / 4), d.yb + 8.5, g.wBack + 8), dir: g.Dn(0, 1, 0), mate: k.BK })), 0.15);
+ });
+ ds({ title: "Screw the runners onto the drawer", detail: "Turn it upside down. Each runner clicks onto the bottom edge of its side, then three screws.", tools: ["screwdriver"], kind: "runners", pose: "-y" }, () => {
+ for (const { d, g, k } of made) {
+ const len = Math.round((d.dd - 30) / 10) * 10;
+ b.fits({ kind: "runner", len, dia: 16 }, [-1, 1].map((sx): FitOpts => ({ on: sx < 0 ? k.SL : k.SR, at: g.P(sx * (g.bw / 2 - 6), d.yb, g.wm), dir: g.Dn(0, 1, 0), hole: false, twist: d.axis === "x" ? Math.PI / 2 : undefined })), 0.25);
+ }
+ b.then(0.1);
+ for (const { d, g, k } of made) {
+ const runW = spread(g.wBack + 40, g.wFront - 40, 3);
+ b.fits(D_SCREW, [-1, 1].flatMap((sx) => runW.map((w): FitOpts => ({ on: sx < 0 ? k.SL : k.SR, at: g.P(sx * (g.bw / 2 - 6), d.yb - 4, w), dir: g.Dn(0, 1, 0) }))), 0.06);
+ }
+ });
+ step(b, { title: list.length > 1 ? `Slide in all ${list.length} drawers` : "Slide the drawer in", detail: "Rest its runners on the rails in the frame and push it in until it closes softly.", kind: "drawer" }, () => {
+ for (const { g, k } of made) {
+ b.stagger(0);
+ for (const key of [k.IF, k.SL, k.SR, k.BT, k.BK]) b.add(key, g.Dn(0, 0, 520));
+ b.wait(0.2);
+ }
+ });
+ step(b, { title: many(list.length, "Click on the drawer front", "Click on the drawer fronts"), detail: "Hold it against the drawer and press it on until it clicks, then line up the gaps.", kind: "join" }, () => {
+ b.stagger(0.25);
+ for (const { g, k } of made) b.add(k.FR, g.Dn(0, 0, 300));
+ });
+}
+
const family: Family = {
names: ["SMÅSTAD"],
build(b, s) {
@@ -932,6 +1557,10 @@ const family: Family = {
buildCustom(b, { ...s, custom: changingRecipe(s, slug === "smastad-desk-90-x-79-x-100") });
return true;
}
+ if (slug === "smastad-loft-bed-twin-97-x-191") {
+ loftBed(b, s);
+ return true;
+ }
const u = unitOf(s);
if (!u) return false;
buildUnit(b, s, u);
diff --git a/src/lib/plan/families/soderhamn.ts b/src/lib/plan/families/soderhamn.ts
index b95e8d8..46b2654 100644
--- a/src/lib/plan/families/soderhamn.ts
+++ b/src/lib/plan/families/soderhamn.ts
@@ -93,6 +93,7 @@ function layout(s: ProductSpec): Layout | null {
case "soderhamn-3-seat-section": return { row: [S3] };
case "soderhamn-corner-section": return { corner: true, back: [], wing: [] };
case "soderhamn-3-seat-sofa": return { row: ["arm", S3, "arm"] };
+ case "soderhamn-armchair": return { row: ["arm", S1, "arm"] }; // the 1-seat section with an armrest each side
case "soderhamn-2-seat-sofa": return { row: [S1, "chaise"] }; // the 2-seat sofa with chaise longue
case "soderhamn-4-seat-sofa-chaise-longue": return { row: ["arm", S3, "chaise"] };
case "soderhamn-corner-sofa-4-seat": return { corner: true, back: [S3, "arm"], wing: [S1] };
diff --git a/src/lib/plan/families/stockholm.ts b/src/lib/plan/families/stockholm.ts
index 39ee224..deb9099 100644
--- a/src/lib/plan/families/stockholm.ts
+++ b/src/lib/plan/families/stockholm.ts
@@ -1560,6 +1560,187 @@ function sideboard(s: ProductSpec): CustomParams {
return { parts, steps };
}
+/**
+ * TV bench with sliding doors (2025), from its manual: the cabinet stands on a rug and goes together on dowels and
+ * pre-fitted clips (bottom, sides, divider), the back slides down its grooves, the two doors drop into their tracks
+ * and the top is screwed on. The base (two leg panels, two rails on cam bolts and dowels, adjustable feet) is set on
+ * the cabinet upside down and bolted, then it is turned up for the back clips, wall spacers, levelling, the wall
+ * fixing, two shelves and the two low cable covers.
+ */
+function tvBench(s: ProductSpec): CustomParams {
+ const { W, H, D } = dims(s);
+ const t = 18, yB = 150, yIn = yB + t, hIn = H - t - yIn; // the cabinet's bottom, inside height
+ const xs = W / 2 - t / 2, xi = W / 2 - t;
+ const zBk = -D / 2 + 5, zD0 = D / 2 - 10, zD1 = D / 2 - 30; // back panel, the two door tracks
+ const dvD = zD1 - 8 - (zBk + 4);
+ const cw = (2 * xi - t) / 2; // each compartment
+ const cx = (sx: number) => sx * (t / 2 + cw / 2);
+ const lx = 600, lt = 30, ld = 380, rz = 110, rh = 60;
+ const parts: CustomPart[] = [
+ part("BT", "Bottom", [W, t, D], [0, yB + t / 2, 0]),
+ part("SL", "Side panel", [t, hIn, D], [-xs, yIn + hIn / 2, 0]),
+ part("SR", "Side panel", [t, hIn, D], [xs, yIn + hIn / 2, 0]),
+ part("DV", "Divider", [t, hIn, dvD], [0, yIn + hIn / 2, zBk + 4 + dvD / 2]),
+ part("BK", "Back panel", [2 * xi, hIn, 8], [0, yIn + hIn / 2, zBk]),
+ ...SIDES.map((sx, i) => part(`D${i}`, "Sliding door", [cw + t + 8, hIn - 6, 16], [sx * (xi - (cw + t + 8) / 2), yIn + hIn / 2, i ? zD1 : zD0])),
+ part("TP", "Top", [W, t, D], [0, H - t / 2, 0]),
+ ...SIDES.map((sx, i) => part(i ? "LR" : "LL", "Leg panel", [lt, yB, ld], [sx * lx, yB / 2, 0], { material: "wood" })),
+ ...SIDES.map((sz, i) => part(`R${i}`, "Rail", [2 * (lx - lt / 2), rh, t], [0, yB - rh / 2, sz * rz])),
+ ...SIDES.map((sx, i) => part(`SH${i}`, "Shelf", [cw - 4, 16, 340], [cx(sx), yIn + 190, -20])),
+ ...SIDES.map((sx, i) => part(`CC${i}`, "Cable cover", [cw - 4, 90, 16], [cx(sx), yIn + 45, zBk + 20])),
+ ];
+ // oak veneer all over
+ for (const p of parts) p.material = "wood";
+ const zEdge = [-130, 130];
+ const legIn = (sx: number) => sx * (lx - lt / 2);
+ const railEnds = (sx: number, ys: number[]) => SIDES.flatMap((sz) => ys.map((y) => [legIn(sx), y, sz * rz] as Vec3));
+ const yR = yB - rh / 2;
+ const supports = (sx: number): { at: Vec3; on: string; dir: Vec3 }[] =>
+ [-150, 120].flatMap((z) => [
+ { at: [sx * xi, yIn + 190 - 8, z] as Vec3, on: sx < 0 ? "SL" : "SR", dir: [sx, 0, 0] as Vec3 },
+ { at: [sx * (t / 2), yIn + 190 - 8, z] as Vec3, on: "DV", dir: [-sx, 0, 0] as Vec3 },
+ ]);
+ const pins = (sx: number) =>
+ [yIn + 15, yIn + 75].flatMap((y) => [
+ { at: [sx * xi, y, zBk + 20] as Vec3, on: sx < 0 ? "SL" : "SR", dir: [sx, 0, 0] as Vec3 },
+ { at: [sx * (t / 2), y, zBk + 20] as Vec3, on: "DV", dir: [-sx, 0, 0] as Vec3 },
+ ]);
+ const byHost = (kind: CustomFix["kind"], name: string, list: { at: Vec3; on: string; dir: Vec3 }[], o: Partial<CustomFix> = {}) =>
+ [...new Set(list.map((p) => `${p.on}|${p.dir.join(",")}`))].map((k) => {
+ const l = list.filter((p) => `${p.on}|${p.dir.join(",")}` === k);
+ return named(kind, name, l.map((p) => p.at), { on: l[0].on, dir: l[0].dir, ...o });
+ });
+ const backClips: Vec3[] = [yIn + 25, H - t - 25].flatMap((y) => [-3, -2, -1, 1, 2, 3].map((k) => [k * (xi / 3.4), y, zBk - 4] as Vec3));
+ const spacers: Vec3[] = SIDES.map((sx) => [sx * (xi - 60), H - t - 50, zBk - 4]);
+ const wallAt: Vec3[] = SIDES.map((sx) => [sx * (xi - 160), H - t - 70, zBk - 4]);
+ const steps: CustomStep[] = [
+ {
+ title: "Tap the dowels into the sides and the divider",
+ detail: "Lay the three short panels on a rug. Two dowels in the bottom edge of each.",
+ fix: [
+ ...SIDES.map((sx) => fx("dowel", zEdge.map((z) => [sx * xs, yIn, z] as Vec3), { dir: UP, on: sx < 0 ? "SL" : "SR", mate: "BT" })),
+ fx("dowel", [-150, 100].map((z) => [0, yIn, z] as Vec3), { dir: UP, on: "DV", mate: "BT" }),
+ ],
+ wait: ["SL", "SR", "DV"],
+ tools: ["hammer"],
+ warnings: ["floor"],
+ },
+ {
+ title: "Click a side onto the bottom",
+ detail: "Lay the bottom on the rug, tracks up. Push the side down onto the dowels until its three clips snap into the bottom.",
+ add: ["BT", "SL"],
+ },
+ { title: "Click on the other side", detail: "The same way at the other end.", add: ["SR"] },
+ { title: "Click in the divider", detail: "In the middle, its notched edge to the back.", add: ["DV"] },
+ { title: "Slide the back panel down its grooves", detail: "Hole for the cables at the bottom. Push it down until it sits in the groove in the bottom.", add: ["BK"], from: { BK: [0, 420, 0] } },
+ { title: "Drop the back door into its track", detail: "The inner track. Lower its bottom edge into the track and let it stand.", add: ["D1"], from: { D1: [0, 420, 0] } },
+ { title: "Drop the front door into its track", detail: "The outer track, the same way.", add: ["D0"], from: { D0: [0, 420, 0] } },
+ {
+ title: "Screw the top on",
+ detail: "Lower it so the doors' top edges go into its tracks, then six screws through it into the sides and the divider.",
+ add: ["TP"],
+ fix: [
+ ...SIDES.map((sx) => fx("screw", [-120, 120].map((z) => [sx * xs, H, z] as Vec3), { dir: DOWN, on: "TP", mate: sx < 0 ? "SL" : "SR", len: 50, dia: 5 })),
+ fx("screw", [-100, 80].map((z) => [0, H, z] as Vec3), { dir: DOWN, on: "TP", mate: "DV", len: 50, dia: 5 }),
+ ],
+ tools: ["allen"],
+ },
+ {
+ title: "Screw cam bolts into the leg panels",
+ detail: "Four in the inside face of each, two where each rail meets it.",
+ fix: SIDES.map((sx) => fx("camScrew", railEnds(sx, [yR - 18, yR + 18]), { dir: [sx, 0, 0], on: sx < 0 ? "LL" : "LR" })),
+ wait: ["LL", "LR", "R0", "R1"],
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Tap dowels into the ends of the rails",
+ detail: "One in each end.",
+ fix: SIDES.flatMap((sz, i) => SIDES.map((sx) => fx("dowel", [[legIn(sx), yR, sz * rz]], { dir: [-sx, 0, 0], on: `R${i}`, mate: sx < 0 ? "LL" : "LR" }))),
+ tools: ["hammer"],
+ },
+ {
+ title: "Join the rails to the leg panels",
+ detail: "Rails onto the cam bolts and dowels, then two cam locks in each end of each rail, turned until tight.",
+ add: ["LL", "R0", "R1", "LR"],
+ fix: SIDES.map((sz, i) => fx("cam", SIDES.flatMap((sx) => [yR - 18, yR + 18].map((y) => [legIn(sx) - sx * 30, y, sz * (rz - t / 2)] as Vec3)), { dir: [0, 0, sz], on: `R${i}` })),
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Screw a foot under each leg panel",
+ detail: "Two in each, by hand all the way in. Then turn the base over.",
+ fix: SIDES.map((sx) => named("foot", "Adjustable foot", [-150, 150].map((z) => [sx * lx, 0, z] as Vec3), { dir: UP, on: sx < 0 ? "LL" : "LR", len: 20, dia: 26 })),
+ warnings: ["hand"],
+ },
+ {
+ title: "Tap dowels into the tops of the leg panels",
+ detail: "Two in each.",
+ fix: SIDES.map((sx) => fx("dowel", [-120, 120].map((z) => [sx * lx, yB, z] as Vec3), { dir: DOWN, on: sx < 0 ? "LL" : "LR", mate: "BT" })),
+ tools: ["hammer"],
+ },
+ {
+ title: "Turn the cabinet upside down and set the base on",
+ detail: "Lay the cabinet top down on the rug together, then lower the base onto it so the dowels find their holes.",
+ pose: "-y",
+ people: 2,
+ warnings: ["two", "floor"],
+ },
+ {
+ title: "Bolt the base on",
+ detail: "Four long bolts through the ends of the rails into the bottom of the cabinet, with the Allen key.",
+ fix: SIDES.map((sz, i) => named("bolt", "Long bolt", SIDES.map((sx) => [legIn(sx) - sx * 45, yB - rh, sz * rz] as Vec3), { dir: UP, on: `R${i}`, mate: "BT", len: 80, dia: 6 })),
+ tools: ["allen"],
+ },
+ {
+ title: "Turn it up and screw the back to the divider",
+ detail: "Stand it on its feet together. Two screws through the back into the divider.",
+ fix: [fx("screw", [yIn + 100, H - t - 100].map((y) => [0, y, zBk - 4] as Vec3), { dir: [0, 0, 1], on: "BK", mate: "DV", len: 50, dia: 5 })],
+ pose: "+y",
+ people: 2,
+ tools: ["allen"],
+ warnings: ["two"],
+ },
+ {
+ title: "Fit the clips along the back",
+ detail: "Twelve clips in the holes along the top and bottom edges, a cover pressed into each, then turned to lock the back in.",
+ fix: [named("clip", "Back clip", backClips, { dir: [0, 0, 1], on: "BK", len: 14, dia: 12 }), named("cap", "Clip cover", backClips, { dir: [0, 0, 1], on: "BK", len: 4, dia: 14 })],
+ },
+ { title: "Press the wall spacers into the back", detail: "One near each top corner.", fix: [named("spacer", "Wall spacer", spacers, { dir: [0, 0, 1], on: "BK", len: 20, dia: 30 })] },
+ {
+ title: "Screw the extenders onto the spacers",
+ detail: "Only if the wall has a skirting board: they hold the top out as far as the board.",
+ fix: [named("spacer", "Extender", spacers.map(([x, y, z]) => [x, y, z - 20] as Vec3), { dir: [0, 0, 1], on: "BK", len: 20, dia: 30 })],
+ },
+ { title: "Set the spacers against the wall", detail: "Push it to the wall and turn each spacer until the back is straight with the wall.", warnings: ["wall"] },
+ { title: "Lead the cables in", detail: "Through the hole in the back, behind the cable covers." },
+ { title: "Level it with the feet", detail: "Turn the four feet with the spanner until the top is level side to side and front to back.", tools: ["wrench", "level"] },
+ {
+ title: "Screw it to the wall",
+ detail: "Mark through the two holes near the top of the back, drill, and a washer on each screw. Click the covers on. Wall screws aren't included: pick ones made for your wall.",
+ fix: [
+ fx("plug", wallAt.map((p) => [p[0], p[1], -D / 2 - 30] as Vec3), { dir: [0, 0, -1] }),
+ fx("washer", wallAt, { dir: [0, 0, -1], dia: 24 }),
+ fx("screw", wallAt, { dir: [0, 0, -1], len: 50, dia: 5 }),
+ fx("cap", wallAt.map((p) => [p[0], p[1], p[2] + 3] as Vec3), { dir: [0, 0, -1], dia: 24 }),
+ ],
+ tools: ["screwdriver", "drill"],
+ wall: true,
+ warnings: ["wall", "tip"],
+ },
+ { title: "Push in the shelf supports on the right", detail: "Slide the doors aside. Four supports at the same height.", fix: byHost("pin", "Shelf support", supports(1), { len: 16, dia: 12 }) },
+ { title: "Lay the right shelf in", detail: "Tilt it in through the open side and lower it onto the supports.", add: ["SH1"], from: { SH1: [0, 0, 300] } },
+ { title: "Push in the shelf supports on the left", fix: byHost("pin", "Shelf support", supports(-1), { len: 16, dia: 12 }) },
+ { title: "Lay the left shelf in", add: ["SH0"], from: { SH0: [0, 0, 300] } },
+ { title: "Push in the pins for the cable covers", detail: "Eight, two at each end of each cover, low down at the back.", fix: [...byHost("pin", "Pin", pins(1), { len: 12, dia: 6 }), ...byHost("pin", "Pin", pins(-1), { len: 12, dia: 6 })] },
+ {
+ title: "Hang the cable covers",
+ detail: "Slot each one over its pins at the back and push it down.",
+ add: ["CC0", "CC1"],
+ from: { CC0: [0, 160, 0], CC1: [0, 160, 0] },
+ },
+ ];
+ return { parts, steps };
+}
+
const family: Family = {
names: ["STOCKHOLM"],
recipe(s) {
@@ -1570,6 +1751,7 @@ const family: Family = {
if (/coffee table/.test(v)) return /2025/.test(slug) ? slatCoffee(s) : ovalCoffee(s);
if (/shelving unit\/bench/.test(v) || /shelving-unit-bench/.test(slug)) return shelvingBench(s);
if (/shelving unit/.test(v)) return shelvingUnit(s);
+ if (/tv bench/.test(v)) return tvBench(s);
if (/bench/.test(v)) return bench(s);
if (/easy chair/.test(v)) return easyChair(s);
if (/armchair/.test(v)) return roundArmchair(s);
diff --git a/src/lib/plan/families/stomso.ts b/src/lib/plan/families/stomso.ts
new file mode 100644
index 0000000..9e4ef0f
--- /dev/null
+++ b/src/lib/plan/families/stomso.ts
@@ -0,0 +1,176 @@
+import type { Family } from "./family";
+import type { CustomFix, CustomParams, CustomPart, CustomStep, PartPiece, ProductSpec, Vec3 } from "../../types";
+
+/**
+ * STOMSÖ wall-mounted bedside table, read from its manual. It is built upside down on a rug: the top lies face
+ * down, one steel side is screwed onto it, the cross brace with its two bumpers clicks into that side, the other
+ * side clicks on and is screwed down, and the bottom board is screwed on last. Turned over, a glide strip goes in
+ * each runner, it is levelled and hung on two wall screws and locked with two hooks. The drawer is a steel tray:
+ * the back slots in, the sides fold up, two screws hold the back and four the wooden front. It slides in last.
+ */
+
+const at = (kind: CustomFix["kind"], pts: Vec3[], dir: Vec3, on?: string, mate?: string, o: Partial<CustomFix> = {}): CustomFix => ({ kind, count: pts.length, at: pts, dir, on, mate, ...o });
+
+/** A part drawn as pieces given in product coordinates: the pieces are moved to be relative to the part's centre. */
+function compound(id: string, name: string, pos: Vec3, pieces: PartPiece[], material: CustomPart["material"]): CustomPart {
+ const lo = [0, 1, 2].map((i) => Math.min(...pieces.map((p) => p.pos[i] - p.size[i] / 2)));
+ const hi = [0, 1, 2].map((i) => Math.max(...pieces.map((p) => p.pos[i] + p.size[i] / 2)));
+ return {
+ id,
+ name,
+ size: [hi[0] - lo[0], hi[1] - lo[1], hi[2] - lo[2]],
+ pos,
+ material,
+ pieces: pieces.map((p) => ({ ...p, pos: [p.pos[0] - pos[0], p.pos[1] - pos[1], p.pos[2] - pos[2]] as Vec3 })),
+ };
+}
+
+/** Top and bottom boards: square at the back, a gentle wave along the front edge. */
+function board(id: string, name: string, W: number, T: number, D: number, y: number): CustomPart {
+ const w = W / 2, d = D / 2;
+ const front: [number, number][] = [[w, d], [w * 0.55, d], [w * 0.3, d - 8], [0, d - 14], [-w * 0.3, d - 8], [-w * 0.55, d], [-w, d]];
+ return { id, name, size: [W, T, D], pos: [0, y, 0], material: "wood", pieces: [{ shape: "slab", size: [W, T, D], pos: [0, 0, 0], outline: [[-w, -d], [w, -d], ...front], round: 6 }] };
+}
+
+function recipe(s: ProductSpec): CustomParams | null {
+ if (!/bedside/i.test(`${s.slug ?? ""} ${s.variant}`)) return null;
+ // IKEA's measures: 36 wide, 29 deep, 20 high; drawer 27 x 24 x 6.5 inside
+ const W = 360, D = 290, H = 200, T = 16;
+ const xo = W / 2, xi = xo - 6; // outer and inner face of the steel sides
+ const zb = -D / 2, zf = D / 2 - 4; // the sides stop just short of the front edge
+ const ly0 = 92, ly1 = 102; // the runner ledge folded into each side
+ const parts: CustomPart[] = [];
+ parts.push(board("TOP", "Top", W, T, D, H - T / 2));
+ const side = (id: string, sx: number) =>
+ compound(id, "Side", [sx * (xo - 3), H / 2, 0], [
+ { shape: "box", size: [6, H - 2 * T, zf - zb], pos: [sx * (xo - 3), H / 2, (zb + zf) / 2] },
+ { shape: "box", size: [20, 3, zf - zb], pos: [sx * (xi - 10), H - T - 1.5, (zb + zf) / 2] },
+ { shape: "box", size: [20, 3, zf - zb], pos: [sx * (xi - 10), T + 1.5, (zb + zf) / 2] },
+ { shape: "box", size: [14, ly1 - ly0, 260], pos: [sx * (xi - 7), (ly0 + ly1) / 2, zb + 135] },
+ // the hanging bracket at the back, with its keyhole for the wall screw
+ { shape: "box", size: [30, 44, 3], pos: [sx * (xi - 15), H - T - 30, zb + 1.5] },
+ ], "board");
+ parts.push(side("SL", -1));
+ parts.push({ id: "BR", name: "Cross brace", size: [2 * xi, 3, 30], pos: [0, ly0 - 1.5, zb + 20], material: "metal" });
+ parts.push(side("SR", 1));
+ parts.push(board("BOT", "Bottom board", W, T, D, T / 2));
+ // the glide strips lie in the runner ledges
+ const strip = (id: string, sx: number): CustomPart => ({ id, name: "Glide strip", size: [14, 2, 250], pos: [sx * (xi - 7), ly1 + 1, zb + 140], material: "soft" });
+ parts.push(strip("GL", -1), strip("GR", 1));
+
+ // the drawer: a steel tray whose sides fold up, a steel back and a wooden front
+ const dx = 150, dy0 = ly1 + 2, dy1 = dy0 + 72, dz0 = zb + 25, dz1 = zf - 20;
+ const dPos: Vec3 = [0, (dy0 + dy1) / 2, (dz0 + dz1) / 2];
+ parts.push(
+ compound("DB", "Drawer tray", dPos, [
+ { shape: "box", size: [2 * dx, 2, dz1 - dz0], pos: [0, dy0 + 1, (dz0 + dz1) / 2] },
+ ...[-1, 1].flatMap((sx): PartPiece[] => [
+ { shape: "box", size: [2, dy1 - dy0, dz1 - dz0], pos: [sx * (dx + 1), (dy0 + dy1) / 2, (dz0 + dz1) / 2] },
+ { shape: "box", size: [xi - 2 - dx - 2, 2, dz1 - dz0], pos: [sx * ((dx + 2 + xi - 2) / 2), dy0 + 1, (dz0 + dz1) / 2] },
+ ]),
+ { shape: "box", size: [2 * dx, dy1 - dy0, 2], pos: [0, (dy0 + dy1) / 2, dz1 - 1] },
+ ], "metal"),
+ );
+ parts.push(
+ compound("DK", "Drawer back", [0, (dy0 + dy1) / 2, dz0 + 6], [
+ { shape: "box", size: [2 * dx, dy1 - dy0 - 4, 2], pos: [0, (dy0 + dy1) / 2, dz0 + 1] },
+ ...[-1, 1].map((sx): PartPiece => ({ shape: "box", size: [2, dy1 - dy0 - 4, 12], pos: [sx * (dx - 1), (dy0 + dy1) / 2, dz0 + 6] })),
+ ], "metal"),
+ );
+ const fy0 = dy0 - 6, fy1 = H - T - 4;
+ parts.push({ id: "DF", name: "Drawer front", size: [2 * xi - 4, fy1 - fy0, 16], pos: [0, (fy0 + fy1) / 2, dz1 + 8], material: "wood" });
+
+ const SCR = { len: 18, dia: 4 }; // the same twelve screws all through
+ const sideScrews = (sx: number, top: boolean): Vec3[] => [-80, 80].map((z) => [sx * (xi - 10), top ? H - T - 2 : 0, z] as Vec3);
+ const hang: Vec3[] = [-1, 1].map((sx) => [sx * (xi - 15), H - T - 30, zb + 3] as Vec3);
+ const away = { DB: [0, 0, 400] as Vec3, DK: [0, 0, 400] as Vec3, DF: [0, 0, 400] as Vec3 };
+ const steps: CustomStep[] = [
+ {
+ title: "Screw one side onto the top",
+ detail: "Lay the top face down on a rug. Stand the side on it, runner ledge down, and drive two screws through its flange.",
+ add: ["TOP", "SL"],
+ fix: [at("screw", sideScrews(-1, true), [0, 1, 0], "SL", "TOP", SCR)],
+ tools: ["screwdriver"],
+ pose: "-y",
+ warnings: ["floor"],
+ },
+ {
+ title: "Press the two bumpers into the cross brace",
+ detail: "Push each one into its hole until it sits flat.",
+ fix: [at("clip", [-100, 100].map((x) => [x, ly0 + 6, zb + 12] as Vec3), [0, -1, 0], "BR", undefined, { name: "Bumper", len: 8, dia: 10 })],
+ wait: ["BR"],
+ },
+ { title: "Click the cross brace into the side", detail: "Slide its end into the back of the runner ledge until it clicks.", add: ["BR"] },
+ { title: "Click the other side onto the brace", detail: "The runner ledges face each other. Push until the brace clicks in.", add: ["SR"], from: { SR: [300, 0, 0] } },
+ { title: "Screw the second side onto the top", detail: "Two screws through its flange, like the first.", fix: [at("screw", sideScrews(1, true), [0, 1, 0], "SR", "TOP", SCR)], tools: ["screwdriver"] },
+ {
+ title: "Screw on the bottom board",
+ detail: "Lay it on the sides, wavy edge to the front, and drive four screws into the flanges. Then turn it over.",
+ add: ["BOT"],
+ fix: [at("screw", [...sideScrews(-1, false), ...sideScrews(1, false)], [0, 1, 0], "BOT", undefined, SCR)],
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Press a glide strip into each runner",
+ detail: "Peel off the backing, push the strip into the back of the ledge and press it down along its length.",
+ add: ["GL", "GR"],
+ from: { GL: [0, 120, 0], GR: [0, 120, 0] },
+ pose: "+y",
+ },
+ {
+ title: "Hold it to the wall and mark the holes",
+ detail: "Set a level on the top and mark through the keyhole in each side's bracket.",
+ tools: ["level", "pencil"],
+ wall: true,
+ },
+ {
+ title: "Drive two wall screws",
+ detail: "Leave the heads standing out a few millimetres. Wall screws and plugs aren't included: pick ones made for your wall.",
+ fix: [
+ { kind: "plug", count: 2, at: hang.map((p) => [p[0], p[1], zb - 40] as Vec3), dir: [0, 0, -1] },
+ { kind: "screw", count: 2, len: 50, dia: 5, at: hang.map((p) => [p[0], p[1], zb - 4] as Vec3), dir: [0, 0, -1] },
+ ],
+ tools: ["drill", "screwdriver"],
+ wall: true,
+ warnings: ["wall"],
+ },
+ {
+ title: "Hang it and lock it with the hooks",
+ detail: "Lift the keyholes over the screw heads. Clip a hook into each bracket, line the table up, then tighten the hooks.",
+ fix: [at("hook", hang, [0, 0, -1], undefined, undefined, { len: 20, dia: 14 })],
+ tools: ["screwdriver"],
+ wall: true,
+ },
+ {
+ title: "Slot the back into the drawer tray",
+ detail: "Lay the tray flat with its edges up and push the back down into the slot at the end.",
+ wait: ["DB", "DK"],
+ from: away,
+ },
+ { title: "Fold up the sides of the tray", detail: "Press each side up against the back until both stand straight." },
+ {
+ title: "Screw the back to the sides",
+ detail: "One small screw through each side into the back.",
+ fix: [-1, 1].map((sx) => at("screw", [[sx * (dx + 3), (dy0 + dy1) / 2, dz0 + 6]], [-sx, 0, 0], "DB", "DK", { len: 8, dia: 4 })),
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Screw the drawer front on",
+ detail: "Four screws from inside the tray into the back of the front.",
+ fix: [at("screw", [-1, 1].flatMap((sx) => [dy0 + 18, dy1 - 18].map((y) => [sx * 110, y, dz1 - 4] as Vec3)), [0, 0, 1], "DB", "DF", SCR)],
+ wait: ["DF"],
+ from: { DF: [0, 0, 400] },
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Slide the drawer in",
+ detail: "Rest its edges on the glide strips and push it in until it stops.",
+ add: ["DB", "DK", "DF"],
+ from: { DB: [0, 0, 640], DK: [0, 0, 640], DF: [0, 0, 640] },
+ },
+ ];
+ return { parts, steps };
+}
+
+const family: Family = { names: ["STOMSÖ", "STOMSO"], recipe };
+export default family;
diff --git a/src/lib/plan/families/tarno.ts b/src/lib/plan/families/tarno.ts
index a33c816..ae8e605 100644
--- a/src/lib/plan/families/tarno.ts
+++ b/src/lib/plan/families/tarno.ts
@@ -6,8 +6,8 @@ import type { CustomParams, CustomPart, CustomStep, PartPiece, ProductSpec, Vec3
* each other at the pivots and one frame hinged to the slatted top. You lay the top upside down, open the frames
* into an X and push the pegs at the top of the legs out into the keyhole slots of the top's two steel bars, then
* slide them along to lock. The table has a V brace that swings up and is held under the top with one knob bolt.
- * The stool sold with a cushion gets its cushion last. The folding chair is sold ready to use and has no manual:
- * its guide only unfolds it and checks it stands firm.
+ * The stool sold with a cushion gets its cushion last. The folding chair and the folding bench are sold ready to use
+ * and have no manual: their guides only unfold them and check they stand firm.
*/
const TUBE = 16;
@@ -157,8 +157,9 @@ function table(): CustomParams {
return { parts, steps };
}
-/** The folding chair: one steel frame (back legs, back slats, the crossed front legs) and the slatted seat hinged in it. */
-function chair(s: ProductSpec): CustomParams {
+/** The folding chair or bench: one steel frame (back legs, back slats, the crossed front legs) and the slatted seat hinged in it. */
+function chair(s: ProductSpec, bench = false): CustomParams {
+ const what = bench ? "bench" : "chair";
const W = s.size.w * 10, H = s.size.h * 10, D = s.size.d * 10;
const xl = W / 2 - TUBE, yS = 450, foot = 12;
const zBf = -D / 2 + 15, zBt = -D / 2 + 40; // back legs: foot and top
@@ -172,10 +173,10 @@ function chair(s: ProductSpec): CustomParams {
pieces.push(tube([x - sx * 2 * TUBE, yS - 20, D / 2 - 70], [x - sx * 2 * TUBE, foot + 60, zBack(foot + 60) + 2 * TUBE]));
for (const z of [zBf, D / 2 - 15]) pieces.push({ shape: "box", size: [22, foot, 30], pos: [x, foot / 2, z], material: "metal" });
}
- for (const y of [H - 60, H - 170]) pieces.push({ shape: "box", size: [2 * xl + TUBE, 15, 55], pos: [0, y, zBack(y) + TUBE / 2 + 8], rot: [Math.atan2(zBt - zBf, H), 0, 0], material: "wood" });
+ for (const y of bench ? [H - 50, H - 145, H - 240] : [H - 60, H - 170]) pieces.push({ shape: "box", size: [2 * xl + TUBE, 15, 55], pos: [0, y, zBack(y) + TUBE / 2 + 8], rot: [Math.atan2(zBt - zBf, H), 0, 0], material: "wood" });
pieces.push(tube([-xl, 120, D / 2 - 50], [xl, 120, D / 2 - 50], 10));
- const frame = compound("F", "Chair frame", pieces, "metal");
- const SD = 280, slats = 5, gap = 8, sw = (SD - gap * (slats - 1)) / slats;
+ const frame = compound("F", bench ? "Bench frame" : "Chair frame", pieces, "metal");
+ const SD = bench ? 340 : 280, slats = 5, gap = 8, sw = (SD - gap * (slats - 1)) / slats;
const z0 = zBack(yS) + TUBE + 10;
const seatPieces: PartPiece[] = [];
for (let i = 0; i < slats; i++) seatPieces.push({ shape: "box", size: [2 * xl - 2 * TUBE, 15, sw], pos: [0, yS - 7.5, z0 + sw / 2 + i * (sw + gap)], material: "wood" });
@@ -185,7 +186,7 @@ function chair(s: ProductSpec): CustomParams {
parts: [frame, seat],
steps: [
{
- title: "Stand the chair up and open the legs",
+ title: `Stand the ${what} up and open the legs`,
detail: "It comes ready to use, with nothing to screw. Stand it on its feet and pull the front legs forward, away from the back.",
add: ["F"],
},
@@ -198,7 +199,7 @@ function chair(s: ProductSpec): CustomParams {
},
{
title: "Check it stands firm",
- detail: "All four feet flat on the floor and the seat level. To fold it, lift the front edge of the seat up to the back.",
+ detail: `All four feet flat on the floor and the seat level. To fold the ${what}, lift the front edge of the seat up to the back.`,
},
],
};
@@ -211,6 +212,7 @@ const family: Family = {
if (/^stool/.test(v)) return stool(s);
if (/^table/.test(v)) return table();
if (/chair/.test(v)) return chair(s);
+ if (/^bench/.test(v)) return chair(s, true);
return null;
},
};
diff --git a/src/lib/plan/families/tittebo.ts b/src/lib/plan/families/tittebo.ts
new file mode 100644
index 0000000..91e8122
--- /dev/null
+++ b/src/lib/plan/families/tittebo.ts
@@ -0,0 +1,125 @@
+import type { Family } from "./family";
+import type { CustomFix, CustomParams, CustomPart, ProductSpec, Vec3 } from "../../types";
+
+/**
+ * TITTEBO roll-front cabinet, from its manual. It stands on the worktop under the wall cabinets, with no bottom and
+ * no back. Lying on one side on a rug, the top panel and the two front rails go onto that side on dowels and cam
+ * bolts, the other side goes on, and the four foot bolts screw into the sides' foot blocks. Upside down, the roll
+ * front slides into the sides' grooves; stood up, its spring roller is screwed under the top and hooked to it, a stop
+ * goes in, and the top cover and plinth clip on. On the worktop the feet are turned out to meet the wall cabinet,
+ * then the shelf goes in.
+ */
+
+const fx = (kind: CustomFix["kind"], at: Vec3[], dir: Vec3, on: string, o: Partial<CustomFix> = {}): CustomFix => ({ kind, count: at.length, at, dir, on, ...o });
+
+function recipe(s: ProductSpec): CustomParams {
+ // IKEA: 61 wide, 30 deep; it fills a 70 to 74.3 cm gap between worktop and wall cabinet
+ const W = s.size.w * 10 || 610, D = s.size.d * 10 || 300, H = 720;
+ const t = 18, sx = W / 2 - t / 2, ix = W / 2 - t, iw = 2 * ix;
+ const foot = 20, sideH = H - foot - 30; // the sides stand on their foot bolts; the top cover sits on them
+ const sTop = foot + sideH;
+ const ty = sTop - t / 2; // the top panel, flush with the sides' top
+ const rz = D / 2 - t / 2; // the front rails
+ const hy = sTop - 150, by = foot + 50; // header rail under the roller, bottom rail
+ const dz = rz - t / 2 - 8; // the roll front runs in grooves just behind the rails
+ const parts: CustomPart[] = [
+ { id: "SL", name: "Side panel", size: [t, sideH, D], pos: [-sx, foot + sideH / 2, 0], material: "board" },
+ { id: "SR", name: "Side panel", size: [t, sideH, D], pos: [sx, foot + sideH / 2, 0], material: "board" },
+ { id: "TP", name: "Top panel", size: [iw, t, D], pos: [0, ty, 0], material: "board" },
+ { id: "HR", name: "Front rail", size: [iw, 60, t], pos: [0, hy, rz], material: "board" },
+ { id: "BR", name: "Front rail", size: [iw, 60, t], pos: [0, by, rz], material: "board" },
+ { id: "DR", name: "Roll front", size: [iw - 4, hy - 30 - by, 10], pos: [0, (hy - 30 + by) / 2, dz], material: "board" },
+ { id: "RO", name: "Spring roller", size: [iw - 40, 70, 70], pos: [0, ty - t / 2 - 35, -D / 2 + 60], shape: "cyl", material: "metal" },
+ { id: "TC", name: "Top cover", size: [W, 30, D], pos: [0, sTop + 15, 0], material: "metal" },
+ { id: "PL", name: "Plinth", size: [W, 50, 12], pos: [0, 25, D / 2 + 6], material: "metal" },
+ { id: "SH", name: "Shelf", size: [iw - 4, t, D - 60], pos: [0, 360, -20], material: "board" },
+ ];
+ const side = (g: number) => (g < 0 ? "SL" : "SR");
+ // cam bolts in each side: two for the top panel, one for each front rail
+ const bolts = (g: number): Vec3[] => [[g * ix, ty, -80], [g * ix, ty, 80], [g * ix, hy, rz], [g * ix, by, rz]];
+ const camsTop = (g: number): Vec3[] => [-80, 80].map((z): Vec3 => [g * (ix - 34), ty - t / 2, z]);
+ const camsRail = (g: number): Vec3[] => [hy, by].map((y): Vec3 => [g * (ix - 34), y, rz - t / 2]);
+ const pins = (y: number): Vec3[] => [-1, 1].flatMap((g) => [-110, 70].map((z): Vec3 => [g * ix, y, z]));
+ return {
+ parts,
+ steps: [
+ {
+ title: "Screw the cam bolts into the sides",
+ detail: "Lay both sides on a rug, inside up. Four cam bolts in each, until they stop.",
+ add: ["SL", "SR"],
+ fix: [-1, 1].map((g) => fx("camScrew", bolts(g), [g, 0, 0], side(g))),
+ tools: ["screwdriver"],
+ pose: "+x",
+ warnings: ["floor"],
+ wait: ["SR"],
+ },
+ { title: "Peel the film off the top panel", detail: "Both sides, before it goes on." },
+ {
+ title: "Tap the dowels into the top panel",
+ detail: "Two into each end.",
+ fix: [-1, 1].map((g) => fx("dowel", [-140, 140].map((z): Vec3 => [g * ix, ty, z]), [-g, 0, 0], "TP", { len: 30, dia: 8, mate: side(g) })),
+ tools: ["hammer"],
+ wait: ["TP"],
+ },
+ { title: "Stand the top panel on the side", detail: "Dowels and the bolt heads into their holes.", add: ["TP"] },
+ { title: "Lock it with two cams", detail: "The black ones. Turn each one clockwise until it grips.", fix: [fx("cam", camsTop(-1), [0, 1, 0], "TP")], tools: ["screwdriver"] },
+ {
+ title: "Push the dowels into the front rails",
+ detail: "The thin ones, one into each end of both rails.",
+ fix: [-1, 1].flatMap((g) => [fx("dowel", [[g * ix, hy + 18, rz]], [-g, 0, 0], "HR", { len: 25, dia: 6, mate: side(g) }), fx("dowel", [[g * ix, by + 18, rz]], [-g, 0, 0], "BR", { len: 25, dia: 6, mate: side(g) })]),
+ wait: ["HR", "BR"],
+ },
+ { title: "Stand the front rails on the side", detail: "One just under the top panel, the other at the foot of the side.", add: ["HR", "BR"] },
+ { title: "Lock them with two cams", detail: "The white ones this time.", fix: [fx("cam", camsRail(-1), [0, 0, -1], "HR")], tools: ["screwdriver"] },
+ { title: "Lower the other side on", detail: "Line up all the bolts and dowels, then press it down.", add: ["SR"], from: { SR: [400, 0, 0] } },
+ {
+ title: "Lock that side with four cams",
+ detail: "Black in the top panel, white in the rails.",
+ fix: [fx("cam", camsTop(1), [0, 1, 0], "TP"), fx("cam", camsRail(1), [0, 0, -1], "HR")],
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Screw in the foot bolts",
+ detail: "One into each foot block under the sides, by hand. They set the height later.",
+ fix: [-1, 1].map((g) => fx("foot", [-1, 1].map((k): Vec3 => [g * sx, foot, k * (D / 2 - 40)]), [0, 1, 0], side(g), { name: "Foot bolt", len: 20, dia: 10 })),
+ },
+ {
+ title: "Slide the roll front into the grooves",
+ detail: "Wipe it clean, turn the cabinet upside down and feed the roll front into both grooves from the open end, flat side out.",
+ add: ["DR"],
+ pose: "-y",
+ from: { DR: [0, -600, 0] },
+ },
+ {
+ title: "Screw the spring roller under the top",
+ detail: "Stand it up. Four screws through the roller's brackets into the top panel.",
+ add: ["RO"],
+ fix: [fx("screw", [-1, 1].flatMap((g) => [-20, 20].map((dz): Vec3 => [g * (iw / 2 - 30), ty - t / 2 - 2, -D / 2 + 60 + dz])), [0, 1, 0], "RO", { len: 14, dia: 4, mate: "TP" })],
+ tools: ["screwdriver"],
+ pose: "+y",
+ },
+ {
+ title: "Hook the roll front to the roller",
+ detail: "Roll it up, hook its top edge onto the roller's strap and fix it with one screw.",
+ fix: [fx("screw", [[0, hy - 40, dz + 5]], [0, 0, -1], "DR", { len: 10, dia: 4 })],
+ tools: ["screwdriver"],
+ },
+ { title: "Fit the stop", detail: "Click it into the groove so the roll front can't run up too far.", fix: [fx("clip", [[-ix + 6, hy - 20, dz]], [1, 0, 0], "SL", { name: "Stop" })] },
+ { title: "Clip the top cover on", detail: "Over the top, front edge first, then press it down at the back.", add: ["TC"], from: { TC: [0, 200, 0] } },
+ { title: "Screw the top cover down", detail: "Two screws at the back.", fix: [fx("screw", [-1, 1].map((g): Vec3 => [g * 200, sTop + 30, -D / 2 + 30]), [0, -1, 0], "TC", { len: 14, dia: 4, mate: "TP" })], tools: ["screwdriver"] },
+ { title: "Peel the film off the roll front", detail: "Pull it off slowly from one corner." },
+ { title: "Clip the plinth on", detail: "Along the foot of the front, hooked over the bottom rail.", add: ["PL"], from: { PL: [0, 0, 200] } },
+ {
+ title: "Fit it under the wall cabinets",
+ detail: "Stand it on the worktop and turn the foot bolts out with the spanner until the top cover presses gently against the wall cabinet.",
+ tools: ["wrench"],
+ warnings: ["tip"],
+ },
+ { title: "Push in the shelf pins", detail: "Four, at the height you want, the same on both sides.", fix: [fx("pin", pins(360 - t / 2 - 4), [0, -1, 0], "SH")] },
+ { title: "Lay the shelf on", detail: "Push it to the back onto the pins.", add: ["SH"], from: { SH: [0, 0, 300] } },
+ ],
+ };
+}
+
+const family: Family = { names: ["TITTEBO"], recipe };
+export default family;
diff --git a/src/lib/plan/families/tolkning.ts b/src/lib/plan/families/tolkning.ts
index 555d291..93adddf 100644
--- a/src/lib/plan/families/tolkning.ts
+++ b/src/lib/plan/families/tolkning.ts
@@ -7,6 +7,7 @@ import { rotate } from "../math";
* The pouffe is a round basket: drop the loose bottom board in, then lay the lid on. No fittings.
* The bench is built upside down: the woven box lies on its top on a rug, the two bent leg frames sit on its
* bottom and are screwed on with twelve Allen screws and washers, then it is turned over and the lid laid on.
+ * The bedside table is two leg frames notched into a cross, a hoop on top, a basket and a loose tray.
* The room divider has no manual: it comes folded and ready to use, so its guide only unfolds it.
*/
@@ -185,12 +186,93 @@ function divider(s: ProductSpec): CustomParams {
return { parts, steps };
}
+/* ---------- bedside table ---------- */
+
+/**
+ * The bedside table: two rattan leg frames notched into each other to stand as a cross, built upside down on a rug
+ * with one screw where the low bars cross. Turned over, a round hoop lies on the top bars on four screws, the woven
+ * basket goes in on the low cross and the tray lies loose on the hoop.
+ */
+function bedside(s: ProductSpec): CustomParams {
+ const D = Math.round(s.size.w * 10) || 520, H = Math.round(s.size.h * 10) || 700;
+ const trayH = 60, yRing = H - trayH, ringT = 15, rR = D / 2 - 30;
+ const rl = D / 2 - 15, LEG = 30, BAR = 25;
+ const yTop = yRing - ringT - BAR / 2, yLow = 150;
+ const frame = (id: string, axis: 0 | 2) => {
+ const at = (r: number, y: number): Vec3 => (axis === 0 ? [r, y, 0] : [0, y, r]);
+ const bar = (y: number): PartPiece => ({ shape: "box", size: axis === 0 ? [2 * rl, BAR, BAR] : [BAR, BAR, 2 * rl], pos: at(0, y) });
+ return built(
+ id,
+ "Leg frame",
+ [
+ ...[-1, 1].map((k): PartPiece => ({ shape: "cyl", size: [LEG, yRing, LEG], pos: at(k * rl, yRing / 2) })),
+ bar(yTop),
+ bar(yLow),
+ ...[-1, 1].map((k) => rod(at(k * (rl - 10), yTop - 150), at(k * 110, yTop - BAR / 2), 14)),
+ ],
+ "wood",
+ );
+ };
+ const n = 24, w = (2 * Math.PI * rR) / n + 2;
+ const hoop: PartPiece[] = Array.from({ length: n }, (_, i) => {
+ const t = (i / n) * 2 * Math.PI;
+ return { shape: "box", size: [w, ringT, 18], pos: [rR * Math.sin(t), yRing - ringT / 2, rR * Math.cos(t)], rot: [0, t, 0] };
+ });
+ const basketD = 2 * (rl - LEG / 2) - 14, basketH = 200; // it fits just inside the legs
+ const parts: CustomPart[] = [
+ frame("A", 0),
+ frame("B", 2),
+ built("R", "Hoop", hoop, "wood"),
+ { id: "K", name: "Basket", size: [basketD, basketH, basketD], pos: [0, yLow + BAR / 2 + basketH / 2, 0], shape: "cyl", material: "wood" },
+ { id: "T", name: "Tray", size: [D, trayH, D], pos: [0, H - trayH / 2, 0], shape: "cyl", material: "wood" },
+ ];
+ const ringScrews: Vec3[] = [[rR, yRing, 0], [-rR, yRing, 0], [0, yRing, rR], [0, yRing, -rR]];
+ const steps: CustomStep[] = [
+ {
+ title: "Slot the two leg frames together",
+ detail: "Upside down on a rug: push one frame down into the notches of the other so they stand as a cross. One screw where the low bars cross, by hand.",
+ add: ["A", "B"],
+ from: { B: [0, -320, 0] },
+ fix: [{ kind: "screw", count: 1, at: [[0, yLow - BAR / 2, 0]], dir: [0, 1, 0], on: "A", mate: "B", len: 30, dia: 4 }],
+ pose: "-y",
+ tools: ["screwdriver"],
+ warnings: ["floor"],
+ },
+ {
+ title: "Turn it over and screw on the hoop",
+ detail: "Lay the hoop on the top bars, its holes over the holes in the bars. Four screws, by hand.",
+ add: ["R"],
+ from: { R: [0, 220, 0] },
+ fix: [
+ { kind: "screw", count: 2, at: ringScrews.slice(0, 2), dir: [0, -1, 0], on: "R", mate: "A", len: 30, dia: 4 },
+ { kind: "screw", count: 2, at: ringScrews.slice(2), dir: [0, -1, 0], on: "R", mate: "B", len: 30, dia: 4 },
+ ],
+ pose: "+y",
+ tools: ["screwdriver"],
+ },
+ {
+ title: "Tighten all five screws",
+ detail: "By hand until the heads sit flush. Stop there: turning further splits the rattan.",
+ tools: ["screwdriver"],
+ warnings: ["hand"],
+ },
+ {
+ title: "Put the basket in and lay the tray on",
+ detail: "Tilt the basket in between two legs onto the low cross. The tray lies loose on the hoop.",
+ add: ["K", "T"],
+ from: { K: [420, 80, 420], T: [0, 220, 0] },
+ },
+ ];
+ return { parts, steps };
+}
+
const family: Family = {
names: ["TOLKNING"],
recipe(s) {
const slug = s.slug ?? "";
if (/pouf/.test(slug) || /pouf/i.test(s.variant)) return pouffe();
if (/bench/.test(slug)) return bench(s);
+ if (/bedside-table/.test(slug)) return bedside(s);
if (/room-divider/.test(slug) || /room divider/i.test(s.variant)) return divider(s);
return null;
},
diff --git a/src/lib/plan/families/trogen.ts b/src/lib/plan/families/trogen.ts
new file mode 100644
index 0000000..6d284ae
--- /dev/null
+++ b/src/lib/plan/families/trogen.ts
@@ -0,0 +1,117 @@
+import type { Family } from "./family";
+import type { CustomFix, CustomPart, CustomParams, HwKind, PartPiece, ProductSpec, Vec3 } from "../../types";
+
+/**
+ * TROGEN, read from the step stool's manual. It is built lying on one side: the two steps are pushed onto that
+ * side's dowels, then the two front boards, and the other side goes on top. Each board end then takes a barrel nut
+ * and a bolt through the side, first on the upper side, then turned over for the other one, and it is stood up.
+ */
+
+const T = 18;
+const fx = (kind: HwKind, at: Vec3[], dir: Vec3, on: string, more: Partial<CustomFix> = {}): CustomFix => ({ kind, count: at.length, at, dir, on, ...more });
+const NUT = { name: "Barrel nut", len: 14, dia: 10 };
+const BOLT = { len: 60, dia: 6 };
+
+function recipe(s: ProductSpec): CustomParams | null {
+ if (!/step stool/i.test(s.variant)) return null;
+ const W = s.size.w * 10, H = s.size.h * 10, D = s.size.d * 10;
+ const inner = W - 2 * T, xs = W / 2 - T / 2, xi = W / 2 - T;
+ const lowY = Math.round(H * 0.41), upY = Math.round(H * 0.77); // tops of the two steps
+ const half = D / 2;
+ const pc = H / 2;
+ // a side, in its own plane: [height, depth]; tall with a hand hole at the back, low and rounded at the front, an arch underneath
+ const prof: [number, number][] = [
+ [0, -half], [H, -half], [H, -half + 90], [H - 30, -half + 130], [upY + 12, -half + 170], [upY - 30, 10],
+ [lowY + 40, 40], [lowY + 15, 80], [lowY + 15, half - 25], [lowY - 10, half], [0, half],
+ [0, half - 50], [35, half - 85], [55, half - 140], [55, -half + 140], [35, -half + 85], [0, -half + 50],
+ ];
+ const side = (id: string, sx: number): CustomPart => ({
+ id, name: "Side", size: [T, H, D], pos: [sx * xs, pc, 0], material: "board",
+ pieces: [{ shape: "slab", size: [H, T, D], pos: [0, 0, 0], outline: prof.map(([y, z]) => [y - pc, z]), round: 12, rot: [0, 0, Math.PI / 2] } as PartPiece],
+ });
+ const lowD = half - 10, upD = half; // the low step runs from the middle to the front, the high one from the back to the middle
+ const apH = 70;
+ const parts: CustomPart[] = [
+ side("SL", -1),
+ { id: "S0", name: "Low step", size: [inner, T, lowD], pos: [0, lowY - T / 2, 10 + lowD / 2], material: "board" },
+ { id: "S1", name: "High step", size: [inner, T, upD], pos: [0, upY - T / 2, -upD / 2], material: "board" },
+ { id: "F0", name: "Front board", size: [inner, apH, T], pos: [0, lowY - T - apH / 2, half - T / 2], material: "board" },
+ { id: "F1", name: "Front board", size: [inner, apH, T], pos: [0, upY - T - apH / 2, -T / 2], material: "board" },
+ side("SR", 1),
+ ];
+ const boards = ["S0", "S1", "F0", "F1"];
+ // two dowels in each board end, a barrel nut and a bolt between them
+ const ends = (b: string): Vec3[] => {
+ const p = parts.find((x) => x.id === b)!;
+ const flat = p.size[1] === T;
+ const span = (flat ? p.size[2] : p.size[1]) / 2 - 22;
+ return [-span, span].map((o) => (flat ? [0, p.pos[1], p.pos[2] + o] : [0, p.pos[1] + o, p.pos[2]]) as Vec3);
+ };
+ const dowels = (sx: number, list: string[], on?: string) =>
+ list.map((b) => fx("dowel", ends(b).map(([, y, z]) => [sx * xi, y, z] as Vec3), on ? [sx, 0, 0] : [-sx, 0, 0], on ?? b, { mate: on ? b : sx < 0 ? "SL" : "SR", len: 30, dia: 8 }));
+ const mid = (b: string) => parts.find((x) => x.id === b)!.pos;
+ const nuts = (sx: number) =>
+ boards.map((b) => {
+ const [, y, z] = mid(b);
+ const flat = b.startsWith("S");
+ const at: Vec3 = flat ? [sx * (xi - 30), y - T / 2, z] : [sx * (xi - 30), y, z - T / 2];
+ return fx("nut", [at], flat ? [0, 1, 0] : [0, 0, 1], b, NUT);
+ });
+ const bolts = (sx: number) =>
+ fx("bolt", boards.map((b) => [sx * (W / 2), mid(b)[1], mid(b)[2]] as Vec3), [-sx, 0, 0], sx < 0 ? "SL" : "SR", BOLT);
+ return {
+ parts,
+ steps: [
+ {
+ title: "Lay one side flat",
+ detail: "Inside face up, on a rug or the flattened box, the arch towards you.",
+ add: ["SL"],
+ pose: "+x",
+ warnings: ["floor"],
+ },
+ {
+ title: "Push the two steps onto the side",
+ detail: "Tap two dowels into the holes for each step, then press the steps down onto them, standing on edge.",
+ fix: dowels(-1, ["S0", "S1"], "SL"),
+ add: ["S0", "S1"],
+ tools: ["hammer"],
+ },
+ {
+ title: "Push the front boards on",
+ detail: "Two dowels for each, then press each board on along the front edge of its step.",
+ fix: dowels(-1, ["F0", "F1"], "SL"),
+ add: ["F0", "F1"],
+ tools: ["hammer"],
+ },
+ {
+ title: "Lower the other side on",
+ detail: "Tap two dowels into the top end of each board, then fit the second side over all eight and press it down evenly.",
+ fix: dowels(1, boards),
+ add: ["SR"],
+ tools: ["hammer"],
+ },
+ {
+ title: "Bolt the top side on",
+ detail: "Drop a barrel nut into the hole in each board, slot facing out, and turn it with a flat screwdriver so the bolt can find its thread. Then turn the bolts in through the side.",
+ fix: [...nuts(1), bolts(1)],
+ tools: ["flathead", "allen"],
+ },
+ {
+ title: "Turn it over and bolt the other side",
+ detail: "The same way: four barrel nuts, then four bolts through the side.",
+ pose: "-x",
+ fix: [...nuts(-1), bolts(-1)],
+ tools: ["flathead", "allen"],
+ },
+ {
+ title: "Stand it up and tighten every bolt",
+ detail: "Go round all eight bolts once more with the Allen key until the steps sit firm.",
+ pose: "+y",
+ tools: ["allen"],
+ },
+ ],
+ };
+}
+
+const family: Family = { names: ["TROGEN"], recipe };
+export default family;
diff --git a/src/lib/plan/families/vasskar.ts b/src/lib/plan/families/vasskar.ts
new file mode 100644
index 0000000..d7a56a5
--- /dev/null
+++ b/src/lib/plan/families/vasskar.ts
@@ -0,0 +1,83 @@
+import type { Family } from "./family";
+import type { CustomFix, CustomParams, CustomPart, CustomStep, PartPiece, ProductSpec, Vec3 } from "../../types";
+
+/**
+ * VASSKÄR shoe rack, read from its manual: two slatted shelves bolted between two bamboo side frames, standing on
+ * its legs (two bolts for each shelf end), then turned over for the four glides tapped into the legs. The dowels,
+ * plates and screws in the bag are only for stacking a second rack on top.
+ */
+
+const fx = (kind: CustomFix["kind"], on: string, dir: Vec3, at: Vec3[], o: Partial<CustomFix> = {}): CustomFix => ({ kind, count: at.length, on, dir, at, ...o });
+
+function shoeRack(s: ProductSpec): CustomParams {
+ // the page: 60 wide, 35 high, 30 deep, 12 cm free under the bottom shelf
+ const W = s.size.w * 10, H = 350, D = 300;
+ const L = 30, r = 30, rt = 20; // legs, shelf rails (height, thickness)
+ const xl = W / 2 - L / 2, zl = D / 2 - L / 2;
+ const ys = [120 + r / 2, H - 15 - r / 2]; // rail centres, bottom shelf first
+ const inner = W - 2 * L;
+ const slats = 11;
+ const shelf: PartPiece[] = [
+ ...[-1, 1].map((sz): PartPiece => ({ shape: "box", size: [inner, r, rt], pos: [0, 0, sz * zl] })),
+ ...Array.from({ length: slats }, (_, i): PartPiece => ({ shape: "box", size: [28, 12, 2 * zl - rt], pos: [-inner / 2 + 20 + ((inner - 40) * i) / (slats - 1), r / 2 - 6, 0] })),
+ ];
+ const side: PartPiece[] = [
+ ...[-1, 1].map((sz): PartPiece => ({ shape: "box", size: [L, H, L], pos: [0, 0, sz * zl] })),
+ ...ys.map((y): PartPiece => ({ shape: "box", size: [rt, r, 2 * zl - L], pos: [0, y - H / 2, 0] })),
+ ];
+ const parts: CustomPart[] = [
+ { id: "SL", name: "Side frame", size: [L, H, D], pos: [-xl, H / 2, 0], pieces: side, material: "wood" },
+ { id: "SR", name: "Side frame", size: [L, H, D], pos: [xl, H / 2, 0], pieces: side, material: "wood" },
+ // a shelf's box is as deep as its rails reach
+ { id: "TS", name: "Slatted shelf", size: [inner, r, 2 * zl + rt], pos: [0, ys[1], 0], pieces: shelf, material: "wood" },
+ { id: "BS", name: "Slatted shelf", size: [inner, r, 2 * zl + rt], pos: [0, ys[0], 0], pieces: shelf, material: "wood" },
+ ];
+ const bolts = (sx: number, y: number): Vec3[] => [-1, 1].map((sz) => [sx * (W / 2), y, sz * zl]);
+ const bolt = { len: 60, dia: 6 };
+ const steps: CustomStep[] = [
+ {
+ title: "Bolt the top shelf to a side frame",
+ detail: "Stand the frame on its legs. Two bolts go through the legs into the ends of the shelf's rails, slats facing up.",
+ add: ["SL", "TS"],
+ fix: [fx("bolt", "SL", [1, 0, 0], bolts(-1, ys[1]), { mate: "TS", ...bolt })],
+ tools: ["allen"],
+ },
+ {
+ title: "Bolt on the bottom shelf",
+ detail: "The same way, two bolts lower down. Don't tighten them fully yet.",
+ add: ["BS"],
+ fix: [fx("bolt", "SL", [1, 0, 0], bolts(-1, ys[0]), { mate: "BS", ...bolt })],
+ tools: ["allen"],
+ },
+ {
+ title: "Bolt on the other side frame",
+ detail: "Four bolts through its legs into both shelves. Check it stands square, then tighten all eight.",
+ add: ["SR"],
+ fix: [fx("bolt", "SR", [-1, 0, 0], [...bolts(1, ys[1]), ...bolts(1, ys[0])], { mate: "TS", ...bolt })],
+ tools: ["allen"],
+ check: "square",
+ },
+ { title: "Turn it upside down", detail: "Onto a rug, so the leg ends face up.", pose: "-y", warnings: ["floor"] },
+ {
+ title: "Tap a glide into each leg",
+ detail: "Into the hole in the end of each leg, with a few light taps of the hammer.",
+ fix: [-1, 1].map((sx) => fx("glide", sx < 0 ? "SL" : "SR", [0, 1, 0], [-1, 1].map((sz) => [sx * xl, 0, sz * zl] as Vec3), { name: "Glide", len: 6, dia: 20 })),
+ tools: ["hammer"],
+ },
+ {
+ title: "Turn it the right way up",
+ detail: "Done. The four dowels, two plates and four screws are only for stacking a second rack on top and fixing the pair to the wall.",
+ pose: "+y",
+ },
+ ];
+ return { parts, steps };
+}
+
+const family: Family = {
+ names: ["VASSKÄR", "VASSKAR"],
+ recipe(s) {
+ if (/shoe rack/i.test(s.variant)) return shoeRack(s);
+ return null;
+ },
+};
+export default family;
diff --git a/src/lib/plan/families/venngarn.ts b/src/lib/plan/families/venngarn.ts
index 076d9cc..ec34f9c 100644
--- a/src/lib/plan/families/venngarn.ts
+++ b/src/lib/plan/families/venngarn.ts
@@ -9,7 +9,7 @@ import { buildCustom } from "../custom";
* with washers and wing nuts. Each armrest, laid on the floor inside up, gets four studs and a spacer disc on each,
* then two people push them onto the ends of the base and the back, fastened the same way from inside. Four corner
* legs are bolted on with two bolts each and get two felt pads, then the sofa is turned up onto its legs and the
- * seat, back and scatter cushions go on.
+ * seat, back and scatter cushions go on. The 1.5-seat armchair's manual is the same, with two studs in the base.
*/
const AW = 260; // armrest width
@@ -26,6 +26,8 @@ function fx(kind: CustomFix["kind"], at: Vec3[], dir: Vec3, on?: string, o: Part
function recipe(s: ProductSpec): CustomParams {
const W = s.size.w * 10, H = s.size.h * 10, D = s.size.d * 10;
const xi = W / 2 - AW; // inside face of an armrest
+ // the 1.5-seat armchair: two studs for the back instead of four, and one seat, back and scatter cushion
+ const chair = /armchair|1-5-seat/i.test(`${s.slug ?? ""} ${s.variant}`);
const deck = 400; // top of the seat base
const backTop = H - 160; // the back's frame, under the back cushions
const seatTop = 530;
@@ -55,20 +57,22 @@ function recipe(s: ProductSpec): CustomParams {
parts.push({ id, name: "Leg", size: [120, LEG_H, 120], pos: legAt(sx, sz), material: "wood" });
}));
// two seat cushions on the base, two back cushions leaning on the back, two scatter cushions in front of them
- const half = xi;
+ const half = chair ? 2 * xi : xi;
+ const cxs = chair ? [0] : [-1, 1];
const zc1 = D / 2 - 10, zbc = zc1 - 700; // the back cushions' front, a seat depth behind the front edge
- [-1, 1].forEach((sx, i) => {
+ cxs.forEach((sx, i) => {
parts.push({ id: `SEAT${i}`, name: "Seat cushion", size: [half - 10, seatTop - deck, zc1 - zb1], pos: [sx * (half / 2), (deck + seatTop) / 2, (zb1 + zc1) / 2], material: "soft" });
});
- [-1, 1].forEach((sx, i) => {
+ cxs.forEach((sx, i) => {
parts.push({ id: `BCUSH${i}`, name: "Back cushion", size: [half - 20, H - seatTop - 10, zbc - zb1], pos: [sx * (half / 2), (seatTop + H - 10) / 2 + 5, (zb1 + zbc) / 2 - 10], rot: [-0.1, 0, 0], material: "soft" });
});
- [-1, 1].forEach((sx, i) => {
+ cxs.forEach((sx, i) => {
parts.push({ id: `PILLOW${i}`, name: "Scatter cushion", size: [440, 440, 140], pos: [sx * (half / 2), seatTop + 260, zbc + 50], rot: [-0.25, 0, 0], material: "soft" });
});
const zs = (zb0 + zb1) / 2;
- const baseStuds = [-0.7, -0.25, 0.25, 0.7].map((t): Vec3 => [t * xi, deck, zs]);
+ const baseStuds = (chair ? [-0.45, 0.45] : [-0.7, -0.25, 0.25, 0.7]).map((t): Vec3 => [t * xi, deck, zs]);
+ const nStuds = chair ? "two" : "four";
const backNuts = baseStuds.map((p): Vec3 => [p[0], deck + 50, p[2]]);
// each armrest: two studs into the end of the base, two into the end of the back
const armStuds = (sx: number) => {
@@ -93,13 +97,13 @@ function recipe(s: ProductSpec): CustomParams {
const steps: CustomStep[] = [
{
- title: "Screw four studs into the seat base",
+ title: `Screw ${nStuds} studs into the seat base`,
detail: "Stand the base on a rug. Turn each stud in by hand into the holes along the back edge until it stops.",
add: ["BASE"],
fix: [fx("stud", baseStuds, [0, -1, 0], "BASE", { ...STUD, mate: "BACK" })],
warnings: ["floor"],
},
- { title: "Lower the back onto the studs", detail: "Hold it upright over the back edge of the base so all four studs go through the holes in its bottom.", add: ["BACK"], from: { BACK: [0, 320, 0] }, people: 2 },
+ { title: "Lower the back onto the studs", detail: `Hold it upright over the back edge of the base so the ${chair ? "two" : "four"} studs go through the holes in its bottom.`, add: ["BACK"], from: { BACK: [0, 320, 0] }, people: 2 },
{
title: "Fasten the back with wing nuts",
detail: "Reach in from behind: a washer, then a wing nut on each stud, turned tight by hand.",
@@ -130,8 +134,12 @@ function recipe(s: ProductSpec): CustomParams {
people: 2,
},
{ title: "Stick two felt pads under each leg", detail: "Over the bolt heads, pressed on firmly.", fix: legs.map((id, i) => fx("glide", legBolts(i), [0, 1, 0], id, { dia: 40 })) },
- { title: "Stand it up and lay in the seat cushions", detail: "Lift it together onto its legs. The seat cushions lie on the base, zips to the back.", add: ["SEAT0", "SEAT1"], pose: "+y", people: 2, warnings: ["two"] },
- { title: "Put the back cushions in place", detail: "Lean them against the back, then the two scatter cushions in front.", add: ["BCUSH0", "BCUSH1", "PILLOW0", "PILLOW1"] },
+ chair
+ ? { title: "Stand it up and lay in the seat cushion", detail: "Lift it together onto its legs. The cushion lies on the base, zip to the back.", add: ["SEAT0"], pose: "+y", people: 2, warnings: ["two"] }
+ : { title: "Stand it up and lay in the seat cushions", detail: "Lift it together onto its legs. The seat cushions lie on the base, zips to the back.", add: ["SEAT0", "SEAT1"], pose: "+y", people: 2, warnings: ["two"] },
+ chair
+ ? { title: "Put the back cushion in place", detail: "Lean it against the back, then the scatter cushion in front.", add: ["BCUSH0", "PILLOW0"] }
+ : { title: "Put the back cushions in place", detail: "Lean them against the back, then the two scatter cushions in front.", add: ["BCUSH0", "BCUSH1", "PILLOW0", "PILLOW1"] },
];
return { parts, steps };
}
diff --git a/src/lib/plan/families/visingso.ts b/src/lib/plan/families/visingso.ts
index 4e1ecd6..96cf4fe 100644
--- a/src/lib/plan/families/visingso.ts
+++ b/src/lib/plan/families/visingso.ts
@@ -9,6 +9,9 @@ import { buildCustom } from "../custom";
* turned over and the four-armed base takes four short bolts. Upside down on the top, the cross goes over the eight
* studs under the top and takes eight washers and nuts, and the table is stood up and its feet adjusted.
* The chair with armrests has no manual (its frame is welded in one piece): its guide only unpacks it.
+ * The plant stand, from its manual: four steel mesh panels hook together at their corners into a box that narrows
+ * towards the top at the front. Upside down, a plate goes in each corner with two screws, an adjustable foot screws
+ * into each plate, and the stand is turned over and the shelf dropped in onto the middle bars.
*/
function fx(kind: CustomFix["kind"], at: Vec3[], dir: Vec3, on?: string, o: Partial<CustomFix> = {}): CustomFix {
@@ -137,7 +140,93 @@ function chair(s: ProductSpec): CustomParams {
};
}
-const recipe = (s: ProductSpec) => (/visingso-table/.test(s.slug ?? "") ? table(s) : /chair/i.test(s.variant) ? chair(s) : null);
+/** A steel mesh panel: a tube frame round a sheet of mesh, with a bar across where the shelf rests. */
+function panelPieces(len: number, h: number, yBar: number): PartPiece[] {
+ const t = 14;
+ return [
+ { shape: "box", size: [len, t, t], pos: [0, -h / 2 + t / 2, 0] },
+ { shape: "box", size: [len, t, t], pos: [0, h / 2 - t / 2, 0] },
+ { shape: "box", size: [t, h, t], pos: [-len / 2 + t / 2, 0, 0] },
+ { shape: "box", size: [t, h, t], pos: [len / 2 - t / 2, 0, 0] },
+ { shape: "box", size: [len - 2 * t, 10, t], pos: [0, yBar - h / 2, 0] },
+ { shape: "box", size: [len - 2 * t, h - 2 * t, 2], pos: [0, 0, 0] },
+ ];
+}
+
+function plantStand(s: ProductSpec): CustomParams {
+ const W = Math.round(s.size.w * 10) || 700, D = Math.round(s.size.d * 10) || 430, H = Math.round(s.size.h * 10) || 740;
+ const FOOT = 16, PL = 4;
+ const y0 = FOOT + PL; // bottom of the panels
+ const ph = H - y0;
+ const lean = 150; // the front comes in this much towards the top
+ const zB = -D / 2 + 7, zF0 = D / 2 - 7;
+ const yBar = 0.55 * ph; // the shelf bars, up from the panels' foot
+ const tilt = Math.atan2(lean, ph);
+ const zF = (y: number) => zF0 - (lean * (y - y0)) / ph;
+ const yc = y0 + ph / 2;
+ const sidePart = (id: string, g: number): CustomPart => {
+ const x = g * (W / 2 - 7);
+ const t = 14, zt = zF(H);
+ // a side is a trapezoid: square at the back, sloping at the front
+ const pieces: PartPiece[] = [
+ { shape: "box", size: [t, t, zF0 - zB], pos: [x, y0 + t / 2, (zB + zF0) / 2] },
+ { shape: "box", size: [t, t, zt - zB], pos: [x, H - t / 2, (zB + zt) / 2] },
+ { shape: "box", size: [t, ph, t], pos: [x, yc, zB] },
+ { shape: "box", size: [t, Math.hypot(ph, lean), t], pos: [x, yc, (zF0 + zt) / 2], rot: [-tilt, 0, 0] },
+ { shape: "box", size: [t, 10, zF(y0 + yBar) - zB], pos: [x, y0 + yBar, (zB + zF(y0 + yBar)) / 2] },
+ ];
+ // the mesh, in strips that follow the sloping front
+ const n = 14, sh = (ph - 2 * t) / n;
+ for (let k = 0; k < n; k++) {
+ const y = y0 + t + (k + 0.5) * sh, z1 = zF(y) - t;
+ pieces.push({ shape: "box", size: [2, sh, z1 - zB - t], pos: [x, y, (zB + t + z1) / 2] });
+ }
+ return { id, name: "Side panel", size: [t, ph, zF0 - zB], pos: [x, yc, (zB + zF0) / 2], material: "metal", pieces: pieces.map((p) => ({ ...p, pos: [p.pos[0] - x, p.pos[1] - yc, p.pos[2] - (zB + zF0) / 2] })) };
+ };
+ const len = W - 28;
+ const parts: CustomPart[] = [
+ { id: "BK", name: "Back panel", size: [len, ph, 14], pos: [0, yc, zB], material: "metal", pieces: panelPieces(len, ph, yBar) },
+ sidePart("SL", -1),
+ sidePart("SR", 1),
+ { id: "FR", name: "Front panel", size: [len, Math.hypot(ph, lean), 14], pos: [0, yc, (zF0 + zF(H)) / 2], rot: [-tilt, 0, 0], material: "metal", pieces: panelPieces(len, Math.hypot(ph, lean), yBar * (Math.hypot(ph, lean) / ph)) },
+ { id: "SH", name: "Shelf", size: [len - 10, 8, zF(y0 + yBar) - zB - 20], pos: [0, y0 + yBar + 9, (zB + zF(y0 + yBar)) / 2], material: "metal" },
+ ];
+ const corners: [number, number][] = [[-1, zB], [1, zB], [1, zF0], [-1, zF0]];
+ const plateAt = corners.map(([g, z]): Vec3 => [g * (W / 2 - 40), FOOT, z - Math.sign(z) * 33]);
+ const screws = corners.flatMap(([g, z]): Vec3[] => [[g * (W / 2 - 7), FOOT, z - Math.sign(z) * 45], [g * (W / 2 - 45), FOOT, z]]);
+ const sideOf = (p: Vec3) => (Math.abs(Math.abs(p[0]) - (W / 2 - 7)) < 1 ? (p[0] < 0 ? "SL" : "SR") : p[2] < 0 ? "BK" : "FR");
+ return {
+ parts,
+ steps: [
+ { title: "Hook a side panel onto the back panel", detail: "Stand them on a rug at a right angle and slide the two hooks down into the slots.", add: ["BK", "SL"], from: { SL: [0, 60, 0] }, warnings: ["floor"] },
+ { title: "Hook on the front panel", detail: "Its two hooks go into the other edge of the side panel. The sloping side faces the front.", add: ["FR"], from: { FR: [0, 60, 0] } },
+ { title: "Close the box with the other side", detail: "Four hooks this time, two into the back and two into the front.", add: ["SR"], from: { SR: [0, 60, 0] } },
+ {
+ title: "Turn it upside down and lay in the corner plates",
+ detail: "One in each corner, across the ends of the two panels.",
+ fix: [fx("plate", plateAt, [0, 1, 0], undefined, { name: "Corner plate", len: 4, dia: 70 })],
+ pose: "-y",
+ },
+ {
+ title: "Screw down the corner plates",
+ detail: "Two screws through each plate, one into each panel.",
+ fix: screws.map((p) => fx("screw", [p], [0, 1, 0], undefined, { len: 12, dia: 5, mate: sideOf(p) })),
+ tools: ["screwdriver"],
+ },
+ { title: "Screw a foot into each plate", detail: "By hand, into the hole in the middle of the plate.", fix: [fx("foot", plateAt.map((p): Vec3 => [p[0], 0, p[2]]), [0, 1, 0], undefined, { len: FOOT, dia: 35 })], warnings: ["hand"] },
+ {
+ title: "Turn it over and drop in the shelf",
+ detail: "It rests on the bars across the middle. Turn the feet to stop it rocking. It holds 20 kg at most.",
+ add: ["SH"],
+ from: { SH: [0, 500, 0] },
+ pose: "+y",
+ },
+ ],
+ };
+}
+
+const recipe = (s: ProductSpec) =>
+ /visingso-table/.test(s.slug ?? "") ? table(s) : /chair/i.test(s.variant) ? chair(s) : /plant stand/i.test(s.variant) ? plantStand(s) : null;
/** The top waits upside down beside the stand while the column, cross and base go together. */
function build(b: PlanBuilder, s: ProductSpec): boolean {
diff --git a/src/lib/plan/families/vittskar.ts b/src/lib/plan/families/vittskar.ts
index 564bbac..e32bad3 100644
--- a/src/lib/plan/families/vittskar.ts
+++ b/src/lib/plan/families/vittskar.ts
@@ -1,6 +1,7 @@
import type { Family } from "./family";
-import type { PartPiece, Pose, ProductSpec, StepKind, ToolId, Vec3, WarnId } from "../../types";
+import type { CustomFix, CustomParams, CustomPart, PartPiece, Pose, ProductSpec, StepKind, ToolId, Vec3, WarnId } from "../../types";
import type { FitOpts, HwDef, PlanBuilder } from "../builder";
+import { buildCustom } from "../custom";
/**
* VITTSKÄR, from IKEA's manuals: outdoor furniture in plastic rattan.
@@ -469,6 +470,118 @@ function chair(b: PlanBuilder, s: ProductSpec): boolean {
return true;
}
+/* ---------- the round table: four top quarters face down, four leg panels slid into their tracks ---------- */
+
+/**
+ * From the round table's manual: the four quarters of the top are laid face down and pushed together into halves and
+ * then a whole, the four leg panels slide into the tracks under the seams, a cross connector is screwed over their
+ * free ends, each panel is bolted to the top's brackets, four braces go in between the panels' outer ends, all 20
+ * fittings are tightened, and two people turn it over and level the feet.
+ */
+function roundTable(s: ProductSpec): CustomParams {
+ const R = (s.size.w * 10) / 2 || 935, H = s.size.h * 10 || 740;
+ const TT = 40, ty = H - TT / 2, under = H - TT;
+ const PT = 30, arm = Math.round(R * 0.62); // the leg panels, from the middle out
+ const RH = 40, ry = under - RH / 2; // the brackets under the top, beside each panel
+ const arc = (sx: number, sz: number): [number, number][] => {
+ const h = R / 2;
+ const pts: [number, number][] = [[-sx * h, -sz * h]];
+ for (let i = 0; i <= 12; i++) {
+ const a = (i / 12) * (Math.PI / 2);
+ pts.push([sx * R * Math.cos(a) - sx * h, sz * R * Math.sin(a) - sz * h]);
+ }
+ return pts;
+ };
+ const quads: [number, number][] = [[-1, -1], [1, -1], [1, 1], [-1, 1]];
+ // the panels lie along the seams: +x, -x, +z, -z
+ const dirs: Vec3[] = [[1, 0, 0], [-1, 0, 0], [0, 0, 1], [0, 0, -1]];
+ const mid = (PT / 2 + arm) / 2, len = arm - PT / 2;
+ const panelAt = (d: Vec3): Vec3 => [d[0] * mid, (H - TT) / 2, d[2] * mid];
+ const panelSize = (d: Vec3): Vec3 => (d[0] ? [len, H - TT, PT] : [PT, H - TT, len]);
+ // each panel's bracket under the top runs beside it, on its clockwise side
+ const side = (d: Vec3): Vec3 => [-d[2], 0, d[0]];
+ // the brackets come fixed under the top, one per panel, on the quarter beside it
+ const brackets = dirs.map((d) => {
+ const sd = side(d), bl = 260, bm = PT / 2 + 40 + bl / 2;
+ const pos: Vec3 = [d[0] * bm + sd[0] * (PT / 2 + 15), ry, d[2] * bm + sd[2] * (PT / 2 + 15)];
+ return { pos, size: (d[0] ? [bl, RH, 30] : [30, RH, bl]) as Vec3, q: quads.findIndex(([sx, sz]) => Math.sign(pos[0]) === sx && Math.sign(pos[2]) === sz) };
+ });
+ const parts: CustomPart[] = [
+ ...quads.map(([sx, sz], i): CustomPart => {
+ const pos: Vec3 = [(sx * R) / 2, ty, (sz * R) / 2];
+ const own = brackets.filter((k) => k.q === i).map((k): PartPiece => ({ shape: "box", size: k.size, pos: [k.pos[0] - pos[0], k.pos[1] - ty, k.pos[2] - pos[2]] }));
+ return { id: `Q${i}`, name: "Top quarter", size: [R, TT, R], pos, material: "wood", pieces: [{ shape: "slab", size: [R, TT, R], pos: [0, 0, 0], outline: arc(sx, sz) }, ...own] };
+ }),
+ ...dirs.map((d, i): CustomPart => ({ id: `P${i}`, name: "Leg panel", size: panelSize(d), pos: panelAt(d), material: "wood" })),
+ // braces between neighbouring panels' outer ends, on the underside of the top
+ ...[[0, 2], [2, 1], [1, 3], [3, 0]].map(([a, b], i): CustomPart => {
+ const da = dirs[a], db = dirs[b];
+ const r0 = arm - 120;
+ const cx = ((da[0] + db[0]) * r0) / 2, cz = ((da[2] + db[2]) * r0) / 2;
+ const L = Math.SQRT2 * r0 - 140;
+ return { id: `B${i}`, name: "Brace", size: [L, RH, 30], pos: [cx, ry, cz], rot: [0, cx * cz > 0 ? Math.PI / 4 : -Math.PI / 4, 0], material: "metal" };
+ }),
+ ];
+ const panelBolts = dirs.flatMap((d, i): CustomFix[] => {
+ const sd = side(d);
+ const at = [140, 260].map((r): Vec3 => [d[0] * (PT / 2 + r) - sd[0] * (PT / 2), ry, d[2] * (PT / 2 + r) - sd[2] * (PT / 2)]);
+ return [
+ { kind: "washer", count: 2, at: at.map((p): Vec3 => [p[0] - sd[0] * 2, p[1], p[2] - sd[2] * 2]), dir: sd, on: `P${i}`, len: 2, dia: 18 },
+ { kind: "bolt", count: 2, at, dir: sd, on: `P${i}`, mate: `Q${brackets[i].q}`, len: 55, dia: 6 },
+ ];
+ });
+ const braceBolts: CustomFix[] = parts
+ .filter((p) => p.id.startsWith("B"))
+ .flatMap((p): CustomFix[] => {
+ const a = p.rot![1], h = p.size[0] / 2 - 30;
+ const at = [-1, 1].map((g): Vec3 => [p.pos[0] + g * h * Math.cos(a), under - RH, p.pos[2] - g * h * Math.sin(a)]);
+ return [
+ { kind: "washer", count: 2, at: at.map((q): Vec3 => [q[0], q[1] - 2, q[2]]), dir: [0, 1, 0], on: p.id, len: 2, dia: 18 },
+ { kind: "bolt", count: 2, at, dir: [0, 1, 0], on: p.id, len: 55, dia: 6 },
+ ];
+ });
+ return {
+ parts,
+ steps: [
+ {
+ title: "Push the top quarters together in pairs",
+ detail: "Lay all four face down on a rug, with a helper. Slide each pair together until the pegs at the seam lock.",
+ add: ["Q0", "Q1"],
+ pose: "-y",
+ people: 2,
+ warnings: ["floor", "two"],
+ from: { Q0: [-300, 0, 0], Q1: [300, 0, 0] },
+ },
+ {
+ title: "Push the two halves together",
+ detail: "Join the other pair the same way, then line up the four pegs along the middle seam and press until it closes.",
+ add: ["Q2", "Q3"],
+ from: { Q2: [0, 0, 400], Q3: [0, 0, 400] },
+ },
+ {
+ title: "Slide the leg panels into their tracks",
+ detail: "One at a time, from the rim inwards along a seam, until each panel's end reaches the middle.",
+ add: ["P0", "P1", "P2", "P3"],
+ from: { P0: [500, 0, 0], P1: [-500, 0, 0], P2: [0, 0, 500], P3: [0, 0, -500] },
+ },
+ {
+ title: "Screw the cross connector on",
+ detail: "Over the four panels' free ends in the middle, a screw into each.",
+ fix: [
+ { kind: "connector", name: "Cross connector", count: 1, at: [[0, 0, 0]], dir: [0, 1, 0], on: "P0", len: 30, dia: 120 },
+ { kind: "screw", count: 4, at: dirs.map((d): Vec3 => [d[0] * 60, 0, d[2] * 60]), dir: [0, 1, 0], on: "P0", len: 20, dia: 5 },
+ ],
+ tools: ["allen"],
+ },
+ { title: "Bolt the panels to the top's brackets", detail: "Two bolts with washers through each panel, by hand for now.", fix: panelBolts, tools: ["allen"], warnings: ["loose"] },
+ { title: "Fit the four braces", detail: "Each goes between two panels' outer ends, flat on the underside of the top. Two bolts with washers in each.", add: ["B0", "B1", "B2", "B3"], fix: braceBolts, tools: ["allen"] },
+ { title: "Tighten all the bolts", detail: "All 16 bolts and the 4 connector screws, firmly.", tools: ["allen"] },
+ { title: "Turn the table over together", detail: "Lift it by the edge of the top with a helper, not by one leg panel.", pose: "+y", people: 2, warnings: ["two"] },
+ { title: "Level the feet", detail: "Turn the foot under each panel until the table stands steady." },
+ ],
+ };
+}
+
/* ---------- the tables: the base first, then upside down on the top ---------- */
function slats(x0: number, x1: number, z0: number, z1: number, y0: number, y1: number, n: number, gap = 8): PartPiece[] {
@@ -581,6 +694,10 @@ function build(b: PlanBuilder, s: ProductSpec): boolean {
const slug = s.slug ?? "";
if (/chair-armrests/.test(slug)) return chair(b, s);
if (/coffee-table/.test(slug)) return coffee(b, s);
+ if (slug === "vittskar-table-187") {
+ buildCustom(b, { ...s, custom: roundTable(s) });
+ return true;
+ }
if (/vittskar-table/.test(slug)) return dining(b, s);
const lay = layout(s);
return lay ? sofa(b, s, lay) : false;
diff --git a/src/lib/plan/families/vitval.ts b/src/lib/plan/families/vitval.ts
index b923b8a..e613e8c 100644
--- a/src/lib/plan/families/vitval.ts
+++ b/src/lib/plan/families/vitval.ts
@@ -509,11 +509,132 @@ function recipe(g: Geo) {
return { parts, steps };
}
+/**
+ * The underbed, from its own manual: a white steel tube frame on castors. The long back rail is bent round at both
+ * ends; the end rails slide into those ends and are clamped with long bolts and nuts, the front rail with its low
+ * guard slides onto their other ends and is bolted from the sides, then 13 slats click in on their holders.
+ * `dz` moves the whole bed forward (the bunk set shows it half pulled out).
+ */
+function underbed(dz: number) {
+ const L = 1970, W = 900, T = 25, TH = 30; // tube 25 wide, 30 tall
+ const X = L / 2 - T / 2, Zr = W / 2 - T / 2;
+ const yR = 65; // rail centre, on 50 mm castors
+ const parts: CustomPart[] = [];
+ const put = (id: string, name: string, size: Vec3, pos: Vec3, o: Partial<CustomPart> = {}) => parts.push({ id, name, size, pos: [pos[0], pos[1], pos[2] + dz], material: "metal", ...o });
+ const sx = [-1, 1] as const;
+ const wheel = (x: number, y: number, z: number): PartPiece => ({ shape: "cyl", size: [50, 20, 50], pos: [x, y, z], rot: [0, 0, Math.PI / 2], material: "metal" });
+ const RET = 200; // the bent ends of the back rail
+ const FRET = 150; // the front rail's ends
+ // back frame: long rail and its two bent ends, castors under the corners
+ put("UBF", "Back frame", [L, 80, RET], [0, 40, -W / 2 + RET / 2], {
+ pieces: [
+ { shape: "box", size: [L - 2 * T, TH, T], pos: [0, yR - 40, -RET / 2 + T / 2] },
+ ...sx.map((x): PartPiece => ({ shape: "box", size: [T, TH, RET], pos: [x * X, yR - 40, 0] })),
+ ...sx.map((x) => wheel(x * (X - 40), -15, -RET / 2 + 60)),
+ ],
+ });
+ // end rails: their back ends sit inside the bent ends, their front ends inside the front rail's ends
+ const z0 = -W / 2 + RET / 2, z1 = W / 2 - FRET / 3;
+ for (const x of sx) put(`UBE${x < 0 ? "l" : "r"}`, "End rail", [20, 20, z1 - z0], [x * X, yR, (z0 + z1) / 2]);
+ // front rail with its guard: a low rail, a tube along the top, posts at the ends and in the middle
+ const yG = 190;
+ put("UBR", "Front rail", [L, 200, FRET], [0, 100, W / 2 - FRET / 2], {
+ // the guard stands just in front of the rail, so it rises in front of the mattress
+ pieces: [
+ { shape: "box", size: [L - 2 * T, TH, T], pos: [0, yR - 100, FRET / 2 - T / 2] },
+ ...sx.map((x): PartPiece => ({ shape: "box", size: [T, TH, FRET], pos: [x * X, yR - 100, 0] })),
+ ...sx.map((x) => wheel(x * (X - 40), -75, FRET / 2 - 60)),
+ { shape: "cyl", size: [20, L - 140, 20], pos: [0, yG - 100, FRET / 2 + 10], rot: [0, 0, Math.PI / 2] },
+ ...[-1, 0, 1].map((k): PartPiece => ({ shape: "cyl", size: [20, yG - yR - TH / 2 + 10, 20], pos: [k * (L / 2 - 70), (yG + yR + TH / 2) / 2 - 100 - 5, FRET / 2 + 10] })),
+ ],
+ });
+ // stop loop behind the back rail, it catches on the bed above so the underbed can't come right out
+ put("UBS", "Stop loop", [260, 80, 12], [0, yR + 25, -W / 2 - 6], {
+ pieces: [
+ { shape: "cyl", size: [12, 260, 12], pos: [0, 34, 0], rot: [0, 0, Math.PI / 2] },
+ ...sx.map((x): PartPiece => ({ shape: "cyl", size: [12, 80, 12], pos: [x * 124, 0, 0] })),
+ ],
+ });
+ // slats across, from the back rail to the front rail
+ const yS = yR + TH / 2 + 5;
+ const slatL = 2 * Zr + 10;
+ const n = 13;
+ const xs = Array.from({ length: n }, (_, i) => -L / 2 + 90 + ((L - 180) * i) / (n - 1));
+ xs.forEach((x, i) => put(`UBL${i}`, "Slat", [60, 10, slatL], [x, yS, 0], { material: "wood" }));
+ put("UBM", "Your mattress", [2000, 120, 900], [0, yS + 5 + 60, 0], { material: "soft", extra: true });
+
+ const P = (x: number, y: number, z: number): Vec3 => [x, y, z + dz];
+ const steps: CustomStep[] = [
+ {
+ title: "Push the two bumpers into the back frame",
+ detail: "Into the holes under the long rail, one either side of the middle. Lay the frame on a rug.",
+ add: ["UBF"],
+ fix: [{ kind: "glide", count: 2, name: "Bumper", len: 20, dia: 20, at: sx.map((x) => P(x * 450, yR - TH / 2, -Zr)), dir: [0, 1, 0], on: "UBF" }],
+ pose: "+y",
+ warnings: ["floor"],
+ },
+ {
+ title: "Bolt the stop loop to the back of the rail",
+ detail: "Its ends sit against the back of the long rail, the loop standing up. Two bolts.",
+ add: ["UBS"],
+ fix: [{ kind: "bolt", count: 2, len: 16, dia: 6, at: sx.map((x) => P(x * 124, yR, -W / 2 - 12)), dir: [0, 0, 1], on: "UBS", mate: "UBF" }],
+ from: { UBS: [0, 0, -300] },
+ tools: ["allen"],
+ },
+ {
+ title: "Slide the end rails into the bent ends",
+ detail: "Push each one in until its holes line up with the holes on top.",
+ add: ["UBEl", "UBEr"],
+ from: { UBEl: [0, 0, 400], UBEr: [0, 0, 400] },
+ },
+ {
+ title: "Clamp each joint with two long bolts",
+ detail: "Down through the holes, a nut underneath. Hold the nut with the spanner and tighten with the Allen key.",
+ fix: [
+ { kind: "bolt", count: 4, len: 60, dia: 6, at: sx.flatMap((x) => [-1, 1].map((k) => P(x * X, yR + TH / 2, z0 + k * 40))), dir: [0, -1, 0], on: "UBF", mate: "UBEl" },
+ { kind: "nut", count: 4, len: 6, dia: 10, at: sx.flatMap((x) => [-1, 1].map((k) => P(x * X, yR - TH / 2, z0 + k * 40))), dir: [0, 1, 0], on: "UBF" },
+ ],
+ tools: ["allen", "wrench"],
+ },
+ {
+ title: "Slide the front rail onto the end rails",
+ detail: "The guard faces up and out. Push it on until it meets the frame.",
+ add: ["UBR"],
+ from: { UBR: [0, 0, 400] },
+ },
+ {
+ title: "Bolt the front rail from the sides",
+ detail: "Two bolts through each end of the front rail into the end rail inside.",
+ fix: sx.map((x): CustomFix => ({ kind: "bolt", count: 2, len: 16, dia: 6, at: [-1, 1].map((k) => P(x * (L / 2), yR, W / 2 - FRET / 2 + k * 30)), dir: [-x, 0, 0], on: "UBR", mate: x < 0 ? "UBEl" : "UBEr" })),
+ tools: ["allen"],
+ },
+ {
+ title: "Click the slats into the rails",
+ detail: "A holder on each end of every slat, curved side up. Press each holder into its hole until it clicks.",
+ add: xs.map((_, i) => `UBL${i}`),
+ fix: [
+ { kind: "clip", count: 2 * n, name: "Slat holder", len: 20, dia: 12, at: xs.flatMap((x) => [-1, 1].map((k) => P(x, yS, k * (slatL / 2 - 15)))), dir: [0, -1, 0], on: "UBL0", mate: "UBF" },
+ ],
+ },
+ { title: "Lay in your mattress", detail: "No thicker than 13 cm, so it still slides under the bed.", add: ["UBM"] },
+ ];
+ return { parts, steps };
+}
+
const family: Family = {
names: ["VITVAL"],
recipe(s) {
+ if (/^underbed/i.test(s.variant) || s.slug === "vitval-underbed-90-x-200") return underbed(0);
const g = geoOf(s);
- return g ? recipe(g) : null;
+ if (!g) return null;
+ const r = recipe(g);
+ if (!g.loft && /underbed/i.test(`${s.variant} ${s.slug ?? ""}`)) {
+ // the set: the bunk bed's manual, then the underbed's, shown half pulled out in front
+ const u = underbed(650);
+ u.steps[0] = { ...u.steps[0], title: "Now the underbed: push the two bumpers into its back frame" };
+ return { parts: [...r.parts, ...u.parts], steps: [...r.steps, ...u.steps] };
+ }
+ return r;
},
};
export default family;
diff --git a/src/lib/plan/families/yxstaby.ts b/src/lib/plan/families/yxstaby.ts
index 4a7bcfb..e240aa6 100644
--- a/src/lib/plan/families/yxstaby.ts
+++ b/src/lib/plan/families/yxstaby.ts
@@ -1,5 +1,5 @@
import type { Family } from "./family";
-import type { CustomFix, CustomParams, CustomPart, CustomStep, ProductSpec, Vec3 } from "../../types";
+import type { CustomFix, CustomParams, CustomPart, CustomStep, PartPiece, ProductSpec, Vec3 } from "../../types";
/**
* YXSTABY gaming monitor stand, read from its manual: a particleboard top on two steel end legs, with a steel cable
@@ -7,6 +7,12 @@ import type { CustomFix, CustomParams, CustomPart, CustomStep, ProductSpec, Vec3
* flange, the cable tray is laid on and tipped up, the left leg slides on, then the leg flanges, the tray flange and
* two small corner brackets are screwed down. Four anti-slip pads go under the legs and the stand is turned over;
* the hooks clip onto the back. Fourteen screws of one kind in all.
+ * The side table on castors, from its manual: built upside down on a rug. Four connector bolts go into the top, each
+ * post takes a barrel nut and slides onto a bolt, a locking screw holds it, the shelf drops over the posts onto four
+ * pins, and the bottom board goes on. One castor screws through it into a post (loose for now), the three curved
+ * slatted panels slide into the round track one by one, then that castor is tightened and the other three go in.
+ * The thumbstick stool, from its manual: the column clicks into the round base and the seat clicks onto the column.
+ * IKEA: 37.5 across, 44.2 high.
*/
const fx = (kind: CustomFix["kind"], at: Vec3[], dir: Vec3, on: string, o: Partial<CustomFix> = {}): CustomFix => ({ kind, count: at.length, at, dir, on, ...o });
@@ -116,11 +122,167 @@ function recipe(s: ProductSpec): CustomParams {
return { parts, steps };
}
+/** Euler angles (x then z) that turn a part's y axis onto d. */
+function along(d: Vec3): Vec3 {
+ const n = Math.hypot(...d);
+ const [x, y, z] = [d[0] / n, d[1] / n, d[2] / n];
+ return [Math.atan2(z, y), 0, Math.atan2(-x, Math.hypot(y, z))];
+}
+
+/** Turns v by an "XYZ" Euler, as three.js does (R = Rx Ry Rz). */
+function turn(v: Vec3, r: Vec3 = [0, 0, 0]): Vec3 {
+ let [x, y, z] = v;
+ const [a, b, c] = r;
+ [x, y] = [x * Math.cos(c) - y * Math.sin(c), x * Math.sin(c) + y * Math.cos(c)];
+ [x, z] = [x * Math.cos(b) + z * Math.sin(b), -x * Math.sin(b) + z * Math.cos(b)];
+ [y, z] = [y * Math.cos(a) - z * Math.sin(a), y * Math.sin(a) + z * Math.cos(a)];
+ return [x, y, z];
+}
+
+/** A part from pieces given where they sit in the finished product, centred on their bounds. */
+function compound(id: string, name: string, pieces: PartPiece[], material: CustomPart["material"]): CustomPart {
+ const lo: Vec3 = [Infinity, Infinity, Infinity], hi: Vec3 = [-Infinity, -Infinity, -Infinity];
+ for (const p of pieces)
+ for (const sx of [-1, 1])
+ for (const sy of [-1, 1])
+ for (const sz of [-1, 1]) {
+ const c = turn([(sx * p.size[0]) / 2, (sy * p.size[1]) / 2, (sz * p.size[2]) / 2], p.rot);
+ for (let i = 0; i < 3; i++) {
+ lo[i] = Math.min(lo[i], p.pos[i] + c[i]);
+ hi[i] = Math.max(hi[i], p.pos[i] + c[i]);
+ }
+ }
+ const pos: Vec3 = [(lo[0] + hi[0]) / 2, (lo[1] + hi[1]) / 2, (lo[2] + hi[2]) / 2];
+ return { id, name, size: [hi[0] - lo[0], hi[1] - lo[1], hi[2] - lo[2]], pos, material, pieces: pieces.map((p) => ({ ...p, pos: [p.pos[0] - pos[0], p.pos[1] - pos[1], p.pos[2] - pos[2]] })) };
+}
+
+/** The corners of a square board outline, half width h (the slab rounds them). */
+function roundSquare(h: number): [number, number][] {
+ return [[-h, -h], [h, -h], [h, h], [-h, h]];
+}
+
+function sideTable(): CustomParams {
+ const HT = 500, H = 550, CAST = 60;
+ const BT = 18, TT = 20;
+ const yB = CAST + BT; // top of the bottom board
+ const yT = H - TT; // underside of the top
+ const R = 222; // the round track the panels run in
+ const PT = 12; // panel thickness
+ const ps = 136; // posts sit on the diagonals, inside the panels
+ const POST = 25;
+ const yS = 300; // the shelf
+ const corners: Vec3[] = [[-ps, 0, -ps], [ps, 0, -ps], [ps, 0, ps], [-ps, 0, ps]];
+ const posts = corners.map((_, i) => `P${i + 1}`);
+ const parts: CustomPart[] = [
+ { id: "T", name: "Top", size: [HT, TT, HT], pos: [0, yT + TT / 2, 0], material: "wood", pieces: [{ shape: "slab", size: [HT, TT, HT], pos: [0, 0, 0], outline: roundSquare(HT / 2), round: 150 }] },
+ ...corners.map((c, i): CustomPart => ({ id: posts[i], name: "Post", size: [POST, yT - yB, POST], pos: [c[0], (yT + yB) / 2, c[2]], material: "metal" })),
+ { id: "S", name: "Shelf", size: [2 * R - 50, 15, 2 * R - 50], pos: [0, yS, 0], material: "board", pieces: [{ shape: "slab", size: [2 * R - 50, 15, 2 * R - 50], pos: [0, 0, 0], outline: roundSquare(R - 25), round: 180 }] },
+ { id: "B", name: "Bottom board", size: [2 * R + 30, BT, 2 * R + 30], pos: [0, CAST + BT / 2, 0], material: "wood", pieces: [{ shape: "slab", size: [2 * R + 30, BT, 2 * R + 30], pos: [0, 0, 0], outline: roundSquare(R + 15), round: 160 }] },
+ ];
+ // three curved panels of slats, each over a third of the track less a gap, so they can be slid round to open it
+ const panel = (id: string, mid: number): CustomPart => {
+ const n = 11, span = (2 * Math.PI) / 3 - 0.12;
+ const w = (R * span) / n;
+ const pieces: PartPiece[] = Array.from({ length: n }, (_, k) => {
+ const t = mid - span / 2 + (k + 0.5) * (span / n);
+ return { shape: "box", size: [w - 2, yT - yB - 6, PT], pos: [R * Math.cos(t), (yT + yB) / 2, R * Math.sin(t)], rot: [0, -(t + Math.PI / 2), 0] };
+ });
+ return compound(id, "Side panel", pieces, "soft");
+ };
+ const mids = [-Math.PI / 2, Math.PI / 6, (5 * Math.PI) / 6]; // back, front right, front left
+ parts.push(panel("A", mids[0]), panel("C", mids[1]), panel("D", mids[2]));
+ const UP: Vec3 = [0, 1, 0];
+ // the barrel nut and the locking screw go in from the post's inner face, towards the middle
+ const inward = (c: Vec3): Vec3 => [-Math.sign(c[0]), 0, 0];
+ const each = (kind: CustomFix["kind"], y: number, dx: number, o: Partial<CustomFix>) =>
+ corners.map((c, i) => fx(kind, [[c[0] - Math.sign(c[0]) * dx, y, c[2]]], inward(c), posts[i], o));
+ const castorAt = (i: number): Vec3 => [corners[i][0], CAST, corners[i][2]];
+ const castor = (is: number[]) => [fx("castor", is.map(castorAt), UP, "B", { len: CAST, dia: 50 })];
+ const steps: CustomStep[] = [
+ {
+ title: "Screw the connector bolts into the top",
+ detail: "Lay the top face down on a rug. Turn the four bolts in by hand until they stop, not with a tool.",
+ add: ["T"],
+ fix: [fx("bolt", corners.map((c): Vec3 => [c[0], yT - 60, c[2]]), UP, "T", { name: "Connector bolt", len: 75, dia: 8 })],
+ pose: "-y",
+ warnings: ["floor", "hand"],
+ },
+ {
+ title: "Push a barrel nut into each post",
+ detail: "Into the round hole near the end with the plain hole, the slot turned to line up with it.",
+ fix: each("nut", yT - 25, POST / 2 + 8, { name: "Barrel nut", len: 14, dia: 10 }),
+ wait: posts,
+ },
+ { title: "Stand the posts on the bolts", detail: "Each post slides down over its bolt, the row of holes facing in.", add: posts, from: Object.fromEntries(posts.map((p) => [p, [0, -260, 0] as Vec3])) },
+ {
+ title: "Tighten the locking screws",
+ detail: "One in each post, through the small hole near the top, so it grips the bolt.",
+ fix: each("screw", yT - 45, POST / 2 + 6, { name: "Locking screw", len: 10, dia: 6 }),
+ tools: ["screwdriver"],
+ },
+ { title: "Lower the shelf over the posts", detail: "Either way up: tray side up for snacks, or flat side up for a controller.", add: ["S"], from: { S: [0, -320, 0] } },
+ {
+ title: "Screw in the shelf pins",
+ detail: "One in each post, in the holes just under the shelf, at the same height on all four.",
+ fix: each("pin", yS - 15, POST / 2 + 10, { len: 20, dia: 6 }),
+ },
+ { title: "Lay the bottom board on the posts", detail: "The holes in its corners over the ends of the posts.", add: ["B"], from: { B: [0, -220, 0] } },
+ {
+ title: "Screw in one castor, loosely",
+ detail: "Through the bottom board into a post, by hand only, so the board can still lift a little.",
+ fix: castor([0]),
+ warnings: ["hand"],
+ },
+ { title: "Slide in the first side panel", detail: "Its top and bottom edges go into the grooves in the top and the bottom board.", add: ["A"], from: { A: [0, 0, 300] } },
+ { title: "Slide it round the track", detail: "Push it round to make room for the next one." },
+ { title: "Slide in the second panel", detail: "Into the grooves the same way.", add: ["C"], from: { C: [300, 0, 0] } },
+ { title: "Slide that one round too", detail: "Push it along behind the first." },
+ { title: "Slide in the last panel", detail: "From the other side, into the same grooves.", add: ["D"], from: { D: [-300, 0, 0] } },
+ { title: "Tighten the first castor", detail: "Now the panels are in, tighten it with the spanner.", tools: ["wrench"] },
+ { title: "Screw in the next castor", detail: "By hand first, then tight with the spanner.", fix: castor([2]), tools: ["wrench"] },
+ { title: "Screw in the last two castors", detail: "The same way, one in each remaining corner.", fix: castor([1, 3]), tools: ["wrench"] },
+ { title: "Turn the table over", detail: "Stand it on its castors. The panels slide round to open it.", pose: "+y" },
+ ];
+ return { parts, steps };
+}
+
+function stool(): CustomParams {
+ const R = 187; // the base, 37.5 across
+ const H = 442;
+ const parts: CustomPart[] = [
+ compound("BASE", "Base", [
+ { shape: "cyl", size: [2 * R, 20, 2 * R], pos: [0, 10, 0] },
+ { shape: "cyl", size: [2 * R - 70, 25, 2 * R - 70], pos: [0, 32, 0] },
+ { shape: "cyl", size: [2 * R - 160, 25, 2 * R - 160], pos: [0, 57, 0] },
+ { shape: "cyl", size: [140, 20, 140], pos: [0, 79, 0] },
+ ], "metal"),
+ compound("COL", "Column", [
+ // it flares out towards the base
+ { shape: "cyl", size: [165, 50, 165], pos: [0, 89 + 25, 0] },
+ { shape: "cyl", size: [128, 180, 128], pos: [0, 139 + 90, 0] },
+ { shape: "cyl", size: [105, 70, 105], pos: [0, 319 + 35, 0] },
+ ], "metal"),
+ compound("SEAT", "Seat", [
+ { shape: "cyl", size: [300, 40, 300], pos: [0, H - 68, 0] },
+ { shape: "cyl", size: [270, 28, 270], pos: [0, H - 14, 0] },
+ ], "soft"),
+ ];
+ return {
+ parts,
+ steps: [
+ { title: "Click the column into the base", detail: "Push it straight down into the hole in the middle of the base until it clicks.", add: ["BASE", "COL"], from: { COL: [0, 260, 0] } },
+ { title: "Click the seat onto the column", detail: "Press it straight down over the top of the column until it clicks. Pull on it to check.", add: ["SEAT"], from: { SEAT: [0, 260, 0] } },
+ ],
+ };
+}
+
const family: Family = {
names: ["YXSTABY"],
recipe(s) {
- if (!/monitor stand/i.test(s.variant)) return null;
- return recipe(s);
+ if (/monitor stand/i.test(s.variant)) return recipe(s);
+ if (/side table/i.test(s.variant)) return sideTable();
+ if (/thumbstick stool/i.test(s.variant)) return stool();
+ return null;
},
};
export default family;