From bc587733b98a1423ba892e91314cb90c9c8b4a95 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Wed, 16 Oct 2024 11:15:12 -0300 Subject: [PATCH] [Worksheet][Added] Undocumented font face and color Now can be used, but not correctly rendered See #695 --- CHANGELOG.md | 2 + docs/samples/generic_plot.kibot.yaml | 3 +- docs/source/Changelog.rst | 2 + kibot/kicad/sexp_helpers.py | 26 + kibot/kicad/v6_sch.py | 28 +- kibot/kicad/worksheet.py | 19 +- kibot/out_pcb_print.py | 7 +- .../board_samples/kicad_8/wks_font.kicad_pcb | 963 ++++++++++++++++++ .../board_samples/kicad_8/wks_font.kicad_pro | 601 +++++++++++ .../board_samples/kicad_8/wks_font.kicad_wks | 40 + 10 files changed, 1658 insertions(+), 33 deletions(-) create mode 100644 tests/board_samples/kicad_8/wks_font.kicad_pcb create mode 100644 tests/board_samples/kicad_8/wks_font.kicad_pro create mode 100644 tests/board_samples/kicad_8/wks_font.kicad_wks diff --git a/CHANGELOG.md b/CHANGELOG.md index 169f87c5..29e0db5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - SVG: `use_aux_axis_as_origin` option (#681) - Report: thickness units (#685) - PCB Print: Note about `colored_pads` and `colored_vias` side effects (#682) +- Worksheet: undocumented font face and color now can be used, but not + correctly rendered (See #695) ### Fixed - PCB Print: allow specifying `repeat_for_layer` with empty `repeat_layers`. diff --git a/docs/samples/generic_plot.kibot.yaml b/docs/samples/generic_plot.kibot.yaml index 05d4182b..8e6cb4d0 100644 --- a/docs/samples/generic_plot.kibot.yaml +++ b/docs/samples/generic_plot.kibot.yaml @@ -2603,7 +2603,8 @@ outputs: # internal: KiBot loads the `.kicad_wks` and does the drawing work. # Best option, but some details are different from what the GUI generates. # plot: uses KiCad Python API. Not available for KiCad 5. - # You get the default frame and some substitutions doesn't work + # You get the default frame and some substitutions doesn't work. |br| + # Important: colors and fonts doesn't work, not supported by the API. Try *gui*, might work frame_plot_mechanism: 'internal' # [boolean=false] Hide components in the Fab layer that are marked as excluded by a variant. # Affected by global options diff --git a/docs/source/Changelog.rst b/docs/source/Changelog.rst index d71b3f9d..2fe4dee4 100644 --- a/docs/source/Changelog.rst +++ b/docs/source/Changelog.rst @@ -24,6 +24,8 @@ Added - Report: thickness units (#685) - PCB Print: Note about ``colored_pads`` and ``colored_vias`` side effects (#682) +- Worksheet: undocumented font face and color now can be used, but not + correctly rendered (See #695) Fixed ~~~~~ diff --git a/kibot/kicad/sexp_helpers.py b/kibot/kicad/sexp_helpers.py index f9bfac3b..ef2bc773 100644 --- a/kibot/kicad/sexp_helpers.py +++ b/kibot/kicad/sexp_helpers.py @@ -11,6 +11,12 @@ # 'kicad_sch', 'lib_symbols', 'symbol', 'sheet', 'sheet_instances', 'symbol_instances'} +def _symbol(name, content=None): + if content is None: + return [Symbol(name)] + return [Symbol(name)] + content + + class Point(object): def __init__(self, items): super().__init__() @@ -22,6 +28,26 @@ def parse(items): return Point(items) +class Color(object): + def __init__(self, items=None): + super().__init__() + if items: + self.r = _check_integer(items, 1, 'red color') + self.g = _check_integer(items, 2, 'green color') + self.b = _check_integer(items, 3, 'blue color') + # Sheet sheet.fill.color is float ... + self.a = _check_float(items, 4, 'alpha color') + else: + self.r = self.g = self.b = self.a = 0 + + @staticmethod + def parse(items): + return Color(items) + + def write(self): + return _symbol('color', [self.r, self.g, self.b, self.a]) + + def make_separated(sexp): """ Add separators to make the file more readable """ if not isinstance(sexp, list): diff --git a/kibot/kicad/v6_sch.py b/kibot/kicad/v6_sch.py index 3de5ec23..9d173aa3 100644 --- a/kibot/kicad/v6_sch.py +++ b/kibot/kicad/v6_sch.py @@ -22,7 +22,7 @@ from .sexp_helpers import (_check_is_symbol_list, _check_len, _check_len_total, _check_symbol, _check_hide, _check_integer, _check_float, _check_str, _check_symbol_value, _check_symbol_float, _check_symbol_int, _check_symbol_str, _get_offset, _get_yes_no, _get_at, _get_size, _get_xy, _get_points, - _check_relaxed) + _check_relaxed, Color, _symbol) from .v5_sch import SchematicComponent, Schematic logger = log.get_logger() @@ -268,26 +268,6 @@ def write(self): return _symbol('effects', data) -class Color(object): - def __init__(self, items=None): - super().__init__() - if items: - self.r = _check_integer(items, 1, 'red color') - self.g = _check_integer(items, 2, 'green color') - self.b = _check_integer(items, 3, 'blue color') - # Sheet sheet.fill.color is float ... - self.a = _check_float(items, 4, 'alpha color') - else: - self.r = self.g = self.b = self.a = 0 - - @staticmethod - def parse(items): - return Color(items) - - def write(self): - return _symbol('color', [self.r, self.g, self.b, self.a]) - - class Stroke(object): def __init__(self): super().__init__() @@ -1816,12 +1796,6 @@ def parse(items): return layers -def _symbol(name, content=None): - if content is None: - return [Symbol(name)] - return [Symbol(name)] + content - - def _symbol_yn(name, val): return [Symbol(name), NO_YES[val]] diff --git a/kibot/kicad/worksheet.py b/kibot/kicad/worksheet.py index 321e99cb..e0808390 100644 --- a/kibot/kicad/worksheet.py +++ b/kibot/kicad/worksheet.py @@ -23,7 +23,7 @@ if GS.ki7: from pcbnew import (PCB_SHAPE, PCB_TEXT, FILL_T_FILLED_SHAPE, SHAPE_T_POLY, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, GR_TEXT_H_ALIGN_CENTER, GR_TEXT_V_ALIGN_TOP, GR_TEXT_V_ALIGN_CENTER, - GR_TEXT_V_ALIGN_BOTTOM) + GR_TEXT_V_ALIGN_BOTTOM, COLOR4D) # Is this change really needed??!!! People doesn't have much to do ... GR_TEXT_HJUSTIFY_LEFT = GR_TEXT_H_ALIGN_LEFT GR_TEXT_HJUSTIFY_RIGHT = GR_TEXT_H_ALIGN_RIGHT @@ -34,17 +34,17 @@ elif GS.ki6: from pcbnew import (PCB_SHAPE, PCB_TEXT, FILL_T_FILLED_SHAPE, SHAPE_T_POLY, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP, GR_TEXT_VJUSTIFY_CENTER, - GR_TEXT_VJUSTIFY_BOTTOM) + GR_TEXT_VJUSTIFY_BOTTOM, COLOR4D) else: from pcbnew import (DRAWSEGMENT, TEXTE_PCB, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_HJUSTIFY_CENTER, - GR_TEXT_VJUSTIFY_TOP, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_BOTTOM) + GR_TEXT_VJUSTIFY_TOP, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_BOTTOM, COLOR4D) PCB_SHAPE = DRAWSEGMENT PCB_TEXT = TEXTE_PCB FILL_T_FILLED_SHAPE = 0 SHAPE_T_POLY = 4 from .sexpdata import load, SExpData from .sexp_helpers import (_check_is_symbol_list, _check_float, _check_integer, _check_symbol_value, _check_str, _check_symbol, - _check_relaxed, _get_points, _check_symbol_str) + _check_relaxed, _get_points, _check_symbol_str, Color) from ..svgutils.transform import ImageElement, GroupElement from ..misc import W_WKSVERSION from .. import log @@ -225,6 +225,8 @@ def __init__(self): self.italic = False self.size = wxSize(setup.text_w, setup.text_h) self.line_width = setup.text_line_width + self.color = None + self.face = None @staticmethod def parse(items): @@ -239,6 +241,10 @@ def parse(items): s.size = _get_size(items, c+1, i_type, WksFont.name) elif i_type == 'linewidth': s.line_width = _check_mm(i, 1, i_type) + elif i_type == 'color': # Undocumented, as usually + s.color = Color.parse(i) + elif i_type == 'face': # Undocumented, as usually + s.face = _check_str(i, 1, 'font face') else: raise WksError('Unknown font attribute `{}`'.format(i)) return s @@ -317,6 +323,11 @@ def draw(e, p): s.SetLayer(p.layer) if e.font.italic: s.SetItalic(True) + if e.font.color: + # For KiCad 8.0.5 this is useless because the plot API fails to use the color + s.SetTextColor(COLOR4D(e.font.color.r/255.0, e.font.color.g/255.0, e.font.color.b/255.0, e.font.color.a)) + # if e.face: + # ... incomplete API for 8.0.5, SetFont needs KIFONT::FONT, not defined if e.rotate: s.SetTextAngle(GS.angle(e.rotate)) # Adjust the text size to the maximum allowed diff --git a/kibot/out_pcb_print.py b/kibot/out_pcb_print.py index 41e59e95..f83c297c 100644 --- a/kibot/out_pcb_print.py +++ b/kibot/out_pcb_print.py @@ -322,7 +322,8 @@ def __init__(self): internal: KiBot loads the `.kicad_wks` and does the drawing work. Best option, but some details are different from what the GUI generates. plot: uses KiCad Python API. Not available for KiCad 5. - You get the default frame and some substitutions doesn't work """ + You get the default frame and some substitutions doesn't work. |br| + Important: colors and fonts doesn't work, not supported by the API. Try *gui*, might work""" self.pages = PagesOptions """ *[list(dict)=[]] List of pages to include in the output document. Each page contains one or more layers of the PCB """ @@ -540,6 +541,8 @@ def plot_frame_internal(self, pc, po, p, page, pages): po.SetPlotFrameRef(False) po.SetScale(1.0) po.SetNegative(False) + # Trying to set the color mode here doesn't change the mode (GetColorMode() returns False) + # pc.SetColorMode(True) pc.SetLayer(self.cleared_layer) # Load the WKS error = None @@ -552,6 +555,8 @@ def plot_frame_internal(self, pc, po, p, page, pages): tb_vars = self.fill_kicad_vars(page, pages, p) ws.draw(GS.board, self.cleared_layer, page, self.paper_w, self.paper_h, tb_vars) pc.OpenPlotfile('frame', PLOT_FORMAT_SVG, p.sheet) + # At least on 8.0.5 the following is useless: + # pc.SetColorMode(True) pc.PlotLayer() pc.ClosePlot() ws.undraw(GS.board) diff --git a/tests/board_samples/kicad_8/wks_font.kicad_pcb b/tests/board_samples/kicad_8/wks_font.kicad_pcb new file mode 100644 index 00000000..517e65da --- /dev/null +++ b/tests/board_samples/kicad_8/wks_font.kicad_pcb @@ -0,0 +1,963 @@ +(kicad_pcb + (version 20240108) + (generator "pcbnew") + (generator_version "8.0") + (general + (thickness 1.6) + (legacy_teardrops no) + ) + (paper "A4") + (title_block + (date "2024-01-19") + (comment 2 "The_C2") + ) + (layers + (0 "F.Cu" signal) + (31 "B.Cu" signal) + (32 "B.Adhes" user "B.Adhesive") + (33 "F.Adhes" user "F.Adhesive") + (34 "B.Paste" user) + (35 "F.Paste" user) + (36 "B.SilkS" user "B.Silkscreen") + (37 "F.SilkS" user "F.Silkscreen") + (38 "B.Mask" user) + (39 "F.Mask" user) + (40 "Dwgs.User" user "User.Drawings") + (41 "Cmts.User" user "User.Comments") + (42 "Eco1.User" user "User.Eco1") + (43 "Eco2.User" user "User.Eco2") + (44 "Edge.Cuts" user) + (45 "Margin" user) + (46 "B.CrtYd" user "B.Courtyard") + (47 "F.CrtYd" user "F.Courtyard") + (48 "B.Fab" user) + (49 "F.Fab" user) + (50 "User.1" user) + (51 "User.2" user) + (52 "User.3" user) + (53 "User.4" user) + (54 "User.5" user) + (55 "User.6" user) + (56 "User.7" user) + (57 "User.8" user) + (58 "User.9" user) + ) + (setup + (pad_to_mask_clearance 0) + (allow_soldermask_bridges_in_footprints no) + (pcbplotparams + (layerselection 0x00010fc_ffffffff) + (plot_on_all_layers_selection 0x0000000_00000000) + (disableapertmacros no) + (usegerberextensions no) + (usegerberattributes yes) + (usegerberadvancedattributes yes) + (creategerberjobfile yes) + (dashed_line_dash_ratio 12.000000) + (dashed_line_gap_ratio 3.000000) + (svgprecision 4) + (plotframeref no) + (viasonmask no) + (mode 1) + (useauxorigin no) + (hpglpennumber 1) + (hpglpenspeed 20) + (hpglpendiameter 15.000000) + (pdf_front_fp_property_popups yes) + (pdf_back_fp_property_popups yes) + (dxfpolygonmode yes) + (dxfimperialunits yes) + (dxfusepcbnewfont yes) + (psnegative no) + (psa4output no) + (plotreference yes) + (plotvalue yes) + (plotfptext yes) + (plotinvisibletext no) + (sketchpadsonfab no) + (subtractmaskfromsilk no) + (outputformat 1) + (mirror no) + (drillshape 1) + (scaleselection 1) + (outputdirectory "") + ) + ) + (net 0 "") + (net 1 "unconnected-(C1-Pad1)") + (net 2 "unconnected-(C1-Pad2)") + (net 3 "unconnected-(L1-Pad1)") + (net 4 "unconnected-(L1-Pad2)") + (net 5 "unconnected-(R1-Pad1)") + (net 6 "unconnected-(R1-Pad2)") + (net 7 "unconnected-(R2-Pad1)") + (net 8 "unconnected-(R2-Pad2)") + (footprint "Capacitor_SMD:C_0805_2012Metric" + (layer "F.Cu") + (uuid "42c79ce9-aafb-413d-89c2-2068f635b354") + (at 130.8575 77.28) + (descr "Capacitor SMD 0805 (2012 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: IPC-SM-782 page 76, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf, https://docs.google.com/spreadsheets/d/1BsfQQcO9C6DZCsRaXUlFlo91Tg2WpOkGARC1WS5S8t0/edit?usp=sharing), generated with kicad-footprint-generator") + (tags "capacitor") + (property "Reference" "C1" + (at 0 -1.68 0) + (layer "F.SilkS") + (uuid "a4e5ab31-f22b-4f3e-98a0-b14c18405246") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Value" "C" + (at 0 1.68 0) + (layer "F.Fab") + (uuid "526dde89-8c4d-4cf6-9e8d-955d64d4cc07") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "29682b40-4e7e-4d00-92b3-3b0a107f56b7") + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "988d38e1-47c2-46a1-9d8e-abfee2700d1f") + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Unpolarized capacitor" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "ce95af1e-b0f2-436a-bcba-220f23f6d00b") + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (path "/00000000-0000-0000-0000-00005f3401d2") + (sheetfile "test_v5.kicad_sch") + (attr smd) + (fp_line + (start -0.261252 -0.735) + (end 0.261252 -0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "df08590d-8078-4c35-b8c6-4b8079496be6") + ) + (fp_line + (start -0.261252 0.735) + (end 0.261252 0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "7d0d95c2-b427-4693-86d3-388bf5ab0d8b") + ) + (fp_line + (start -1.7 -0.98) + (end 1.7 -0.98) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "1656b32f-92d5-4776-944c-b69c9289b967") + ) + (fp_line + (start -1.7 0.98) + (end -1.7 -0.98) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "b426ba03-5872-49e1-a001-4ec48734a59d") + ) + (fp_line + (start 1.7 -0.98) + (end 1.7 0.98) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "3da6a9ae-ccf6-4c91-9a39-8bc5253c69c5") + ) + (fp_line + (start 1.7 0.98) + (end -1.7 0.98) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "55424c56-b2c1-42c5-865d-4ad9becb42e0") + ) + (fp_line + (start -1 -0.625) + (end 1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "7d1fdc13-ecf7-4b23-b118-3d5227756695") + ) + (fp_line + (start -1 0.625) + (end -1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "f76e662c-b67f-4319-a7fd-88ca01d3b42d") + ) + (fp_line + (start 1 -0.625) + (end 1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "69f7c786-db9c-4a4d-9637-0306913ce60e") + ) + (fp_line + (start 1 0.625) + (end -1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "f0960c8f-dc49-4619-b889-2eee0ef4acf5") + ) + (fp_text user "${REFERENCE}" + (at 0 0 0) + (layer "F.Fab") + (uuid "6dcdc843-8fdc-450c-97fb-a8d1d5407e4b") + (effects + (font + (size 0.5 0.5) + (thickness 0.08) + ) + ) + ) + (pad "1" smd roundrect + (at -0.95 0) + (size 1 1.45) + (layers "F.Cu" "F.Paste" "F.Mask") + (roundrect_rratio 0.25) + (net 1 "unconnected-(C1-Pad1)") + (pintype "passive") + (uuid "81025ca8-7809-44d1-bfd0-73d5e5bec49a") + ) + (pad "2" smd roundrect + (at 0.95 0) + (size 1 1.45) + (layers "F.Cu" "F.Paste" "F.Mask") + (roundrect_rratio 0.25) + (net 2 "unconnected-(C1-Pad2)") + (pintype "passive") + (uuid "3af47cba-5141-4c61-8d2f-051f78ccb223") + ) + (model "${KICAD6_3DMODEL_DIR}/Capacitor_SMD.3dshapes/C_0805_2012Metric.wrl" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + ) + (footprint "Resistor_SMD:R_0805_2012Metric" + (layer "F.Cu") + (uuid "4b05d10d-d03b-4245-93c6-6dd7ef115d79") + (at 135.2875 80.2) + (descr "Resistor SMD 0805 (2012 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf), generated with kicad-footprint-generator") + (tags "resistor") + (property "Reference" "R2" + (at 0 -1.65 0) + (layer "F.SilkS") + (uuid "fc3e7acd-6aba-4677-895d-30650b88b9bd") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Value" "R_US" + (at 0 1.65 0) + (layer "F.Fab") + (uuid "914f698d-f318-4829-9016-a903c7872dbc") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "db90f286-cc5c-4821-83bc-ca9756b41b21") + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "c4d15e8e-68f8-4cf6-ac8b-06af594b0abc") + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Resistor, US symbol" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "43e4c458-e67c-4ef3-8f9f-f7b631382a12") + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (path "/00000000-0000-0000-0000-00005f3409f7") + (sheetfile "test_v5.kicad_sch") + (attr smd) + (fp_line + (start -0.227064 -0.735) + (end 0.227064 -0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "a5c1fe7f-d528-424f-89d7-027a831e1a9b") + ) + (fp_line + (start -0.227064 0.735) + (end 0.227064 0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "3c3ad48b-9713-4def-9e3a-8f6f2fe2ec34") + ) + (fp_line + (start -1.68 -0.95) + (end 1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "47606320-c86c-4a12-acc0-762f5fd95781") + ) + (fp_line + (start -1.68 0.95) + (end -1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "a829f1e2-4d3f-4620-bd44-735437433444") + ) + (fp_line + (start 1.68 -0.95) + (end 1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "965745e8-055c-4eb4-99fc-900a1cc81ab2") + ) + (fp_line + (start 1.68 0.95) + (end -1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "499c95b1-a991-4ca4-ab65-93f3d8825419") + ) + (fp_line + (start -1 -0.625) + (end 1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "20288645-8afc-4f62-8e79-c0578f3d1ec3") + ) + (fp_line + (start -1 0.625) + (end -1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "6defbaa3-b366-4044-b064-b4f24dfa32c6") + ) + (fp_line + (start 1 -0.625) + (end 1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "069cbe26-1be9-4f2d-a019-1e3863031005") + ) + (fp_line + (start 1 0.625) + (end -1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "c8e760cf-2f4a-4a3e-a43a-4510a1054574") + ) + (fp_text user "${REFERENCE}" + (at 0 0 0) + (layer "F.Fab") + (uuid "39d87a78-7775-414a-8b62-fc1ae7be8441") + (effects + (font + (size 0.5 0.5) + (thickness 0.08) + ) + ) + ) + (pad "1" smd roundrect + (at -0.9125 0) + (size 1.025 1.4) + (layers "F.Cu" "F.Paste" "F.Mask") + (roundrect_rratio 0.243902) + (net 7 "unconnected-(R2-Pad1)") + (pintype "passive") + (uuid "d401cb0e-247f-4d68-afff-bc476c13a921") + ) + (pad "2" smd roundrect + (at 0.9125 0) + (size 1.025 1.4) + (layers "F.Cu" "F.Paste" "F.Mask") + (roundrect_rratio 0.243902) + (net 8 "unconnected-(R2-Pad2)") + (pintype "passive") + (uuid "873a10e3-545f-45c5-bd99-87a89cd9e846") + ) + (model "${KICAD6_3DMODEL_DIR}/Resistor_SMD.3dshapes/R_0805_2012Metric.wrl" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + ) + (footprint "Capacitor_SMD:C_0805_2012Metric" + (layer "F.Cu") + (uuid "7757e0f5-d98e-4377-b151-2fe874013657") + (at 130.8575 80.29) + (descr "Capacitor SMD 0805 (2012 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: IPC-SM-782 page 76, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf, https://docs.google.com/spreadsheets/d/1BsfQQcO9C6DZCsRaXUlFlo91Tg2WpOkGARC1WS5S8t0/edit?usp=sharing), generated with kicad-footprint-generator") + (tags "capacitor") + (property "Reference" "L1" + (at 0 -1.68 0) + (layer "F.SilkS") + (uuid "bf92c542-4775-4aa2-93ce-6b327a1017e0") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Value" "L" + (at 0 1.68 0) + (layer "F.Fab") + (uuid "5c5d88aa-0446-4077-95a7-504d6e9a7174") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "cf44ebec-5fbc-4102-ac45-1f295dc8b0f6") + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "c6c092b6-d4e4-4e8b-89d2-3aaba82bdaaa") + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Inductor" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "9ad6a19f-62c8-4943-a493-26300041f8ec") + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (path "/00000000-0000-0000-0000-00005f33f73d") + (sheetfile "test_v5.kicad_sch") + (attr smd) + (fp_line + (start -0.261252 -0.735) + (end 0.261252 -0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "c6e02f1c-5c1c-46c5-ba4f-121c6f08fa0c") + ) + (fp_line + (start -0.261252 0.735) + (end 0.261252 0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "c117cb72-2504-4c3e-9a8c-b1ef736c7dcf") + ) + (fp_line + (start -1.7 -0.98) + (end 1.7 -0.98) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "4fad87b7-d717-4cd1-ab4c-2d260259c9a2") + ) + (fp_line + (start -1.7 0.98) + (end -1.7 -0.98) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "0a5d800a-1945-4bc4-b640-91ea891a8cd9") + ) + (fp_line + (start 1.7 -0.98) + (end 1.7 0.98) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "5208322d-c18f-4c97-9984-873b07c3f72a") + ) + (fp_line + (start 1.7 0.98) + (end -1.7 0.98) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "536ca379-6f4f-43b5-abe0-64da3660d513") + ) + (fp_line + (start -1 -0.625) + (end 1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "26605af3-b382-4433-80e1-d1d0f2c5f925") + ) + (fp_line + (start -1 0.625) + (end -1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "6a670d44-5ef4-48f0-999a-3c4eca5ff1ae") + ) + (fp_line + (start 1 -0.625) + (end 1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "1b3c5810-d3f3-44f6-9aad-2e1464646278") + ) + (fp_line + (start 1 0.625) + (end -1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "4b5533f7-92eb-40d0-8a4d-287706773ed4") + ) + (fp_text user "${REFERENCE}" + (at 0 0 0) + (layer "F.Fab") + (uuid "871d5cde-1811-4554-85be-425b53eb376d") + (effects + (font + (size 0.5 0.5) + (thickness 0.08) + ) + ) + ) + (pad "1" smd roundrect + (at -0.95 0) + (size 1 1.45) + (layers "F.Cu" "F.Paste" "F.Mask") + (roundrect_rratio 0.25) + (net 3 "unconnected-(L1-Pad1)") + (pinfunction "1") + (pintype "passive") + (uuid "550a117e-d30e-43a0-872d-fd44bd568eb3") + ) + (pad "2" smd roundrect + (at 0.95 0) + (size 1 1.45) + (layers "F.Cu" "F.Paste" "F.Mask") + (roundrect_rratio 0.25) + (net 4 "unconnected-(L1-Pad2)") + (pinfunction "2") + (pintype "passive") + (uuid "83387907-f9d1-4b9e-9c72-10d8d2879e36") + ) + (model "${KICAD6_3DMODEL_DIR}/Capacitor_SMD.3dshapes/C_0805_2012Metric.wrl" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + ) + (footprint "Resistor_SMD:R_0805_2012Metric" + (layer "F.Cu") + (uuid "f417b356-ef41-45de-90f6-64820d7b3b0a") + (at 135.2875 77.25) + (descr "Resistor SMD 0805 (2012 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf), generated with kicad-footprint-generator") + (tags "resistor") + (property "Reference" "R1" + (at 0 -1.65 0) + (layer "F.SilkS") + (uuid "6cb569e3-7a4e-4388-b704-a771991f11b4") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Value" "R" + (at 0 1.65 0) + (layer "F.Fab") + (uuid "eac495d8-f62f-476b-a847-947f2361c73f") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "2268050b-a487-44e8-8846-7b354462ca37") + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "dd45f8d5-d021-4985-b85b-590985f0bf25") + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "" + (at 0 0 0) + (unlocked yes) + (layer "F.Fab") + (hide yes) + (uuid "bc5ad692-1fb5-432d-85e0-03da48dfcb96") + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Test" "Hi! \"quoted text\"" + (at 0 0 0) + (layer "F.Fab") + (hide yes) + (uuid "3d47848f-7729-46e3-80b7-e919113e608e") + (effects + (font + (size 1 1) + (thickness 0.15) + ) + ) + ) + (path "/00000000-0000-0000-0000-00005f33ec02") + (sheetfile "test_v5.kicad_sch") + (attr smd) + (fp_line + (start -0.227064 -0.735) + (end 0.227064 -0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "cc153304-d18b-4e2b-b55c-554c3496f3e0") + ) + (fp_line + (start -0.227064 0.735) + (end 0.227064 0.735) + (stroke + (width 0.12) + (type solid) + ) + (layer "F.SilkS") + (uuid "9b0898f4-7a9a-4521-9fe8-d54fa01ecc9d") + ) + (fp_line + (start -1.68 -0.95) + (end 1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "b71a22b5-4e56-4351-adf7-4f64dac3caa2") + ) + (fp_line + (start -1.68 0.95) + (end -1.68 -0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "6804d6d5-c6af-4fb0-9dc8-e2edc4c8bbd0") + ) + (fp_line + (start 1.68 -0.95) + (end 1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "190e9d55-cb48-42e1-9b6a-a42ad2919da8") + ) + (fp_line + (start 1.68 0.95) + (end -1.68 0.95) + (stroke + (width 0.05) + (type solid) + ) + (layer "F.CrtYd") + (uuid "f978d1b4-673d-4e04-a3f6-daed6f618d7b") + ) + (fp_line + (start -1 -0.625) + (end 1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "0210446f-f1af-4d5a-8b86-90afafd41a49") + ) + (fp_line + (start -1 0.625) + (end -1 -0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "92bad6ea-95b2-403d-a9f6-5bb64d91618c") + ) + (fp_line + (start 1 -0.625) + (end 1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "056da58b-0a79-4d13-85c4-560d94e01465") + ) + (fp_line + (start 1 0.625) + (end -1 0.625) + (stroke + (width 0.1) + (type solid) + ) + (layer "F.Fab") + (uuid "e14f4329-4f31-45b1-a58a-115bc8371b27") + ) + (fp_text user "${REFERENCE}" + (at 0 0 0) + (layer "F.Fab") + (uuid "29a54455-c7b6-42fe-ad04-c9f406c4aa1c") + (effects + (font + (size 0.5 0.5) + (thickness 0.08) + ) + ) + ) + (pad "1" smd roundrect + (at -0.9125 0) + (size 1.025 1.4) + (layers "F.Cu" "F.Paste" "F.Mask") + (roundrect_rratio 0.243902) + (net 5 "unconnected-(R1-Pad1)") + (pintype "passive") + (uuid "788a6374-b3f2-4845-8786-f708721b7ca5") + ) + (pad "2" smd roundrect + (at 0.9125 0) + (size 1.025 1.4) + (layers "F.Cu" "F.Paste" "F.Mask") + (roundrect_rratio 0.243902) + (net 6 "unconnected-(R1-Pad2)") + (pintype "passive") + (uuid "a9d89d14-b14c-45f1-8d11-df20ec2515c4") + ) + (model "${KICAD6_3DMODEL_DIR}/Resistor_SMD.3dshapes/R_0805_2012Metric.wrl" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + (model "${KIPRJMOD}/../../data/R_0805_2012Metric.wrl" + (offset + (xyz 0 0 0) + ) + (scale + (xyz 1 1 1) + ) + (rotate + (xyz 0 0 0) + ) + ) + ) + (gr_rect + (start 126.7 71.3) + (end 140.9 87.9) + (stroke + (width 0.05) + (type default) + ) + (fill none) + (layer "Edge.Cuts") + (uuid "d645f00e-19f1-43e7-8c43-ee0954e655cf") + ) +) \ No newline at end of file diff --git a/tests/board_samples/kicad_8/wks_font.kicad_pro b/tests/board_samples/kicad_8/wks_font.kicad_pro new file mode 100644 index 00000000..2d2f391b --- /dev/null +++ b/tests/board_samples/kicad_8/wks_font.kicad_pro @@ -0,0 +1,601 @@ +{ + "board": { + "3dviewports": [], + "design_settings": { + "defaults": { + "apply_defaults_to_fp_fields": false, + "apply_defaults_to_fp_shapes": false, + "apply_defaults_to_fp_text": false, + "board_outline_line_width": 0.05, + "copper_line_width": 0.2, + "copper_text_italic": false, + "copper_text_size_h": 1.5, + "copper_text_size_v": 1.5, + "copper_text_thickness": 0.3, + "copper_text_upright": false, + "courtyard_line_width": 0.05, + "dimension_precision": 4, + "dimension_units": 3, + "dimensions": { + "arrow_length": 1270000, + "extension_offset": 500000, + "keep_text_aligned": true, + "suppress_zeroes": false, + "text_position": 0, + "units_format": 1 + }, + "fab_line_width": 0.1, + "fab_text_italic": false, + "fab_text_size_h": 1.0, + "fab_text_size_v": 1.0, + "fab_text_thickness": 0.15, + "fab_text_upright": false, + "other_line_width": 0.1, + "other_text_italic": false, + "other_text_size_h": 1.0, + "other_text_size_v": 1.0, + "other_text_thickness": 0.15, + "other_text_upright": false, + "pads": { + "drill": 0.762, + "height": 1.524, + "width": 1.524 + }, + "silk_line_width": 0.12, + "silk_text_italic": false, + "silk_text_size_h": 1.0, + "silk_text_size_v": 1.0, + "silk_text_thickness": 0.15, + "silk_text_upright": false, + "zones": { + "45_degree_only": false, + "min_clearance": 0.508 + } + }, + "diff_pair_dimensions": [], + "drc_exclusions": [], + "meta": { + "version": 2 + }, + "rule_severities": { + "annular_width": "error", + "clearance": "error", + "connection_width": "warning", + "copper_edge_clearance": "error", + "copper_sliver": "warning", + "courtyards_overlap": "error", + "diff_pair_gap_out_of_range": "error", + "diff_pair_uncoupled_length_too_long": "error", + "drill_out_of_range": "error", + "duplicate_footprints": "warning", + "extra_footprint": "warning", + "footprint": "error", + "footprint_symbol_mismatch": "warning", + "footprint_type_mismatch": "error", + "hole_clearance": "error", + "hole_near_hole": "error", + "holes_co_located": "warning", + "invalid_outline": "error", + "isolated_copper": "warning", + "item_on_disabled_layer": "error", + "items_not_allowed": "error", + "length_out_of_range": "error", + "lib_footprint_issues": "warning", + "lib_footprint_mismatch": "warning", + "malformed_courtyard": "error", + "microvia_drill_out_of_range": "error", + "missing_courtyard": "ignore", + "missing_footprint": "warning", + "net_conflict": "warning", + "npth_inside_courtyard": "ignore", + "padstack": "error", + "pth_inside_courtyard": "ignore", + "shorting_items": "error", + "silk_edge_clearance": "warning", + "silk_over_copper": "warning", + "silk_overlap": "warning", + "skew_out_of_range": "error", + "solder_mask_bridge": "error", + "starved_thermal": "error", + "text_height": "warning", + "text_thickness": "warning", + "through_hole_pad_without_hole": "error", + "too_many_vias": "error", + "track_dangling": "warning", + "track_width": "error", + "tracks_crossing": "error", + "unconnected_items": "error", + "unresolved_variable": "error", + "via_dangling": "warning", + "zone_has_empty_net": "error", + "zones_intersect": "error" + }, + "rules": { + "allow_blind_buried_vias": false, + "allow_microvias": false, + "max_error": 0.005, + "min_clearance": 0.0, + "min_connection": 0.0, + "min_copper_edge_clearance": 0.01, + "min_hole_clearance": 0.25, + "min_hole_to_hole": 0.25, + "min_microvia_diameter": 0.2, + "min_microvia_drill": 0.1, + "min_resolved_spokes": 2, + "min_silk_clearance": 0.0, + "min_text_height": 0.8, + "min_text_thickness": 0.08, + "min_through_hole_diameter": 0.3, + "min_track_width": 0.2, + "min_via_annular_width": 0.05, + "min_via_diameter": 0.4, + "solder_mask_to_copper_clearance": 0.0, + "use_height_for_length_calcs": true + }, + "teardrop_options": [ + { + "td_onpadsmd": true, + "td_onroundshapesonly": false, + "td_ontrackend": false, + "td_onviapad": true + } + ], + "teardrop_parameters": [ + { + "td_allow_use_two_tracks": true, + "td_curve_segcount": 0, + "td_height_ratio": 1.0, + "td_length_ratio": 0.5, + "td_maxheight": 2.0, + "td_maxlen": 1.0, + "td_on_pad_in_zone": false, + "td_target_name": "td_round_shape", + "td_width_to_size_filter_ratio": 0.9 + }, + { + "td_allow_use_two_tracks": true, + "td_curve_segcount": 0, + "td_height_ratio": 1.0, + "td_length_ratio": 0.5, + "td_maxheight": 2.0, + "td_maxlen": 1.0, + "td_on_pad_in_zone": false, + "td_target_name": "td_rect_shape", + "td_width_to_size_filter_ratio": 0.9 + }, + { + "td_allow_use_two_tracks": true, + "td_curve_segcount": 0, + "td_height_ratio": 1.0, + "td_length_ratio": 0.5, + "td_maxheight": 2.0, + "td_maxlen": 1.0, + "td_on_pad_in_zone": false, + "td_target_name": "td_track_end", + "td_width_to_size_filter_ratio": 0.9 + } + ], + "track_widths": [], + "tuning_pattern_settings": { + "diff_pair_defaults": { + "corner_radius_percentage": 80, + "corner_style": 1, + "max_amplitude": 1.0, + "min_amplitude": 0.2, + "single_sided": false, + "spacing": 1.0 + }, + "diff_pair_skew_defaults": { + "corner_radius_percentage": 80, + "corner_style": 1, + "max_amplitude": 1.0, + "min_amplitude": 0.2, + "single_sided": false, + "spacing": 0.6 + }, + "single_track_defaults": { + "corner_radius_percentage": 80, + "corner_style": 1, + "max_amplitude": 1.0, + "min_amplitude": 0.2, + "single_sided": false, + "spacing": 0.6 + } + }, + "via_dimensions": [], + "zones_allow_external_fillets": false, + "zones_use_no_outline": true + }, + "ipc2581": { + "dist": "", + "distpn": "", + "internal_id": "", + "mfg": "", + "mpn": "" + }, + "layer_presets": [], + "viewports": [] + }, + "boards": [], + "cvpcb": { + "equivalence_files": [] + }, + "erc": { + "erc_exclusions": [], + "meta": { + "version": 0 + }, + "pin_map": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 2, + 0, + 1, + 0, + 0, + 1, + 0, + 2, + 2, + 2, + 2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 2 + ], + [ + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 2, + 1, + 1, + 2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2 + ], + [ + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 2 + ], + [ + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 2, + 1, + 2, + 0, + 0, + 1, + 0, + 2, + 2, + 2, + 2 + ], + [ + 0, + 2, + 0, + 1, + 0, + 0, + 1, + 0, + 2, + 0, + 0, + 2 + ], + [ + 0, + 2, + 1, + 1, + 0, + 0, + 1, + 0, + 2, + 0, + 0, + 2 + ], + [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ] + ], + "rule_severities": { + "bus_definition_conflict": "error", + "bus_entry_needed": "error", + "bus_to_bus_conflict": "error", + "bus_to_net_conflict": "error", + "conflicting_netclasses": "error", + "different_unit_footprint": "error", + "different_unit_net": "error", + "duplicate_reference": "error", + "duplicate_sheet_names": "error", + "endpoint_off_grid": "warning", + "extra_units": "error", + "global_label_dangling": "warning", + "hier_label_mismatch": "error", + "label_dangling": "error", + "lib_symbol_issues": "warning", + "missing_bidi_pin": "warning", + "missing_input_pin": "warning", + "missing_power_pin": "error", + "missing_unit": "warning", + "multiple_net_names": "warning", + "net_not_bus_member": "warning", + "no_connect_connected": "warning", + "no_connect_dangling": "warning", + "pin_not_connected": "error", + "pin_not_driven": "error", + "pin_to_pin": "warning", + "power_pin_not_driven": "error", + "similar_labels": "warning", + "simulation_model_issue": "error", + "unannotated": "error", + "unit_value_mismatch": "error", + "unresolved_variable": "error", + "wire_dangling": "error" + } + }, + "libraries": { + "pinned_footprint_libs": [], + "pinned_symbol_libs": [] + }, + "meta": { + "filename": "wks_font.kicad_pro", + "version": 1 + }, + "net_settings": { + "classes": [ + { + "bus_width": 12, + "clearance": 0.2, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "Default", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 0.25, + "via_diameter": 0.8, + "via_drill": 0.4, + "wire_width": 6 + } + ], + "meta": { + "version": 3 + }, + "net_colors": null, + "netclass_assignments": null, + "netclass_patterns": [] + }, + "pcbnew": { + "last_paths": { + "gencad": "", + "idf": "", + "netlist": "", + "plot": "", + "pos_files": "", + "specctra_dsn": "", + "step": "", + "svg": "", + "vrml": "" + }, + "page_layout_descr_file": "${KIPRJMOD}/wks_font.kicad_wks" + }, + "schematic": { + "annotate_start_num": 0, + "bom_fmt_presets": [], + "bom_fmt_settings": { + "field_delimiter": ",", + "keep_line_breaks": false, + "keep_tabs": false, + "name": "CSV", + "ref_delimiter": ",", + "ref_range_delimiter": "", + "string_delimiter": "\"" + }, + "bom_presets": [], + "bom_settings": { + "exclude_dnp": false, + "fields_ordered": [ + { + "group_by": false, + "label": "Reference", + "name": "Reference", + "show": true + }, + { + "group_by": true, + "label": "Value", + "name": "Value", + "show": true + }, + { + "group_by": false, + "label": "Datasheet", + "name": "Datasheet", + "show": true + }, + { + "group_by": false, + "label": "Footprint", + "name": "Footprint", + "show": true + }, + { + "group_by": false, + "label": "Qty", + "name": "${QUANTITY}", + "show": true + }, + { + "group_by": true, + "label": "DNP", + "name": "${DNP}", + "show": true + } + ], + "filter_string": "", + "group_symbols": true, + "name": "Grouped By Value", + "sort_asc": true, + "sort_field": "Reference" + }, + "connection_grid_size": 50.0, + "drawing": { + "dashed_lines_dash_length_ratio": 12.0, + "dashed_lines_gap_length_ratio": 3.0, + "default_line_thickness": 6.0, + "default_text_size": 50.0, + "field_names": [], + "intersheets_ref_own_page": false, + "intersheets_ref_prefix": "", + "intersheets_ref_short": false, + "intersheets_ref_show": false, + "intersheets_ref_suffix": "", + "junction_size_choice": 3, + "label_size_ratio": 0.375, + "operating_point_overlay_i_precision": 3, + "operating_point_overlay_i_range": "~A", + "operating_point_overlay_v_precision": 3, + "operating_point_overlay_v_range": "~V", + "overbar_offset_ratio": 1.23, + "pin_symbol_size": 25.0, + "text_offset_ratio": 0.15 + }, + "legacy_lib_dir": "", + "legacy_lib_list": [], + "meta": { + "version": 1 + }, + "net_format_name": "", + "ngspice": { + "fix_include_paths": true, + "fix_passive_vals": false, + "meta": { + "version": 0 + }, + "model_mode": 0, + "workbook_filename": "" + }, + "page_layout_descr_file": "${KIPRJMOD}/../../data/rotulo_sch_k6.kicad_wks", + "plot_directory": "", + "spice_adjust_passive_values": false, + "spice_current_sheet_as_root": false, + "spice_external_command": "spice \"%I\"", + "spice_model_current_sheet_as_root": true, + "spice_save_all_currents": false, + "spice_save_all_dissipations": false, + "spice_save_all_voltages": false, + "subpart_first_id": 65, + "subpart_id_separator": 0 + }, + "sheets": [ + [ + "e6521bef-4109-48f7-8b88-4121b0468927", + "Root" + ] + ], + "text_variables": { + "VAL_C2": "1000 pF", + "text": "Test" + } +} diff --git a/tests/board_samples/kicad_8/wks_font.kicad_wks b/tests/board_samples/kicad_8/wks_font.kicad_wks new file mode 100644 index 00000000..34aa4b1f --- /dev/null +++ b/tests/board_samples/kicad_8/wks_font.kicad_wks @@ -0,0 +1,40 @@ +(kicad_wks (version 20210606) (generator pl_editor) + (setup (textsize 1.5 1.5)(linewidth 0.15)(textlinewidth 0.15) + (left_margin 10)(right_margin 10)(top_margin 10)(bottom_margin 10)) + (rect (name "") (start 110 34) (end 2 2) (comment "rect around the title block") +) + (rect (name "") (start 0 0 ltcorner) (end 0 0) (repeat 2) (incrx 2) (incry 2)) + (line (name "") (start 50 2 ltcorner) (end 50 0 ltcorner) (repeat 30) (incrx 50)) + (tbtext "1" (name "") (pos 25 1 ltcorner) (font (size 1.3 1.3)) (repeat 100) (incrx 50)) + (line (name "") (start 50 2 lbcorner) (end 50 0 lbcorner) (repeat 30) (incrx 50)) + (tbtext "1" (name "") (pos 25 1 lbcorner) (font (size 1.3 1.3)) (repeat 100) (incrx 50)) + (line (name "") (start 0 50 ltcorner) (end 2 50 ltcorner) (repeat 30) (incry 50)) + (tbtext "A" (name "") (pos 1 25 ltcorner) (font (size 1.3 1.3)) (justify center) (repeat 100) (incry 50)) + (line (name "") (start 0 50 rtcorner) (end 2 50 rtcorner) (repeat 30) (incry 50)) + (tbtext "A" (name "") (pos 1 25 rtcorner) (font (size 1.3 1.3)) (justify center) (repeat 100) (incry 50)) + (tbtext "Date: ${ISSUE_DATE}" (name "") (pos 87 6.9)) + (line (name "") (start 110 5.5) (end 2 5.5)) + (line (name "") (start 110 8.5) (end 2 8.5)) + (tbtext "Rev: ${REVISION}" (name "") (pos 53 6.9002) (font bold)) + (tbtext "Size: ${PAPER}" (name "") (pos 109 6.9) (comment "Paper format name") +) + (tbtext "Id: ${#}/${##}" (name "") (pos 109 3.6002) (comment "Sheet id") +) + (line (name "") (start 110 12.5) (end 2 12.5)) + (tbtext "Title: ${TITLE}" (name "") (pos 109 10.7) (font (size 2 2) (face "Times New Roman") (color 0 0 127 1) bold italic)) + (tbtext "File: ${FILENAME}" (name "") (pos 109 14.3)) + (line (name "") (start 110 18.5) (end 2 18.5)) + (tbtext "Sheet: ${SHEETNAME}" (name "") (pos 109 17)) + (tbtext "${COMPANY}" (name "") (pos 109 20) (font bold) (comment "Company name") +) + (tbtext "${COMMENT1}" (name "") (pos 109 23) (comment "Comment 0") +) + (tbtext "${COMMENT2}" (name "") (pos 109 26) (comment "Comment 1") +) + (tbtext "${COMMENT3}" (name "") (pos 109 29) (comment "Comment 2") +) + (tbtext "${COMMENT4}" (name "") (pos 109 32) (comment "Comment 3") +) + (line (name "") (start 90 8.5) (end 90 5.5)) + (line (name "") (start 53 8.5002) (end 53 2.0002)) +)