From d62684045021a7f0b1738868f2dd9eaefe55ac54 Mon Sep 17 00:00:00 2001 From: tessaK9 Date: Sun, 8 Mar 2026 20:46:02 +0100 Subject: [PATCH] first commit of c3dog --- dogear.scad | 97 ++++++++++++++++++++++++++++++++++++++++++++ dogear_headband.scad | 43 ++++++++++++++++++++ headband.scad | 95 +++++++++++++++++++++++++++++++++++++++++++ hinge.scad | 66 ++++++++++++++++++++++++++++++ 4 files changed, 301 insertions(+) create mode 100644 dogear.scad create mode 100644 dogear_headband.scad create mode 100644 headband.scad create mode 100644 hinge.scad diff --git a/dogear.scad b/dogear.scad new file mode 100644 index 0000000..2a179de --- /dev/null +++ b/dogear.scad @@ -0,0 +1,97 @@ +use ; + +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); + } + } + } + } + } +} + +module dogear(flopness){ + + a1 = 30; + a2 = 30; + a3 = 30; + a4 = 45; + + if(flopness == "vvvflop"){ + a1 = 45; + a2 = 45; + a3 = 45; + dogearAllOptions(a1, a2, a3, a4); + } + else{ + if(flopness == "vvflop"){ + a2 = 45; + a3 = 45; + dogearAllOptions(a1, a2, a3, a4); + } + else{ + if(flopness == "vflop"){ + a3 = 45; + dogearAllOptions(a1, a2, a3, a4); + } + else{ + if(flopness == "nflop"){ + a1 = 15; + a2 = 15; + a3 = 15; + a4 = 30; + dogearAllOptions(a1, a2, a3, a4); + } + else{ + dogearAllOptions(a1, a2, a3, a4); + } + } + } + } +} \ No newline at end of file diff --git a/dogear_headband.scad b/dogear_headband.scad new file mode 100644 index 0000000..3679def --- /dev/null +++ b/dogear_headband.scad @@ -0,0 +1,43 @@ +use ; +use ; + +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(rightear = "nflop"); diff --git a/headband.scad b/headband.scad new file mode 100644 index 0000000..95f7233 --- /dev/null +++ b/headband.scad @@ -0,0 +1,95 @@ +include + +module partial_ring(part, radius, thickness, height) { + rotate(180-180*part, [0, 0, 1]) + rotate_extrude(angle=360*part) + 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(size=SIZE, height=HEIGHT, thickness=THICKNESS, part=PART, stretch_len=STRETCH_LEN, tip_len=TIP_LEN, tip_bend=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); + } + } + } +} \ No newline at end of file diff --git a/hinge.scad b/hinge.scad new file mode 100644 index 0000000..b86f58d --- /dev/null +++ b/hinge.scad @@ -0,0 +1,66 @@ +module hinge(deg, lb, la){ + CutPoints = [ + [6,0,5.5], + [6,7,5.5], + [4.5,0,7], + [4.5,7,7], + [6,0,7], + [6,7,7]]; + + CutFaces = [ + [0,2,4], + [1,5,3], + [0,1,3,2], + [0,4,5,1], + [2,3,5,4]]; + + union(){ + difference(){ + cube([6,7,6], center = false); + polyhedron(points = CutPoints, faces = CutFaces, convexity = 10); + translate([3,3.5,3.5]){ + rotate(90, [1,0,0]){ + cylinder(h = 6, r = 2, center = true, $fn = 16); + } + } + if(deg <= 45){ + translate([3,2,4.75]){ + rotate(-deg,[0,1,0]){ + translate([0,0,-4]){ + cube([4,3,4], center = false); + } + } + } + } + else{ + translate([1.75,2,3.5]){ + rotate(-deg,[0,1,0]){ + translate([0,0,-6]){ + cube([6,3,6], center = false); + } + } + } + } + + translate([4,2,1.5]){ + cube([4,3,4], center = false); + } + } + cube([6.5,7,1.5], center = false); + + translate([3,3.5,3.5]){ + rotate(90, [1,0,0]){ + cylinder(h = 4.5, r = 1.25, center = true, $fn = 16); + } + } + translate([3,2.5,2.25]){ + cube([4,2,2.5], center = false); + } + translate([-lb,0,0]){ + cube([lb,7,6], center = false); + } + translate([7,0,0]){ + cube([la,7,6], center = false); + } + } +} \ No newline at end of file