KiCad PCB EDA Suite
PNS_PCBNEW_RULE_RESOLVER Class Reference
Inheritance diagram for PNS_PCBNEW_RULE_RESOLVER:
PNS::RULE_RESOLVER

Public Member Functions

 PNS_PCBNEW_RULE_RESOLVER (BOARD *aBoard, PNS::ROUTER_IFACE *aRouterIface)
 
virtual ~PNS_PCBNEW_RULE_RESOLVER ()
 
virtual int Clearance (const PNS::ITEM *aA, const PNS::ITEM *aB, bool aUseClearanceEpsilon=true) override
 
virtual int HoleClearance (const PNS::ITEM *aA, const PNS::ITEM *aB, bool aUseClearanceEpsilon=true) override
 
virtual int HoleToHoleClearance (const PNS::ITEM *aA, const PNS::ITEM *aB, bool aUseClearanceEpsilon=true) override
 
virtual int DpCoupledNet (int aNet) override
 
virtual int DpNetPolarity (int aNet) override
 
virtual bool DpNetPair (const PNS::ITEM *aItem, int &aNetP, int &aNetN) override
 
virtual bool IsDiffPair (const PNS::ITEM *aA, const PNS::ITEM *aB) override
 
virtual bool IsInNetTie (const PNS::ITEM *aA) override
 
virtual bool IsNetTieExclusion (const PNS::ITEM *aItem, const VECTOR2I &aCollisionPos, const PNS::ITEM *aCollidingItem) override
 
virtual bool QueryConstraint (PNS::CONSTRAINT_TYPE aType, const PNS::ITEM *aItemA, const PNS::ITEM *aItemB, int aLayer, PNS::CONSTRAINT *aConstraint) override
 
virtual wxString NetName (int aNet) override
 
int ClearanceEpsilon () const
 
void ClearCacheForItem (const PNS::ITEM *aItem) override
 

Private Member Functions

int holeRadius (const PNS::ITEM *aItem) const
 
int matchDpSuffix (const wxString &aNetName, wxString &aComplementNet)
 Checks for netnamed differential pairs. More...
 

Private Attributes

PNS::ROUTER_IFACEm_routerIface
 
BOARDm_board
 
PCB_TRACK m_dummyTracks [2]
 
PCB_ARC m_dummyArcs [2]
 
PCB_VIA m_dummyVias [2]
 
int m_clearanceEpsilon
 
std::unordered_map< CLEARANCE_CACHE_KEY, int > m_clearanceCache
 
std::unordered_map< CLEARANCE_CACHE_KEY, int > m_holeClearanceCache
 
std::unordered_map< CLEARANCE_CACHE_KEY, int > m_holeToHoleClearanceCache
 

Detailed Description

Definition at line 99 of file pns_kicad_iface.cpp.

Constructor & Destructor Documentation

◆ PNS_PCBNEW_RULE_RESOLVER()

PNS_PCBNEW_RULE_RESOLVER::PNS_PCBNEW_RULE_RESOLVER ( BOARD aBoard,
PNS::ROUTER_IFACE aRouterIface 
)

Definition at line 158 of file pns_kicad_iface.cpp.

159 :
160 m_routerIface( aRouterIface ),
161 m_board( aBoard ),
162 m_dummyTracks{ { aBoard }, { aBoard } },
163 m_dummyArcs{ { aBoard }, { aBoard } },
164 m_dummyVias{ { aBoard }, { aBoard } }
165{
166 if( aBoard )
168 else
170}
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Definition: board.cpp:617
PNS::ROUTER_IFACE * m_routerIface

◆ ~PNS_PCBNEW_RULE_RESOLVER()

PNS_PCBNEW_RULE_RESOLVER::~PNS_PCBNEW_RULE_RESOLVER ( )
virtual

Definition at line 173 of file pns_kicad_iface.cpp.

174{
175}

Member Function Documentation

◆ Clearance()

int PNS_PCBNEW_RULE_RESOLVER::Clearance ( const PNS::ITEM aA,
const PNS::ITEM aB,
bool  aUseClearanceEpsilon = true 
)
overridevirtual

Implements PNS::RULE_RESOLVER.

Definition at line 378 of file pns_kicad_iface.cpp.

