Journal of Textile Research ›› 2026, Vol. 47 ›› Issue (1): 186-195.doi: 10.13475/j.fzxb.20250701701

• Apparel Engineering • Previous Articles     Next Articles

Model construction for parametric pattern automatic generation based on Python

SUN Weibin1,2, QIAN Juan1,2(), YUAN Chengxiao3, DU Jinsong1,2   

  1. 1. College of Textiles and Clothing, Xinjiang University, Urumqi, Xinjiang 830017, China
    2. Xinjiang Key Laboratory of Intelligent and Green Textile, Urumqi, Xinjiang 830017, China
    3. Xinjiang Yixin Garment Co., Ltd., Hotan, Xinjiang 848100, China
  • Received:2025-07-07 Revised:2025-11-11 Online:2026-01-15 Published:2026-01-15
  • Contact: QIAN Juan E-mail:juanqian@xju.edu.cn

Abstract:

Objective In garment production, pattern-making usually relies on the experience of manual pattern makers, and this process is ofern associated to low efficiency, high cost, and difficulty in meeting large-scale personalized customization demands. Although 3D reverse engineering can generate body-fitting surfaces, it faces challenges in curve deformation and ease allowance control, less conducive to style modifications. Existing parametric methods rely on specialized CAD software, with limited accessibility. In order to address the creation and adjustment of well-fitting patterns, this study proposes a Python-based parametric pattern generation model for automated pattern creation, providing technical support to shorten the production cycle at the pattern-making stage.

Method This study integrates parametric modeling with self-developed biarc curve fitting algorithm to achieve rapid generation and adjustment of well-fitted garment patterns. Taking the generation of a women's shirt pattern in AutoCAD as an example, the research first investigates two types of biarc curves for constructing garment outlines using Python, along with continuity calculations at their connecting points. Next, by combining the prototype method and short-measurement method from garment structural design, body-related parameters are established. The correlations between body dimensions are obtained through anthropometric experiments, and pattern generation/adjustment rules are incorporated to build an automatic pattern generation model. Finally, the automatically generated patterns are evaluated for pressure distribution and fit using CLO 3D software, verifying the feasibility of this generation method.

Results Based on the fitting principles of two types of biarc curves, this study developed a biarc curve algorithm using Python for automatically generating complex curves in garment patterns. The computational results demonstrate that the curves generated by the biarc algorithm possess G0 and G1 continuity, ensuring smooth linearity of the generated curves with high algorithmic accuracy. All connection points exhibit similar G2 deviations while demonstrating variations in curve length. A greater tc value results in a shorter generated curve. Furthermore, when calculating both the deviations at connection points and the curve length of biarc curves constructed using the incenter method, all values were found to be identical to those obtained with tc=0.5. This further confirms that the connection points of curves drawn via the incenter method are encompassed within the connection point function described. While maintaining low G2 values, the algorithm allows for curve length adjustment, enabling convenient processing of complex structural curves in pattern-making. In regional anthropometric experiments, body measurement data were collected from 200 females in Xinjiang, including length dimensions (height, shoulder width, chest width, back width, back length, bust point distance, arm length) and circumference dimens-ions (waist circumference, bust circumference, neck base circumference). Regression analysis was employed to establish the mapping relationships between key body dimensions, which simplified the construction of the automatic pattern generation model. After incorporating adjustment rules, the model was able to carry out rapid modifications of different pattern sections to generate personalized patterns. The automatically generated shirt pattern was imported into virtual software for seam testing. Pressure and fit tests conducted in CLO 3D software reveal reasonable garment pressure distribution and uniform body-garment clearance, validating the feasibility of the proposed parametric pattern generation method.

Conclusion The Python-generated biarc curves demonstrate both superior smoothness and adjustable length properties, enabling efficient handling of complex pattern contours. The proposed method facilitates rapid pattern generation and modification, providing robust technical support for large-scale personalized apparel pattern production. The anthropometric regression model developed for personalized pattern generation was intentionally designed without body type classification constraints. However, subsequent integration of body type classification with the required measurement data could significantly enhance the model's generalization capability and improve pattern accuracy. The proposed method proves universally applicable for automatic generation of diverse garment patterns, with promising potential for implementation in parametric pattern library development.

Key words: garment pattern, women's shirt, parametric pattern, fitted pattern, pattern generation, Python

