KiCad PCB EDA Suite
Loading...
Searching...
No Matches
multichannel_tool.cpp File Reference
#include <board_commit.h>
#include <tools/pcb_actions.h>
#include <tools/pcb_selection.h>
#include <tools/pcb_selection_tool.h>
#include <tool/action_menu.h>
#include <tool/conditional_menu.h>
#include <tool/selection_conditions.h>
#include <tool/tool_menu.h>
#include <bitmaps.h>
#include <eda_group.h>
#include <dialogs/dialog_multichannel_generate_rule_areas.h>
#include <dialogs/dialog_multichannel_repeat_layout.h>
#include "multichannel_tool.h"
#include <pcbexpr_evaluator.h>
#include <zone.h>
#include <board.h>
#include <netinfo.h>
#include <board_design_settings.h>
#include <geometry/convex_hull.h>
#include <geometry/shape_utils.h>
#include <pcb_group.h>
#include <pcb_generator.h>
#include <footprint.h>
#include <pad.h>
#include <pcb_text.h>
#include <component_classes/component_class.h>
#include <connectivity/connectivity_algo.h>
#include <connectivity/connectivity_data.h>
#include <connectivity/topo_match.h>
#include <algorithm>
#include <pcb_track.h>
#include <tool/tool_manager.h>
#include <tools/pcb_picker_tool.h>
#include <tools/generator_tool.h>
#include <router/router_tool.h>
#include <router/pns_router.h>
#include <geometry/shape_rect.h>
#include <scoped_set_reset.h>
#include <trigo.h>
#include <chrono>
#include <future>
#include <core/profile.h>
#include <core/raii.h>
#include <widgets/wx_progress_reporters.h>
#include <string_utils.h>
#include <wx/log.h>
#include <wx/richmsgdlg.h>
#include <pgm_base.h>

Go to the source code of this file.

Classes

class  MULTICHANNEL_CONTEXT_MENU
 
struct  FLAT_MATCHER
 

Macros

#define MULTICHANNEL_EXTRA_DEBUG
 

Functions

static wxString FormatComponentList (const std::set< FOOTPRINT * > &aComponents)
 
static wxString JoinMismatchReasons (const std::vector< wxString > &aReasons)
 
static void ShowTopologyMismatchReasons (wxWindow *aParent, const wxString &aSummary, const std::vector< wxString > &aReasons)
 
static void collectGroupFootprints (EDA_GROUP *aGroup, std::set< FOOTPRINT * > &aOut)
 
static void collectGroupBoardItems (EDA_GROUP *aGroup, std::set< BOARD_ITEM * > &aOut)
 
static EDA_GROUP * linkedChannelGroup (const BOARD *aBoard, const RULE_AREA *aArea)
 
static void makePlacementArea (ZONE *aZone, const SHAPE_LINE_CHAIN &aOutline)
 
static bool outlinesOverlap (const SHAPE_POLY_SET &aA, const SHAPE_POLY_SET &aB)
 
static const std::pair< FOOTPRINT *const, FOOTPRINT * > & anchorPair (const TMATCH::COMPONENT_MATCHES &aMatches, const KIID &aAnchor)
 
static SHAPE_LINE_CHAIN repeatedOutline (const RULE_AREA *aRef, const RULE_AREA *aTarget, const KIID &aAnchor, const TMATCH::COMPONENT_MATCHES &aMatches, VECTOR2I &aDisp, EDA_ANGLE &aRot)
 
static std::set< ZONE * > linkedAreasIn (const SELECTION &aSelection)
 
static std::vector< wxString > getParentSheetPaths (const wxString &aSheetName)
 
static bool isChannelNet (const std::vector< FOOTPRINT * > &aOwners, const std::set< FOOTPRINT * > &aChannel)
 
static std::set< int > channelNets (const std::map< int, std::vector< FOOTPRINT * > > &aNetOwners, const std::set< FOOTPRINT * > &aChannel)
 
static void stageAddToGroup (BOARD_COMMIT &aCommit, EDA_GROUP *aGroup, BOARD_ITEM *aItem)
 
