// Copyright (C) 2001 Leena L�hteenm�ki, Finland // Copyright (C) 2012 PatternMaker Software // 2011/11/04 double x[600], y[600]; double ang,ang2,vang,vdistance,rangle; point current_point; object group_obj[200]; object current_object; selection current_selection; double result; double model,ky,ry,vy,yly,aly,rkkv,rk,vk,sp,sl,op; double ylk,alk,kay,ray,hp; double eml, tml, sml, smlyly,smlaly; double ktk,ktl,ptl,ptp,pts,rl,pk,tk; double okt,oke; double ktpe,ktpt,ktp; double pit; double ease, f_ry[3],f_ky[3],f_vy[3],f_yly[3],f_aly[3],f_rkkv[3],f_sl[3]; double f_op[3],f_vk[3],f_rk[3],f_rl[3],f_sp[3],f_ktk[3]; double f_kay[3],f_ray[3],f_hp[3]; double kpe,kpt,kp; double collar; double lapel; double neck_depth, neck_width; double napit,int; double sleeve, sleeve_length; double shoulder_padding; double sv; double metric; double siirtox, siirtoy; double flare; double nv,pit; double language; double pocket, slant; double tk, ytl, tl; double ang_tasku, asteet; double index, done, version; object marker_array[40]; double marker_count, loop; main() { language=get_language(); if ( language != 0 ) { language = 0; } if (language == 0) { check_reg(0, "Leena","L2macros", "This macro needs to be properly installed before running it."); } init_xarc_array(); ky=39.25; ry=96; vy=78; yly=95; aly=102; rkkv=21; rk=36.8; vk=55.4; sp=41.3; sl=37.6; op=13.5; ylk=9; alk=19; kay=30; ray=18.5; hp=60.4; flare=15; sv=1; pit=35; nv=2; tl=16; //Start Options while (!done) { if (index==0) { dialog_model(); } if (index==1) { dialog_ease(); } if (index==2) { dialog_collar(); } if (index==3) { dialog_collar_depth(); } if (index==4) { dialog_collar_width(); } if (index==5) { dialog_lapel(); } if (index==6) { dialog_sleeve(); } if (index==7) { dialog_sleeve_length(); } if (index==8) { dialog_shoulder_pads(); } if (index==9) { dialog_pocket(); } if (index==10) { dialog_pocket_slant(); } } //End Options if (is_function("unit_mode")==1) { metric = unit_mode(); if (!metric) { ky=ky/2.54; ry=ry/2.54; vy=vy/2.54; yly=yly/2.54; aly=aly/2.54; rkkv=rkkv/2.54; vk=vk/2.54; sp=sp/2.54; sl=sl/2.54; op=op/2.54; ylk=ylk/2.54; alk=alk/2.54; rk=rk/2.54; kay=kay/2.54; ray=ray/2.54; hp=hp/2.54; pit=pit/2.54; sv=sv/2.54; tk=tk/2.54; tl=tl/2.54; ytl=ytl/2.54; } } else { if (language == 0) { metric=2*pop_up("Units","Inches","Centimeters"); } if (metric<1) { ky=ky/2.54; ry=ry/2.54; vy=vy/2.54; yly=yly/2.54; aly=aly/2.54; rkkv=rkkv/2.54; vk=vk/2.54; sp=sp/2.54; sl=sl/2.54; op=op/2.54; ylk=ylk/2.54; alk=alk/2.54; rk=rk/2.54; kay=kay/2.54; ray=ray/2.54; hp=hp/2.54; pit=pit/2.54; sv=sv/2.54; tk=tk/2.54; tl=tl/2.54; ytl=ytl/2.54; } } if(metric==0) { sv=0.39; } double read; read = 0; if (is_function("measure_table")==1) { if (measure_table("default_women")==1) { read = 1; } } if (read==0) { if (is_function("start_picture_input")) { if (language == 0) { start_picture_input("LADIES' JACKET"); } if (language == 0) { add_picture_input("Neck circumference",ky, "w_meas_neckcirc"); } if (language == 0) { add_picture_input("Bust circumference", ry, "w_meas_bustcirc"); } if (language == 0) { add_picture_input("Waist circumference", vy, "w_meas_waistcirc"); } if (language == 0) { add_picture_input("Abdomen circumference",yly, "w_meas_abdmcirc"); } if (language == 0) { add_picture_input("Hip circumference",aly, "w_meas_hipcirc"); } if (language == 0) { add_picture_input("Bust span", rkkv, "w_meas_bustspan"); } if (language == 0) { add_picture_input("Bust height",rk, "w_meas_bustht"); } if (language == 0) { add_picture_input("Waist height",vk, "w_meas_waistht"); } if (language == 0) { add_picture_input("Back length",sp, "w_meas_bklength"); } if (language == 0) { add_picture_input("Back width",sl, "w_meas_bkwidth"); } if (language == 0) { add_picture_input("Shoulder length",op, "w_meas_shldr"); } if (language == 0) { add_picture_input("Waist - Abdomen",ylk, "w_meas_waist-abdm"); } if (language == 0) { add_picture_input("Waist - Hip",alk, "w_meas_waist-hip"); } if (language == 0) { add_picture_input("Biceps circumference",kay, "w_meas_biceps"); } if (language == 0) { add_picture_input("Wrist circumference",ray, "w_meas_wrist"); } if (language == 0) { add_picture_input("Overarm length",hp, "w_meas_overarm"); } run_picture_input(); } else { if (language == 0) { dialog_box( "LADIES' JACKET - 1 of 2", "Neck circumference",ky, "Bust circumference", ry, "Waist circumference", vy, "Abdomen circumference",yly, "Hip circumference",aly, "Bust span", rkkv, "Bust height",rk, "Waist height",vk, "Back length",sp, "Back width",sl); } if (language == 0) { dialog_box("LADIES' JACKET - 2 of 2", "Shoulder length",op, "Waist - Abdomen",ylk, "Waist - Hip",alk, "Biceps circumference",kay, "Wrist circumference",ray, "Overarm length",hp); } } } if (is_function("start_picture_input")) { if(model==1) { if (language == 0) { start_picture_input("CUSTOM MEASUREMENTS"); } if (language == 0) { add_picture_input("Length from waist",pit, "w_meas_skirt_dress_length"); } if (language == 0) { add_picture_input("Flare at hem",flare,"w_meas_skirt_flare"); } if (language == 0) { add_picture_input("Pocket width", tl,"w_meas_pocket_width"); } if (language == 0) { add_picture_input("Seam Allowance", sv, "meas_seamallow"); } run_picture_input(); } else { if (language == 0) { start_picture_input("CUSTOM MEASUREMENTS"); } if (language == 0) { add_picture_input("Length from waist",pit, "w_meas_skirt_dress_length"); } if (language == 0) { add_picture_input("Pocket width", tl,"w_meas_pocket_width"); } if (language == 0) { add_picture_input("Seam Allowance", sv, "meas_seamallow"); } run_picture_input(); } } else { if(model==1) { if (language == 0) { dialog_box("CUSTOM MEASUREMENTS", "Length from waist",pit, "Pocket width", tl, "Flare at hem",flare, "Seam Allowance",sv); } } else { if (language == 0) { dialog_box("CUSTOM MEASUREMENTS", "Length from waist",pit, "Pocket width", tl, "Seam Allowance",sv); } } } if(model==1) { if(pit5) { pts=pts+1; ptl=ptl+1; } if((model==0)||(model==2)) { vy=vy+3; yly=yly+2; aly=aly+2; } if(sleeve==2) { op=op+3; } if(shoulder_padding==0) { oke=oke-0.5; okt=okt-1; op=op+1; } x[0]=0; y[0]=0; coord(0,1,0,0); coord(1,2,-ry/2,0); coord(2,3,0,-ktk); coord(2,4,0,-sp); coord(4,5,0,-ylk); coord(4,6,0,-alk); coord(1,7,-sl/2,0); coord(7,8,-ktl,0); coord(7,9,0,-ktk); coord(9,10,-ktl,0); coord(9,11,-ktl/2,0); coord(9,53,0,0); coord(11,54,0,0); coord(9,12,sl/2,0); coord(1,13,0,-sp); coord(13,14,0,-ylk); coord(13,15,0,-alk); coord(13,16,-sl/2-ktl/2,0); coord(14,17,-sl/2-ktl/2,0); coord(15,18,-sl/2-ktl/2,0); coord(3,19,rkkv/2,0); coord(4,20,rkkv/2,0); coord(1,21,0,.5); coord(1,22,-ptl,2.5); coord(22,122,0,-2.5); coord(2,23,ptl,0); coord(1,24,0,-okt); coord(24,124,-100,0); coord(1,25,0,-oke); coord(25,125,-100,0); coord(22,26,-sqrt((op+2)*(op+2)-(okt+2.5)*(okt+2.5)),-(okt+2.5)); coord(23,123,0,100); cont(26,22,27,-5); coord(1,28,-rkkv/2,-7); cont(28,27,127,.6); cont(26,22,29,-6); double ang; ang=angle(x[28],y[28],x[27],y[27])-angle(x[28],y[28],x[29],y[29]); rotate(129,28,-ang); coord(20,30,0,vk-rk); ptp=arclength(21,122,22); coord(30,31,-rkkv/2+ptl,sqrt((rk-ptp)*(rk-ptp)-(rkkv/2-ptl)*(rkkv/2-ptl))); coord(31,32,0,0); double ang; ang=angle(x[30],y[30],x[31],y[31])-angle(x[30],y[30],x[31]+rl,y[31]); rotate(32,30,-ang); x[223]=x[32]; y[223]=y[25]; oke=dist(32,223); coord(32,33,sqrt(op*op-oke*oke),-oke); cont(33,31,131,-5); cont(33,32,132,-5); cont(132,30,132,-dist(30,132)); coord(10,34,0,ktk/4); coord(10,36,0,ktk/2); coord(9,35,0,ktk/3); coord(9,37,0,2*ktk/3); y[9]=y[9]+2; if(collar<3) { coord(31,102,-ptl-3,-pts-3); y[23]=y[102]+3; } if((collar==3)||(collar==4)) { coord(31,102,-ptl,-pts); y[23]=y[102]+3; } if(collar==5) { coord(31,102,-ptl,-pts-14); } if(collar==6) { coord(31,102,-ptl,-pts); y[23]=y[102]; } coord(6,38,rkkv/2,0); coord(38,39,0,(alk-ylk)/2); coord(20,40,-eml/2,0); coord(20,41,eml/2,0); coord(15,42,-rkkv/2,0); coord(42,43,0,(alk-ylk)/2); coord(13,44,-rkkv/2-tml/2,0); coord(12,45,-rkkv/2,-2); coord(44,46,tml,0); coord(18,47,smlaly/2,0); coord(17,48,smlyly/2,0); coord(16,49,sml/2,0); coord(16,50,-sml/2,0); coord(17,51,-smlyly/2,0); coord(18,52,-smlaly/2,0); cont(51,50,251,-3); cont(11,50,111,-3); cont(11,49,249,-3); cont(48,49,248,-3); cont(50,11,310,-4); coord(310,311,0,0); coord(38,500,0,-pit+alk); coord(52,501,0,-pit+alk); coord(42,502,0,-pit+alk); coord(47,503,0,-pit+alk); if(lapel==0) { coord(4,104,0,.5); } else { if(lapel==1) { coord(4,104,0,dist(3,4)/2); } else { coord(3,104,0,0); } } cont(23,102,202,-4); if(collar==0) { coord(102,204,-3,-dist(104,102)/2); } if(collar==1) { coord(102,204,-3,-dist(104,102)/2); } if(collar==2) { coord(102,204,-4,-dist(104,102)/2); } if(collar>2) { coord(102,204,-0,-dist(104,102)/2); } coord(31,231,-2,0); cont(104,231,232,-20); cont(33,32,132,-5); cont(131,30,131,-dist(30,132)); kpt=arclength(22,122,21); kp=(kpe+kpt); cont(26,22,27,-5); cont(26,22,29,-7); coord(127,129,0,0); double ang; ang=angle(x[28],y[28],x[27],y[27])-angle(x[28],y[28],x[29],y[29]); rotate(129,28,-ang); if(shoulder_padding==0) { x[36]=x[36]+1; x[37]=x[37]-1; } coord(4,190,0,-pit); coord(13,191,0,-pit); line_intersect(39,40,190,191,192); line_intersect(39,41,190,191,193); line_intersect(51,50,190,191,194); line_intersect(48,49,190,191,195); line_intersect(43,44,190,191,196); line_intersect(43,46,190,191,197); line_intersect(38,20,190,191,198); line_intersect(47,48,190,191,199); line_intersect(52,51,190,191,200); line_intersect(42,45,190,191,201); cont(33,31,513,-5); coord(5,516,nv,0); coord(6,514,0,-pit+alk); coord(6,515,nv+2,-pit+alk); kpe=arclength(31,23,102); ptp=kpt; kp=kpe+kpt-0.7; coord(23,301,-1,1); coord(31,302,0,0); cont(131,31,114,2); cont(104,114,214,30); linecirc(31,104,214,ptp,1,303); double ang; ang=6*360/2/3.14159/ptp*3.14159/180; rotate(303,302,-ang); cont(302,303,304,-8); rotate (304,303,-angle (x[303],y[304],x[303],y[304]+90*3.14159/180)); cont(302,303,304,-7); rotate (304,303,-angle (x[303],y[304],x[303],y[304]+90*3.14159/180)); cont(303,304,305,5); rotate (305,304,-angle (x[303],y[304],x[303],y[304]-90*3.14159/180)); cont(204,102,307,3); cont(307,202,307,-4); cont(304,305,504,50); if(lapel==2) { y[204]=y[4]+10; } cont(204,102,505,50); if(lapel==2) { y[204]=y[104]+10; } line_intersect(204,505,304,504,306); x[306]=x[306]+2; if((collar==1)||(collar==2)) { x[306]=x[306]-1.5; } if(collar==2) { x[306]=x[306]-2.5; } coord(31,231,-2,0); cont(104,231,232,-20); coord(102,400,0,0); coord(400,401,-kp/4,5); coord(401,402,-kp/4,0); coord(402,403,-kp/4,-2.5); coord(400,404,-kp,0); coord(400,405,0,12.5); coord(401,406,0,7.5); coord(402,407,0,7.5); coord(403,408,0,8.5); coord(404,409,0,9.5); cont(408,409,410,+4); if(model==1) { cont(22,26,510,-2); coord(510,26,0,0); } if(neck_depth==1) { y[23]=y[23]+4; y[202]=y[202]+4; y[102]=y[102]+4; } if(neck_depth==2) { y[23]=y[23]-6; y[202]=y[202]-6; y[102]=y[102]-6; } if(neck_width==1) { cont(33,31,31,-3); } cont(33,31,131,-5); if(neck_width==1) { cont(33,32,132,-5-3); } cont(131,30,131,-dist(30,132)); if(neck_width==1) { x[23]=x[23]+3; } x[202]=x[202]+2; if(neck_width==1) { cont(26,22,22,-3); } x[122]=x[22]; y[122]=y[122]-1; y[21]=y[21]-1; cont(26,22,127,-5); y[127]=y[127]+0.7; cont(26,127,129,-2); cont(129,28,129,-dist(28,127)); y[23]=y[202]; if(sv>0) { if (language == 0) { current_object=newobject("text","Check hem seam allowance",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[3]+5+siirtox)/2.54, (y[6]+1.2-pit+alk)/2.54, "line"); group_obj[2]=current_object; } if (language == 0) { current_object=newobject("text","Front piece, Cut 2, CF Front facing, Cut 2",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[3]+siirtox)/2.54, (y[3])/2.54, "line"); group_obj[1]=current_object; siirtoy=8; cont(127,22,127,-5); current_object=newobject("poly"); addpoint((x[21]+siirtox)/2.54, (y[21]+siirtoy)/2.54, "xarc_start"); addpoint((x[122]+siirtox)/2.54, (y[122]+siirtoy)/2.54, "xarc_corner"); addpoint((x[22]+siirtox)/2.54, (y[22]+siirtoy)/2.54, "LINE"); if(model==0) { addpoint((x[127]+siirtox)/2.54, (y[127]+siirtoy)/2.54, "xarc_start"); } else { addpoint((x[127]+siirtox)/2.54, (y[127]-0.6+siirtoy)/2.54, "xarc_start"); } addpoint((x[122]+siirtox)/2.54, ((y[122]-5)+siirtoy)/2.54, "xarc_corner"); addpoint((x[21]+siirtox)/2.54, ((y[21]-4)+siirtoy)/2.54, "open"); group_obj[3]=current_object; current_object=newobj_dot((x[21]+siirtox)/2.54, (y[21]+siirtoy)/2.54); addpoint((x[21]+siirtox)/2.54, (y[21]-4+siirtoy)/2.54, "open"); group_obj[74]=current_object; if (language == 0) { current_object=newobject("text","Back facing, Cut 1 on fold, CB-->",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[22]+3+siirtox)/2.54, (y[21]-2+siirtoy)/2.54, "line"); group_obj[4]=current_object; if(sv>0) { offset_mark(3); select(current_selection,group_obj[4]); select(current_selection,group_obj[74]); group(current_selection); deselect(current_selection); } else { mark(3); current_selection=newselection("OBJECT"); select(current_selection,group_obj[3]); select(current_selection,group_obj[4]); select(current_selection,group_obj[74]); group(current_selection); deselect(current_selection); } siirtoy=0; siirtox=-4; siirtoy=2; if(collar==0) { cont(301,302,401,-4); current_object=newobject("POLY"); addpoint((x[304]+siirtox)/2.54, (y[304]+siirtoy)/2.54, "open"); addpoint((x[305]+siirtox)/2.54, (y[305]+siirtoy)/2.54, "xarc_start"); addpoint((x[306]+siirtox)/2.54, (y[306]+siirtoy)/2.54, "xarc_corner"); addpoint((x[307]+siirtox)/2.54, (y[307]+siirtoy)/2.54, "LINE"); addpoint((x[202]+siirtox)/2.54, (y[202]+siirtoy)/2.54, "xarc_start"); addpoint((x[301]+siirtox)/2.54, (y[301]+siirtoy)/2.54, "xarc_corner"); addpoint((x[401]+siirtox)/2.54, (y[401]+siirtoy)/2.54, "xarc_start"); addpoint((x[302]+siirtox)/2.54, (y[302]+siirtoy)/2.54, "xarc_corner"); addpoint((x[303]+siirtox)/2.54, (y[303]+siirtoy)/2.54, "LINE"); group_obj[5]=current_object; current_object=newobj_dot((x[303]+siirtox)/2.54, (y[303]+siirtoy)/2.54); addpoint((x[304]+siirtox)/2.54, (y[304]+siirtoy)/2.54, "open"); group_obj[6]=current_object; if (language == 0) { current_object=newobject("text","Collar CB Cut 2 on fold",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[304]-2+siirtox)/2.54, (y[303]+siirtoy)/2.54, "line"); group_obj[75]=current_object; if(sv>0) { offset_mark(5); select(current_selection,group_obj[6]); select(current_selection,group_obj[75]); group(current_selection); deselect(current_selection); } else { mark(5); current_selection=newselection("OBJECT"); select(current_selection,group_obj[5]); select(current_selection,group_obj[6]); select(current_selection,group_obj[75]); group(current_selection); deselect(current_selection); } } if(collar==6) { current_object=newobject("poly"); addpoint((x[400])/2.54, (y[400]+5)/2.54, "line"); addpoint((x[401])/2.54, y[401]/2.54, "xarc_start"); addpoint((x[402])/2.54, y[402]/2.54, "xarc_corner"); addpoint((x[403])/2.54, y[403]/2.54, "line"); addpoint((x[404])/2.54, y[404]/2.54, "line"); addpoint((x[410])/2.54, y[410]/2.54, "LINE"); addpoint((x[409])/2.54, y[409]/2.54, "line"); addpoint((x[408])/2.54, y[408]/2.54, "xarc_start"); addpoint((x[407])/2.54, y[407]/2.54, "xarc_corner"); addpoint((x[406])/2.54, y[406]/2.54, "line"); addpoint((x[405])/2.54, y[405]/2.54, "open"); group_obj[5]=current_object; current_object=newobj_dot((x[405])/2.54, (y[405])/2.54); addpoint((x[400])/2.54, (y[400]+5)/2.54, "open"); group_obj[6]=current_object; if (language == 0) { current_object=newobject("text","Collar CB Cut 2 on fold",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[400]-7)/2.54, (y[400]+8)/2.54, "line"); group_obj[75]=current_object; if(sv>0) { offset_mark(5); select(current_selection,group_obj[6]); select(current_selection,group_obj[75]); group(current_selection); deselect(current_selection); } else { mark(5); current_selection=newselection("OBJECT"); select(current_selection,group_obj[5]); select(current_selection,group_obj[6]); select(current_selection,group_obj[75]); group(current_selection); deselect(current_selection); } } siirtox=0; siirtoy=0; if(collar==0) { if(lapel==0) { current_object=newobject("poly"); addpoint((x[3])/2.54, (y[3])/2.54, "line"); current_point=addpoint((x[4])/2.54, (y[4])/2.54, "line"); notch_type(current_point,"BTN",0); addpoint((x[5])/2.54, (y[5])/2.54, "LINE"); addpoint((x[6])/2.54, (y[6])/2.54, "open"); group_obj[8]=current_object; } if(lapel==1) { int=dist(104,5)/2; current_object=newobject("poly"); current_point=addpoint((x[104])/2.54, (y[104])/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[104])/2.54, (y[104]-int)/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[104])/2.54, (y[104]-2*int)/2.54, "open"); notch_type(current_point,"BTN",0); group_obj[8]=current_object; } if(lapel==2) { int=dist(104,5)/3; current_object=newobject("poly"); current_point=addpoint((x[104])/2.54, (y[104])/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[104])/2.54, (y[104]-int)/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[104])/2.54, (y[104]-2*int)/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[104])/2.54, (y[104]-3*int)/2.54, "open"); notch_type(current_point,"BTN",0); group_obj[8]=current_object; } } if(collar==1) { if(lapel==0) { current_object=newobject("poly"); addpoint((x[3])/2.54, (y[3])/2.54, "line"); addpoint((x[4])/2.54, (y[4])/2.54, "line"); current_point=addpoint((x[5])/2.54, (y[5])/2.54, "open"); notch_type(current_point,"BTN",0); group_obj[8]=current_object; } if(lapel==1) { int=dist(104,5)/2; current_object=newobject("poly"); current_point=addpoint((x[104])/2.54, (y[104])/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[104])/2.54, (y[104]-int)/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[104])/2.54, (y[104]-2*int)/2.54, "open"); notch_type(current_point,"BTN",0); group_obj[8]=current_object; } if(lapel==2) { int=dist(104,5)/3; current_object=newobject("poly"); current_point=addpoint((x[104])/2.54, (y[104])/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[104])/2.54, (y[104]-int)/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[104])/2.54, (y[104]-2*int)/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[104])/2.54, (y[104]-3*int)/2.54, "open"); notch_type(current_point,"BTN",0); group_obj[8]=current_object; } } if(collar==2) { current_object=newobject("poly"); addpoint((x[3])/2.54, (y[3])/2.54, "line"); addpoint((x[4])/2.54, (y[4])/2.54, "line"); addpoint((x[5])/2.54, (y[5])/2.54, "open"); group_obj[8]=current_object; } if(collar==3) { int=dist(102,5)/4; current_object=newobject("poly"); current_point=addpoint((x[3])/2.54, (y[102]-2)/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[3])/2.54, (y[102]-2-int)/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[3])/2.54, (y[102]-2-2*int)/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[3])/2.54, (y[102]-2-3*int)/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[3])/2.54, (y[102]-2-4*int)/2.54, "open"); notch_type(current_point,"BTN",0); group_obj[8]=current_object; } if(collar==4) { int=dist(102,5)/4; current_object=newobject("poly"); current_point=addpoint((x[3])/2.54, (y[102]-2)/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[3])/2.54, (y[102]-2-int)/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[3])/2.54, (y[102]-2-2*int)/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[3])/2.54, (y[102]-2-3*int)/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[3])/2.54, (y[102]-2-4*int)/2.54, "open"); notch_type(current_point,"BTN",0); group_obj[8]=current_object; } if(collar==5) { int=dist(102,5)/4; current_object=newobject("poly"); current_point=addpoint((x[3])/2.54, (y[102]-2)/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[3])/2.54, (y[102]-2-int)/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[3])/2.54, (y[102]-2-2*int)/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[3])/2.54, (y[102]-2-3*int)/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[3])/2.54, (y[102]-2-4*int)/2.54, "open"); notch_type(current_point,"BTN",0); group_obj[8]=current_object; } if(collar==6) { int=(dist(102,5)-2)/4; current_object=newobject("poly"); current_point=addpoint((x[3])/2.54, (y[102]-2)/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[3])/2.54, (y[102]-2-int)/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[3])/2.54, (y[102]-2-2*int)/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[3])/2.54, (y[102]-2-3*int)/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[3])/2.54, (y[102]-2-4*int)/2.54, "open"); notch_type(current_point,"BTN",0); group_obj[8]=current_object; } if(pocket<4) { double tlk; asteet=10; ang_tasku=asteet*3.14159/180; tk=18; if(pocket==1) { tlk=2.5; } if(pocket==2) { tlk=1.5; } if(pocket==3) { tlk=6; } coord(20,140,-4,-6); coord(140,141,tl,0); coord(140,142,0,-tk); coord(142,143,tl,0); cont(140,142,144,-2); cont(141,143,145,-2); cont(143,142,146,-2); cont(142,143,147,-2); coord(140,148,0,-tlk); coord(141,149,0,-tlk); cont(140,148,150,-2); cont(141,149,151,-2); cont(149,148,152,-2); cont(148,149,153,-2); coord(140,154,0,-tlk); coord(141,155,0,-tlk); coord(140,156,0,6); coord(156,157,0,-tlk); coord(156,158,tl+6,0); coord(158,159,0,-tlk); siirtoy=0; siirtox=0; if(pocket==0) { current_object=newobject("poly"); if(slant==1) { rotate (141,140,-ang_tasku); addpoint((x[141]+siirtox)/2.54, (y[141]+siirtoy)/2.54, "line"); rotate (141,140,ang_tasku); } else { addpoint((x[141]+siirtox)/2.54, (y[141]+siirtoy)/2.54, "line"); } if(slant==2) { rotate (140,141,ang_tasku); addpoint((x[140]+siirtox)/2.54, (y[140]+siirtoy)/2.54, "LINE"); rotate (140,141,-ang_tasku); } else { addpoint((x[140]+siirtox)/2.54, (y[140]+siirtoy)/2.54, "LINE"); } addpoint((x[144]+siirtox)/2.54, (y[144]+siirtoy)/2.54, "xarc_start"); addpoint((x[142]+siirtox)/2.54, (y[142]+siirtoy)/2.54, "xarc_corner"); addpoint((x[146]+siirtox)/2.54, (y[146]+siirtoy)/2.54, "LINE"); addpoint((x[147]+siirtox)/2.54, (y[147]+siirtoy)/2.54, "xarc_start"); addpoint((x[143]+siirtox)/2.54, (y[143]+siirtoy)/2.54, "xarc_corner"); addpoint((x[145]+siirtox)/2.54, (y[145]+siirtoy)/2.54, "LINE"); group_obj[109]=current_object; } if(pocket==1) { current_object=newobject("poly"); if(slant==2) { rotate (140,141,ang_tasku); rotate (154,155,ang_tasku); addpoint((x[140]+siirtox)/2.54, (y[140]+siirtoy)/2.54, "line"); addpoint((x[154]+siirtox)/2.54, (y[154]+siirtoy)/2.54, "line"); rotate (140,141,-ang_tasku); rotate (154,155,-ang_tasku); } else { addpoint((x[140]+siirtox)/2.54, (y[140]+siirtoy)/2.54, "line"); addpoint((x[154]+siirtox)/2.54, (y[154]+siirtoy)/2.54, "line"); } if(slant==1) { rotate (141,140,-ang_tasku); rotate (155,154,-ang_tasku); addpoint((x[155]+siirtox)/2.54, (y[155]+siirtoy)/2.54, "line"); addpoint((x[141]+siirtox)/2.54, (y[141]+siirtoy)/2.54, "line"); rotate (141,140,ang_tasku); rotate (155,154,ang_tasku); } else { addpoint((x[155]+siirtox)/2.54, (y[155]+siirtoy)/2.54, "line"); addpoint((x[141]+siirtox)/2.54, (y[141]+siirtoy)/2.54, "line"); } group_obj[110]=current_object; } if(pocket==2) { siirtoy=tlk/2; current_object=newobject("poly"); if(slant==2) { rotate (140,141,ang_tasku); rotate (154,153,ang_tasku); addpoint((x[140]+siirtox)/2.54, (y[140]+siirtoy)/2.54, "line"); addpoint((x[154]+siirtox)/2.54, (y[140]-1.5+siirtoy)/2.54, "line"); rotate (140,141,-ang_tasku); rotate (154,153,-ang_tasku); } else { addpoint((x[140]+siirtox)/2.54, (y[140]+siirtoy)/2.54, "line"); addpoint((x[154]+siirtox)/2.54, (y[140]-1.5+siirtoy)/2.54, "line"); } if(slant==1) { rotate (141,140,-ang_tasku); rotate (155,154,-ang_tasku); addpoint((x[155]+siirtox)/2.54, (y[141]-1.5+siirtoy)/2.54, "line"); addpoint((x[141]+siirtox)/2.54, (y[141]+siirtoy)/2.54, "line"); rotate (141,140,ang_tasku); rotate (155,154,ang_tasku); } else { addpoint((x[155]+siirtox)/2.54, (y[141]-1.5+siirtoy)/2.54, "line"); addpoint((x[141]+siirtox)/2.54, (y[141]+siirtoy)/2.54, "line"); } group_obj[110]=current_object; current_object=newobject("poly"); if(slant==1) { rotate (141,140,-ang_tasku); addpoint((x[141]+siirtox)/2.54, (y[141]-.75+siirtoy)/2.54, "line"); rotate (141,140,ang_tasku); } else { addpoint((x[141]+siirtox)/2.54, (y[141]-.75+siirtoy)/2.54, "line"); } if(slant==2) { rotate (140,141,ang_tasku); addpoint((x[140]+siirtox)/2.54, (y[140]-.75+siirtoy)/2.54, "open"); rotate (140,141,-ang_tasku); } else { addpoint((x[140]+siirtox)/2.54, (y[140]-.75+siirtoy)/2.54, "open"); } group_obj[111]=current_object; } if(pocket==3) { siirtoy=0; current_object=newobject("poly"); if(slant==0) { addpoint((x[141]+siirtox)/2.54, (y[141]+siirtoy)/2.54, "line"); addpoint((x[151]+siirtox)/2.54, (y[151]+siirtoy)/2.54, "xarc_start"); addpoint((x[149]+siirtox)/2.54, (y[149]+siirtoy)/2.54, "xarc_corner"); addpoint((x[153]+siirtox)/2.54, (y[153]+siirtoy)/2.54, "line"); addpoint((x[152]+siirtox)/2.54, (y[152]+siirtoy)/2.54, "xarc_start"); addpoint((x[148]+siirtox)/2.54, (y[148]+siirtoy)/2.54, "xarc_corner"); addpoint((x[150]+siirtox)/2.54, (y[150]+siirtoy)/2.54, "line"); addpoint((x[140]+siirtox)/2.54, (y[140]+siirtoy)/2.54, "line"); } if(slant==1) { rotate (141,140,-ang_tasku); rotate (151,150,-ang_tasku); rotate (149,148,-ang_tasku); rotate (153,152,-ang_tasku); addpoint((x[141]+siirtox)/2.54, (y[141]+siirtoy)/2.54, "line"); addpoint((x[151]+siirtox)/2.54, (y[151]+siirtoy)/2.54, "xarc_start"); addpoint((x[149]+siirtox)/2.54, (y[149]+siirtoy)/2.54, "xarc_corner"); addpoint((x[153]+siirtox)/2.54, (y[153]+siirtoy)/2.54, "line"); addpoint((x[152]+siirtox)/2.54, (y[152]+siirtoy)/2.54, "xarc_start"); addpoint((x[148]+siirtox)/2.54, (y[148]+siirtoy)/2.54, "xarc_corner"); addpoint((x[150]+siirtox)/2.54, (y[150]+siirtoy)/2.54, "line"); addpoint((x[140]+siirtox)/2.54, (y[140]+siirtoy)/2.54, "line"); rotate (141,140,ang_tasku); rotate (151,150,ang_tasku); rotate (149,148,ang_tasku); rotate (153,152,ang_tasku); } if(slant==2) { rotate (140,141,ang_tasku); rotate (150,151,ang_tasku); rotate (148,149,ang_tasku); rotate (152,153,ang_tasku); addpoint((x[141]+siirtox)/2.54, (y[141]+siirtoy)/2.54, "line"); addpoint((x[151]+siirtox)/2.54, (y[151]+siirtoy)/2.54, "xarc_start"); addpoint((x[149]+siirtox)/2.54, (y[149]+siirtoy)/2.54, "xarc_corner"); addpoint((x[153]+siirtox)/2.54, (y[153]+siirtoy)/2.54, "line"); addpoint((x[152]+siirtox)/2.54, (y[152]+siirtoy)/2.54, "xarc_start"); addpoint((x[148]+siirtox)/2.54, (y[148]+siirtoy)/2.54, "xarc_corner"); addpoint((x[150]+siirtox)/2.54, (y[150]+siirtoy)/2.54, "line"); addpoint((x[140]+siirtox)/2.54, (y[140]+siirtoy)/2.54, "line"); rotate (140,141,-ang_tasku); rotate (150,151,-ang_tasku); rotate (148,149,-ang_tasku); rotate (152,153,-ang_tasku); } group_obj[110]=current_object; } siirtox=10; siirtoy=2*sp; current_object=newobject("poly"); if(slant==1) { rotate (141,140,-ang_tasku); addpoint((x[141]+siirtox)/2.54, (y[141]+siirtoy)/2.54, "line"); rotate (141,140,ang_tasku); } else { addpoint((x[141]+siirtox)/2.54, (y[141]+siirtoy)/2.54, "line"); } if(slant==2) { rotate (140,141,ang_tasku); addpoint((x[140]+siirtox)/2.54, (y[140]+siirtoy)/2.54, "LINE"); rotate (140,141,-ang_tasku); } else { addpoint((x[140]+siirtox)/2.54, (y[140]+siirtoy)/2.54, "LINE"); } addpoint((x[144]+siirtox)/2.54, (y[144]+siirtoy)/2.54, "xarc_start"); addpoint((x[142]+siirtox)/2.54, (y[142]+siirtoy)/2.54, "xarc_corner"); addpoint((x[146]+siirtox)/2.54, (y[146]+siirtoy)/2.54, "LINE"); addpoint((x[147]+siirtox)/2.54, (y[147]+siirtoy)/2.54, "xarc_start"); addpoint((x[143]+siirtox)/2.54, (y[143]+siirtoy)/2.54, "xarc_corner"); addpoint((x[145]+siirtox)/2.54, (y[145]+siirtoy)/2.54, "LINE"); group_obj[112]=current_object; if(pocket==0) { if (language == 0) { current_object=newobject("text","Pocket piece, Cut 2",0.0,0.2,0.2,"SIMP.CHR"); } } else { if (language == 0) { current_object=newobject("text","Pocket bag, Cut 4",0.0,0.2,0.2,"SIMP.CHR"); } } addpoint((x[144]+1+siirtox)/2.54, (y[144]+siirtoy)/2.54, "line"); group_obj[113]=current_object; if(sv>0) { if(pocket!=0) { sv = 2*sv; } offset_mark(112); if(pocket!=0) { sv = sv/2; } select(current_selection,group_obj[113]); group(current_selection); deselect(current_selection); } else { mark(112); current_selection=newselection("OBJECT"); select(current_selection,group_obj[112]); select(current_selection,group_obj[113]); group(current_selection); deselect(current_selection); } siirtoy=siirtoy+10; if(pocket==1) { current_object=newobject("poly"); if(slant==2) { rotate (140,141,ang_tasku); rotate (154,155,ang_tasku); addpoint((x[140]+siirtox)/2.54, (y[140]+siirtoy)/2.54, "open"); addpoint((x[154]+siirtox)/2.54, (y[154]+siirtoy)/2.54, "line"); rotate (140,141,-ang_tasku); rotate (154,155,-ang_tasku); } else { addpoint((x[140]+siirtox)/2.54, (y[140]+siirtoy)/2.54, "open"); addpoint((x[154]+siirtox)/2.54, (y[154]+siirtoy)/2.54, "line"); } if(slant==1) { rotate (141,140,-ang_tasku); rotate (155,154,-ang_tasku); addpoint((x[155]+siirtox)/2.54, (y[155]+siirtoy)/2.54, "line"); addpoint((x[141]+siirtox)/2.54, (y[141]+siirtoy)/2.54, "line"); rotate (141,140,ang_tasku); rotate (155,154,ang_tasku); } else { addpoint((x[155]+siirtox)/2.54, (y[155]+siirtoy)/2.54, "line"); addpoint((x[141]+siirtox)/2.54, (y[141]+siirtoy)/2.54, "line"); } group_obj[114]=current_object; if(slant==1) { rotate (141,140,-ang_tasku); } if(slant==2) { rotate (140,141,ang_tasku); } current_object=newobj_dot((x[140]+siirtox)/2.54, (y[140]+siirtoy)/2.54); addpoint((x[141]+siirtox)/2.54, (y[141]+siirtoy)/2.54, "open"); group_obj[115]=current_object; if(slant==1) { rotate (141,140,ang_tasku); } if(slant==2) { rotate (140,141,-ang_tasku); } if (language == 0) { current_object=newobject("text","Pocket welt, Cut 2 on fold",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[140]+1+siirtox)/2.54, (y[140]-2+siirtoy)/2.54, "line"); group_obj[116]=current_object; if(sv>0) { offset_mark(114); select(current_selection,group_obj[115]); select(current_selection,group_obj[116]); group(current_selection); deselect(current_selection); } else { mark(114); current_selection=newselection("object"); select(current_selection,group_obj[114]); select(current_selection,group_obj[115]); select(current_selection,group_obj[116]); group(current_selection); deselect(current_selection); } } if (pocket==2) { current_object=newobject("poly"); addpoint((x[156]+siirtox)/2.54, (y[156]+siirtoy)/2.54, "line"); addpoint((x[157]+siirtox)/2.54, (y[157]+siirtoy)/2.54, "line"); addpoint((x[159]+siirtox)/2.54, (y[159]+siirtoy)/2.54, "line"); addpoint((x[158]+siirtox)/2.54, (y[158]+siirtoy)/2.54, "line"); group_obj[117]=current_object; if (language == 0) { current_object=newobject("text","Buttonhole Pocket mouth strip, cut 4",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[156]+1+siirtox)/2.54, (y[156]-1+siirtoy)/2.54, "line"); group_obj[118]=current_object; current_selection=newselection("object"); select(current_selection,group_obj[117]); select(current_selection,group_obj[118]); group(current_selection); deselect(current_selection); } if(pocket==3) { current_object=newobject("poly"); if(slant==0) { addpoint((x[141]+siirtox)/2.54, (y[141]+siirtoy)/2.54, "open"); addpoint((x[151]+siirtox)/2.54, (y[151]+siirtoy)/2.54, "xarc_start"); addpoint((x[149]+siirtox)/2.54, (y[149]+siirtoy)/2.54, "xarc_corner"); addpoint((x[153]+siirtox)/2.54, (y[153]+siirtoy)/2.54, "line"); addpoint((x[152]+siirtox)/2.54, (y[152]+siirtoy)/2.54, "xarc_start"); addpoint((x[148]+siirtox)/2.54, (y[148]+siirtoy)/2.54, "xarc_corner"); addpoint((x[150]+siirtox)/2.54, (y[150]+siirtoy)/2.54, "line"); addpoint((x[140]+siirtox)/2.54, (y[140]+siirtoy)/2.54, "line"); } if(slant==1) { rotate (141,140,-ang_tasku); rotate (151,150,-ang_tasku); rotate (149,148,-ang_tasku); rotate (153,152,-ang_tasku); addpoint((x[141]+siirtox)/2.54, (y[141]+siirtoy)/2.54, "open"); addpoint((x[151]+siirtox)/2.54, (y[151]+siirtoy)/2.54, "xarc_start"); addpoint((x[149]+siirtox)/2.54, (y[149]+siirtoy)/2.54, "xarc_corner"); addpoint((x[153]+siirtox)/2.54, (y[153]+siirtoy)/2.54, "line"); addpoint((x[152]+siirtox)/2.54, (y[152]+siirtoy)/2.54, "xarc_start"); addpoint((x[148]+siirtox)/2.54, (y[148]+siirtoy)/2.54, "xarc_corner"); addpoint((x[150]+siirtox)/2.54, (y[150]+siirtoy)/2.54, "line"); addpoint((x[140]+siirtox)/2.54, (y[140]+siirtoy)/2.54, "line"); rotate (141,140,ang_tasku); rotate (151,150,ang_tasku); rotate (149,148,ang_tasku); rotate (153,152,ang_tasku); } if(slant==2) { rotate (140,141,ang_tasku); rotate (150,151,ang_tasku); rotate (148,149,ang_tasku); rotate (152,153,ang_tasku); addpoint((x[141]+siirtox)/2.54, (y[141]+siirtoy)/2.54, "open"); addpoint((x[151]+siirtox)/2.54, (y[151]+siirtoy)/2.54, "xarc_start"); addpoint((x[149]+siirtox)/2.54, (y[149]+siirtoy)/2.54, "xarc_corner"); addpoint((x[153]+siirtox)/2.54, (y[153]+siirtoy)/2.54, "line"); addpoint((x[152]+siirtox)/2.54, (y[152]+siirtoy)/2.54, "xarc_start"); addpoint((x[148]+siirtox)/2.54, (y[148]+siirtoy)/2.54, "xarc_corner"); addpoint((x[150]+siirtox)/2.54, (y[150]+siirtoy)/2.54, "line"); addpoint((x[140]+siirtox)/2.54, (y[140]+siirtoy)/2.54, "line"); rotate (140,141,-ang_tasku); rotate (150,151,-ang_tasku); rotate (148,149,-ang_tasku); rotate (152,153,-ang_tasku); } group_obj[118]=current_object; if(slant==1) { rotate (141,140,-ang_tasku); } if(slant==2) { rotate (140,141,ang_tasku); } current_object=newobj_dot((x[141]+siirtox)/2.54, (y[141]+siirtoy)/2.54); addpoint((x[140]+siirtox)/2.54, (y[140]+siirtoy)/2.54, "open"); group_obj[119]=current_object; if(slant==1) { rotate (141,140,ang_tasku); } if(slant==2) { rotate (140,141,-ang_tasku); } if (language == 0) { current_object=newobject("text","Pocket flap, cut 4",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[140]+1+siirtox)/2.54, (y[140]-1+siirtoy)/2.54, "line"); group_obj[120]=current_object; if(sv>0) { offset_mark(118); select(current_selection,group_obj[119]); select(current_selection,group_obj[120]); group(current_selection); deselect(current_selection); } else { mark(118); current_selection=newselection("object"); select(current_selection,group_obj[118]); select(current_selection,group_obj[119]); select(current_selection,group_obj[120]); group(current_selection); deselect(current_selection); } } } siirtox=0; siirtoy=0; if(collar<3) { current_object=newobject("poly"); addpoint((x[104]-NV)/2.54, (y[104])/2.54, "line"); addpoint((x[232])/2.54, (y[232])/2.54, "line"); group_obj[21]=current_object; } if(collar==0) { if (language == 0) { current_object=newobject("text","Collar",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[202]+0.3+siirtox)/2.54, (y[202]-1)/2.54, "line"); group_obj[23]=current_object; } if(model==0) { current_object=newobject("poly"); if(collar==0) { addpoint((x[131])/2.54, (y[131])/2.54, "line"); addpoint((x[31])/2.54, (y[31])/2.54, "xarc_start"); addpoint((x[23])/2.54, (y[23])/2.54, "xarc_corner"); current_point=addpoint((x[202])/2.54, (y[202])/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[102])/2.54, (y[102])/2.54, "xarc_start"); addpoint((x[204]-nv)/2.54, (y[204])/2.54, "xarc_corner"); addpoint((x[104]-nv)/2.54, (y[104])/2.54, "line"); current_point=addpoint((x[4]-nv)/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(collar==1) { addpoint((x[131])/2.54, (y[131])/2.54, "line"); addpoint((x[31])/2.54, (y[31])/2.54, "line"); addpoint((x[302])/2.54, (y[302])/2.54, "line"); addpoint((x[303])/2.54, (y[303])/2.54, "line"); addpoint((x[304])/2.54, (y[304])/2.54, "line"); center(304,306,305); addpoint((x[305])/2.54, (y[305])/2.54, "xarc_start"); addpoint((x[306])/2.54, (y[306])/2.54, "xarc_corner"); x[204]=x[204]-nv; center(306,204,518); addpoint((x[518])/2.54, (y[518])/2.54, "xarc_start"); x[204]=x[204]+nv; addpoint((x[204]-nv)/2.54, (y[204])/2.54, "xarc_corner"); addpoint((x[104]-nv)/2.54, (y[104])/2.54, "line"); current_point= addpoint((x[4]-nv)/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(collar==2) { addpoint((x[131])/2.54, (y[131])/2.54, "line"); addpoint((x[31])/2.54, (y[31])/2.54, "line"); addpoint((x[302])/2.54, (y[302])/2.54, "line"); addpoint((x[303])/2.54, (y[303])/2.54, "line"); addpoint((x[304])/2.54, (y[304])/2.54, "line"); center(304,306,305); addpoint((x[305])/2.54, (y[305])/2.54, "xarc_start"); addpoint((x[306])/2.54, (y[306])/2.54, "xarc_corner"); x[204]=x[204]-nv; center(306,204,402); addpoint((x[402])/2.54, (y[402])/2.54, "xarc_start"); x[204]=x[204]+nv; addpoint((x[204]-nv)/2.54, (y[204])/2.54, "xarc_corner"); addpoint((x[204]-nv)/2.54, (y[104])/2.54, "line"); current_point= addpoint((x[204]-nv)/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(collar==3) { addpoint((x[131])/2.54, (y[131])/2.54, "line"); addpoint((x[31])/2.54, (y[31])/2.54, "xarc_start"); addpoint((x[23])/2.54, (y[23])/2.54, "xarc_corner"); addpoint((x[3]-nv)/2.54, (y[102])/2.54, "line"); current_point=addpoint((x[3]-nv)/2.54, (y[3])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[4]-nv)/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(collar==4) { addpoint((x[131])/2.54, (y[131])/2.54, "line"); addpoint((x[31])/2.54, (y[31])/2.54, "line"); addpoint((x[23])/2.54, (y[23])/2.54, "line"); addpoint((x[3]-nv)/2.54, (y[102])/2.54, "line"); current_point=addpoint((x[3]-nv)/2.54, (y[3])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[4]-nv)/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(collar==5) { addpoint((x[131])/2.54, (y[131])/2.54, "line"); addpoint((x[31])/2.54, (y[31])/2.54, "xarc_start"); addpoint((x[23]-4)/2.54, (y[23])/2.54, "xarc_corner"); addpoint((x[102]-nv)/2.54, (y[102])/2.54, "line"); current_point= addpoint((x[3]-nv)/2.54, (y[3])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point= addpoint((x[4]-nv)/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(collar==6) { addpoint((x[131])/2.54, (y[131])/2.54, "line"); addpoint((x[31])/2.54, (y[31])/2.54, "xarc_start"); addpoint((x[23])/2.54, (y[23])/2.54, "xarc_corner"); addpoint((x[3]-nv)/2.54, (y[102])/2.54, "line"); current_point= addpoint((x[3]-nv)/2.54, (y[3])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point= addpoint((x[4]-nv)/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(pit>alk) { if(collar==2) { current_point=addpoint((x[204]-nv)/2.54, (y[5])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[204]-nv)/2.54, (y[6])/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[204]-nv)/2.54, (y[6]-pit+alk)/2.54, "line"); } else { current_point=addpoint((x[5]-nv)/2.54, (y[5])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[6]-nv)/2.54, (y[6])/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[6]-nv)/2.54, (y[6]-pit+alk)/2.54, "line"); } addpoint((x[38])/2.54, (y[38]-pit+alk)/2.54, "line"); current_point=addpoint((x[38])/2.54, (y[38])/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[39])/2.54, (y[39])/2.54, "line"); current_point=addpoint((x[40])/2.54, (y[40])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[30])/2.54, (y[30])/2.54, "line"); notch_type(current_point,"NOTCH",0); } else { if(pit>ylk) { if(collar==2) { current_point=addpoint((x[204]-nv)/2.54, (y[5])/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[204]-nv)/2.54, (y[190])/2.54, "line"); } else { current_point=addpoint((x[5]-nv)/2.54, (y[5])/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[190]-nv)/2.54, (y[190])/2.54, "line"); } addpoint((x[198])/2.54, (y[198])/2.54, "line"); current_point=addpoint((x[40])/2.54, (y[40])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[30])/2.54, (y[30])/2.54, "line"); notch_type(current_point,"NOTCH",0); } else { if(collar==2) { addpoint((x[204]-nv)/2.54, (y[190])/2.54, "line"); } else { addpoint((x[190]-nv)/2.54, (y[190])/2.54, "line"); } addpoint((x[192])/2.54, (y[192])/2.54, "line"); current_point=addpoint((x[40])/2.54, (y[40])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[30])/2.54, (y[30])/2.54, "line"); notch_type(current_point,"NOTCH",0); } } group_obj[24]=current_object; if(sv>0) { offset_mark(24); select(current_selection,group_obj[2]); select(current_selection,group_obj[1]); select(current_selection,group_obj[8]); if(pocket==0) { select(current_selection,group_obj[109]); } if(pocket==1) { select(current_selection,group_obj[110]); } if(pocket==2) { select(current_selection,group_obj[110]); select(current_selection,group_obj[111]); } if(pocket==3) { select(current_selection,group_obj[110]); } if(collar<3) { select(current_selection,group_obj[21]); } if(collar==0) { select(current_selection, group_obj[23]); } group(current_selection); deselect(current_selection); } else { mark(24); current_selection=newselection("OBJECT"); select(current_selection,group_obj[24]); select(current_selection,group_obj[1]); select(current_selection,group_obj[8]); if(pocket==0) { select(current_selection,group_obj[109]); } if(pocket==1) { select(current_selection,group_obj[110]); } if(pocket==2) { select(current_selection,group_obj[110]); select(current_selection,group_obj[111]); } if(pocket==3) { select(current_selection,group_obj[110]); } if(collar<3) { select(current_selection,group_obj[21]); } if(collar==0) { select(current_selection, group_obj[23]); } group(current_selection); deselect(current_selection); } current_object=newobject("poly"); if(sleeve==2) { addpoint((x[11])/2.54, (y[11])/2.54, "xarc_start"); addpoint((x[10])/2.54, (y[10])/2.54, "xarc_corner"); } else { addpoint((x[11])/2.54, (y[11])/2.54, "xarc_start"); addpoint((x[10])/2.54, (y[10])/2.54, "xarc_corner"); addpoint((x[34])/2.54, (y[34])/2.54, "xarc_start"); addpoint((x[36])/2.54, (y[36])/2.54, "xarc_corner"); } addpoint((x[33])/2.54, (y[33])/2.54, "line"); addpoint((x[132])/2.54, (y[132])/2.54, "xarc_start"); cont(132,30,130,-2); x[130]=x[30]; addpoint((x[130])/2.54, (y[130])/2.54, "xarc_corner"); cont(41,30,230,-2); current_point=addpoint((x[30])/2.54, (y[30])/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[230])/2.54, (y[230])/2.54, "line"); current_point=addpoint((x[41])/2.54, (y[41])/2.54, "line"); notch_type(current_point,"NOTCH",1); if(pit>alk) { addpoint((x[39])/2.54, (y[39])/2.54, "line"); current_point=addpoint((x[38])/2.54, (y[38])/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[38])/2.54, (y[38]-pit+alk)/2.54, "line"); addpoint((x[52])/2.54, (y[52]-pit+alk)/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[52])/2.54, (y[52])/2.54, "xarc_start"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[51])/2.54, (y[51])/2.54, "xarc_corner"); notch_type(current_point,"NOTCH",1); addpoint((x[251])/2.54, (y[251])/2.54, "xarc_start"); current_point=addpoint((x[50])/2.54, (y[50])/2.54, "xarc_corner"); notch_type(current_point,"NOTCH",1); addpoint((x[111])/2.54, (y[111])/2.54, "line"); } else { if(pit>ylk) { addpoint((x[198])/2.54, (y[198])/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[200])/2.54, (y[200])/2.54, "xarc_start"); addpoint((x[51])/2.54, (y[51])/2.54, "xarc_corner"); notch_type(current_point,"NOTCH",1); addpoint((x[251])/2.54, (y[251])/2.54, "xarc_start"); addpoint((x[50])/2.54, (y[50])/2.54, "xarc_corner"); notch_type(current_point,"NOTCH",1); addpoint((x[111])/2.54, (y[111])/2.54, "line"); } else { addpoint((x[193])/2.54, (y[190])/2.54, "line"); addpoint((x[194])/2.54, (y[194])/2.54, "xarc_start"); current_point=addpoint((x[50])/2.54, (y[50])/2.54, "xarc_corner"); notch_type(current_point,"NOTCH",1); } } group_obj[25]=current_object; current_object=newobject("poly"); addpoint((x[10]-5)/2.54, (y[10]-5)/2.54, "line"); addpoint((x[10]-5)/2.54, (y[51])/2.54, "open"); group_obj[26]=current_object; if (language == 0) { current_object=newobject("text","Front side piece, Cut 2, Grainline",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[10]-5+0.2+siirtox)/2.54, (y[4])/2.54, "line"); group_obj[27]=current_object; if(sv>0) { offset_mark(25); select(current_selection,group_obj[26]); select(current_selection,group_obj[27]); group(current_selection); deselect(current_selection); } else { mark(25); current_selection=newselection("OBJECT"); select(current_selection,group_obj[25]); select(current_selection,group_obj[26]); select(current_selection,group_obj[27]); group(current_selection); deselect(current_selection); } current_object=newobject("poly"); current_point=addpoint((x[248]+4)/2.54, (y[248])/2.54, "xarc_start"); current_point=addpoint((x[49]+4)/2.54, (y[49])/2.54, "xarc_corner"); current_point=addpoint((x[249]+4)/2.54, (y[249])/2.54, "line"); if(sleeve==2) { addpoint((x[54]+4)/2.54, (y[54])/2.54, "xarc_start"); addpoint((x[53]+4)/2.54, (y[53])/2.54, "xarc_corner"); addpoint((x[26]+4)/2.54, (y[26])/2.54, "line"); } else { addpoint((x[54]+4)/2.54, (y[54])/2.54, "xarc_start"); addpoint((x[53]+4)/2.54, (y[53])/2.54, "xarc_corner"); addpoint((x[35]+4)/2.54, (y[35])/2.54, "xarc_start"); addpoint((x[37]+4)/2.54, (y[37])/2.54, "xarc_corner"); addpoint((x[26]+4)/2.54, (y[26])/2.54, "line"); } addpoint((x[129]+4)/2.54, (y[129])/2.54, "xarc_start"); addpoint((x[28]+4)/2.54, (y[28])/2.54, "xarc_corner"); current_point=addpoint((x[45]+4)/2.54, (y[45])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[44]+4)/2.54, (y[44])/2.54, "line"); notch_type(current_point,"NOTCH",0); if(pit>alk) { addpoint((x[43]+4)/2.54, (y[43])/2.54, "line"); addpoint((x[42]+4)/2.54, (y[42])/2.54, "line"); addpoint((x[42]+4)/2.54, (y[42]-pit+alk)/2.54, "line"); addpoint((x[47]+4)/2.54, (y[47]-pit+alk)/2.54, "line"); addpoint((x[47]+4)/2.54, (y[47])/2.54, "xarc_start"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[48]+4)/2.54, (y[48])/2.54, "xarc_corner"); } else { if(pit>ylk) { addpoint((x[201]+4)/2.54, (y[201])/2.54, "line"); addpoint((x[199]+4)/2.54, (y[199])/2.54, "xarc_start"); addpoint((x[48]+4)/2.54, (y[48])/2.54, "xarc_corner"); notch_type(current_point,"NOTCH",1); } else { addpoint((x[196]+4)/2.54, (y[196])/2.54, "line"); addpoint((x[195]+4)/2.54, (y[195])/2.54, "line"); } } group_obj[28]=current_object; current_object=newobject("poly"); addpoint((x[9]+2+4+siirtox)/2.54, (y[10]-5)/2.54, "line"); addpoint((x[9]+2+4+siirtox)/2.54, (y[51])/2.54, "open"); group_obj[29]=current_object; if (language == 0) { current_object=newobject("text","Back side piece, Cut 2, Grainline",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[9]+2+4+0.2+siirtox)/2.54, (y[4])/2.54, "line"); group_obj[30]=current_object; if(sv>0) { offset_mark(28); select(current_selection,group_obj[29]); select(current_selection,group_obj[30]); group(current_selection); deselect(current_selection); } else { mark(28); current_selection=newselection("OBJECT"); select(current_selection,group_obj[28]); select(current_selection,group_obj[29]); select(current_selection,group_obj[30]); group(current_selection); deselect(current_selection); } current_object=newobject("poly"); current_point=addpoint((x[46]+4)/2.54, (y[46])/2.54, "line"); notch_type(current_point,"NOTCH",0); addpoint((x[45]+4)/2.54, (y[45])/2.54, "xarc_start"); addpoint((x[28]+4)/2.54, (y[28])/2.54, "xarc_corner"); addpoint((x[127]+4)/2.54, (y[127])/2.54, "line"); addpoint((x[22]+4)/2.54, (y[22])/2.54, "xarc_start"); addpoint((x[122]+4)/2.54, (y[122])/2.54, "xarc_corner"); addpoint((x[21]+4)/2.54, (y[21])/2.54, "line"); addpoint((x[12]+4)/2.54, (y[12]+dist(12,21)/2)/2.54, "line"); current_point=addpoint((x[13]-1.5+4)/2.54, (y[13])/2.54, "line"); notch_type(current_point,"NOTCH",0); if (pit>alk) { addpoint((x[14]-1+4)/2.54, (y[14])/2.54, "line"); addpoint((x[15]-1+4)/2.54, (y[15]-pit+alk)/2.54, "line"); addpoint((x[42]+4)/2.54, (y[42]-pit+alk)/2.54, "line"); current_point=addpoint((x[42]+4)/2.54, (y[42])/2.54, "line"); notch_type(current_point,"NOTCH",0); addpoint((x[43]+4)/2.54, (y[43])/2.54, "line"); } else { if(pit>ylk) { addpoint((x[14]-1+4)/2.54, (y[14])/2.54, "line"); addpoint((x[191]-1+4)/2.54, (y[191])/2.54, "line"); addpoint((x[201]+4)/2.54, (y[201])/2.54, "line"); } else { addpoint((x[191]-1.5+4)/2.54, (y[191])/2.54, "line"); addpoint((x[197]+4)/2.54, (y[197])/2.54, "line"); } } group_obj[31]=current_object; current_object=newobject("poly"); addpoint((x[46]+2+4+siirtox)/2.54, (y[10]-5)/2.54, "line"); addpoint((x[46]+2+4+siirtox)/2.54, (y[51])/2.54, "open"); group_obj[32]=current_object; if (language == 0) { current_object=newobject("text","Back Center piece, Cut 2, Grainline",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[46]+2+4+0.2+siirtox)/2.54, (y[4])/2.54, "line"); group_obj[33]=current_object; if (language == 0) { current_object=newobject("text","Center Back",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[21]-2+4+siirtox)/2.54, (y[12])/2.54, "line"); group_obj[34]=current_object; if(sv>0) { if (language == 0) { current_object=newobject("text","Check hem seam allowance",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[35]+4+siirtox)/2.54, (y[38]+1.2-pit+alk)/2.54, "line"); group_obj[35]=current_object; offset_mark(31); select(current_selection,group_obj[32]); select(current_selection,group_obj[33]); select(current_selection,group_obj[34]); select(current_selection,group_obj[35]); group(current_selection); deselect(current_selection); } else { mark(31); current_selection=newselection("OBJECT"); select(current_selection,group_obj[31]); select(current_selection,group_obj[32]); select(current_selection,group_obj[33]); select(current_selection,group_obj[34]); group(current_selection); deselect(current_selection); } } if(model==1) { ang=angle(x[30],y[30],x[131],y[131])-angle(x[30],y[30],x[132],y[132]); rotate(132,30,ang); rotate(33,30,ang); rotate(36,30,ang); rotate(34,30,ang); rotate(10,30,ang); rotate(11,30,ang); rotate(310,30,ang); rotate(506,30,ang); rotate(507,30,ang); ang2=angle(x[131],y[131],x[500],y[500])-angle(x[131],y[131],x[500]-flare,y[500]); rotate(33,131,ang2); rotate(36,131,ang2); rotate(34,131,ang2); rotate(10,131,ang2); rotate(11,131,ang2); rotate(310,131,ang2); rotate(30,131,ang2); rotate(311,131,ang2); rotate(501,131,ang2); rotate(500,131,ang2); rotate(507,30,ang2); current_object=newobject("poly"); if(collar==0) { addpoint((x[31])/2.54, (y[31])/2.54, "xarc_start"); addpoint((x[23])/2.54, (y[23])/2.54, "xarc_corner"); current_point=addpoint((x[202])/2.54, (y[202])/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[102])/2.54, (y[102])/2.54, "xarc_start"); addpoint((x[204]-nv)/2.54, (y[204])/2.54, "xarc_corner"); addpoint((x[104]-nv)/2.54, (y[104])/2.54, "line"); current_point=addpoint((x[4]-nv)/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(collar==1) { addpoint((x[31])/2.54, (y[31])/2.54, "line"); addpoint((x[302])/2.54, (y[302])/2.54, "line"); addpoint((x[303])/2.54, (y[303])/2.54, "line"); addpoint((x[304])/2.54, (y[304])/2.54, "line"); center(304,306,305); addpoint((x[305])/2.54, (y[305])/2.54, "xarc_start"); addpoint((x[306])/2.54, (y[306])/2.54, "xarc_corner"); x[204]=x[204]-nv; center(306,204,518); addpoint((x[518])/2.54, (y[518])/2.54, "xarc_start"); x[204]=x[204]+nv; addpoint((x[204]-nv)/2.54, (y[204])/2.54, "xarc_corner"); addpoint((x[104]-nv)/2.54, (y[104])/2.54, "line"); current_point= addpoint((x[4]-nv)/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(collar==2) { addpoint((x[31])/2.54, (y[31])/2.54, "line"); addpoint((x[302])/2.54, (y[302])/2.54, "line"); addpoint((x[303])/2.54, (y[303])/2.54, "line"); addpoint((x[304])/2.54, (y[304])/2.54, "line"); center(304,306,305); addpoint((x[305])/2.54, (y[305])/2.54, "xarc_start"); addpoint((x[306])/2.54, (y[306])/2.54, "xarc_corner"); x[204]=x[204]-nv; center(306,204,518); addpoint((x[518])/2.54, (y[518])/2.54, "xarc_start"); x[204]=x[204]+nv; addpoint((x[204]-nv)/2.54, (y[204])/2.54, "xarc_corner"); addpoint((x[204]-nv)/2.54, (y[104])/2.54, "line"); current_point= addpoint((x[204]-nv)/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(collar==3) { addpoint((x[31])/2.54, (y[31])/2.54, "xarc_start"); addpoint((x[23])/2.54, (y[23])/2.54, "xarc_corner"); addpoint((x[3])/2.54, (y[102])/2.54, "line"); addpoint((x[3]-nv)/2.54, (y[102])/2.54, "line"); current_point=addpoint((x[3]-nv)/2.54, (y[3])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[4]-nv)/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(collar==4) { addpoint((x[31])/2.54, (y[31])/2.54, "line"); addpoint((x[23])/2.54, (y[23])/2.54, "line"); addpoint((x[3])/2.54, (y[102])/2.54, "line"); addpoint((x[3]-nv)/2.54, (y[102])/2.54, "line"); current_point=addpoint((x[3]-nv)/2.54, (y[3])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[4]-nv)/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(collar==5) { addpoint((x[31])/2.54, (y[31])/2.54, "xarc_start"); addpoint((x[23]-4)/2.54, (y[23])/2.54, "xarc_corner"); addpoint((x[102]-nv)/2.54, (y[102])/2.54, "line"); current_point= addpoint((x[3]-nv)/2.54, (y[3])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point= addpoint((x[4]-nv)/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(collar==6) { addpoint((x[31])/2.54, (y[31])/2.54, "xarc_start"); addpoint((x[23])/2.54, (y[23])/2.54, "xarc_corner"); addpoint((x[3])/2.54, (y[102])/2.54, "line"); addpoint((x[3]-nv)/2.54, (y[102])/2.54, "line"); current_point= addpoint((x[3]-nv)/2.54, (y[3])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point= addpoint((x[4]-nv)/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(collar==2) { current_point=addpoint((x[204]-nv)/2.54, (y[5])/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[204]-nv)/2.54, (y[6]-pit+alk)/2.54, "line"); } else { current_point=addpoint((x[5]-nv)/2.54, (y[5])/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[6]-nv)/2.54, (y[6]-pit+alk)/2.54, "line"); } addpoint((x[38])/2.54, (y[38]-pit+alk)/2.54, "xarc_start"); addpoint((x[500])/2.54, (y[500])/2.54, "xarc_corner"); addpoint((x[501])/2.54, (y[501])/2.54, "line"); addpoint((x[311])/2.54, (y[311])/2.54, "line"); addpoint((x[30]+2)/2.54, (y[30])/2.54, "line"); addpoint((x[310])/2.54, (y[310])/2.54, "line"); if(sleeve==2) { addpoint((x[11])/2.54, (y[11])/2.54, "xarc_start"); addpoint((x[10])/2.54, (y[10])/2.54, "xarc_corner"); } else { addpoint((x[11])/2.54, (y[11])/2.54, "xarc_start"); addpoint((x[10])/2.54, (y[10])/2.54, "xarc_corner"); addpoint((x[34])/2.54, (y[34])/2.54, "xarc_start"); addpoint((x[36])/2.54, (y[36])/2.54, "xarc_corner"); } addpoint((x[33])/2.54, (y[33])/2.54, "line"); group_obj[36]=current_object; if(collar==0) { if (language == 0) { current_object=newobject("text","Collar",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[202]+0.3+siirtox)/2.54, (y[202]-1)/2.54, "line"); group_obj[37]=current_object; } current_object=newobject("poly"); addpoint((x[131])/2.54, (y[131])/2.54, "xarc_start"); addpoint((x[515])/2.54, (y[515])/2.54, "open"); group_obj[38]=current_object; if (language == 0) { current_object=newobject("text","Cut here for Front Facing",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[516]+2+siirtox)/2.54, (y[516]-5)/2.54, "line"); group_obj[39]=current_object; if(sv>0) { offset_mark(36); select(current_selection,group_obj[2]); select(current_selection,group_obj[1]); select(current_selection,group_obj[8]); if(collar<3) { select(current_selection,group_obj[21]); } if(pocket==0) { select(current_selection,group_obj[109]); } if(pocket==1) { select(current_selection,group_obj[110]); } if(pocket==2) { select(current_selection,group_obj[110]); select(current_selection,group_obj[111]); } if(pocket==3) { select(current_selection,group_obj[110]); } if(collar==0) { select(current_selection, group_obj[37]); } select(current_selection,group_obj[38]); select(current_selection,group_obj[39]); group(current_selection); deselect(current_selection); } else { mark(36); current_selection=newselection("OBJECT"); select(current_selection,group_obj[1]); select(current_selection,group_obj[8]); if(collar<3) { select(current_selection,group_obj[21]); } if(pocket==0) { select(current_selection,group_obj[109]); } if(pocket==1) { select(current_selection,group_obj[110]); } if(pocket==2) { select(current_selection,group_obj[110]); select(current_selection,group_obj[111]); } if(pocket==3) { select(current_selection,group_obj[110]); } select(current_selection,group_obj[36]); if(collar==0) { select(current_selection, group_obj[37]); } select(current_selection,group_obj[38]); select(current_selection,group_obj[39]); group(current_selection); deselect(current_selection); } ang=angle(x[30],y[30],x[131],y[131])-angle(x[30],y[30],x[132],y[132]); rotate(132,30,-ang); rotate(33,30,-ang); rotate(36,30,-ang); rotate(34,30,-ang); rotate(10,30,-ang); rotate(11,30,-ang); rotate(310,30,-ang); rotate(506,30,-ang); rotate(507,30,-ang); ang2=angle(x[131],y[131],x[500],y[500])-angle(x[131],y[131],x[500]-flare,y[500]); rotate(33,131,-ang2); rotate(36,131,-ang2); rotate(34,131,-ang2); rotate(10,131,-ang2); rotate(11,131,-ang2); rotate(310,131,-ang2); rotate(30,131,-ang2); rotate(311,131,-ang2); rotate(501,131,-ang2); rotate(500,131,-ang2); rotate(507,30,-ang2); ang=angle(x[127],y[127],x[502],y[502])-angle(x[127],y[127],x[502]+flare,y[502]); rotate(26,127,ang); rotate(37,127,ang); rotate(35,127,ang); rotate(502,127,ang); rotate(503,127,ang); rotate(508,127,ang); rotate(53,127,ang); rotate(54,127,ang); current_object=newobject("poly"); addpoint((x[21]+4)/2.54, (y[21])/2.54, "xarc_start"); addpoint((x[122]+4)/2.54, (y[122])/2.54, "xarc_corner"); addpoint((x[22]+4)/2.54, (y[22])/2.54, "line"); if(sleeve==2) { addpoint((x[26]+4)/2.54, (y[26])/2.54, "xarc_start"); addpoint((x[53]+4)/2.54, (y[53])/2.54, "xarc_corner"); addpoint((x[54]+4)/2.54, (y[54])/2.54, "line"); } else { addpoint((x[26]+4)/2.54, (y[26])/2.54, "xarc_start"); addpoint((x[37]+4)/2.54, (y[37])/2.54, "xarc_corner"); addpoint((x[35]+4)/2.54, (y[35])/2.54, "xarc_start"); addpoint((x[53]+4)/2.54, (y[53])/2.54, "xarc_corner"); addpoint((x[54]+4)/2.54, (y[54])/2.54, "line"); } addpoint((x[503]+4)/2.54, (y[503])/2.54, "xarc_start"); addpoint((x[502]+4)/2.54, (y[502])/2.54, "xarc_corner"); addpoint((x[15]+4)/2.54, (y[15]-pit+alk)/2.54, "open"); group_obj[41]=current_object; current_object=newobj_dot((x[15]+4)/2.54, (y[15]-pit+alk)/2.54); addpoint((x[21]+4)/2.54, (y[21])/2.54, "open"); group_obj[42]=current_object; if (language == 0) { current_object=newobject("text","Back piece, Cut 1 on fold, Grainline, CB",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[13]-1+4+0.2+siirtox)/2.54, (y[4])/2.54, "line"); group_obj[43]=current_object; if(sv>0) { if (language == 0) { current_object=newobject("text","Check hem seam allowance",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[35]+4+siirtox)/2.54, (y[38]+1.2-pit+alk)/2.54, "line"); group_obj[44]=current_object; } else { if (language == 0) { current_object=newobject("text","Back piece, Cut 1 on fold, Grainline, CB",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[12]-1+4+siirtox)/2.54, (y[37])/2.54, "line"); group_obj[45]=current_object; } if(sv>0) { offset_mark(41); select(current_selection,group_obj[42]); select(current_selection,group_obj[43]); if(sv>0) { select(current_selection, group_obj[44]); } else { select(current_selection, group_obj[45]); } group(current_selection); deselect(current_selection); } else { mark(41); current_selection=newselection("OBJECT"); select(current_selection,group_obj[41]); select(current_selection,group_obj[42]); select(current_selection,group_obj[43]); select(current_selection, group_obj[45]); group(current_selection); deselect(current_selection); } ang=angle(x[127],y[127],x[502],y[502])-angle(x[127],y[127],x[502]+flare,y[502]); rotate(26,127,-ang); rotate(37,127,-ang); rotate(35,127,-ang); rotate(502,127,-ang); rotate(503,127,-ang); rotate(508,127,-ang); rotate(53,127,-ang); rotate(54,127,-ang); } if(model==2) { ang=angle(x[30],y[30],x[131],y[131])-angle(x[30],y[30],x[132],y[132]); rotate(132,30,ang); rotate(33,30,ang); rotate(36,30,ang); rotate(34,30,ang); rotate(10,30,ang); rotate(11,30,ang); rotate(310,30,ang); rotate(507,30,ang); current_object=newobject("poly"); if(collar==0) { addpoint((x[31])/2.54, (y[31])/2.54, "xarc_start"); addpoint((x[23])/2.54, (y[23])/2.54, "xarc_corner"); current_point=addpoint((x[202])/2.54, (y[202])/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[102])/2.54, (y[102])/2.54, "xarc_start"); addpoint((x[204]-nv)/2.54, (y[204])/2.54, "xarc_corner"); addpoint((x[104]-nv)/2.54, (y[104])/2.54, "line"); current_point=addpoint((x[4]-nv)/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(collar==1) { addpoint((x[31])/2.54, (y[31])/2.54, "line"); addpoint((x[302])/2.54, (y[302])/2.54, "line"); addpoint((x[303])/2.54, (y[303])/2.54, "line"); addpoint((x[304])/2.54, (y[304])/2.54, "line"); center(304,306,305); addpoint((x[305])/2.54, (y[305])/2.54, "xarc_start"); addpoint((x[306])/2.54, (y[306])/2.54, "xarc_corner"); x[204]=x[204]-nv; center(306,204,518); addpoint((x[518])/2.54, (y[518])/2.54, "xarc_start"); x[204]=x[204]+nv; addpoint((x[204]-nv)/2.54, (y[204])/2.54, "xarc_corner"); addpoint((x[104]-nv)/2.54, (y[104])/2.54, "line"); current_point= addpoint((x[4]-nv)/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(collar==2) { addpoint((x[31])/2.54, (y[31])/2.54, "line"); addpoint((x[302])/2.54, (y[302])/2.54, "line"); addpoint((x[303])/2.54, (y[303])/2.54, "line"); addpoint((x[304])/2.54, (y[304])/2.54, "line"); center(304,306,305); addpoint((x[305])/2.54, (y[305])/2.54, "xarc_start"); addpoint((x[306])/2.54, (y[306])/2.54, "xarc_corner"); x[204]=x[204]-nv; center(306,204,518); addpoint((x[518])/2.54, (y[518])/2.54, "xarc_start"); x[204]=x[204]+nv; addpoint((x[204]-nv)/2.54, (y[204])/2.54, "xarc_corner"); addpoint((x[204]-nv)/2.54, (y[104])/2.54, "line"); current_point= addpoint((x[204]-nv)/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(collar==3) { addpoint((x[31])/2.54, (y[31])/2.54, "xarc_start"); addpoint((x[23])/2.54, (y[23])/2.54, "xarc_corner"); addpoint((x[3])/2.54, (y[102])/2.54, "line"); addpoint((x[3]-nv)/2.54, (y[102])/2.54, "line"); current_point=addpoint((x[3]-nv)/2.54, (y[3])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[4]-nv)/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(collar==4) { addpoint((x[31])/2.54, (y[31])/2.54, "line"); addpoint((x[23])/2.54, (y[23])/2.54, "line"); addpoint((x[3])/2.54, (y[102])/2.54, "line"); addpoint((x[3]-nv)/2.54, (y[102])/2.54, "line"); current_point=addpoint((x[3]-nv)/2.54, (y[3])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[4]-nv)/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(collar==5) { addpoint((x[31])/2.54, (y[31])/2.54, "xarc_start"); addpoint((x[23]-4)/2.54, (y[23])/2.54, "xarc_corner"); addpoint((x[102]-nv)/2.54, (y[102])/2.54, "line"); current_point= addpoint((x[3]-nv)/2.54, (y[3])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point= addpoint((x[4]-nv)/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(collar==6) { addpoint((x[31])/2.54, (y[31])/2.54, "xarc_start"); addpoint((x[23])/2.54, (y[23])/2.54, "xarc_corner"); addpoint((x[3])/2.54, (y[102])/2.54, "line"); addpoint((x[3]-nv)/2.54, (y[102])/2.54, "line"); current_point= addpoint((x[3]-nv)/2.54, (y[3])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point= addpoint((x[4]-nv)/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(pit>alk) { if(collar==2) { current_point=addpoint((x[204]-nv)/2.54, (y[5])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[204]-nv)/2.54, (y[6])/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[204]-nv)/2.54, (y[6]-pit+alk)/2.54, "line"); } else { current_point=addpoint((x[5]-nv)/2.54, (y[5])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[6]-nv)/2.54, (y[6])/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[6]-nv)/2.54, (y[6]-pit+alk)/2.54, "line"); } addpoint((x[38])/2.54, (y[38]-pit+alk)/2.54, "line"); addpoint((x[52])/2.54, (y[52]-pit+alk)/2.54, "line"); addpoint((x[52])/2.54, (y[52])/2.54, "xarc_start"); notch_type(current_point,"NOTCH",1); addpoint((x[51])/2.54, (y[51])/2.54, "xarc_corner"); addpoint((x[251])/2.54, (y[251])/2.54, "line"); addpoint((x[111])/2.54, (y[111])/2.54, "line"); addpoint((x[311])/2.54, (y[311])/2.54, "line"); addpoint((x[30]+2)/2.54, (y[30])/2.54, "line"); addpoint((x[310])/2.54, (y[310])/2.54, "line"); if(sleeve==2) { addpoint((x[11])/2.54, (y[11])/2.54, "xarc_start"); addpoint((x[10])/2.54, (y[10])/2.54, "xarc_corner"); } else { addpoint((x[11])/2.54, (y[11])/2.54, "xarc_start"); addpoint((x[10])/2.54, (y[10])/2.54, "xarc_corner"); addpoint((x[34])/2.54, (y[34])/2.54, "xarc_start"); addpoint((x[36])/2.54, (y[36])/2.54, "xarc_corner"); } addpoint((x[33])/2.54, (y[33])/2.54, "line"); } else { if(pit>ylk) { if(collar==2) { current_point=addpoint((x[204]-nv)/2.54, (y[5])/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[204]-nv)/2.54, (y[190])/2.54, "line"); } else { current_point=addpoint((x[5]-nv)/2.54, (y[5])/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[190]-nv)/2.54, (y[190])/2.54, "line"); } addpoint((x[198])/2.54, (y[198])/2.54, "line"); addpoint((x[200])/2.54, (y[200])/2.54, "xarc_start"); addpoint((x[51])/2.54, (y[51])/2.54, "xarc_corner"); addpoint((x[251])/2.54, (y[251])/2.54, "line"); addpoint((x[111])/2.54, (y[111])/2.54, "line"); addpoint((x[311])/2.54, (y[311])/2.54, "line"); addpoint((x[30]+2)/2.54, (y[30])/2.54, "line"); addpoint((x[310])/2.54, (y[310])/2.54, "line"); addpoint((x[11])/2.54, (y[11])/2.54, "xarc_start"); addpoint((x[10])/2.54, (y[10])/2.54, "xarc_corner"); addpoint((x[34])/2.54, (y[34])/2.54, "xarc_start"); addpoint((x[36])/2.54, (y[36])/2.54, "xarc_corner"); addpoint((x[33])/2.54, (y[33])/2.54, "line"); } else { if(collar==2) { addpoint((x[204]-nv)/2.54, (y[190])/2.54, "line"); } else { addpoint((x[190]-nv)/2.54, (y[190])/2.54, "line"); } addpoint((x[192])/2.54, (y[192])/2.54, "line"); addpoint((x[194])/2.54, (y[194])/2.54, "line"); addpoint((x[251])/2.54, (y[251])/2.54, "line"); addpoint((x[111])/2.54, (y[111])/2.54, "line"); addpoint((x[311])/2.54, (y[311])/2.54, "line"); addpoint((x[30]+2)/2.54, (y[30])/2.54, "line"); addpoint((x[310])/2.54, (y[310])/2.54, "line"); if(sleeve==2) { addpoint((x[11])/2.54, (y[11])/2.54, "xarc_start"); addpoint((x[10])/2.54, (y[10])/2.54, "xarc_corner"); } else { addpoint((x[11])/2.54, (y[11])/2.54, "xarc_start"); addpoint((x[10])/2.54, (y[10])/2.54, "xarc_corner"); addpoint((x[34])/2.54, (y[34])/2.54, "xarc_start"); addpoint((x[36])/2.54, (y[36])/2.54, "xarc_corner"); } addpoint((x[33])/2.54, (y[33])/2.54, "line"); } } group_obj[46]=current_object; current_object=newobject("poly"); addpoint((x[30])/2.54, (y[30]-2)/2.54, "line"); addpoint((x[41])/2.54, (y[41])/2.54, "line"); if(pit0) { offset_mark(46); select(current_selection,group_obj[2]); select(current_selection,group_obj[1]); if(collar<3) { select(current_selection,group_obj[21]); } if(pocket==0) { select(current_selection,group_obj[109]); } if(pocket==1) { select(current_selection,group_obj[110]); } if(pocket==2) { select(current_selection,group_obj[110]); select(current_selection,group_obj[111]); } if(pocket==3) { select(current_selection,group_obj[110]); } select(current_selection,group_obj[8]); select(current_selection,group_obj[47]); select(current_selection,group_obj[48]); select(current_selection,group_obj[49]); group(current_selection); deselect(current_selection); } else { mark(46); current_selection=newselection("OBJECT"); select(current_selection,group_obj[1]); select(current_selection,group_obj[8]); if(collar<3) { select(current_selection,group_obj[21]); } if(pocket==0) { select(current_selection,group_obj[109]); } if(pocket==1) { select(current_selection,group_obj[110]); } if(pocket==2) { select(current_selection,group_obj[110]); select(current_selection,group_obj[111]); } if(pocket==3) { select(current_selection,group_obj[110]); } select(current_selection,group_obj[46]); select(current_selection,group_obj[47]); select(current_selection,group_obj[48]); select(current_selection,group_obj[49]); group(current_selection); deselect(current_selection); } ang=angle(x[30],y[30],x[131],y[131])-angle(x[30],y[30],x[132],y[132]); rotate(132,30,-ang); rotate(33,30,-ang); rotate(36,30,-ang); rotate(34,30,-ang); rotate(10,30,-ang); rotate(11,30,-ang); rotate(310,30,-ang); rotate(507,30,-ang); if((neck_width==1)||(neck_width==2)) { cont(22,26,510,-2); coord(510,26,0,0); } current_object=newobject("poly"); addpoint((x[14]-1+4)/2.54, (y[14])/2.54, "line"); addpoint((x[13]-1.5+4)/2.54, (y[13])/2.54, "line"); addpoint((x[12]+4)/2.54, (y[21]-dist(21,12)/2)/2.54, "line"); addpoint((x[21]+4)/2.54, (y[21])/2.54, "xarc_start"); addpoint((x[122]+4)/2.54, (y[122])/2.54, "xarc_corner"); addpoint((x[22]+4)/2.54, (y[22])/2.54, "line"); if(neck_width==0) { addpoint((x[127]+4)/2.54, (y[127])/2.54, "line"); addpoint((x[28]+4)/2.54, (y[28])/2.54, "line"); addpoint((x[129]+4)/2.54, (y[129])/2.54, "line"); } if(sleeve==2) { addpoint((x[26]+4)/2.54, (y[26])/2.54, "xarc_start"); addpoint((x[53]+4)/2.54, (y[53])/2.54, "xarc_corner"); addpoint((x[54]+4)/2.54, (y[54])/2.54, "line"); } else { addpoint((x[26]+4)/2.54, (y[26])/2.54, "xarc_start"); addpoint((x[37]+4)/2.54, (y[37])/2.54, "xarc_corner"); addpoint((x[35]+4)/2.54, (y[35])/2.54, "xarc_start"); addpoint((x[53]+4)/2.54, (y[53])/2.54, "xarc_corner"); addpoint((x[54]+4)/2.54, (y[54])/2.54, "line"); } addpoint((x[249]+4)/2.54, (y[249])/2.54, "line"); if(pit>alk) { addpoint((x[248]+4)/2.54, (y[248])/2.54, "xarc_start"); addpoint((x[48]+4)/2.54, (y[48])/2.54, "xarc_corner"); current_point=addpoint((x[47]+4)/2.54, (y[47])/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[47]+4)/2.54, (y[47]-pit+alk)/2.54, "line"); addpoint((x[42]+4)/2.54, (y[42]-pit+alk)/2.54, "line"); addpoint((x[15]-1+4)/2.54, (y[15]-pit+alk)/2.54, "line"); addpoint((x[15]-1+4)/2.54, (y[15])/2.54, "line"); } else { if(pit>alk) { addpoint((x[199]+4)/2.54, (y[199])/2.54, "line"); addpoint((x[201]+4)/2.54, (y[201])/2.54, "line"); addpoint((x[191]-1+4)/2.54, (y[191])/2.54, "line"); } else { addpoint((x[195]+4)/2.54, (y[195])/2.54, "line"); addpoint((x[196]+4)/2.54, (y[196])/2.54, "line"); addpoint((x[197]+4)/2.54, (y[197])/2.54, "line"); addpoint((x[191]-1+4)/2.54, (y[191])/2.54, "line"); } } group_obj[51]=current_object; current_object=newobject("poly"); addpoint((x[44]+4)/2.54, (y[44])/2.54, "line"); addpoint((x[45]+4)/2.54, (y[45])/2.54, "line"); addpoint((x[46]+4)/2.54, (y[46])/2.54, "line"); if(pit>alk) { addpoint((x[43]+4)/2.54, (y[43])/2.54, "line"); } else { if(pit>alk) { addpoint((x[201]+4)/2.54, (y[201])/2.54, "line"); } else { addpoint((x[197]+4)/2.54, (y[197])/2.54, "line"); addpoint((x[196]+4)/2.54, (y[196])/2.54, "line"); } } group_obj[52]=current_object; current_object=newobject("poly"); addpoint((x[46]+2+4+siirtox)/2.54, (y[10]-5)/2.54, "line"); addpoint((x[46]+2+4+siirtox)/2.54, (y[51])/2.54, "open"); group_obj[53]=current_object; if (language == 0) { current_object=newobject("text","Grainline",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[46]+2+4+0.2+siirtox)/2.54, (y[4])/2.54, "line"); group_obj[54]=current_object; if (language == 0) { current_object=newobject("text","Back piece, Cut 2, CB",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[21]-2+4+siirtox)/2.54, (y[12])/2.54, "line"); group_obj[55]=current_object; if((neck_width==1)||(neck_width==2)) { cont(22,26,510,+2); coord(510,26,0,0); } if(sv>0) { if (language == 0) { current_object=newobject("text","Check hem seam allowance",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[35]+4+siirtox)/2.54, (y[38]+1.2-pit+alk)/2.54, "line"); group_obj[56]=current_object; offset_mark(51); select(current_selection,group_obj[52]); select(current_selection,group_obj[53]); select(current_selection,group_obj[54]); select(current_selection,group_obj[55]); select(current_selection,group_obj[56]); group(current_selection); deselect(current_selection); } else { mark(51); current_selection=newselection("OBJECT"); select(current_selection,group_obj[51]); select(current_selection,group_obj[52]); select(current_selection,group_obj[53]); select(current_selection,group_obj[54]); select(current_selection,group_obj[55]); group(current_selection); deselect(current_selection); } } if((sleeve==0)||(sleeve==1)) { ktpe=arclength(33,36,34)+arclength(34,10,11); ktpt=arclength(26,37,35)+arclength(35,53,54); } if(sleeve==2) { ktpe=arclength(33,10,11); ktpt=arclength(26,53,54); } ktp=ktpe+ktpt; if(sleeve==2) { pk=ktp/3-6; } else { pk=ktp/3; } coord(0,1,kay/2+4,-6); coord(1,2,0,-pk/3); coord(2,3,0,-pk/3); coord(3,4,0,-pk/3); if(sleeve==2) { coord(1,5,0,-hp+6); } else { coord(1,5,0,-hp); } center(5,1,6); y[6]=y[6]-4; coord(5,7,0,-3); if((sleeve==0)||(sleeve==1)) { coord(4,8,-kay/2+1,0); } else { coord(4,8,-kay/2-3,0); } if((sleeve==0)||(sleeve==1)) { coord(4,9,kay/2+1,0); } else { coord(4,9,kay/2+3,0); } coord(5,10,-(kay/2)+2,0); coord(5,11,+(kay/2)-2,0); center(8,10,12); y[12]=y[6]; center(9,11,13); y[13]=y[6]; coord(8,19,ktl/2,0); coord(1,20,-5,0); cont(19,20,21,-dist(19,20)/3); cont(20,19,22,-dist(19,20)/3); coord(9,23,-ktl/4,0); coord(1,24,5,0); cont(23,24,25,-dist(23,24)/3); cont(24,23,26,-dist(23,24)/3); coord(5,27,-2,0); coord(6,28,0,0); rotate (28,27,-angle(x[6],y[6],x[27]+90*3.14159/180,y[27])); cont(28,27,28,-(ray/2-1)); cont(28,27,29,+(ray/2+1)); coord(12,30,2.5,0); coord(13,31,.5,0); cont(30,28,28,.5); cont(13,29,29,.5); coord(6,32,dist(12,13)/4+1,0); if(sleeve==2) { y[30]=y[30]+3; y[31]=y[31]+3; y[32]=y[32]+3; } coord(31,33,0,-2); cont(33,32,33,-dist(31,32)); double pyorion_pituus_etu, pyorion_pituus_taka; pyorion_pituus_taka=arclength(9,23,26)+dist(26,25)+arclength(25,24,1); pyorion_pituus_etu=arclength(8,19,22)+dist(22,21)+arclength(21,20,1); if(sleeve==2) { x[8]=x[8]+(pyorion_pituus_etu-(ktpe)); x[9]=x[9]-(pyorion_pituus_taka-(ktpt)); x[33]=x[33]-(pyorion_pituus_taka-(ktpt)); x[31]=x[31]-(pyorion_pituus_taka-(ktpt)); x[32]=x[32]-(pyorion_pituus_taka-(ktpt)); } else { x[8]=x[8]+(pyorion_pituus_etu-(ktpe+2)); x[9]=x[9]-(pyorion_pituus_taka-(ktpt+2)); x[33]=x[33]-(pyorion_pituus_taka-(ktpt+2)); x[31]=x[31]-(pyorion_pituus_taka-(ktpt+2)); x[32]=x[32]-(pyorion_pituus_taka-(ktpt+2)); } if ((sleeve==0)||(sleeve==2)) { current_object=newobject("poly"); addpoint((x[1])/2.54, (y[1])/2.54, "xarc_start"); addpoint((x[20])/2.54, (y[20])/2.54, "xarc_corner"); addpoint((x[21])/2.54, (y[21])/2.54, "line"); addpoint((x[22])/2.54, (y[22])/2.54, "xarc_start"); addpoint((x[19])/2.54, (y[19])/2.54, "xarc_corner"); if(sleeve_length==0) { addpoint((x[8])/2.54, (y[8])/2.54, "xarc_start"); addpoint((x[30])/2.54, (y[30])/2.54, "xarc_corner"); addpoint((x[28])/2.54, (y[28])/2.54, "line"); addpoint((x[27])/2.54, (y[27])/2.54, "line"); addpoint((x[29])/2.54, (y[29])/2.54, "line"); addpoint((x[33])/2.54, (y[33])/2.54, "line"); addpoint((x[32])/2.54, (y[32])/2.54, "line"); addpoint((x[31])/2.54, (y[31])/2.54, "line"); } else { addpoint((x[8])/2.54, (y[8])/2.54, "line"); addpoint((x[8]+2)/2.54, (y[8]-10)/2.54, "line"); addpoint((x[9]-1)/2.54, (y[9]-10)/2.54, "line"); } addpoint((x[9])/2.54, (y[9])/2.54, "xarc_start"); addpoint((x[23])/2.54, (y[23])/2.54, "xarc_corner"); addpoint((x[26])/2.54, (y[26])/2.54, "line"); addpoint((x[25])/2.54, (y[25])/2.54, "xarc_start"); addpoint((x[24])/2.54, (y[24])/2.54, "xarc_corner"); group_obj[57]=current_object; current_object=newobject("poly"); if(sleeve_length==1) { addpoint((x[1])/2.54, (y[8]-10)/2.54, "open"); } else { addpoint((x[1])/2.54, (y[6])/2.54, "open"); } if((sleeve==0)||(sleeve==1)) { addpoint((x[1])/2.54, (y[1])/2.54, "line"); } else { addpoint((x[1])/2.54, (y[1]-6)/2.54, "line"); } group_obj[58]=current_object; if (language == 0) { current_object=newobject("text","Sleeve Front",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[19]+3+siirtox)/2.54, (y[19]+2)/2.54, "line"); group_obj[59]=current_object; if (language == 0) { current_object=newobject("text","Sleeve Back",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[26]-3+siirtox)/2.54, (y[19]+2)/2.54, "line"); group_obj[60]=current_object; if((sleeve==0)||(sleeve==1)) { if (language == 0) { current_object=newobject("text","Sleeve. Cut 2. Shoulder.",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[1]+siirtox)/2.54, (y[1]-1)/2.54, "line"); group_obj[61]=current_object; } else { if (language == 0) { current_object=newobject("text","Sleeve. Cut 2. Shoulder.",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[1]+siirtox)/2.54, (y[1]-7)/2.54, "line"); group_obj[61]=current_object; } if(sv>0) { offset_mark(57); select(current_selection,group_obj[58]); select(current_selection,group_obj[59]); select(current_selection,group_obj[60]); select(current_selection,group_obj[61]); group(current_selection); deselect(current_selection); } else { mark(57); current_selection=newselection("OBJECT"); select(current_selection,group_obj[57]); select(current_selection,group_obj[58]); select(current_selection,group_obj[59]); select(current_selection,group_obj[60]); select(current_selection,group_obj[61]); group(current_selection); deselect(current_selection); } } if(sleeve==1) { coord(1,1,4,0); coord(1,2,-kay/2,0); coord(1,3,1,-hp); coord(3,4,-kay/2,0); coord(1,5,0,-pk); coord(5,6,-kay/2,0); center(1,3,7); y[7]=y[7]-4; coord(7,8,-kay/2,0); coord(1,9,0,-pk/3); coord(9,10,-kay/2,0); coord(10,11,(kay/4+1)/3,0); coord(2,12,kay/4+2,0); coord(12,13,1,-pk/3); coord(12,14,0,-pk); coord(12,15,0,-dist(1,2)/2-4); coord(12,16,-5,0); coord(12,17,5,0); coord(9,18,1.5,-1); center(17,18,19); coord(5,20,2,0); coord(6,21,-2,0); coord(21,22,0,1); coord(6,23,0,3); coord(7,25,.5+2,0); coord(8,26,-.5+2,0); coord(4,27,0,1.5); coord(27,28,-2,0); coord(3,29,0,-1.5); coord(29,129,-50,0); coord(27,30,sqrt(ray/2*ray/2-3*3),-3); coord(6,31,2-.5,1); coord(6,131,ktl/2-2,0); coord(6,32,ktl/2,0); coord(14,33,0,3); coord(9,34,-dist(9,13)/2,-1); center(33,34,35); coord(5,36,-2,0); cont(34,33,132,50); line_intersect(5,6,34,132,132); x[132]=x[132]-1; coord(7,37,-2+2,0); coord(8,39,1.5+2,0); coord(36,136,2,-dist(36,137)/2); coord(27,38,2,0); coord(8,39,4,0); coord(39,139,2,dist(39,31)/2); cont(11,23,124,50); coord(22,224,4,0); line_intersect(22,224,11,124,24); pyorion_pituus_taka=arclength(18,17,12)+dist(34,35)+dist(35,33)+arclength(33,132,32); pyorion_pituus_etu=arclength(12,16,11)+dist(11,23)+arclength(23,24,22)+arclength(32,131,31); if(sleeve==1) { x[31]=x[31]+((pyorion_pituus_etu-(ktpe+2))/2); x[22]=x[22]+((pyorion_pituus_etu-(ktpe+2))/2); x[18]=x[18]-(pyorion_pituus_taka-(ktpt+2)); } current_object=newobject("poly"); addpoint((x[12]+2)/2.54, (y[1])/2.54, "line"); addpoint((x[12]+2)/2.54, (y[7])/2.54, "line"); group_obj[62]=current_object; if (language == 0) { current_object=newobject("text","Upper Sleeve. Cut 2. Grainline, shoulder",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[12]+2+siirtox)/2.54, (y[12]-1)/2.54, "line"); group_obj[63]=current_object; current_object=newobject("poly"); addpoint((x[22]+2)/2.54, (y[22])/2.54, "xarc_start"); addpoint((x[26]+2)/2.54, (y[26])/2.54, "xarc_corner"); addpoint((x[28]+2)/2.54, (y[28])/2.54, "line"); addpoint((x[27]+2)/2.54, (y[27])/2.54, "line"); addpoint((x[30]+2)/2.54, (y[30])/2.54, "line"); cont(27,30,520,3); addpoint((x[520]+2)/2.54, (y[520])/2.54, "line"); cont(25,30,525,-10); cont(30,525,526,-3); ang=angle(x[30],y[30],x[525],y[525])-angle(x[30],y[30],x[520],y[520]); rotate (526,525,ang); cont(526,520,526,-dist(30,525)); addpoint((x[526]+2)/2.54, (y[526])/2.54, "line"); addpoint((x[525]+2)/2.54, (y[525])/2.54, "xarc_start"); addpoint((x[25]+2)/2.54, (y[25])/2.54, "xarc_corner"); addpoint((x[18]+2)/2.54, (y[18])/2.54, "xarc_start"); addpoint((x[17]+2)/2.54, (y[17])/2.54, "xarc_corner"); addpoint((x[12]+2)/2.54, (y[12])/2.54, "xarc_start"); addpoint((x[16]+2)/2.54, (y[16])/2.54, "xarc_corner"); addpoint((x[11]+2)/2.54, (y[11])/2.54, "line"); addpoint((x[23]+2)/2.54, (y[23])/2.54, "xarc_start"); addpoint((x[24]+2)/2.54, (y[24])/2.54, "xarc_corner"); group_obj[64]=current_object; if (language == 0) { current_object=newobject("text","Sleeve Front",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[23]+3+siirtox)/2.54, (y[23])/2.54, "line"); group_obj[65]=current_object; if (language == 0) { current_object=newobject("text","Sleeve Back",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[17]+siirtox)/2.54, (y[18])/2.54, "line"); group_obj[66]=current_object; current_object=newobject("poly"); addpoint((x[30]+2)/2.54, (y[30])/2.54, "line"); addpoint((x[525]+2)/2.54, (y[525])/2.54, "open"); group_obj[67]=current_object; cont(520,30,527,-1.5); cont(526,525,528,-1.5); cont(528,527,527,-2.5); cont(527,528,528,-2.5); center(527,528,529); current_object=newobject("poly"); current_point=addpoint((x[527]+2)/2.54, (y[527])/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[529]+2)/2.54, (y[529])/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[528]+2)/2.54, (y[528])/2.54, "open"); notch_type(current_point,"BTN",0); group_obj[68]=current_object; if(sv>0) { offset_mark(64); select(current_selection,group_obj[62]); select(current_selection,group_obj[63]); select(current_selection,group_obj[65]); select(current_selection,group_obj[66]); select(current_selection,group_obj[67]); select(current_selection,group_obj[68]); group(current_selection); deselect(current_selection); } else { mark(64); current_selection=newselection("OBJECT"); select(current_selection,group_obj[62]); select(current_selection,group_obj[63]); select(current_selection,group_obj[64]); select(current_selection,group_obj[65]); select(current_selection,group_obj[66]); select(current_selection,group_obj[67]); select(current_selection,group_obj[68]); group(current_selection); deselect(current_selection); } siirtox=kay/2+4; current_object=newobject("poly"); addpoint((x[31]+siirtox)/2.54, (y[31])/2.54, "xarc_start"); addpoint((x[39]+siirtox)/2.54, (y[39])/2.54, "xarc_corner"); addpoint((x[38]+siirtox)/2.54, (y[38])/2.54, "line"); addpoint((x[30]+siirtox)/2.54, (y[30])/2.54, "line"); addpoint((x[520]+siirtox)/2.54, (y[520])/2.54, "line"); addpoint((x[526]+siirtox)/2.54, (y[526])/2.54, "line"); addpoint((x[525]+siirtox)/2.54, (y[525])/2.54, "xarc_start"); addpoint((x[37]+siirtox)/2.54, (y[37])/2.54, "xarc_corner"); addpoint((x[36]+siirtox)/2.54, (y[36])/2.54, "line"); addpoint((x[34]+siirtox)/2.54, (y[34])/2.54, "line"); addpoint((x[35]+siirtox)/2.54, (y[35])/2.54, "line"); addpoint((x[33]+siirtox)/2.54, (y[33])/2.54, "xarc_start"); addpoint((x[132]+siirtox)/2.54, (y[132])/2.54, "xarc_corner"); current_point= addpoint((x[32]+siirtox)/2.54, (y[32])/2.54, "xarc_start"); notch_type(current_point,"NOTCH",1); addpoint((x[131]+siirtox)/2.54, (y[131])/2.54, "xarc_corner"); group_obj[69]=current_object; current_object=newobject("poly"); addpoint((x[32]+siirtox)/2.54, (y[32])/2.54, "line"); addpoint((x[32]+siirtox)/2.54, (y[32]-15)/2.54, "open"); group_obj[70]=current_object; current_object=newobject("poly"); addpoint((x[30]+siirtox)/2.54, (y[30])/2.54, "line"); addpoint((x[525]+siirtox)/2.54, (y[525])/2.54, "open"); group_obj[71]=current_object; current_object=newobject("poly"); current_point=addpoint((x[527]+siirtox)/2.54, (y[527])/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[529]+siirtox)/2.54, (y[529])/2.54, "line"); notch_type(current_point,"BTN",0); current_point=addpoint((x[528]+siirtox)/2.54, (y[528])/2.54, "open"); notch_type(current_point,"BTN",0); group_obj[72]=current_object; if (language == 0) { current_object=newobject("text","Lower Sleeve. Cut 2. Grainline, side",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[32]+siirtox)/2.54, (y[32]-1)/2.54, "line"); group_obj[74]=current_object; if(sv>0) { offset_mark(69); select(current_selection,group_obj[70]); select(current_selection,group_obj[71]); select(current_selection,group_obj[72]); select(current_selection,group_obj[74]); 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]); select(current_selection,group_obj[71]); select(current_selection,group_obj[72]); select(current_selection,group_obj[74]); 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(); } shift(double orig, double xxx, double yyy) { x[orig]=x[orig]+xxx; y[orig]=y[orig]+yyy; } 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 xar[13], yar[13]; double save_rx, save_ry; arclength(double start, double corner, double end) { double ct, last_x, last_y; double a_dist; last_x = x[start]; last_y = y[start]; a_dist=0; for (ct=1; ct < 12; ct = ct + 1) { fts(start, corner, end, ct); a_dist = a_dist + distance(save_rx, save_ry, last_x, last_y); last_x=save_rx; last_y=save_ry; } return a_dist; } double A1, A2, B1, B2; double sx, sy, cx, cy, ex, ey; double t0[2], t1[2]; double ftc[2]; fts(double start, double corner, double end, double pos) { if (pos<1) { save_rx=x[start]; save_ry=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; t0[0]=A1; t0[1]=B1; t1[0]=A2; t1[1]=B2; ftc[0]= cx + (t0[0] + t0[1]); ftc[1]= cy + (t1[0] + t1[1]); save_rx = t0[0]*(xar[pos])+t0[1]*(yar[pos])+ ftc[0]; save_ry = t1[0]*(xar[pos])+t1[1]*(yar[pos])+ ftc[1]; } else { if (pos>10) { save_rx=x[end]; save_ry=y[end]; } else { save_rx = t0[0]*(xar[pos])+t0[1]*(yar[pos])+ ftc[0]; save_ry = t1[0]*(xar[pos])+t1[1]*(yar[pos])+ ftc[1]; } } } } init_xarc_array() { double ang_start, ang_end, step, theta, ct; double XARC_PIECES; XARC_PIECES = 12; ang_start = -3.14159/2; ang_end= -3.14159; ct=0; step= (ang_end - ang_start)/(XARC_PIECES-1); for (theta=ang_start; ct < XARC_PIECES; theta = theta + step) { xar[ct] = cos(theta); yar[ct] = sin(theta); ct=ct+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; } } dialog_model() { if (language == 0) { start_pict_dialog("JACKET STYLE"); add_pict_item("Princess","L2_jkt_princess.jpg"); add_pict_item("A-line","L2_jkt_a-line.jpg"); add_pict_item("Straight","L2_jkt_straight.jpg"); run_pict("Next"); model=get_pict_result(); Forward(); } } dialog_ease() { if (language == 0) { start_pict_dialog("BUST EASE"); add_pict_item("Normal (+4.75in/+12cm)"," "); add_pict_item("Minimum (+4in/+10cm)"," "); add_pict_item("Maximum (+5.5in/+14cm)"," "); if (run_pict("Back","Next")) { ease=get_pict_result(); Forward(); } else { ease=0; Backward(); } } } dialog_collar() { if (language == 0) { start_pict_dialog("NECKLINE/COLLAR STYLE"); add_pict_item("Tailored collar","L2_jkt_collar_tailored.jpg"); add_pict_item("Shawl collar","L2_jkt_collar_shawl.jpg"); add_pict_item("Shawl with lapels to hem","L2_jkt_collar_shawl_hem.jpg"); add_pict_item("Jewel neckline","L2_jkt_jewel-neck.jpg"); add_pict_item("Square neckline","L2_jkt_square-neck.jpg"); add_pict_item("V-shape neckline","L2_jkt_v-neck.jpg"); add_pict_item("Convertible collar","L2_jkt_collar_conv.jpg"); if (run_pict("Back","Next")) { collar=get_pict_result(); Forward(); } else { collar=0; Backward(); } } } dialog_collar_depth() { if (language == 0) { start_pict_dialog("NECK DEPTH"); add_pict_item("Normal"," "); add_pict_item("Shallow"," "); add_pict_item("Deep"," "); if (run_pict("Back","Next")) { neck_depth=get_pict_result(); Forward(); } else { neck_depth=0; Backward(); } } } dialog_collar_width() { if (language == 0) { start_pict_dialog("NECK WIDTH"); add_pict_item("Normal"," "); add_pict_item("Wide"," "); if (run_pict("Back","Next")) { neck_width=get_pict_result(); Forward(); } else { neck_width=0; Backward(); } } } dialog_lapel() { if (language == 0) { start_pict_dialog("START POINT OF LAPEL"); add_pict_item("Waist","L2_jkt_btn_low.jpg"); add_pict_item("Mid waist-bust","L2_jkt_btn_mid.jpg"); add_pict_item("Bust","L2_jkt_btn_high.jpg"); if (run_pict("Back","Next")) { lapel=get_pict_result(); Forward(); } else { lapel=0; Backward(); } } } dialog_sleeve() { if (language == 0) { start_pict_dialog("SLEEVE STYLE"); add_pict_item("One-piece sleeve","L2_jkt_slv_1pc.jpg"); add_pict_item("Two-piece sleeve","L2_jkt_slv_2pc.jpg"); add_pict_item("Dropped sleeve","L2_jkt_slv_drop.jpg"); if (run_pict("Back","Next")) { sleeve=get_pict_result(); Forward(); } else { sleeve=0; Backward(); } } } dialog_sleeve_length() { if (language == 0) { start_pict_dialog("SLEEVE LENGTH"); add_pict_item("Long","L2_jkt_slv_1pc.jpg"); add_pict_item("Short","L2_jkt_slv_short.jpg"); if (run_pict("Back","Next")) { sleeve_length=get_pict_result(); Forward(); } else { sleeve_length=0; Backward(); } } } dialog_shoulder_pads() { if (language == 0) { start_pict_dialog("SHOULDER PAD EASE"); add_pict_item("Shoulder pads","L2_jkt_sp.jpg"); add_pict_item("No shoulder pads","L2_jkt_slv_1pc.jpg"); if (run_pict("Back","Next")) { shoulder_padding=get_pict_result(); Forward(); } else { shoulder_padding=0; Backward(); } } } dialog_pocket() { if (language == 0) { start_pict_dialog("POCKET STYLE"); add_pict_item("Patch pocket","jkt_pkt_patch.jpg"); add_pict_item("Welt pocket","jkt_pkt_welt.jpg"); add_pict_item("Buttonhole pocket","jkt_pkt_buttonhole.jpg"); add_pict_item("Flap pocket","jkt_pkt_flap.jpg"); add_pict_item("No pocket","jkt_pkt_none.jpg"); if (run_pict("Back","Next")) { pocket=get_pict_result(); Forward(); } else { pocket=0; Backward(); } } } dialog_pocket_slant() { if (language == 0) { start_pict_dialog("DIRECTION OF POCKET"); add_pict_item("Horizontal","jkt_pkt_slant-horiz.jpg"); add_pict_item("Slant to back","jkt_pkt_slant-back.jpg"); add_pict_item("Slant to front","jkt_pkt_slant-front.jpg"); if (run_pict("Back","Next")) { slant=get_pict_result(); Forward(); } else { slant=0; Backward(); } } } Forward() { index = index + 1; if ((index == 3) && ((collar!=3)&&(collar!=4))) { index = index + 1; } if ((index == 4) && ((collar!=3)&&(collar!=4))) { index = index + 1; } if ((index == 5) && (collar >= 2)) { index = index + 1; } if ((index == 7) && (sleeve == 1)) { index = index + 1; } if ((index == 10) && (pocket==4)) { index = index + 1; } if (index == 11) { done = 1; } } Backward() { index = index - 1; if ((index == 10) && (pocket==4)) { index = index - 1; } if ((index == 7) && (sleeve == 1)) { index = index - 1; } if ((index == 5) && (collar >= 2)) { index = index - 1; } if ((index == 4) && ((collar!=3)&&(collar!=4))) { index = index - 1; } if ((index == 3) && ((collar!=3)&&(collar!=4))) { index = index - 1; } } 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; }