diff --git a/catear_headband_esp_18mm.scad b/catear_headband_esp_18mm.scad index 48c903c..b0863b8 100644 --- a/catear_headband_esp_18mm.scad +++ b/catear_headband_esp_18mm.scad @@ -4,9 +4,18 @@ use ; use ; use ; +$fn=30; HEIGHT=18; -module catear_headband(debug=DEBUG, size=SIZE, height=HEIGHT, thickness=THICKNESS, part=PART, stretch_len=STRETCH_LEN, tip_len=TIP_LEN, tip_bend=TIP_BEND, ear_scale=1.5, ear_bend_factor=0.15, ear_stretch_factor=1.2, ear_angle=42, chamfer=CHAMFER, chamfer_shape=CHAMFER_SHAPE, with_rake=true, details=true) { +EAR_SKEW=0.6; +EAR_SCALE=1.4; +EAR_BEND_FACTOR=0.04; +EAR_STRETCH_FACTOR=1.2; +EAR_ANGLE=42; +WITH_RAKE=true; +DETAILS=true; + +module catear_headband_esp(debug=DEBUG, size=SIZE, height=HEIGHT, thickness=THICKNESS, part=PART, stretch_len=STRETCH_LEN, tip_len=TIP_LEN, tip_bend=TIP_BEND, ear_scale=EAR_SCALE, ear_bend_factor=EAR_BEND_FACTOR, ear_stretch_factor=EAR_STRETCH_FACTOR, ear_angle=EAR_ANGLE, chamfer=CHAMFER, chamfer_shape=CHAMFER_SHAPE, with_rake=WITH_RAKE, details=DETAILS, $fn=$fn, ear_skew=EAR_SKEW) { $a=size/2*ear_scale; $delta=2*(acos($a/(size*2))-90); @@ -14,7 +23,7 @@ module catear_headband(debug=DEBUG, size=SIZE, height=HEIGHT, thickness=THICKNES union() { rotate( ear_angle, [0, 0, 1]) { - translate([-ear_offset, 0, 0]) catear_v1( + translate([-ear_offset, 0, 0]) catear_v3( debug=debug, height=height, thickness=thickness, @@ -23,11 +32,14 @@ module catear_headband(debug=DEBUG, size=SIZE, height=HEIGHT, thickness=THICKNES stretch_factor=ear_stretch_factor, chamfer=chamfer, chamfer_shape=chamfer_shape, - details=details + details=details, + $fn=$fn, + skew=ear_skew ); } - rotate(-ear_angle, [0, 0, 1]) { - translate([-ear_offset, 0, 0]) catear_v1( + scale([1, -1, 1]) + rotate(ear_angle, [0, 0, 1]) { + translate([-ear_offset, 0, 0]) catear_v3( debug=false, height=height, thickness=thickness, @@ -36,7 +48,9 @@ module catear_headband(debug=DEBUG, size=SIZE, height=HEIGHT, thickness=THICKNES stretch_factor=ear_stretch_factor, chamfer=chamfer, chamfer_shape=chamfer_shape, - details=details + details=details, + $fn=$fn, + skew=ear_skew ); } headband( @@ -48,23 +62,23 @@ module catear_headband(debug=DEBUG, size=SIZE, height=HEIGHT, thickness=THICKNES tip_len=tip_len, tip_bend=tip_bend, with_rake=with_rake, - details=false + details=false, + $fn=$fn ); }; } -difference() { - translate([0, 0, HEIGHT/2]) - catear_headband(chamfer=0, with_rake=false); - translate([0, 0, 6]) { - cube([100, 100, HEIGHT]); - rotate(90) cube([100, 100, HEIGHT]); - rotate(180) cube([100, 100, HEIGHT]); - translate([0, -60, HEIGHT/2]) rotate(35) cube([70, 70, HEIGHT], center=true); - rotate(-90+180*PART, [0, 0, 1]) - translate([0, -SIZE, HEIGHT-6]) - color("orange") - rotate([90, 0, 0]) - cylinder(r=HEIGHT-6, h=2*THICKNESS, center=true); - } +translate([0, 0, 6]) + rotate(-90) + difference() { + translate([0, 0, HEIGHT/2-6]) catear_headband_esp(chamfer=0, with_rake=false); + translate([-5, -5, 0]) cube([110, 110, HEIGHT]); + rotate(90) translate([-5, -5, 0]) cube([110, 110, HEIGHT]); + rotate(180) translate([-5, -5, 0]) cube([110, 110, HEIGHT]); + translate([0, -60, HEIGHT/2]) rotate(35) cube([70, 70, HEIGHT], center=true); + rotate(-90+180*PART, [0, 0, 1]) + translate([0, -SIZE, HEIGHT-6]) + color("orange") + rotate([90, 0, 0]) + cylinder(r=HEIGHT-6, h=2*THICKNESS, center=true); }