Explorar el Código

remove render_screw_holes variable (no longer needed as we do not have the snap_joints option anymore, we always use screws to join the three main body parts)

Fernando Pablo Lopez-Lezcano hace 6 años
padre
commit
9e4e1fceaf
Se han modificado 2 ficheros con 104 adiciones y 141 borrados
  1. 86 115
      Octathingy_mount_pcb.scad
  2. 18 26
      TinySpHEAR_mount_pcb.scad

+ 86 - 115
Octathingy_mount_pcb.scad

@@ -46,7 +46,6 @@ box_radius = pcb_front + (pcb_thickness + pcb_tfit) + pcb_back + 2 * wall;
 mount_corner = box_radius - pcb_width / 2 + pcb_slot_depth + 4.0;
 
 // body parameters
-render_screw_holes = true;
 radial_pcb_offset = pcb_version == 2 ? 15.0 : 17.0;
 octa_pcb_mount_height = pcb_length - pcb_low_exp - pcb_hi_exp;
 octa_pcb_wall = (pcb_version == 2 ? 4.75 : 5) * wall;
@@ -246,30 +245,26 @@ module octa_mount_body_old(height, radius, lower_lip, upper_lip, clear) {
                     rounded_octagon_wall(upper_lip, radius, wall + lip_fit);
                 }
             }
