From bf6712d4f48ab62c68458fd5b064af1500792f6d Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 1 Jul 2025 01:01:49 -0600 Subject: [PATCH] Don't attempt to convert reference image to a SHAPE_POLY_SET. Also make sure we render table thicknesses when they're drawn on copper layers. --- 3d-viewer/3d_canvas/create_layer_items.cpp | 8 +++++++- pcbnew/board_item.cpp | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/3d-viewer/3d_canvas/create_layer_items.cpp b/3d-viewer/3d_canvas/create_layer_items.cpp index eebff584a5..2d62f4b467 100644 --- a/3d-viewer/3d_canvas/create_layer_items.cpp +++ b/3d-viewer/3d_canvas/create_layer_items.cpp @@ -640,6 +640,9 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter ) addShape( static_cast( item ), layerContainer, item ); break; + case PCB_REFERENCE_IMAGE_T: // ignore + break; + default: wxLogTrace( m_logTrace, wxT( "createLayers: item type: %d not implemented" ), item->Type() ); break; @@ -666,7 +669,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter ) PCB_TEXT* text = static_cast( item ); text->TransformTextToPolySet( *copperPolys, 0, text->GetMaxError(), ERROR_INSIDE ); } - else + else if( item->Type() != PCB_REFERENCE_IMAGE_T ) { item->TransformShapeToPolySet( *copperPolys, layer, 0, item->GetMaxError(), ERROR_INSIDE ); } @@ -740,6 +743,9 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter ) break; } + case PCB_REFERENCE_IMAGE_T: // ignore + break; + default: wxLogTrace( m_logTrace, wxT( "createLayers: item type: %d not implemented" ), item->Type() ); break; diff --git a/pcbnew/board_item.cpp b/pcbnew/board_item.cpp index 30fb4d6240..8f28e1b880 100644 --- a/pcbnew/board_item.cpp +++ b/pcbnew/board_item.cpp @@ -304,7 +304,7 @@ void BOARD_ITEM::TransformShapeToPolygon( SHAPE_POLY_SET& aBuffer, PCB_LAYER_ID int aClearance, int aError, ERROR_LOC aErrorLoc, bool ignoreLineWidth ) const { - wxASSERT_MSG( false, wxT( "Called TransformShapeToPolygon() on unsupported BOARD_ITEM." ) ); + wxFAIL_MSG( wxString::Format( wxT( "%s doesn't implement TransformShapeToPolygon()" ), GetClass() ) ); };