Added footprint rule area anchors
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10461
(cherry picked from commit 47c0672ff3
)
This commit is contained in:
parent
7d96d5940d
commit
636d009860
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2014 CERN
|
||||
* Copyright (C) 2018-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2018-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -683,6 +683,24 @@ void PCB_GRID_HELPER::computeAnchors( BOARD_ITEM* aItem, const VECTOR2I& aRefPos
|
|||
break;
|
||||
}
|
||||
|
||||
case PCB_FP_ZONE_T:
|
||||
{
|
||||
const SHAPE_POLY_SET* outline = static_cast<const FP_ZONE*>( aItem )->Outline();
|
||||
|
||||
SHAPE_LINE_CHAIN lc;
|
||||
lc.SetClosed( true );
|
||||
|
||||
for( auto iter = outline->CIterateWithHoles(); iter; iter++ )
|
||||
{
|
||||
addAnchor( *iter, CORNER, aItem );
|
||||
lc.Append( *iter );
|
||||
}
|
||||
|
||||
addAnchor( lc.NearestPoint( aRefPos ), OUTLINE, aItem );
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case PCB_DIM_ALIGNED_T:
|
||||
case PCB_DIM_ORTHOGONAL_T:
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue