Drill size is absolute
Use hole plating size for visibility only, not zone filling, routing or
DRC
(cherry picked from commit b4f3390626
)
This commit is contained in:
parent
981aafd5d9
commit
e834374ad2
|
@ -1345,12 +1345,7 @@ std::shared_ptr<SHAPE> DRC_ENGINE::GetShape( BOARD_ITEM* aItem, PCB_LAYER_ID aLa
|
|||
|
||||
if( aPad->GetAttribute() == PAD_ATTRIB::PTH )
|
||||
{
|
||||
BOARD_DESIGN_SETTINGS& bds = aPad->GetBoard()->GetDesignSettings();
|
||||
|
||||
// Note: drill size represents finish size, which means the actual holes size is the
|
||||
// plating thickness larger.
|
||||
auto hole = static_cast<SHAPE_SEGMENT*>( aPad->GetEffectiveHoleShape()->Clone() );
|
||||
hole->SetWidth( hole->GetWidth() + bds.GetHolePlatingThickness() );
|
||||
return std::make_shared<SHAPE_SEGMENT>( *hole );
|
||||
}
|
||||
|
||||
|
|
|
@ -449,11 +449,6 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testItemAgainstZones( BOARD_ITEM* aItem
|
|||
const SHAPE_SEGMENT* hole = pad->GetEffectiveHoleShape();
|
||||
int size = hole->GetWidth();
|
||||
|
||||
// Note: drill size represents finish size, which means the actual hole
|
||||
// size is 2x the plating thickness larger.
|
||||
if( pad->GetAttribute() == PAD_ATTRIB::PTH )
|
||||
size += 2 * m_board->GetDesignSettings().GetHolePlatingThickness();
|
||||
|
||||
itemShape = std::make_shared<SHAPE_SEGMENT>( hole->GetSeg(), size );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1013,12 +1013,7 @@ std::shared_ptr<SHAPE> PCB_VIA::GetEffectiveShape( PCB_LAYER_ID aLayer, FLASHING
|
|||
}
|
||||
else
|
||||
{
|
||||
int radius = GetDrillValue() / 2;
|
||||
|
||||
if( GetBoard() )
|
||||
radius += GetBoard()->GetDesignSettings().GetHolePlatingThickness();
|
||||
|
||||
return std::make_shared<SHAPE_CIRCLE>( m_Start, radius );
|
||||
return std::make_shared<SHAPE_CIRCLE>( m_Start, GetDrillValue() / 2 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -967,7 +967,7 @@ std::unique_ptr<PNS::SOLID> PNS_KICAD_IFACE_BASE::syncPad( PAD* aPad )
|
|||
if( aPad->GetAttribute() != PAD_ATTRIB::NPTH )
|
||||
{
|
||||
BOARD_DESIGN_SETTINGS& bds = m_board->GetDesignSettings();
|
||||
slot->SetWidth( slot->GetWidth() + bds.GetHolePlatingThickness() * 2 );
|
||||
slot->SetWidth( slot->GetWidth() );
|
||||
}
|
||||
|
||||
solid->SetHole( slot );
|
||||
|
@ -1044,7 +1044,7 @@ std::unique_ptr<PNS::VIA> PNS_KICAD_IFACE_BASE::syncVia( PCB_VIA* aVia )
|
|||
|
||||
BOARD_DESIGN_SETTINGS& bds = m_board->GetDesignSettings();
|
||||
via->SetHole( SHAPE_CIRCLE( aVia->GetPosition(),
|
||||
aVia->GetDrillValue() / 2 + bds.GetHolePlatingThickness() ) );
|
||||
aVia->GetDrillValue() / 2 ) );
|
||||
|
||||
return via;
|
||||
}
|
||||
|
|
|
@ -582,11 +582,6 @@ void ZONE_FILLER::addKnockout( PAD* aPad, PCB_LAYER_ID aLayer, int aGap, SHAPE_P
|
|||
*/
|
||||
void ZONE_FILLER::addHoleKnockout( PAD* aPad, int aGap, SHAPE_POLY_SET& aHoles )
|
||||
{
|
||||
// Note: drill size represents finish size, which means the actual hole size is the plating
|
||||
// thickness larger.
|
||||
if( aPad->GetAttribute() == PAD_ATTRIB::PTH )
|
||||
aGap += aPad->GetBoard()->GetDesignSettings().GetHolePlatingThickness();
|
||||
|
||||
aPad->TransformHoleWithClearanceToPolygon( aHoles, aGap, m_maxError, ERROR_OUTSIDE );
|
||||
}
|
||||
|
||||
|
@ -657,11 +652,6 @@ void ZONE_FILLER::knockoutThermalReliefs( const ZONE* aZone, PCB_LAYER_ID aLayer
|
|||
if( pad->GetDrillSize().x == 0 && pad->GetDrillSize().y == 0 )
|
||||
continue;
|
||||
|
||||
// Note: drill size represents finish size, which means the actual holes size is
|
||||
// the plating thickness larger.
|
||||
if( pad->GetAttribute() == PAD_ATTRIB::PTH )
|
||||
gap += pad->GetBoard()->GetDesignSettings().GetHolePlatingThickness();
|
||||
|
||||
pad->TransformHoleWithClearanceToPolygon( holes, gap, m_maxError, ERROR_OUTSIDE );
|
||||
}
|
||||
}
|
||||
|
@ -790,7 +780,7 @@ void ZONE_FILLER::buildCopperItemClearances( const ZONE* aZone, PCB_LAYER_ID aLa
|
|||
aZone, via, aLayer ) );
|
||||
}
|
||||
|
||||
int radius = via->GetDrillValue() / 2 + bds.GetHolePlatingThickness();
|
||||
int radius = via->GetDrillValue() / 2;
|
||||
|
||||
TransformCircleToPolygon( aHoles, via->GetPosition(),
|
||||
radius + gap + extra_margin,
|
||||
|
|
Loading…
Reference in New Issue