KiCad PCB EDA Suite
Loading...
Searching...
No Matches
CREEPAGE_OVERLAY Class Reference

Live creepage overlay shown while dragging items. More...

#include <creepage_overlay.h>

Classes

struct  LAYER_ENGINE
 

Public Member Functions

 CREEPAGE_OVERLAY (BOARD *aBoard, std::shared_ptr< DRC_ENGINE > aDrcEngine, KIGFX::VIEW *aView)
 
 ~CREEPAGE_OVERLAY ()
 
bool IsEnabled () const
 True when the board has creepage constraints and the feature flag is on.
 
void Start (const std::vector< BOARD_ITEM * > &aMovingItems)
 Begin a drag session for the given items, on every copper layer they occupy.
 
void Update ()
 Recompute and redraw at the items' current board positions.
 
void Stop ()
 End the session and clear the overlay.
 

Private Member Functions

void clearOverlay ()
 

Private Attributes

BOARDm_board
 
std::shared_ptr< DRC_ENGINEm_drcEngine
 
KIGFX::VIEWm_view
 
int m_minGrooveWidth
 
std::shared_ptr< KIGFX::VIEW_OVERLAYm_overlay
 
std::map< PCB_LAYER_ID, LAYER_ENGINEm_engines
 
bool m_enabled
 
bool m_active
 
int m_skipFrames
 

Detailed Description

Live creepage overlay shown while dragging items.

Runs one interactive CREEPAGE_ENGINE per copper layer the dragged items occupy (creepage is a per-layer surface distance) and draws onto a single GAL VIEW_OVERLAY. At drag start each engine snapshots the static board-edge sub-graph; each frame it recomputes creepage for the dragged nets at the items' current position and redraws the violating and near-violating paths. The whole feature is gated by the RealtimeCreepage advanced config flag, so it is only constructed when enabled.

Definition at line 55 of file creepage_overlay.h.

Constructor & Destructor Documentation

◆ CREEPAGE_OVERLAY()

CREEPAGE_OVERLAY::CREEPAGE_OVERLAY ( BOARD * aBoard,
std::shared_ptr< DRC_ENGINE > aDrcEngine,
KIGFX::VIEW * aView )

◆ ~CREEPAGE_OVERLAY()

CREEPAGE_OVERLAY::~CREEPAGE_OVERLAY ( )

Definition at line 66 of file creepage_overlay.cpp.

References Stop().

Member Function Documentation

◆ clearOverlay()

void CREEPAGE_OVERLAY::clearOverlay ( )
private

Definition at line 72 of file creepage_overlay.cpp.

References m_overlay, and m_view.

Referenced by Stop().

◆ IsEnabled()

bool CREEPAGE_OVERLAY::IsEnabled ( ) const
inline

True when the board has creepage constraints and the feature flag is on.

Definition at line 62 of file creepage_overlay.h.

References m_enabled.

◆ Start()

void CREEPAGE_OVERLAY::Start ( const std::vector< BOARD_ITEM * > & aMovingItems)

◆ Stop()

void CREEPAGE_OVERLAY::Stop ( )

End the session and clear the overlay.

Definition at line 243 of file creepage_overlay.cpp.

References clearOverlay(), m_active, m_engines, m_overlay, and m_view.

Referenced by ~CREEPAGE_OVERLAY().

◆ Update()

Member Data Documentation

◆ m_active

bool CREEPAGE_OVERLAY::m_active
private

Definition at line 94 of file creepage_overlay.h.

Referenced by CREEPAGE_OVERLAY(), Start(), Stop(), and Update().

◆ m_board

BOARD* CREEPAGE_OVERLAY::m_board
private

Definition at line 77 of file creepage_overlay.h.

Referenced by CREEPAGE_OVERLAY(), and Start().

◆ m_drcEngine

std::shared_ptr<DRC_ENGINE> CREEPAGE_OVERLAY::m_drcEngine
private

Definition at line 78 of file creepage_overlay.h.

Referenced by CREEPAGE_OVERLAY(), and Start().

◆ m_enabled

bool CREEPAGE_OVERLAY::m_enabled
private

Definition at line 93 of file creepage_overlay.h.

Referenced by CREEPAGE_OVERLAY(), IsEnabled(), and Start().

◆ m_engines

std::map<PCB_LAYER_ID, LAYER_ENGINE> CREEPAGE_OVERLAY::m_engines
private

Definition at line 91 of file creepage_overlay.h.

Referenced by Start(), Stop(), and Update().

◆ m_minGrooveWidth

int CREEPAGE_OVERLAY::m_minGrooveWidth
private

Definition at line 80 of file creepage_overlay.h.

Referenced by CREEPAGE_OVERLAY(), and Start().

◆ m_overlay

std::shared_ptr<KIGFX::VIEW_OVERLAY> CREEPAGE_OVERLAY::m_overlay
private

Definition at line 90 of file creepage_overlay.h.

Referenced by clearOverlay(), Start(), Stop(), and Update().

◆ m_skipFrames

int CREEPAGE_OVERLAY::m_skipFrames
private

Definition at line 98 of file creepage_overlay.h.

Referenced by CREEPAGE_OVERLAY(), and Update().

◆ m_view

KIGFX::VIEW* CREEPAGE_OVERLAY::m_view
private

Definition at line 79 of file creepage_overlay.h.

Referenced by clearOverlay(), CREEPAGE_OVERLAY(), Start(), Stop(), and Update().


The documentation for this class was generated from the following files: