From eb89adec89965330fa7eecf67f4ae1cf1de987b1 Mon Sep 17 00:00:00 2001 From: Wouter Horlings Date: Sun, 27 Jul 2025 17:55:45 +0200 Subject: [PATCH] Update existing templates to new format --- templates/basic_trouser_block.yaml | 62 ++- templates/basis_grondpatroon_heren.yaml | 42 +- templates/classic_trouser_block.yaml | 53 ++- templates/tailored_shirt_block.v2.yaml | 498 ------------------------ templates/tailored_shirt_block.yaml | 259 ++++++++++-- 5 files changed, 327 insertions(+), 587 deletions(-) delete mode 100644 templates/tailored_shirt_block.v2.yaml diff --git a/templates/basic_trouser_block.yaml b/templates/basic_trouser_block.yaml index 018781e..301e5fe 100644 --- a/templates/basic_trouser_block.yaml +++ b/templates/basic_trouser_block.yaml @@ -80,7 +80,7 @@ points: between: from: 16 to: 18 - absolute: 0.5 + offset: 0.5 20: position: x: 20 @@ -182,20 +182,29 @@ panels: offset: 1.8 lines: - - through: [9,1] - - through: [6,8] - - through: [15,13] - - through: [0,2,1,4,3] - - through: [6,10,0l,0b,0r,11] - - through: [9,5d,6] + 1: + through: [9,1] + 2: + through: [6,8] + 3: + through: [15,13] + 4: + through: [0,2,1,4,3] + 5: + through: [6,10,0l,0b,0r,11] + 6: + through: [9,5d,6] curve: start: 5 end: 6e - - through: [15,14,12,13] - - through: [15,9] + 7: + through: [15,14,12,13] + 8: + through: [15,9] curve: start: 15e - - through: [13,8,11] + 9: + through: [13,8,11] curve: start: 13e back: @@ -276,25 +285,36 @@ panels: lines: - - through: [19,21,30l,30b,30r,31l,31b,31r,22] - - through: [24,16d,19] + 1: + through: [19,21,30l,30b,30r,31l,31b,31r,22] + 2: + through: [24,16d,19] curve: start: 23a end: 19e - - through: [29,24] + 3: + through: [29,24] curve: start: 29extend - - through: [27,25,22] + 4: + through: [27,25,22] curve: start: 27extend - - through: [29,28] - - through: [27,26] - - through: [28,3down, 26] + 5: + through: [29,28] + 6: + through: [27,26] + 7: + through: [28,3down,26] curve: {} - - through: [23,1] - - through: [6,25] - - through: [29,27] - - through: [0,2,1,4,3] + 8: + through: [23,1] + 9: + through: [6,25] + 10: + through: [29,27] + 11: + through: [0,2,1,4,3] diff --git a/templates/basis_grondpatroon_heren.yaml b/templates/basis_grondpatroon_heren.yaml index 7078d76..9ea508d 100644 --- a/templates/basis_grondpatroon_heren.yaml +++ b/templates/basis_grondpatroon_heren.yaml @@ -181,28 +181,42 @@ panels: lines: - - through: [N,V] - - through: [R,W] - - through: [M,G,I,C,F,L,K] - - through: [S,H,J,D,F] - - through: [M,Noffset,N] + 1: + through: [N,V] + 2: + through: [R,W] + 3: + through: [M,G,I,C,F,L,K] + 4: + through: [S,H,J,D,F] + 5: + through: [M,Noffset,N] curve: start: Nprime - - through: [S,R] + 6: + through: [S,R] curve: start: Roffset - - through: [V,Arm2,Poffset,K] + 7: + through: [V,Arm2,Poffset,K] curve: end: Arm3 - - through: [W,Arm1,Uoffset,K] + 8: + through: [W,Arm1,Uoffset,K] curve: end: Arm4 # ooit stippellijnen - - through: [G,H,J,I] - - through: [Tprime,U] - - through: [A,O,P] - - through: [S,Eprime,K] - - through: [R,Rprime] - - through: [A,M,Nprime,N] + 9: + through: [G,H,J,I] + 10: + through: [Tprime,U] + 11: + through: [A,O,P] + 12: + through: [S,Eprime,K] + 13: + through: [R,Rprime] + 14: + through: [A,M,Nprime,N] diff --git a/templates/classic_trouser_block.yaml b/templates/classic_trouser_block.yaml index 4d54aa7..cdf2879 100644 --- a/templates/classic_trouser_block.yaml +++ b/templates/classic_trouser_block.yaml @@ -176,20 +176,28 @@ panels: relativeTo: 8 hide: true lines: - - through: [0,4,1,3,2] - - through: [6, 8] - - through: [9, 1extend] - - through: [14,12,13,15,14] - - through: [14,8,11] + 1: + through: [0,4,1,3,2] + 2: + through: [6, 8] + 3: + through: [9, 1extend] + 4: + through: [14,12,13,15,14] + 5: + through: [14,8,11] curve: start: extend12-14 - end: offset_between11-8 - - through: [15,9] + end: offset_between11-8 + 6: + through: [15,9] curve: start: extend13-15 - - through: [9, h5, 6] + 7: + through: [9, h5, 6] curve: {} - - through: [6, 10, 11] + 8: + through: [6, 10, 11] back: name: Back @@ -258,20 +266,29 @@ panels: hide: true lines: - - through: [0extend, 0, 4, 1, 3, 2] - - through: [6, 17, 26] - - through: [22, 16, 16extend] - - through: [28, 30, 29, 27] - - through: [21,25a,25c,25b,24] - - through: [28,2down,27] + 1: + through: [0extend, 0, 4, 1, 3, 2] + 2: + through: [6, 17, 26] + 3: + through: [22, 16, 16extend] + 4: + through: [28, 30, 29, 27] + 5: + through: [21,25a,25c,25b,24] + 6: + through: [28,2down,27] curve: {} - - through: [23,16offset,19,21] + 7: + through: [23,16offset,19,21] curve: start: 23a - - through: [30,23] + 8: + through: [30,23] curve: start: 30extend - - through: [29,26,24] + 9: + through: [29,26,24] curve: start: 29extend diff --git a/templates/tailored_shirt_block.v2.yaml b/templates/tailored_shirt_block.v2.yaml deleted file mode 100644 index 5ac9866..0000000 --- a/templates/tailored_shirt_block.v2.yaml +++ /dev/null @@ -1,498 +0,0 @@ ---- -name: Basic Trouser Block -panels: - body: - allowances: - hem: 1cm - seam: 1cm - information: - position: - y: -10 - x: 10 - lines: - 1: - through: [14,8] - style: - thickness: 1 - 2: - through: [8, 7, 0, 1, 2, 3, 37, 19, 35, 6, 22] - 3: - through: [1,11,17,4] - 4: - through: [7,12,10] - 5: - through: [9,15,10,23,11] - 6: - through: [15,16] - curve: - start: 10 - 7: - through: [0,7a,8] - curve: - start: 7 - style: - thickness: 1 - 8: - through: [17,18,19] - 9: - through: [24,21] - style: - thickness: 1 - 10: - through: [21,22] - curve: - start: 20b - end: 20a - style: - thickness: 1 - 11: - through: [14,10,11a,17,25a,26,27a,24] - curve: - start: 14 - style: - thickness: 1 - 12: - through: [28,28a] - 13: - through: [22,29,29a] - 14: - through: [37,34] - curve: - start: 19 - end: 34a - style: - thickness: 1 - 15: - through: [33,36] - curve: - start: 33a - end: 36a - style: - thickness: 1 - 16: - through: [17,31,34] - curve: {} - style: - thickness: 0.6 - 17: - through: [17,30,33] - curve: {} - style: - thickness: 0.6 - 18: - through: [36,29b] - 19: - through: [34,33] - style: - thickness: 1 - 20: - through: [39,43,41] - curve: {} - style: - thickness: 0.6 - 21: - through: [39,42,41] - curve: {} - style: - thickness: 0.6 - 22: - through: [0,3,37] - style: - thickness: 1 - 23: - through: [22,29,29b,36] - style: - thickness: 1 - - points: - 0: - position: {} - 1: - position: - y: -(scye_depth) - 60 - 2: - position: - y: -(back_waist + 25 ) - 3: - position: - y: -(shirt_length) - 40 - 4: - relativeTo: 1 - position: - x: chest/2 + 100 - 5: - relativeTo: 0 - position: - x: DistanceBetween("1","4") - 6: - relativeTo: 3 - position: - x: DistanceBetween("1","4") - 7: - relativeTo: 0 - position: - x: neck_size/5 - 5 - 8: - relativeTo: 7 - position: - y: 45 - 9: - position: - y: -(DistanceBetween("0","1")/5 + 40) - 10: - relativeTo: 9 - position: - x: half_back + 40 - 11: - relativeTo: 1 - position: - x: half_back + 40 - 12: - relativeTo: 0 - position: - x: half_back + 40 - 14: - relativeTo: 12 - position: - x: 15 - y: 20 - 15: - relativeTo: 10 - position: - x: -100 - 16: - relativeTo: 10 - position: - y: -7.5 - 17: - relativeTo: 1 - position: - x: DistanceBetween("1","4")/2 + 5 - 18: - relativeTo: 17 - position: - y: -(DistanceBetween("1","2")+25) - 19: - relativeTo: 17 - position: - y: -DistanceBetween("1","3") - 20: - relativeTo: 5 - position: - y: -45 - 21: - relativeTo: 20 - position: - x: -(neck_size/5-10) - 22: - relativeTo: 20 - position: - y: -(neck_size/5-25) - 23: - relativeTo: 10 - position: - y: -15 - 24: - relativeTo: 21 - polar: - length: -DistanceBetween("8","14") - rotation: asin(abs(YDistanceBetween("21","23"))/abs(DistanceBetween("8","14"))) - 25: - relativeTo: 1 - position: - x: chest/3+40 - 26: - relativeTo: 25 - position: - y: 40 - 27: - between: - from: 26 - to: 24 - offset: 0.5 - 28: - relativeTo: 22 - position: - x: 15 - 28a: - relativeTo: 28 - position: - y: YDistanceBetween("28","3") - hide: true - 29: - relativeTo: 28 - position: - x: 35 - 29a: - relativeTo: 29 - position: - y: YDistanceBetween("29","3") - hide: true - 29b: - relativeTo: 29a - position: - y: DistanceBetween("35","36") - hide: true - 30: - relativeTo: 18 - position: - x: 25 - 31: - relativeTo: 18 - position: - x: -25 - 32: - relativeTo: 19 - position: - y: 80 - 33: - relativeTo: 32 - position: - x: 15 - 33a: - relativeTo: 33 - position: - x: DistanceBetween("33","36") - 34: - relativeTo: 32 - position: - x: -15 - 34a: - relativeTo: 34 - position: - x: -DistanceBetween("19","37") - 35: - between: - from: 6 - to: 19 - offset: 0.5 - 36: - relativeTo: 35 - position: - x: 30 - rotation: -pi/2 - 36a: - relativeTo: 36 - position: - x: -DistanceBetween("33","36") - 37: - between: - from: 3 - to: 19 - offset: 0.5 - 38: - relativeTo: 1 - position: - x: DistanceBetween("1","11")/2 + 20 - 39: - relativeTo: 38 - position: - y: -40 - 40: - relativeTo: 2 - position: - x: DistanceBetween("1","38") - y: -25 - 41: - relativeTo: 40 - position: - y: -160 - 42: - relativeTo: 40 - position: - x: 7.5 - 43: - relativeTo: 40 - position: - x: -7.5 - 7a: - relativeTo: 7 - polar: - length: 20 - rotation: 3*pi/4 - 11a: - relativeTo: 11 - position: - y: 30 - x: 10 - 20a: - relativeTo: 22 - position: - x: -DistanceBetween("21","20")*2 - 20b: - relativeTo: 21 - position: - y: -DistanceBetween("22","20")*2 - 27a: - relativeTo: 27 - position: - x: 10 - 25a: - relativeTo: 25 - position: - y: 7 - x: -30 - sleeve: - points: - 0: {} - 1: - relativeTo: 0 - position: - y: -(502.6 / 4 + 15) - 2: - relativeTo: 0 - position: - y: -(sleeve_length_shirt+60-cuff_depth) - 3: - between: - from: 2 - to: 1 - offset: 0.5 - 4: - relativeTo: 1 - position: - x: -(502.6/2 -5) - 5: - relativeTo: 4 - position: - y: -DistanceBetween("1","2") - 6: - relativeTo: 1 - position: - x: (502.6/2 -5) - 7: - relativeTo: 6 - position: - y: -DistanceBetween("1","2") - 8a: - between: - from: 4 - to: 0 - offset: 0.25 - 8: - relativeTo: 8a - position: - x: 5 - 9a: - between: - from: 4 - to: 0 - offset: 0.5 - 9: - relativeTo: 9a - position: - x: -12.5 - 10a: - between: - from: 4 - to: 0 - offset: 0.75 - 10: - relativeTo: 10a - position: - x: -22.5 - 11a: - between: - from: 0 - to: 6 - offset: 0.25 - 11: - relativeTo: 11a - position: - x: -15 - 12: - between: - from: 0 - to: 6 - offset: 0.5 - 13a: - between: - from: 0 - to: 6 - offset: 0.75 - 13: - relativeTo: 13a - position: - x: 12.5 - 14: - relativeTo: 5 - position: - x: DistanceBetween("5","2")/3+7.5 - 15: - relativeTo: 7 - position: - x: -DistanceBetween("5","14") - 3a: - between: - from: 14 - to: 4 - offset: 0.5 - 3aa: - relativeTo: 3a - position: - x: -7 - 3b: - between: - from: 15 - to: 6 - offset: 0.5 - 3bb: - relativeTo: 3b - position: - x: 7 - A: - relativeTo: 0 - position: - y: -250 - B: - relativeTo: 4 - position: - y: -DistanceBetween("1","A") - C: - relativeTo: 6 - position: - y: -DistanceBetween("1","A") - 16a: - between: - from: 14 - to: 2 - offset: 0.5 - hide: true - 16: - relativeTo: 16a - position: - rotation: pi/2 - 17: - relativeTo: 16 - position: - y: 150 - lines: - scye: - through: [4,8,9,10,0,11,12,13,6] - curve: {} - style: - thickness: 1 - 1: - through: [4,3aa,14] - curve: {} - style: - thickness: 1 - 2: - through: [14,2,15] - style: - thickness: 1 - 3: - through: [6,3bb,15] - curve: {} - style: - thickness: 1 - 4: - through: [0,1,3,2] - 0: - through: [14,4,0,6,15] - abc: - through: [B,A,C] - 5: - through: [16,17] - - diff --git a/templates/tailored_shirt_block.yaml b/templates/tailored_shirt_block.yaml index 5461ef6..5ac9866 100644 --- a/templates/tailored_shirt_block.yaml +++ b/templates/tailored_shirt_block.yaml @@ -10,74 +10,97 @@ panels: y: -10 x: 10 lines: - - through: [14,8] - style: - thickness: 1 - - through: [8, 7, 0, 1, 2, 3, 37, 19, 35, 6, 22] - - through: [1,11,17,4] - - through: [7,12,10] - - through: [9,15,10,23,11] - - through: [15,16] - curve: - start: 10 - - through: [0,7a,8] - curve: - start: 7 - style: - thickness: 1 - - through: [17,18,19] - - through: [24,21] + 1: + through: [14,8] + style: + thickness: 1 + 2: + through: [8, 7, 0, 1, 2, 3, 37, 19, 35, 6, 22] + 3: + through: [1,11,17,4] + 4: + through: [7,12,10] + 5: + through: [9,15,10,23,11] + 6: + through: [15,16] + curve: + start: 10 + 7: + through: [0,7a,8] + curve: + start: 7 + style: + thickness: 1 + 8: + through: [17,18,19] + 9: + through: [24,21] style: thickness: 1 - - through: [21,22] + 10: + through: [21,22] curve: start: 20b end: 20a style: thickness: 1 - - through: [14,10,11a,17,25a,26,27a,24] + 11: + through: [14,10,11a,17,25a,26,27a,24] curve: start: 14 style: thickness: 1 - - through: [28,28a] - - through: [22,29,29a] - - through: [37,34] + 12: + through: [28,28a] + 13: + through: [22,29,29a] + 14: + through: [37,34] curve: start: 19 end: 34a style: thickness: 1 - - through: [33,36] + 15: + through: [33,36] curve: start: 33a end: 36a style: thickness: 1 - - through: [17,31,34] + 16: + through: [17,31,34] curve: {} style: thickness: 0.6 - - through: [17,30,33] + 17: + through: [17,30,33] curve: {} style: thickness: 0.6 - - through: [36,29b] - - through: [34,33] + 18: + through: [36,29b] + 19: + through: [34,33] style: thickness: 1 - - through: [39,43,41] + 20: + through: [39,43,41] curve: {} style: thickness: 0.6 - - through: [39,42,41] + 21: + through: [39,42,41] curve: {} style: thickness: 0.6 - - through: [0,3,37] + 22: + through: [0,3,37] style: thickness: 1 - - through: [22,29,29b,36] + 23: + through: [22,29,29b,36] style: thickness: 1 @@ -172,8 +195,8 @@ panels: 24: relativeTo: 21 polar: - length: DistanceBetween("8","14") - rotation: acos(YDistanceBetween("21","23")/DistanceBetween("8","14")) + length: -DistanceBetween("8","14") + rotation: asin(abs(YDistanceBetween("21","23"))/abs(DistanceBetween("8","14"))) 25: relativeTo: 1 position: @@ -194,7 +217,7 @@ panels: 28a: relativeTo: 28 position: - y: -YDistanceBetween("28","3") + y: YDistanceBetween("28","3") hide: true 29: relativeTo: 28 @@ -203,7 +226,7 @@ panels: 29a: relativeTo: 29 position: - y: -YDistanceBetween("29","3") + y: YDistanceBetween("29","3") hide: true 29b: relativeTo: 29a @@ -308,4 +331,168 @@ panels: relativeTo: 25 position: y: 7 - x: -30 \ No newline at end of file + x: -30 + sleeve: + points: + 0: {} + 1: + relativeTo: 0 + position: + y: -(502.6 / 4 + 15) + 2: + relativeTo: 0 + position: + y: -(sleeve_length_shirt+60-cuff_depth) + 3: + between: + from: 2 + to: 1 + offset: 0.5 + 4: + relativeTo: 1 + position: + x: -(502.6/2 -5) + 5: + relativeTo: 4 + position: + y: -DistanceBetween("1","2") + 6: + relativeTo: 1 + position: + x: (502.6/2 -5) + 7: + relativeTo: 6 + position: + y: -DistanceBetween("1","2") + 8a: + between: + from: 4 + to: 0 + offset: 0.25 + 8: + relativeTo: 8a + position: + x: 5 + 9a: + between: + from: 4 + to: 0 + offset: 0.5 + 9: + relativeTo: 9a + position: + x: -12.5 + 10a: + between: + from: 4 + to: 0 + offset: 0.75 + 10: + relativeTo: 10a + position: + x: -22.5 + 11a: + between: + from: 0 + to: 6 + offset: 0.25 + 11: + relativeTo: 11a + position: + x: -15 + 12: + between: + from: 0 + to: 6 + offset: 0.5 + 13a: + between: + from: 0 + to: 6 + offset: 0.75 + 13: + relativeTo: 13a + position: + x: 12.5 + 14: + relativeTo: 5 + position: + x: DistanceBetween("5","2")/3+7.5 + 15: + relativeTo: 7 + position: + x: -DistanceBetween("5","14") + 3a: + between: + from: 14 + to: 4 + offset: 0.5 + 3aa: + relativeTo: 3a + position: + x: -7 + 3b: + between: + from: 15 + to: 6 + offset: 0.5 + 3bb: + relativeTo: 3b + position: + x: 7 + A: + relativeTo: 0 + position: + y: -250 + B: + relativeTo: 4 + position: + y: -DistanceBetween("1","A") + C: + relativeTo: 6 + position: + y: -DistanceBetween("1","A") + 16a: + between: + from: 14 + to: 2 + offset: 0.5 + hide: true + 16: + relativeTo: 16a + position: + rotation: pi/2 + 17: + relativeTo: 16 + position: + y: 150 + lines: + scye: + through: [4,8,9,10,0,11,12,13,6] + curve: {} + style: + thickness: 1 + 1: + through: [4,3aa,14] + curve: {} + style: + thickness: 1 + 2: + through: [14,2,15] + style: + thickness: 1 + 3: + through: [6,3bb,15] + curve: {} + style: + thickness: 1 + 4: + through: [0,1,3,2] + 0: + through: [14,4,0,6,15] + abc: + through: [B,A,C] + 5: + through: [16,17] + +