浏览代码

move internal ring of shock mount from TinySpHEAR and Octathingy to SpHEAR_common

Fernando Pablo Lopez-Lezcano 10 年之前
父节点
当前提交
46c54db512
共有 3 个文件被更改,包括 87 次插入 和 157 次删除
  1. 11 83
      Octathingy_mount_pcb.scad
  2. 74 0
      SpHEAR_common.scad
  3. 2 74
      TinySpHEAR_mount_pcb.scad

+ 11 - 83
Octathingy_mount_pcb.scad

@@ -125,7 +125,7 @@ connector_d = 2.0;
 
 // wall thickness and height of shock mount rings
 ring_wall = 4 * wall;
-ring_height = 6;
+ring_ext_height = 6;
 
 // gap between external ring and support arm
 ring_arm_gap = 20;
@@ -342,78 +342,6 @@ module octa_capsule_array_mount(angles) {
     }
 }
 
-// internal ring of shock mount
-
-module octa_shock_mount_internal_ring(height, xradius, yradius, corner, gap, lip) {
-    slot_sep = xradius * 2 / 2.5;
-    slot_w = 5;
-    slot_o = height / 3;
-    difference() {
-        union() {
-            // base ring
-            difference() {
-                rounded_block_relative(slot_o, xradius + gap, yradius + gap, corner, 3 * wall);
-                rounded_block(slot_o, xradius + gap, yradius + gap, corner);
-            }
-            // upper ring with slots for rubber bands
-            difference() {
-                rounded_block_relative(height, xradius + gap + 2 * wall, yradius + gap + 2 * wall, corner, 2 * wall);
-                rounded_block_relative(height, xradius + gap + wall, yradius + gap + wall, corner, 1 * wall);
-                for (rot = [0, 90, 180, 270]) rotate([0, 0, rot]) {
-                    // slots for rubber bands
-                    minkr = 1.25;
-                    for (m = [0, 1]) mirror([0, m, 0]) {
-                        translate([-slot_w / 2 + slot_sep, ((rot % 180) ? xradius : yradius) + gap, slot_o + minkr]) {
-                            minkowski() {
-                                cube([slot_w - minkr, 10, slot_o - minkr]);
-                                rotate([90, 0, 0]) cylinder(r = minkr, h = 1, $fn = facets);
-                            }
-                            translate([slot_w / 2, -2, 0]) {
-                                cube([slot_w / 2, 10, 10]);
-                            }
-                        }
-                    }
-                }
-            }
-            // body for bars that connect both rings together
-            for (rot = [0, 90, 180, 270]) rotate([0, 0, rot]) {
-                translate([((rot % 180) ? yradius : xradius) + gap + 3 * wall, -(connector_w/2 + wall), 0]) {
-                    cube([connector_d + wall, connector_w + 2 * wall, height]);
-                }
-                for (m = [0, 1]) mirror([0, m, 0]) {
-                    translate([((rot % 180) ? yradius : xradius) + gap + 4 * wall, -(connector_w/2 + wall), 0]) {
-                        cylinder(r = wall * 2, h = height, $fn = 3);
-                    }
-                }
-            }
-        }
-        // carve holes for bars that connect both rings
-        for (rot = [0, 90, 180, 270]) rotate([0, 0, rot]) {
-            translate([((rot % 180) ? yradius : xradius) + gap + 3 * wall, -connector_w/2, 0]) {
-                cube([connector_d, connector_w, height - 2.75 * wall]);
-                translate([connector_d / 2, 0, height - 3 * wall]) {
-                    rotate([-90, 0, 0]) {
-                        cylinder(r = connector_d / 2, h = connector_w, $fn = facets);
-                    }
-                }
-            }
-        }
-    }
-    for (rot = [0, 90, 180, 270]) rotate([0, 0, rot]) {
-        // lip to support microphone on lower ring only
-        if (lip == 1) {
-            lip_w = 10;
-            translate([((rot % 180) ? yradius : xradius) + gap + 2.5 * wall, -lip_w/2, height]) {
-                rotate([90, 90, 180]) {
-                    linear_extrude(height = lip_w) {
-                        polygon([[0, 0], [0, 4], [1, 4], [height * 2/3, 0]]);
-                    }
-                }
-            }
-        }
-    }    
-}
-
 // eyelet for connecting the external ring to the stand mount
 
 module tetra_shock_mount_ring(outside_radius, inside_radius, thickness) {
@@ -432,16 +360,16 @@ module tetra_shock_mount_ring(outside_radius, inside_radius, thickness) {
 
 module octa_shock_mount_external_ring(height, xradius, yradius, corner, gap, lip) {
     difference() {
-        rounded_block_relative(ring_height, xradius, yradius, mount_corner, gap);
-        rounded_block_relative(ring_height, xradius, yradius, mount_corner, gap - ring_wall);
+        rounded_block_relative(ring_ext_height, xradius, yradius, mount_corner, gap);
+        rounded_block_relative(ring_ext_height, xradius, yradius, mount_corner, gap - ring_wall);
     }
     for (rot = [0, 90, 180, 270]) {
         rotate([0, 0, rot]) {
             translate([((rot % 180) ? yradius : xradius) + gap + ring_wall, -7.5, 0]) {
-                cube([4, 15, ring_height]);
+                cube([4, 15, ring_ext_height]);
             }
             translate([((rot % 180) ? yradius : xradius) + gap, -2, 0]) {
-                cube([7, 4, ring_height]);
+                cube([7, 4, ring_ext_height]);
             }
         }
     }
@@ -450,17 +378,17 @@ module octa_shock_mount_external_ring(height, xradius, yradius, corner, gap, lip
     intersection() {
         translate([ring_arm_gap, 0, 0]) {
             difference() {
-                rounded_block_relative(ring_height, xradius, yradius, mount_corner, gap);
-                rounded_block_relative(ring_height, xradius, yradius, mount_corner, gap - ring_wall);
+                rounded_block_relative(ring_ext_height, xradius, yradius, mount_corner, gap);
+                rounded_block_relative(ring_ext_height, xradius, yradius, mount_corner, gap - ring_wall);
             }
         }
         translate([ring_arm_gap / 2, -(yradius + 2 * mount_corner), 0]) {
-            cube([(xradius + 2 * mount_corner) + ring_arm_gap, 2 * (yradius + 2 * mount_corner), ring_height]);
+            cube([(xradius + 2 * mount_corner) + ring_arm_gap, 2 * (yradius + 2 * mount_corner), ring_ext_height]);
         }
     }
     // connection to hub
     translate([xradius + mount_corner + ring_wall + ring_arm_gap, -2, 0]) {
-        cube([8, 4, ring_height]);
+        cube([8, 4, ring_ext_height]);
     }
     // rotating mount
     o_rad = 8;
@@ -640,7 +568,7 @@ module render_octa_shock_mount_external_ring(z_offset) {
 
 module render_octa_shock_mount_internal_ring_bot(z_offset) {
     translate([0, 0, z_offset]) {
-        octa_shock_mount_internal_ring(ring_height, box_radius + wall, box_radius * 2 + wall, mount_corner, internal_ring_gap, 1);
+        shock_mount_internal_ring(ring_height, box_radius + wall, box_radius * 2 + wall, mount_corner, internal_ring_gap, 1);
     }
 }
 
@@ -660,7 +588,7 @@ module render_tetra_shock_mount_ring_connectors(offset) {
 
 module render_octa_shock_mount_internal_ring_top(z_offset) {
     translate([0, 0, z_offset]) {
-        octa_shock_mount_internal_ring(ring_height, box_radius + wall, box_radius * 2 + wall, mount_corner, internal_ring_gap, 0);
+        shock_mount_internal_ring(ring_height, box_radius + wall, box_radius * 2 + wall, mount_corner, internal_ring_gap, 0);
     }
 }
 

+ 74 - 0
SpHEAR_common.scad

@@ -284,3 +284,77 @@ module rounded_box(height, width, depth, radius, wall) {
     }
 }
 
+//// shared modules for shock mount
+
+// internal ring of shock mount
+
+module shock_mount_internal_ring(height, xradius, yradius, corner, gap, lip) {
+    slot_sep = xradius * 2 / 2.5;
+    slot_w = 5;
+    slot_o = height / 3;
+    difference() {
+        union() {
+            // base ring
+            difference() {
+                rounded_block_relative(slot_o, xradius + gap, yradius + gap, corner, 3 * wall);
+                rounded_block(slot_o, xradius + gap, yradius + gap, corner);
+            }
+            // upper ring with slots for rubber bands
+            difference() {
+                rounded_block_relative(height, xradius + gap + 2 * wall, yradius + gap + 2 * wall, corner, 2 * wall);
+                rounded_block_relative(height, xradius + gap + wall, yradius + gap + wall, corner, 1 * wall);
+                for (rot = [0, 90, 180, 270]) rotate([0, 0, rot]) {
+                    // slots for rubber bands
+                    minkr = 1.25;
+                    for (m = [0, 1]) mirror([0, m, 0]) {
+                        translate([-slot_w / 2 + slot_sep, ((rot % 180) ? xradius : yradius) + gap, slot_o + minkr]) {
+                            minkowski() {
+                                cube([slot_w - minkr, 10, slot_o - minkr]);
+                                rotate([90, 0, 0]) cylinder(r = minkr, h = 1, $fn = facets);
+                            }
+                            translate([slot_w / 2, -2, 0]) {
+                                cube([slot_w / 2, 10, 10]);
+                            }
+                        }
+                    }
+                }
+            }
+            // body for bars that connect both rings together
+            for (rot = [0, 90, 180, 270]) rotate([0, 0, rot]) {
+                translate([((rot % 180) ? yradius : xradius) + gap + 3 * wall, -(connector_w/2 + wall), 0]) {
+                    cube([connector_d + wall, connector_w + 2 * wall, height]);
+                }
+                for (m = [0, 1]) mirror([0, m, 0]) {
+                    translate([((rot % 180) ? yradius : xradius) + gap + 4 * wall, -(connector_w/2 + wall), 0]) {
+                        cylinder(r = wall * 2, h = height, $fn = 3);
+                    }
+                }
+            }
+        }
+        // carve holes for bars that connect both rings
+        for (rot = [0, 90, 180, 270]) rotate([0, 0, rot]) {
+            translate([((rot % 180) ? yradius : xradius) + gap + 3 * wall, -connector_w/2, 0]) {
+                cube([connector_d, connector_w, height - 2.75 * wall]);
+                translate([connector_d / 2, 0, height - 3 * wall]) {
+                    rotate([-90, 0, 0]) {
+                        cylinder(r = connector_d / 2, h = connector_w, $fn = facets);
+                    }
+                }
+            }
+        }
+    }
+    for (rot = [0, 90, 180, 270]) rotate([0, 0, rot]) {
+        // lip to support microphone on lower ring only
+        if (lip == 1) {
+            lip_w = 10;
+            translate([((rot % 180) ? yradius : xradius) + gap + 2.5 * wall, -lip_w/2, height]) {
+                rotate([90, 90, 180]) {
+                    linear_extrude(height = lip_w) {
+                        polygon([[0, 0], [0, 4], [1, 4], [height * 2/3, 0]]);
+                    }
+                }
+            }
+        }
+    }    
+}
+

+ 2 - 74
TinySpHEAR_mount_pcb.scad

@@ -272,78 +272,6 @@ module tetra_capsule_array_mount(angles) {
     }
 }
 
-// internal ring of shock mount
-
-module tetra_shock_mount_internal_ring(height, radius, corner, gap, lip) {
-    slot_sep = radius * 2 / 2.5;
-    slot_w = 5;
-    slot_o = height / 3;
-    difference() {
-        union() {
-            // base ring
-            difference() {
-                rounded_block_relative(slot_o, radius + gap, radius + gap, corner, 3 * wall);
-                rounded_block(slot_o, radius + gap, radius + gap, corner);
-            }
-            // upper ring with slots for rubber bands
-            difference() {
-                rounded_block_relative(height, radius + gap + 2 * wall, radius + gap + 2 * wall, corner, 2 * wall);
-                rounded_block_relative(height, radius + gap + wall, radius + gap + wall, corner, 1 * wall);
-                for (rot = [0, 90, 180, 270]) rotate([0, 0, rot]) {
-                    // slots for rubber bands
-                    minkr = 1.25;
-                    for (m = [0, 1]) mirror([0, m, 0]) {
-                        translate([-slot_w / 2 + slot_sep, radius + gap, slot_o + minkr]) {
-                            minkowski() {
-                                cube([slot_w - minkr, 10, slot_o - minkr]);
-                                rotate([90, 0, 0]) cylinder(r = minkr, h = 1, $fn = facets);
-                            }
-                            translate([slot_w / 2, -2, 0]) {
-                                cube([slot_w / 2, 10, 10]);
-                            }
-                        }
-                    }
-                }
-            }
-            // body for bars that connect both rings together
-            for (rot = [0, 90, 180, 270]) rotate([0, 0, rot]) {
-                translate([radius + gap + 3 * wall, -(connector_w/2 + wall), 0]) {
-                    cube([connector_d + wall, connector_w + 2 * wall, height]);
-                }
-                for (m = [0, 1]) mirror([0, m, 0]) {
-                    translate([radius + gap + 4 * wall, -(connector_w/2 + wall), 0]) {
-                        cylinder(r = wall * 2, h = height, $fn = 3);
-                    }
-                }
-            }
-        }
-        // carve holes for bars that connect both rings
-        for (rot = [0, 90, 180, 270]) rotate([0, 0, rot]) {
-            translate([radius + gap + 3 * wall, -connector_w/2, 0]) {
-                cube([connector_d, connector_w, height - 2.75 * wall]);
-                translate([connector_d / 2, 0, height - 3 * wall]) {
-                    rotate([-90, 0, 0]) {
-                        cylinder(r = connector_d / 2, h = connector_w, $fn = facets);
-                    }
-                }
-            }
-        }
-    }
-    for (rot = [0, 90, 180, 270]) rotate([0, 0, rot]) {
-        // lip to support microphone on lower ring only
-        if (lip == 1) {
-            lip_w = 10;
-            translate([radius + gap + 2.5 * wall, -lip_w/2, height]) {
-                rotate([90, 90, 180]) {
-                    linear_extrude(height = lip_w) {
-                        polygon([[0, 0], [0, 4], [1, 4], [height * 2/3, 0]]);
-                    }
-                }
-            }
-        }
-    }    
-}
-
 // eyelet for connecting the external ring to the stand mount
 
 module tetra_shock_mount_ring(outside_radius, inside_radius, thickness) {
@@ -573,7 +501,7 @@ module render_tetra_shock_mount_external_ring(z_offset) {
 
 module render_tetra_shock_mount_internal_ring_bot(z_offset) {
     translate([0, 0, z_offset]) {
-        tetra_shock_mount_internal_ring(ring_height, box_radius + wall, mount_corner, internal_ring_gap, 1);
+        shock_mount_internal_ring(ring_height, box_radius + wall, box_radius + wall, mount_corner, internal_ring_gap, 1);
     }
 }
 
@@ -593,7 +521,7 @@ module render_tetra_shock_mount_ring_connectors(offset) {
 
 module render_tetra_shock_mount_internal_ring_top(z_offset) {
     translate([0, 0, z_offset]) {
-        tetra_shock_mount_internal_ring(ring_height, box_radius + wall, mount_corner, internal_ring_gap, 0);
+        shock_mount_internal_ring(ring_height, box_radius + wall, box_radius + wall, mount_corner, internal_ring_gap, 0);
     }
 }