服装记谱语言:服装构造的正式描述语言
Garment Notation Language: Formal descriptive language for clothing construction

原始链接: https://github.com/khalildh/garment-notation

## 服装符号语言 (GNL) - 摘要 GNL是一种正式的描述性语言,专为服装制作设计,旨在将舞蹈(拉巴诺舞谱)和音乐(五线谱)等领域使用的符号的精确性带到服装创作中。它允许通过生成系统对服装进行明确的定义,其中有效的描述*足以*用于制作。 主要特点包括**以身体为锚点**(使用解剖标志)、**拓扑性**(将服装定义为表面)、**构造性**(编码构建顺序)和**可组合性**(由更简单的部分构建复杂的服装)。 该语言使用PEG语法定义,并包含一个实时查看器,可以将GNL代码转换为3D服装可视化和2D纸样。还提供了一个转换器,用于将Korosteleva数据集中的数据转换为GNL格式。 目前处于草案阶段(v0.2),GNL是一个正在进行中的工作,寻求服装专业人士的反馈以完善和扩展其功能。

## 服装符号语言:谨慎的反应 一个名为服装符号语言(GNL)的新项目,旨在创建一个正式的、基于代码的系统来描述服装结构——类似于服装的乐谱。然而,Hacker News评论员的初步反应大多是批评。 许多在纺织品、纸样制作(包括使用GRAFIS CAD和Clo3D等行业软件的专业人士)和缝纫方面有经验的人认为该项目存在缺陷。担忧包括示例中的差异、对基本服装结构技术(缝线、衬布)缺乏理解的看法,以及缺乏即使是简单的手工缝纫所必需的功能。一些评论员指出,已经存在成熟的纸样创建和3D服装建模方法(Marvelous Designer、Clo3D、FreeSewing)。 虽然“基于代码”的服装方法很有趣,但目前的实现被认为是“粗制滥造”且可能“凭空捏造”,一些人质疑创建者是否在该领域有实践经验。尽管目标是创建一个严谨、明确的语言,但该项目目前被视为更多的是概念探索,而非实用工具。
相关文章

原文

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.

T-Shirt — assembled view

  • 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
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)
}

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

The repo includes a live viewer that parses GNL and renders both assembled garment views and flat pattern pieces.

Write GNL on the left, see the full garment on the right — with stitch lines, dimension callouts, and construction details.

Toggle to "Pieces" to see the individual flat pattern pieces with shape outlines, grain lines, and dimensions.

T-Shirt — pattern pieces

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.

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.

All rights reserved.

联系我们 contact @ memedata.com