Add crystal footprint
authorDan White <dan@whiteaudio.com>
Mon, 12 Mar 2012 18:31:02 +0000 (13:31 -0500)
committerDan White <dan@whiteaudio.com>
Mon, 12 Mar 2012 18:31:02 +0000 (13:31 -0500)
sch-pcb/fp/SMD_CRYSTAL_TXC-7M-series.footprinter [new file with mode: 0755]
sch-pcb/fp/SMD_CRYSTAL_TXC-7M-series.fp [new file with mode: 0644]

diff --git a/sch-pcb/fp/SMD_CRYSTAL_TXC-7M-series.footprinter b/sch-pcb/fp/SMD_CRYSTAL_TXC-7M-series.footprinter
new file mode 100755 (executable)
index 0000000..7a9fda6
--- /dev/null
@@ -0,0 +1,100 @@
+#!/usr/bin/env python
+# -*- coding: ASCII -*-
+'''TXC crystal
+7M series
+from: http://www.txccrystal.com/images/pdf/7m-accuracy.pdf
+'''
+import sys
+from footprinter import *
+               
+#
+# PCB fab minimums
+# 
+MASK_SWELL = mil(6.0)
+MIN_TRACE = mil(6.0)
+MIN_SPACE = mil(6.0)
+MIN_PAD_ANNULUS = mil(15.0)
+MIN_VIA_ANNULUS = mil(10.0)
+
+# pcb's coordinates are graphics oriented
+# x in increasing right
+# y in increasing DOWN
+
+SILK_LINEWIDTH = mil(8.0)
+
+
+padw = mm(1.4)
+padl = mm(2.2)
+toe = mm(1.0)
+hgap = mm(5.08)
+vgap = mm(4.40)
+bodyl = mm(12.0)
+bodyw = mm(5.7)
+
+
+p1 = Pad(1,
+        [
+            -(mm(0.4+1.4+0.2)),
+            (mm(0.25)),
+            -(mm(0.4)),
+            (mm(0.25+1.2)),
+        ],
+        MIN_SPACE, MASK_SWELL, name='1', sflags='square'
+    )
+
+p2 = Pad(2,
+        [
+            (mm(0.4)),
+            (mm(0.25)),
+            (mm(0.4+1.4+0.2)),
+            (mm(0.25+1.2)),
+        ],
+        MIN_SPACE, MASK_SWELL, name='2', sflags='square'
+    )
+
+p4 = Pad(4,
+        [
+            -(mm(0.4+1.4+0.2)),
+            -(mm(0.25+1.2)),
+            -(mm(0.4)),
+            -(mm(0.25)),
+        ],
+        MIN_SPACE, MASK_SWELL, name='4', sflags='square'
+    )
+
+p3 = Pad(3,
+        [
+            (mm(0.4)),
+            -(mm(0.25+1.2)),
+            (mm(0.4+1.4+0.2)),
+            -(mm(0.25)),
+        ],
+        MIN_SPACE, MASK_SWELL, name='3', sflags='square'
+    )
+
+
+pads = [p1, p2, p3, p4]
+
+# silkscreen
+lines = []
+lines.append(ElementLine(
+    -(mm(0.4+1.4 + 0.2) + MIN_SPACE + SILK_LINEWIDTH/2),
+    mm(0.25+1.2),
+    -(mm(0.4+1.4 + 0.2) + MIN_SPACE + SILK_LINEWIDTH/2),
+    -mm(0.25+1.2),
+    SILK_LINEWIDTH))
+
+
+fp = Footprint(
+        padpins=pads,
+        linearcs=lines,
+        sflags='',
+        description=sys.argv[0].split('.')[0]+'.fp'
+        )
+
+fp.mx = 0
+fp.my = 0
+fp.tx = 0
+fp.ty = 0
+fp.write(sys.stdout)
+
diff --git a/sch-pcb/fp/SMD_CRYSTAL_TXC-7M-series.fp b/sch-pcb/fp/SMD_CRYSTAL_TXC-7M-series.fp
new file mode 100644 (file)
index 0000000..8205c10
--- /dev/null
@@ -0,0 +1,8 @@
+Element ["" "SMD_CRYSTAL_TXC-7M-series.fp" "" "" 0nm 0nm 0nm 0nm 0 100 ""]
+(
+Pad [-1399999nm 850000nm -1000000nm 850000nm 1200000nm 152400nm 1504800nm "1" "1" "square"]
+Pad [1000000nm 850000nm 1399999nm 850000nm 1200000nm 152400nm 1504800nm "2" "2" "square"]
+Pad [1000000nm -850000nm 1399999nm -850000nm 1200000nm 152400nm 1504800nm "3" "3" "square"]
+Pad [-1399999nm -850000nm -1000000nm -850000nm 1200000nm 152400nm 1504800nm "4" "4" "square"]
+ElementLine [-2253999nm 1450000nm -2253999nm -1450000nm 203200nm]
+)