• Maciej Suminski's avatar
    BOARD_CONNECTED_ITEMs do not store net code anymore (m_NetCode field), instead... · d62b47a0
    Maciej Suminski authored
    BOARD_CONNECTED_ITEMs do not store net code anymore (m_NetCode field), instead net info is stored using a pointer to NETINFO_ITEM.
    GetNet() refers to the net code stored in the NETINFO_ITEM. SetNet() finds an appropriate NETINFO_ITEM and uses it.
    Removing GetNet() & SetNet() (and the whole net code idea) requires too many changes in the code (~250 references to the mentioned functions).
    BOARD_CONNECTED_ITEMs by default get a pointer to NETINFO_ITEM that stores unconnected items. This requires for all BOARD_CONNECTED_ITEMs to have a parent (so BOARD* is accessible). The only orphaned item is BOARD_DESIGN_SETTINGS::m_Pad_Master, but it does not cause any issues so far.
    Items that do not have access to a BOARD (do not have set parents) and therefore cannot get net assigned, by default get const static NETINFO_LIST::ORPHANED.
    
    Performed tests:
    - loaded .kicad_pcb, KiCad legacy board, Eagle 6.0 board, P-CAD board - all ok
    - load a simple project, reload netlist after changing connections in eeschema - ok
    - save & reload a board - ok, but still contain empty nets
    - remove everything, restore with undo - ok
    - remove everything, reload netlist - ok
    - changing net names (all possibilites: empty->existing, empty->not existing, existing->empty, existing->not existing) - all ok
    - zones: when net is changed to a net that does not have any nodes besides the zone itself, it does not get filled
    d62b47a0
Name
Last commit
Last update
3d-viewer Loading commit data...
CMakeModules Loading commit data...
Documentation Loading commit data...
bitmap2component Loading commit data...
bitmaps_png Loading commit data...
common Loading commit data...
cvpcb Loading commit data...
demos Loading commit data...
eeschema Loading commit data...
gerbview Loading commit data...
helpers/tools_to_build_newstroke-font Loading commit data...
include Loading commit data...
kicad Loading commit data...
lib_dxf Loading commit data...
new Loading commit data...
packaging Loading commit data...
pagelayout_editor Loading commit data...
patches Loading commit data...
pcb_calculator Loading commit data...
pcbnew Loading commit data...
polygon Loading commit data...
potrace Loading commit data...
resources Loading commit data...
scripting Loading commit data...
scripts Loading commit data...
template Loading commit data...
tools Loading commit data...
.bzrignore Loading commit data...
AUTHORS.txt Loading commit data...
CHANGELOG.txt Loading commit data...
CMakeLists.txt Loading commit data...
COPYRIGHT.txt Loading commit data...
CTestConfig.cmake Loading commit data...
Doxyfile Loading commit data...
HOW_TO_CONTRIBUTE.txt Loading commit data...
INSTALL.txt Loading commit data...
README.txt Loading commit data...
TODO.txt Loading commit data...
copyright.h Loading commit data...
license_for_documentation.txt Loading commit data...
notes_about_pcbnew_new_file_format.odt Loading commit data...
rules Loading commit data...
uncrustify.cfg Loading commit data...