Skip to content

Instantly share code, notes, and snippets.

@andreiavram
Last active December 19, 2015 01:47
Show Gist options
  • Save andreiavram/354326d2ca9c69797784 to your computer and use it in GitHub Desktop.
Save andreiavram/354326d2ca9c69797784 to your computer and use it in GitHub Desktop.
// Andrei Avram, 18.12.2015
// Based on a publically available Flake Vectorial Image on the Internet
// Using Inkscape's Path to OpenSCAD extension
fudge = 0.1;
module poly_polyline18(h)
{
scale([25.4/90, -25.4/90, 1]) union()
{
linear_extrude(height=h)
polygon([[-0.000384,-275.000409],[-57.246684,-242.437491],[-57.246684,-212.312433],[-18.806724,-209.830833],[-20.460924,-183.884973],[-51.413124,-183.057573],[-74.398704,-165.948993],[-51.413124,-148.405053],[-22.985904,-147.969717],[-22.985904,-134.604957],[-43.446564,-133.777557],[-42.619164,-110.748417],[-23.420964,-109.921017],[-22.985646,-94.074897],[-65.604786,-114.100197],[-69.783786,-68.564337],[-83.148486,-74.833137],[-74.398266,-92.377077],[-93.204666,-104.087577],[-104.915106,-85.716477],[-117.452706,-93.639537],[-103.652646,-118.279377],[-104.915046,-147.969117],[-133.298766,-136.693977],[-147.925986,-111.183417],[-172.174026,-122.458557],[-155.457246,-154.237857],[-182.230266,-170.127537],[-238.214106,-137.956437],[-239.041506,-72.308187],[-212.703846,-57.680967],[-192.243186,-88.197807],[-168.822246,-75.268407],[-185.147226,-48.060087],[-182.230626,-20.068167],[-153.803346,-30.951507],[-139.567926,-57.680967],[-125.376066,-50.193207],[-136.651206,-30.951447],[-115.755186,-18.849207],[-105.742506,-38.047407],[-90.679986,-29.297187],[-130.817706,-0.042807],[-90.679986,29.211573],[-105.742506,38.005293],[-115.755186,18.763533],[-136.651206,30.909333],[-125.376066,50.542833],[-139.567926,57.638793],[-153.803346,30.909333],[-182.230626,20.025993],[-185.147226,48.017913],[-168.822246,75.182733],[-192.243186,88.155633],[-212.703846,57.638793],[-239.041506,72.701313],[-238.214106,137.870703],[-182.230266,170.085363],[-155.457246,154.587483],[-172.174026,122.416383],[-147.925986,111.141243],[-133.298766,136.651743],[-104.915046,147.926883],[-103.652646,118.280703],[-117.452706,93.597303],[-104.915106,85.630683],[-93.204666,104.045283],[-74.398266,92.334843],[-83.148486,74.790903],[-69.783786,68.522103],[-65.604786,114.057963],[-22.985646,93.989103],[-23.420964,110.314083],[-42.619164,110.749419],[-43.446564,134.126799],[-22.985904,134.562129],[-22.985904,147.926889],[-51.413124,148.318689],[-74.398704,165.906129],[-51.413124,183.014709],[-20.460924,183.885309],[-18.806724,209.787609],[-57.246684,212.704209],[-57.246684,242.350389],[-0.000384,275.000409],[57.245916,242.350389],[57.245916,212.704209],[18.806016,209.787609],[20.460216,183.885309],[51.412416,183.014709],[74.397996,165.906129],[51.412416,148.318689],[22.549836,147.926889],[22.549836,134.562129],[43.054056,134.126799],[42.618726,110.749419],[23.420526,110.314083],[22.549926,93.989103],[65.212566,114.057963],[69.783366,68.522103],[83.148126,74.790903],[74.397906,92.334843],[93.204306,104.045283],[104.479446,85.630683],[117.452346,93.597303],[103.652286,118.280703],[104.479686,147.926883],[133.298766,136.651743],[147.925986,111.141243],[172.174026,122.416383],[155.457246,154.587483],[182.230266,170.085363],[238.214106,137.870703],[239.041506,72.701313],[212.703846,57.638793],[192.243126,88.155633],[168.822246,75.182733],[184.711926,48.017913],[182.230326,20.025993],[153.803046,30.909333],[139.567686,57.638793],[124.940466,50.542833],[136.650906,30.909333],[115.754946,18.763533],[105.742266,38.005293],[90.679746,29.211573],[130.817466,-0.042807],[90.679746,-29.297187],[105.742266,-38.047407],[115.754946,-18.849207],[136.650906,-30.951447],[124.940466,-50.193207],[139.567686,-57.680967],[153.803046,-30.951507],[182.230326,-20.068167],[184.711926,-48.060087],[168.822246,-75.268407],[192.243126,-88.197807],[212.703846,-57.680967],[239.041506,-72.308187],[238.214106,-137.956437],[182.230266,-170.127537],[155.457246,-154.237857],[172.174026,-122.458557],[147.925986,-111.183417],[133.298766,-136.693977],[104.479686,-147.969117],[103.652286,-118.279377],[117.452346,-93.639537],[104.479446,-85.716477],[93.204306,-104.087577],[74.397906,-92.377077],[83.148126,-74.833137],[69.783366,-68.564337],[65.212566,-114.100197],[22.549926,-94.074897],[23.420526,-109.921017],[42.618726,-110.748417],[43.054056,-133.777557],[22.549836,-134.604957],[22.549836,-147.969717],[51.412416,-148.405053],[74.397996,-165.948993],[51.412416,-183.057573],[20.460216,-183.884973],[18.806016,-209.830833],[57.245916,-212.312433],[57.245916,-242.437491],[-0.000384,-275.000409]]);
}
}
module flakeshard(n) {
poly_polyline18(n);
}
module flake(n) {
translate([0, 0, -n/2]) {
flakeshard(n);
}
}
module connection(n) {
rotate([0, 0, -30]) {
translate([-n/2, 0, -n/2 - 1]) {
cube([n, n*10, n + 2]);
}
}
}
module half(n) {
difference() {
flake(n);
connection(n);
}
}
module hanging_hole(n) {
translate([-67, 0, -10/2]) {
translate([0, 0, -2]) {
cylinder(14, 4, 4, $fn=20);
}
}
}
module rotated_flake(n) {
rotate([0, 0, 30]) {
half(10);
}
}
difference() {
rotated_flake(5);
hanging_hole(5);
}
translate([0, 0, 0]) {
rotate([0, 0, 180]){
rotate([0, 90, 0]) {
rotate([0, 0, 30]) {
half(10);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment