From 98339cd5eb82b8c3b0badb525140ced6e0c1ddc9 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 15 Sep 2020 10:17:31 +0200 Subject: [PATCH] 3d viewer: fix incorrect calculation of pad hole size of vertical shape. Fixes #5627 https://gitlab.com/kicad/code/kicad/issues/5627 --- .../c3d_render_createscene_ogl_legacy.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_createscene_ogl_legacy.cpp b/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_createscene_ogl_legacy.cpp index 1c143b5e01..291f9cc4ec 100644 --- a/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_createscene_ogl_legacy.cpp +++ b/3d-viewer/3d_rendering/3d_render_ogl_legacy/c3d_render_createscene_ogl_legacy.cpp @@ -799,16 +799,12 @@ void C3D_RENDER_OGL_LEGACY::generate_3D_Vias_and_Pads() if( !hasHole ) continue; - // we use the hole diameter to calculate the seg count. - // 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; + const int copperThickness = m_boardAdapter.GetCopperThicknessBIU(); pad->TransformHoleWithClearanceToPolygon( tht_outer_holes_poly, - copperThickness + radius ); - - pad->TransformHoleWithClearanceToPolygon( tht_inner_holes_poly, radius ); + copperThickness, ARC_LOW_DEF ); + pad->TransformHoleWithClearanceToPolygon( tht_inner_holes_poly, + 0, ARC_LOW_DEF ); } } }