[PCB Print][Fixed] KiCad crashing on some complex filled zones
- We must rebuild the conectivity data after a zone fill Fixes #396
This commit is contained in:
parent
09f845240a
commit
6fd97254ad
|
|
@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
### Fixed
|
||||
- Problems to detect the schematic name when the path to the config contained a
|
||||
dot that isn't used for an extension and some particular conditions were met.
|
||||
- PCB Print: KiCad crashing on some complex filled zones (#396)
|
||||
|
||||
## [1.6.0] - 2023-02-06
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -583,6 +583,13 @@ class GS(object):
|
|||
s.SetWidth(width)
|
||||
return bbox
|
||||
|
||||
@staticmethod
|
||||
def fill_zones(board, zones=None):
|
||||
if zones is None:
|
||||
zones = board.Zones()
|
||||
pcbnew.ZONE_FILLER(board).Fill(zones)
|
||||
board.BuildConnectivity()
|
||||
|
||||
@staticmethod
|
||||
def get_kiauto_video_name(cmd):
|
||||
""" Compute the name for the video captured by KiAuto """
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ def load_board(pcb_file=None, forced=False):
|
|||
with hide_stderr():
|
||||
board = pcbnew.LoadBoard(pcb_file)
|
||||
if BasePreFlight.get_option('check_zone_fills'):
|
||||
pcbnew.ZONE_FILLER(board).Fill(board.Zones())
|
||||
GS.fill_zones(board)
|
||||
if GS.global_units and GS.ki6:
|
||||
# In KiCad 6 "dimensions" has units.
|
||||
# The default value is DIM_UNITS_MODE_AUTOMATIC.
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import re
|
|||
import os
|
||||
import subprocess
|
||||
import importlib
|
||||
from pcbnew import B_Cu, F_Cu, FromMM, IsCopperLayer, PLOT_CONTROLLER, PLOT_FORMAT_SVG, F_Mask, B_Mask, ZONE_FILLER
|
||||
from pcbnew import B_Cu, F_Cu, FromMM, IsCopperLayer, PLOT_CONTROLLER, PLOT_FORMAT_SVG, F_Mask, B_Mask
|
||||
import shlex
|
||||
from shutil import rmtree
|
||||
from tempfile import NamedTemporaryFile, mkdtemp
|
||||
|
|
@ -614,7 +614,7 @@ class PCB_PrintOptions(VariantOptions):
|
|||
via.SetDrill(drill)
|
||||
via.SetWidth(width)
|
||||
if len(zones):
|
||||
ZONE_FILLER(GS.board).Fill(zones)
|
||||
GS.fill_zones(GS.board, zones)
|
||||
# Add it to the list
|
||||
filelist.append((pc.GetPlotFileName(), self.pad_color))
|
||||
|
||||
|
|
@ -704,7 +704,7 @@ class PCB_PrintOptions(VariantOptions):
|
|||
via.SetTopLayer(top)
|
||||
via.SetBottomLayer(bottom)
|
||||
if len(zones):
|
||||
ZONE_FILLER(GS.board).Fill(zones)
|
||||
GS.fill_zones(GS.board, zones)
|
||||
# Add it to the list
|
||||
filelist.append((pc.GetPlotFileName(), via_c))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue