38 lines
No EOL
1.6 KiB
OpenSCAD
38 lines
No EOL
1.6 KiB
OpenSCAD
use <bezierExtrusion.scad>;
|
|
|
|
thickness = 2.5;
|
|
height = 6;
|
|
rake_length = 2.2;
|
|
|
|
shape_band = [[thickness/2,height/2-0.5],
|
|
[thickness/2-0.5,height/2],
|
|
[-thickness/2+0.5,height/2],
|
|
[-thickness/2,height/2-0.5],
|
|
[-thickness/2,-height/2+0.5],
|
|
[-thickness/2+0.5,-height/2],
|
|
[thickness/2-0.5,-height/2],
|
|
[thickness/2,-height/2+0.5]];
|
|
|
|
shape_rake = [[0,-height/2],[0,height/2],[rake_length,height/2-2],[rake_length,-height/2+2]];
|
|
|
|
ctrl_band = [[-21,0],[-77,56],[-56,126],[0,126]];
|
|
ctrl_end = [[-21,0],[-20,-1],[-18,-4],[-17,-10]];
|
|
ctrl_rake = [[-52,86],[-40,139.5],[40,139.5],[52,86]];
|
|
ctrl_ear1 = [[49,96],[58,112],[63,137],[61.5,141]];
|
|
ctrl_ear2 = [[61.5,141],[60,145],[42.5,140.5],[18,123]];
|
|
chamfer = function (t) (t < 0.75) ? 1 : sqrt(1-((4*t)-3)^2)/1.5 + 0.33;
|
|
rake = function (t) (cos(64 * 360 * t) < -0.33) ? 1 : 0.1;
|
|
|
|
union(){
|
|
bezier_extrude(ctrl = ctrl_band, shape = shape_band, sections = 256);
|
|
mirror([1,0,0]) bezier_extrude(ctrl = ctrl_band, shape = shape_band, sections = 256);
|
|
bezier_extrude(ctrl = ctrl_end, shape = shape_band, mod_x = chamfer, sections = 32);
|
|
mirror([1,0,0]) bezier_extrude(ctrl = ctrl_end, shape = shape_band, mod_x = chamfer, sections = 64);
|
|
bezier_extrude(ctrl = ctrl_ear1, shape = shape_band, sections = 32);
|
|
bezier_extrude(ctrl = ctrl_ear2, shape = shape_band, sections = 32);
|
|
mirror([1,0,0]){
|
|
bezier_extrude(ctrl = ctrl_ear1, shape = shape_band, sections = 32);
|
|
bezier_extrude(ctrl = ctrl_ear2, shape = shape_band, sections = 32);
|
|
}
|
|
bezier_extrude(ctrl = ctrl_rake, shape = shape_rake, mod = rake, sections = 512);
|
|
} |