Enabled render_3d output for KiCad 6 now KiCad bug is fixed.
This commit is contained in:
parent
0c0c6ffd62
commit
780fc25b26
|
|
@ -85,6 +85,7 @@ EXAMPLE_CFG = 'example_template.kibot.yaml'
|
|||
AUTO_SCALE = 0
|
||||
KICAD_VERSION_5_99 = 5099000
|
||||
KICAD_VERSION_6_0_0 = 6000000
|
||||
KICAD_VERSION_6_0_2 = 6000002
|
||||
|
||||
# Internal filter names
|
||||
IFILT_MECHANICAL = '_mechanical'
|
||||
|
|
@ -219,6 +220,7 @@ W_ALRDOWN = '(W077) '
|
|||
W_KICOSTFLD = '(W078) '
|
||||
W_MIXVARIANT = '(W079) '
|
||||
W_NOTPDF = '(W080) '
|
||||
W_NOREF = '(W081) '
|
||||
# Somehow arbitrary, the colors are real, but can be different
|
||||
PCB_MAT_COLORS = {'fr1': "937042", 'fr2': "949d70", 'fr3': "adacb4", 'fr4': "332B16", 'fr5': "6cc290"}
|
||||
PCB_FINISH_COLORS = {'hal': "8b898c", 'hasl': "8b898c", 'imag': "8b898c", 'enig': "cfb96e", 'enepig': "cfb96e",
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@
|
|||
import os
|
||||
from glob import glob
|
||||
from shutil import rmtree
|
||||
from .misc import (CMD_PCBNEW_3D, URL_PCBNEW_3D, RENDER_3D_ERR, PCB_MAT_COLORS, PCB_FINISH_COLORS, SOLDER_COLORS, SILK_COLORS)
|
||||
from .misc import (CMD_PCBNEW_3D, URL_PCBNEW_3D, RENDER_3D_ERR, PCB_MAT_COLORS, PCB_FINISH_COLORS, SOLDER_COLORS, SILK_COLORS,
|
||||
KICAD_VERSION_6_0_2, MISSING_TOOL)
|
||||
from .gs import (GS)
|
||||
from .kiplot import check_script, exec_with_retry, add_extra_options
|
||||
from .out_base_3d import Base3DOptions, Base3D
|
||||
|
|
@ -120,13 +121,11 @@ class Render3DOptions(Base3DOptions):
|
|||
|
||||
def run(self, output):
|
||||
super().run(output)
|
||||
if GS.ki6():
|
||||
logger.error("3D Viewer not supported for KiCad 6.0.0\n"
|
||||
"KiCad blindly tries to set the swap interval for non-GL surfaces and crashes.\n"
|
||||
"Should be fixed in KiCad 6.0.1\n"
|
||||
"For more information: https://gitlab.com/kicad/code/kicad/-/issues/9890")
|
||||
return
|
||||
check_script(CMD_PCBNEW_3D, URL_PCBNEW_3D, '1.5.14')
|
||||
if GS.ki6() and GS.kicad_version_n < KICAD_VERSION_6_0_2:
|
||||
logger.error("3D Viewer not supported for KiCad 6.0.0/1\n"
|
||||
"Please upgrade KiCad to 6.0.2 or newer")
|
||||
exit(MISSING_TOOL)
|
||||
check_script(CMD_PCBNEW_3D, URL_PCBNEW_3D, '1.6.5' if GS.ki6() else '1.5.14')
|
||||
# Base command with overwrite
|
||||
cmd = [CMD_PCBNEW_3D, '--rec_w', str(self.width+2), '--rec_h', str(self.height+85),
|
||||
'3d_view', '--output_name', output]
|
||||
|
|
|
|||
|
|
@ -70,9 +70,6 @@ def test_render_3d_variant_1(test_dir):
|
|||
prj = 'kibom-variant_3'
|
||||
ctx = context.TestContext(test_dir, 'test_render_3d_variant_1', prj, 'render_3d_variant_1', '')
|
||||
ctx.run(extra_debug=True)
|
||||
if context.ki6():
|
||||
ctx.search_err(['3D Viewer not supported'])
|
||||
else:
|
||||
# Check all outputs are there
|
||||
ctx.expect_out_file(prj+'-3D_top.png')
|
||||
# Check all outputs are there
|
||||
ctx.expect_out_file(prj+'-3D_top.png')
|
||||
ctx.clean_up(keep_project=True)
|
||||
|
|
|
|||
Loading…
Reference in New Issue