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

Octathingy_mount: add rendering control for the printed circuit board and parts

Fernando Pablo Lopez-Lezcano пре 6 година
родитељ
комит
f400c99abd
1 измењених фајлова са 13 додато и 4 уклоњено
  1. 13 4
      Octathingy_mount_pcb.scad

+ 13 - 4
Octathingy_mount_pcb.scad

@@ -31,6 +31,13 @@
 // d-sub connector
 include <db25.scad>;
 
+////
+//// rendering control
+////
+
+// render version 2 printed circuit board and parts
+render_pcb = false;
+
 ////
 //// default model parameters
 ////
@@ -103,7 +110,7 @@ module one_pcb_slot (height, pcb_w, pcb_l, pcb_t, pcb_offset, slot_d, front, bac
     }
 }
 
-// the parts that are added to the printed circuit board
+// the printed circuit board and parts (for testing fit inside body of microphone)
 
 module one_pcb_parts (height, pcb_w, pcb_l, pcb_t, pcb_offset, slot_d, front, back) {
     //render() translate([-(pcb_w/2 + wall), -(back + wall), 0]) {
@@ -241,9 +248,11 @@ module octa_mount_body(height, radius, lower_lip, upper_lip, clear) {
                                 translate([-(pcb_width/2 + 2 * wall), -(wall + pcb_back), 0]) {
                                     cube([pcb_width + 2 * wall, wall, height * 2/3]);
                                 }
-                                // add components if we are testing for fit
-                                *one_pcb_parts(height * 2/3, pcb_width + pcb_fit, pcb_length, pcb_thickness + pcb_tfit, -10,
-                                    pcb_slot_depth, pcb_front, pcb_back);
+                                if (render_pcb) {
+                                    // add components if we are testing for fit
+                                    one_pcb_parts(height * 2/3, pcb_width + pcb_fit, pcb_length, pcb_thickness + pcb_tfit, -10,
+                                        pcb_slot_depth, pcb_front, pcb_back);
+                                }
                            }
                         }
                     }