use ; module headband(thickness, height){ rake_length = 3; shape_band = [[thickness/2,height/2-0.4], [thickness/2,-height/2+0.4], [thickness/2-0.4,-height/2], [-thickness/2+0.4,-height/2], [-thickness/2,-height/2+0.4], [-thickness/2,height/2-0.4], [-thickness/2+0.4,height/2], [thickness/2-0.4,height/2]]; shape_rake = [[0,-height/2], [0,height/2], [rake_length,height/2-2], [rake_length,-height/2+2]]; shape_halfband = [[thickness/2,height/2-0.4], [thickness/2,-height/2+0.4], [thickness/2-0.4,-height/2], [0,-height/2], [0,height/2], [thickness/2-0.4,height/2]]; ctrl_band = [[21,0],[77,56],[56,126],[0,126]]; ctrl_end = [[21,0],[20,-1],[18,-4],[17,-8]]; ctrl_rake = [[-52,86],[-40,139.5],[40,139.5],[52,86]]; union(){ bezier_extrude(ctrl = ctrl_band, shape = shape_band, sections = 64); mirror([1,0,0]) bezier_extrude(ctrl = ctrl_band, shape = shape_band, sections = 64); bezier_extrude(ctrl = ctrl_end, shape = shape_band, sections = 16); translate([17,-8]){ rotate_extrude(convexity = 10, $fn = 16) polygon(shape_halfband); } mirror([1,0,0]) bezier_extrude(ctrl = ctrl_end, shape = shape_band, sections = 16); translate([-17,-8]){ rotate_extrude(convexity = 10, $fn = 16) polygon(shape_halfband); } bezier_extrude(ctrl = ctrl_rake, shape = shape_rake, partial = true, merlon = 2, gap = 3, sections = (2+3)*42+1); } } headband(thickness = 2.7, height = 5.5);