ConvertOutlineToPolygon(): fix handling of polygons living in footprints.
Due to recent changes in PCB_SHAPE items, the polygon coordinates are now in board coordinates, not in coord relatives to the parent footprint. Fixes #14530 https://gitlab.com/kicad/code/kicad/issues/14530
This commit is contained in:
parent
33b2b5b09d
commit
97a4e535dc
|
@ -220,20 +220,9 @@ bool ConvertOutlineToPolygon( std::vector<PCB_SHAPE*>& aShapeList, SHAPE_POLY_SE
|
|||
// with other shapes), so process them separately.
|
||||
if( graphic->GetShape() == SHAPE_T::POLY )
|
||||
{
|
||||
EDA_ANGLE orientation = ANGLE_0;
|
||||
VECTOR2I offset = VECTOR2I( 0, 0 );
|
||||
|
||||
if( graphic->GetParentFootprint() )
|
||||
{
|
||||
orientation = graphic->GetParentFootprint()->GetOrientation();
|
||||
offset = graphic->GetParentFootprint()->GetPosition();
|
||||
}
|
||||
|
||||
for( auto it = graphic->GetPolyShape().CIterate(); it; it++ )
|
||||
{
|
||||
VECTOR2I pt = *it;
|
||||
RotatePoint( pt, orientation );
|
||||
pt += offset;
|
||||
|
||||
currContour.Append( pt );
|
||||
|
||||
|
|
Loading…
Reference in New Issue