3d viewer: fix incorrect calculation of pad hole size of vertical shape.
Fixes #5627 https://gitlab.com/kicad/code/kicad/issues/5627
This commit is contained in:
parent
514da2f886
commit
98339cd5eb
|
@ -799,16 +799,12 @@ void C3D_RENDER_OGL_LEGACY::generate_3D_Vias_and_Pads()
|
||||||
if( !hasHole )
|
if( !hasHole )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// we use the hole diameter to calculate the seg count.
|
const int copperThickness = m_boardAdapter.GetCopperThicknessBIU();
|
||||||
// for round holes, drillsize.x == drillsize.y
|
|
||||||
// for slots, the diameter is the smaller of (drillsize.x, drillsize.y)
|
|
||||||
int copperThickness = m_boardAdapter.GetCopperThicknessBIU();
|
|
||||||
int radius = std::min( drillsize.x, drillsize.y ) / 2 + copperThickness;
|
|
||||||
|
|
||||||
pad->TransformHoleWithClearanceToPolygon( tht_outer_holes_poly,
|
pad->TransformHoleWithClearanceToPolygon( tht_outer_holes_poly,
|
||||||
copperThickness + radius );
|
copperThickness, ARC_LOW_DEF );
|
||||||
|
pad->TransformHoleWithClearanceToPolygon( tht_inner_holes_poly,
|
||||||
pad->TransformHoleWithClearanceToPolygon( tht_inner_holes_poly, radius );
|
0, ARC_LOW_DEF );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue