ecadlib 0.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. ecadlib/__init__.py +3 -0
  2. ecadlib/__main__.py +5 -0
  3. ecadlib/a365_sync.py +637 -0
  4. ecadlib/agent.py +1407 -0
  5. ecadlib/agent_queue.py +780 -0
  6. ecadlib/agent_watch.py +732 -0
  7. ecadlib/altium365.py +385 -0
  8. ecadlib/altium_dblib_sync.py +530 -0
  9. ecadlib/altium_export.py +209 -0
  10. ecadlib/altium_forms.py +768 -0
  11. ecadlib/altium_lib.py +1089 -0
  12. ecadlib/altium_menu.py +1751 -0
  13. ecadlib/altium_pkg.py +396 -0
  14. ecadlib/altium_project.py +1095 -0
  15. ecadlib/app.py +1458 -0
  16. ecadlib/approvals.py +395 -0
  17. ecadlib/assets/demo_bom.csv +8 -0
  18. ecadlib/assets/kicad_action_plugin.py +607 -0
  19. ecadlib/assets/kicad_reread.py +60 -0
  20. ecadlib/assets/pcblib_template.json.gz +0 -0
  21. ecadlib/bom_inputs.py +339 -0
  22. ecadlib/bom_triage.py +519 -0
  23. ecadlib/cad_model.py +528 -0
  24. ecadlib/cfb.py +171 -0
  25. ecadlib/cli.py +185 -0
  26. ecadlib/clihelp.py +149 -0
  27. ecadlib/cliutil.py +119 -0
  28. ecadlib/completion.py +173 -0
  29. ecadlib/costs.py +276 -0
  30. ecadlib/crosscheck.py +412 -0
  31. ecadlib/datasheet.py +2168 -0
  32. ecadlib/dedupe.py +572 -0
  33. ecadlib/detect.py +170 -0
  34. ecadlib/doctor.py +450 -0
  35. ecadlib/ds_route.py +541 -0
  36. ecadlib/eagle_export.py +1409 -0
  37. ecadlib/easy_setup.py +338 -0
  38. ecadlib/easyeda_convert.py +386 -0
  39. ecadlib/easyeda_pro_export.py +972 -0
  40. ecadlib/eval/__init__.py +0 -0
  41. ecadlib/eval/baselines/kicad-v1.json +404 -0
  42. ecadlib/eval/build_set.py +299 -0
  43. ecadlib/eval/cli.py +119 -0
  44. ecadlib/eval/gate.py +358 -0
  45. ecadlib/eval/golden/demo.txt +379 -0
  46. ecadlib/eval/golden/specs.txt +3120 -0
  47. ecadlib/eval/golden/testpack.txt +463 -0
  48. ecadlib/eval/golden.py +446 -0
  49. ecadlib/eval/replay/kicad-v1.json.gz +0 -0
  50. ecadlib/eval/runner.py +456 -0
  51. ecadlib/eval/score.py +179 -0
  52. ecadlib/eval/sets/kicad-v1.json +630 -0
  53. ecadlib/firstrun.py +400 -0
  54. ecadlib/footprint_adv.py +1006 -0
  55. ecadlib/footprint_bench.py +218 -0
  56. ecadlib/footprint_check.py +562 -0
  57. ecadlib/footprint_gen.py +582 -0
  58. ecadlib/footprint_rules.py +1092 -0
  59. ecadlib/forge.py +267 -0
  60. ecadlib/fp_share.py +95 -0
  61. ecadlib/fp_tidy.py +389 -0
  62. ecadlib/fsutil.py +62 -0
  63. ecadlib/house_style.py +1051 -0
  64. ecadlib/httpcache.py +124 -0
  65. ecadlib/hub.py +1490 -0
  66. ecadlib/hub_copy.py +161 -0
  67. ecadlib/hub_tools.py +79 -0
  68. ecadlib/kicad_dblib.py +257 -0
  69. ecadlib/kicad_export.py +837 -0
  70. ecadlib/kicad_import.py +913 -0
  71. ecadlib/kicad_index.py +160 -0
  72. ecadlib/kicad_menu.py +193 -0
  73. ecadlib/kicad_pcm.py +475 -0
  74. ecadlib/launcher.py +156 -0
  75. ecadlib/librarian.py +963 -0
  76. ecadlib/lifecycle.py +691 -0
  77. ecadlib/llm/__init__.py +276 -0
  78. ecadlib/llm/cli.py +70 -0
  79. ecadlib/llm/openai_compat.py +214 -0
  80. ecadlib/llm/profiles.py +245 -0
  81. ecadlib/llm/rails.py +570 -0
  82. ecadlib/llm/run.py +126 -0
  83. ecadlib/llm/sampling.py +49 -0
  84. ecadlib/mcp_server.py +723 -0
  85. ecadlib/messages.py +419 -0
  86. ecadlib/migrate.py +407 -0
  87. ecadlib/notify.py +329 -0
  88. ecadlib/package_schema.json +1238 -0
  89. ecadlib/package_specs/CP_EIA-3216-18_Kemet-A.json +27 -0
  90. ecadlib/package_specs/C_0402_1005Metric.json +22 -0
  91. ecadlib/package_specs/C_0805_2012Metric.json +22 -0
  92. ecadlib/package_specs/DFN-8-1EP_3x3mm_P0.5mm_EP1.66x2.38mm.json +40 -0
  93. ecadlib/package_specs/D_SMA.json +27 -0
  94. ecadlib/package_specs/D_SMB.json +27 -0
  95. ecadlib/package_specs/D_SOD-123.json +43 -0
  96. ecadlib/package_specs/D_SOD-323.json +43 -0
  97. ecadlib/package_specs/LED_0603_1608Metric.json +23 -0
  98. ecadlib/package_specs/LED_0805_2012Metric.json +23 -0
  99. ecadlib/package_specs/LQFP-48_7x7mm_P0.5mm.json +31 -0
  100. ecadlib/package_specs/L_0805_2012Metric.json +22 -0
  101. ecadlib/package_specs/MSOP-8_3x3mm_P0.65mm.json +31 -0
  102. ecadlib/package_specs/QFN-16-1EP_3x3mm_P0.5mm_EP1.75x1.75mm.json +39 -0
  103. ecadlib/package_specs/QFN-32-1EP_5x5mm_P0.5mm_EP3.45x3.45mm.json +37 -0
  104. ecadlib/package_specs/R_0402_1005Metric.json +22 -0
  105. ecadlib/package_specs/R_0603_1608Metric.json +22 -0
  106. ecadlib/package_specs/R_0805_2012Metric.json +22 -0
  107. ecadlib/package_specs/R_1206_3216Metric.json +22 -0
  108. ecadlib/package_specs/SOIC-16_3.9x9.9mm_P1.27mm.json +32 -0
  109. ecadlib/package_specs/SOIC-8_3.9x4.9mm_P1.27mm.json +32 -0
  110. ecadlib/package_specs/SOT-223-3_TabPin2.json +56 -0
  111. ecadlib/package_specs/SOT-23-5.json +57 -0
  112. ecadlib/package_specs/SOT-23-6.json +62 -0
  113. ecadlib/package_specs/SOT-23.json +48 -0
  114. ecadlib/package_specs/TSSOP-16_4.4x5mm_P0.65mm.json +31 -0
  115. ecadlib/package_specs/VQFN-16-1EP_3x3mm_P0.5mm_EP1.68x1.68mm.json +39 -0
  116. ecadlib/package_specs/advanced/BGA-100_11.0x11.0mm_Layout10x10_P1.0mm_Ball0.5mm_Pad0.4mm_NSMD.json +26 -0
  117. ecadlib/package_specs/advanced/BGA-121_9.0x9.0mm_Layout11x11_P0.8mm_Ball0.4mm_Pad0.35mm_NSMD.json +26 -0
  118. ecadlib/package_specs/advanced/BGA-144_7.0x7.0mm_Layout13x13_P0.5mm_Ball0.3mm_Pad0.25mm_NSMD.json +29 -0
  119. ecadlib/package_specs/advanced/BGA-169_11.0x11.0mm_Layout13x13_P0.8mm_Ball0.5mm_Pad0.4mm_NSMD.json +23 -0
  120. ecadlib/package_specs/advanced/BGA-256_11.0x11.0mm_Layout20x20_P0.5mm_Ball0.3mm_Pad0.25mm_NSMD.json +26 -0
  121. ecadlib/package_specs/advanced/BGA-256_17.0x17.0mm_Layout16x16_P1.0mm_Ball0.5mm_Pad0.4mm_NSMD.json +26 -0
  122. ecadlib/package_specs/advanced/BGA-324_15.0x15.0mm_Layout18x18_P0.8mm_Ball0.5mm_Pad0.4mm_NSMD.json +26 -0
  123. ecadlib/package_specs/advanced/BGA-36_3.396x3.466mm_Layout6x6_P0.4mm_Ball0.25mm_Pad0.2mm_NSMD.json +24 -0
  124. ecadlib/package_specs/advanced/BGA-672_27.0x27.0mm_Layout26x26_P1.0mm_Ball0.6mm_Pad0.5mm_NSMD.json +32 -0
  125. ecadlib/package_specs/advanced/BGA-68_5.0x5.0mm_Layout9x9_P0.5mm_Ball0.3mm_Pad0.25mm_NSMD.json +30 -0
  126. ecadlib/package_specs/advanced/BGA-90_8.0x13.0mm_Layout2x3x15_P0.8mm.json +26 -0
  127. ecadlib/package_specs/advanced/DFN-8-1EP_3x3mm_P0.5mm_EP1.65x2.38mm_ThermalVias.json +60 -0
  128. ecadlib/package_specs/advanced/Example_Custom_LPad_Slot.json +24 -0
  129. ecadlib/package_specs/advanced/JST_GH_SM04B-GHS-TB_1x04-1MP_P1.25mm_Horizontal.json +49 -0
  130. ecadlib/package_specs/advanced/JST_PH_B4B-PH-K_1x04_P2.00mm_Vertical.json +33 -0
  131. ecadlib/package_specs/advanced/JST_PH_S4B-PH-SM4-TB_1x04-1MP_P2.00mm_Horizontal.json +55 -0
  132. ecadlib/package_specs/advanced/JST_SH_SM04B-SRSS-TB_1x04-1MP_P1.00mm_Horizontal.json +49 -0
  133. ecadlib/package_specs/advanced/JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical.json +34 -0
  134. ecadlib/package_specs/advanced/JST_XH_B4B-XH-A_1x04_P2.50mm_Vertical.json +34 -0
  135. ecadlib/package_specs/advanced/JST_XH_B6B-XH-A_1x06_P2.50mm_Vertical.json +33 -0
  136. ecadlib/package_specs/advanced/LFBGA-144_10x10mm_Layout12x12_P0.8mm.json +23 -0
  137. ecadlib/package_specs/advanced/Molex_KK-254_AE-6410-04A_1x04_P2.54mm_Vertical.json +34 -0
  138. ecadlib/package_specs/advanced/Molex_PicoBlade_53398-0471_1x04-1MP_P1.25mm_Vertical.json +54 -0
  139. ecadlib/package_specs/advanced/PinHeader_1x05_P1.00mm_Vertical_SMD_Pin1Left.json +14 -0
  140. ecadlib/package_specs/advanced/PinHeader_1x05_P1.27mm_Vertical_SMD_Pin1Left.json +14 -0
  141. ecadlib/package_specs/advanced/PinHeader_1x05_P2.00mm_Vertical.json +12 -0
  142. ecadlib/package_specs/advanced/PinHeader_1x05_P2.00mm_Vertical_SMD_Pin1Left.json +14 -0
  143. ecadlib/package_specs/advanced/PinHeader_1x05_P2.54mm_Vertical.json +12 -0
  144. ecadlib/package_specs/advanced/PinHeader_1x05_P2.54mm_Vertical_SMD_Pin1Left.json +25 -0
  145. ecadlib/package_specs/advanced/PinHeader_1x05_P2.54mm_Vertical_SMD_Pin1Right.json +14 -0
  146. ecadlib/package_specs/advanced/PinHeader_1x10_P1.00mm_Vertical.json +15 -0
  147. ecadlib/package_specs/advanced/PinHeader_2x05_P1.00mm_Vertical_SMD.json +13 -0
  148. ecadlib/package_specs/advanced/PinHeader_2x05_P1.27mm_Vertical.json +18 -0
  149. ecadlib/package_specs/advanced/PinHeader_2x05_P1.27mm_Vertical_SMD.json +24 -0
  150. ecadlib/package_specs/advanced/PinHeader_2x05_P2.00mm_Vertical_SMD.json +13 -0
  151. ecadlib/package_specs/advanced/PinHeader_2x05_P2.54mm_Vertical.json +12 -0
  152. ecadlib/package_specs/advanced/PinHeader_2x05_P2.54mm_Vertical_SMD.json +24 -0
  153. ecadlib/package_specs/advanced/PinHeader_2x20_P2.54mm_Vertical.json +12 -0
  154. ecadlib/package_specs/advanced/QFN-16-1EP_3x3mm_P0.5mm_EP1.75x1.75mm_ThermalVias.json +87 -0
  155. ecadlib/package_specs/advanced/UFBGA-132_7x7mm_Layout12x12_P0.5mm.json +43 -0
  156. ecadlib/package_specs/advanced/USB_C_Receptacle_HRO_TYPE-C-31-M-12.json +218 -0
  157. ecadlib/package_specs/standard.json.gz +0 -0
  158. ecadlib/parity.py +1204 -0
  159. ecadlib/parts_export.py +154 -0
  160. ecadlib/partview.py +215 -0
  161. ecadlib/plugins.py +231 -0
  162. ecadlib/providers.py +226 -0
  163. ecadlib/rebuild.py +471 -0
  164. ecadlib/release_check.py +437 -0
  165. ecadlib/reports.py +274 -0
  166. ecadlib/resolve.py +556 -0
  167. ecadlib/review_cli.py +292 -0
  168. ecadlib/rules.py +979 -0
  169. ecadlib/rules_infer.py +1205 -0
  170. ecadlib/sexpr.py +149 -0
  171. ecadlib/sheetsafe.py +65 -0
  172. ecadlib/sim_models.py +1087 -0
  173. ecadlib/sourcing.py +1161 -0
  174. ecadlib/stdparts.py +755 -0
  175. ecadlib/step_gen.py +929 -0
  176. ecadlib/symbol_layout.py +798 -0
  177. ecadlib/team.py +558 -0
  178. ecadlib/team_setup.py +288 -0
  179. ecadlib/term.py +420 -0
  180. ecadlib/term_views.py +64 -0
  181. ecadlib/testpack.py +334 -0
  182. ecadlib/ui/__init__.py +1 -0
  183. ecadlib/ui/__main__.py +3 -0
  184. ecadlib/ui/server.py +1029 -0
  185. ecadlib/ui/static/hairline.js +2 -0
  186. ecadlib/ui/static/index.html +2098 -0
  187. ecadlib/ui/static/setup.html +294 -0
  188. ecadlib/upkeep.py +717 -0
  189. ecadlib/upstream.py +573 -0
  190. ecadlib/userconfig.py +257 -0
  191. ecadlib/visual_check.py +1603 -0
  192. ecadlib/ws_status.py +203 -0
  193. ecadlib-0.3.0.dist-info/METADATA +2245 -0
  194. ecadlib-0.3.0.dist-info/RECORD +199 -0
  195. ecadlib-0.3.0.dist-info/WHEEL +5 -0
  196. ecadlib-0.3.0.dist-info/entry_points.txt +2 -0
  197. ecadlib-0.3.0.dist-info/licenses/LICENSE +21 -0
  198. ecadlib-0.3.0.dist-info/licenses/NOTICE +53 -0
  199. ecadlib-0.3.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1238 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://example.org/ecadlib/package_schema.json",
