mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-11 13:30:11 +00:00
Handle degenerate polygons in RTrees.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18600
This commit is contained in:
parent
32684decbb
commit
d5ecb4ab55
@ -356,7 +356,13 @@ public:
|
||||
[&]( ITEM_WITH_SHAPE* aItem ) -> bool
|
||||
{
|
||||
const SHAPE* shape = aItem->shape;
|
||||
wxASSERT( dynamic_cast<const SHAPE_POLY_SET::TRIANGULATED_POLYGON::TRI*>( shape ) );
|
||||
|
||||
// There are certain degenerate cases that result in empty zone fills, which
|
||||
// will be represented in the rtree with only a root (and no triangles).
|
||||
// https://gitlab.com/kicad/code/kicad/-/issues/18600
|
||||
if( shape->Type() != SH_POLY_SET_TRIANGLE )
|
||||
return true;
|
||||
|
||||
auto tri = static_cast<const SHAPE_POLY_SET::TRIANGULATED_POLYGON::TRI*>( shape );
|
||||
|
||||
const SHAPE_LINE_CHAIN& outline = poly->Outline( 0 );
|
||||
|
Loading…
Reference in New Issue
Block a user