diff --git a/pcbnew/router/pns_node.cpp b/pcbnew/router/pns_node.cpp index b7cdbafe4a..3787210175 100644 --- a/pcbnew/router/pns_node.cpp +++ b/pcbnew/router/pns_node.cpp @@ -525,8 +525,11 @@ void NODE::addHole( HOLE* aHole ) // do we need holes in the connection graph? //linkJoint( aHole->Pos(), aHole->Layers(), aHole->Net(), aHole ); - aHole->SetOwner( this ); - m_index->Add( aHole ); + HOLE* hole = new HOLE( aHole->Shape()->Clone() ); + hole->SetLayers( aHole->Layers() ); + + hole->SetOwner( this ); + m_index->Add( hole ); } diff --git a/pcbnew/router/pns_solid.h b/pcbnew/router/pns_solid.h index 43e1ad49a5..af28be298d 100644 --- a/pcbnew/router/pns_solid.h +++ b/pcbnew/router/pns_solid.h @@ -66,6 +66,20 @@ public: m_orientation = aSolid.m_orientation; } + SOLID& operator=( const SOLID& aB ) + { + if( aB.m_shape ) + SetShape( aB.m_shape->Clone() ); + + if( aB.m_hole ) + SetHole( new PNS::HOLE( aB.m_hole->Shape()->Clone() ) ); + + m_pos = aB.m_pos; + m_padToDie = aB.m_padToDie; + m_orientation = aB.m_orientation; + return *this; + } + static inline bool ClassOf( const ITEM* aItem ) { return aItem && SOLID_T == aItem->Kind(); diff --git a/pcbnew/router/pns_via.h b/pcbnew/router/pns_via.h index 8622d3ef3e..94895b0aea 100644 --- a/pcbnew/router/pns_via.h +++ b/pcbnew/router/pns_via.h @@ -103,6 +103,23 @@ public: delete m_hole; } + VIA& operator=( const VIA& aB ) + { + SetNet( aB.Net() ); + SetLayers( aB.Layers() ); + m_pos = aB.m_pos; + m_diameter = aB.m_diameter; + m_shape = SHAPE_CIRCLE( m_pos, m_diameter / 2 ); + m_drill = aB.m_drill; + SetHole( HOLE::MakeCircularHole( m_pos, m_drill / 2 ) ); + m_marker = aB.m_marker; + m_rank = aB.m_rank; + m_viaType = aB.m_viaType; + m_isFree = aB.m_isFree; + m_isVirtual = aB.m_isVirtual; + return *this; + } + static inline bool ClassOf( const ITEM* aItem ) { return aItem && VIA_T == aItem->Kind();