380{
381 CLEARANCE_CACHE_KEY key = { aA, aB, aUseClearanceEpsilon };
382 auto it = m_clearanceCache.find( key );
383
384 if( it != m_clearanceCache.end() )
385 return it->second;
386
387 PNS::CONSTRAINT constraint;
388 int rv = 0;
389 int layer;
390
391 if( !aA->Layers().IsMultilayer() || !aB || aB->Layers().IsMultilayer() )
392 layer = aA->Layer();
393 else
394 layer = aB->Layer();
395
396 if( isCopper( aA ) && ( !aB || isCopper( aB ) ) )
397 {
398 if( QueryConstraint( PNS::CONSTRAINT_TYPE::CT_CLEARANCE, aA, aB, layer, &constraint ) )
399 rv = constraint.m_Value.Min();
400 }
401
402 if( isEdge( aA ) || ( aB && isEdge( aB ) ) )
403 {
404 if( QueryConstraint( PNS::CONSTRAINT_TYPE::CT_EDGE_CLEARANCE, aA, aB, layer, &constraint ) )
405 {
406 if( constraint.m_Value.Min() > rv )
407 rv = constraint.m_Value.Min();
408 }
409 }
410
411 if( aUseClearanceEpsilon )
412 rv -= m_clearanceEpsilon;
413
414 m_clearanceCache[ key ] = rv;
415 return rv;
416}
bool IsMultilayer() const
Definition: pns_layerset.h:77
T Min() const
Definition: minoptmax.h:33
virtual int Layer() const
Definition: pns_item.h:160
const LAYER_RANGE & Layers() const
Definition: pns_item.h:156
virtual bool QueryConstraint(PNS::CONSTRAINT_TYPE aType, const PNS::ITEM *aItemA, const PNS::ITEM *aItemB, int aLayer, PNS::CONSTRAINT *aConstraint) override
std::unordered_map< CLEARANCE_CACHE_KEY, int > m_clearanceCache
bool isEdge(const PNS::ITEM *aItem)
bool isCopper(const PNS::ITEM *aItem)
MINOPTMAX< int > m_Value
Definition: pns_node.h:70

References PNS::CT_CLEARANCE, PNS::CT_EDGE_CLEARANCE, isCopper(), isEdge(), LAYER_RANGE::IsMultilayer(), PNS::ITEM::Layer(), PNS::ITEM::Layers(), m_clearanceCache, m_clearanceEpsilon, PNS::CONSTRAINT::m_Value, MINOPTMAX< T >::Min(), and QueryConstraint().

◆ ClearanceEpsilon()

int PNS_PCBNEW_RULE_RESOLVER::ClearanceEpsilon ( ) const
inline

Definition at line 126 of file pns_kicad_iface.cpp.

126{ return m_clearanceEpsilon; }

References m_clearanceEpsilon.

Referenced by PNS_KICAD_IFACE_BASE::SyncWorld().

◆ ClearCacheForItem()

void PNS_PCBNEW_RULE_RESOLVER::ClearCacheForItem ( const PNS::ITEM aItem)
overridevirtual

Reimplemented from PNS::RULE_RESOLVER.

Definition at line 368 of file pns_kicad_iface.cpp.

369{
370 CLEARANCE_CACHE_KEY key = { aItem, nullptr, false };
371 m_clearanceCache.erase( key );
372
373 key.Flag = true;
374 m_clearanceCache.erase( key );
375}

References CLEARANCE_CACHE_KEY::Flag, and m_clearanceCache.

◆ DpCoupledNet()

int PNS_PCBNEW_RULE_RESOLVER::DpCoupledNet ( int  aNet)
overridevirtual

Implements PNS::RULE_RESOLVER.

Definition at line 731 of file pns_kicad_iface.cpp.

732{
733 wxString refName = m_board->FindNet( aNet )->GetNetname();
734 wxString coupledNetName;
735
736 if( matchDpSuffix( refName, coupledNetName ) )
737 {
738 NETINFO_ITEM* net = m_board->FindNet( coupledNetName );
739
740 if( !net )
741 return -1;
742
743 return net->GetNetCode();
744 }
745
746 return -1;
747}
NETINFO_ITEM * FindNet(int aNetcode) const
Search for a net with the given netcode.
Definition: board.cpp:1391
Handle the data for a net.
Definition: netinfo.h:66
const wxString & GetNetname() const
Definition: netinfo.h:119
int GetNetCode() const
Definition: netinfo.h:113
int matchDpSuffix(const wxString &aNetName, wxString &aComplementNet)
Checks for netnamed differential pairs.

