@freesewing/theo
Version:
A FreeSewing pattern for classic trousers
14 lines (12 loc) • 28.3 kB
JavaScript
/**
* @freesewing/theo | v2.22.2
* A FreeSewing pattern for classic trousers
* (c) 2022 Joost De Cock <joost@joost.at> (https://github.com/joostdecock)
* @license MIT
*/
var q=Object.create;var L=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var Q=Object.getPrototypeOf,Z=Object.prototype.hasOwnProperty;var $=(a,n)=>{for(var e in n)L(a,e,{get:n[e],enumerable:!0})},B=(a,n,e,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of K(n))!Z.call(a,t)&&t!==e&&L(a,t,{get:()=>n[t],enumerable:!(i=z(n,t))||i.enumerable});return a};var k=(a,n,e)=>(e=a!=null?q(Q(a)):{},B(n||!a||!a.__esModule?L(e,"default",{value:a,enumerable:!0}):e,a)),tt=a=>B(L({},"__esModule",{value:!0}),a);var st={};$(st,{Theo:()=>h,config:()=>R,default:()=>nt});module.exports=tt(st);var V=k(require("@freesewing/core")),Y=k(require("@freesewing/plugin-bundle"));var P="2.22.2";var _=k(require("@freesewing/config-helpers")),{steps:it,pctBasedOn:ot}=_.default,R={version:P,name:"theo",deprecated:"charlie",design:"Joost De Cock",code:"Joost De Cock",department:"bottoms",type:"pattern",difficulty:4,optionGroups:{fit:["backRise","wedge"],style:["waistbandWidth","lengthBonus","legWidth"]},measurements:["crotchDepth","hips","inseam","knee","seat","waistToHips"],dependencies:{},inject:{front:"back",waistbandLeft:"waistbandInterfacingLeft",waistbandRight:"waistbandInterfacingRight",waistbandLiningLeft:"waistbandInterfacingLeft",waistbandLiningRight:"waistbandInterfacingRight",flyPiece:"front",flyShield:"flyPiece",sidePiece:"front",frontPocketBag:"front",backOuterPocketBag:"backInnerPocketBag",backPocketInterfacing:"backPocketFacing"},hide:[],parts:["waistbandInterfacingLeft","waistbandInterfacingRight","backPocketFacing","beltLoop"],options:{waistbandWidth:{pct:3,min:2,max:6,snap:it,...ot("waistToFloor")},legWidth:{pct:10,min:0,max:30},backRise:{pct:3.5,min:.5,max:8},lengthBonus:{pct:0,min:-10,max:10},wedge:{pct:0,min:-3,max:3}}};function W(a){let{store:n,sa:e,Point:i,points:t,Path:o,paths:s,absoluteOptions:f,options:l,complete:p,paperless:r,macro:c,utils:d,measurements:g,snippets:y,Snippet:b,raise:v}=a.shorthand();v.warning("Theo in its current incarnation is deprecated. A complete rewrite based on our Titan block is on [our v3 roadmap](https://github.com/freesewing/freesewing/discussions/1278). Until that time, if it works, great. If not \xAF\\\\__(\u30C4)\\__/\xAF");let x=()=>{t[901]=d.beamsIntersect(t[20],t[19],t[26],t[4]),t[902]=t[901].clone();let w=-.1,u=0;for(;t[901].dist(t[902])<25;)u++,t[902]=t[901].rotate(u*w,t[26]);return u*w};n.set("lengthBonus",g.inseam*l.lengthBonus),n.set("backReduction",g.hips/-4*l.wedge),n.set("legWidth",g.knee*(1+l.legWidth)/2),n.set("backRise",g.hips*l.backRise),t[0]=new i(0,0),t[1]=new i(0,g.crotchDepth-g.waistToHips-f.waistbandWidth),t[2]=new i(0,t[1].y+g.inseam+n.get("lengthBonus")),t[201]=t[2].shift(-90,10),t[202]=new i(n.get("legWidth")/4,t[201].y),t[203]=t[202].flipX(),t[3]=new i(0,t[1].y+g.inseam/2+50),t[4]=new i(0,t[1].y-(g.crotchDepth-g.waistToHips)/4),t[5]=new i(10-g.seat/8,t[1].y),t[9]=new i(t[5].x-g.seat/16-5+n.get("backReduction"),t[5].y),t[16]=new i(t[5].x-t[1].dx(t[5])/4,t[5].y),t[1601]=t[16].shift(135,45),t[1602]=t[1601].shift(45,25),t[1603]=t[1601].shift(-135,45),t[17]=new i(t[16].x,t[4].y),t[18]=new i(t[16].x,0),t[19]=new i(t[16].x,t[16].y+t[16].dy(t[18])/2),t[20]=new i(t[18].x+20,t[18].y),t[1901]=t[20].shiftOutwards(t[19],25),t[21]=t[19].shiftOutwards(t[20],10),t[22]=new i(t[9].x+t[5].dx(t[9])/2-5+n.get("backReduction"),t[9].y),t[23]=new i(t[22].x,t[22].y+5),t[24]=new i(t[20].x+g.hips/4+45,t[20].y),t[25]=t[21].shiftFractionTowards(t[24],.5),t[2501]=t[25].shiftTowards(t[24],120),t[2502]=t[2501].rotate(-90,t[25]),t[2503]=t[25].shiftTowards(t[24],12.5),t[2504]=t[25].shiftTowards(t[21],12.5),t[26]=new i(t[17].x+g.seat/4+30,t[17].y),t[2601]=t[24].shiftFractionTowards(t[26],1,4),t[27]=new i(t[2].x+n.get("legWidth")/2+20,t[2].y),t[2701]=new i(t[27].x,t[27].y-50),t[2702]=t[2701].flipX(),t[28]=t[27].flipX(),t[29]=new i(t[3].x+n.get("legWidth")/2+15+20,t[3].y),t[2901]=t[27].shiftFractionTowards(t[29],1.6),t[30]=t[29].flipX(),t[3001]=t[28].shiftFractionTowards(t[30],1.6);let T=x(),m=[24,2501,2502,2503,2504,25,21,20,19,1901,2601];for(let w of m){let u="90"+w;t[u]=t[w].rotate(T,t[26])}return t[901601]=t[1601].shift(180,10),t[901602]=t[1602].shift(180,10),t[901603]=t[1603].shift(180,10),t[900]=d.beamsIntersect(t[9021],t[9024],t[0],t[1]),t[-21]=t[9021].shiftTowards(t[902504],10),t[-2101]=t[-21].shift(t[9020].angle(t[9021]),-10),t[-24]=t[9024].shiftTowards(t[9021],10),t[-2104]=t[-24].shift(t[9024].angle(t[26]),10),t[-2501]=t[902504].shiftTowards(t[902502],10),t[-2502]=t[902503].shiftTowards(t[902502],10),t[-2503]=t[902504].shiftTowards(t[902502],60),t[-2504]=t[902503].shiftTowards(t[902502],60),t[-26]=t[26].shift(t[9024].angle(t[9021]),10),t[-2601]=t[-2104].shiftFractionTowards(t[-26],1.4),t[-2901]=t[2901].shift(t[2901].angle(t[29])-90,10),t[-29]=t[29].shift(t[2901].angle(t[29])-90,10),t[-2701]=t[2701].shift(180,10),t[-27]=new o().move(t[27])._curve(t[202],t[201]).shiftAlong(10),t[-28]=t[-27].flipX(),t[-2702]=t[-2701].flipX(),t[-30]=t[-29].flipX(),t[-3001]=t[3001].shift(t[30].angle(t[3001])+90,-10),t[-23]=new o().move(t[23])._curve(t[901603],t[901601]).shiftAlong(10),t[-2301]=new o().move(t[-23])._curve(t[-3001],t[-30]).shiftAlong(10),t[-900]=new i(t[900].x,t[900].y+10),t[-901603]=t[901603].shift(t[901603].angle(t[901601])+90,-10),t[-901601]=t[901601].shift(t[901603].angle(t[901601])+90,-10),t[-901602]=t[901602].shift(t[901603].angle(t[901601])+90,-10),t[-901901]=t[901901].shift(t[901601].angle(t[9019])+90,-10),t[-9019]=t[9019].shift(t[901901].angle(t[9019])+90,-10),t[9021]=t[-21].shift(t[-2501].angle(t[-2101]),40),t[-2710]=t[-27].shift(-90,60),t[-2810]=t[-2710].flipX(),t[-20110]=t[201].shift(-90,60),t[-20210]=t[202].shift(-90,60),t[-20310]=t[203].shift(-90,60),t[66601]=t[-2101].shiftTowards(t[-21],n.get("backRise")),t[66602]=d.beamsIntersect(t[66601],t[-2104],t[902502],t[-2501]),t[66603]=d.beamsIntersect(t[66601],t[-2104],t[902502],t[-2502]),t[66605]=t[-2101].shiftTowards(t[-21],n.get("backRise")+10),t[66606]=new i(t[66602].x+t[66601].dx(t[66605]),t[66602].y+t[66601].dy(t[66605])),t[66607]=d.beamsIntersect(t[66606],t[66605],t[901601],t[9021]),t.dartTop=t[66601].shiftFractionTowards(t[-2104],.5),t.dartTip=t.dartTop.shift(t[-2104].angle(t[66601])+90,t.dartTop.dist(t[902502])),t.dartTopLeft=t.dartTop.shiftTowards(t[66601],t[66602].dist(t[66603])/2),t.dartTopRight=t.dartTop.shiftTowards(t[-2104],t[66602].dist(t[66603])/2),t.pocketCenterLeft=t.dartTopLeft.shiftTowards(t.dartTip,60),t.pocketCenterRight=t.dartTopRight.shiftTowards(t.dartTip,60),t.pocketEdgeLeft=t.pocketCenterLeft.shift(t.pocketCenterLeft.angle(t.dartTip)-90,70),t.pocketEdgeRight=t.pocketCenterRight.shift(t.pocketCenterRight.angle(t.dartTip)+90,70),t[-900]=d.beamsIntersect(t[900],t[-900],t[66601],t[66602]),s.aldrich=new o().move(t[23])._curve(t[901603],t[901601]).curve(t[901602],t[901901],t[9019]).line(t[9021]).line(t[902504]).line(t[902502]).line(t[902503]).line(t[9024]).line(t[26]).curve(t[902601],t[2901],t[29]).curve(t[29],t[2701],t[27]).curve(t[27],t[202],t[201]).curve_(t[203],t[28]).curve_(t[2702],t[30]).curve_(t[3001],t[23]).close(),s.aldrich.render=!1,s.hemBase=new o().move(t[-27])._curve(t[202],t[201]).curve_(t[203],t[-28]),s.saBase1=new o().move(t[-28]).curve_(t[-2702],t[-30]).curve_(t[-3001],t[-2301])._curve(t[-901603],t[-901601]).curve(t[-901602],t[-901901],t[-9019]).line(t[66601]).line(t.dartTopLeft),s.saBase2=new o().move(t.dartTopRight).line(t[-2104]).line(t[-26]).curve(t[-2601],t[-2901],t[-29]).curve(t[-29],t[-2701],t[-27]),s.seam=s.saBase1.clone().line(t.dartTip).line(t.dartTopRight).join(s.saBase2).join(s.hemBase).close().attr("class","fabric"),s.hemBase.render=!1,s.saBase1.render=!1,s.saBase2.render=!1,n.set("backInseamLength",new o().move(t[-2301]).curve_(t[-3001],t[-30]).length()+new o().move(t[30])._curve(t[-2702],t[-28]).length()),n.set("backSideseamLength",t[-2104].dist(t[-26])+new o().move(t[-26]).curve(t[-2601],t[-2901],t[-29]).length()+new o().move(t[-29])._curve(t[-2701],t[-27]).length()),p&&(e&&(s.sa=s.saBase1.offset(-1*e).join(s.saBase2.offset(-1*e)).join(s.hemBase.offset(-3*e)).close().attr("class","fabric sa")),s.pocket=new o().move(t.pocketEdgeLeft).line(t.pocketCenterLeft).move(t.pocketCenterRight).line(t.pocketEdgeRight).attr("class","fabric dashed"),t.grainlineTop=new i(0,t[-2104].y),t.grainlineBottom=t[2].clone(),c("grainline",{from:t.grainlineBottom,to:t.grainlineTop}),t.title=new i(0,t[-2301].y),c("title",{at:t.title,title:"back",nr:1}),t.logo=t.title.shift(-90,70),y.logo=new b("logo",t.logo),t.scalebox=t.logo.shift(-90,70),c("scalebox",{at:t.scalebox}),c("sprinkle",{snippet:"notch",on:["pocketEdgeLeft","pocketEdgeRight"]})),r&&(c("ld",{from:t[66601],to:t.dartTopLeft,d:e+15}),c("ld",{from:t.dartTopLeft,to:t.dartTopRight,d:e+15}),c("ld",{from:t[66601],to:t[-2104],d:e+30}),c("ld",{from:t.pocketEdgeLeft,to:t.pocketCenterLeft,d:15}),c("ld",{from:t.pocketCenterRight,to:t.pocketEdgeRight,d:15}),c("ld",{from:t.dartTip,to:t.dartTop,d:30}),c("ld",{from:t.dartTip,to:t.pocketCenterRight,d:-15}),c("hd",{from:t[-2301],to:t[66601],y:t[66601].y-e-45}),c("hd",{from:t[66601],to:t[-2104],y:t[66601].y-e-45}),c("hd",{from:t[-2301],to:t[-2104],y:t[66601].y-e-60}),c("vd",{from:t[-2301],to:t[66601],x:t[-2301].x-e-15}),c("vd",{from:t[201],to:t[-2301],x:t[-2301].x-e-15}),c("vd",{from:t[201],to:t[66601],x:t[-2301].x-e-30}),c("hd",{from:t[-28],to:t[-27],y:t[201].y+3*e+15}),c("vd",{from:t[-27],to:t[-2104],x:t[-2104].x+e+15})),a}function I(a){let{store:n,sa:e,Point:i,points:t,Path:o,paths:s,options:f,complete:l,paperless:p,macro:r,utils:c,measurements:d,snippets:g,raise:y}=a.shorthand();(d.crotchDepth-d.waistToHips)/d.hips<.15&&y.warning("There is little vertical space to draw the cross seam. Perhaps double-check the seath depth and waist to hips measurements");for(let m in s)delete s[m];for(let m in g)delete g[m];t[1]=new i(t[0].x,d.crotchDepth-d.waistToHips-f.waistbandWidth+10),t[2]=new i(t[0].x,t[1].y+d.inseam+n.get("lengthBonus")),t[3]=new i(t[0].x,t[1].y+d.inseam/2+50),t[4]=new i(t[0].x,t[1].y-(d.crotchDepth-d.waistToHips)/4),t[5]=new i(t[0].x-d.seat/8+10,t[1].y),t[501]=t[5].shift(135,30),t[502]=t[501].shift(45,30),t[503]=t[501].shift(-135,30),t[6]=new i(t[5].x,t[4].y),t[7]=new i(t[5].x,t[0].y),t[8]=new i(t[6].x+d.seat/4+20,t[6].y),t[801]=new i(t[8].x,t[8].y-(d.crotchDepth-d.waistToHips)/4),t[802]=new i(t[8].x,t[8].y+(d.crotchDepth-d.waistToHips)/4),t[9]=new i(t[5].x-d.seat/16-5+n.get("backReduction"),t[5].y),t[10]=new i(t[7].x+10,t[7].y),t[1001]=t[10].shiftTowards(t[6],10),t[1002]=new i(t[0].x,t[1001].y),t[11]=new i(t[10].x+d.hips/4+25,t[10].y),t[12]=new i(t[2].x+n.get("legWidth")/2,t[2].y),t[1201]=new i(t[12].x,t[12].y-50),t[13]=t[12].flipX(),t[1301]=t[1201].flipX(),t[14]=new i(t[3].x+n.get("legWidth")/2+15,t[3].y),t[1401]=t[12].shiftOutwards(t[14],t[1].dy(t[3])/2),t[1402]=t[1401].flipX(),t[15]=t[14].flipX(),t[40]=new o().move(t[1001]).curve_(t[1002],t[11]).shiftAlong(50),t[41]=new i(t[40].x+t[1001].dx(t[6]),t[40].y+t[1001].dy(t[6]));let b=new o().move(t[6])._curve(t[502],t[501]);t[42]=b.shiftAlong(b.length()/2),t[43]=t[42].shift(-35,10),t["43beam"]=t[42].shift(-35,40),t[44]=t[43].shift(0,20),t[45]=t[40].shiftOutwards(t[41],20),t[-1001]=new o().move(t[1001]).curve_(t[1002],t[11]).shiftAlong(10),t[-100101]=t[-1001].shift(t[1001].angle(t[6]),10),t[-1002]=t[1002].shift(90,-10),t[-11]=new o().move(t[11])._curve(t[801],t[8]).shiftAlong(10),t[-1101]=new o().move(t[11])._curve(t[1002],t[1001]).shiftAlong(10),t[-1102]=new i(t[-1101].x+t[11].dx(t[-11]),t[-1101].y+t[11].dy(t[-11])),t[-801]=t[801].shift(0,-10),t[-8]=t[8].shift(0,-10),t[-802]=t[802].shift(0,-10),t[-1401]=t[1401].shift(t[1401].angle(t[14])+90,-10),t[-14]=t[14].shift(t[1401].angle(t[14])+90,-10),t[-1201]=t[1201].shift(0,-10),t[-12]=t[12].shift(0,-10),t[-13]=t[13].shift(0,10),t[-1301]=t[1301].shift(0,10),t[-15]=t[-14].flipX(),t[-1402]=t[-1401].flipX(),t[-901]=new o().move(t[9])._curve(t[503],t[501]).shiftAlong(10),t[-902]=new o().move(t[9])._curve(t[1402],t[15]).shiftAlong(10),t[-9]=new i(t[-902].x+t[9].dx(t[-901]),t[-902].y+t[9].dy(t[-901])),t[-501]=t[501].shift(t[503].angle(t[502])-90,10),t[-502]=t[502].shift(t[503].angle(t[502])-90,10),t[-503]=t[503].shift(t[503].angle(t[502])-90,10),t[-6]=t[6].shift(t[6].angle(t[1001])-90,10),t[-40]=t[40].shiftTowards(t[41],10),t["-6cp"]=t[-100101].shiftOutwards(t[-6],t[-6].dist(t[-502])/2);let v=c.lineIntersectsCurve(t[42],t["43beam"],t[-501],t[-502],t["-6cp"],t[-6]);Array.isArray(t.flyPretipX)&&(t.flyPretipX=v.pop()),t.flyPreTip?t.flyPretipX=v:(y.warning(`
Unable to determine fly end
We improvised to prevent the pattern from falling apart.
But this is almost certainly going to be a bad pattern since we're in uncharted territory.
`),t.flyPretipX=new o().move(t[-6]).curve(t["-6cp"],t[-502],t[-501]).shiftFractionAlong(.75)),t[43]=t.flyPretipX.clone(),t[60]=new o().move(t[-1102])._curve(t[-1002],t[-100101]).shiftAlong(50);let x=new o().move(t[-1102])._curve(t[-801],t[-8]),T=x.length();return T>=190?t[61]=x.shiftAlong(190):t[61]=new o().move(t[-8]).curve(t[-802],t[-1401],t[-14]).shiftAlong(190-T),s.aldrich=new o().move(t[9])._curve(t[503],t[501]).curve_(t[502],t[6]).line(t[1001]).curve_(t[1002],t[11])._curve(t[801],t[8]).curve(t[802],t[1401],t[14])._curve(t[1201],t[12]).line(t[13]).curve_(t[1301],t[15]).curve_(t[1402],t[9]).close(),s.hemBase=new o().move(t[-12]).line(t[-13]),s.saBase=new o().move(t[-13]).curve_(t[-1301],t[-15]).curve_(t[-1402],t[-9])._curve(t[-503],t[-501]).curve(t[-502],t["-6cp"],t[-6]).line(t[-100101]).curve_(t[-1002],t[-1102])._curve(t[-801],t[-8]).curve(t[-802],t[-1401],t[-14])._curve(t[-1201],t[-12]),s.seam=s.hemBase.clone().join(s.saBase).close().attr("class","fabric"),s.aldrich.render=!1,s.hemBase.render=!1,s.saBase.render=!1,l&&(e&&(s.sa=s.hemBase.offset(-3*e).join(s.saBase.offset(-1*e)).close().attr("class","fabric sa")),s.fly=new o().move(t[43]).curve(t[44],t[45],t[41]).line(t[-40]).attr("class","fabric dashed"),s.pocket=new o().move(t[60]).line(t[61]).attr("class","fabric dashed"),s.lining=new o().move(t[-14]).line(t[-15]).attr("class","lining dashed"),r("title",{at:t.title,title:"front",nr:2}),r("sprinkle",{snippet:"notch",on:[60,61,43]})),p&&(r("hd",{from:t[-9],to:t[-100101],y:t[-1102].y-e-15}),r("hd",{from:t[-100101],to:t[-1102],y:t[-1102].y-e-15}),r("hd",{from:t[-9],to:t[-1102],y:t[-1102].y-e-15}),r("hd",{from:t[-9],to:t[-8],y:t[-1102].y-e-30}),r("vd",{from:t[-9],to:t[-100101],x:t[-9].x-e-15}),r("vd",{from:t[-9],to:t[-1102],x:t[-9].x-e-30}),r("vd",{from:t[-13],to:t[-9],x:t[-9].x-e-30}),r("vd",{from:t[-12],to:t[-1102],x:t[-8].x+e+15}),r("hd",{from:t[-13],to:t[-12],y:t[-12].y+3*e+15})),a}function F(a){let{Point:n,points:e,Path:i,paths:t,absoluteOptions:o,complete:s,paperless:f,measurements:l,macro:p,snippets:r,Snippet:c}=a.shorthand();return e[0]=new n(0,0),e[2]=new n(o.waistbandWidth,l.hips/2+60),e[1]=new n(e[2].x,e[0].y),e[3]=new n(e[0].x,e[2].y),t.seam=new i().move(e[0]).line(e[1]).line(e[2]).line(e[3]).line(e[0]).close().attr("class","interfacing"),s&&(e.title=e[0].shiftFractionTowards(e[2],.5),p("title",{at:e.title,title:"waistbandInterfacingLeft",nr:"3a",scale:.5,rotation:-90}),e.logo=new n(e[2].x/2,45),r.logo=new c("logo",e.logo).attr("data-scale",.7)),f&&(p("hd",{from:e[3],to:e[2],y:e[2].y+15}),p("vd",{from:e[2],to:e[1],x:e[2].x+15})),a}function X(a){let{Point:n,points:e,Path:i,paths:t,absoluteOptions:o,complete:s,paperless:f,measurements:l,macro:p,snippets:r,Snippet:c}=a.shorthand();return e[0]=new n(0,0),e[2]=new n(o.waistbandWidth,l.hips/2+40),e[1]=new n(e[2].x,e[0].y),e[3]=new n(e[0].x,e[2].y),t.seam=new i().move(e[0]).line(e[1]).line(e[2]).line(e[3]).line(e[0]).close().attr("class","interfacing"),s&&(e.title=e[0].shiftFractionTowards(e[2],.5),p("title",{at:e.title,title:"waistbandInterfacingRight",nr:"3b",scale:.5,rotation:-90}),e.logo=new n(e[2].x/2,45),r.logo=new c("logo",e.logo).attr("data-scale",.7)),f&&(p("hd",{from:e[3],to:e[2],y:e[2].y+15}),p("vd",{from:e[2],to:e[1],x:e[2].x+15})),a}function j(a){let{Point:n,points:e,macro:i,paths:t,complete:o,sa:s,paperless:f}=a.shorthand();return t.seam.attributes.set("class","fabric"),o&&(s&&(t.sa=t.seam.offset(-1*s).attr("class","fabric sa")),e.title=e[0].shiftFractionTowards(e[2],.5),i("title",{at:e.title,title:"waistbandLeft",nr:"4a",scale:.5,rotation:-90}),e.grainlineTop=new n(e[2].x/2,0),e.grainlineBottom=new n(e[2].x/2,e[2].y,0),i("grainline",{from:e.grainlineBottom,to:e.grainlineTop})),f&&(i("hd",{from:e[3],to:e[2],y:e[2].y+s+15}),i("vd",{from:e[2],to:e[1],x:e[2].x+s+15})),a}function C(a){let{Point:n,points:e,macro:i,paths:t,complete:o,sa:s,paperless:f}=a.shorthand();return t.seam.attributes.set("class","fabric"),o&&(s&&(t.sa=t.seam.offset(-1*s).attr("class","fabric sa")),e.title=e[0].shiftFractionTowards(e[2],.5),i("title",{at:e.title,title:"waistbandRight",nr:"4b",scale:.5,rotation:-90}),e.grainlineTop=new n(e[2].x/2,0),e.grainlineBottom=new n(e[2].x/2,e[2].y,0),i("grainline",{from:e.grainlineBottom,to:e.grainlineTop})),f&&(i("hd",{from:e[3],to:e[2],y:e[2].y+s+15}),i("vd",{from:e[2],to:e[1],x:e[2].x+s+15})),a}function S(a){let{Point:n,snippets:e,Snippet:i,macro:t,points:o,paths:s,Path:f,complete:l,sa:p,paperless:r}=a.shorthand();return o[0]=o[0].shift(180,80),o[3]=o[3].shift(180,80),s.seam=new f().move(o[0]).line(o[1]).line(o[2]).line(o[3]).line(o[0]).close().attr("class","lining"),l&&(p&&(s.sa=s.seam.offset(-1*p).attr("class","lining sa")),o.title=o[0].shiftFractionTowards(o[2],.5),t("title",{at:o.title,title:"waistbandLiningLeft",nr:"5a",scale:.5,rotation:-90}),o.logo=o.title.shift(90,70),e.logo=new i("logo",o.logo),o.grainlineTop=new n(o[2].x/2,0),o.grainlineBottom=new n(o[2].x/2,o[2].y,0),t("grainline",{from:o.grainlineBottom,to:o.grainlineTop})),r&&(t("hd",{from:o[3],to:o[2],y:o[2].y+p+15}),t("vd",{from:o[2],to:o[1],x:o[2].x+p+15})),a}function A(a){let{Point:n,macro:e,snippets:i,Snippet:t,points:o,paths:s,Path:f,complete:l,sa:p,paperless:r}=a.shorthand();return o[0]=o[0].shift(180,80),o[3]=o[3].shift(180,80),s.seam=new f().move(o[0]).line(o[1]).line(o[2]).line(o[3]).line(o[0]).close().attr("class","lining"),l&&(p&&(s.sa=s.seam.offset(-1*p).attr("class","lining sa")),o.title=o[0].shiftFractionTowards(o[2],.5),e("title",{at:o.title,title:"waistbandLiningRight",nr:"5b",scale:.5,rotation:-90}),o.logo=o.title.shift(90,70),i.logo=new t("logo",o.logo),o.grainlineTop=new n(o[2].x/2,0),o.grainlineBottom=new n(o[2].x/2,o[2].y,0),e("grainline",{from:o.grainlineBottom,to:o.grainlineTop})),r&&(e("hd",{from:o[3],to:o[2],y:o[2].y+p+15}),e("vd",{from:o[2],to:o[1],x:o[2].x+p+15})),a}function E(a){let{snippets:n,Point:e,macro:i,points:t,Path:o,paths:s,complete:f,sa:l,paperless:p}=a.shorthand();for(let c in s)delete s[c];for(let c in n)delete n[c];s.fly=new o().move(t[-501]).curve(t[-502],t["-6cp"],t[-6]).split(t[43]).pop(),s.fly.render=!1;let r=new o().move(t[-100101]).curve_(t[-1002],t[-1102]);return t.splitWaist=r.shiftAlong(t[-100101].dist(t[-40])),s.waist=r.split(t.splitWaist).shift(),s.waist.render=!1,s.seam=s.waist.clone().line(t[41]).curve(t[45],t[44],t[43]).join(s.fly).line(t[-100101]).close().attr("class","fabric"),f&&(l&&(s.sa=s.seam.offset(l*-1).attr("class","fabric sa")),t.title=t[9019].clone(),i("title",{at:t.title,title:"flyPiece",nr:6,scale:.7}),t.grainlineTop=t[-100101].shiftFractionTowards(t.splitWaist,.3),t.grainlineBottom=new e(t.grainlineTop.x,t[41].y),i("grainline",{from:t.grainlineBottom,to:t.grainlineTop}),delete s.pocket,delete s.lining,delete n.logo,i("scalebox",!1)),p&&(i("hd",{from:t[-100101],to:t.splitWaist,y:t.splitWaist.y-l-15}),i("hd",{from:t.flyPretipX,to:t.splitWaist,y:t.splitWaist.y-l-30}),i("vd",{from:t.flyPretipX,to:t.splitWaist,x:t.splitWaist.x+l+15})),a}function D(a){let{macro:n,points:e,Path:i,paths:t,complete:o,sa:s,paperless:f}=a.shorthand();return e.leftTop=e[-100101].shift(180,20),e.new43=e[43].shift(180,20),t.seam=new i().move(e.leftTop).join(t.waist).line(e[41]).curve(e[45],e[44],e[43]).line(e.new43).join(t.fly.translate(-20,0)).line(e.leftTop).close().attr("class","fabric"),o&&(s&&(t.sa=t.seam.offset(s*-1).attr("class","fabric sa")),n("title",{at:e.title,title:"flyShield",nr:7,scale:.7})),f&&(n("hd",{from:e.leftTop,to:e.splitWaist,y:e.splitWaist.y-s-15}),n("hd",{from:e.new43,to:e.splitWaist,y:e.splitWaist.y-s-30}),n("vd",{from:e.new43,to:e.splitWaist,x:e.splitWaist.x+s+15})),a}function O(a){let{macro:n,Point:e,points:i,Path:t,paths:o,complete:s,sa:f,paperless:l,snippets:p}=a.shorthand();for(let c in o)delete o[c];for(let c in p)delete p[c];i.topLeft=new t().move(i[-1102])._curve(i[-1002],i[-100101]).shiftAlong(100),i.bottomLeft=i[61].shift(180,50),o.waist=new t().move(i[-1102])._curve(i[-1002],i[-100101]).split(i.topLeft).shift(),o.waist.render=!1,o.side=new t().move(i[-8]).curve(i[-802],i[-1401],i[-14]);let r=o.side.split(i[61]).shift();return r?o.side=r.reverse():o.side=new t().move(i[-8]).curve_(i[-801],i[-1102]).split(i[61]).pop(),o.side.render=!1,o.seam=new t().move(i.topLeft).line(i.bottomLeft).line(i[61]).join(o.side).join(o.waist).close().attr("class","fabric"),s&&(o.pocket=new t().move(i[60]).line(i[61]).attr("class","fabric stroke-sm lashed"),f&&(o.sa=o.seam.offset(f).attr("class","fabric sa")),n("scalebox",!1),delete o.fly,delete o.lining,i.grainlineTop=i[60].clone(),i.grainlineBottom=new e(i.grainlineTop.x,i.bottomLeft.y),n("grainline",{from:i.grainlineBottom,to:i.grainlineTop}),i.title=i[-801].shift(180,40),n("title",{at:i.title,title:"sidePiece",nr:8})),l&&(n("hd",{from:i.topLeft,to:i[-1102],y:i[-1102].y-f-15}),n("hd",{from:i.topLeft,to:i[-8],y:i[-1102].y-f-30}),n("hd",{from:i.bottomLeft,to:i[61],y:i.bottomLeft.y+f+15}),n("hd",{from:i.bottomLeft,to:i[-8],y:i.bottomLeft.y+f+30}),n("vd",{from:i.bottomLeft,to:i.topLeft,x:i.topLeft.x-f-15}),n("vd",{from:i.bottomLeft,to:i[-1102],x:i.topLeft.x-f-30})),a}function H(a){let{Point:n,points:e,Path:i,paths:t,complete:o,sa:s,paperless:f,macro:l,snippets:p,Snippet:r}=a.shorthand();for(let c in t)delete t[c];return delete p["43-notch"],e[810]=new n(e[60].x,e[-1102].y+300),e[811]=new n(e[-8].x,e[810].y),e[812]=new n(e[0].x,e[810].y),e[813]=e[-100101].shiftTowards(e[-6],70),e[814]=e[813].shift(0,40),e[815]=new n(e[0].x,e[814].y),e[816]=new n(e[-40].x-s,e[-40].y-s),e[817]=e[813].shift(0,30),e[818]=new n(e[814].x-s,e[814].y+s),t.seam=new i().move(e[-100101]).curve_(e[-1002],e[-1102])._curve(e[-801],e[-8]).curve(e[-802],e[811],e[810]).curve(e[812],e[815],e[814]).line(e[813]).line(e[-100101]).close().attr("class","lining"),t.flyEdge=new i().move(e[-40]).line(e[814]).attr("class","lining lashed"),t.pocket=new i().move(e[60]).line(e[61]).attr("class","lining lashed"),(o||f)&&(e.grainlineTop=e[60].clone(),e.grainlineBottom=new n(e.grainlineTop.x,e[810].y)),o&&(s&&(t.sa=t.seam.offset(-1*s).attr("class","lining sa"),t.flyEdeSa=new i().move(e[816]).line(e[818]).attr("class","lining sa")),e.title=e.dartTip.clone(),l("title",{at:e.title,title:"frontPocketBag",nr:9}),l("grainline",{from:e.grainlineBottom,to:e.grainlineTop}),e.logo=new n(e[60].x,e[61].y),p.logo=new r("logo",e.logo),delete t.fly,delete t.lining,l("scalebox",!1)),f&&(l("hd",{from:e[813],to:e[-8],y:e.grainlineBottom.y+s+15}),l("hd",{from:e[-40],to:e[-8],y:e[-1102].y-s-15}),l("hd",{from:e[-100101],to:e[-8],y:e[-1102].y-s-30}),l("vd",{from:e.grainlineBottom,to:e[-1102],x:e[-8].x+s+15}),l("vd",{from:e.grainlineBottom,to:e[813],x:e[813].x-s-15}),l("vd",{from:e.grainlineBottom,to:e[-100101],x:e[813].x-s-30})),a}function J(a){let{macro:n,measurements:e,Point:i,points:t,Path:o,paths:s,complete:f,sa:l,paperless:p}=a.shorthand(),r=e.hips*.16,c=r*1.43;return t.topRight=new i(r/2,0),t.topLeft=t.topRight.flipX(),t.bottomRight=new i(r/2,c),t.bottomLeft=t.bottomRight.flipX(),t.weltLeft=new i(t.topLeft.x+15,t.topLeft.y+r/3),t.weltRight=new i(t.topRight.x-15,t.topRight.y+r/3),n("round",{from:t.topLeft,to:t.bottomRight,via:t.bottomLeft,radius:r/12,prefix:"left"}),n("round",{from:t.bottomLeft,to:t.topRight,via:t.bottomRight,radius:r/12,prefix:"right"}),s.seam=new o().move(t.topLeft).line(t.leftStart).curve(t.leftCp1,t.leftCp2,t.leftEnd).line(t.rightStart).curve(t.rightCp1,t.rightCp2,t.rightEnd).line(t.topRight).line(t.topLeft).close().attr("class","lining"),s.welt=new o().move(t.weltLeft).line(t.weltRight).attr("class","lining dashed"),f&&(l&&(s.sa=s.seam.offset(l).attr("class","lining sa")),t.title=new i(0,c/2),n("title",{at:t.title,title:"backInnerPocketBag",nr:10}),t.grainlineTop=new i(r/-3,0),t.grainlineBottom=new i(r/-3,c),n("grainline",{from:t.grainlineBottom,to:t.grainlineTop}),n("sprinkle",{snippet:"notch",on:["weltLeft","weltRight"]})),p&&(n("hd",{from:t.weltLeft,to:t.weltRight,y:t.weltLeft.y+15}),n("hd",{from:t.leftStart,to:t.rightEnd,y:t.leftEnd.y+l+15}),n("vd",{from:t.rightStart,to:t.topRight,x:t.topRight.x+l+15})),a}function M(a){let{macro:n,points:e,Path:i,paths:t,complete:o,sa:s,paperless:f}=a.shorthand();return e.topRight=e.topRight.shift(90,20),e.topLeft=e.topLeft.shift(90,20),t.seam=new i().move(e.topLeft).line(e.leftStart).curve(e.leftCp1,e.leftCp2,e.leftEnd).line(e.rightStart).curve(e.rightCp1,e.rightCp2,e.rightEnd).line(e.topRight).line(e.topLeft).close().attr("class","lining"),t.welt=new i().move(e.weltLeft).line(e.weltRight).attr("class","lining dashed"),o&&(s&&(t.sa=t.seam.offset(s).attr("class","lining sa")),n("title",{at:e.title,title:"backInnerPocketBag",nr:11})),a}function N(a){let{macro:n,measurements:e,Point:i,points:t,Path:o,paths:s,complete:f,paperless:l}=a.shorthand(),p=e.hips*.16,r=p/2;return t.topRight=new i(p/2,0),t.topLeft=t.topRight.flipX(),t.bottomRight=new i(p/2,r),t.bottomLeft=t.bottomRight.flipX(),t.weltLeft=new i(t.topLeft.x+15,t.topLeft.y+r/2),t.weltRight=new i(t.topRight.x-15,t.topRight.y+r/2),s.seam=new o().move(t.topLeft).line(t.bottomLeft).line(t.bottomRight).line(t.topRight).line(t.topLeft).close().attr("class","fabric"),s.welt=new o().move(t.weltLeft).line(t.weltRight).attr("class","fabric dashed"),f&&(t.title=t.topLeft.shiftFractionTowards(t.bottomRight,.5),n("title",{at:t.title,title:"backPocketFacing",nr:12}),t.grainlineTop=t.topLeft.shiftFractionTowards(t.topRight,.2),t.grainlineBottom=new i(t.grainlineTop.x,t.bottomLeft.y),n("grainline",{from:t.grainlineBottom,to:t.grainlineTop}),n("sprinkle",{snippet:"notch",on:["weltLeft","weltRight"]})),l&&(n("hd",{from:t.bottomLeft,to:t.bottomRight,y:t.bottomLeft.y+15}),n("vd",{from:t.bottomRight,to:t.topRight,x:t.bottomRight.x+15})),a}function U(a){let{macro:n,points:e,paths:i,complete:t,paperless:o}=a.shorthand();return i.seam.attributes.set("class","interfacing"),i.welt.attributes.set("class","interfacing dashed"),t&&(n("title",{at:e.title,title:"backPocketInterfacing",nr:13}),n("grainline",!1)),a}function G(a){let{absoluteOptions:n,Point:e,points:i,Path:t,paths:o,complete:s,paperless:f,macro:l}=a.shorthand(),p=n.waistbandWidth+30,r=(p-30)/2;return i.topRight=new e(r/2,0),i.topLeft=i.topRight.flipX(),i.bottomRight=new e(r/2,p),i.bottomLeft=i.bottomRight.flipX(),o.seam=new t().move(i.topLeft).line(i.bottomLeft).line(i.bottomRight).line(i.topRight).line(i.topLeft).close().attr("class","fabric"),s&&(i.title=new e(0,p/2),l("title",{at:i.title,title:"beltLoop",nr:14,scale:.4}),i.grainlineTop=i.topLeft.shiftFractionTowards(i.topRight,.5),i.grainlineBottom=new e(i.grainlineTop.x,i.bottomLeft.y),l("grainline",{from:i.grainlineBottom,to:i.grainlineTop})),a}var h=new V.default.Design(R,Y.default);h.prototype.draftBack=a=>W(a);h.prototype.draftFront=a=>I(a);h.prototype.draftWaistbandInterfacingLeft=a=>F(a);h.prototype.draftWaistbandInterfacingRight=a=>X(a);h.prototype.draftWaistbandLiningLeft=a=>S(a);h.prototype.draftWaistbandLiningRight=a=>A(a);h.prototype.draftWaistbandLeft=a=>j(a);h.prototype.draftWaistbandRight=a=>C(a);h.prototype.draftFlyPiece=a=>E(a);h.prototype.draftFlyShield=a=>D(a);h.prototype.draftSidePiece=a=>O(a);h.prototype.draftFrontPocketBag=a=>H(a);h.prototype.draftBackInnerPocketBag=a=>J(a);h.prototype.draftBackOuterPocketBag=a=>M(a);h.prototype.draftBackPocketFacing=a=>N(a);h.prototype.draftBackPocketInterfacing=a=>U(a);h.prototype.draftBeltLoop=a=>G(a);var nt=h;
//# sourceMappingURL=index.js.map