1
0
Эх сурвалжийг харах

fix calculation of the mount geometric parameters, add calculation of slot depth for the mount, add small sloped ridge so that the capsule holder wall rests on the mount - we have to verify this can be printed

Fernando Pablo Lopez-Lezcano 11 жил өмнө
parent
commit
0b0385ba4b
1 өөрчлөгдсөн 30 нэмэгдсэн , 16 устгасан
  1. 30 16
      first_order.scad

+ 30 - 16
first_order.scad

@@ -97,9 +97,10 @@ slot_depth = connect == 1 ?
 	leg_thick * 1.5 : leg_thick;
 
 // microphone holder geometry
-capsule_sep_min = mic_radius * sin(tetra) - capsule_radius * cos(tetra);
-capsule_sep_max = capsule_sep_min + capsule_height * sin(tetra);
-capsule_bottom = mic_radius * cos(tetra) + capsule_radius * sin(tetra);
+capsule_sep_min = (mic_radius - capsule_height) * sin(tetra) - (capsule_radius + wall) * cos(tetra);
+capsule_sep_max = mic_radius * sin(tetra) - (capsule_radius + wall) * cos(tetra);
+capsule_bottom = mic_radius * cos(tetra) + (capsule_radius + wall) * sin(tetra);
+mount_slot_depth = ridge_length * cos(tetra);
 
 ////////
 // microphone capsule holder
@@ -190,18 +191,22 @@ module capsule (azimuth, elevation, mounts, twist) {
 
 // microphone mount
 //
+// angles: 
 // wall: thickness of cylinder wall
 // separation: height of mount with respect of the microphone assembly
 
-module mount (wall, separation) {
-	translate([0, 0, -(separation + 1)]) {
+module mount (angles, wall, separation) {
+	translate([0, 0, -(separation + 0.1)]) {
 		difference() {
 			union() {
 				// grips for the capsule holder ridge
-				for (rot = [0 : 180 : 360]) {
-					rotate([0, 0, rot - 45]) {
-						translate([-(capsule_sep_max / 2), (ridge_width / 2) + fit, -mount_height]) {
-							cube([capsule_sep_max, ridge_width / 2, mount_height]);
+				for (rot = angles) {
+					rotate([0, 0, rot]) {
+						translate([-capsule_sep_max, -(ridge_width - fit / 2), -mount_height]) {
+							cube([capsule_sep_max, ridge_width * 2 - fit, mount_height]);
+                            rotate([0, -(90 - tetra), 0]) {
+                                cube([capsule_sep_max, ridge_width * 2 - fit, mount_height * sin(tetra)]);
+                            }
 						}
 					}
 				}
@@ -209,15 +214,24 @@ module mount (wall, separation) {
 					cylinder(r = mount_radius + wall, h = mount_height, $fn = facets);
 				}
 			}
-			// make the hole for the mount
+			// make the hole for the mount (* 1.5 to cut the ridge as well)
 			translate([0, 0, -mount_height]) {
-				cylinder(r = mount_radius, h = mount_height, $fn = facets);
+				cylinder(r = mount_radius, h = mount_height * 1.5, $fn = facets);
+			}
+            // cut the outside of the sloped ridge
+			translate([0, 0, -mount_height]) {
+                difference() {
+                    cylinder(r = capsule_sep_max + mount_height * 1.5, h = mount_height * 1.5, $fn = facets);
+                    cylinder(r = capsule_sep_max, h = mount_height * 1.5, $fn = facets);
+                }
 			}
 			// and cut a slot for the ridges in the wall of the cylinder
-			rotate([0, 0, -45]) {
-				translate([-(capsule_sep_max / 2), -ridge_width + 4 * fit, -mount_height / 2]) {
-					cube([capsule_sep_max, ridge_width + 2 * fit, mount_height]);
-				}
+            for (rot = angles) {
+                rotate([0, 0, rot]) {
+                    translate([-capsule_sep_max * 2, -ridge_width + 4 * fit, -mount_slot_depth]) {
+                        cube([capsule_sep_max * 2, ridge_width + 2 * fit, mount_height]);
+                    }
+                }
 			}
 		}
 	}
@@ -233,7 +247,7 @@ if (rendermic == 1) {
 	capsule(-135, elev, [-120, 0, 120], 60);
 	capsule(135, -elev, [-120, 120], 0);
 	// the mount
-	mount(1, capsule_bottom);
+	mount([-45, 135], 1, capsule_bottom);
 }
 
 // print all the parts separately