KiCad PCB EDA Suite
Loading...
Searching...
No Matches
drc_creepage_utils.h File Reference
#include <memory>
#include <unordered_set>
#include <common.h>
#include <core/kicad_algo.h>
#include <macros.h>
#include <board_design_settings.h>
#include <footprint.h>
#include <pad.h>
#include <pcb_track.h>
#include <pcb_shape.h>
#include <zone.h>
#include <advanced_config.h>
#include <geometry/shape_rect.h>
#include <geometry/seg.h>
#include <geometry/shape_segment.h>
#include <drc/drc_item.h>
#include <drc/drc_rule.h>
#include <board.h>
#include <geometry/shape_circle.h>
#include <geometry/rtree/packed_rtree.h>

Go to the source code of this file.

Classes

struct  CREEPAGE_TRACK_ENTRY
 
struct  PATH_CONNECTION
 
class  CREEP_SHAPE
 A class used to represent the shapes for creepage calculation. More...
 
class  CU_SHAPE
 Creepage: a conductive shape. More...
 
class  BE_SHAPE
 Creepage: a board edge shape. More...
 
class  CU_SHAPE_SEGMENT
 Creepage: a conductive segment. More...
 
class  CU_SHAPE_CIRCLE
 Creepage: a conductive circle. More...
 
class  CU_SHAPE_ARC
 Creepage: a conductive arc. More...
 
class  GRAPH_NODE
 a node in a More...
 
class  GRAPH_CONNECTION
 a connection in a More...
 
class  BE_SHAPE_POINT
 Creepage: a board edge point. More...
 
class  BE_SHAPE_CIRCLE
 Creepage: a board edge circle. More...
 
class  BE_SHAPE_ARC
 Creepage: a board edge arc. More...
 
class  CREEPAGE_GRAPH
 A graph with nodes and connections for creepage calculation. More...
 
struct  CREEPAGE_GRAPH::GraphNodeHash
 
struct  CREEPAGE_GRAPH::GraphNodeEqual
 

Typedefs

using TRACK_RTREE = KIRTREE::PACKED_RTREE<CREEPAGE_TRACK_ENTRY*, int, 2>
 

Functions

bool SegmentIntersectsBoard (const VECTOR2I &aP1, const VECTOR2I &aP2, const std::vector< BOARD_ITEM * > &aBe, const std::vector< const BOARD_ITEM * > &aDontTestAgainst, int aMinGrooveWidth)
 
void BuildCreepageBoardEdges (BOARD &aBoard, std::vector< BOARD_ITEM * > &aVector, std::vector< std::unique_ptr< PCB_SHAPE > > &aOwned, const std::set< const BOARD_ITEM * > *aExclude=nullptr)
 Collect the board-edge items used by the creepage graph.
 

Typedef Documentation

◆ TRACK_RTREE

Definition at line 56 of file drc_creepage_utils.h.

Function Documentation

◆ BuildCreepageBoardEdges()

void BuildCreepageBoardEdges ( BOARD & aBoard,
std::vector< BOARD_ITEM * > & aVector,
std::vector< std::unique_ptr< PCB_SHAPE > > & aOwned,
const std::set< const BOARD_ITEM * > * aExclude = nullptr )

Collect the board-edge items used by the creepage graph.

Gathers Edge.Cuts drawings (flattening Bezier curves to owned segments) and NPTH pad holes (circles and oblong slots) into aVector, with transient owned shapes parked in aOwned. When aExclude is non-null, board items owned by any excluded item (for example the pads of a footprint being dragged) are skipped so the caller can treat them as moving geometry.

Definition at line 27 of file drc_creepage_utils.cpp.

References ARC, BEZIER, CIRCLE, BOARD::Drawings(), Edge_Cuts, BOARD::Footprints(), EDA_SHAPE::GetBezierPoints(), BOARD::GetDesignSettings(), BOARD::GetPads(), EDA_SHAPE::GetShape(), BOARD_DESIGN_SETTINGS::m_MaxError, NPTH, VECTOR2< T >::Perpendicular(), radius, EDA_SHAPE::RebuildBezierToSegmentsPointsList(), VECTOR2< T >::Resize(), and SEGMENT.

Referenced by DRC_TEST_PROVIDER_CREEPAGE::CollectBoardEdges(), and CREEPAGE_ENGINE::populateBoardEdgeGraph().

◆ SegmentIntersectsBoard()