MinHoleToHole cannot be R/W using pcbnew.py

Bug #1829804 reported by Dave Vandenbout on 2019-05-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Undecided
Unassigned

Bug Description

Summary: MinHoleToHole setting in .pro file cannot be read or written using pcbnew.py

Application: kicad
Version: (5.1.2)-1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.61.1 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.34.0
Platform: Windows 7 (build 7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.68.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.61.1
    Compiler: GCC 8.2.0 with C++ ABI 1013

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Reproduction of bug:

Python 2.7.15 (default, Oct 11 2018, 12:09:51) [GCC 8.2.0 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pcbnew import *
>>> brd = LoadBoard('test_dr.kicad_pcb')
>>> drs = brd.GetDesignSettings()
>>> drs.m_HoleToHoleMin
37845792 <== I don't know where this value comes from.
>>> drs.SetMinHoleSeparation(12345678)
>>> drs.m_HoleToHoleMin
12345678 <== New hole-to-hole setting.
>>> brd.SetDesignSettings(drs)
>>> brd.Save('test_dr.kicad_pcb') <== Save updated board.
True
>>> brd = LoadBoard('test_dr.kicad_pcb') <== Reload updated board.
>>> drs = brd.GetDesignSettings()
>>> drs.m_HoleToHoleMin
0 <== Updated hole-to-hole setting has been lost.
>>>

This same problem affects m_RequireCourtyards and m_ProhibitOverlappingCourtyards.
The only commonality I can see is that none of these member variables have the drs.Get*()
methods (e.g. drs.GetMinHoleSeparation()).

tags: added: pcbnew python
Seth Hillbrand (sethh) on 2019-05-21
tags: added: starter
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers