From 20528661c45fc84d6aa5a19a080e9bc7b12b5d35 Mon Sep 17 00:00:00 2001 From: Neil Gershenfeld <gersh@cba.mit.edu> Date: Sat, 22 Jan 2022 21:26:26 -0500 Subject: [PATCH] wip --- python/pcb.py | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/python/pcb.py b/python/pcb.py index 3a8be09..98f908b 100755 --- a/python/pcb.py +++ b/python/pcb.py @@ -1227,6 +1227,58 @@ class choke(part): # connectors ############################################################ +class micro_USB(part): + # + # micro USB + # AMP/FCI 10118194-0001LF + # + def __init__(self,value=''): + w = 0.0049 # pad half width + h = .55/25.4/2 # pad half height + p = .65/25.4 # pad pitch + l = 0.006 # text + pad_header = cube(-w,w,-h,h,0,0) + self.value = value + self.pad = [point(0,0,0)] + self.labels = [] + # + # pin 1 + # + self.shape = translate(pad_header,-2*p,0,0) + self.pad.append(point(-2*p,0,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'V',line=l)) + # + # pin 2 + # + self.shape = add(self.shape,translate(pad_header,-p,0,0)) + self.pad.append(point(-p,0,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'-',line=l)) + # + # pin 3 + # + self.shape = add(self.shape,translate(pad_header,0,0,0)) + self.pad.append(point(0,0,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'+',line=l)) + # + # pin 4 + # + self.shape = add(self.shape,translate(pad_header,p,0,0)) + self.pad.append(point(p,0,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'I',line=l)) + # + # pin 5 + # + self.shape = add(self.shape,translate(pad_header,2*p,0,0)) + self.pad.append(point(2*p,0,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'G',line=l)) + # + # holes + # + self.holes = cylinder(2.5/25.4,0,zb,zt,0.016) + self.holes = add(self.holes,cylinder(-2.5/25.4,0,zb,zt,0.016)) + self.holes = add(self.holes,cylinder(-3.5/25.4,-2.7/25.4,zb,zt,.9/25.4/2)) + self.holes = add(self.holes,cylinder(3.5/25.4,-2.7/25.4,zb,zt,.9/25.4/2)) + class header_IMU_2738(part): # # Pololu 2736 MinIMU-9 v5 IMU -- GitLab