-            if (render_screw_holes) {
-                // add backplates for upper lip screws
-                for (r = [45, 135, 225, 315]) {
-                    rotate([0, 0, r]) translate([-(radius - 3 * wall), -2.5, 0]) {
-                        cube([2, 5, height]);
-                    }
+            // add backplates for upper lip screws
+            for (r = [45, 135, 225, 315]) {
+                rotate([0, 0, r]) translate([-(radius - 3 * wall), -2.5, 0]) {
+                    cube([2, 5, height]);
                 }
             }
         }
-        if (render_screw_holes) {
-            // make eight holes in the the body for screws that hold both flares
-            // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
-            difference() {
-                for (z = [lower_lip/2, height - upper_lip/2]) {
-                    for (r = [45, 135, 225, 315]) {
-                        rotate([0, 0, r]) translate([-(radius + 2 * wall), 0, z]) {
-                            rotate([0, 90, 0]) {
-                                cylinder(r = 0.7, h = radius + wall, $fn = facets);
-                            }
+        // make eight holes in the the body for screws that hold both flares
+        // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
+        difference() {
+            for (z = [lower_lip/2, height - upper_lip/2]) {
+                for (r = [45, 135, 225, 315]) {
+                    rotate([0, 0, r]) translate([-(radius + 2 * wall), 0, z]) {
+                        rotate([0, 90, 0]) {
+                            cylinder(r = 0.7, h = radius + wall, $fn = facets);
                         }
                     }
                 }
-                cylinder(r = radius/2, h = height);
             }
+            cylinder(r = radius/2, h = height);
         }
     }
 }
@@ -327,30 +322,26 @@ module octa_mount_body(height, radius, lower_lip, upper_lip, clear) {
                     rounded_octagon_wall(upper_lip, radius, wall + lip_fit);
                 }
             }
-            if (render_screw_holes) {
-                // add backplates for upper lip screws
-                for (r = [45, 135, 225, 315]) {
-                    rotate([0, 0, r]) translate([-(radius - 3 * wall), -2.5, 0]) {
-                        cube([2, 5, height]);
-                    }
+            // add backplates for upper lip screws
+            for (r = [45, 135, 225, 315]) {
+                rotate([0, 0, r]) translate([-(radius - 3 * wall), -2.5, 0]) {
+                    cube([2, 5, height]);
                 }
             }
         }
-        if (render_screw_holes) {
-            // make eight holes in the the body for screws that hold both flares
-            // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
-            difference() {
-                for (z = [lower_lip/2, height - upper_lip/2]) {
-                    for (r = [45, 135, 225, 315]) {
-                        rotate([0, 0, r]) translate([-(radius + 2 * wall), 0, z]) {
-                            rotate([0, 90, 0]) {
-                                cylinder(r = 0.7, h = radius + wall, $fn = facets);
-                            }
+        // make eight holes in the the body for screws that hold both flares
+        // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
+        difference() {
+            for (z = [lower_lip/2, height - upper_lip/2]) {
+                for (r = [45, 135, 225, 315]) {
+                    rotate([0, 0, r]) translate([-(radius + 2 * wall), 0, z]) {
+                        rotate([0, 90, 0]) {
+                            cylinder(r = 0.7, h = radius + wall, $fn = facets);
                         }
                     }
                 }
-                cylinder(r = radius/2, h = height);
             }
+            cylinder(r = radius/2, h = height);
         }
     }
 }
@@ -362,14 +353,12 @@ module octa_mount_flare_no_ws(height, lip, transition, radius, top_radius, stalk
     difference() {
         union() {
             rounded_octagon_wall(height, radius, 2 * wall);
-            if (render_screw_holes) {
-                // small pedestals for the screws that attach the flare to the body
-                // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
-                for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
-                    translate([radius - wall - 1.75, 0, lip/2]) {
-                        rotate([0, 90, 0]) {
-                            cylinder(r = 1.5, h = 2 * wall, $fn = facets);
-                        }
+            // small pedestals for the screws that attach the flare to the body
+            // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
+            for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
+                translate([radius - wall - 1.75, 0, lip/2]) {
+                    rotate([0, 90, 0]) {
+                        cylinder(r = 1.5, h = 2 * wall, $fn = facets);
                     }
                 }
             }
@@ -385,14 +374,12 @@ module octa_mount_flare_no_ws(height, lip, transition, radius, top_radius, stalk
                 }
             }
         }
-        if (render_screw_holes) {
-            // holes for screws that attach the flare to the body
-            // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
-            for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
-                translate([radius/2, 0, lip/2]) {
-                    rotate([0, 90, 0]) {
-                        cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
-                    }
+        // holes for screws that attach the flare to the body
+        // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
+        for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
+            translate([radius/2, 0, lip/2]) {
+                rotate([0, 90, 0]) {
+                    cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
                 }
             }
         }
@@ -461,14 +448,12 @@ module octa_mount_flare_old(height, lip, transition, radius, top_radius, stalk_h
     difference() {
         union() {
             rounded_octagon_wall(height, radius, 2 * wall);
-            if (render_screw_holes) {
-                // small pedestals for the screws that attach the flare to the body
-                // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
-                for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
-                    translate([radius - wall - 1.75, 0, lip/2]) {
-                        rotate([0, 90, 0]) {
-                            cylinder(r = 1.5, h = 2 * wall, $fn = facets);
-                        }
+            // small pedestals for the screws that attach the flare to the body
+            // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
+            for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
+                translate([radius - wall - 1.75, 0, lip/2]) {
+                    rotate([0, 90, 0]) {
+                        cylinder(r = 1.5, h = 2 * wall, $fn = facets);
                     }
                 }
             }
@@ -497,14 +482,12 @@ module octa_mount_flare_old(height, lip, transition, radius, top_radius, stalk_h
                 }
             }
         }
-        if (render_screw_holes) {
-            // holes for screws that attach the flare to the body
-            // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
-            for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
-                translate([radius/2, 0, lip/2]) {
-                    rotate([0, 90, 0]) {
-                        cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
-                    }
+        // holes for screws that attach the flare to the body
+        // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
+        for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
+            translate([radius/2, 0, lip/2]) {
+                rotate([0, 90, 0]) {
+                    cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
                 }
             }
         }
@@ -625,14 +608,12 @@ module octa_mount_flare(height, lip, transition, radius, top_radius, stalk_heigh
     difference() {
         union() {
             rounded_octagon_wall(height - windscreen_thread_height, radius, 2 * wall);
-            if (render_screw_holes) {
-                // small pedestals for the screws that attach the flare to the body
-                // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
-                for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
-                    translate([radius - wall - 1.75, 0, lip/2]) {
-                        rotate([0, 90, 0]) {
-                            cylinder(r = 1.5, h = 2 * wall, $fn = facets);
-                        }
+            // small pedestals for the screws that attach the flare to the body
+            // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
+            for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
+                translate([radius - wall - 1.75, 0, lip/2]) {
+                    rotate([0, 90, 0]) {
+                        cylinder(r = 1.5, h = 2 * wall, $fn = facets);
                     }
                 }
             }
@@ -662,14 +643,12 @@ module octa_mount_flare(height, lip, transition, radius, top_radius, stalk_heigh
                 }
             }
         }
-        if (render_screw_holes) {
-            // holes for screws that attach the flare to the body
-            // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
-            for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
-                translate([radius/2, 0, lip/2]) {
-                    rotate([0, 90, 0]) {
-                        cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
-                    }
+        // holes for screws that attach the flare to the body
+        // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
+        for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
+            translate([radius/2, 0, lip/2]) {
+                rotate([0, 90, 0]) {
+                    cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
                 }
             }
         }
@@ -820,14 +799,12 @@ module octa_mount_flare_connector(height, lip, transition, radius, top_xradius,
     difference() {
         union() {
             rounded_octagon_wall(height, radius, 2 * wall);
-            if (render_screw_holes) {
-                // small pedestals for the screws that attach the flare to the body
-                // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
-                for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
-                    translate([radius - wall - 1.75, 0, lip/2]) {
-                        rotate([0, 90, 0]) {
-                            cylinder(r = 1.5, h = 2 * wall, $fn = facets);
-                        }
+            // small pedestals for the screws that attach the flare to the body
+            // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
+            for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
+                translate([radius - wall - 1.75, 0, lip/2]) {
+                    rotate([0, 90, 0]) {
+                        cylinder(r = 1.5, h = 2 * wall, $fn = facets);
                     }
                 }
             }
@@ -843,14 +820,12 @@ module octa_mount_flare_connector(height, lip, transition, radius, top_xradius,
                 }
             }
         }
-        if (render_screw_holes) {
-            // holes for screws that attach the flare to the body
-            // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
-            for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
-                translate([radius/2, 0, lip/2]) {
-                    rotate([0, 90, 0]) {
-                        cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
-                    }
+        // holes for screws that attach the flare to the body
+        // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
+        for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
+            translate([radius/2, 0, lip/2]) {
+                rotate([0, 90, 0]) {
+                    cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
                 }
             }
         }
@@ -881,14 +856,12 @@ module octa_mount_flare_dsub(height, lip, transition, radius, top_xradius, top_y
     difference() {
         union() {
             rounded_octagon_wall(height, radius, 2 * wall);
-            if (render_screw_holes) {
-                // small pedestals for the screws that attach the flare to the body
-                // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
-                for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
-                    translate([radius - wall - 1.75, 0, lip/2]) {
-                        rotate([0, 90, 0]) {
-                            cylinder(r = 1.5, h = 2 * wall, $fn = facets);
-                        }
+            // small pedestals for the screws that attach the flare to the body
+            // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
+            for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
+                translate([radius - wall - 1.75, 0, lip/2]) {
+                    rotate([0, 90, 0]) {
+                        cylinder(r = 1.5, h = 2 * wall, $fn = facets);
                     }
                 }
             }
@@ -904,14 +877,12 @@ module octa_mount_flare_dsub(height, lip, transition, radius, top_xradius, top_y
                 }
             }
         }
-        if (render_screw_holes) {
-            // holes for screws that attach the flare to the body
-            // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
-            for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
-                translate([radius/2, 0, lip/2]) {
-                    rotate([0, 90, 0]) {
-                        cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
-                    }
+        // holes for screws that attach the flare to the body
+        // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
+        for (r = [45, 135, 225, 315]) rotate([0, 0, r]) {
+            translate([radius/2, 0, lip/2]) {
+                rotate([0, 90, 0]) {
+                    cylinder(r = (1.6 + 0.1)/2, h = radius, $fn = facets);
                 }
             }
         }

+ 18 - 26
TinySpHEAR_mount_pcb.scad

@@ -40,7 +40,6 @@ mic_to_mount_fit = 0.0;
 
 //// screw holes to join the body to the two flares
 //
-render_screw_holes = true;
 // rotation of holes to avoid pcb slots
 screw_rotation = -3.0;
 
@@ -102,13 +101,11 @@ module tetra_mount_body(height, radius, corner, lower_lip, upper_lip, screw_rota
             translate([0, 0, slot_len]) {
                 difference() {
                     rounded_block_relative(height, radius, radius, corner, - (2 * wall));
-                    if (render_screw_holes) {
-                        // add columns for upper screw holes
-                        col_w = 3.5;
-                        for (r = [45, 135, 225, 315]) rotate([0, 0, r])
-                        translate([radius - col_w*2/3, -col_w/2, 0]) {
-                            cube([col_w, col_w, height]);
-                        }
+                    // add columns for upper screw holes
+                    col_w = 3.5;
+                    for (r = [45, 135, 225, 315]) rotate([0, 0, r])
+                    translate([radius - col_w*2/3, -col_w/2, 0]) {
+                        cube([col_w, col_w, height]);
                     }
                 }
             }
@@ -126,10 +123,9 @@ module tetra_mount_body(height, radius, corner, lower_lip, upper_lip, screw_rota
                     rounded_block_relative(lower_lip, radius, radius, corner, -(wall + lip_fit));
                 }
             }
-            if (render_screw_holes) {
             // make eight holes in the the body for screws that hold both flares
             // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
-                for (z = [lower_lip/2, height - upper_lip/2])
+            for (z = [lower_lip/2, height - upper_lip/2]) {
                 for (r = [45, 135, 225, 315]) {
                     rotate([0, 0, r + screw_rotation])
                     translate([-(radius + 2 * wall), 0, z]) {
@@ -205,14 +201,12 @@ module tetra_mount_flare(height, lip, transition, bot_radius, bot_corner, top_ra
                     translate([bot_radius, 0, 0]) scale([2.0, 1.0, 1.0]) cylinder(r = 2.0, h = lip, $fn = facets);
                 }
             }
-            if (render_screw_holes) {
-                // small supports for the screws that attach the flare to the body
-                // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
-                for (r = [45, 135, 225, 315]) rotate([0, 0, r + screw_rotation]) {
-                    translate([bot_radius + wall/3, 0, lip/2]) {
-                        rotate([0, 90, 0]) {
-                            cylinder(r = 1.5, h = 2 * wall, $fn = facets);
-                        }
+            // small supports for the screws that attach the flare to the body
+            // (number 0 size, 1/4" long = thread diameter: 1.6mm, head diameter: 2.75)
+            for (r = [45, 135, 225, 315]) rotate([0, 0, r + screw_rotation]) {
+                translate([bot_radius + wall/3, 0, lip/2]) {
+                    rotate([0, 90, 0]) {
+                        cylinder(r = 1.5, h = 2 * wall, $fn = facets);
                     }
                 }
             }
@@ -220,14 +214,12 @@ module tetra_mount_flare(height, lip, transition, bot_radius, bot_corner, top_ra
         rounded_block_relative(height, bot_radius, bot_radius, bot_corner, -(2 * wall));
         // cut flange to mount on body
         rounded_block_relative(lip + 1.00, bot_radius, bot_radius, bot_corner, - (wall));
-        if (render_screw_holes) {
-            // holes for screws that attach the flare to the body
-            // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
-            for (r = [45, 135, 225, 315]) rotate([0, 0, r + screw_rotation]) {
-                translate([bot_radius + wall, 0, lip/2]) {
-                    rotate([0, 90, 0]) {
-                        cylinder(r = (1.6 + 0.1)/2, h = bot_radius, $fn = facets);
-                    }
+        // holes for screws that attach the flare to the body
+        // Number 0 Size, 1/4" Long = thread diameter: 1.6mm, head diameter: 2.75
+        for (r = [45, 135, 225, 315]) rotate([0, 0, r + screw_rotation]) {
+            translate([bot_radius + wall, 0, lip/2]) {
+                rotate([0, 90, 0]) {
+                    cylinder(r = (1.6 + 0.1)/2, h = bot_radius, $fn = facets);
                 }
             }
         }