Added message about problems with 3D Viewer on KiCad 6.0.0.

This commit is contained in:
Salvador E. Tropea 2021-12-28 18:04:20 -03:00
parent 1c3cc13004
commit 358fb4f816
4 changed files with 14 additions and 3 deletions

View File

@ -84,6 +84,7 @@ URL_PCBDRAW = 'https://github.com/INTI-CMNB/pcbdraw'
EXAMPLE_CFG = 'example_template.kibot.yaml'
AUTO_SCALE = 0
KICAD_VERSION_5_99 = 5099000
KICAD_VERSION_6_0_0 = 6000000
# Internal filter names
IFILT_MECHANICAL = '_mechanical'

View File

@ -7,7 +7,7 @@
import os
from glob import glob
from shutil import rmtree
from .misc import CMD_PCBNEW_3D, URL_PCBNEW_3D, RENDER_3D_ERR
from .misc import CMD_PCBNEW_3D, URL_PCBNEW_3D, RENDER_3D_ERR, KICAD_VERSION_6_0_0
from .gs import (GS)
from .kiplot import check_script, exec_with_retry, add_extra_options
from .out_base_3d import Base3DOptions, Base3D
@ -87,6 +87,12 @@ 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')
# Base command with overwrite
cmd = [CMD_PCBNEW_3D, '--rec_w', str(self.width+2), '--rec_h', str(self.height+85),

View File

@ -70,6 +70,9 @@ 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)
# Check all outputs are there
ctx.expect_out_file(prj+'-3D_top.png')
if context.ki6():
ctx.search_err(['3D Viewer not supported'])
else:
# Check all outputs are there
ctx.expect_out_file(prj+'-3D_top.png')
ctx.clean_up(keep_project=True)

View File

@ -18,6 +18,7 @@ from kibot.misc import (error_level_to_name)
COVERAGE_SCRIPT = 'python3-coverage'
KICAD_PCB_EXT = '.kicad_pcb'
KICAD_VERSION_5_99 = 5099000
KICAD_VERSION_6_0_0 = 6000000
KICAD_VERSION_5_1_7 = 5001007
MODE_SCH = 1
MODE_PCB = 0