Skip to content

Commit

Permalink
[KiCad 8][Added] Workaround for 8.0.2 hidden text
Browse files Browse the repository at this point in the history
If the user asked to see it in the GUI the Plot controller will
compute it as visible, even when it won't be printed at all
because it belongs to other layer
  • Loading branch information
set-soft committed May 3, 2024
1 parent 1fc1dd6 commit 5ae4888
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ 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.5.4] - 2024-05-03
### Added
* Workaround for KiCad 8.0.2 computing hidden text when the GUI enabled it

## [2.5.3] - 2024-01-10
### Added
* New mode "2color" where you can control the added/removed colors
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.5.4-1) stable; urgency=medium

* Hidden text workaround for KiCad 8.0.2

-- Salvador Eduardo Tropea <salvador@inti.gob.ar> Fri, 03 May 2024 12:54:59 -0300

kidiff (2.5.3-1) stable; urgency=medium

* Added new mode "2color" where you can control the added/removed colors
Expand Down
2 changes: 1 addition & 1 deletion kicad-diff-init.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
__copyright__ = 'Copyright 2020, INTI'
__credits__ = ['Salvador E. Tropea']
__license__ = 'GPL 2.0'
__version__ = '2.5.3'
__version__ = '2.5.4'
__email__ = 'stopea@inti.gob.ar'
__status__ = 'beta'
__url__ = 'https://github.com/INTI-CMNB/KiDiff/'
Expand Down
6 changes: 5 additions & 1 deletion kicad-diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
__copyright__ = 'Copyright 2020-2024, INTI/'+__author__
__credits__ = ['Salvador E. Tropea', 'Jesse Vincent']
__license__ = 'GPL 2.0'
__version__ = '2.5.3'
__version__ = '2.5.4'
__email__ = 'salvador@inti.gob.ar'
__status__ = 'beta'
__url__ = 'https://github.com/INTI-CMNB/KiDiff/'
Expand Down Expand Up @@ -159,6 +159,10 @@ def CheckOptions(name, cur_ops):
def GenPCBImages(file, file_hash, hash_dir, file_no_ext, layer_names, wanted_layers, kiri_mode, zones_ops):
# Setup the KiCad plotter
board = LoadBoard(file)
if hasattr(pcbnew, 'LAYER_HIDDEN_TEXT'):
# KiCad 8.0.2 crazyness: hidden text affects scaling, even when not plotted
# So a PRL can affect the plot mechanism
board.SetElementVisibility(pcbnew.LAYER_HIDDEN_TEXT, False)
pctl = PLOT_CONTROLLER(board)
popt = pctl.GetPlotOptions()
popt.SetOutputDirectory(abspath(hash_dir)) # abspath: Otherwise it will be relative to the file
Expand Down
2 changes: 1 addition & 1 deletion kicad-git-diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
__copyright__ = 'Copyright 2020, INTI'
__credits__ = ['Salvador E. Tropea', 'Jesse Vincent']
__license__ = 'GPL 2.0'
__version__ = '2.5.3'
__version__ = '2.5.4'
__email__ = 'salvador@inti.gob.ar'
__status__ = 'beta'
__url__ = 'https://github.com/INTI-CMNB/KiDiff/'
Expand Down

0 comments on commit 5ae4888

Please sign in to comment.