Handle dimensions and textboxes when plotting contours to DXF.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11901

(cherry picked from commit 83fe3576c6)
This commit is contained in:
Jeff Young 2023-08-25 17:50:36 +01:00
parent 26b8812f15
commit 27657e00fe
2 changed files with 19 additions and 2 deletions

View File

@ -2374,7 +2374,6 @@ void BOARD::ConvertBrdLayerToPolygonalContours( PCB_LAYER_ID aLayer,
{
footprint->TransformPadsToPolySet( aOutlines, aLayer, 0, maxError, ERROR_INSIDE );
// Microwave footprints may have items on copper layers
footprint->TransformFPShapesToPolySet( aOutlines, aLayer, 0, maxError, ERROR_INSIDE,
true, /* include text */
true, /* include shapes */
@ -2428,6 +2427,19 @@ void BOARD::ConvertBrdLayerToPolygonalContours( PCB_LAYER_ID aLayer,
break;
}
case PCB_DIM_ALIGNED_T:
case PCB_DIM_CENTER_T:
case PCB_DIM_RADIAL_T:
case PCB_DIM_ORTHOGONAL_T:
case PCB_DIM_LEADER_T:
{
const PCB_DIMENSION_BASE* dim = static_cast<const PCB_DIMENSION_BASE*>( item );
dim->TransformShapeToPolygon( aOutlines, aLayer, 0, maxError, ERROR_INSIDE );
dim->TransformTextToPolySet( aOutlines, 0, maxError, ERROR_INSIDE );
break;
}
default:
break;
}

View File

@ -2875,7 +2875,12 @@ void FOOTPRINT::TransformFPShapesToPolySet( SHAPE_POLY_SET& aBuffer, PCB_LAYER_I
FP_TEXTBOX* textbox = static_cast<FP_TEXTBOX*>( item );
if( aLayer != UNDEFINED_LAYER && textbox->GetLayer() == aLayer && textbox->IsVisible() )
textbox->TransformShapeToPolygon( aBuffer, aLayer, 0, aError, aErrorLoc );
{
// border
textbox->PCB_SHAPE::TransformShapeToPolygon( aBuffer, aLayer, 0, aError, aErrorLoc );
// text
textbox->TransformTextToPolySet( aBuffer, 0, aError, aErrorLoc );
}
}
if( item->Type() == PCB_FP_SHAPE_T && aIncludeShapes )