Browse Source

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.
pull/18/head
Jeff Young 3 months ago
parent
commit
bf6712d4f4
  1. 8
      3d-viewer/3d_canvas/create_layer_items.cpp
  2. 2
      pcbnew/board_item.cpp

8
3d-viewer/3d_canvas/create_layer_items.cpp

@ -640,6 +640,9 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
addShape( static_cast<PCB_DIMENSION_BASE*>( item ), layerContainer, item ); addShape( static_cast<PCB_DIMENSION_BASE*>( item ), layerContainer, item );
break; break;
case PCB_REFERENCE_IMAGE_T: // ignore
break;
default: default:
wxLogTrace( m_logTrace, wxT( "createLayers: item type: %d not implemented" ), item->Type() ); wxLogTrace( m_logTrace, wxT( "createLayers: item type: %d not implemented" ), item->Type() );
break; break;
@ -666,7 +669,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
PCB_TEXT* text = static_cast<PCB_TEXT*>( item ); PCB_TEXT* text = static_cast<PCB_TEXT*>( item );
text->TransformTextToPolySet( *copperPolys, 0, text->GetMaxError(), ERROR_INSIDE ); 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 ); item->TransformShapeToPolySet( *copperPolys, layer, 0, item->GetMaxError(), ERROR_INSIDE );
} }
@ -740,6 +743,9 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
break; break;
} }
case PCB_REFERENCE_IMAGE_T: // ignore
break;
default: default:
wxLogTrace( m_logTrace, wxT( "createLayers: item type: %d not implemented" ), item->Type() ); wxLogTrace( m_logTrace, wxT( "createLayers: item type: %d not implemented" ), item->Type() );
break; break;

2
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, int aClearance, int aError, ERROR_LOC aErrorLoc,
bool ignoreLineWidth ) const bool ignoreLineWidth ) const
{ {
wxASSERT_MSG( false, wxT( "Called TransformShapeToPolygon() on unsupported BOARD_ITEM." ) );
wxFAIL_MSG( wxString::Format( wxT( "%s doesn't implement TransformShapeToPolygon()" ), GetClass() ) );
}; };

Loading…
Cancel
Save