Implement a work-around for net-ties.
Fixes: lp:1799318 * https://bugs.launchpad.net/kicad/+bug/1799318
This commit is contained in:
parent
3e8b3e535a
commit
3439551543
|
@ -230,6 +230,9 @@ public:
|
|||
void IncrementFlag() { m_arflag += 1; }
|
||||
int GetFlag() const { return m_arflag; }
|
||||
|
||||
// A bit of a hack until net ties are supported as first class citizens
|
||||
bool IsNetTie() const { return GetKeywords().StartsWith( wxT( "net tie" ) ); }
|
||||
|
||||
void Move( const wxPoint& aMoveVector ) override;
|
||||
|
||||
void Rotate( const wxPoint& aRotCentre, double aAngle ) override;
|
||||
|
|
|
@ -977,6 +977,9 @@ void DRC::testCopperTextAndGraphics()
|
|||
if( IsCopperLayer( module->Value().GetLayer() ) )
|
||||
testCopperTextItem( &module->Value());
|
||||
|
||||
if( module->IsNetTie() )
|
||||
continue;
|
||||
|
||||
for( BOARD_ITEM* item = module->GraphicalItemsList(); item; item = item->Next() )
|
||||
{
|
||||
if( IsCopperLayer( item->GetLayer() ) )
|
||||
|
@ -1074,10 +1077,6 @@ 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;
|
||||
|
@ -1140,12 +1139,6 @@ 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;
|
||||
|
|
|
@ -1030,6 +1030,9 @@ void PNS_KICAD_IFACE::SyncWorld( PNS::NODE *aWorld )
|
|||
syncTextItem( aWorld, &module->Reference(), module->Reference().GetLayer() );
|
||||
syncTextItem( aWorld, &module->Value(), module->Value().GetLayer() );
|
||||
|
||||
if( module->IsNetTie() )
|
||||
continue;
|
||||
|
||||
for( auto mgitem : module->GraphicalItems() )
|
||||
{
|
||||
if( mgitem->Type() == PCB_MODULE_EDGE_T )
|
||||
|
|
Loading…
Reference in New Issue