CLC Number: 

  • TS941.2

Fig.1

Automatic pattern generation technology route"

Fig.2

Two types of biarc curves"

Fig.3

Back neckline curve"

Fig.4

Biarc curves corresponding to different tc values"

Fig.5

Hemline shape curve"

Tab.1

Biarc algorithm deviation and length"

连接点位置 G0 偏差/cm G1 偏差/(°) G2 偏差/cm-1 曲线长度/cm
Q1
Q2
0.000 0
0.000 0
0.000 0
0.000 0
0.142 5
0.149 2
10.49
10.29
Q3
ABK内心
0.000 0
0.000 0
0.000 0
0.000 0
0.233 0
0.149 2
10.09
10.29

Fig.6

tc values corresponding to fitted generated curve length"

Tab.2

Back panel parameter settings"

参数 符号 参数 符号
后衣长 Ba 颈根围 Bg
腰围 Bb 总肩宽 Bh
胸围 Bc 肩斜角 Bi
背宽 Be 后腰省量 B1
背长 Bf 腰部变量 W1

Fig.7

Body measurement correlation coefficients"

Tab.3

Back width and bust size regression model"

因变量 自变量 非标准化系数 T 显著性
回归系数 标准错误
背宽 常量 18.259 1.910 9.561 0.000
胸围 0.195 0.018 10.555 0.000

Tab.4

Inter-segment dimensional regression model of human body"

自变量 因变量 回归方程
胸围(Bc) 背宽(Be)
乳间距(Fk)
腰围(Bb)
Be=0.195Bc+18.259
Fk=0.052Bc+11.314
Bb=1.029Bc-10.613
总肩宽(Bh) 胸宽(Fd) Fd=0.566Bh+16.543
身高(H) 臂长(Xa) Xa=0.233H+16.477
背长(Bf) Bf=0.224H+4.742

Fig.8

Back panel structure of women's shirt"

Tab.5

Key structural dimension relationships of women's shirt back panel"

部位 结构线 表达式
后衣长线
背长
袖窿深线
P5P2
P5P3
P4P1
Ba
Bf
Bc/5+5.5
后腰围线 P3P12 Bb/4+B1+W1
后胸围线 P4P9 Bc/4
后领窝宽 P5P6 Bg/5-0.3
后领窝深 P6 P21 (1/3)(Bg/5-0.3)
后领窝直线 P5P7 (1/3)(Bg/5-0.3)
后肩线 P1P8 Bh/2
肩下落线 P8 P22 (tan(arctan(5/15)+0.7(Bi-18)))×
(Bh/2-Bg/5+0.3)
背宽线 P4P10 Be/2
底摆深 P2P24 5
底摆直线长 P2P25 7
底摆延伸量 P23P26 1
后腰省 P19P20 B1
省损量 P17P18 1
腰省胸上量 P14P16 5
腰省下量 P13P15 15

Tab.6

Control points of women's shirt back panel"

关键点 x 坐标 y 坐标
P1 0 0
P2 P1.x P1.y-Ba
P3 P1.x P1.y-Bf
P4 P1.x P1.y-(Bc/5+5.5)
P5 P1.x P1.y-(1/3)(Bg/5-0.3)
P6 P5.x+Bg/5-0.3 P5.y
P7 P5.x+(1/3)-(Bg/5-0.3) P6.y
P8 P1.x+Bh/2 P1.y
P9 P4.x+Bc/4 P4.y
P10 P4.x+Be/2 P4.y
P11 P10.x SP.y
P12 P1.x+Bb/4+B1+W1 P1.y-Bf
P13 (P12.x+P3.x)/2 (P12.y+P3.y)/2
P14 P13.x P4.y+5
P15 P13.x P13.y-15
P16 P13.x P4.y
P17 P16.x-0.5 P16.y
P18 P16.x+0.5 P16.y
P19 P13.x-B1/2 P13.y
P20 P13.x+B1/2 P13.y
P21 P6.x P1.y
P22 P8.x -math.tan(math.atan(5/15)+
math.radians(0.7(Bi-18)))×
(P8.x-P21.x)

Fig.9

Back waistline and sleeve modification"

Fig.10

Front shoulder angle modification"

Fig.11

Women's shirt pattern"

Fig.12

Virtual fitting test. (a) Pressure test;(b) Transparent fitting"

