Commits

jorodeo  committed 6849a09

Worked on new enclosure design.

  • Participants
  • Parent commits 7c47e0d

Comments (0)

Files changed (2)

File capillary_enclosure.py

 
     def __init__(self,params):
         self.params = params
-        self.add_sensor_mount_holes()
-        self.add_sensor_cable_hole()
+        self.add_sensor_cutout()
+        #self.add_sensor_cable_hole()
         self.add_capillary_holes()
-        self.add_capillary_clamp_holes()
-        self.add_led_cable_hole()
+        #self.add_capillary_clamp_holes()
+        #self.add_led_cable_hole()
         super(Capillary_Enclosure,self).__init__(self.params)
 
     def make(self):
         self.make_led_plate()
         self.make_diffuser_plate()
         self.make_sensor()
-        self.make_clamp_standoffs()
+        #self.make_clamp_standoffs()
         self.make_clamp_plates()
         self.make_led_standoffs()
         self.make_diffuser_standoffs()
         self.make_capillary()
+        self.make_guide_plates()
 
     def get_assembly(self,**kwargs):
         """
         except KeyError:
             show_capillary = True
         try:
+            show_guide_plate = kwargs['show_guide_plate']
+        except KeyError:
+            show_guide_plate = True
+        try:
             explode = kwargs['explode']
         except KeyError:
             explode = (0,0,0)
         # Add sensor
         sensor_x, sensor_y, sensor_z = self.params['sensor_dimensions']
         sensor = self.sensor
-        z_shift = -0.5*z+0.5*sensor_z - explode_z
+        z_shift = -0.5*z-0.5*sensor_z - explode_z
         sensor = Translate(sensor,v=(0,0,z_shift))
         sensor = Color(sensor,rgba=(0.5,0.5,0.5))
         if show_sensor:
             parts_list.append(sensor)
 
-        # Add clamp standoffs
-        clamp_standoff_length = self.params['capillary_clamp_standoff_length']
-        z_shift = -0.5*z+0.5*clamp_standoff_length - explode_z
-        for standoff in self.clamp_standoff_list:
-            standoff = Translate(standoff,v=(0,0,z_shift))
-            if show_clamp_standoffs:
-                parts_list.append(standoff)
-
-        # Add clamp plates
-        plate_x, plate_y, plate_z = self.params['capillary_clamp_plate_dimensions']
-        hole_space = self.params['sensor_mount_hole_space']
-        for clamp_plate, sgn in zip(self.clamp_plate_list,(-1,1)):
-            x_shift = 0.5*sgn*hole_space
-            y_shift = 0
-            z_shift = -0.5*z + 0.5*plate_z + clamp_standoff_length - explode_z
-            clamp_plate = Translate(clamp_plate,v=(x_shift,y_shift,z_shift))
-            if show_clamp_plates:
-                parts_list.append(clamp_plate)
 
         # Add led standoffs
         led_standoff_length = self.params['led_standoff_length']
 
         # Add capillary
         cap_offset_x, cap_offset_y = self.params['capillary_hole_offset']
-        cap_hole_diam = self.params['capillary_hole_diam']
+        cap_hole_diam = self.params['capillary_diam']
         y_shift = cap_offset_x
         z_shift = -0.5*z + 0.5*cap_hole_diam + cap_offset_y - explode_z
         capillary = self.capillary
         if show_capillary:
             parts_list.append(capillary)
         
+        # Add guide plate
+        guide_x, guide_y, guide_z = self.params['guide_plate_dimensions']
+        y_shift = 0.5*guide_y + 0.5*self.params['capillary_diam'] + cap_offset_x
+        z_shift = -0.5*z + 0.5*guide_z
+        guide_plate_pos = Translate(self.guide_plate_pos,v=[0,y_shift,z_shift])
+        y_shift = -0.5*guide_y - 0.5*self.params['capillary_diam'] + cap_offset_x
+        guide_plate_neg = Translate(self.guide_plate_neg,v=[0,y_shift,z_shift])
+        y_shift = cap_offset_x
+        z_shift = -0.5*z + 1.5*guide_z 
+        guide_plate_top = Translate(self.guide_plate_top,v=[0,y_shift,z_shift])
+
+        if show_guide_plate:
+           parts_list.extend([guide_plate_pos,guide_plate_neg,guide_plate_top])
+
         return parts_list
 
     def get_opaque_projection(self,show_ref_cube=True, spacing_factor=4):
             hole_list.append(hole)
         self.params['hole_list'].extend(hole_list)
 
-    def add_sensor_mount_holes(self):
+ 
+    def add_sensor_cutout(self):
         """
