Process all drawsegments on the outline layer
This commit is contained in:
parent
0ac2803624
commit
37eed564ab
|
@ -190,6 +190,9 @@ bool ConvertOutlineToPolygon( std::vector<DRAWSEGMENT*>& aSegList, SHAPE_POLY_SE
|
||||||
if( aSegList.size() == 0 )
|
if( aSegList.size() == 0 )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// Return value
|
||||||
|
bool polygonComplete = true;
|
||||||
|
|
||||||
wxString msg;
|
wxString msg;
|
||||||
|
|
||||||
// Make a working copy of aSegList, because the list is modified during calculations
|
// Make a working copy of aSegList, because the list is modified during calculations
|
||||||
|
@ -497,17 +500,21 @@ bool ConvertOutlineToPolygon( std::vector<DRAWSEGMENT*>& aSegList, SHAPE_POLY_SE
|
||||||
if( aErrorLocation )
|
if( aErrorLocation )
|
||||||
*aErrorLocation = prevPt;
|
*aErrorLocation = prevPt;
|
||||||
|
|
||||||
return false;
|
polygonComplete = false;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int holeNum = -1;
|
||||||
|
|
||||||
while( segList.size() )
|
while( segList.size() )
|
||||||
{
|
{
|
||||||
// emit a signal layers keepout for every interior polygon left...
|
// emit a signal layers keepout for every interior polygon left...
|
||||||
int hole = aPolygons.NewHole();
|
int hole = aPolygons.NewHole();
|
||||||
|
holeNum++;
|
||||||
|
|
||||||
graphic = (DRAWSEGMENT*) segList[0];
|
graphic = (DRAWSEGMENT*) segList[0];
|
||||||
segList.erase( segList.begin() );
|
segList.erase( segList.begin() );
|
||||||
|
@ -702,7 +709,8 @@ bool ConvertOutlineToPolygon( std::vector<DRAWSEGMENT*>& aSegList, SHAPE_POLY_SE
|
||||||
if( aErrorLocation )
|
if( aErrorLocation )
|
||||||
*aErrorLocation = prevPt;
|
*aErrorLocation = prevPt;
|
||||||
|
|
||||||
return false;
|
aPolygons.Hole( 0, holeNum ).SetClosed( false );
|
||||||
|
polygonComplete = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -746,7 +754,7 @@ bool ConvertOutlineToPolygon( std::vector<DRAWSEGMENT*>& aSegList, SHAPE_POLY_SE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return polygonComplete;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <class_board.h>
|
#include <class_board.h>
|
||||||
|
|
Loading…
Reference in New Issue