References BOARD::FindNet(), NETINFO_ITEM::GetNetCode(), NETINFO_ITEM::GetNetname(), m_board, and matchDpSuffix().

◆ DpNetPair()

bool PNS_PCBNEW_RULE_RESOLVER::DpNetPair ( const PNS::ITEM aItem,
int &  aNetP,
int &  aNetN 
)
overridevirtual

Implements PNS::RULE_RESOLVER.

Definition at line 765 of file pns_kicad_iface.cpp.

766{
767 if( !aItem || !aItem->Parent() || !aItem->Parent()->IsConnected() )
768 return false;
769
770 BOARD_CONNECTED_ITEM* cItem = static_cast<BOARD_CONNECTED_ITEM*>( aItem->Parent() );
771 NETINFO_ITEM* netInfo = cItem->GetNet();
772
773 if( !netInfo )
774 return false;
775
776 wxString netNameP = netInfo->GetNetname();
777 wxString netNameN, netNameCoupled;
778
779 int r = matchDpSuffix( netNameP, netNameCoupled );
780
781 if( r == 0 )
782 {
783 return false;
784 }
785 else if( r == 1 )
786 {
787 netNameN = netNameCoupled;
788 }
789 else
790 {
791 netNameN = netNameP;
792 netNameP = netNameCoupled;
793 }
794
795 NETINFO_ITEM* netInfoP = m_board->FindNet( netNameP );
796 NETINFO_ITEM* netInfoN = m_board->FindNet( netNameN );
797
798 if( !netInfoP || !netInfoN )
799 return false;
800
801 aNetP = netInfoP->GetNetCode();
802 aNetN = netInfoN->GetNetCode();
803
804 return true;
805}
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
NETINFO_ITEM * GetNet() const
Return #NET_INFO object for a given item.
virtual bool IsConnected() const
Returns information if the object is derived from BOARD_CONNECTED_ITEM.
Definition: board_item.h:105
BOARD_ITEM * Parent() const
Definition: pns_item.h:151
E_SERIE r
Definition: eserie.cpp:41

References BOARD::FindNet(), BOARD_CONNECTED_ITEM::GetNet(), NETINFO_ITEM::GetNetCode(), NETINFO_ITEM::GetNetname(), BOARD_ITEM::IsConnected(), m_board, matchDpSuffix(), PNS::ITEM::Parent(), and r.

Referenced by IsDiffPair().

◆ DpNetPolarity()

int PNS_PCBNEW_RULE_RESOLVER::DpNetPolarity ( int  aNet)
overridevirtual

Implements PNS::RULE_RESOLVER.

Definition at line 756 of file pns_kicad_iface.cpp.

757{
758 wxString refName = m_board->FindNet( aNet )->GetNetname();
759 wxString dummy1;
760
761 return matchDpSuffix( refName, dummy1 );
762}

References BOARD::FindNet(), NETINFO_ITEM::GetNetname(), m_board, and matchDpSuffix().

◆ HoleClearance()

int PNS_PCBNEW_RULE_RESOLVER::HoleClearance ( const PNS::ITEM aA,
const PNS::ITEM aB,
bool  aUseClearanceEpsilon = true 
)
overridevirtual

Implements PNS::RULE_RESOLVER.

Definition at line 419 of file pns_kicad_iface.cpp.

421{
422 CLEARANCE_CACHE_KEY key = { aA, aB, aUseClearanceEpsilon };
423 auto it = m_holeClearanceCache.find( key );
424
425 if( it != m_holeClearanceCache.end() )
426 return it->second;
427
428 PNS::CONSTRAINT constraint;
429 int rv = 0;
430 int layer;
431
432 if( !aA->Layers().IsMultilayer() || !aB || aB->Layers().IsMultilayer() )
433 layer = aA->Layer();
434 else
435 layer = aB->Layer();
436
437 if( QueryConstraint( PNS::CONSTRAINT_TYPE::CT_HOLE_CLEARANCE, aA, aB, layer, &constraint ) )
438 rv = constraint.m_Value.Min();
439
440 if( aUseClearanceEpsilon )
441 rv -= m_clearanceEpsilon;
442
443 m_holeClearanceCache[ key ] = rv;
444 return rv;
445}
std::unordered_map< CLEARANCE_CACHE_KEY, int > m_holeClearanceCache

