pcbnew: Allow adding SHAPE_LINE_CHAIN to zones

This commit is contained in:
Seth Hillbrand 2019-05-20 19:31:40 -07:00
parent 9992839c78
commit bf0a466642
2 changed files with 16 additions and 0 deletions

View File

@ -1006,6 +1006,20 @@ ZoneConnection ZONE_CONTAINER::GetPadConnection( D_PAD* aPad ) const
}
void ZONE_CONTAINER::AddPolygon( const SHAPE_LINE_CHAIN& aPolygon )
{
wxASSERT( aPolygon.IsClosed() );
// Add the outline as a new polygon in the polygon set
if( m_Poly->OutlineCount() == 0 )
m_Poly->AddOutline( aPolygon );
else
m_Poly->AddHole( aPolygon );
SetNeedRefill( true );
}
void ZONE_CONTAINER::AddPolygon( std::vector< wxPoint >& aPolygon )
{
if( aPolygon.empty() )

View File

@ -620,6 +620,8 @@ public:
*/
void AddPolygon( std::vector< wxPoint >& aPolygon );
void AddPolygon( const SHAPE_LINE_CHAIN& aPolygon );
void SetFillSegments( const ZONE_SEGMENT_FILL& aSegments )
{
m_FillSegmList = aSegments;