diff --git a/pcbnew/router/pns_item.cpp b/pcbnew/router/pns_item.cpp index 2127f6b7ee..1ad8a98cbd 100644 --- a/pcbnew/router/pns_item.cpp +++ b/pcbnew/router/pns_item.cpp @@ -111,7 +111,7 @@ bool ITEM::collideSimple( const ITEM* aHead, const NODE* aNode, if( Kind() == HOLE_T && aHead->Kind() == HOLE_T ) differentNetsOnly = false; - if( differentNetsOnly && Net() == aHead->m_net && aHead->m_net >= 0 ) + if( differentNetsOnly && Net() == aHead->Net() && aHead->Net() >= 0 ) { // same nets? no clearance! clearance = -1; @@ -242,7 +242,7 @@ const std::string ITEM::Format() const { std::stringstream ss; ss << KindStr() << " "; - ss << "net " << m_net << " "; + ss << "net " << Net() << " "; ss << "layers " << m_layers.Start() << " " << m_layers.End(); return ss.str(); } diff --git a/pcbnew/router/pns_node.cpp b/pcbnew/router/pns_node.cpp index 9daedff1cb..6c7aed939f 100644 --- a/pcbnew/router/pns_node.cpp +++ b/pcbnew/router/pns_node.cpp @@ -535,6 +535,9 @@ void NODE::add( ITEM* aItem, bool aAllowRedundant ) case ITEM::SOLID_T: addSolid( static_cast( aItem ) ); break; + case ITEM::HOLE_T: + // added by parent VIA_T or SOLID_T (pad) + break; default: assert( false ); } diff --git a/pcbnew/router/pns_via.cpp b/pcbnew/router/pns_via.cpp index 22a3713a28..6ada741162 100644 --- a/pcbnew/router/pns_via.cpp +++ b/pcbnew/router/pns_via.cpp @@ -160,8 +160,7 @@ VIA* VIA::Clone() const v->m_diameter = m_diameter; v->m_drill = m_drill; v->m_shape = SHAPE_CIRCLE( m_pos, m_diameter / 2 ); - delete v->m_hole; - v->m_hole = m_hole->Clone(); + v->SetHole( HOLE::MakeCircularHole( m_pos, m_drill / 2 ) ); v->m_rank = m_rank; v->m_marker = m_marker; v->m_viaType = m_viaType; @@ -175,7 +174,7 @@ VIA* VIA::Clone() const OPT_BOX2I VIA::ChangedArea( const VIA* aOther ) const { - if ( aOther->Pos() != Pos() ) + if( aOther->Pos() != Pos() ) { BOX2I tmp = Shape()->BBox(); tmp.Merge( aOther->Shape()->BBox() );