• 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
..
autorouter Loading commit data...
dialogs Loading commit data...
exporters Loading commit data...
github Loading commit data...
import_dxf Loading commit data...
pcad2kicadpcb_plugin Loading commit data...
router Loading commit data...
scripting Loading commit data...
tools Loading commit data...
CMakeLists.txt Loading commit data...
Doxyfile_python Loading commit data...
Doxyfile_xml Loading commit data...
Info.plist Loading commit data...
attribut.cpp Loading commit data...
basepcbframe.cpp Loading commit data...
block.cpp Loading commit data...
block_module_editor.cpp Loading commit data...
board_items_to_polygon_shape_transform.cpp Loading commit data...
board_undo_redo.cpp Loading commit data...
build_BOM_from_board.cpp Loading commit data...
class_board.cpp Loading commit data...
class_board.h Loading commit data...
class_board_connected_item.cpp Loading commit data...
class_board_connected_item.h Loading commit data...
class_board_design_settings.cpp Loading commit data...
class_board_item.cpp Loading commit data...
class_dimension.cpp Loading commit data...
class_dimension.h Loading commit data...
class_drawsegment.cpp Loading commit data...
class_drawsegment.h Loading commit data...
class_drc_item.cpp Loading commit data...
class_edge_mod.cpp Loading commit data...
class_edge_mod.h Loading commit data...
class_footprint_wizard.cpp Loading commit data...
class_footprint_wizard.h Loading commit data...
class_marker_pcb.cpp Loading commit data...
class_marker_pcb.h Loading commit data...
class_mire.cpp Loading commit data...
class_mire.h Loading commit data...
class_module.cpp Loading commit data...
class_module.h Loading commit data...
class_netclass.cpp Loading commit data...
class_netclass.h Loading commit data...
class_netinfo.h Loading commit data...
class_netinfo_item.cpp Loading commit data...
class_netinfolist.cpp Loading commit data...
class_pad.cpp Loading commit data...
class_pad.h Loading commit data...
class_pad_draw_functions.cpp Loading commit data...
class_pcb_layer_box_selector.cpp Loading commit data...
class_pcb_layer_box_selector.h Loading commit data...
class_pcb_layer_widget.cpp Loading commit data...
class_pcb_layer_widget.h Loading commit data...
class_pcb_text.cpp Loading commit data...
class_pcb_text.h Loading commit data...
class_text_mod.cpp Loading commit data...
class_text_mod.h Loading commit data...
class_track.cpp Loading commit data...
class_track.h Loading commit data...
class_zone.cpp Loading commit data...
class_zone.h Loading commit data...
class_zone_settings.cpp Loading commit data...
class_zone_settings.h Loading commit data...
classpcb.cpp Loading commit data...
clean.cpp Loading commit data...
collectors.cpp Loading commit data...
collectors.h Loading commit data...
connect.cpp Loading commit data...
connect.h Loading commit data...
controle.cpp Loading commit data...
cross-probing.cpp Loading commit data...
deltrack.cpp Loading commit data...
dimension.cpp Loading commit data...
drag.h Loading commit data...
dragsegm.cpp Loading commit data...
drc.cpp Loading commit data...
drc_clearance_test_functions.cpp Loading commit data...
drc_marker_functions.cpp Loading commit data...
drc_stuff.h Loading commit data...
eagle_plugin.cpp Loading commit data...
eagle_plugin.h Loading commit data...
edgemod.cpp Loading commit data...
edit.cpp Loading commit data...
edit_pcb_text.cpp Loading commit data...
edit_track_width.cpp Loading commit data...
editedge.cpp Loading commit data...
editmod.cpp Loading commit data...
editrack-part2.cpp Loading commit data...
editrack.cpp Loading commit data...
edtxtmod.cpp Loading commit data...
event_handlers_tracks_vias_sizes.cpp Loading commit data...
files.cpp Loading commit data...
footprint_wizard.cpp Loading commit data...
footprint_wizard_frame.cpp Loading commit data...
footprint_wizard_frame.h Loading commit data...
globaleditpad.cpp Loading commit data...
gpcb_plugin.cpp Loading commit data...
gpcb_plugin.h Loading commit data...
help_common_strings.h Loading commit data...
highlight.cpp Loading commit data...
hotkeys.cpp Loading commit data...
hotkeys.h Loading commit data...
hotkeys_board_editor.cpp Loading commit data...
hotkeys_module_editor.cpp Loading commit data...
initpcb.cpp Loading commit data...
invoke_pcb_dialog.h Loading commit data...
io_mgr.cpp Loading commit data...
io_mgr.h Loading commit data...
ioascii.cpp.notused Loading commit data...
item_io.cpp.notused Loading commit data...
kicad_netlist_reader.cpp Loading commit data...
kicad_plugin.cpp Loading commit data...
kicad_plugin.h Loading commit data...
layer_widget.cpp Loading commit data...
layer_widget.h Loading commit data...
legacy_netlist_reader.cpp Loading commit data...
legacy_plugin.cpp Loading commit data...
legacy_plugin.h Loading commit data...
librairi.cpp Loading commit data...
loadcmp.cpp Loading commit data...
magnetic_tracks_functions.cpp Loading commit data...
menubar_modedit.cpp Loading commit data...
menubar_pcbframe.cpp Loading commit data...
minimun_spanning_tree.cpp Loading commit data...
minimun_spanning_tree.h Loading commit data...
modedit.cpp Loading commit data...
modedit_onclick.cpp Loading commit data...
modedit_undo_redo.cpp Loading commit data...
modeditoptions.cpp Loading commit data...
module_editor_frame.h Loading commit data...
moduleframe.cpp Loading commit data...
modules.cpp Loading commit data...
modview_frame.cpp Loading commit data...
modview_frame.h Loading commit data...
move-drag_pads.cpp Loading commit data...
move_or_drag_track.cpp Loading commit data...
muonde.cpp Loading commit data...
muwave_command.cpp Loading commit data...
netlist.cpp Loading commit data...
netlist_reader.cpp Loading commit data...
netlist_reader.h Loading commit data...
onleftclick.cpp Loading commit data...
onrightclick.cpp Loading commit data...
pad_edition_functions.cpp Loading commit data...
pcb_netlist.cpp Loading commit data...
pcb_netlist.h Loading commit data...
pcb_painter.cpp Loading commit data...
pcb_painter.h Loading commit data...
pcb_parser.cpp Loading commit data...
pcb_parser.h Loading commit data...
pcb_plot_params.cpp Loading commit data...
pcb_plot_params.h Loading commit data...
pcbframe.cpp Loading commit data...
pcbnew.cpp Loading commit data...
pcbnew.h Loading commit data...
pcbnew.icns Loading commit data...
pcbnew.rc Loading commit data...
pcbnew_config.cpp Loading commit data...
pcbnew_config.h Loading commit data...
pcbnew_doc.icns Loading commit data...
pcbnew_id.h Loading commit data...
pcbplot.cpp Loading commit data...
pcbplot.h Loading commit data...
plot_board_layers.cpp Loading commit data...
plot_brditems_plotter.cpp Loading commit data...
plotcontroller.h Loading commit data...
plugin.cpp Loading commit data...
print_board_functions.cpp Loading commit data...
printout_controler.cpp Loading commit data...
printout_controler.h Loading commit data...
protos.h Loading commit data...
ratsnest.cpp Loading commit data...
ratsnest_data.cpp Loading commit data...
ratsnest_data.h Loading commit data...
ratsnest_viewitem.cpp Loading commit data...
ratsnest_viewitem.h Loading commit data...
sel_layer.cpp Loading commit data...
specctra.cpp Loading commit data...
specctra.h Loading commit data...
specctra.keywords Loading commit data...
specctra_export.cpp Loading commit data...
specctra_import.cpp Loading commit data...
specctra_test.cpp Loading commit data...
swap_layers.cpp Loading commit data...
target_edit.cpp Loading commit data...
tool_modedit.cpp Loading commit data...
tool_modview.cpp Loading commit data...
tool_onrightclick.cpp Loading commit data...
tool_pcb.cpp Loading commit data...
toolbars_update_user_interface.cpp Loading commit data...
tr_modif.cpp Loading commit data...
tracepcb.cpp Loading commit data...
xchgmod.cpp Loading commit data...
zone_filling_algorithm.cpp Loading commit data...
zones.h Loading commit data...
zones_by_polygon.cpp Loading commit data...
zones_by_polygon_fill_functions.cpp Loading commit data...
zones_convert_brd_items_to_polygons_with_Boost.cpp Loading commit data...
zones_convert_to_polygons_aux_functions.cpp Loading commit data...
zones_functions_for_undo_redo.cpp Loading commit data...
zones_functions_for_undo_redo.h Loading commit data...
zones_non_copper_type_functions.cpp Loading commit data...
zones_polygons_insulated_copper_islands.cpp Loading commit data...
zones_polygons_test_connections.cpp Loading commit data...
zones_test_and_combine_areas.cpp Loading commit data...