def part(m): m = pscad.wrapper(defaults.items() + m.items()) pin1 = pscad.donut(D("1.83"), D("2.43")) pin23 = pscad.donut(D("1.59"), D("2.19")) pins = pscad.up(D("14.4") / 2 - D("10.7")) + ( pscad.left(D("4.7")) + pscad.pin("3", m.clearance, m.mask) + pin23, pscad.up(3) + pscad.pin("2", m.clearance, m.mask) + pin23, pscad.down(3) + pscad.pin("1", m.clearance, m.mask) + pin1, ) all = ( pins, pscad.silk(m.silk) + pscad.up(D("14.4") / 2) + pscad.left(D("9.0") / 2) + pscad.polygon([ (0, 0), (0, D("10.7") - D("2.19") - D("0.2")), (0, D("10.7") + D("2.19") + D("0.2")), (0, D("14.4")), (D("4.5") - D("2.43") - D("0.2"), D("14.4")), (D("4.5") + D("2.43") + D("0.2"), D("14.4")), (D("9.0"), D("14.4")), (D("9.0"), 0)], [ (0, 1), (2, 3), (3, 4), (5, 6), (6, 7), (7, 0)]) ) silk = pscad.silk(m.silk) + ( patterns.placement_courtyard(all, m.placement, m.grid, 1), ) return all, silk
def part(m): m = pscad.wrapper(defaults.items() + m.items()) pad_row = pscad.rotate(180) + pscad.row(pscad.rounded_square( (D("0.5"), D("2.0")), m.round_off, center=True), D("0.8"), 5, center=True) gnd_row = pscad.row(pscad.donut(I("0.034"), I("0.045")), D("5.3"), 2) side = ( pscad.pin("G", m.clearance, m.mask, square=True) + ( pscad.left(D("3.6")) + pscad.up(2) + pscad.rotate(-90) + gnd_row, ), pscad.hole(m.clearance, 0) + ( pscad.left(D("1.7")) + pscad.down(D("1.3")) + pscad.circle(I("0.018")) ), pscad.silk(m.silk) + ( pscad.left(D("3.6")) + pscad.up(D("4.6")) + pscad.polygon([(0, 0), (0, D("1.3")), (0, D("3.9")), (0, D("6.6"))], [(0, 1), (2, 3)]) ) ) all = ( pscad.pad(itertools.count(1), m.clearance, m.mask) + ( pscad.down(D("3.5")) + pad_row ), side + pscad.mirror([1, 0]) + side, pscad.silk(m.silk) + ( pscad.up(D("4.6")) + pscad.line(D("7.2"), center=True), ) ) silk = pscad.silk(m.silk) + ( patterns.placement_courtyard(all, m.placement, m.grid, 1), ) return all, silk