Pārlūkot izejas kodu

add small ridge to capsule holders, make mount to stand right height (having problems printing the taller one), add experimental code for octathingy capsule connection legs when elevation of capsules is the right one

Fernando Pablo Lopez-Lezcano 8 gadi atpakaļ
vecāks
revīzija
f87c86d4b8
2 mainītis faili ar 62 papildinājumiem un 12 dzēšanām
  1. 61 11
      SpHEAR_common.scad
  2. 1 1
      TinySpHEAR_common.scad

+ 61 - 11
SpHEAR_common.scad

@@ -33,6 +33,10 @@
 capsule_radius = 5;
 capsule_height = 4.5;
 
+// height and width of capsule stop ring
+capsule_ring_h = 0.4;
+capsule_ring_w = 0.5;
+
 // wall thickness of the capsule holder
 wall = 1;
 
@@ -82,7 +86,7 @@ mic_mount_slot_height = 11.5;
 mic_mount_slot_width = 4.25;
 mic_mount_slot_radius = 6.25  / 2;
 mic_mount_wall = 1.5;
-mic_mount_height = 35.0 + mic_wire_hole_offset + mic_wire_hole_radius + 2 * mic_mount_wall;
+mic_mount_height = 20.0 + mic_wire_hole_offset + mic_wire_hole_radius + 2 * mic_mount_wall;
 
 //// end of model parameters
 ////
@@ -113,7 +117,7 @@ fudge = 0.12;
 // 0.1: initial setting
 // 0.1 ->0.15: Ultimaker 2 + Extended plus APL (2016.06.17)
 // 0.15->0.10 (2017.01.21)
-fit = 0.10;
+fit = 0.08;
 
 // number of facets for rendering cylinders
 facets = 64;
