Allow net-ties within footprints.

Fixes: lp:1799318
* https://bugs.launchpad.net/kicad/+bug/1799318
This commit is contained in:
Jeff Young 2018-10-23 15:26:37 +01:00
parent adfe2fc267
commit a96dbde738
2 changed files with 13 additions and 0 deletions

View File

@ -104,6 +104,9 @@ typedef const INSPECTOR_FUNC& INSPECTOR; /// std::function passed to nested u
// These define are used for the .m_Flags and .m_UndoRedoStatus member of the
// class EDA_ITEM
//
// NB: DO NOT ADD FLAGS ANYWHERE BUT AT THE END: THE FLAG-SET IS STORED AS AN INTEGER IN FILES.
//
#define IS_CHANGED (1 << 0) ///< Item was edited, and modified
#define IS_LINKED (1 << 1) ///< Used in calculation to mark linked items (temporary use)
#define IN_EDIT (1 << 2) ///< Item currently edited

View File

@ -1074,6 +1074,10 @@ void DRC::testCopperDrawItem( DRAWSEGMENT* aItem )
if( !pad->IsOnLayer( aItem->GetLayer() ) )
continue;
// Graphic items are allowed to act as net-ties within their own footprint
if( pad->GetParent() == aItem->GetParent() )
continue;
const int segmentCount = 18;
double correctionFactor = GetCircletoPolyCorrectionFactor( segmentCount );
SHAPE_POLY_SET padOutline;
@ -1136,6 +1140,12 @@ void DRC::testCopperTextItem( BOARD_ITEM* aTextItem )
if( !pad->IsOnLayer( aTextItem->GetLayer() ) )
continue;
// Graphic items are allowed to act as net-ties within their own footprint
// This probably isn't required for text, but someone will no doubt want to
// use an 'x' or '<' or something.
if( pad->GetParent() == aTextItem->GetParent() )
continue;
const int segmentCount = 18;
double correctionFactor = GetCircletoPolyCorrectionFactor( segmentCount );
SHAPE_POLY_SET padOutline;