References PNS::CT_HOLE_CLEARANCE, LAYER_RANGE::IsMultilayer(), PNS::ITEM::Layer(), PNS::ITEM::Layers(), m_clearanceEpsilon, m_holeClearanceCache, PNS::CONSTRAINT::m_Value, MINOPTMAX< T >::Min(), and QueryConstraint().

◆ holeRadius()

int PNS_PCBNEW_RULE_RESOLVER::holeRadius ( const PNS::ITEM aItem) const
private

Definition at line 178 of file pns_kicad_iface.cpp.

179{
180 if( aItem->Kind() == PNS::ITEM::SOLID_T )
181 {
182 const PAD* pad = dynamic_cast<const PAD*>( aItem->Parent() );
183
184 if( pad && pad->GetDrillShape() == PAD_DRILL_SHAPE_CIRCLE )
185 return pad->GetDrillSize().x / 2;
186 }
187 else if( aItem->Kind() == PNS::ITEM::VIA_T )
188 {
189 const PCB_VIA* via = dynamic_cast<const PCB_VIA*>( aItem->Parent() );
190
191 if( via )
192 return via->GetDrillValue() / 2;
193 }
194
195 return 0;
196}
Definition: pad.h:58
PnsKind Kind() const
Return the type (kind) of the item.
Definition: pns_item.h:132
@ SOLID_T
Definition: pns_item.h:63
@ PAD_DRILL_SHAPE_CIRCLE
Definition: pad_shapes.h:70

References PNS::ITEM::Kind(), pad, PAD_DRILL_SHAPE_CIRCLE, PNS::ITEM::Parent(), PNS::ITEM::SOLID_T, via, and PNS::ITEM::VIA_T.

◆ HoleToHoleClearance()

int PNS_PCBNEW_RULE_RESOLVER::HoleToHoleClearance ( const PNS::ITEM aA,
const PNS::ITEM aB,
bool  aUseClearanceEpsilon = true 
)
overridevirtual

Implements PNS::RULE_RESOLVER.

Definition at line 448 of file pns_kicad_iface.cpp.

450{
451 CLEARANCE_CACHE_KEY key = { aA, aB, aUseClearanceEpsilon };
452 auto it = m_holeToHoleClearanceCache.find( key );
453
454 if( it != m_holeToHoleClearanceCache.end() )
455 return it->second;
456
457 PNS::CONSTRAINT constraint;
458 int rv = 0;
459 int layer;
460
461 if( !aA->Layers().IsMultilayer() || !aB || aB->Layers().IsMultilayer() )
462 layer = aA->Layer();
463 else
464 layer = aB->Layer();
465
466 if( QueryConstraint( PNS::CONSTRAINT_TYPE::CT_HOLE_TO_HOLE, aA, aB, layer, &constraint ) )
467 rv = constraint.m_Value.Min();
468
469 if( aUseClearanceEpsilon )
470 rv -= m_clearanceEpsilon;
471
472 m_holeToHoleClearanceCache[ key ] = rv;
473 return rv;
474}
std::unordered_map< CLEARANCE_CACHE_KEY, int > m_holeToHoleClearanceCache

References PNS::CT_HOLE_TO_HOLE, LAYER_RANGE::IsMultilayer(), PNS::ITEM::Layer(), PNS::ITEM::Layers(), m_clearanceEpsilon, m_holeToHoleClearanceCache, PNS::CONSTRAINT::m_Value, MINOPTMAX< T >::Min(), and QueryConstraint().

◆ IsDiffPair()

bool PNS_PCBNEW_RULE_RESOLVER::IsDiffPair ( const PNS::ITEM aA,
const PNS::ITEM aB 
)
overridevirtual

Implements PNS::RULE_RESOLVER.

Definition at line 199 of file pns_kicad_iface.cpp.

200{
201 int net_p, net_n;
202
203 if( !DpNetPair( aA, net_p, net_n ) )
204 return false;
205
206 if( aA->Net() == net_p && aB->Net() == net_n )
207 return true;
208
209 if( aB->Net() == net_p && aA->Net() == net_n )
210 return true;
211
212 return false;
213}
int Net() const
Definition: pns_item.h:154
virtual bool DpNetPair(const PNS::ITEM *aItem, int &aNetP, int &aNetN) override

References DpNetPair(), and PNS::ITEM::Net().

◆ IsInNetTie()

bool PNS_PCBNEW_RULE_RESOLVER::IsInNetTie ( const PNS::ITEM aA)
overridevirtual

