24#ifndef KICAD_TRACKS_CLEANER_H
25#define KICAD_TRACKS_CLEANER_H
54 void CleanupBoard(
bool aDryRun, std::vector<std::shared_ptr<CLEANUP_ITEM> >* aItemsList,
55 bool aCleanVias,
bool aRemoveMisConnected,
bool aMergeSegments,
56 bool aDeleteUnconnected,
bool aDeleteTracksinPad,
bool aDeleteDanglingVias,
85 void cleanup(
bool aDeleteDuplicateVias,
bool aDeleteNullSegments,
86 bool aDeleteDuplicateSegments,
bool aMergeSegments );
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
Information pertinent to a Pcbnew printed circuit board.
A pure virtual class used to derive REPORTER objects from.
const std::vector< BOARD_CONNECTED_ITEM * > & getConnectedItems(PCB_TRACK *aTrack)
bool testMergeCollinearSegments(PCB_TRACK *aSeg1, PCB_TRACK *aSeg2, PCB_TRACK *aDummySeg=nullptr)
helper function test if 2 segments are colinear.
bool filterItem(BOARD_CONNECTED_ITEM *aItem)
void deleteTracksInPads()
void removeItems(std::set< BOARD_ITEM * > &aItems)
void cleanup(bool aDeleteDuplicateVias, bool aDeleteNullSegments, bool aDeleteDuplicateSegments, bool aMergeSegments)
Geometry-based cleanup: duplicate items, null items, colinear items.
void CleanupBoard(bool aDryRun, std::vector< std::shared_ptr< CLEANUP_ITEM > > *aItemsList, bool aCleanVias, bool aRemoveMisConnected, bool aMergeSegments, bool aDeleteUnconnected, bool aDeleteTracksinPad, bool aDeleteDanglingVias, REPORTER *aReporter=nullptr)
the cleanup function.
bool testTrackEndpointIsNode(PCB_TRACK *aTrack, bool aTstStart)
bool mergeCollinearSegments(PCB_TRACK *aSeg1, PCB_TRACK *aSeg2)
helper function merge aTrackRef and aCandidate, when possible, i.e.
bool deleteDanglingTracks(bool aTrack, bool aVia)
Removes tracks or vias only connected on one end.
std::map< PCB_TRACK *, std::vector< BOARD_CONNECTED_ITEM * > > m_connectedItemsCache
std::function< bool(BOARD_CONNECTED_ITEM *aItem)> m_filter
std::vector< std::shared_ptr< CLEANUP_ITEM > > * m_itemsList
void removeShortingTrackSegments()
void SetFilter(const std::function< bool(BOARD_CONNECTED_ITEM *aItem)> &aFilter)