// Copyright (C) 2001 Leena L�hteenm�ki, Finland // Copyright (C) 2012 PatternMaker Software // 2011/11/04 double index, done; object marker_array[20]; double marker_count, loop; double x[600], y[600]; double ang,ang2,vang,vdistance,rangle; object group_obj[200]; object current_object; point current_point; selection current_selection; double result; double model,ky,ry,vy,yly,aly,rkkv,rk,vk,sp,sl,op,tk; double ylk,alk,kay,ray,hp; double eml, tml, sml, smlyly,smlaly; double ktk,ktl,ptl,ptp,ptl,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 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 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() { double siirtoy; ky=39.25; ry=96; vy=78; yly=95; aly=102; rkkv=21; rk=36.8; vk=53.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; tl=16; pit=60; language=get_language(); if(language != 0) { language = 0; } check_reg(0, "Leena","L2macros", "This macro needs to be properly installed before running it."); //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_jewel_collar_width(); } if (index==5) { dialog_square_collar_width(); } 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) { tl=tl/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; } } else { if (language == 0) { metric=2*pop_up("Units","Inches","Centimeters"); } if (metric<1) { tl=tl/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; } } 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' DRESS"); } 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' DRESS- 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' DRESS - 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, "Flare at hem",flare, "Pocket width", tl, "Seam Allowance",sv); } } else { if (language == 0) { dialog_box("CUSTOM MEASUREMENTS", "Length from waist",pit, "Pocket width", tl, "Seam Allowance",sv); } } } if (is_function("unit_mode")==1) { metric = unit_mode(); if (!metric) { tl=tl*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) { tl=tl*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(72); select(current_selection,group_obj[73]); group(current_selection); deselect(current_selection); } else { mark(72); current_selection=newselection("OBJECT"); select(current_selection,group_obj[72]); select(current_selection,group_obj[73]); group(current_selection); deselect(current_selection); } siirtox=0; } draw_CF_text() { siirtox=0; siirtoy=0; if (language == 0) { current_object=newobject("text","When cutting pieces on fold",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[3]+2)/2.54, (y[23]-2)/2.54, "line"); group_obj[77]=current_object; if (language == 0) { current_object=newobject("text","remove CF seam allowance",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[3]+1)/2.54, (y[23]-2)/2.54, "line"); group_obj[78]=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[3]+5+siirtox)/2.54, (y[6]+.2-pit+alk)/2.54, "line"); group_obj[76]=current_object; } if (language == 0) { current_object=newobject("text","Center Front Piece CF. Cut 1 on fold.",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[3]+siirtox)/2.54, (y[3])/2.54, "line"); group_obj[71]=current_object; } draw_back_facing() { siirtox=0; 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, "LINE"); group_obj[31]=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]-7+siirtox)/2.54, (y[21]-2+siirtoy)/2.54, "line"); group_obj[32]=current_object; if(sv>0) { offset_mark(31); select(current_selection,group_obj[32]); 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]); group(current_selection); deselect(current_selection); } siirtoy=0; } Draw_pocket() { 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); } } } } Draw_princess_CF() { siirtox=0; siirtoy=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[102])/2.54, "xarc_corner"); addpoint((x[3])/2.54, (y[102])/2.54, "line"); current_point=addpoint((x[3])/2.54, (y[3])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[4])/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[23])/2.54, (y[102])/2.54, "line"); addpoint((x[3])/2.54, (y[102])/2.54, "line"); addpoint((x[3])/2.54, (y[102])/2.54, "line"); current_point=addpoint((x[3])/2.54, (y[3])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[4])/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(collar==2) { addpoint((x[131]+siirtox)/2.54, (y[131]+siirtoy)/2.54, "line"); addpoint((x[31]+siirtox)/2.54, (y[31]+siirtoy)/2.54, "xarc_start"); addpoint((x[23]-4+siirtox)/2.54, (y[102]+siirtoy)/2.54, "xarc_corner"); addpoint((x[102]+siirtox)/2.54, (y[102]+siirtoy)/2.54, "line"); addpoint((x[102]+siirtox)/2.54, (y[102]-5+siirtoy)/2.54, "xarc_start"); current_point= addpoint((x[3])/2.54, (y[3])/2.54, "xarc_corner"); notch_type(current_point,"NOTCH",1); current_point= addpoint((x[4])/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } current_point=addpoint((x[5])/2.54, (y[5])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[6])/2.54, (y[6])/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[6])/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); group_obj[114]=current_object; if(sv>0) { offset_mark(114); select(current_selection,group_obj[71]); select(current_selection,group_obj[77]); select(current_selection,group_obj[78]); 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[76]); group(current_selection); deselect(current_selection); } else { mark(114); current_selection=newselection("OBJECT"); select(current_selection,group_obj[114]); select(current_selection,group_obj[71]); select(current_selection,group_obj[77]); select(current_selection,group_obj[78]); 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]); } group(current_selection); deselect(current_selection); } } Draw_princess_front_side() { siirtox=0; siirtoy=0; 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[63]=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+siirtox)/2.54, (y[4])/2.54, "line"); group_obj[117]=current_object; 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"); addpoint((x[33])/2.54, (y[33])/2.54, "line"); } 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); 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"); group_obj[118]=current_object; if(sv>0) { offset_mark(118); select(current_selection,group_obj[63]); select(current_selection,group_obj[117]); group(current_selection); deselect(current_selection); } else { mark(118); current_selection=newselection("OBJECT"); select(current_selection,group_obj[118]); select(current_selection,group_obj[63]); select(current_selection,group_obj[117]); group(current_selection); deselect(current_selection); } } Draw_aline_front() { siirtox=0; siirtoy=0; 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[102])/2.54, "xarc_corner"); addpoint((x[3])/2.54, (y[102])/2.54, "line"); current_point=addpoint((x[4])/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[23])/2.54, (y[102])/2.54, "line"); addpoint((x[3])/2.54, (y[102])/2.54, "line"); current_point=addpoint((x[4])/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(collar==2) { addpoint((x[131]+siirtox)/2.54, (y[131]+siirtoy)/2.54, "line"); addpoint((x[31]+siirtox)/2.54, (y[31]+siirtoy)/2.54, "xarc_start"); addpoint((x[23]-4+siirtox)/2.54, (y[102]+siirtoy)/2.54, "xarc_corner"); addpoint((x[102]+siirtox)/2.54, (y[102]+siirtoy)/2.54, "line"); addpoint((x[102]+siirtox)/2.54, (y[102]-5+siirtoy)/2.54, "xarc_start"); current_point= addpoint((x[3])/2.54, (y[3])/2.54, "xarc_corner"); notch_type(current_point,"NOTCH",1); current_point= addpoint((x[4])/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } current_point=addpoint((x[5])/2.54, (y[5])/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[6])/2.54, (y[6]-pit+alk)/2.54, "line"); addpoint((x[38])/2.54, (y[38]-pit+alk)/2.54, "line"); addpoint((x[500])/2.54, (y[500])/2.54, "line"); 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"); addpoint((x[33])/2.54, (y[33])/2.54, "line"); } 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[23]=current_object; if(sv>0) { offset_mark(23); select(current_selection,group_obj[71]); select(current_selection,group_obj[77]); select(current_selection,group_obj[78]); 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[76]); group(current_selection); deselect(current_selection); } else { mark(23); current_selection=newselection("OBJECT"); select(current_selection,group_obj[23]); select(current_selection,group_obj[71]); select(current_selection,group_obj[77]); select(current_selection,group_obj[78]); 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]); } group(current_selection); deselect(current_selection); } 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); 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); } Draw_straight_front() { siirtox=0; siirtoy=0; 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"); addpoint((x[30])/2.54, (y[30]-2)/2.54, "line"); addpoint((x[41])/2.54, (y[41])/2.54, "line"); addpoint((x[39])/2.54, (y[39])/2.54, "line"); addpoint((x[40])/2.54, (y[40])/2.54, "line"); group_obj[64]=current_object; current_object=newobject("poly"); if(collar==0) { addpoint((x[31])/2.54, (y[31])/2.54, "xarc_start"); addpoint((x[23])/2.54, (y[102])/2.54, "xarc_corner"); addpoint((x[3])/2.54, (y[102])/2.54, "line"); current_point=addpoint((x[4])/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[23])/2.54, (y[102])/2.54, "line"); addpoint((x[3])/2.54, (y[102])/2.54, "line"); addpoint((x[3])/2.54, (y[102])/2.54, "line"); current_point=addpoint((x[3])/2.54, (y[3])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[4])/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } if(collar==2) { addpoint((x[131]+siirtox)/2.54, (y[131]+siirtoy)/2.54, "line"); addpoint((x[31]+siirtox)/2.54, (y[31]+siirtoy)/2.54, "xarc_start"); addpoint((x[23]-4+siirtox)/2.54, (y[102]+siirtoy)/2.54, "xarc_corner"); addpoint((x[102]+siirtox)/2.54, (y[102]+siirtoy)/2.54, "line"); addpoint((x[102]+siirtox)/2.54, (y[102]-5+siirtoy)/2.54, "xarc_start"); current_point= addpoint((x[3])/2.54, (y[3])/2.54, "xarc_corner"); notch_type(current_point,"NOTCH",1); current_point= addpoint((x[4])/2.54, (y[4])/2.54, "line"); notch_type(current_point,"NOTCH",1); } current_point=addpoint((x[5])/2.54, (y[5])/2.54, "line"); notch_type(current_point,"NOTCH",1); current_point=addpoint((x[6])/2.54, (y[6])/2.54, "line"); notch_type(current_point,"NOTCH",1); addpoint((x[6])/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"); addpoint((x[33])/2.54, (y[33])/2.54, "line"); } 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[27]=current_object; if(sv>0) { offset_mark(27); select(current_selection,group_obj[71]); select(current_selection,group_obj[77]); select(current_selection,group_obj[78]); 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[64]); select(current_selection,group_obj[76]); group(current_selection); deselect(current_selection); } else { mark(27); current_selection=newselection("OBJECT"); select(current_selection,group_obj[27]); select(current_selection,group_obj[71]); select(current_selection,group_obj[77]); select(current_selection,group_obj[78]); 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[64]); group(current_selection); deselect(current_selection); } 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); } Draw_princess_back_side() { siirtox=0; siirtoy=0; 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[28]=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+siirtox)/2.54, (y[4])/2.54, "line"); group_obj[29]=current_object; current_object=newobject("poly"); current_point=addpoint((x[47]+4)/2.54, (y[47])/2.54, "xarc_start"); current_point=addpoint((x[48]+4)/2.54, (y[48])/2.54, "xarc_corner"); 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); 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"); notch_type(current_point,"NOTCH",1); addpoint((x[47]+4)/2.54, (y[47]-pit+alk)/2.54, "line"); notch_type(current_point,"NOTCH",1); group_obj[30]=current_object; if(sv>0) { offset_mark(30); select(current_selection,group_obj[28]); select(current_selection,group_obj[29]); group(current_selection); deselect(current_selection); } else { mark(30); current_selection=newselection("OBJECT"); select(current_selection,group_obj[30]); select(current_selection,group_obj[28]); select(current_selection,group_obj[29]); group(current_selection); deselect(current_selection); } } Draw_princess_CB() { siirtox=0; siirtoy=0; current_object=newobject("poly"); addpoint((x[21]-.5+4)/2.54, (y[21])/2.54, "line"); addpoint((x[12]-.5+4)/2.54, (y[12]+dist(12,21)/2)/2.54, "line"); current_point=addpoint((x[13]-.5-1.5+4)/2.54, (y[13])/2.54, "line"); notch_type(current_point,"NOTCH",0); addpoint((x[14]-.5-1+4)/2.54, (y[14])/2.54, "OPEN"); group_obj[74]=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[33]=current_object; if (language == 0) { current_object=newobject("text","Center Back Piece. Cut 2. Grainline.",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[46]+0.2+2+4+siirtox)/2.54, (y[10]-5)/2.54, "line"); group_obj[34]=current_object; if (language == 0) { current_object=newobject("text","CB, Zipper",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[12]-1+4)/2.54, (y[12]+dist(12,21)/2)/2.54, "line"); group_obj[68]=current_object; current_object=newobject("poly"); current_point=addpoint((x[43]+4)/2.54, (y[43])/2.54, "line"); 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); 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"); group_obj[35]=current_object; if(sv>0) { offset_mark(35); select(current_selection,group_obj[33]); select(current_selection,group_obj[34]); select(current_selection,group_obj[68]); select(current_selection,group_obj[74]); group(current_selection); deselect(current_selection); } else { mark(35); current_selection=newselection("OBJECT"); select(current_selection,group_obj[35]); select(current_selection,group_obj[33]); select(current_selection,group_obj[34]); select(current_selection,group_obj[68]); select(current_selection,group_obj[74]); group(current_selection); deselect(current_selection); } } Draw_aline_back() { siirtox=0; siirtoy=0; 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(9,127,ang); rotate(11,127,ang); rotate(502,127,ang); rotate(503,127,ang); rotate(508,127,ang); rotate(53,127,ang); rotate(54,127,ang); if (language == 0) { current_object=newobject("text","Center Back Piece. Cut 1 on fold. Grainline.",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[13]-1+4+siirtox)/2.54, (y[4])/2.54, "line"); group_obj[38]=current_object; if (language == 0) { current_object=newobject("text","Center Back",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[12]-1+4+siirtox)/2.54, (y[37])/2.54, "line"); group_obj[69]=current_object; 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, "line"); addpoint((x[502]+4)/2.54, (y[502])/2.54, "line"); addpoint((x[15]+4)/2.54, (y[15]-pit+alk)/2.54, "open"); group_obj[39]=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[44]=current_object; rotate(26,127,-ang); rotate(37,127,-ang); rotate(35,127,-ang); rotate(9,127,-ang); rotate(11,127,-ang); rotate(502,127,-ang); rotate(503,127,-ang); rotate(508,127,-ang); rotate(53,127,-ang); rotate(54,127,-ang); if(sv>0) { offset_mark(39); select(current_selection,group_obj[38]); select(current_selection,group_obj[69]); select(current_selection,group_obj[44]); group(current_selection); deselect(current_selection); } else { mark(39); current_selection=newselection("OBJECT"); select(current_selection,group_obj[39]); select(current_selection,group_obj[38]); select(current_selection,group_obj[69]); select(current_selection,group_obj[44]); group(current_selection); deselect(current_selection); } } Draw_straight_back() { siirtox=0; siirtoy=0; current_object=newobject("poly"); addpoint((x[21]-.5+4)/2.54, (y[21])/2.54, "line"); addpoint((x[12]-.5+4)/2.54, (y[12]+dist(12,21)/2)/2.54, "line"); current_point=addpoint((x[13]-.5-1.5+4)/2.54, (y[13])/2.54, "line"); notch_type(current_point,"NOTCH",0); addpoint((x[14]-.5-1+4)/2.54, (y[14])/2.54, "OPEN"); group_obj[74]=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"); addpoint((x[43]+4)/2.54, (y[43])/2.54, "line"); group_obj[40]=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[41]=current_object; if (language == 0) { current_object=newobject("text","Back Piece. Cut 2. Grainline",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[46]+2+4+siirtox)/2.54, (y[4])/2.54, "line"); group_obj[42]=current_object; if (language == 0) { current_object=newobject("text","CB, Zipper",-1.570796,0.2,0.2,"SIMP.CHR"); } addpoint((x[12]-4+2+4+siirtox)/2.54, (y[37])/2.54, "line"); group_obj[70]=current_object; 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"); addpoint((x[248]+4)/2.54, (y[248])/2.54, "xarc_start"); addpoint((x[48]+4)/2.54, (y[48])/2.54, "xarc_corner"); 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"); group_obj[45]=current_object; if((neck_width==1)||(neck_width==2)) { cont(22,26,510,+2); coord(510,26,0,0); } if(sv>0) { offset_mark(45); select(current_selection,group_obj[40]); select(current_selection,group_obj[41]); select(current_selection,group_obj[42]); select(current_selection,group_obj[70]); select(current_selection,group_obj[74]); group(current_selection); deselect(current_selection); } else { mark(45); current_selection=newselection("OBJECT"); select(current_selection,group_obj[45]); select(current_selection,group_obj[40]); select(current_selection,group_obj[41]); select(current_selection,group_obj[42]); select(current_selection,group_obj[70]); select(current_selection,group_obj[74]); group(current_selection); deselect(current_selection); } } Draw_sleeves() { siirtox=0; siirtoy=0; if((sleeve==0)||(sleeve==1)) { ktpe=arclength(33,36,34)+arclength(34,10,11); ktpt=arclength(26,37,35)+arclength(35,9,11); } 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)); } siirtox=0; siirtoy=0; 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[46]=current_object; current_object=newobject("poly"); if(sleeve_length==1) { addpoint((x[1])/2.54, (y[8]-10)/2.54, "line"); } else { addpoint((x[1])/2.54, (y[6])/2.54, "line"); } if((sleeve==0)||(sleeve==1)) { addpoint((x[1])/2.54, (y[1])/2.54, "open"); } else { addpoint((x[1])/2.54, (y[1]-6)/2.54, "open"); } group_obj[47]=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[48]=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[49]=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[50]=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[51]=current_object; } if(sv>0) { offset_mark(46); select(current_selection,group_obj[47]); select(current_selection,group_obj[48]); select(current_selection,group_obj[49]); if((sleeve==0)||(sleeve==1)) { select(current_selection,group_obj[50]); } else { select(current_selection,group_obj[51]); } group(current_selection); deselect(current_selection); } else { mark(46); current_selection=newselection("OBJECT"); select(current_selection,group_obj[46]); select(current_selection,group_obj[47]); select(current_selection,group_obj[48]); select(current_selection,group_obj[49]); if((sleeve==0)||(sleeve==1)) { select(current_selection,group_obj[50]); } else { select(current_selection,group_obj[51]); } 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[66]=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[67]=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[52]=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[53]=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[54]=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[55]=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[56]=current_object; if(sv>0) { offset_mark(52); select(current_selection,group_obj[66]); select(current_selection,group_obj[67]); 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(52); current_selection=newselection("OBJECT"); select(current_selection,group_obj[52]); select(current_selection,group_obj[66]); select(current_selection,group_obj[67]); 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); } 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[57]=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[58]=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[59]=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[60]=current_object; current_object=newobject("poly"); addpoint((x[32]+siirtox)/2.54, (y[32])/2.54, "line"); addpoint((x[32]+siirtox)/2.54, (y[7])/2.54, "line"); group_obj[61]=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[62]=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]); select(current_selection,group_obj[62]); 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]); select(current_selection,group_obj[62]); group(current_selection); deselect(current_selection); } } } 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(); } 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 == 0) { done = 1; } } Backward() { index = index - 1; } 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("DRESS STYLE"); add_pict_item("Princess","dress_princess_seam.jpg"); add_pict_item("A-line","dress_a-line.jpg"); add_pict_item("Straight","dress_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 STYLE"); add_pict_item("Jewel neck","dress_jewel-neck.jpg"); add_pict_item("Square neck","dress_square-neck.jpg"); add_pict_item("V-neck","dress_v-neck.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","dress_depth_normal.jpg"); add_pict_item("Shallow","dress_depth_shallow.jpg"); add_pict_item("Deep","dress_depth_deep.jpg"); add_pict_item("Extra Deep","dress_depth_extra-deep.jpg"); if (run_pict("Back","Next")) { neck_depth=get_pict_result(); Forward(); } else { neck_depth=0; Backward(); } } } dialog_jewel_collar_width() { if (language == 0) { start_pict_dialog("NECK WIDTH"); add_pict_item("Normal","dress_width_normal.jpg"); add_pict_item("Wide","dress_width_wide.jpg"); add_pict_item("Extra Wide","dress_width_extra-wide.jpg"); if (run_pict("Back","Next")) { neck_width=get_pict_result(); Forward(); } else { neck_width=0; Backward(); } } } dialog_square_collar_width() { if (language == 0) { start_pict_dialog("NECK WIDTH"); add_pict_item("Normal","dress_width_normal.jpg"); add_pict_item("Wide","dress_width_wide.jpg"); if (run_pict("Back","Next")) { neck_width=get_pict_result(); Forward(); } else { neck_width=0; Backward(); } } } dialog_sleeve() { if (language == 0) { start_pict_dialog("SLEEVE STYLE"); add_pict_item("One-piece sleeve","dress_slv_1-pc.jpg"); add_pict_item("Two-piece sleeve","dress_slv_2-pc.jpg"); add_pict_item("Dropped sleeve","dress_slv_dropped.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","dress_slv_long.jpg"); add_pict_item("Short","dress_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","dress_sp.jpg"); add_pict_item("No shoulder pads","dress_no_sp.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","dress_pkt_patch.jpg"); add_pict_item("Welt pocket","dress_pkt_welt.jpg"); add_pict_item("Buttonhole pocket","dress_pkt_buttonhole.jpg"); add_pict_item("Flap pocket","dress_pkt_flap.jpg"); add_pict_item("No pocket","dress_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","dress_pkt_slant-horiz.jpg"); add_pict_item("Slant to back","dress_pkt_slant-back.jpg"); add_pict_item("Slant to front","dress_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 == 2)) { index = index + 1; } if ((index == 3) && (collar == 2)) { index = index + 1; } if ((index == 3) && (collar == 2)) { index = index + 1; } if ((index == 4) && (collar != 0)) { index = index + 1; } if ((index == 5) && (collar != 1)) { 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 != 1)) { index = index - 1; } if ((index == 4) && (collar != 0)) { index = index - 1; } if ((index == 3) && (collar == 2)) { 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; }