From 661332c3ce7562b30545ae1773d30a784bcbc0db Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 29 Jul 2018 23:22:26 +0200 Subject: o Support for resolving 'mpn' fields from digikey. Creates 'digikey-part-stub', can be used to download the entire part later on. --- test/doit/schematics/schematic-1.kicad_pcb | 292 +++++++++++++++-------------- test/doit/schematics/schematic-1.sch | 61 +++--- test/doit/test_doit.py | 6 +- 3 files changed, 199 insertions(+), 160 deletions(-) (limited to 'test') diff --git a/test/doit/schematics/schematic-1.kicad_pcb b/test/doit/schematics/schematic-1.kicad_pcb index 861eed1..fcb69aa 100644 --- a/test/doit/schematics/schematic-1.kicad_pcb +++ b/test/doit/schematics/schematic-1.kicad_pcb @@ -3,10 +3,10 @@ (general (thickness 1.6) (drawings 0) - (tracks 13) + (tracks 10) (zones 0) - (modules 3) - (nets 4) + (modules 4) + (nets 5) ) (page A4) @@ -53,10 +53,10 @@ (pcb_text_width 0.3) (pcb_text_size 1.5 1.5) (mod_edge_width 0.15) - (mod_text_size 0.000001 0.000001) + (mod_text_size 1 1) (mod_text_width 0.15) - (pad_size 1.4 1.4) - (pad_drill 0.6) + (pad_size 1.524 1.524) + (pad_drill 0.762) (pad_to_mask_clearance 0.2) (aux_axis_origin 0 0) (visible_elements FFFFFF7F) @@ -90,9 +90,10 @@ ) (net 0 "") - (net 1 GND) - (net 2 "Net-(BT1-Pad1)") + (net 1 "Net-(BT1-Pad1)") + (net 2 GND) (net 3 "Net-(C1-Pad1)") + (net 4 "Net-(R1-Pad1)") (net_class Default "This is the default net class." (clearance 0.2) @@ -104,177 +105,194 @@ (add_net GND) (add_net "Net-(BT1-Pad1)") (add_net "Net-(C1-Pad1)") + (add_net "Net-(R1-Pad1)") ) - (module Battery:BatteryHolder_Keystone_103_1x20mm (layer F.Cu) (tedit 5787C32C) (tstamp 5B59DAE3) - (at 145.975001 79.779834) - (descr http://www.keyelco.com/product-pdf.cfm?p=719) - (tags "Keystone type 103 battery holder") + (module Battery:BatteryHolder_MPD_BC2AAPC_2xAA (layer F.Cu) (tedit 5AC8F8F7) (tstamp 5B5BC36D) + (at 71.75 60.5) + (descr "2xAA cell battery holder, Memory Protection Devices P/N BC2AAPC, http://www.memoryprotectiondevices.com/datasheets/BC2AAPC-datasheet.pdf") + (tags "AA battery cell holder") (path /5B431438) - (fp_text reference BT1 (at 0 -4.3) (layer F.SilkS) + (fp_text reference BT1 (at 26.16 -10.11) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) - (fp_text value 9V (at 15 13) (layer F.Fab) + (fp_text value 9V (at 26.16 23.39) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) - (fp_text user + (at 2.75 0) (layer F.SilkS) + (fp_line (start -2.84 -8.61) (end -2.84 21.89) (layer F.Fab) (width 0.1)) + (fp_line (start -2.84 21.89) (end 55.16 21.89) (layer F.Fab) (width 0.1)) + (fp_line (start 55.16 21.89) (end 55.16 -8.61) (layer F.Fab) (width 0.1)) + (fp_line (start 55.16 -8.61) (end -2.84 -8.61) (layer F.Fab) (width 0.1)) + (fp_line (start -2.94 -8.71) (end -2.94 21.99) (layer F.SilkS) (width 0.12)) + (fp_line (start -2.94 21.99) (end 55.26 21.99) (layer F.SilkS) (width 0.12)) + (fp_line (start 55.26 21.99) (end 55.26 -8.71) (layer F.SilkS) (width 0.12)) + (fp_line (start 55.26 -8.71) (end -2.94 -8.71) (layer F.SilkS) (width 0.12)) + (fp_line (start -3.34 -9.11) (end -3.34 22.39) (layer F.CrtYd) (width 0.05)) + (fp_line (start -3.34 22.39) (end 55.66 22.39) (layer F.CrtYd) (width 0.05)) + (fp_line (start 55.66 22.39) (end 55.66 -9.11) (layer F.CrtYd) (width 0.05)) + (fp_line (start 55.66 -9.11) (end -3.34 -9.11) (layer F.CrtYd) (width 0.05)) + (fp_line (start 35.685 2.54) (end 17.905 2.54) (layer F.SilkS) (width 0.12)) + (fp_line (start 17.905 2.54) (end 17.905 1.27) (layer F.SilkS) (width 0.12)) + (fp_line (start 17.905 1.27) (end 16.635 1.27) (layer F.SilkS) (width 0.12)) + (fp_line (start 16.635 1.27) (end 16.635 -1.27) (layer F.SilkS) (width 0.12)) + (fp_line (start 16.635 -1.27) (end 17.905 -1.27) (layer F.SilkS) (width 0.12)) + (fp_line (start 17.905 -1.27) (end 17.905 -2.54) (layer F.SilkS) (width 0.12)) + (fp_line (start 17.905 -2.54) (end 35.685 -2.54) (layer F.SilkS) (width 0.12)) + (fp_line (start 35.685 -2.54) (end 35.685 2.54) (layer F.SilkS) (width 0.12)) + (fp_line (start 16.635 16.13) (end 34.415 16.13) (layer F.SilkS) (width 0.12)) + (fp_line (start 34.415 16.13) (end 34.415 14.86) (layer F.SilkS) (width 0.12)) + (fp_line (start 34.415 14.86) (end 35.685 14.86) (layer F.SilkS) (width 0.12)) + (fp_line (start 35.685 14.86) (end 35.685 12.32) (layer F.SilkS) (width 0.12)) + (fp_line (start 35.685 12.32) (end 34.415 12.32) (layer F.SilkS) (width 0.12)) + (fp_line (start 34.415 12.32) (end 34.415 11.05) (layer F.SilkS) (width 0.12)) + (fp_line (start 34.415 11.05) (end 16.635 11.05) (layer F.SilkS) (width 0.12)) + (fp_line (start 16.635 11.05) (end 16.635 16.13) (layer F.SilkS) (width 0.12)) + (fp_text user %R (at 26.16 6.63) (layer F.Fab) + (effects (font (size 1 1) (thickness 0.15))) + ) + (fp_text user - (at 36.955 0) (layer F.SilkS) (effects (font (size 1.5 1.5) (thickness 0.15))) ) - (fp_text user %R (at 0 0) (layer F.Fab) + (fp_text user + (at 15.365 0) (layer F.SilkS) + (effects (font (size 1.5 1.5) (thickness 0.15))) + ) + (fp_text user - (at 15.365 13.59) (layer F.SilkS) + (effects (font (size 1.5 1.5) (thickness 0.15))) + ) + (fp_text user + (at 36.955 13.59) (layer F.SilkS) + (effects (font (size 1.5 1.5) (thickness 0.15))) + ) + (fp_text user + (at -4.34 0) (layer F.SilkS) + (effects (font (size 1.5 1.5) (thickness 0.15))) + ) + (fp_text user - (at -4.34 13.59) (layer F.SilkS) + (effects (font (size 1.5 1.5) (thickness 0.15))) + ) + (pad 1 thru_hole rect (at 0 0) (size 2.17 2.17) (drill 1.17) (layers *.Cu *.Mask) + (net 1 "Net-(BT1-Pad1)")) + (pad 2 thru_hole circle (at 0 13.59) (size 2.17 2.17) (drill 1.17) (layers *.Cu *.Mask) + (net 2 GND)) + (pad "" np_thru_hole circle (at 26.16 6.63) (size 3.65 3.65) (drill 3.65) (layers *.Cu *.Mask)) + (model ${KISYS3DMOD}/Battery.3dshapes/BatteryHolder_MPD_BC2AAPC_2xAA.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module Resistor_SMD:R_1206_3216Metric (layer F.Cu) (tedit 5B20DC38) (tstamp 5B5BC1DF) + (at 60 61.4 90) + (descr "Resistor SMD 1206 (3216 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: http://www.tortai-tech.com/upload/download/2011102023233369053.pdf), generated with kicad-footprint-generator") + (tags resistor) + (path /5B431328) + (attr smd) + (fp_text reference R1 (at 0 -1.82 90) (layer F.SilkS) + (effects (font (size 1 1) (thickness 0.15))) + ) + (fp_text value 10k (at 0 1.82 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) - (fp_arc (start 15.2 0) (end 4.01 3.6) (angle -162.5) (layer F.CrtYd) (width 0.05)) - (fp_arc (start 15.2 0) (end 4.01 -3.6) (angle 162.5) (layer F.CrtYd) (width 0.05)) - (fp_arc (start 3.5 3.8) (end 3.5 3.25) (angle 70) (layer F.CrtYd) (width 0.05)) - (fp_arc (start 3.5 -3.8) (end 3.5 -3.25) (angle -70) (layer F.CrtYd) (width 0.05)) - (fp_arc (start 15.2 0) (end 4.25 3.5) (angle -162.5) (layer F.SilkS) (width 0.12)) - (fp_arc (start 3.5 3.8) (end 3.5 3) (angle 70) (layer F.SilkS) (width 0.12)) - (fp_arc (start 15.2 0) (end 4.25 -3.5) (angle 162.5) (layer F.SilkS) (width 0.12)) - (fp_arc (start 3.5 -3.8) (end 3.5 -3) (angle -70) (layer F.SilkS) (width 0.12)) - (fp_arc (start 3.5 3.8) (end 3.5 2.9) (angle 70) (layer F.Fab) (width 0.1)) - (fp_arc (start 15.2 0) (end 4.35 3.5) (angle -162.5) (layer F.Fab) (width 0.1)) - (fp_arc (start 15.2 0) (end 4.35 -3.5) (angle 162.5) (layer F.Fab) (width 0.1)) - (fp_arc (start 15.2 0) (end 5.2 1.3) (angle -180) (layer F.Fab) (width 0.1)) - (fp_line (start -2.45 -3.25) (end 3.5 -3.25) (layer F.CrtYd) (width 0.05)) - (fp_line (start -2.45 3.25) (end 3.5 3.25) (layer F.CrtYd) (width 0.05)) - (fp_line (start -2.45 3.25) (end -2.45 -3.25) (layer F.CrtYd) (width 0.05)) - (fp_line (start -2.2 -3) (end 3.5 -3) (layer F.SilkS) (width 0.12)) - (fp_line (start -2.2 3) (end -2.2 -3) (layer F.SilkS) (width 0.12)) - (fp_line (start -2.2 3) (end 3.5 3) (layer F.SilkS) (width 0.12)) - (fp_arc (start 15.2 0) (end 9 1.3) (angle -170) (layer F.Fab) (width 0.1)) - (fp_arc (start 15.2 0) (end 13.3 1.3) (angle -150) (layer F.Fab) (width 0.1)) - (fp_line (start 23.5712 7.7216) (end 22.6568 6.8834) (layer F.Fab) (width 0.1)) - (fp_line (start 23.5712 -7.7216) (end 22.6314 -6.858) (layer F.Fab) (width 0.1)) - (fp_arc (start 15.2 0) (end 13.3 -1.3) (angle 150) (layer F.Fab) (width 0.1)) - (fp_arc (start 15.2 0) (end 9 -1.3) (angle 170) (layer F.Fab) (width 0.1)) - (fp_arc (start 15.2 0) (end 5.2 -1.3) (angle 180) (layer F.Fab) (width 0.1)) - (fp_line (start 3.5306 -2.9) (end -1.7 -2.9) (layer F.Fab) (width 0.1)) - (fp_line (start -1.7 2.9) (end 3.5306 2.9) (layer F.Fab) (width 0.1)) - (fp_line (start -2.1 -2.5) (end -2.1 2.5) (layer F.Fab) (width 0.1)) - (fp_line (start 0 1.3) (end 16.2 1.3) (layer F.Fab) (width 0.1)) - (fp_line (start 16.2 -1.3) (end 0 -1.3) (layer F.Fab) (width 0.1)) - (fp_arc (start 3.5 -3.8) (end 3.5 -2.9) (angle -70) (layer F.Fab) (width 0.1)) - (fp_arc (start 16.2 0) (end 16.2 -1.3) (angle 180) (layer F.Fab) (width 0.1)) - (fp_line (start 0 -1.3) (end 0 1.3) (layer F.Fab) (width 0.1)) - (fp_arc (start -1.7 2.5) (end -2.1 2.5) (angle -90) (layer F.Fab) (width 0.1)) - (fp_arc (start -1.7 -2.5) (end -2.1 -2.5) (angle 90) (layer F.Fab) (width 0.1)) - (pad 2 thru_hole circle (at 20.49 0) (size 3 3) (drill 1.5) (layers *.Cu *.Mask) - (net 1 GND)) - (pad 1 thru_hole rect (at 0 0) (size 3 3) (drill 1.5) (layers *.Cu *.Mask) - (net 2 "Net-(BT1-Pad1)")) - (model ${KISYS3DMOD}/Battery.3dshapes/BatteryHolder_Keystone_103_1x20mm.wrl + (fp_line (start -1.6 0.8) (end -1.6 -0.8) (layer F.Fab) (width 0.1)) + (fp_line (start -1.6 -0.8) (end 1.6 -0.8) (layer F.Fab) (width 0.1)) + (fp_line (start 1.6 -0.8) (end 1.6 0.8) (layer F.Fab) (width 0.1)) + (fp_line (start 1.6 0.8) (end -1.6 0.8) (layer F.Fab) (width 0.1)) + (fp_line (start -0.602064 -0.91) (end 0.602064 -0.91) (layer F.SilkS) (width 0.12)) + (fp_line (start -0.602064 0.91) (end 0.602064 0.91) (layer F.SilkS) (width 0.12)) + (fp_line (start -2.28 1.12) (end -2.28 -1.12) (layer F.CrtYd) (width 0.05)) + (fp_line (start -2.28 -1.12) (end 2.28 -1.12) (layer F.CrtYd) (width 0.05)) + (fp_line (start 2.28 -1.12) (end 2.28 1.12) (layer F.CrtYd) (width 0.05)) + (fp_line (start 2.28 1.12) (end -2.28 1.12) (layer F.CrtYd) (width 0.05)) + (fp_text user %R (at 0 0 90) (layer F.Fab) + (effects (font (size 0.8 0.8) (thickness 0.12))) + ) + (pad 1 smd roundrect (at -1.4 0 90) (size 1.25 1.75) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.2) + (net 4 "Net-(R1-Pad1)")) + (pad 2 smd roundrect (at 1.4 0 90) (size 1.25 1.75) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.2) + (net 1 "Net-(BT1-Pad1)")) + (model ${KISYS3DMOD}/Resistor_SMD.3dshapes/R_1206_3216Metric.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) - (module Capacitor_THT:CP_Axial_L18.0mm_D8.0mm_P25.00mm_Horizontal (layer F.Cu) (tedit 5AE50EF2) (tstamp 5B59DB0A) - (at 201.5 64.75 270) - (descr "CP, Axial series, Axial, Horizontal, pin pitch=25mm, , length*diameter=18*8mm^2, Electrolytic Capacitor, , http://www.vishay.com/docs/28325/021asm.pdf") - (tags "CP Axial series Axial Horizontal pin pitch 25mm length 18mm diameter 8mm Electrolytic Capacitor") + (module Capacitor_THT:CP_Radial_Tantal_D10.5mm_P5.00mm (layer F.Cu) (tedit 5AE50EF0) (tstamp 5B5D0FE8) + (at 51.25 76) + (descr "CP, Radial_Tantal series, Radial, pin pitch=5.00mm, , diameter=10.5mm, Tantal Electrolytic Capacitor, http://cdn-reichelt.de/documents/datenblatt/B300/TANTAL-TB-Serie%23.pdf") + (tags "CP Radial_Tantal series Radial pin pitch 5.00mm diameter 10.5mm Tantal Electrolytic Capacitor") (path /5B4314AB) - (fp_text reference C1 (at 12.5 -5.12 270) (layer F.SilkS) + (fp_text reference C1 (at 2.5 -6.5) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) - (fp_text value 1u (at 12.5 5.12 270) (layer F.Fab) + (fp_text value 1u (at 2.5 6.5) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) - (fp_line (start 3.5 -4) (end 3.5 4) (layer F.Fab) (width 0.1)) - (fp_line (start 21.5 -4) (end 21.5 4) (layer F.Fab) (width 0.1)) - (fp_line (start 3.5 -4) (end 5.18 -4) (layer F.Fab) (width 0.1)) - (fp_line (start 5.18 -4) (end 6.08 -3.1) (layer F.Fab) (width 0.1)) - (fp_line (start 6.08 -3.1) (end 6.98 -4) (layer F.Fab) (width 0.1)) - (fp_line (start 6.98 -4) (end 21.5 -4) (layer F.Fab) (width 0.1)) - (fp_line (start 3.5 4) (end 5.18 4) (layer F.Fab) (width 0.1)) - (fp_line (start 5.18 4) (end 6.08 3.1) (layer F.Fab) (width 0.1)) - (fp_line (start 6.08 3.1) (end 6.98 4) (layer F.Fab) (width 0.1)) - (fp_line (start 6.98 4) (end 21.5 4) (layer F.Fab) (width 0.1)) - (fp_line (start 0 0) (end 3.5 0) (layer F.Fab) (width 0.1)) - (fp_line (start 25 0) (end 21.5 0) (layer F.Fab) (width 0.1)) - (fp_line (start 5.2 0) (end 7 0) (layer F.Fab) (width 0.1)) - (fp_line (start 6.1 -0.9) (end 6.1 0.9) (layer F.Fab) (width 0.1)) - (fp_line (start 1.28 -2.6) (end 3.08 -2.6) (layer F.SilkS) (width 0.12)) - (fp_line (start 2.18 -3.5) (end 2.18 -1.7) (layer F.SilkS) (width 0.12)) - (fp_line (start 3.38 -4.12) (end 3.38 4.12) (layer F.SilkS) (width 0.12)) - (fp_line (start 21.62 -4.12) (end 21.62 4.12) (layer F.SilkS) (width 0.12)) - (fp_line (start 3.38 -4.12) (end 5.18 -4.12) (layer F.SilkS) (width 0.12)) - (fp_line (start 5.18 -4.12) (end 6.08 -3.22) (layer F.SilkS) (width 0.12)) - (fp_line (start 6.08 -3.22) (end 6.98 -4.12) (layer F.SilkS) (width 0.12)) - (fp_line (start 6.98 -4.12) (end 21.62 -4.12) (layer F.SilkS) (width 0.12)) - (fp_line (start 3.38 4.12) (end 5.18 4.12) (layer F.SilkS) (width 0.12)) - (fp_line (start 5.18 4.12) (end 6.08 3.22) (layer F.SilkS) (width 0.12)) - (fp_line (start 6.08 3.22) (end 6.98 4.12) (layer F.SilkS) (width 0.12)) - (fp_line (start 6.98 4.12) (end 21.62 4.12) (layer F.SilkS) (width 0.12)) - (fp_line (start 1.44 0) (end 3.38 0) (layer F.SilkS) (width 0.12)) - (fp_line (start 23.56 0) (end 21.62 0) (layer F.SilkS) (width 0.12)) - (fp_line (start -1.45 -4.25) (end -1.45 4.25) (layer F.CrtYd) (width 0.05)) - (fp_line (start -1.45 4.25) (end 26.45 4.25) (layer F.CrtYd) (width 0.05)) - (fp_line (start 26.45 4.25) (end 26.45 -4.25) (layer F.CrtYd) (width 0.05)) - (fp_line (start 26.45 -4.25) (end -1.45 -4.25) (layer F.CrtYd) (width 0.05)) - (fp_text user %R (at 12.5 0 270) (layer F.Fab) + (fp_circle (center 2.5 0) (end 7.75 0) (layer F.Fab) (width 0.1)) + (fp_circle (center 2.5 0) (end 7.87 0) (layer F.SilkS) (width 0.12)) + (fp_circle (center 2.5 0) (end 8 0) (layer F.CrtYd) (width 0.05)) + (fp_line (start -2.004387 -2.2975) (end -0.954387 -2.2975) (layer F.Fab) (width 0.1)) + (fp_line (start -1.479387 -2.8225) (end -1.479387 -1.7725) (layer F.Fab) (width 0.1)) + (fp_line (start -3.247133 -3.015) (end -2.197133 -3.015) (layer F.SilkS) (width 0.12)) + (fp_line (start -2.722133 -3.54) (end -2.722133 -2.49) (layer F.SilkS) (width 0.12)) + (fp_text user %R (at 2.5 0) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) - (pad 1 thru_hole rect (at 0 0 270) (size 2.4 2.4) (drill 1.2) (layers *.Cu *.Mask) + (pad 1 thru_hole rect (at 0 0) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) (net 3 "Net-(C1-Pad1)")) - (pad 2 thru_hole oval (at 25 0 270) (size 2.4 2.4) (drill 1.2) (layers *.Cu *.Mask) - (net 1 GND)) - (model ${KISYS3DMOD}/Capacitor_THT.3dshapes/CP_Axial_L18.0mm_D8.0mm_P25.00mm_Horizontal.wrl + (pad 2 thru_hole circle (at 5 0) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask) + (net 2 GND)) + (model ${KISYS3DMOD}/Capacitor_THT.3dshapes/CP_Radial_Tantal_D10.5mm_P5.00mm.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) - (module Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_Horizontal (layer F.Cu) (tedit 5AE5139B) (tstamp 5B59DB1D) - (at 183.5 53.5 180) - (descr "Resistor, Axial_DIN0204 series, Axial, Horizontal, pin pitch=5.08mm, 0.167W, length*diameter=3.6*1.6mm^2, http://cdn-reichelt.de/documents/datenblatt/B400/1_4W%23YAG.pdf") - (tags "Resistor Axial_DIN0204 series Axial Horizontal pin pitch 5.08mm 0.167W length 3.6mm diameter 1.6mm") - (path /5B431328) - (fp_text reference R1 (at 2.54 -1.92 180) (layer F.SilkS) + (module Resistor_SMD:R_1206_3216Metric (layer F.Cu) (tedit 5B20DC38) (tstamp 5B5D10B5) + (at 58.75 66.5) + (descr "Resistor SMD 1206 (3216 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: http://www.tortai-tech.com/upload/download/2011102023233369053.pdf), generated with kicad-footprint-generator") + (tags resistor) + (path /5B5CC4D4) + (attr smd) + (fp_text reference R2 (at 0 -1.82) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) - (fp_text value 10k (at 2.54 1.92 180) (layer F.Fab) + (fp_text value 10k (at 0 1.82) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) - (fp_line (start 0.74 -0.8) (end 0.74 0.8) (layer F.Fab) (width 0.1)) - (fp_line (start 0.74 0.8) (end 4.34 0.8) (layer F.Fab) (width 0.1)) - (fp_line (start 4.34 0.8) (end 4.34 -0.8) (layer F.Fab) (width 0.1)) - (fp_line (start 4.34 -0.8) (end 0.74 -0.8) (layer F.Fab) (width 0.1)) - (fp_line (start 0 0) (end 0.74 0) (layer F.Fab) (width 0.1)) - (fp_line (start 5.08 0) (end 4.34 0) (layer F.Fab) (width 0.1)) - (fp_line (start 0.62 -0.92) (end 4.46 -0.92) (layer F.SilkS) (width 0.12)) - (fp_line (start 0.62 0.92) (end 4.46 0.92) (layer F.SilkS) (width 0.12)) - (fp_line (start -0.95 -1.05) (end -0.95 1.05) (layer F.CrtYd) (width 0.05)) - (fp_line (start -0.95 1.05) (end 6.03 1.05) (layer F.CrtYd) (width 0.05)) - (fp_line (start 6.03 1.05) (end 6.03 -1.05) (layer F.CrtYd) (width 0.05)) - (fp_line (start 6.03 -1.05) (end -0.95 -1.05) (layer F.CrtYd) (width 0.05)) - (fp_text user %R (at 2.54 0 180) (layer F.Fab) - (effects (font (size 0.72 0.72) (thickness 0.108))) + (fp_line (start -1.6 0.8) (end -1.6 -0.8) (layer F.Fab) (width 0.1)) + (fp_line (start -1.6 -0.8) (end 1.6 -0.8) (layer F.Fab) (width 0.1)) + (fp_line (start 1.6 -0.8) (end 1.6 0.8) (layer F.Fab) (width 0.1)) + (fp_line (start 1.6 0.8) (end -1.6 0.8) (layer F.Fab) (width 0.1)) + (fp_line (start -0.602064 -0.91) (end 0.602064 -0.91) (layer F.SilkS) (width 0.12)) + (fp_line (start -0.602064 0.91) (end 0.602064 0.91) (layer F.SilkS) (width 0.12)) + (fp_line (start -2.28 1.12) (end -2.28 -1.12) (layer F.CrtYd) (width 0.05)) + (fp_line (start -2.28 -1.12) (end 2.28 -1.12) (layer F.CrtYd) (width 0.05)) + (fp_line (start 2.28 -1.12) (end 2.28 1.12) (layer F.CrtYd) (width 0.05)) + (fp_line (start 2.28 1.12) (end -2.28 1.12) (layer F.CrtYd) (width 0.05)) + (fp_text user %R (at 0 0) (layer F.Fab) + (effects (font (size 0.8 0.8) (thickness 0.12))) ) - (pad 1 thru_hole circle (at 0 0 180) (size 1.4 1.4) (drill 0.7) (layers *.Cu *.Mask) + (pad 1 smd roundrect (at -1.4 0) (size 1.25 1.75) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.2) (net 3 "Net-(C1-Pad1)")) - (pad 2 thru_hole oval (at 5.08 0 180) (size 1.4 1.4) (drill 0.7) (layers *.Cu *.Mask) - (net 2 "Net-(BT1-Pad1)")) - (model ${KISYS3DMOD}/Resistor_THT.3dshapes/R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_Horizontal.wrl + (pad 2 smd roundrect (at 1.4 0) (size 1.25 1.75) (layers F.Cu F.Paste F.Mask) (roundrect_rratio 0.2) + (net 4 "Net-(R1-Pad1)")) + (model ${KISYS3DMOD}/Resistor_SMD.3dshapes/R_1206_3216Metric.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) - (segment (start 167.965 81.279833) (end 174.529833 81.279833) (width 0.25) (layer B.Cu) (net 1)) - (segment (start 166.465001 79.779834) (end 167.965 81.279833) (width 0.25) (layer B.Cu) (net 1)) - (segment (start 174.529833 81.279833) (end 189 95.75) (width 0.25) (layer B.Cu) (net 1)) - (segment (start 195.5 95.75) (end 201.5 89.75) (width 0.25) (layer B.Cu) (net 1)) - (segment (start 189 95.75) (end 195.5 95.75) (width 0.25) (layer B.Cu) (net 1)) - (segment (start 145.975001 78.029834) (end 145.75 77.804833) (width 0.25) (layer F.Cu) (net 2)) - (segment (start 145.975001 79.779834) (end 145.975001 78.029834) (width 0.25) (layer F.Cu) (net 2)) - (segment (start 145.75 77.804833) (end 145.75 62.75) (width 0.25) (layer F.Cu) (net 2)) - (segment (start 155 53.5) (end 178.42 53.5) (width 0.25) (layer F.Cu) (net 2)) - (segment (start 145.75 62.75) (end 155 53.5) (width 0.25) (layer F.Cu) (net 2)) - (segment (start 201.5 63.3) (end 201.5 64.75) (width 0.25) (layer F.Cu) (net 3)) - (segment (start 191.7 53.5) (end 201.5 63.3) (width 0.25) (layer F.Cu) (net 3)) - (segment (start 183.5 53.5) (end 191.7 53.5) (width 0.25) (layer F.Cu) (net 3)) + (segment (start 71.25 60) (end 71.75 60.5) (width 0.25) (layer F.Cu) (net 1)) + (segment (start 60 60) (end 71.25 60) (width 0.25) (layer F.Cu) (net 1)) + (segment (start 62.91 74.09) (end 61 76) (width 0.25) (layer B.Cu) (net 2)) + (segment (start 71.75 74.09) (end 62.91 74.09) (width 0.25) (layer B.Cu) (net 2)) + (segment (start 56.25 76) (end 61 76) (width 0.25) (layer B.Cu) (net 2)) + (segment (start 53.25 66.5) (end 51.25 68.5) (width 0.25) (layer F.Cu) (net 3)) + (segment (start 57.35 66.5) (end 53.25 66.5) (width 0.25) (layer F.Cu) (net 3)) + (segment (start 51.25 76) (end 51.25 68.5) (width 0.25) (layer F.Cu) (net 3)) + (segment (start 60 66.35) (end 60.15 66.5) (width 0.25) (layer F.Cu) (net 4)) + (segment (start 60 62.8) (end 60 66.35) (width 0.25) (layer F.Cu) (net 4)) ) diff --git a/test/doit/schematics/schematic-1.sch b/test/doit/schematics/schematic-1.sch index 9efffc4..a0175f3 100644 --- a/test/doit/schematics/schematic-1.sch +++ b/test/doit/schematics/schematic-1.sch @@ -16,13 +16,14 @@ $EndDescr $Comp L Device:R R1 U 1 1 5B431328 -P 4400 2600 -F 0 "R1" V 4193 2600 50 0000 C CNN -F 1 "10k" V 4284 2600 50 0000 C CNN -F 2 "Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_Horizontal" V 4330 2600 50 0001 C CNN -F 3 "~" H 4400 2600 50 0001 C CNN - 1 4400 2600 - 0 1 1 0 +P 4150 2600 +F 0 "R1" V 3943 2600 50 0000 C CNN +F 1 "10k" V 4034 2600 50 0000 C CNN +F 2 "Resistor_SMD:R_1206_3216Metric" V 4080 2600 50 0001 C CNN +F 3 "~" H 4150 2600 50 0001 C CNN +F 4 "RMCF1206JT10K0" V 4150 2600 50 0001 C CNN "mpn" + 1 4150 2600 + 0 1 1 0 $EndComp $Comp L Device:Battery_Cell BT1 @@ -30,26 +31,28 @@ U 1 1 5B431438 P 3700 2900 F 0 "BT1" H 3818 2996 50 0000 L CNN F 1 "9V" H 3818 2905 50 0000 L CNN -F 2 "Battery:BatteryHolder_Keystone_103_1x20mm" V 3700 2960 50 0001 C CNN +F 2 "Battery:BatteryHolder_MPD_BC2AAPC_2xAA" V 3700 2960 50 0001 C CNN F 3 "~" V 3700 2960 50 0001 C CNN +F 4 "BC2AAPC" H 3700 2900 50 0001 C CNN "mpn" 1 3700 2900 - 1 0 0 -1 + 1 0 0 -1 $EndComp $Comp L Device:C C1 U 1 1 5B4314AB -P 5000 2850 -F 0 "C1" H 5115 2896 50 0000 L CNN -F 1 "1u" H 5115 2805 50 0000 L CNN -F 2 "Capacitor_THT:CP_Axial_L18.0mm_D8.0mm_P25.00mm_Horizontal" H 5038 2700 50 0001 C CNN -F 3 "~" H 5000 2850 50 0001 C CNN - 1 5000 2850 - 1 0 0 -1 +P 5100 2850 +F 0 "C1" H 5215 2896 50 0000 L CNN +F 1 "1u" H 5215 2805 50 0000 L CNN +F 2 "Capacitor_THT:CP_Radial_Tantal_D10.5mm_P5.00mm" H 5138 2700 50 0001 C CNN +F 3 "~" H 5100 2850 50 0001 C CNN +F 4 "UCA2G100MPD1TD" H 5100 2850 50 0001 C CNN "mpn" + 1 5100 2850 + 1 0 0 -1 $EndComp Wire Wire Line 3700 3000 3700 3100 Wire Wire Line - 5000 3100 5000 3000 + 5100 3100 5100 3000 $Comp L power:GND #PWR0101 U 1 1 5B4315FE @@ -59,7 +62,7 @@ F 1 "GND" H 3705 3027 50 0000 C CNN F 2 "" H 3700 3200 50 0001 C CNN F 3 "" H 3700 3200 50 0001 C CNN 1 3700 3200 - 1 0 0 -1 + 1 0 0 -1 $EndComp Wire Wire Line 3700 3200 3700 3100 @@ -67,11 +70,25 @@ Connection ~ 3700 3100 Wire Wire Line 3700 2700 3700 2600 Wire Wire Line - 5000 2600 5000 2700 + 5100 2600 5100 2700 Wire Wire Line - 3700 2600 4250 2600 + 3700 2600 4000 2600 Wire Wire Line - 3700 3100 5000 3100 + 3700 3100 5100 3100 Wire Wire Line - 4550 2600 5000 2600 + 4300 2600 4500 2600 +$Comp +L Device:R R2 +U 1 1 5B5CC4D4 +P 4650 2600 +F 0 "R2" V 4443 2600 50 0000 C CNN +F 1 "10k" V 4534 2600 50 0000 C CNN +F 2 "Resistor_SMD:R_1206_3216Metric" V 4580 2600 50 0001 C CNN +F 3 "~" H 4650 2600 50 0001 C CNN +F 4 "RMCF1206JT10K0" V 4650 2600 50 0001 C CNN "mpn" + 1 4650 2600 + 0 1 1 0 +$EndComp +Wire Wire Line + 4800 2600 5100 2600 $EndSCHEMATC diff --git a/test/doit/test_doit.py b/test/doit/test_doit.py index 32eb138..2f6f035 100644 --- a/test/doit/test_doit.py +++ b/test/doit/test_doit.py @@ -6,15 +6,16 @@ from pathlib import Path from ee.ds import DataSetManager from inspect import Parameter import ee.kicad.doit +import ee.digikey.doit from ee.kicad.doit import * +from ee.digikey.doit import * logger = logging.getLogger(__name__) file_dir = Path(__file__).parent schematics_dir = file_dir / "schematics" - def exec_task(task): targets = task["targets"] for a in task["actions"]: @@ -44,6 +45,9 @@ def test_doit(tmpdir, caplog): sch=schematics_dir / "schematic-1.sch", kicad_pcb=schematics_dir / "schematic-1.kicad_pcb",) + ee.digikey.doit.doit_config.configure(data_set_manager=dsm) + exec_task(task_kicad_sch_to_data_set()) exec_task(task_kicad_pcb_to_data_set()) exec_task(task_kicad_create_component_data_set()) + exec_task(task_digikey_resolve_schematic_components()) -- cgit v1.2.3