diff --git a/KicadModTree/KicadFileHandler.py b/KicadModTree/KicadFileHandler.py
index a4104d99a..3ca86df95 100644
--- a/KicadModTree/KicadFileHandler.py
+++ b/KicadModTree/KicadFileHandler.py
@@ -204,8 +204,8 @@ def _serialize_Circle(self, node):
return sexpr
def _serialize_LinePoints(self, node):
- start_pos = node.getRealPosition(node.start_pos)
- end_pos = node.getRealPosition(node.end_pos)
+ start_pos = node.getRealPosition(node.start_pos, 0)[0]
+ end_pos = node.getRealPosition(node.end_pos, 0)[0]
return [
['start', start_pos.x, start_pos.y],
['end', end_pos.x, end_pos.y]
diff --git a/scripts/Connector/Connector_Samtec/BasicBladeAndBeam_Vertical.json b/scripts/Connector/Connector_Samtec/BasicBladeAndBeam_Vertical.json
new file mode 100644
index 000000000..e004273d4
--- /dev/null
+++ b/scripts/Connector/Connector_Samtec/BasicBladeAndBeam_Vertical.json
@@ -0,0 +1,401 @@
+{
+ "Samtec_BTH-030-xx-x-D_2x30_P0.5mm_Vertical": {
+ "library": "Connector_Samtec_BasicBladeAndBeam",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.2f}mm Basic Blade & Beam {type:s}; {pins:d} pins; generated with kicad-footprint-generator",
+ "datasheet": "http://suddendocs.samtec.com/catalog_english/bth.pdf",
+ "tags": "connector Samtec BTH mezzanine terminal vertical"
+ },
+ "layout": {"type": "Terminal", "width": 20.0, "height": 5.97},
+ "banks": {"n": 1, "diff": 0, "space": 0, "width": 16.888, "height": 3.94},
+ "pads": {
+ "signal": {"n": 60, "pitch": 0.5, "width": 0.305, "height": 1.45, "y": 3.086}
+ }
+ },
+ "Samtec_BTH-030-xx-x-D-A_2x30_P0.5mm_Vertical": {
+ "inherit": "Samtec_BTH-030-xx-x-D_2x30_P0.5mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 18.475, "y": -2.032}]
+ },
+ "Samtec_BTH-050-xx-x-D_2x50_P0.5mm_Vertical": {
+ "inherit": "Samtec_BTH-030-xx-x-D_2x30_P0.5mm_Vertical",
+ "layout": {"width": 30.0},
+ "banks": {"width": 26.888},
+ "pads": {"signal": {"n": 100}}
+ },
+ "Samtec_BTH-050-xx-x-D-A_2x50_P0.5mm_Vertical": {
+ "inherit": "Samtec_BTH-050-xx-x-D_2x50_P0.5mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 28.475, "y": -2.032}]
+ },
+ "Samtec_BTH-060-xx-x-D_2x60_P0.5mm_Vertical": {
+ "inherit": "Samtec_BTH-030-xx-x-D_2x30_P0.5mm_Vertical",
+ "layout": {"width": 35.0},
+ "banks": {"width": 31.888},
+ "pads": {"signal": {"n": 120}}
+ },
+ "Samtec_BTH-060-xx-x-D-A_2x60_P0.5mm_Vertical": {
+ "inherit": "Samtec_BTH-060-xx-x-D_2x60_P0.5mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 33.475, "y": -2.032}]
+ },
+ "Samtec_BTH-090-xx-x-D_2x90_P0.5mm_Vertical": {
+ "inherit": "Samtec_BTH-030-xx-x-D_2x30_P0.5mm_Vertical",
+ "layout": {"width": 50.0},
+ "banks": {"width": 46.888},
+ "pads": {"signal": {"n": 180}}
+ },
+ "Samtec_BTH-090-xx-x-D-A_2x90_P0.5mm_Vertical": {
+ "inherit": "Samtec_BTH-090-xx-x-D_2x90_P0.5mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 48.475, "y": -2.032}]
+ },
+ "Samtec_BTH-120-xx-x-D_2x120_P0.5mm_Vertical": {
+ "inherit": "Samtec_BTH-030-xx-x-D_2x30_P0.5mm_Vertical",
+ "layout": {"width": 65.0},
+ "banks": {"width": 61.888},
+ "pads": {"signal": {"n": 240}}
+ },
+ "Samtec_BTH-120-xx-x-D-A_2x120_P0.5mm_Vertical": {
+ "inherit": "Samtec_BTH-120-xx-x-D_2x120_P0.5mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 63.475, "y": -2.032}]
+ },
+ "Samtec_BTH-150-xx-x-D_2x150_P0.5mm_Vertical": {
+ "inherit": "Samtec_BTH-030-xx-x-D_2x30_P0.5mm_Vertical",
+ "layout": {"width": 80.0},
+ "banks": {"width": 76.888},
+ "pads": {"signal": {"n": 300}}
+ },
+ "Samtec_BTH-150-xx-x-D-A_2x150_P0.5mm_Vertical": {
+ "inherit": "Samtec_BTH-150-xx-x-D_2x150_P0.5mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 78.475, "y": -2.032}]
+ },
+
+ "Samtec_BSH-030-xx-x-D_2x30_P0.5mm_Vertical": {
+ "library": "Connector_Samtec_BasicBladeAndBeam",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.2f}mm Basic Blade & Beam {type:s}; {pins:d} pins; generated with kicad-footprint-generator",
+ "datasheet": "http://suddendocs.samtec.com/catalog_english/bsh.pdf",
+ "tags": "connector Samtec BSH mezzanine socket vertical"
+ },
+ "layout": {"type": "Socket", "width": 21.27, "height": 7.24},
+ "banks": {"n": 1, "diff": 0, "space": 0, "width": 16.6, "height": 3.81},
+ "pads": {
+ "signal": {"n": 60, "pitch": 0.5, "width": 0.279, "height": 2.273, "y": 2.865}
+ }
+ },
+ "Samtec_BSH-030-xx-x-D-A_2x30_P0.5mm_Vertical": {
+ "inherit": "Samtec_BSH-030-xx-x-D_2x30_P0.5mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 20.126, "y": 2.67}]
+ },
+ "Samtec_BSH-050-xx-x-D_2x50_P0.5mm_Vertical": {
+ "inherit": "Samtec_BSH-030-xx-x-D_2x30_P0.5mm_Vertical",
+ "layout": {"width": 31.27},
+ "banks": {"width": 26.6},
+ "pads": {"signal": {"n": 100}}
+ },
+ "Samtec_BSH-050-xx-x-D-A_2x50_P0.5mm_Vertical": {
+ "inherit": "Samtec_BSH-050-xx-x-D_2x50_P0.5mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 30.126, "y": 2.67}]
+ },
+ "Samtec_BSH-060-xx-x-D_2x60_P0.5mm_Vertical": {
+ "inherit": "Samtec_BSH-030-xx-x-D_2x30_P0.5mm_Vertical",
+ "layout": {"width": 36.27},
+ "banks": {"width": 31.6},
+ "pads": {"signal": {"n": 120}}
+ },
+ "Samtec_BSH-060-xx-x-D-A_2x60_P0.5mm_Vertical": {
+ "inherit": "Samtec_BSH-060-xx-x-D_2x60_P0.5mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 35.126, "y": 2.67}]
+ },
+ "Samtec_BSH-090-xx-x-D_2x90_P0.5mm_Vertical": {
+ "inherit": "Samtec_BSH-030-xx-x-D_2x30_P0.5mm_Vertical",
+ "layout": {"width": 51.27},
+ "banks": {"width": 46.6},
+ "pads": {"signal": {"n": 180}}
+ },
+ "Samtec_BSH-090-xx-x-D-A_2x90_P0.5mm_Vertical": {
+ "inherit": "Samtec_BSH-090-xx-x-D_2x90_P0.5mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 50.126, "y": 2.67}]
+ },
+ "Samtec_BSH-120-xx-x-D_2x120_P0.5mm_Vertical": {
+ "inherit": "Samtec_BSH-030-xx-x-D_2x30_P0.5mm_Vertical",
+ "layout": {"width": 66.27},
+ "banks": {"width": 61.6},
+ "pads": {"signal": {"n": 240}}
+ },
+ "Samtec_BSH-120-xx-x-D-A_2x120_P0.5mm_Vertical": {
+ "inherit": "Samtec_BSH-120-xx-x-D_2x120_P0.5mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 65.126, "y": 2.67}]
+ },
+ "Samtec_BSH-150-xx-x-D_2x150_P0.5mm_Vertical": {
+ "inherit": "Samtec_BSH-030-xx-x-D_2x30_P0.5mm_Vertical",
+ "layout": {"width": 81.27},
+ "banks": {"width": 76.6},
+ "pads": {"signal": {"n": 300}}
+ },
+ "Samtec_BSH-150-xx-x-D-A_2x150_P0.5mm_Vertical": {
+ "inherit": "Samtec_BSH-150-xx-x-D_2x150_P0.5mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 80.126, "y": 2.67}]
+ },
+
+ "Samtec_BTS-025-xx-x-D_2x25_P0.635mm_Vertical": {
+ "library": "Connector_Samtec_BasicBladeAndBeam",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.3f}mm Basic Blade & Beam {type:s}; {pins:d} pins; generated with kicad-footprint-generator",
+ "datasheet": "http://suddendocs.samtec.com/catalog_english/bts.pdf",
+ "tags": "connector Samtec BTS mezzanine terminal vertical"
+ },
+ "layout": {"type": "Terminal", "width": 20.0, "height": 5.97},
+ "banks": {"n": 1, "diff": 0, "space": 0, "width": 16.895, "height": 3.94},
+ "pads": {
+ "signal": {"n": 50, "pitch": 0.635, "width": 0.432, "height": 1.45, "y": 3.086}
+ }
+ },
+ "Samtec_BTS-025-xx-x-D-A_2x25_P0.635mm_Vertical": {
+ "inherit": "Samtec_BTS-025-xx-x-D_2x25_P0.635mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 18.48, "y": -2.032}]
+ },
+ "Samtec_BTS-050-xx-x-D_2x50_P0.635mm_Vertical": {
+ "inherit": "Samtec_BTS-025-xx-x-D_2x25_P0.635mm_Vertical",
+ "layout": {"width": 35.88},
+ "banks": {"width": 32.77},
+ "pads": {"signal": {"n": 100}}
+ },
+ "Samtec_BTS-050-xx-x-D-A_2x50_P0.635mm_Vertical": {
+ "inherit": "Samtec_BTS-050-xx-x-D_2x50_P0.635mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 34.35, "y": -2.032}]
+ },
+ "Samtec_BTS-075-xx-x-D_2x75_P0.635mm_Vertical": {
+ "inherit": "Samtec_BTS-025-xx-x-D_2x25_P0.635mm_Vertical",
+ "layout": {"width": 51.76},
+ "banks": {"width": 48.65},
+ "pads": {"signal": {"n": 150}}
+ },
+ "Samtec_BTS-075-xx-x-D-A_2x75_P0.635mm_Vertical": {
+ "inherit": "Samtec_BTS-075-xx-x-D_2x75_P0.635mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 50.23, "y": -2.032}]
+ },
+ "Samtec_BTS-100-xx-x-D_2x100_P0.635mm_Vertical": {
+ "inherit": "Samtec_BTS-025-xx-x-D_2x25_P0.635mm_Vertical",
+ "layout": {"width": 67.63},
+ "banks": {"width": 64.52},
+ "pads": {"signal": {"n": 200}}
+ },
+ "Samtec_BTS-100-xx-x-D-A_2x100_P0.635mm_Vertical": {
+ "inherit": "Samtec_BTS-100-xx-x-D_2x100_P0.635mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 66.10, "y": -2.032}]
+ },
+
+ "Samtec_BSS-025-xx-x-D_2x25_P0.635mm_Vertical": {
+ "library": "Connector_Samtec_BasicBladeAndBeam",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.3f}mm Basic Blade & Beam {type:s}; {pins:d} pins; generated with kicad-footprint-generator",
+ "datasheet": "http://suddendocs.samtec.com/catalog_english/bss.pdf",
+ "tags": "connector Samtec BSS mezzanine socket vertical"
+ },
+ "layout": {"type": "Socket", "width": 21.27, "height": 7.24},
+ "banks": {"n": 1, "diff": 0, "space": 0, "width": 16.64, "height": 3.81},
+ "pads": {
+ "signal": {"n": 50, "pitch": 0.635, "width": 0.406, "height": 2.273, "y": 2.865}
+ }
+ },
+ "Samtec_BSS-025-xx-x-D-A_2x25_P0.635mm_Vertical": {
+ "inherit": "Samtec_BSS-025-xx-x-D_2x25_P0.635mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 20.00, "y": 2.67}]
+ },
+ "Samtec_BSS-050-xx-x-D_2x50_P0.635mm_Vertical": {
+ "inherit": "Samtec_BSS-025-xx-x-D_2x25_P0.635mm_Vertical",
+ "layout": {"width": 37.15},
+ "banks": {"width": 32.52},
+ "pads": {"signal": {"n": 100}}
+ },
+ "Samtec_BSS-050-xx-x-D-A_2x50_P0.635mm_Vertical": {
+ "inherit": "Samtec_BSS-050-xx-x-D_2x50_P0.635mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 35.88, "y": 2.67}]
+ },
+ "Samtec_BSS-075-xx-x-D_2x75_P0.635mm_Vertical": {
+ "inherit": "Samtec_BSS-025-xx-x-D_2x25_P0.635mm_Vertical",
+ "layout": {"width": 53.02},
+ "banks": {"width": 48.39},
+ "pads": {"signal": {"n": 150}}
+ },
+ "Samtec_BSS-075-xx-x-D-A_2x75_P0.635mm_Vertical": {
+ "inherit": "Samtec_BSS-075-xx-x-D_2x75_P0.635mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 51.75, "y": 2.67}]
+ },
+ "Samtec_BSS-100-xx-x-D_2x100_P0.635mm_Vertical": {
+ "inherit": "Samtec_BSS-025-xx-x-D_2x25_P0.635mm_Vertical",
+ "layout": {"width": 68.90},
+ "banks": {"width": 64.27},
+ "pads": {"signal": {"n": 200}}
+ },
+ "Samtec_BSS-100-xx-x-D-A_2x100_P0.635mm_Vertical": {
+ "inherit": "Samtec_BSS-100-xx-x-D_2x100_P0.635mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 67.63, "y": 2.67}]
+ },
+
+ "Samtec_BTE-020-xx-x-D_2x20_P0.8mm_Vertical": {
+ "library": "Connector_Samtec_BasicBladeAndBeam",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.2f}mm Basic Blade & Beam {type:s}; {pins:d} pins; generated with kicad-footprint-generator",
+ "datasheet": "http://suddendocs.samtec.com/catalog_english/bte.pdf",
+ "tags": "connector Samtec BTE mezzanine terminal vertical"
+ },
+ "layout": {"type": "Terminal", "width": 20.0, "height": 5.97},
+ "banks": {"n": 1, "diff": 0, "space": 0, "width": 16.88, "height": 3.94},
+ "pads": {
+ "signal": {"n": 40, "pitch": 0.8, "width": 0.305, "height": 1.45, "y": 3.086}
+ }
+ },
+ "Samtec_BTE-020-xx-x-D-A_2x20_P0.8mm_Vertical": {
+ "inherit": "Samtec_BTE-020-xx-x-D_2x20_P0.8mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 18.48, "y": -2.032}]
+ },
+ "Samtec_BTE-040-xx-x-D_2x40_P0.8mm_Vertical": {
+ "inherit": "Samtec_BTE-020-xx-x-D_2x20_P0.8mm_Vertical",
+ "layout": {"width": 36.0},
+ "banks": {"width": 32.88},
+ "pads": {"signal": {"n": 80}}
+ },
+ "Samtec_BTE-040-xx-x-D-A_2x40_P0.8mm_Vertical": {
+ "inherit": "Samtec_BTE-040-xx-x-D_2x40_P0.8mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 34.48, "y": -2.032}]
+ },
+ "Samtec_BTE-060-xx-x-D_2x60_P0.8mm_Vertical": {
+ "inherit": "Samtec_BTE-020-xx-x-D_2x20_P0.8mm_Vertical",
+ "layout": {"width": 52.0},
+ "banks": {"width": 48.88},
+ "pads": {"signal": {"n": 120}}
+ },
+ "Samtec_BTE-060-xx-x-D-A_2x60_P0.8mm_Vertical": {
+ "inherit": "Samtec_BTE-060-xx-x-D_2x60_P0.8mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 50.48, "y": -2.032}]
+ },
+ "Samtec_BTE-080-xx-x-D_2x80_P0.8mm_Vertical": {
+ "inherit": "Samtec_BTE-020-xx-x-D_2x20_P0.8mm_Vertical",
+ "layout": {"width": 68.0},
+ "banks": {"width": 64.88},
+ "pads": {"signal": {"n": 160}}
+ },
+ "Samtec_BTE-080-xx-x-D-A_2x80_P0.8mm_Vertical": {
+ "inherit": "Samtec_BTE-080-xx-x-D_2x80_P0.8mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 66.48, "y": -2.032}]
+ },
+ "Samtec_BTE-100-xx-x-D_2x100_P0.8mm_Vertical": {
+ "inherit": "Samtec_BTE-020-xx-x-D_2x20_P0.8mm_Vertical",
+ "layout": {"width": 84.0},
+ "banks": {"width": 80.88},
+ "pads": {"signal": {"n": 200}}
+ },
+ "Samtec_BTE-100-xx-x-D-A_2x100_P0.8mm_Vertical": {
+ "inherit": "Samtec_BTE-100-xx-x-D_2x100_P0.8mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 82.48, "y": -2.032}]
+ },
+ "Samtec_BTE-120-xx-x-D_2x120_P0.8mm_Vertical": {
+ "inherit": "Samtec_BTE-020-xx-x-D_2x20_P0.8mm_Vertical",
+ "layout": {"width": 100.0},
+ "banks": {"width": 96.88},
+ "pads": {"signal": {"n": 240}}
+ },
+ "Samtec_BTE-120-xx-x-D-A_2x120_P0.8mm_Vertical": {
+ "inherit": "Samtec_BTE-120-xx-x-D_2x120_P0.8mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 98.48, "y": -2.032}]
+ },
+
+ "Samtec_BSE-020-xx-x-D_2x20_P0.8mm_Vertical": {
+ "library": "Connector_Samtec_BasicBladeAndBeam",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.2f}mm Basic Blade & Beam {type:s}; {pins:d} pins; generated with kicad-footprint-generator",
+ "datasheet": "http://suddendocs.samtec.com/catalog_english/bse.pdf",
+ "tags": "connector Samtec BSE mezzanine socket vertical"
+ },
+ "layout": {"type": "Socket", "width": 21.27, "height": 7.24},
+ "banks": {"n": 1, "diff": 0, "space": 0, "width": 16.64, "height": 3.81},
+ "pads": {
+ "signal": {"n": 40, "pitch": 0.8, "width": 0.41, "height": 2.27, "y": 2.865}
+ }
+ },
+ "Samtec_BSE-020-xx-x-D-A_2x20_P0.8mm_Vertical": {
+ "inherit": "Samtec_BSE-020-xx-x-D_2x20_P0.8mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 20.13, "y": 2.67}]
+ },
+ "Samtec_BSE-040-xx-x-D_2x40_P0.8mm_Vertical": {
+ "inherit": "Samtec_BSE-020-xx-x-D_2x20_P0.8mm_Vertical",
+ "layout": {"width": 37.27},
+ "banks": {"width": 32.64},
+ "pads": {"signal": {"n": 80}}
+ },
+ "Samtec_BSE-040-xx-x-D-A_2x40_P0.8mm_Vertical": {
+ "inherit": "Samtec_BSE-040-xx-x-D_2x40_P0.8mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 36.13, "y": 2.67}]
+ },
+ "Samtec_BSE-060-xx-x-D_2x60_P0.8mm_Vertical": {
+ "inherit": "Samtec_BSE-020-xx-x-D_2x20_P0.8mm_Vertical",
+ "layout": {"width": 53.27},
+ "banks": {"width": 48.64},
+ "pads": {"signal": {"n": 120}}
+ },
+ "Samtec_BSE-060-xx-x-D-A_2x60_P0.8mm_Vertical": {
+ "inherit": "Samtec_BSE-060-xx-x-D_2x60_P0.8mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 52.13, "y": 2.67}]
+ },
+ "Samtec_BSE-080-xx-x-D_2x80_P0.8mm_Vertical": {
+ "inherit": "Samtec_BSE-020-xx-x-D_2x20_P0.8mm_Vertical",
+ "layout": {"width": 69.27},
+ "banks": {"width": 64.64},
+ "pads": {"signal": {"n": 160}}
+ },
+ "Samtec_BSE-080-xx-x-D-A_2x80_P0.8mm_Vertical": {
+ "inherit": "Samtec_BSE-080-xx-x-D_2x80_P0.8mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 68.13, "y": 2.67}]
+ },
+ "Samtec_BSE-100-xx-x-D_2x100_P0.8mm_Vertical": {
+ "inherit": "Samtec_BSE-020-xx-x-D_2x20_P0.8mm_Vertical",
+ "layout": {"width": 85.27},
+ "banks": {"width": 80.64},
+ "pads": {"signal": {"n": 200}}
+ },
+ "Samtec_BSE-100-xx-x-D-A_2x100_P0.8mm_Vertical": {
+ "inherit": "Samtec_BSE-100-xx-x-D_2x100_P0.8mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 84.13, "y": 2.67}]
+ },
+ "Samtec_BSE-120-xx-x-D_2x120_P0.8mm_Vertical": {
+ "inherit": "Samtec_BSE-020-xx-x-D_2x20_P0.8mm_Vertical",
+ "layout": {"width": 101.27},
+ "banks": {"width": 96.64},
+ "pads": {"signal": {"n": 240}}
+ },
+ "Samtec_BSE-120-xx-x-D-A_2x120_P0.8mm_Vertical": {
+ "inherit": "Samtec_BSE-120-xx-x-D_2x120_P0.8mm_Vertical",
+ "add-tags": "alignment-pins",
+ "holes": [{"drill": 1.0, "space": 100.13, "y": 2.67}]
+ }
+}
diff --git a/scripts/Connector/Connector_Samtec/QStrip_Vertical.json b/scripts/Connector/Connector_Samtec/QStrip_Vertical.json
new file mode 100644
index 000000000..9bf546e67
--- /dev/null
+++ b/scripts/Connector/Connector_Samtec/QStrip_Vertical.json
@@ -0,0 +1,491 @@
+{
+ "Samtec_QTH-030-xx-x-D_P0.5mm_Vertical": {
+ "library": "Connector_Samtec_QStrip",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.2f}mm Q Strip High-Speed Ground Plane {type:s} Strip, {banks:d} bank(s), {pins:d} pins/bank",
+ "datasheet": "http://suddendocs.samtec.com/catalog_english/qth.pdf",
+ "tags": "connector Samtec QStrip QTH mezzanine terminal vertical single-ended"
+ },
+ "layout": {"type": "Terminal", "width": 20.0, "height": 5.97},
+ "banks": {"n": 1, "diff": 0, "width": 16.88, "height": 3.9, "space": 20.0},
+ "pads": {
+ "signal": {"n": 60, "pitch": 0.5, "width": 0.305, "height": 1.45, "y": 3.086},
+ "planes": [
+ {"width": 2.54, "height": 0.635, "x": -8.445, "y": 0},
+ {"width": 2.54, "height": 0.635, "x": 8.445, "y": 0},
+ {"width": 4.70, "height": 0.635, "x": -3.175, "y": 0},
+ {"width": 4.70, "height": 0.635, "x": 3.175, "y": 0}
+ ]
+ }
+ },
+ "Samtec_QTH-030-xx-x-D-A_P0.5mm_Vertical": {
+ "inherit": "Samtec_QTH-030-xx-x-D_P0.5mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 18.48, "y": -2.032}]
+ },
+ "Samtec_QTH-060-xx-x-D_P0.5mm_Vertical": {
+ "inherit": "Samtec_QTH-030-xx-x-D_P0.5mm_Vertical",
+ "layout": {"width": 40.0},
+ "banks": {"n": 2}
+ },
+ "Samtec_QTH-060-xx-x-D-A_P0.5mm_Vertical": {
+ "inherit": "Samtec_QTH-060-xx-x-D_P0.5mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 38.48, "y": -2.032}]
+ },
+ "Samtec_QTH-090-xx-x-D_P0.5mm_Vertical": {
+ "inherit": "Samtec_QTH-030-xx-x-D_P0.5mm_Vertical",
+ "layout": {"width": 60.0},
+ "banks": {"n": 3}
+ },
+ "Samtec_QTH-090-xx-x-D-A_P0.5mm_Vertical": {
+ "inherit": "Samtec_QTH-090-xx-x-D_P0.5mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 58.48, "y": -2.032}]
+ },
+ "Samtec_QTH-020-xx-x-D-DP_P0.5mm_Vertical": {
+ "inherit": "Samtec_QTH-030-xx-x-D_P0.5mm_Vertical",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.2f}mm Q Pairs High-Speed Ground Plane {type:s} Strip, Differential Pair, {banks:d} bank(s), {pins:d} pairs/bank",
+ "tags": "connector Samtec QPairs QTH mezzanine terminal vertical differential"
+ },
+ "banks": {"diff": 1}
+ },
+ "Samtec_QTH-020-xx-x-D-DP-A_P0.5mm_Vertical": {
+ "inherit": "Samtec_QTH-020-xx-x-D-DP_P0.5mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 18.48, "y": -2.032}]
+ },
+ "Samtec_QTH-040-xx-x-D-DP_P0.5mm_Vertical": {
+ "inherit": "Samtec_QTH-020-xx-x-D-DP_P0.5mm_Vertical",
+ "layout": {"width": 40.0},
+ "banks": {"n": 2, "diff": 2}
+ },
+ "Samtec_QTH-040-xx-x-D-DP-A_P0.5mm_Vertical": {
+ "inherit": "Samtec_QTH-040-xx-x-D-DP_P0.5mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 38.48, "y": -2.032}]
+ },
+ "Samtec_QTH-060-xx-x-D-DP_P0.5mm_Vertical": {
+ "inherit": "Samtec_QTH-020-xx-x-D-DP_P0.5mm_Vertical",
+ "layout": {"width": 60.0},
+ "banks": {"n": 3, "diff": 3}
+ },
+ "Samtec_QTH-060-xx-x-D-DP-A_P0.5mm_Vertical": {
+ "inherit": "Samtec_QTH-060-xx-x-D-DP_P0.5mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 58.48, "y": -2.032}]
+ },
+ "Samtec_HSMC_ASP-122952-01_P0.5mm_Vertical": {
+ "inherit": "Samtec_QTH-090-xx-x-D-A_P0.5mm_Vertical",
+ "library": "Connector_Samtec",
+ "meta": {
+ "pn": "ASP-122952-01",
+ "description": "Samtec {pn:s} HSMC Card {type:s}, modified QTH-090-01-L-D-A, Bank 1 differential",
+ "datasheet": "http://suddendocs.samtec.com/prints/asp-122952-01-mkt.pdf",
+ "+tags": " QPairs HSMC card differential application-specific"
+ },
+ "banks": {"diff": 1}
+ },
+
+ "Samtec_QSH-030-xx-x-D_P0.5mm_Vertical": {
+ "library": "Connector_Samtec_QStrip",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.2f}mm Q Strip High-Speed Ground Plane {type:s} Strip, {banks:d} bank(s), {pins:d} pins/bank",
+ "datasheet": "http://suddendocs.samtec.com/catalog_english/qsh.pdf",
+ "tags": "connector Samtec QStrip QSH mezzanine socket vertical single-ended"
+ },
+ "layout": {"type": "Socket", "width": 21.27, "height": 7.24},
+ "banks": {"n": 1, "diff": 0, "space": 20.0, "width": 16.64, "height": 3.81},
+ "pads": {
+ "signal": {"n": 60, "pitch": 0.5, "width": 0.279, "height": 2.27, "y": 2.865},
+ "planes": [
+ {"width": 2.54, "height": 0.430, "x": -8.065, "y": 0},
+ {"width": 2.54, "height": 0.430, "x": 8.065, "y": 0},
+ {"width": 4.70, "height": 0.430, "x": -3.175, "y": 0},
+ {"width": 4.70, "height": 0.430, "x": 3.175, "y": 0}
+ ]
+ }
+ },
+ "Samtec_QSH-030-xx-x-D-A_P0.5mm_Vertical": {
+ "inherit": "Samtec_QSH-030-xx-x-D_P0.5mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 20.13, "y": 2.67}]
+ },
+ "Samtec_QSH-060-xx-x-D_P0.5mm_Vertical": {
+ "inherit": "Samtec_QSH-030-xx-x-D_P0.5mm_Vertical",
+ "layout": {"width": 41.27},
+ "banks": {"n": 2}
+ },
+ "Samtec_QSH-060-xx-x-D-A_P0.5mm_Vertical": {
+ "inherit": "Samtec_QSH-060-xx-x-D_P0.5mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 40.13, "y": 2.67}]
+ },
+ "Samtec_QSH-090-xx-x-D_P0.5mm_Vertical": {
+ "inherit": "Samtec_QSH-030-xx-x-D_P0.5mm_Vertical",
+ "layout": {"width": 61.27},
+ "banks": {"n": 3}
+ },
+ "Samtec_QSH-090-xx-x-D-A_P0.5mm_Vertical": {
+ "inherit": "Samtec_QSH-090-xx-x-D_P0.5mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 60.13, "y": 2.67}]
+ },
+ "Samtec_QSH-020-xx-x-D-DP_P0.5mm_Vertical": {
+ "inherit": "Samtec_QSH-030-xx-x-D_P0.5mm_Vertical",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.2f}mm Q Pairs High-Speed Ground Plane {type:s} Strip, Differential Pair, {banks:d} bank(s), {pins:d} pairs/bank",
+ "tags": "connector Samtec QPairs QSH mezzanine socket vertical differential"
+ },
+ "banks": {"diff": 1}
+ },
+ "Samtec_QSH-020-xx-x-D-DP-A_P0.5mm_Vertical": {
+ "inherit": "Samtec_QSH-020-xx-x-D-DP_P0.5mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 20.13, "y": 2.67}]
+ },
+ "Samtec_QSH-040-xx-x-D-DP_P0.5mm_Vertical": {
+ "inherit": "Samtec_QSH-020-xx-x-D-DP_P0.5mm_Vertical",
+ "layout": {"width": 41.27},
+ "banks": {"n": 2, "diff": 2}
+ },
+ "Samtec_QSH-040-xx-x-D-DP-A_P0.5mm_Vertical": {
+ "inherit": "Samtec_QSH-040-xx-x-D-DP_P0.5mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 40.13, "y": 2.67}]
+ },
+ "Samtec_QSH-060-xx-x-D-DP_P0.5mm_Vertical": {
+ "inherit": "Samtec_QSH-020-xx-x-D-DP_P0.5mm_Vertical",
+ "layout": {"width": 61.27},
+ "banks": {"n": 3, "diff": 3}
+ },
+ "Samtec_QSH-060-xx-x-D-DP-A_P0.5mm_Vertical": {
+ "inherit": "Samtec_QSH-060-xx-x-D-DP_P0.5mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 60.13, "y": 2.67}]
+ },
+ "Samtec_HSMC_ASP-122953-01_P0.5mm_Vertical": {
+ "inherit": "Samtec_QSH-090-xx-x-D-A_P0.5mm_Vertical",
+ "library": "Connector_Samtec",
+ "meta": {
+ "pn": "ASP-122953-01",
+ "description": "Samtec {pn:s} HSMC Host {type:s}, modified QSH-090-01-L-D-A, Bank 1 differential",
+ "datasheet": "http://suddendocs.samtec.com/prints/asp-122953-01-mkt.pdf",
+ "+tags": " QPairs HSMC host differential application-specific"
+ },
+ "banks": {"diff": 1}
+ },
+
+ "Samtec_QTS-025-xx-x-D_P0.635mm_Vertical": {
+ "library": "Connector_Samtec_QStrip",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.3f}mm Q Strip High-Speed Ground Plane {type:s} Strip, {banks:d} bank(s), {pins:d} pins/bank",
+ "datasheet": "http://suddendocs.samtec.com/catalog_english/qts.pdf",
+ "tags": "connector Samtec QStrip QTS mezzanine terminal vertical"
+ },
+ "layout": {"type": "Terminal", "width": 20.0, "height": 5.97},
+ "banks": {"n": 1, "diff": 0, "space": 20.0, "width": 16.88, "height": 3.94},
+ "pads": {
+ "signal": {"n": 50, "pitch": 0.635, "width": 0.406, "height": 1.45, "y": 3.086},
+ "planes": [
+ {"width": 2.54, "height": 0.635, "x": -8.445, "y": 0},
+ {"width": 2.54, "height": 0.635, "x": 8.445, "y": 0},
+ {"width": 4.70, "height": 0.635, "x": -3.175, "y": 0},
+ {"width": 4.70, "height": 0.635, "x": 3.175, "y": 0}
+ ]
+ }
+ },
+ "Samtec_QTS-025-xx-x-D-A_P0.635mm_Vertical": {
+ "inherit": "Samtec_QTS-025-xx-x-D_P0.635mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 18.48, "y": -2.032}]
+ },
+ "Samtec_QTS-050-xx-x-D_P0.635mm_Vertical": {
+ "inherit": "Samtec_QTS-025-xx-x-D_P0.635mm_Vertical",
+ "layout": {"width": 40.0},
+ "banks": {"n": 2}
+ },
+ "Samtec_QTS-050-xx-x-D-A_P0.635mm_Vertical": {
+ "inherit": "Samtec_QTS-050-xx-x-D_P0.635mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 38.48, "y": -2.032}]
+ },
+ "Samtec_QTS-075-xx-x-D_P0.635mm_Vertical": {
+ "inherit": "Samtec_QTS-025-xx-x-D_P0.635mm_Vertical",
+ "layout": {"width": 60.0},
+ "banks": {"n": 3}
+ },
+ "Samtec_QTS-075-xx-x-D-A_P0.635mm_Vertical": {
+ "inherit": "Samtec_QTS-075-xx-x-D_P0.635mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 58.48, "y": -2.032}]
+ },
+ "Samtec_QTS-016-xx-x-D-DP_P0.635mm_Vertical": {
+ "inherit": "Samtec_QTS-025-xx-x-D_P0.635mm_Vertical",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.3f}mm Q Pairs High-Speed Ground Plane {type:s} Strip, Differential Pair, {banks:d} bank(s), {pins:d} pairs/bank",
+ "tags": "connector Samtec QPairs QTS mezzanine terminal vertical differential"
+ },
+ "banks": {"diff": 1}
+ },
+ "Samtec_QTS-016-xx-x-D-DP-A_P0.635mm_Vertical": {
+ "inherit": "Samtec_QTS-016-xx-x-D-DP_P0.635mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 18.48, "y": -2.032}]
+ },
+ "Samtec_QTS-032-xx-x-D-DP_P0.635mm_Vertical": {
+ "inherit": "Samtec_QTS-016-xx-x-D-DP_P0.635mm_Vertical",
+ "layout": {"width": 40.0},
+ "banks": {"n": 2, "diff": 2}
+ },
+ "Samtec_QTS-032-xx-x-D-DP-A_P0.635mm_Vertical": {
+ "inherit": "Samtec_QTS-032-xx-x-D-DP_P0.635mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 38.48, "y": -2.032}]
+ },
+ "Samtec_QTS-048-xx-x-D-DP_P0.635mm_Vertical": {
+ "inherit": "Samtec_QTS-016-xx-x-D-DP_P0.635mm_Vertical",
+ "layout": {"width": 60.0},
+ "banks": {"n": 3, "diff": 3}
+ },
+ "Samtec_QTS-048-xx-x-D-DP-A_P0.635mm_Vertical": {
+ "inherit": "Samtec_QTS-048-xx-x-D-DP_P0.635mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 58.48, "y": -2.032}]
+ },
+
+ "Samtec_QSS-025-xx-x-D_P0.635mm_Vertical": {
+ "library": "Connector_Samtec_QStrip",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.3f}mm Q Strip High-Speed Ground Plane {type:s} Strip, {banks:d} bank(s), {pins:d} pins/bank",
+ "datasheet": "http://suddendocs.samtec.com/catalog_english/qss.pdf",
+ "tags": "connector Samtec QStrip QSS mezzanine socket vertical single-ended"
+ },
+ "layout": {"type": "Socket", "width": 21.27, "height": 7.24},
+ "banks": {"n": 1, "diff": 0, "space": 20.0, "width": 16.64, "height": 3.66},
+ "pads": {
+ "signal": {"n": 50, "pitch": 0.635, "width": 0.406, "height": 2.273, "y": 2.865},
+ "planes": [
+ {"width": 2.80, "height": 0.432, "x": -8.065, "y": 0},
+ {"width": 2.80, "height": 0.432, "x": 8.065, "y": 0},
+ {"width": 4.70, "height": 0.432, "x": -3.175, "y": 0},
+ {"width": 4.70, "height": 0.432, "x": 3.175, "y": 0}
+ ]
+ }
+ },
+ "Samtec_QSS-025-xx-x-D-A_P0.635mm_Vertical": {
+ "inherit": "Samtec_QSS-025-xx-x-D_P0.635mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 20.0, "y": 2.67}]
+ },
+ "Samtec_QSS-050-xx-x-D_P0.635mm_Vertical": {
+ "inherit": "Samtec_QSS-025-xx-x-D_P0.635mm_Vertical",
+ "layout": {"width": 41.27},
+ "banks": {"n": 2}
+ },
+ "Samtec_QSS-050-xx-x-D-A_P0.635mm_Vertical": {
+ "inherit": "Samtec_QSS-050-xx-x-D_P0.635mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 40.0, "y": 2.67}]
+ },
+ "Samtec_QSS-075-xx-x-D_P0.635mm_Vertical": {
+ "inherit": "Samtec_QSS-025-xx-x-D_P0.635mm_Vertical",
+ "layout": {"width": 61.27},
+ "banks": {"n": 3}
+ },
+ "Samtec_QSS-075-xx-x-D-A_P0.635mm_Vertical": {
+ "inherit": "Samtec_QSS-075-xx-x-D_P0.635mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 60.0, "y": 2.67}]
+ },
+ "Samtec_QSS-016-xx-x-D-DP_P0.635mm_Vertical": {
+ "inherit": "Samtec_QSS-025-xx-x-D_P0.635mm_Vertical",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.3f}mm Q Pairs High-Speed Ground Plane {type:s} Strip, Differential Pair, {banks:d} bank(s), {pins:d} pairs/bank",
+ "tags": "connector Samtec QPairs QSS mezzanine socket vertical differential"
+ },
+ "banks": {"diff": 1}
+ },
+ "Samtec_QSS-016-xx-x-D-DP-A_P0.635mm_Vertical": {
+ "inherit": "Samtec_QSS-016-xx-x-D-DP_P0.635mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 20.0, "y": 2.67}]
+ },
+ "Samtec_QSS-032-xx-x-D-DP_P0.635mm_Vertical": {
+ "inherit": "Samtec_QSS-016-xx-x-D-DP_P0.635mm_Vertical",
+ "layout": {"width": 41.27},
+ "banks": {"n": 2, "diff": 2}
+ },
+ "Samtec_QSS-032-xx-x-D-DP-A_P0.635mm_Vertical": {
+ "inherit": "Samtec_QSS-032-xx-x-D-DP_P0.635mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 40.0, "y": 2.67}]
+ },
+ "Samtec_QSS-048-xx-x-D-DP_P0.635mm_Vertical": {
+ "inherit": "Samtec_QSS-016-xx-x-D-DP_P0.635mm_Vertical",
+ "layout": {"width": 61.27},
+ "banks": {"n": 3, "diff": 3}
+ },
+ "Samtec_QSS-048-xx-x-D-DP-A_P0.635mm_Vertical": {
+ "inherit": "Samtec_QSS-048-xx-x-D-DP_P0.635mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 60.0, "y": 2.67}]
+ },
+
+ "Samtec_QTE-020-xx-x-D_P0.8mm_Vertical": {
+ "library": "Connector_Samtec_QStrip",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.2f}mm Q Strip High-Speed Ground Plane {type:s} Strip, {banks:d} bank(s), {pins:d} pins/bank",
+ "datasheet": "http://suddendocs.samtec.com/catalog_english/qte.pdf",
+ "tags": "connector Samtec QStrip QTE mezzanine terminal vertical"
+ },
+ "layout": {"type": "Terminal", "width": 20.0, "height": 5.97},
+ "banks": {"n": 1, "diff": 0, "width": 16.88, "height": 3.94, "space": 20.0},
+ "pads": {
+ "signal": {"n": 40, "pitch": 0.8, "width": 0.46, "height": 1.45, "y": 3.086},
+ "planes": [
+ {"width": 2.54, "height": 0.635, "x": -8.445, "y": 0},
+ {"width": 2.54, "height": 0.635, "x": 8.445, "y": 0},
+ {"width": 4.70, "height": 0.635, "x": -3.175, "y": 0},
+ {"width": 4.70, "height": 0.635, "x": 3.175, "y": 0}
+ ]
+ }
+ },
+ "Samtec_QTE-020-xx-x-D-A_P0.8mm_Vertical": {
+ "inherit": "Samtec_QTE-020-xx-x-D_P0.8mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 18.48, "y": -2.032}]
+ },
+ "Samtec_QTE-040-xx-x-D_P0.8mm_Vertical": {
+ "inherit": "Samtec_QTE-020-xx-x-D_P0.8mm_Vertical",
+ "layout": {"width": 40.0},
+ "banks": {"n": 2}
+ },
+ "Samtec_QTE-040-xx-x-D-A_P0.8mm_Vertical": {
+ "inherit": "Samtec_QTE-040-xx-x-D_P0.8mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 38.48, "y": -2.032}]
+ },
+ "Samtec_QTE-060-xx-x-D_P0.8mm_Vertical": {
+ "inherit": "Samtec_QTE-020-xx-x-D_P0.8mm_Vertical",
+ "layout": {"width": 40.0},
+ "banks": {"n": 2}
+ },
+ "Samtec_QTE-060-xx-x-D-A_P0.8mm_Vertical": {
+ "inherit": "Samtec_QTE-060-xx-x-D_P0.8mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 38.48, "y": -2.032}]
+ },
+ "Samtec_QTE-014-xx-x-D-DP_P0.8mm_Vertical": {
+ "inherit": "Samtec_QTE-020-xx-x-D_P0.8mm_Vertical",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.2f}mm Q Pairs High-Speed Ground Plane {type:s} Strip, Differential Pair, {banks:d} bank(s), {pins:d} pairs/bank",
+ "tags": "connector Samtec QPairs QTE mezzanine terminal vertical differential"
+ },
+ "banks": {"diff": 1}
+ },
+ "Samtec_QTE-014-xx-x-D-DP-A_P0.8mm_Vertical": {
+ "inherit": "Samtec_QTE-014-xx-x-D-DP_P0.8mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 18.48, "y": -2.032}]
+ },
+ "Samtec_QTE-028-xx-x-D-DP_P0.8mm_Vertical": {
+ "inherit": "Samtec_QTE-014-xx-x-D-DP_P0.8mm_Vertical",
+ "layout": {"width": 40.0},
+ "banks": {"n": 2, "diff": 2}
+ },
+ "Samtec_QTE-028-xx-x-D-DP-A_P0.8mm_Vertical": {
+ "inherit": "Samtec_QTE-028-xx-x-D-DP_P0.8mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 38.48, "y": -2.032}]
+ },
+ "Samtec_QTE-042-xx-x-D-DP_P0.8mm_Vertical": {
+ "inherit": "Samtec_QTE-014-xx-x-D-DP_P0.8mm_Vertical",
+ "layout": {"width": 60.0},
+ "banks": {"n": 3, "diff": 3}
+ },
+ "Samtec_QTE-042-xx-x-D-DP-A_P0.8mm_Vertical": {
+ "inherit": "Samtec_QTE-042-xx-x-D-DP_P0.8mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 58.48, "y": -2.032}]
+ },
+
+ "Samtec_QSE-020-xx-x-D_P0.8mm_Vertical": {
+ "library": "Connector_Samtec_QStrip",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.2f}mm Q Strip High-Speed Ground Plane {type:s} Strip, {banks:d} bank(s), {pins:d} pins/bank",
+ "datasheet": "http://suddendocs.samtec.com/catalog_english/qse.pdf",
+ "tags": "connector Samtec QStrip QSE mezzanine socket vertical single-ended"
+ },
+ "layout": {"type": "Socket", "width": 21.27, "height": 7.24},
+ "banks": {"n": 1, "diff": 0, "space": 20.0, "width": 16.64, "height": 3.81},
+ "pads": {
+ "signal": {"n": 40, "pitch": 0.8, "width": 0.41, "height": 2.27, "y": 2.865},
+ "planes": [
+ {"width": 2.54, "height": 0.430, "x": -8.065, "y": 0},
+ {"width": 2.54, "height": 0.430, "x": 8.065, "y": 0},
+ {"width": 4.70, "height": 0.430, "x": -3.175, "y": 0},
+ {"width": 4.70, "height": 0.430, "x": 3.175, "y": 0}
+ ]
+ }
+ },
+ "Samtec_QSE-020-xx-x-D-A_P0.8mm_Vertical": {
+ "inherit": "Samtec_QSE-020-xx-x-D_P0.8mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 20.13, "y": 2.67}]
+ },
+ "Samtec_QSE-040-xx-x-D_P0.8mm_Vertical": {
+ "inherit": "Samtec_QSE-020-xx-x-D_P0.8mm_Vertical",
+ "layout": {"width": 41.27},
+ "banks": {"n": 2}
+ },
+ "Samtec_QSE-040-xx-x-D-A_P0.8mm_Vertical": {
+ "inherit": "Samtec_QSE-040-xx-x-D_P0.8mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 40.13, "y": 2.67}]
+ },
+ "Samtec_QSE-060-xx-x-D_P0.8mm_Vertical": {
+ "inherit": "Samtec_QSE-020-xx-x-D_P0.8mm_Vertical",
+ "layout": {"width": 61.27},
+ "banks": {"n": 3}
+ },
+ "Samtec_QSE-060-xx-x-D-A_P0.8mm_Vertical": {
+ "inherit": "Samtec_QSE-060-xx-x-D_P0.8mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 60.13, "y": 2.67}]
+ },
+ "Samtec_QSE-014-xx-x-D-DP_P0.8mm_Vertical": {
+ "inherit": "Samtec_QSE-020-xx-x-D_P0.8mm_Vertical",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.2f}mm Q Pairs High-Speed Ground Plane {type:s} Strip, Differential Pair, {banks:d} bank(s), {pins:d} pairs/bank",
+ "tags": "connector Samtec QPairs QSE mezzanine socket vertical differential"
+ },
+ "banks": {"diff": 1}
+ },
+ "Samtec_QSE-014-xx-x-D-DP-A_P0.8mm_Vertical": {
+ "inherit": "Samtec_QSE-014-xx-x-D-DP_P0.8mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 20.13, "y": 2.67}]
+ },
+ "Samtec_QSE-028-xx-x-D-DP_P0.8mm_Vertical": {
+ "inherit": "Samtec_QSE-014-xx-x-D-DP_P0.8mm_Vertical",
+ "layout": {"width": 41.27},
+ "banks": {"n": 2, "diff": 2}
+ },
+ "Samtec_QSE-028-xx-x-D-DP-A_P0.8mm_Vertical": {
+ "inherit": "Samtec_QSE-028-xx-x-D-DP_P0.8mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 40.13, "y": 2.67}]
+ },
+ "Samtec_QSE-042-xx-x-D-DP_P0.8mm_Vertical": {
+ "inherit": "Samtec_QSE-014-xx-x-D-DP_P0.8mm_Vertical",
+ "layout": {"width": 61.27},
+ "banks": {"n": 3, "diff": 3}
+ },
+ "Samtec_QSE-042-xx-x-D-DP-A_P0.8mm_Vertical": {
+ "inherit": "Samtec_QSE-042-xx-x-D-DP_P0.8mm_Vertical",
+ "meta": {"+tags": " alignment-pins"},
+ "holes": [{"drill": 1.0, "space": 60.13, "y": 2.67}]
+ }
+}
diff --git a/scripts/Connector/Connector_Samtec/QStrip_Vertical.py b/scripts/Connector/Connector_Samtec/QStrip_Vertical.py
new file mode 100755
index 000000000..e46889ec1
--- /dev/null
+++ b/scripts/Connector/Connector_Samtec/QStrip_Vertical.py
@@ -0,0 +1,374 @@
+#!/usr/bin/python
+
+# This file is part of kicad-footprint-generator.
+#
+# kicad-footprint-generator is free software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# kicad-footprint-generator is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details. You should have received a copy of the GNU General Public
+# License along with kicad-footprint-generator. If not, see
+# .
+#
+# Copyright (C) 2020 by Caleb Reister
+#
+
+import sys
+import os
+import argparse
+from copy import deepcopy
+import math
+import yaml
+
+# Load parent path of KicadModTree
+sys.path.append(os.path.join(sys.path[0], "..", "..", ".."))
+sys.path.append(os.path.join(sys.path[0], "..", "..", "tools"))
+
+from KicadModTree import *
+from footprint_text_fields import addTextFields
+from helpers import *
+from dict_tools import *
+
+def generate_one_footprint(param, config, default_lib):
+ fp = Footprint(param['name'])
+
+ # Terminal or Socket mode
+ mode = param['layout']['type'].capitalize()
+ if mode == "Terminal":
+ x_inv = 1
+ elif mode == "Socket":
+ x_inv = -1
+ else:
+ raise ValueError("Connector type must be either 'Terminal' or 'Socket'")
+
+ # Bank parameters
+ banks = param['banks']['n']
+ bank_x = param['banks']['space']
+ bank_w = param['banks']['width']
+ bank_h = param['banks']['height']
+
+ ############################################################################
+ # Copper layer(s)
+
+ # Signal pad parameters
+ pitch = param['pads']['signal']['pitch']
+ pad_w = param['pads']['signal']['width']
+ pad_h = param['pads']['signal']['height']
+ pad_y = param['pads']['signal']['y']
+ pad_n = param['pads']['signal']['n']
+
+ # Pin 1 position
+ pin1 = Vector2D(0,0)
+ pin1.x = -(pad_n / 4)*pitch + pitch/2 - ((banks-1) / 2)*bank_x
+ pin1.y = -pad_y
+
+ # Bank 1 center point
+ bank1_mid = x_inv * (pin1.x - pitch/2 + (pad_n / 4)*pitch)
+
+ # Place pads
+ n = 1 # Pin counter
+ pin = [] # Pin position list, organized by bank
+ for b in range(banks):
+ pin.append([])
+ # Place signal pads
+ for slot in range(pad_n):
+ # Compute next pad location
+ pos = {'x': x_inv * (pin1.x + (slot // 2)*pitch + b*bank_x),
+ 'y': pin1.y - (slot % 2)*(2*pin1.y),
+ 'n': n+1, 'slot': slot}
+
+ # Skip slots for differential banks
+ if b < param['banks'].get('diff', 0):
+ if ((slot+1) % 6 == 0 or # Skip every 3rd odd slot
+ (slot+2) % 6 == 0 or # Skip every 3rd even slot
+ # Only add end-of-bank pins if they are completing a pair
+ (slot+2 >= pad_n and
+ pin[b][-2]['slot'] != slot-2)):
+ continue
+
+ # Create pad
+ pin[b].append(pos) # Add position to list
+ pad = Pad(number = str(n),
+ at = pos,
+ size = (pad_w, pad_h),
+ type = Pad.TYPE_SMT,
+ layers = Pad.LAYERS_SMT,
+ shape = Pad.SHAPE_RECT)
+ fp.append(pad)
+ n += 1
+
+ # Place plane pads
+ mid = bank1_mid + x_inv*b*bank_x # Bank midpoint
+ for plane in param['pads'].get('planes', {}):
+ pad = Pad(number = "P" + str(b+1),
+ at = (plane['x'] + mid, plane['y']),
+ size = (plane['width'], plane['height']),
+ type = Pad.TYPE_SMT,
+ layers = Pad.LAYERS_SMT,
+ shape = Pad.SHAPE_RECT)
+ fp.append(pad)
+
+ ############################################################################
+ # Holes
+ if 'holes' in param:
+ for hole in param['holes']:
+ drill = hole['drill']
+ shape = Pad.SHAPE_CIRCLE if type(drill) is float else Pad.SHAPE_OVAL
+ h = [Pad(number = "MP" if 'pad' in hole else "",
+ at = (m*hole['space']/2, hole['y']),
+ drill = drill,
+ size = hole['pad'] if 'pad' in hole else drill,
+ type = Pad.TYPE_THT if 'pad' in hole else Pad.TYPE_NPTH,
+ layers = Pad.LAYERS_THT if 'pad' in hole else Pad.LAYERS_NPTH,
+ shape = shape) for m in (-1,1)]
+ fp.extend(h)
+
+ ############################################################################
+ # Fabrication layer: F.Fab
+ fab_line = config['fab_line_width']
+ fab_mark = config['fab_pin1_marker_length']
+ fab_w = param['layout']['width'] if 'width' not in param else param['width']
+ fab_h = param['layout']['height']
+ fab_y = fab_h / 2
+ fab_edge = fab_w/2
+ chamfer = fab_h / 4 # 1/4 connector height, cosmetic only
+
+ if mode == 'Terminal':
+ # End outline
+ fab_end = [(-fab_edge, -fab_y),
+ (-fab_edge, fab_y-chamfer),
+ (-fab_edge+chamfer, fab_y)]
+ fp.append(PolygoneLine(nodes = fab_end,
+ layer = "F.Fab",
+ width = fab_line))
+ # Right end outline (mirrors left end)
+ fp.append(PolygoneLine(nodes = fab_end,
+ layer = "F.Fab",
+ width = fab_line,
+ x_mirror = 0))
+ # Top and bottom lines
+ fp.append(Line(start = (-fab_edge, -fab_y),
+ end = ( fab_edge, -fab_y),
+ layer = "F.Fab",
+ width = fab_line))
+ fp.append(Line(start = (-fab_edge+chamfer, fab_y),
+ end = ( fab_edge-chamfer, fab_y),
+ layer = "F.Fab",
+ width = fab_line))
+ # Pin 1 marker
+ fp.append(markerArrow(x = pin1.x,
+ y = (fab_mark-fab_h) / 2,
+ width = fab_mark,
+ angle = 180,
+ layer = "F.Fab",
+ close = False,
+ line_width = fab_line))
+ elif mode == 'Socket':
+ # Outline rectangle
+ fp.append(RectLine(start = (-fab_edge, -fab_y),
+ end = ( fab_edge, fab_y),
+ layer = "F.Fab",
+ width = fab_line))
+ # Chamfer lines
+ fp.append(Line(start = (-fab_edge, fab_y-chamfer),
+ end = (-fab_edge+chamfer, fab_y),
+ layer = "F.Fab",
+ width = fab_line))
+ fp.append(Line(start = (fab_edge, fab_y-chamfer),
+ end = (fab_edge-chamfer, fab_y),
+ layer = "F.Fab",
+ width = fab_line))
+ # Pin 1 marker
+ fp.append(markerArrow(x = -pin1.x,
+ y = -(fab_h-fab_mark) / 2,
+ width = fab_mark,
+ angle = 180,
+ layer = "F.Fab",
+ close = False,
+ line_width = fab_line))
+
+ # Draw bank and ground plane outlines
+ for b in range(banks):
+ mid = bank1_mid + x_inv*b*bank_x
+ # Bank outline
+ fp.append(RectLine(start = (mid-bank_w/2, -bank_h/2),
+ end = (mid+bank_w/2, bank_h/2),
+ layer = "F.Fab",
+ width = fab_line))
+
+ ############################################################################
+ # Silkscreen: F.SilkS
+ silk_offset = config['silk_fab_offset']
+ silk_pad = {'x': config['silk_pad_clearance'] + pad_w/2,
+ 'y': config['silk_pad_clearance'] + pad_h/2}
+ silk_line = config['silk_line_width']
+ silk_y = fab_y + silk_offset
+ silk_edge = fab_edge + silk_offset
+ silk_chamfer = chamfer + silk_offset/2
+
+ if mode == 'Terminal':
+ # Polygon left end outline points
+ silk_end = [[(pin[i][i]['x']+m*silk_pad['x'], -silk_y),
+ (m*silk_edge, -silk_y),
+ (m*silk_edge, silk_y-silk_chamfer),
+ (m*(silk_edge-silk_chamfer), silk_y),
+ (pin[i][i]['x']+m*silk_pad['x'], silk_y)]
+ for (i,m) in ((0,-1), (-1,1))]
+ # Pin 1 indicator
+ fp.append(Line(start = (pin[0][0]['x']-silk_pad['x'], pin1.y - pad_h/2),
+ end = (pin[0][0]['x']-silk_pad['x'], -silk_y),
+ layer = "F.SilkS",
+ width = silk_line))
+ elif mode == 'Socket':
+ # Left end outline points
+ silk_end = [[(pin[i][i]['x']+m*silk_pad['x'], silk_y),
+ (m*silk_edge, silk_y),
+ (m*silk_edge, -silk_y),
+ (pin[i][i]['x']+m*silk_pad['x'], -silk_y)]
+ for (i,m) in ((0,1), (-1,-1))]
+ # Pin 1 indicator
+ fp.append(markerArrow(x = pin[0][0]['x'],
+ y = pin[0][0]['y'] - silk_pad['y'],
+ width = fab_mark / 2,
+ line_width = silk_line,
+ angle = 180,
+ layer = "F.SilkS"))
+
+ # Draw end outlines
+ fp.extend([PolygoneLine(nodes = end,
+ layer = "F.SilkS",
+ width = silk_line) for end in silk_end])
+
+ # Draw outlines between banks
+ for b in range(banks-1):
+ fp.extend([Line(start = (pin[b][-1]['x'] + x_inv*silk_pad['x'], m*silk_y),
+ end = (pin[b+1][0]['x'] - x_inv*silk_pad['x'], m*silk_y),
+ layer = "F.SilkS",
+ width = silk_line) for m in (-1,1)])
+
+ ############################################################################
+ # Courtyard: F.CrtYd
+ court_line = config['courtyard_line_width']
+ court_grid = config['courtyard_grid']
+ court_offset = config['courtyard_offset']['connector']
+
+ court_x = roundToBase(fab_w/2 + court_offset, court_grid)
+ court_y = roundToBase(max(fab_y, pad_y + pad_h/2) + court_offset, court_grid)
+
+ fp.append(RectLine(start = (-court_x, -court_y),
+ end = ( court_x, court_y),
+ layer = "F.CrtYd",
+ width = court_line))
+
+ ############################################################################
+ # Set Metadata
+
+ # Draw reference and value
+ text_y = court_y + 1.0
+ fp.append(Text(type = 'reference', text = 'REF**',
+ at = (0, -text_y),
+ layer = "F.SilkS"))
+ fp.append(Text(type = 'user', text = '%R',
+ at = (0, -text_y),
+ layer = "F.Fab"))
+ fp.append(Text(type = 'value', text=param['name'],
+ at = (0, text_y),
+ layer="F.Fab"))
+
+ # Set surface-mount attribute
+ fp.setAttribute('smd')
+
+ # Part number
+ partnum = param['meta'].get('pn', param['name'].split('_')[1])
+
+ # Pins or pairs/bank
+ if param['banks'].get('diff', 0) == banks:
+ # Differential mode: round up to nearest even number of pairs
+ pins_or_pairs = (pad_n // 3) + (pad_n // 3) % 2
+ else:
+ pins_or_pairs = pad_n
+
+ # Description
+ desc = param['meta']['description']
+ desc = desc.format(pn = partnum,
+ type = mode,
+ pitch = pitch,
+ banks = banks,
+ pins = pins_or_pairs)
+ fp.setDescription(desc + ", generated with kicad-footprint-generator"
+ + ", " + param['meta']['datasheet'])
+
+ # Tags
+ tags = param['meta']['tags']
+ fp.setTags(tags)
+
+ # 3D model path
+ library = param.get('library', default_lib)
+ model_path = os.path.join("${KISYS3DMOD}",
+ library+".3dshapes",
+ param['name'] + ".wrl")
+ fp.append(Model(filename = model_path))
+
+ ############################################################################
+ # Write kicad_mod file
+
+ os.makedirs(library+'.pretty', exist_ok=True)
+ filename = os.path.join(library+'.pretty', param['name']+'.kicad_mod')
+ KicadFileHandler(fp).writeFile(filename)
+
+################################################################################
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--global-config', type=str, nargs='?',
+ default='../../tools/global_config_files/config_KLCv3.0.yaml',
+ help='Global KLC configuration YAML file')
+ parser.add_argument('--series-config', type=str, nargs='?',
+ default='../conn_config_KLCv3.yaml',
+ help='Series KLC configuration YAML file')
+ parser.add_argument('--library', type=str, nargs='?',
+ default='Connector_Samtec_QStrip',
+ help='Default KiCad library name (without extension)')
+ parser.add_argument('files', metavar='file', type=str, nargs='*',
+ help='YAML file(s) containing footprint parameters')
+ args = parser.parse_args()
+
+ with open(args.global_config, 'r') as config_stream:
+ try:
+ config = yaml.safe_load(config_stream)
+ except yaml.YAMLError as exc:
+ print(exc)
+ with open(args.series_config, 'r') as config_stream:
+ try:
+ config.update(yaml.safe_load(config_stream))
+ except yaml.YAMLError as exc:
+ print(exc)
+
+ if len(args.files) == 0:
+ parser.print_help()
+ sys.exit(1)
+
+ print("Default Library:", args.library)
+ for path in args.files:
+ print("Reading", path)
+ with open(path, 'r') as stream:
+ try:
+ footprints = yaml.safe_load(stream)
+ if footprints is None:
+ print(path, "empty, skipping...")
+ continue
+ dictInherit(footprints)
+ for fp_name in footprints:
+ fp_params = footprints.get(fp_name)
+ if 'name' in fp_params:
+ print("WARNING: setting 'name' to", fp_name)
+ fp_params['name'] = fp_name
+ print(" - ",
+ fp_params.get('library', args.library), ".pretty/",
+ fp_name, ".kicad_mod", sep="")
+ generate_one_footprint(fp_params, config, args.library)
+ except yaml.YAMLError as exc:
+ print(exc)
diff --git a/scripts/Connector/Connector_Samtec/RazorBeam_Vertical.json b/scripts/Connector/Connector_Samtec/RazorBeam_Vertical.json
new file mode 100644
index 000000000..a0ee90ba5
--- /dev/null
+++ b/scripts/Connector/Connector_Samtec/RazorBeam_Vertical.json
@@ -0,0 +1,151 @@
+{
+ "Samtec_LSHM-105-xx.x-x-DV-A-N_2x05_P0.5mm_Vertical": {
+ "library": "Connector_Samtec_RazorBeam",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.2f}mm Razor Beam High-Speed Hermaphroditic Terminal/Socket Strip",
+ "datasheet": "http://suddendocs.samtec.com/catalog_english/lshm_dv.pdf",
+ "tags": "connector Samtec RazorBeam LSHM self-mating terminal socket vertical"
+ },
+ "layout": {"width": 7.20, "height": 4.98},
+ "pads": {"n": 10, "pitch": 0.5, "y": 1.85, "width": 0.3, "height": 1.5},
+ "holes": [{"drill": 1.45, "space": 4.5, "y": -0.85}]
+ },
+ "Samtec_LSHM-105-xx.x-x-DV-A-S_2x05-1SH_P0.5mm_Vertical": {
+ "inherit": "Samtec_LSHM-105-xx.x-x-DV-A-N_2x05_P0.5mm_Vertical",
+ "meta": {"+tags": " shield"},
+ "layout": {"+width": 1.1},
+ "+holes": [{"drill": 1.0, "pad": 1.5, "space": 7.45, "y": 1.15, "name": "SH"}]
+ },
+ "Samtec_LSHM-110-xx.x-x-DV-A-N_2x10_P0.5mm_Vertical": {
+ "inherit": "Samtec_LSHM-105-xx.x-x-DV-A-N_2x05_P0.5mm_Vertical",
+ "layout": {"width": 9.70},
+ "pads": {"n": 20},
+ "holes": [{"drill": 1.45, "space": 7.0, "y": -0.85}]
+ },
+ "Samtec_LSHM-110-xx.x-x-DV-A-S_2x10-1SH_P0.5mm_Vertical": {
+ "inherit": "Samtec_LSHM-110-xx.x-x-DV-A-N_2x10_P0.5mm_Vertical",
+ "meta": {"+tags": " shield"},
+ "layout": {"+width": 1.1},
+ "+holes": [{"drill": 1.0, "pad": 1.5, "space": 9.95, "y": 1.15, "name": "SH"}]
+ },
+ "Samtec_LSHM-120-xx.x-x-DV-A-N_2x20_P0.5mm_Vertical": {
+ "inherit": "Samtec_LSHM-105-xx.x-x-DV-A-N_2x05_P0.5mm_Vertical",
+ "layout": {"width": 14.70},
+ "pads": {"n": 40},
+ "holes": [{"drill": 1.45, "space": 12.0, "y": -0.85}]
+ },
+ "Samtec_LSHM-120-xx.x-x-DV-A-S_2x20-1SH_P0.5mm_Vertical": {
+ "inherit": "Samtec_LSHM-120-xx.x-x-DV-A-N_2x20_P0.5mm_Vertical",
+ "meta": {"+tags": " shield"},
+ "layout": {"+width": 1.1},
+ "+holes": [{"drill": 1.0, "pad": 1.5, "space": 14.95, "y": 1.15, "name": "SH"}]
+ },
+ "Samtec_LSHM-130-xx.x-x-DV-A-N_2x30_P0.5mm_Vertical": {
+ "inherit": "Samtec_LSHM-105-xx.x-x-DV-A-N_2x05_P0.5mm_Vertical",
+ "layout": {"width": 19.70},
+ "pads": {"n": 60},
+ "holes": [{"drill": 1.45, "space": 17.0, "y": -0.85}]
+ },
+ "Samtec_LSHM-130-xx.x-x-DV-A-S_2x30-1SH_P0.5mm_Vertical": {
+ "inherit": "Samtec_LSHM-130-xx.x-x-DV-A-N_2x30_P0.5mm_Vertical",
+ "meta": {"+tags": " shield"},
+ "layout": {"+width": 1.1},
+ "+holes": [{"drill": 1.0, "pad": 1.5, "space": 19.95, "y": 1.15, "name": "SH"}]
+ },
+ "Samtec_LSHM-140-xx.x-x-DV-A-N_2x40_P0.5mm_Vertical": {
+ "inherit": "Samtec_LSHM-105-xx.x-x-DV-A-N_2x05_P0.5mm_Vertical",
+ "layout": {"width": 24.70},
+ "pads": {"n": 80},
+ "holes": [{"drill": 1.45, "space": 22.0, "y": -0.85}]
+ },
+ "Samtec_LSHM-140-xx.x-x-DV-A-S_2x40-1SH_P0.5mm_Vertical": {
+ "inherit": "Samtec_LSHM-140-xx.x-x-DV-A-N_2x40_P0.5mm_Vertical",
+ "meta": {"+tags": " shield"},
+ "layout": {"+width": 1.1},
+ "+holes": [{"drill": 1.0, "pad": 1.5, "space": 24.95, "y": 1.15, "name": "SH"}]
+ },
+ "Samtec_LSHM-150-xx.x-x-DV-A-N_2x50_P0.5mm_Vertical": {
+ "inherit": "Samtec_LSHM-105-xx.x-x-DV-A-N_2x05_P0.5mm_Vertical",
+ "layout": {"width": 29.70},
+ "pads": {"n": 100},
+ "holes": [{"drill": 1.45, "space": 27.0, "y": -0.85}]
+ },
+ "Samtec_LSHM-150-xx.x-x-DV-A-S_2x50-1SH_P0.5mm_Vertical": {
+ "inherit": "Samtec_LSHM-150-xx.x-x-DV-A-N_2x50_P0.5mm_Vertical",
+ "meta": {"+tags": " shield"},
+ "layout": {"+width": 1.1},
+ "+holes": [{"drill": 1.0, "pad": 1.5, "space": 29.95, "y": 1.15, "name": "SH"}]
+ },
+
+ "Samtec_LSS-105-xx-x-DV-A_2x05_P0.635mm_Vertical": {
+ "library": "Connector_Samtec_RazorBeam",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.3f}mm Razor Beam High-Speed Hermaphroditic Terminal/Socket Strip, ",
+ "datasheet": "http://suddendocs.samtec.com/catalog_english/lss.pdf",
+ "tags": "connector Samtec RazorBeam LSS self-mating terminal socket vertical"
+ },
+ "layout": {"width": 7.925, "height": 4.14, "y": 0.07},
+ "pads": {"n": 10, "pitch": 0.635, "y": 1.8, "width": 0.4, "height": 1.6},
+ "holes": [{"drill": 0.89, "space": 4.675, "y": 1.1}]
+ },
+ "Samtec_LSS-110-xx-x-DV-A_2x10_P0.635mm_Vertical": {
+ "inherit": "Samtec_LSS-105-xx-x-DV-A_2x05_P0.635mm_Vertical",
+ "layout": {"width": 11.10},
+ "pads": {"n": 20},
+ "holes": [{"drill": 0.89, "space": 7.85, "y": 1.1}]
+ },
+ "Samtec_LSS-120-xx-x-DV-A_2x20_P0.635mm_Vertical": {
+ "inherit": "Samtec_LSS-105-xx-x-DV-A_2x05_P0.635mm_Vertical",
+ "layout": {"width": 17.45},
+ "pads": {"n": 40},
+ "holes": [{"drill": 0.89, "space": 14.20, "y": 1.1}]
+ },
+ "Samtec_LSS-130-xx-x-DV-A_2x30_P0.635mm_Vertical": {
+ "inherit": "Samtec_LSS-105-xx-x-DV-A_2x05_P0.635mm_Vertical",
+ "layout": {"width": 23.8},
+ "pads": {"n": 60},
+ "holes": [{"drill": 0.89, "space": 20.55, "y": 1.1}]
+ },
+ "Samtec_LSS-140-xx-x-DV-A_2x40_P0.635mm_Vertical": {
+ "inherit": "Samtec_LSS-105-xx-x-DV-A_2x05_P0.635mm_Vertical",
+ "layout": {"width": 30.15},
+ "pads": {"n": 80},
+ "holes": [{"drill": 0.89, "space": 26.90, "y": 1.1}]
+ },
+ "Samtec_LSS-150-xx-x-DV-A_2x50_P0.635mm_Vertical": {
+ "inherit": "Samtec_LSS-105-xx-x-DV-A_2x05_P0.635mm_Vertical",
+ "layout": {"width": 36.5},
+ "pads": {"n": 100},
+ "holes": [{"drill": 0.89, "space": 33.25, "y": 1.1}]
+ },
+
+ "Samtec_LSEM-120-xx.x-x-DV-A-N_2x20_P0.8mm_Vertical": {
+ "library": "Connector_Samtec_RazorBeam",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.2f}mm Razor Beam High-Speed Hermaphroditic Terminal/Socket Strip",
+ "datasheet": "http://suddendocs.samtec.com/catalog_english/lsem.pdf",
+ "tags": "connector Samtec RazorBeam LSEM self-mating terminal socket vertical"
+ },
+ "layout": {"width": 20.4, "height": 4.98},
+ "pads": {"n": 40, "pitch": 0.8, "y": 1.85, "width": 0.38, "height": 1.5},
+ "holes": [{"drill": 1.5, "space": 17.7, "y": -0.95}]
+ },
+ "Samtec_LSEM-130-xx.x-x-DV-A-N_2x30_P0.8mm_Vertical": {
+ "inherit": "Samtec_LSEM-120-xx.x-x-DV-A-N_2x20_P0.8mm_Vertical",
+ "layout": {"width": 28.4},
+ "pads": {"n": 60},
+ "holes": [{"drill": 1.5, "space": 25.7, "y": -1.1}]
+ },
+ "Samtec_LSEM-140-xx.x-x-DV-A-N_2x40_P0.8mm_Vertical": {
+ "inherit": "Samtec_LSEM-120-xx.x-x-DV-A-N_2x20_P0.8mm_Vertical",
+ "layout": {"width": 36.4},
+ "pads": {"n": 80},
+ "holes": [{"drill": 1.5, "space": 33.7, "y": -1.1}]
+ },
+ "Samtec_LSEM-150-xx.x-x-DV-A-N_2x50_P0.8mm_Vertical": {
+ "inherit": "Samtec_LSEM-120-xx.x-x-DV-A-N_2x20_P0.8mm_Vertical",
+ "layout": {"width": 44.4},
+ "pads": {"n": 100},
+ "holes": [{"drill": 1.5, "space": 41.7, "y": -1.1}]
+ }
+}
diff --git a/scripts/Connector/Connector_Samtec/RazorBeam_Vertical.py b/scripts/Connector/Connector_Samtec/RazorBeam_Vertical.py
new file mode 100755
index 000000000..9e4dc85c4
--- /dev/null
+++ b/scripts/Connector/Connector_Samtec/RazorBeam_Vertical.py
@@ -0,0 +1,304 @@
+#!/usr/bin/python
+
+# This file is part of kicad-footprint-generator.
+#
+# kicad-footprint-generator is free software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# kicad-footprint-generator is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details. You should have received a copy of the GNU General Public
+# License along with kicad-footprint-generator. If not, see
+# .
+#
+# Copyright (C) 2020 by Caleb Reister
+#
+
+import sys
+import os
+import argparse
+from copy import deepcopy
+import math
+import yaml
+
+# Load parent path of KicadModTree
+sys.path.append(os.path.join(sys.path[0], "..", "..", ".."))
+sys.path.append(os.path.join(sys.path[0], "..", "..", "tools"))
+
+from KicadModTree import *
+from footprint_text_fields import addTextFields
+from helpers import *
+from dict_tools import *
+
+def generate_one_footprint(param, config, default_lib):
+ fp = Footprint(param['name'])
+
+ # Pad parameters
+ pitch = param['pads']['pitch']
+ pad_w = param['pads']['width']
+ pad_h = param['pads']['height']
+ pad_y = param['pads']['y']
+ pins = param['pads']['n'] # Pin count
+
+ # Part number
+ partnum = param['meta'].get('pn', param['name'].split('_')[1])
+
+ # Description
+ desc = param['meta']['description']
+ desc = desc.format(pn = partnum, pitch = pitch)
+ fp.setDescription(desc + ", generated with kicad-footprint-generator"
+ + ", " + param['meta']['datasheet'])
+
+ # Tags
+ tags = param['meta']['tags']
+ fp.setTags(tags)
+
+ ############################################################################
+ # Place pads
+ # Pin 1 position
+ pin1 = Vector2D(-(pins/4)*pitch + pitch/2, -pad_y)
+
+ pin = [] # Pin position list
+ for p in range(pins):
+ # Compute next pad location
+ pos = {'x': pin1.x + (p // 2)*pitch,
+ 'y': pin1.y - (p % 2)*(2*pin1.y)}
+ pin.append(pos)
+
+ # Create pad
+ pad = Pad(number = str(p+1),
+ at = pos,
+ size = (pad_w, pad_h),
+ type = Pad.TYPE_SMT,
+ layers = Pad.LAYERS_SMT,
+ shape = Pad.SHAPE_RECT)
+ fp.append(pad)
+
+ ############################################################################
+ # Fabrication layer: F.Fab
+ fab_line = config['fab_line_width']
+ fab_mark = config['fab_pin1_marker_length']
+ fab_w = param['layout']['width']
+ fab_h = param['layout']['height']
+ fab_y = param['layout'].get('y', 0)
+ lEdge = -fab_w / 2
+ rEdge = lEdge + fab_w
+
+ # Draw outline
+ if "LSS" in tags:
+ chamfer = fab_h / 3.5 # cosmetic only
+ outline = [(lEdge + chamfer, -fab_h/2 + fab_y),
+ (lEdge, -fab_h/2 + chamfer + fab_y),
+ (lEdge, fab_h/2 + fab_y),
+ (rEdge, fab_h/2 + fab_y),
+ (rEdge, -fab_h/2 + chamfer + fab_y),
+ (rEdge - chamfer, -fab_h/2 + fab_y),
+ (lEdge + chamfer, -fab_h/2 + fab_y)]
+ else:
+ chamfer = fab_h / 10
+ outline = [(lEdge + chamfer, -fab_h/2 + fab_y),
+ (lEdge, -fab_h/2 + chamfer + fab_y),
+ (lEdge, fab_h/2 - chamfer + fab_y),
+ (lEdge + chamfer, fab_h/2 + fab_y),
+ (rEdge - chamfer, fab_h/2 + fab_y),
+ (rEdge, fab_h/2 - chamfer + fab_y),
+ (rEdge, -fab_h/2 + chamfer + fab_y),
+ (rEdge - chamfer, -fab_h/2 + fab_y),
+ (lEdge + chamfer, -fab_h/2 + fab_y)]
+
+ fp.append(PolygoneLine(nodes = outline,
+ layer = "F.Fab",
+ width = fab_line))
+
+ # Pin 1 marker
+ fp.append(markerArrow(x = pin1.x,
+ y = (fab_mark-fab_h) / 2 + fab_y,
+ width = fab_mark,
+ angle = 180,
+ layer = "F.Fab",
+ close = False,
+ line_width = fab_line))
+
+ ############################################################################
+ # Holes
+ hole_list = param['holes']
+ for p in hole_list:
+ drill = p['drill']
+ shape = Pad.SHAPE_CIRCLE if type(drill) is float else Pad.SHAPE_OVAL
+ h = [Pad(number = p.get('name', ""),
+ at = (m*p['space']/2, p['y']),
+ drill = drill,
+ size = p.get('pad', drill),
+ type = Pad.TYPE_THT if 'pad' in p else Pad.TYPE_NPTH,
+ layers = Pad.LAYERS_THT if 'pad' in p else Pad.LAYERS_NPTH,
+ shape = shape) for m in (-1,1)]
+ fp.extend(h)
+ # Extend courtyard width for shield holes
+ if p['space'] + p.get('pad', drill) > fab_w:
+ fab_w = p['space'] + p.get('pad', drill)
+ sh_x = p['space']/2
+ sh_y = p['y']
+ sh_r = p.get('pad', drill) / 2
+
+ ############################################################################
+ # Courtyard: F.CrtYd
+ court_line = config['courtyard_line_width']
+ court_grid = config['courtyard_grid']
+ court_offset = config['courtyard_offset']['connector']
+
+ court_x = roundToBase(fab_w/2 + court_offset, court_grid)
+ court_y = roundToBase(max(fab_h/2+fab_y, pad_y+pad_h/2) + court_offset, court_grid)
+
+ fp.append(RectLine(start = (-court_x, -court_y),
+ end = ( court_x, court_y),
+ layer = "F.CrtYd",
+ width = court_line))
+
+ ############################################################################
+ # Silkscreen: F.SilkS
+ silk_offset = config['silk_fab_offset']
+ silk_y = fab_h/2 + silk_offset
+ silk_pad = {'x': config['silk_pad_clearance'] + pad_w/2,
+ 'y': config['silk_pad_clearance'] + pad_y/2,
+ 'hole': config['silk_pad_clearance']}
+ silk_line = config['silk_line_width']
+ silk_lEdge = lEdge - silk_offset
+ silk_rEdge = rEdge + silk_offset
+ silk_chamfer = chamfer + silk_offset/2
+ silk_pin1 = pin1.x - silk_pad['x']
+
+ if "shield" in tags:
+ silk_sh = math.sqrt((sh_r+silk_pad['hole'])**2 - (silk_rEdge-sh_x)**2)
+ silk_lEnd = [[{'x': silk_pin1, 'y': -silk_y},
+ {'x': silk_lEdge + silk_chamfer, 'y': -silk_y},
+ {'x': silk_lEdge, 'y': -silk_y + silk_chamfer},
+ {'x': silk_lEdge, 'y': sh_y - silk_sh}],
+ [{'x': silk_lEdge, 'y': sh_y + silk_sh},
+ {'x': silk_lEdge, 'y': silk_y - silk_chamfer},
+ {'x': silk_lEdge + silk_chamfer, 'y': silk_y},
+ {'x': silk_pin1, 'y': silk_y}]]
+ elif "LSS" in tags:
+ silk_lEnd = [[{'x': silk_pin1, 'y': -silk_y + fab_y},
+ {'x': silk_lEdge + silk_chamfer, 'y': -silk_y + fab_y},
+ {'x': silk_lEdge, 'y': -silk_y + fab_y + silk_chamfer},
+ {'x': silk_lEdge, 'y': silk_y + fab_y},
+ {'x': silk_pin1, 'y': silk_y + fab_y}]]
+ else:
+ silk_lEnd = [[{'x': silk_pin1, 'y': -silk_y},
+ {'x': silk_lEdge + silk_chamfer, 'y': -silk_y},
+ {'x': silk_lEdge, 'y': -silk_y + silk_chamfer},
+ {'x': silk_lEdge, 'y': silk_y - silk_chamfer},
+ {'x': silk_lEdge + silk_chamfer, 'y': silk_y},
+ {'x': silk_pin1, 'y': silk_y}]]
+
+ # Generate right outline
+ silk_rEnd = deepcopy(silk_lEnd)
+ # Mirror about x axis
+ for a in range(len(silk_lEnd)):
+ for b in range(len(silk_lEnd[a])):
+ silk_rEnd[a][b]['x'] = -silk_rEnd[a][b]['x']
+
+ # Draw left and right outlines
+ for i in range(len(silk_lEnd)):
+ fp.append(PolygoneLine(nodes = silk_lEnd[i],
+ layer = "F.SilkS",
+ width = silk_line))
+ fp.append(PolygoneLine(nodes = silk_rEnd[i],
+ layer = "F.SilkS",
+ width = silk_line))
+
+ # Pin 1 indicator
+ fp.append(markerArrow(x = pin1.x,
+ y = pin1.y - silk_pad['y'],
+ width = fab_mark / 2,
+ angle = 180,
+ line_width = silk_line,
+ layer = "F.SilkS"))
+
+ ############################################################################
+ # Set Metadata
+
+ # Draw reference and value
+ text_y = court_y + 1.0
+ fp.append(Text(type = 'reference', text = 'REF**',
+ at = (0, -text_y),
+ layer = "F.SilkS"))
+ fp.append(Text(type = 'user', text = '%R',
+ at = (0, -text_y),
+ layer = "F.Fab"))
+ fp.append(Text(type = 'value', text=param['name'],
+ at = (0, text_y),
+ layer="F.Fab"))
+
+ # Set surface-mount attribute
+ fp.setAttribute('smd')
+
+ # 3D model path
+ library = param.get('library', default_lib)
+ model_path = os.path.join('${KISYS3DMOD}',
+ library+'.3dshapes',
+ param['name'] + '.wrl')
+ fp.append(Model(filename = model_path))
+
+ ############################################################################
+ # Write kicad_mod file
+
+ os.makedirs(library+'.pretty', exist_ok=True)
+ filename = os.path.join(library+'.pretty', param['name']+'.kicad_mod')
+ KicadFileHandler(fp).writeFile(filename)
+
+################################################################################
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--global-config', type=str, nargs='?',
+ default='../../tools/global_config_files/config_KLCv3.0.yaml',
+ help='Global KLC configuration YAML file')
+ parser.add_argument('--series-config', type=str, nargs='?',
+ default='../conn_config_KLCv3.yaml',
+ help='Series KLC configuration YAML file')
+ parser.add_argument('--library', type=str, nargs='?',
+ default='Connector_Samtec_RazorBeam',
+ help='Default KiCad library name (without extension)')
+ parser.add_argument('files', metavar='file', type=str, nargs='*',
+ help='YAML file(s) containing footprint parameters')
+ args = parser.parse_args()
+
+ with open(args.global_config, 'r') as config_stream:
+ try:
+ config = yaml.safe_load(config_stream)
+ except yaml.YAMLError as exc:
+ print(exc)
+ with open(args.series_config, 'r') as config_stream:
+ try:
+ config.update(yaml.safe_load(config_stream))
+ except yaml.YAMLError as exc:
+ print(exc)
+
+ if len(args.files) == 0:
+ parser.print_help()
+ sys.exit(1)
+
+ print("Default Library:", args.library)
+ for path in args.files:
+ print("Reading", path)
+ with open(path, 'r') as stream:
+ try:
+ footprints = yaml.safe_load(stream)
+ if footprints is None:
+ print(path, "empty, skipping...")
+ continue
+ dictInherit(footprints)
+ for fp_name in footprints:
+ fp_params = footprints.get(fp_name)
+ if 'name' in fp_params:
+ print("WARNING: setting 'name' to", fp_name)
+ fp_params['name'] = fp_name
+ print(" - ",
+ fp_params.get('library', args.library), ".pretty/",
+ fp_name, ".kicad_mod", sep="")
+ generate_one_footprint(fp_params, config, args.library)
+ except yaml.YAMLError as exc:
+ print(exc)
diff --git a/scripts/Connector/Connector_Samtec/RazorBeam_Vertical.yaml b/scripts/Connector/Connector_Samtec/RazorBeam_Vertical.yaml
new file mode 100644
index 000000000..4d90877da
--- /dev/null
+++ b/scripts/Connector/Connector_Samtec/RazorBeam_Vertical.yaml
@@ -0,0 +1,201 @@
+################################################################################
+# LSHM family
+Samtec_LSHM-105-xx.x-x-DV-A-N_Vertical: &LSHM-105
+ meta: &LSHM_meta
+ description: >-
+ Samtec {pn:s} {pitch:1.2f}mm Razor Beam High-Speed Hermaphroditic
+ Terminal/Socket Strip ({ds:s}); generated with kicad-footprint-generator
+ tags: 'connector Samtec RazorBeam LSHM self-mating terminal socket vertical'
+ datasheet: >-
+ http://suddendocs.samtec.com/prints/lshm-1xx-xx.x-xxx-dv-a-x-x-xx-mkt.pdf,
+ http://suddendocs.samtec.com/prints/lshm-1xx-xx.x-x-dv-a-x-x-tr-footprint.pdf
+ pads: &LSHM_pads {pitch: 0.5, y: 1.85, width: 0.3, height: 1.5}
+ layout: {width: 7.2, height: 4.98}
+ pins: 10
+ holes:
+ - {drill: 1.45, space: 4.5, y: -0.85}
+
+Samtec_LSHM-105-xx.x-x-DV-A-S_Vertical:
+ <<: *LSHM-105
+ add-tags: 'shield'
+ add-width: 0.45
+ add-height: 0.45
+ add-holes:
+ - {drill: 1.0, pad: 2.0, space: 7.45, y: 1.15}
+
+Samtec_LSHM-110-xx.x-x-DV-A-N_Vertical: &LSHM-110
+ meta: *LSHM_meta
+ pads: *LSHM_pads
+ layout: {width: 9.7, height: 4.98}
+ pins: 20
+ holes:
+ - {drill: 1.45, space: 7.0, y: -0.85}
+
+Samtec_LSHM-110-xx.x-x-DV-A-S_Vertical:
+ <<: *LSHM-110
+ add-tags: 'shield'
+ add-width: 0.45
+ add-height: 0.45
+ add-holes:
+ - {drill: 1.0, pad: 2.0, space: 9.95, y: 1.15}
+
+Samtec_LSHM-120-xx.x-x-DV-A-N_Vertical: &LSHM-120
+ meta: *LSHM_meta
+ pads: *LSHM_pads
+ layout: {width: 14.7, height: 4.98}
+ pins: 40
+ holes:
+ - {drill: 1.45, space: 12.0, y: -0.85}
+
+Samtec_LSHM-120-xx.x-x-DV-A-S_Vertical:
+ <<: *LSHM-120
+ add-tags: 'shield'
+ add-width: 0.45
+ add-height: 0.45
+ add-holes:
+ - {drill: 1.0, pad: 2.0, space: 14.95, y: 1.15}
+
+Samtec_LSHM-130-xx.x-x-DV-A-N_Vertical: &LSHM-130
+ meta: *LSHM_meta
+ pads: *LSHM_pads
+ layout: {width: 19.7, height: 4.98}
+ pins: 60
+ holes:
+ - {drill: 1.45, space: 17.0, y: -0.85}
+
+Samtec_LSHM-130-xx.x-x-DV-A-S_Vertical:
+ <<: *LSHM-130
+ add-tags: 'shield'
+ add-width: 0.45
+ add-height: 0.45
+ add-holes:
+ - {drill: 1.0, pad: 2.0, space: 19.95, y: 1.15}
+
+Samtec_LSHM-140-xx.x-x-DV-A-N_Vertical: &LSHM-140
+ meta: *LSHM_meta
+ pads: *LSHM_pads
+ layout: {width: 24.7, height: 4.98}
+ pins: 80
+ holes:
+ - {drill: 1.45, space: 22.0, y: -0.85}
+
+Samtec_LSHM-140-xx.x-x-DV-A-S_Vertical:
+ <<: *LSHM-140
+ add-tags: 'shield'
+ add-width: 0.45
+ add-height: 0.45
+ add-holes:
+ - {drill: 1.0, pad: 2.0, space: 24.95, y: 1.15}
+
+Samtec_LSHM-150-xx.x-x-DV-A-N_Vertical: &LSHM-150
+ meta: *LSHM_meta
+ pads: *LSHM_pads
+ layout: {width: 29.7, height: 4.98}
+ pins: 100
+ holes:
+ - {drill: 1.45, space: 27.0, y: -0.85}
+
+Samtec_LSHM-150-xx.x-x-DV-A-S_Vertical:
+ <<: *LSHM-150
+ add-tags: 'shield'
+ add-width: 0.45
+ add-height: 0.45
+ add-holes:
+ - {drill: 1.0, pad: 2.0, space: 29.95, y: 1.15}
+
+################################################################################
+# LSS family
+#Samtec_LSS-105-xx-x-DV-A_Vertical:
+# meta: &LSS_meta
+# description: 'Samtec {pn:s} {pitch:1.3f}mm Razor Beam High-Speed Hermaphroditic Terminal/Socket Strip; {ds:s}'
+# tags: 'connector Samtec RazorBeam LSS self-mating terminal socket vertical'
+# datasheet: >-
+# [drawing](http://suddendocs.samtec.com/prints/lss-1xx-xx-xx-dv-xx-xx-mkt.pdf),
+# [footprint](http://suddendocs.samtec.com/prints/lss-1xx-xx-xx-dv-xx-xx-footprint.pdf)
+# pads: &LSS_pads {pitch: 0.635, y: 1.8, width: 0.4, height: 1.6}
+# layout: {width: , height: 4.0}
+# pins: 10
+# holes:
+# - {drill: 0.89, space: 4.675, y: -1.1}
+#
+#Samtec_LSS-110-xx-x-DV-A_Vertical:
+# meta: *LSS_meta
+# pads: *LSS_pads
+# layout: {width: , height: 4.0}
+# pins: 20
+# holes:
+# - {drill: 0.89, space: , y: 1.1}
+#
+#Samtec_LSS-120-xx-x-DV-A_Vertical:
+# meta: *LSS_meta
+# pads: *LSS_pads
+# layout: {width: }
+# pins: 40
+# holes:
+# - {drill: 0.89, space: , y: 1.1}
+#
+#Samtec_LSS-130-xx-x-DV-A_Vertical:
+# meta: *LSS_meta
+# pads: *LSS_pads
+# layout: {width: }
+# pins: 60
+# holes:
+# - {drill: 0.89, space: , y: 1.1}
+#
+#Samtec_LSS-140-xx-x-DV-A_Vertical:
+# meta: *LSS_meta
+# pads: *LSS_pads
+# layout: {width: }
+# pins: 80
+# holes:
+# - {drill: 0.89, space: , y: 1.1}
+#
+#Samtec_LSS-150-xx-x-DV-A_Vertical:
+# meta: *LSS_meta
+# pads: *LSS_pads
+# layout: {width: }
+# pins: 100
+# holes:
+# - {drill: 0.89, space: , y: 1.1}
+
+################################################################################
+# LSEM family
+Samtec_LSEM-120-xx.x-x-DV-A-N_Vertical:
+ meta: &LSEM_meta
+ description: >-
+ Samtec {pn:s} {pitch:1.2f}mm Razor Beam High-Speed Hermaphroditic
+ Terminal/Socket Strip ({ds:s}); generated with kicad-footprint-generator
+ tags: 'connector Samtec RazorBeam LSEM self-mating terminal socket vertical'
+ datasheet: >-
+ http://suddendocs.samtec.com/prints/lsem-1xx-xx.x-x-dv-a-x-xx-tr-mkt.pdf,
+ http://suddendocs.samtec.com/prints/lsem-1xx-xx.x-x-dv-a-x-xx-tr%20footprint.pdf
+ pads: &LSEM_pads {pitch: 0.8, y: 1.85, width: 0.38, height: 1.65}
+ layout: {width: 20.4, height: 4.98}
+ pins: 40
+ holes:
+ - {drill: 1.5, space: 17.7, y: -0.85}
+
+Samtec_LSEM-130-xx.x-x-DV-A-N_Vertical:
+ meta: *LSEM_meta
+ pads: *LSEM_pads
+ layout: {width: 28.4, height: 4.98}
+ pins: 60
+ holes:
+ - {drill: 1.5, space: 25.7, y: -0.85}
+
+Samtec_LSEM-140-xx.x-x-DV-A-N_Vertical:
+ meta: *LSEM_meta
+ pads: *LSEM_pads
+ layout: {width: 36.4, height: 4.98}
+ pins: 80
+ holes:
+ - {drill: 1.5, space: 33.7, y: -0.85}
+
+Samtec_LSEM-150-xx.x-x-DV-A-N_Vertical:
+ meta: *LSEM_meta
+ pads: *LSEM_pads
+ layout: {width: 44.4, height: 4.98}
+ pins: 100
+ holes:
+ - {drill: 1.5, space: 41.7, y: -0.85}
+
diff --git a/scripts/Connector/Connector_Samtec/helpers.py b/scripts/Connector/Connector_Samtec/helpers.py
index 3a8ba0ff5..86464571c 100644
--- a/scripts/Connector/Connector_Samtec/helpers.py
+++ b/scripts/Connector/Connector_Samtec/helpers.py
@@ -1,4 +1,41 @@
+import sys
+import os
+
+sys.path.append(os.path.join(sys.path[0], "..", "..", ".."))
+import KicadModTree
+
def roundToBase(value, base):
if base == 0:
return value
return round(value/base) * base
+
+def markerArrow(x, y, width, line_width, layer="F.Fab", angle=0, close=True):
+ """
+ Draws a triangular marker arrow at the specified location.
+
+ Args:
+ x: x-coordinate of arrow tip
+ y: y-coordinate of arrow tip
+ width: width of the arrow
+ line_width: width of lines forming the arrow
+ layer: PCB layer string (default: "F.Fab")
+ angle: orientation of the arrow in degrees (0° points up)
+ close (bool): True to draw a line closing the triangle
+
+ Returns:
+ KicadModTree.Node object that generates the marker arrow
+ """
+ node = KicadModTree.Node()
+ points = [(-width/2, width/2),
+ (0, 0),
+ (width/2, width/2)]
+
+ if close:
+ points.append((-width/2, width/2))
+
+ node.append(KicadModTree.PolygoneLine(nodes = points,
+ layer = layer,
+ width = line_width))
+ node.insert(KicadModTree.Rotation(angle))
+ node.insert(KicadModTree.Translation(x,y))
+ return node
diff --git a/scripts/Connector/Connector_Samtec/mPOWER_Vertical.json b/scripts/Connector/Connector_Samtec/mPOWER_Vertical.json
new file mode 100644
index 000000000..dcbfad513
--- /dev/null
+++ b/scripts/Connector/Connector_Samtec/mPOWER_Vertical.json
@@ -0,0 +1,133 @@
+{
+ "Samtec_UMPT-02-xx.x-x-VT-SM_2x02_P2.0mm_Vertical": {
+ "library": "Connector_Samtec",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.2f}mm Ultra Micro Power Terminal",
+ "datasheet": "http://suddendocs.samtec.com/catalog_english/umpt.pdf",
+ "tags": "connector Samtec mPOWER UMPT power terminal vertical"
+ },
+ "layout": {"type": "Terminal", "width": [11.3], "height": 7.6},
+ "pads": {"n": 2, "pitch": 2.0, "width": 1.25, "height": 3.5}
+ },
+ "Samtec_UMPT-02-xx.x-x-VT-SM-WT_2x02-1MP_P2.0mm_Vertical": {
+ "inherit": "Samtec_UMPT-02-xx.x-x-VT-SM_2x02_P2.0mm_Vertical",
+ "meta": {"+tags": " weld-tab"},
+ "holes": [
+ {"drill": 0.8, "pad": 1.3, "x": 4.85, "y": 0.3, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": 4.85, "y": -1.7, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": -4.85, "y": 0.8, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": -4.85, "y": -1.2, "name": "MP"}
+ ]
+ },
+ "Samtec_UMPT-03-xx.x-x-VT-SM_2x03_P2.0mm_Vertical": {
+ "inherit": "Samtec_UMPT-02-xx.x-x-VT-SM_2x02_P2.0mm_Vertical",
+ "layout": {"width": [13.3]},
+ "pads": {"n": 3}
+ },
+ "Samtec_UMPT-03-xx.x-x-VT-SM-WT_2x03-1MP_P2.0mm_Vertical": {
+ "inherit": "Samtec_UMPT-03-xx.x-x-VT-SM_2x03_P2.0mm_Vertical",
+ "meta": {"+tags": " weld-tab"},
+ "holes": [
+ {"drill": 0.8, "pad": 1.3, "x": 5.85, "y": 0.3, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": 5.85, "y": -1.7, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": -5.85, "y": 0.8, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": -5.85, "y": -1.2, "name": "MP"}
+ ]
+ },
+ "Samtec_UMPT-04-xx.x-x-VT-SM_2x04_P2.0mm_Vertical": {
+ "inherit": "Samtec_UMPT-02-xx.x-x-VT-SM_2x02_P2.0mm_Vertical",
+ "layout": {"width": [15.3]},
+ "pads": {"n": 4}
+ },
+ "Samtec_UMPT-04-xx.x-x-VT-SM-WT_2x04-1MP_P2.0mm_Vertical": {
+ "inherit": "Samtec_UMPT-04-xx.x-x-VT-SM_2x04_P2.0mm_Vertical",
+ "meta": {"+tags": " weld-tab"},
+ "holes": [
+ {"drill": 0.8, "pad": 1.3, "x": 6.85, "y": 0.3, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": 6.85, "y": -1.7, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": -6.85, "y": 0.8, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": -6.85, "y": -1.2, "name": "MP"}
+ ]
+ },
+ "Samtec_UMPT-05-xx.x-x-VT-SM_2x05_P2.0mm_Vertical": {
+ "inherit": "Samtec_UMPT-02-xx.x-x-VT-SM_2x02_P2.0mm_Vertical",
+ "layout": {"width": [17.3]},
+ "pads": {"n": 5}
+ },
+ "Samtec_UMPT-05-xx.x-x-VT-SM-WT_2x05-1MP_P2.0mm_Vertical": {
+ "inherit": "Samtec_UMPT-05-xx.x-x-VT-SM_2x05_P2.0mm_Vertical",
+ "meta": {"+tags": " weld-tab"},
+ "holes": [
+ {"drill": 0.8, "pad": 1.3, "x": 7.85, "y": 0.3, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": 7.85, "y": -1.7, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": -7.85, "y": 0.8, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": -7.85, "y": -1.2, "name": "MP"}
+ ]
+ },
+
+ "Samtec_UMPS-02-xx.x-x-VT-SM_2x02_P2.0mm_Vertical": {
+ "library": "Connector_Samtec",
+ "meta": {
+ "description": "Samtec {pn:s} {pitch:1.2f}mm Ultra Micro Power Socket",
+ "datasheet": "http://suddendocs.samtec.com/catalog_english/umps.pdf",
+ "tags": "connector Samtec mPOWER UMPS power socket vertical"
+ },
+ "layout": {"type": "Socket", "width": [9.05, 7.65], "height": 6.2},
+ "pads": {"n": 2, "pitch": 2.0, "width": 1.30, "height": 3.5}
+ },
+ "Samtec_UMPS-02-xx.x-x-VT-SM-WT_2x02-1MP_P2.0mm_Vertical": {
+ "inherit": "Samtec_UMPS-02-xx.x-x-VT-SM_2x02_P2.0mm_Vertical",
+ "meta": {"+tags": " weld-tab"},
+ "holes": [
+ {"drill": 0.8, "pad": 1.3, "x": -3.0, "y": 0.5, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": -3.0, "y": -1.5, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": 3.0, "y": 1.0, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": 3.0, "y": -1.0, "name": "MP"}
+ ]
+ },
+ "Samtec_UMPS-03-xx.x-x-VT-SM_2x03_P2.0mm_Vertical": {
+ "inherit": "Samtec_UMPS-02-xx.x-x-VT-SM_2x02_P2.0mm_Vertical",
+ "layout": {"width": [11.05, 9.65]},
+ "pads": {"n": 3}
+ },
+ "Samtec_UMPS-03-xx.x-x-VT-SM-WT_2x03-1MP_P2.0mm_Vertical": {
+ "inherit": "Samtec_UMPS-03-xx.x-x-VT-SM_2x03_P2.0mm_Vertical",
+ "meta": {"+tags": " weld-tab"},
+ "holes": [
+ {"drill": 0.8, "pad": 1.3, "x": -4.0, "y": 0.5, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": -4.0, "y": -1.5, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": 4.0, "y": 1.0, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": 4.0, "y": -1.0, "name": "MP"}
+ ]
+ },
+ "Samtec_UMPS-04-xx.x-x-VT-SM_2x04_P2.0mm_Vertical": {
+ "inherit": "Samtec_UMPS-02-xx.x-x-VT-SM_2x02_P2.0mm_Vertical",
+ "layout": {"width": [13.05, 11.65]},
+ "pads": {"n": 4}
+ },
+ "Samtec_UMPS-04-xx.x-x-VT-SM-WT_2x04-1MP_P2.0mm_Vertical": {
+ "inherit": "Samtec_UMPS-04-xx.x-x-VT-SM_2x04_P2.0mm_Vertical",
+ "meta": {"+tags": " weld-tab"},
+ "holes": [
+ {"drill": 0.8, "pad": 1.3, "x": -5.0, "y": 0.5, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": -5.0, "y": -1.5, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": 5.0, "y": 1.0, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": 5.0, "y": -1.0, "name": "MP"}
+ ]
+ },
+ "Samtec_UMPS-05-xx.x-x-VT-SM_2x05_P2.0mm_Vertical": {
+ "inherit": "Samtec_UMPS-02-xx.x-x-VT-SM_2x02_P2.0mm_Vertical",
+ "layout": {"width": [15.05, 13.65]},
+ "pads": {"n": 5}
+ },
+ "Samtec_UMPS-05-xx.x-x-VT-SM-WT_2x05-1MP_P2.0mm_Vertical": {
+ "inherit": "Samtec_UMPS-05-xx.x-x-VT-SM_2x05_P2.0mm_Vertical",
+ "meta": {"+tags": " weld-tab"},
+ "holes": [
+ {"drill": 0.8, "pad": 1.3, "x": -6.0, "y": 0.5, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": -6.0, "y": -1.5, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": 6.0, "y": 1.0, "name": "MP"},
+ {"drill": 0.8, "pad": 1.3, "x": 6.0, "y": -1.0, "name": "MP"}
+ ]
+ }
+}
diff --git a/scripts/Connector/Connector_Samtec/mPOWER_Vertical.py b/scripts/Connector/Connector_Samtec/mPOWER_Vertical.py
new file mode 100755
index 000000000..739ef6db7
--- /dev/null
+++ b/scripts/Connector/Connector_Samtec/mPOWER_Vertical.py
@@ -0,0 +1,252 @@
+#!/usr/bin/python
+
+# This file is part of kicad-footprint-generator.
+#
+# kicad-footprint-generator is free software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# kicad-footprint-generator is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details. You should have received a copy of the GNU General Public
+# License along with kicad-footprint-generator. If not, see
+# .
+#
+# Copyright (C) 2020 by Caleb Reister
+#
+
+import sys
+import os
+import argparse
+from copy import deepcopy
+import math
+import yaml
+
+# Load parent path of KicadModTree
+sys.path.append(os.path.join(sys.path[0], "..", "..", ".."))
+sys.path.append(os.path.join(sys.path[0], "..", "..", "tools"))
+
+from KicadModTree import *
+from footprint_text_fields import addTextFields
+from helpers import *
+from dict_tools import *
+
+def generate_one_footprint(param, config, default_lib):
+ fp = Footprint(param['name'])
+ mode = param['layout']['type'].capitalize()
+ #if mode != "Terminal" or mode != "Socket":
+ # raise ValueError("Connector type must be either 'Terminal' or 'Socket'")
+
+ # Pad parameters
+ pitch = param['pads']['pitch']
+ pad_w = param['pads']['width']
+ pad_h = param['pads']['height']
+ pins = param['pads']['n'] # Pin count
+
+ ############################################################################
+ # Place pads
+ pin = []
+ for p in range(pins):
+ # Compute next pad location
+ pos = (-pins*pitch/2 + pitch/2 + p*pitch, 0)
+ pin.append(pos)
+
+ # Create pad
+ pad = Pad(number = str(p+1),
+ at = pos,
+ size = (pad_w, pad_h),
+ type = Pad.TYPE_SMT,
+ layers = Pad.LAYERS_SMT,
+ shape = Pad.SHAPE_RECT)
+ fp.append(pad)
+
+ ############################################################################
+ # Holes
+ for p in param.get('holes', {}):
+ h = [Pad(number = p.get('name', ""),
+ at = (p['x'], p['y']),
+ drill = p['drill'],
+ size = p.get('pad', p['drill']),
+ type = Pad.TYPE_THT if 'pad' in p else Pad.TYPE_NPTH,
+ layers = Pad.LAYERS_THT if 'pad' in p else Pad.LAYERS_NPTH,
+ shape = Pad.SHAPE_CIRCLE)]
+ fp.extend(h)
+
+ ############################################################################
+ # Fabrication layer: F.Fab
+ fab_line = config['fab_line_width']
+ fab_mark = config['fab_pin1_marker_length']
+ fab_w = param['layout']['width']
+ fab_h = param['layout']['height']
+
+ if mode == "Terminal":
+ chamfer = 0.085*fab_h
+ outline = [(-fab_w[0]/2 + chamfer, -fab_h/2),
+ (-fab_w[0]/2, -fab_h/2 + chamfer),
+ (-fab_w[0]/2, fab_h/2),
+ ( fab_w[0]/2, fab_h/2),
+ ( fab_w[0]/2, -fab_h/2),
+ (-fab_w[0]/2 + chamfer, -fab_h/2)]
+ elif mode == "Socket":
+ chamfer = 0.1*fab_h
+ outline = [(-fab_w[0]/2, -fab_h/2),
+ (-fab_w[0]/2, -fab_h/2 + (fab_w[0]-fab_w[1])/2),
+ (-fab_w[1]/2, -fab_h/2 + (fab_w[0]-fab_w[1])/2),
+ (-fab_w[1]/2, fab_h/2 - chamfer),
+ (-fab_w[1]/2 + chamfer, fab_h/2),
+ ( fab_w[1]/2, fab_h/2),
+ ( fab_w[1]/2, -fab_h/2 + (fab_w[0]-fab_w[1])/2),
+ ( fab_w[0]/2, -fab_h/2 + (fab_w[0]-fab_w[1])/2),
+ ( fab_w[0]/2, -fab_h/2),
+ (-fab_w[0]/2, -fab_h/2)]
+
+ fp.append(PolygoneLine(nodes = outline,
+ layer = "F.Fab",
+ width = fab_line))
+
+ ############################################################################
+ # Silkscreen: F.SilkS
+ silk_offset = config['silk_fab_offset']
+ silk_pad = {'x': config['silk_pad_clearance'] + pad_w/2,
+ 'y': config['silk_pad_clearance'] + pad_h/2}
+ silk_line = config['silk_line_width']
+ silk_w = [w + 2*silk_offset for w in fab_w]
+ silk_h = fab_h + 2*silk_offset
+ silk_chamfer = chamfer + silk_offset/2
+
+ if mode == "Terminal":
+ silk_outline = [(-silk_w[0]/2 + silk_chamfer, -silk_h/2),
+ (-silk_w[0]/2, -silk_h/2 + silk_chamfer),
+ (-silk_w[0]/2, silk_h/2),
+ ( silk_w[0]/2, silk_h/2),
+ ( silk_w[0]/2, -silk_h/2),
+ (-silk_w[0]/2 + silk_chamfer, -silk_h/2)]
+ elif mode == "Socket":
+ silk_outline = [(-silk_w[0]/2, -silk_h/2),
+ (-silk_w[0]/2, -silk_h/2 + (silk_w[0]-silk_w[1])/2 + 2*silk_offset),
+ (-silk_w[1]/2, -silk_h/2 + (silk_w[0]-silk_w[1])/2 + 2*silk_offset),
+ (-silk_w[1]/2, silk_h/2 - silk_chamfer),
+ (-silk_w[1]/2 + silk_chamfer, silk_h/2),
+ ( silk_w[1]/2, silk_h/2),
+ ( silk_w[1]/2, -silk_h/2 + (silk_w[0]-silk_w[1])/2 + 2*silk_offset),
+ ( silk_w[0]/2, -silk_h/2 + (silk_w[0]-silk_w[1])/2 + 2*silk_offset),
+ ( silk_w[0]/2, -silk_h/2),
+ (-silk_w[0]/2, -silk_h/2)]
+
+ fp.append(PolygoneLine(nodes = silk_outline,
+ layer = "F.SilkS",
+ width = silk_line))
+
+ ############################################################################
+ # Courtyard: F.CrtYd
+ court_line = config['courtyard_line_width']
+ court_grid = config['courtyard_grid']
+ court_offset = config['courtyard_offset']['connector']
+
+
+ court_x = roundToBase(fab_w[0]/2 + court_offset, court_grid)
+ court_y = roundToBase(fab_h/2 + court_offset, court_grid)
+
+ fp.append(RectLine(start = (-court_x, -court_y),
+ end = ( court_x, court_y),
+ layer = "F.CrtYd",
+ width = court_line))
+
+ ############################################################################
+ # Set Metadata
+ # Draw reference and value
+ text_y = court_y + 1.0
+ fp.append(Text(type = 'reference', text = 'REF**',
+ at = (0, -text_y),
+ layer = "F.SilkS"))
+ fp.append(Text(type = 'user', text = '%R',
+ at = (0, -text_y),
+ layer = "F.Fab"))
+ fp.append(Text(type = 'value', text=param['name'],
+ at = (0, text_y),
+ layer="F.Fab"))
+
+ # Set surface-mount attribute
+ fp.setAttribute('smd')
+
+ # Part number
+ partnum = param['meta'].get('pn', param['name'].split('_')[1])
+
+ # Description
+ desc = param['meta']['description']
+ desc = desc.format(pn = partnum,
+ pitch = pitch)
+ fp.setDescription(desc + ", generated with kicad-footprint-generator"
+ + ", " + param['meta']['datasheet'])
+
+ # Tags
+ tags = param['meta']['tags']
+ fp.setTags(tags)
+
+ # 3D model path
+ library = param.get('library', default_lib)
+ model_path = os.path.join("${KISYS3DMOD}",
+ library+".3dshapes",
+ param['name'] + ".wrl")
+ fp.append(Model(filename = model_path))
+
+ ############################################################################
+ # Write kicad_mod file
+ os.makedirs(library+'.pretty', exist_ok=True)
+ filename = os.path.join(library+'.pretty', param['name']+'.kicad_mod')
+ KicadFileHandler(fp).writeFile(filename)
+
+################################################################################
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--global-config', type=str, nargs='?',
+ default='../../tools/global_config_files/config_KLCv3.0.yaml',
+ help='Global KLC configuration YAML file')
+ parser.add_argument('--series-config', type=str, nargs='?',
+ default='../conn_config_KLCv3.yaml',
+ help='Series KLC configuration YAML file')
+ parser.add_argument('--library', type=str, nargs='?',
+ default='Connector_Samtec',
+ help='Default KiCad library name (without extension)')
+ parser.add_argument('files', metavar='file', type=str, nargs='*',
+ help='YAML file(s) containing footprint parameters')
+ args = parser.parse_args()
+
+ with open(args.global_config, 'r') as config_stream:
+ try:
+ config = yaml.safe_load(config_stream)
+ except yaml.YAMLError as exc:
+ print(exc)
+ with open(args.series_config, 'r') as config_stream:
+ try:
+ config.update(yaml.safe_load(config_stream))
+ except yaml.YAMLError as exc:
+ print(exc)
+
+ if len(args.files) == 0:
+ parser.print_help()
+ sys.exit(1)
+
+ print("Default Library:", args.library)
+ for path in args.files:
+ print("Reading", path)
+ with open(path, 'r') as stream:
+ try:
+ footprints = yaml.safe_load(stream)
+ if footprints is None:
+ print(path, "empty, skipping...")
+ continue
+ dictInherit(footprints)
+ for fp_name in footprints:
+ fp_params = footprints.get(fp_name)
+ if 'name' in fp_params:
+ print("WARNING: setting 'name' to", fp_name)
+ fp_params['name'] = fp_name
+ print(" - ",
+ fp_params.get('library', args.library), ".pretty/",
+ fp_name, ".kicad_mod", sep="")
+ generate_one_footprint(fp_params, config, args.library)
+ except yaml.YAMLError as exc:
+ print(exc)
diff --git a/scripts/TerminalBlock_WAGO/make_TerminalBlock_WAGO.py b/scripts/TerminalBlock_WAGO/make_TerminalBlock_WAGO.py
index e3b160202..a0d45fdba 100644
--- a/scripts/TerminalBlock_WAGO/make_TerminalBlock_WAGO.py
+++ b/scripts/TerminalBlock_WAGO/make_TerminalBlock_WAGO.py
@@ -27,7 +27,7 @@
- pins=[1,2,3,4,5,6,7,8,9,10,12,16,24]
+ pins=[1,2,3,4,5,6,7,8,9,10,11,12,16,24]
rm=7.5
package_height=15
leftbottom_offset=[2.75, 6.7, 3.75]
@@ -76,7 +76,7 @@
- pins=[1,2,3,4,5,6,7,8,9,10,12,16,24]
+ pins=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,24]
rm=5
package_height=15
leftbottom_offset=[2.75, 6.7, 3.75]
@@ -122,7 +122,7 @@
tags_additional=[], lib_name="${KISYS3DMOD}/"+classname, classname=classname, classname_description=classname_description, webpage=webpage, script_generated_note=script_generated_note)
- pins=[1,2,3,4,6,8,12,16,24,36,48]
+ pins=[1,2,3,4,5,6,7,8,9,12,14,16,24,36,48]
rm=5
package_height=14
leftbottom_offset=[3.5, 9, 3.8]
@@ -172,7 +172,7 @@
nibbleSize=nibbleSize, nibblePos=nibblePos, fabref_offset=fabref_offset,
tags_additional=[], lib_name="${KISYS3DMOD}/"+classname, classname=classname, classname_description=classname_description, webpage=webpage, script_generated_note=script_generated_note)
- pins=[1,2,3,4,6,8,12,16,24]
+ pins=[1,2,3,4,5,6,7,8,9,12,16,24]
rm=7.5
package_height=14
leftbottom_offset=[3.5, 9, 6.3]
@@ -222,7 +222,7 @@
nibbleSize=nibbleSize, nibblePos=nibblePos, fabref_offset=fabref_offset,
tags_additional=[], lib_name="${KISYS3DMOD}/"+classname, classname=classname, classname_description=classname_description, webpage=webpage, script_generated_note=script_generated_note)
- pins=[1,2,3,4,6,8,12,16,24]
+ pins=[1,2,3,4,5,6,8,9,12,16,24]
rm=10
package_height=14
leftbottom_offset=[3.5, 9, 8.8]
diff --git a/scripts/tools/dict_tools.py b/scripts/tools/dict_tools.py
index d7b7cf61b..9371eae95 100644
--- a/scripts/tools/dict_tools.py
+++ b/scripts/tools/dict_tools.py
@@ -10,18 +10,19 @@ def dictMerge(a, b):
of clobbering the contents of one dictionary with another, it recursively
combines dictionaries. The result is a dictionary containing the combined
contents of the arguments. If both dictionaries contain a key with the same
- name (at the same level), the value in `b` takes precedence.
+ name (at the same level), the value in `b` takes precedence. Keys prefixed
+ with a "+" are added to the corresponding key in the base dictionary.
Parameters
----------
a : dict
- Base dictionary used as the merge destination
+ Base dictionary
b : dict
Dictionary containing values to merge into `a`
Returns
-------
- Merged dictionaries (`a` with contents updated from `b`)
+ Merged dictionaries (copy of `a` with contents updated from `b`)
Examples
--------
@@ -30,12 +31,15 @@ def dictMerge(a, b):
>>> dictMerge(a, b)
{'a': 1, 'b': 2, 'c': {'a': 1, 'b': 3}, 'd': 4}
"""
- for (k, v) in b.items():
- if isinstance(v, collections.abc.Mapping):
- a[k] = dictMerge(a.get(k, {}), v)
+ c = copy.deepcopy(a)
+ for k in b:
+ if isinstance(b[k], collections.abc.Mapping):
+ c[k] = dictMerge(c.get(k, {}), b[k])
+ elif k.startswith("+"):
+ c[k[1:]] += b[k]
else:
- a[k] = v
- return a
+ c[k] = copy.copy(b[k])
+ return c
def dictInherit(d):
"""Recursively merges dictionaries within a hierarchy using 'inherit' entries
@@ -63,57 +67,19 @@ def dictInherit(d):
If two dictionaries attempt to inherit each other
KeyError
If a dictionary tries to inherit from a key that is not in `d`
-
- Notes
- -----
- Typical JSON/YAML file structure that can be processed by this function:
- {
- "1": {
- "a": 1,
- "b": {"c": 2, "d": 3, ...}
- },
- "2": {
- "inherit": "1",
- "b": {"c": 3}
- },
- ...
- "n": {
- "inherit": "2",
- "d": 4
- }
- }
-
- The result will look something like this:
- {
- "1": {
- "a": 1,
- "b": {"c": 2, "d": 3, ...}
- },
- "2": {
- "a": 1,
- "b": {"c": 3, "d": 3, ...}
- },
- ...
- "n": {
- "a": 1,
- "b": {"c": 3, "d": 3, ...},
- "d": 4
- }
- }
"""
- def dictInherit(d, child, parent):
+ def _dictInherit(d, child, parent):
if 'inherit' not in parent:
del child['inherit']
- p = copy.deepcopy(parent)
- return dictMerge(p, child)
+ return dictMerge(parent, child)
elif d[parent['inherit']] is child:
raise RecursionError
else:
- return dictInherit(d, parent, d[parent['inherit']])
+ return _dictInherit(d, parent, d[parent['inherit']])
for (k, v) in d.items():
if isinstance(v, collections.abc.Mapping) and 'inherit' in v:
- d[k] = dictInherit(d, v, d[v['inherit']])
+ d[k] = _dictInherit(d, v, d[v['inherit']])
else:
continue