static std::set< int > padNets (const FOOTPRINT *aFp, const std::set< int > &aAmong)
 
static std::vector< TMATCH::COMPONENT_MATCHES > matchSheetInstances (BOARD *aBoard, const std::set< FOOTPRINT * > &aRef)
 
static std::map< int, std::vector< FOOTPRINT * > > buildNetOwners (const BOARD *aBoard)
 
static bool matchBySymbolInstancePath (const std::set< FOOTPRINT * > &aRef, const std::set< FOOTPRINT * > &aTarget, TMATCH::COMPONENT_MATCHES &aResult)
 

Variables

static const wxString traceMultichannelTool = wxT( "MULTICHANNEL_TOOL" )
 

Macro Definition Documentation

◆ MULTICHANNEL_EXTRA_DEBUG

#define MULTICHANNEL_EXTRA_DEBUG

Definition at line 75 of file multichannel_tool.cpp.

Function Documentation

◆ anchorPair()

static const std::pair< FOOTPRINT *const, FOOTPRINT * > & anchorPair ( const TMATCH::COMPONENT_MATCHES & aMatches,
const KIID & aAnchor )
static

◆ buildNetOwners()

static std::map< int, std::vector< FOOTPRINT * > > buildNetOwners ( const BOARD * aBoard)
static

◆ channelNets()

static std::set< int > channelNets ( const std::map< int, std::vector< FOOTPRINT * > > & aNetOwners,
const std::set< FOOTPRINT * > & aChannel )
static

◆ collectGroupBoardItems()

◆ collectGroupFootprints()

static void collectGroupFootprints ( EDA_GROUP * aGroup,
std::set< FOOTPRINT * > & aOut )
static

◆ FormatComponentList()

static wxString FormatComponentList ( const std::set< FOOTPRINT * > & aComponents)
static

Definition at line 80 of file multichannel_tool.cpp.

References _, AccumulateDescription(), and result.

Referenced by MULTICHANNEL_TOOL::resolveConnectionTopology().

◆ getParentSheetPaths()

static std::vector< wxString > getParentSheetPaths ( const wxString & aSheetName)
static

◆ isChannelNet()

static bool isChannelNet ( const std::vector< FOOTPRINT * > & aOwners,
const std::set< FOOTPRINT * > & aChannel )
static

◆ JoinMismatchReasons()

static wxString JoinMismatchReasons ( const std::vector< wxString > & aReasons)
static

◆ linkedAreasIn()

◆ linkedChannelGroup()

◆ makePlacementArea()

◆ matchBySymbolInstancePath()

static bool matchBySymbolInstancePath ( const std::set< FOOTPRINT * > & aRef,
const std::set< FOOTPRINT * > & aTarget,
TMATCH::COMPONENT_MATCHES & aResult )
static

◆ matchSheetInstances()

static std::vector< TMATCH::COMPONENT_MATCHES > matchSheetInstances ( BOARD * aBoard,
const std::set< FOOTPRINT * > & aRef )
static

Definition at line 1149 of file multichannel_tool.cpp.

References BOARD::Footprints(), path, and result.

Referenced by MULTICHANNEL_TOOL::findMatches().

◆ outlinesOverlap()

static bool outlinesOverlap ( const SHAPE_POLY_SET & aA,
const SHAPE_POLY_SET & aB )
static

◆ padNets()

static std::set< int > padNets ( const FOOTPRINT * aFp,
const std::set< int > & aAmong )
static

Definition at line 1134 of file multichannel_tool.cpp.

References pad, and FOOTPRINT::Pads().

Referenced by MULTICHANNEL_TOOL::findMatches().

◆ repeatedOutline()

◆ ShowTopologyMismatchReasons()

static void ShowTopologyMismatchReasons ( wxWindow * aParent,
const wxString & aSummary,
const std::vector< wxString > & aReasons )
static

◆ stageAddToGroup()

Variable Documentation

◆ traceMultichannelTool