separated catears into their own file, renamed dogear_headband to dogears, slightly changed dogear to fit new headband, removed old headband

This commit is contained in:
tessaK9 2026-03-12 13:08:21 +01:00
commit 2d143d6a56
6 changed files with 152 additions and 259 deletions

34
catears.scad Normal file
View file

@ -0,0 +1,34 @@
use <bezierExtrusion.scad>;
use <headband.scad>;
thickness = 2.5;
height = 5.5;
module catear(){
ctrl_ear1 = [[49,96],[58,112],[63,137],[61.5,141]];
ctrl_ear2 = [[61.5,141],[60,145],[42.5,140.5],[18,123]];
shape_band = [[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],
[-thickness/2,height/2-0.5],
[-thickness/2+0.5,height/2],
[thickness/2-0.5,height/2]];
union(){
bezier_extrude(ctrl = ctrl_ear1, shape = shape_band, sections = 32);
bezier_extrude(ctrl = ctrl_ear2, shape = shape_band, sections = 32);
}
}
module catears(){
union(){
headband(thickness = thickness, height = height);
catear();
mirror([1,0,0]) catear();
}
}
catears();

View file

@ -1,100 +1,79 @@
use <hinge.scad>;
module dogearAllOptions(a1, a2, a3, a4){
translate([25,0,0]){
union(){
linear_extrude(height = 6, center = false, convexity = 10){
polygon(points = [[-32,0],[-25,0],[-25,7]]);
}
hinge(a1, lb = 25, la = 5.5);
translate([12.5,0,0]){
hinge(a2, lb = 0, la = 5.5);
}
translate([25,0,0]){
hinge(a3, lb = 0, la = 5.5);
}
translate([0,37,0]){
hinge(a1, lb = 5, la = 5.5);
}
translate([12.5,37,0]){
hinge(a2, lb = 0, la = 5.5);
}
translate([25,37,0]){
hinge(a3, lb = 0, la = 8);
}
translate([34,0,0]){
cube([7,18.5,6]);
translate([3.5,18.5,0]){
cylinder(h = 6, r = 3.5, center = false, $fn=32);
}
}
translate([35,37,0]){
translate([5,3.5,0]){
cylinder(h = 6, r = 3.5, center = false, $fn=32);
}
}
translate([53,0,0]){
cube([24,7,6], center = false);
}
translate([40,11,0]){
rotate(-45,[0,0,1]){
hinge(a4, lb = 7, la = 7);
translate([14.1,3.5,0]){
cylinder(h = 6, r = 3.5, center = false, $fn=32);
}
translate([0,17.3,0]){
hinge(a4, lb = 21, la = 24.6);
}
translate([31.4,20.8,0]){
cylinder(h = 6, r = 3.5, center = false, $fn=32);
}
}
}
translate([25,0,0]){
union(){
linear_extrude(height = 6, center = false, convexity = 10){
polygon(points = [[-33,0],[-25,0],[-25,7]]);
}
hinge(a1, lb = 25, la = 5.5);
translate([12.5,0,0]) hinge(a2, lb = 0, la = 5.5);
translate([25,0,0]) hinge(a3, lb = 0, la = 5.5);
translate([0,37,0]) hinge(a1, lb = 8, la = 5.5);
translate([12.5,37,0]) hinge(a2, lb = 0, la = 5.5);
translate([25,37,0]) hinge(a3, lb = 0, la = 8);
translate([34,0,0]){
cube([7,18.5,6]);
translate([3.5,18.5,0]) cylinder(h = 6, r = 3.5, center = false, $fn=32);
}
translate([40,40.5,0]) cylinder(h = 6, r = 3.5, center = false, $fn=32);
translate([53,0,0]) cube([24,7,6], center = false);
translate([40,11,0]){
rotate(-45,[0,0,1]){
hinge(a4, lb = 7, la = 7);
translate([14.1,3.5,0]){
cylinder(h = 6, r = 3.5, center = false, $fn=32);
}
translate([0,17.3,0]) hinge(a4, lb = 21, la = 24.6);
translate([31.4,20.8,0]) cylinder(h = 6, r = 3.5, center = false, $fn=32);
}
}
}
}
}
module dogear(flopness){
a1 = 30;
a2 = 30;
a3 = 30;
a4 = 45;
a1 = 30;
a2 = 30;
a3 = 30;
a4 = 45;
if(flopness == "vvvflop"){
a1 = 45;
a2 = 45;
a3 = 45;
dogearAllOptions(a1, a2, a3, a4);
if(flopness == "vvvflop"){
a1 = 45;
a2 = 45;
a3 = 45;
dogearAllOptions(a1, a2, a3, a4);
}
else{
if(flopness == "vvflop"){
a1 = 40;
a2 = 40;
a3 = 40;
dogearAllOptions(a1, a2, a3, a4);
}
else{
if(flopness == "vvflop"){
a1 = 40;
a2 = 40;
a3 = 40;
dogearAllOptions(a1, a2, a3, a4);
if(flopness == "vflop"){
a1 = 35;
a2 = 35;
a3 = 35;
dogearAllOptions(a1, a2, a3, a4);
}
else{
if(flopness == "lflop"){
a1 = 15;
a2 = 15;
a3 = 15;
a4 = 30;
dogearAllOptions(a1, a2, a3, a4);
}
else{
if(flopness == "vflop"){
a1 = 35;
a2 = 35;
a3 = 35;
dogearAllOptions(a1, a2, a3, a4);
}
else{
if(flopness == "lflop"){
a1 = 15;
a2 = 15;
a3 = 15;
a4 = 30;
dogearAllOptions(a1, a2, a3, a4);
}
else{
dogearAllOptions(a1, a2, a3, a4);
}
}
dogearAllOptions(a1, a2, a3, a4);
}
}
}
}
}

View file

@ -1,43 +0,0 @@
use <headband.scad>;
use <dogear.scad>;
SIZE=60;
THICKNESS=3;
PART=0.7;
STRETCH_LEN=40;
TIP_LEN=0.05;
TIP_BEND=20;
module dogear_headband(rightear = "flop", leftear = "flop", size=SIZE, thickness=THICKNESS, part=PART, stretch_len=STRETCH_LEN, tip_len=TIP_LEN, tip_bend=TIP_BEND, with_rake=true){
union() {
translate([-24, -60, -3]){
rotate(195, [0, 0, 1]) {
mirror([0,1,0]){
dogear(flopness = rightear);
}
}
}
mirror([0,1,0]){
translate([-24, -60, -3]){
rotate(195, [0, 0, 1]) {
mirror([0,1,0]){
dogear(flopness = leftear);
}
}
}
}
headband(
size=size,
height=6,
thickness=thickness,
part=part,
stretch_len=stretch_len,
tip_len=tip_len,
tip_bend=tip_bend,
with_rake=with_rake
);
};
}
dogear_headband();

24
dogears.scad Normal file
View file

@ -0,0 +1,24 @@
use <headband.scad>;
use <dogear.scad>;
thickness = 2.5;
module dogears(rightear = "flop", leftear = "flop"){
union() {
translate([54,96,-3]){
rotate(75, [0,0,1]){
dogear(flopness = leftear);
}
}
mirror([1,0,0]){
translate([54,96,-3]){
rotate(75, [0,0,1]){
dogear(flopness = rightear);
}
}
}
headband(thickness = thickness, height = 6);
}
}
dogears(rightear = "lflop");

View file

@ -1,98 +1,35 @@
RAKE_DEPTH=1;
RAKE_WIDTH=1;
RAKE_STRETCH=1;
RAKE_CHAMFER=0.5;
use <bezierExtrusion.scad>;
module partial_ring(part, radius, thickness, height) {
rotate(180-180*part, [0, 0, 1])
rotate_extrude(angle=360*part, $fn = 128)
translate([radius, 0]){
polygon(points = [[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]]);
}
module headband(thickness, height){
rake_length = 2.5;
shape_band = [[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],
[-thickness/2,height/2-0.5],
[-thickness/2+0.5,height/2],
[thickness/2-0.5,height/2]];
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]];
fillet = 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 = 128);
mirror([1,0,0]) bezier_extrude(ctrl = ctrl_band, shape = shape_band, sections = 128);
bezier_extrude(ctrl = ctrl_end, shape = shape_band, mod_x = fillet, sections = 16);
mirror([1,0,0]) bezier_extrude(ctrl = ctrl_end, shape = shape_band, mod_x = fillet, sections = 16);
bezier_extrude(ctrl = ctrl_rake, shape = shape_rake, mod_x = rake, sections = 512);
}
}
module headband(size, height, thickness, part, stretch_len, tip_len, tip_bend, rake_depth = RAKE_DEPTH, rake_width = RAKE_WIDTH, rake_stretch = RAKE_STRETCH, rake_chamfer = RAKE_CHAMFER, with_rake=true) {
union() {
union() {
color("purple")
partial_ring(part, radius=size, thickness=thickness, height=height);
rotate( 90-180*part, [0, 0, 1])
translate([stretch_len/2, size, 0]) {
color("orange"){
rotate(90,[0,1,0]){
rotate(90, [0,0,1]){
linear_extrude(stretch_len, center = true, convexity = 10){
polygon(points = [[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]]);
}
}
}
}
color("purple") translate([stretch_len/2, tip_bend, 0])
rotate(90+180*tip_len, [0, 0, 1])
partial_ring(
part=tip_len,
radius=tip_bend,
thickness=thickness,
height=height
);
}
rotate(-90+180*part, [0, 0, 1])
translate([stretch_len/2, -size, 0]) {
color("orange"){
rotate(90,[0,1,0]){
rotate(90, [0,0,1]){
linear_extrude(stretch_len, center = true, convexity = 10){
polygon(points = [[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]]);
}
}
}
}
color("purple")
scale([1, -1, 1])
translate([stretch_len/2, tip_bend, 0])
rotate(90+180*tip_len, [0, 0, 1])
partial_ring(
part=tip_len,
radius=tip_bend,
thickness=thickness,
height=height
);
}
}
if (with_rake) for (i=[-size/2:size/2]) {
rotate(i*2-rake_width/2, [0, 0, 1])
intersection() {
scale([1, 1, rake_stretch/(rake_depth/height)])
translate([0, rake_width/2, 0])
rotate_extrude(angle=rake_width)
translate([rake_depth/2-size+thickness/2, 0, 0])
scale([1, 0.5, 1])
circle(r=rake_depth, $fn=3);
translate([rake_depth/2-size+thickness/2-rake_chamfer, 0, 0])
color("red")
cube([2*rake_depth, rake_width, height], center=true);
}
}
}
}
headband(thickness = 2.5, height = 5.5);

View file

@ -1,38 +0,0 @@
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);
}