pcbnew: Add edge polygons to pns keepout

Fixes: lp:1806846
* https://bugs.launchpad.net/kicad/+bug/1806846
This commit is contained in:
Seth Hillbrand 2018-12-05 04:56:34 -07:00
parent 02039be2d9
commit 0614f59973
1 changed files with 29 additions and 12 deletions

View File

@ -956,6 +956,23 @@ bool PNS_KICAD_IFACE::syncGraphicalItem( PNS::NODE* aWorld, DRAWSEGMENT* aItem )
} }
break; break;
case S_POLYGON:
{
if( !aItem->IsPolygonFilled() )
{
auto poly = aItem->BuildPolyPointsList();
for( size_t ii = 1; ii < poly.size(); ii++ )
{
segs.push_back( new SHAPE_SEGMENT(
VECTOR2I( poly[ii-1] ), VECTOR2I( poly[ii] ), aItem->GetWidth() ) );
}
segs.push_back( new SHAPE_SEGMENT(
VECTOR2I( poly.back() ), VECTOR2I( poly.front() ), aItem->GetWidth() ) );
}
}
break;
default: default:
break; break;
} }