@@ -134,10 +138,11 @@ thin_mint = 0.001;
 // solid: make the capsule holder solid, used in the mount code to carve the capsule rests
 
 module capsule (mounts, twist, ridge, ridge_wfit = 0.0, ridge_hfit = 0.0, solid = 0) {
+    capsule_h = capsule_height + capsule_ring_h;
     difference () {
         union () {
             // main capsule holder
-            cylinder(r = capsule_radius + wall, h = capsule_height, $fn = cfacets);
+            cylinder(r = capsule_radius + wall, h = capsule_h, $fn = cfacets);
             // the mounting legs
             for (angles = mounts) {
                 rotate([0, 0, angles[0] + twist]) {
@@ -192,6 +197,41 @@ module capsule (mounts, twist, ridge, ridge_wfit = 0.0, ridge_hfit = 0.0, solid
                             }
                         }
                     }
+                    // connect with horizontal legs with triangular top (testing for octathingy)
+                    if (connect == 4 && render_legs >= 0) {
+                        leg_h = leg_height * angles[3];
+                        // legs are not long enough for long ones in octathingy... add 1.0
+                        leg_length = capsule_radius + wall + capsule_height * tan(angles[1] + angles[2]) - fit + 1.0;
+                        leg_w = (solid != 0)? leg_width + fit : leg_width;
+                        slot_radius = (mic_radius - capsule_height) / tan(angles[1] + angles[2]);
+                        translate([0, 2 * (- leg_w / 3), 0]) {
+                            difference() {
+                                cube([leg_length, leg_w + leg_w / 3, capsule_height]);
+                                // cut slots that lock with adyacent leg
+                                if (solid == 0) {
+                                    for (offset = [1, 3]) {
+                                        translate([slot_radius - 1 * fit, leg_w / offset - fit / 2, 0]) {
+                                            rotate([0, 90 - (angles[1] + angles[2]) * 2, 0]) translate([0, 0, - capsule_height])
+                                            cube([leg_length, leg_w / 3 + fit, capsule_height * 2]);
+                                        }
+                                    }
+                                }
+                                // shave triangular slice of fingers, starts at edge of capsule holder
+                                translate([capsule_radius + wall, 0, leg_h]) {
+                                    rotate([0, 90 - (angles[1] + angles[2]), 0]) {
+                                        cube([leg_length, leg_w + leg_w / 3, capsule_height]);
+                                    }
+                                }
+                                // and remove the rest when the leg height is less than the capsule height
+                                translate([0, - 2 * (- leg_w / 3), leg_h]) {
+                                    difference() {
+                                        cylinder(r = capsule_radius + leg_length, h = capsule_height, $fn = facets);
+                                        cylinder(r = capsule_radius + wall, h = capsule_height, $fn = facets);
+                                    }
+                                }
+                            }
+                        }
+                    }
                     // connect with horizontal legs
                     if (connect == 2 && render_legs >= 0) {
                         leg_length = (mic_radius - capsule_height + leg_thick) * tan(90 - angles[1]);
@@ -236,10 +276,10 @@ module capsule (mounts, twist, ridge, ridge_wfit = 0.0, ridge_hfit = 0.0, solid
             if (ridge == 2) {
                 rotate([0, 0, twist]) {
                     translate([capsule_radius + wall - ridge_length / 2, (ridge_width + ridge_wfit) / 2, 0]) {
-                        cube([ridge_length * 3 / 2, ridge_width + ridge_wfit, capsule_height + ridge_hfit], center = false);
+                        cube([ridge_length * 3 / 2, ridge_width + ridge_wfit, capsule_h + ridge_hfit], center = false);
                     }
                     translate([capsule_radius + wall - ridge_length / 2, - (ridge_width + ridge_wfit) * 3 / 2, 0]) {
-                        cube([ridge_length * 3 / 2, ridge_width + ridge_wfit, capsule_height + ridge_hfit], center = false);
+                        cube([ridge_length * 3 / 2, ridge_width + ridge_wfit, capsule_h + ridge_hfit], center = false);
                     }
                 }
             }
@@ -247,26 +287,36 @@ module capsule (mounts, twist, ridge, ridge_wfit = 0.0, ridge_hfit = 0.0, solid
                 rotate([0, 0, twist]) {
                     difference() {
                         translate([capsule_radius + wall / 2, - (ridge_width + ridge_wfit) / 2, 0]) {
-                            cube([ridge_depth + wall / 2, ridge_width + ridge_wfit, capsule_height + ridge_hfit], center = false);
+                            cube([ridge_depth + wall / 2, ridge_width + ridge_wfit, capsule_h + ridge_hfit], center = false);
                         }
                         translate([capsule_radius + wall + ridge_length, - (ridge_width + ridge_wfit) / 2, 0]) {
                             rotate([0, elev_angle, 0]) {
-                                cube([ridge_depth, ridge_width + ridge_wfit, capsule_height * 2], center = false);
+                                cube([ridge_depth, ridge_width + ridge_wfit, capsule_h * 2], center = false);
                             }
                         }
                     }
                 }
             }
         }
-        // make the hole for the capsule (also cuts leg overhang for vertical connectors)
         if (solid != 1) {
-            translate ([0, 0, -capsule_height]) {
-                cylinder(r = capsule_radius + fudge, h = capsule_height * 2, $fn = cfacets);
+            // make the hole for the capsule
+            translate ([0, 0, capsule_ring_h]) {
+                cylinder(r = capsule_radius + fudge, h = capsule_h + thin_mint, $fn = cfacets);
+            }
+            if (connect == 3) {
+                // cut vertical leg overhang below capsule
+                translate ([0, 0, -capsule_h]) {
+                    cylinder(r = capsule_radius + fudge, h = capsule_h, $fn = cfacets);
+                }
+            }
+            if (connect != 3) {
+                // leave ridge at bottom for horizontal legs only
+                cylinder(r = capsule_radius + fudge - capsule_ring_w, h = capsule_h + thin_mint, $fn = cfacets);
             }
         }
         // remove any extra connecting beam material from the face of the holder
         if (connect == 0) {
-            translate ([0, 0, capsule_height]) {
+            translate ([0, 0, capsule_h]) {
                 cylinder(r = capsule_radius + wall * 2, h = 2, $fn = cfacets);
             }
         }

+ 1 - 1
TinySpHEAR_common.scad

@@ -85,7 +85,7 @@ mic_mount_slot_height = 11.5;
 mic_mount_slot_width = 4.25;
 mic_mount_slot_radius = 6.25  / 2;
 mic_mount_wall = 1.5;
-mic_mount_height = 35.0 + mic_wire_hole_offset + mic_wire_hole_radius + 2 * mic_mount_wall;
+mic_mount_height = 20.0 + mic_wire_hole_offset + mic_wire_hole_radius + 2 * mic_mount_wall;
 
 //// end of model parameters
 ////