Просмотр исходного кода

add second type of connection between holders, printed flat and with interlocking

Fernando Pablo Lopez-Lezcano 11 лет назад
Родитель
Сommit
7baf6e1773
1 измененных файлов с 25 добавлено и 4 удалено
  1. 25 4
      first_order.scad

+ 25 - 4
first_order.scad

@@ -9,11 +9,18 @@
 // 3d models under Creative Commons Non-Commercial Share-alike, CC-NC-SA 3.0
 // http://creativecommons.org/licenses/by-nc-sa/3.0/
 
-// 0 -> capsule holder
-// 1 -> whole microhone
+// what to render
+// 0 -> a single capsule holder
+// 1 -> the whole microhone with four capsules
 
 rendermic = 0;
 
+// what type of connection between holders
+// 0 -> original cylinder beams
+// 1 -> interlocking beams (out)
+// 2 -> interlocking beams (in)
+connect = 1;
+
 // number of facets for cylinders
 facets = 64;
 
@@ -51,11 +58,25 @@ module capsule (azimuth, elevation, ambradius, radius, height, wall, twist, moun
 						// the attachment point to the other capsules
 						for (rot = [-120 : 120 : mounts == 2 ? 0 : 120]) {
 							rotate(a = rot + twist, v = [0, 0, 1]) {
+								if (connect == 0) {
 								translate([radius - wall, 0, height - wall]) {
 									rotate(a = 145, v = [0, 1, 0]) {
-								  		cylinder(d = wall * 4, h = 6, center = false, $fn = facets);
+										cylinder(d = wall * 4, h = 6, center = false, $fn = facets);
 									}
 								}
+								}
+								if (connect == 1) {
+								translate([radius - wall, 3 * wall / 4, wall]) {
+									rotate(a = 90, v = [0, 1, 0]) {
+										difference() {
+											cube([wall * 2, wall * 4, height * 4], center = true);
+											translate([0, 0, wall * 8]) {
+												cube([wall * 2, wall * 1.5, height], center = true);
+											}
+										}
+									}
+								}
+								}
 							}
 						}
 					}
@@ -146,6 +167,6 @@ if (rendermic == 1) {
 
 // just one to test
 if (rendermic == 0) {
-	capsule(0, 270, 0, mic_radius, mic_height, 1, 0);
+	capsule(0, 90, height, mic_radius, mic_height, 1, 0);
 }