Skip to content

Commit

Permalink
[Added] KiCad v7 support
Browse files Browse the repository at this point in the history
  • Loading branch information
set-soft committed Feb 13, 2023
1 parent fb723f1 commit c1de670
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.4.4] - 2023-02-13
### Added
- KiCad 7 support


## [2.4.3] - 2022-10-14
### Added
- Option to skip the test for input files.
Expand All @@ -15,13 +20,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- When comparing multiple sheets using the SVG mode the displayed name of the
sheet is like the sheet path displayed by KiCad


## [2.4.2] - 2022-10-05
### Added
- Option to skip pages without diff

### Fixed
- Problems when using the plug-in and comparing uncommited stuff.


## [2.4.1] - 2022-08-31
### Added
- Support for user defined layer names.
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
kidiff (2.4.4-1) stable; urgency=medium

* KiCad 7 support

-- Salvador Eduardo Tropea <[email protected]> Mon, 13 Feb 2023 12:39:49 -0300

kidiff (2.4.3-1) stable; urgency=medium

* Added option to skip the test for input files.
Expand Down
2 changes: 1 addition & 1 deletion kicad-diff-init.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
__copyright__ = 'Copyright 2020, INTI'
__credits__ = ['Salvador E. Tropea']
__license__ = 'GPL 2.0'
__version__ = '2.4.3'
__version__ = '2.4.4'
__email__ = '[email protected]'
__status__ = 'beta'
__url__ = 'https://github.com/INTI-CMNB/KiDiff/'
Expand Down
22 changes: 17 additions & 5 deletions kicad-diff.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020-2022 Salvador E. Tropea
# Copyright (c) 2020-2022 Instituto Nacional de Tecnologïa Industrial
# Copyright (c) 2020-2023 Salvador E. Tropea
# Copyright (c) 2020-2023 Instituto Nacional de Tecnologïa Industrial
# License: GPL-2.0
# Project: KiCad Diff
# Adapted from: https://github.com/obra/kicad-tools
Expand Down Expand Up @@ -29,7 +29,7 @@
__copyright__ = 'Copyright 2020-2022, INTI/'+__author__
__credits__ = ['Salvador E. Tropea', 'Jesse Vincent']
__license__ = 'GPL 2.0'
__version__ = '2.4.3'
__version__ = '2.4.4'
__email__ = '[email protected]'
__status__ = 'beta'
__url__ = 'https://github.com/INTI-CMNB/KiDiff/'
Expand Down Expand Up @@ -95,6 +95,17 @@
SCHEMATIC_SVG_BASE_NAME = 'Schematic_root'


def SetExcludeEdgeLayer(po, exclude_edge_layer, layer):
if hasattr(po, 'SetExcludeEdgeLayer'):
po.SetExcludeEdgeLayer(exclude_edge_layer)
elif not exclude_edge_layer:
# Include the edge on all layers
# Doesn't work in 7.0.0. Bug: https://gitlab.com/kicad/code/kicad/-/issues/13841
include = pcbnew.LSET()
include.addLayer(layer)
po.SetPlotOnAllLayersSelection(include)


def GenPCBImages(file, file_hash, hash_dir, file_no_ext, layer_names, wanted_layers):
# Setup the KiCad plotter
board = LoadBoard(file)
Expand All @@ -110,7 +121,7 @@ def GenPCBImages(file, file_hash, hash_dir, file_no_ext, layer_names, wanted_lay
popt.SetScale(0)
popt.SetMirror(False)
popt.SetUseGerberAttributes(True)
popt.SetExcludeEdgeLayer(False)
SetExcludeEdgeLayer(popt, False, board.GetLayerID('Edge.Cuts'))
popt.SetUseAuxOrigin(False)
popt.SetSkipPlotNPTH_Pads(False)
popt.SetPlotViaOnMaskLayer(True)
Expand Down Expand Up @@ -586,7 +597,8 @@ def get_layer(line):
group.add_argument('--layers', help='Process layers in file (one layer per line)', type=str)
parser.add_argument('--new_file_hash', help='Use this hash for NEW_FILE', type=str)
parser.add_argument('--no_reader', help="Don't open the PDF reader", action='store_false')
parser.add_argument('--no_exist_check', help="Don't check if files exists, must specify the cache hash", action='store_true')
parser.add_argument('--no_exist_check', help="Don't check if files exists, must specify the cache hash",
action='store_true')
parser.add_argument('--old_file_hash', help='Use this hash for OLD_FILE', type=str)
parser.add_argument('--only_cache', help='Just populate the cache using OLD_FILE, no diff', action='store_true')
parser.add_argument('--only_different', help='Only include the pages with differences', action='store_true')
Expand Down
2 changes: 1 addition & 1 deletion kicad-git-diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
__copyright__ = 'Copyright 2020, INTI'
__credits__ = ['Salvador E. Tropea', 'Jesse Vincent']
__license__ = 'GPL 2.0'
__version__ = '2.4.3'
__version__ = '2.4.4'
__email__ = '[email protected]'
__status__ = 'beta'
__url__ = 'https://github.com/INTI-CMNB/KiDiff/'
Expand Down

0 comments on commit c1de670

Please sign in to comment.