Drill size is absolute

Use hole plating size for visibility only, not zone filling, routing or
DRC
This commit is contained in:
Seth Hillbrand 2022-10-04 08:22:54 -07:00
parent 436d75e7f9
commit b4f3390626
4 changed files with 4 additions and 23 deletions

View File

@ -745,11 +745,6 @@ void DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstZones( BOARD_ITEM* aIt
std::shared_ptr<SHAPE_SEGMENT> hole = pad->GetEffectiveHoleShape();
int size = hole->GetWidth();
// Note: drill size represents finish size, which means the actual hole
// size is the plating thickness larger.
if( pad->GetAttribute() == PAD_ATTRIB::PTH )
size += m_board->GetDesignSettings().GetHolePlatingThickness();
itemShape = std::make_shared<SHAPE_SEGMENT>( hole->GetSeg(), size );
}
}

View File

@ -1152,12 +1152,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 );
}
}

View File

@ -991,7 +991,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 );
@ -1068,7 +1068,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;
}

View File

@ -539,11 +539,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 );
}
@ -682,10 +677,6 @@ void ZONE_FILLER::knockoutThermalReliefs( const ZONE* aZone, PCB_LAYER_ID aLayer
}
else if( pad->GetDrillSize().x > 0 )
{
// Note: drill size represents finish size, which means the actual holes size
// is the plating thickness larger.
holeClearance += pad->GetBoard()->GetDesignSettings().GetHolePlatingThickness();
pad->TransformHoleWithClearanceToPolygon( holes, holeClearance, m_maxError,
ERROR_OUTSIDE );
}
@ -812,7 +803,7 @@ void ZONE_FILLER::buildCopperItemClearances( const ZONE* aZone, PCB_LAYER_ID aLa
if( gap > 0 )
{
int radius = via->GetDrillValue() / 2 + bds.GetHolePlatingThickness();
int radius = via->GetDrillValue() / 2;
TransformCircleToPolygon( aHoles, via->GetPosition(),
radius + gap + extra_margin,