Implements PNS::RULE_RESOLVER.

Definition at line 216 of file pns_kicad_iface.cpp.

217{
218 BOARD_ITEM* item = aA->Parent();
219 BOARD_ITEM* parentFootprint = item ? item->GetParentFootprint() : nullptr;
220
221 if( parentFootprint )
222 return static_cast<FOOTPRINT*>( parentFootprint )->IsNetTie();
223
224 return false;
225}
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:50
BOARD_ITEM_CONTAINER * GetParentFootprint() const
Definition: board_item.cpp:217

References BOARD_ITEM::GetParentFootprint(), and PNS::ITEM::Parent().

◆ IsNetTieExclusion()

bool PNS_PCBNEW_RULE_RESOLVER::IsNetTieExclusion ( const PNS::ITEM aItem,
const VECTOR2I aCollisionPos,
const PNS::ITEM aCollidingItem 
)
overridevirtual

Implements PNS::RULE_RESOLVER.

Definition at line 228 of file pns_kicad_iface.cpp.

231{
232 std::shared_ptr<DRC_ENGINE> drcEngine = m_board->GetDesignSettings().m_DRCEngine;
233 BOARD_ITEM* collidingItem = aCollidingItem->Parent();
234
235 if( drcEngine && collidingItem )
236 {
237 return drcEngine->IsNetTieExclusion( aItem->Net(), ToLAYER_ID( aItem->Layer() ),
238 aCollisionPos, collidingItem );
239 }
240
241 return false;
242}
std::shared_ptr< DRC_ENGINE > m_DRCEngine
PCB_LAYER_ID ToLAYER_ID(int aLayer)
Definition: lset.cpp:926

References BOARD::GetDesignSettings(), PNS::ITEM::Layer(), m_board, BOARD_DESIGN_SETTINGS::m_DRCEngine, PNS::ITEM::Net(), PNS::ITEM::Parent(), and ToLAYER_ID().

◆ matchDpSuffix()

int PNS_PCBNEW_RULE_RESOLVER::matchDpSuffix ( const wxString &  aNetName,
wxString &  aComplementNet 
)
private

Checks for netnamed differential pairs.

This accepts nets named suffixed by 'P', 'N', '+', '-', as well as additional numbers and underscores following the suffix. So NET_P_123 is a valid positive net name matched to NET_N_123.

Parameters
aNetNameInput net name to check for DP naming
aComplementNetGenerated net name for the pair
Returns
-1 if found the negative pair, +1 if found the positive pair, 0 otherwise

Definition at line 682 of file pns_kicad_iface.cpp.

683{
684 int rv = 0;
685 int count = 0;
686
687 for( auto it = aNetName.rbegin(); it != aNetName.rend() && rv == 0; ++it, ++count )
688 {
689 int ch = *it;
690
691 if( ( ch >= '0' && ch <= '9' ) || ch == '_' )
692 {
693 continue;
694 }
695 else if( ch == '+' )
696 {
697 aComplementNet = wxT( "-" );
698 rv = 1;
699 }
700 else if( ch == '-' )
701 {
702 aComplementNet = wxT( "+" );
703 rv = -1;
704 }
705 else if( ch == 'N' )
706 {
707 aComplementNet = wxT( "P" );
708 rv = -1;
709 }
710 else if ( ch == 'P' )
711 {
712 aComplementNet = wxT( "N" );
713 rv = 1;
714 }
715 else
716 {
717 break;
718 }
719 }
720
721 if( rv != 0 && count >= 1 )
722 {
723 aComplementNet = aNetName.Left( aNetName.length() - count ) + aComplementNet
724 + aNetName.Right( count - 1 );
725 }
726
727 return rv;
728}

Referenced by DpCoupledNet(), DpNetPair(), and DpNetPolarity().

◆ NetName()

wxString PNS_PCBNEW_RULE_RESOLVER::NetName ( int  aNet)
overridevirtual

Implements PNS::RULE_RESOLVER.

Definition at line 750 of file pns_kicad_iface.cpp.

751{
752 return m_board->FindNet( aNet )->GetNetname();
753}

References BOARD::FindNet(), NETINFO_ITEM::GetNetname(), and m_board.

◆ QueryConstraint()

bool PNS_PCBNEW_RULE_RESOLVER::QueryConstraint ( PNS::CONSTRAINT_TYPE  aType,
const PNS::ITEM aItemA,
const PNS::ITEM aItemB,
int  aLayer,
PNS::CONSTRAINT aConstraint 
)
overridevirtual

