• Maciej Suminski's avatar
    Changed the way of looking up NETINFO_ITEM using net names (using... · bf80cc77
    Maciej Suminski authored
    Changed the way of looking up NETINFO_ITEM using net names (using boost::unordered_map). Added a hash function (wxString) for that. Introduced NETINFO_ITEM::GetNetItem( wxString ). BOARD::FindNet() uses the map.
    Net codes are updated upon net list update. (BOARD::ReplaceNetlist())
    Added in some places (mostly class_board.cpp) pad->SetNet() calls to synchronize net codes.
    On creation of NETINFO_LIST, the first NETINFO_ITEM is added (the unconnected items net).
    Removed COMPONENT_NET::m_netNumber, as it was not used anywhere.
    Added an assert to D_PAD::GetNetname(), checking if net code and net name is consistent for unconnected pads. Added an assert for NETINFO_LIST::AppendNet() to assure that appended nets are unique.
    
    It seems that at this point:
    - Updating net lists works fine. The only difference between the file ouput is that after changes it contains empty nets as well.
    - Nets are not saved in the lexical order. Still, net names and net codes are properly assigned to all items in the .kicad_pcb file. It is going to be addressed in the next commit. I believe it should not create any problems, as pads are sorted by their net names anyway (NETINFO_LIST::buildPadsFullList())
    
    Performed tests:
    - Created a blank PCB, saved as pic_programmer.kicad_pcb (from demos folder). Updated net lists. .kicad_pcb file (comparing to the results from master branch) differ with net order (as mentioned before), net codes and timestamps.
    - Removed some of components from the above .kicad_pcb file and updated net lists. Modules reappeared. .kicad_pcb file differs in the same way as described above.
    - Trying to change a pad net name (via properties dialog) results in assert being fired. It is done on purpose (as there is a call to GetNetname() and net name and net code do not match). This will not happen after the next commit.
    - Prepared a simple project (starting with schematics). Imported net list, changed schematic, reimported net list - changes are applied.
    - Eagle & KiCad legacy boards seem to load without any problem.
    
    bf80cc77
Name
Last commit
Last update
..
gal Loading commit data...
geometry Loading commit data...
math Loading commit data...
tool Loading commit data...
ttl Loading commit data...
view Loading commit data...
HersheyCyrillic.h.unused Loading commit data...
appl_wxstruct.h Loading commit data...
base_struct.h Loading commit data...
base_units.h Loading commit data...
bezier_curves.h Loading commit data...
bitmaps.h Loading commit data...
block_commande.h Loading commit data...
build_version.h Loading commit data...
class_base_screen.h Loading commit data...
class_bitmap_base.h Loading commit data...
class_board_design_settings.h Loading commit data...
class_board_item.h Loading commit data...
class_collector.h Loading commit data...
class_colors_design_settings.h Loading commit data...
class_drawpanel.h Loading commit data...
class_drawpanel_gal.h Loading commit data...
class_drc_item.h Loading commit data...
class_layer_box_selector.h Loading commit data...
class_macros_record.h Loading commit data...
class_marker_base.h Loading commit data...
class_pcb_screen.h Loading commit data...
class_sch_screen.h Loading commit data...
class_title_block.h Loading commit data...
class_undoredo_container.h Loading commit data...
class_worksheet_dataitem.h Loading commit data...
colors.h Loading commit data...
colors_selection.h Loading commit data...
common.h Loading commit data...
confirm.h Loading commit data...
convert_basic_shapes_to_polygon.h Loading commit data...
convert_from_iu.h Loading commit data...
convert_to_biu.h Loading commit data...
dcsvg.h.unused Loading commit data...
dialog_get_component.h Loading commit data...
dialog_helpers.h Loading commit data...
dialog_hotkeys_editor.h Loading commit data...
dialog_shim.h Loading commit data...
dlist.h Loading commit data...
drawtxt.h Loading commit data...
dsnlexer.h Loading commit data...
eda_dde.h Loading commit data...
eda_doc.h Loading commit data...
eda_text.h Loading commit data...
fctsys.h Loading commit data...
filter_reader.h Loading commit data...
footprint_info.h Loading commit data...
fp_lib_table.h Loading commit data...
fpid.h Loading commit data...
gestfich.h Loading commit data...
gr_basic.h Loading commit data...
grid_tricks.h Loading commit data...
hashtables.h Loading commit data...
hotkey_grid_table.h Loading commit data...
hotkeys_basic.h Loading commit data...
html_messagebox.h Loading commit data...
id.h Loading commit data...
ki_mutex.h Loading commit data...
kicad_device_context.h Loading commit data...
kicad_string.h Loading commit data...
layers_id_colors_and_visibility.h Loading commit data...
length.h.usuned Loading commit data...
macros.h Loading commit data...
menus_helpers.h Loading commit data...
msgpanel.h Loading commit data...
newstroke_font.h Loading commit data...
online_help.h Loading commit data...
pad_shapes.h Loading commit data...
painter.h Loading commit data...
param_config.h Loading commit data...
pcbcommon.h Loading commit data...
pcbstruct.h Loading commit data...
plot_common.h Loading commit data...
profile.h Loading commit data...
ptree.h Loading commit data...
reporter.h Loading commit data...
richio.h Loading commit data...
sch_base_frame.h Loading commit data...
sch_item_struct.h Loading commit data...
trigo.h Loading commit data...
utf8.h Loading commit data...
validators.h Loading commit data...
wildcards_and_files_ext.h Loading commit data...
worksheet.h Loading commit data...
worksheet_shape_builder.h Loading commit data...
worksheet_viewitem.h Loading commit data...
wxBasePcbFrame.h Loading commit data...
wxEeschemaStruct.h Loading commit data...
wxPcbStruct.h Loading commit data...
wxstruct.h Loading commit data...
xnode.h Loading commit data...