// Copyright (C) 2001 Leena L�hteenm�ki, Finland // Copyright (C) 2014 PatternMaker Software // 2014/02/06 double index, done; object marker_array[20]; double marker_count, loop; double result; double x[600], y[600]; double ang,ang2,ang3, vang,vdistance,rangle; object group_obj[200]; object current_object; point current_point; selection current_selection; 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; 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 napit,int; double sleeve, sleeve_length; double shoulder_padding; double nv; double sv; double metric; double siirtox, siirtoy; double hem_flare, ylaosan_kellotus, hihan_kellotus; double tk, ytl, tl; double language; main() { language=get_language(); if ( language != 0 ) { language = 0; } if (language == 0) { check_reg(0, "Leena","Maternity", "This macro needs to be properly installed before running it."); } 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; sv=1; pit=60; hem_flare=10; ylaosan_kellotus=6; hihan_kellotus=10; // index = 0; //Start Options while (!done) { if (index==0) { Popup1(); } if (index==1) { Popup2(); } if (index==2) { Popup3(); } if (index==3) { Popup4(); } if (index==4) { Popup5(); } } //End Options if (is_function("unit_mode")==1) { metric = unit_mode(); if (!metric) { hem_flare=hem_flare/2.54; ylaosan_kellotus=ylaosan_kellotus/2.54; hihan_kellotus=hihan_kellotus/2.54; 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) { hem_flare=hem_flare/2.54; ylaosan_kellotus=ylaosan_kellotus/2.54; hihan_kellotus=hihan_kellotus/2.54; 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("NURSING DRESS"); } if (language == 0) { add_picture_input("Neck Circ.",ky,"w_meas_neckcirc"); } if (language == 0) { add_picture_input("Bust Circ.", ry,"w_meas_bustcirc"); } if (language == 0) { add_picture_input("Waist circ",vy, "w_meas_waistcirc"); } if (language == 0) { add_picture_input("Abdomen circ",yly, "w_meas_abdmcirc"); } if (language == 0) { add_picture_input("Hip Circ.",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",op, "w_meas_shldr"); } if (language == 0) { add_picture_input("Waist - Hip",alk, "w_meas_waist-hip"); } if (language == 0) { add_picture_input("Biceps",kay, "w_meas_biceps"); } if (language == 0) { add_picture_input("Wrist Circ.",ray, "w_meas_wrist"); } if (language == 0) { add_picture_input("Overarm",hp, "w_meas_overarm"); } run_picture_input(); } else { if (language == 0) { dialog_box( "NURSING DRESS - 1 of 2", "Neck Circ.",ky, "Bust Circ.",ry, "Waist circ",vy, "Abdomen circ",yly, "Hip Circ.",aly, "Bust Span", rkkv, "Bust Height",rk, "Waist Height",vk, "Back Length",sp, "Back Width",sl); } if (language == 0) { dialog_box("NURSING DRESS - 2 of 2", "Shoulder Length",op, "Waist - Hip",alk, "Biceps",kay, "Wrist Circ.",ray, "Overarm",hp); } } } if (is_function("start_picture_input")) { if (language == 0) { start_picture_input("NURSING DRESS"); } if (language == 0) { add_picture_input("Hem flare",hem_flare, ""); } if (language == 0) { add_picture_input("Top flare",ylaosan_kellotus,""); } if (language == 0) { add_picture_input("Sleeve flare", hihan_kellotus,""); } if (language == 0) { add_picture_input("Length from Waist",pit,""); } if (language == 0) { add_picture_input("Seam allowance", sv, "meas_seamallow"); } run_picture_input(); } else { if (language == 0) { dialog_box("CUSTOM MEASUREMENTS", "Hem flare",hem_flare, "Top flare",ylaosan_kellotus, "Sleeve flare", hihan_kellotus, "Length from Waist",pit, "Seam Allowance",sv); } } if (is_function("unit_mode")==1) { metric = unit_mode(); if (!metric) { hem_flare=hem_flare*2.54; ylaosan_kellotus=ylaosan_kellotus*2.54; hihan_kellotus=hihan_kellotus*2.54; 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; } } else { if (metric<1) { hem_flare=hem_flare*2.54; ylaosan_kellotus=ylaosan_kellotus*2.54; hihan_kellotus=hihan_kellotus*2.54; 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; } } if(metric==2) { sv=sv/2.54; } if (ry < 76) { oke=4.6; } else { if (ry < 80) { oke=4.4; } else { if (ry < 84) { oke=4.2; } else { if (ry < 88) { oke=4.0; } else { if (ry < 92) { oke=3.8; } else { if (ry < 96) { oke=3.6; } else { if (ry < 100) { oke=3.4; } else { if (ry < 104) { oke=3.2; } else { if (ry < 110) { oke=3.0; } else { if (ry < 116) { oke=2.8; } else { if (ry < 122) { oke=2.6; } else { oke=2.4; } } } } } } } } } } } if(ry < 76) { okt=2.35; } else { if (ry < 80) { okt=2.4; } else { if (ry < 84) { okt=2.45; } else { if (ry < 88) { okt=2.5; } else { if (ry < 92) { okt=2.55; } else { if (ry < 96) { okt=2.6; } else { if (ry < 100) { okt=2.65; } else { if (ry < 104) { okt=2.7; } else { if (ry < 110) { okt=2.75; } else { if (ry < 116) { okt=2.8; } else { if (ry < 122) { okt=2.85; } else { okt=2.9; } } } } } } } } } } } if (ry < 76) { rl=4.3; } else { if (ry < 80) { rl=5.1; } else { if (ry < 84) { rl=5.8; } else { if (ry < 88) { rl=6.6; } else { if (ry < 92) { rl=7.3; } else { if (ry < 96) { rl=8.1; } else { if (ry < 100) { rl=8.8; } else { if (ry < 104) { rl=9.6; } else { if (ry < 110) { rl=10.8; } else { if (ry < 116) { rl=12.1; } else { if (ry < 122) { rl=13.3; } else { rl=14.6; } } } } } } } } } } } if (ry < 76) { ktk=20.4; } else { if (ry < 80) { ktk=20.8; } else { if (ry < 84) { ktk=21.2; } else { if (ry < 88) { ktk=21.6; } else { if (ry < 92) { ktk=22; } else { if (ry < 96) { ktk=22.4; } else { if (ry < 100) { ktk=22.8; } else { if (ry < 104) { ktk=23.2; } else { if (ry < 110) { ktk=23.8; } else { if (ry < 116) { ktk=24.4; } else { if (ry < 122) { ktk=25; } else { ktk=25.6; } } } } } } } } } } } f_ry[0]=ry+12; f_ky[0]=ky+1.5; f_vy[0]=vy+10; f_yly[0]=yly+2+8; f_aly[0]=aly+2+8; f_rkkv[0]=rkkv+1.2; f_sl[0]=sl+2.8; f_op[0]=op; f_vk[0]=vk; f_rk[0]=rk; f_rl[0]=rl+0.2; f_sp[0]=sp; f_ktk[0]=ktk+2.5; f_kay[0]=kay+9; f_ray[0]=ray+9; f_hp[0]=hp+0.5; f_ry[1]=ry+10; f_ky[1]=ky+0.75; f_vy[1]=vy+8; f_yly[1]=yly+2+6; f_aly[1]=aly+2+6; f_rkkv[1]=rkkv+1; f_sl[1]=sl+2.2; f_op[1]=op; f_vk[1]=vk; f_rk[1]=rk; f_rl[1]=rl+0.1; f_sp[1]=sp; f_ktk[1]=ktk+2; f_kay[1]=kay+8; f_ray[1]=ray+8; f_hp[1]=hp; f_ry[2]=ry+14; f_ky[2]=ky+1.5; f_vy[2]=vy+12; f_yly[2]=yly+2+10; f_aly[2]=aly+2+10; f_rkkv[2]=rkkv+1.4; f_sl[2]=sl+3.4; f_op[2]=op; f_vk[2]=vk; f_rk[2]=rk; f_rl[2]=rl+0.3; f_sp[2]=sp; f_ktk[2]=ktk+3; f_kay[2]=kay+10; f_ray[2]=ray+10; f_hp[2]=hp+0.75; ry=f_ry[ease]; ky=f_ky[ease]; vy=f_vy[ease]; yly=f_yly[ease]; aly=f_aly[ease]; rkkv=f_rkkv[ease]; sl=f_sl[ease]; op=f_op[ease]; vk=f_vk[ease]; rk=f_rk[ease]; rl=f_rl[ease]; sp=f_sp[ease]; ktk=f_ktk[ease]; kay=f_kay[ease]; ray=f_ray[ease]; pts=ky/5+0.5; ptl=ky/5-1; ktl=ry/8-1.5; eml=3; tml=3; sml=(ry/2-vy/2)-6; smlyly=(ry/2-yly/2)-3; smlaly=(ry/2-aly/2); if(aly0) { offset_mark(1); select(current_selection,group_obj[2]); group(current_selection); deselect(current_selection); } else { mark(1); current_selection=newselection("OBJECT"); select(current_selection,group_obj[1]); select(current_selection,group_obj[2]); group(current_selection); deselect(current_selection); } } siirtoy=0; current_object=newobject("poly"); if((collar==0)||(collar==3)) { addpoint((x[31]+siirtox)/2.54, (y[31]+siirtoy)/2.54, "xarc_start"); addpoint((x[23]+siirtox)/2.54, (y[102]+siirtoy)/2.54, "xarc_corner"); addpoint((x[102]+siirtox)/2.54, (y[102]+siirtoy)/2.54, "line"); } if(collar==1) { addpoint((x[31]+siirtox)/2.54, (y[31]+siirtoy)/2.54, "line"); addpoint((x[23]+siirtox)/2.54, (y[102]+siirtoy)/2.54, "line"); addpoint((x[102]+siirtox)/2.54, (y[102]+siirtoy)/2.54, "line"); } if(collar==2) { addpoint((x[31]+siirtox)/2.54, (y[31]+siirtoy)/2.54, "xarc_start"); addpoint((x[31]-3+siirtox)/2.54, (y[36]+siirtoy)/2.54, "xarc_corner"); addpoint((x[102]+siirtox)/2.54, (y[102]+siirtoy)/2.54, "line"); } addpoint((x[3]+siirtox)/2.54, (y[3]+siirtoy)/2.54, "line"); addpoint((x[104]+siirtox)/2.54, (y[104]+siirtoy)/2.54, "line"); current_point=addpoint((x[97]-5+siirtox)/2.54, (y[97]+siirtoy)/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[97]+siirtox)/2.54, (y[97]+siirtoy)/2.54, "line"); addpoint((x[131]+siirtox)/2.54, (y[131]+siirtoy)/2.54, "line"); group_obj[3]=current_object; if (language == 0) { current_object=newobject("text","Alignment mark for inner front tops",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[97]-12+siirtox)/2.54, (y[97]+1+siirtoy)/2.54, "line"); group_obj[4]=current_object; if(sv>0) { offset_mark(3); select(current_selection,group_obj[4]); 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]); group(current_selection); deselect(current_selection); } siirtox=14; current_object=newobject("poly"); addpoint((x[33]+siirtox)/2.54, (y[33]+siirtoy)/2.54, "line"); addpoint((x[132]+siirtox)/2.54, (y[132]+siirtoy)/2.54, "line"); addpoint((x[98]+siirtox)/2.54, (y[98]+siirtoy)/2.54, "line"); current_point=addpoint((x[98]+5+siirtox)/2.54, (y[98]+siirtoy)/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[105]+siirtox)/2.54, (y[105]+siirtoy)/2.54, "line"); addpoint((x[11]+siirtox)/2.54, (y[11]+siirtoy)/2.54, "xarc_start"); addpoint((x[10]+siirtox)/2.54, (y[10]+siirtoy)/2.54, "xarc_corner"); addpoint((x[34]+siirtox)/2.54, (y[34]+siirtoy)/2.54, "xarc_start"); addpoint((x[36]+siirtox)/2.54, (y[36]+siirtoy)/2.54, "xarc_corner"); group_obj[5]=current_object; if (language == 0) { current_object=newobject("text","Alignment mark for inner front tops",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[98]+1+siirtox)/2.54, (y[98]+1+siirtoy)/2.54, "line"); group_obj[6]=current_object; siirtox=0; if (language == 0) { current_object=newobject("text","Cut 1 on fold",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[102]+2+siirtox)/2.54, (y[102]-2+siirtoy)/2.54, "line"); group_obj[8]=current_object; if (language == 0) { current_object=newobject("text","without CF seam allowance",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[102]+1+siirtox)/2.54, (y[102]-2+siirtoy)/2.54, "line"); group_obj[7]=current_object; if(sv>0) { offset_mark(5); select(current_selection,group_obj[6]); select(current_selection,group_obj[7]); select(current_selection,group_obj[8]); 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[7]); select(current_selection,group_obj[8]); group(current_selection); deselect(current_selection); } siirtox=0; siirtoy=-4; current_object=newobject("poly"); addpoint((x[104]+siirtox)/2.54, (y[104]+siirtoy)/2.54, "line"); current_point=addpoint((x[4]+siirtox)/2.54, (y[4]+siirtoy)/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[5]+siirtox)/2.54, (y[5]+siirtoy)/2.54, "line"); addpoint((x[6]+siirtox)/2.54, (y[6]+siirtoy)/2.54, "line"); addpoint((x[106]+siirtox)/2.54, (y[106]+siirtoy)/2.54, "line"); addpoint((x[107]+siirtox)/2.54, (y[107]+siirtoy)/2.54, "line"); addpoint((x[114]+siirtox)/2.54, (y[114]+siirtoy)/2.54, "line"); current_point=addpoint((x[40]+siirtox)/2.54, (y[40]+siirtoy)/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[162]+siirtox)/2.54, (y[162]+siirtoy)/2.54, "line"); group_obj[9]=current_object; if (language == 0) { current_object=newobject("text","CF, Cut 1 on fold",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[104]+2+siirtox)/2.54, (y[104]-1+siirtoy)/2.54, "line"); group_obj[10]=current_object; if (language == 0) { current_object=newobject("text","without CF seam allowance",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[104]+1+siirtox)/2.54, (y[104]-1+siirtoy)/2.54, "line"); group_obj[11]=current_object; if(sv>0) { offset_mark(9); select(current_selection,group_obj[10]); select(current_selection,group_obj[11]); group(current_selection); deselect(current_selection); } else { mark(9); current_selection=newselection("OBJECT"); select(current_selection,group_obj[9]); select(current_selection,group_obj[10]); select(current_selection,group_obj[11]); group(current_selection); deselect(current_selection); } siirtox=14; current_object=newobject("poly"); addpoint((x[163]+siirtox)/2.54, (y[163]+siirtoy)/2.54, "line"); current_point=addpoint((x[41]+siirtox)/2.54, (y[41]+siirtoy)/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[115]+siirtox)/2.54, (y[115]+siirtoy)/2.54, "line"); addpoint((x[120]+siirtox)/2.54, (y[120]+siirtoy)/2.54, "line"); addpoint((x[116]+siirtox)/2.54, (y[116]+siirtoy)/2.54, "line"); current_point=addpoint((x[151]+siirtox)/2.54, (y[151]+siirtoy)/2.54, "xarc_start"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[50]+siirtox)/2.54, (y[50]+siirtoy)/2.54, "xarc_corner"); current_point=addpoint((x[111]+siirtox)/2.54, (y[111]+siirtoy)/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[105]+siirtox)/2.54, (y[105]+siirtoy)/2.54, "line"); group_obj[12]=current_object; if (language == 0) { current_object=newobject("text","Front side piece, cut 2",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[163]+1+siirtox)/2.54, (y[105]-1+siirtoy)/2.54, "line"); group_obj[13]=current_object; 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]+2-pit+alk+siirtoy)/2.54, "line"); group_obj[14]=current_object; if(sv>0) { offset_mark(12); select(current_selection,group_obj[13]); select(current_selection,group_obj[14]); group(current_selection); deselect(current_selection); } else { mark(12); current_selection=newselection("OBJECT"); select(current_selection,group_obj[12]); select(current_selection,group_obj[13]); select(current_selection,group_obj[14]); group(current_selection); deselect(current_selection); } siirtox=30; current_object=newobject("poly"); addpoint((x[21]+siirtox)/2.54, (y[21])/2.54, "xarc_start"); addpoint((x[122]+siirtox)/2.54, (y[122])/2.54, "xarc_corner"); addpoint((x[22]+siirtox)/2.54, (y[22])/2.54, "line"); addpoint((x[127]+siirtox)/2.54, (y[127])/2.54, "line"); addpoint((x[28]+siirtox)/2.54, (y[28])/2.54, "line"); addpoint((x[129]+siirtox)/2.54, (y[129])/2.54, "line"); addpoint((x[26]+siirtox)/2.54, (y[26])/2.54, "line"); addpoint((x[37]+siirtox)/2.54, (y[37])/2.54, "line"); addpoint((x[35]+siirtox)/2.54, (y[35])/2.54, "xarc_start"); addpoint((x[9]+siirtox)/2.54, (y[9])/2.54, "xarc_corner"); addpoint((x[11]+siirtox)/2.54, (y[11])/2.54, "line"); addpoint((x[99]+siirtox)/2.54, (y[99])/2.54, "line"); addpoint((x[101]+siirtox)/2.54, (y[101])/2.54, "line"); group_obj[15]=current_object; siirtoy=0; current_object=newobject("poly"); addpoint((x[21]-0.5+siirtox)/2.54, (y[21]-1+siirtoy)/2.54, "line"); addpoint((x[101]-0.5+siirtox)/2.54, (y[101]+siirtoy)/2.54, "open"); group_obj[16]=current_object; if (language == 0) { current_object=newobject("text","CB, Zipper",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[21]-1.5+siirtox)/2.54, (y[21]-1+siirtoy)/2.54, "line"); group_obj[17]=current_object; if(sv>0) { offset_mark(15); select(current_selection,group_obj[16]); select(current_selection,group_obj[17]); group(current_selection); deselect(current_selection); } else { mark(15); current_selection=newselection("OBJECT"); select(current_selection,group_obj[15]); select(current_selection,group_obj[16]); select(current_selection,group_obj[17]); group(current_selection); deselect(current_selection); } cont(127,22,127,-5); siirtoy=15; if(collar<3) { 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"); addpoint((x[127]+siirtox)/2.54, (y[127]+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]-5+siirtoy)/2.54, "line"); group_obj[18]=current_object; if (language == 0) { current_object=newobject("text","Back facing, Cut 2, CB",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[21]-10+siirtox)/2.54, (y[21]-2+siirtoy)/2.54, "line"); group_obj[19]=current_object; siirtoy=0; if(sv>0) { offset_mark(18); select(current_selection,group_obj[19]); group(current_selection); deselect(current_selection); } else { mark(18); current_selection=newselection("OBJECT"); select(current_selection,group_obj[18]); select(current_selection,group_obj[19]); group(current_selection); deselect(current_selection); } } siirtoy=-4; current_object=newobject("poly"); addpoint((x[99]+siirtox)/2.54, (y[99]+siirtoy)/2.54, "line"); current_point=addpoint((x[149]+siirtox)/2.54, (y[149]+siirtoy)/2.54, "xarc_start"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[49]+siirtox)/2.54, (y[49]+siirtoy)/2.54, "xarc_corner"); addpoint((x[48]+siirtox)/2.54, (y[48]+siirtoy)/2.54, "line"); addpoint((x[117]+siirtox)/2.54, (y[117]+siirtoy)/2.54, "line"); addpoint((x[110]+siirtox)/2.54, (y[110]+siirtoy)/2.54, "xarc_start"); addpoint((x[121]+siirtox)/2.54, (y[121]+siirtoy)/2.54, "xarc_corner"); addpoint((x[171]+siirtox)/2.54, (y[171]+siirtoy)/2.54, "line"); addpoint((x[118]+siirtox)/2.54, (y[118]+siirtoy)/2.54, "line"); current_point=addpoint((x[44]+siirtox)/2.54, (y[44]+siirtoy)/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[160]+siirtox)/2.54, (y[160]+siirtoy)/2.54, "line"); group_obj[20]=current_object; if (language == 0) { current_object=newobject("text","Back side piece, cut 2",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[99]+1+siirtox)/2.54, (y[99]-1+siirtoy)/2.54, "line"); group_obj[21]=current_object; if(sv>0) { offset_mark(20); select(current_selection,group_obj[21]); group(current_selection); deselect(current_selection); } else { mark(20); current_selection=newselection("OBJECT"); select(current_selection,group_obj[20]); select(current_selection,group_obj[21]); group(current_selection); deselect(current_selection); } siirtox=30+10; current_object=newobject("poly"); addpoint((x[161]+siirtox)/2.54, (y[161]+siirtoy)/2.54, "line"); current_point=addpoint((x[46]+siirtox)/2.54, (y[46]+siirtoy)/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[119]+siirtox)/2.54, (y[119]+siirtoy)/2.54, "xarc_start"); addpoint((x[112]+siirtox)/2.54, (y[112]+siirtoy)/2.54, "xarc_corner"); addpoint((x[113]+siirtox)/2.54, (y[113]+siirtoy)/2.54, "line"); addpoint((x[15]+siirtox)/2.54, (y[15]+siirtoy)/2.54, "line"); addpoint((x[14]+siirtox)/2.54, (y[14]+siirtoy)/2.54, "line"); current_point=addpoint((x[13]+siirtox)/2.54, (y[13]+siirtoy)/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[101]+siirtox)/2.54, (y[101]+siirtoy)/2.54, "line"); group_obj[22]=current_object; if (language == 0) { current_object=newobject("text","Center Back. Cut 2.",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[12]-0.5+siirtox)/2.54, (y[13]+siirtoy)/2.54, "line"); group_obj[23]=current_object; current_object=newobject("poly"); addpoint((x[101]-0.5+siirtox)/2.54, (y[101]+siirtoy)/2.54, "line"); addpoint((x[15]-0.5+siirtox)/2.54, (y[15]+siirtoy)/2.54, "open"); group_obj[24]=current_object; if (language == 0) { current_object=newobject("text","CB, Zipper",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[101]-1.5+siirtox)/2.54, (y[101]-1+siirtoy)/2.54, "line"); group_obj[25]=current_object; if(sv>0) { offset_mark(22); select(current_selection,group_obj[23]); select(current_selection,group_obj[24]); select(current_selection,group_obj[25]); group(current_selection); deselect(current_selection); } else { mark(22); current_selection=newselection("OBJECT"); select(current_selection,group_obj[22]); select(current_selection,group_obj[23]); select(current_selection,group_obj[24]); select(current_selection,group_obj[25]); group(current_selection); deselect(current_selection); } ang3=angle(x[30],y[30],x[131],y[131])-angle(x[30],y[30],x[132],y[132]); rotate(33,30,ang3); rotate(34,30,ang3); rotate(10,30,ang3); rotate(11,30,ang3); rotate(105,30,ang3); cont(33,31,93,-dist(31,33)/3); cont(33,31,94,-2*dist(31,33)/3); x[86]=x[3]; y[86]=y[98]-6; x[80]=x[93]; y[80]=y[86]; coord(80,84,0,0); x[165]=x[94]; y[165]=y[86]-1; line_intersect(94,165,80,166,81); coord(81,85,0,0); cont(50,11,83,-9); dart(84,80,93,ylaosan_kellotus,1); ang=angle(x[93],y[93],x[84],y[84])-angle(x[93],y[93],x[80],y[80]); rotate(81,93,ang); rotate(85,93,ang); rotate(83,93,ang); rotate(11,93,ang); rotate(10,93,ang); rotate(34,93,ang); rotate(33,93,ang); rotate(94,93,ang); rotate(85,94,ang); rotate(83,94,ang); rotate(11,94,ang); rotate(10,94,ang); rotate(34,94,ang); rotate(33,94,ang); cont(22,26,26,-2); x[37]=x[37]+1; cont(26,22,95,-2*dist(26,22)/3); cont(26,22,96,-dist(26,22)/3); cont(49,54,89,-9); x[87]=x[96]; y[87]=y[89]; coord(88,92,0,0); x[90]=x[21]; y[90]=y[80]; coord(87,91,0,0); x[88]=x[95]; y[88]=y[89]; rotate(91,96,-ang); rotate(88,96,-ang); rotate(92,96,-ang); rotate(89,96,-ang); rotate(54,96,-ang); rotate(53,96,-ang); rotate(35,96,-ang); rotate(37,96,-ang); rotate(26,96,-ang); rotate(95,96,-ang); rotate(92,95,-ang); rotate(89,95,-ang); rotate(54,95,-ang); rotate(53,95,-ang); rotate(35,95,-ang); rotate(37,95,-ang); rotate(26,95,-ang); siirtox=-50; siirtoy=0; current_object=newobject("poly"); if((collar==0)||(collar==3)) { addpoint((x[31]+siirtox)/2.54, (y[31]+siirtoy)/2.54, "xarc_start"); addpoint((x[23]+siirtox)/2.54, (y[102]+siirtoy)/2.54, "xarc_corner"); addpoint((x[102]+siirtox)/2.54, (y[102]+siirtoy)/2.54, "line"); } if(collar==1) { addpoint((x[31]+siirtox)/2.54, (y[31]+siirtoy)/2.54, "line"); addpoint((x[23]+siirtox)/2.54, (y[102]+siirtoy)/2.54, "line"); addpoint((x[102]+siirtox)/2.54, (y[102]+siirtoy)/2.54, "line"); } if(collar==2) { addpoint((x[31]+siirtox)/2.54, (y[31]+siirtoy)/2.54, "xarc_start"); addpoint((x[31]-3+siirtox)/2.54, (y[36]+siirtoy)/2.54, "xarc_corner"); addpoint((x[102]+siirtox)/2.54, (y[102]+siirtoy)/2.54, "line"); } rotate(36,30,ang3); rotate(36,93,ang); rotate(36,94,ang); addpoint((x[86]+siirtox)/2.54, (y[86]+siirtoy)/2.54, "line"); addpoint((x[80]+siirtox)/2.54, (y[80]+siirtoy)/2.54, "xarc_start"); addpoint((x[34]+siirtox)/2.54, (y[84]+siirtoy)/2.54, "xarc_corner"); addpoint((x[83]+siirtox)/2.54, (y[83]+siirtoy)/2.54, "line"); addpoint((x[11]+siirtox)/2.54, (y[11]+siirtoy)/2.54, "xarc_start"); addpoint((x[10]+siirtox)/2.54, (y[10]+siirtoy)/2.54, "xarc_corner"); addpoint((x[34]+siirtox)/2.54, (y[34]+siirtoy)/2.54, "xarc_start"); addpoint((x[36]+siirtox)/2.54, (y[36]+siirtoy)/2.54, "xarc_corner"); addpoint((x[33]+siirtox)/2.54, (y[33]+siirtoy)/2.54, "line"); group_obj[26]=current_object; if (language == 0) { current_object=newobject("text","Outer Front piece CF, cut 1 on fold",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[86]+2+siirtox)/2.54, (y[86]+1+siirtoy)/2.54, "line"); group_obj[27]=current_object; if (language == 0) { current_object=newobject("text","without CF seam allaowance",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[86]+1+siirtox)/2.54, (y[86]+1+siirtoy)/2.54, "line"); group_obj[47]=current_object; if(sv>0) { offset_mark(26); select(current_selection,group_obj[27]); select(current_selection,group_obj[47]); group(current_selection); deselect(current_selection); } else { mark(26); current_selection=newselection("OBJECT"); select(current_selection,group_obj[26]); select(current_selection,group_obj[27]); select(current_selection,group_obj[47]); group(current_selection); deselect(current_selection); } siirtox=-2*dist(104,105)-15; siirtoy=-sp; 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"); addpoint((x[26]+siirtox)/2.54, (y[26]+siirtoy)/2.54, "xarc_start"); addpoint((x[37]+siirtox)/2.54, (y[37]+siirtoy)/2.54, "xarc_corner"); addpoint((x[35]+siirtox)/2.54, (y[35]+siirtoy)/2.54, "xarc_start"); addpoint((x[53]+siirtox)/2.54, (y[53]+siirtoy)/2.54, "xarc_corner"); addpoint((x[54]+siirtox)/2.54, (y[54]+siirtoy)/2.54, "line"); addpoint((x[89]+siirtox)/2.54, (y[89]+siirtoy)/2.54, "line"); addpoint((x[88]+siirtox)/2.54, (y[88]+siirtoy)/2.54, "line"); addpoint((x[91]+siirtox)/2.54, (y[91]+siirtoy)/2.54, "line"); addpoint((x[87]+siirtox)/2.54, (y[87]+siirtoy)/2.54, "line"); addpoint((x[101]+siirtox)/2.54, (y[101]-6+siirtoy)/2.54, "line"); group_obj[28]=current_object; if (language == 0) { current_object=newobject("text","Outer Backpiece CB, cut 2",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[87]+siirtox)/2.54, (y[87]+1+siirtoy)/2.54, "line"); group_obj[29]=current_object; if(sv>0) { offset_mark(28); select(current_selection,group_obj[29]); 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]); group(current_selection); deselect(current_selection); } siirtox=0; siirtoy=0; 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,170,2); cont(104,170,214,30); linecirc(31,104,214,ptp,1,303); double ang; ang=6*360/2/3.14/ptp*3.14/180; rotate(303,302,-ang); cont(302,303,304,-8); rotate (304,303,-angle (x[303],y[304],x[303],y[304]+90*3.14/180)); cont(302,303,304,-7); rotate (304,303,-angle (x[303],y[304],x[303],y[304]+90*3.14/180)); cont(303,304,305,5); rotate (305,304,-angle (x[303],y[304],x[303],y[304]-90*3.14/180)); cont(204,102,307,3); cont(307,202,307,-4); cont(304,305,504,50); cont(204,102,505,50); line_intersect(204,505,304,504,306); x[306]=x[306]+2; if(collar==3) { coord(0,200,0,5); coord(200,201,-kp/4,5); coord(201,202,-kp/4,0); coord(202,203,-kp/4,-2.5); coord(200,204,-kp,0); coord(200,205,0,11.5); coord(201,206,0,6.5); coord(202,207,0,6.5); coord(203,208,0,7.5); coord(204,209,0,8.5); cont(208,209,210,+4); current_object=newobject("poly"); addpoint((x[200]+siirtox)/2.54, (y[200]+5)/2.54, "line"); addpoint((x[201]+siirtox)/2.54, y[201]/2.54, "xarc_start"); addpoint((x[202]+siirtox)/2.54, y[202]/2.54, "xarc_corner"); addpoint((x[203]+siirtox)/2.54, y[203]/2.54, "line"); addpoint((x[204]+siirtox)/2.54, y[204]/2.54, "line"); addpoint((x[210]+siirtox)/2.54, y[210]/2.54, "LINE"); addpoint((x[209]+siirtox)/2.54, y[209]/2.54, "line"); addpoint((x[208]+siirtox)/2.54, y[208]/2.54, "xarc_start"); addpoint((x[207]+siirtox)/2.54, y[207]/2.54, "xarc_corner"); addpoint((x[206]+siirtox)/2.54, y[206]/2.54, "line"); addpoint((x[205]+siirtox)/2.54, y[205]/2.54, "LINE"); group_obj[29]=current_object; if (language == 0) { current_object=newobject("text","Collar. Cut 1 on fold. CB--->",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[205]-21)/2.54, (y[205]-4)/2.54, "line"); group_obj[30]=current_object; if (language == 0) { current_object=newobject("text","without CB seam allowance",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[205]-21)/2.54, (y[205]-5)/2.54, "line"); group_obj[31]=current_object; if(sv>0) { offset_mark(29); select(current_selection,group_obj[30]); select(current_selection,group_obj[31]); group(current_selection); deselect(current_selection); } else { mark(29); current_selection=newselection("OBJECT"); select(current_selection,group_obj[29]); select(current_selection,group_obj[30]); select(current_selection,group_obj[31]); group(current_selection); deselect(current_selection); } } ktpe=arclength(33,36,34)+arclength(34,10,11); ktpt=arclength(26,37,35)+arclength(35,9,11); ktp=ktpe+ktpt; 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); coord(1,5,0,-hp); center(5,1,6); y[6]=y[6]-4; coord(5,7,0,-3); coord(4,8,-kay/2+1,0); coord(4,9,kay/2+1,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.14/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); 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); 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) { siirtox=30+10; current_object=newobject("poly"); addpoint((x[1]+siirtox)/2.54, (y[1]+siirtoy)/2.54, "xarc_start"); addpoint((x[20]+siirtox)/2.54, (y[20]+siirtoy)/2.54, "xarc_corner"); addpoint((x[21]+siirtox)/2.54, (y[21]+siirtoy)/2.54, "line"); addpoint((x[22]+siirtox)/2.54, (y[22]+siirtoy)/2.54, "xarc_start"); addpoint((x[19]+siirtox)/2.54, (y[19]+siirtoy)/2.54, "xarc_corner"); if(sleeve_length==0) { addpoint((x[8]+siirtox)/2.54, (y[8]+siirtoy)/2.54, "xarc_start"); addpoint((x[30]+siirtox)/2.54, (y[30]+siirtoy)/2.54, "xarc_corner"); addpoint((x[28]+siirtox)/2.54, (y[28]+siirtoy)/2.54, "line"); addpoint((x[27]+siirtox)/2.54, (y[27]+siirtoy)/2.54, "line"); addpoint((x[29]+siirtox)/2.54, (y[29]+siirtoy)/2.54, "line"); addpoint((x[33]+siirtox)/2.54, (y[33]+siirtoy)/2.54, "line"); addpoint((x[32]+siirtox)/2.54, (y[32]+siirtoy)/2.54, "line"); addpoint((x[31]+siirtox)/2.54, (y[31]+siirtoy)/2.54, "line"); } else { addpoint((x[8]+siirtox)/2.54, (y[8]+siirtoy)/2.54, "line"); addpoint((x[8]+2+siirtox)/2.54, (y[8]-10+siirtoy)/2.54, "line"); addpoint((x[9]-1+siirtox)/2.54, (y[9]-10+siirtoy)/2.54, "line"); } addpoint((x[9]+siirtox)/2.54, (y[9]+siirtoy)/2.54, "xarc_start"); addpoint((x[23]+siirtox)/2.54, (y[23]+siirtoy)/2.54, "xarc_corner"); addpoint((x[26]+siirtox)/2.54, (y[26]+siirtoy)/2.54, "line"); addpoint((x[25]+siirtox)/2.54, (y[25]+siirtoy)/2.54, "xarc_start"); addpoint((x[24]+siirtox)/2.54, (y[24]+siirtoy)/2.54, "xarc_corner"); group_obj[32]=current_object; current_object=newobject("poly"); if(sleeve_length==1) { addpoint((x[1]+siirtox)/2.54, (y[8]-10+siirtoy)/2.54, "line"); } else { addpoint((x[1]+siirtox)/2.54, (y[6]+siirtoy)/2.54, "line"); } addpoint((x[1]+siirtox)/2.54, (y[1]+siirtoy)/2.54, "open"); group_obj[33]=current_object; if (language == 0) { current_object=newobject("text","Sleeve Front",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[19]+1+siirtox)/2.54, (y[19]+2+siirtoy)/2.54, "line"); group_obj[34]=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+siirtoy)/2.54, "line"); group_obj[35]=current_object; if (language == 0) { current_object=newobject("text","Sleeve. Cut 2. Shoulder.",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[1]+0.2+siirtox)/2.54, (y[1]-1+siirtoy)/2.54, "line"); group_obj[36]=current_object; siirtox=0; if(sv>0) { offset_mark(32); select(current_selection,group_obj[33]); select(current_selection,group_obj[34]); select(current_selection,group_obj[35]); select(current_selection,group_obj[36]); group(current_selection); deselect(current_selection); } else { mark(32); current_selection=newselection("OBJECT"); select(current_selection,group_obj[32]); select(current_selection,group_obj[33]); select(current_selection,group_obj[34]); select(current_selection,group_obj[35]); select(current_selection,group_obj[36]); group(current_selection); deselect(current_selection); } } if((sleeve==1)&&(sleeve_length==0)) { coord(32,166,-50,0); line_intersect(8,30,32,166,140); center(6,140,144); coord(6,145,0,0); coord(32,146,0,0); center(27,28,141); coord(141,147,0,0); coord(27,142,0,0); coord(27,148,0,0); center(27,29,143); coord(143,149,0,0); dart(142,27,6,hihan_kellotus/2,0); ang=angle(x[6],y[6],x[27],y[27])-angle(x[6],y[6],x[142],y[142]); rotate(141,6,-ang); rotate(144,6,-ang); rotate(147,144,-3*ang); rotate(28,144,-3*ang); rotate(140,144,-3*ang); rotate(148,145,ang); rotate(143,145,ang); rotate(146,145,ang); rotate(149,146,3*ang); rotate(29,146,3*ang); rotate(33,146,3*ang); siirtox=30+10; siirtoy=0; current_object=newobject("poly"); addpoint((x[1]+siirtox)/2.54, (y[1]+siirtoy)/2.54, "xarc_start"); addpoint((x[20]+siirtox)/2.54, (y[20]+siirtoy)/2.54, "xarc_corner"); addpoint((x[21]+siirtox)/2.54, (y[21]+siirtoy)/2.54, "line"); addpoint((x[22]+siirtox)/2.54, (y[22]+siirtoy)/2.54, "xarc_start"); addpoint((x[19]+siirtox)/2.54, (y[19]+siirtoy)/2.54, "xarc_corner"); addpoint((x[8]+siirtox)/2.54, (y[8]+siirtoy)/2.54, "line"); addpoint((x[140]+siirtox)/2.54, (y[31]+siirtoy)/2.54, "line"); addpoint((x[6]+siirtox)/2.54, (y[6]+siirtoy)/2.54, "line"); current_point=addpoint((x[32]+siirtox)/2.54, (y[32]+siirtoy)/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[31]+siirtox)/2.54, (y[31]+siirtoy)/2.54, "line"); addpoint((x[9]+siirtox)/2.54, (y[9]+siirtoy)/2.54, "xarc_start"); addpoint((x[23]+siirtox)/2.54, (y[23]+siirtoy)/2.54, "xarc_corner"); addpoint((x[26]+siirtox)/2.54, (y[26]+siirtoy)/2.54, "line"); addpoint((x[25]+siirtox)/2.54, (y[25]+siirtoy)/2.54, "xarc_start"); addpoint((x[24]+siirtox)/2.54, (y[24]+siirtoy)/2.54, "xarc_corner"); group_obj[37]=current_object; siirtoy=0; current_object=newobject("poly"); if(sleeve_length==1) { addpoint((x[1]+siirtox)/2.54, (y[8]-10+siirtoy)/2.54, "line"); } else { addpoint((x[1]+siirtox)/2.54, (y[6]+siirtoy)/2.54, "line"); } addpoint((x[1]+siirtox)/2.54, (y[1]+siirtoy)/2.54, "open"); group_obj[38]=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+siirtoy)/2.54, "line"); group_obj[39]=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+siirtoy)/2.54, "line"); group_obj[40]=current_object; if (language == 0) { current_object=newobject("text","Sleeve shoulder. Cut 2",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[1]+0.2+siirtox)/2.54, (y[1]-1+siirtoy)/2.54, "line"); group_obj[41]=current_object; if(sv>0) { offset_mark(37); select(current_selection,group_obj[38]); select(current_selection,group_obj[39]); select(current_selection,group_obj[40]); select(current_selection,group_obj[41]); group(current_selection); deselect(current_selection); } else { mark(37); current_selection=newselection("OBJECT"); select(current_selection,group_obj[37]); select(current_selection,group_obj[38]); select(current_selection,group_obj[39]); select(current_selection,group_obj[40]); select(current_selection,group_obj[41]); group(current_selection); deselect(current_selection); } siirtoy=-8; current_object=newobject("poly"); addpoint((x[140]+siirtox)/2.54, (y[140]+siirtoy)/2.54, "line"); addpoint((x[28]+siirtox)/2.54, (y[28]+siirtoy)/2.54, "line"); addpoint((x[147]+siirtox)/2.54, (y[147]+siirtoy)/2.54, "line"); addpoint((x[141]+siirtox)/2.54, (y[141]+siirtoy)/2.54, "line"); addpoint((x[142]+siirtox)/2.54, (y[142]+siirtoy)/2.54, "line"); addpoint((x[148]+siirtox)/2.54, (y[148]+siirtoy)/2.54, "line"); addpoint((x[143]+siirtox)/2.54, (y[148]+siirtoy)/2.54, "line"); addpoint((x[149]+siirtox)/2.54, (y[149]+siirtoy)/2.54, "line"); addpoint((x[29]+siirtox)/2.54, (y[29]+siirtoy)/2.54, "line"); addpoint((x[33]+siirtox)/2.54, (y[33]+siirtoy)/2.54, "line"); current_point=addpoint((x[146]+siirtox)/2.54, (y[146]+siirtoy)/2.54, "xarc_start"); notch_type(current_point,"NOTCH",1); addpoint((x[145]+siirtox)/2.54, (y[145]+siirtoy)/2.54, "xarc_corner"); addpoint((x[144]+siirtox)/2.54, (y[144]+siirtoy)/2.54, "line"); group_obj[42]=current_object; if (language == 0) { current_object=newobject("text","Sleeve Bottom Flare. Cut 2.",0.0,0.2,0.2,"SIMP.CHR"); } addpoint((x[144]+2+siirtox)/2.54, (y[143]+1+siirtoy)/2.54, "line"); group_obj[43]=current_object; if(sv>0) { offset_mark(42); select(current_selection,group_obj[43]); group(current_selection); deselect(current_selection); } else { mark(42); current_selection=newselection("OBJECT"); select(current_selection,group_obj[42]); select(current_selection,group_obj[43]); group(current_selection); deselect(current_selection); } } if((sleeve==1)&&(sleeve_length==1)) { x[140]=x[8]; y[140]=y[8]-15; center(140,6,142); coord(142,147,0,0); x[6]=x[1]; y[6]=y[140]; coord(6,143,0,0); x[146]=x[9]; y[146]=y[9]-15; coord(6,144,0,0); center(6,146,145); coord(145,148,0,0); ang=hihan_kellotus/2/dist(6,1); rotate(143,1,-ang); rotate(20,1,-ang); rotate(21,1,-ang); rotate(22,1,-ang); rotate(19,1,-ang); rotate(8,1,-ang); rotate(140,1,-ang); rotate(147,1,-ang); rotate(142,1,-ang); rotate(144,1,ang); rotate(24,1,ang); rotate(25,1,ang); rotate(26,1,ang); rotate(23,1,ang); rotate(9,1,ang); rotate(146,1,ang); rotate(148,1,ang); rotate(145,1,ang); ang=hihan_kellotus/dist(142,21); rotate(22,21,-ang); rotate(19,21,-ang); rotate(8,21,-ang); rotate(140,21,-ang); rotate(147,21,-ang); rotate(26,25,ang); rotate(23,25,ang); rotate(9,25,ang); rotate(146,25,ang); rotate(148,25,ang); y[1]=y[24]; x[21]=x[21]-1; x[25]=x[25]+1; siirtox=30+10; current_object=newobject("poly"); addpoint((x[1]+siirtox)/2.54, (y[1]+siirtoy)/2.54, "xarc_start"); addpoint((x[20]+siirtox)/2.54, (y[20]+siirtoy)/2.54, "xarc_corner"); addpoint((x[21]+siirtox)/2.54, (y[21]+siirtoy)/2.54, "line"); addpoint((x[22]+siirtox)/2.54, (y[22]+siirtoy)/2.54, "xarc_start"); addpoint((x[19]+siirtox)/2.54, (y[19]+siirtoy)/2.54, "xarc_corner"); addpoint((x[8]+siirtox)/2.54, (y[8]+siirtoy)/2.54, "line"); addpoint((x[140]+siirtox)/2.54, (y[140]+siirtoy)/2.54, "xarc_start"); addpoint((x[147]+siirtox)/2.54, (y[147]+siirtoy)/2.54, "xarc_corner"); addpoint((x[142]+siirtox)/2.54, (y[142]+siirtoy)/2.54, "line"); addpoint((x[143]+siirtox)/2.54, (y[143]+siirtoy)/2.54, "line"); addpoint((x[6]+siirtox)/2.54, (y[6]+siirtoy)/2.54, "line"); addpoint((x[144]+siirtox)/2.54, (y[144]+siirtoy)/2.54, "line"); addpoint((x[145]+siirtox)/2.54, (y[145]+siirtoy)/2.54, "xarc_start"); addpoint((x[148]+siirtox)/2.54, (y[148]+siirtoy)/2.54, "xarc_corner"); addpoint((x[146]+siirtox)/2.54, (y[146]+siirtoy)/2.54, "line"); addpoint((x[9]+siirtox)/2.54, (y[9]+siirtoy)/2.54, "xarc_start"); addpoint((x[23]+siirtox)/2.54, (y[23]+siirtoy)/2.54, "xarc_corner"); addpoint((x[26]+siirtox)/2.54, (y[26]+siirtoy)/2.54, "line"); addpoint((x[25]+siirtox)/2.54, (y[25]+siirtoy)/2.54, "xarc_start"); addpoint((x[24]+siirtox)/2.54, (y[24]+siirtoy)/2.54, "xarc_corner"); group_obj[43]=current_object; siirtoy=0; current_object=newobject("poly"); if(sleeve_length==1) { addpoint((x[1]+siirtox)/2.54, (y[8]-10+siirtoy)/2.54, "line"); } else { addpoint((x[1]+siirtox)/2.54, (y[6]+siirtoy)/2.54, "line"); } addpoint((x[1]+siirtox)/2.54, (y[1]+siirtoy)/2.54, "open"); group_obj[44]=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+siirtoy)/2.54, "line"); group_obj[45]=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+siirtoy)/2.54, "line"); group_obj[46]=current_object; if (language == 0) { current_object=newobject("text","Sleeve shoulder. Cut 2",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[1]+siirtox)/2.54, (y[1]-1+siirtoy)/2.54, "line"); group_obj[47]=current_object; if(sv>0) { offset_mark(43); select(current_selection,group_obj[44]); select(current_selection,group_obj[45]); select(current_selection,group_obj[46]); select(current_selection,group_obj[47]); group(current_selection); deselect(current_selection); } else { mark(43); current_selection=newselection("OBJECT"); select(current_selection,group_obj[43]); select(current_selection,group_obj[44]); select(current_selection,group_obj[45]); select(current_selection,group_obj[46]); select(current_selection,group_obj[47]); 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"); } dist(double p1, double p2) { return distance(x[p1],y[p1],x[p2],y[p2]); } Dart(double dest, double start, double end, double dista2, double dir) { double dista, ang, dx, dy, h; dx=x[start]-x[end]; dy=y[start]-y[end]; dista=sqrt(dx*dx+dy*dy); h=sqrt((dista*dista)+(dista2/2)*(dista2/2)); ang=atan(h,(dista2/2)); if (dir==0) { ang=ang+angle(x[start], y[start], x[end], y[end]); } else { ang=angle(x[start], y[start], x[end], y[end])-ang; } x[dest]=x[start]+dista2*cos(ang); y[dest]=y[start]+dista2*sin(ang); } 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; } 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(); } 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; } Forward() { index = index + 1; if (index == 5) { done = 1; } } Backward() { index = index - 1; } Popup1() { if (language == 0) { start_pict_dialog("BUST EASE"); add_pict_item("Normal (+4.75 in/+12 cm)","blank.jpg"); add_pict_item("Minimum (+4.5 in/+10 cm)","blank.jpg"); add_pict_item("Maximum (+5.5 in/+14 cm)","blank.jpg"); run_pict("Next"); ease=get_pict_result(); Forward(); } } Popup2() { if (language == 0) { start_pict_dialog("NECKLINE STYLE"); add_pict_item("Jewel neck","mn_ndress_neck-jwl.jpg"); add_pict_item("Square neck","mn_ndress_neck-sq.jpg"); add_pict_item("V-neck","mn_ndress_neck-v.jpg"); add_pict_item("Convertible collar","mn_ndress_neck-conv.jpg"); if (run_pict("Back","Next")) { collar=get_pict_result(); Forward(); } else { collar=0; Backward(); } } } Popup3() { if (language == 0) { start_pict_dialog("SLEEVE STYLE"); add_pict_item("Normal sleeve","mn_ndress_slv-str.jpg"); add_pict_item("Flared sleeve","mn_ndress_slv-flare.jpg"); if (run_pict("Back","Next")) { sleeve=get_pict_result(); Forward(); } else { sleeve=0; Backward(); } } } Popup4() { if (language == 0) { start_pict_dialog("SLEEVE LENGTH"); add_pict_item("Long","mn_ndress_ls.jpg"); add_pict_item("Short","mn_ndress_ss.jpg"); if (run_pict("Back","Next")) { sleeve_length=get_pict_result(); Forward(); } else { sleeve_length=0; Backward(); } } } Popup5() { if (language == 0) { start_pict_dialog("SHOULDER PAD EASE?"); add_pict_item("Shoulder pads","mn_ndress_sp.jpg"); add_pict_item("No shoulder pads","mn_ndress_sp_no.jpg"); if (run_pict("Back","Next")) { shoulder_padding=get_pict_result(); Forward(); } else { shoulder_padding=0; Backward(); } } } 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; } } dart(double dest, double start, double end, double dista2, double dir) { double dista, ang, dx, dy, h; dx=x[start]-x[end]; dy=y[start]-y[end]; dista=sqrt(dx*dx+dy*dy); h=sqrt((dista*dista)+(dista2/2)*(dista2/2)); ang=atan(h,(dista2/2)); if (dir==0) { ang=ang+angle(x[start], y[start], x[end], y[end]); } else { ang=angle(x[start], y[start], x[end], y[end])-ang; } x[dest]=x[start]+dista2*cos(ang); y[dest]=y[start]+dista2*sin(ang); }