98 const std::set<const BOARD_ITEM*>& aMovingItems,
int aMargin,
99 std::function<
double(
int,
int )> aConstraintFn );
107 std::vector<CREEPAGE_RESULT>
Update(
int aNearMargin = 0 );
123 std::optional<CREEPAGE_RESULT>
124 extractResult(
const std::vector<std::shared_ptr<GRAPH_CONNECTION>>& aPath,
double aDistance,
125 int aNetA,
int aNetB,
double aConstraint,
int aNearMargin );
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Information pertinent to a Pcbnew printed circuit board.
std::map< int, BOX2I > m_staticNetBBoxes
bool movingItemsHaveNPTH() const
True when any dragged item carries an NPTH hole, making the board-edge graph position dependent and t...
std::function< double(int, int)> m_constraintFn
std::set< int > m_affectedNets
void populateBoardEdgeGraph(CREEPAGE_GRAPH &aGraph, SHAPE_POLY_SET &aOutline)
Build the board-edge geometry into aGraph: groove width, outline (NPTH-subtracted),...
std::set< const BOARD_ITEM * > m_movingItems
std::vector< CREEPAGE_RESULT > Update(int aNearMargin=0)
Recompute creepage for the dragged nets at the items' current board positions.
bool IsInteractive() const
CREEPAGE_ENGINE(BOARD &aBoard)
void connectChildren(CREEPAGE_GRAPH &aGraph)
Run the same-parent ConnectChildren pass the legacy solver runs before Dijkstra.
std::optional< CREEPAGE_RESULT > extractResult(const std::vector< std::shared_ptr< GRAPH_CONNECTION > > &aPath, double aDistance, int aNetA, int aNetB, double aConstraint, int aNearMargin)
Extract a CREEPAGE_RESULT from a solved shortest path, or nullopt if not a violation.
std::map< int, std::shared_ptr< GRAPH_NODE > > addNetsInRegion(const BOX2I &aRegion)
Add net elements for the affected nets plus every other net whose bbox intersects aRegion.
void buildBoardEdgePrefix()
(Re)build the board-edge visibility sub-graph from the board at its current state and record it as th...
void BeginInteractive(PCB_LAYER_ID aLayer, const std::set< int > &aAffectedNets, const std::set< const BOARD_ITEM * > &aMovingItems, int aMargin, std::function< double(int, int)> aConstraintFn)
Begin an interactive drag session.
void SetMinGrooveWidth(int aWidth)
std::unique_ptr< SHAPE_POLY_SET > m_outline
std::unique_ptr< CREEPAGE_GRAPH > m_graph
std::optional< CREEPAGE_RESULT > SolveNetPairWholeBoard(int aNetA, int aNetB, PCB_LAYER_ID aLayer, double aConstraint)
Solve a single net pair against the whole board on one layer, building a fresh graph.
A graph with nodes and connections for creepage calculation.
Represent a set of closed polygons.
PCB_LAYER_ID
A quick note on layer IDs:
Result of a single creepage query between two nets on one layer.
const BOARD_ITEM * m_itemB
const BOARD_ITEM * m_itemA
std::vector< PCB_SHAPE > m_path
VECTOR2< int32_t > VECTOR2I