-        Add mount holes for sensor
+        Add cutout for sensor
         """
         hole_list = [] 
-        hole_diam = self.params['sensor_mount_hole_diam']
-        hole_space = self.params['sensor_mount_hole_space']
-        for i in (-1,1):
-            x_pos, y_pos = i*0.5*hole_space, 0.0
-            hole = {
+
+        sensor_width = self.params['sensor_width']
+        sensor_length = self.params['sensor_length']
+        hole_offset = self.params['sensor_hole_offset']
+        
+        x_pos = 0;
+        y_pos = -hole_offset;
+            
+        hole = {
                     'panel'    : 'bottom', 
-                    'type'     : 'round', 
+                    'type'     : 'square', 
                     'location' : (x_pos, y_pos),
-                    'size'     : hole_diam,
+                    'size'     : (sensor_length, sensor_width),
                     }
-            hole_list.append(hole)
+        hole_list.append(hole)
         self.params['hole_list'].extend(hole_list)
 
+
     def add_capillary_clamp_holes(self):
         """
         Add holes for clamping capillary in place
             self.diffuser_standoff_list.append(standoff)
 
     def make_capillary(self):
-        diameter = self.params['capillary_hole_diam']
+        diameter = self.params['capillary_diam']
         length = self.params['capillary_length']
         r = 0.5*diameter
         capillary = Cylinder(h=length,r1=r,r2=r)
         self.capillary = capillary
 
 
+    def make_guide_plates(self):
+        guide_x, guide_y, guide_z = self.params['guide_plate_dimensions']
+        self.guide_plate_pos = Cube(size=(guide_x, guide_y, guide_z))
+        self.guide_plate_neg = Cube(size=(guide_x, guide_y, guide_z))
+        top_x = guide_x
+        top_y = 2*guide_y + self.params['capillary_diam']
+        top_z = guide_z
+        self.guide_plate_top = Cube(size=(top_x,top_y,top_z))
 
+

File make_enclosure.py

 INCH2MM = 25.4
 
 # Inside dimensions
-x,y,z = 70.0, 45.0, 1.25*INCH2MM 
+x,y,z = 61.25, 45.0, 0.75*INCH2MM 
 hole_list = []
 
 params = {
         'inner_dimensions'                 : (x,y,z), 
-        'wall_thickness'                   : 1.5, 
-        'lid_radius'                       : 3.0,  
-        'top_x_overhang'                   : 3.0,
-        'top_y_overhang'                   : 3.0,
-        'bottom_x_overhang'                : 3.0,
+        'wall_thickness'                   : 3.0, 
+        'lid_radius'                       : 1.5,  
+        'top_x_overhang'                   : 1.0,
+        'top_y_overhang'                   : 1.0,
+        'bottom_x_overhang'                : 8.0,
         'bottom_y_overhang'                : 3.0, 
         'lid2front_tabs'                   : (0.25,0.75),
         'lid2side_tabs'                    : (0.25, 0.75),
         'lid2front_tab_width'              : 7.0,
         'lid2side_tab_width'               : 7.0, 
         'side2side_tab_width'              : 7.0,
-        'standoff_diameter'                : 0.25*INCH2MM,
+        'standoff_diameter'                : 0.1895*INCH2MM,
         'standoff_offset'                  : 0.05*INCH2MM,
-        'standoff_hole_diameter'           : 0.116*INCH2MM, 
+        'standoff_hole_diameter'           : 0.089*INCH2MM, 
+        'capillary_diam'                   : 1.0,
         'capillary_hole_diam'              : 0.85,  
-        'capillary_hole_offset'            : (0.25,3.32),
-        'capillary_length'                 : 125.0,
+        'capillary_hole_offset'            : (0.25,0),
+        'capillary_length'                 : 5*INCH2MM,
         'rubber_band_notch_width'          : 2.0, 
         'led_plate_xy'                     : (x-3.0,y-17.0),
         'led_slot_xy'                      : (3.02,1.5), 
         'led_standoff_length'              : (1.0/4.0)*INCH2MM,
         'led_num'                          : 10, 
         'led_cable_hole_width'             : 3.0,
-        'sensor_length'                    : 48.0,
+        'sensor_width'                     : 12.95,
+        'sensor_length'                    : 61.33,
         'diffuser_standoff_length'         : (1.0/4.0)*INCH2MM,
         'diffuser_standoff_diam'           : 0.25*INCH2MM,
         'diffuser_plate_xy'                : (x-3.0,y-17.0),
         'capillary_clamp_standoff_length'  : (5.0/32.0)*INCH2MM,
         'capillary_clamp_plate_dimensions' : (6.35,28.35,1.5),
         'hole_list'                        : hole_list,
+        'guide_plate_dimensions'           : (x-0.2, 0.5*INCH2MM, 0.0625*INCH2MM),
         }
 
 
         show_back=True,
         show_left=True,
         show_right=True,
-        show_led_plate=True,
-        show_diffuser_plate=True,
+        show_led_plate=False,
+        show_diffuser_plate=False,
         show_standoffs=True,
-        show_led_standoffs=True,
-        show_diffuser_standoffs=True,
-        show_capillary=False,
+        show_led_standoffs=False,
+        show_diffuser_standoffs=False,
+        show_capillary=True,
         show_sensor=True,
-        show_clamp_plates=True,
-        show_clamp_standoffs=True,
-        explode=(8,8,8),
+        show_clamp_plates=False,
+        show_clamp_standoffs=False,
+        show_guide_plate=True,
+        explode=(0,0,0),
         )