Menu

How I Built a Pure Client-Side SVG Quilt Backing & Fabric Cutting Layout Engine in Next.js
📰

How I Built a Pure Client-Side SVG Quilt Backing & Fabric Cutting Layout Engine in Next.js

DEV Community: html·八哥·3 days ago
#2AOrNvzm
#devto2#devto#dev#panels#quilt
Long article (359 words) — no AI summary yet.
Reading 0:00
15s threshold

Most online sewing and quilting calculators simply divide total square inches by 36 and hand you a raw number. In real life, fabric comes off a fixed-width bolt (42" usable quilting cotton, 54" drapery fabric, or 108" wideback), and seam orientation can easily change how many yards you need by a full yard or more.

While building My Fabric Calculator , I wanted every tool to run 100% client-side in Next.js and render an instant, scaled SVG cutting blueprint directly from pure TypeScript geometry.

Comparing Vertical vs. Horizontal Quilt Backing Seams

For our Quilt Backing Calculator , we add longarm frame overage ( 4" per side = +8" total) and evaluate both vertical and horizontal piecing orientations simultaneously while accounting for 1/2" backing seam loss:

function calcOrientation ( spanToPiece : number , cutLength : number , wof : number , seam = 0.5 ) { let panels = 1 ; while ( panels * wof - ( panels - 1 ) * ( seam * 2 ) < spanToPiece && panels < 20 ) { panels += 1 ; } const totalInches = panels *…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.