Implements PNS::RULE_RESOLVER.

Definition at line 267 of file pns_kicad_iface.cpp.

270{
271 std::shared_ptr<DRC_ENGINE> drcEngine = m_board->GetDesignSettings().m_DRCEngine;
272
273 if( !drcEngine )
274 return false;
275
276 DRC_CONSTRAINT_T hostType;
277
278 switch ( aType )
279 {
289 default: return false; // should not happen
290 }
291
292 BOARD_ITEM* parentA = aItemA ? aItemA->Parent() : nullptr;
293 BOARD_ITEM* parentB = aItemB ? aItemB->Parent() : nullptr;
294 DRC_CONSTRAINT hostConstraint;
295
296 // A track being routed may not have a BOARD_ITEM associated yet.
297 if( aItemA && !parentA )
298 {
299 switch( aItemA->Kind() )
300 {
301 case PNS::ITEM::ARC_T: parentA = &m_dummyArcs[0]; break;
302 case PNS::ITEM::VIA_T: parentA = &m_dummyVias[0]; break;
303 case PNS::ITEM::SEGMENT_T: parentA = &m_dummyTracks[0]; break;
304 case PNS::ITEM::LINE_T: parentA = &m_dummyTracks[0]; break;
305 default: break;
306 }
307
308 if( parentA )
309 {
310 parentA->SetLayer( (PCB_LAYER_ID) aLayer );
311 static_cast<BOARD_CONNECTED_ITEM*>( parentA )->SetNetCode( aItemA->Net(), true );
312 }
313 }
314
315 if( aItemB && !parentB )
316 {
317 switch( aItemB->Kind() )
318 {
319 case PNS::ITEM::ARC_T: parentB = &m_dummyArcs[1]; break;
320 case PNS::ITEM::VIA_T: parentB = &m_dummyVias[1]; break;
321 case PNS::ITEM::SEGMENT_T: parentB = &m_dummyTracks[1]; break;
322 case PNS::ITEM::LINE_T: parentB = &m_dummyTracks[1]; break;
323 default: break;
324 }
325
326 if( parentB )
327 {
328 parentB->SetLayer( (PCB_LAYER_ID) aLayer );
329 static_cast<BOARD_CONNECTED_ITEM*>( parentB )->SetNetCode( aItemB->Net(), true );
330 }
331 }
332
333 if( parentA )
334 hostConstraint = drcEngine->EvalRules( hostType, parentA, parentB, (PCB_LAYER_ID) aLayer );
335
336 if( hostConstraint.IsNull() )
337 return false;
338
339 if( hostConstraint.GetSeverity() == RPT_SEVERITY_IGNORE )
340 {
341 aConstraint->m_Value.SetMin( -1 );
342 aConstraint->m_RuleName = hostConstraint.GetName();
343 aConstraint->m_Type = aType;
344 return true;
345 }
346
347 switch ( aType )
348 {
357 aConstraint->m_Value = hostConstraint.GetValue();
358 aConstraint->m_RuleName = hostConstraint.GetName();
359 aConstraint->m_Type = aType;
360 return true;
361
362 default:
363 return false;
364 }
365}
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
Definition: board_item.h:201
wxString GetName() const
Definition: drc_rule.h:147
SEVERITY GetSeverity() const
Definition: drc_rule.h:160
const MINOPTMAX< int > & GetValue() const
Definition: drc_rule.h:139
bool IsNull() const
Definition: drc_rule.h:134
void SetMin(T v)
Definition: minoptmax.h:41
@ LINE_T
Definition: pns_item.h:64
@ SEGMENT_T
Definition: pns_item.h:66
DRC_CONSTRAINT_T
Definition: drc_rule.h:44
@ VIA_DIAMETER_CONSTRAINT
Definition: drc_rule.h:62
@ DIFF_PAIR_GAP_CONSTRAINT
Definition: drc_rule.h:65
@ TRACK_WIDTH_CONSTRAINT
Definition: drc_rule.h:55
@ EDGE_CLEARANCE_CONSTRAINT
Definition: drc_rule.h:49
@ LENGTH_CONSTRAINT
Definition: drc_rule.h:63
@ CLEARANCE_CONSTRAINT
Definition: drc_rule.h:46
@ HOLE_CLEARANCE_CONSTRAINT
Definition: drc_rule.h:47
@ HOLE_SIZE_CONSTRAINT
Definition: drc_rule.h:50
@ HOLE_TO_HOLE_CONSTRAINT
Definition: drc_rule.h:48
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:59
@ RPT_SEVERITY_IGNORE
wxString m_RuleName
Definition: pns_node.h:72
CONSTRAINT_TYPE m_Type
Definition: pns_node.h:69

