From ffbcc42700ad3086912562b4cdf17c0952171e1e Mon Sep 17 00:00:00 2001
From: Neil Gershenfeld <gersh@cba.mit.edu>
Date: Mon, 23 Jan 2023 21:38:23 +0100
Subject: [PATCH] wip

---
 python/pcb.py | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/python/pcb.py b/python/pcb.py
index ceb4575..334398b 100755
--- a/python/pcb.py
+++ b/python/pcb.py
@@ -1228,6 +1228,56 @@ class choke(part):
 # connectors
 ############################################################
 
+class FFC_4x1(part):
+   #
+   # 4 x 1mm flat flex connector
+   #    GCT 2073-FFC3B11-04-TCT-ND
+   #
+   def __init__(self,value=''):
+      self.value = value
+      self.pad = [point(0,0,0)]
+      self.labels = []
+      w = 0.6/25.4/2 # pad half width
+      h = 1.7/25.4/2 # pad half height
+      p = 1/25.4 # pad pitch
+      y = (3.55-1.35/2)/25.4 # pad y
+      l = 0.006 # text
+      pad = cube(-w,w,-h,h,0,0)
+      aw = 2.5/25.4/2 # anchor half width
+      ah = 2.8/25.4/2 # anchor half height
+      ax = p*(3/2)+2.75/25.4 # anchor x
+      ay = ((1.7/2)-1.9-2.8/2)/25.4 # anchor y
+      anchor = cube(-aw,aw,-ah,ah,0,0)
+      #
+      # pin 1
+      #
+      self.shape = translate(pad,-p*3/2,0,0)
+      self.pad.append(point(-p*3/2,0,0))
+      self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'1'))
+      #
+      # pin 2
+      #
+      self.shape = add(self.shape,translate(pad,-p*1/2,0,0))
+      self.pad.append(point(-p*1/2,0,0))
+      self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'2'))
+      #
+      # pin 3
+      #
+      self.shape = add(self.shape,translate(pad,p*1/2,0,0))
+      self.pad.append(point(p*1/2,0,0))
+      self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'3'))
+      #
+      # pin 4
+      #
+      self.shape = add(self.shape,translate(pad,p*3/2,0,0))
+      self.pad.append(point(p*3/2,0,0))
+      self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'4'))
+      #
+      # anchors
+      #
+      self.shape = add(self.shape,translate(anchor,-ax,ay,0))
+      self.shape = add(self.shape,translate(anchor,ax,ay,0))
+
 class header_IMU_3463_hole(part):
    #
    # Adafruit 3463 IMU breakout through-hole
-- 
GitLab