4
+ "title": "ECAD package mechanical dimensions (IPC-7351B land-pattern input)",
5
+ "description": "Contract an LLM fills from a datasheet mechanical drawing. All lengths in millimetres. Give each dimension as min/max where the drawing shows a range (preferred), or nom (+ optional tol = symmetric +/-). Never guess: if a value is not on the drawing, omit it and list it in 'unresolved'. Orientation: pin 1 top-left; X axis = across the pad rows (lead span), Y axis = along a pin row. Ball grids (bga), pin headers, connectors and odd shapes (custom) use the fields marked for them; connector and custom parts are given as a pad_table copied from the datasheet's recommended land pattern / PCB layout drawing.",
6
+ "type": "object",
7
+ "required": [
8
+ "name",
9
+ "package_type"
10
+ ],
11
+ "additionalProperties": false,
12
+ "$defs": {
13
+ "dim": {
14
+ "description": "A toleranced dimension in mm. Either {min,max} (optionally nom) or {nom, tol}.",
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "properties": {
18
+ "min": {
19
+ "type": "number",
20
+ "minimum": 0
21
+ },
22
+ "nom": {
23
+ "type": "number",
24
+ "minimum": 0
25
+ },
26
+ "max": {
27
+ "type": "number",
28
+ "minimum": 0
29
+ },
30
+ "tol": {
31
+ "type": "number",
32
+ "minimum": 0,
33
+ "description": "symmetric +/- tolerance around nom"
34
+ }
35
+ },
36
+ "anyOf": [
37
+ {
38
+ "required": [
39
+ "min",
40
+ "max"
41
+ ]
42
+ },
43
+ {
44
+ "required": [
45
+ "nom"
46
+ ]
47
+ }
48
+ ]
49
+ }
50
+ },
51
+ "properties": {
52
+ "name": {
53
+ "type": "string",
54
+ "pattern": "^[A-Za-z0-9_.+-]+$",
55
+ "description": "Footprint name, KiCad style, e.g. SOIC-8_3.9x4.9mm_P1.27mm"
56
+ },
57
+ "description": {
58
+ "type": "string"
59
+ },
60
+ "package_type": {
61
+ "enum": [
62
+ "chip",
63
+ "molded",
64
+ "gullwing",
65
+ "qfp",
66
+ "qfn",
67
+ "bga",
68
+ "pin_header",
69
+ "connector",
70
+ "custom"
71
+ ],
72
+ "description": "chip = 2-terminal rectangular end-cap (R/C/L/LED 0201..2512); molded = 2-terminal molded body with terminals bent under it (tantalum caps, SMA/SMB/SMC diodes, power inductors); gullwing = leads out of the body sides (SOIC/SOP/TSSOP/MSOP/SOT-23/SOT-223/SOD-123, use pin_positions for uneven layouts); qfp = gull-wing leads on four sides (QFP/LQFP/TQFP), lead_span is the tip-to-tip span; qfn = quad/dual flat no-lead (QFN/DFN/SON) with optional exposed pad; bga = BGA/LGA/CSP/WLCSP ball or land grid (rows x cols, pitch, ball_diameter, depopulated balls or ball_map); pin_header = 1- or 2-column pin header/socket strip (cols, rows, pitch; mount tht or smd); connector = any connector given as a pad_table from the datasheet's recommended PCB layout (signal pads, mounting pads MP, shield tabs SH, holes, slots); custom = anything else (odd shapes: polygon pads, slots, big pads with split paste / thermal vias) as a pad_table"
73
+ },
74
+ "pin_count": {
75
+ "type": "integer",
76
+ "minimum": 2,
77
+ "description": "Signal pins, excluding exposed pad. chip: 2. bga: populated balls. pin_header: cols x rows. connector/custom: distinct numbered pins, not counting mounting pads (MP), shield tabs (SH) or holes."
78
+ },
79
+ "pitch": {
80
+ "type": "number",
81
+ "exclusiveMinimum": 0,
82
+ "description": "Lead pitch e (gullwing/qfn/qfp); bga: ball pitch along a row (column to column); pin_header: pin pitch; connector: signal pin pitch (used to size through-hole pads and to check the table)"
83
+ },
84
+ "body_length": {
85
+ "$ref": "#/$defs/dim",
86
+ "description": "chip: overall length L (terminal end to end, = lead span). gullwing: body length D along the pin rows (Y). qfn: body size along X (D). bga/connector/custom/pin_header: body size along X (left-right in the top view)."
87
+ },
88
+ "body_width": {
89
+ "$ref": "#/$defs/dim",
90
+ "description": "chip: width W. gullwing: body width E1 (X, excluding leads). qfn: body size along Y (E). bga/connector/custom/pin_header: body size along Y."
91
+ },
92
+ "lead_span": {
93
+ "$ref": "#/$defs/dim",
94
+ "description": "gullwing only: tip-to-tip lead span E (X). For chip it equals body_length; for qfn it equals body sizes."
95
+ },
96
+ "terminal_length": {
97
+ "$ref": "#/$defs/dim",
98
+ "description": "chip: end-cap band length T. gullwing: foot length L (flat contact). qfn: terminal length L."
99
+ },
100
+ "inner_span": {
101
+ "$ref": "#/$defs/dim",
102
+ "description": "chip/molded: inner gap S between the terminals when the drawing gives it directly (LED and molded drawings often do); used instead of body_length - 2*terminal_length"
103
+ },
104
+ "terminal_width": {
105
+ "$ref": "#/$defs/dim",
106
+ "description": "gullwing/qfn: lead width b. chip/molded: terminal width when narrower than the body (e.g. SMA/tantalum); omit to use body_width."
107
+ },
108
+ "height_max": {
109
+ "type": "number",
110
+ "description": "A max (seated height); used for 3D/descr only"
111
+ },
112
+ "pins_left_right": {
113
+ "type": "integer",
114
+ "minimum": 0,
115
+ "description": "qfn: pins on each of the left and right sides (default pin_count/4)"
116
+ },
117
+ "pins_top_bottom": {
118
+ "type": "integer",
119
+ "minimum": 0,
120
+ "description": "qfn: pins on each of the top and bottom sides (default pin_count/4)"
121
+ },
122
+ "exposed_pad": {
123
+ "type": "object",
124
+ "additionalProperties": false,
125
+ "required": [
126
+ "length",
127
+ "width"
128
+ ],
129
+ "properties": {
130
+ "length": {
131
+ "$ref": "#/$defs/dim",
132
+ "description": "EP size along X (D2)"
133
+ },
134
+ "width": {
135
+ "$ref": "#/$defs/dim",
136
+ "description": "EP size along Y (E2)"
137
+ },
138
+ "paste_coverage": {
139
+ "type": "number",
140
+ "minimum": 0.2,
141
+ "maximum": 1.0,
142
+ "default": 0.6
143
+ },
144
+ "paste_grid": {
145
+ "type": "integer",
146
+ "minimum": 1,
147
+ "maximum": 6,
148
+ "description": "N x N paste windows; default auto"
149
+ },
150
+ "number": {
151
+ "description": "EP pad number; default pin_count+1",
152
+ "type": [
153
+ "string",
154
+ "integer"
155
+ ],
156
+ "pattern": "^[A-Za-z0-9_.+-]{1,16}$"
157
+ }
158
+ }
159
+ },
160
+ "density": {
161
+ "enum": [
162
+ "A",
163
+ "B",
164
+ "C"
165
+ ],
166
+ "default": "B",
167
+ "description": "IPC-7351B density level: A=most (max fillets), B=nominal, C=least"
168
+ },
169
+ "rows": {
170
+ "type": "integer",
171
+ "minimum": 1,
172
+ "description": "bga: number of ball rows (lettered A, B, C ... from the top; JEDEC skips I O Q S X Z). pin_header: pins in each column (along Y)."
173
+ },
174
+ "cols": {
175
+ "type": "integer",
176
+ "minimum": 1,
177
+ "description": "bga: number of ball columns (numbered 1, 2, 3 ... from the left). pin_header: 1 or 2 columns of pins."
178
+ },
179
+ "pitch_y": {
180
+ "type": "number",
181
+ "description": "bga: row-to-row pitch when it differs from pitch",
182
+ "exclusiveMinimum": 0
183
+ },
184
+ "ball_diameter": {
185
+ "$ref": "#/$defs/dim",
186
+ "description": "bga: ball diameter b (LGA: land/terminal diameter) as printed; the land is derived from the nominal size (IPC-7351B)"
187
+ },
188
+ "land_diameter": {
189
+ "$ref": "#/$defs/dim",
190
+ "description": "bga: the datasheet's recommended PCB land (pad) diameter, when given; it replaces the IPC-7351B land. pin_header: through-hole pad diameter."
191
+ },
192
+ "ball_type": {
193
+ "enum": [
194
+ "collapsing",
195
+ "non_collapsing",
196
+ "lga"
197
+ ],
198
+ "default": "collapsing",
199
+ "description": "bga: collapsing (eutectic / SAC solder balls, most BGAs: land smaller than the ball), non_collapsing (high-melt or copper-core balls: land slightly larger), lga (flat lands, no balls)"
200
+ },
201
+ "land_style": {
202
+ "enum": [
203
+ "NSMD",
204
+ "SMD"
205
+ ],
206
+ "default": "NSMD",
207
+ "description": "bga: NSMD = non-solder-mask-defined (copper = land, mask opening larger; the usual choice), SMD = solder-mask-defined (copper larger, mask opening = land)"
208
+ },
209
+ "depopulated": {
210
+ "type": "array",
211
+ "items": {
212
+ "type": "string",
213
+ "pattern": "^[A-Za-z]{1,2}[0-9]{1,3}(:[A-Za-z]{1,2}[0-9]{1,3})?$"
214
+ },
215
+ "description": "bga: balls that are missing, by name (\"E5\") or as a rectangle of balls \"E5:H8\" (inclusive). Use this or ball_map."
216
+ },
217
+ "ball_map": {
218
+ "type": "array",
219
+ "items": {
220
+ "type": "string",
221
+ "pattern": "^[-.oOxX#*0-9 ]+$"
222
+ },
223
+ "description": "bga: the ball map, one string per row from row A down, one character per column from 1 (spaces ignored): any of O X # * 1 = ball, '-' or '.' or '0' = no ball."
224
+ },
225
+ "row_letters": {
226
+ "enum": [
227
+ "jedec",
228
+ "all"
229
+ ],
230
+ "default": "jedec",
231
+ "description": "bga: jedec = skip I O Q S X Z (JEP95, AA after Y); all = every letter (some older parts)"
232
+ },
233
+ "mount": {
234
+ "enum": [
235
+ "tht",
236
+ "smd"
237
+ ],
238
+ "default": "tht",
239
+ "description": "pin_header: through-hole (pin 1 at the footprint origin, KiCad style) or SMD"
240
+ },
241
+ "pin1_side": {
242
+ "enum": [
243
+ "left",
244
+ "right"
245
+ ],
246
+ "default": "left",
247
+ "description": "pin_header, single-row SMD: side of pin 1's pad (the pads alternate sides)"
248
+ },
249
+ "drill": {
250
+ "$ref": "#/$defs/dim",
251
+ "description": "pin_header: finished hole diameter (default from the pitch: 2.54 -> 1.0, 2.0 -> 0.8, 1.27 -> 0.65)"
252
+ },
253
+ "same_net": {
254
+ "type": "array",
255
+ "items": {
256
+ "type": "array",
257
+ "items": {
258
+ "type": "string"
259
+ },
260
+ "minItems": 2
261
+ },
262
+ "description": "connector/custom: groups of pad numbers that are the same net and may overlap or touch (USB-C A1/B12 GND, A4/B9 VBUS)"
263
+ },
264
+ "courtyard_excess": {
265
+ "type": "number",
266
+ "description": "Courtyard clearance around pads and body in mm, overriding the default (bga 1.0, connectors 0.5, custom 0.25 at density B)",
267
+ "minimum": 0
268
+ },
269
+ "pad_table": {
270
+ "type": "object",
271
+ "additionalProperties": false,
272
+ "required": [
273
+ "unit",
274
+ "y_axis"
275
+ ],
276
+ "description": "connector/custom: the land pattern copied from the datasheet's dimension drawing, in the drawing's own unit and frame (no arithmetic: positions as dimensioned from the drawing's origin). One entry per pad, or arrays for evenly spaced rows.",
277
+ "properties": {
278
+ "unit": {
279
+ "enum": [
280
+ "mm",
281
+ "mil",
282
+ "in"
283
+ ],
284
+ "description": "unit of every number in the table"
285
+ },
286
+ "y_axis": {
287
+ "enum": [
288
+ "up",
289
+ "down"
290
+ ],
291
+ "description": "up: +Y points to the top of the drawing (usual for drawings); down: +Y points down (KiCad)"
292
+ },
293
+ "view": {
294
+ "enum": [
295
+ "top",
296
+ "bottom"
297
+ ],
298
+ "default": "top",
299
+ "description": "the drawing's view: recommended land patterns are top views; bottom views (seen from the pins) are mirrored left-right"
300
+ },
301
+ "origin": {
302
+ "enum": [
303
+ "center",
304
+ "pin1",
305
+ "datum"
306
+ ],
307
+ "description": "what the drawing's 0,0 is: the package centre, pin 1, or another datum (give center_at)"
308
+ },
309
+ "center_at": {
310
+ "type": "object",
311
+ "additionalProperties": false,
312
+ "required": [
313
+ "x",
314
+ "y"
315
+ ],
316
+ "properties": {
317
+ "x": {
318
+ "type": "number"
319
+ },
320
+ "y": {
321
+ "type": "number"
322
+ }
323
+ },
324
+ "description": "the package centre in the table's coordinates, when the origin is not the centre (default: the middle of all pads)"
325
+ },
326
+ "footprint_origin": {
327
+ "enum": [
328
+ "center",
329
+ "pin1"
330
+ ],
331
+ "description": "origin of the generated footprint: default pin1 for through-hole parts, center for SMD (KiCad conventions)"
332
+ },
333
+ "default_pad": {
334
+ "type": "object",
335
+ "additionalProperties": false,
336
+ "properties": {
337
+ "number": {
338
+ "type": [
339
+ "string",
340
+ "integer"
341
+ ],
342
+ "pattern": "^[A-Za-z0-9_.+-]{0,16}$",
343
+ "description": "pad number as on the drawing / pin table (1, 2 ... or A1, B12 ...); mounting pads MP, shield tabs SH, holes \"\""
344
+ },
345
+ "x": {
346
+ "type": "number",
347
+ "description": "pad centre X, in the table's unit and frame"
348
+ },
349
+ "y": {
350
+ "type": "number",
351
+ "description": "pad centre Y, in the table's unit and frame"
352
+ },
353
+ "w": {
354
+ "type": "number",
355
+ "description": "pad size along X (before rotation)",
356
+ "exclusiveMinimum": 0
357
+ },
358
+ "h": {
359
+ "type": "number",
360
+ "description": "pad size along Y (before rotation)",
361
+ "exclusiveMinimum": 0
362
+ },
363
+ "d": {
364
+ "type": "number",
365
+ "description": "round pad diameter (instead of w/h)",
366
+ "exclusiveMinimum": 0
367
+ },
368
+ "shape": {
369
+ "enum": [
370
+ "rect",
371
+ "roundrect",
372
+ "circle",
373
+ "oval"
374
+ ],
375
+ "description": "default roundrect for SMD, oval for through-hole, circle when d is given; use polygon points for odd shapes"
376
+ },
377
+ "type": {
378
+ "enum": [
379
+ "smd",
380
+ "tht",
381
+ "npth"
382
+ ],
383
+ "description": "smd (default), tht = plated through-hole (needs drill), npth = non-plated hole (locating peg)"
384
+ },
385
+ "drill": {
386
+ "type": "number",
387
+ "description": "hole diameter; for a slot, its width",
388
+ "exclusiveMinimum": 0
389
+ },
390
+ "drill_h": {
391
+ "type": "number",
392
+ "description": "slot: hole length along Y (the drill becomes an oval slot drill x drill_h); swap with drill for a slot along X",
393
+ "exclusiveMinimum": 0
394
+ },
395
+ "rotation": {
396
+ "type": "number",
397
+ "description": "pad rotation in degrees, counter-clockwise as drawn"
398
+ },
399
+ "role": {
400
+ "enum": [
401
+ "pin",
402
+ "mount",
403
+ "shield",
404
+ "thermal",
405
+ "npth"
406
+ ],
407
+ "description": "default: pin for numbered pads, mount for MP/MH, shield for SH/S1, npth for holes; mount/shield/npth are not counted as pins"
408
+ },
409
+ "polygon": {
410
+ "type": "array",
411
+ "minItems": 3,
412
+ "items": {
413
+ "type": "object",
414
+ "additionalProperties": false,
415
+ "required": [
416
+ "x",
417
+ "y"
418
+ ],
419
+ "properties": {
420
+ "x": {
421
+ "type": "number"
422
+ },
423
+ "y": {
424
+ "type": "number"
425
+ }
426
+ }
427
+ },
428
+ "description": "odd-shaped pad: its outline corners in the table's frame (absolute, not relative to x/y)"
429
+ },
430
+ "paste": {
431
+ "enum": [
432
+ "full",
433
+ "none",
434
+ "grid"
435
+ ],
436
+ "description": "solder paste: full (default for SMD), none, or grid = split into windows (big thermal pads)"
437
+ },
438
+ "paste_coverage": {
439
+ "type": "number",
440
+ "description": "grid paste: fraction of the copper covered (default 0.65)",
441
+ "minimum": 0.2,
442
+ "maximum": 1.0
443
+ },
444
+ "paste_grid": {
445
+ "type": "array",
446
+ "items": {
447
+ "type": "integer",
448
+ "minimum": 1,
449
+ "maximum": 8
450
+ },
451
+ "minItems": 2,
452
+ "maxItems": 2,
453
+ "description": "grid paste: [columns, rows] of windows (default about 1.2 mm windows)"
454
+ },
455
+ "thermal_vias": {
456
+ "type": "object",
457
+ "additionalProperties": false,
458
+ "required": [
459
+ "drill"
460
+ ],
461
+ "properties": {
462
+ "drill": {
463
+ "type": "number",
464
+ "exclusiveMinimum": 0
465
+ },
466
+ "diameter": {
467
+ "type": "number",
468
+ "exclusiveMinimum": 0
469
+ },
470
+ "nx": {
471
+ "type": "integer",
472
+ "minimum": 1
473
+ },
474
+ "ny": {
475
+ "type": "integer",
476
+ "minimum": 1
477
+ },
478
+ "pitch": {
479
+ "type": "number",
480
+ "exclusiveMinimum": 0
481
+ },
482
+ "pitch_y": {
483
+ "type": "number",
484
+ "exclusiveMinimum": 0
485
+ },
486
+ "unit": {
487
+ "enum": [
488
+ "mm",
489
+ "mil",
490
+ "in",
491
+ "table"
492
+ ],
493
+ "description": "unit of drill / diameter / pitch: mm (default), mil, in, or table = the pad table's unit"
494
+ }
495
+ },
496
+ "description": "vias inside a big pad (mm): drill, via diameter (default drill + 0.3), nx x ny grid, pitch (default spread over the pad), pitch_y (rows, default pitch); in mm unless unit says otherwise"
497
+ },
498
+ "mask_margin": {
499
+ "type": "number",
500
+ "description": "solder mask expansion (negative = mask-defined pad)"
501
+ },
502
+ "paste_margin": {
503
+ "type": "number",
504
+ "description": "solder paste expansion (negative = smaller than the copper)"
505
+ },
506
+ "label": {
507
+ "type": "string",
508
+ "description": "the drawing's callout for this pad, for review"
509
+ }
510
+ },
511
+ "description": "values every pad and array takes unless it gives its own"
512
+ },
513
+ "pads": {
514
+ "type": "array",
515
+ "items": {
516
+ "type": "object",
517
+ "additionalProperties": false,
518
+ "properties": {
519
+ "number": {
520
+ "type": [
521
+ "string",
522
+ "integer"
523
+ ],
524
+ "pattern": "^[A-Za-z0-9_.+-]{0,16}$",
525
+ "description": "pad number as on the drawing / pin table (1, 2 ... or A1, B12 ...); mounting pads MP, shield tabs SH, holes \"\""
526
+ },
527
+ "x": {
528
+ "type": "number",
529
+ "description": "pad centre X, in the table's unit and frame"
530
+ },
531
+ "y": {
532
+ "type": "number",
533
+ "description": "pad centre Y, in the table's unit and frame"
534
+ },
535
+ "w": {
536
+ "type": "number",
537
+ "description": "pad size along X (before rotation)",
538
+ "exclusiveMinimum": 0
539
+ },
540
+ "h": {
541
+ "type": "number",
542
+ "description": "pad size along Y (before rotation)",
543
+ "exclusiveMinimum": 0
544
+ },
545
+ "d": {
546
+ "type": "number",
547
+ "description": "round pad diameter (instead of w/h)",
548
+ "exclusiveMinimum": 0
549
+ },
550
+ "shape": {
551
+ "enum": [
552
+ "rect",
553
+ "roundrect",
554
+ "circle",
555
+ "oval"
556
+ ],
557
+ "description": "default roundrect for SMD, oval for through-hole, circle when d is given; use polygon points for odd shapes"
558
+ },
559
+ "type": {
560
+ "enum": [
561
+ "smd",
562
+ "tht",
563
+ "npth"
564
+ ],
565
+ "description": "smd (default), tht = plated through-hole (needs drill), npth = non-plated hole (locating peg)"
566
+ },
567
+ "drill": {
568
+ "type": "number",
569
+ "description": "hole diameter; for a slot, its width",
570
+ "exclusiveMinimum": 0
571
+ },
572
+ "drill_h": {
573
+ "type": "number",
574
+ "description": "slot: hole length along Y (the drill becomes an oval slot drill x drill_h); swap with drill for a slot along X",
575
+ "exclusiveMinimum": 0
576
+ },
577
+ "rotation": {
578
+ "type": "number",
579
+ "description": "pad rotation in degrees, counter-clockwise as drawn"
580
+ },
581
+ "role": {
582
+ "enum": [
583
+ "pin",
584
+ "mount",
585
+ "shield",
586
+ "thermal",
587
+ "npth"
588
+ ],
589
+ "description": "default: pin for numbered pads, mount for MP/MH, shield for SH/S1, npth for holes; mount/shield/npth are not counted as pins"
590
+ },
591
+ "polygon": {
592
+ "type": "array",
593
+ "minItems": 3,
594
+ "items": {
595
+ "type": "object",
596
+ "additionalProperties": false,
597
+ "required": [
598
+ "x",
599
+ "y"
600
+ ],
601
+ "properties": {
602
+ "x": {
603
+ "type": "number"
604
+ },
605
+ "y": {
606
+ "type": "number"
607
+ }
608
+ }
609
+ },
610
+ "description": "odd-shaped pad: its outline corners in the table's frame (absolute, not relative to x/y)"
611
+ },
612
+ "paste": {
613
+ "enum": [
614
+ "full",
615
+ "none",
616
+ "grid"
617
+ ],
618
+ "description": "solder paste: full (default for SMD), none, or grid = split into windows (big thermal pads)"
619
+ },
620
+ "paste_coverage": {
621
+ "type": "number",
622
+ "description": "grid paste: fraction of the copper covered (default 0.65)",
623
+ "minimum": 0.2,
624
+ "maximum": 1.0
625
+ },
626
+ "paste_grid": {
627
+ "type": "array",
628
+ "items": {
629
+ "type": "integer",
630
+ "minimum": 1,
631
+ "maximum": 8
632
+ },
633
+ "minItems": 2,
634
+ "maxItems": 2,
635
+ "description": "grid paste: [columns, rows] of windows (default about 1.2 mm windows)"
636
+ },
637
+ "thermal_vias": {
638
+ "type": "object",
639
+ "additionalProperties": false,
640
+ "required": [
641
+ "drill"
642
+ ],
643
+ "properties": {
644
+ "drill": {
645
+ "type": "number",
646
+ "exclusiveMinimum": 0
647
+ },
648
+ "diameter": {
649
+ "type": "number",
650
+ "exclusiveMinimum": 0
651
+ },
652
+ "nx": {
653
+ "type": "integer",
654
+ "minimum": 1
655
+ },
656
+ "ny": {
657
+ "type": "integer",
658
+ "minimum": 1
659
+ },
660
+ "pitch": {
661
+ "type": "number",
662
+ "exclusiveMinimum": 0
663
+ },
664
+ "pitch_y": {
665
+ "type": "number",
666
+ "exclusiveMinimum": 0
667
+ },
668
+ "unit": {
669
+ "enum": [
670
+ "mm",
671
+ "mil",
672
+ "in",
673
+ "table"
674
+ ],
675
+ "description": "unit of drill / diameter / pitch: mm (default), mil, in, or table = the pad table's unit"
676
+ }
677
+ },
678
+ "description": "vias inside a big pad (mm): drill, via diameter (default drill + 0.3), nx x ny grid, pitch (default spread over the pad), pitch_y (rows, default pitch); in mm unless unit says otherwise"
679
+ },
680
+ "mask_margin": {
681
+ "type": "number",
682
+ "description": "solder mask expansion (negative = mask-defined pad)"
683
+ },
684
+ "paste_margin": {
685
+ "type": "number",
686
+ "description": "solder paste expansion (negative = smaller than the copper)"
687
+ },
688
+ "label": {
689
+ "type": "string",
690
+ "description": "the drawing's callout for this pad, for review"
691
+ }
692
+ }
693
+ }
694
+ },
695
+ "arrays": {
696
+ "type": "array",
697
+ "items": {
698
+ "type": "object",
699
+ "additionalProperties": false,
700
+ "required": [
701
+ "count",
702
+ "x",
703
+ "y"
704
+ ],
705
+ "properties": {
706
+ "count": {
707
+ "type": "integer",
708
+ "minimum": 1,
709
+ "description": "number of pads in the row"
710
+ },
711
+ "x": {
712
+ "type": "number",
713
+ "description": "first pad centre X"
714
+ },
715
+ "y": {
716
+ "type": "number",
717
+ "description": "first pad centre Y"
718
+ },
719
+ "dx": {
720
+ "type": "number",
721
+ "description": "step to the next pad along X (the pitch, negative to go left)"
722
+ },
723
+ "dy": {
724
+ "type": "number",
725
+ "description": "step along Y"
726
+ },
727
+ "first_number": {
728
+ "type": "integer",
729
+ "description": "number of the first pad (default 1)"
730
+ },
731
+ "number_step": {
732
+ "type": "integer",
733
+ "description": "numbering step (default 1; 2 for one row of a dual-row connector: 1, 3, 5 ...)"
734
+ },
735
+ "prefix": {
736
+ "type": "string",
737
+ "pattern": "^[A-Za-z]{0,3}$",
738
+ "description": "letters before the number (A for USB-C A1..A12)"
739
+ },
740
+ "w": {
741
+ "type": "number",
742
+ "description": "pad size along X (before rotation)",
743
+ "exclusiveMinimum": 0
744
+ },
745
+ "h": {
746
+ "type": "number",
747
+ "description": "pad size along Y (before rotation)",
748
+ "exclusiveMinimum": 0
749
+ },
750
+ "d": {
751
+ "type": "number",
752
+ "description": "round pad diameter (instead of w/h)",
753
+ "exclusiveMinimum": 0
754
+ },
755
+ "shape": {
756
+ "enum": [
757
+ "rect",
758
+ "roundrect",
759
+ "circle",
760
+ "oval"
761
+ ],
762
+ "description": "default roundrect for SMD, oval for through-hole, circle when d is given; use polygon points for odd shapes"
763
+ },
764
+ "type": {
765
+ "enum": [
766
+ "smd",
767
+ "tht",
768
+ "npth"
769
+ ],
770
+ "description": "smd (default), tht = plated through-hole (needs drill), npth = non-plated hole (locating peg)"
771
+ },
772
+ "drill": {
773
+ "type": "number",
774
+ "description": "hole diameter; for a slot, its width",
775
+ "exclusiveMinimum": 0
776
+ },
777
+ "drill_h": {
778
+ "type": "number",
779
+ "description": "slot: hole length along Y (the drill becomes an oval slot drill x drill_h); swap with drill for a slot along X",
780
+ "exclusiveMinimum": 0
781
+ },
782
+ "rotation": {
783
+ "type": "number",
784
+ "description": "pad rotation in degrees, counter-clockwise as drawn"
785
+ },
786
+ "role": {
787
+ "enum": [
788
+ "pin",
789
+ "mount",
790
+ "shield",
791
+ "thermal",
792
+ "npth"
793
+ ],
794
+ "description": "default: pin for numbered pads, mount for MP/MH, shield for SH/S1, npth for holes; mount/shield/npth are not counted as pins"
795
+ },
796
+ "paste": {
797
+ "enum": [
798
+ "full",
799
+ "none",
800
+ "grid"
801
+ ],
802
+ "description": "solder paste: full (default for SMD), none, or grid = split into windows (big thermal pads)"
803
+ },
804
+ "label": {
805
+ "type": "string",
806
+ "description": "the drawing's callout for this pad, for review"
807
+ }
808
+ }
809
+ },
810
+ "description": "evenly spaced rows of equal pads, as drawings dimension them (N x pitch)"
811
+ },
812
+ "body": {
813
+ "type": "object",
814
+ "additionalProperties": false,
815
+ "required": [
816
+ "x1",
817
+ "y1",
818
+ "x2",
819
+ "y2"
820
+ ],
821
+ "properties": {
822
+ "x1": {
823
+ "type": "number"
824
+ },
825
+ "y1": {
826
+ "type": "number"
827
+ },
828
+ "x2": {
829
+ "type": "number"
830
+ },
831
+ "y2": {
832
+ "type": "number"
833
+ }
834
+ },
835
+ "description": "the component body outline (top view), in the table's unit and frame"
836
+ },
837
+ "keepouts": {
838
+ "type": "array",
839
+ "items": {
840
+ "type": "object",
841
+ "additionalProperties": false,
842
+ "properties": {
843
+ "x1": {
844
+ "type": "number"
845
+ },
846
+ "y1": {
847
+ "type": "number"
848
+ },
849
+ "x2": {
850
+ "type": "number"
851
+ },
852
+ "y2": {
853
+ "type": "number"
854
+ },
855
+ "polygon": {
856
+ "type": "array",
857
+ "items": {
858
+ "type": "object",
859
+ "additionalProperties": false,
860
+ "required": [
861
+ "x",
862
+ "y"
863
+ ],
864
+ "properties": {
865
+ "x": {
866
+ "type": "number"
867
+ },
868
+ "y": {
869
+ "type": "number"
870
+ }
871
+ }
872
+ }
873
+ },
874
+ "layers": {
875
+ "type": "array",
876
+ "items": {
877
+ "enum": [
878
+ "F.Cu",
879
+ "B.Cu",
880
+ "*.Cu"
881
+ ]
882
+ }
883
+ },
884
+ "rules": {
885
+ "type": "array",
886
+ "items": {
887
+ "enum": [
888
+ "tracks",
889
+ "vias",
890
+ "pads",
891
+ "copperpour",
892
+ "footprints"
893
+ ]
894
+ }
895
+ }
896
+ }
897
+ },
898
+ "description": "keep-out areas from the drawing (no copper / no vias / no tracks under the part), rectangle or polygon"
899
+ }
900
+ }
901
+ },
902
+ "model_3d": {
903
+ "type": "string",
904
+ "description": "Optional 3D model path to reference, e.g. ${KICAD8_3DMODEL_DIR}/Package_SO.3dshapes/SOIC-8_3.9x4.9mm_P1.27mm.wrl"
905
+ },
906
+ "source": {
907
+ "type": "object",
908
+ "description": "Provenance for review: datasheet URL, page/figure, and the drawing's package code.",
909
+ "properties": {
910
+ "datasheet": {
911
+ "type": "string"
912
+ },
913
+ "page": {
914
+ "type": [
915
+ "integer",
916
+ "string"
917
+ ]
918
+ },
919
+ "drawing": {
920
+ "type": "string"
921
+ },
922
+ "extracted_by": {
923
+ "type": "string"
924
+ }
925
+ }
926
+ },
927
+ "unresolved": {
928
+ "type": "array",
929
+ "items": {
930
+ "type": "string"
931
+ },
932
+ "description": "Dimensions the extractor could not read with confidence (requires human review)"
933
+ },
934
+ "lead_type": {
935
+ "enum": [
936
+ "flat",
937
+ "molded",
938
+ "melf"
939
+ ],
940
+ "description": "Optional IPC lead family override (default comes from package_type): molded = inward L / molded body (tantalum, SMA/SMB, SOD-123F; IPC-7351B Table 3-13), melf = cylindrical end caps (MELF/MiniMELF), flat = outward flat leads (IPC-7352 flat lead)"
941
+ },
942
+ "polarized": {
943
+ "type": "boolean",
944
+ "default": false,
945
+ "description": "Pin 1 is a polarity terminal (LED/diode cathode, tantalum +). Adds the KiCad-style silk bracket on the pin-1 side and a chamfered fab corner."
946
+ },
947
+ "pin_positions": {
948
+ "type": "array",
949
+ "minItems": 2,
950
+ "description": "gullwing: explicit pad layout when the rows are uneven (SOT-23: 1 L -0.95, 2 L +0.95, 3 R 0). offset = mm along the row from the centre, + down.",
951
+ "items": {
952
+ "type": "object",
953
+ "additionalProperties": false,
954
+ "required": [
955
+ "number",
956
+ "side",
957
+ "offset"
958
+ ],
959
+ "properties": {
960
+ "number": {
961
+ "type": [
962
+ "string",
963
+ "integer"
964
+ ],
965
+ "pattern": "^[A-Za-z0-9_.+-]{1,16}$",
966
+ "description": "pad number: letters, digits and _ . + - only (KLC uses 1, 2, 3 ...)"
967
+ },
968
+ "side": {
969
+ "enum": [
970
+ "L",
971
+ "R"
972
+ ]
973
+ },
974
+ "offset": {
975
+ "type": "number"
976
+ }
977
+ }
978
+ }
979
+ },
980
+ "tab": {
981
+ "type": "object",
982
+ "additionalProperties": false,
983
+ "required": [
984
+ "number",
985
+ "width"
986
+ ],
987
+ "description": "gullwing: one wide tab lead on a side (SOT-223, DPAK). Same lead span as the pins.",
988
+ "properties": {
989
+ "number": {
990
+ "type": [
991
+ "string",
992
+ "integer"
993
+ ],
994
+ "pattern": "^[A-Za-z0-9_.+-]{1,16}$",
995
+ "description": "pad number: letters, digits and _ . + - only (KLC uses 1, 2, 3 ...)"
996
+ },
997
+ "side": {
998
+ "enum": [
999
+ "L",
1000
+ "R"
1001
+ ],
1002
+ "default": "R"
1003
+ },
1004
+ "offset": {
1005
+ "type": "number",
1006
+ "default": 0
1007
+ },
1008
+ "width": {
1009
+ "$ref": "#/$defs/dim",
1010
+ "description": "tab lead width b2"
1011
+ },
1012
+ "length": {
1013
+ "$ref": "#/$defs/dim",
1014
+ "description": "tab foot length; default terminal_length"
1015
+ }
1016
+ }
1017
+ },
1018
+ "lead_span_y": {
1019
+ "$ref": "#/$defs/dim",
1020
+ "description": "qfp only: tip-to-tip span of the top/bottom rows when it differs from lead_span (rectangular QFP)"
1021
+ },
1022
+ "land": {
1023
+ "type": "object",
1024
+ "additionalProperties": false,
1025
+ "required": [
1026
+ "pad_length",
1027
+ "pad_width",
1028
+ "pad_center"
1029
+ ],
1030
+ "description": "The manufacturer's recommended land pattern, when the datasheet gives one. It replaces the IPC-7351B pads for the signal pins (a tab or exposed pad keeps its own size). pad_center = distance from the part centre to each pad centre.",
1031
+ "properties": {
1032
+ "pad_length": {
1033
+ "type": "number",
1034
+ "exclusiveMinimum": 0
1035
+ },
1036
+ "pad_width": {
1037
+ "type": "number",
1038
+ "exclusiveMinimum": 0
1039
+ },
1040
+ "pad_center": {
1041
+ "type": "number",
1042
+ "exclusiveMinimum": 0
1043
+ },
1044
+ "pad_center_y": {
1045
+ "type": "number",
1046
+ "exclusiveMinimum": 0,
1047
+ "description": "QFN/QFP top and bottom rows, when different from pad_center"
1048
+ }
1049
+ }
1050
+ }
1051
+ },
1052
+ "allOf": [
1053
+ {
1054
+ "if": {
1055
+ "properties": {
1056
+ "package_type": {
1057
+ "const": "gullwing"
1058
+ }
1059
+ },
1060
+ "not": {
1061
+ "required": [
1062
+ "pin_positions"
1063
+ ]
1064
+ }
1065
+ },
1066
+ "then": {
1067
+ "required": [
1068
+ "pin_count",
1069
+ "pitch",
1070
+ "lead_span",
1071
+ "terminal_width"
1072
+ ]
1073
+ }
1074
+ },
1075
+ {
1076
+ "if": {
1077
+ "properties": {
1078
+ "package_type": {
1079
+ "const": "gullwing"
1080
+ }
1081
+ },
1082
+ "required": [
1083
+ "pin_positions"
1084
+ ]
1085
+ },
1086
+ "then": {
1087
+ "required": [
1088
+ "lead_span",
1089
+ "terminal_width"
1090
+ ]
1091
+ }
1092
+ },
1093
+ {
1094
+ "if": {
1095
+ "properties": {
1096
+ "package_type": {
1097
+ "const": "qfn"
1098
+ }
1099
+ }
1100
+ },
1101
+ "then": {
1102
+ "required": [
1103
+ "pin_count",
1104
+ "pitch",
1105
+ "terminal_width"
1106
+ ]
1107
+ }
1108
+ },
1109
+ {
1110
+ "if": {
1111
+ "properties": {
1112
+ "package_type": {
1113
+ "const": "qfp"
1114
+ }
1115
+ }
1116
+ },
1117
+ "then": {
1118
+ "required": [
1119
+ "pin_count",
1120
+ "pitch",
1121
+ "lead_span",
1122
+ "terminal_width"
1123
+ ]
1124
+ }
1125
+ },
1126
+ {
1127
+ "if": {
1128
+ "properties": {
1129
+ "package_type": {
1130
+ "enum": [
1131
+ "chip",
1132
+ "molded",
1133
+ "gullwing",
1134
+ "qfp",
1135
+ "qfn"
1136
+ ]
1137
+ }
1138
+ }
1139
+ },
1140
+ "then": {
1141
+ "anyOf": [
1142
+ {
1143
+ "required": [
1144
+ "terminal_length"
1145
+ ]
1146
+ },
1147
+ {
1148
+ "required": [
1149
+ "inner_span"
1150
+ ]
1151
+ }
1152
+ ]
1153
+ }
1154
+ },
1155
+ {
1156
+ "if": {
1157
+ "properties": {
1158
+ "package_type": {
1159
+ "enum": [
1160
+ "chip",
1161
+ "molded",
1162
+ "gullwing",
1163
+ "qfp",
1164
+ "qfn",
1165
+ "bga"
1166
+ ]
1167
+ }
1168
+ }
1169
+ },
1170
+ "then": {
1171
+ "required": [
1172
+ "body_length",
1173
+ "body_width"
1174
+ ]
1175
+ }
1176
+ },
1177
+ {
1178
+ "if": {
1179
+ "properties": {
1180
+ "package_type": {
1181
+ "const": "bga"
1182
+ }
1183
+ }
1184
+ },
1185
+ "then": {
1186
+ "required": [
1187
+ "rows",
1188
+ "cols",
1189
+ "pitch"
1190
+ ],
1191
+ "anyOf": [
1192
+ {
1193
+ "required": [
1194
+ "ball_diameter"
1195
+ ]
1196
+ },
1197
+ {
1198
+ "required": [
1199
+ "land_diameter"
1200
+ ]
1201
+ }
1202
+ ]
1203
+ }
1204
+ },
1205
+ {
1206
+ "if": {
1207
+ "properties": {
1208
+ "package_type": {
1209
+ "const": "pin_header"
1210
+ }
1211
+ }
1212
+ },
1213
+ "then": {
1214
+ "required": [
1215
+ "rows",
1216
+ "pitch"
1217
+ ]
1218
+ }
1219
+ },
1220
+ {
1221
+ "if": {
1222
+ "properties": {
1223
+ "package_type": {
1224
+ "enum": [
1225
+ "connector",
1226
+ "custom"
1227
+ ]
1228
+ }
1229
+ }
1230
+ },
1231
+ "then": {
1232
+ "required": [
1233
+ "pad_table"
1234
+ ]
1235
+ }
1236
+ }
1237
+ ]
1238
+ }