コード例 #1
0
ファイル: build.py プロジェクト: greyltc/mechanical
    def make_tower_plate(self):
        towers = CQ().add(self.cu_base).toPending().extrude(self.cu_base_t)
        towers = towers.faces("<Z[-2]").workplane().add(
            self.cu_towers).translate(
                (0, 0, self.cu_base_t)).toPending().extrude(self.cu_tower_h)
        towers = towers.faces("<Z[-2]").workplane().add(
            self.cu_nubs).translate(
                (0, 0, self.cu_base_t)).toPending().extrude(self.cu_nub_h)
        towers = towers.add(self.plate_mounts).toPending().cutThruAll()
        towers = towers.add(self.cu_dowel_pf).toPending().cutThruAll()

        towers = towers.translate(
            (0, 0,
             -self.cu_base_t - self.pcb_thickness / 2 - self.pcb_spacer_h))
        return (towers)
コード例 #2
0
ファイル: build.py プロジェクト: greyltc/mechanical
 def make_pusher_plate(self):
     pusher = CQ().add(self.pusher_plate).toPending().extrude(self.pusher_t)
     pusher = pusher.add(self.plate_mounts).toPending().cutThruAll()
     pusher = pusher.translate(
         (0, 0,
          self.pcb_thickness / 2 + self.slots_t + self.silicone_working_t))
     return pusher
コード例 #3
0
ファイル: build.py プロジェクト: greyltc/mechanical
 def make_reservation(self, do_ventscrews: bool = False):
     if do_ventscrews:
         vss = self.get_ventscrews_a()
     sr = CQ().box(self.reserve_xy,
                   self.reserve_xy,
                   self.reserve_h,
                   centered=(True, True, False))
     sr = sr.translate(
         (0, 0, -self.pcb_thickness - self.pcb_spacer_h - self.cu_base_t))
     wires = CQ().box(self.wire_slot_depth,
                      2.54 * 20,
                      2.54 * 2,
                      centered=(False, True, False)).translate(
                          (-self.reserve_xy / 2, 0,
                           self.wire_slot_z + self.pcb_thickness / 2))
     wiresA = wires.translate((0, self.wire_slot_offset, 0))
     wiresB = wires.translate((0, -self.wire_slot_offset, 0))
     sr = sr.cut(wiresA).cut(wiresB)
     if do_ventscrews:
         sr = sr.add(vss)
     # these next two lines are very expensive (and optional)!
     sr = sr.add(self.get_pcb())
     #sr = CQ().union(sr)
     return sr
コード例 #4
0
ファイル: build.py プロジェクト: greyltc/mechanical
 def make_slot_plate(self):
     slots = CQ().add(self.slot_plate).toPending().extrude(self.slots_t)
     slots = slots.add(self.plate_mounts).toPending().cutThruAll()
     slots = slots.translate((0, 0, self.pcb_thickness / 2))
     return (slots)