//preview[view:west,tilt:bottom] //////////////////////////////////////////////////////////////////////////////////////////// /////////////////// *Customizer variables* //////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// 4length = 115.25; case_thickness = 1.8; 4cornerR = 8.77; input = [[173,265],[[249.79,24.88],[248.02,25.32],[244.25,27.89],[239.44,32.33],[235.15,37.24],[231.94,41.84],[229.73,45.5],[228.03,49.68],[226.05,55.5],[224.36,63.2],[224.11,73],[224.01,80.56],[223.44,84],[222.11,83.1],[220.19,80.23],[218.32,75.42],[217.67,69.23],[217.8,63.16],[218.35,58],[219.19,53.5],[217.25,55.5],[215.36,58.35],[213.53,62.38],[212.2,68],[211.74,74.97],[212.27,82.36],[214.67,88.59],[218.18,95.54],[222.48,103.94],[227.34,113.39],[227.14,125.21],[227.32,134.81],[228.11,140.98],[229.77,144.73],[232.08,148.21],[234.87,151.5],[234.34,144.5],[234.37,137.67],[236.5,131.5],[239.37,125.94],[242.47,121],[245.27,116.86],[247.41,113.22],[248.88,111.07],[250.04,110.53],[250.72,112.11],[251,115.09],[250.19,119.59],[248,125],[245.88,130.19],[245,134.32],[245.51,137.21],[246.83,139.35],[248.49,140.51],[249.91,141],[250.7,140.3],[250.53,138.12],[250.9,134.69],[254.74,129.37],[258.88,124.05],[262.04,119.5],[264.03,114.84],[264.5,108],[263.94,100.75],[261.04,94.51],[257.01,88.67],[252.17,83.01],[248.22,79.44],[246.35,78.59],[246.8,80.95],[248.46,85.09],[250.24,89.7],[250.99,93.19],[250.72,95.26],[250.06,96.46],[248.54,95.62],[246.2,92.77],[243.24,87.99],[240.26,82.5],[237.8,76.71],[236.13,71.2],[235.33,66.17],[235,61.52],[235.45,56.29],[236.52,49.9],[238.22,43.74],[240.18,39.08],[242.83,35.15],[246.23,30.73],[248.9,27.04],[249.79,24.88]],[[227.69,35],[225.33,35.97],[221.83,38.3],[218.28,40.82],[215.82,42.24],[214.32,42.31],[213.06,41.57],[212.47,40.16],[212.59,38.63],[212.71,37.47],[212.09,37],[210.89,37.95],[209.58,40.25],[208.24,43.86],[206.98,47.98],[204.98,52.41],[201.2,56.73],[198.28,59.84],[198.18,61],[200.28,60.58],[203.13,59.57],[207.07,57.23],[211.8,53.6],[216.74,48.84],[221.16,43.78],[224.62,39.54],[227.23,36.75],[228.49,35.36],[227.69,35]],[[186.25,43.03],[184.99,43.68],[183,45.18],[179.36,47.53],[174.12,50.22],[167.82,52.84],[161.62,55.05],[157.2,56.41],[155.17,56.99],[155.86,55.82],[158,53],[159.96,50.18],[160.22,49],[158.41,49.76],[155.39,51.6],[151.73,54.31],[148.38,57.17],[145.77,59.22],[143.88,59.95],[142.57,59.85],[141.35,59.88],[139.91,61.02],[138.07,63.6],[136,66.29],[134.01,67.71],[132.05,69.06],[130.07,71.61],[128.22,74],[126.59,75],[125.37,74.71],[124.5,74],[123.79,73.29],[122.97,73],[121.84,73.94],[120.4,76.19],[118.66,78.91],[116.78,80.98],[115.32,82.98],[115.88,86.54],[117.1,90],[118.53,92.75],[119.93,94.34],[121.06,95],[121.73,94.63],[122.03,93.75],[122.9,91.84],[124.97,89],[127.75,86.29],[129.93,86.75],[131.52,87.63],[132.49,88],[132.85,87.57],[133,86.54],[133.61,85.17],[135.08,83.96],[137.13,83.41],[139.09,84.58],[140.74,86.91],[142.02,90.06],[142.52,93.52],[142.04,96.4],[140.96,98.24],[139.75,99],[137.9,99.85],[135.27,101.9],[132.66,104.07],[130.86,105.21],[131.08,106.63],[133.71,109.71],[136.8,113.51],[138.48,116.9],[139.2,119.09],[139.97,120],[140.73,119.54],[141.39,118.42],[141.82,116.03],[142,112.53],[142.37,109.14],[143.5,107.64],[144.56,106.47],[145,104.48],[145.41,101.87],[146.41,99.2],[148.3,96.45],[150.84,93.63],[153.95,91.4],[157.32,91.4],[160.76,92.05],[162.37,88.02],[163.95,85.18],[165.47,84],[166.96,84.87],[168.47,86.95],[169.55,89.56],[170.01,91.7],[169.35,94.37],[167.77,98.26],[165.66,101.78],[163.76,103.58],[162.52,104.31],[162,105.28],[160.16,107.87],[155.72,112.47],[150.91,117.66],[148.13,121.68],[146.64,124.43],[144.91,126.58],[143.54,128.7],[142.99,131.4],[142.58,134.37],[141.61,137.15],[140.71,140.39],[140.68,144.65],[141.48,149.76],[142.76,155.25],[144.24,159.31],[145.53,161],[146.88,160.41],[148.51,158.99],[149.6,157.39],[149.67,156.34],[149.54,155.47],[150.16,154.31],[150.6,152.75],[149.15,150.66],[147.63,148.84],[147,147.69],[147.59,147.2],[149,147],[150.4,146.78],[150.97,146.25],[150.51,145.15],[149.47,143.56],[148.43,141.84],[148,140.43],[148.63,139.42],[150.13,138.68],[151.63,137.85],[151.47,136.31],[150.78,133.95],[150.24,130.82],[149.8,127.14],[151.9,127.68],[153.59,127.65],[154,125.81],[154.42,123.52],[155.43,121.44],[156.83,120.14],[158.13,120.75],[159.26,121.63],[160.2,122],[160.77,120.9],[161.02,118.25],[161.33,115.16],[162.06,113],[163.19,112.17],[164.67,113.75],[166.04,115.34],[167.12,116],[167.74,114.86],[168,112.12],[168.41,109.04],[169.41,107.07],[170.64,106.44],[171.47,106.95],[172.35,107.69],[173.57,108],[174.6,106.91],[174.37,102.5],[173.72,97],[177.2,97],[179.84,96.81],[181.33,96.34],[181.21,95.46],[179.99,94.28],[178.59,92.72],[178,90.92],[178.74,89.18],[180.75,87.82],[184.31,86.31],[189,84.29],[193.69,81.82],[197.25,79.26],[199.19,77.15],[200,75.79],[199.13,75.64],[197.05,76.47],[194.75,77.55],[193.35,78],[193.17,77.65],[193.8,76.8],[194.65,75.72],[195,74.8],[193.08,74.23],[188.46,74],[182.95,74.41],[179.46,75.62],[177.72,77.05],[177,78.24],[179.11,78.87],[184.99,78.79],[191.12,78.66],[191.18,79.59],[188.12,80.94],[183.3,82.42],[178.38,83.54],[175.11,84],[173.62,83.67],[173,82.86],[172.52,81.71],[171.38,80.53],[170.7,79.14],[173.63,76.97],[177.5,74.59],[175,74.25],[172.82,73.86],[171.07,73.41],[170.23,72.7],[171.33,71.24],[174.72,69.93],[183.91,69.86],[193.18,69.76],[197.9,68.55],[200.09,67.21],[201,66.22],[198.58,65.75],[192.75,65.62],[185.96,65.92],[181.21,66.5],[178.66,66.82],[178.21,65.88],[177.65,64.88],[175,64.81],[171.54,65.48],[168.13,66.66],[164.9,67.67],[162.13,67],[159.5,65.8],[163.26,62.53],[167.69,59.28],[173.06,56.05],[178.48,52.67],[183.04,49.07],[185.84,46.08],[187,44.15],[186.78,43.35],[186.25,43.03]],[[196.06,46],[194.39,47.33],[191.41,50.53],[186.83,54.64],[179.5,57.09],[173.41,58.99],[170,60.7],[169.27,61.63],[169.64,61.65],[173.56,60.94],[181.4,60.1],[190.77,58.85],[196.38,56.62],[200.03,53.78],[202.46,50.45],[203.54,47.77],[203.73,46.39],[203.04,46.53],[202.02,47.48],[200.71,48.55],[199.35,49],[198.18,48.56],[197.36,47.5],[196.74,46.44],[196.06,46]],[[141.06,70],[140.2,70.31],[139.46,71.07],[139.15,71.98],[139.33,72.67],[140.02,72.85],[140.93,72.54],[141.69,71.8],[142,70.94],[141.72,70.28],[141.06,70]],[[155.69,72],[152.78,72.43],[150.44,73.47],[148.5,74.94],[152.17,74.97],[155.22,74.81],[157.42,74.39],[158.54,73.7],[159,72.89],[158.03,72.26],[155.69,72]],[[149.27,78.35],[145.38,78.2],[143.57,78.88],[143.6,79.87],[144.69,80.65],[146.43,81.68],[148.08,83.24],[149.66,85.2],[152.58,82.68],[154.46,80.73],[154.89,79.55],[152.98,78.94],[149.27,78.35]],[[201.65,80],[200.42,80.75],[197.71,82.55],[193.81,84.78],[189.72,86.56],[186.08,87.93],[183.25,89.18],[181.66,90.37],[181,91.6],[181.59,92.68],[183.02,93.51],[185.36,93.76],[188.14,93.47],[190.48,93.22],[190.79,94.14],[189.5,95.76],[187.03,97.75],[183.8,99.34],[180.72,100],[177.74,100],[178.32,103.75],[178.92,107.06],[179.56,109.75],[179.65,111.6],[177.68,112],[175.69,111.71],[174.5,111],[173.6,110.29],[172.31,110],[171.14,110.97],[171.23,115.03],[171.33,118.73],[170.88,120.57],[169.57,120.45],[167.57,119.46],[165.49,118.51],[163.97,118.52],[163.32,120.05],[163.52,123.1],[163.79,125.86],[163.52,127],[162.45,126.68],[160.81,125.9],[159,125.31],[157.89,126.15],[157.28,128.06],[157.02,130.75],[156.64,133.21],[155.5,134],[154.44,134.38],[154,135.28],[154.46,136.83],[155.56,138.78],[156.48,140.64],[156.5,142],[155.62,142.71],[154.36,143],[153.3,143.63],[153.5,146],[153.7,148.21],[153.08,149],[152.32,149.44],[152,150.5],[152.27,151.56],[152.93,152],[154.05,152.46],[155.43,153.57],[156.54,155.1],[157,156.57],[156.44,157.58],[155.09,158],[152.98,158.9],[150.59,161.08],[148.67,164.22],[148,167.49],[148.67,170.66],[151.08,173.41],[153.5,175.24],[155.02,176],[155.82,175.69],[156.54,174.93],[156.52,173.82],[155.55,172.66],[154.53,171.33],[154.52,169.82],[155.81,168.31],[158.05,166.98],[160.92,166.32],[163.73,166.45],[166.74,167.65],[170.09,169.59],[173.62,171.61],[177.08,173.02],[180.08,173.71],[182.49,173.98],[184.32,173.71],[185.9,173.08],[186.62,171.84],[185.15,169.46],[183.56,166.41],[183,162.77],[183.47,158.98],[184.6,155.44],[187.07,151.82],[190.78,147.85],[194.25,145.08],[195.79,144.86],[195.46,147.17],[194.1,150.99],[192.5,156.38],[192,162.92],[192.51,169.52],[194,175.24],[195.41,179.18],[196,181.27],[195.3,181.64],[193.62,181.44],[190.74,181.58],[186.99,183.01],[182.97,185.61],[179.29,188.84],[176.26,192.75],[173.84,197],[172.27,202.16],[171.28,208.25],[170.52,213.45],[169.3,215],[167.89,213.98],[166.45,211.53],[165.43,208.19],[165,205.03],[164.71,202.89],[164,202],[163.29,203.55],[163,207.26],[163.57,212.54],[164.94,217.85],[167.08,222.6],[169.48,226.57],[171.87,229.27],[173.94,230.97],[175.81,231.97],[175.25,227.83],[175.07,224.66],[176.1,224.55],[179.22,226.88],[184.76,231.28],[190.2,236.02],[193.09,239.16],[193.69,240.74],[193.63,241.7],[192.2,241.42],[189.5,240],[186.78,238.6],[185.31,238.36],[186.33,240.43],[189.61,244.57],[193.35,248.93],[195.46,251.54],[195.66,253.52],[194.21,256.84],[192.65,259.79],[192,261.36],[192.73,261.45],[194.5,260.82],[196.27,259.84],[197.03,259.09],[197.47,258.13],[198.47,256.65],[199.87,254.8],[206.65,256.5],[212.97,257.61],[218.35,257.55],[222.67,256.92],[226.14,256.32],[228.4,256.21],[229,257.38],[228.22,258.63],[225.56,259],[222.95,259.29],[221.5,260],[220.49,260.71],[218.92,261],[216.44,261.69],[213.23,263.35],[209.96,265.22],[207.34,266.39],[205.37,267.55],[203.67,269.39],[202.16,271.69],[204.83,271.18],[207.49,270.67],[204.25,274.37],[201.64,278.22],[201,282.51],[201.48,286.41],[203.49,288.59],[205.75,289.55],[207.67,289.57],[208.33,288.71],[205.93,287.21],[203.19,285.26],[202.72,282.55],[203.89,279.4],[207.09,275.8],[210.58,273.07],[213.13,271.83],[215.26,271.62],[217.75,271.37],[221.6,270.91],[227,270.22],[234.09,269.69],[242,269.62],[249.56,269.45],[254.28,267.94],[257.09,266.57],[258.53,266],[258.86,266.44],[259,267.5],[259.32,268.56],[260.1,269],[261.81,268.05],[264.37,265.75],[267.1,262.72],[269.22,260],[270.9,257.5],[270.95,260.31],[271.27,262.15],[272.01,262.49],[273.29,260.96],[274.92,258.16],[276.46,254.15],[277.52,249.73],[278.25,246.39],[279.03,245],[279.71,245.35],[280.23,246.18],[280.85,246.79],[281.81,246.62],[282.67,244.48],[283,240.15],[282.5,234.93],[281.08,230.66],[279.16,226.89],[281.83,225.88],[284.23,224.69],[286.25,223.28],[287.49,221.91],[288,220.85],[287.25,220.25],[285.45,220],[282.86,219.59],[280.2,218.6],[277.58,216.84],[275.08,214.6],[272.67,212.02],[274.54,206.51],[275.77,201.9],[275.21,199.81],[274.25,199.11],[274,199.85],[272.98,201.16],[270.53,202.55],[266.66,203.57],[262.21,204],[257.41,204.47],[252.68,205.59],[248.75,207.53],[246,210],[244.59,212.36],[244,214.08],[244.67,214.37],[246.4,213.09],[249.24,211.35],[252.69,210.31],[256,210.28],[257.91,211.39],[258.7,213.04],[258.73,214.74],[258.16,216.5],[257.51,218.25],[257.28,219.49],[257.75,220],[259.54,219.25],[262.46,217.46],[265.7,215.7],[267.57,216.06],[268.74,217.89],[269.6,220.68],[269.74,223.85],[269.13,226.6],[268.62,228.81],[270.51,230],[272.49,231.44],[273,234.29],[272.35,237.44],[270.25,240.17],[267.79,242.14],[265.75,243.32],[264.51,244.2],[264,245.46],[264.59,246.9],[266,248.23],[267.41,249.43],[268,250.57],[267.24,252.04],[265.42,254.07],[262.46,255.96],[258.42,256.32],[254,256.15],[254,259.22],[254,262.29],[247.02,261.71],[241.76,261.55],[239.42,262.13],[238.35,263.08],[236.65,263.94],[234.51,264.27],[232.37,263.94],[230.24,263.72],[228.12,264.63],[226.38,265.59],[226,264.68],[226.43,263.31],[227.46,262.03],[229.35,261.33],[232,261.5],[234.88,261.56],[237.11,259.59],[239.21,257.76],[241.42,257],[243.55,257.59],[245.5,259],[247.17,260.41],[248.65,261],[249.6,260.43],[250,259.05],[250.35,256.9],[251.19,254.48],[252.38,251.86],[257.34,252.55],[262.29,253.23],[261.55,250.86],[260.88,248.39],[260.29,245.75],[259.71,243.81],[259.04,243],[257.6,243.46],[255.15,244.57],[252.93,246.19],[252,247.87],[251.65,249.45],[250.8,250.8],[249.03,251.65],[246.45,252],[243.68,252.55],[241.5,254],[239.18,255.5],[235.85,256],[233.13,255.81],[232,255.35],[233.32,253.65],[236.49,250.46],[240.27,246.04],[243.07,241.36],[244.51,236.82],[244.7,232.89],[243.84,229.24],[242.45,225.53],[240.02,222.02],[236.68,218.88],[233.47,216.85],[231.35,216],[230.4,216.44],[230,217.5],[230.29,218.56],[230.98,219],[232.27,220.16],[233.98,222.96],[235.41,226.7],[236,230.12],[235.29,233.6],[233.58,237.45],[231.19,240.7],[228.83,242.72],[226.56,243.71],[224.37,244.47],[221.49,244.42],[217.56,243.47],[213.94,242.45],[211.82,242.23],[211.87,243.41],[213.46,245.77],[215.17,248.32],[215.51,249.98],[214.25,250.7],[212.09,251],[209.21,250.68],[206.2,249.92],[203.46,248.11],[202.02,243.59],[200.63,238.73],[198.83,234.42],[195.73,229.9],[191.22,224.54],[186.79,219.14],[183.88,214.54],[182.58,211.02],[182.02,208.22],[182.46,205.51],[183.55,202.22],[185.42,198.78],[187.74,195.75],[189.84,193.81],[191.19,193],[191.76,193.81],[192.01,195.75],[192.33,198.83],[193.09,202.37],[194.05,204.85],[194.87,205.37],[195.93,203.07],[197.46,198.75],[199.02,194.69],[200.14,193],[200.89,193.81],[201.54,195.75],[202.07,198.28],[202.54,200.5],[202.51,203.82],[201.85,209],[200.8,214.18],[199.81,217.5],[199.56,218.46],[200.91,217],[202.83,214.24],[204.58,211.13],[205.8,206.27],[205.85,197.2],[205.5,186.65],[208.18,185.93],[211.26,184.46],[214.92,181.95],[218.52,178.16],[221.49,173.64],[223.26,168.97],[224,164.8],[224.28,162.12],[224.96,161],[225.95,161.57],[226.96,162.93],[227.7,165.2],[228,167.94],[227.45,170.64],[226,172.73],[224.42,175.22],[224,179.85],[224,185.26],[219.5,189.76],[216.32,193.06],[215,194.65],[215.81,194.74],[217.75,194.4],[220.93,193.24],[224.72,191.36],[228.47,188.42],[231.47,184.64],[233.44,180.25],[234.62,175.75],[234.86,171.14],[234.55,166.5],[233.18,162],[230.25,157.85],[226.59,154.46],[222.86,151.93],[219.6,150.57],[217.06,150],[214.45,150.47],[211.01,151.61],[207.58,153.57],[204.99,156.02],[203.58,159.03],[203,162.37],[203.46,165.33],[204.93,166.96],[206.74,167.7],[208.36,168],[209.88,167.54],[211.43,166.43],[212.54,164.72],[213,162.83],[212.43,161.23],[210.96,160.28],[209.63,159.57],[209.29,158.62],[210.07,157.73],[211.41,157.16],[213.2,157.44],[215.07,158.57],[216.43,160.35],[217,162.19],[216.42,164.66],[215.03,167.95],[212.84,171.3],[210.37,173.93],[207.77,175.6],[205.29,176.64],[203.43,176.89],[202.31,176.64],[201.66,174.79],[200.94,171.19],[200.71,166.06],[201.43,160.42],[203.09,154.72],[205.32,149.32],[207.44,145.5],[208.83,143.6],[210.89,143.77],[214.6,144.91],[218.58,146.43],[221.25,147.49],[222.48,147.75],[222.97,147.36],[222.23,145.94],[220.51,143.74],[218.01,141.5],[215.43,139.97],[212.78,138.97],[214.4,136.73],[216.02,134.48],[217.66,132.19],[218.96,129.12],[219.78,124.95],[219.76,120.63],[219.06,117.15],[217.37,114.49],[214.95,112.12],[212.42,109.68],[210.42,106.85],[209.33,103.42],[209.49,99.23],[209.76,95.61],[208.52,95.35],[207.28,95.11],[207.53,91.62],[207.67,87.58],[206.63,84.25],[205.06,81.94],[203.46,80.62],[202.26,80.18],[201.65,80]],[[200.75,91.18],[199.34,91.39],[198.42,92.34],[198.48,94.28],[199.43,96.86],[200.53,100.42],[200.99,104.7],[200.8,108.75],[200.37,111.75],[199.68,113.34],[198.88,114],[198.26,113.32],[198,111.69],[197.6,109.52],[196.65,107.54],[195.36,106.45],[194.15,106.41],[193.34,108.19],[193,111.49],[193.29,115.34],[193.98,118.45],[195.42,120.61],[197.51,122.18],[199.2,123.32],[199.7,124.42],[198.68,125.27],[196.72,125.81],[194.27,125.71],[192.05,125.03],[190,123.05],[187.92,119.85],[186.04,116.91],[184.69,116.91],[183.91,118.95],[183.62,122.27],[183.91,126.95],[184.49,132.25],[184.83,136.66],[184.14,138],[183.33,137.61],[183,136.68],[182.08,134.04],[179.85,129.55],[176.71,123.74],[175.39,126.12],[174.45,128.72],[174.04,131.63],[174.45,134.2],[175.49,135.99],[176.38,137.12],[176.43,138.11],[175.42,138.74],[173.76,139],[171.58,138.37],[169.34,136.85],[167.35,135.36],[166.45,136.27],[166.35,138],[166.97,139.94],[167.58,141.71],[167.49,143.02],[166.64,143.71],[165.44,144],[164.42,144.26],[164,144.89],[164.75,145.71],[166.56,146.42],[168.43,147.33],[168.53,148.92],[168.61,150.39],[170.9,150.62],[173.21,150.3],[174.6,149.74],[175.81,149.22],[177.7,149],[179.45,149.34],[179.08,150.85],[176.84,152.92],[172.84,155.3],[169.11,157.47],[169.25,158.54],[171.46,158.65],[174.43,158.02],[177.69,156.27],[180.62,153.68],[183.2,149.97],[185.63,145.51],[187.46,140.73],[188.59,136.26],[189.39,133.25],[190.41,132],[191.53,132.25],[192.55,132.86],[194.49,133.78],[197.82,134.77],[202.14,135.82],[203.99,132.77],[205.5,129.23],[206.5,125.03],[206.56,119.9],[205.48,113.93],[204.46,108.29],[204.41,103.85],[205,100.79],[205.6,98.59],[205.66,97.41],[204.67,97],[203.47,96.25],[202.82,94.26],[202.11,92.18],[200.75,91.18]],[[228.07,94.69],[225.9,93.71],[225,93.88],[225.29,94.77],[225.98,95.48],[227.67,97.73],[230.36,102.29],[232.95,107.48],[234.4,111.25],[235.18,113.19],[236.14,114],[236.85,112.64],[236.81,108.67],[235.85,103.8],[233.75,99.92],[231,96.97],[228.07,94.69]],[[269.25,131.08],[267.72,132.3],[265.1,135.12],[260.77,138.97],[255.1,142.69],[249.88,145.72],[246.6,147.91],[244.43,150.18],[241.85,153.4],[239.61,157.47],[239,162],[239.52,166.27],[241.45,169.35],[243.48,171.22],[244.92,172],[245.94,172.58],[246.99,173.98],[247.49,176.26],[246.64,179.31],[244.66,182.46],[241.87,185.32],[238.5,187.98],[241.23,187.99],[244.03,187.46],[246.94,186.18],[249.61,184.19],[251.83,181.93],[253.4,179.19],[254.5,176],[255.59,172.83],[257.13,170.12],[258.45,167.88],[259,165.87],[258.85,164.55],[258.49,164],[257.58,164.34],[256.12,165.16],[254.36,165.8],[252.73,165.73],[251.45,164.43],[250.53,162.14],[250.45,159.12],[251.47,156.07],[254.47,152.42],[259.46,147.96],[264.72,143.13],[267.93,138.65],[269.39,135.13],[270,132.68],[269.78,131.52],[269.25,131.08]],[[127.86,145.93],[125.74,144.79],[126.47,149.64],[127.36,153.95],[128.47,157.5],[129.75,160.5],[130.48,157.75],[131.28,155.81],[132.16,155],[133.73,156.93],[136.18,161.57],[139.25,168.13],[138.79,175.82],[137.92,182.59],[136.23,187.58],[133.6,192.2],[130.23,197.58],[126.83,203.65],[124.16,209.94],[122.63,215.32],[122,219.21],[122.61,222.5],[124.09,226.46],[125.98,229.95],[127.61,232.09],[128.81,232.75],[129.68,232.65],[129.57,231.58],[128.41,229.9],[126.9,226.82],[126.5,221],[126.9,215.17],[128.44,212.07],[130.57,210.52],[133.19,210.54],[135.54,210.63],[136,208.61],[136.69,205.26],[138.36,200.78],[141.59,195.49],[146.11,190.18],[151.5,184.85],[148,185.18],[144.5,185.5],[144.62,182],[144.42,177.47],[143.77,171.5],[142.36,165.17],[140.29,159.83],[137.37,155.35],[133.88,151.11],[130.51,147.92],[127.86,145.93]],[[259.36,159],[258.58,159.46],[258.72,160.75],[259.75,162.94],[261.3,165.76],[263.21,169.02],[261.4,175.07],[259.14,180.52],[256.22,185.06],[252.44,188.43],[247.66,190.5],[241.71,192],[234.72,193.49],[228.15,195.11],[223.24,196.92],[219.78,199.07],[216.72,201.5],[214.06,204.45],[211.57,207.82],[209.56,211.91],[208.05,216.56],[207.44,221.73],[209,227.27],[211.38,232.08],[214.42,234.95],[217.39,236.4],[219.87,237],[221.37,236.78],[222,236.25],[220.97,234.9],[218.5,232.71],[215,229.91],[215,224.61],[215.52,219.73],[217.28,215.9],[219.97,212.92],[223.22,210.53],[226.9,209.11],[230.69,209.64],[233.82,210.59],[236,211.34],[237.77,210.77],[240.1,207.72],[243.56,203.74],[249.99,200.62],[256.27,197.53],[260.88,194.1],[263.95,190.07],[266.25,185.48],[267.49,180.6],[268,175.87],[267.53,171.47],[266.4,167.37],[264.67,163.98],[262.73,161.25],[260.88,159.66],[259.36,159]],[[169,177.07],[166.91,177.78],[163.99,179.42],[160.38,182.3],[156.63,185.99],[153.17,190.6],[150.28,195.69],[148.28,201.54],[146.94,207.97],[146.58,214.44],[146.97,220.32],[148.22,225.4],[149.95,229.91],[152.04,234],[149.57,234],[146.85,233.05],[143.7,230.5],[141.11,228.03],[139.65,227],[139.19,227.53],[139,228.8],[139.92,231.33],[142.13,234.87],[144.52,238.82],[144.13,241.61],[143.33,244.31],[143,247.32],[143.46,250.26],[144.56,252.78],[146.51,254.8],[149.01,256.51],[151.65,257.56],[153.95,258],[155.4,257.83],[156,257.43],[155.56,256.58],[154.5,255.36],[153.26,253.58],[152.39,251.42],[152.39,248.97],[153.41,246.49],[154.97,244.73],[156.43,244],[159.27,244.84],[164.16,246.85],[169.79,250.05],[174.25,253.85],[177.19,257.87],[178,261.55],[177.43,264.76],[175.69,267.3],[173.49,269.23],[171.44,270.79],[170.62,271.77],[174,271.6],[178.27,270.48],[181.87,267.44],[185.25,263.76],[184.66,258.77],[183.42,253.88],[181.09,249.14],[177.72,244.9],[173.82,241.21],[170.11,238.72],[167.21,237.34],[165.61,236.52],[165.46,235.26],[164.81,233.01],[162.12,229.52],[158.71,225.09],[155.99,220.39],[154.25,214.9],[153.63,208],[153.5,200.5],[157.39,192.71],[161.46,185.86],[165.89,180.96],[168.71,178.19],[169,177.07]],[[262.81,223.11],[261.15,223.43],[259,224.05],[256.21,224.89],[253.01,225.73],[250.45,226.79],[249.21,228.16],[249.49,229.29],[251.22,229.3],[253.67,229.57],[256.32,231.04],[258.46,233.42],[258.8,236.36],[258.5,239.5],[261.85,239.23],[264.82,238.72],[267.28,237.85],[269.36,236.74],[267.43,235.4],[265.67,234.12],[264.16,232.91],[263.28,230.99],[263.47,227.37],[263.7,223.97],[262.81,223.11]],[[222.75,264.02],[222.13,264.31],[221,265],[220.08,265.8],[221.25,265.98],[222.49,265.7],[223,265],[222.93,264.3],[222.75,264.02]]]; 5_height_tolerance = .1; case_taper = 3; image_rotation = 90; 5swidth = 6.1; 4height = 9.5; iphone_version = 2; pattern_thickness = 1; 4_height_tolerance = .1; 5length = 123.83; image_scale = 113; 4sthick = .6; pattern_rotation = 42; pattern_radius = 11; 5_perimeter_tolerance = .7; 5cornerR = 9.28; include_hooks = "no"; pattern_overlap = 42; 4width = 58.55; 4_perimeter_tolerance = .7; 5sthick = 1.0; pattern_shape = 3; 5height = 7.6; 4swidth = 6.17; primary_color = "red"; type_of_case = 1; 5width = 58.57; offY = 0; offX = 0; mashup_type=1;//[1:Stencil Inside Base Shape,2:Stencil On Top] //////////////////////////////////////////////////////////////////////////////////////////// /////////////////// *Non customizer variables* //////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// module Void(){} mode="render"; honeycomb_radius = pattern_radius; honeycomb_radius_modifier = pattern_overlap; honeycomb_sides = pattern_shape; honeycomb_rotation = pattern_rotation; line_thickness = pattern_thickness; honeycomb_thickness = line_thickness*.4; stencil_thickness = 10; cthk = case_thickness; 4ctol = 4_perimeter_tolerance; 4htol = 4_height_tolerance; 5ctol = 5_perimeter_tolerance; 5htol = 5_height_tolerance; 4margin=4width/2-(4width/2-3)*image_scale/100; 5margin=5width/2-(5width/2-3)*image_scale/100; heightvar=.24; homebuttonR = 5.6; homebuttonD = homebuttonR*2; top_bottom_opening_width = 50; leftholelength = 25.43; leftholeR = 2.4; topholelength = 38.57; topholeR = 2.5; bottomholelength1 = 43.97; bottomholelength2 = 26.05; bottombigR = 1.53; bottomsmallR = 1.15; corner_resolution = 6; circle_resolution = corner_resolution*4; fudge = .05; ///////////////////////////////////////////////////////////////////////////////////////////// ///////////////////// Final Render /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////// if(mode=="render") color(primary_color)rotate([0,0,90]){ if(iphone_version == 1){ translate([0,0,(4height+cthk/2+2*4htol)/2])iPhone4Case(); }else{ translate([0,0,(5height+cthk+2*5htol)/2])iPhone5Case(); } } ///////////////////////////////////////////////////////////////////////////////////////////// ///////////////////// test fit /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////// if(mode=="testfit") intersection(){ rotate([0,0,90]){ if(iphone_version == 1){ union(){ color("red")iPhone4Case(); color("green")translate([0,0,cthk/4])oldiPhone4(w=4width, l=4length, h=4height, cR=4cornerR, sw=4swidth, st=4sthick, taper=case_taper); } }else{ union(){ color("red")iPhone5Case(); color("green")translate([0,0,0])oldiPhone5(w=5width, l=5length, h=5height, cR=5cornerR, sw=5swidth, st=5sthick, taper=case_taper); } } } color("white")translate([-100,0,0])cube(200,center=true); } ///////////////////////////////////////////////////////////////////////////////////////////// ///////////////////// Scratch /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////// if(mode=="test"){ %color("red")translate([-4width/2,0,0])rotate([0,10,0])cube(5); %color("green")intersection(){ oldiPhone5(w=5width, l=5length, h=5height, cR=5cornerR, sw=5swidth, st=5sthick); translate([-500,-500,0])cube(1000,center=true); } %difference(){ iPhone5(w=5width, l=5length, h=5height, cR=5cornerR, sw=5swidth, st=5sthick, taper=10); translate([-500,-500,0])cube(1000,center=true); } iPhone5(w=5width+2*(cthk+5ctol), l=5length+2*(cthk+5ctol), h=5height+cthk+2*5htol, cR=5cornerR+cthk+5ctol, sw=5swidth+cthk+2*5ctol, st=5sthick, taper=case_taper); } ///////////////////////////////////////////////////////////////////////////////////////////// ///////////////////// Modules /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////// module oldiPhoneGlass( w, //width l, //length h, //height r, //corner radius st) { //strip thickness wi=w-2*st; li=l-2*st; ri=r-st; union(){ cube([wi,li-ri*2,h],center = true); cube([wi-ri*2,li,h],center = true); for(i=[1,-1]){ for(j=[1,-1]){ translate([i*(wi/2-ri),j*(li/2-ri),0]) cylinder( h = h, r = ri, center = true, $fn = circle_resolution); } } } } module iPhoneGlass( w, //width l, //length h, //height r, //corner radius st, //strip thickness taper){ //taper wi=w-2*st; li=l-2*st; ri=r-st; tap=h*tan(taper); hull(){ union(){ translate([0,0,-h/2+.005])cube([wi,li-ri*2,.01],center = true); translate([0,0,-h/2+.005])cube([wi-ri*2,li,.01],center = true); translate([0,0,-h/2+.005])for(i=[1,-1]){ for(j=[1,-1]){ translate([i*(wi/2-ri),j*(li/2-ri),0]) cylinder( h = .01, r = ri, center = true, $fn = circle_resolution); } } } union(){ translate([0,0,h/2-.005])cube([wi-tap*2,li-ri*2-tap*2,.01],center = true); translate([0,0,h/2-.005])cube([wi-ri*2-tap*2,li-tap*2,.01],center = true); translate([0,0,h/2-.005])for(i=[1,-1]){ for(j=[1,-1]){ translate([i*(wi/2-ri-tap),j*(li/2-ri-tap),0]) cylinder( h = .01, r = ri, center = true, $fn = circle_resolution); } } } } } module oldiPhoneStrip( w, //width l, //length h, //height r, //corner radius st ) { //strip thickness union(){ cube([w,l-r*2,h],center = true); cube([w-r*2,l,h],center = true); for(i=[1,-1]){ for(j=[1,-1]){ translate([i*(w/2-r),j*(l/2-r),0]) cylinder( h = h, r = r, center = true, $fn = circle_resolution); } } } } module iPhoneStrip( w, //width l, //length h, //height r, //corner radius st, //strip thickness taper){ //taper tap=h*tan(taper); hull(){ union(){ translate([0,0,-h/2+.005])cube([w,l-r*2,.01],center = true); translate([0,0,-h/2+.005])cube([w-r*2,l,.01],center = true); translate([0,0,-h/2+.005])for(i=[1,-1]){ for(j=[1,-1]){ translate([i*(w/2-r),j*(l/2-r),0]) cylinder( h = .01, r = r, center = true, $fn = circle_resolution); } } } union(){ translate([0,0,h/2-.005])cube([w-2*tap,l-r*2-2*tap,.01],center = true); translate([0,0,h/2-.005])cube([w-r*2-2*tap,l-2*tap,.01],center = true); translate([0,0,h/2-.005])for(i=[1,-1]){ for(j=[1,-1]){ translate([i*(w/2-r-tap),j*(l/2-r-tap),0]) cylinder( h = .01, r = r, center = true, $fn = circle_resolution); } } } } } module iPhoneCameraHole(w,h,r){ hull(){ translate([w/2,0,0]) cylinder(h = h,r = r,center = true, $fn = circle_resolution); translate([-w/2,0,0]) cylinder(h = h,r = r,center = true, $fn = circle_resolution); } } module oldiPhone5(w,l,h,cR,sw,st){ hull(){ oldiPhoneGlass(w,l,h,cR,st); oldiPhoneStrip(w,l,sw,cR,st); } } module iPhone5(w,l,h,cR,sw,st,taper){ hull(){ iPhoneGlass(w,l,h,cR,st,taper); iPhoneStrip(w,l,sw,cR,st,taper); } } module oldiPhone4(w,l,h,cR,sw,st){ union(){ hull(){ oldiPhoneGlass(w,l,sw+(h-sw)/4,cR,st); oldiPhoneStrip(w,l,sw,cR,st); } oldiPhoneGlass(w,l,h,cR,st); } } module iPhone4(w,l,h,cR,sw,st,taper){ union(){ hull(){ iPhoneGlass(w,l,sw+(h-sw)/4,cR,st,taper); iPhoneStrip(w,l,sw,cR,st,taper); } iPhoneGlass(w,l,h,cR,st,taper); } } module iPhone5Case(){ difference(){ union(){ iPhone5(w=5width+2*(cthk+5ctol), l=5length+2*(cthk+5ctol), h=5height+cthk+2*5htol, cR=5cornerR+cthk+5ctol, sw=5swidth+cthk+2*5ctol, st=5sthick, taper=case_taper); if(include_hooks=="yes")translate([0,0,-(5height+cthk+2*5htol)/2]) 3hooks(w=5width+2*(cthk+5ctol), h=5length/3, bandd=3.5, thick=2, depth=8, closure=60); } translate([0,0,0])iPhone5(w=5width+2*5ctol, l=5length+2*5ctol, h=5height+2*5htol, cR=5cornerR+5ctol, sw=5swidth+2*5ctol, st=5sthick, taper=case_taper); iPhoneGlass(w=5width+2*5ctol+.05, l=5length+2*5ctol+.05, h=5height+2*5htol+cthk+.01, r=5cornerR+5ctol, st=5sthick, taper=case_taper); translate([0,0,cthk/2]) cube([44,5length+20,5height+cthk/2],center = true); translate([-5width/2-cthk*.8,30,4.5]) rotate([90,0,90]) scale([1,1,2]) iPhoneCameraHole(30,cthk*2,8); } translate([0,0,-(5height+cthk+2*5htol)/2+cthk/4])difference(){ union(){ intersection(){ iPhoneGlass(w=5width+2*5ctol+fudge, l=5length+2*5ctol+fudge, h=cthk/2, r=5cornerR+5ctol-fudge, st=5sthick, taper=0); backpat(); } translate([15,52.4,0]) iPhoneCameraHole(7.8,cthk/2,7.8+1.6); } translate([15,52.4,0]) scale([1,1,2]) iPhoneCameraHole(7.8,cthk/2,7.8); } } module iPhone4Case(){ difference(){ union(){ iPhone5(w=4width+2*(cthk+4ctol), l=4length+2*(cthk+4ctol), h=4height+cthk/2+2*4htol, cR=4cornerR+cthk+4ctol, sw=4swidth+cthk+2*4ctol, st=1.5*4sthick, taper=case_taper); if(include_hooks=="yes")translate([0,0,-(4height+cthk/2+2*4htol)/2])3hooks(w=4width+2*(cthk+4ctol), h=4length/3, bandd=3.5, thick=2, depth=8, closure=60); } translate([0,0, -(4height+cthk/2+2*4htol)/2 +cthk/2 +(4height/2+(4swidth+(4height-4swidth)/4)/2+2*4htol)/2]) iPhone5(w=4width+2*4ctol, l=4length+2*4ctol, h=4height/2+(4swidth+(4height-4swidth)/4)/2+2*4htol, cR=4cornerR+4ctol, sw=4swidth/2+4height/2, st=4sthick, taper=case_taper); iPhoneGlass(w=4width+2*4ctol+.05, l=4length+2*4ctol+.05, h=4height+2*4htol+cthk/2+.01, r=4cornerR+4ctol, st=4sthick, taper=case_taper); translate([0,0,cthk]) cube([44,4length+20,4height+cthk/2],center = true); translate([-4width/2-cthk*.8,30,(4height+cthk/2+2*4htol)/2]) rotate([90,0,90]) scale([1,1,2]) iPhoneCameraHole(24,cthk*2,4height+cthk/2+2*4htol-cthk-4sthick); } translate([0,0,-(4height+cthk/2+2*4htol)/2+cthk/4])difference(){ union(){ intersection(){ iPhoneGlass(w=4width+2*4ctol+fudge, l=4length+2*4ctol+fudge, h=cthk/2, r=4cornerR+4ctol-fudge, st=4sthick, taper=0); backpat(); } translate([15,48.2,0]) iPhoneCameraHole(7.8,cthk/2,7.8+1.6); } translate([15,48.2,0]) scale([1,1,2]) iPhoneCameraHole(7.8,cthk/2,7.8); } } module stencil(stencil_width,stencil_height,stencil_rotation,margin){ dispo_width = stencil_width - 2*margin; points_array = (input=="no_input"? [[179,268],[[199.26,15.12],[189.19,15.56],[181.5,16.45],[175.52,17.83],[169.55,19.42],[163.57,21.55],[157.55,24.22],[151.62,27.5],[145.87,31.09],[140.35,35.49],[135,40.71],[130.05,46.71],[125.52,53],[121.87,59.06],[119.06,64.5],[117.12,69.21],[115.55,73.5],[114.31,77.65],[113.16,82],[112.07,87.29],[110.96,93.7],[110.36,99.39],[110.49,102.95],[111.13,105],[136.96,105],[158.46,104.73],[163.39,103.42],[163.83,101.08],[164.04,97.67],[164.46,93.04],[165.44,87.75],[167.04,82.4],[168.96,77.59],[171.9,73.02],[175.98,68.21],[180.98,63.93],[186.13,60.62],[192.15,58.45],[201.05,58],[208.86,58.34],[214.1,59.16],[217.74,60.82],[221.73,63.19],[225.41,66.46],[228.34,70.28],[230.39,74.63],[231.97,79.15],[232.75,85.01],[232.85,92.65],[232.01,100.96],[229.51,107.41],[225.45,113.48],[218.91,119.91],[211.35,126.37],[203.83,132.63],[197.2,138.54],[191.77,144.13],[187.33,150.15],[183.1,157.07],[179.62,164.83],[176.98,172.85],[175.42,181.69],[175.22,192.28],[175.5,203.5],[199,203.5],[222.5,203.5],[222.74,198.5],[223.25,193.21],[224.15,187.5],[225.64,181.94],[227.6,177],[230.92,172.02],[235.69,166.37],[243.47,159.38],[254,151.21],[264.03,143.56],[270.61,137.84],[274.46,133.36],[277.95,128.69],[281.05,123.47],[283.96,117.69],[286.32,111.7],[288.09,106],[289.06,98.48],[289.47,88],[289.05,76.45],[287.17,68],[284.48,60.83],[281.31,54.14],[276.58,47.41],[270.1,40.14],[262.4,33.38],[254.68,28.12],[246.8,24.2],[238.72,20.92],[230.05,18.48],[220.76,16.55],[210.43,15.49],[199.26,15.12]],[[198.05,226.08],[178.93,226.28],[170.25,226.66],[169.27,232.87],[169,254.48],[169.27,277.23],[170.58,282.39],[179.4,282.82],[198.38,283],[218.91,282.73],[225.8,281.8],[226.73,274.94],[227,254.5],[226.73,234.06],[225.8,227.2],[218.87,226.29],[198.05,226.08]]]: input); input_width = points_array[0][0]; input_height= points_array[0][1]; sTrace = dispo_width/input_width; //stencil_height = input_height*sTrace + 2*margin; difference() { translate([0, 0, stencil_thickness/2]) cube([stencil_width, stencil_height,3* stencil_thickness], center=true); // translate([offX, offY, -stencil_thickness/2]) translate([offX, offY, 0]) rotate([0,0,stencil_rotation]) scale([sTrace, -sTrace, 1]) translate([-200, -150, 0]) { union() { for (i = [1:len(points_array) -1] ) { linear_extrude(height=stencil_thickness*2) {polygon(points_array[i]);} } } } } } module honeycomb(w,l,h,r,rmod,th,sides){ columns = l/(r*3)+1; rows = w/(r*sqrt(3)/2*2); translate([-w/2,l/2,0]) rotate([0,0,-90]) for(i = [0:rows]){ translate([0,r*sqrt(3)/2*i*2,0]) for(i = [0:columns]){ translate([r*i*3,0,0]) for(i = [0:1]){ translate([r*1.5*i,r*sqrt(3)/2*i,0]) rotate([0,0,honeycomb_rotation]) difference(){ if(sides < 5){ cylinder(h = h, r = r+th+(r*rmod/50), center = true, $fn = sides); } else { cylinder(h = h, r = r+(r*rmod/50), center = true, $fn = sides); } cylinder(h = h+1, r = r-th+(r*rmod/50), center = true, $fn = sides); } } } } } module backpat(){ scale([-1,1,5]){ if(iphone_version==1 && type_of_case==1) stencil(4width+2*4ctol,4length+2*4ctol,image_rotation,4margin); if(iphone_version==2 && type_of_case==1) stencil(5width+2*5ctol,5length+2*5ctol,image_rotation,5margin); if(iphone_version==1 && type_of_case==2) honeycomb(4width+2*4ctol,4length+2*4ctol,4height, honeycomb_radius,honeycomb_radius_modifier, honeycomb_thickness,honeycomb_sides); if(iphone_version==2 && type_of_case==2) honeycomb(5width+2*5ctol,5length+2*5ctol,5height, honeycomb_radius,honeycomb_radius_modifier, honeycomb_thickness,honeycomb_sides); if(iphone_version==1 && type_of_case==3 && mashup_type==1) mashup1(image_rotation, 4width+2*4ctol,4length+2*4ctol,4height, honeycomb_radius,honeycomb_radius_modifier, honeycomb_thickness,honeycomb_sides, index_i,index_j); if(iphone_version==2 && type_of_case==3 && mashup_type==1) mashup1(image_rotation, 5width+2*5ctol,5length+2*5ctol,5height, honeycomb_radius,honeycomb_radius_modifier, honeycomb_thickness,honeycomb_sides, index_i,index_j); if(iphone_version==1 && type_of_case==3 && mashup_type==2) mashup2(4width+2*4ctol,4length+2*4ctol,image_rotation,4margin, 4width+2*4ctol,4length+2*4ctol,4height, honeycomb_radius,honeycomb_radius_modifier, honeycomb_thickness,honeycomb_sides); if(iphone_version==2 && type_of_case==3 && mashup_type==2) mashup2(5width+2*5ctol,5length+2*5ctol,image_rotation,5margin, 5width+2*5ctol,5length+2*5ctol,5height, honeycomb_radius,honeycomb_radius_modifier, honeycomb_thickness,honeycomb_sides); } } module mashup1(stencil_rotation,w,l,h,r,rmod,th,sides,index_i,index_j){ stencil_width=1*(r+(r*rmod/50)); stencil_height=2*h; margin=0; columns = l/(r*3)+1; rows = w/(r*sqrt(3)/2*2); imod=floor(columns)-(round(columns/2)-floor(columns/2))+index_i; jmod=floor(rows)-(round(rows/2)-floor(rows/2))+index_j*2+ceil(index_i/2)-floor(index_i/2); echo(columns,rows); echo(index_i,index_j); echo(imod,jmod); points_array = (input=="no_input"? [[179,268],[[199.26,15.12],[189.19,15.56],[181.5,16.45],[175.52,17.83],[169.55,19.42],[163.57,21.55],[157.55,24.22],[151.62,27.5],[145.87,31.09],[140.35,35.49],[135,40.71],[130.05,46.71],[125.52,53],[121.87,59.06],[119.06,64.5],[117.12,69.21],[115.55,73.5],[114.31,77.65],[113.16,82],[112.07,87.29],[110.96,93.7],[110.36,99.39],[110.49,102.95],[111.13,105],[136.96,105],[158.46,104.73],[163.39,103.42],[163.83,101.08],[164.04,97.67],[164.46,93.04],[165.44,87.75],[167.04,82.4],[168.96,77.59],[171.9,73.02],[175.98,68.21],[180.98,63.93],[186.13,60.62],[192.15,58.45],[201.05,58],[208.86,58.34],[214.1,59.16],[217.74,60.82],[221.73,63.19],[225.41,66.46],[228.34,70.28],[230.39,74.63],[231.97,79.15],[232.75,85.01],[232.85,92.65],[232.01,100.96],[229.51,107.41],[225.45,113.48],[218.91,119.91],[211.35,126.37],[203.83,132.63],[197.2,138.54],[191.77,144.13],[187.33,150.15],[183.1,157.07],[179.62,164.83],[176.98,172.85],[175.42,181.69],[175.22,192.28],[175.5,203.5],[199,203.5],[222.5,203.5],[222.74,198.5],[223.25,193.21],[224.15,187.5],[225.64,181.94],[227.6,177],[230.92,172.02],[235.69,166.37],[243.47,159.38],[254,151.21],[264.03,143.56],[270.61,137.84],[274.46,133.36],[277.95,128.69],[281.05,123.47],[283.96,117.69],[286.32,111.7],[288.09,106],[289.06,98.48],[289.47,88],[289.05,76.45],[287.17,68],[284.48,60.83],[281.31,54.14],[276.58,47.41],[270.1,40.14],[262.4,33.38],[254.68,28.12],[246.8,24.2],[238.72,20.92],[230.05,18.48],[220.76,16.55],[210.43,15.49],[199.26,15.12]],[[198.05,226.08],[178.93,226.28],[170.25,226.66],[169.27,232.87],[169,254.48],[169.27,277.23],[170.58,282.39],[179.4,282.82],[198.38,283],[218.91,282.73],[225.8,281.8],[226.73,274.94],[227,254.5],[226.73,234.06],[225.8,227.2],[218.87,226.29],[198.05,226.08]]]: input); dispo_width = stencil_width - 2*margin; input_width = points_array[0][0]; input_height= points_array[0][1]; sTrace = dispo_width/input_width*image_scale/100; //stencil_height = input_height*sTrace + 2*margin; color("red")translate([-w/2,l/2,0]) rotate([0,0,-90]){ difference(){ for(i = [0:rows]){ translate([0,r*sqrt(3)/2*i*2,0]) for(i = [0:columns]){ translate([r*i*3,0,0]) for(i = [0:1]){ translate([r*1.5*i,r*sqrt(3)/2*i,0]) rotate([0,0,honeycomb_rotation]) difference(){ if(sides < 5){ cylinder(h = h, r = r+th+(r*rmod/50), center = true, $fn = sides); } else { cylinder(h = h, r = r+(r*rmod/50), center = true, $fn = sides); } cylinder(h = h+1, r = r-th+(r*rmod/50), center = true, $fn = sides); } } } } translate([r*imod*1.5,r*sqrt(3)/2*jmod,0]) rotate([0,0,honeycomb_rotation]) cylinder(h = h+1, r = r-th+(r*rmod/50), center = true, $fn = sides); } translate([r*imod*1.5,r*sqrt(3)/2*jmod,0])difference(){ rotate([0,0,honeycomb_rotation]) cylinder(h = h, r = r-th+(r*rmod/50), center = true, $fn = sides); translate([offX, offY, -stencil_thickness/2]) rotate([0,0,90-stencil_rotation]) scale([sTrace, -sTrace, 1]) translate([-200, -150, 0]) { union() { for (i = [1:len(points_array) -1] ) { linear_extrude(height=stencil_thickness*2){ polygon(points_array[i]); } } } } } } } module mashup2(stencil_width,stencil_height,stencil_rotation,margin,w,l,h,r,rmod,th,sides){ dispo_width = stencil_width - 2*margin; columns = l/(r*3)+1; rows = w/(r*sqrt(3)/2*2); points_array = (input=="no_input"? [[179,268],[[199.26,15.12],[189.19,15.56],[181.5,16.45],[175.52,17.83],[169.55,19.42],[163.57,21.55],[157.55,24.22],[151.62,27.5],[145.87,31.09],[140.35,35.49],[135,40.71],[130.05,46.71],[125.52,53],[121.87,59.06],[119.06,64.5],[117.12,69.21],[115.55,73.5],[114.31,77.65],[113.16,82],[112.07,87.29],[110.96,93.7],[110.36,99.39],[110.49,102.95],[111.13,105],[136.96,105],[158.46,104.73],[163.39,103.42],[163.83,101.08],[164.04,97.67],[164.46,93.04],[165.44,87.75],[167.04,82.4],[168.96,77.59],[171.9,73.02],[175.98,68.21],[180.98,63.93],[186.13,60.62],[192.15,58.45],[201.05,58],[208.86,58.34],[214.1,59.16],[217.74,60.82],[221.73,63.19],[225.41,66.46],[228.34,70.28],[230.39,74.63],[231.97,79.15],[232.75,85.01],[232.85,92.65],[232.01,100.96],[229.51,107.41],[225.45,113.48],[218.91,119.91],[211.35,126.37],[203.83,132.63],[197.2,138.54],[191.77,144.13],[187.33,150.15],[183.1,157.07],[179.62,164.83],[176.98,172.85],[175.42,181.69],[175.22,192.28],[175.5,203.5],[199,203.5],[222.5,203.5],[222.74,198.5],[223.25,193.21],[224.15,187.5],[225.64,181.94],[227.6,177],[230.92,172.02],[235.69,166.37],[243.47,159.38],[254,151.21],[264.03,143.56],[270.61,137.84],[274.46,133.36],[277.95,128.69],[281.05,123.47],[283.96,117.69],[286.32,111.7],[288.09,106],[289.06,98.48],[289.47,88],[289.05,76.45],[287.17,68],[284.48,60.83],[281.31,54.14],[276.58,47.41],[270.1,40.14],[262.4,33.38],[254.68,28.12],[246.8,24.2],[238.72,20.92],[230.05,18.48],[220.76,16.55],[210.43,15.49],[199.26,15.12]],[[198.05,226.08],[178.93,226.28],[170.25,226.66],[169.27,232.87],[169,254.48],[169.27,277.23],[170.58,282.39],[179.4,282.82],[198.38,283],[218.91,282.73],[225.8,281.8],[226.73,274.94],[227,254.5],[226.73,234.06],[225.8,227.2],[218.87,226.29],[198.05,226.08]]]: input); input_width = points_array[0][0]; input_height= points_array[0][1]; sTrace = dispo_width/input_width; //stencil_height = input_height*sTrace + 2*margin; union(){ translate([offX, offY, -stencil_thickness/2]) rotate([0,0,stencil_rotation]) scale([sTrace, -sTrace, 1]) translate([-200, -150, 0]) { union() { for (i = [1:len(points_array) -1] ) { linear_extrude(height=stencil_thickness*2) {polygon(points_array[i]);} } } } honeycomb(w=w,l=l,h=h,r=r,rmod=rmod,th=th,sides=sides); } } module bandhook(bandd,thick,w,closure){ bandr=bandd/2; translate([0,-w/2,0]){ difference(){ union(){ translate([-bandd-thick,0,0])cube([2*(bandd+thick),w,bandr+thick]); translate([bandr,0,thick+bandr])rotate([-90,0,0]) cylinder(r=bandr+thick,h=w,$fn=20); } union(){ translate([-bandd-thick,-fudge/2,thick+bandr]) cube([bandr+bandd+thick,w+fudge,bandd+thick]); translate([bandr,-fudge/2,thick+bandr])rotate([-90,0,0]) cylinder(r=bandr,h=w+fudge,$fn=20); translate([thick+bandr,-fudge/2,0])rotate([0,45,0])cube([2*thick,w+fudge,2*thick]); translate([bandr,-fudge/2,thick+bandr]) rotate([0,-closure,0])cube([bandr+2*thick,w+fudge,2*thick]); } } translate([bandr,0,thick+bandr]) rotate([0,-closure,0])translate([bandr+thick/2,0,0]) rotate([-90,0,0])cylinder(r=thick/2,h=w,$fn=20); } } module 3hooks(w,h,bandd,thick,depth,closure){ scale([-1,1,1])translate([w/2,0,0])bandhook(bandd,thick,depth,2); for(i=[1,-1])scale([1,i,1])translate([w/2,h/2,0])bandhook(bandd,thick,depth,closure); }