|
KiCad PCB EDA Suite
|
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 | |
| BOARD * | m_board |
| std::shared_ptr< DRC_ENGINE > | m_drcEngine |
| KIGFX::VIEW * | m_view |
| int | m_minGrooveWidth |
| std::shared_ptr< KIGFX::VIEW_OVERLAY > | m_overlay |
| std::map< PCB_LAYER_ID, LAYER_ENGINE > | m_engines |
| bool | m_enabled |
| bool | m_active |
| int | m_skipFrames |
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.
| CREEPAGE_OVERLAY::CREEPAGE_OVERLAY | ( | BOARD * | aBoard, |
| std::shared_ptr< DRC_ENGINE > | aDrcEngine, | ||
| KIGFX::VIEW * | aView ) |
Definition at line 48 of file creepage_overlay.cpp.
References CREEPAGE_CONSTRAINT, ADVANCED_CFG::GetCfg(), m_active, m_board, m_drcEngine, m_enabled, m_minGrooveWidth, ADVANCED_CFG::m_RealtimeCreepage, m_skipFrames, m_view, and move.
| CREEPAGE_OVERLAY::~CREEPAGE_OVERLAY | ( | ) |
Definition at line 66 of file creepage_overlay.cpp.
References Stop().
|
private |
Definition at line 72 of file creepage_overlay.cpp.
References m_overlay, and m_view.
Referenced by Stop().
|
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.
| void CREEPAGE_OVERLAY::Start | ( | const std::vector< BOARD_ITEM * > & | aMovingItems | ) |
Begin a drag session for the given items, on every copper layer they occupy.
No-op if not enabled.
Definition at line 82 of file creepage_overlay.cpp.
References LSET::AllCuMask(), CREEPAGE_CONSTRAINT, m_active, m_board, m_drcEngine, m_enabled, m_engines, m_minGrooveWidth, m_overlay, m_view, MINOPTMAX< T >::Min(), pad, PCB_FOOTPRINT_T, LSET::Seq(), BOARD_CONNECTED_ITEM::SetLayer(), BOARD_CONNECTED_ITEM::SetNetCode(), and DRC_CONSTRAINT::Value().
| 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().
| void CREEPAGE_OVERLAY::Update | ( | ) |
Recompute and redraw at the items' current board positions.
Definition at line 180 of file creepage_overlay.cpp.
References ANGLE_0, ARC, EDA_SHAPE::GetArcAngle(), PCB_SHAPE::GetCenter(), EDA_SHAPE::GetEnd(), EDA_SHAPE::GetRadius(), EDA_SHAPE::GetShape(), EDA_SHAPE::GetStart(), m_active, m_engines, m_overlay, m_skipFrames, m_view, EDA_UNIT_UTILS::UI::MessageTextFromValue(), MM, and pcbIUScale.
|
private |
Definition at line 94 of file creepage_overlay.h.
Referenced by CREEPAGE_OVERLAY(), Start(), Stop(), and Update().
|
private |
Definition at line 77 of file creepage_overlay.h.
Referenced by CREEPAGE_OVERLAY(), and Start().
|
private |
Definition at line 78 of file creepage_overlay.h.
Referenced by CREEPAGE_OVERLAY(), and Start().
|
private |
Definition at line 93 of file creepage_overlay.h.
Referenced by CREEPAGE_OVERLAY(), IsEnabled(), and Start().
|
private |
Definition at line 91 of file creepage_overlay.h.
|
private |
Definition at line 80 of file creepage_overlay.h.
Referenced by CREEPAGE_OVERLAY(), and Start().
|
private |
Definition at line 90 of file creepage_overlay.h.
Referenced by clearOverlay(), Start(), Stop(), and Update().
|
private |
Definition at line 98 of file creepage_overlay.h.
Referenced by CREEPAGE_OVERLAY(), and Update().
|
private |
Definition at line 79 of file creepage_overlay.h.
Referenced by clearOverlay(), CREEPAGE_OVERLAY(), Start(), Stop(), and Update().