Skip to content

Commit

Permalink
[PCB Print][Fixed] When trying to force a WKS ...
Browse files Browse the repository at this point in the history
- And the project didn't define a WKS.
- The "gui" strategy failed to use the specified WKS
  • Loading branch information
set-soft committed Oct 17, 2024
1 parent 97309ea commit 7947115
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
This was the old behavior (i.e. 1.7.0) (#671)
- Problems with drill marks on KiCad 8.0.4+, which prints them in every
single layer (even technical ones) (#696)
- When trying to force a WKS and the project didn't define a WKS.
The "gui" strategy failed to use the specified WKS
- Expansion of internal field names. KiCad expands "VALUE", not "Value", which
is what you see in the GUI

Expand Down
2 changes: 2 additions & 0 deletions docs/source/Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Fixed
``repeat_layers``. This was the old behavior (i.e. 1.7.0) (#671)
- Problems with drill marks on KiCad 8.0.4+, which prints them in
every single layer (even technical ones) (#696)
- When trying to force a WKS and the project didn’t define a WKS.
The “gui” strategy failed to use the specified WKS

- Expansion of internal field names. KiCad expands “VALUE”, not
“Value”, which is what you see in the GUI
Expand Down
3 changes: 3 additions & 0 deletions kibot/kicad/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,9 @@ def fix_page_layout_k6_key(key, data, dest_dir, forced):
return dest
else:
GS.exit_with_error('Missing page layout file: '+fname, MISSING_WKS)
elif forced:
data[key]['page_layout_descr_file'] = forced
logger.debug(f'Adding page layout {pl} -> {forced}')
return None

def fix_page_layout_k6(project, dry, force_sch, force_pcb):
Expand Down
4 changes: 4 additions & 0 deletions kibot/out_pcb_print.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,10 @@ def plot_frame_gui(self, dir_name, layer='Edge.Cuts'):
self._files_to_remove = []
# Save the PCB
pcb_name, pcb_dir = self.save_tmp_dir_board('pcb_print')
if self._sheet_reference_layout:
# Worksheet override
wks = os.path.abspath(self._sheet_reference_layout)
KiConf.fix_page_layout(os.path.join(pcb_dir, GS.pro_fname), force_pcb=wks, force_sch=wks)
self._files_to_remove.append(pcb_dir)
# Restore the layer
self.restore_layer()
Expand Down

0 comments on commit 7947115

Please sign in to comment.