瀏覽代碼

go back to the initial idea of just one slot for the mount to see if we can fit all four wires inside the mount, add rounded rests for better support

Fernando Pablo Lopez-Lezcano 10 年之前
父節點
當前提交
7c1e107b09
共有 1 個文件被更改,包括 59 次插入 和 9 次删除
  1. 59 9
      TinySphEAR.scad

+ 59 - 9
TinySphEAR.scad

@@ -64,8 +64,8 @@ mount_height = 8;
 // 0 -> ready to print
 //   set = 0 -> one capsule, set = 1 -> four capsules
 // 1 -> the whole microhone with four capsules
-rendermic = 1;
-renderset = 0;
+rendermic = 0;
+renderset = 1;
 
 // what type of connection to use between capsule holders:
 // 0 -> original cylinder beams
@@ -73,6 +73,12 @@ renderset = 0;
 // 2 -> interlocking beams (in)
 connect = 1;
 
+// what type of mount ridges to use
+// 0 -> nothing
+// 1 -> 1 ridge
+// 2 -> 2 ridges
+ridges = 1;
+
 //// end of rendering control
 ////
 
@@ -181,12 +187,19 @@ module capsule (azimuth, elevation, mounts, twist, ridge) {
 							}
 						}
 						// add ridges for microphone mount
-						if (ridge == 1) {
+						if (ridge == 2) {
 							rotate([0, 0, twist]) {
 								translate([capsule_radius - ridge_length / 2 + fudge, ridge_slot_width / 2, 0]) {
                                     cube([ridge_length * 3 / 2, ridge_width, capsule_height], center = false);
 								}
 								translate([capsule_radius - ridge_length / 2 + fudge, -ridge_width - ridge_slot_width / 2, 0]) {
+                                    cube([ridge_length * 3 / 2, ridge_width, capsule_height], center = false);
+								}
+							}
+						}
+						if (ridge == 1) {
+							rotate([0, 0, twist]) {
+								translate([capsule_radius - ridge_length / 2 + fudge, -ridge_width / 2, 0]) {
                                     cube([ridge_length * 3 / 2, ridge_width, capsule_height], center = false);
 								}
 							}
@@ -214,9 +227,46 @@ module capsule (azimuth, elevation, mounts, twist, ridge) {
 // wall: thickness of cylinder wall
 // separation: height of mount with respect of the microphone assembly
 
+module mount (angles, wall, separation) {
+	translate([0, 0, -(separation + 0.0)]) {
+		difference() {
+            union() {
+                // main mount cylinder
+                translate([0, 0, -mount_height]) {
+                    difference() {
+                        cylinder(r = mount_radius + wall, h = mount_height, $fn = facets);
+                        // make the hole for the mount (* 1.5 to cut the ridge as well)
+                        cylinder(r = mount_radius, h = mount_height * 1.5, $fn = facets);
+                    }
+                }
+            }
+            // indentations that match the lower capsule holders
+            for (rot = [0, 180]) {
+                rotate([0, 0, rot]) {
+                    translate([-mount_radius * 1.6, mount_radius * 1.6, mount_height / 3]) {
+                        rotate([0, 90 - elev_angle, -45]) {
+                            cylinder(r = capsule_radius + wall, h = capsule_height * 2, $fn = facets);
+                        }
+                    }
+                }
+            }
+            // slots for the mounting ridges
+            for (rot = angles) {
+                rotate([0, -elev_angle, rot]) {
+                    translate([-capsule_sep_max * 2, -ridge_width / 2, mount_slot_depth - 2 * wall]) {
+                        cube([capsule_sep_max * 2, ridge_width + fit, mount_height]);
+                    }
+                }
+			}
+            
+        }
+    }
+}
+
+
 box_height = 4.0;
 
-module mount (angles, wall, separation) {
+module mount_cube_2 (angles, wall, separation) {
     translate([0, 0, -separation]) {
         rotate([0, 0, 45]) {
             difference() {
@@ -327,8 +377,8 @@ module mount_cylinder (angles, wall, separation) {
 if (rendermic == 1) {
 	capsule(45, elev_angle, leg_angles_top, 60, 0);
 	capsule(-135, elev_angle, leg_angles_top, 60, 0);
-	capsule(-45, -elev_angle, leg_angles_top, 0, 0);
-	capsule(135, -elev_angle, leg_angles_top, 0, 0);
+	capsule(-45, -elev_angle, leg_angles_bot, 0, 1);
+	capsule(135, -elev_angle, leg_angles_bot, 0, 1);
 	// the mount
 	mount([-45, 135], 1, capsule_bottom);
 }
@@ -341,16 +391,16 @@ if (rendermic == 0) {
         part_height = 0;
         part_sep = capsule_radius * 2.5;
         // #3
-        translate([part_sep, -part_sep, part_height]) { capsule(0, part_rot, leg_angles_top, 60, 0); }
+        *translate([part_sep, -part_sep, part_height]) { capsule(0, part_rot, leg_angles_top, 60, 0); }
         if (renderset != 0) {
             // #4
-            translate([part_sep, part_sep, part_height]) { capsule(0, part_rot, leg_angles_top, 60, 0); }
+            *translate([part_sep, part_sep, part_height]) { capsule(0, part_rot, leg_angles_top, 60, 0); }
             // #2
             translate([-part_sep, part_sep, part_height]) { capsule(0, part_rot, leg_angles_bot, -90, 1); }
             // #1
             translate([-part_sep, -part_sep, part_height]) { capsule(0, part_rot, leg_angles_bot, 90, 1); }
             // mount
-            translate([0, 0, box_height]) { mount([-45, 135], 1, 0); }
+            translate([0, 0, mount_height]) { mount([-45, 135], 1, 0); }
             // add connecting ridges to make it all one part
             difference() {
                 for (rot_a = [-45, 45]) {