diff --git a/tests/board_samples/kicad_7/copy_files.kicad_sch b/tests/board_samples/kicad_7/copy_files.kicad_sch new file mode 100644 index 000000000..e5bccf015 --- /dev/null +++ b/tests/board_samples/kicad_7/copy_files.kicad_sch @@ -0,0 +1,312 @@ +(kicad_sch (version 20230121) (generator eeschema) + + (uuid 572ad7ce-5511-4a30-9ae2-555a1e4d2f01) + + (paper "A4") + + (lib_symbols + (symbol "Device:C" (pin_numbers hide) (pin_names (offset 0.254)) (in_bom yes) (on_board yes) + (property "Reference" "C" (at 0.635 2.54 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "C" (at 0.635 -2.54 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "" (at 0.9652 -3.81 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_keywords" "cap capacitor" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_description" "Unpolarized capacitor" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_fp_filters" "C_*" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (symbol "C_0_1" + (polyline + (pts + (xy -2.032 -0.762) + (xy 2.032 -0.762) + ) + (stroke (width 0.508) (type default)) + (fill (type none)) + ) + (polyline + (pts + (xy -2.032 0.762) + (xy 2.032 0.762) + ) + (stroke (width 0.508) (type default)) + (fill (type none)) + ) + ) + (symbol "C_1_1" + (pin passive line (at 0 3.81 270) (length 2.794) + (name "~" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + (pin passive line (at 0 -3.81 90) (length 2.794) + (name "~" (effects (font (size 1.27 1.27)))) + (number "2" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "Device:R" (pin_numbers hide) (pin_names (offset 0)) (in_bom yes) (on_board yes) + (property "Reference" "R" (at 2.032 0 90) + (effects (font (size 1.27 1.27))) + ) + (property "Value" "R" (at 0 0 90) + (effects (font (size 1.27 1.27))) + ) + (property "Footprint" "" (at -1.778 0 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_keywords" "R res resistor" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_description" "Resistor" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_fp_filters" "R_*" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (symbol "R_0_1" + (rectangle (start -1.016 -2.54) (end 1.016 2.54) + (stroke (width 0.254) (type default)) + (fill (type none)) + ) + ) + (symbol "R_1_1" + (pin passive line (at 0 3.81 270) (length 1.27) + (name "~" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + (pin passive line (at 0 -3.81 90) (length 1.27) + (name "~" (effects (font (size 1.27 1.27)))) + (number "2" (effects (font (size 1.27 1.27)))) + ) + ) + ) + ) + + + (symbol (lib_id "Device:C") (at 63.5 54.61 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) + (uuid 09fdca97-61bc-4132-b085-bd4af34237d0) + (property "Reference" "C3" (at 67.31 53.34 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "3" (at 67.31 55.88 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Capacitor_SMD:C_0805_2012Metric" (at 64.4652 58.42 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 63.5 54.61 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "2" (uuid 8abb3cc0-fb32-4e70-86f6-b569bab12782)) + (pin "1" (uuid dab56275-125b-4676-abcf-4c0a21dd5b89)) + (instances + (project "copy_files" + (path "/572ad7ce-5511-4a30-9ae2-555a1e4d2f01" + (reference "C3") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R") (at 50.8 41.91 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) + (uuid 0bafe76e-597a-494e-99e7-ec4571c58be4) + (property "Reference" "R2" (at 53.34 40.64 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "2" (at 53.34 43.18 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Resistor_SMD:R_0805_2012Metric" (at 49.022 41.91 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 50.8 41.91 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 71b9e4de-7454-4b4b-a1a1-4b8c293369e1)) + (pin "2" (uuid 6c82dd73-1f35-42d0-bd61-8695273089e2)) + (instances + (project "copy_files" + (path "/572ad7ce-5511-4a30-9ae2-555a1e4d2f01" + (reference "R2") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:C") (at 50.8 54.61 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) + (uuid 0f260a2e-537d-4773-87a7-619a680dd418) + (property "Reference" "C2" (at 54.61 53.34 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "2" (at 54.61 55.88 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Capacitor_SMD:C_0805_2012Metric" (at 51.7652 58.42 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 50.8 54.61 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "2" (uuid 604a6a98-ced9-48d9-b79f-40c4e59f7fa7)) + (pin "1" (uuid dac1eb60-0ec3-44b6-9ea8-71566dea4a4d)) + (instances + (project "copy_files" + (path "/572ad7ce-5511-4a30-9ae2-555a1e4d2f01" + (reference "C2") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R") (at 76.2 41.91 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) + (uuid 22b77652-7050-4a96-969a-3af2fce1c948) + (property "Reference" "R4" (at 78.74 40.64 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "4" (at 78.74 43.18 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Resistor_SMD:R_0805_2012Metric" (at 74.422 41.91 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 76.2 41.91 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid b86148d0-c0b5-4671-a58d-7bc5daa2f796)) + (pin "2" (uuid fb0bf4c0-57b6-477d-9df0-ffe28ab9d4fc)) + (instances + (project "copy_files" + (path "/572ad7ce-5511-4a30-9ae2-555a1e4d2f01" + (reference "R4") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R") (at 38.1 41.91 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) + (uuid 618b207e-a1ba-433a-b517-82a99034748f) + (property "Reference" "R1" (at 40.64 40.64 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "1" (at 40.64 43.18 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Resistor_SMD:R_0805_2012Metric" (at 36.322 41.91 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 38.1 41.91 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid c3339686-979b-45f5-8373-32ace521eb6a)) + (pin "2" (uuid a8283330-5000-49fb-8d63-73b7c1d5f108)) + (instances + (project "copy_files" + (path "/572ad7ce-5511-4a30-9ae2-555a1e4d2f01" + (reference "R1") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:C") (at 76.2 54.61 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) + (uuid af66e68c-2667-4fef-acdf-0d78c0ad4648) + (property "Reference" "C4" (at 80.01 53.34 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "4" (at 80.01 55.88 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Capacitor_SMD:C_0805_2012Metric" (at 77.1652 58.42 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 76.2 54.61 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "2" (uuid a6918f8e-bf26-4629-8269-87724f15bf11)) + (pin "1" (uuid 5914e6c0-9637-4974-83c7-949afcc175d5)) + (instances + (project "copy_files" + (path "/572ad7ce-5511-4a30-9ae2-555a1e4d2f01" + (reference "C4") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R") (at 63.5 41.91 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) + (uuid d8f9134a-ad3d-4fad-9e8f-8fd3163ab79f) + (property "Reference" "R3" (at 66.04 40.64 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "3" (at 66.04 43.18 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Resistor_SMD:R_0805_2012Metric" (at 61.722 41.91 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 63.5 41.91 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 7d7aec68-352d-4cfb-a7b6-1f17919814d5)) + (pin "2" (uuid d7074b4f-ed3e-4ee5-8cf9-d5fd5868976c)) + (instances + (project "copy_files" + (path "/572ad7ce-5511-4a30-9ae2-555a1e4d2f01" + (reference "R3") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:C") (at 38.1 54.61 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) + (uuid e6fab25f-b763-48bf-b6da-40819f66741b) + (property "Reference" "C1" (at 41.91 53.34 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "1" (at 41.91 55.88 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Capacitor_SMD:C_0805_2012Metric" (at 39.0652 58.42 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 38.1 54.61 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "2" (uuid 9e72ba18-8e7d-4cd8-8b3f-a5db2d129854)) + (pin "1" (uuid 50fe2a2a-96f3-4304-845d-ae7a0795c8cd)) + (instances + (project "copy_files" + (path "/572ad7ce-5511-4a30-9ae2-555a1e4d2f01" + (reference "C1") (unit 1) + ) + ) + ) + ) + + (sheet_instances + (path "/" (page "1")) + ) +) diff --git a/tests/board_samples/kicad_8/copy_files.kicad_sch b/tests/board_samples/kicad_8/copy_files.kicad_sch new file mode 100644 index 000000000..e5bccf015 --- /dev/null +++ b/tests/board_samples/kicad_8/copy_files.kicad_sch @@ -0,0 +1,312 @@ +(kicad_sch (version 20230121) (generator eeschema) + + (uuid 572ad7ce-5511-4a30-9ae2-555a1e4d2f01) + + (paper "A4") + + (lib_symbols + (symbol "Device:C" (pin_numbers hide) (pin_names (offset 0.254)) (in_bom yes) (on_board yes) + (property "Reference" "C" (at 0.635 2.54 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "C" (at 0.635 -2.54 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "" (at 0.9652 -3.81 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_keywords" "cap capacitor" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_description" "Unpolarized capacitor" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_fp_filters" "C_*" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (symbol "C_0_1" + (polyline + (pts + (xy -2.032 -0.762) + (xy 2.032 -0.762) + ) + (stroke (width 0.508) (type default)) + (fill (type none)) + ) + (polyline + (pts + (xy -2.032 0.762) + (xy 2.032 0.762) + ) + (stroke (width 0.508) (type default)) + (fill (type none)) + ) + ) + (symbol "C_1_1" + (pin passive line (at 0 3.81 270) (length 2.794) + (name "~" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + (pin passive line (at 0 -3.81 90) (length 2.794) + (name "~" (effects (font (size 1.27 1.27)))) + (number "2" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "Device:R" (pin_numbers hide) (pin_names (offset 0)) (in_bom yes) (on_board yes) + (property "Reference" "R" (at 2.032 0 90) + (effects (font (size 1.27 1.27))) + ) + (property "Value" "R" (at 0 0 90) + (effects (font (size 1.27 1.27))) + ) + (property "Footprint" "" (at -1.778 0 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_keywords" "R res resistor" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_description" "Resistor" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "ki_fp_filters" "R_*" (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (symbol "R_0_1" + (rectangle (start -1.016 -2.54) (end 1.016 2.54) + (stroke (width 0.254) (type default)) + (fill (type none)) + ) + ) + (symbol "R_1_1" + (pin passive line (at 0 3.81 270) (length 1.27) + (name "~" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + (pin passive line (at 0 -3.81 90) (length 1.27) + (name "~" (effects (font (size 1.27 1.27)))) + (number "2" (effects (font (size 1.27 1.27)))) + ) + ) + ) + ) + + + (symbol (lib_id "Device:C") (at 63.5 54.61 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) + (uuid 09fdca97-61bc-4132-b085-bd4af34237d0) + (property "Reference" "C3" (at 67.31 53.34 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "3" (at 67.31 55.88 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Capacitor_SMD:C_0805_2012Metric" (at 64.4652 58.42 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 63.5 54.61 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "2" (uuid 8abb3cc0-fb32-4e70-86f6-b569bab12782)) + (pin "1" (uuid dab56275-125b-4676-abcf-4c0a21dd5b89)) + (instances + (project "copy_files" + (path "/572ad7ce-5511-4a30-9ae2-555a1e4d2f01" + (reference "C3") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R") (at 50.8 41.91 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) + (uuid 0bafe76e-597a-494e-99e7-ec4571c58be4) + (property "Reference" "R2" (at 53.34 40.64 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "2" (at 53.34 43.18 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Resistor_SMD:R_0805_2012Metric" (at 49.022 41.91 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 50.8 41.91 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 71b9e4de-7454-4b4b-a1a1-4b8c293369e1)) + (pin "2" (uuid 6c82dd73-1f35-42d0-bd61-8695273089e2)) + (instances + (project "copy_files" + (path "/572ad7ce-5511-4a30-9ae2-555a1e4d2f01" + (reference "R2") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:C") (at 50.8 54.61 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) + (uuid 0f260a2e-537d-4773-87a7-619a680dd418) + (property "Reference" "C2" (at 54.61 53.34 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "2" (at 54.61 55.88 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Capacitor_SMD:C_0805_2012Metric" (at 51.7652 58.42 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 50.8 54.61 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "2" (uuid 604a6a98-ced9-48d9-b79f-40c4e59f7fa7)) + (pin "1" (uuid dac1eb60-0ec3-44b6-9ea8-71566dea4a4d)) + (instances + (project "copy_files" + (path "/572ad7ce-5511-4a30-9ae2-555a1e4d2f01" + (reference "C2") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R") (at 76.2 41.91 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) + (uuid 22b77652-7050-4a96-969a-3af2fce1c948) + (property "Reference" "R4" (at 78.74 40.64 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "4" (at 78.74 43.18 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Resistor_SMD:R_0805_2012Metric" (at 74.422 41.91 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 76.2 41.91 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid b86148d0-c0b5-4671-a58d-7bc5daa2f796)) + (pin "2" (uuid fb0bf4c0-57b6-477d-9df0-ffe28ab9d4fc)) + (instances + (project "copy_files" + (path "/572ad7ce-5511-4a30-9ae2-555a1e4d2f01" + (reference "R4") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R") (at 38.1 41.91 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) + (uuid 618b207e-a1ba-433a-b517-82a99034748f) + (property "Reference" "R1" (at 40.64 40.64 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "1" (at 40.64 43.18 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Resistor_SMD:R_0805_2012Metric" (at 36.322 41.91 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 38.1 41.91 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid c3339686-979b-45f5-8373-32ace521eb6a)) + (pin "2" (uuid a8283330-5000-49fb-8d63-73b7c1d5f108)) + (instances + (project "copy_files" + (path "/572ad7ce-5511-4a30-9ae2-555a1e4d2f01" + (reference "R1") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:C") (at 76.2 54.61 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) + (uuid af66e68c-2667-4fef-acdf-0d78c0ad4648) + (property "Reference" "C4" (at 80.01 53.34 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "4" (at 80.01 55.88 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Capacitor_SMD:C_0805_2012Metric" (at 77.1652 58.42 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 76.2 54.61 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "2" (uuid a6918f8e-bf26-4629-8269-87724f15bf11)) + (pin "1" (uuid 5914e6c0-9637-4974-83c7-949afcc175d5)) + (instances + (project "copy_files" + (path "/572ad7ce-5511-4a30-9ae2-555a1e4d2f01" + (reference "C4") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:R") (at 63.5 41.91 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) + (uuid d8f9134a-ad3d-4fad-9e8f-8fd3163ab79f) + (property "Reference" "R3" (at 66.04 40.64 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "3" (at 66.04 43.18 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Resistor_SMD:R_0805_2012Metric" (at 61.722 41.91 90) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 63.5 41.91 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "1" (uuid 7d7aec68-352d-4cfb-a7b6-1f17919814d5)) + (pin "2" (uuid d7074b4f-ed3e-4ee5-8cf9-d5fd5868976c)) + (instances + (project "copy_files" + (path "/572ad7ce-5511-4a30-9ae2-555a1e4d2f01" + (reference "R3") (unit 1) + ) + ) + ) + ) + + (symbol (lib_id "Device:C") (at 38.1 54.61 0) (unit 1) + (in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) + (uuid e6fab25f-b763-48bf-b6da-40819f66741b) + (property "Reference" "C1" (at 41.91 53.34 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Value" "1" (at 41.91 55.88 0) + (effects (font (size 1.27 1.27)) (justify left)) + ) + (property "Footprint" "Capacitor_SMD:C_0805_2012Metric" (at 39.0652 58.42 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "~" (at 38.1 54.61 0) + (effects (font (size 1.27 1.27)) hide) + ) + (pin "2" (uuid 9e72ba18-8e7d-4cd8-8b3f-a5db2d129854)) + (pin "1" (uuid 50fe2a2a-96f3-4304-845d-ae7a0795c8cd)) + (instances + (project "copy_files" + (path "/572ad7ce-5511-4a30-9ae2-555a1e4d2f01" + (reference "C1") (unit 1) + ) + ) + ) + ) + + (sheet_instances + (path "/" (page "1")) + ) +) diff --git a/tests/test_plot/test_misc.py b/tests/test_plot/test_misc.py index 46efe2faa..0d6887bf4 100644 --- a/tests/test_plot/test_misc.py +++ b/tests/test_plot/test_misc.py @@ -49,6 +49,14 @@ # If we are not running on Debian skip the text part at the top of diff PDFs OFFSET_Y = '0' if is_debian else '80' DIFF_TOL = 0 if is_debian else 1200 +# The 3D models in copy_files +MODELS = ['3d_models/3d/1/test.wrl', '3d_models/3d/2/test.wrl', + '3d_models/Resistor_SMD.3dshapes/R_0805_2012Metrico.step', + '3d_models/Resistor_SMD.3dshapes/R_0805_2012Metrico.wrl', + '3d_models/Capacitor_SMD.3dshapes/C_0805_2012Metric.step', + '3d_models/Capacitor_SMD.3dshapes/C_0805_2012Metric.wrl', + '3d_models/Resistor_SMD.3dshapes/R_0805_2012Metric.step', + '3d_models/Resistor_SMD.3dshapes/R_0805_2012Metric.wrl'] def test_skip_pre_and_outputs(test_dir): @@ -1749,13 +1757,6 @@ def test_copy_files_2(test_dir): # The modified PCB ctx.expect_out_file(prj+'.kicad_pcb', sub=True) # The 3D models - MODELS = ['3d_models/3d/1/test.wrl', '3d_models/3d/2/test.wrl', - '3d_models/Resistor_SMD.3dshapes/R_0805_2012Metrico.step', - '3d_models/Resistor_SMD.3dshapes/R_0805_2012Metrico.wrl', - '3d_models/Capacitor_SMD.3dshapes/C_0805_2012Metric.step', - '3d_models/Capacitor_SMD.3dshapes/C_0805_2012Metric.wrl', - '3d_models/Resistor_SMD.3dshapes/R_0805_2012Metric.step', - '3d_models/Resistor_SMD.3dshapes/R_0805_2012Metric.wrl'] for m in MODELS: ctx.expect_out_file(m, sub=True) # Make sure the PCB points to them @@ -1767,6 +1768,28 @@ def test_copy_files_2(test_dir): ctx.clean_up() +@pytest.mark.slow +@pytest.mark.skipif(not context.ki7(), reason="Just testing with 7") +def test_copy_files_3(test_dir): + """ Copy files and 3D models """ + prj = 'copy_files' + ctx = context.TestContext(test_dir, prj, 'copy_files_3', 'test.files') + os.environ['KIBOT_3D_MODELS'] = '/tmp' + ctx.run(kicost=True) # We use the fake web server + del os.environ['KIBOT_3D_MODELS'] + # The modified PCB + prj_s = os.path.join('prj', prj) + ctx.expect_out_file([prj_s+'.kicad_pcb', prj_s+'.kicad_sch', prj_s+'.kicad_pro', prj_s+'.kicad_prl', + 'prj/fp-lib-table', 'prj/sym-lib-table', 'prj/symbols/Device.kicad_sym', + 'prj/footprints/Capacitor_SMD.pretty/C_0805_2012Metric.kicad_mod', + 'prj/footprints/Resistor_SMD.pretty/R_0805_2012Metric.kicad_mod'], sub=True) + ctx.expect_out_file(['prj/'+m for m in MODELS], sub=True) + # Make sure the PCB points to them + ctx.search_in_file(prj_s+'.kicad_pcb', ['model "{}"'.format(r'\$\{KIPRJMOD\}/'+m) for m in MODELS if m.endswith('wrl')], + sub=True) + ctx.clean_up() + + def test_sub_pcb_bp(test_dir): """ Test a multiboard example """ prj = 'batteryPack' diff --git a/tests/yaml_samples/copy_files_3.kibot.yaml b/tests/yaml_samples/copy_files_3.kibot.yaml new file mode 100644 index 000000000..6116c4353 --- /dev/null +++ b/tests/yaml_samples/copy_files_3.kibot.yaml @@ -0,0 +1,43 @@ +# Example KiBot config file +kibot: + version: 1 + +global: + environment: + # Relative to the PCB file + models_3d: '../../data/metrico/' + define_old: true + aliases_for_3d_models: + - name: ALIAS1 + value: '3d/1' + - name: ALIAS2 + value: '3d/2' + +outputs: + - name: 'position' + comment: "Pick and place file" + type: position + dir: positiondir + options: + format: ASCII # CSV or ASCII format + units: millimeters # millimeters or inches + separate_files_for_front_and_back: false + only_smd: true + + - name: result + comment: 'Copy files from source, output and 3D models' + type: copy_files + dir: 'test.%x' + options: + # link_no_copy: true + kicad_3d_url: 'http://localhost:8000/' + files: + - source_type: project + dest: prj + + - name: compressed + type: compress + options: + format: ZIP + files: + - from_output: result