// Copyright (C) 2001 Leena L�hteenm�ki, Finland // Copyright (C) 2012 PatternMaker Software // 2013/11/27 pocket in/cm fix double index, done; object marker_array[20]; double marker_count, loop; double result; double x[200], y[200]; object group_obj[200]; object current_object; point current_point; selection current_selection; double pit,ry,vy,aly,ky,hp; double ptl,pts,ktk,sp; double ek,sl,ktl,rl; double metric, sv; double ktp,hl,pk, cuff_circ; double collar_length; double model, back_pleat, collar_spread; double sleeve_length, short_sleeve_cuff, long_sleeve_cuff, cuff_model; double collar, pocket; double band_front_height, band_back_height, tie_space, point_length; double nv, back_pleat_width; double tk, tl, mans_korkeus; double ang,ang2,vang,vdistance,rangle; double language, siirtox, siirtoy; main() { language=get_language(); if ( language != 0 ) { language = 0; } if (language == 0) { check_reg(0, "Leena","MB_macros", "This macro needs to be properly installed before running it."); } init_xarc_array(); // new sp=44.6; ry=100; vy=86; aly=104; ky=40; sl=40; hp=65.4; cuff_circ=27; pit=29; sv=1; nv=1.5; band_front_height=2.5; band_back_height=3; tie_space=0; back_pleat_width=6; point_length=6; tl=14; //Start Options while (!done) { if (index==0) { Popup1(); } if (index==1) { Popup2(); } if (index==2) { Popup3(); } if (index==3) { Popup4(); } if (index==4) { Popup5(); } if (index==5) { Popup6(); } if (index==6) { Popup7(); } if (index==7) { Popup8(); } if (index==8) { Popup9(); } } //End Options if(model==3) { tk=13; } else { tk=14; } if(long_sleeve_cuff==0) { mans_korkeus=7.5; } else { mans_korkeus=9; } if (is_function("unit_mode")==1) { metric = unit_mode(); if (!metric) { pit=pit/2.54; sp=sp/2.54; ry=ry/2.54; vy=vy/2.54; aly=aly/2.54; ky=ky/2.54; sl=sl/2.54; rl=rl/2.54; hp=hp/2.54; sv=sv/2.54; band_front_height=band_front_height/2.54; band_back_height=band_back_height/2.54; tie_space=tie_space/2.54; point_length=point_length/2.54; nv=nv/2.54; back_pleat_width=back_pleat_width/2.54; cuff_circ=cuff_circ/2.54; tk=tk/2.54; tl=tl/2.54; } } else { if (language == 0) { metric=2*pop_up("Units","Inches","Centimeters"); } if (metric<1) { pit=pit/2.54; sp=sp/2.54; ry=ry/2.54; vy=vy/2.54; aly=aly/2.54; ky=ky/2.54; sl=sl/2.54; rl=rl/2.54; hp=hp/2.54; sv=sv/2.54; band_front_height=band_front_height/2.54; band_back_height=band_back_height/2.54; tie_space=tie_space/2.54; point_length=point_length/2.54; nv=nv/2.54; back_pleat_width=back_pleat_width/2.54; cuff_circ=cuff_circ/2.54; tk=tk/2.54; tl=tl/2.54; } if(metric==0) { sv=0.39; } } double read; read = 0; if (is_function("measure_table")==1) { if (measure_table("default_men")==1) { read = 1; } } if (read==0) { if (is_function("start_picture_input")) { if (language == 0) { start_picture_input("BODY MEASUREMENTS"); add_picture_input("Neck circumference",ky, "m_neck_circumference"); add_picture_input("Chest circumference", ry, "m_chest_circumference"); add_picture_input("Waist circumference", vy, "m_waist_circumference_shirt"); add_picture_input("Hip circumference", aly, "m_hip_circumference"); add_picture_input("Back length", sp, "m_back_length"); add_picture_input("Back width",sl, "m_back_width"); add_picture_input("Overarm length",hp, "m_arm_length"); } run_picture_input(); } else { if (language == 0) { dialog_box( "BODY MEASUREMENTS", "Neck circumference",ky, "Chest circumference", ry, "Waist circumference", vy, "Hip circumference",aly, "Back length",sp, "Back width",sl, "Overarm length",hp); } } } if (is_function("start_picture_input")) { if (language == 0) { start_picture_input("DESIGN MEASUREMENTS"); add_picture_input("Button ext. width", nv, ""); add_picture_input("Tie space",tie_space, ""); add_picture_input("Point length",point_length, ""); add_picture_input("Back pleat width",back_pleat_width, ""); add_picture_input("Length from waist",pit, "m_jacket_length_from_waist"); add_picture_input("Cuff circumference",cuff_circ, "m_cuff_circumference_jacket"); add_picture_input("Chest pocket width",tl, ""); add_picture_input("Chest pocket height",tk, ""); add_picture_input("Seam Allowance", sv, "meas_seamallow"); } run_picture_input(); } else { if (language == 0) { dialog_box( "DESIGN MEASUREMENTS", "Button ext. width", nv, "Tie space",tie_space, "Point length",point_length, "Back pleat width",back_pleat_width, "Length from waist",pit, "Cuff circumference",cuff_circ, "Chest pocket width",tl, "Chest pocket height",tk, "Seam Allowance", sv); } } if (is_function("unit_mode")==1) { metric = unit_mode(); if (!metric) { pit=pit*2.54; sp=sp*2.54; ry =ry*2.54; vy=vy*2.54; aly=aly*2.54; ky=ky*2.54; sl=sl*2.54; rl=rl*2.54; hp=hp*2.54; band_front_height=band_front_height*2.54; band_back_height=band_back_height*2.54; tie_space=tie_space*2.54; point_length=point_length*2.54; nv=nv*2.54; back_pleat_width=back_pleat_width*2.54; cuff_circ=cuff_circ*2.54; tl=tl*2.54; tk=tk*2.54; } } else { if (metric<1) { pit=pit*2.54; sp=sp*2.54; ry =ry*2.54; vy=vy*2.54; aly=aly*2.54; ky=ky*2.54; sl=sl*2.54; rl=rl*2.54; hp=hp*2.54; band_front_height=band_front_height*2.54; band_back_height=band_back_height*2.54; tie_space=tie_space*2.54; point_length=point_length*2.54; nv=nv*2.54; back_pleat_width=back_pleat_width*2.54; cuff_circ=cuff_circ*2.54; tk=tk*2.54; tl=tl*2.54; } } if(metric==2) { sv=sv/2.54; } ky=ky+1; hp=hp-5; if (ry < 92) { ktk=22; } else { if (ry < 96) { ktk=22.8; } else { if (ry < 100) { ktk=23.6; } else { if (ry < 104) { ktk=24.4; } else { if (ry < 108) { ktk=25.3; } else { if (ry < 112) { ktk=26.4; } else { if (ry < 116) { ktk=26.8; } else { if (ry < 120) { ktk=27.2; } else { if (ry < 124) { ktk=27.6; } else { if (ry < 128) { ktk=28; } else { if (ry < 132) { ktk=28.4; } else { ktk=28.8; } } } } } } } } } } } ky=ky+2; ktk=ktk+6; ek=ktk-1; ktl=ry/8-0.5; rl=ry-sl-2*ktl; sl=sl/2+4; rl=rl/2+5; ptl=ky/6; pts=ptl+2; x[0]=0; y[0]=0; coord(0,1,0,pit); coord(1,2,0,sp-ktk); coord(0,3,0,pit-7+sp); coord(3,4,0,7); coord(4,5,-(ptl),0); coord(5,6,0,2); coord(6,7,-0.5,1.5); coord(4,9,-sl-1.5,-2); coord(4,9,-sl+0.5,-1.5); coord(3,10,-sl,0); x[10]=x[9]; cont(10,9,8,-1.5); coord(3,11,-(sl/3*2),0); x[12]=x[9]; coord(10,12,0,-1.5); coord(4,13,-sl,-3/4*ktk); coord(2,14,-sl,0); coord(2,15,-(sl+ktl/2),0); coord(1,16,-(sl+ktl/2-1),0); coord(0,17,-(sl+ktl/2),0); coord(16,18,-2,0); coord(15,20,-ktl/2,0); coord(20,21,0,ktk/4); coord(20,22,0,ek); coord(22,24,-(rl-ptl),-1.5); coord(24,25,dist(7,9),-4); coord(24,26,0,-(pts-1.5)); coord(26,27,-ptl,0); coord(27,28,-nv,0); coord(22,29,-(rl+nv),-ek); coord(29,30,0,-(sp-ktk)); coord(30,31,0,-(pit)); coord(31,32,nv,0); x[111]=x[28]+3*nv; y[111]=y[28]; x[112]=x[29]+3*nv; y[112]=y[29]; x[113]=x[28]+3*nv; y[113]=y[30]; x[114]=x[28]+3*nv; y[114]=y[31]; center(25,21,115); center(111,21,116); coord(24,119,0,2/3*dist(24,26)); ktp=arclength(15,20,21)+dist(21,25)+arclength(15,14,13)+dist(9,10); hl=ktp/2-0.5; hl=hl+4; pk=ktp/3-5; coord(0,33,hl+14,-5); coord(33,34,0,5); coord(33,35,0,hp); coord(35,36,0,-pk); coord(35,37,ktp/2+3,-pk); coord(35,38,-(ktp/2+3),-pk); coord(35,37,hl+3,-pk); coord(35,38,-(hl+3),-pk); center(35,37,39); coord(34,42,cuff_circ/2+4.2,0); coord(34,44,-cuff_circ/2-4.2,0); coord(35,48,hl/4,0); coord(37,49,-hl/4,pk/4); center(48,49,40); coord(35,50,-hl/4,0); coord(38,51,hl/4,0); center(50,51,41); if(sleeve_length==1) { cont(42,37,42,-16); cont(44,38,44,-16); y[34]=y[44]; } double kaulus_etu, kaulus_taka; kaulus_etu=arclength(24,26,27); kaulus_taka=arclength(4,5,6)+dist(6,7); collar_length=arclength(24,26,27)+arclength(4,5,6)+dist(6,7); coord(35,60,2,3); coord(60,61,-collar_length,0); coord(61,62,-nv,0); coord(61,63,4,0); coord(60,64,0,0.7); coord(64,65,-collar_length/3,0); coord(62,66,0,.5); coord(66,67,.5,band_front_height); coord(64,68,0,band_back_height); coord(65,69,0,3.5); coord(67,70,+tie_space+nv+0.2,0); coord(68,71,0,1); coord(69,72,0,1); coord(71,73,0,band_back_height+0.5); if(collar_spread==0) { coord(70,75,-2-1,point_length); } if(collar_spread==1) { coord(70,75,-2,point_length); } if(collar_spread==2) { coord(70,75,-2+1,point_length); } coord(73,76,-collar_length/4,0); if(point_length>6) { center(75,76,74); } else { coord(69,74,-collar_length/2,4); } cont(74,75,77,-2); cont(70,75,78,-2); coord(75,99,0,20); coord(99,107,nv,0); coord(107,108,cuff_circ,0); coord(108,100,nv,0); coord(100,102,0,-mans_korkeus); if(long_sleeve_cuff==2) { coord(102,101,0,4); } else { coord(102,101,0,2); } if(long_sleeve_cuff==2) { coord(102,103,-2*nv,0); } else { coord(102,103,-nv,0); } coord(102,105,-cuff_circ-2*nv,0); if(long_sleeve_cuff==2) { coord(105,104,2*nv,0); } else { coord(105,104,nv,0); } if(long_sleeve_cuff==2) { coord(105,106,0,4); } else { coord(105,106,0,2); } center(107,104,109); center(108,103,110); x[79]=x[24]; y[79]=y[20]+0.5*ktk; coord(79,80,tl,0); coord(79,81,0,-tk); coord(81,82,tl,0); coord(79,83,0,-4); coord(79,84,+0.5*tl,-8); coord(83,85,tl,0); coord(81,86,0.5*tl,-5); cont(81,86,87,-1); cont(82,86,88,-1); cont(86,81,89,-2); cont(86,82,90,-2); cont(79,81,91,-2); cont(80,82,92,-2); cont(82,81,93,-2); cont(81,82,94,-2); cont(79,83,95,-2); cont(84,83,96,-2); cont(84,85,97,-2); cont(85,80,98,-2); coord(79,117,0.25*dist(79,80),0); coord(79,118,0.5*dist(79,80),0); coord(79,119,0.75*dist(79,80),0); x[120]=x[117]; y[120]=y[84]; x[121]=x[119]; y[121]=y[84]; x[122]=x[117]; y[122]=y[83]; x[123]=x[119]; y[123]=y[85]; coord(68,125,10,0); coord(125,126,0,10); coord(126,127,1.5,1.5); coord(126,128,3,0); coord(127,129,3,0); coord(126,130,6,0); coord(125,131,6,0); coord(125,138,3,0); coord(131,132,6,0); coord(132,133,0,11.5); coord(133,134,3,0); coord(134,135,3,0); coord(132,136,6,0); coord(132,137,3,0); if(sleeve_length==0) { group_obj[101]=current_object; current_object=newobject("poly"); addpoint(x[132]/2.54, (y[132])/2.54, "line"); addpoint(x[133]/2.54, (y[133])/2.54, "line"); current_point=addpoint(x[134]/2.54, (y[134])/2.54, "line"); notch_type(current_point,"NOTCH",0); addpoint(x[135]/2.54, (y[135])/2.54, "line"); addpoint(x[136]/2.54, (y[136])/2.54, "line"); current_point=addpoint(x[137]/2.54, (y[137])/2.54, "line"); notch_type(current_point,"NOTCH",0); group_obj[102]=current_object; if (language == 0) { current_object=newobject("text","Sleeve placket underlap, Cut 2",-1.570796,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[133]+.2)/2.54, (y[133]-1)/2.54, "line"); group_obj[103]=current_object; if(sv>0) { offset_mark(102); select(current_selection,group_obj[103]); group(current_selection); deselect(current_selection); } else { mark(102); current_selection=newselection("OBJECT"); select(current_selection,group_obj[102]); select(current_selection,group_obj[103]); group(current_selection); deselect(current_selection); } current_object=newobject("poly"); addpoint(x[125]/2.54, (y[125])/2.54, "line"); addpoint(x[126]/2.54, (y[126])/2.54, "line"); addpoint(x[127]/2.54, (y[127])/2.54, "line"); current_point=addpoint(x[128]/2.54, (y[128])/2.54, "line"); notch_type(current_point,"NOTCH",0); addpoint(x[129]/2.54, (y[129])/2.54, "line"); addpoint(x[130]/2.54, (y[130])/2.54, "line"); addpoint(x[131]/2.54, (y[131])/2.54, "line"); current_point=addpoint(x[138]/2.54, (y[138])/2.54, "line"); notch_type(current_point,"NOTCH",0); group_obj[104]=current_object; if (language == 0) { current_object=newobject("text","Sleeve placket overlap, Cut 2",-1.570796,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[126]+.2)/2.54, (y[126]-1)/2.54, "line"); group_obj[105]=current_object; if(sv>0) { offset_mark(104); select(current_selection,group_obj[105]); group(current_selection); deselect(current_selection); } else { mark(104); current_selection=newselection("OBJECT"); select(current_selection,group_obj[104]); select(current_selection,group_obj[105]); group(current_selection); deselect(current_selection); } } if(model==3) { current_object=newobject("poly"); addpoint((x[3])/2.54, y[13]/2.54, "xarc_start"); addpoint(x[11]/2.54, y[11]/2.54, "xarc_corner"); addpoint(x[12]/2.54, y[12]/2.54, "LINE"); addpoint(x[13]/2.54, y[13]/2.54, "XARC_START"); addpoint(x[14]/2.54, y[14]/2.54, "xarc_corner"); addpoint(x[15]/2.54, y[15]/2.54, "LINE"); current_point=addpoint(x[16]/2.54, y[16]/2.54, "LINE"); notch_type(current_point,"NOTCH",1); addpoint(x[17]/2.54, y[17]/2.54, "LINE"); addpoint((x[0])/2.54, y[0]/2.54, "open"); group_obj[1]=current_object; current_object=newobj_dot((x[3])/2.54, y[13]/2.54); addpoint((x[0])/2.54, y[0]/2.54, "open"); group_obj[2]=current_object; if (language == 0) { current_object=newobject("text","Back Piece, CB, Cut 1 on fold",-1.570796,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[3]-1)/2.54, (y[3]-1-14)/2.54, "line"); group_obj[3]=current_object; if(sv>0) { offset_mark(1); select(current_selection,group_obj[2]); select(current_selection,group_obj[3]); group(current_selection); deselect(current_selection); } else { mark(1); current_selection=newselection("OBJECT"); select(current_selection,group_obj[1]); select(current_selection,group_obj[2]); select(current_selection,group_obj[3]); group(current_selection); deselect(current_selection); } current_object=newobject("poly"); addpoint(x[4]/2.54, (y[4]+4)/2.54, "XARC_START"); addpoint(x[5]/2.54, (y[5]+4)/2.54, "XARC_CORNER"); current_point=addpoint(x[6]/2.54, (y[6]+4)/2.54, "LINE"); addpoint(x[7]/2.54, (y[7]+4)/2.54, "LINE"); addpoint(x[9]/2.54, (y[9]+4)/2.54, "LINE"); current_point=addpoint(x[8]/2.54, (y[8]+4)/2.54, "LINE"); notch_type(current_point,"NOTCH",1); addpoint(x[10]/2.54, (y[10]+4)/2.54, "xarc_start"); addpoint(x[11]/2.54, (y[11]+4)/2.54, "xarc_corner"); addpoint(x[3]/2.54, (y[13]+4)/2.54, "open"); group_obj[4]=current_object; current_object=newobj_dot((x[4])/2.54, (y[4]+4)/2.54); addpoint(x[3]/2.54, (y[13]+4)/2.54, "open"); group_obj[5]=current_object; if (language == 0) { current_object=newobject("text","Back Yoke, CB, Cut 1 on fold",-1.570796,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[4]-1)/2.54, (y[4]-1+4)/2.54, "line"); group_obj[6]=current_object; if(sv>0) { offset_mark(4); select(current_selection,group_obj[5]); select(current_selection,group_obj[6]); group(current_selection); deselect(current_selection); } else { mark(4); current_selection=newselection("OBJECT"); select(current_selection,group_obj[4]); select(current_selection,group_obj[5]); select(current_selection,group_obj[6]); group(current_selection); deselect(current_selection); } } else { current_object=newobject("poly"); if(back_pleat==0) { addpoint((x[3])/2.54, (y[3])/2.54, "line"); addpoint(x[11]/2.54, (y[11])/2.54, "line"); } if(back_pleat==1) { addpoint((x[3]+back_pleat_width)/2.54, (y[3])/2.54, "line"); current_point=addpoint(x[3]/2.54, (y[3] )/2.54, "xarc_start"); notch_type(current_point,"NOTCH",1); addpoint(x[11]/2.54, (y[11] )/2.54, "xarc_corner"); } if(back_pleat==2) { addpoint((x[3]+back_pleat_width)/2.54, (y[3] )/2.54, "line"); current_point=addpoint(x[11]/2.54+back_pleat_width/2.54, (y[11])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point=addpoint(x[11]/2.54, (y[11])/2.54, "LINE"); notch_type(current_point,"NOTCH",1); } addpoint((x[12])/2.54, (y[12])/2.54, "LINE"); addpoint((x[13])/2.54, y[13]/2.54, "XARC_START"); addpoint((x[14])/2.54, (y[14])/2.54, "XARC_CORNER"); addpoint((x[15])/2.54, (y[15])/2.54, "LINE"); current_point=addpoint((x[16])/2.54, y[16]/2.54, "LINE"); notch_type(current_point,"NOTCH",1); addpoint((x[17])/2.54, (y[17])/2.54, "line"); if(back_pleat==0) { addpoint((x[0])/2.54, (y[0])/2.54, "open"); } if(back_pleat==1) { addpoint((x[0]+back_pleat_width)/2.54, (y[0])/2.54, "open"); } if(back_pleat==2) { addpoint((x[0]+back_pleat_width)/2.54, (y[0])/2.54, "open"); } group_obj[1]=current_object; if(back_pleat==0) { current_object=newobj_dot((x[0])/2.54, (y[0])/2.54); addpoint((x[3])/2.54, (y[3])/2.54, "open"); } if(back_pleat==1) { current_object=newobj_dot((x[0]+back_pleat_width)/2.54, (y[0])/2.54); addpoint((x[3]+back_pleat_width)/2.54, (y[3])/2.54, "open"); } if(back_pleat==2) { current_object=newobj_dot((x[0]+back_pleat_width)/2.54, (y[0])/2.54); addpoint((x[3]+back_pleat_width)/2.54, (y[3] )/2.54, "open"); } group_obj[2]=current_object; if(back_pleat==1) { if (language == 0) { current_object=newobject("text","Fold",0.0,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[3]+2)/2.54, (y[3]-1)/2.54, "line"); group_obj[3]=current_object; } if(back_pleat==2) { if (language == 0) { current_object=newobject("text","Fold",0.0,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[11]+2)/2.54, (y[11]-1)/2.54, "line"); group_obj[110]=current_object; } if(sv>0) { offset_mark(1); select(current_selection,group_obj[2]); if(back_pleat==1) { select(current_selection,group_obj[3]); } if(back_pleat==2) { select(current_selection,group_obj[110]); } group(current_selection); deselect(current_selection); } else { mark(1); current_selection=newselection("OBJECT"); select(current_selection,group_obj[1]); select(current_selection,group_obj[2]); if(back_pleat==1) { select(current_selection,group_obj[3]); } if(back_pleat==2) { select(current_selection,group_obj[110]); } group(current_selection); deselect(current_selection); } current_object=newobject("poly"); addpoint(x[4]/2.54, (y[4]+4)/2.54, "XARC_START"); addpoint(x[5]/2.54, (y[5]+4)/2.54, "XARC_CORNER"); current_point=addpoint(x[6]/2.54, (y[6]+4)/2.54, "LINE"); notch_type(current_point,"NOTCH",1); addpoint(x[7]/2.54, (y[7]+4)/2.54, "LINE"); current_point=addpoint(x[9]/2.54, (y[9]+4)/2.54, "LINE"); current_point=addpoint(x[8]/2.54, (y[8]+4)/2.54, "LINE"); notch_type(current_point,"NOTCH",1); addpoint(x[10]/2.54, (y[10]+4)/2.54, "line"); addpoint(x[11]/2.54, (y[11]+4)/2.54, "line"); addpoint(x[3]/2.54, (y[3]+4)/2.54, "open"); group_obj[4]=current_object; current_object=newobj_dot((x[4])/2.54, (y[4]+4)/2.54); addpoint(x[3]/2.54, (y[3]+4)/2.54, "open"); group_obj[5]=current_object; if (language == 0) { current_object=newobject("text","Back Yoke, CB, Cut 1 on fold",0.0,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[3]-13)/2.54, (y[3]+1+6)/2.54, "line"); group_obj[6]=current_object; if(sv>0) { offset_mark(4); select(current_selection,group_obj[5]); select(current_selection,group_obj[6]); group(current_selection); deselect(current_selection); } else { mark(4); current_selection=newselection("OBJECT"); select(current_selection,group_obj[4]); select(current_selection,group_obj[5]); select(current_selection,group_obj[6]); group(current_selection); deselect(current_selection); } } if(model==3) { if(pocket==0) { current_object=newobject("poly"); addpoint((x[79]-2-4)/2.54, (y[79]+2+2*tk)/2.54, "line"); addpoint((x[80]-2-4)/2.54, (y[80]+2+2*tk)/2.54, "line"); addpoint((x[92]-2-4)/2.54, (y[92]+2+2*tk)/2.54, "xarc_start"); addpoint((x[82]-2-4)/2.54, (y[82]+2+2*tk)/2.54, "xarc_corner"); addpoint((x[90]-2-4)/2.54, (y[90]+2+2*tk)/2.54, "line"); addpoint((x[89]-2-4)/2.54, (y[89]+2+2*tk)/2.54, "xarc_start"); addpoint((x[81]-2-4)/2.54, (y[81]+2+2*tk)/2.54, "xarc_corner"); addpoint((x[91]-2-4)/2.54, (y[91]+2+2*tk)/2.54, "line"); group_obj[13]=current_object; if (language == 0) { current_object=newobject("text","Pocket, cut 2",0.0,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[79]+1-2-0-2+6)/2.54, (y[79]-1+2+2*tk)/2.54, "line"); group_obj[14]=current_object; if(sv>0) { offset_mark(13); select(current_selection,group_obj[14]); group(current_selection); deselect(current_selection); } else { mark(13); current_selection=newselection("OBJECT"); select(current_selection,group_obj[13]); select(current_selection,group_obj[14]); group(current_selection); deselect(current_selection); } } else { current_object=newobject("poly"); addpoint((x[82]-2-4)/2.54, (y[82]+8+2*tk)/2.54, "line"); addpoint((x[86]-2-4)/2.54, (y[86]+8+2*tk)/2.54, "line"); addpoint((x[81]-2-4)/2.54, (y[81]+8+2*tk)/2.54, "line"); addpoint((x[79]-2-4)/2.54, (y[79]+8+2*tk)/2.54, "line"); addpoint((x[80]-2-4)/2.54, (y[80]+8+2*tk)/2.54, "line"); group_obj[13]=current_object; if (language == 0) { current_object=newobject("text","Pocket, cut 2",0.0,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[79]+1-2-4)/2.54, (y[79]-1+8+2*tk)/2.54, "line"); group_obj[14]=current_object; if(sv>0) { offset_mark(13); select(current_selection,group_obj[14]); group(current_selection); deselect(current_selection); } else { mark(13); current_selection=newselection("OBJECT"); select(current_selection,group_obj[13]); select(current_selection,group_obj[14]); group(current_selection); deselect(current_selection); } } } if(model<3) { if(pocket==0) { current_object=newobject("poly"); addpoint((x[79]-4)/2.54, (y[79]+2*tk)/2.54, "line"); addpoint((x[80]-4)/2.54, (y[80]+2*tk)/2.54, "line"); addpoint((x[92]-4)/2.54, (y[92]+2*tk)/2.54, "line"); addpoint((x[94]-4)/2.54, (y[94]+2*tk)/2.54, "line"); addpoint((x[93]-4)/2.54, (y[93]+2*tk)/2.54, "line"); addpoint((x[91]-4)/2.54, (y[91]+2*tk)/2.54, "line"); group_obj[13]=current_object; if (language == 0) { current_object=newobject("text","Pocket, cut 2",0.0,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[79]+1-4)/2.54, (y[84]+2*tk-1)/2.54, "line"); group_obj[14]=current_object; if(sv>0) { offset_mark(13); select(current_selection,group_obj[14]); group(current_selection); deselect(current_selection); } else { mark(13); current_selection=newselection("OBJECT"); select(current_selection,group_obj[13]); select(current_selection,group_obj[14]); group(current_selection); deselect(current_selection); } } if(pocket==1) { current_object=newobject("poly"); current_point=addpoint((x[83]-4)/2.54,(y[83]+2*tk)/2.54, "line"); current_point=addpoint((x[84]-4)/2.54,(y[83]+2*tk)/2.54, "line"); notch_type(current_point,"NOTCH",0); current_point=addpoint((x[84]-4+2)/2.54,(y[83]+2*tk)/2.54, "line"); notch_type(current_point,"NOTCH",0); current_point=addpoint((x[84]-4+4)/2.54,(y[83]+2*tk)/2.54, "line"); notch_type(current_point,"NOTCH",0); current_point=addpoint((x[85]-4+4)/2.54,(y[83]+2*tk)/2.54, "line"); current_point=addpoint((x[92]-4+4)/2.54,(y[92]+2*tk)/2.54, "line"); current_point=addpoint((x[94]-4+4)/2.54,(y[94]+2*tk)/2.54, "line"); current_point=addpoint((x[84]-4+4)/2.54,(y[94]+2*tk)/2.54, "line"); notch_type(current_point,"NOTCH",0); current_point=addpoint((x[84]-4+2)/2.54,(y[94]+2*tk)/2.54, "line"); notch_type(current_point,"NOTCH",0); current_point=addpoint((x[84]-4)/2.54,(y[94]+2*tk)/2.54, "line"); notch_type(current_point,"NOTCH",0); current_point=addpoint((x[93]-4)/2.54,(y[93]+2*tk)/2.54, "line"); current_point=addpoint((x[91]-4)/2.54,(y[91]+2*tk)/2.54, "line"); group_obj[13]=current_object; if (language == 0) { current_object=newobject("text","Pocket, cut 2",0.0,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[83]+1-4)/2.54, (y[83]+2*tk-1)/2.54, "line"); group_obj[14]=current_object; if(sv>0) { offset_mark(13); select(current_selection,group_obj[14]); group(current_selection); deselect(current_selection); } else { mark(13); current_selection=newselection("OBJECT"); select(current_selection,group_obj[13]); select(current_selection,group_obj[14]); group(current_selection); deselect(current_selection); } current_object=newobject("poly"); addpoint((x[79]+2-4)/2.54, (y[79]+2*tk+6)/2.54, "line"); addpoint((x[80]+2-4)/2.54, (y[80]+2*tk+6)/2.54, "line"); addpoint((x[85]+2-4)/2.54, (y[85]+2*tk+6)/2.54, "line"); addpoint((x[83]+2-4)/2.54, (y[83]+2*tk+6)/2.54, "line"); group_obj[99]=current_object; if (language == 0) { current_object=newobject("text","Pocket edging, cut 2",0.0,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[79]+1+0.2+2-4)/2.54, (y[79]+2*tk+6-1)/2.54, "line"); group_obj[100]=current_object; if(sv>0) { offset_mark(99); select(current_selection,group_obj[100]); group(current_selection); deselect(current_selection); } else { mark(99); current_selection=newselection("OBJECT"); select(current_selection,group_obj[99]); select(current_selection,group_obj[100]); group(current_selection); deselect(current_selection); } } if(pocket==2) { current_object=newobject("poly"); addpoint((x[79]-4)/2.54, (y[79]+2*tk)/2.54, "line"); addpoint((x[80]-4)/2.54, (y[80]+2*tk)/2.54, "line"); addpoint((x[92]-4)/2.54, (y[92]+4+2*tk)/2.54, "xarc_start"); addpoint((x[82]-4)/2.54, (y[82]+4+2*tk)/2.54, "xarc_corner"); addpoint((x[90]-4)/2.54, (y[90]+4+2*tk)/2.54, "line"); addpoint((x[88]-4)/2.54, (y[88]+4+2*tk)/2.54, "line"); addpoint((x[86]-4)/2.54, (y[86]+4+2*tk)/2.54, "line"); addpoint((x[87]-4)/2.54, (y[87]+4+2*tk)/2.54, "line"); addpoint((x[89]-4)/2.54, (y[89]+4+2*tk)/2.54, "xarc_start"); addpoint((x[81]-4)/2.54, (y[81]+4+2*tk)/2.54, "xarc_corner"); addpoint((x[91]-4)/2.54, (y[91]+4+2*tk)/2.54, "line"); group_obj[13]=current_object; if (language == 0) { current_object=newobject("text","Pocket, cut 2",0.0,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[79]+1-4)/2.54, (y[84]+4+2*tk-1)/2.54, "line"); group_obj[14]=current_object; if(sv>0) { offset_mark(13); select(current_selection,group_obj[14]); group(current_selection); deselect(current_selection); } else { mark(13); current_selection=newselection("OBJECT"); select(current_selection,group_obj[13]); select(current_selection,group_obj[14]); group(current_selection); deselect(current_selection); } } } if(model==3) { if(pocket==0) { current_object=newobject("poly"); addpoint((x[79]-2-4)/2.54, (y[79]+8+2*tk+5)/2.54, "line"); addpoint((x[80]-2-4)/2.54, (y[80]+8+2*tk+5)/2.54, "line"); addpoint((x[85]-2-4)/2.54, (y[85]+8+2*tk+5)/2.54, "line"); addpoint((x[121]-2-4)/2.54, (y[121]+8+2*tk+5)/2.54, "line"); addpoint((x[84]-2-4)/2.54, (y[85]+8+2*tk+5)/2.54, "line"); addpoint((x[120]-2-4)/2.54, (y[120]+8+2*tk+5)/2.54, "line"); addpoint((x[83]-2-4)/2.54, (y[83]+8+2*tk+5)/2.54, "line"); group_obj[15]=current_object; if (language == 0) { current_object=newobject("text","Pocket flap, cut 4",0.0,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[79]+1-2-4-0.2)/2.54, (y[79]+8+2*tk-1+5)/2.54, "line"); group_obj[16]=current_object; current_object=newobject("poly"); addpoint((x[120]-2-4)/2.54, (y[120]+1+2+8+2*tk+5)/2.54, "line"); current_point=addpoint((x[120]-2-4)/2.54, (y[120]+8+2+2*tk+5)/2.54, "line"); notch_type(current_point,"btn",0); addpoint((x[120]-2-4)/2.54, (y[120]-1+8+2+2*tk+5)/2.54, "open"); group_obj[17]=current_object; current_object=newobject("poly"); addpoint((x[121]-2-4)/2.54, (y[121]+1+2+8+2*tk+5)/2.54, "line"); current_point=addpoint((x[121]-2-4)/2.54, (y[121]+2+8+2*tk+5)/2.54, "line"); notch_type(current_point,"btn",0); addpoint((x[121]-2-4)/2.54, (y[121]-1+2+8+2*tk+5)/2.54, "open"); group_obj[18]=current_object; if(sv>0) { offset_mark(15); select(current_selection,group_obj[16]); select(current_selection,group_obj[17]); select(current_selection,group_obj[18]); group(current_selection); deselect(current_selection); } else { mark(15); current_selection=newselection("OBJECT"); select(current_selection,group_obj[15]); select(current_selection,group_obj[16]); select(current_selection,group_obj[17]); select(current_selection,group_obj[18]); group(current_selection); deselect(current_selection); } } else { current_object=newobject("poly"); addpoint((x[79]-2-4)/2.54, (y[79]+15+2*tk+5)/2.54, "line"); addpoint((x[80]-2-4)/2.54, (y[80]+15+2*tk+5)/2.54, "line"); addpoint((x[85]-2-4)/2.54, (y[85]+15+2*tk+5)/2.54, "xarc_start"); addpoint((x[123]-2-4)/2.54, (y[123]+15+2*tk+5)/2.54, "xarc_corner"); addpoint((x[84]-2-4)/2.54, (y[84]+15+2*tk+5)/2.54, "xarc_start"); addpoint((x[122]-2-4)/2.54, (y[122]+15+2*tk+5)/2.54, "xarc_corner"); addpoint((x[83]-2-4)/2.54, (y[83]+15+2*tk+5)/2.54, "line"); group_obj[15]=current_object; if (language == 0) { current_object=newobject("text","Pocket flap, cut 4",0.0,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[79]+1-2-4)/2.54, (y[80]+15+2*tk-1+5)/2.54, "line"); group_obj[16]=current_object; current_object=newobject("poly"); addpoint((x[84]-2-4)/2.54, (y[84]+2+0.1+15+2*tk+5)/2.54, "line"); current_point=addpoint((x[84]-2-4)/2.54, (y[84]+2+15+2*tk+5)/2.54, "line"); notch_type(current_point,"btn",0); addpoint((x[84]-2-4)/2.54, (y[84]+2-0.1+15+2*tk+5)/2.54, "open"); group_obj[17]=current_object; if(sv>0) { offset_mark(15); select(current_selection,group_obj[16]); select(current_selection,group_obj[17]); group(current_selection); deselect(current_selection); } else { mark(15); current_selection=newselection("OBJECT"); select(current_selection,group_obj[15]); select(current_selection,group_obj[16]); select(current_selection,group_obj[17]); group(current_selection); deselect(current_selection); } } } else { if(pocket==2) { current_object=newobject("poly"); addpoint((x[80]-4)/2.54, (y[80]+2+2*tk+5)/2.54, "line"); addpoint((x[85]-4)/2.54, (y[85]+2+2*tk+5)/2.54, "line"); addpoint((x[84]-4)/2.54, (y[85]+2+2*tk+5)/2.54, "line"); addpoint((x[83]-4)/2.54, (y[83]+2+2*tk+5)/2.54, "line"); addpoint((x[79]-4)/2.54, (y[79]+2+2*tk+5)/2.54, "open"); group_obj[15]=current_object; current_object=newobj_dot((x[80]-4)/2.54, (y[80]+2+2*tk+5)/2.54); addpoint((x[79]-4)/2.54, (y[79]+2+2*tk+5)/2.54, "open"); group_obj[9]=current_object; if (language == 0) { current_object=newobject("text","Pocket flap, cut 4",0.0,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[79]+1-4)/2.54, (y[79]+2+2*tk-1+5)/2.54, "line"); group_obj[16]=current_object; if(sv>0) { offset_mark(15); select(current_selection,group_obj[16]); select(current_selection,group_obj[9]); group(current_selection); deselect(current_selection); } else { mark(15); current_selection=newselection("OBJECT"); select(current_selection,group_obj[15]); select(current_selection,group_obj[16]); select(current_selection,group_obj[9]); group(current_selection); deselect(current_selection); } } } if(model==3) { if(pocket==0) { current_object=newobject("poly"); addpoint((x[79]-4)/2.54, (y[79]-2)/2.54, "line"); addpoint((x[80]-4)/2.54, (y[80]-2)/2.54, "line"); addpoint((x[92]-4)/2.54, (y[92]-2)/2.54, "xarc_start"); addpoint((x[82]-4)/2.54, (y[82]-2)/2.54, "xarc_corner"); addpoint((x[90]-4)/2.54, (y[90]-2)/2.54, "line"); addpoint((x[89]-4)/2.54, (y[89]-2)/2.54, "xarc_start"); addpoint((x[81]-4)/2.54, (y[81]-2)/2.54, "xarc_corner"); addpoint((x[91]-4)/2.54, (y[91]-2)/2.54, "line"); group_obj[95]=current_object; current_object=newobject("poly"); addpoint((x[79]-4)/2.54, (y[79]-2)/2.54, "line"); addpoint((x[80]-4)/2.54, (y[80]-2)/2.54, "line"); addpoint((x[85]-4)/2.54, (y[85]-2)/2.54, "line"); addpoint((x[121]-4)/2.54, (y[121]-2)/2.54, "line"); addpoint((x[84]-4)/2.54, (y[85]-2)/2.54, "line"); addpoint((x[120]-4)/2.54, (y[120]-2)/2.54, "line"); addpoint((x[83]-4)/2.54, (y[83]-2)/2.54, "line"); group_obj[96]=current_object; current_object=newobject("poly"); addpoint((x[120]-4)/2.54, (y[120])/2.54, "line"); current_point=addpoint((x[120]-4)/2.54, (y[120])/2.54, "line"); notch_type(current_point,"btn",0); addpoint((x[120]-4)/2.54, (y[120])/2.54, "open"); group_obj[97]=current_object; current_object=newobject("poly"); addpoint((x[121]-4)/2.54, (y[121])/2.54, "line"); current_point=addpoint((x[121]-4)/2.54, (y[121])/2.54, "line"); notch_type(current_point,"btn",0); addpoint((x[121]-4)/2.54, (y[121])/2.54, "open"); group_obj[98]=current_object; } else { current_object=newobject("poly"); addpoint((x[82]-4)/2.54, (y[82]-2)/2.54, "line"); addpoint((x[86]-4)/2.54, (y[86]-2)/2.54, "line"); addpoint((x[81]-4)/2.54, (y[81]-2)/2.54, "line"); addpoint((x[79]-4)/2.54, (y[79]-2)/2.54, "line"); addpoint((x[80]-4)/2.54, (y[80]-2)/2.54, "line"); group_obj[95]=current_object; current_object=newobject("poly"); addpoint((x[79]-4)/2.54, (y[79]-2)/2.54, "line"); addpoint((x[80]-4)/2.54, (y[80]-2)/2.54, "line"); addpoint((x[85]-4)/2.54, (y[85]-2)/2.54, "xarc_start"); addpoint((x[123]-4)/2.54, (y[123]-2)/2.54, "xarc_corner"); addpoint((x[84]-4)/2.54, (y[84]-2)/2.54, "xarc_start"); addpoint((x[122]-4)/2.54, (y[122]-2)/2.54, "xarc_corner"); addpoint((x[83]-4)/2.54, (y[83]-2)/2.54, "line"); group_obj[96]=current_object; current_object=newobject("poly"); addpoint((x[84]-4)/2.54, (y[84])/2.54, "line"); current_point=addpoint((x[84]-4)/2.54, (y[84])/2.54, "line"); notch_type(current_point,"btn",0); addpoint((x[84]-4)/2.54, (y[84])/2.54, "open"); group_obj[97]=current_object; } } if(model<3) { if(pocket==0) { current_object=newobject("poly"); addpoint((x[79]-4)/2.54, (y[79])/2.54, "line"); addpoint((x[80]-4)/2.54, (y[80])/2.54, "line"); addpoint((x[92]-4)/2.54, (y[92])/2.54, "line"); addpoint((x[94]-4)/2.54, (y[94])/2.54, "line"); addpoint((x[93]-4)/2.54, (y[93])/2.54, "line"); addpoint((x[91]-4)/2.54, (y[91])/2.54, "line"); group_obj[95]=current_object; } if(pocket==1) { current_object=newobject("poly"); addpoint((x[83]-4)/2.54, (y[83])/2.54, "line"); addpoint((x[85]-4)/2.54, (y[85])/2.54, "line"); addpoint((x[92]-4)/2.54, (y[92])/2.54, "line"); addpoint((x[94]-4)/2.54, (y[94])/2.54, "line"); addpoint((x[93]-4)/2.54, (y[93])/2.54, "line"); addpoint((x[91]-4)/2.54, (y[91])/2.54, "line"); group_obj[95]=current_object; current_object=newobject("poly"); addpoint((x[79]-4)/2.54, (y[79])/2.54, "line"); addpoint((x[80]-4)/2.54, (y[80])/2.54, "line"); addpoint((x[85]-4)/2.54, (y[85])/2.54, "line"); addpoint((x[83]-4)/2.54, (y[83])/2.54, "line"); group_obj[96]=current_object; } if(pocket==2) { current_object=newobject("poly"); addpoint((x[79]-4)/2.54, (y[79])/2.54, "line"); addpoint((x[80]-4)/2.54, (y[80])/2.54, "line"); addpoint((x[92]-4)/2.54, (y[92]+4)/2.54, "xarc_start"); addpoint((x[82]-4)/2.54, (y[82]+4)/2.54, "xarc_corner"); addpoint((x[90]-4)/2.54, (y[90]+4)/2.54, "line"); addpoint((x[88]-4)/2.54, (y[88]+4)/2.54, "line"); addpoint((x[86]-4)/2.54, (y[86]+4)/2.54, "line"); addpoint((x[87]-4)/2.54, (y[87]+4)/2.54, "line"); addpoint((x[89]-4)/2.54, (y[89]+4)/2.54, "xarc_start"); addpoint((x[81]-4)/2.54, (y[81]+4)/2.54, "xarc_corner"); addpoint((x[91]-4)/2.54, (y[91]+4)/2.54, "line"); group_obj[95]=current_object; current_object=newobject("poly"); addpoint((x[79]-4)/2.54, (y[79])/2.54, "line"); addpoint((x[80]-4)/2.54, (y[80])/2.54, "line"); addpoint((x[85]-4)/2.54, (y[85])/2.54, "line"); addpoint((x[84]-4)/2.54, (y[85])/2.54, "line"); addpoint((x[83]-4)/2.54, (y[83])/2.54, "line"); group_obj[96]=current_object; } } if(model==2) { current_object=newobject("poly"); addpoint((x[28]-4)/2.54, (y[28])/2.54, "LINE"); addpoint((x[29]-4)/2.54, (y[29])/2.54, "LINE"); addpoint((x[30]-4)/2.54, (y[30])/2.54, "LINE"); addpoint((x[27]-4+nv)/2.54, (y[30]+3)/2.54, "LINE"); addpoint((x[27]-4+nv)/2.54, (y[29])/2.54, "LINE"); addpoint((x[27]-4+nv)/2.54, (y[27])/2.54, "LINE"); addpoint((x[27]-4)/2.54, (y[27])/2.54, "LINE"); group_obj[111]=current_object; current_object=newobject("poly"); addpoint((x[30]-14)/2.54, (y[30])/2.54, "LINE"); addpoint((x[27]+nv-14)/2.54, (y[30]+3)/2.54, "line"); addpoint((x[27]+nv-14)/2.54, (y[29])/2.54, "LINE"); addpoint((x[27]+nv-14)/2.54, (y[27])/2.54, "line"); addpoint((x[27]-14)/2.54, (y[27])/2.54, "line"); addpoint((x[28]-14)/2.54, (y[28])/2.54, "open"); group_obj[48]=current_object; current_object=newobj_dot((x[30]-14)/2.54, (y[30])/2.54); addpoint((x[28]-14)/2.54, (y[28])/2.54, "open"); group_obj[11]=current_object; if (language == 0) { current_object=newobject("text","Hidden button extension, cut 1 on fold",-1.570796,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[28]+0.2-14)/2.54, (y[27]-3)/2.54, "line"); group_obj[50]=current_object; if(sv>0) { offset_mark(48); select(current_selection,group_obj[11]); select(current_selection,group_obj[50]); group(current_selection); deselect(current_selection); } else { mark(48); current_selection=newselection("OBJECT"); select(current_selection,group_obj[48]); select(current_selection,group_obj[11]); select(current_selection,group_obj[50]); group(current_selection); deselect(current_selection); } } if (language == 0) { current_object=newobject("text","1 Center Front Piece, cut 2",-1.570796,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[27]-2+0.2)/2.54, (y[27]-3)/2.54, "line"); group_obj[34]=current_object; if(model==0) { if (language == 0) { current_object=newobject("text","Button extension CF, cut 2",-1.570796,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[27]-10+0.2)/2.54, (y[27]-3)/2.54, "LINE"); group_obj[35]=current_object; if (language == 0) { current_object=newobject("text","Button extension Foldline",-1.570796,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[27]-nv-10+0.2)/2.54, (y[27]-3)/2.54, "line"); group_obj[45]=current_object; } else { if (language == 0) { current_object=newobject("text","Center Front",-1.570796,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[27]-4+0.2)/2.54, (y[27]-3)/2.54, "line"); group_obj[35]=current_object; if (language == 0) { current_object=newobject("text","Button extension Foldline",-1.570796,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[27]-4-nv+0.2)/2.54, (y[27]-3)/2.54, "line"); group_obj[45]=current_object; } if(model>0) { current_object=newobject("poly"); addpoint((x[17]-4)/2.54, y[17]/2.54, "LINE"); current_point=addpoint((x[18]-4)/2.54, y[18]/2.54, "LINE"); notch_type(current_point,"NOTCH",1); addpoint((x[15]-4)/2.54, y[15]/2.54, "XARC_START"); addpoint((x[20]-4)/2.54, y[20]/2.54, "XARC_CORNER"); addpoint((x[21]-4)/2.54, y[21]/2.54, "LINE"); if(model==3) { addpoint((x[115]-4)/2.54, y[115]/2.54, "LINE"); addpoint((x[116]-4)/2.54, y[116]/2.54, "line"); } else { addpoint((x[25]-4)/2.54, y[25]/2.54, "LINE"); addpoint((x[24]-4)/2.54, y[24]/2.54, "XARC_START"); addpoint((x[26]-4)/2.54, y[26]/2.54, "XARC_CORNER"); } addpoint((x[27]-4)/2.54, y[27]/2.54, "LINE"); addpoint((x[28]-4)/2.54, y[28]/2.54, "LINE"); addpoint((x[28]-4-2*nv)/2.54, (y[28])/2.54, "LINE"); addpoint((x[29]-4-2*nv)/2.54, y[29]/2.54, "LINE"); addpoint((x[30]-4-2*nv)/2.54, y[30]/2.54, "LINE"); addpoint((x[31]-4-2*nv)/2.54, (y[31])/2.54, "LINE"); addpoint((x[31]-4)/2.54, (y[31])/2.54, "LINE"); addpoint((x[32]-4)/2.54, y[32]/2.54, "LINE"); group_obj[36]=current_object; current_object=newobject("poly"); addpoint((x[27]-4)/2.54, (y[27])/2.54, "LINE"); current_point=addpoint((x[27]-4)/2.54, (y[27]-2)/2.54, "LINE"); notch_type(current_point,"BTN",0); current_point=addpoint((x[27]-4)/2.54, (y[27]-11)/2.54, "LINE"); notch_type(current_point,"BTN",0); current_point=addpoint((x[27]-4)/2.54, (y[27]-20)/2.54, "LINE"); notch_type(current_point,"BTN",0); current_point=addpoint((x[27]-4)/2.54, (y[27]-29)/2.54, "LINE"); notch_type(current_point,"BTN",0); current_point=addpoint((x[27]-4)/2.54, (y[27]-38)/2.54, "LINE"); notch_type(current_point,"BTN",0); current_point=addpoint((x[27]-4)/2.54, (y[27]-47)/2.54, "LINE"); notch_type(current_point,"BTN",0); addpoint((x[27]-4)/2.54, (y[32])/2.54, "LINE"); group_obj[43]=current_object; current_object=newobject("poly"); addpoint((x[27]-4-nv)/2.54, (y[27])/2.54, "LINE"); addpoint((x[27]-4-nv)/2.54, (y[31])/2.54, "LINE"); group_obj[44]=current_object; if(sv>0) { offset_mark(36); select(current_selection,group_obj[43]); select(current_selection,group_obj[44]); select(current_selection,group_obj[45]); select(current_selection,group_obj[34]); select(current_selection,group_obj[35]); if(model==2) { select(current_selection,group_obj[111]); } select(current_selection,group_obj[95]); if(model==3) { select(current_selection,group_obj[96]); select(current_selection,group_obj[97]); if(pocket==0) { select(current_selection,group_obj[98]); } } if(model<3) { if((pocket==1)||(pocket==2)) { select(current_selection,group_obj[96]); } } group(current_selection); deselect(current_selection); } else { mark(36); current_selection=newselection("OBJECT"); select(current_selection,group_obj[36]); select(current_selection,group_obj[43]); select(current_selection,group_obj[44]); select(current_selection,group_obj[45]); select(current_selection,group_obj[34]); select(current_selection,group_obj[35]); if(model==2) { select(current_selection,group_obj[111]); } select(current_selection,group_obj[95]); if(model==3) { select(current_selection,group_obj[96]); select(current_selection,group_obj[97]); if(pocket==0) { select(current_selection,group_obj[98]); } } if(model<3) { if((pocket==1)||(pocket==2)) { select(current_selection,group_obj[96]); } } group(current_selection); deselect(current_selection); } } if(model==3) { current_object=newobject("poly"); addpoint((x[27]-4+nv)/2.54, (y[27]+4)/2.54, "xarc_start"); addpoint((x[26]-4)/2.54, (y[27]+4)/2.54, "xarc_corner"); addpoint((x[24]-4)/2.54, (y[24]+4)/2.54, "line"); addpoint((x[25]-4)/2.54, (y[25]+4)/2.54, "LINE"); addpoint((x[115]-4)/2.54, (y[115]+4)/2.54, "LINE"); addpoint((x[116]-4)/2.54, (y[116]+4)/2.54, "line"); addpoint((x[27]-4)/2.54, (y[27]+4)/2.54, "LINE"); group_obj[38]=current_object; if (language == 0) { current_object=newobject("text","Front yoke, cut 2",0.0,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[24]+2)/2.54, (y[25]+4)/2.54, "line"); group_obj[39]=current_object; if(sv>0) { offset_mark(38); select(current_selection,group_obj[39]); group(current_selection); deselect(current_selection); } else { mark(38); current_selection=newselection("OBJECT"); select(current_selection,group_obj[38]); select(current_selection,group_obj[39]); group(current_selection); deselect(current_selection); } } if(model==0) { current_object=newobject("poly"); addpoint((x[17]-4)/2.54, y[17]/2.54, "LINE"); current_point=addpoint((x[18]-4)/2.54, y[18]/2.54, "LINE"); notch_type(current_point,"NOTCH",1); addpoint((x[15]-4)/2.54, y[15]/2.54, "XARC_START"); addpoint((x[20]-4)/2.54, y[20]/2.54, "XARC_CORNER"); addpoint((x[21]-4)/2.54, y[21]/2.54, "LINE"); addpoint((x[25]-4)/2.54, y[25]/2.54, "LINE"); addpoint((x[24]-4)/2.54, y[24]/2.54, "XARC_START"); addpoint((x[26]-4)/2.54, y[26]/2.54, "XARC_CORNER"); addpoint((x[28]+2*nv-4)/2.54, y[28]/2.54, "LINE"); addpoint((x[29]+2*nv-4)/2.54, y[29]/2.54, "LINE"); addpoint((x[30]+2*nv-4)/2.54, y[30]/2.54, "LINE"); addpoint((x[31]+2*nv-4)/2.54, (y[31])/2.54, "LINE"); addpoint((x[32]+2*nv-4)/2.54, y[32]/2.54, "LINE"); group_obj[40]=current_object; if(sv>0) { offset_mark(40); select(current_selection,group_obj[95]); select(current_selection,group_obj[34]); if((pocket==1)||(pocket==2)) { select(current_selection,group_obj[96]); } group(current_selection); deselect(current_selection); } else { mark(40); current_selection=newselection("OBJECT"); select(current_selection,group_obj[40]); select(current_selection,group_obj[34]); select(current_selection,group_obj[95]); if((pocket==1)||(pocket==2)) { select(current_selection,group_obj[96]); } group(current_selection); deselect(current_selection); } } if(model==0) { current_object=newobject("poly"); addpoint((x[27]-10+nv)/2.54, (y[27])/2.54, "LINE"); addpoint((x[27]-10)/2.54, y[27]/2.54, "LINE"); addpoint((x[28]-10)/2.54, y[28]/2.54, "LINE"); addpoint((x[28]-10-2*nv)/2.54, (y[28])/2.54, "LINE"); addpoint((x[29]-10-2*nv)/2.54, y[29]/2.54, "LINE"); addpoint((x[30]-10-2*nv)/2.54, y[30]/2.54, "LINE"); addpoint((x[31]-10-2*nv)/2.54, (y[31])/2.54, "LINE"); addpoint((x[31]-10)/2.54, (y[31])/2.54, "LINE"); addpoint((x[32]-10)/2.54, y[32]/2.54, "LINE"); addpoint((x[32]+nv-10)/2.54, y[32]/2.54, "LINE"); group_obj[42]=current_object; current_object=newobject("poly"); addpoint((x[27]-10)/2.54, (y[27])/2.54, "LINE"); current_point=addpoint((x[27]-10)/2.54, (y[27]-2)/2.54, "LINE"); notch_type(current_point,"BTN",0); current_point=addpoint((x[27]-10)/2.54, (y[27]-11)/2.54, "LINE"); notch_type(current_point,"BTN",0); current_point=addpoint((x[27]-10)/2.54, (y[27]-20)/2.54, "LINE"); notch_type(current_point,"BTN",0); current_point=addpoint((x[27]-10)/2.54, (y[27]-29)/2.54, "LINE"); notch_type(current_point,"BTN",0); current_point=addpoint((x[27]-10)/2.54, (y[27]-38)/2.54, "LINE"); notch_type(current_point,"BTN",0); current_point=addpoint((x[27]-10)/2.54, (y[27]-47)/2.54, "LINE"); notch_type(current_point,"BTN",0); addpoint((x[27]-10)/2.54, (y[32])/2.54, "LINE"); group_obj[43]=current_object; current_object=newobject("poly"); addpoint((x[27]-10-nv)/2.54, (y[27])/2.54, "LINE"); addpoint((x[27]-10-nv)/2.54, (y[31])/2.54, "LINE"); group_obj[44]=current_object; if(sv>0) { offset_mark(42); select(current_selection,group_obj[43]); select(current_selection,group_obj[44]); select(current_selection,group_obj[45]); select(current_selection,group_obj[35]); group(current_selection); deselect(current_selection); } else { mark(42); current_selection=newselection("OBJECT"); select(current_selection,group_obj[42]); select(current_selection,group_obj[43]); select(current_selection,group_obj[44]); select(current_selection,group_obj[45]); select(current_selection,group_obj[35]); group(current_selection); deselect(current_selection); } } current_object=newobject("poly"); addpoint(x[35]/2.54, y[35]/2.54, "LINE"); if(short_sleeve_cuff>0) { addpoint(x[34]/2.54, (y[34]+3)/2.54, "open"); } else { addpoint(x[34]/2.54, y[34]/2.54, "open"); } group_obj[47]=current_object; if (language == 0) { current_object=newobject("text","Sleeve grainline, shoulder, cut 2",-1.570796,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[35]+0.2)/2.54, (y[35]-0.5)/2.54, "line"); group_obj[48]=current_object; if (language == 0) { current_object=newobject("text","Front",0.0,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[38]+1)/2.54, (y[38]-1)/2.54, "line"); group_obj[107]=current_object; if (language == 0) { current_object=newobject("text","Back.",0.0,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[37]-3)/2.54, (y[37]-1)/2.54, "line"); group_obj[108]=current_object; if(short_sleeve_cuff==2) { current_object=newobject("poly"); addpoint((x[34]-2-0.1)/2.54, (y[34]+2)/2.54, "LINE"); current_point=addpoint((x[34]-2)/2.54, (y[34]+2)/2.54, "LINE"); notch_type(current_point,"BTN",1); addpoint((x[34]-2+0.1)/2.54, (y[34]+2)/2.54, "open"); group_obj[61]=current_object; current_object=newobject("poly"); addpoint((x[34]+2-0.1)/2.54, (y[34]+2)/2.54, "LINE"); current_point=addpoint((x[34]+2)/2.54, (y[34]+2)/2.54, "LINE"); notch_type(current_point,"BTN",1); addpoint((x[34]+2+0.1)/2.54, (y[34]+2)/2.54, "open"); group_obj[62]=current_object; } if(sleeve_length==0) { current_object=newobject("poly"); addpoint((x[34]+8)/2.54, y[34]/2.54, "LINE"); addpoint((x[34]+8)/2.54, (y[34]+10)/2.54, "open"); group_obj[49]=current_object; } if(sleeve_length==0) { current_object=newobject("poly"); addpoint((x[34]+6)/2.54, (y[34]+1)/2.54, "line"); addpoint((x[34]+2)/2.54, (y[34]+1)/2.54, "open"); group_obj[50]=current_object; if (language == 0) { current_object=newobject("text","Fold",0.0,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[34]+3)/2.54, (y[34]+1+0.3)/2.54, "line"); group_obj[51]=current_object; current_object=newobject("poly"); addpoint((x[34]+3)/2.54, (y[34]+2)/2.54, "line"); addpoint((x[34]+2)/2.54, (y[34]+1)/2.54, "line"); addpoint((x[34]+3)/2.54, (y[34])/2.54, "open"); group_obj[52]=current_object; current_object=newobject("poly"); addpoint((x[34]+2)/2.54, (y[34]+1)/2.54, "line"); addpoint((x[34]-2)/2.54, (y[34]+1)/2.54, "open"); group_obj[53]=current_object; if (language == 0) { current_object=newobject("text","Fold",0.0,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[34]-1)/2.54, (y[34]+1+0.3)/2.54, "line"); group_obj[54]=current_object; current_object=newobject("poly"); addpoint((x[34]-1)/2.54, (y[34]+2)/2.54, "line"); addpoint((x[34]-2)/2.54, (y[34]+1)/2.54, "line"); addpoint((x[34]-1)/2.54, (y[34])/2.54, "open"); group_obj[55]=current_object; } current_object=newobject("poly"); if(sleeve_length==0) { addpoint((x[34]-2)/2.54, y[34]/2.54, "LINE"); addpoint(x[34]/2.54, y[34]/2.54, "LINE"); addpoint((x[34]+2)/2.54, y[34]/2.54, "LINE"); addpoint((x[34]+6)/2.54, y[34]/2.54, "LINE"); } addpoint(x[42]/2.54, y[42]/2.54, "LINE"); addpoint(x[37]/2.54, y[37]/2.54, "xarc_start"); addpoint(x[49]/2.54, y[49]/2.54, "xarc_corner"); addpoint(x[40]/2.54, y[40]/2.54, "xarc_start"); addpoint(x[48]/2.54, y[48]/2.54, "xarc_corner"); addpoint(x[35]/2.54, y[35]/2.54, "xarc_start"); addpoint(x[50]/2.54, y[50]/2.54, "xarc_corner"); addpoint(x[41]/2.54, y[41]/2.54, "xarc_start"); addpoint(x[51]/2.54, y[51]/2.54, "xarc_corner"); addpoint(x[38]/2.54, y[38]/2.54, "LINE"); addpoint(x[44]/2.54, y[44]/2.54, "LINE"); if(sleeve_length==1) { if(short_sleeve_cuff==0) { cont(38,44,44,-5); cont(37,42,42,-5); addpoint((x[44])/2.54, (y[44]-9)/2.54, "LINE"); addpoint((x[42])/2.54, (y[42]-9)/2.54, "LINE"); } if(short_sleeve_cuff>0) { addpoint((x[34]-2)/2.54, y[34]/2.54, "LINE"); addpoint(x[34]/2.54, (y[34]+3)/2.54, "LINE"); addpoint((x[34]+2)/2.54, y[34]/2.54, "LINE"); } } group_obj[56]=current_object; if(sv>0) { offset_mark(56); select(current_selection,group_obj[47]); select(current_selection,group_obj[48]); if(sleeve_length==0) { select(current_selection,group_obj[49]); select(current_selection,group_obj[50]); select(current_selection,group_obj[51]); select(current_selection,group_obj[52]); select(current_selection,group_obj[53]); group_obj[53]=current_object; select(current_selection,group_obj[54]); select(current_selection,group_obj[55]); } if(short_sleeve_cuff==2) { select(current_selection,group_obj[61]); select(current_selection,group_obj[62]); } select(current_selection,group_obj[107]); select(current_selection,group_obj[108]); group(current_selection); deselect(current_selection); } else { mark(56); current_selection=newselection("OBJECT"); select(current_selection,group_obj[56]); select(current_selection,group_obj[47]); select(current_selection,group_obj[48]); if(sleeve_length==0) { select(current_selection,group_obj[49]); select(current_selection,group_obj[50]); select(current_selection,group_obj[51]); select(current_selection,group_obj[52]); select(current_selection,group_obj[53]); group_obj[53]=current_object; select(current_selection,group_obj[54]); select(current_selection,group_obj[55]); } if(short_sleeve_cuff==2) { select(current_selection,group_obj[61]); select(current_selection,group_obj[62]); } select(current_selection,group_obj[107]); select(current_selection,group_obj[108]); group(current_selection); deselect(current_selection); } if((sleeve_length==1)&&(short_sleeve_cuff>0)) { current_object=newobject("poly"); addpoint((x[42])/2.54, (y[42]-6)/2.54, "LINE"); addpoint((x[34]+2)/2.54, (y[34]-6)/2.54, "LINE"); addpoint((x[34])/2.54, (y[34]-2-6)/2.54, "LINE"); addpoint((x[34]-2)/2.54, (y[34]-6)/2.54, "LINE"); addpoint(x[44]/2.54, (y[44]-6)/2.54, "LINE"); cont(38,44,44,-5); addpoint((x[44])/2.54, (y[44]-9-6)/2.54, "LINE"); cont(37,42,42,-5); addpoint((x[42])/2.54, (y[42]-9-6)/2.54, "LINE"); group_obj[59]=current_object; if (language == 0) { current_object=newobject("text","Sleeve facing, cut 2",0.0,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[34]+2)/2.54, (y[34]-8)/2.54, "line"); group_obj[60]=current_object; if(sv>0) { offset_mark(59); select(current_selection,group_obj[60]); group(current_selection); deselect(current_selection); } else { mark(59); current_selection=newselection("OBJECT"); select(current_selection,group_obj[59]); select(current_selection,group_obj[60]); group(current_selection); deselect(current_selection); } } current_object=newobject("poly"); addpoint(x[64]/2.54, y[64]/2.54, "xarc_start"); addpoint(x[65]/2.54, y[65]/2.54, "xarc_corner"); addpoint(x[63]/2.54, y[63]/2.54, "line"); current_point=addpoint(x[61]/2.54, y[61]/2.54, "line"); notch_type(current_point,"NOTCH",0); addpoint(x[66]/2.54, y[66]/2.54, "line"); addpoint(x[67]/2.54, y[67]/2.54, "line"); addpoint(x[70]/2.54, y[70]/2.54, "xarc_start"); addpoint(x[69]/2.54, y[69]/2.54, "xarc_corner"); addpoint(x[68]/2.54, y[68]/2.54, "open"); group_obj[86]=current_object; current_object=newobj_dot(x[64]/2.54, y[64]/2.54); addpoint(x[68]/2.54, y[68]/2.54, "open"); group_obj[87]=current_object; if (language == 0) { current_object=newobject("text","Collar stand, cut 2 on fold",0.0,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[63])/2.54, (y[65])/2.54, "line"); group_obj[89]=current_object; current_object=newobject("poly"); addpoint((x[61]-0.3)/2.54, (y[61]+0.5*dist(61,70))/2.54, "line"); current_point=addpoint((x[61])/2.54, (y[61]+0.5*dist(61,70))/2.54, "line"); notch_type(current_point,"btn",0); addpoint((x[61]+1.1)/2.54, (y[61]+0.5*dist(61,70))/2.54, "open"); group_obj[90]=current_object; if(sv>0) { offset_mark(86); select(current_selection,group_obj[87]); select(current_selection,group_obj[89]); select(current_selection,group_obj[90]); group(current_selection); deselect(current_selection); } else { mark(86); current_selection=newselection("OBJECT"); select(current_selection,group_obj[86]); select(current_selection,group_obj[87]); select(current_selection,group_obj[89]); select(current_selection,group_obj[90]); group(current_selection); deselect(current_selection); } current_object=newobject("poly"); addpoint(x[71]/2.54, (y[71]+4)/2.54, "xarc_start"); addpoint(x[72]/2.54, (y[72]+4)/2.54, "xarc_corner"); if(collar==0) { addpoint(x[70]/2.54, (y[70]+4)/2.54, "LINE"); addpoint(x[75]/2.54, (y[75]+4)/2.54, "xarc_start"); addpoint(x[74]/2.54, (y[74]+4)/2.54, "xarc_corner"); } else { addpoint(x[70]/2.54, (y[70]+4)/2.54, "LINE"); addpoint(x[78]/2.54, (y[78]+4)/2.54, "xarc_start"); addpoint(x[75]/2.54, (y[75]+4)/2.54, "xarc_corner"); addpoint(x[77]/2.54, (y[77]+4)/2.54, "xarc_start"); addpoint(x[74]/2.54, (y[74]+4)/2.54, "xarc_corner"); } addpoint(x[76]/2.54, (y[76]+4)/2.54, "LINE"); addpoint(x[73]/2.54, (y[73]+4)/2.54, "open"); group_obj[91]=current_object; current_object=newobj_dot(x[71]/2.54, (y[71]+4)/2.54); addpoint(x[73]/2.54, (y[73]+4)/2.54, "open"); group_obj[92]=current_object; if (language == 0) { current_object=newobject("text","Collar, cut 2 on fold",0.0,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[63])/2.54, (y[72]+4)/2.54, "line"); group_obj[93]=current_object; if(sv>0) { offset_mark(91); select(current_selection,group_obj[92]); select(current_selection,group_obj[93]); group(current_selection); deselect(current_selection); } else { mark(91); current_selection=newselection("OBJECT"); select(current_selection,group_obj[91]); select(current_selection,group_obj[92]); select(current_selection,group_obj[93]); group(current_selection); deselect(current_selection); } if(sleeve_length==0) { if(long_sleeve_cuff==1) { siirtoy=2; current_object=newobject("poly"); addpoint((x[109])/2.54, (y[109]+0.1+siirtoy)/2.54, "line"); current_point=addpoint((x[109])/2.54, (y[109]+siirtoy)/2.54, "line"); notch_type(current_point,"BTN",0); addpoint((x[109])/2.54, (y[109]-0.1+siirtoy)/2.54, "open"); group_obj[75]=current_object; current_object=newobject("poly"); addpoint((x[110]+0.3)/2.54, (y[110]+siirtoy)/2.54, "line"); addpoint((x[110]-1.1)/2.54, (y[110]+siirtoy)/2.54, "open"); group_obj[76]=current_object; siirtoy=-2; current_object=newobject("poly"); addpoint((x[109])/2.54, (y[109]+0.1+siirtoy)/2.54, "line"); current_point=addpoint((x[109])/2.54, (y[109]+siirtoy)/2.54, "line"); notch_type(current_point,"BTN",0); addpoint((x[109])/2.54, (y[109]-0.1+siirtoy)/2.54, "open"); group_obj[77]=current_object; current_object=newobject("poly"); addpoint((x[110]+0.3)/2.54, (y[110]+siirtoy)/2.54, "line"); addpoint((x[110]-1.1)/2.54, (y[110]+siirtoy)/2.54, "open"); group_obj[78]=current_object; siirtoy=0; } else { current_object=newobject("poly"); addpoint((x[109])/2.54, (y[109]+0.1)/2.54, "line"); current_point=addpoint((x[109])/2.54, (y[109])/2.54, "line"); notch_type(current_point,"BTN",0); addpoint((x[109])/2.54, (y[109]-0.1)/2.54, "open"); group_obj[75]=current_object; current_object=newobject("poly"); addpoint((x[110]+0.3)/2.54, (y[110])/2.54, "line"); addpoint((x[110]-1.1)/2.54, (y[110])/2.54, "open"); group_obj[76]=current_object; } if (language == 0) { current_object=newobject("text","Sleeve cuff, cut 4",0.0,0.2,0.2,"SIMP.CHR","USELAYERCOLOR","NONE","SOLID_LINE",0); } addpoint((x[99]+2+0.2)/2.54, (y[99]-1)/2.54, "line"); group_obj[70]=current_object; if(long_sleeve_cuff==0) { current_object=newobject("poly"); addpoint((x[99])/2.54, (y[99])/2.54, "line"); current_point=addpoint((x[107])/2.54, (y[107])/2.54, "line"); notch_type(current_point,"NOTCH",0); current_point=addpoint((x[108])/2.54, (y[108])/2.54, "line"); notch_type(current_point,"NOTCH",0); addpoint((x[100])/2.54, (y[100])/2.54, "line"); addpoint((x[101])/2.54, (y[101])/2.54, "xarc_start"); addpoint((x[102])/2.54, (y[102])/2.54, "xarc_corner"); current_point=addpoint((x[103])/2.54, (y[103])/2.54, "line"); notch_type(current_point,"NOTCH",0); current_point=addpoint((x[104])/2.54, (y[104])/2.54, "xarc_start"); notch_type(current_point,"NOTCH",0); addpoint((x[105])/2.54, (y[105])/2.54, "xarc_corner"); addpoint((x[106])/2.54, (y[106])/2.54, "line"); group_obj[69]=current_object; } else { if(long_sleeve_cuff==1) { current_object=newobject("poly"); addpoint((x[99])/2.54, (y[99])/2.54, "line"); current_point=addpoint((x[107])/2.54, (y[107])/2.54, "line"); notch_type(current_point,"NOTCH",0); current_point=addpoint((x[108])/2.54, (y[108])/2.54, "line"); notch_type(current_point,"NOTCH",0); addpoint((x[100])/2.54, (y[100])/2.54, "line"); addpoint((x[101])/2.54, (y[101])/2.54, "line"); addpoint((x[102])/2.54, (y[102])/2.54, "line"); current_point=addpoint((x[103])/2.54, (y[103])/2.54, "line"); notch_type(current_point,"NOTCH",0); current_point=addpoint((x[104])/2.54, (y[104])/2.54, "line"); notch_type(current_point,"NOTCH",0); addpoint((x[105])/2.54, (y[105])/2.54, "line"); addpoint((x[106])/2.54, (y[106])/2.54, "line"); group_obj[69]=current_object; } else { current_object=newobject("poly"); addpoint((x[99])/2.54, (y[99])/2.54, "line"); current_point=addpoint((x[107])/2.54, (y[107])/2.54, "line"); notch_type(current_point,"NOTCH",0); current_point=addpoint((x[108])/2.54, (y[108])/2.54, "line"); notch_type(current_point,"NOTCH",0); addpoint((x[100])/2.54, (y[100])/2.54, "line"); addpoint((x[101])/2.54, (y[101])/2.54, "line"); current_point=addpoint((x[103])/2.54, (y[103])/2.54, "line"); notch_type(current_point,"NOTCH",0); current_point=addpoint((x[104])/2.54, (y[104])/2.54, "line"); notch_type(current_point,"NOTCH",0); addpoint((x[106])/2.54, (y[106])/2.54, "line"); group_obj[69]=current_object; } } if(sv>0) { offset_mark(69); select(current_selection,group_obj[70]); if(long_sleeve_cuff==1) { select(current_selection,group_obj[77]); select(current_selection,group_obj[78]); } select(current_selection,group_obj[75]); select(current_selection,group_obj[76]); group(current_selection); deselect(current_selection); } else { mark(69); current_selection=newselection("OBJECT"); select(current_selection,group_obj[69]); select(current_selection,group_obj[70]); if(long_sleeve_cuff==1) { select(current_selection,group_obj[77]); select(current_selection,group_obj[78]); } select(current_selection,group_obj[75]); select(current_selection,group_obj[76]); group(current_selection); deselect(current_selection); } } current_selection=newselection("OBJECT"); for (loop = 0; loop < 20; loop = loop + 1) { if (marker_array[loop] != 0) { select(current_selection, marker_array[loop]); } } check_overlap(current_selection); if (is_function("origin_arrange")==1) { origin_arrange(current_selection); } deselect(current_selection); if (is_function("set_marker")==1) { for (loop = 0; loop < 20; loop = loop + 1) { if (marker_array[loop] != 0) { set_marker(marker_array[loop], 0); } } } run_command("zoomall"); } newobj_dot(double x, double y) { object temp; line("CENTER_LINE"); temp = newobject("poly"); addpoint(x, y, "line"); line("SOLID_LINE"); return temp; } coord(double orig, double dest, double xxx, double yyy) { x[dest]=x[orig]+xxx; y[dest]=y[orig]+yyy; } center(double one, double two, double result) { x[result]=(x[one]+x[two])/2; y[result]=(y[one]+y[two])/2; } dist(double p1, double p2) { return distance(x[p1],y[p1],x[p2],y[p2]); } line_intersect(double start1, double end1, double start2, double end2, double dest) { double tempx; double tempy; intersect(x[start1],y[start1],x[end1],y[end1],x[start2],y[start2],x[end2],y[end2],0); x[dest]=getresultx(); y[dest]=getresulty(); } cont(double cstart, double cend, double cdest, double cvdistanceance) { double ang; ang=angle(x[cstart], y[cstart], x[cend], y[cend]); polar(x[cend], y[cend], ang, cvdistanceance); x[cdest]=getresultx(); y[cdest]=getresulty(); } right_ang(double start, double end, double to_point, double dest) { double m,b; if (x[start]==x[end]) { x[dest]=x[end]; y[dest]=y[to_point]; } else { if (y[start]==y[end]) { x[dest]=x[to_point]; y[dest]=y[end]; } else { m=(y[start]-y[end])/(x[start]-x[end]); m=-1/m; b=y[to_point]-m*x[to_point]; intersect(x[start],y[start],x[end],y[end],x[to_point],y[to_point],0,b,0); x[dest]=getresultx(); y[dest]=getresulty(); } } } mark(double pass_index) { group_obj[pass_index]=marker_piece(group_obj[pass_index],1); marker_array[marker_count] = group_obj[pass_index]; marker_count = marker_count + 1; } offset_mark(double pass_index) { point pnt, test; double save_x, save_y; current_selection=newselection("OBJECT"); select(current_selection,group_obj[pass_index]); sel_push(current_selection); var_push(sv); run_command("OFFSET"); deselect(current_selection); current_object=last_obj(); marker_array[marker_count] = marker_piece(current_object,1); current_selection=newselection("OBJECT"); select(current_selection, marker_array[marker_count]); select(current_selection, group_obj[pass_index]); marker_count = marker_count + 1; } shift(double orig, double xxx, double yyy) { x[orig]=x[orig]+xxx; y[orig]=y[orig]+yyy; } rect (double x1, double y1, double x2, double y2) { newobject("poly"); addpoint( x1/2.54,y1/2.54,"LINE"); addpoint( x2/2.54,y1/2.54,"LINE"); addpoint( x2/2.54,y2/2.54,"LINE"); addpoint( x1/2.54,y2/2.54,"LINE"); } dot (double x, double y) { newobject("poly"); addpoint( x/2.54,y/2.54,"LINE"); } line (double x3, double y3, double x4, double y4) { newobject("poly"); addpoint( x3/2.54,y3/2.54,"LINE"); addpoint( x4/2.54,y4/2.54,"LINE"); } rotate(double rpoint,double rcenter, double rangle) { double vdistance, vang; vdistance=dist(rpoint, rcenter); vang=angle(x[rcenter],y[rcenter],x[rpoint],y[rpoint]); polar(x[rcenter],y[rcenter],vang+rangle,vdistance); x[rpoint]=getresultx(); y[rpoint]=getresulty(); } linecirc(double PA,double PB,double PC,double dradius,double which, double PD) { double mslope, dist0, dist1, dist2, xtemp; double tx, ty; xtemp = (x[PB]-x[PC])*(x[PB]-x[PC]); if (xtemp > 0) { xtemp = (y[PB]-y[PC])*(y[PB]-y[PC]); if ( xtemp > 0) { mslope = (y[PC] - y[PB])/(x[PC] - x[PB]); tx = x[PA] + 1; ty = y[PA] - 1/mslope; intersect(x[PA], y[PA], tx, ty, x[PB], y[PB], x[PC], y[PC], 0); tx = getresultx(); ty = getresulty(); dist1 = distance(x[PA], y[PA], tx, ty); dist2 = interceptline(0, dist1, dradius); dist0 = sqrt(1+mslope*mslope); xtemp = dist2/dist0; if (which) { x[PD] = tx+xtemp; y[PD] = ty+ xtemp*mslope; } else { x[PD] = tx-xtemp; y[PD] = ty- xtemp*mslope; } } else { x[PD] = x[PB]; if (which) { y[PD] = y[PA] + interceptline(x[PA], x[PB], dradius); } else { y[PD] = y[PA] - interceptline(x[PA], x[PB], dradius); } } } else { y[PD] = y[PB]; if (which) { x[PD] = x[PA] + interceptline(y[PA], y[PB], dradius); } else { x[PD] = x[PA] - interceptline(y[PA], y[PB], dradius); } } } double xarc_x_array[13], xarc_y_array[13]; double return_x, return_y; arclength(double start, double corner, double end) { double count, last_x, last_y; double a_dist; last_x = x[start]; last_y = y[start]; a_dist=0; for (count=1; count < 12; count = count + 1) { from_tspace(start, corner, end, count); a_dist = a_dist + distance(return_x, return_y, last_x, last_y); last_x=return_x; last_y=return_y; } return a_dist; } double A1, A2, B1, B2; double sx, sy, cx, cy, ex, ey; double tspace_0[2], tspace_1[2]; double ft_center[2]; from_tspace(double start, double corner, double end, double pos) { if (pos<1) { return_x=x[start]; return_y=y[start]; } else { if (pos<2) { sx = x[start]; sy = y[start]; cx = x[corner]; cy = y[corner]; ex = x[end]; ey = y[end]; A1=cx - sx; A2=cy - sy; B1=cx - ex; B2=cy - ey; A1=-A1; B1=-B1; A2=-A2; B2=-B2; tspace_0[0]=A1; tspace_0[1]=B1; tspace_1[0]=A2; tspace_1[1]=B2; ft_center[0]= cx + (tspace_0[0] + tspace_0[1]); ft_center[1]= cy + (tspace_1[0] + tspace_1[1]); return_x = tspace_0[0]*(xarc_x_array[pos])+tspace_0[1] * (xarc_y_array[pos])+ ft_center[0]; return_y = tspace_1[0]*(xarc_x_array[pos])+tspace_1[1] * (xarc_y_array[pos])+ ft_center[1]; } else { if (pos>10) { return_x=x[end]; return_y=y[end]; } else { return_x = tspace_0[0]*(xarc_x_array[pos])+tspace_0[1] * (xarc_y_array[pos])+ ft_center[0]; return_y = tspace_1[0]*(xarc_x_array[pos])+tspace_1[1] * (xarc_y_array[pos])+ ft_center[1]; } } } } init_xarc_array() { double ang_start, ang_end, step, theta, count; double XARC_PIECES; XARC_PIECES = 12; ang_start = -3.14159/2; ang_end= -3.14159; count=0; step= (ang_end - ang_start)/(XARC_PIECES-1); for (theta=ang_start; count < XARC_PIECES; theta = theta + step) { xarc_x_array[count] = cos(theta); xarc_y_array[count] = sin(theta); count=count+1; } } max(double aa, double bb) { if (aa > bb) { return aa; } else { return bb; } } min(double aa, double bb) { if (aa < bb) { return aa; } else { return bb; } } Forward() { index = index + 1; if (index==3) { if(model!=3) { index = index + 1; } } if (index==4) { if(model==3) { index = index + 1; } } if (index==5) { if(model >= 3) { index = index + 1; } } if (index==7) { if(sleeve_length!=1) { index = index + 1; } } if (index==8) { if(sleeve_length==1) { index = index + 1; } } if (index == 9) { done=1; } } Backward() { index = index - 1; if (index==8) { if(sleeve_length==1) { index = index - 1; } } if (index==7) { if(sleeve_length!=1) { index = index - 1; } } if (index==5) { if(model >= 3) { index = index - 1; } } if (index==4) { if(model==3) { index = index - 1; } } if (index==3) { if(model!=3) { index = index - 1; } } } Popup1() { if (language == 0) { start_pict_dialog("SHIRT MODEL"); add_pict_item("Box Pleat Front","MB_shirt_front_pleat.jpg"); add_pict_item("French Front","MB_shirt_front_french.jpg"); add_pict_item("Hidden Button Front","MB_shirt_front_hidden.jpg"); add_pict_item("Western-style Front","MB_shirt_front_west.jpg"); run_pict("Next"); model=get_pict_result(); Forward(); } } Popup2() { if (language == 0) { start_pict_dialog("COLLAR STYLE"); add_pict_item("Sharp Point","MB_shirt_collar_conv.jpg"); add_pict_item("Round Point","MB_shirt_collar_round.jpg"); if (run_pict("Back","Next")) { collar=get_pict_result(); Forward(); } else { collar=0; Backward(); } } } Popup3() { if (language == 0) { start_pict_dialog("COLLAR SPREAD"); add_pict_item("Narrow","MB_shirt_collar_narrow.jpg"); add_pict_item("Normal","MB_shirt_collar_normal.jpg"); add_pict_item("Wide","MB_shirt_collar_wide.jpg"); if (run_pict("Back","Next")) { collar_spread=get_pict_result(); Forward(); } else { collar_spread=0; Backward(); } } } Popup4() { if (language == 0) { start_pict_dialog("POCKET MODEL"); add_pict_item("Sawtooth Pocket","MB_shirt_pkt_saw.jpg"); add_pict_item("Panhandle Pocket","MB_shirt_pkt_pan.jpg"); if (run_pict("Back","Next")) { pocket=get_pict_result(); Forward(); } else { pocket=0; Backward(); } } } Popup5() { if (language == 0) { start_pict_dialog("POCKET MODEL"); add_pict_item("Conventional","MB_shirt_pkt_conv.jpg"); add_pict_item("Conventional with Pleat","MB_shirt_pkt_pleat.jpg"); add_pict_item("Dress with Flap","MB_shirt_pkt_flap.jpg"); if (run_pict("Back","Next")) { pocket=get_pict_result(); Forward(); } else { pocket=0; Backward(); } } } Popup6() { if (language == 0) { start_pict_dialog("BACK PLEAT CHOICE"); add_pict_item("No Pleat","MB_shirt_pleat_none.jpg"); add_pict_item("Box Pleat","MB_shirt_pleat_box.jpg"); add_pict_item("Single Pleat","MB_shirt_pleat_sgle.jpg"); if (run_pict("Back","Next")) { back_pleat=get_pict_result(); Forward(); } else { back_pleat=0; Backward(); } } } Popup7() { if (language == 0) { start_pict_dialog("SLEEVE LENGTH"); add_pict_item("Long","MB_shirt_ls.jpg"); add_pict_item("Short","MB_shirt_ss.jpg"); if (run_pict("Back","Next")) { sleeve_length=get_pict_result(); Forward(); } else { sleeve_length=0; Backward(); } } } Popup8() { if (language == 0) { start_pict_dialog("SHORT SLEEVE CUFF"); add_pict_item("Plain or False Cuff","blank.jpg"); add_pict_item("Cuff with Vent","blank.jpg"); add_pict_item("Cuff with Vent and Buttons","blank.jpg"); if (run_pict("Back","Next")) { short_sleeve_cuff=get_pict_result(); Forward(); } else { short_sleeve_cuff=0; Backward(); } } } Popup9() { if (language == 0) { start_pict_dialog("LONG SLEEVE CUFF"); add_pict_item("One Button Conventional","MB_shirt_cuff_btn-1.jpg"); add_pict_item("Two Buttons Dress","MB_shirt_cuff_btn-2.jpg"); add_pict_item("One Button Angle Cut","MB_shirt_cuff_btn-1-ang.jpg"); if (run_pict("Back","Next")) { long_sleeve_cuff=get_pict_result(); Forward(); } else { long_sleeve_cuff=0; Backward(); } } }