pcbnew: Allow adding SHAPE_LINE_CHAIN to zones

(cherry picked from commit bf0a466642)
This commit is contained in:
Seth Hillbrand 2019-05-20 19:31:40 -07:00
parent f0ce4d6336
commit 94e5b36279
2 changed files with 14 additions and 0 deletions

View File

@ -993,6 +993,18 @@ 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 );
}
void ZONE_CONTAINER::AddPolygon( std::vector< wxPoint >& aPolygon )
{
if( aPolygon.empty() )

View File

@ -599,6 +599,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;