From ffbf130e70c1e9e06b9e45610ef4f3c9b5e896f9 Mon Sep 17 00:00:00 2001 From: user Date: Sat, 27 Jan 2024 19:28:54 +0100 Subject: [PATCH] pressfit_headband v0.3 move pressfit headband to sperate file --- headband.scad | 44 ------------------------------------------ pressfit_headband.scad | 31 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 44 deletions(-) create mode 100644 pressfit_headband.scad diff --git a/headband.scad b/headband.scad index 0e77fb5..e77263f 100644 --- a/headband.scad +++ b/headband.scad @@ -12,24 +12,6 @@ RAKE_WIDTH=1; RAKE_STRETCH=1; RAKE_CHAMPFER=0.5; -module inserticle() { - cube([4.6, 7.4, 5.4], center=true); -} - -module testblock_inserticle() { - union() { - translate([0, 0, 5.4/2]) inserticle(); - translate([0, 0, -5]) cube([15, 12, 10], center=true); - } -} - -module testblock_recepticle() { - rotate(180, [0, 1, 0]) difference() { - translate([0, 0, 5]) cube([15, 12, 10], center=true); - translate([0, 0, 5.4/2]) inserticle(); - } -} - module catear(height, thickness, fractal=0, side_len=30, bend_factor=0.5, stretch_factor=1.2, debug=false) { $A=[0, side_len/2]; $B=[0,-side_len/2]; @@ -132,30 +114,6 @@ module headband(debug=DEBUG, size=SIZE, height=HEIGHT, thickness=THICKNESS, part }; } -module pressfit_headband(debug=DEBUG, size=SIZE, height=HEIGHT, thickness=THICKNESS, part=PART, stretch_len=STRETCH_LEN, tip_len=TIP_LEN, tip_bend=TIP_BEND) { - union() { - color("pink") { $a=48; - rotate( $a, [0, 0, 1]) { - translate([-size-4, 0,]) rotate(90, [0, 1, 0]) inserticle(); - translate([-size-3, 0,]) rotate(90, [0, 1, 0]) inserticle(); - } - rotate(-$a, [0, 0, 1]) { - translate([-size-4, 0,]) rotate(90, [0, 1, 0]) inserticle(); - translate([-size-3, 0,]) rotate(90, [0, 1, 0]) inserticle(); - } - } - headband( - size=size, - height=height, - thickness=thickness, - part=part, - stretch_len=stretch_len, - tip_len=tip_len, - tip_bend=tip_bend - ); - }; -} - 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.4, ear_bend_factor=0.15, ear_stretch_factor=1, ear_angle=42) { union() { rotate( ear_angle, [0, 0, 1]) { @@ -221,5 +179,3 @@ module foxear_headband(debug=DEBUG, size=SIZE, height=HEIGHT, thickness=THICKNES ear_stretch_factor=ear_stretch_factor, ear_angle=ear_angle); } - -headband(); \ No newline at end of file diff --git a/pressfit_headband.scad b/pressfit_headband.scad new file mode 100644 index 0000000..cab69aa --- /dev/null +++ b/pressfit_headband.scad @@ -0,0 +1,31 @@ +include + +module inserticle() { + cube([4.6, 7.4, 5.4], center=true); +} + +module pressfit_headband(debug=DEBUG, size=SIZE, height=HEIGHT, thickness=THICKNESS, part=PART, stretch_len=STRETCH_LEN, tip_len=TIP_LEN, tip_bend=TIP_BEND) { + union() { + color("pink") { $a=48; + rotate( $a, [0, 0, 1]) { + translate([-size-4, 0,]) rotate(90, [0, 1, 0]) inserticle(); + translate([-size-3, 0,]) rotate(90, [0, 1, 0]) inserticle(); + } + rotate(-$a, [0, 0, 1]) { + translate([-size-4, 0,]) rotate(90, [0, 1, 0]) inserticle(); + translate([-size-3, 0,]) rotate(90, [0, 1, 0]) inserticle(); + } + } + headband( + size=size, + height=height, + thickness=thickness, + part=part, + stretch_len=stretch_len, + tip_len=tip_len, + tip_bend=tip_bend + ); + }; +} + +pressfit_headband();