diff --git a/python/pcb.py b/python/pcb.py index 01762a2f465d6d70f1f77c07ae575a9552db4356..6e9b74396a54281da741630d5f1c207afed19c0b 100755 --- a/python/pcb.py +++ b/python/pcb.py @@ -31,7 +31,7 @@ output = "top, labels, holes, and exterior" #output = "bottom traces reversed and exterior" #output = "holes" #output = "interior" -#output = "holes and interior" +output = "holes and interior" #output = "exterior" #output = "solder mask" @@ -1176,10 +1176,46 @@ class choke(part): # connectors # -class header_SWD_4(part): +class header_SWD_4_05(part): # # 4-pin header - # fci 95278-101a04lf bergstik 2x2x0.1" + # Sullins GRPB022VWQS-RC 2x2x0.05" + # + def __init__(self,value=''): + pad_header = cube(-.043,.043,-.015,.015,0,0) + self.value = value + self.pad = [point(0,0,0)] + self.labels = [] + # + # pin 1 + # + self.shape = translate(pad_header,-.072,.025,0) + self.shape = add(self.shape,cylinder(-.116,.025,0,0,.015)) + self.pad.append(point(-.072,.025,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'CLK')) + # + # pin 2 + # + self.shape = add(self.shape,translate(pad_header,.072,.025,0)) + self.pad.append(point(.072,.025,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'DIO')) + # + # pin 3 + # + self.shape = add(self.shape,translate(pad_header,-.072,-.025,0)) + self.pad.append(point(-.072,-.025,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'RST')) + # + # pin 4 + # + self.shape = add(self.shape,translate(pad_header,.072,-.025,0)) + self.pad.append(point(.072,-.025,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'GND')) + +class header_SWD_4_1(part): + # + # 4-pin header + # FCI 95278-101a04lf Bergstik 2x2x0.1" # pad_header = cube(-.05,.05,-.025,.025,0,0) def __init__(self,value=''): @@ -6520,6 +6556,7 @@ class fab(part): self.shape = add(self.shape,circle(l,0,r)) self.shape = add(self.shape,circle(-l,0,r)) + # # define board #