NewsWorld
PredictionsDigestsScorecardTimelinesArticles
NewsWorld
HomePredictionsDigestsScorecardTimelinesArticlesWorldTechnologyPoliticsBusiness
AI-powered predictive news aggregation© 2026 NewsWorld. All rights reserved.
Trending
TrumpTariffTradeLaunchAnnouncePricesStrikesMajorFebruaryChinaMarketCourtNewsDigestSundayTimelineHongKongServiceMilitaryTechSafetyGlobalOil
TrumpTariffTradeLaunchAnnouncePricesStrikesMajorFebruaryChinaMarketCourtNewsDigestSundayTimelineHongKongServiceMilitaryTechSafetyGlobalOil
All Articles
Garment Notation Language: Formal descriptive language for clothing construction
Hacker News
Published 4 days ago

Garment Notation Language: Formal descriptive language for clothing construction

Hacker News · Feb 18, 2026 · Collected from RSS

Summary

Article URL: https://github.com/khalildh/garment-notation Comments URL: https://news.ycombinator.com/item?id=47062329 Points: 63 # Comments: 12

Full Article

GNL — Garment Notation Language A formal descriptive language for clothing construction. Try the live viewer Dance has Labanotation. Music has staff notation. Architecture has plan/section/elevation conventions. GNL brings the same rigor to garments — a generative descriptive language where a valid expression is sufficient to construct a garment without ambiguity. Core Concepts Body-anchored — the body is the coordinate system, using anatomical landmarks (@shoulder.L) and regions (%torso.front) Topological — garments are surfaces with boundaries and openings Constructive — descriptions encode build order, not just final form Composable — complex garments are compositions of simpler elements Quick Example GARMENT t_shirt [SYM] { FABRIC: M(160gsm, fluid, biaxial:15%, 1.0, knit.jersey) front = P(%torso.front, contour, 1.15) back = P(%torso.back, contour, 1.15) sleeve = P(%arm[0..0.4], contour, 1.2) neck = O(@neck, circle, body+8cm) hem = O(@hip, circle, body+10cm) BUILD: S(front.shoulder, back.shoulder, serged) >> S(sleeve.cap, {front.armhole, back.armhole}, serged) >> S(front.side, back.side, serged) >> F(hem, 2.5cm, in) } Grammar The language is formally defined as a PEG grammar targeting Peggy. The generated parser produces a richly-typed AST which is adapted to the renderer's internal format at runtime. npm install # install Peggy (dev dependency only) npm run generate # regenerate viewer/src/gnl-parser.js from grammar/gnl.peg npm test # run parse + adapter tests against all examples Viewer The repo includes a live viewer that parses GNL and renders both assembled garment views and flat pattern pieces. Assembled View Write GNL on the left, see the full garment on the right — with stitch lines, dimension callouts, and construction details. T-Shirt Wrap Skirt Jacket Collar Pattern Pieces Toggle to "Pieces" to see the individual flat pattern pieces with shape outlines, grain lines, and dimensions. Korosteleva Dataset Converter The repo includes a converter that transforms garment templates from the Korosteleva NeurIPS 2021 dataset (2D panel geometry as JSON) into GNL. # Auto-downloads 21 templates from GitHub on first run, converts all node converter/convert.js Four example templates (tee, skirt, pants, dress) are also available directly in the viewer — select from the "Korosteleva Dataset" section of the examples dropdown. A GNL/JSON toggle lets you compare the raw geometric input with the converted semantic output. See converter/README.md for details on the mapping approach. Documentation Full Specification — the complete v0.2 spec Status v0.2 — Draft. Includes grain parameter, directional ease, princess seams (EDGE), lining (LAYER), and component composition (USE/ATTACH). A starting point that will need refinement through use, critique, and input from garment-makers, pattern-drafters, and computational designers. License All rights reserved.


Share this story

Read Original at Hacker News

Related Articles

Hacker Newsabout 2 hours ago
We hid backdoors in ~40MB binaries and asked AI + Ghidra to find them

Article URL: https://quesma.com/blog/introducing-binaryaudit/ Comments URL: https://news.ycombinator.com/item?id=47111440 Points: 14 # Comments: 2

Hacker Newsabout 2 hours ago
Man accidentally gains control of 7k robot vacuums

Article URL: https://www.popsci.com/technology/robot-vacuum-army/ Comments URL: https://news.ycombinator.com/item?id=47111400 Points: 16 # Comments: 1

Hacker Newsabout 3 hours ago
Iran students stage first large anti-government protests since deadly crackdown

Article URL: https://www.bbc.com/news/articles/c5yj2kzkrj0o Comments URL: https://news.ycombinator.com/item?id=47111067 Points: 25 # Comments: 4

Hacker Newsabout 3 hours ago
I put New Zealand behind a $1 paywall

Article URL: https://rename.world/ Comments URL: https://news.ycombinator.com/item?id=47111042 Points: 22 # Comments: 4

Hacker Newsabout 4 hours ago
Volatility: The volatile memory forensic extraction framework

Article URL: https://github.com/volatilityfoundation/volatility3 Comments URL: https://news.ycombinator.com/item?id=47110781 Points: 3 # Comments: 0

Hacker Newsabout 4 hours ago
Holo v0.9: A Modern Routing Stack Built in Rust

Article URL: https://github.com/holo-routing/holo/releases/tag/v0.9.0 Comments URL: https://news.ycombinator.com/item?id=47110634 Points: 4 # Comments: 1