From 47dc86c1e23dddb464abce9a749d3309c0717a0c Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 13 Sep 2023 14:47:42 +0100 Subject: [PATCH] Run filled-test before degenerate-ring-test. Fixes https://gitlab.com/kicad/code/kicad/-/issues/15642 --- 3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp b/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp index e3853277a9..aeb2b04508 100644 --- a/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp +++ b/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp @@ -667,16 +667,12 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta if( inner_radius3DU < 0 ) inner_radius3DU = 0.0; - if( outer_radius3DU <= inner_radius3DU ) - { - // Don't attempt to render degenerate shapes - } - else if( aShape->IsFilled() ) + if( aShape->IsFilled() ) { aContainer->Add( new FILLED_CIRCLE_2D( center3DU, outer_radius3DU, *aOwner ) ); } - else + else if( outer_radius3DU > inner_radius3DU ) { aContainer->Add( new RING_2D( center3DU, inner_radius3DU, outer_radius3DU, *aOwner ) );