[1] 程碧莲, 蒋高明, 李炳贤. 三维服装虚拟展示技术的研究进展[J]. 纺织学报, 2024, 45(5): 248-257.
CHENG Bilian, JIANG Gaoming, LI Bingxian. Research progress in three-dimensional garment virtual display technology[J]. Journal of Textile Research, 2024, 45(5): 248-257.
[2] WU S, ZHONG A H, JIANG X W, et al. Auto-generation of paper patterns for children's jeans[J]. The Journal of the Textile Institute, 2024, 115(9): 1468-1475.
doi: 10.1080/00405000.2023.2233071
[3] LIU K X, ZENG X Y, BRUNIAUX P, et al. Fit evaluation of virtual garment try-on by learning from digital pressure data[J]. Knowledge-Based Systems, 2017, 133: 174-182.
doi: 10.1016/j.knosys.2017.07.007
[4] 凌雅丽, 朱凌轩, 邵晓煊, 等. 亚洲男士西服基本纸样自动生成系统的建立[J]. 纺织学报, 2020, 41(9): 108-113, 118.
LING Yali, ZHU Lingxuan, SHAO Xiaoxuan, et al. Development of automatic pattern generation system for Asian men's suits[J]. Journal of Textile Research, 2020, 41(9): 108-113, 118.
doi: 10.1177/004051757104100204
[5] 张伶俐, 张皋鹏. 应用MatLab的服装纸样参数化平面制版[J]. 纺织学报, 2019, 40(1): 130-135.
ZHANG Lingli, ZHANG Gaopeng. Parametric flat pattern design for clothing based on MatLab[J]. Journal of Textile Research, 2019, 40(1): 130-135.
[6] 娄少红. 基于AutoCAD参数化功能的A型裙样板自动化生成[J]. 纺织学报, 2020, 41(1): 131-138.
LOU Shaohong. Automatic generation of A-type skirt model based on AutoCAD parametric function[J]. Journal of Textile Research, 2020, 41(1): 131-138.
[7] LI K. The influence of Python on logical thinking and analysis of teaching countermeasures[J]. Journal of Physics: Conference Series, 2021, 1744(4): 042164.
doi: 10.1088/1742-6596/1744/4/042164
[8] MACHADO F, MALPICA N, BORROMEO S. Parametric CAD modeling for open source scientific hardware: comparing OpenSCAD and FreeCAD Python scripts[J]. PLoS One, 2019, 14(12): e0225795.
doi: 10.1371/journal.pone.0225795
[9] 赵福英, 倪俊芳. 花型样条曲线加工代码生成算法[J]. 纺织学报, 2018, 39(7): 153-158.
ZHAO Fuying, NI Junfang. Algorithm of processing code generation for pattern spline curves[J]. Journal of Textile Research, 2018, 39(7): 153-158.
[10] 郑永前, 王云鹏, 王科委. 基于粒子群优化算法的自由曲线双圆弧逼近[J]. 中国机械工程, 2011, 22(21): 2530-2535.
ZHENG Yongqian, WANG Yunpeng, WANG Kewei. Biarc approximation of freeform curves based on particle swarm optimization algorithm[J]. China Mechanical Engineering, 2011, 22(21): 2530-2535.
[11] 李重. 双圆弧在服装纸样设计中的应用[J]. 纺织学报, 2005, 26(5): 101-102, 105.
LI Zhong. Biarc application in the garment pattern design[J]. Journal of Textile Research, 2005, 26(5): 101-102, 105.
[12] 娄少红. 双圆弧的图解及其在衣缝轮廓线设计中的应用[J]. 纺织学报, 2019, 40(9): 150-158.
LOU Shaohong. Diagram of biarc and its application in design of garment seam outline[J]. Journal of Textile Research, 2019, 40(9): 150-158.
[13] 叶勤文, 陈咪, 张皋鹏. 双圆弧拟合曲线在参数化服装制版中的应用[J]. 东华大学学报(自然科学版), 2019, 45(6): 851-857.
YE Qinwen, CHEN Mi, ZHANG Gaopeng. Application of double arc fitting curve in parametric garment plate making[J]. Journal of Donghua University (Natural Science), 2019, 45(6): 851-857.
[14] 刘宇, 朱志松, 赵旭, 等. 基于PCHIP与G 1连续的离散点曲线重构方法研究[J]. 机电工程, 2020, 37(11): 1380-1386.
LIU Yu, ZHU Zhisong, ZHAO Xu, et al. Discrete point curve reconstruction methodbased on PCHIP and G1 continuous[J]. Journal of Mechanical & Electrical Engineering, 2020, 37(11): 1380-1386.
[15] 张军雄. 女装结构设计与立体造型[M]. 上海: 东华大学出版社, 2021:107-114.
ZHANG Junxiong. Fashion modelling for women's wear[M]. Shanghai: Donghua University Press, 2021:107-114.
[16] LIU K X, ZHU C, TAO X Y, et al. Parametric design of garment pattern based on body dimensions[J]. International Journal of Industrial Ergonomics, 2019, 72: 212-221.
doi: 10.1016/j.ergon.2019.05.012
[17] 王欢, 吴继辉, 海蓝茜, 等. 基于体型差异的女衬衫定制纸样调整技术[J]. 北京服装学院学报(自然科学版), 2020, 40(3): 36-42.
WANG Huan, WU Jihui, HAI Lanxi, et al. Adjustment technology of customized pattern for blouse based on body size difference[J]. Journal of Beijing Institute of Fashion Technology (Natural Science Edition), 2020, 40(3): 36-42.
[1] HU Anni, WANG Jie, YANG Wushi, ZHONG Yueqi. Pattern generation from 3-D scanned garments for virtual display [J]. Journal of Textile Research, 2025, 46(08): 209-216.
[2] CHEN Xiaozhen, WU Ying, YANG Ye, LU Lihao. Parameterized pattern generation of women's jumpsuit based on three-dimensional virtual model transformation [J]. Journal of Textile Research, 2025, 46(07): 193-201.
[3] JI Mengqi, HE Ying, MA Yongqian. Optimization of trousers patterns for men with protruding abdomen based on three-dimensional fitting [J]. Journal of Textile Research, 2025, 46(06): 187-195.
[4] HUANG Xiaoyuan, HOU Jue, YANG Yang, LIU Zheng. Automatic generation of high-precision garment patterns based on improved deep learning model [J]. Journal of Textile Research, 2025, 46(02): 236-243.
[5] TUO Wu, DU Cong, CHEN Qian, WU Chao, WEI Xinqiao, ZHANG Xinru, LIU Siyu. Clothing pattern contour extraction based on computer vision and Canny algorithm [J]. Journal of Textile Research, 2024, 45(05): 174-182.
[6] LIU Rong, XIE Hong. Similarity pattern matching technology based on garment structural feature recognition [J]. Journal of Textile Research, 2023, 44(10): 134-142.
[7] LEI Ge, LI Xiaohui. Review of digital pattern-making technology in garment production [J]. Journal of Textile Research, 2022, 43(04): 203-209.
[8] ZHANG Yijie, LI Tao, LÜ Yexin, DU Lei, ZOU Fengyuan. Progress in garment ease design and its modeling methods [J]. Journal of Textile Research, 2021, 42(04): 184-190.
[9] LI Liang, NI Junfang. Automatic generation algorithm for pattern processing codes of quilting machines [J]. Journal of Textile Research, 2020, 41(11): 162-167.
[10] DAI Zhenxing, CHEN Guangfeng, CHEN Ge. Three-dimensional simulation of multiple high-low loop tufting carpet based on Rhino-Python [J]. Journal of Textile Research, 2020, 41(06): 69-75.
[11] YE Qinwen, ZHANG Gaopeng. Generation of personalized garment pattern based on AutoCAD parameterization [J]. Journal of Textile Research, 2019, 40(04): 103-110.
[12] ZHANG Lingli, ZHANG Gaopeng. Parametric flat pattern design for clothing based on MatLab [J]. Journal of Textile Research, 2019, 40(01): 130-135.
[13] . Garment pattern design and developing trends of middle aged and old women [J]. JOURNAL OF TEXTILE RESEARCH, 2016, 37(10): 107-0112.
[14] . Camber features of women's shoulder and influence thereof on fitted clothes' structure [J]. JOURNAL OF TEXTILE RESEARCH, 2016, 37(10): 94-100.
[15] . Fashion geometric printing pattern designing based on mathematical method [J]. JOURNAL OF TEXTILE RESEARCH, 2014, 35(3): 141-0.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!