Преглед изворни кода

add extra transition to flare to capsule stalk, make stalk wall thicker to match the flare, change the Octathingy flare to wall to be printable, add transition to lip to avoid overhangs, make internal flare thicker so that there are no overhangs at the entry to the cable holes, make the array mount wall thicker to match the stalk

Fernando Pablo Lopez-Lezcano пре 10 година
родитељ
комит
5fdaba3cb9
1 измењених фајлова са 54 додато и 43 уклоњено
  1. 54 43
      Octathingy_mount_pcb.scad

+ 54 - 43
Octathingy_mount_pcb.scad

@@ -209,19 +209,19 @@ module octa_mount_body(height, width, depth, radius, lower_lip, upper_lip, clear
 
 // flares from the body to the microphone stalk and cable
 
-module octa_mount_flare(height, lip, transition, xradius, yradius, corner, top_radius, stalk_height, dot) {
+module octa_mount_flare(height, lip, transition, bot_xradius, bot_yradius, corner, top_radius, stalk_height, dot) {
     // bottom rounded box
     difference() {
-        rounded_block(height, xradius, yradius, corner);
-        rounded_block_relative(height, xradius, yradius, corner, -(2 * wall));
+        rounded_block(height, bot_xradius, bot_yradius, corner);
+        rounded_block_relative(height, bot_xradius, bot_yradius, corner, -(2 * wall));
         // flange to mount on body
-        rounded_block_relative(lip + 1.00, xradius, yradius, corner, - (wall));
+        rounded_block_relative(lip + 1.00, bot_xradius, bot_yradius, corner, - (wall));
         // and make a smooth transition to avoid overhangs
         translate([0, 0, lip + 1.00]) {
             hull() {
-                rounded_block_relative(thin_mint, xradius, yradius, corner, - wall);
+                rounded_block_relative(thin_mint, bot_xradius, bot_yradius, corner, - wall);
                 translate([0, 0, 1.0]) {
-                    rounded_block_relative(thin_mint, xradius, yradius, corner, - 2 * wall);
+                    rounded_block_relative(thin_mint, bot_xradius, bot_yradius, corner, - 2 * wall);
                 }
             }
         }
@@ -230,30 +230,30 @@ module octa_mount_flare(height, lip, transition, xradius, yradius, corner, top_r
     translate([0, 0, height]) {
         difference() {
             hull() {
-                rounded_block(thin_mint, xradius, yradius, corner);
+                rounded_block(thin_mint, bot_xradius, bot_yradius, corner);
                 translate([0, 0, transition]) {
-                    cylinder(r = top_radius, h = thin_mint, $fn = facets);
+                    cylinder(r = top_radius + wall, h = thin_mint, $fn = facets);
                 }
             }
             hull() {
-                rounded_block_relative(thin_mint, xradius, yradius, corner, - 2 * wall);
+                rounded_block_relative(thin_mint, bot_xradius, bot_yradius, corner, - 2 * wall);
                 translate([0, 0, transition]) {
                     cylinder(r = top_radius - wall, h = thin_mint, $fn = facets);
                 }
             }
         }
     }
-        // add an additional transition from the flare to the stalk
+    // add an additional transition from the flare to the stalk
     flare_stalk = 2;
-    mid_xradius = top_radius + (flare_stalk * (xradius - top_radius)) / transition;
-    mid_yradius = top_radius + (flare_stalk * (yradius - top_radius)) / transition;
-    mid_corner = top_radius + (flare_stalk * (corner - top_radius)) / transition;
+    mid_xradius = top_radius + wall + (flare_stalk * (bot_xradius - (top_radius + wall))) / transition;
+    mid_yradius = top_radius + wall + (flare_stalk * (bot_yradius - (top_radius + wall))) / transition;
+    mid_corner = top_radius + wall + (flare_stalk * (corner - (top_radius + wall))) / transition;
     translate([0, 0, height + transition - flare_stalk]) {
         difference() {
             hull() {
                 rounded_block(thin_mint, mid_xradius, mid_yradius, mid_corner);
                 translate([0, 0, 2 * flare_stalk]) {
-                    cylinder(r = top_radius, h = thin_mint, $fn = facets);
+                    cylinder(r = top_radius + wall, h = thin_mint, $fn = facets);
                 }
             }
             hull() {
@@ -267,7 +267,7 @@ module octa_mount_flare(height, lip, transition, xradius, yradius, corner, top_r
     // cylindrical stalk
     translate([0, 0, height + transition]) {
         difference() {
-            cylinder(r = top_radius, h = stalk_height, $fn = facets);
+            cylinder(r = top_radius + wall, h = stalk_height, $fn = facets);
             cylinder(r = top_radius - wall, h = stalk_height, $fn = facets);
         }
         // add marker for "back of microphone" orientation
@@ -291,39 +291,50 @@ module octa_mount_flare(height, lip, transition, xradius, yradius, corner, top_r
 module octa_mount_flare_dual(height, lip, transition, xradius, yradius, corner, top_radius, stalk_height) {
     // hack to get it to render, fix problem in rounded_block when radius is equal to corner...
     delta = 0.001;
-    // bottom rounded box
     difference() {
-        rounded_block(height, xradius, yradius, corner);
-        rounded_block_relative(height, xradius, yradius, corner, -(2 * wall));
-        // flange to mount on body
-        rounded_block_relative(lip + 1.00, xradius, yradius, corner, - (wall));
-    }
-    // flare to rounded section section
-    translate([0, 0, height]) {
-        difference() {
-            hull() {
-                rounded_block(thin_mint, xradius, yradius, corner);
-                translate([0, 0, transition]) {
-                    rounded_block(thin_mint, top_radius, top_radius * 2, top_radius - delta);
+        union() {
+            // bottom rounded box
+            difference() {
+                rounded_block(height, xradius, yradius, corner);
+                rounded_block_relative(height, xradius, yradius, corner, -(2 * wall));
+                // flange to mount on body
+                rounded_block_relative(lip + 1.00, xradius, yradius, corner, - (wall));
+                // and make a smooth transition to avoid overhangs
+                translate([0, 0, lip + 1.00]) {
+                    hull() {
+                        rounded_block_relative(thin_mint, xradius, yradius, corner, - wall);
+                        translate([0, 0, 1.0]) {
+                            rounded_block_relative(thin_mint, xradius, yradius, corner, - 2 * wall);
+                        }
+                    }
                 }
             }
-            hull() {
-                rounded_block_relative(thin_mint, xradius, yradius, corner, - 2 * wall);
-                translate([0, 0, transition]) {
-                    rounded_block(thin_mint, top_radius - wall, (top_radius * 2) - 1.5 * wall, top_radius - wall - delta);
+            // flare to rounded section
+            translate([0, 0, height]) {
+                difference() {
+                    hull() {
+                        rounded_block(thin_mint, xradius, yradius, corner);
+                        translate([0, 0, transition]) {
+                            rounded_block(thin_mint, top_radius + wall / 2, top_radius * 2 + wall / 2, top_radius - delta);
+                        }
+                    }
+                    hull() {
+                        rounded_block_relative(thin_mint, xradius, yradius, corner, - 2 * wall);
+                        translate([0, 0, transition]) {
+                            cube([thin_mint, (top_radius - wall) * 2, thin_mint]);
+                        }
+                    }
                 }
             }
+            // corner box cable stalk
+            translate([0, 0, height + transition]) {
+                rounded_block(stalk_height, top_radius + wall  / 2, top_radius * 2 + wall / 2, top_radius - delta);
+            }
         }
-    }
-    // corner box cable stalk
-    translate([0, 0, height + transition]) {
-        difference() {
-            rounded_block(stalk_height, top_radius, top_radius * 2, top_radius - delta);
-            // add holes for two cables
-            for (offset = [top_radius - wall/2, -(top_radius  - wall/2)]) {
-                translate([0, offset, 0]){
-                        cylinder(r = top_radius - wall, h = stalk_height, $fn = facets);
-                }
+        // holes for the cables
+        for (offset = [top_radius - wall/2, -(top_radius - wall/2)]) {
+            translate([0, offset, 0]){
+                cylinder(r = top_radius - wall, h = height + transition + stalk_height, $fn = facets);
             }
         }
     }
@@ -336,7 +347,7 @@ module octa_capsule_array_mount(angles) {
         translate([0, 0, 0]) {
             rotate([0, 0, 45]) {
                 difference() {
-                    cylinder(h = mount_top_height, r1 = mount_radius + wall, r2 = mount_radius_capsule, $fn = facets);
+                    cylinder(h = mount_top_height, r1 = mount_radius + 2 * wall, r2 = mount_radius_capsule, $fn = facets);
                     cylinder(h = mount_top_height, r1 = mount_radius, r2 = mount_radius_capsule * 0.8, $fn = facets);
                 }
             }