Quellcode durchsuchen

octathingy: first version of new capsule array, use conical capsule holders and a core split into two halves joined by an internal ring - first prototype print shows good performance

Fernando Pablo Lopez-Lezcano vor 8 Jahren
Ursprung
Commit
accb92e813
1 geänderte Dateien mit 173 neuen und 0 gelöschten Zeilen
  1. 173 0
      Octathingy_common.scad

+ 173 - 0
Octathingy_common.scad

@@ -162,6 +162,179 @@ module render_octa_capsule_array(z_offset) {
     }
 }
 
+// capsule holder with cylindrical mount
+//
+// ratio of capsule radius to transition length
+transition_ratio = 1.0;
+// ratio of capsule radius to bottom radius of holder
+holder_ratio = 0.4;
+
+// diameter of microphone capsule cable (Mogami 2490)
+capsule_cable_diam = 1.7;
+
+module capsule_holder(ratio, transition, hollow = true) {
+    capsule_h = capsule_height + capsule_ring_h;
+    difference() {
+        // main capsule holder
+        cylinder(r = capsule_radius + fudge + wall, h = capsule_h, $fn = cfacets);
+        if (hollow) cylinder(r = capsule_radius + fudge, h = capsule_h + thin_mint, $fn = cfacets);
+    }
+    // transition into core holder
+    transition_h = transition * capsule_radius;
+    translate([0, 0, - transition_h]) {
+        difference() {
+            cylinder(r2 = capsule_radius + fudge + wall, r1 = (capsule_radius) * ratio + wall, h = transition_h, $fn = facets);
+            if (hollow) cylinder(r2 = capsule_radius + fudge, r1 = (capsule_radius) * ratio, h = transition_h, $fn = facets);
+            // add holes in the walls of the transition
+            *if (hollow) {
+                for (r = [0:30:360]) {
+                    rotate([0, 90, r]) {
+                        translate([-transition_h + 1.75, 0, -capsule_radius/2])
+                            scale([1.5, 1, 1]) cylinder(r = 1.0, h = capsule_radius * 2, $fn = facets);
+                    }
+                    rotate([0, 90, r + 15]) {
+                        translate([-transition_h + 5.0, 0, -capsule_radius/2])
+                            scale([1.5, 1, 1]) cylinder(r = 0.9, h = capsule_radius * 2, $fn = facets);
+                    }
+                }
+            }
+            // add holes in the walls of the transition
+            if (hollow) {
+                for (r = [0:30:360]) {
+                    rotate([0, 90, r]) {
+                        translate([-transition_h + 3, 0, -capsule_radius/2])
+                            scale([2.5, 1, 1]) cylinder(r = 1.0, h = capsule_radius * 2, $fn = facets);
+                    }
+                }
+            }
+        }
+        // lip to insert holder into core
+        lip_d = 1.25 * wall;
+        translate([0, 0, hollow == false ? -3 : -lip_d]) {
+            difference() {
+                // if not hollow make the ring longer to cut into core
+                cylinder(r = (capsule_radius) * ratio + wall + (hollow == true ? 0 : fit/2),
+                        h = hollow == true ? lip_d : 4.0, $fn = facets);
+                if (hollow) { cylinder(r = capsule_cable_diam/2 * 1.5, h = lip_d + thin_mint, $fn = facets); }
+            }
+        }
+    }
+}
+
+module capsule_holder_array(hollow = true) {
+    for (az = [45, 135, -45, -135]) {
+//    for (az = [45]) {
+        rotate([0, elev_angle, az]) {
+            translate([0, 0, mic_radius - capsule_height]) {
+                capsule_holder(holder_ratio, transition_ratio, hollow);
+            }
+        }
+        rotate([0, 180 - elev_angle, az + 45]) {
+            translate([0, 0, mic_radius - capsule_height]) {
+                capsule_holder(holder_ratio, transition_ratio, hollow);
+            }
+        }
+    }
+}
+
+// the core
+// render = 0: the sphere
+// render = 1: upper half
+// render = -1: lower half
+
+module capsule_holder_ring(offset = 3.5) {
+    s_radius = mic_radius - capsule_radius * (1 + transition_ratio) + offset;
+    ring_h = 3.0;
+    difference() {
+        cylinder(r = s_radius - 2.5 * wall - fit, h = ring_h, $fn = facets);
+        cylinder(r = s_radius - 4 * wall - fit, h = ring_h, $fn = facets);
+    }
+}
+module capsule_holder_core(render = 0, offset = 3.5) {
+    // XXX need to turn this into a parameter
+    top_radius = mount_radius + wall;
+
+    s_radius = mic_radius - capsule_radius * (1 + transition_ratio) + offset;
+    difference() {
+        union() {
+            difference() {
+                // core
+                sphere(r = s_radius, $fn = facets);
+                sphere(r = s_radius - 2.5 * wall, $fn = facets);
+                // remove slice at the top
+                translate([-s_radius, -s_radius, s_radius - wall]) {
+                    cube([2 * s_radius, 2 * s_radius, s_radius]);
+                }
+                // shave sides as well (cosmetic, really)
+                for (az = [45, 135, -45, -135]) rotate([0, -11.5, az + 45]) {
+                    translate([s_radius - 0.5 * wall, -s_radius/2, -s_radius/2]) {
+                        cube([s_radius, s_radius, s_radius]);
+                    }
+                }
+                for (az = [45, 135, -45, -135]) rotate([0, 11.5, az]) {
+                    translate([s_radius - 0.5 * wall, -s_radius/2, -s_radius/2]) {
+                        cube([s_radius, s_radius, s_radius]);
+                    }
+                }
+                // remove one half of the sphere
+                if (render == 1) {
+                    translate([-mic_radius, -mic_radius, -mic_radius * 2]) cube([mic_radius * 2, mic_radius * 2, mic_radius * 2]);
+                }
+                if (render == -1) {
+                    translate([-mic_radius, -mic_radius, 0]) cube([mic_radius * 2, mic_radius * 2, mic_radius * 2]);
+                }
+                // make space for connection ring
+                ring_h = 3.0;
+                translate([0, 0, -ring_h/2]) {
+                    cylinder(r = s_radius - 2.5 * wall, h = ring_h, $fn = facets);
+                }
+                // make holes for connection "pins" (to glue both halves together)
+                pin_h = 2.0;
+                pin_r = 0.6;
+                *for (az = [45, 135, -45, -135]) rotate([0, 0, az + 22.5]) {
+                    translate([s_radius - 1.4 * wall, 0, -pin_h/2]) {
+                        cylinder(r = pin_r, h = pin_h, $fn = facets);
+                    }
+                }
+                // hole for stalk
+                if (render == -1) {
+                    translate([0, 0, -mic_radius]) cylinder(r = mount_radius, h = mic_radius, $fn = facets);
+                }
+            }
+            // stalk that transitions into flare
+            if (render == -1) {
+                //stalk_len = 15.0;
+                // normal length plus 10 to insert into flare
+                stalk_len = stalk_height + 10.0;
+                inset = wall;
+                translate([0, 0, - (stalk_len - inset + s_radius)]) {
+                    difference() {
+                        //cylinder(r = mount_radius, h = stalk_len + inset, $fn = facets);
+                        //cylinder(r = mount_radius - wall, h = stalk_len + inset + thin_mint, $fn = facets);
+                        cylinder(r = top_radius, h = stalk_len + inset, $fn = facets);
+                        cylinder(r = top_radius - wall, h = stalk_len + inset + thin_mint, $fn = facets);
+                    }
+                }
+            }
+        }
+        // make holes for capsule holders
+        capsule_holder_array(false);
+    }
+    // index for aligning the two halves of core sphere
+    rotate([0, 0, 22.5]) translate([s_radius, 0, 0]) {
+        difference() {
+            scale([1, 1, 2]) sphere(r = 0.5, $fn = facets);
+            translate([-2.2, -1, -4]) cube([2, 2, 8]);
+            if (render == 1) {
+                translate([-2, -1, -8]) cube([4, 2, 8]);
+            }
+            if (render == -1) {
+                translate([-2, -1, 0]) cube([4, 2, 8]);
+            }
+        }
+    }
+}
+
 // render individual capsules
 //
 module render_octa_capsule_top() {