References PNS::ITEM::ARC_T, CLEARANCE_CONSTRAINT, PNS::CT_CLEARANCE, PNS::CT_DIFF_PAIR_GAP, PNS::CT_EDGE_CLEARANCE, PNS::CT_HOLE_CLEARANCE, PNS::CT_HOLE_TO_HOLE, PNS::CT_LENGTH, PNS::CT_VIA_DIAMETER, PNS::CT_VIA_HOLE, PNS::CT_WIDTH, DIFF_PAIR_GAP_CONSTRAINT, EDGE_CLEARANCE_CONSTRAINT, BOARD::GetDesignSettings(), DRC_CONSTRAINT::GetName(), DRC_CONSTRAINT::GetSeverity(), DRC_CONSTRAINT::GetValue(), HOLE_CLEARANCE_CONSTRAINT, HOLE_SIZE_CONSTRAINT, HOLE_TO_HOLE_CONSTRAINT, DRC_CONSTRAINT::IsNull(), PNS::ITEM::Kind(), LENGTH_CONSTRAINT, PNS::ITEM::LINE_T, m_board, BOARD_DESIGN_SETTINGS::m_DRCEngine, m_dummyArcs, m_dummyTracks, m_dummyVias, PNS::CONSTRAINT::m_RuleName, PNS::CONSTRAINT::m_Type, PNS::CONSTRAINT::m_Value, PNS::ITEM::Net(), PNS::ITEM::Parent(), RPT_SEVERITY_IGNORE, PNS::ITEM::SEGMENT_T, BOARD_ITEM::SetLayer(), MINOPTMAX< T >::SetMin(), TRACK_WIDTH_CONSTRAINT, VIA_DIAMETER_CONSTRAINT, and PNS::ITEM::VIA_T.

Referenced by Clearance(), HoleClearance(), HoleToHoleClearance(), and PNS_KICAD_IFACE_BASE::ImportSizes().

Member Data Documentation

◆ m_board

BOARD* PNS_PCBNEW_RULE_RESOLVER::m_board
private

◆ m_clearanceCache

std::unordered_map<CLEARANCE_CACHE_KEY, int> PNS_PCBNEW_RULE_RESOLVER::m_clearanceCache
private

Definition at line 152 of file pns_kicad_iface.cpp.

Referenced by Clearance(), and ClearCacheForItem().

◆ m_clearanceEpsilon

int PNS_PCBNEW_RULE_RESOLVER::m_clearanceEpsilon
private

◆ m_dummyArcs

PCB_ARC PNS_PCBNEW_RULE_RESOLVER::m_dummyArcs[2]
private

Definition at line 148 of file pns_kicad_iface.cpp.

Referenced by QueryConstraint().

◆ m_dummyTracks

PCB_TRACK PNS_PCBNEW_RULE_RESOLVER::m_dummyTracks[2]
private

Definition at line 147 of file pns_kicad_iface.cpp.

Referenced by QueryConstraint().

◆ m_dummyVias

PCB_VIA PNS_PCBNEW_RULE_RESOLVER::m_dummyVias[2]
private

Definition at line 149 of file pns_kicad_iface.cpp.

Referenced by QueryConstraint().

◆ m_holeClearanceCache

std::unordered_map<CLEARANCE_CACHE_KEY, int> PNS_PCBNEW_RULE_RESOLVER::m_holeClearanceCache
private

Definition at line 153 of file pns_kicad_iface.cpp.

Referenced by HoleClearance().

◆ m_holeToHoleClearanceCache

std::unordered_map<CLEARANCE_CACHE_KEY, int> PNS_PCBNEW_RULE_RESOLVER::m_holeToHoleClearanceCache
private

Definition at line 154 of file pns_kicad_iface.cpp.

Referenced by HoleToHoleClearance().

◆ m_routerIface

PNS::ROUTER_IFACE* PNS_PCBNEW_RULE_RESOLVER::m_routerIface
private

Definition at line 145 of file pns_kicad_iface.cpp.


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