From 7487165277160685f2f3dc1f27bfe4bac4c9df68 Mon Sep 17 00:00:00 2001 From: PSR0001 Date: Fri, 16 Jun 2023 23:42:28 +0530 Subject: Update KiCad symbol template --- src/Appconfig.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/Appconfig.py b/src/Appconfig.py index d03dcc3..a53fee5 100644 --- a/src/Appconfig.py +++ b/src/Appconfig.py @@ -23,16 +23,18 @@ class Appconfig: parser_nghdl = ConfigParser() parser_nghdl.read(os.path.join(home, os.path.join('.nghdl', 'config.ini'))) - kicad_lib_template = { - "start_def": "DEF comp_name U 0 40 Y Y 1 F N", - "U_field": "F0 \"U\" 2850 1800 60 H V C CNN", - "comp_name_field": "F1 \"comp_name\" 2850 2000 60 H V C CNN", - "blank_field": ["F2 blank_quotes 2850 1950 60 H V C CNN", - "F3 blank_quotes 2850 1950 60 H V C CNN"], - "start_draw": "DRAW", - "draw_pos": "S 2550 2100 3150 1800 0 1 0 N", - "input_port": "X in 1 2350 2000 200 R 50 50 1 1 I", - "output_port": "X out 2 3350 2000 200 L 50 50 1 1 O", - "end_draw": "ENDDRAW", - "end_def": "ENDDEF" + # KiCad V6 Symbol Template + kicad_sym_template = { + "start_def": "(symbol \"comp_name\" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)", + "U_field":"(property \"Reference\" \"U\" (id 0) (at 6 7 0)(effects (font (size 1.524 1.524))))", + "comp_name_field":"(property \"Value\" \"comp_name\" (id 1) (at 8 10 0)(effects (font (size 1.524 1.524))))", + "blank_field": [ + "(property \"Footprint\" blank_quotes (id 2) (at 72.39 49.53 0)(effects (font (size 1.524 1.524))))", + "(property \"Datasheet\" blank_quotes (id 3) (at 72.39 49.53 0)(effects (font (size 1.524 1.524))))" + ], + "draw_pos": "(symbol \"comp_name\"(rectangle (start 0 0 ) (end 15.25 2 )(stroke (width 0) (type default) (color 0 0 0 0))(fill (type none))))", + "start_draw":"(symbol", + "input_port":"(pin input line(at -5.15 0.54 0 )(length 5.08 )(name \"in\" (effects(font(size 1.27 1.27))))(number \"1\" (effects (font (size 1.27 1.27)))))", + "output_port": "(pin output line(at 20.38 0.54 180 )(length 5.08 )(name \"out\" (effects(font(size 1.27 1.27))))(number \"2\" (effects (font (size 1.27 1.27)))))", + "end_draw":"))" } -- cgit