From 0e2429b5cccc6525b5a0006572d07bf215861194 Mon Sep 17 00:00:00 2001 From: Roberto Fernandez Bautista Date: Mon, 11 Apr 2022 14:49:33 +0100 Subject: [PATCH] 3D Viewer: Don't render zero-width circles --- 3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp b/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp index 3748459fa9..e099060cce 100644 --- a/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp +++ b/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp @@ -361,7 +361,9 @@ void BOARD_ADAPTER::createPadWithMargin( const PAD* aPad, CONTAINER_2D_BASE* aCo const double radius3DU = TO_3DU( circle->GetRadius() + clearance.x ); const SFVEC2F center3DU = TO_SFVEC2F( circle->GetCenter() ); - aContainer->Add( new FILLED_CIRCLE_2D( center3DU, radius3DU, *aPad ) ); + // Don't render zero radius circles + if( radius3DU != 0.0 ) + aContainer->Add( new FILLED_CIRCLE_2D( center3DU, radius3DU, *aPad ) ); } break;